diff options
author | Armin Le Grand <alg@apache.org> | 2013-04-28 10:57:18 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2013-04-28 10:57:18 +0000 |
commit | 5e5dca13097c4d23f4efce9296163ff47e26872e (patch) | |
tree | 59f7d3ffc8cfc9bb3e4a06f0d2928d6b4fc649e4 /cui/source/inc | |
parent | eb15aa364708f091c4c59a66f9c3f43e35dafd31 (diff) |
i122120 Cleanup of XPropertyList and derivates to RefCounted instances, more cleanups
Notes
Notes:
prefer: c8dc73720883333a13187865cd0d69b64af6b4b5
Diffstat (limited to 'cui/source/inc')
-rw-r--r-- | cui/source/inc/cuitabarea.hxx | 110 | ||||
-rw-r--r-- | cui/source/inc/cuitabline.hxx | 53 | ||||
-rw-r--r-- | cui/source/inc/sdrcelldlg.hxx | 14 | ||||
-rw-r--r-- | cui/source/inc/treeopt.hxx | 8 |
4 files changed, 86 insertions, 99 deletions
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 421c2343e5a1..bcc777f09da2 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -40,14 +40,14 @@ private: SdrModel* mpDrawModel; // const SdrView* mpView; - XColorList* mpColorTab; - XColorList* mpNewColorTab; - XGradientList* mpGradientList; - XGradientList* mpNewGradientList; - XHatchList* mpHatchingList; - XHatchList* mpNewHatchingList; - XBitmapList* mpBitmapList; - XBitmapList* mpNewBitmapList; + XColorListSharedPtr maColorTab; + XColorListSharedPtr maNewColorTab; + XGradientListSharedPtr maGradientList; + XGradientListSharedPtr maNewGradientList; + XHatchListSharedPtr maHatchingList; + XHatchListSharedPtr maNewHatchingList; + XBitmapListSharedPtr maBitmapList; + XBitmapListSharedPtr maNewBitmapList; const SfxItemSet& mrOutAttrs; @@ -60,7 +60,6 @@ private: sal_uInt16 mnDlgType; sal_uInt16 mnPos; sal_Bool mbAreaTP; - sal_Bool mbDeleteColorTable; virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); @@ -77,29 +76,21 @@ public: const SdrView* pSdrView = NULL ); ~SvxAreaTabDialog(); - void SetNewColorTable( XColorList* pColTab ) - { mpNewColorTab = pColTab; } - XColorList* GetNewColorTable() const { return mpNewColorTab; } - const XColorList* GetColorTable() const { return mpColorTab; } - - void SetNewGradientList( XGradientList* pGrdLst) - { mpNewGradientList = pGrdLst; } - XGradientList* GetNewGradientList() const - { return mpNewGradientList; } - const XGradientList* GetGradientList() const { return mpGradientList; } - - void SetNewHatchingList( XHatchList* pHtchLst) - { mpNewHatchingList = pHtchLst; } - XHatchList* GetNewHatchingList() const - { return mpNewHatchingList; } - const XHatchList* GetHatchingList() const { return mpHatchingList; } - - void SetNewBitmapList( XBitmapList* pBmpLst) - { mpNewBitmapList = pBmpLst; } - XBitmapList* GetNewBitmapList() const { return mpNewBitmapList; } - const XBitmapList* GetBitmapList() const { return mpBitmapList; } - - void DontDeleteColorTable() { mbDeleteColorTable = sal_False; } + void SetNewColorTable( XColorListSharedPtr aColTab ) { maNewColorTab = aColTab; } + XColorListSharedPtr GetNewColorTable() const { return maNewColorTab; } + const XColorListSharedPtr GetColorTable() const { return maColorTab; } + + void SetNewGradientList( XGradientListSharedPtr aGrdLst) { maNewGradientList = aGrdLst; } + XGradientListSharedPtr GetNewGradientList() const { return maNewGradientList; } + const XGradientListSharedPtr GetGradientList() const { return maGradientList; } + + void SetNewHatchingList( XHatchListSharedPtr aHtchLst) { maNewHatchingList = aHtchLst; } + XHatchListSharedPtr GetNewHatchingList() const { return maNewHatchingList; } + const XHatchListSharedPtr GetHatchingList() const { return maHatchingList; } + + void SetNewBitmapList( XBitmapListSharedPtr aBmpLst) { maNewBitmapList = aBmpLst; } + XBitmapListSharedPtr GetNewBitmapList() const { return maNewBitmapList; } + const XBitmapListSharedPtr GetBitmapList() const { return maBitmapList; } }; /************************************************************************* @@ -244,10 +235,10 @@ private: const SfxItemSet& rOutAttrs; RECT_POINT eRP; - XColorList* pColorTab; - XGradientList* pGradientList; - XHatchList* pHatchingList; - XBitmapList* pBitmapList; + XColorListSharedPtr maColorTab; + XGradientListSharedPtr maGradientList; + XHatchListSharedPtr maHatchingList; + XBitmapListSharedPtr maBitmapList; ChangeType* pnColorTableState; ChangeType* pnBitmapListState; @@ -303,12 +294,10 @@ public: virtual int DeactivatePage( SfxItemSet* pSet ); virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); - void SetColorTable( XColorList* pColTab ) { pColorTab = pColTab; } - void SetGradientList( XGradientList* pGrdLst) - { pGradientList = pGrdLst; } - void SetHatchingList( XHatchList* pHtchLst) - { pHatchingList = pHtchLst; } - void SetBitmapList( XBitmapList* pBmpLst) { pBitmapList = pBmpLst; } + void SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; } + void SetGradientList( XGradientListSharedPtr aGrdLst) { maGradientList = aGrdLst; } + void SetHatchingList( XHatchListSharedPtr aHtchLst) { maHatchingList = aHtchLst; } + void SetBitmapList( XBitmapListSharedPtr aBmpLst) { maBitmapList = aBmpLst; } //CHINA001 void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } void SetPageType( sal_uInt16 nInType ) { nPageType = nInType; } //add CHINA001 @@ -351,7 +340,7 @@ private: const SfxItemSet& rOutAttrs; RECT_POINT eRP; - XColorList* pColorTab; + XColorListSharedPtr maColorTab; ChangeType* pnColorTableState; sal_uInt16 nPageType; //add CHINA001 sal_uInt16 nDlgType; //add CHINA001 @@ -383,7 +372,7 @@ public: virtual int DeactivatePage( SfxItemSet* pSet ); virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); - void SetColorTable( XColorList* pColTab ) { pColorTab = pColTab; } + void SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; } //CHINA001 void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } //CHINA001 void SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; } void SetPageType( sal_uInt16 nInType ) { nPageType = nInType; } //add CHINA001 @@ -433,8 +422,8 @@ private: const SfxItemSet& rOutAttrs; - XColorList* pColorTab; - XGradientList* pGradientList; + XColorListSharedPtr maColorTab; + XGradientListSharedPtr maGradientList; ChangeType* pnGradientListState; ChangeType* pnColorTableState; @@ -474,9 +463,8 @@ public: virtual void ActivatePage( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet ); - void SetColorTable( XColorList* pColTab ) { pColorTab = pColTab; } - void SetGradientList( XGradientList* pGrdLst) - { pGradientList = pGrdLst; } + void SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; } + void SetGradientList( XGradientListSharedPtr aGrdLst) { maGradientList = aGrdLst; } void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } void SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; } @@ -520,8 +508,8 @@ private: const SfxItemSet& rOutAttrs; RECT_POINT eRP; - XColorList* pColorTab; - XHatchList* pHatchingList; + XColorListSharedPtr maColorTab; + XHatchListSharedPtr maHatchingList; ChangeType* pnHatchingListState; ChangeType* pnColorTableState; @@ -564,9 +552,8 @@ public: virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); - void SetColorTable( XColorList* pColTab ) { pColorTab = pColTab; } - void SetHatchingList( XHatchList* pHtchLst) - { pHatchingList = pHtchLst; } + void SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; } + void SetHatchingList( XHatchListSharedPtr aHtchLst) { maHatchingList = aHtchLst; } void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } void SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; } @@ -612,8 +599,8 @@ private: const SfxItemSet& rOutAttrs; - XColorList* pColorTab; - XBitmapList* pBitmapList; + XColorListSharedPtr maColorTab; + XBitmapListSharedPtr maBitmapList; ChangeType* pnBitmapListState; ChangeType* pnColorTableState; @@ -658,8 +645,8 @@ public: virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); - void SetColorTable( XColorList* pColTab ) { pColorTab = pColTab; } - void SetBitmapList( XBitmapList* pBmpLst) { pBitmapList = pBmpLst; } + void SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; } + void SetBitmapList( XBitmapListSharedPtr aBmpLst) { maBitmapList = aBmpLst; } void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } void SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; } @@ -724,14 +711,13 @@ private: const SfxItemSet& rOutAttrs; - XColorList* pColorTab; + XColorListSharedPtr maColorTab; ChangeType* pnColorTableState; sal_uInt16* pPageType; sal_uInt16* pDlgType; sal_uInt16* pPos; sal_Bool* pbAreaTP; - sal_Bool bDeleteColorTable; XOutdevItemPool* pXPool; XFillStyleItem aXFStyleItem; @@ -781,7 +767,7 @@ public: virtual void ActivatePage( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet ); - void SetColorTable( XColorList* pColTab ) { pColorTab = pColTab; } + void SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; } void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } void SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; } @@ -790,8 +776,6 @@ public: void SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; } - void SetDeleteColorTable( sal_Bool bIn ) { bDeleteColorTable = bIn; } - virtual void FillUserData(); }; diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx index 163418cc3cec..26f2f8a2ef63 100644 --- a/cui/source/inc/cuitabline.hxx +++ b/cui/source/inc/cuitabline.hxx @@ -39,12 +39,12 @@ private: const SfxItemSet& rOutAttrs; - XColorList* pColorTab; - XColorList* mpNewColorTab; - XDashList* pDashList; - XDashList* pNewDashList; - XLineEndList* pLineEndList; - XLineEndList* pNewLineEndList; + XColorListSharedPtr maColorTab; + XColorListSharedPtr maNewColorTab; + XDashListSharedPtr maDashList; + XDashListSharedPtr maNewDashList; + XLineEndListSharedPtr maLineEndList; + XLineEndListSharedPtr maNewLineEndList; sal_Bool bObjSelected; ChangeType nLineEndListState; @@ -57,7 +57,6 @@ private: sal_uInt16 nPosLineEndLb; sal_uInt16 mnPos; sal_Bool mbAreaTP; - sal_Bool mbDeleteColorTable; virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); @@ -74,19 +73,17 @@ public: sal_Bool bHasObj = sal_True ); ~SvxLineTabDialog(); - void SetNewDashList( XDashList* pInLst) - { pNewDashList = pInLst; } - XDashList* GetNewDashList() const { return pNewDashList; } - const XDashList* GetDashList() const { return pDashList; } + void SetNewDashList( XDashListSharedPtr aInLst) { maNewDashList = aInLst; } + XDashListSharedPtr GetNewDashList() const { return maNewDashList; } + const XDashListSharedPtr GetDashList() const { return maDashList; } - void SetNewLineEndList( XLineEndList* pInLst) - { pNewLineEndList = pInLst; } - XLineEndList* GetNewLineEndList() const { return pNewLineEndList; } - const XLineEndList* GetLineEndList() const { return pLineEndList; } + void SetNewLineEndList( XLineEndListSharedPtr aInLst) { maNewLineEndList = aInLst; } + XLineEndListSharedPtr GetNewLineEndList() const { return maNewLineEndList; } + const XLineEndListSharedPtr GetLineEndList() const { return maLineEndList; } - void SetNewColorTable( XColorList* pColTab ) { mpNewColorTab = pColTab; } - XColorList* GetNewColorTable() const { return mpNewColorTab; } - const XColorList* GetColorTable() const { return pColorTab; } + void SetNewColorTable( XColorListSharedPtr aColTab ) { maNewColorTab = aColTab; } + XColorListSharedPtr GetNewColorTable() const { return maNewColorTab; } + const XColorListSharedPtr GetColorTable() const { return maColorTab; } }; /************************************************************************* @@ -166,9 +163,9 @@ private: XLineAttrSetItem aXLineAttr; SfxItemSet& rXLSet; - XColorList* pColorTab; - XDashList* pDashList; - XLineEndList* pLineEndList; + XColorListSharedPtr maColorTab; + XDashListSharedPtr maDashList; + XLineEndListSharedPtr maLineEndList; ChangeType* pnLineEndListState; ChangeType* pnDashListState; @@ -231,9 +228,9 @@ public: virtual void FillUserData(); - void SetColorTable( XColorList* pColTab ) { pColorTab = pColTab; } - void SetDashList( XDashList* pDshLst ) { pDashList = pDshLst; } - void SetLineEndList( XLineEndList* pLneEndLst) { pLineEndList = pLneEndLst; } + void SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; } + void SetDashList( XDashListSharedPtr aDshLst ) { maDashList = aDshLst; } + void SetLineEndList( XLineEndListSharedPtr aLneEndLst) { maLineEndList = aLneEndLst; } void SetObjSelected( sal_Bool bHasObj ) { bObjSelected = bHasObj; } void SetPageType( sal_uInt16 nInType ) { nPageType = nInType; }//CHINA001 void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } @@ -294,7 +291,7 @@ private: XLineAttrSetItem aXLineAttr; SfxItemSet& rXLSet; - XDashList* pDashList; + XDashListSharedPtr maDashList; ChangeType* pnDashListState; sal_uInt16* pPageType; @@ -335,7 +332,7 @@ public: virtual void ActivatePage( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet ); - void SetDashList( XDashList* pDshLst ) { pDashList = pDshLst; } + void SetDashList( XDashListSharedPtr aDshLst ) { maDashList = aDshLst; } void SetObjSelected( sal_Bool bHasObj ) { bObjSelected = bHasObj; } void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } @@ -383,7 +380,7 @@ private: XLineAttrSetItem aXLineAttr; SfxItemSet& rXLSet; - XLineEndList* pLineEndList; + XLineEndListSharedPtr maLineEndList; ChangeType* pnLineEndListState; sal_uInt16* pPageType; @@ -415,7 +412,7 @@ public: virtual void ActivatePage( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet ); - void SetLineEndList( XLineEndList* pInList ) { pLineEndList = pInList; } + void SetLineEndList( XLineEndListSharedPtr aInList ) { maLineEndList = aInList; } void SetPolyObj( const SdrObject* pObj ) { pPolyObj = pObj; } void SetObjSelected( sal_Bool bHasObj ) { bObjSelected = bHasObj; } diff --git a/cui/source/inc/sdrcelldlg.hxx b/cui/source/inc/sdrcelldlg.hxx index fd17127ab3d4..d074c3b67824 100644 --- a/cui/source/inc/sdrcelldlg.hxx +++ b/cui/source/inc/sdrcelldlg.hxx @@ -24,7 +24,6 @@ #ifndef _SVX_FORMAT_CELLS_DLG_HXX #define _SVX_FORMAT_CELLS_DLG_HXX - #include <sfx2/tabdlg.hxx> class XColorList; @@ -33,15 +32,20 @@ class XHatchList; class XBitmapList; class SdrModel; +typedef ::boost::shared_ptr< XColorList > XColorListSharedPtr; +typedef ::boost::shared_ptr< XHatchList > XHatchListSharedPtr; +typedef ::boost::shared_ptr< XGradientList > XGradientListSharedPtr; +typedef ::boost::shared_ptr< XBitmapList > XBitmapListSharedPtr; + class SvxFormatCellsDialog : public SfxTabDialog { private: const SfxItemSet& mrOutAttrs; - XColorList* mpColorTab; - XGradientList* mpGradientList; - XHatchList* mpHatchingList; - XBitmapList* mpBitmapList; + XColorListSharedPtr maColorTab; + XGradientListSharedPtr maGradientList; + XHatchListSharedPtr maHatchingList; + XBitmapListSharedPtr maBitmapList; protected: virtual void Apply(); diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index ae85d9456204..0111273497a2 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -44,6 +44,8 @@ class SfxModule; class SfxShell; class SfxItemSet; class XColorList; +typedef ::boost::shared_ptr< XColorList > XColorListSharedPtr; + class OfaOptionsTreeListBox : public SvTreeListBox { using SvListView::Collapse; @@ -196,8 +198,8 @@ private: SvLBoxEntry* pCurrentPageEntry; // for the ColorTabPage - SfxItemSet* pColorPageItemSet; - XColorList* pColorTab; + SfxItemSet* pColorPageItemSet; + XColorListSharedPtr maColorTab; sal_uInt16 nChangeType; sal_uInt16 nUnknownType; sal_uInt16 nUnknownPos; @@ -269,7 +271,7 @@ public: void ApplyItemSets(); sal_uInt16 GetColorChanged() const { return nChangeType; } - XColorList* GetColorTable() { return pColorTab; } + XColorListSharedPtr GetColorTable() { return maColorTab; } // helper functions to call the language settings TabPage from the SpellDialog static void ApplyLanguageOptions(const SfxItemSet& rSet); |