View | Details | Raw Unified | Return to issue 119728
Collapse All | Expand All

(-)filter/inc/filter/msfilter/escherex.hxx (+14 lines)
Lines 43-48 Link Here
43
#include <com/sun/star/drawing/Hatch.hpp>
43
#include <com/sun/star/drawing/Hatch.hpp>
44
#include <svx/msdffdef.hxx>
44
#include <svx/msdffdef.hxx>
45
#include "filter/msfilter/msfilterdllapi.h"
45
#include "filter/msfilter/msfilterdllapi.h"
46
#include <com/sun/star/text/WritingMode.hpp>//i119728
47
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
48
#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
46
49
47
		/*Record Name       FBT-Value   Instance                  Contents                                                          Wrd Exl PPt Ver*/
50
		/*Record Name       FBT-Value   Instance                  Contents                                                          Wrd Exl PPt Ver*/
48
// In der Mickysoft-Doku heissen die msofbt... statt ESCHER_...
51
// In der Mickysoft-Doku heissen die msofbt... statt ESCHER_...
Lines 1438-1443 Link Here
1438
1441
1439
class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable
1442
class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable
1440
{
1443
{
1444
	private://i119728
1445
		::com::sun::star::text::WritingMode		eWM;
1446
		::com::sun::star::drawing::TextVerticalAdjust	eVA;
1447
		::com::sun::star::drawing::TextHorizontalAdjust	eHA;
1441
    protected:
1448
    protected:
1442
        typedef ::std::auto_ptr< ImplEscherExSdr > ImplEscherExSdrPtr;
1449
        typedef ::std::auto_ptr< ImplEscherExSdr > ImplEscherExSdrPtr;
1443
1450
Lines 1465-1470 Link Here
1465
    explicit            EscherEx( const EscherExGlobalRef& rxGlobal, SvStream& rOutStrm );
1472
    explicit            EscherEx( const EscherExGlobalRef& rxGlobal, SvStream& rOutStrm );
1466
    virtual             ~EscherEx();
1473
    virtual             ~EscherEx();
1467
1474
1475
	void setWriteMode( ::com::sun::star::text::WritingMode wm){ eWM = wm;}
1476
	void setVertAdjust( ::com::sun::star::drawing::TextVerticalAdjust vajust){ eVA = vajust;}
1477
	void setHoriAdjust( ::com::sun::star::drawing::TextHorizontalAdjust hajst){ eHA = hajst;}
1478
	
1479
	::com::sun::star::text::WritingMode getWriteMode(){ return eWM;}
1480
	::com::sun::star::drawing::TextVerticalAdjust getVertAdjust(){ return eVA;}
1481
	::com::sun::star::drawing::TextHorizontalAdjust getHoriAdjust(){ return eHA;}
1468
    /** Creates and returns a new shape identifier, updates the internal shape
1482
    /** Creates and returns a new shape identifier, updates the internal shape
1469
        counters and registers the identifier in the DGG cluster table. */
1483
        counters and registers the identifier in the DGG cluster table. */
1470
    inline sal_uInt32   GenerateShapeId() { return mxGlobal->GenerateShapeId( mnCurrentDg, mbEscherSpgr ); }
1484
    inline sal_uInt32   GenerateShapeId() { return mxGlobal->GenerateShapeId( mnCurrentDg, mbEscherSpgr ); }
(-)filter/source/msfilter/eschesdo.cxx (+16 lines)
Lines 50-55 Link Here
50
#include <comphelper/extract.hxx>
50
#include <comphelper/extract.hxx>
51
#include <svtools/fltcall.hxx>
51
#include <svtools/fltcall.hxx>
52
#include <vcl/cvtgrf.hxx>
52
#include <vcl/cvtgrf.hxx>
53
#include <com/sun/star/text/WritingMode.hpp>//i119728
53
54
54
using ::rtl::OUString;
55
using ::rtl::OUString;
55
using namespace ::com::sun::star;
56
using namespace ::com::sun::star;
Lines 280-285 Link Here
280
					if ( !aPropOpt.IsFontWork() )
281
					if ( !aPropOpt.IsFontWork() )
281
						aPropOpt.CreateTextProperties( rObj.mXPropSet, mpEscherEx->QueryTextID(
282
						aPropOpt.CreateTextProperties( rObj.mXPropSet, mpEscherEx->QueryTextID(
282
							rObj.GetShapeRef(),	rObj.GetShapeId() ), sal_True, sal_False );
283
							rObj.GetShapeRef(),	rObj.GetShapeId() ), sal_True, sal_False );
284
285
					uno::Any aAny;//i119728
286
					text::WritingMode				eWM( text::WritingMode_LR_TB );
287
					drawing::TextVerticalAdjust		eVA( drawing::TextVerticalAdjust_TOP );
288
					drawing::TextHorizontalAdjust	eHA( drawing::TextHorizontalAdjust_LEFT );
289
					if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rObj.mXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "TextWritingMode" ) ), sal_True ) )
290
						aAny >>= eWM;
291
					if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rObj.mXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "TextVerticalAdjust" ) ), sal_True ) )
292
						aAny >>= eVA;
293
					if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rObj.mXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "TextHorizontalAdjust" ) ), sal_True ) )
294
						aAny >>= eHA;
295
					mpEscherEx->setWriteMode(eWM);	
296
					mpEscherEx->setVertAdjust(eVA);
297
					mpEscherEx->setHoriAdjust(eHA);
298
				
283
				}
299
				}
284
			}
300
			}
285
		}
301
		}
(-)sc/source/filter/inc/xcl97rec.hxx (+4 lines)
Lines 27-32 Link Here
27
#include "excrecds.hxx"
27
#include "excrecds.hxx"
28
#include "xcl97esc.hxx"
28
#include "xcl97esc.hxx"
29
#include "xlstyle.hxx"
29
#include "xlstyle.hxx"
30
#include <com/sun/star/text/WritingMode.hpp>
31
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
32
#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
30
33
31
// ============================================================================
34
// ============================================================================
32
35
Lines 173-178 Link Here
173
                                XclTxo( const String& rString, sal_uInt16 nFontIx = EXC_FONT_APP );
176
                                XclTxo( const String& rString, sal_uInt16 nFontIx = EXC_FONT_APP );
174
                                XclTxo( const XclExpRoot& rRoot, const SdrTextObj& rEditObj );
177
                                XclTxo( const XclExpRoot& rRoot, const SdrTextObj& rEditObj );
175
                                XclTxo( const XclExpRoot& rRoot, const EditTextObject& rEditObj, SdrObject* pCaption );
178
                                XclTxo( const XclExpRoot& rRoot, const EditTextObject& rEditObj, SdrObject* pCaption );
179
								XclTxo( const XclExpRoot& rRoot, const SdrTextObj& rEditObj, ::com::sun::star::drawing::TextHorizontalAdjust eHA, ::com::sun::star::drawing::TextVerticalAdjust eVA, ::com::sun::star::text::WritingMode eWM );
176
180
177
    inline void                 SetHorAlign( sal_uInt8 nHorAlign ) { mnHorAlign = nHorAlign; }
181
    inline void                 SetHorAlign( sal_uInt8 nHorAlign ) { mnHorAlign = nHorAlign; }
178
    inline void                 SetVerAlign( sal_uInt8 nVerAlign ) { mnVerAlign = nVerAlign; }
182
    inline void                 SetVerAlign( sal_uInt8 nVerAlign ) { mnVerAlign = nVerAlign; }
(-)sc/source/filter/xcl97/xcl97rec.cxx (-1 / +55 lines)
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" );

Return to issue 119728