diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-06 11:59:24 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-06 16:53:54 +0100 |
commit | 02b91a83b67f230bb58854340c79e94cc147bb12 (patch) | |
tree | 47cc7ec2d11158ea7ecacc49fe92d2837f9b494e /sw | |
parent | 8dfd8245381b8b9e89d2399b35c089964385b3cf (diff) |
sw: add InteropGrabBag for paragraph styles
Change-Id: I44087a5119a538a3892d7f44a33a00bc601a6d44
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/cmdid.h | 1 | ||||
-rw-r--r-- | sw/inc/unoprnms.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/unocore/unomap.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/unocore/unoprnms.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 15 |
5 files changed, 20 insertions, 1 deletions
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index a7977f82a4c6..2c7afacda34a 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -654,6 +654,7 @@ included in c-context files, so c++ style stuff will cause problems. #define FN_UNO_REPLACEMENT_GRAPHIC_U_R_L (FN_EXTRA2 + 121) #define FN_UNO_HIDDEN (FN_EXTRA2 + 122) +#define FN_UNO_STYLE_INTEROP_GRAB_BAG (FN_EXTRA2 + 123) /*------------------------------------------------ -------------------- Area: Help diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx index 66a56d6714f1..34d36083600e 100644 --- a/sw/inc/unoprnms.hxx +++ b/sw/inc/unoprnms.hxx @@ -841,6 +841,7 @@ enum SwPropNameIds /* 0774 */ UNO_NAME_DOC_INTEROP_GRAB_BAG, /* 0775 */ UNO_NAME_FRAME_INTEROP_GRAB_BAG, /* 0776 */ UNO_NAME_CHAR_HIGHLIGHT, +/* 0777 */ UNO_NAME_STYLE_INTEROP_GRAB_BAG, SW_PROPNAME_END diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index f63b85abe5d8..f2fb41ca80ba 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -490,7 +490,8 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider() { SW_PROP_NMID(UNO_NAME_PARA_IS_CONNECT_BORDER), RES_PARATR_CONNECT_BORDER, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::MAYBEVOID, 0},\ { SW_PROP_NMID(UNO_NAME_SNAP_TO_GRID), RES_PARATR_SNAPTOGRID, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::MAYBEVOID, 0 }, \ { SW_PROP_NMID(UNO_NAME_OUTLINE_LEVEL), RES_PARATR_OUTLINELEVEL,CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, 0}, \ - { SW_PROP_NMID(UNO_NAME_HIDDEN), FN_UNO_HIDDEN, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 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}, #define COMMON_FLDTYP_PROPERTIES \ diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx index 740c8fda9d85..1ad38e9ffff4 100644 --- a/sw/source/core/unocore/unoprnms.cxx +++ b/sw/source/core/unocore/unoprnms.cxx @@ -806,6 +806,7 @@ const SwPropNameTab aPropNameTab = { /* 0774 UNO_NAME_DOC_INTEROP_GRAB_BAG */ {MAP_CHAR_LEN("InteropGrabBag")}, /* 0775 UNO_NAME_FRAME_INTEROP_GRAB_BAG */ {MAP_CHAR_LEN("FrameInteropGrabBag")}, /* 0776 UNO_NAME_CHAR_HIGHLIGHT */ {MAP_CHAR_LEN("CharHighlight")}, +/* 0777 UNO_NAME_STYLE_INTEROP_GRAB_BAG */ {MAP_CHAR_LEN("StyleInteropGrabBag")}, // new items in this array must match enum SwPropNameIds }; diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 5227be19f271..e40280350f3c 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1678,6 +1678,13 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, } break; + case FN_UNO_STYLE_INTEROP_GRAB_BAG: + { + rBase.mxNewBase->GetItemSet(); + rBase.mxNewBase->SetGrabBagItem(rValue); + } + break; + case RES_PAPER_BIN: { SfxPrinter *pPrinter = pDoc->getPrinter( true ); @@ -2177,6 +2184,14 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, } aRet.setValue(&bHidden, ::getBooleanCppuType()); } + else if (FN_UNO_STYLE_INTEROP_GRAB_BAG == rEntry.nWID) + { + if (pBase) + { + rtl::Reference<SwDocStyleSheet> xBase(new SwDocStyleSheet(*(SwDocStyleSheet*)pBase)); + xBase->GetGrabBagItem(aRet); + } + } else if(pBase) { if(!rBase.mxNewBase.is()) |