summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2018-05-18 06:59:26 +0300
committerJustin Luth <justin_luth@sil.org>2018-05-25 05:51:48 +0200
commitf7f2d03bd6f5aa5dcd0f7976b4a7f2db278c2f03 (patch)
tree34274f372ee443594f64fd2fcc4bf7130f9b9923 /sw
parentc0fbf99e5601da27c59d131bcca24fafd259e508 (diff)
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@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/unocrsrhelper.hxx3
-rw-r--r--sw/source/core/unocore/unoobj.cxx5
2 files changed, 5 insertions, 3 deletions
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