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 | cc7090d4a96f70b56920302a48895100a0d7c671 (patch) | |
tree | 15993bd0fbf85921b03edec956c7f55ffa8b65af /svx | |
parent | 79fa123bd79e794dfa9bf57e1df28ff46b16671d (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 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 ); + } } } } |