[Libreoffice-commits] core.git: sw/source

Justin Luth justin_luth at sil.org
Sat Nov 1 07:43:51 PDT 2014


 sw/source/core/unocore/unomap.cxx |    2 +-
 sw/source/uibase/uno/unotxdoc.cxx |   10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

New commits:
commit b812374174144e077bc3b08fe347626cb1a33eee
Author: Justin Luth <justin_luth at sil.org>
Date:   Tue Oct 7 09:52:28 2014 -0400

    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 at gmail.com>
    Tested-by: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>

diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index f17f5b1..96e039b 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 bf543d1..d48ab72 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:


More information about the Libreoffice-commits mailing list