summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJian Fang Zhang <zhangjf@apache.org>2012-09-04 01:31:37 +0000
committerJian Fang Zhang <zhangjf@apache.org>2012-09-04 01:31:37 +0000
commit32754ae9b1b1e399e2371c4b7d349c60f994a034 (patch)
tree45996ad908dd681dc41df0d8e5327cb7fae17c90
parentba47a717e009b2b497cbccfca2872e66f9ecb130 (diff)
#i120668#, when calling SdrModel::Setxxx(), need free old object at first
Found by: zhangjf Patch by: zhangjf
Notes
-rw-r--r--svx/inc/svx/svdmodel.hxx12
-rw-r--r--svx/source/svdraw/svdmodel.cxx10
2 files changed, 16 insertions, 6 deletions
diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx
index be85f8781c63..51f7335eebaa 100644
--- a/svx/inc/svx/svdmodel.hxx
+++ b/svx/inc/svx/svdmodel.hxx
@@ -658,17 +658,17 @@ public:
const Link& GetIOProgressHdl() const { return aIOProgressLink; }
// Zugriffsmethoden fuer Paletten, Listen und Tabellen
- void SetColorTable(XColorTable* pTable) { pColorTable=pTable; }
+ void SetColorTable(XColorTable* pTable) ;
XColorTable* GetColorTable() const { return pColorTable; }
- void SetDashList(XDashList* pList) { pDashList=pList; }
+ void SetDashList(XDashList* pList) ;
XDashList* GetDashList() const { return pDashList; }
- void SetLineEndList(XLineEndList* pList) { pLineEndList=pList; }
+ void SetLineEndList(XLineEndList* pList) ;
XLineEndList* GetLineEndList() const { return pLineEndList; }
- void SetHatchList(XHatchList* pList) { pHatchList=pList; }
+ void SetHatchList(XHatchList* pList) ;
XHatchList* GetHatchList() const { return pHatchList; }
- void SetGradientList(XGradientList* pList) { pGradientList=pList; }
+ void SetGradientList(XGradientList* pList) ;
XGradientList* GetGradientList() const { return pGradientList; }
- void SetBitmapList(XBitmapList* pList) { pBitmapList=pList; }
+ void SetBitmapList(XBitmapList* pList) ;
XBitmapList* GetBitmapList() const { return pBitmapList; }
// Der StyleSheetPool wird der DrawingEngine nur bekanntgemacht.
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 00370613a258..0f198f6bd0de 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -2182,6 +2182,16 @@ void SdrModel::SetDrawingLayerPoolDefaults()
pItemPool->SetPoolDefaultItem( XLineColorItem(aNullStr,aNullLineCol) );
}
+//
+// i120668, move from the header files, add delete action
+//
+void SdrModel::SetColorTable(XColorTable* pTable) { delete pColorTable; pColorTable=pTable; }
+void SdrModel::SetDashList(XDashList* pList) { delete pDashList; pDashList=pList; }
+void SdrModel::SetLineEndList(XLineEndList* pList) { delete pLineEndList; pLineEndList=pList; }
+void SdrModel::SetHatchList(XHatchList* pList) { delete pHatchList; pHatchList=pList; }
+void SdrModel::SetGradientList(XGradientList* pList) { delete pGradientList; pGradientList=pList; }
+void SdrModel::SetBitmapList(XBitmapList* pList) { delete pBitmapList; pBitmapList=pList; }
+
////////////////////////////////////////////////////////////////////////////////////////////////////
TYPEINIT1(SdrHint,SfxHint);