[Libreoffice-commits] core.git: Branch 'aoo/trunk' - chart2/source cui/source extensions/source reportdesign/source sc/inc sc/source sd/inc sd/source svx/inc svx/sdi svx/source sw/source

Armin Le Grand alg at apache.org
Sun Apr 28 16:33:02 PDT 2013


 chart2/source/controller/dialogs/dlg_View3D.cxx                   |    4 
 chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx      |    8 
 chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx      |    2 
 chart2/source/controller/drawinglayer/ViewElementListProvider.cxx |   36 -
 chart2/source/controller/inc/ViewElementListProvider.hxx          |   12 
 chart2/source/controller/inc/dlg_View3D.hxx                       |    2 
 chart2/source/controller/main/ChartController_Properties.cxx      |    2 
 chart2/source/controller/main/DrawCommandDispatch.cxx             |    8 
 chart2/source/controller/main/ShapeController.cxx                 |    5 
 chart2/source/inc/chartview/DrawModelWrapper.hxx                  |   12 
 chart2/source/view/main/DrawModelWrapper.cxx                      |   24 -
 cui/source/dialogs/sdrcelldlg.cxx                                 |   16 
 cui/source/factory/dlgfact.cxx                                    |    5 
 cui/source/factory/dlgfact.hxx                                    |    1 
 cui/source/inc/cuitabarea.hxx                                     |  110 ++--
 cui/source/inc/cuitabline.hxx                                     |   53 +-
 cui/source/inc/sdrcelldlg.hxx                                     |   14 
 cui/source/inc/treeopt.hxx                                        |    8 
 cui/source/options/optchart.cxx                                   |   17 
 cui/source/options/optchart.hxx                                   |    2 
 cui/source/options/optcolor.cxx                                   |    6 
 cui/source/options/treeopt.cxx                                    |   23 -
 cui/source/tabpages/backgrnd.cxx                                  |   21 
 cui/source/tabpages/border.cxx                                    |   12 
 cui/source/tabpages/chardlg.cxx                                   |   36 -
 cui/source/tabpages/numpages.cxx                                  |   18 
 cui/source/tabpages/tabarea.cxx                                   |  106 ++--
 cui/source/tabpages/tabline.cxx                                   |   76 +--
 cui/source/tabpages/tparea.cxx                                    |   72 +--
 cui/source/tabpages/tpbitmap.cxx                                  |   88 +--
 cui/source/tabpages/tpcolor.cxx                                   |  110 ++--
 cui/source/tabpages/tpgradnt.cxx                                  |   90 +---
 cui/source/tabpages/tphatch.cxx                                   |   82 +--
 cui/source/tabpages/tpline.cxx                                    |   67 +-
 cui/source/tabpages/tplnedef.cxx                                  |   84 +--
 cui/source/tabpages/tplneend.cxx                                  |   86 +--
 cui/source/tabpages/tpshadow.cxx                                  |   12 
 extensions/source/propctrlr/standardcontrol.cxx                   |   17 
 reportdesign/source/ui/dlg/Condition.cxx                          |    6 
 reportdesign/source/ui/misc/UITools.cxx                           |    9 
 sc/inc/document.hxx                                               |    6 
 sc/source/core/data/documen2.cxx                                  |    3 
 sc/source/core/data/documen3.cxx                                  |    2 
 sc/source/core/data/documen9.cxx                                  |   15 
 sc/source/core/data/drwlayer.cxx                                  |   11 
 sc/source/ui/dbgui/scendlg.cxx                                    |    8 
 sc/source/ui/docshell/docsh2.cxx                                  |   12 
 sc/source/ui/docshell/docsh4.cxx                                  |    7 
 sc/source/ui/drawfunc/drawsh.cxx                                  |    2 
 sc/source/ui/drawfunc/drawsh4.cxx                                 |    8 
 sc/source/ui/drawfunc/drtxtob2.cxx                                |    8 
 sc/source/ui/miscdlgs/makefile.mk                                 |    3 
 sc/source/ui/miscdlgs/tabbgcolordlg.cxx                           |   17 
 sc/source/ui/optdlg/opredlin.cxx                                  |    6 
 sc/source/ui/optdlg/tpview.cxx                                    |   12 
 sd/inc/sdabstdlg.hxx                                              |    3 
 sd/source/ui/animations/CustomAnimationDialog.cxx                 |   34 -
 sd/source/ui/dlg/celltempl.cxx                                    |  116 -----
 sd/source/ui/dlg/celltempl.src                                    |   70 ---
 sd/source/ui/dlg/copydlg.cxx                                      |    8 
 sd/source/ui/dlg/dlgpage.cxx                                      |   16 
 sd/source/ui/dlg/prltempl.cxx                                     |   28 -
 sd/source/ui/dlg/sddlgfact.cxx                                    |    4 
 sd/source/ui/dlg/sddlgfact.hxx                                    |    2 
 sd/source/ui/dlg/tabtempl.cxx                                     |   28 -
 sd/source/ui/dlg/tpaction.cxx                                     |    4 
 sd/source/ui/docshell/docshel3.cxx                                |    7 
 sd/source/ui/docshell/docshell.cxx                                |   12 
 sd/source/ui/func/fuconrec.cxx                                    |    8 
 sd/source/ui/func/fucopy.cxx                                      |    2 
 sd/source/ui/func/fulinend.cxx                                    |   14 
 sd/source/ui/inc/celltempl.hrc                                    |   25 -
 sd/source/ui/inc/celltempl.hxx                                    |   55 --
 sd/source/ui/inc/copydlg.hxx                                      |    7 
 sd/source/ui/inc/dlgpage.hxx                                      |   13 
 sd/source/ui/inc/prltempl.hxx                                     |   18 
 sd/source/ui/inc/tabtempl.hxx                                     |   18 
 sd/source/ui/inc/tpaction.hxx                                     |    2 
 sd/source/ui/unoidl/UnoDocumentSettings.cxx                       |   72 +--
 sd/source/ui/view/drviews6.cxx                                    |    4 
 sd/source/ui/view/drviews9.cxx                                    |   54 +-
 svx/inc/svx/SvxColorValueSet.hxx                                  |    6 
 svx/inc/svx/bmpmask.hxx                                           |    4 
 svx/inc/svx/colrctrl.hxx                                          |    3 
 svx/inc/svx/dlgctrl.hxx                                           |   68 +--
 svx/inc/svx/drawitem.hxx                                          |   78 +--
 svx/inc/svx/fmmodel.hxx                                           |    7 
 svx/inc/svx/fontwork.hxx                                          |    4 
 svx/inc/svx/linectrl.hxx                                          |    3 
 svx/inc/svx/svdmodel.hxx                                          |   71 +--
 svx/inc/svx/svxdlg.hxx                                            |    2 
 svx/inc/svx/xattr.hxx                                             |    1 
 svx/inc/svx/xcolit.hxx                                            |   11 
 svx/inc/svx/xit.hxx                                               |    1 
 svx/inc/svx/xtable.hxx                                            |  169 ++++---
 svx/sdi/svx.sdi                                                   |    2 
 svx/source/dialog/_bmpmask.cxx                                    |   18 
 svx/source/dialog/dlgctrl.cxx                                     |  129 ++---
 svx/source/dialog/fontwork.cxx                                    |   10 
 svx/source/engine3d/float3d.cxx                                   |    2 
 svx/source/form/fmmodel.cxx                                       |   41 -
 svx/source/items/drawitem.cxx                                     |   89 ++-
 svx/source/sidebar/line/LinePropertyPanel.cxx                     |   66 +-
 svx/source/sidebar/line/LinePropertyPanel.hxx                     |    8 
 svx/source/sidebar/tools/ColorControl.cxx                         |   65 +-
 svx/source/svdraw/svdmodel.cxx                                    |  140 +++---
 svx/source/tbxctrls/SvxColorValueSet.cxx                          |    6 
 svx/source/tbxctrls/colrctrl.cxx                                  |   12 
 svx/source/tbxctrls/fillctrl.cxx                                  |   40 -
 svx/source/tbxctrls/linectrl.cxx                                  |   32 -
 svx/source/tbxctrls/tbcontrl.cxx                                  |   32 -
 svx/source/unodraw/XPropertyTable.cxx                             |    4 
 svx/source/unodraw/unoctabl.cxx                                   |   32 -
 svx/source/unodraw/unoshape.cxx                                   |   40 -
 svx/source/xoutdev/xattr.cxx                                      |   29 -
 svx/source/xoutdev/xattrbmp.cxx                                   |    2 
 svx/source/xoutdev/xtabbtmp.cxx                                   |    8 
 svx/source/xoutdev/xtabcolr.cxx                                   |   21 
 svx/source/xoutdev/xtabdash.cxx                                   |  224 ++++------
 svx/source/xoutdev/xtabgrdt.cxx                                   |  156 ++----
 svx/source/xoutdev/xtabhtch.cxx                                   |  174 ++-----
 svx/source/xoutdev/xtable.cxx                                     |  207 +++++++--
 svx/source/xoutdev/xtablend.cxx                                   |  180 +++-----
 sw/source/core/draw/drawdoc.cxx                                   |   24 -
 sw/source/ui/app/docsh2.cxx                                       |    9 
 sw/source/ui/app/docshdrw.cxx                                     |   10 
 sw/source/ui/app/docshini.cxx                                     |    9 
 sw/source/ui/config/optpage.cxx                                   |    6 
 sw/source/ui/misc/pggrid.cxx                                      |    6 
 sw/source/ui/shells/drawdlg.cxx                                   |    3 
 130 files changed, 1965 insertions(+), 2405 deletions(-)

New commits:
commit 5e5dca13097c4d23f4efce9296163ff47e26872e
Author: Armin Le Grand <alg at apache.org>
Date:   Sun Apr 28 10:57:18 2013 +0000

    i122120 Cleanup of XPropertyList and derivates to RefCounted instances, more cleanups

diff --git a/chart2/source/controller/dialogs/dlg_View3D.cxx b/chart2/source/controller/dialogs/dlg_View3D.cxx
index 5f818a6..360ffb7 100644
--- a/chart2/source/controller/dialogs/dlg_View3D.cxx
+++ b/chart2/source/controller/dialogs/dlg_View3D.cxx
@@ -55,7 +55,7 @@ using namespace ::com::sun::star::chart2;
 
 sal_uInt16 View3DDialog::m_nLastPageId = 0;
 
-View3DDialog::View3DDialog(Window* pParent, const uno::Reference< frame::XModel > & xChartModel, XColorList* pColorTable )
+View3DDialog::View3DDialog(Window* pParent, const uno::Reference< frame::XModel > & xChartModel, XColorListSharedPtr aColorTable )
     : TabDialog(pParent,SchResId(DLG_3D_VIEW))
     , m_aTabControl(this,SchResId(TABCTRL))
     , m_aBtnOK(this,SchResId(BTN_OK))
@@ -71,7 +71,7 @@ View3DDialog::View3DDialog(Window* pParent, const uno::Reference< frame::XModel
     uno::Reference< beans::XPropertySet > xSceneProperties( ChartModelHelper::findDiagram( xChartModel ), uno::UNO_QUERY );
     m_pGeometry   = new ThreeD_SceneGeometry_TabPage(&m_aTabControl,xSceneProperties,m_aControllerLocker);
     m_pAppearance = new ThreeD_SceneAppearance_TabPage(&m_aTabControl,xChartModel,m_aControllerLocker);
-    m_pIllumination = new ThreeD_SceneIllumination_TabPage(&m_aTabControl,xSceneProperties,xChartModel,pColorTable);
+    m_pIllumination = new ThreeD_SceneIllumination_TabPage(&m_aTabControl,xSceneProperties,xChartModel,aColorTable);
 
     m_aTabControl.InsertPage( TP_3D_SCENEGEOMETRY, String(SchResId(STR_PAGE_PERSPECTIVE)) );
     m_aTabControl.InsertPage( TP_3D_SCENEAPPEARANCE, String(SchResId(STR_PAGE_APPEARANCE)) );
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index 00f9f5a..9532a80 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -284,7 +284,7 @@ namespace
 ThreeD_SceneIllumination_TabPage::ThreeD_SceneIllumination_TabPage( Window* pWindow
                 , const uno::Reference< beans::XPropertySet > & xSceneProperties
                 , const uno::Reference< frame::XModel >& xChartModel
-                , XColorList* pColorTable )
+                , XColorListSharedPtr aColorTable )
                 : TabPage           ( pWindow, SchResId( TP_3D_SCENEILLUMINATION ) )
                 , m_aFT_LightSource( this, SchResId( FT_LIGHTSOURCE ) )
                 , m_aBtn_Light1( this, SchResId( BTN_LIGHT_1 ), 1 )
@@ -310,10 +310,10 @@ ThreeD_SceneIllumination_TabPage::ThreeD_SceneIllumination_TabPage( Window* pWin
 {
     FreeResource();
 
-    if(pColorTable)
+    if(aColorTable.get())
     {
-        m_aLB_AmbientLight.Fill( pColorTable );
-        m_aLB_LightSource.Fill( pColorTable );
+        m_aLB_AmbientLight.Fill( aColorTable );
+        m_aLB_LightSource.Fill( aColorTable );
     }
     m_aLB_AmbientLight.SetDropDownLineCount(10);
     m_aLB_LightSource.SetDropDownLineCount(10);
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
index 3be1978..b14bffc 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
@@ -79,7 +79,7 @@ public:
         const ::com::sun::star::uno::Reference<
             ::com::sun::star::beans::XPropertySet > & xSceneProperties,
         const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel,
-        XColorList* pColorTable=0 );
+        XColorListSharedPtr aColorTable );
     virtual ~ThreeD_SceneIllumination_TabPage();
 
     // has to be called in case the dialog was closed with OK
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
index 39e0f22..bb4d560 100644
--- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
+++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
@@ -89,41 +89,41 @@ ViewElementListProvider::~ViewElementListProvider()
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 
-XColorList*   ViewElementListProvider::GetColorTable() const
+XColorListSharedPtr ViewElementListProvider::GetColorTable() const
 {
     if(m_pDrawModelWrapper)
-        return m_pDrawModelWrapper->GetColorTable();
-    return NULL;
+        return m_pDrawModelWrapper->GetColorTableFromSdrModel();
+    return XColorListSharedPtr();
 }
-XDashList*     ViewElementListProvider::GetDashList() const
+XDashListSharedPtr ViewElementListProvider::GetDashList() const
 {
     if(m_pDrawModelWrapper)
-        return m_pDrawModelWrapper->GetDashList();
-    return NULL;
+        return m_pDrawModelWrapper->GetDashListFromSdrModel();
+    return XDashListSharedPtr();
 }
-XLineEndList*  ViewElementListProvider::GetLineEndList() const
+XLineEndListSharedPtr ViewElementListProvider::GetLineEndList() const
 {
     if(m_pDrawModelWrapper)
-        return m_pDrawModelWrapper->GetLineEndList();
-    return NULL;
+        return m_pDrawModelWrapper->GetLineEndListFromSdrModel();
+    return XLineEndListSharedPtr();
 }
-XGradientList* ViewElementListProvider::GetGradientList() const
+XGradientListSharedPtr ViewElementListProvider::GetGradientList() const
 {
     if(m_pDrawModelWrapper)
-        return m_pDrawModelWrapper->GetGradientList();
-    return NULL;
+        return m_pDrawModelWrapper->GetGradientListFromSdrModel();
+    return XGradientListSharedPtr();
 }
-XHatchList*    ViewElementListProvider::GetHatchList() const
+XHatchListSharedPtr ViewElementListProvider::GetHatchList() const
 {
     if(m_pDrawModelWrapper)
-        return m_pDrawModelWrapper->GetHatchList();
-    return NULL;
+        return m_pDrawModelWrapper->GetHatchListFromSdrModel();
+    return XHatchListSharedPtr();
 }
-XBitmapList*   ViewElementListProvider::GetBitmapList() const
+XBitmapListSharedPtr ViewElementListProvider::GetBitmapList() const
 {
     if(m_pDrawModelWrapper)
-        return m_pDrawModelWrapper->GetBitmapList();
-    return NULL;
+        return m_pDrawModelWrapper->GetBitmapListFromSdrModel();
+    return XBitmapListSharedPtr();
 }
 
 //-----------------------------------------------------------------------------
diff --git a/chart2/source/controller/inc/ViewElementListProvider.hxx b/chart2/source/controller/inc/ViewElementListProvider.hxx
index 6f9f08d..5b0b6b8 100644
--- a/chart2/source/controller/inc/ViewElementListProvider.hxx
+++ b/chart2/source/controller/inc/ViewElementListProvider.hxx
@@ -41,12 +41,12 @@ public:
     ViewElementListProvider( DrawModelWrapper* pDrawModelWrapper );
     virtual ~ViewElementListProvider();
 
-    XColorList*    GetColorTable() const;
-    XDashList*      GetDashList() const;
-    XLineEndList*   GetLineEndList() const;
-    XGradientList*  GetGradientList() const;
-    XHatchList*     GetHatchList() const;
-    XBitmapList*    GetBitmapList() const;
+    XColorListSharedPtr GetColorTable() const;
+    XDashListSharedPtr GetDashList() const;
+    XLineEndListSharedPtr GetLineEndList() const;
+    XGradientListSharedPtr GetGradientList() const;
+    XHatchListSharedPtr GetHatchList() const;
+    XBitmapListSharedPtr GetBitmapList() const;
 
     //create chartspecific symbols for linecharts
     SdrObjList*     GetSymbolList() const;
diff --git a/chart2/source/controller/inc/dlg_View3D.hxx b/chart2/source/controller/inc/dlg_View3D.hxx
index 1414366..6422379 100644
--- a/chart2/source/controller/inc/dlg_View3D.hxx
+++ b/chart2/source/controller/inc/dlg_View3D.hxx
@@ -52,7 +52,7 @@ class View3DDialog : public TabDialog
 public:
     View3DDialog( Window* pWindow,
                   const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xChartModel,
-                  XColorList* pColorTable=0 );
+                  XColorListSharedPtr aColorTable );
     ~View3DDialog();
 
     // from Dialog (base of TabDialog)
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index 3c0335a..09a6523 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -840,7 +840,7 @@ void SAL_CALL ChartController::executeDispatch_View3D()
         // /--
         //open dialog
         ::vos::OGuard aSolarGuard( Application::GetSolarMutex());
-        View3DDialog aDlg( m_pChartWindow, getModel(), m_pDrawModelWrapper->GetColorTable() );
+        View3DDialog aDlg( m_pChartWindow, getModel(), m_pDrawModelWrapper->GetColorTableFromSdrModel() );
         if( aDlg.Execute() == RET_OK )
             aUndoGuard.commit();
         // \--
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index c560c28..80f927a 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -114,14 +114,14 @@ bool DrawCommandDispatch::isFeatureSupported( const ::rtl::OUString& rCommandURL
 ::basegfx::B2DPolyPolygon getPolygon( sal_uInt16 nResId, SdrModel& rModel )
 {
     ::basegfx::B2DPolyPolygon aReturn;
-    XLineEndList* pLineEndList = rModel.GetLineEndList();
-    if ( pLineEndList )
+    XLineEndListSharedPtr aLineEndList = rModel.GetLineEndListFromSdrModel();
+    if ( aLineEndList.get() )
     {
         String aName( SVX_RES( nResId ) );
-        long nCount = pLineEndList->Count();
+        long nCount = aLineEndList->Count();
         for ( long nIndex = 0; nIndex < nCount; ++nIndex )
         {
-            XLineEndEntry* pEntry = pLineEndList->GetLineEnd( nIndex );
+            XLineEndEntry* pEntry = aLineEndList->GetLineEnd( nIndex );
             if ( pEntry->GetName() == aName )
             {
                 aReturn = pEntry->GetLineEnd();
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index b9463e1..c78527f 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -323,10 +323,7 @@ void ShapeController::executeDispatch_FormatArea()
                     SfxItemPool& rItemPool = pDrawViewWrapper->GetModel()->GetItemPool();
                     SfxItemSet aSet( rItemPool, rItemPool.GetFirstWhich(), rItemPool.GetLastWhich() );
                     const SvxColorTableItem* pColorItem = static_cast< const SvxColorTableItem* >( aSet.GetItem( SID_COLOR_TABLE ) );
-                    if ( pColorItem && pColorItem->GetColorTable() == XColorList::GetStdColorList() )
-                    {
-                        pDlg->DontDeleteColorTable();
-                    }
+
                     if ( pDlg->Execute() == RET_OK )
                     {
                         const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx b/chart2/source/inc/chartview/DrawModelWrapper.hxx
index a2ad838..f03e0f4 100644
--- a/chart2/source/inc/chartview/DrawModelWrapper.hxx
+++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx
@@ -91,12 +91,12 @@ public:
         getUnoModel();
     SdrModel& getSdrModel();
 
-    XColorList*    GetColorTable() const;
-    XDashList*      GetDashList() const;
-    XLineEndList*   GetLineEndList() const;
-    XGradientList*  GetGradientList() const;
-    XHatchList*     GetHatchList() const;
-    XBitmapList*    GetBitmapList() const;
+    XColorListSharedPtr GetColorTableFromSdrModel() const;
+    XDashListSharedPtr GetDashListFromSdrModel() const;
+    XLineEndListSharedPtr GetLineEndListFromSdrModel() const;
+    XGradientListSharedPtr GetGradientListFromSdrModel() const;
+    XHatchListSharedPtr GetHatchListFromSdrModel() const;
+    XBitmapListSharedPtr GetBitmapListFromSdrModel() const;
 
     SdrObject* getNamedSdrObject( const rtl::OUString& rName );
     static SdrObject* getNamedSdrObject( const String& rName, SdrObjList* pObjList );
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx
index 5814ad6..98c99c4 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -334,29 +334,29 @@ const SfxItemPool& DrawModelWrapper::GetItemPool() const
 {
     return this->SdrModel::GetItemPool();
 }
-XColorList* DrawModelWrapper::GetColorTable() const
+XColorListSharedPtr  DrawModelWrapper::GetColorTableFromSdrModel() const
 {
-    return this->SdrModel::GetColorTable();
+    return this->SdrModel::GetColorTableFromSdrModel();
 }
-XDashList* DrawModelWrapper::GetDashList() const
+XDashListSharedPtr DrawModelWrapper::GetDashListFromSdrModel() const
 {
-    return this->SdrModel::GetDashList();
+    return this->SdrModel::GetDashListFromSdrModel();
 }
-XLineEndList* DrawModelWrapper::GetLineEndList() const
+XLineEndListSharedPtr DrawModelWrapper::GetLineEndListFromSdrModel() const
 {
-    return this->SdrModel::GetLineEndList();
+    return this->SdrModel::GetLineEndListFromSdrModel();
 }
-XGradientList* DrawModelWrapper::GetGradientList() const
+XGradientListSharedPtr DrawModelWrapper::GetGradientListFromSdrModel() const
 {
-    return this->SdrModel::GetGradientList();
+    return this->SdrModel::GetGradientListFromSdrModel();
 }
-XHatchList* DrawModelWrapper::GetHatchList() const
+XHatchListSharedPtr DrawModelWrapper::GetHatchListFromSdrModel() const
 {
-    return this->SdrModel::GetHatchList();
+    return this->SdrModel::GetHatchListFromSdrModel();
 }
-XBitmapList* DrawModelWrapper::GetBitmapList() const
+XBitmapListSharedPtr DrawModelWrapper::GetBitmapListFromSdrModel() const
 {
-    return this->SdrModel::GetBitmapList();
+    return this->SdrModel::GetBitmapListFromSdrModel();
 }
 
 SdrObject* DrawModelWrapper::getNamedSdrObject( const rtl::OUString& rName )
diff --git a/cui/source/dialogs/sdrcelldlg.cxx b/cui/source/dialogs/sdrcelldlg.cxx
index bbefdbb..27a4b0a 100644
--- a/cui/source/dialogs/sdrcelldlg.cxx
+++ b/cui/source/dialogs/sdrcelldlg.cxx
@@ -37,10 +37,10 @@
 SvxFormatCellsDialog::SvxFormatCellsDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel )
 : SfxTabDialog        ( pParent, CUI_RES( RID_SVX_FORMAT_CELLS_DLG ), pAttr )
 , mrOutAttrs            ( *pAttr )
-, mpColorTab           ( pModel->GetColorTable() )
-, mpGradientList       ( pModel->GetGradientList() )
-, mpHatchingList       ( pModel->GetHatchList() )
-, mpBitmapList         ( pModel->GetBitmapList() )
+, maColorTab           ( pModel->GetColorTableFromSdrModel() )
+, maGradientList       ( pModel->GetGradientListFromSdrModel() )
+, maHatchingList       ( pModel->GetHatchListFromSdrModel() )
+, maBitmapList         ( pModel->GetBitmapListFromSdrModel() )
 
 {
     FreeResource();
@@ -68,10 +68,10 @@ void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
     switch( nId )
     {
         case RID_SVXPAGE_AREA:
-            ( (SvxAreaTabPage&) rPage ).SetColorTable( mpColorTab );
-            ( (SvxAreaTabPage&) rPage ).SetGradientList( mpGradientList );
-            ( (SvxAreaTabPage&) rPage ).SetHatchingList( mpHatchingList );
-            ( (SvxAreaTabPage&) rPage ).SetBitmapList( mpBitmapList );
+            ( (SvxAreaTabPage&) rPage ).SetColorTable( maColorTab );
+            ( (SvxAreaTabPage&) rPage ).SetGradientList( maGradientList );
+            ( (SvxAreaTabPage&) rPage ).SetHatchingList( maHatchingList );
+            ( (SvxAreaTabPage&) rPage ).SetBitmapList( maBitmapList );
             ( (SvxAreaTabPage&) rPage ).SetPageType( PT_AREA );
             ( (SvxAreaTabPage&) rPage ).SetDlgType( 1 );
             ( (SvxAreaTabPage&) rPage ).SetPos( 0 );
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 030c7ce..b7402d3 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -905,11 +905,6 @@ String AbstractSvxAreaTabDialog_Impl::GetText() const
     return pDlg->GetText();
 }
 
-void AbstractSvxAreaTabDialog_Impl::DontDeleteColorTable()
-{
-    return pDlg->DontDeleteColorTable();
-}
-
 void AbstractSvxPostItDialog_Impl::SetText( const XubString& rStr )
 {
     pDlg->SetText( rStr );
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index d2eefbe..097b62f 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -511,7 +511,6 @@ class AbstractSvxAreaTabDialog_Impl :public AbstractSvxAreaTabDialog
         //From class Window.
     virtual void        SetText( const XubString& rStr );
     virtual String      GetText() const;
-    virtual void     DontDeleteColorTable() ;
 };
 //add for SvxAreaTabDialog end
 
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 421c234..bcc777f 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 163418c..26f2f8a 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 fd17127..d074c3b 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 ae85d94..0111273 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);
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index d920d52..59653ef 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -73,7 +73,7 @@ SvxDefaultColorOptPage::SvxDefaultColorOptPage( Window* pParent, const SfxItemSe
     aValSetColorBox.Show();
 
     pChartOptions = new SvxChartOptions;
-    pColorTab = new XColorList( SvtPathOptions().GetPalettePath() );
+    maColorTab = XPropertyListFactory::CreateSharedXColorList(SvtPathOptions().GetPalettePath());
 
     const SfxPoolItem* pItem = NULL;
     if ( rInAttrs.GetItemState( SID_SCH_EDITOPTIONS, sal_False, &pItem ) == SFX_ITEM_SET )
@@ -98,7 +98,6 @@ SvxDefaultColorOptPage::~SvxDefaultColorOptPage()
     pChartOptions->Commit();
 
     delete pColorConfig;
-    delete pColorTab;
     delete pChartOptions;
 }
 
@@ -135,14 +134,14 @@ void __EXPORT SvxDefaultColorOptPage::Reset( const SfxItemSet& )
 
 void SvxDefaultColorOptPage::FillColorBox()
 {
-    if( !pColorTab ) return;
+    if( !maColorTab.get() ) return;
 
-    long nCount = pColorTab->Count();
+    long nCount = maColorTab->Count();
     XColorEntry* pColorEntry;
 
     for( long i = 0; i < nCount; i++ )
     {
-        pColorEntry = pColorTab->GetColor( i );
+        pColorEntry = maColorTab->GetColor( i );
         aValSetColorBox.InsertItem( (sal_uInt16) i + 1, pColorEntry->GetColor(), pColorEntry->GetName() );
     }
 }
@@ -150,16 +149,16 @@ void SvxDefaultColorOptPage::FillColorBox()
 
 long SvxDefaultColorOptPage::GetColorIndex( const Color& rCol )
 {
-    if( pColorTab )
+    if( maColorTab.get() )
     {
-        long nCount = pColorTab->Count();
+        long nCount = maColorTab->Count();
         XColorEntry* pColorEntry;
 
         for( long i = nCount - 1; i >= 0; i-- )         // default chart colors are at the end of the table
         {
-            pColorEntry = pColorTab->GetColor( i );
+            pColorEntry = maColorTab->GetColor( i );
             if( pColorEntry && pColorEntry->GetColor() == rCol )
-                return SAL_STATIC_CAST( XPropertyList*, pColorTab )->Get( pColorEntry->GetName() );
+                return maColorTab->GetIndex( pColorEntry->GetName() );
         }
     }
     return -1L;
diff --git a/cui/source/options/optchart.hxx b/cui/source/options/optchart.hxx
index 54b01d0..70fc09f 100644
--- a/cui/source/options/optchart.hxx
+++ b/cui/source/options/optchart.hxx
@@ -61,7 +61,7 @@ private:
 
     SvxChartOptions*        pChartOptions;
     SvxChartColorTableItem* pColorConfig;
-    XColorList*         pColorTab;
+    XColorListSharedPtr     maColorTab;
 
     DECL_LINK( ResetToDefaults, void * );
     DECL_LINK( ListClickedHdl, ChartColorLB * );
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 7333228..ec89f7b 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -945,11 +945,11 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe
         }
     }
 
-    XColorList aColorTable( SvtPathOptions().GetPalettePath() );
+    XColorListSharedPtr aColorTable(XPropertyListFactory::CreateSharedXColorList(SvtPathOptions().GetPalettePath()));
     aColorBoxes[0]->InsertAutomaticEntry();
-    for( sal_Int32 i = 0; i < aColorTable.Count(); i++ )
+    for( sal_Int32 i = 0; i < aColorTable->Count(); i++ )
     {
-        XColorEntry* pEntry = aColorTable.GetColor(i);
+        XColorEntry* pEntry = aColorTable->GetColor(i);
         aColorBoxes[0]->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
     }
 
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index ab0ad2f..8928896 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -561,7 +561,7 @@ sal_Bool OfaOptionsTreeListBox::Collapse( SvLBoxEntry* pParent )
     sNotLoadedError     (       CUI_RES( ST_LOAD_ERROR ) ),\
     pCurrentPageEntry   ( NULL ),\
     pColorPageItemSet   ( NULL ),\
-    pColorTab           ( NULL ),\
+    maColorTab           (),\
     nChangeType         ( CT_NONE ),\
     nUnknownType        ( COLORPAGE_UNKNOWN ),\
     nUnknownPos         ( COLORPAGE_UNKNOWN ),\
@@ -1201,13 +1201,13 @@ IMPL_LINK( OfaTreeOptionsDialog, SelectHdl_Impl, Timer*, EMPTYARG )
                 pPageInfo->m_pPage = ::CreateGeneralTabPage(
                     pPageInfo->m_nPageId, this, *pColorPageItemSet );
                 SvxColorTabPage& rColPage = *(SvxColorTabPage*)pPageInfo->m_pPage;
-                const OfaPtrItem* pPtr = NULL;
+                const SvxColorTableItem* pPtr = NULL;
                 if ( SfxViewFrame::Current() && SfxViewFrame::Current()->GetDispatcher() )
-                    pPtr = (const OfaPtrItem*)SfxViewFrame::Current()->
-                        GetDispatcher()->Execute( SID_GET_COLORTABLE, SFX_CALLMODE_SYNCHRON );
-                pColorTab = pPtr ? (XColorList*)pPtr->GetValue() : XColorList::GetStdColorList();
+                    pPtr = dynamic_cast< const SvxColorTableItem* >(SfxViewFrame::Current()->
+                        GetDispatcher()->Execute(SID_GET_COLORTABLE, SFX_CALLMODE_SYNCHRON));
+                maColorTab = pPtr ? pPtr->GetColorTable() : XColorList::GetStdColorList();
 
-                rColPage.SetColorTable( pColorTab );
+                rColPage.SetColorTable( maColorTab );
                 rColPage.SetPageType( &nUnknownType );
                 rColPage.SetDlgType( &nUnknownType );
                 rColPage.SetPos( &nUnknownPos );
@@ -2637,14 +2637,15 @@ short OfaTreeOptionsDialog::Execute()
             // notify current viewframe it it uses the same color table
             if ( SfxViewFrame::Current() && SfxViewFrame::Current()->GetDispatcher() )
             {
-                const OfaPtrItem* pPtr = (const OfaPtrItem*)SfxViewFrame::Current()->GetDispatcher()->Execute( SID_GET_COLORTABLE, SFX_CALLMODE_SYNCHRON );
+                const SvxColorTableItem* pPtr = dynamic_cast< const SvxColorTableItem* >(
+                    SfxViewFrame::Current()->GetDispatcher()->Execute(SID_GET_COLORTABLE, SFX_CALLMODE_SYNCHRON));
                 if( pPtr )
                 {
-                    XColorList* _pColorTab = (XColorList*)pPtr->GetValue();
+                    XColorListSharedPtr aColorTab = pPtr->GetColorTable();
 
-                    if( _pColorTab &&
-                        _pColorTab->GetPath() == GetColorTable()->GetPath() &&
-                        _pColorTab->GetName() == GetColorTable()->GetName() )
+                    if( aColorTab &&
+                        aColorTab->GetPath() == GetColorTable()->GetPath() &&
+                        aColorTab->GetName() == GetColorTable()->GetName() )
                         SfxObjectShell::Current()->PutItem( SvxColorTableItem( GetColorTable(), SID_COLOR_TABLE ) );
                 }
             }
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index ba5d7a3..22e844e 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1197,31 +1197,24 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl()
 {
     SfxObjectShell* pDocSh = SfxObjectShell::Current();
     const SfxPoolItem* pItem = NULL;
-    XColorList* pColorTable = NULL;
-    bool bOwn(false);
+    XColorListSharedPtr aColorTable;
     long nColorCount(0);
 
     if ( pDocSh && ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) ) )
     {
-        pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+        aColorTable = dynamic_cast< const SvxColorTableItem* >(pItem)->GetColorTable();
     }
 
-    if ( !pColorTable )
+    if ( !aColorTable.get() )
     {
-        bOwn = true;
-        pColorTable = new XColorList( SvtPathOptions().GetPalettePath() );
+        aColorTable = XPropertyListFactory::CreateSharedXColorList(SvtPathOptions().GetPalettePath());
     }
 
-    if ( pColorTable )
+    if ( aColorTable.get() )
     {
-        nColorCount = pColorTable->Count();
+        nColorCount = aColorTable->Count();
         aBackgroundColorSet.Clear();
-        aBackgroundColorSet.addEntriesForXColorList(*pColorTable);
-
-        if(bOwn)
-        {
-            delete pColorTable;
-        }
+        aBackgroundColorSet.addEntriesForXColorList(aColorTable);
     }
 
     const WinBits nBits(aBackgroundColorSet.GetStyle() | WB_ITEMBORDER | WB_NAMEFIELD | WB_NONEFIELD);
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index cac29ed..484b130 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -338,7 +338,7 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent,
     // ColorBox aus der XColorList fuellen.
     SfxObjectShell*     pDocSh      = SfxObjectShell::Current();
     const SfxPoolItem*  pItem       = NULL;
-    XColorList*     pColorTable = NULL;
+    XColorListSharedPtr aColorTable;
 
     DBG_ASSERT( pDocSh, "DocShell not found!" );
 
@@ -346,19 +346,19 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent,
     {
         pItem = pDocSh->GetItem( SID_COLOR_TABLE );
         if ( pItem != NULL )
-            pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+            aColorTable = static_cast< const SvxColorTableItem* >(pItem)->GetColorTable();
     }
 
-    DBG_ASSERT( pColorTable, "ColorTable not found!" );
+    DBG_ASSERT( aColorTable.get(), "ColorTable not found!" );
 
-    if ( pColorTable )
+    if ( aColorTable.get() )
     {
         // fuellen der Linienfarben-Box
         aLbLineColor.SetUpdateMode( sal_False );
 
-        for ( long i = 0; i < pColorTable->Count(); ++i )
+        for ( long i = 0; i < aColorTable->Count(); ++i )
         {
-            XColorEntry* pEntry = pColorTable->GetColor(i);
+            XColorEntry* pEntry = aColorTable->GetColor(i);
             aLbLineColor.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
         }
         aLbLineColor.SetUpdateMode( sal_True );
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 18bc038..d48f944 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -715,21 +715,19 @@ void SvxCharNamePage::Initialize()
     // fill the color box
     SfxObjectShell* pDocSh = SfxObjectShell::Current();
     //DBG_ASSERT( pDocSh, "DocShell not found!" );
-    XColorList* pColorTable = NULL;
-    FASTBOOL bKillTable = sal_False;
+    XColorListSharedPtr aColorTable;
     const SfxPoolItem* pItem = NULL;
 
     if ( pDocSh )
     {
         pItem = pDocSh->GetItem( SID_COLOR_TABLE );
         if ( pItem != NULL )
-            pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+            aColorTable = static_cast< const SvxColorTableItem* >(pItem)->GetColorTable();
     }
 
-    if ( !pColorTable )
+    if ( !aColorTable.get() )
     {
-        pColorTable = new XColorList( SvtPathOptions().GetPalettePath() );
-        bKillTable = sal_True;
+        aColorTable = XPropertyListFactory::CreateSharedXColorList(SvtPathOptions().GetPalettePath());
     }
 
     m_pColorLB->SetUpdateMode( sal_False );
@@ -742,17 +740,14 @@ void SvxCharNamePage::Initialize()
             m_pColorLB->InsertEntry( Color( COL_AUTO ),
                                      SVX_RESSTR( RID_SVXSTR_AUTOMATIC ));
     }
-    for ( long i = 0; i < pColorTable->Count(); i++ )
+
+    for ( long i = 0; i < aColorTable->Count(); i++ )
     {
-        XColorEntry* pEntry = pColorTable->GetColor(i);
+        XColorEntry* pEntry = aColorTable->GetColor(i);
         m_pColorLB->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
     }
 
     m_pColorLB->SetUpdateMode( sal_True );
-
-    if ( bKillTable )
-        delete pColorTable;
-
     m_pColorLB->SetSelectHdl( LINK( this, SvxCharNamePage, ColorBoxSelectHdl_Impl ) );
 
     Link aLink = LINK( this, SvxCharNamePage, FontModifyHdl_Impl );
@@ -1787,20 +1782,18 @@ void SvxCharEffectsPage::Initialize()
     // fill the color box
     SfxObjectShell* pDocSh = SfxObjectShell::Current();
     DBG_ASSERT( pDocSh, "DocShell not found!" );
-    XColorList* pColorTable = NULL;
-    FASTBOOL bKillTable = sal_False;
+    XColorListSharedPtr aColorTable;
 
     if ( pDocSh )
     {
         pItem = pDocSh->GetItem( SID_COLOR_TABLE );
         if ( pItem != NULL )
-            pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+            aColorTable = static_cast< const SvxColorTableItem* >(pItem)->GetColorTable();
     }
 
-    if ( !pColorTable )
+    if ( !aColorTable.get() )
     {
-        pColorTable = new XColorList( SvtPathOptions().GetPalettePath() );
-        bKillTable = sal_True;
+        aColorTable = XPropertyListFactory::CreateSharedXColorList(SvtPathOptions().GetPalettePath());
     }
 
     m_aUnderlineColorLB.SetUpdateMode( sal_False );
@@ -1818,9 +1811,9 @@ void SvxCharEffectsPage::Initialize()
             m_aFontColorLB.InsertAutomaticEntry();
         }
     }
-    for ( long i = 0; i < pColorTable->Count(); i++ )
+    for ( long i = 0; i < aColorTable->Count(); i++ )
     {
-        XColorEntry* pEntry = pColorTable->GetColor(i);
+        XColorEntry* pEntry = aColorTable->GetColor(i);
         m_aUnderlineColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
         m_aOverlineColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
         m_aFontColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
@@ -1831,9 +1824,6 @@ void SvxCharEffectsPage::Initialize()
     m_aFontColorLB.SetUpdateMode( sal_True );
     m_aFontColorLB.SetSelectHdl( LINK( this, SvxCharEffectsPage, ColorBoxSelectHdl_Impl ) );
 
-    if ( bKillTable )
-        delete pColorTable;
-
     // handler
     Link aLink = LINK( this, SvxCharEffectsPage, SelectHdl_Impl );
     m_aUnderlineLB.SetSelectHdl( aLink );
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index f6d63fe..9476505 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1609,31 +1609,27 @@ void    SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
     {
         SfxObjectShell* pDocSh = SfxObjectShell::Current();
         DBG_ASSERT( pDocSh, "DocShell not found!" );
-        XColorList* pColorTable = NULL;
-        FASTBOOL bKillTable = sal_False;
+        XColorListSharedPtr aColorTable;
+
         if ( pDocSh )
         {
             pItem = pDocSh->GetItem( SID_COLOR_TABLE );
             if ( pItem )
-                pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+                aColorTable = static_cast< const SvxColorTableItem* >(pItem)->GetColorTable();
         }
 
-        if ( !pColorTable )
+        if ( !aColorTable.get() )
         {
-            pColorTable = new XColorList( SvtPathOptions().GetPalettePath() );
-            bKillTable = sal_True;
+            aColorTable = XPropertyListFactory::CreateSharedXColorList(SvtPathOptions().GetPalettePath());
         }
 
            aBulColLB.InsertEntry( Color( COL_AUTO ), SVX_RESSTR( RID_SVXSTR_AUTOMATIC ));
 
-        for ( long i = 0; i < pColorTable->Count(); i++ )
+        for ( long i = 0; i < aColorTable->Count(); i++ )
         {
-            XColorEntry* pEntry = pColorTable->GetColor(i);
+            XColorEntry* pEntry = aColorTable->GetColor(i);
             aBulColLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
         }
-
-        if ( bKillTable )
-            delete pColorTable;
     }
 
     SfxObjectShell* pShell;
diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx
index a7cea69..7fc75eb 100644
--- a/cui/source/tabpages/tabarea.cxx
+++ b/cui/source/tabpages/tabarea.cxx
@@ -68,15 +68,14 @@ SvxAreaTabDialog::SvxAreaTabDialog
     SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_AREA ), pAttr ),
 
     mpDrawModel          ( pModel ),
-//    mpView               ( pSdrView ),
-    mpColorTab           ( pModel->GetColorTable() ),
-    mpNewColorTab        ( pModel->GetColorTable() ),
-    mpGradientList       ( pModel->GetGradientList() ),
-    mpNewGradientList    ( pModel->GetGradientList() ),
-    mpHatchingList       ( pModel->GetHatchList() ),
-    mpNewHatchingList    ( pModel->GetHatchList() ),
-    mpBitmapList         ( pModel->GetBitmapList() ),
-    mpNewBitmapList      ( pModel->GetBitmapList() ),
+    maColorTab           ( pModel->GetColorTableFromSdrModel() ),
+    maNewColorTab        ( pModel->GetColorTableFromSdrModel() ),
+    maGradientList       ( pModel->GetGradientListFromSdrModel() ),
+    maNewGradientList    ( pModel->GetGradientListFromSdrModel() ),
+    maHatchingList       ( pModel->GetHatchListFromSdrModel() ),
+    maNewHatchingList    ( pModel->GetHatchListFromSdrModel() ),
+    maBitmapList         ( pModel->GetBitmapListFromSdrModel() ),
+    maNewBitmapList      ( pModel->GetBitmapListFromSdrModel() ),
     mrOutAttrs           ( *pAttr ),
     mnColorTableState ( CT_NONE ),
     mnBitmapListState ( CT_NONE ),
@@ -85,8 +84,7 @@ SvxAreaTabDialog::SvxAreaTabDialog
     mnPageType( PT_AREA ),
     mnDlgType( 0 ),
     mnPos( 0 ),
-    mbAreaTP( sal_False ),
-    mbDeleteColorTable( sal_True )
+    mbAreaTP( sal_False )
 {
     FreeResource();
 
@@ -124,58 +122,53 @@ void SvxAreaTabDialog::SavePalettes()
         if ( xModel.is() )
             xDispatchProvider.set(xModel->getCurrentController(),uno::UNO_QUERY);
     }*/
-    if( mpNewColorTab != mpDrawModel->GetColorTable() )
+    if( maNewColorTab != mpDrawModel->GetColorTableFromSdrModel() )
     {
-        if(mbDeleteColorTable)
-            delete mpDrawModel->GetColorTable();
-        mpDrawModel->SetColorTable( mpNewColorTab );
-        SvxColorTableItem aColorTableItem( mpNewColorTab, SID_COLOR_TABLE );
+        mpDrawModel->SetColorTableAtSdrModel( maNewColorTab );
+        SvxColorTableItem aColorTableItem( maNewColorTab, SID_COLOR_TABLE );
         if ( pShell )
             pShell->PutItem( aColorTableItem );
         else
         {
             mpDrawModel->GetItemPool().Put(aColorTableItem,SID_COLOR_TABLE);
         }
-        mpColorTab = mpDrawModel->GetColorTable();
+        maColorTab = mpDrawModel->GetColorTableFromSdrModel();
     }
-    if( mpNewGradientList != mpDrawModel->GetGradientList() )
+    if( maNewGradientList != mpDrawModel->GetGradientListFromSdrModel() )
     {
-        delete mpDrawModel->GetGradientList();
-        mpDrawModel->SetGradientList( mpNewGradientList );
-        SvxGradientListItem aItem( mpNewGradientList, SID_GRADIENT_LIST );
+        mpDrawModel->SetGradientListAtSdrModel( maNewGradientList );
+        SvxGradientListItem aItem( maNewGradientList, SID_GRADIENT_LIST );
         if ( pShell )
             pShell->PutItem( aItem );
         else
         {
             mpDrawModel->GetItemPool().Put(aItem,SID_GRADIENT_LIST);
         }
-        mpGradientList = mpDrawModel->GetGradientList();
+        maGradientList = mpDrawModel->GetGradientListFromSdrModel();
     }
-    if( mpNewHatchingList != mpDrawModel->GetHatchList() )
+    if( maNewHatchingList != mpDrawModel->GetHatchListFromSdrModel() )
     {
-        delete mpDrawModel->GetHatchList();
-        mpDrawModel->SetHatchList( mpNewHatchingList );
-        SvxHatchListItem aItem( mpNewHatchingList, SID_HATCH_LIST );
+        mpDrawModel->SetHatchListAtSdrModel( maNewHatchingList );
+        SvxHatchListItem aItem( maNewHatchingList, SID_HATCH_LIST );
         if ( pShell )
             pShell->PutItem( aItem );
         else
         {
             mpDrawModel->GetItemPool().Put(aItem,SID_HATCH_LIST);
         }
-        mpHatchingList = mpDrawModel->GetHatchList();
+        maHatchingList = mpDrawModel->GetHatchListFromSdrModel();
     }
-    if( mpNewBitmapList != mpDrawModel->GetBitmapList() )
+    if( maNewBitmapList != mpDrawModel->GetBitmapListFromSdrModel() )
     {
-        delete mpDrawModel->GetBitmapList();
-        mpDrawModel->SetBitmapList( mpNewBitmapList );
-        SvxBitmapListItem aItem( mpNewBitmapList, SID_BITMAP_LIST );
+        mpDrawModel->SetBitmapListAtSdrModel( maNewBitmapList );
+        SvxBitmapListItem aItem( maNewBitmapList, SID_BITMAP_LIST );
         if ( pShell )
             pShell->PutItem( aItem );
         else
         {
             mpDrawModel->GetItemPool().Put(aItem,SID_BITMAP_LIST);
         }
-        mpBitmapList = mpDrawModel->GetBitmapList();
+        maBitmapList = mpDrawModel->GetBitmapListFromSdrModel();
     }
 
     // Speichern der Tabellen, wenn sie geaendert wurden.
@@ -184,10 +177,10 @@ void SvxAreaTabDialog::SavePalettes()
 
     if( mnHatchingListState & CT_MODIFIED )
     {
-        mpHatchingList->SetPath( aPath );
-        mpHatchingList->Save();
+        maHatchingList->SetPath( aPath );
+        maHatchingList->Save();
 
-        SvxHatchListItem aItem( mpHatchingList, SID_HATCH_LIST );
+        SvxHatchListItem aItem( maHatchingList, SID_HATCH_LIST );
         // ToolBoxControls werden benachrichtigt:
         if ( pShell )
             pShell->PutItem( aItem );
@@ -199,10 +192,10 @@ void SvxAreaTabDialog::SavePalettes()
 
     if( mnBitmapListState & CT_MODIFIED )
     {
-        mpBitmapList->SetPath( aPath );
-        mpBitmapList->Save();
+        maBitmapList->SetPath( aPath );
+        maBitmapList->Save();
 
-        SvxBitmapListItem aItem( mpBitmapList, SID_BITMAP_LIST );
+        SvxBitmapListItem aItem( maBitmapList, SID_BITMAP_LIST );
         // ToolBoxControls werden benachrichtigt:
         if ( pShell )
             pShell->PutItem( aItem );
@@ -214,10 +207,10 @@ void SvxAreaTabDialog::SavePalettes()
 
     if( mnGradientListState & CT_MODIFIED )
     {
-        mpGradientList->SetPath( aPath );
-        mpGradientList->Save();
+        maGradientList->SetPath( aPath );
+        maGradientList->Save();
 
-        SvxGradientListItem aItem( mpGradientList, SID_GRADIENT_LIST );
+        SvxGradientListItem aItem( maGradientList, SID_GRADIENT_LIST );
         // ToolBoxControls werden benachrichtigt:
         if ( pShell )
             pShell->PutItem( aItem );
@@ -229,10 +222,10 @@ void SvxAreaTabDialog::SavePalettes()
 
     if( mnColorTableState & CT_MODIFIED )
     {
-        mpColorTab->SetPath( aPath );
-        mpColorTab->Save();
+        maColorTab->SetPath( aPath );
+        maColorTab->Save();
 
-        SvxColorTableItem aItem( mpColorTab, SID_COLOR_TABLE );
+        SvxColorTableItem aItem( maColorTab, SID_COLOR_TABLE );
         // ToolBoxControls werden benachrichtigt:
         if ( pShell )
             pShell->PutItem( aItem );
@@ -272,10 +265,10 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
     switch( nId )
     {
         case RID_SVXPAGE_AREA:
-            ( (SvxAreaTabPage&) rPage ).SetColorTable( mpColorTab );
-            ( (SvxAreaTabPage&) rPage ).SetGradientList( mpGradientList );
-            ( (SvxAreaTabPage&) rPage ).SetHatchingList( mpHatchingList );
-            ( (SvxAreaTabPage&) rPage ).SetBitmapList( mpBitmapList );
+            ( (SvxAreaTabPage&) rPage ).SetColorTable( maColorTab );
+            ( (SvxAreaTabPage&) rPage ).SetGradientList( maGradientList );
+            ( (SvxAreaTabPage&) rPage ).SetHatchingList( maHatchingList );
+            ( (SvxAreaTabPage&) rPage ).SetBitmapList( maBitmapList );
             //CHINA001 ( (SvxAreaTabPage&) rPage ).SetPageType( &mnPageType );
             ( (SvxAreaTabPage&) rPage ).SetPageType( mnPageType ); //add CHINA001
             //CHINA001 ( (SvxAreaTabPage&) rPage ).SetDlgType( &mnDlgType );
@@ -295,7 +288,7 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
 
         case RID_SVXPAGE_SHADOW:
         {
-            ( (SvxShadowTabPage&) rPage ).SetColorTable( mpColorTab );
+            ( (SvxShadowTabPage&) rPage ).SetColorTable( maColorTab );
             ( (SvxShadowTabPage&) rPage ).SetPageType( mnPageType );//CHINA001 ( (SvxShadowTabPage&) rPage ).SetPageType( &mnPageType );
             ( (SvxShadowTabPage&) rPage ).SetDlgType( mnDlgType );//CHINA001 ( (SvxShadowTabPage&) rPage ).SetDlgType( &mnDlgType );
             //( (SvxShadowTabPage&) rPage ).SetPos( &nPos );
@@ -306,8 +299,8 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
         break;
 
         case RID_SVXPAGE_GRADIENT:
-            ( (SvxGradientTabPage&) rPage ).SetColorTable( mpColorTab );
-            ( (SvxGradientTabPage&) rPage ).SetGradientList( mpGradientList );
+            ( (SvxGradientTabPage&) rPage ).SetColorTable( maColorTab );
+            ( (SvxGradientTabPage&) rPage ).SetGradientList( maGradientList );
             ( (SvxGradientTabPage&) rPage ).SetPageType( &mnPageType );
             ( (SvxGradientTabPage&) rPage ).SetDlgType( &mnDlgType );
             ( (SvxGradientTabPage&) rPage ).SetPos( &mnPos );
@@ -318,8 +311,8 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
         break;
 
         case RID_SVXPAGE_HATCH:
-            ( (SvxHatchTabPage&) rPage ).SetColorTable( mpColorTab );
-            ( (SvxHatchTabPage&) rPage ).SetHatchingList( mpHatchingList );
+            ( (SvxHatchTabPage&) rPage ).SetColorTable( maColorTab );
+            ( (SvxHatchTabPage&) rPage ).SetHatchingList( maHatchingList );
             ( (SvxHatchTabPage&) rPage ).SetPageType( &mnPageType );
             ( (SvxHatchTabPage&) rPage ).SetDlgType( &mnDlgType );
             ( (SvxHatchTabPage&) rPage ).SetPos( &mnPos );
@@ -330,8 +323,8 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
         break;
 
         case RID_SVXPAGE_BITMAP:
-            ( (SvxBitmapTabPage&) rPage ).SetColorTable( mpColorTab );
-            ( (SvxBitmapTabPage&) rPage ).SetBitmapList( mpBitmapList );
+            ( (SvxBitmapTabPage&) rPage ).SetColorTable( maColorTab );
+            ( (SvxBitmapTabPage&) rPage ).SetBitmapList( maBitmapList );
             ( (SvxBitmapTabPage&) rPage ).SetPageType( &mnPageType );
             ( (SvxBitmapTabPage&) rPage ).SetDlgType( &mnDlgType );
             ( (SvxBitmapTabPage&) rPage ).SetPos( &mnPos );
@@ -342,13 +335,12 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
         break;
 
         case RID_SVXPAGE_COLOR:
-            ( (SvxColorTabPage&) rPage ).SetColorTable( mpColorTab );
+            ( (SvxColorTabPage&) rPage ).SetColorTable( maColorTab );
             ( (SvxColorTabPage&) rPage ).SetPageType( &mnPageType );
             ( (SvxColorTabPage&) rPage ).SetDlgType( &mnDlgType );
             ( (SvxColorTabPage&) rPage ).SetPos( &mnPos );
             ( (SvxColorTabPage&) rPage ).SetAreaTP( &mbAreaTP );
             ( (SvxColorTabPage&) rPage ).SetColorChgd( &mnColorTableState );
-            ( (SvxColorTabPage&) rPage ).SetDeleteColorTable( mbDeleteColorTable );
             ( (SvxColorTabPage&) rPage ).Construct();
         break;
 
diff --git a/cui/source/tabpages/tabline.cxx b/cui/source/tabpages/tabline.cxx
index 0224fd4..6c68f24 100644
--- a/cui/source/tabpages/tabline.cxx
+++ b/cui/source/tabpages/tabline.cxx
@@ -70,12 +70,12 @@ SvxLineTabDialog::SvxLineTabDialog
     pDrawModel      ( pModel ),
     pObj            ( pSdrObj ),
     rOutAttrs       ( *pAttr ),
-    pColorTab       ( pModel->GetColorTable() ),
-    mpNewColorTab   ( pModel->GetColorTable() ),
-    pDashList       ( pModel->GetDashList() ),
-    pNewDashList    ( pModel->GetDashList() ),
-    pLineEndList    ( pModel->GetLineEndList() ),
-    pNewLineEndList ( pModel->GetLineEndList() ),
+    maColorTab      ( pModel->GetColorTableFromSdrModel() ),
+    maNewColorTab   ( pModel->GetColorTableFromSdrModel() ),
+    maDashList      ( pModel->GetDashListFromSdrModel() ),
+    maNewDashList   ( pModel->GetDashListFromSdrModel() ),
+    maLineEndList   ( pModel->GetLineEndListFromSdrModel() ),
+    maNewLineEndList( pModel->GetLineEndListFromSdrModel() ),
     bObjSelected    ( bHasObj ),
     nLineEndListState( CT_NONE ),
     nDashListState( CT_NONE ),
@@ -86,8 +86,7 @@ SvxLineTabDialog::SvxLineTabDialog
     nPosDashLb( 0 ),
     nPosLineEndLb( 0 ),
     mnPos( 0 ),
-    mbAreaTP( sal_False ),
-    mbDeleteColorTable( sal_True )
+    mbAreaTP( sal_False )
 {
     FreeResource();
 
@@ -138,30 +137,26 @@ SvxLineTabDialog::~SvxLineTabDialog()
 void SvxLineTabDialog::SavePalettes()
 {
     SfxObjectShell* pShell = SfxObjectShell::Current();
-    if( mpNewColorTab != pDrawModel->GetColorTable() )
+    if( maNewColorTab != pDrawModel->GetColorTableFromSdrModel() )
     {
-        if(mbDeleteColorTable)
-            delete pDrawModel->GetColorTable();
-        pDrawModel->SetColorTable( mpNewColorTab );
+        pDrawModel->SetColorTableAtSdrModel( maNewColorTab );
         if ( pShell )
-            pShell->PutItem( SvxColorTableItem( mpNewColorTab, SID_COLOR_TABLE ) );
-        pColorTab = pDrawModel->GetColorTable();
+            pShell->PutItem( SvxColorTableItem( maNewColorTab, SID_COLOR_TABLE ) );
+        maColorTab = pDrawModel->GetColorTableFromSdrModel();
     }
-    if( pNewDashList != pDrawModel->GetDashList() )
+    if( maNewDashList != pDrawModel->GetDashListFromSdrModel() )
     {
-        delete pDrawModel->GetDashList();
-        pDrawModel->SetDashList( pNewDashList );
+        pDrawModel->SetDashListAtSdrModel( maNewDashList );
         if ( pShell )
-            pShell->PutItem( SvxDashListItem( pNewDashList, SID_DASH_LIST ) );
-        pDashList = pDrawModel->GetDashList();
+            pShell->PutItem( SvxDashListItem( maNewDashList, SID_DASH_LIST ) );
+        maDashList = pDrawModel->GetDashListFromSdrModel();
     }
-    if( pNewLineEndList != pDrawModel->GetLineEndList() )
+    if( maNewLineEndList != pDrawModel->GetLineEndListFromSdrModel() )
     {
-        delete pDrawModel->GetLineEndList();
-        pDrawModel->SetLineEndList( pNewLineEndList );
+        pDrawModel->SetLineEndListAtSdrModel( maNewLineEndList );
         if ( pShell )
-            pShell->PutItem( SvxLineEndListItem( pNewLineEndList, SID_LINEEND_LIST ) );
-        pLineEndList = pDrawModel->GetLineEndList();
+            pShell->PutItem( SvxLineEndListItem( maNewLineEndList, SID_LINEEND_LIST ) );
+        maLineEndList = pDrawModel->GetLineEndListFromSdrModel();
     }
 
     // Speichern der Tabellen, wenn sie geaendert wurden.
@@ -170,32 +165,32 @@ void SvxLineTabDialog::SavePalettes()
 
     if( nDashListState & CT_MODIFIED )
     {
-        pDashList->SetPath( aPath );
-        pDashList->Save();
+        maDashList->SetPath( aPath );
+        maDashList->Save();
 
         // ToolBoxControls werden benachrichtigt:
         if ( pShell )
-            pShell->PutItem( SvxDashListItem( pDashList, SID_DASH_LIST ) );
+            pShell->PutItem( SvxDashListItem( maDashList, SID_DASH_LIST ) );
     }
 
     if( nLineEndListState & CT_MODIFIED )
     {
-        pLineEndList->SetPath( aPath );
-        pLineEndList->Save();
+        maLineEndList->SetPath( aPath );
+        maLineEndList->Save();
 
         // ToolBoxControls werden benachrichtigt:
         if ( pShell )
-            pShell->PutItem( SvxLineEndListItem( pLineEndList, SID_LINEEND_LIST ) );
+            pShell->PutItem( SvxLineEndListItem( maLineEndList, SID_LINEEND_LIST ) );
     }
 
     if( mnColorTableState & CT_MODIFIED )
     {
-        pColorTab->SetPath( aPath );
-        pColorTab->Save();
+        maColorTab->SetPath( aPath );
+        maColorTab->Save();
 
         // ToolBoxControls werden benachrichtigt:
         if ( pShell )
-            pShell->PutItem( SvxColorTableItem( pColorTab, SID_COLOR_TABLE ) );
+            pShell->PutItem( SvxColorTableItem( maColorTab, SID_COLOR_TABLE ) );
     }
 }
 
@@ -229,9 +224,9 @@ void SvxLineTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
     switch( nId )
     {
         case RID_SVXPAGE_LINE:
-            ( (SvxLineTabPage&) rPage ).SetColorTable( pColorTab );
-            ( (SvxLineTabPage&) rPage ).SetDashList( pDashList );
-            ( (SvxLineTabPage&) rPage ).SetLineEndList( pLineEndList );
+            ( (SvxLineTabPage&) rPage ).SetColorTable( maColorTab );
+            ( (SvxLineTabPage&) rPage ).SetDashList( maDashList );
+            ( (SvxLineTabPage&) rPage ).SetLineEndList( maLineEndList );
             ( (SvxLineTabPage&) rPage ).SetDlgType( nDlgType );//CHINA001 ( (SvxLineTabPage&) rPage ).SetDlgType( &nDlgType );
             ( (SvxLineTabPage&) rPage ).SetPageType( nPageType );//CHINA001 ( (SvxLineTabPage&) rPage ).SetPageType( &nPageType );
             ( (SvxLineTabPage&) rPage ).SetPosDashLb( &nPosDashLb );
@@ -246,7 +241,7 @@ void SvxLineTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
         break;
 
         case RID_SVXPAGE_LINE_DEF:
-            ( (SvxLineDefTabPage&) rPage ).SetDashList( pDashList );
+            ( (SvxLineDefTabPage&) rPage ).SetDashList( maDashList );
             ( (SvxLineDefTabPage&) rPage ).SetDlgType( &nDlgType );
             ( (SvxLineDefTabPage&) rPage ).SetPageType( &nPageType );
             ( (SvxLineDefTabPage&) rPage ).SetPosDashLb( &nPosDashLb );
@@ -256,7 +251,7 @@ void SvxLineTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
         break;
 
         case RID_SVXPAGE_LINEEND_DEF:
-            ( (SvxLineEndDefTabPage&) rPage ).SetLineEndList( pLineEndList );
+            ( (SvxLineEndDefTabPage&) rPage ).SetLineEndList( maLineEndList );
             ( (SvxLineEndDefTabPage&) rPage ).SetPolyObj( pObj );
             ( (SvxLineEndDefTabPage&) rPage ).SetDlgType( &nDlgType );
             ( (SvxLineEndDefTabPage&) rPage ).SetPageType( &nPageType );
@@ -268,7 +263,7 @@ void SvxLineTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
 
         case RID_SVXPAGE_SHADOW:
         {
-            ( (SvxShadowTabPage&) rPage ).SetColorTable( pColorTab );
+            ( (SvxShadowTabPage&) rPage ).SetColorTable( maColorTab );
             ( (SvxShadowTabPage&) rPage ).SetPageType( nPageType );
             ( (SvxShadowTabPage&) rPage ).SetDlgType( nDlgType );
             ( (SvxShadowTabPage&) rPage ).SetAreaTP( &mbAreaTP );
@@ -278,13 +273,12 @@ void SvxLineTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
         break;
 /*
         case RID_SVXPAGE_COLOR:
-            ( (SvxColorTabPage&) rPage ).SetColorTable( pColorTab );
+            ( (SvxColorTabPage&) rPage ).SetColorTable( maColorTab );
             ( (SvxColorTabPage&) rPage ).SetPageType( &nPageType );
             ( (SvxColorTabPage&) rPage ).SetDlgType( &nDlgType );
             ( (SvxColorTabPage&) rPage ).SetPos( &mnPos );
             ( (SvxColorTabPage&) rPage ).SetAreaTP( &mbAreaTP );
             ( (SvxColorTabPage&) rPage ).SetColorChgd( &mnColorTableState );
-            ( (SvxColorTabPage&) rPage ).SetDeleteColorTable( mbDeleteColorTable );
             ( (SvxColorTabPage&) rPage ).Construct();
         break;
 */
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 47044c1..61ea321 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -660,10 +660,10 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
 
     rOutAttrs           ( rInAttrs ),
 
-    pColorTab( NULL ),
-    pGradientList( NULL ),
-    pHatchingList( NULL ),
-    pBitmapList( NULL ),
+    maColorTab(),
+    maGradientList(),
+    maHatchingList(),
+    maBitmapList(),
 
     pXPool              ( (XOutdevItemPool*) rInAttrs.GetPool() ),
     aXFillAttr          ( pXPool ),
@@ -787,12 +787,12 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
 void SvxAreaTabPage::Construct()
 {
     // fill colortables / lists
-    aLbColor.Fill( pColorTab );
-    aLbHatchBckgrdColor.Fill ( pColorTab );
+    aLbColor.Fill( maColorTab );
+    aLbHatchBckgrdColor.Fill ( maColorTab );
 
-    aLbGradient.Fill( pGradientList );
-    aLbHatching.Fill( pHatchingList );
-    aLbBitmap.Fill( pBitmapList );
+    aLbGradient.Fill( maGradientList );
+    aLbHatching.Fill( maHatchingList );
+    aLbBitmap.Fill( maBitmapList );
 }
 
 // -----------------------------------------------------------------------
@@ -813,19 +813,18 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
     {
         *pbAreaTP = sal_True;
 
-        if( pColorTab )
+        if( maColorTab.get() )
         {
             // Bitmapliste
             if( *pnBitmapListState )
             {
                 if( *pnBitmapListState & CT_CHANGED )
-                    pBitmapList = ( (SvxAreaTabDialog*) DLGWIN )->
-                                            GetNewBitmapList();
+                    maBitmapList = ( (SvxAreaTabDialog*) DLGWIN )->GetNewBitmapList();
 
                 _nPos = aLbBitmap.GetSelectEntryPos();
 
                 aLbBitmap.Clear();
-                aLbBitmap.Fill( pBitmapList );
+                aLbBitmap.Fill( maBitmapList );
                 nCount = aLbBitmap.GetEntryCount();
                 if( nCount == 0 )
                     ; // This case should never occur
@@ -839,13 +838,12 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
             if( *pnHatchingListState )
             {
                 if( *pnHatchingListState & CT_CHANGED )
-                    pHatchingList = ( (SvxAreaTabDialog*) DLGWIN )->
-                                            GetNewHatchingList();
+                    maHatchingList = ( (SvxAreaTabDialog*) DLGWIN )->GetNewHatchingList();
 
                 _nPos = aLbHatching.GetSelectEntryPos();
 
                 aLbHatching.Clear();
-                aLbHatching.Fill( pHatchingList );
+                aLbHatching.Fill( maHatchingList );
                 nCount = aLbHatching.GetEntryCount();
                 if( nCount == 0 )
                     ; // This case should never occur
@@ -861,13 +859,12 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
             if( *pnGradientListState )
             {
                 if( *pnGradientListState & CT_CHANGED )
-                    pGradientList = ( (SvxAreaTabDialog*) DLGWIN )->
-                                            GetNewGradientList();
+                    maGradientList = ( (SvxAreaTabDialog*) DLGWIN )->GetNewGradientList();
 
                 _nPos = aLbGradient.GetSelectEntryPos();
 
                 aLbGradient.Clear();
-                aLbGradient.Fill( pGradientList );
+                aLbGradient.Fill( maGradientList );
                 nCount = aLbGradient.GetEntryCount();
                 if( nCount == 0 )
                     ; // This case should never occur
@@ -881,12 +878,11 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
             if( *pnColorTableState )
             {
                 if( *pnColorTableState & CT_CHANGED )
-                    pColorTab = ( (SvxAreaTabDialog*) DLGWIN )->
-                                            GetNewColorTable();
+                    maColorTab = ( (SvxAreaTabDialog*) DLGWIN )->GetNewColorTable();
                 // aLbColor
                 _nPos = aLbColor.GetSelectEntryPos();
                 aLbColor.Clear();
-                aLbColor.Fill( pColorTab );
+                aLbColor.Fill( maColorTab );
                 nCount = aLbColor.GetEntryCount();
                 if( nCount == 0 )
                     ; // This case should never occur
@@ -900,7 +896,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
                 // Backgroundcolor of hatch
                 _nPos = aLbHatchBckgrdColor.GetSelectEntryPos();
                 aLbHatchBckgrdColor.Clear();
-                aLbHatchBckgrdColor.Fill( pColorTab );
+                aLbHatchBckgrdColor.Fill( maColorTab );
                 nCount = aLbHatchBckgrdColor.GetEntryCount();
                 if( nCount == 0 )
                     ; // This case should never occur
@@ -1055,7 +1051,7 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs )
                 if( _nPos != LISTBOX_ENTRY_NOTFOUND &&
                     _nPos != aLbGradient.GetSavedValue() )
                 {
-                    XGradient aGradient = pGradientList->GetGradient( _nPos )->GetGradient();
+                    XGradient aGradient = maGradientList->GetGradient( _nPos )->GetGradient();
                     String aString = aLbGradient.GetSelectEntry();
                     XFillGradientItem aItem( aString, aGradient );
                     pOld = GetOldItem( rAttrs, XATTR_FILLGRADIENT );
@@ -1086,7 +1082,7 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs )
                 if( _nPos != LISTBOX_ENTRY_NOTFOUND &&
                    _nPos != aLbHatching.GetSavedValue() )
                 {
-                    XHatch aHatching = pHatchingList->GetHatch( _nPos )->GetHatch();
+                    XHatch aHatching = maHatchingList->GetHatch( _nPos )->GetHatch();
                     String aString = aLbHatching.GetSelectEntry();
                     XFillHatchItem aItem( aString, aHatching );
                     pOld = GetOldItem( rAttrs, XATTR_FILLHATCH );
@@ -1132,7 +1128,7 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs )
                 if( nPos != LISTBOX_ENTRY_NOTFOUND &&
                     nPos != aLbBitmap.GetSavedValue() )
                 {
-                    const XBitmapEntry* pXBitmapEntry = pBitmapList->GetBitmap(nPos);
+                    const XBitmapEntry* pXBitmapEntry = maBitmapList->GetBitmap(nPos);
                     const String aString(aLbBitmap.GetSelectEntry());
                     const XFillBitmapItem aFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject());
                     pOld = GetOldItem( rAttrs, XATTR_FILLBITMAP );
@@ -1473,7 +1469,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs )
                     String    aString( aGradientItem.GetName() );
                     XGradient aGradient( aGradientItem.GetGradientValue() );
 
-                    aLbGradient.SelectEntryByList( pGradientList, aString, aGradient );
+                    aLbGradient.SelectEntryByList( maGradientList, aString, aGradient );
                 }
                 ClickGradientHdl_Impl( this );
             break;
@@ -1870,9 +1866,9 @@ IMPL_LINK( SvxAreaTabPage, ClickColorHdl_Impl, void *, EMPTYARG )
 
     // Text der Tabelle setzen
     String          aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
-    INetURLObject   aURL( pColorTab->GetPath() );
+    INetURLObject   aURL( maColorTab->GetPath() );
 
-    aURL.Append( pColorTab->GetName() );
+    aURL.Append( maColorTab->GetName() );
     DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
 
     if( aURL.getBase().getLength() > 18 )
@@ -1960,9 +1956,9 @@ IMPL_LINK( SvxAreaTabPage, ClickGradientHdl_Impl, void *, EMPTYARG )
 
     // Text der Tabelle setzen
     String          aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
-    INetURLObject   aURL( pGradientList->GetPath() );
+    INetURLObject   aURL( maGradientList->GetPath() );
 
-    aURL.Append( pGradientList->GetName() );
+    aURL.Append( maGradientList->GetName() );
     DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
 
     if( aURL.getBase().getLength() > 18 )
@@ -1987,7 +1983,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyGradientHdl_Impl, void *, EMPTYARG )
     if( _nPos != LISTBOX_ENTRY_NOTFOUND )
     {
         // ItemSet fuellen und an aCtlXRectPreview weiterleiten
-        XGradientEntry* pEntry = pGradientList->GetGradient( _nPos );
+        XGradientEntry* pEntry = maGradientList->GetGradient( _nPos );
 
         rXFSet.Put( XFillStyleItem( XFILL_GRADIENT ) );
         rXFSet.Put( XFillGradientItem( String(),
@@ -2055,9 +2051,9 @@ IMPL_LINK( SvxAreaTabPage, ClickHatchingHdl_Impl, void *, EMPTYARG )
 
     // Text der Tabelle setzen
     String          aString( CUI_RES( RID_SVXSTR_TABLE ) );     aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
-    INetURLObject   aURL( pHatchingList->GetPath() );
+    INetURLObject   aURL( maHatchingList->GetPath() );
 
-    aURL.Append( pHatchingList->GetName() );
+    aURL.Append( maHatchingList->GetName() );
     DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
 
     if( aURL.getBase().getLength() > 18 )
@@ -2084,7 +2080,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyHatchingHdl_Impl, void *, EMPTYARG )
     if( _nPos != LISTBOX_ENTRY_NOTFOUND )
     {
         // ItemSet fuellen und an aCtlXRectPreview weiterleiten
-        XHatchEntry* pEntry = pHatchingList->GetHatch( _nPos );
+        XHatchEntry* pEntry = maHatchingList->GetHatch( _nPos );
 
         rXFSet.Put( XFillStyleItem( XFILL_HATCH ) );
         rXFSet.Put( XFillHatchItem( String(), pEntry->GetHatch() ) );
@@ -2223,9 +2219,9 @@ IMPL_LINK( SvxAreaTabPage, ClickBitmapHdl_Impl, void *, EMPTYARG )
 
     // Text der Tabelle setzen
     String          aString( CUI_RES( RID_SVXSTR_TABLE ) );     aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
-    INetURLObject   aURL( pBitmapList->GetPath() );
+    INetURLObject   aURL( maBitmapList->GetPath() );
 
-    aURL.Append( pBitmapList->GetName() );
+    aURL.Append( maBitmapList->GetName() );
     DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
 
     if( aURL.getBase().getLength() > 18 )
@@ -2250,7 +2246,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyBitmapHdl_Impl, void *, EMPTYARG )
     if( _nPos != LISTBOX_ENTRY_NOTFOUND )
     {
         // ItemSet fuellen und an aCtlXRectPreview weiterleiten
-        const XBitmapEntry* pEntry = pBitmapList->GetBitmap(_nPos);
+        const XBitmapEntry* pEntry = maBitmapList->GetBitmap(_nPos);
 
         rXFSet.Put(XFillStyleItem(XFILL_BITMAP));
         rXFSet.Put(XFillBitmapItem(String(), pEntry->GetGraphicObject()));
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 380d275..7ede39c 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -107,8 +107,8 @@ SvxBitmapTabPage::SvxBitmapTabPage
     aBitmapCtl          ( this, aCtlPreview.GetSizePixel() ),
     rOutAttrs           ( rInAttrs ),
 
-    pColorTab( NULL ),
-    pBitmapList( NULL ),
+    maColorTab(),
+    maBitmapList(),
 
     pXPool              ( (XOutdevItemPool*) rInAttrs.GetPool() ),
     aXFStyleItem        ( XFILL_BITMAP ),
@@ -162,11 +162,11 @@ SvxBitmapTabPage::SvxBitmapTabPage
 void SvxBitmapTabPage::Construct()
 {
     // Farbtabellen
-    aLbColor.Fill( pColorTab );
+    aLbColor.Fill( maColorTab );
     aLbBackgroundColor.CopyEntries( aLbColor );
 
     // Bitmaptabelle
-    aLbBitmaps.Fill( pBitmapList );
+    aLbBitmaps.Fill( maBitmapList );
 }
 
 // -----------------------------------------------------------------------
@@ -180,19 +180,19 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet&  )
     {
         *pbAreaTP = sal_False;
 
-        if( pColorTab )
+        if( maColorTab.get() )
         {
             // ColorTable
             if( *pnColorTableState & CT_CHANGED ||
                 *pnColorTableState & CT_MODIFIED )
             {
                 if( *pnColorTableState & CT_CHANGED )
-                    pColorTab = ( (SvxAreaTabDialog*) DLGWIN )->GetNewColorTable();
+                    maColorTab = ( (SvxAreaTabDialog*) DLGWIN )->GetNewColorTable();
 
                 // LbColor
                 nPos = aLbColor.GetSelectEntryPos();
                 aLbColor.Clear();
-                aLbColor.Fill( pColorTab );
+                aLbColor.Fill( maColorTab );
                 nCount = aLbColor.GetEntryCount();
                 if( nCount == 0 )
                     ; // Dieser Fall sollte nicht auftreten
@@ -220,9 +220,9 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet&  )
             // Ermitteln (evtl. abschneiden) des Namens und in
             // der GroupBox darstellen
             String          aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
-            INetURLObject   aURL( pBitmapList->GetPath() );
+            INetURLObject   aURL( maBitmapList->GetPath() );
 
-            aURL.Append( pBitmapList->GetName() );
+            aURL.Append( maBitmapList->GetName() );
             DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
 
             if( aURL.getBase().getLength() > 18 )
@@ -273,7 +273,7 @@ sal_Bool SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs )
 
             if(LISTBOX_ENTRY_NOTFOUND != nPos)
             {
-                const XBitmapEntry* pXBitmapEntry = pBitmapList->GetBitmap(nPos);
+                const XBitmapEntry* pXBitmapEntry = maBitmapList->GetBitmap(nPos);
                 const String aString(aLbBitmaps.GetSelectEntry());
 
                 _rOutAttrs.Put(XFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()));
@@ -310,7 +310,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet&  )
     ChangeBitmapHdl_Impl( this );
 
     // Status der Buttons ermitteln
-    if( pBitmapList->Count() )
+    if( maBitmapList.get() && maBitmapList->Count() )
     {
         aBtnAdd.Enable();
         aBtnModify.Enable();
@@ -342,7 +342,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG )
 
     if(LISTBOX_ENTRY_NOTFOUND != nPos)
     {
-        pGraphicObject = new GraphicObject(pBitmapList->GetBitmap(nPos)->GetGraphicObject());
+        pGraphicObject = new GraphicObject(maBitmapList->GetBitmap(nPos)->GetGraphicObject());
     }
     else
     {
@@ -365,7 +365,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG )
 
             if(LISTBOX_ENTRY_NOTFOUND != nPos)
             {
-                pGraphicObject = new GraphicObject(pBitmapList->GetBitmap(nPos)->GetGraphicObject());
+                pGraphicObject = new GraphicObject(maBitmapList->GetBitmap(nPos)->GetGraphicObject());
             }
         }
     }
@@ -516,7 +516,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
     String aDesc( CUI_RES( RID_SVXSTR_DESC_NEW_BITMAP ) );
     String aName;
 
-    long nCount = pBitmapList->Count();
+    long nCount = maBitmapList.get() ? maBitmapList->Count() : 0;
     long j = 1;
     sal_Bool bDifferent = sal_False;
 
@@ -528,7 +528,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
         bDifferent = sal_True;
 
         for( long i = 0; i < nCount && bDifferent; i++ )
-            if( aName == pBitmapList->GetBitmap( i )->GetName() )
+            if( aName == maBitmapList->GetBitmap( i )->GetName() )
                 bDifferent = sal_False;
     }
 
@@ -546,7 +546,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
         bDifferent = sal_True;
 
         for( long i = 0; i < nCount && bDifferent; i++ )
-            if( aName == pBitmapList->GetBitmap( i )->GetName() )
+            if( aName == maBitmapList->GetBitmap( i )->GetName() )
                 bDifferent = sal_False;
 
         if( bDifferent ) {
@@ -592,7 +592,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
 
         if( pEntry )
         {
-            pBitmapList->Insert( pEntry );
+            maBitmapList->Insert( pEntry );
             const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
             aLbBitmaps.Append(rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry );
             aLbBitmaps.SelectEntryPos( aLbBitmaps.GetEntryCount() - 1 );
@@ -615,7 +615,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
     }
 
     // Status der Buttons ermitteln
-    if( pBitmapList->Count() )
+    if( maBitmapList.get() && maBitmapList->Count() )
     {
         aBtnModify.Enable();
         aBtnDelete.Enable();
@@ -669,10 +669,10 @@ IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG )
                 pDlg->GetName( aName );
 
                 sal_Bool bDifferent = sal_True;
-                long nCount     = pBitmapList->Count();
+                long nCount     = maBitmapList->Count();
 
                 for( long i = 0; i < nCount && bDifferent; i++ )
-                    if( aName == pBitmapList->GetBitmap( i )->GetName() )
+                    if( aName == maBitmapList->GetBitmap( i )->GetName() )
                         bDifferent = sal_False;
 
                 if( bDifferent ) {
@@ -699,7 +699,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG )
             if( !nError )
             {
                 XBitmapEntry* pEntry = new XBitmapEntry( aGraphic, aName );
-                pBitmapList->Insert( pEntry );
+                maBitmapList->Insert( pEntry );
 
                 const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
                 aLbBitmaps.Append(rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry );
@@ -746,7 +746,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
         ResMgr& rMgr = CUI_MGR();
         String aNewName( SVX_RES( RID_SVXSTR_BITMAP ) );
         String aDesc( ResId( RID_SVXSTR_DESC_NEW_BITMAP, rMgr ) );
-        String aName( pBitmapList->GetBitmap( nPos )->GetName() );
+        String aName( maBitmapList->GetBitmap( nPos )->GetName() );
         String aOldName = aName;
 
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -754,7 +754,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
         AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc );
         DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
 
-        long nCount = pBitmapList->Count();
+        long nCount = maBitmapList.get() ? maBitmapList->Count() : 0;
         sal_Bool bDifferent = sal_False;
         sal_Bool bLoop = sal_True;
         const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
@@ -766,7 +766,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
 
             for( long i = 0; i < nCount && bDifferent; i++ )
             {
-                if( aName == pBitmapList->GetBitmap( i )->GetName() &&
+                if( aName == maBitmapList->GetBitmap( i )->GetName() &&
                     aName != aOldName )
                     bDifferent = sal_False;
             }
@@ -774,7 +774,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
             if( bDifferent )
             {
                 bLoop = sal_False;
-                XBitmapEntry* pEntry = pBitmapList->GetBitmap( nPos );
+                XBitmapEntry* pEntry = maBitmapList->GetBitmap( nPos );
 
                 pEntry->SetName( aName );
 
@@ -815,7 +815,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG )
 
         if( aQueryBox.Execute() == RET_YES )
         {
-            delete pBitmapList->Remove( nPos );
+            delete maBitmapList->Remove( nPos );
             aLbBitmaps.RemoveEntry( nPos );
             aLbBitmaps.SelectEntryPos( 0 );
 
@@ -829,7 +829,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG )
         }
     }
     // Status der Buttons ermitteln
-    if( !pBitmapList->Count() )
+    if( !maBitmapList.get() || !maBitmapList->Count() )
     {
         aBtnModify.Disable();
         aBtnDelete.Disable();
@@ -851,7 +851,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickLoadHdl_Impl, void *, EMPTYARG )
             String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, rMgr ) ) ).Execute();
 
         if ( nReturn == RET_YES )
-            pBitmapList->Save();
+            maBitmapList->Save();
     }
 
     if ( nReturn != RET_CANCEL )
@@ -874,24 +874,20 @@ IMPL_LINK( SvxBitmapTabPage, ClickLoadHdl_Impl, void *, EMPTYARG )
             aPathURL.removeFinalSlash();
 
             // Tabelle speichern
-            XBitmapList* pBmpList = new XBitmapList( aPathURL.GetMainURL( INetURLObject::NO_DECODE ), pXPool );
-            pBmpList->SetName( aURL.getName() );
-            if( pBmpList->Load() )
+            XBitmapListSharedPtr aBmpList(XPropertyListFactory::CreateSharedXBitmapList(aPathURL.GetMainURL(INetURLObject::NO_DECODE)));
+            aBmpList->SetName( aURL.getName() );
+            if( aBmpList->Load() )
             {
-                if( pBmpList )
+                if( aBmpList.get() )
                 {
-                    // Pruefen, ob Tabelle geloescht werden darf:
-                    if( pBitmapList != ( (SvxAreaTabDialog*) DLGWIN )->GetBitmapList() )
-                        delete pBitmapList;
-
-                    pBitmapList = pBmpList;
-                    ( (SvxAreaTabDialog*) DLGWIN )->SetNewBitmapList( pBitmapList );
+                    maBitmapList = aBmpList;
+                    ( (SvxAreaTabDialog*) DLGWIN )->SetNewBitmapList( maBitmapList );
 
                     aLbBitmaps.Clear();
-                    aLbBitmaps.Fill( pBitmapList );
+                    aLbBitmaps.Fill( maBitmapList );
                     Reset( rOutAttrs );
 
-                    pBitmapList->SetName( aURL.getName() );
+                    maBitmapList->SetName( aURL.getName() );
 
                     // Ermitteln (evtl. abschneiden) des Namens und in
                     // der GroupBox darstellen
@@ -923,7 +919,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickLoadHdl_Impl, void *, EMPTYARG )
     }
 
     // Status der Buttons ermitteln
-    if( pBitmapList->Count() )
+    if( maBitmapList.get() && maBitmapList->Count() )
     {
         aBtnModify.Enable();
         aBtnDelete.Enable();
@@ -950,9 +946,9 @@ IMPL_LINK( SvxBitmapTabPage, ClickSaveHdl_Impl, void *, EMPTYARG )
     INetURLObject aFile( SvtPathOptions().GetPalettePath() );
     DBG_ASSERT( aFile.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
 
-    if( pBitmapList->GetName().Len() )
+    if( maBitmapList->GetName().Len() )
     {
-        aFile.Append( pBitmapList->GetName() );
+        aFile.Append( maBitmapList->GetName() );
 
         if( !aFile.getExtension().getLength() )
             aFile.SetExtension( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "sob" ) ) );
@@ -967,10 +963,10 @@ IMPL_LINK( SvxBitmapTabPage, ClickSaveHdl_Impl, void *, EMPTYARG )
         aPathURL.removeSegment();
         aPathURL.removeFinalSlash();
 
-        pBitmapList->SetName( aURL.getName() );
-        pBitmapList->SetPath( aPathURL.GetMainURL( INetURLObject::NO_DECODE ) );
+        maBitmapList->SetName( aURL.getName() );
+        maBitmapList->SetPath( aPathURL.GetMainURL( INetURLObject::NO_DECODE ) );
 
-        if( pBitmapList->Save() )
+        if( maBitmapList->Save() )
         {
             // Ermitteln (evtl. abschneiden) des Namens und in
             // der GroupBox darstellen
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index bc349df..a0cbe78 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -111,9 +111,7 @@ SvxColorTabPage::SvxColorTabPage
     aBtnSave            ( this, CUI_RES( BTN_SAVE ) ),
 
     rOutAttrs           ( rInAttrs ),
-    pColorTab( NULL ),
-
-    bDeleteColorTable   ( sal_True ),
+    maColorTab(),
 
     pXPool              ( (XOutdevItemPool*) rInAttrs.GetPool() ),
     aXFStyleItem        ( XFILL_SOLID ),
@@ -177,7 +175,7 @@ SvxColorTabPage::SvxColorTabPage
 
 void SvxColorTabPage::ImpColorCountChanged()
 {
-    if(pColorTab)
+    if(maColorTab.get())
     {
         aValSetColorTable.SetColCount(aValSetColorTable.getColumnCount());
 
@@ -187,7 +185,7 @@ void SvxColorTabPage::ImpColorCountChanged()
         // with the original position
         const Point aCurrentPos(aValSetColorTable.GetPosPixel());
         const Size aCurrentSize(aValSetColorTable.GetOutputSizePixel());
-        const long nColorCount(pColorTab->Count());
+        const long nColorCount(maColorTab->Count());
         const Size aNewSize(aValSetColorTable.layoutToGivenHeight(aCurrentSize.Height(), nColorCount));
         const Point aNewPos((aCurrentPos.X() + aCurrentSize.Width()) - aNewSize.Width(), aCurrentPos.Y());
 
@@ -200,10 +198,10 @@ void SvxColorTabPage::ImpColorCountChanged()
 
 void SvxColorTabPage::Construct()
 {
-    if(pColorTab)
+    if(maColorTab.get())
     {
-        aLbColor.Fill(pColorTab);
-        aValSetColorTable.addEntriesForXColorList(*pColorTab);
+        aLbColor.Fill(maColorTab);
+        aValSetColorTable.addEntriesForXColorList(maColorTab);
         ImpColorCountChanged();
     }
 }
@@ -216,7 +214,7 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& )
     {
         *pbAreaTP = sal_False;
 
-        if( pColorTab )
+        if( maColorTab.get() )
         {
             if( *pPageType == PT_COLOR && *pPos != LISTBOX_ENTRY_NOTFOUND )
             {
@@ -254,9 +252,9 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& )
             // Ermitteln (evtl. abschneiden) des Namens und in
             // der GroupBox darstellen
             String          aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
-            INetURLObject   aURL( pColorTab->GetPath() );
+            INetURLObject   aURL( maColorTab->GetPath() );
 
-            aURL.Append( pColorTab->GetName() );
+            aURL.Append( maColorTab->GetName() );
             DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
 
             if ( aURL.getBase().getLength() > 18 )
@@ -314,7 +312,7 @@ long SvxColorTabPage::CheckChanges_Impl()
     sal_uInt16 nPos = aLbColor.GetSelectEntryPos();
     if( nPos != LISTBOX_ENTRY_NOTFOUND )
     {
-        Color aColor = pColorTab->GetColor( nPos )->GetColor();
+        Color aColor = maColorTab->GetColor( nPos )->GetColor();
         String aString = aLbColor.GetSelectEntry();
 
         // aNewColor, da COL_USER != COL_irgendwas, auch wenn RGB-Werte gleich
@@ -346,7 +344,7 @@ long SvxColorTabPage::CheckChanges_Impl()
                 case RET_BTN_1: // Aendern
                 {
                     ClickModifyHdl_Impl( this );
-                    aColor = pColorTab->GetColor( nPos )->GetColor();
+                    aColor = maColorTab->GetColor( nPos )->GetColor();
                 }
                 break;
 
@@ -354,7 +352,7 @@ long SvxColorTabPage::CheckChanges_Impl()
                 {
                     ClickAddHdl_Impl( this );
                     nPos = aLbColor.GetSelectEntryPos();
-                    aColor = pColorTab->GetColor( nPos )->GetColor();
+                    aColor = maColorTab->GetColor( nPos )->GetColor();
                 }
                 break;
 
@@ -392,7 +390,7 @@ sal_Bool SvxColorTabPage::FillItemSet( SfxItemSet& rSet )
         sal_uInt16 nPos = aLbColor.GetSelectEntryPos();
         if( nPos != LISTBOX_ENTRY_NOTFOUND )
         {
-            aColor  = pColorTab->GetColor( nPos )->GetColor();
+            aColor  = maColorTab->GetColor( nPos )->GetColor();
             aString = aLbColor.GetSelectEntry();
         }
         else
@@ -432,7 +430,7 @@ void SvxColorTabPage::Reset( const SfxItemSet& rSet )
     aCtlPreviewOld.Invalidate();
 
     // Status der Buttons ermitteln
-    if( pColorTab->Count() )
+    if( maColorTab->Count() )
     {
         aBtnModify.Enable();
         aBtnWorkOn.Enable();
@@ -500,12 +498,12 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
     String aDesc( ResId( RID_SVXSTR_DESC_COLOR, rMgr ) );
     String aName( aEdtName.GetText() );
     XColorEntry* pEntry;
-    long nCount = pColorTab->Count();
+    long nCount = maColorTab->Count();
     sal_Bool bDifferent = sal_True;
 
     // Pruefen, ob Name schon vorhanden ist
     for ( long i = 0; i < nCount && bDifferent; i++ )
-        if ( aName == pColorTab->GetColor( i )->GetName() )
+        if ( aName == maColorTab->GetColor( i )->GetName() )
             bDifferent = sal_False;
 
     // Wenn ja, wird wiederholt ein neuer Name angefordert
@@ -529,7 +527,7 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
 
             for( long i = 0; i < nCount && bDifferent; i++ )
             {
-                if( aName == pColorTab->GetColor( i )->GetName() )
+                if( aName == maColorTab->GetColor( i )->GetName() )
                     bDifferent = sal_False;
             }
 
@@ -548,7 +546,7 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
             ConvertColorValues (aAktuellColor, CM_RGB);
         pEntry = new XColorEntry( aAktuellColor, aName );
 
-        pColorTab->Insert( pEntry, pColorTab->Count() );
+        maColorTab->Insert( pEntry, maColorTab->Count() );
 
         aLbColor.Append( pEntry );
         aValSetColorTable.InsertItem( aValSetColorTable.GetItemCount() + 1,
@@ -563,7 +561,7 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
         SelectColorLBHdl_Impl( this );
     }
     // Status der Buttons ermitteln
-    if( pColorTab->Count() )
+    if( maColorTab->Count() )
     {
         aBtnModify.Enable();
         aBtnWorkOn.Enable();
@@ -587,12 +585,12 @@ IMPL_LINK( SvxColorTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
         ResMgr& rMgr = CUI_MGR();

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list