extensions/source/ole/unoobjw.cxx              |    2 +-
 sfx2/source/doc/docfile.cxx                    |    4 ++--
 vbahelper/source/vbahelper/vbadocumentbase.cxx |   18 +++++++++++++++++-
 3 files changed, 20 insertions(+), 4 deletions(-)

New commits:
commit 4da4afca691c43e974a3a99dd82606b01badbeae
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Tue Apr 2 14:55:08 2019 +0300
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Tue Apr 2 18:24:28 2019 +0300

    Fix typo
    
    Change-Id: Ib5ba2d6e0b4af7126a3619b39ab7f1cd51f38c2a

diff --git a/extensions/source/ole/unoobjw.cxx 
b/extensions/source/ole/unoobjw.cxx
index 84bb3ed4b420..fac1dcda5fec 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -2474,7 +2474,7 @@ Sink::Call( const OUString& Method, Sequence< Any >& 
Arguments )
         }
         nMemId++;
     }
-    SAL_WARN("extensions.olebridge", "Sink::Call: Uknown method '" << Method 
<< "'");
+    SAL_WARN("extensions.olebridge", "Sink::Call: Unknown method '" << Method 
<< "'");
 }
 
 class CXEnumConnections : public IEnumConnections,
commit 7c934cf3cdda7684588bf0be550af159c7ede3b4
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Tue Apr 2 14:52:45 2019 +0300
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Tue Apr 2 18:24:28 2019 +0300

    Implement the FullName property correctly in the Automation case
    
    Return a complete pathname.
    
    For or internal Basic, keep the existing semantics, that for some
    reason returns just the filename.
    
    Change-Id: I897cc797ca2158ca7c798f3e8adcdfa57a41ee3b

diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx 
b/vbahelper/source/vbahelper/vbadocumentbase.cxx
index cb73e32d9cbb..d6cf72a264fb 100644
--- a/vbahelper/source/vbahelper/vbadocumentbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx
@@ -35,6 +35,7 @@
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <ooo/vba/XApplicationBase.hpp>
 
+#include <comphelper/automationinvokedzone.hxx>
 #include <cppuhelper/exc_hlp.hxx>
 #include <comphelper/unwrapargs.hxx>
 #include <tools/urlobj.hxx>
@@ -97,6 +98,15 @@ VbaDocumentBase::getPath()
 OUString
 VbaDocumentBase::getFullName()
 {
+    // In the Automation case, follow the specs.
+    if (comphelper::Automation::AutomationInvokedZone::isActive())
+    {
+        // We know that Automation is relevant only on Windows, so hardcode 
"\\".
+        OUString sPath = getPath() + "\\" + getName();
+        SAL_INFO("vbahelper", "VbaDocumentBase::getFullName: '" << sPath << 
"'");
+        return sPath;
+    }
+
     OUString sPath = getName();
     //::osl::File::getSystemPathFromFileURL( getModel()->getURL(), sPath );
     SAL_INFO("vbahelper", "VbaDocumentBase::getFullName: '" << sPath << "'");
commit 9efe10f50951bdf8e0fb3051d37ea6856c5e1dd9
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Tue Apr 2 14:43:31 2019 +0300
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Tue Apr 2 18:24:28 2019 +0300

    Add a few SAL_INFOs
    
    Change-Id: Ibdb013f4eeee8a2b2e29e3adb56943b5fccf9772

diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx 
b/vbahelper/source/vbahelper/vbadocumentbase.cxx
index f9ba17d6ee36..cb73e32d9cbb 100644
--- a/vbahelper/source/vbahelper/vbadocumentbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx
@@ -55,7 +55,10 @@ VbaDocumentBase::VbaDocumentBase( uno::Sequence< uno::Any> 
const & args,
 OUString
 VbaDocumentBase::getName()
 {
-    return VbaDocumentBase::getNameFromModel( getModel() );
+    OUString sName = VbaDocumentBase::getNameFromModel( getModel() );
+    SAL_INFO("vbahelper", "VbaDocumentBase::getName: '" << sName << "'");
+
+    return sName;
 }
 
 OUString VbaDocumentBase::getNameFromModel( const uno::Reference< 
frame::XModel >& xModel )
@@ -86,6 +89,8 @@ VbaDocumentBase::getPath()
        sURL = sURL.copy( 0, sURL.getLength() - aURL.GetLastName().getLength() 
- 1 );
        ::osl::File::getSystemPathFromFileURL( sURL, sPath );
     }
+    SAL_INFO("vbahelper", "VbaDocumentBase::getPath: '" << sPath << "'");
+
     return sPath;
 }
 
@@ -94,6 +99,7 @@ VbaDocumentBase::getFullName()
 {
     OUString sPath = getName();
     //::osl::File::getSystemPathFromFileURL( getModel()->getURL(), sPath );
+    SAL_INFO("vbahelper", "VbaDocumentBase::getFullName: '" << sPath << "'");
     return sPath;
 }
 
commit f65b120cc8ae83c8e90e8a786855a98b2d4d58c2
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Tue Apr 2 14:02:51 2019 +0300
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Tue Apr 2 18:24:27 2019 +0300

    Warn when getFileURLFromSystemPath() fails, not when it succeeds
    
    Also, display the name that the call failed for in the warning message.
    
    Change-Id: I0b6b7baca1d534b5bada5286b2b0e5b8e94f1832

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 4c09ef2db87d..8b403e446952 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -699,9 +699,9 @@ bool SfxMedium::IsStorage()
     {
         OUString aURL;
         if ( osl::FileBase::getFileURLFromSystemPath( pImpl->m_aName, aURL )
-             == osl::FileBase::E_None )
+             != osl::FileBase::E_None )
         {
-            SAL_WARN( "sfx.doc", "Physical name not convertible!");
+            SAL_WARN( "sfx.doc", "Physical name '" << pImpl->m_aName << "' not 
convertible to file URL");
         }
         pImpl->bIsStorage = SotStorage::IsStorageFile( aURL ) && 
!SotStorage::IsOLEStorage( aURL);
         if ( !pImpl->bIsStorage )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to