summaryrefslogtreecommitdiffstats
path: root/svx/source/xoutdev/xpool.cxx
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2024-02-09 11:13:58 +0100
committerArmin Le Grand <Armin.Le.Grand@me.com>2024-02-12 10:35:33 +0100
commitca3c6d468f68af1506bf4e56b47655e5d56306a8 (patch)
tree27da565a170606c4ea54ea07aa0dbb21eba3fe60 /svx/source/xoutdev/xpool.cxx
parentsvx: prefix members of SdrHelpLineList (diff)
downloadcore-ca3c6d468f68af1506bf4e56b47655e5d56306a8.tar.gz
core-ca3c6d468f68af1506bf4e56b47655e5d56306a8.zip
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/xoutdev/xpool.cxx')
-rw-r--r--svx/source/xoutdev/xpool.cxx241
1 files changed, 0 insertions, 241 deletions
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: */