From 389ffd8a1e316d63a9fdbe7eb776a83bb44745bb Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Wed, 8 Nov 2000 10:19:18 +0000 Subject: [PATCH] fixed clearing of text from empty presentation objects --- sd/source/ui/unoidl/unoobj.cxx | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 8bacc95075a8..5766059c769c 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unoobj.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: ka $ $Date: 2000-09-21 16:12:08 $ + * last change: $Author: cl $ $Date: 2000-11-08 11:19:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -717,24 +717,18 @@ void SdXShape::SetEmptyPresObj( sal_Bool bEmpty ) throw() { if( pObj->IsEmptyPresObj() != bEmpty ) { - if( bEmpty ) + SdPage* pPage = PTR_CAST(SdPage,pObj->GetPage()); + if(pPage) { - SdPage* pPage = PTR_CAST(SdPage,pObj->GetPage()); - if(pPage) + uno::Reference< text::XTextRange > xTextRange( (drawing::XShape*)this, uno::UNO_QUERY ); + if( xTextRange.is() ) { - uno::Reference< text::XTextRange > xTextRange( (drawing::XShape*)this, uno::UNO_QUERY ); - if( xTextRange.is() ) - { - const OUString aEmptyStr( pPage->GetPresObjText( pPage->GetPresObjKind(pObj) ) ); - xTextRange->setString( aEmptyStr ); - } - } - } - else - { - if ( pObj->ISA(SdrTextObj) ) - ( (SdrTextObj*) pObj)->SetOutlinerParaObject(NULL); + OUString aEmptyStr; + if( bEmpty) + aEmptyStr = pPage->GetPresObjText( pPage->GetPresObjKind(pObj) ); + xTextRange->setString( aEmptyStr ); + } } pObj->SetEmptyPresObj( bEmpty ); }