Lines 49-54
Link Here
|
49 |
#ifndef _MSGBOX_HXX //autogen |
49 |
#ifndef _MSGBOX_HXX //autogen |
50 |
#include <vcl/msgbox.hxx> |
50 |
#include <vcl/msgbox.hxx> |
51 |
#endif |
51 |
#endif |
|
|
52 |
#ifndef _SV_SVAPP_HXX |
53 |
#include <vcl/svapp.hxx> |
54 |
#endif |
52 |
#ifndef _ZFORLIST_HXX //autogen |
55 |
#ifndef _ZFORLIST_HXX //autogen |
53 |
#include <svtools/zforlist.hxx> |
56 |
#include <svtools/zforlist.hxx> |
54 |
#endif |
57 |
#endif |
Lines 70-75
Link Here
|
70 |
#ifndef SVX_FRAMELINKARRAY_HXX |
73 |
#ifndef SVX_FRAMELINKARRAY_HXX |
71 |
#include <svx/framelinkarray.hxx> |
74 |
#include <svx/framelinkarray.hxx> |
72 |
#endif |
75 |
#endif |
|
|
76 |
#ifndef _DOCSH_HXX |
77 |
#include <docsh.hxx> |
78 |
#endif |
73 |
|
79 |
|
74 |
#ifndef _SWMODULE_HXX |
80 |
#ifndef _SWMODULE_HXX |
75 |
#include "swmodule.hxx" |
81 |
#include "swmodule.hxx" |
Lines 122-127
Link Here
|
122 |
SvtScriptedTextHelper aScriptedText; |
128 |
SvtScriptedTextHelper aScriptedText; |
123 |
svx::frame::Array maArray; /// Implementation to draw the frame borders. |
129 |
svx::frame::Array maArray; /// Implementation to draw the frame borders. |
124 |
BOOL bFitWidth; |
130 |
BOOL bFitWidth; |
|
|
131 |
BOOL bRTL; |
125 |
Size aPrvSize; |
132 |
Size aPrvSize; |
126 |
long nLabelColWidth; |
133 |
long nLabelColWidth; |
127 |
long nDataColWidth1; |
134 |
long nDataColWidth1; |
Lines 635-640
Link Here
|
635 |
nRowHeight ( (aPrvSize.Height() - 4) / 5 ), |
642 |
nRowHeight ( (aPrvSize.Height() - 4) / 5 ), |
636 |
m_xMSF ( comphelper::getProcessServiceFactory() ) |
643 |
m_xMSF ( comphelper::getProcessServiceFactory() ) |
637 |
{ |
644 |
{ |
|
|
645 |
SwDocShell* pDocShell = (SwDocShell*) SfxObjectShell::Current(); |
646 |
SwFEShell* pFEShell = pDocShell->GetFEShell(); |
647 |
if (!pFEShell->GetCurTabColNum()) // We haven't created the table yet |
648 |
bRTL = Application::GetSettings().GetLayoutRTL(); |
649 |
else |
650 |
bRTL = pFEShell->IsTableRightToLeft(); |
638 |
DBG_ASSERT( m_xMSF.is(), "AutoFmtPreview: no MultiServiceFactory"); |
651 |
DBG_ASSERT( m_xMSF.is(), "AutoFmtPreview: no MultiServiceFactory"); |
639 |
if ( m_xMSF.is() ) |
652 |
if ( m_xMSF.is() ) |
640 |
{ |
653 |
{ |
Lines 709-715
Link Here
|
709 |
4, 5, 6, 5, 7, |
722 |
4, 5, 6, 5, 7, |
710 |
12, 13, 14, 13, 15 |
723 |
12, 13, 14, 13, 15 |
711 |
}; |
724 |
}; |
712 |
return pnFmtMap[ maArray.GetCellIndex( nCol, nRow ) ]; |
725 |
return pnFmtMap[ maArray.GetCellIndex( nCol, nRow, bRTL ) ]; |
713 |
} |
726 |
} |
714 |
|
727 |
|
715 |
const SvxBoxItem& AutoFmtPreview::GetBoxItem( size_t nCol, size_t nRow ) const |
728 |
const SvxBoxItem& AutoFmtPreview::GetBoxItem( size_t nCol, size_t nRow ) const |
Lines 733-739
Link Here
|
733 |
ULONG nNum; |
746 |
ULONG nNum; |
734 |
double nVal; |
747 |
double nVal; |
735 |
String cellString; |
748 |
String cellString; |
736 |
BYTE nIndex = static_cast< BYTE >( maArray.GetCellIndex( nCol, nRow ) ); |
749 |
BYTE nIndex = static_cast< BYTE >( maArray.GetCellIndex( nCol, nRow, bRTL ) ); |
737 |
|
750 |
|
738 |
switch( nIndex ) |
751 |
switch( nIndex ) |
739 |
{ |
752 |
{ |
Lines 860-866
Link Here
|
860 |
// horizontal |
873 |
// horizontal |
861 |
//----------- |
874 |
//----------- |
862 |
/* if ( eJustification != SC_HOR_JUSTIFY_STANDARD )*/ |
875 |
/* if ( eJustification != SC_HOR_JUSTIFY_STANDARD )*/ |
863 |
if (aCurData.IsJustify()) |
876 |
if( bRTL ) |
|
|
877 |
aPos.X() += nRightX; |
878 |
else if (aCurData.IsJustify()) |
864 |
{ |
879 |
{ |
865 |
USHORT nHorPos = (USHORT) |
880 |
USHORT nHorPos = (USHORT) |
866 |
((cellRect.GetWidth()-aStrSize.Width())/2); |
881 |
((cellRect.GetWidth()-aStrSize.Width())/2); |