summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2018-05-18 06:59:26 +0300
committerJan Holesovsky <kendy@collabora.com>2019-10-09 14:34:19 +0200
commit51f36a731b46a866c480dd4596454e8313538fbe (patch)
tree06f4dec935f5d230fb4e2b0603faf3b1b6c239e2
parentd1e7264f8e6dbba282c2365801477fca676079f0 (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> (cherry picked from commit f7f2d03bd6f5aa5dcd0f7976b4a7f2db278c2f03) Reviewed-on: https://gerrit.libreoffice.org/80292 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
-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 f1bd8bd20ee1..0442b8907988 100644
--- a/sw/inc/unocrsrhelper.hxx
+++ b/sw/inc/unocrsrhelper.hxx
@@ -162,7 +162,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 12ee49ce3fb2..3c88a3c5b25b 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1750,12 +1750,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