Lines 224-230
Link Here
|
224 |
pClientTextbox = new XclExpMsoDrawing( mrEscherEx ); |
224 |
pClientTextbox = new XclExpMsoDrawing( mrEscherEx ); |
225 |
mrEscherEx.AddAtom( 0, ESCHER_ClientTextbox ); // TXO record |
225 |
mrEscherEx.AddAtom( 0, ESCHER_ClientTextbox ); // TXO record |
226 |
mrEscherEx.UpdateDffFragmentEnd(); |
226 |
mrEscherEx.UpdateDffFragmentEnd(); |
227 |
pTxo = new XclTxo( rRoot, rObj ); |
227 |
|
|
|
228 |
text::WritingMode eWM = mrEscherEx.getWriteMode();//i119728 |
229 |
drawing::TextHorizontalAdjust eHA = mrEscherEx.getHoriAdjust(); |
230 |
drawing::TextVerticalAdjust eVA = mrEscherEx.getVertAdjust(); |
231 |
if( eWM != text::WritingMode_TB_RL && (eHA == drawing::TextHorizontalAdjust_LEFT || eHA == drawing::TextHorizontalAdjust_RIGHT )) |
232 |
{ |
233 |
pTxo = new XclTxo( rRoot, rObj , eHA, eVA, eWM); |
234 |
} |
235 |
else |
236 |
{ |
237 |
pTxo = new XclTxo( rRoot, rObj ); |
238 |
} |
239 |
|
228 |
} |
240 |
} |
229 |
} |
241 |
} |
230 |
|
242 |
|
Lines 529-534
Link Here
|
529 |
} |
541 |
} |
530 |
} |
542 |
} |
531 |
|
543 |
|
|
|
544 |
|
545 |
XclTxo::XclTxo( const XclExpRoot& rRoot, const SdrTextObj& rTextObj, drawing::TextHorizontalAdjust eHA, drawing::TextVerticalAdjust eVA, text::WritingMode eWM )://i119728 |
546 |
mpString( XclExpStringHelper::CreateString( rRoot, rTextObj ) ), |
547 |
mnRotation( EXC_OBJ_ORIENT_NONE ) |
548 |
{ |
549 |
// additional alignment and orientation items |
550 |
const SfxItemSet& rItemSet = rTextObj.GetMergedItemSet(); |
551 |
|
552 |
if( eWM != text::WritingMode_TB_RL) |
553 |
{ |
554 |
sal_uInt8 nHorAlign = EXC_OBJ_HOR_CENTER; |
555 |
mnVerAlign = EXC_OBJ_VER_TOP; |
556 |
switch( eHA ) |
557 |
{ |
558 |
case drawing::TextHorizontalAdjust_LEFT: nHorAlign = EXC_OBJ_HOR_LEFT; break; |
559 |
case drawing::TextHorizontalAdjust_RIGHT: nHorAlign = EXC_OBJ_HOR_RIGHT; break; |
560 |
default:; |
561 |
} |
562 |
|
563 |
// horizontal alignment |
564 |
if( eHA != drawing::TextHorizontalAdjust_CENTER ) |
565 |
{ |
566 |
SetHorAlign( nHorAlign ); |
567 |
} |
568 |
else |
569 |
{ |
570 |
SetHorAlign( lcl_GetHorAlignFromItemSet( rItemSet ) ); |
571 |
} |
572 |
|
573 |
// vertical alignment |
574 |
SetVerAlign( lcl_GetVerAlignFromItemSet( rItemSet ) ); |
575 |
} |
576 |
|
577 |
// rotation |
578 |
long nAngle = rTextObj.GetRotateAngle(); |
579 |
if( (4500 < nAngle) && (nAngle < 13500) ) |
580 |
mnRotation = EXC_OBJ_ORIENT_90CCW; |
581 |
else if( (22500 < nAngle) && (nAngle < 31500) ) |
582 |
mnRotation = EXC_OBJ_ORIENT_90CW; |
583 |
else |
584 |
mnRotation = EXC_OBJ_ORIENT_NONE; |
585 |
} |
532 |
void XclTxo::SaveCont( XclExpStream& rStrm ) |
586 |
void XclTxo::SaveCont( XclExpStream& rStrm ) |
533 |
{ |
587 |
{ |
534 |
DBG_ASSERT( mpString.get(), "XclTxo::SaveCont - missing string" ); |
588 |
DBG_ASSERT( mpString.get(), "XclTxo::SaveCont - missing string" ); |