summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbadocumentbase.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx
index 39b3443b2cea..760c256927e9 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>
@@ -92,6 +93,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 );
return sPath;