Kaydet (Commit) f7f2d03b authored tarafından Justin Luth's avatar Justin Luth Kaydeden (comit) Justin Luth

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/54510Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
üst c0fbf99e
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment