sfx2/source/doc/docmacromode.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 3a21ea3548abc8ba18bc50ba3d9f646e92ae7d5e
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Wed Nov 8 14:19:41 2023 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Nov 9 07:21:10 2023 +0100

    Simplify a bit
    
    Additionally, get rid of a variable that was for system path,
    but used "URL" in its name :-)
    
    Change-Id: I77db0ae42677e2fef1431d45b1736d2e54ff26d9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159156
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 8157da72b416..bbb4dd37e8f0 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -308,10 +308,7 @@ namespace sfx2
         if ( eAutoConfirm == eNoAutoConfirm )
         {
             OUString sReferrer(sURL);
-
-            OUString aSystemFileURL;
-            if ( osl::FileBase::getSystemPathFromFileURL( sReferrer, 
aSystemFileURL ) == osl::FileBase::E_None )
-                sReferrer = aSystemFileURL;
+            osl::FileBase::getSystemPathFromFileURL(sReferrer, sReferrer);
 
             bSecure = lcl_showMacroWarning( rxInteraction, sReferrer );
         }
commit c7f43e0f3d03ec6583fbf7eb553eec53f3ec43b8
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Wed Nov 8 14:15:51 2023 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Nov 9 07:21:05 2023 +0100

    Do not throw on IZoneIdentifier COM error
    
    Not being able to obtain Security Zone info from OS is not a fatal
    error here; just handle it accordingly.
    
    Change-Id: Ifb19c88f2c08e99c313aecc54044252bac50f88e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159155
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 017e620303e4..8157da72b416 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -254,9 +254,9 @@ namespace sfx2
         osl::FileBase::getSystemPathFromFileURL(sURL, sFilePath);
         sal::systools::COMReference<IZoneIdentifier> pZoneId;
         pZoneId.CoCreateInstance(CLSID_PersistentZoneIdentifier);
-        sal::systools::COMReference<IPersistFile> pPersist(pZoneId, 
sal::systools::COM_QUERY_THROW);
+        sal::systools::COMReference<IPersistFile> pPersist(pZoneId, 
sal::systools::COM_QUERY);
         DWORD dwZone;
-        if (!SUCCEEDED(pPersist->Load(o3tl::toW(sFilePath.getStr()), 
STGM_READ)) ||
+        if (!pPersist || 
!SUCCEEDED(pPersist->Load(o3tl::toW(sFilePath.getStr()), STGM_READ)) ||
             !SUCCEEDED(pZoneId->GetId(&dwZone)))
         {
             // no Security Zone info found -> assume a local file, not

Reply via email to