summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-11-08 09:44:07 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-11-08 09:53:12 +0100
commitcad4afbd1444fe410aef014b01008b03ed4ecbf5 (patch)
tree0d8f98fefd694af2b9be7d4c90ed4ab0de947096 /sw
parente3d3b7bb0c6c8bbe87b3ce4b7c74f2d50fc1a78b (diff)
sw: add InteropGrabBag for character styles
offapi already documented this, but marked as optional, and previously only paragraph styles implemented it. Do the same for character styles. Change-Id: I3e331eb43f325ac8963984b2460db53f1be497a6
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unomap.cxx1
-rw-r--r--sw/source/ui/app/docstyle.cxx12
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index f2fb41ca80ba..6ddd1d999426 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -590,6 +590,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_USER_DEFINED_ATTRIBUTES), RES_UNKNOWNATR_CONTAINER, CPPU_E2T(CPPUTYPE_REFNAMECNT), PropertyAttribute::MAYBEVOID, 0 },
{ SW_PROP_NMID(UNO_NAME_IS_PHYSICAL), FN_UNO_IS_PHYSICAL, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_HIDDEN), FN_UNO_HIDDEN, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
+ { SW_PROP_NMID(UNO_NAME_STYLE_INTEROP_GRAB_BAG), FN_UNO_STYLE_INTEROP_GRAB_BAG, CPPU_E2T(CPPUTYPE_PROPERTYVALUE), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_DISPLAY_NAME), FN_UNO_DISPLAY_NAME, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_CHAR_COMBINE_IS_ON), RES_CHRATR_TWO_LINES, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, MID_TWOLINES},
{ SW_PROP_NMID(UNO_NAME_CHAR_COMBINE_PREFIX), RES_CHRATR_TWO_LINES, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, MID_START_BRACKET},
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index 8e3736db483e..9fc712fe705f 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -436,6 +436,14 @@ void SwDocStyleSheet::SetGrabBagItem(const uno::Any& rVal)
SwFmt* pFmt = 0;
switch (nFamily)
{
+ case SFX_STYLE_FAMILY_CHAR:
+ pFmt = rDoc.FindCharFmtByName(aName);
+ if (pFmt)
+ {
+ pFmt->SetGrabBagItem(rVal);
+ bChg = true;
+ }
+ break;
case SFX_STYLE_FAMILY_PARA:
pFmt = rDoc.FindTxtFmtCollByName(aName);
if (pFmt)
@@ -463,6 +471,10 @@ void SwDocStyleSheet::GetGrabBagItem(uno::Any& rVal) const
SwFmt* pFmt = 0;
switch (nFamily)
{
+ case SFX_STYLE_FAMILY_CHAR:
+ pFmt = rDoc.FindCharFmtByName(aName);
+ pFmt->GetGrabBagItem(rVal);
+ break;
case SFX_STYLE_FAMILY_PARA:
pFmt = rDoc.FindTxtFmtCollByName(aName);
pFmt->GetGrabBagItem(rVal);