framework/source/fwe/helper/titlehelper.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 9b911aaa3d2c7258fd41a896b7d57ca8c2a476fb
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Thu Jul 25 21:11:04 2024 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Jul 25 23:09:11 2024 +0200

    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 <mike.kagan...@collabora.com>
    Tested-by: Jenkins

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));

Reply via email to