Kaydet (Commit) 951aefb2 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

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
üst 54badeee
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment