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

Justin Luth justin.luth at collabora.com
Fri May 25 03:52:10 UTC 2018


 sw/inc/unocrsrhelper.hxx          |    3 ++-
 sw/source/core/unocore/unoobj.cxx |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit f7f2d03bd6f5aa5dcd0f7976b4a7f2db278c2f03
Author: Justin Luth <justin.luth at collabora.com>
Date:   Fri May 18 06:59:26 2018 +0300

    NFC SwUnoCursorHelper: add SetModeAttr option to setPropertyValue
    
    The other function, setPropertyValues already has this variable,
    so for consistency and flexibility, add it here as well. Plus, this
    is prep work for another patch.
    
    Change-Id: I16c5b1cbb9fd99a11be99a59005bd856d787a6ca
    Reviewed-on: https://gerrit.libreoffice.org/54510
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>

diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
index 56e0d48e1331..7624c59afaf3 100644
--- a/sw/inc/unocrsrhelper.hxx
+++ b/sw/inc/unocrsrhelper.hxx
@@ -156,7 +156,8 @@ namespace SwUnoCursorHelper
             SwPaM& rPaM,
             const SfxItemPropertySet & rPropSet,
             const OUString & rPropertyName,
-            const css::uno::Any & rValue);
+            const css::uno::Any & rValue,
+            const SetAttrMode nAttrMode = SetAttrMode::DEFAULT);
     /// @throws css::beans::UnknownPropertyException
     /// @throws css::beans::PropertyVetoException
     /// @throws css::lang::IllegalArgumentException
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 5505597bab0d..862f9635d70c 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1752,12 +1752,13 @@ uno::Any SwUnoCursorHelper::GetPropertyValue(
 void SwUnoCursorHelper::SetPropertyValue(
     SwPaM& rPaM, const SfxItemPropertySet& rPropSet,
     const OUString& rPropertyName,
-    const uno::Any& rValue)
+    const uno::Any& rValue,
+    const SetAttrMode nAttrMode)
 {
     uno::Sequence< beans::PropertyValue > aValues(1);
     aValues[0].Name = rPropertyName;
     aValues[0].Value = rValue;
-    SetPropertyValues(rPaM, rPropSet, aValues, SetAttrMode::DEFAULT);
+    SetPropertyValues(rPaM, rPropSet, aValues, nAttrMode);
 }
 
 // FN_UNO_PARA_STYLE is known to set attributes for nodes, inside


More information about the Libreoffice-commits mailing list