diff options
author | Christian Lippka <cl@openoffice.org> | 2010-06-17 16:10:42 +0200 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2010-06-17 16:10:42 +0200 |
commit | 84fa472bdcc239199974d1ec92e31652989af516 (patch) | |
tree | b6034bf9f4637f368a0dfb6ae446a697cf7e8210 /svx | |
parent | d63595b8f91f6dbe9a1cf05892ef98cb118fb4b2 (diff) |
#i97336# check if text shape actually has text
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/properties/textproperties.cxx | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index 0af0cadc47..7a040297c6 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 ); + } } } } |