Index: sw/source/ui/table/tautofmt.cxx =================================================================== RCS file: /cvs/sw/sw/source/ui/table/tautofmt.cxx,v retrieving revision 1.19 diff -u -r1.19 tautofmt.cxx --- sw/source/ui/table/tautofmt.cxx 16 Sep 2006 23:22:00 -0000 1.19 +++ sw/source/ui/table/tautofmt.cxx 23 Apr 2007 13:38:52 -0000 @@ -49,6 +49,9 @@ #ifndef _MSGBOX_HXX //autogen #include #endif +#ifndef _SV_SVAPP_HXX +#include +#endif #ifndef _ZFORLIST_HXX //autogen #include #endif @@ -122,6 +125,7 @@ SvtScriptedTextHelper aScriptedText; svx::frame::Array maArray; /// Implementation to draw the frame borders. BOOL bFitWidth; + BOOL bRTL; Size aPrvSize; long nLabelColWidth; long nDataColWidth1; @@ -621,6 +625,7 @@ aScriptedText ( aVD ), aCurData ( aEmptyStr ), bFitWidth ( FALSE ), + bRTL (Application::GetSettings().GetLayoutRTL()), aStrJan ( SW_RES( STR_JAN ) ), aStrFeb ( SW_RES( STR_FEB ) ), aStrMar ( SW_RES( STR_MAR ) ), @@ -709,7 +714,10 @@ 4, 5, 6, 5, 7, 12, 13, 14, 13, 15 }; - return pnFmtMap[ maArray.GetCellIndex( nCol, nRow ) ]; + BYTE nIndex = static_cast< BYTE >( maArray.GetCellIndex( nCol, nRow ) ); + if (bRTL) + nIndex = (nIndex / 5) * 5 + 4 - (nIndex % 5); + return pnFmtMap[ nIndex ]; } const SvxBoxItem& AutoFmtPreview::GetBoxItem( size_t nCol, size_t nRow ) const @@ -734,7 +742,8 @@ double nVal; String cellString; BYTE nIndex = static_cast< BYTE >( maArray.GetCellIndex( nCol, nRow ) ); - + if (bRTL) + nIndex = (nIndex / 5) * 5 + 4 - (nIndex % 5); switch( nIndex ) { case 1: cellString = aStrJan; break; @@ -860,7 +869,9 @@ // horizontal //----------- /* if ( eJustification != SC_HOR_JUSTIFY_STANDARD )*/ - if (aCurData.IsJustify()) + if( bRTL ) + aPos.X() += nRightX; + else if (aCurData.IsJustify()) { USHORT nHorPos = (USHORT) ((cellRect.GetWidth()-aStrSize.Width())/2);