From 9b911aaa3d2c7258fd41a896b7d57ca8c2a476fb Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Thu, 25 Jul 2024 21:11:04 +0200 Subject: [PATCH] tdf#124213: handle private URLs as non-remote Since commit 26c106a5aeca3e50d1e3c3d37e622b2743a23bca "append '(Remote)' in the titlebar when remote file is opened", 2015-08-14, the titlebar shows "(remote)" for documents with non-empty URLs that are not file scheme. When recovering a non-existing document, the URL is a factory one like "private:factory/swriter"; and INetURLObject::GetProtocol() call returns PrivSoffice. Indeed, recovery of a non-existing document doesn't make sense itself, and is fixed by Justin elsewhere; but let's fix the general logic here. Change-Id: Ibaf095981c37a2fd64f745ad0966465d98a4ed4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171027 Reviewed-by: Mike Kaganski Tested-by: Jenkins --- framework/source/fwe/helper/titlehelper.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index c318ec817b45..5fc85505edad 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -438,6 +438,7 @@ void TitleHelper::impl_updateTitleForController (const css::uno::Reference< css: { INetURLObject aURL (xModel->getURL ()); if (aURL.GetProtocol () != INetProtocol::File + && aURL.GetProtocol() != INetProtocol::PrivSoffice && aURL.GetProtocol () != INetProtocol::NotValid) { OUString sRemoteText (FwkResId (STR_REMOTE_TITLE));