From cc7090d4a96f70b56920302a48895100a0d7c671 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Thu, 17 Jun 2010 16:10:42 +0200 Subject: #i97336# check if text shape actually has text --- svx/source/sdr/properties/textproperties.cxx | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'svx') diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index 348c319e256e..091656e1f261 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -185,18 +185,21 @@ namespace sdr { SdrText* pText = rObj.getText( nCount ); OutlinerParaObject* pParaObj = pText->GetOutlinerParaObject(); - rOutliner.SetText(*pParaObj); - sal_uInt32 nParaCount(rOutliner.GetParagraphCount()); - - if(nParaCount) + if( pParaObj ) { - ESelection aSelection( 0, 0, EE_PARA_ALL, EE_PARA_ALL); - rOutliner.RemoveAttribs(aSelection, sal_True, 0); + rOutliner.SetText(*pParaObj); + sal_uInt32 nParaCount(rOutliner.GetParagraphCount()); - OutlinerParaObject* pTemp = rOutliner.CreateParaObject(0, (sal_uInt16)nParaCount); - rOutliner.Clear(); + if(nParaCount) + { + ESelection aSelection( 0, 0, EE_PARA_ALL, EE_PARA_ALL); + rOutliner.RemoveAttribs(aSelection, sal_True, 0); - rObj.NbcSetOutlinerParaObjectForText( pTemp, pText ); + OutlinerParaObject* pTemp = rOutliner.CreateParaObject(0, (sal_uInt16)nParaCount); + rOutliner.Clear(); + + rObj.NbcSetOutlinerParaObjectForText( pTemp, pText ); + } } } } -- cgit