[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - dbaccess/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 20 20:17:23 UTC 2020


 dbaccess/source/core/dataaccess/databasedocument.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 94b563f789a211603c66a08bd5eefd6a0de3c717
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Mon Apr 20 16:43:31 2020 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Apr 20 22:16:53 2020 +0200

    Revert "Related tdf#97694 Fix macro preservation on Windows"
    
    This reverts commit 984a240975b87eff10ccda394de9e7ea0078ed30.
    
    Change-Id: I31cca20301c34b23c7116fb7ea18c537e07fbc83
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92578
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index f76104e93aa9..cc571a0a6457 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1093,21 +1093,18 @@ void ODatabaseDocument::impl_storeAs_throw( const OUString& _rURL, const ::comph
         }
 
         // store to current storage
-        Reference< XStorage > xCurrentStorage( m_pImpl->getOrCreateRootStorage(), UNO_SET_THROW );
-        OUString aODFVersion(comphelper::OStorageHelper::GetODFVersionFromStorage(xCurrentStorage));
+        Reference< XStorage > xCurrentStorage( m_pImpl->getOrCreateRootStorage(), UNO_QUERY_THROW );
         Sequence< PropertyValue > aMediaDescriptor( lcl_appendFileNameToDescriptor( _rArguments, _rURL ) );
         impl_storeToStorage_throw( xCurrentStorage, aMediaDescriptor, _rGuard );
 
         // Preserve script signature if the script has not changed
         if (bTryToPreserveScriptSignature)
         {
-            // Need to close this storage, otherwise we can't open it for signing below
-            // (Windows needs exclusive file access)
-            uno::Reference < lang::XComponent > xComp = xCurrentStorage;
-            xComp->dispose();
             uno::Reference<security::XDocumentDigitalSignatures> xDDSigns;
             try
             {
+                OUString aODFVersion(
+                    comphelper::OStorageHelper::GetODFVersionFromStorage(xCurrentStorage));
                 xDDSigns = security::DocumentDigitalSignatures::createWithVersion(
                     comphelper::getProcessComponentContext(), aODFVersion);
 


More information about the Libreoffice-commits mailing list