diff options
author | Armin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de> | 2024-02-09 11:13:58 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2024-02-12 10:35:33 +0100 |
commit | ca3c6d468f68af1506bf4e56b47655e5d56306a8 (patch) | |
tree | 27da565a170606c4ea54ea07aa0dbb21eba3fe60 /svx/source | |
parent | 207501b8385818a5d413b9f4001e0d24aaa4f2a9 (diff) |
ITEM: ItemPool Rework (I)
Driving forward the Item reworks I now take the
ItemPool in focus: It now does not hold any items
anymore and should be renamed to something like
ItemInfoProvider/ItemHelper, since it's main purpose
is to provide the Defaults for the Item functionality.
There is that SfxItemInfo, only a struct and bundling
SlotID and ItemFlags. There are also the DefaultItems,
just handled as ptrs in an array. It is/was always
error-prone to keep these in sync. Remember that it's
also necessary for the order to not only being sorted
but being increments of one with no gaps allowed in
the WhichIDs to which the Items are bound.
I now bundled that to a new class ItemInfo that joins
WhichID, SlotID, ItemFlags and the default Item. This
is a pure virtual base class, it comes in three
derivations:
(1) ItemInfoStatic:
This is supposed to be global static and hosts the
Item in a std::unique_ptr to ensure cleanup. It is
designed to be constructed once during runtime and
being shared globally. It allows the ItemPtr to be
nullptr to mark as non-static (if initial static is
not possible for some reason) but still offers the
needed data. Most cases (95%+) are of that case.
The contained Item is owned by that instance. The
flag isStaticDefault() is set at the Item.
(2) ItemInfoDynamic:
This is supposed to be used for cases where the Item
cannot be static: Mainly for SfxSetItem (that needs
a Pool itself in the contained SfxItemSet, so lifetime
is bound to that Pool), but other cases showed up in
the transition. These instances live while the Pool
lives and get destructed when the Pool goes down.
Also uses std::unique_ptr for the Item instance for
as much automated cleanup as possible, the contained
Item is owned by that instance, the instance by the
Pool. The flag isDynamicDefault() is set at the Item.
(3) ItemInfoUser:
This is used for UserDefaults that can be set for
every ItemInfo entry to 'overshadow' the default
from the 'outside'. It uses a regular Item and
the central access methods implCreateItemEntry/
implCleanupItemEntry to manage the Item instance,
thus works like a SfxPoolItemHolder. The Item
instance can be globally shared and re-used even
when the Pool goes down. Instances belong to the
Pool and are cleaned up when the Pool goes down.
This Item does not need any further flag to be
set.
The ItemInfos are organized using a class
called ItemInfoPackage:
This bundles groups of ItemInfoStatic to
functional instances. There are derivations/
implementations of this e.g. for Writer ItemPool
bundling all the needed defaults for Writer,
similar for draw/impress, Calc and other usages.
These ItemInfoPackage can be 'registered' at an
ItemPool using it's method registerItemInfoPackage.
This does all the needed stuff to setup that
group of ItemInfos at the Pool (It even sets
internal vars First/LastWhich, that info can just
be derived from the buildup ItemInfo Ptrs).
The ItemInfoPackage has methods 'size()' and
'getItemInfo(index) to allow looping over it
and deliver the infos the Pool needs. The
(forced, pure virtual) overloads of getItemInfo
in the specific implementations check for the
ItemPtr being nullptr and create a exclusive
incarnation of ItemInfoDynamic for the Pool if
needed, returning that. The Pool owns the
ItemInfoDynamic incarnations and uses the
ItemInfoStatic directly. On shutdown it cleans
up the ItemInfoDynamic as needed.
The ItemInfoUser is used by the Pool when a
UserDefault is set/used: for SetUserDefaultItem,
GetUserDefaultItem, ResetUserDefaultItem. It
is not held in a 2nd list, but directly in the
list of ItemInfo'ptrs: To keep track of this
an unordered_map is used that helds the original
ItemInfo associated with the WhichID. That way
no two lookups (as before) are needed to get the
current Pool's default for any WhichID.
The derivations of ItemInfoPackage are
encapsulated and just allow access to an
ItemInfoPackage& with a single method as
return value. All use a static local instance
of a std::array<ItemInfoStatic, FIXED_SIZE>
which constructs all ItemInfoStatic and the
static Item instances - if already possible.
Sometimes it is necessary to overload the
constructor to set some static instances
for Items later than the lib init. These are
also just marked with nullptr as Item instance.
Some need to overload getItemInfo to complete
instances of ItemInfoStatic, if needed, or
create and deliver instances of ItemInfoDynamic.
The registerItemInfoPackage also offers a
optional lambda callback: there were two cases
where local data from the Pool was needed to
incarnate the item - just add that to the
call to registerItemInfoPackage if needed,
see examples in the adapted code.
For the re-use of Items this means that now
in SfxItemSet/SfxPoolItemHolder *true* static
Items can and will be used without RefCount
directly and globally. This is also the case
for dynamic Items, with the exception of
differing Pools for SfxSetItems which cannot
be done.
Future:
That design is already prepared to allow
solving that Pool-chaining problem: currently
there are master/sub-pools and all accesses
have to traverse that structure before even
doing anything.
For the future the idea is more to 'compose'
a Pool by registering ItemInfoPackages, e.g.
for Writer pool you may start with SfxItemPool,
register the writer-specific ItemInfoPackage,
then the one for DrawingLayer (if needed) and
the one for EditEngine.
It should also be possible to get to smaller
granularities of that packages. Ideas for
new ones will emerge. We might also think
about composing Pools which can e.g. run Writer
and Chart, so allowing to use Chart *without*
OLE stuff in Writer - just ideas...
More changes:
- Adapted all stuff, cleaned up old stuff/
definitions
- Removed FreezeIdRanges, that can be done
once per Pool on-demand (and cannot be
forgotten to be called)
- Merged XOutdevItemPool with SdrItemPool
and offered a ItemInfoPackage which joins
both needed sets of Items
- All the cleanup hassle with Pools and
defaults cleaned up
- Adapted all access methods of the pool
to use that new stuff. Pool chaining
currently stays, but I use a central
method 'getTargetPool' instead of
recursive calling to get the correct
Pool for the action
Change-Id: I2b8d3d4c3cc80b1d0d0b3c0f4bd90d7656b4bab7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163157
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/dialog/dlgctl3d.cxx | 1 | ||||
-rw-r--r-- | svx/source/dialog/dlgctrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/graphctl.cxx | 1 | ||||
-rw-r--r-- | svx/source/dialog/imapwnd.cxx | 26 | ||||
-rw-r--r-- | svx/source/dialog/imapwnd.hxx | 1 | ||||
-rw-r--r-- | svx/source/form/fmtextcontrolshell.cxx | 1 | ||||
-rw-r--r-- | svx/source/svdraw/svdattr.cxx | 640 | ||||
-rw-r--r-- | svx/source/svdraw/svdobj.cxx | 1 | ||||
-rw-r--r-- | svx/source/tbxctrls/fontworkgallery.cxx | 1 | ||||
-rw-r--r-- | svx/source/toolbars/fontworkbar.cxx | 2 | ||||
-rw-r--r-- | svx/source/unodraw/unopool.cxx | 1 | ||||
-rw-r--r-- | svx/source/unogallery/unogalitem.cxx | 2 | ||||
-rw-r--r-- | svx/source/xoutdev/xpool.cxx | 241 |
13 files changed, 401 insertions, 519 deletions
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index e315819b06f5..f822f16e3251 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -77,7 +77,6 @@ void Svx3DPreviewControl::Construct() // Model mpModel.reset(new FmFormModel()); - mpModel->GetItemPool().FreezeIdRanges(); // Page mxFmPage = new FmFormPage( *mpModel ); diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index df3d7b1c8b71..456a369fcd16 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1295,8 +1295,6 @@ void SvxPreviewBase::InitSettings() SvxPreviewBase::SvxPreviewBase() : mpModel(new SdrModel(nullptr, nullptr, true)) { - // init model - mpModel->GetItemPool().FreezeIdRanges(); } void SvxPreviewBase::SetDrawingArea(weld::DrawingArea* pDrawingArea) diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index cf127d670ab1..34e411923464 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -121,7 +121,6 @@ void GraphCtrl::InitSdrModel() // Creating a Model pModel.reset(new SdrModel(nullptr, nullptr, true)); - pModel->GetItemPool().FreezeIdRanges(); pModel->SetScaleUnit(aMap100.GetMapUnit()); pModel->SetDefaultFontHeight( 500 ); diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 0a6a65077226..f645a4789f24 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -51,13 +51,33 @@ using ::com::sun::star::uno::Reference; #define TRANSCOL COL_WHITE +static ItemInfoPackage& getItemInfoPackageIMapWindow() +{ + class ItemInfoPackageIMapWindow : public ItemInfoPackage + { + typedef std::array<ItemInfoStatic, 1> ItemInfoArrayIMapWindow; + ItemInfoArrayIMapWindow maItemInfos {{ + // m_nWhich, m_pItem, m_nSlotID, m_nItemInfoFlags + { SID_ATTR_MACROITEM, new SvxMacroItem(SID_ATTR_MACROITEM), 0, SFX_ITEMINFOFLAG_NONE } + }}; + + public: + virtual size_t size() const override { return maItemInfos.size(); } + virtual const ItemInfo& getItemInfo(size_t nIndex, SfxItemPool& /*rPool*/) override { return maItemInfos[nIndex]; } + }; + + static std::unique_ptr<ItemInfoPackageIMapWindow> g_aItemInfoPackageIMapWindow; + if (!g_aItemInfoPackageIMapWindow) + g_aItemInfoPackageIMapWindow.reset(new ItemInfoPackageIMapWindow); + return *g_aItemInfoPackageIMapWindow; +} + IMapWindow::IMapWindow(const Reference< XFrame >& rxDocumentFrame, weld::Dialog* pDialog) : GraphCtrl(pDialog) , mxDocumentFrame(rxDocumentFrame) { - pIMapPool = new SfxItemPool( "IMapItemPool", - SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, maItemInfos ); - pIMapPool->FreezeIdRanges(); + pIMapPool = new SfxItemPool("IMapItemPool"); + pIMapPool->registerItemInfoPackage(getItemInfoPackageIMapWindow()); } IMapWindow::~IMapWindow() diff --git a/svx/source/dialog/imapwnd.hxx b/svx/source/dialog/imapwnd.hxx index fee372a25f1a..d08f18c12ce8 100644 --- a/svx/source/dialog/imapwnd.hxx +++ b/svx/source/dialog/imapwnd.hxx @@ -85,7 +85,6 @@ class IMapWindow final : public GraphCtrl TargetList aTargetList; Link<IMapWindow&,void> aInfoLink; rtl::Reference<SfxItemPool> pIMapPool; - SfxItemInfo maItemInfos[1] = {}; css::uno::Reference< css::frame::XFrame > mxDocumentFrame; std::unique_ptr<IMapDropTargetHelper> mxDropTargetHelper; diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index e938a0ad140d..8520e74cc41f 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -618,7 +618,6 @@ namespace svx return; rtl::Reference<SfxItemPool> pPool(EditEngine::CreatePool()); - pPool->FreezeIdRanges(); std::optional< SfxItemSet > xPureItems(( SfxItemSet( *pPool ) )); // put the current states of the items into the set diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index ceaa80259fd9..7fac9abec9e7 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -45,6 +45,52 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> +#include <svx/xflbckit.hxx> +#include <xftshtit.hxx> +#include <svx/xflboxy.hxx> +#include <svx/xflbstit.hxx> +#include <svx/xflclit.hxx> +#include <svx/xflgrit.hxx> +#include <svx/xflhtit.hxx> +#include <svx/xbtmpit.hxx> +#include <svx/xflftrit.hxx> +#include <svx/xsflclit.hxx> +#include <svx/xlntrit.hxx> +#include <svx/xfltrit.hxx> +#include <svx/xgrscit.hxx> +#include <svx/xflasit.hxx> +#include <svx/xflbmtit.hxx> +#include <svx/xflbmpit.hxx> +#include <svx/xflbmsxy.hxx> +#include <svx/xflbmsli.hxx> +#include <svx/xflbtoxy.hxx> +#include <svx/xlineit0.hxx> +#include <svx/xlinjoit.hxx> +#include <svx/xlncapit.hxx> +#include <svx/xfillit0.hxx> +#include <svx/xfilluseslidebackgrounditem.hxx> +#include <svx/xtextit0.hxx> +#include <svx/xlnasit.hxx> +#include <svx/xlndsit.hxx> +#include <svx/xlnwtit.hxx> +#include <svx/xlnclit.hxx> +#include <svx/xlnstit.hxx> +#include <svx/xlnedit.hxx> +#include <svx/xlnstwit.hxx> +#include <svx/xlnedwit.hxx> +#include <svx/xlnstcit.hxx> +#include <svx/xlnedcit.hxx> +#include <svx/svddef.hxx> +#include <svl/itemset.hxx> +#include <svx/xftadit.hxx> +#include <svx/xftdiit.hxx> +#include <svx/xftstit.hxx> +#include <svx/xftmrit.hxx> +#include <svx/xftouit.hxx> +#include <svx/xftshit.hxx> +#include <svx/xftshcit.hxx> +#include <svx/xftshxy.hxx> + #include <svl/grabbagitem.hxx> #include <svl/voiditem.hxx> @@ -115,273 +161,341 @@ using namespace ::com::sun::star; -SdrItemPool::SdrItemPool( - SfxItemPool* _pMaster) -: XOutdevItemPool(_pMaster) +static ItemInfoPackage& getItemInfoPackageSdr() { - // prepare some constants - const Color aNullCol(COL_BLACK); - const sal_Int32 nDefEdgeDist(500); // Defaulting hard for Draw (100TH_MM) currently. MapMode will have to be taken into account in the future. + class ItemInfoPackageSdr : public ItemInfoPackage + { + typedef std::array<ItemInfoStatic, SDRATTR_END - SDRATTR_START + 1> ItemInfoArraySdr; + ItemInfoArraySdr maItemInfos {{ + // m_nWhich, m_pItem, m_nSlotID, m_nItemInfoFlags + { XATTR_LINESTYLE, new XLineStyleItem, SID_ATTR_LINE_STYLE, SFX_ITEMINFOFLAG_NONE }, + { XATTR_LINEDASH, new XLineDashItem(XDash()), SID_ATTR_LINE_DASH, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, + { XATTR_LINEWIDTH, new XLineWidthItem, SID_ATTR_LINE_WIDTH, SFX_ITEMINFOFLAG_NONE }, + { XATTR_LINECOLOR, new XLineColorItem(OUString(), COL_DEFAULT_SHAPE_STROKE), SID_ATTR_LINE_COLOR, SFX_ITEMINFOFLAG_NONE }, + { XATTR_LINESTART, new XLineStartItem(basegfx::B2DPolyPolygon()), SID_ATTR_LINE_START, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, + { XATTR_LINEEND, new XLineEndItem (basegfx::B2DPolyPolygon()), SID_ATTR_LINE_END, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, + { XATTR_LINESTARTWIDTH, new XLineStartWidthItem, SID_ATTR_LINE_STARTWIDTH, SFX_ITEMINFOFLAG_NONE }, + { XATTR_LINEENDWIDTH, new XLineEndWidthItem, SID_ATTR_LINE_ENDWIDTH, SFX_ITEMINFOFLAG_NONE }, + { XATTR_LINESTARTCENTER, new XLineStartCenterItem, SID_ATTR_LINE_STARTCENTER, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, + { XATTR_LINEENDCENTER, new XLineEndCenterItem, SID_ATTR_LINE_ENDCENTER, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, + { XATTR_LINETRANSPARENCE, new XLineTransparenceItem, SID_ATTR_LINE_TRANSPARENCE, SFX_ITEMINFOFLAG_NONE }, + { XATTR_LINEJOINT, new XLineJointItem, SID_ATTR_LINE_JOINT, SFX_ITEMINFOFLAG_NONE }, + { XATTR_LINECAP, new XLineCapItem, SID_ATTR_LINE_CAP, SFX_ITEMINFOFLAG_NONE }, + { XATTRSET_LINE, nullptr, 0, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FILLSTYLE, new XFillStyleItem, SID_ATTR_FILL_STYLE, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FILLCOLOR, new XFillColorItem (OUString(), COL_DEFAULT_SHAPE_FILLING), SID_ATTR_FILL_COLOR, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, + { XATTR_FILLGRADIENT, new XFillGradientItem(basegfx::BGradient()), SID_ATTR_FILL_GRADIENT, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, + { XATTR_FILLHATCH, new XFillHatchItem (XHatch(COL_DEFAULT_SHAPE_STROKE)), SID_ATTR_FILL_HATCH, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, + { XATTR_FILLBITMAP, nullptr, SID_ATTR_FILL_BITMAP, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, + { XATTR_FILLTRANSPARENCE, new XFillTransparenceItem, SID_ATTR_FILL_TRANSPARENCE, SFX_ITEMINFOFLAG_NONE }, + { XATTR_GRADIENTSTEPCOUNT, new XGradientStepCountItem, 0, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FILLBMP_TILE, new XFillBmpTileItem, 0, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FILLBMP_POS, new XFillBmpPosItem, 0, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FILLBMP_SIZEX, new XFillBmpSizeXItem, 0, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FILLBMP_SIZEY, new XFillBmpSizeYItem, 0, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FILLFLOATTRANSPARENCE, new XFillFloatTransparenceItem(basegfx::BGradient(basegfx::BColorStops(COL_BLACK.getBColor(), COL_BLACK.getBColor())), false), SID_ATTR_FILL_FLOATTRANSPARENCE, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, + { XATTR_SECONDARYFILLCOLOR, new XSecondaryFillColorItem(OUString(), COL_DEFAULT_SHAPE_FILLING), 0, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FILLBMP_SIZELOG, new XFillBmpSizeLogItem, 0, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FILLBMP_TILEOFFSETX, new XFillBmpTileOffsetXItem, 0, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FILLBMP_TILEOFFSETY, new XFillBmpTileOffsetYItem, 0, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FILLBMP_STRETCH, new XFillBmpStretchItem, 0, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FILLBMP_POSOFFSETX, new XFillBmpPosOffsetXItem, 0, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FILLBMP_POSOFFSETY, new XFillBmpPosOffsetYItem, 0, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FILLBACKGROUND, new XFillBackgroundItem, 0, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FILLUSESLIDEBACKGROUND, new XFillUseSlideBackgroundItem, SID_ATTR_FILL_USE_SLIDE_BACKGROUND, SFX_ITEMINFOFLAG_NONE }, + { XATTRSET_FILL, nullptr, 0, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FORMTXTSTYLE, new XFormTextStyleItem, SID_FORMTEXT_STYLE, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FORMTXTADJUST, new XFormTextAdjustItem, SID_FORMTEXT_ADJUST, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FORMTXTDISTANCE, new XFormTextDistanceItem, SID_FORMTEXT_DISTANCE, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FORMTXTSTART, new XFormTextStartItem, SID_FORMTEXT_START, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FORMTXTMIRROR, new XFormTextMirrorItem, SID_FORMTEXT_MIRROR, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FORMTXTOUTLINE, new XFormTextOutlineItem, SID_FORMTEXT_OUTLINE, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FORMTXTSHADOW, new XFormTextShadowItem, SID_FORMTEXT_SHADOW, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FORMTXTSHDWCOLOR, new XFormTextShadowColorItem(OUString(),COL_LIGHTGRAY), SID_FORMTEXT_SHDWCOLOR, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FORMTXTSHDWXVAL, new XFormTextShadowXValItem, SID_FORMTEXT_SHDWXVAL, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FORMTXTSHDWYVAL, new XFormTextShadowYValItem, SID_FORMTEXT_SHDWYVAL, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FORMTXTHIDEFORM, new XFormTextHideFormItem, SID_FORMTEXT_HIDEFORM, SFX_ITEMINFOFLAG_NONE }, + { XATTR_FORMTXTSHDWTRANSP, new XFormTextShadowTranspItem, 0, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_SHADOW, new SdrOnOffItem(SDRATTR_SHADOW, false), SID_ATTR_FILL_SHADOW, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_SHADOWCOLOR, new XColorItem(SDRATTR_SHADOWCOLOR, COL_BLACK), SID_ATTR_SHADOW_COLOR, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_SHADOWXDIST, new SdrMetricItem(SDRATTR_SHADOWXDIST, 0), SID_ATTR_SHADOW_XDISTANCE, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_SHADOWYDIST, new SdrMetricItem(SDRATTR_SHADOWYDIST, 0), SID_ATTR_SHADOW_YDISTANCE, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_SHADOWTRANSPARENCE, new SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE, 0), SID_ATTR_SHADOW_TRANSPARENCE, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_SHADOW3D, new SfxVoidItem(SDRATTR_SHADOW3D), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_SHADOWPERSP, new SfxVoidItem(SDRATTR_SHADOWPERSP), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_SHADOWSIZEX, new SdrMetricItem(SDRATTR_SHADOWSIZEX, 100000), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_SHADOWSIZEY, new SdrMetricItem(SDRATTR_SHADOWSIZEY, 100000), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_SHADOWBLUR, new SdrMetricItem(SDRATTR_SHADOWBLUR, 0), SID_ATTR_SHADOW_BLUR, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_SHADOWALIGNMENT, new SvxRectangleAlignmentItem(SDRATTR_SHADOWALIGNMENT, model::RectangleAlignment::Unset), 0, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_CAPTIONTYPE, new SdrCaptionTypeItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_CAPTIONFIXEDANGLE, new SdrOnOffItem(SDRATTR_CAPTIONFIXEDANGLE, true), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_CAPTIONANGLE, new SdrCaptionAngleItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_CAPTIONGAP, new SdrCaptionGapItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_CAPTIONESCDIR, new SdrCaptionEscDirItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_CAPTIONESCISREL, new SdrCaptionEscIsRelItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_CAPTIONESCREL, new SdrCaptionEscRelItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_CAPTIONESCABS, new SdrCaptionEscAbsItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_CAPTIONLINELEN, new SdrCaptionLineLenItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_CAPTIONFITLINELEN, new SdrCaptionFitLineLenItem, 0, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_CORNER_RADIUS, new SdrMetricItem(SDRATTR_CORNER_RADIUS, 0), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_MINFRAMEHEIGHT, new SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT, 0), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_AUTOGROWHEIGHT, new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWHEIGHT, true), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_FITTOSIZE, new SdrTextFitToSizeTypeItem, SID_ATTR_TEXT_FITTOSIZE, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_LEFTDIST, new SdrMetricItem(SDRATTR_TEXT_LEFTDIST, 0), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_RIGHTDIST, new SdrMetricItem(SDRATTR_TEXT_RIGHTDIST, 0), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_UPPERDIST, new SdrMetricItem(SDRATTR_TEXT_UPPERDIST, 0), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_LOWERDIST, new SdrMetricItem(SDRATTR_TEXT_LOWERDIST, 0), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_VERTADJUST, new SdrTextVertAdjustItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_MAXFRAMEHEIGHT, new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT, 0), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_MINFRAMEWIDTH, new SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH, 0), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_MAXFRAMEWIDTH, new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH, 0), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_AUTOGROWWIDTH, new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWWIDTH, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_HORZADJUST, new SdrTextHorzAdjustItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_ANIKIND, new SdrTextAniKindItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_ANIDIRECTION, new SdrTextAniDirectionItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_ANISTARTINSIDE, new SdrTextAniStartInsideItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_ANISTOPINSIDE, new SdrTextAniStopInsideItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_ANICOUNT, new SdrTextAniCountItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_ANIDELAY, new SdrTextAniDelayItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_ANIAMOUNT, new SdrTextAniAmountItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_CONTOURFRAME, new SdrOnOffItem(SDRATTR_TEXT_CONTOURFRAME, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_XMLATTRIBUTES, new SvXMLAttrContainerItem( SDRATTR_XMLATTRIBUTES ), 0, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, + { SDRATTR_TEXT_USEFIXEDCELLHEIGHT, new SdrTextFixedCellHeightItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_WORDWRAP, new SdrOnOffItem(SDRATTR_TEXT_WORDWRAP, true), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_CHAINNEXTNAME, new SfxStringItem(SDRATTR_TEXT_CHAINNEXTNAME, ""), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_CLIPVERTOVERFLOW, new SdrOnOffItem(SDRATTR_TEXT_CLIPVERTOVERFLOW, false), 0, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_EDGEKIND, new SdrEdgeKindItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_EDGENODE1HORZDIST, new SdrEdgeNode1HorzDistItem(500), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_EDGENODE1VERTDIST, new SdrEdgeNode1VertDistItem(500), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_EDGENODE2HORZDIST, new SdrEdgeNode2HorzDistItem(500), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_EDGENODE2VERTDIST, new SdrEdgeNode2VertDistItem(500), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_EDGENODE1GLUEDIST, new SdrEdgeNode1GlueDistItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_EDGENODE2GLUEDIST, new SdrEdgeNode2GlueDistItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_EDGELINEDELTACOUNT, new SdrEdgeLineDeltaCountItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_EDGELINE1DELTA, new SdrMetricItem(SDRATTR_EDGELINE1DELTA, 0), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_EDGELINE2DELTA, new SdrMetricItem(SDRATTR_EDGELINE2DELTA, 0), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_EDGELINE3DELTA, new SdrMetricItem(SDRATTR_EDGELINE3DELTA, 0), 0, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_MEASUREKIND, new SdrMeasureKindItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASURETEXTHPOS, new SdrMeasureTextHPosItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASURETEXTVPOS, new SdrMeasureTextVPosItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASURELINEDIST, new SdrMetricItem(SDRATTR_MEASURELINEDIST, 800), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASUREHELPLINEOVERHANG, new SdrMetricItem(SDRATTR_MEASUREHELPLINEOVERHANG, 200), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASUREHELPLINEDIST, new SdrMetricItem(SDRATTR_MEASUREHELPLINEDIST, 100), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASUREHELPLINE1LEN, new SdrMetricItem(SDRATTR_MEASUREHELPLINE1LEN, 0), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASUREHELPLINE2LEN, new SdrMetricItem(SDRATTR_MEASUREHELPLINE2LEN, 0), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASUREBELOWREFEDGE, new SdrMeasureBelowRefEdgeItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASURETEXTROTA90, new SdrMeasureTextRota90Item, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASURETEXTUPSIDEDOWN, new SdrMeasureTextUpsideDownItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASUREOVERHANG, new SdrMeasureOverhangItem(600), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASUREUNIT, new SdrMeasureUnitItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASURESCALE, new SdrMeasureScaleItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASURESHOWUNIT, new SdrYesNoItem(SDRATTR_MEASURESHOWUNIT, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASUREFORMATSTRING, new SdrMeasureFormatStringItem(), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASURETEXTAUTOANGLE, new SdrMeasureTextAutoAngleItem(), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASURETEXTAUTOANGLEVIEW, new SdrMeasureTextAutoAngleViewItem(), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASURETEXTISFIXEDANGLE, new SdrMeasureTextIsFixedAngleItem(), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASURETEXTFIXEDANGLE, new SdrMeasureTextFixedAngleItem(), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MEASUREDECIMALPLACES, new SdrMeasureDecimalPlacesItem(), 0, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_CIRCKIND, new SdrCircKindItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_CIRCSTARTANGLE, new SdrAngleItem(SDRATTR_CIRCSTARTANGLE, 0_deg100), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_CIRCENDANGLE, new SdrAngleItem(SDRATTR_CIRCENDANGLE, 36000_deg100), 0, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_OBJMOVEPROTECT, new SdrYesNoItem(SDRATTR_OBJMOVEPROTECT, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_OBJSIZEPROTECT, new SdrYesNoItem(SDRATTR_OBJSIZEPROTECT, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_OBJPRINTABLE, new SdrObjPrintableItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_LAYERID, new SdrLayerIdItem(SdrLayerID(0)), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_LAYERNAME, new SdrLayerNameItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_OBJECTNAME, new SfxStringItem(SDRATTR_OBJECTNAME), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_ALLPOSITIONX, new SdrAllPositionXItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_ALLPOSITIONY, new SdrAllPositionYItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_ALLSIZEWIDTH, new SdrAllSizeWidthItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_ALLSIZEHEIGHT, new SdrAllSizeHeightItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_ONEPOSITIONX, new SdrOnePositionXItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_ONEPOSITIONY, new SdrOnePositionYItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_ONESIZEWIDTH, new SdrOneSizeWidthItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_ONESIZEHEIGHT, new SdrOneSizeHeightItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_LOGICSIZEWIDTH, new SdrLogicSizeWidthItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_LOGICSIZEHEIGHT, new SdrLogicSizeHeightItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_ROTATEANGLE, new SdrAngleItem(SDRATTR_ROTATEANGLE, 0_deg100), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_SHEARANGLE, new SdrShearAngleItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MOVEX, new SdrMoveXItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_MOVEY, new SdrMoveYItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_RESIZEXONE, new SdrResizeXOneItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_RESIZEYONE, new SdrResizeYOneItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_ROTATEONE, new SdrRotateOneItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_HORZSHEARONE, new SdrHorzShearOneItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_VERTSHEARONE, new SdrVertShearOneItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_RESIZEXALL, new SdrResizeXAllItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_RESIZEYALL, new SdrResizeYAllItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_ROTATEALL, new SdrRotateAllItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_HORZSHEARALL, new SdrHorzShearAllItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_VERTSHEARALL, new SdrVertShearAllItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TRANSFORMREF1X, new SdrTransformRef1XItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TRANSFORMREF1Y, new SdrTransformRef1YItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TRANSFORMREF2X, new SdrTransformRef2XItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TRANSFORMREF2Y, new SdrTransformRef2YItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXTDIRECTION, new SvxWritingModeItem(css::text::WritingMode_LR_TB, SDRATTR_TEXTDIRECTION), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_OBJVISIBLE, new SdrObjVisibleItem, 0, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_GRAFRED, new SdrGrafRedItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_GRAFGREEN, new SdrGrafGreenItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_GRAFBLUE, new SdrGrafBlueItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_GRAFLUMINANCE, new SdrGrafLuminanceItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_GRAFCONTRAST, new SdrGrafContrastItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_GRAFGAMMA, new SdrGrafGamma100Item, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_GRAFTRANSPARENCE, new SdrGrafTransparenceItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_GRAFINVERT, new SdrGrafInvertItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_GRAFMODE, new SdrGrafModeItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_GRAFCROP, new SdrGrafCropItem, SID_ATTR_GRAF_CROP, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_3DOBJ_PERCENT_DIAGONAL, new SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, 10), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_BACKSCALE, new SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, 100), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_DEPTH, new SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, 1000), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_HORZ_SEGS, new SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, 24), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_VERT_SEGS, new SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, 24), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_END_ANGLE, new SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, 3600), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_DOUBLE_SIDED, new SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_NORMALS_KIND, new Svx3DNormalsKindItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_NORMALS_INVERT, new SfxBoolItem(SDRATTR_3DOBJ_NORMALS_INVERT, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_TEXTURE_PROJ_X, new Svx3DTextureProjectionXItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_TEXTURE_PROJ_Y, new Svx3DTextureProjectionYItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_SHADOW_3D, new SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_MAT_COLOR, new SvxColorItem(Color(0x0000b8ff), SDRATTR_3DOBJ_MAT_COLOR), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_MAT_EMISSION, new SvxColorItem(Color(0x00000000), SDRATTR_3DOBJ_MAT_EMISSION), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_MAT_SPECULAR, new SvxColorItem(Color(0x00ffffff), SDRATTR_3DOBJ_MAT_SPECULAR), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, new SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, 15), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_TEXTURE_KIND, new Svx3DTextureKindItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_TEXTURE_MODE, new Svx3DTextureModeItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_TEXTURE_FILTER, new SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_SMOOTH_NORMALS, new Svx3DSmoothNormalsItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_SMOOTH_LIDS, new Svx3DSmoothLidsItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_CHARACTER_MODE, new Svx3DCharacterModeItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_CLOSE_FRONT, new Svx3DCloseFrontItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_CLOSE_BACK, new Svx3DCloseBackItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY, new Svx3DReducedLineGeometryItem, 0, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_3DSCENE_PERSPECTIVE, new Svx3DPerspectiveItem, 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_DISTANCE, new SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, 100), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_FOCAL_LENGTH, new SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, 100), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, new SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTCOLOR_1, new SvxColorItem(Color(ColorTransparency, 0xffcccccc), SDRATTR_3DSCENE_LIGHTCOLOR_1), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTCOLOR_2, new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_2), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTCOLOR_3, new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_3), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTCOLOR_4, new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_4), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTCOLOR_5, new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_5), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTCOLOR_6, new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_6), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTCOLOR_7, new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_7), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTCOLOR_8, new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_8), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_AMBIENTCOLOR, new SvxColorItem(Color(0x00666666), SDRATTR_3DSCENE_AMBIENTCOLOR), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTON_1, new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1, true), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTON_2, new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTON_3, new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTON_4, new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_4, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTON_5, new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_5, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTON_6, new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTON_7, new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTON_8, new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, false), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTDIRECTION_1, new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, basegfx::B3DVector(0.57735026918963, 0.57735026918963, 0.57735026918963)), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTDIRECTION_2, new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, basegfx::B3DVector(0.0,0.0,1.0)), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTDIRECTION_3, new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, basegfx::B3DVector(0.0,0.0,1.0)), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTDIRECTION_4, new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, basegfx::B3DVector(0.0,0.0,1.0)), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTDIRECTION_5, new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, basegfx::B3DVector(0.0,0.0,1.0)), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTDIRECTION_6, new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, basegfx::B3DVector(0.0,0.0,1.0)), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTDIRECTION_7, new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, basegfx::B3DVector(0.0,0.0,1.0)), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_LIGHTDIRECTION_8, new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, basegfx::B3DVector(0.0,0.0,1.0)), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_SHADOW_SLANT, new SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, 0), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_3DSCENE_SHADE_MODE, new Svx3DShadeModeItem, 0, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_CUSTOMSHAPE_ENGINE, new SfxStringItem(SDRATTR_CUSTOMSHAPE_ENGINE, ""), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_CUSTOMSHAPE_DATA, new SfxStringItem(SDRATTR_CUSTOMSHAPE_DATA, ""), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_CUSTOMSHAPE_GEOMETRY, new SdrCustomShapeGeometryItem, 0, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_TABLE_BORDER, nullptr, SID_ATTR_BORDER_OUTER, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TABLE_BORDER_INNER, nullptr, SID_ATTR_BORDER_INNER, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TABLE_BORDER_TLBR, new SvxLineItem( SDRATTR_TABLE_BORDER_TLBR ), SID_ATTR_BORDER_DIAG_TLBR, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TABLE_BORDER_BLTR, new SvxLineItem( SDRATTR_TABLE_BORDER_BLTR ), SID_ATTR_BORDER_DIAG_BLTR, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TABLE_TEXT_ROTATION, new SvxTextRotateItem(0_deg10, SDRATTR_TABLE_TEXT_ROTATION), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TABLE_CELL_GRABBAG, new SfxGrabBagItem(SDRATTR_TABLE_CELL_GRABBAG), 0, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_GLOW_RADIUS, new SdrMetricItem(SDRATTR_GLOW_RADIUS, 0), SID_ATTR_GLOW_RADIUS, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_GLOW_COLOR, new XColorItem(SDRATTR_GLOW_COLOR, COL_BLACK), SID_ATTR_GLOW_COLOR, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_GLOW_TRANSPARENCY, new SdrPercentItem(SDRATTR_GLOW_TRANSPARENCY, 0), SID_ATTR_GLOW_TRANSPARENCY, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_SOFTEDGE_RADIUS, new SdrMetricItem(SDRATTR_SOFTEDGE_RADIUS, 0), SID_ATTR_SOFTEDGE_RADIUS, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_TEXTCOLUMNS_NUMBER, new SfxInt16Item(SDRATTR_TEXTCOLUMNS_NUMBER, 1), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXTCOLUMNS_SPACING, new SdrMetricItem(SDRATTR_TEXTCOLUMNS_SPACING, 0), 0, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_WRITINGMODE2, new SvxFrameDirectionItem(SvxFrameDirection::Horizontal_LR_TB, SDRATTR_WRITINGMODE2), 0, SFX_ITEMINFOFLAG_NONE }, + + { SDRATTR_EDGEOOXMLCURVE, new SfxBoolItem(SDRATTR_EDGEOOXMLCURVE, false), 0, SFX_ITEMINFOFLAG_NONE } + }}; + + public: + ItemInfoPackageSdr() + { + SvxBoxItem* pboxItem(new SvxBoxItem(SDRATTR_TABLE_BORDER)); + pboxItem->SetAllDistances(100); + setItemAtItemInfoStatic(pboxItem, maItemInfos[SDRATTR_TABLE_BORDER - SDRATTR_START]); + + SvxBoxInfoItem* pBoxInfoItem = new SvxBoxInfoItem(SDRATTR_TABLE_BORDER_INNER); + pBoxInfoItem->SetTable(true); + pBoxInfoItem->SetDist(true); // always show margin field + // some lines may have DontCare state only in tables + pBoxInfoItem->SetValid(SvxBoxInfoItemValidFlags::DISABLE); + setItemAtItemInfoStatic(pBoxInfoItem, maItemInfos[SDRATTR_TABLE_BORDER_INNER - SDRATTR_START]); + } + + virtual size_t size() const override { return maItemInfos.size(); } + virtual const ItemInfo& getItemInfo(size_t nIndex, SfxItemPool& rPool) override + { + const ItemInfo& rRetval(maItemInfos[nIndex]); + + // return immediately if we have the static entry and Item + if (nullptr != rRetval.getItem()) + return rRetval; + + if (XATTRSET_LINE == rRetval.getWhich()) + return *new ItemInfoDynamic(rRetval, new XLineAttrSetItem(SfxItemSetFixed<XATTR_LINE_FIRST, XATTR_LINE_LAST>(rPool))); + + if (XATTRSET_FILL == rRetval.getWhich()) + return *new ItemInfoDynamic(rRetval, new XFillAttrSetItem(SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST>(rPool))); + + if (XATTR_FILLBITMAP == rRetval.getWhich()) + return *new ItemInfoDynamic(rRetval, new XFillBitmapItem(Graphic())); - // init the non-persistent items - for(sal_uInt16 i(SDRATTR_NOTPERSIST_FIRST); i <= SDRATTR_NOTPERSIST_LAST; i++) + // return in any case + return rRetval; + } + }; + + static std::unique_ptr<ItemInfoPackageSdr> g_aItemInfoPackageSdr; + if (!g_aItemInfoPackageSdr) + g_aItemInfoPackageSdr.reset(new ItemInfoPackageSdr); + return *g_aItemInfoPackageSdr; +} + +SdrItemPool::SdrItemPool(SfxItemPool* _pMaster) +: SfxItemPool("SdrItemPool") +{ + // registerItemInfoPackage(getItemInfoPackageXOutdev()); + registerItemInfoPackage(getItemInfoPackageSdr()); + + // get master pointer, evtl. add myself to the end of the pools + if(nullptr != _pMaster) { - mpLocalItemInfos[i - SDRATTR_START]._nItemInfoFlags = SFX_ITEMINFOFLAG_NONE; + _pMaster->GetLastPoolInChain()->SetSecondaryPool(this); } +} - // these slots need SFX_ITEMINFOFLAG_SUPPORT_SURROGATE, see - // text @svl/source/items/itempool.cxx - mpLocalItemInfos[SDRATTR_XMLATTRIBUTES -SDRATTR_START]._nItemInfoFlags = SFX_ITEMINFOFLAG_SUPPORT_SURROGATE; - - // init own PoolDefaults - std::vector<SfxPoolItem*>& rPoolDefaults = *mpLocalPoolDefaults; - rPoolDefaults[SDRATTR_SHADOW -SDRATTR_START]=new SdrOnOffItem(SDRATTR_SHADOW, false); - rPoolDefaults[SDRATTR_SHADOWCOLOR -SDRATTR_START]=new XColorItem(SDRATTR_SHADOWCOLOR, aNullCol); - rPoolDefaults[SDRATTR_SHADOWXDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWXDIST, 0); - rPoolDefaults[SDRATTR_SHADOWYDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWYDIST, 0); - rPoolDefaults[SDRATTR_SHADOWSIZEX -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWSIZEX, 100000); - rPoolDefaults[SDRATTR_SHADOWSIZEY -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWSIZEY, 100000); - rPoolDefaults[SDRATTR_SHADOWTRANSPARENCE-SDRATTR_START]=new SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE, 0); - rPoolDefaults[SDRATTR_SHADOWBLUR -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWBLUR, 0); - rPoolDefaults[SDRATTR_SHADOWALIGNMENT -SDRATTR_START]=new SvxRectangleAlignmentItem(SDRATTR_SHADOWALIGNMENT, model::RectangleAlignment::Unset); - rPoolDefaults[SDRATTR_SHADOW3D -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOW3D ); - rPoolDefaults[SDRATTR_SHADOWPERSP -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOWPERSP ); - rPoolDefaults[SDRATTR_CAPTIONTYPE -SDRATTR_START]=new SdrCaptionTypeItem ; - rPoolDefaults[SDRATTR_CAPTIONFIXEDANGLE-SDRATTR_START]=new SdrOnOffItem(SDRATTR_CAPTIONFIXEDANGLE, true); - rPoolDefaults[SDRATTR_CAPTIONANGLE -SDRATTR_START]=new SdrCaptionAngleItem ; - rPoolDefaults[SDRATTR_CAPTIONGAP -SDRATTR_START]=new SdrCaptionGapItem ; - rPoolDefaults[SDRATTR_CAPTIONESCDIR -SDRATTR_START]=new SdrCaptionEscDirItem ; - rPoolDefaults[SDRATTR_CAPTIONESCISREL -SDRATTR_START]=new SdrCaptionEscIsRelItem ; - rPoolDefaults[SDRATTR_CAPTIONESCREL -SDRATTR_START]=new SdrCaptionEscRelItem ; - rPoolDefaults[SDRATTR_CAPTIONESCABS -SDRATTR_START]=new SdrCaptionEscAbsItem ; - rPoolDefaults[SDRATTR_CAPTIONLINELEN -SDRATTR_START]=new SdrCaptionLineLenItem ; - rPoolDefaults[SDRATTR_CAPTIONFITLINELEN-SDRATTR_START]=new SdrCaptionFitLineLenItem; - rPoolDefaults[SDRATTR_CORNER_RADIUS -SDRATTR_START]=new SdrMetricItem(SDRATTR_CORNER_RADIUS, 0); - rPoolDefaults[SDRATTR_TEXT_MINFRAMEHEIGHT -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT, 0); - rPoolDefaults[SDRATTR_TEXT_AUTOGROWHEIGHT -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWHEIGHT, true); - rPoolDefaults[SDRATTR_TEXT_FITTOSIZE -SDRATTR_START]=new SdrTextFitToSizeTypeItem; - rPoolDefaults[SDRATTR_TEXT_LEFTDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_LEFTDIST, 0); - rPoolDefaults[SDRATTR_TEXT_RIGHTDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_RIGHTDIST, 0); - rPoolDefaults[SDRATTR_TEXT_UPPERDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_UPPERDIST, 0); - rPoolDefaults[SDRATTR_TEXT_LOWERDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_LOWERDIST, 0); - rPoolDefaults[SDRATTR_TEXT_VERTADJUST -SDRATTR_START]=new SdrTextVertAdjustItem; - rPoolDefaults[SDRATTR_TEXT_MAXFRAMEHEIGHT -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT, 0); - rPoolDefaults[SDRATTR_TEXT_MINFRAMEWIDTH -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH, 0); - rPoolDefaults[SDRATTR_TEXT_MAXFRAMEWIDTH -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH, 0); - rPoolDefaults[SDRATTR_TEXT_AUTOGROWWIDTH -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWWIDTH, false); - rPoolDefaults[SDRATTR_TEXT_HORZADJUST -SDRATTR_START]=new SdrTextHorzAdjustItem; - rPoolDefaults[SDRATTR_TEXT_ANIKIND -SDRATTR_START]=new SdrTextAniKindItem; - rPoolDefaults[SDRATTR_TEXT_ANIDIRECTION -SDRATTR_START]=new SdrTextAniDirectionItem; - rPoolDefaults[SDRATTR_TEXT_ANISTARTINSIDE -SDRATTR_START]=new SdrTextAniStartInsideItem; - rPoolDefaults[SDRATTR_TEXT_ANISTOPINSIDE -SDRATTR_START]=new SdrTextAniStopInsideItem; - rPoolDefaults[SDRATTR_TEXT_ANICOUNT -SDRATTR_START]=new SdrTextAniCountItem; - rPoolDefaults[SDRATTR_TEXT_ANIDELAY -SDRATTR_START]=new SdrTextAniDelayItem; - rPoolDefaults[SDRATTR_TEXT_ANIAMOUNT -SDRATTR_START]=new SdrTextAniAmountItem; - rPoolDefaults[SDRATTR_TEXT_CONTOURFRAME -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_CONTOURFRAME, false); - rPoolDefaults[SDRATTR_XMLATTRIBUTES -SDRATTR_START]=new SvXMLAttrContainerItem( SDRATTR_XMLATTRIBUTES ); - rPoolDefaults[SDRATTR_TEXT_CHAINNEXTNAME -SDRATTR_START]=new SfxStringItem(SDRATTR_TEXT_CHAINNEXTNAME, ""); - rPoolDefaults[SDRATTR_TEXT_USEFIXEDCELLHEIGHT -SDRATTR_START]=new SdrTextFixedCellHeightItem; - rPoolDefaults[SDRATTR_TEXT_WORDWRAP -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_WORDWRAP, true); - rPoolDefaults[SDRATTR_TEXT_CLIPVERTOVERFLOW-SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_CLIPVERTOVERFLOW, false); - rPoolDefaults[SDRATTR_EDGEKIND -SDRATTR_START]=new SdrEdgeKindItem; - rPoolDefaults[SDRATTR_EDGENODE1HORZDIST-SDRATTR_START]=new SdrEdgeNode1HorzDistItem(nDefEdgeDist); - rPoolDefaults[SDRATTR_EDGENODE1VERTDIST-SDRATTR_START]=new SdrEdgeNode1VertDistItem(nDefEdgeDist); - rPoolDefaults[SDRATTR_EDGENODE2HORZDIST-SDRATTR_START]=new SdrEdgeNode2HorzDistItem(nDefEdgeDist); - rPoolDefaults[SDRATTR_EDGENODE2VERTDIST-SDRATTR_START]=new SdrEdgeNode2VertDistItem(nDefEdgeDist); - rPoolDefaults[SDRATTR_EDGENODE1GLUEDIST-SDRATTR_START]=new SdrEdgeNode1GlueDistItem; - rPoolDefaults[SDRATTR_EDGENODE2GLUEDIST-SDRATTR_START]=new SdrEdgeNode2GlueDistItem; - rPoolDefaults[SDRATTR_EDGELINEDELTACOUNT-SDRATTR_START]=new SdrEdgeLineDeltaCountItem; - rPoolDefaults[SDRATTR_EDGELINE1DELTA -SDRATTR_START]=new SdrMetricItem(SDRATTR_EDGELINE1DELTA, 0); - rPoolDefaults[SDRATTR_EDGELINE2DELTA -SDRATTR_START]=new SdrMetricItem(SDRATTR_EDGELINE2DELTA, 0); - rPoolDefaults[SDRATTR_EDGELINE3DELTA -SDRATTR_START]=new SdrMetricItem(SDRATTR_EDGELINE3DELTA, 0); - rPoolDefaults[SDRATTR_EDGEOOXMLCURVE -SDRATTR_START]=new SfxBoolItem(SDRATTR_EDGEOOXMLCURVE, false); - rPoolDefaults[SDRATTR_MEASUREKIND -SDRATTR_START]=new SdrMeasureKindItem; - rPoolDefaults[SDRATTR_MEASURETEXTHPOS -SDRATTR_START]=new SdrMeasureTextHPosItem; - rPoolDefaults[SDRATTR_MEASURETEXTVPOS -SDRATTR_START]=new SdrMeasureTextVPosItem; - rPoolDefaults[SDRATTR_MEASURELINEDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASURELINEDIST, 800); - rPoolDefaults[SDRATTR_MEASUREHELPLINEOVERHANG -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINEOVERHANG, 200); - rPoolDefaults[SDRATTR_MEASUREHELPLINEDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINEDIST, 100); - rPoolDefaults[SDRATTR_MEASUREHELPLINE1LEN -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINE1LEN, 0); - rPoolDefaults[SDRATTR_MEASUREHELPLINE2LEN -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINE2LEN, 0); - rPoolDefaults[SDRATTR_MEASUREBELOWREFEDGE -SDRATTR_START]=new SdrMeasureBelowRefEdgeItem; - rPoolDefaults[SDRATTR_MEASURETEXTROTA90 -SDRATTR_START]=new SdrMeasureTextRota90Item; - rPoolDefaults[SDRATTR_MEASURETEXTUPSIDEDOWN -SDRATTR_START]=new SdrMeasureTextUpsideDownItem; - rPoolDefaults[SDRATTR_MEASUREOVERHANG -SDRATTR_START]=new SdrMeasureOverhangItem(600); - rPoolDefaults[SDRATTR_MEASUREUNIT -SDRATTR_START]=new SdrMeasureUnitItem; - rPoolDefaults[SDRATTR_MEASURESCALE -SDRATTR_START]=new SdrMeasureScaleItem; - rPoolDefaults[SDRATTR_MEASURESHOWUNIT -SDRATTR_START]=new SdrYesNoItem(SDRATTR_MEASURESHOWUNIT, false); - rPoolDefaults[SDRATTR_MEASUREFORMATSTRING -SDRATTR_START]=new SdrMeasureFormatStringItem(); - rPoolDefaults[SDRATTR_MEASURETEXTAUTOANGLE -SDRATTR_START]=new SdrMeasureTextAutoAngleItem(); - rPoolDefaults[SDRATTR_MEASURETEXTAUTOANGLEVIEW-SDRATTR_START]=new SdrMeasureTextAutoAngleViewItem(); - rPoolDefaults[SDRATTR_MEASURETEXTISFIXEDANGLE -SDRATTR_START]=new SdrMeasureTextIsFixedAngleItem(); - rPoolDefaults[SDRATTR_MEASURETEXTFIXEDANGLE -SDRATTR_START]=new SdrMeasureTextFixedAngleItem(); - rPoolDefaults[SDRATTR_MEASUREDECIMALPLACES -SDRATTR_START]=new SdrMeasureDecimalPlacesItem(); - rPoolDefaults[SDRATTR_CIRCKIND -SDRATTR_START]=new SdrCircKindItem; - rPoolDefaults[SDRATTR_CIRCSTARTANGLE-SDRATTR_START]=new SdrAngleItem(SDRATTR_CIRCSTARTANGLE, 0_deg100); - rPoolDefaults[SDRATTR_CIRCENDANGLE -SDRATTR_START]=new SdrAngleItem(SDRATTR_CIRCENDANGLE, 36000_deg100); - rPoolDefaults[SDRATTR_OBJMOVEPROTECT -SDRATTR_START]=new SdrYesNoItem(SDRATTR_OBJMOVEPROTECT, false); - rPoolDefaults[SDRATTR_OBJSIZEPROTECT -SDRATTR_START]=new SdrYesNoItem(SDRATTR_OBJSIZEPROTECT, false); - rPoolDefaults[SDRATTR_OBJPRINTABLE -SDRATTR_START]=new SdrObjPrintableItem; - rPoolDefaults[SDRATTR_OBJVISIBLE -SDRATTR_START]=new SdrObjVisibleItem; - rPoolDefaults[SDRATTR_LAYERID -SDRATTR_START]=new SdrLayerIdItem(SdrLayerID(0)); - rPoolDefaults[SDRATTR_LAYERNAME -SDRATTR_START]=new SdrLayerNameItem; - rPoolDefaults[SDRATTR_OBJECTNAME -SDRATTR_START]=new SfxStringItem(SDRATTR_OBJECTNAME); - rPoolDefaults[SDRATTR_ALLPOSITIONX -SDRATTR_START]=new SdrAllPositionXItem; - rPoolDefaults[SDRATTR_ALLPOSITIONY -SDRATTR_START]=new SdrAllPositionYItem; - rPoolDefaults[SDRATTR_ALLSIZEWIDTH -SDRATTR_START]=new SdrAllSizeWidthItem; - rPoolDefaults[SDRATTR_ALLSIZEHEIGHT -SDRATTR_START]=new SdrAllSizeHeightItem; - rPoolDefaults[SDRATTR_ONEPOSITIONX -SDRATTR_START]=new SdrOnePositionXItem; - rPoolDefaults[SDRATTR_ONEPOSITIONY -SDRATTR_START]=new SdrOnePositionYItem; - rPoolDefaults[SDRATTR_ONESIZEWIDTH -SDRATTR_START]=new SdrOneSizeWidthItem; - rPoolDefaults[SDRATTR_ONESIZEHEIGHT -SDRATTR_START]=new SdrOneSizeHeightItem; - rPoolDefaults[SDRATTR_LOGICSIZEWIDTH -SDRATTR_START]=new SdrLogicSizeWidthItem; - rPoolDefaults[SDRATTR_LOGICSIZEHEIGHT-SDRATTR_START]=new SdrLogicSizeHeightItem; - rPoolDefaults[SDRATTR_ROTATEANGLE -SDRATTR_START]=new SdrAngleItem(SDRATTR_ROTATEANGLE, 0_deg100); - rPoolDefaults[SDRATTR_SHEARANGLE -SDRATTR_START]=new SdrShearAngleItem; - rPoolDefaults[SDRATTR_MOVEX -SDRATTR_START]=new SdrMoveXItem; - rPoolDefaults[SDRATTR_MOVEY -SDRATTR_START]=new SdrMoveYItem; - rPoolDefaults[SDRATTR_RESIZEXONE -SDRATTR_START]=new SdrResizeXOneItem; - rPoolDefaults[SDRATTR_RESIZEYONE -SDRATTR_START]=new SdrResizeYOneItem; - rPoolDefaults[SDRATTR_ROTATEONE -SDRATTR_START]=new SdrRotateOneItem; - rPoolDefaults[SDRATTR_HORZSHEARONE -SDRATTR_START]=new SdrHorzShearOneItem; - rPoolDefaults[SDRATTR_VERTSHEARONE -SDRATTR_START]=new SdrVertShearOneItem; - rPoolDefaults[SDRATTR_RESIZEXALL -SDRATTR_START]=new SdrResizeXAllItem; - rPoolDefaults[SDRATTR_RESIZEYALL -SDRATTR_START]=new SdrResizeYAllItem; - rPoolDefaults[SDRATTR_ROTATEALL -SDRATTR_START]=new SdrRotateAllItem; - rPoolDefaults[SDRATTR_HORZSHEARALL -SDRATTR_START]=new SdrHorzShearAllItem; - rPoolDefaults[SDRATTR_VERTSHEARALL -SDRATTR_START]=new SdrVertShearAllItem; - rPoolDefaults[SDRATTR_TRANSFORMREF1X -SDRATTR_START]=new SdrTransformRef1XItem; - rPoolDefaults[SDRATTR_TRANSFORMREF1Y -SDRATTR_START]=new SdrTransformRef1YItem; - rPoolDefaults[SDRATTR_TRANSFORMREF2X -SDRATTR_START]=new SdrTransformRef2XItem; - rPoolDefaults[SDRATTR_TRANSFORMREF2Y -SDRATTR_START]=new SdrTransformRef2YItem; - rPoolDefaults[SDRATTR_TEXTDIRECTION -SDRATTR_START]=new SvxWritingModeItem(css::text::WritingMode_LR_TB, SDRATTR_TEXTDIRECTION); - rPoolDefaults[ SDRATTR_GRAFRED - SDRATTR_START] = new SdrGrafRedItem; - rPoolDefaults[ SDRATTR_GRAFGREEN - SDRATTR_START] = new SdrGrafGreenItem; - rPoolDefaults[ SDRATTR_GRAFBLUE - SDRATTR_START] = new SdrGrafBlueItem; - rPoolDefaults[ SDRATTR_GRAFLUMINANCE - SDRATTR_START] = new SdrGrafLuminanceItem; - rPoolDefaults[ SDRATTR_GRAFCONTRAST - SDRATTR_START] = new SdrGrafContrastItem; - rPoolDefaults[ SDRATTR_GRAFGAMMA - SDRATTR_START] = new SdrGrafGamma100Item; - rPoolDefaults[ SDRATTR_GRAFTRANSPARENCE - SDRATTR_START] = new SdrGrafTransparenceItem; - rPoolDefaults[ SDRATTR_GRAFINVERT - SDRATTR_START] = new SdrGrafInvertItem; - rPoolDefaults[ SDRATTR_GRAFMODE - SDRATTR_START] = new SdrGrafModeItem; - rPoolDefaults[ SDRATTR_GRAFCROP - SDRATTR_START] = new SdrGrafCropItem; - rPoolDefaults[ SDRATTR_3DOBJ_PERCENT_DIAGONAL - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, 10); - rPoolDefaults[ SDRATTR_3DOBJ_BACKSCALE - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, 100); - rPoolDefaults[ SDRATTR_3DOBJ_DEPTH - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, 1000); - rPoolDefaults[ SDRATTR_3DOBJ_HORZ_SEGS - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, 24); - rPoolDefaults[ SDRATTR_3DOBJ_VERT_SEGS - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, 24); - rPoolDefaults[ SDRATTR_3DOBJ_END_ANGLE - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, 3600); - rPoolDefaults[ SDRATTR_3DOBJ_DOUBLE_SIDED - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED, false); - rPoolDefaults[ SDRATTR_3DOBJ_NORMALS_KIND - SDRATTR_START ] = new Svx3DNormalsKindItem; - rPoolDefaults[ SDRATTR_3DOBJ_NORMALS_INVERT - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_NORMALS_INVERT, false); - rPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_PROJ_X - SDRATTR_START ] = new Svx3DTextureProjectionXItem; - rPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_PROJ_Y - SDRATTR_START ] = new Svx3DTextureProjectionYItem; - rPoolDefaults[ SDRATTR_3DOBJ_SHADOW_3D - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, false); - rPoolDefaults[ SDRATTR_3DOBJ_MAT_COLOR - SDRATTR_START ] = new SvxColorItem(Color(0x0000b8ff), SDRATTR_3DOBJ_MAT_COLOR); - rPoolDefaults[ SDRATTR_3DOBJ_MAT_EMISSION - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DOBJ_MAT_EMISSION); - rPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR - SDRATTR_START ] = new SvxColorItem(Color(0x00ffffff), SDRATTR_3DOBJ_MAT_SPECULAR); - rPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, 15); - rPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_KIND - SDRATTR_START ] = new Svx3DTextureKindItem; - rPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_MODE - SDRATTR_START ] = new Svx3DTextureModeItem; - rPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_FILTER - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER, false); - rPoolDefaults[ SDRATTR_3DOBJ_SMOOTH_NORMALS - SDRATTR_START ] = new Svx3DSmoothNormalsItem; - rPoolDefaults[ SDRATTR_3DOBJ_SMOOTH_LIDS - SDRATTR_START ] = new Svx3DSmoothLidsItem; - rPoolDefaults[ SDRATTR_3DOBJ_CHARACTER_MODE - SDRATTR_START ] = new Svx3DCharacterModeItem; - rPoolDefaults[ SDRATTR_3DOBJ_CLOSE_FRONT - SDRATTR_START ] = new Svx3DCloseFrontItem; - rPoolDefaults[ SDRATTR_3DOBJ_CLOSE_BACK - SDRATTR_START ] = new Svx3DCloseBackItem; - rPoolDefaults[ SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY - SDRATTR_START ] = new Svx3DReducedLineGeometryItem; - rPoolDefaults[ SDRATTR_3DSCENE_PERSPECTIVE - SDRATTR_START ] = new Svx3DPerspectiveItem; - rPoolDefaults[ SDRATTR_3DSCENE_DISTANCE - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, 100); - rPoolDefaults[ SDRATTR_3DSCENE_FOCAL_LENGTH - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, 100); - rPoolDefaults[ SDRATTR_3DSCENE_TWO_SIDED_LIGHTING - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, false); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_1 - SDRATTR_START ] = new SvxColorItem(Color(ColorTransparency, 0xffcccccc), SDRATTR_3DSCENE_LIGHTCOLOR_1); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_2 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_2); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_3 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_3); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_4 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_4); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_5 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_5); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_6 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_6); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_7 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_7); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_8 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_8); - rPoolDefaults[ SDRATTR_3DSCENE_AMBIENTCOLOR - SDRATTR_START ] = new SvxColorItem(Color(0x00666666), SDRATTR_3DSCENE_AMBIENTCOLOR); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_1 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1, true); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_2 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2, false); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_3 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3, false); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_4 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_4, false); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_5 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_5, false); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_6 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6, false); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_7 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7, false); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_8 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, false); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_1 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, basegfx::B3DVector(0.57735026918963, 0.57735026918963, 0.57735026918963)); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_2 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, basegfx::B3DVector(0.0,0.0,1.0)); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_3 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, basegfx::B3DVector(0.0,0.0,1.0)); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_4 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, basegfx::B3DVector(0.0,0.0,1.0)); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_5 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, basegfx::B3DVector(0.0,0.0,1.0)); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_6 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, basegfx::B3DVector(0.0,0.0,1.0)); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_7 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, basegfx::B3DVector(0.0,0.0,1.0)); - rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_8 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, basegfx::B3DVector(0.0,0.0,1.0)); - rPoolDefaults[ SDRATTR_3DSCENE_SHADOW_SLANT - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, 0); - rPoolDefaults[ SDRATTR_3DSCENE_SHADE_MODE - SDRATTR_START ] = new Svx3DShadeModeItem; - rPoolDefaults[ SDRATTR_CUSTOMSHAPE_ENGINE - SDRATTR_START ] = new SfxStringItem(SDRATTR_CUSTOMSHAPE_ENGINE, ""); - rPoolDefaults[ SDRATTR_CUSTOMSHAPE_DATA - SDRATTR_START ] = new SfxStringItem(SDRATTR_CUSTOMSHAPE_DATA, ""); - rPoolDefaults[ SDRATTR_CUSTOMSHAPE_GEOMETRY - SDRATTR_START ] = new SdrCustomShapeGeometryItem; - - SvxBoxItem* pboxItem = new SvxBoxItem( SDRATTR_TABLE_BORDER ); - pboxItem->SetAllDistances( 100 ); - rPoolDefaults[ SDRATTR_TABLE_BORDER - SDRATTR_START ] = pboxItem; - - SvxBoxInfoItem* pBoxInfoItem = new SvxBoxInfoItem( SDRATTR_TABLE_BORDER_INNER ); - - pBoxInfoItem->SetTable( true ); - pBoxInfoItem->SetDist( true); // always show margin field - pBoxInfoItem->SetValid( SvxBoxInfoItemValidFlags::DISABLE ); // some lines may have DontCare state only in tables - - rPoolDefaults[ SDRATTR_TABLE_BORDER_INNER - SDRATTR_START ] = pBoxInfoItem; - rPoolDefaults[ SDRATTR_TABLE_BORDER_TLBR - SDRATTR_START ] = new SvxLineItem( SDRATTR_TABLE_BORDER_TLBR ); - rPoolDefaults[ SDRATTR_TABLE_BORDER_BLTR - SDRATTR_START ] = new SvxLineItem( SDRATTR_TABLE_BORDER_BLTR ); - rPoolDefaults[ SDRATTR_TABLE_TEXT_ROTATION - SDRATTR_START ] = new SvxTextRotateItem(0_deg10, SDRATTR_TABLE_TEXT_ROTATION); - rPoolDefaults[ SDRATTR_TABLE_CELL_GRABBAG - SDRATTR_START ] = new SfxGrabBagItem(SDRATTR_TABLE_CELL_GRABBAG); - - rPoolDefaults[ SDRATTR_GLOW_RADIUS - SDRATTR_START ] = new SdrMetricItem(SDRATTR_GLOW_RADIUS, 0); - rPoolDefaults[ SDRATTR_GLOW_COLOR - SDRATTR_START ] = new XColorItem(SDRATTR_GLOW_COLOR, aNullCol); - rPoolDefaults[ SDRATTR_GLOW_TRANSPARENCY - SDRATTR_START ] = new SdrPercentItem(SDRATTR_GLOW_TRANSPARENCY, 0); - - rPoolDefaults[SDRATTR_SOFTEDGE_RADIUS - SDRATTR_START] = new SdrMetricItem(SDRATTR_SOFTEDGE_RADIUS, 0); - - rPoolDefaults[SDRATTR_TEXTCOLUMNS_NUMBER - SDRATTR_START] = new SfxInt16Item(SDRATTR_TEXTCOLUMNS_NUMBER, 1); - rPoolDefaults[SDRATTR_TEXTCOLUMNS_SPACING - SDRATTR_START] = new SdrMetricItem(SDRATTR_TEXTCOLUMNS_SPACING, 0); - - rPoolDefaults[SDRATTR_WRITINGMODE2 - SDRATTR_START] = new SvxFrameDirectionItem(SvxFrameDirection::Horizontal_LR_TB, SDRATTR_WRITINGMODE2); - - // set own ItemInfos - mpLocalItemInfos[SDRATTR_SHADOW-SDRATTR_START]._nItemInfoSlotID=SID_ATTR_FILL_SHADOW; - mpLocalItemInfos[SDRATTR_SHADOWCOLOR-SDRATTR_START]._nItemInfoSlotID=SID_ATTR_SHADOW_COLOR; - mpLocalItemInfos[SDRATTR_SHADOWTRANSPARENCE-SDRATTR_START]._nItemInfoSlotID=SID_ATTR_SHADOW_TRANSPARENCE; - mpLocalItemInfos[SDRATTR_SHADOWBLUR-SDRATTR_START]._nItemInfoSlotID=SID_ATTR_SHADOW_BLUR; - mpLocalItemInfos[SDRATTR_SHADOWXDIST-SDRATTR_START]._nItemInfoSlotID=SID_ATTR_SHADOW_XDISTANCE; - mpLocalItemInfos[SDRATTR_SHADOWYDIST-SDRATTR_START]._nItemInfoSlotID=SID_ATTR_SHADOW_YDISTANCE; - mpLocalItemInfos[SDRATTR_TEXT_FITTOSIZE-SDRATTR_START]._nItemInfoSlotID=SID_ATTR_TEXT_FITTOSIZE; - mpLocalItemInfos[SDRATTR_GRAFCROP-SDRATTR_START]._nItemInfoSlotID=SID_ATTR_GRAF_CROP; - mpLocalItemInfos[SDRATTR_TABLE_BORDER - SDRATTR_START ]._nItemInfoSlotID = SID_ATTR_BORDER_OUTER; - mpLocalItemInfos[SDRATTR_TABLE_BORDER_INNER - SDRATTR_START ]._nItemInfoSlotID = SID_ATTR_BORDER_INNER; - mpLocalItemInfos[SDRATTR_TABLE_BORDER_TLBR - SDRATTR_START ]._nItemInfoSlotID = SID_ATTR_BORDER_DIAG_TLBR; - mpLocalItemInfos[SDRATTR_TABLE_BORDER_BLTR - SDRATTR_START ]._nItemInfoSlotID = SID_ATTR_BORDER_DIAG_BLTR; - mpLocalItemInfos[SDRATTR_GLOW_RADIUS - SDRATTR_START]._nItemInfoSlotID = SID_ATTR_GLOW_RADIUS; - mpLocalItemInfos[SDRATTR_GLOW_COLOR - SDRATTR_START]._nItemInfoSlotID = SID_ATTR_GLOW_COLOR; - mpLocalItemInfos[SDRATTR_GLOW_TRANSPARENCY - SDRATTR_START]._nItemInfoSlotID = SID_ATTR_GLOW_TRANSPARENCY; - mpLocalItemInfos[SDRATTR_SOFTEDGE_RADIUS - SDRATTR_START]._nItemInfoSlotID = SID_ATTR_SOFTEDGE_RADIUS; - mpLocalItemInfos[SDRATTR_TEXTCOLUMNS_NUMBER - SDRATTR_START]._nItemInfoSlotID = 0 /*TODO*/; - mpLocalItemInfos[SDRATTR_TEXTCOLUMNS_SPACING - SDRATTR_START]._nItemInfoSlotID = 0 /*TODO*/; - mpLocalItemInfos[SDRATTR_WRITINGMODE2 - SDRATTR_START]._nItemInfoSlotID = 0 /*TODO*/; - - // it's my own creation level, set Defaults and ItemInfos - SetPoolDefaults(mpLocalPoolDefaults); - SetItemInfos(mpLocalItemInfos.get()); -} - -// copy ctor, so that static defaults are cloned -// (Parameter 2 = sal_True) SdrItemPool::SdrItemPool(const SdrItemPool& rPool) -: XOutdevItemPool(rPool) +: SfxItemPool(rPool) { } @@ -394,6 +508,7 @@ SdrItemPool::~SdrItemPool() { // split pools before destroying SetSecondaryPool(nullptr); + sendShutdownHint(); } bool SdrItemPool::GetPresentation( @@ -412,7 +527,8 @@ bool SdrItemPool::GetPresentation( return true; } } - return XOutdevItemPool::GetPresentation(rItem,ePresentationMetric,rText,rIntlWrapper); + + return SfxItemPool::GetPresentation(rItem,ePresentationMetric,rText,rIntlWrapper); } OUString SdrItemPool::GetItemName(sal_uInt16 nWhich) diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 10dba8f0ebc7..f169ba06056f 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -542,7 +542,6 @@ SdrItemPool& SdrObject::GetGlobalDrawObjectItemPool() rtl::Reference<SfxItemPool> pGlobalOutlPool = EditEngine::CreatePool(); mpGlobalItemPool->SetSecondaryPool(pGlobalOutlPool.get()); mpGlobalItemPool->SetDefaultMetric(SdrEngineDefaults::GetMapUnit()); - mpGlobalItemPool->FreezeIdRanges(); if (comphelper::IsFuzzing()) mpGlobalItemPool->acquire(); else diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 8b995ce9d473..5a7a24f32d6a 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -161,7 +161,6 @@ void FontWorkGalleryDialog::insertSelectedFontwork() return; FmFormModel aModel; - aModel.GetItemPool().FreezeIdRanges(); if( !GalleryExplorer::GetSdrObj( mnThemeId, nItemId-1, &aModel ) ) return; diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx index db26250def81..8c81935b17f7 100644 --- a/svx/source/toolbars/fontworkbar.cxx +++ b/svx/source/toolbars/fontworkbar.cxx @@ -340,8 +340,6 @@ static void GetGeometryForCustomShape( SdrCustomShapeGeometryItem& rGeometryItem if ( aObjList[ i ].equalsIgnoreAsciiCase( rCustomShape ) ) { FmFormModel aFormModel; - SfxItemPool& rPool(aFormModel.GetItemPool()); - rPool.FreezeIdRanges(); if ( GalleryExplorer::GetSdrObj( GALLERY_THEME_POWERPOINT, i, &aFormModel ) ) { diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index 3be3c0418ea7..82b362f991eb 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -57,7 +57,6 @@ void SvxUnoDrawPool::init() SdrModel::SetTextDefaults( mpDefaultsPool.get(), SdrEngineDefaults::GetFontHeight() ); mpDefaultsPool->SetDefaultMetric(SdrEngineDefaults::GetMapUnit()); - mpDefaultsPool->FreezeIdRanges(); } SfxItemPool* SvxUnoDrawPool::getModelPool( bool bReadOnly ) noexcept diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx index d6efdf2822d8..6e9f072585e7 100644 --- a/svx/source/unogallery/unogalitem.cxx +++ b/svx/source/unogallery/unogalitem.cxx @@ -310,8 +310,6 @@ void GalleryItem::_getPropertyValues( const comphelper::PropertyMapEntry** ppEnt ::GalleryTheme* pGalTheme = ( isValid() ? mpTheme->implGetTheme() : nullptr ); FmFormModel* pModel = new FmFormModel(); - pModel->GetItemPool().FreezeIdRanges(); - if( pGalTheme && pGalTheme->GetModel( pGalTheme->maGalleryObjectCollection.searchPosWithObject( implGetObject() ), *pModel ) ) { rtl::Reference< GalleryDrawingModel > xDrawing( new GalleryDrawingModel( pModel ) ); diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx deleted file mode 100644 index 9419a5c43456..000000000000 --- a/svx/source/xoutdev/xpool.cxx +++ /dev/null @@ -1,241 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <sal/config.h> - -#include <svx/xflbckit.hxx> -#include <xftshtit.hxx> -#include <svx/xflboxy.hxx> -#include <svx/xflbstit.hxx> -#include <svx/xflclit.hxx> -#include <svx/xflgrit.hxx> -#include <svx/xflhtit.hxx> -#include <svx/xbtmpit.hxx> -#include <svx/xflftrit.hxx> -#include <svx/xsflclit.hxx> -#include <svx/xlntrit.hxx> -#include <svx/xfltrit.hxx> -#include <svx/xgrscit.hxx> -#include <svx/xflasit.hxx> -#include <svx/xflbmtit.hxx> -#include <svx/xflbmpit.hxx> -#include <svx/xflbmsxy.hxx> -#include <svx/xflbmsli.hxx> -#include <svx/xflbtoxy.hxx> -#include <svx/xlineit0.hxx> -#include <svx/xlinjoit.hxx> -#include <svx/xlncapit.hxx> -#include <svx/xfillit0.hxx> -#include <svx/xfilluseslidebackgrounditem.hxx> -#include <svx/xtextit0.hxx> -#include <svx/xlnasit.hxx> -#include <svx/xlndsit.hxx> -#include <svx/xlnwtit.hxx> -#include <svx/xlnclit.hxx> -#include <svx/xlnstit.hxx> -#include <svx/xlnedit.hxx> -#include <svx/xlnstwit.hxx> -#include <svx/xlnedwit.hxx> -#include <svx/xlnstcit.hxx> -#include <svx/xlnedcit.hxx> -#include <svx/xpool.hxx> -#include <svx/svddef.hxx> -#include <svx/svxids.hrc> -#include <svl/itemset.hxx> -#include <svx/xftadit.hxx> -#include <svx/xftdiit.hxx> -#include <svx/xftstit.hxx> -#include <svx/xftmrit.hxx> -#include <svx/xftouit.hxx> -#include <svx/xftshit.hxx> -#include <svx/xftshcit.hxx> -#include <svx/xftshxy.hxx> - -XOutdevItemPool::XOutdevItemPool(SfxItemPool* _pMaster) - : SfxItemPool("XOutdevItemPool", SDRATTR_START, SDRATTR_END, nullptr, nullptr) - , mpLocalPoolDefaults(new std::vector<SfxPoolItem*>(SDRATTR_END - SDRATTR_START + 1)) - , mpLocalItemInfos(new SfxItemInfo[SDRATTR_END - SDRATTR_START + 1]) -{ - // prepare some defaults - const OUString aNullStr; - const basegfx::B2DPolyPolygon aNullPol; - const Color aNullLineCol(COL_DEFAULT_SHAPE_STROKE); // #i121448# Use defined default color - const Color aNullFillCol(COL_DEFAULT_SHAPE_FILLING); // #i121448# Use defined default color - const Color aNullShadowCol(COL_LIGHTGRAY); - const XDash aNullDash; - const XHatch aNullHatch(aNullLineCol); - - // get master pointer, evtl. add myself to the end of the pools - if(!_pMaster) - { - _pMaster = this; - } - else - { - _pMaster->GetLastPoolInChain()->SetSecondaryPool(this); - } - - // prepare PoolDefaults - std::vector<SfxPoolItem*>& rPoolDefaults = *mpLocalPoolDefaults; - rPoolDefaults[XATTR_LINESTYLE -XATTR_START] = new XLineStyleItem; - rPoolDefaults[XATTR_LINEDASH -XATTR_START] = new XLineDashItem(aNullDash); - rPoolDefaults[XATTR_LINEWIDTH -XATTR_START] = new XLineWidthItem; - rPoolDefaults[XATTR_LINECOLOR -XATTR_START] = new XLineColorItem(aNullStr,aNullLineCol); - rPoolDefaults[XATTR_LINESTART -XATTR_START] = new XLineStartItem(aNullPol); - rPoolDefaults[XATTR_LINEEND -XATTR_START] = new XLineEndItem (aNullPol); - rPoolDefaults[XATTR_LINESTARTWIDTH -XATTR_START] = new XLineStartWidthItem; - rPoolDefaults[XATTR_LINEENDWIDTH -XATTR_START] = new XLineEndWidthItem; - rPoolDefaults[XATTR_LINESTARTCENTER -XATTR_START] = new XLineStartCenterItem; - rPoolDefaults[XATTR_LINEENDCENTER -XATTR_START] = new XLineEndCenterItem; - rPoolDefaults[XATTR_LINETRANSPARENCE -XATTR_START] = new XLineTransparenceItem; - rPoolDefaults[XATTR_LINEJOINT -XATTR_START] = new XLineJointItem; - rPoolDefaults[XATTR_LINECAP -XATTR_START] = new XLineCapItem; - rPoolDefaults[XATTR_FILLSTYLE -XATTR_START] = new XFillStyleItem; - rPoolDefaults[XATTR_FILLCOLOR -XATTR_START] = new XFillColorItem (aNullStr,aNullFillCol); - - // basegfx::BGradient() default already creates [COL_BLACK, COL_WHITE] as defaults - rPoolDefaults[XATTR_FILLGRADIENT -XATTR_START] = new XFillGradientItem(basegfx::BGradient()); - - rPoolDefaults[XATTR_FILLHATCH -XATTR_START] = new XFillHatchItem (aNullHatch); - rPoolDefaults[XATTR_FILLBITMAP -XATTR_START] = new XFillBitmapItem (Graphic()); - rPoolDefaults[XATTR_FILLTRANSPARENCE -XATTR_START] = new XFillTransparenceItem; - rPoolDefaults[XATTR_GRADIENTSTEPCOUNT -XATTR_START] = new XGradientStepCountItem; - rPoolDefaults[XATTR_FILLBMP_TILE -XATTR_START] = new XFillBmpTileItem; - rPoolDefaults[XATTR_FILLBMP_POS -XATTR_START] = new XFillBmpPosItem; - rPoolDefaults[XATTR_FILLBMP_SIZEX -XATTR_START] = new XFillBmpSizeXItem; - rPoolDefaults[XATTR_FILLBMP_SIZEY -XATTR_START] = new XFillBmpSizeYItem; - rPoolDefaults[XATTR_FILLBMP_SIZELOG -XATTR_START] = new XFillBmpSizeLogItem; - rPoolDefaults[XATTR_FILLBMP_TILEOFFSETX -XATTR_START] = new XFillBmpTileOffsetXItem; - rPoolDefaults[XATTR_FILLBMP_TILEOFFSETY -XATTR_START] = new XFillBmpTileOffsetYItem; - rPoolDefaults[XATTR_FILLBMP_STRETCH -XATTR_START] = new XFillBmpStretchItem; - rPoolDefaults[XATTR_FILLBMP_POSOFFSETX -XATTR_START] = new XFillBmpPosOffsetXItem; - rPoolDefaults[XATTR_FILLBMP_POSOFFSETY -XATTR_START] = new XFillBmpPosOffsetYItem; - - rPoolDefaults[XATTR_FILLFLOATTRANSPARENCE -XATTR_START] = new XFillFloatTransparenceItem( - basegfx::BGradient( - basegfx::BColorStops( - COL_BLACK.getBColor(), - COL_BLACK.getBColor())), - false); - - rPoolDefaults[XATTR_SECONDARYFILLCOLOR -XATTR_START] = new XSecondaryFillColorItem(aNullStr, aNullFillCol); - rPoolDefaults[XATTR_FILLBACKGROUND -XATTR_START] = new XFillBackgroundItem; - rPoolDefaults[XATTR_FILLUSESLIDEBACKGROUND -XATTR_START] = new XFillUseSlideBackgroundItem; - rPoolDefaults[XATTR_FORMTXTSTYLE -XATTR_START] = new XFormTextStyleItem; - rPoolDefaults[XATTR_FORMTXTADJUST -XATTR_START] = new XFormTextAdjustItem; - rPoolDefaults[XATTR_FORMTXTDISTANCE -XATTR_START] = new XFormTextDistanceItem; - rPoolDefaults[XATTR_FORMTXTSTART -XATTR_START] = new XFormTextStartItem; - rPoolDefaults[XATTR_FORMTXTMIRROR -XATTR_START] = new XFormTextMirrorItem; - rPoolDefaults[XATTR_FORMTXTOUTLINE -XATTR_START] = new XFormTextOutlineItem; - rPoolDefaults[XATTR_FORMTXTSHADOW -XATTR_START] = new XFormTextShadowItem; - rPoolDefaults[XATTR_FORMTXTSHDWCOLOR -XATTR_START] = new XFormTextShadowColorItem(aNullStr,aNullShadowCol); - rPoolDefaults[XATTR_FORMTXTSHDWXVAL -XATTR_START] = new XFormTextShadowXValItem; - rPoolDefaults[XATTR_FORMTXTSHDWYVAL -XATTR_START] = new XFormTextShadowYValItem; - rPoolDefaults[XATTR_FORMTXTHIDEFORM -XATTR_START] = new XFormTextHideFormItem; - rPoolDefaults[XATTR_FORMTXTSHDWTRANSP -XATTR_START] = new XFormTextShadowTranspItem; - - // create SetItems - rPoolDefaults[XATTRSET_LINE - XATTR_START] = new XLineAttrSetItem( - SfxItemSetFixed<XATTR_LINE_FIRST, XATTR_LINE_LAST>( *_pMaster ) ); - rPoolDefaults[XATTRSET_FILL - XATTR_START] = new XFillAttrSetItem( - SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST>( *_pMaster ) ); - - // create ItemInfos - for(sal_uInt16 i(GetFirstWhich()); i <= GetLastWhich(); i++) - { - // _nItemInfoSlotID, _nItemInfoFlags - mpLocalItemInfos[i - XATTR_START]._nItemInfoSlotID = 0; - mpLocalItemInfos[i - XATTR_START]._nItemInfoFlags = SFX_ITEMINFOFLAG_NONE; - } - - // these slots need SFX_ITEMINFOFLAG_SUPPORT_SURROGATE, see - // text @svl/source/items/itempool.cxx - mpLocalItemInfos[XATTR_FILLBITMAP -XATTR_START]._nItemInfoFlags = SFX_ITEMINFOFLAG_SUPPORT_SURROGATE; - mpLocalItemInfos[XATTR_FILLGRADIENT -XATTR_START]._nItemInfoFlags = SFX_ITEMINFOFLAG_SUPPORT_SURROGATE; - mpLocalItemInfos[XATTR_FILLHATCH -XATTR_START]._nItemInfoFlags = SFX_ITEMINFOFLAG_SUPPORT_SURROGATE; - mpLocalItemInfos[XATTR_FILLFLOATTRANSPARENCE - XATTR_START]._nItemInfoFlags = SFX_ITEMINFOFLAG_SUPPORT_SURROGATE; - mpLocalItemInfos[XATTR_LINEEND -XATTR_START]._nItemInfoFlags = SFX_ITEMINFOFLAG_SUPPORT_SURROGATE; - mpLocalItemInfos[XATTR_LINESTART -XATTR_START]._nItemInfoFlags = SFX_ITEMINFOFLAG_SUPPORT_SURROGATE; - mpLocalItemInfos[XATTR_LINEDASH -XATTR_START]._nItemInfoFlags = SFX_ITEMINFOFLAG_SUPPORT_SURROGATE; - mpLocalItemInfos[XATTR_FILLCOLOR -XATTR_START]._nItemInfoFlags = SFX_ITEMINFOFLAG_SUPPORT_SURROGATE; - - // set the SlotIDs, this is a mapping used by GetWhich()/GetSlotId() - mpLocalItemInfos[XATTR_LINESTYLE -XATTR_START]._nItemInfoSlotID = SID_ATTR_LINE_STYLE; - mpLocalItemInfos[XATTR_LINEDASH -XATTR_START]._nItemInfoSlotID = SID_ATTR_LINE_DASH; - mpLocalItemInfos[XATTR_LINEWIDTH -XATTR_START]._nItemInfoSlotID = SID_ATTR_LINE_WIDTH; - mpLocalItemInfos[XATTR_LINECOLOR -XATTR_START]._nItemInfoSlotID = SID_ATTR_LINE_COLOR; - mpLocalItemInfos[XATTR_LINESTART -XATTR_START]._nItemInfoSlotID = SID_ATTR_LINE_START; - mpLocalItemInfos[XATTR_LINEEND -XATTR_START]._nItemInfoSlotID = SID_ATTR_LINE_END; - mpLocalItemInfos[XATTR_LINESTARTWIDTH -XATTR_START]._nItemInfoSlotID = SID_ATTR_LINE_STARTWIDTH; - mpLocalItemInfos[XATTR_LINEENDWIDTH -XATTR_START]._nItemInfoSlotID = SID_ATTR_LINE_ENDWIDTH; - mpLocalItemInfos[XATTR_LINESTARTCENTER -XATTR_START]._nItemInfoSlotID = SID_ATTR_LINE_STARTCENTER; - mpLocalItemInfos[XATTR_LINEENDCENTER -XATTR_START]._nItemInfoSlotID = SID_ATTR_LINE_ENDCENTER; - mpLocalItemInfos[XATTR_FILLSTYLE -XATTR_START]._nItemInfoSlotID = SID_ATTR_FILL_STYLE; - mpLocalItemInfos[XATTR_FILLCOLOR -XATTR_START]._nItemInfoSlotID = SID_ATTR_FILL_COLOR; - mpLocalItemInfos[XATTR_FILLGRADIENT -XATTR_START]._nItemInfoSlotID = SID_ATTR_FILL_GRADIENT; - mpLocalItemInfos[XATTR_FILLHATCH -XATTR_START]._nItemInfoSlotID = SID_ATTR_FILL_HATCH; - mpLocalItemInfos[XATTR_FILLBITMAP -XATTR_START]._nItemInfoSlotID = SID_ATTR_FILL_BITMAP; - mpLocalItemInfos[XATTR_FORMTXTSTYLE -XATTR_START]._nItemInfoSlotID = SID_FORMTEXT_STYLE; - mpLocalItemInfos[XATTR_FORMTXTADJUST -XATTR_START]._nItemInfoSlotID = SID_FORMTEXT_ADJUST; - mpLocalItemInfos[XATTR_FORMTXTDISTANCE -XATTR_START]._nItemInfoSlotID = SID_FORMTEXT_DISTANCE; - mpLocalItemInfos[XATTR_FORMTXTSTART -XATTR_START]._nItemInfoSlotID = SID_FORMTEXT_START; - mpLocalItemInfos[XATTR_FORMTXTMIRROR -XATTR_START]._nItemInfoSlotID = SID_FORMTEXT_MIRROR; - mpLocalItemInfos[XATTR_FORMTXTOUTLINE -XATTR_START]._nItemInfoSlotID = SID_FORMTEXT_OUTLINE; - mpLocalItemInfos[XATTR_FORMTXTSHADOW -XATTR_START]._nItemInfoSlotID = SID_FORMTEXT_SHADOW; - mpLocalItemInfos[XATTR_FORMTXTSHDWCOLOR -XATTR_START]._nItemInfoSlotID = SID_FORMTEXT_SHDWCOLOR; - mpLocalItemInfos[XATTR_FORMTXTSHDWXVAL -XATTR_START]._nItemInfoSlotID = SID_FORMTEXT_SHDWXVAL; - mpLocalItemInfos[XATTR_FORMTXTSHDWYVAL -XATTR_START]._nItemInfoSlotID = SID_FORMTEXT_SHDWYVAL; - mpLocalItemInfos[XATTR_FORMTXTHIDEFORM -XATTR_START]._nItemInfoSlotID = SID_FORMTEXT_HIDEFORM; - - // associate new slots for panels with known items - mpLocalItemInfos[XATTR_FILLUSESLIDEBACKGROUND - XATTR_START]._nItemInfoSlotID = SID_ATTR_FILL_USE_SLIDE_BACKGROUND; - mpLocalItemInfos[XATTR_FILLTRANSPARENCE - XATTR_START]._nItemInfoSlotID = SID_ATTR_FILL_TRANSPARENCE; - mpLocalItemInfos[XATTR_FILLFLOATTRANSPARENCE - XATTR_START]._nItemInfoSlotID = SID_ATTR_FILL_FLOATTRANSPARENCE; - mpLocalItemInfos[XATTR_LINETRANSPARENCE - XATTR_START]._nItemInfoSlotID = SID_ATTR_LINE_TRANSPARENCE; - mpLocalItemInfos[XATTR_LINEJOINT - XATTR_START]._nItemInfoSlotID = SID_ATTR_LINE_JOINT; - mpLocalItemInfos[XATTR_LINECAP - XATTR_START]._nItemInfoSlotID = SID_ATTR_LINE_CAP; - - // if it's my own creation level, set Defaults and ItemInfos - if(XATTR_START == GetFirstWhich() && XATTR_END == GetLastWhich()) - { - SetPoolDefaults(mpLocalPoolDefaults); - SetItemInfos(mpLocalItemInfos.get()); - } -} - -// copy ctor, clones all static defaults -XOutdevItemPool::XOutdevItemPool(const XOutdevItemPool& rPool) -: SfxItemPool(rPool, true), - mpLocalPoolDefaults(nullptr) -{ -} - -rtl::Reference<SfxItemPool> XOutdevItemPool::Clone() const -{ - return new XOutdevItemPool(*this); -} - -XOutdevItemPool::~XOutdevItemPool() -{ - Delete(); - // release and delete static pool default items - ReleasePoolDefaults(true); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |