summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2014-10-07 09:52:28 -0400
committerSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2014-11-01 14:43:25 +0000
commitb812374174144e077bc3b08fe347626cb1a33eee (patch)
treea6516fb7a44521029c682f557a2125c8c9feb2f5
parenta65308f307554cfd277f24af66df246814ad1b8b (diff)
related to #fdo71248 - ActiveDocument not tracking ThisWordDoc
Making the same change that fixed ThisExcelDoc in 2012 (commit cea414bfe8fe356793778bdf09f5ca3b3a42daa0), but matching the current code structure (commit 191bf98991e1934bfef115a1cec463ac250b0191) Change-Id: I0a5c1a006d5a73b8e3be1b6b407e62927d49c36a Reviewed-on: https://gerrit.libreoffice.org/11842 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
-rw-r--r--sw/source/core/unocore/unomap.cxx2
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx10
2 files changed, 7 insertions, 5 deletions
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index f17f5b17d664..96e039b6034b 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -1795,7 +1795,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ OUString(UNO_NAME_CHAR_LOCALE), RES_CHRATR_LANGUAGE , cppu::UnoType<css::lang::Locale>::get(), PropertyAttribute::MAYBEVOID, MID_LANG_LOCALE },
{ OUString(UNO_NAME_CHARACTER_COUNT), WID_DOC_CHAR_COUNT, cppu::UnoType<sal_Int32>::get(), PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_DIALOG_LIBRARIES), WID_DOC_DIALOG_LIBRARIES, cppu::UnoType<css::script::XLibraryContainer>::get(), PropertyAttribute::READONLY, 0},
- { OUString(UNO_NAME_VBA_DOCOBJ), WID_DOC_VBA_DOCOBJ, cppu::UnoType< cppu::UnoSequenceType<css::beans::PropertyValue> >::get(), PropertyAttribute::READONLY, 0},
+ { OUString(UNO_NAME_VBA_DOCOBJ), WID_DOC_VBA_DOCOBJ, cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_INDEX_AUTO_MARK_FILE_U_R_L), WID_DOC_AUTO_MARK_URL, cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0},
{ OUString(UNO_NAME_PARAGRAPH_COUNT), WID_DOC_PARA_COUNT, cppu::UnoType<sal_Int32>::get(), PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_RECORD_CHANGES), WID_DOC_CHANGES_RECORD, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0},
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index bf543d10ed45..d48ab72af172 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2124,10 +2124,12 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
break;
case WID_DOC_VBA_DOCOBJ:
{
- beans::PropertyValue aProp;
- aProp.Name = "ThisWordDoc";
- aProp.Value <<= pDocShell->GetModel();
- aAny <<= aProp;
+ /* #i111553# This property provides the name of the constant that
+ will be used to store this model in the global Basic manager.
+ That constant will be equivalent to 'ThisComponent' but for
+ each application, so e.g. a 'ThisExcelDoc' and a 'ThisWordDoc'
+ constant can co-exist, as required by VBA. */
+ aAny <<= OUString( "ThisWordDoc" );
}
break;
case WID_DOC_RUNTIME_UID: