diff options
author | Christian Lippka <cl@openoffice.org> | 2001-11-05 12:58:43 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2001-11-05 12:58:43 +0000 |
commit | 04bc41b648d7ae5de35cb209afd4d2bdca8b8b58 (patch) | |
tree | 886749616eed9c2500d0225e4dc8f2e3db45ef09 /svx | |
parent | 7c0468c6935608965543aba488d2dadeaa6c7b36 (diff) |
#90330# use outliner cache at the model
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/unodraw/unoshtxt.cxx | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index cf747155fa63..5b1b633e518c 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unoshtxt.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: cl $ $Date: 2001-08-22 14:22:45 $ + * last change: $Author: cl $ $Date: 2001-11-05 13:58:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -128,8 +128,8 @@ private: oslInterlockedCount maRefCount; SdrObject* mpObject; - Outliner* mpOutliner; - SvxTextForwarder* mpTextForwarder; + SdrOutliner* mpOutliner; + SvxOutlinerForwarder* mpTextForwarder; BOOL mbDataValid; BOOL mbDestroyed; BOOL mbIsLocked; @@ -184,7 +184,17 @@ SvxTextEditSourceImpl::~SvxTextEditSourceImpl() EndListening( *mpObject->GetModel() ); delete mpTextForwarder; - delete mpOutliner; + if( mpOutliner ) + { + if( mpObject->GetModel() ) + { + mpObject->GetModel()->disposeOutliner( mpOutliner ); + } + else + { + delete mpOutliner; + } + } } //------------------------------------------------------------------------ @@ -240,7 +250,14 @@ void SvxTextEditSourceImpl::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if( mpOutliner ) { - delete mpOutliner; + if( mpObject->GetModel() ) + { + mpObject->GetModel()->disposeOutliner( mpOutliner ); + } + else + { + delete mpOutliner; + } mpOutliner = NULL; } } @@ -269,10 +286,13 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetTextForwarder() if( pTextObj && pTextObj->IsTextFrame() && pTextObj->GetTextKind() == OBJ_OUTLINETEXT ) nOutlMode = OUTLINERMODE_OUTLINEOBJECT; SdrModel* pModel = mpObject->GetModel(); + + mpOutliner = pModel->createOutliner( nOutlMode ); +/* mpOutliner = SdrMakeOutliner( nOutlMode, pModel ); Outliner& aDrawOutliner = pModel->GetDrawOutliner(); mpOutliner->SetCalcFieldValueHdl( aDrawOutliner.GetCalcFieldValueHdl() ); - +*/ if( mbIsLocked ) { ((EditEngine*)&(mpOutliner->GetEditEngine()))->SetUpdateMode( sal_False ); @@ -299,6 +319,8 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetTextForwarder() if( mpObject && !mbDataValid ) { + mpTextForwarder->flushCache(); + OutlinerParaObject* mpOutlinerParaObject = NULL; BOOL bTextEditActive = FALSE; SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, mpObject ); |