summaryrefslogtreecommitdiffstats
path: root/svx/source/dialog/measctrl.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2003-11-24 15:35:01 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2003-11-24 15:35:01 +0000
commitbcb1a49973387bba377093ac18e6158b9c128098 (patch)
tree31bd8ba34986f49730b88e8ac2a43138b2c7f71c /svx/source/dialog/measctrl.cxx
parentINTEGRATION: CWS aw003 (1.9.202); FILE MERGED (diff)
downloadcore-bcb1a49973387bba377093ac18e6158b9c128098.tar.gz
core-bcb1a49973387bba377093ac18e6158b9c128098.zip
INTEGRATION: CWS aw003 (1.3.202); FILE MERGED
2003/10/30 14:15:10 aw 1.3.202.4: #111111# No one is deleting the MeasureObj? This is not only an error but also a memory leak (!). Main problem is that this object is still listening to a StyleSheet of the model which was set. Thus, if You want to keep the obnject, set the modfel to 0L, if object is not needed (seems to be the case here), delete it. 2003/10/07 12:16:38 aw 1.3.202.3: #111097# 2003/07/25 16:30:38 aw 1.3.202.2: #110094# Changed Paint() to DoPaintObject() for identifying reasons 2003/06/06 12:59:07 aw 1.3.202.1: #109820# 2nd run of changes for ItemSet isolation
Diffstat (limited to 'svx/source/dialog/measctrl.cxx')
-rw-r--r--svx/source/dialog/measctrl.cxx27
1 files changed, 16 insertions, 11 deletions
diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx
index 82534cf8eee2..f9fb5f3545d6 100644
--- a/svx/source/dialog/measctrl.cxx
+++ b/svx/source/dialog/measctrl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: measctrl.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: cl $ $Date: 2002-06-06 09:08:03 $
+ * last change: $Author: rt $ $Date: 2003-11-24 16:35:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -112,10 +112,8 @@ SvxXMeasurePreview::SvxXMeasurePreview
pModel = new SdrModel();
pMeasureObj->SetModel( pModel );
-//-/ pMeasureObj->SetAttributes( rInAttrs, FALSE );
-//-/ SdrBroadcastItemChange aItemChange(*pMeasureObj);
- pMeasureObj->SetItemSetAndBroadcast(rInAttrs);
-//-/ pMeasureObj->BroadcastItemChange(aItemChange);
+ //pMeasureObj->SetItemSetAndBroadcast(rInAttrs);
+ pMeasureObj->SetMergedItemSetAndBroadcast(rInAttrs);
SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
@@ -131,6 +129,15 @@ SvxXMeasurePreview::SvxXMeasurePreview
SvxXMeasurePreview::~SvxXMeasurePreview()
{
delete pExtOutDev;
+
+ // #111111#
+ // No one is deleting the MeasureObj? This is not only an error but also
+ // a memory leak (!). Main problem is that this object is still listening to
+ // a StyleSheet of the model which was set. Thus, if You want to keep the obnject,
+ // set the modfel to 0L, if object is not needed (seems to be the case here),
+ // delete it.
+ delete pMeasureObj;
+
delete pModel;
}
@@ -144,7 +151,7 @@ void SvxXMeasurePreview::Paint( const Rectangle& rRect )
{
SdrPaintInfoRec aInfoRec;
- pMeasureObj->Paint( *pExtOutDev, aInfoRec );
+ pMeasureObj->SingleObjectPainter( *pExtOutDev, aInfoRec ); // #110094#-17
}
/*************************************************************************
@@ -155,10 +162,8 @@ void SvxXMeasurePreview::Paint( const Rectangle& rRect )
void SvxXMeasurePreview::SetAttributes( const SfxItemSet& rInAttrs )
{
-//-/ pMeasureObj->SetAttributes( rInAttrs, FALSE );
-//-/ SdrBroadcastItemChange aItemChange(*pMeasureObj);
- pMeasureObj->SetItemSetAndBroadcast(rInAttrs);
-//-/ pMeasureObj->BroadcastItemChange(aItemChange);
+ //pMeasureObj->SetItemSetAndBroadcast(rInAttrs);
+ pMeasureObj->SetMergedItemSetAndBroadcast(rInAttrs);
Invalidate();
}