You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2013/04/28 13:57:23 UTC

svn commit: r1476756 [1/5] - in /openoffice/trunk/main: chart2/source/controller/dialogs/ chart2/source/controller/drawinglayer/ chart2/source/controller/inc/ chart2/source/controller/main/ chart2/source/inc/chartview/ chart2/source/view/main/ cui/sour...

Author: alg
Date: Sun Apr 28 11:57:18 2013
New Revision: 1476756

URL: http://svn.apache.org/r1476756
Log:
i122120 Cleanup of XPropertyList and derivates to RefCounted instances, more cleanups

Removed:
    openoffice/trunk/main/sd/source/ui/dlg/celltempl.cxx
    openoffice/trunk/main/sd/source/ui/dlg/celltempl.src
    openoffice/trunk/main/sd/source/ui/inc/celltempl.hrc
    openoffice/trunk/main/sd/source/ui/inc/celltempl.hxx
Modified:
    openoffice/trunk/main/chart2/source/controller/dialogs/dlg_View3D.cxx
    openoffice/trunk/main/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
    openoffice/trunk/main/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
    openoffice/trunk/main/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
    openoffice/trunk/main/chart2/source/controller/inc/ViewElementListProvider.hxx
    openoffice/trunk/main/chart2/source/controller/inc/dlg_View3D.hxx
    openoffice/trunk/main/chart2/source/controller/main/ChartController_Properties.cxx
    openoffice/trunk/main/chart2/source/controller/main/DrawCommandDispatch.cxx
    openoffice/trunk/main/chart2/source/controller/main/ShapeController.cxx
    openoffice/trunk/main/chart2/source/inc/chartview/DrawModelWrapper.hxx
    openoffice/trunk/main/chart2/source/view/main/DrawModelWrapper.cxx
    openoffice/trunk/main/cui/source/dialogs/sdrcelldlg.cxx
    openoffice/trunk/main/cui/source/factory/dlgfact.cxx
    openoffice/trunk/main/cui/source/factory/dlgfact.hxx
    openoffice/trunk/main/cui/source/inc/cuitabarea.hxx
    openoffice/trunk/main/cui/source/inc/cuitabline.hxx
    openoffice/trunk/main/cui/source/inc/sdrcelldlg.hxx
    openoffice/trunk/main/cui/source/inc/treeopt.hxx
    openoffice/trunk/main/cui/source/options/optchart.cxx
    openoffice/trunk/main/cui/source/options/optchart.hxx
    openoffice/trunk/main/cui/source/options/optcolor.cxx
    openoffice/trunk/main/cui/source/options/treeopt.cxx
    openoffice/trunk/main/cui/source/tabpages/backgrnd.cxx
    openoffice/trunk/main/cui/source/tabpages/border.cxx
    openoffice/trunk/main/cui/source/tabpages/chardlg.cxx
    openoffice/trunk/main/cui/source/tabpages/numpages.cxx
    openoffice/trunk/main/cui/source/tabpages/tabarea.cxx
    openoffice/trunk/main/cui/source/tabpages/tabline.cxx
    openoffice/trunk/main/cui/source/tabpages/tparea.cxx
    openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx
    openoffice/trunk/main/cui/source/tabpages/tpcolor.cxx
    openoffice/trunk/main/cui/source/tabpages/tpgradnt.cxx
    openoffice/trunk/main/cui/source/tabpages/tphatch.cxx
    openoffice/trunk/main/cui/source/tabpages/tpline.cxx
    openoffice/trunk/main/cui/source/tabpages/tplnedef.cxx
    openoffice/trunk/main/cui/source/tabpages/tplneend.cxx
    openoffice/trunk/main/cui/source/tabpages/tpshadow.cxx
    openoffice/trunk/main/extensions/source/propctrlr/standardcontrol.cxx
    openoffice/trunk/main/reportdesign/source/ui/dlg/Condition.cxx
    openoffice/trunk/main/reportdesign/source/ui/misc/UITools.cxx
    openoffice/trunk/main/sc/inc/document.hxx
    openoffice/trunk/main/sc/source/core/data/documen2.cxx
    openoffice/trunk/main/sc/source/core/data/documen3.cxx
    openoffice/trunk/main/sc/source/core/data/documen9.cxx
    openoffice/trunk/main/sc/source/core/data/drwlayer.cxx
    openoffice/trunk/main/sc/source/ui/dbgui/scendlg.cxx
    openoffice/trunk/main/sc/source/ui/docshell/docsh2.cxx
    openoffice/trunk/main/sc/source/ui/docshell/docsh4.cxx
    openoffice/trunk/main/sc/source/ui/drawfunc/drawsh.cxx
    openoffice/trunk/main/sc/source/ui/drawfunc/drawsh4.cxx
    openoffice/trunk/main/sc/source/ui/drawfunc/drtxtob2.cxx
    openoffice/trunk/main/sc/source/ui/miscdlgs/makefile.mk
    openoffice/trunk/main/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
    openoffice/trunk/main/sc/source/ui/optdlg/opredlin.cxx
    openoffice/trunk/main/sc/source/ui/optdlg/tpview.cxx
    openoffice/trunk/main/sd/inc/sdabstdlg.hxx
    openoffice/trunk/main/sd/source/ui/animations/CustomAnimationDialog.cxx
    openoffice/trunk/main/sd/source/ui/dlg/copydlg.cxx
    openoffice/trunk/main/sd/source/ui/dlg/dlgpage.cxx
    openoffice/trunk/main/sd/source/ui/dlg/prltempl.cxx
    openoffice/trunk/main/sd/source/ui/dlg/sddlgfact.cxx
    openoffice/trunk/main/sd/source/ui/dlg/sddlgfact.hxx
    openoffice/trunk/main/sd/source/ui/dlg/tabtempl.cxx
    openoffice/trunk/main/sd/source/ui/dlg/tpaction.cxx
    openoffice/trunk/main/sd/source/ui/docshell/docshel3.cxx
    openoffice/trunk/main/sd/source/ui/docshell/docshell.cxx
    openoffice/trunk/main/sd/source/ui/func/fuconrec.cxx
    openoffice/trunk/main/sd/source/ui/func/fucopy.cxx
    openoffice/trunk/main/sd/source/ui/func/fulinend.cxx
    openoffice/trunk/main/sd/source/ui/inc/copydlg.hxx
    openoffice/trunk/main/sd/source/ui/inc/dlgpage.hxx
    openoffice/trunk/main/sd/source/ui/inc/prltempl.hxx
    openoffice/trunk/main/sd/source/ui/inc/tabtempl.hxx
    openoffice/trunk/main/sd/source/ui/inc/tpaction.hxx
    openoffice/trunk/main/sd/source/ui/unoidl/UnoDocumentSettings.cxx
    openoffice/trunk/main/sd/source/ui/view/drviews6.cxx
    openoffice/trunk/main/sd/source/ui/view/drviews9.cxx
    openoffice/trunk/main/svx/inc/svx/SvxColorValueSet.hxx
    openoffice/trunk/main/svx/inc/svx/bmpmask.hxx
    openoffice/trunk/main/svx/inc/svx/colrctrl.hxx
    openoffice/trunk/main/svx/inc/svx/dlgctrl.hxx
    openoffice/trunk/main/svx/inc/svx/drawitem.hxx
    openoffice/trunk/main/svx/inc/svx/fmmodel.hxx
    openoffice/trunk/main/svx/inc/svx/fontwork.hxx
    openoffice/trunk/main/svx/inc/svx/linectrl.hxx
    openoffice/trunk/main/svx/inc/svx/svdmodel.hxx
    openoffice/trunk/main/svx/inc/svx/svxdlg.hxx
    openoffice/trunk/main/svx/inc/svx/xattr.hxx
    openoffice/trunk/main/svx/inc/svx/xcolit.hxx
    openoffice/trunk/main/svx/inc/svx/xit.hxx
    openoffice/trunk/main/svx/inc/svx/xtable.hxx
    openoffice/trunk/main/svx/sdi/svx.sdi
    openoffice/trunk/main/svx/source/dialog/_bmpmask.cxx
    openoffice/trunk/main/svx/source/dialog/dlgctrl.cxx
    openoffice/trunk/main/svx/source/dialog/fontwork.cxx
    openoffice/trunk/main/svx/source/engine3d/float3d.cxx
    openoffice/trunk/main/svx/source/form/fmmodel.cxx
    openoffice/trunk/main/svx/source/items/drawitem.cxx
    openoffice/trunk/main/svx/source/sidebar/line/LinePropertyPanel.cxx
    openoffice/trunk/main/svx/source/sidebar/line/LinePropertyPanel.hxx
    openoffice/trunk/main/svx/source/sidebar/tools/ColorControl.cxx
    openoffice/trunk/main/svx/source/svdraw/svdmodel.cxx
    openoffice/trunk/main/svx/source/tbxctrls/SvxColorValueSet.cxx
    openoffice/trunk/main/svx/source/tbxctrls/colrctrl.cxx
    openoffice/trunk/main/svx/source/tbxctrls/fillctrl.cxx
    openoffice/trunk/main/svx/source/tbxctrls/linectrl.cxx
    openoffice/trunk/main/svx/source/tbxctrls/tbcontrl.cxx
    openoffice/trunk/main/svx/source/unodraw/XPropertyTable.cxx
    openoffice/trunk/main/svx/source/unodraw/unoctabl.cxx
    openoffice/trunk/main/svx/source/unodraw/unoshape.cxx
    openoffice/trunk/main/svx/source/xoutdev/xattr.cxx
    openoffice/trunk/main/svx/source/xoutdev/xattrbmp.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtabbtmp.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtabcolr.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtabdash.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtabgrdt.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtabhtch.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtable.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtablend.cxx
    openoffice/trunk/main/sw/source/core/draw/drawdoc.cxx
    openoffice/trunk/main/sw/source/ui/app/docsh2.cxx
    openoffice/trunk/main/sw/source/ui/app/docshdrw.cxx
    openoffice/trunk/main/sw/source/ui/app/docshini.cxx
    openoffice/trunk/main/sw/source/ui/config/optpage.cxx
    openoffice/trunk/main/sw/source/ui/misc/pggrid.cxx
    openoffice/trunk/main/sw/source/ui/shells/drawdlg.cxx

Modified: openoffice/trunk/main/chart2/source/controller/dialogs/dlg_View3D.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/chart2/source/controller/dialogs/dlg_View3D.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/chart2/source/controller/dialogs/dlg_View3D.cxx (original)
+++ openoffice/trunk/main/chart2/source/controller/dialogs/dlg_View3D.cxx Sun Apr 28 11:57:18 2013
@@ -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* pPare
     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)) );

Modified: openoffice/trunk/main/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx (original)
+++ openoffice/trunk/main/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx Sun Apr 28 11:57:18 2013
@@ -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
 {
 	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);

Modified: openoffice/trunk/main/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx (original)
+++ openoffice/trunk/main/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx Sun Apr 28 11:57:18 2013
@@ -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

Modified: openoffice/trunk/main/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx (original)
+++ openoffice/trunk/main/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx Sun Apr 28 11:57:18 2013
@@ -89,41 +89,41 @@ ViewElementListProvider::~ViewElementLis
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 
-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();
 }
 
 //-----------------------------------------------------------------------------

Modified: openoffice/trunk/main/chart2/source/controller/inc/ViewElementListProvider.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/chart2/source/controller/inc/ViewElementListProvider.hxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/chart2/source/controller/inc/ViewElementListProvider.hxx (original)
+++ openoffice/trunk/main/chart2/source/controller/inc/ViewElementListProvider.hxx Sun Apr 28 11:57:18 2013
@@ -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;

Modified: openoffice/trunk/main/chart2/source/controller/inc/dlg_View3D.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/chart2/source/controller/inc/dlg_View3D.hxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/chart2/source/controller/inc/dlg_View3D.hxx (original)
+++ openoffice/trunk/main/chart2/source/controller/inc/dlg_View3D.hxx Sun Apr 28 11:57:18 2013
@@ -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)

Modified: openoffice/trunk/main/chart2/source/controller/main/ChartController_Properties.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/chart2/source/controller/main/ChartController_Properties.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/chart2/source/controller/main/ChartController_Properties.cxx (original)
+++ openoffice/trunk/main/chart2/source/controller/main/ChartController_Properties.cxx Sun Apr 28 11:57:18 2013
@@ -840,7 +840,7 @@ void SAL_CALL ChartController::executeDi
         // /--
         //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();
         // \--

Modified: openoffice/trunk/main/chart2/source/controller/main/DrawCommandDispatch.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/chart2/source/controller/main/DrawCommandDispatch.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/chart2/source/controller/main/DrawCommandDispatch.cxx (original)
+++ openoffice/trunk/main/chart2/source/controller/main/DrawCommandDispatch.cxx Sun Apr 28 11:57:18 2013
@@ -114,14 +114,14 @@ bool DrawCommandDispatch::isFeatureSuppo
 ::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();

Modified: openoffice/trunk/main/chart2/source/controller/main/ShapeController.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/chart2/source/controller/main/ShapeController.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/chart2/source/controller/main/ShapeController.cxx (original)
+++ openoffice/trunk/main/chart2/source/controller/main/ShapeController.cxx Sun Apr 28 11:57:18 2013
@@ -323,10 +323,7 @@ void ShapeController::executeDispatch_Fo
                     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();

Modified: openoffice/trunk/main/chart2/source/inc/chartview/DrawModelWrapper.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/chart2/source/inc/chartview/DrawModelWrapper.hxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/chart2/source/inc/chartview/DrawModelWrapper.hxx (original)
+++ openoffice/trunk/main/chart2/source/inc/chartview/DrawModelWrapper.hxx Sun Apr 28 11:57:18 2013
@@ -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 );

Modified: openoffice/trunk/main/chart2/source/view/main/DrawModelWrapper.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/chart2/source/view/main/DrawModelWrapper.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/chart2/source/view/main/DrawModelWrapper.cxx (original)
+++ openoffice/trunk/main/chart2/source/view/main/DrawModelWrapper.cxx Sun Apr 28 11:57:18 2013
@@ -334,29 +334,29 @@ const SfxItemPool& DrawModelWrapper::Get
 {
     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 )

Modified: openoffice/trunk/main/cui/source/dialogs/sdrcelldlg.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/dialogs/sdrcelldlg.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/dialogs/sdrcelldlg.cxx (original)
+++ openoffice/trunk/main/cui/source/dialogs/sdrcelldlg.cxx Sun Apr 28 11:57:18 2013
@@ -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( 
 	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 );

Modified: openoffice/trunk/main/cui/source/factory/dlgfact.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/factory/dlgfact.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/factory/dlgfact.cxx (original)
+++ openoffice/trunk/main/cui/source/factory/dlgfact.cxx Sun Apr 28 11:57:18 2013
@@ -905,11 +905,6 @@ String AbstractSvxAreaTabDialog_Impl::Ge
 	return pDlg->GetText();
 }
 
-void AbstractSvxAreaTabDialog_Impl::DontDeleteColorTable()
-{
-	return pDlg->DontDeleteColorTable();
-}
-
 void AbstractSvxPostItDialog_Impl::SetText( const XubString& rStr )
 {
 	pDlg->SetText( rStr );

Modified: openoffice/trunk/main/cui/source/factory/dlgfact.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/factory/dlgfact.hxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/factory/dlgfact.hxx (original)
+++ openoffice/trunk/main/cui/source/factory/dlgfact.hxx Sun Apr 28 11:57:18 2013
@@ -511,7 +511,6 @@ class AbstractSvxAreaTabDialog_Impl :pub
 		//From class Window.
     virtual void		SetText( const XubString& rStr );
     virtual String   	GetText() const;
-	virtual void	 DontDeleteColorTable() ;
 };
 //add for SvxAreaTabDialog end
 

Modified: openoffice/trunk/main/cui/source/inc/cuitabarea.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/inc/cuitabarea.hxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/inc/cuitabarea.hxx (original)
+++ openoffice/trunk/main/cui/source/inc/cuitabarea.hxx Sun Apr 28 11:57:18 2013
@@ -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();
 };
 

Modified: openoffice/trunk/main/cui/source/inc/cuitabline.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/inc/cuitabline.hxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/inc/cuitabline.hxx (original)
+++ openoffice/trunk/main/cui/source/inc/cuitabline.hxx Sun Apr 28 11:57:18 2013
@@ -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                SetNewLineEndList( XLineEndList* pInLst)
-							{ pNewLineEndList = pInLst; }
-	XLineEndList*       GetNewLineEndList() const { return pNewLineEndList; }
-	const XLineEndList* GetLineEndList() const { return pLineEndList; }
-
-	void				SetNewColorTable( XColorList* pColTab ) { mpNewColorTab = pColTab; }
-	XColorList*        GetNewColorTable() const { return mpNewColorTab; }
-	const XColorList*  GetColorTable() const { return pColorTab; }
+	void SetNewDashList( XDashListSharedPtr aInLst) { maNewDashList = aInLst; }
+	XDashListSharedPtr GetNewDashList() const { return maNewDashList; }
+	const XDashListSharedPtr GetDashList() const { return maDashList; }
+
+	void SetNewLineEndList( XLineEndListSharedPtr aInLst) { maNewLineEndList = aInLst; }
+	XLineEndListSharedPtr GetNewLineEndList() const { return maNewLineEndList; }
+	const XLineEndListSharedPtr GetLineEndList() const { return maLineEndList; }
+
+	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; }
 

Modified: openoffice/trunk/main/cui/source/inc/sdrcelldlg.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/inc/sdrcelldlg.hxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/inc/sdrcelldlg.hxx (original)
+++ openoffice/trunk/main/cui/source/inc/sdrcelldlg.hxx Sun Apr 28 11:57:18 2013
@@ -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();

Modified: openoffice/trunk/main/cui/source/inc/treeopt.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/inc/treeopt.hxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/inc/treeopt.hxx (original)
+++ openoffice/trunk/main/cui/source/inc/treeopt.hxx Sun Apr 28 11:57:18 2013
@@ -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);

Modified: openoffice/trunk/main/cui/source/options/optchart.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/options/optchart.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/options/optchart.cxx (original)
+++ openoffice/trunk/main/cui/source/options/optchart.cxx Sun Apr 28 11:57:18 2013
@@ -73,7 +73,7 @@ SvxDefaultColorOptPage::SvxDefaultColorO
 	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::~SvxDefaultColor
 	pChartOptions->Commit();
 
 	delete pColorConfig;
-	delete pColorTab;
 	delete pChartOptions;
 }
 
@@ -135,14 +134,14 @@ void __EXPORT SvxDefaultColorOptPage::Re
 
 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::FillColorBo
 
 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;

Modified: openoffice/trunk/main/cui/source/options/optchart.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/options/optchart.hxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/options/optchart.hxx (original)
+++ openoffice/trunk/main/cui/source/options/optchart.hxx Sun Apr 28 11:57:18 2013
@@ -61,7 +61,7 @@ private:
 
 	SvxChartOptions*		pChartOptions;
 	SvxChartColorTableItem*	pColorConfig;
-	XColorList*			pColorTab;
+	XColorListSharedPtr     maColorTab;
 
 	DECL_LINK( ResetToDefaults, void * );
 	DECL_LINK( ListClickedHdl, ChartColorLB * );

Modified: openoffice/trunk/main/cui/source/options/optcolor.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/options/optcolor.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/options/optcolor.cxx (original)
+++ openoffice/trunk/main/cui/source/options/optcolor.cxx Sun Apr 28 11:57:18 2013
@@ -945,11 +945,11 @@ ColorConfigWindow_Impl::ColorConfigWindo
         }
     }
 
-    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() );
 	}
 

Modified: openoffice/trunk/main/cui/source/options/treeopt.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/options/treeopt.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/options/treeopt.cxx (original)
+++ openoffice/trunk/main/cui/source/options/treeopt.cxx Sun Apr 28 11:57:18 2013
@@ -561,7 +561,7 @@ sal_Bool OfaOptionsTreeListBox::Collapse
     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, SelectH
                 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 ) );
 				}
 			}

Modified: openoffice/trunk/main/cui/source/tabpages/backgrnd.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/backgrnd.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/backgrnd.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/backgrnd.cxx Sun Apr 28 11:57:18 2013
@@ -1197,31 +1197,24 @@ void SvxBackgroundTabPage::FillColorValu
 {
 	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);

Modified: openoffice/trunk/main/cui/source/tabpages/border.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/border.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/border.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/border.cxx Sun Apr 28 11:57:18 2013
@@ -338,7 +338,7 @@ SvxBorderTabPage::SvxBorderTabPage( Wind
 	// 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( Wind
     {
         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 );

Modified: openoffice/trunk/main/cui/source/tabpages/chardlg.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/chardlg.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/chardlg.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/chardlg.cxx Sun Apr 28 11:57:18 2013
@@ -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 );

Modified: openoffice/trunk/main/cui/source/tabpages/numpages.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/numpages.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/numpages.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/numpages.cxx Sun Apr 28 11:57:18 2013
@@ -1609,31 +1609,27 @@ void 	SvxNumOptionsTabPage::Reset( const
 	{
 		SfxObjectShell* pDocSh = SfxObjectShell::Current();
 		DBG_ASSERT( pDocSh, "DocShell not found!" );
-		XColorList* pColorTable = NULL;
-		FASTBOOL bKillTable = sal_False;
-		if ( pDocSh )
+		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;

Modified: openoffice/trunk/main/cui/source/tabpages/tabarea.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/tabarea.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/tabarea.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/tabarea.cxx Sun Apr 28 11:57:18 2013
@@ -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_
 	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_
 
 		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_
 		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_
 		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_
 		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_
 		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;
 

Modified: openoffice/trunk/main/cui/source/tabpages/tabline.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/tabline.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/tabline.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/tabline.cxx Sun Apr 28 11:57:18 2013
@@ -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_
 	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_
 		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_
 		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_
 
 		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_
 		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;
 */

Modified: openoffice/trunk/main/cui/source/tabpages/tparea.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/tparea.cxx?rev=1476756&r1=1476755&r2=1476756&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/tparea.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/tparea.cxx Sun Apr 28 11:57:18 2013
@@ -660,10 +660,10 @@ SvxAreaTabPage::SvxAreaTabPage( Window* 
     
     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* 
 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
 	{
 		*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
 			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
 			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
 			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
 				// 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( Sf
                 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( Sf
                 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( Sf
                 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 SfxIte
 					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
 
 	// 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, ClickGradient
 
 	// 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, ModifyGradien
     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, ClickHatching
 
 	// 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, ModifyHatchin
     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, ClickBitmapHd
 
 	// 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, ModifyBitmapH
     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()));