[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vbahelper/source
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 20 11:52:41 UTC 2019
vbahelper/source/vbahelper/vbadocumentbase.cxx | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit c07466b645dc967e7b86f0ca0a626018bcf6e44c
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Apr 2 14:52:45 2019 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Sep 20 13:51:25 2019 +0200
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
(cherry picked from commit 7c934cf3cdda7684588bf0be550af159c7ede3b4)
Reviewed-on: https://gerrit.libreoffice.org/79203
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx
index a65377a8f5fd..fb23c5264c2a 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 <tools/urlobj.hxx>
#include <osl/file.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 << "'");
More information about the Libreoffice-commits
mailing list