summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-03-29 14:47:38 +0000
committerRüdiger Timm <rt@openoffice.org>2005-03-29 14:47:38 +0000
commitc2cf195c4186bb8e5b5b65dd5d69045c635249ac (patch)
treeef05b765105de59b38240978ec1cbc7895208b75 /svx
parent8db2b280d65667077ee3c96581c700b5a6d37749 (diff)
INTEGRATION: CWS sj17 (1.118.62); FILE MERGED
2005/03/21 18:09:38 sj 1.118.62.1: #b6239243# fixed crash with rtl fontwork objects
Diffstat (limited to 'svx')
-rw-r--r--svx/source/msfilter/msdffimp.cxx24
1 files changed, 16 insertions, 8 deletions
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index 6c37995bb5b4..4465b6e14b17 100644
--- a/svx/source/msfilter/msdffimp.cxx
+++ b/svx/source/msfilter/msdffimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: msdffimp.cxx,v $
*
- * $Revision: 1.118 $
+ * $Revision: 1.119 $
*
- * last change: $Author: rt $ $Date: 2005-03-02 09:21:14 $
+ * last change: $Author: rt $ $Date: 2005-03-29 15:47:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -4979,14 +4979,22 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
VirtualDevice aVirDev( 1 );
aVirDev.SetMapMode( MAP_100TH_MM );
sal_uInt32 i, nParagraphs = rOutliner.GetParagraphCount();
- for ( i = 0; i < nParagraphs; i++ )
+ if ( nParagraphs )
{
- BOOL bIsRTL = aVirDev.GetTextIsRTL( rOutliner.GetText( rOutliner.GetParagraph( i ) ), 0, STRING_LEN );
- if ( bIsRTL )
+ sal_Bool bCreateNewParaObject = sal_False;
+ for ( i = 0; i < nParagraphs; i++ )
+ {
+ BOOL bIsRTL = aVirDev.GetTextIsRTL( rOutliner.GetText( rOutliner.GetParagraph( i ) ), 0, STRING_LEN );
+ if ( bIsRTL )
+ {
+ SfxItemSet aSet( rOutliner.GetParaAttribs( i ) );
+ aSet.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) );
+ rOutliner.SetParaAttribs( i, aSet, false );
+ bCreateNewParaObject = sal_True;
+ }
+ }
+ if ( bCreateNewParaObject )
{
- SfxItemSet aSet( rOutliner.GetParaAttribs( i ) );
- aSet.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) );
- rOutliner.SetParaAttribs( i, aSet, false );
OutlinerParaObject* pNewText = rOutliner.CreateParaObject();
rOutliner.Init( OUTLINERMODE_TEXTOBJECT );
((SdrObjCustomShape*)pRet)->NbcSetOutlinerParaObject( pNewText );