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

(-)tabvwsh4.cxx (-1 / +20 lines)
Lines 51-56 Link Here
51
#ifndef _SVX_FONTWORK_BAR_HXX
51
#ifndef _SVX_FONTWORK_BAR_HXX
52
#include <svx/fontworkbar.hxx>
52
#include <svx/fontworkbar.hxx>
53
#endif
53
#endif
54
#include <svx/algitem.hxx>
54
#include <svx/boxitem.hxx>
55
#include <svx/boxitem.hxx>
55
#include <svx/fmshell.hxx>
56
#include <svx/fmshell.hxx>
56
#include <svx/sizeitem.hxx>
57
#include <svx/sizeitem.hxx>
Lines 118-123 Link Here
118
#include "sc.hrc" //CHINA001
119
#include "sc.hrc" //CHINA001
119
#include "scabstdlg.hxx" //CHINA001
120
#include "scabstdlg.hxx" //CHINA001
120
121
122
#ifndef _SVX_FRMDIRITEM_HXX
123
#include <svx/frmdiritem.hxx>
124
#endif
125
121
void ActivateOlk( ScViewData* pViewData );
126
void ActivateOlk( ScViewData* pViewData );
122
void DeActivateOlk( ScViewData* pViewData );
127
void DeActivateOlk( ScViewData* pViewData );
123
128
Lines 1801-1807 Link Here
1801
		if ( pDocSh->IsEmpty() )
1806
		if ( pDocSh->IsEmpty() )
1802
		{
1807
		{
1803
			// set first sheet's RTL flag (following will already be initialized because of SetDocVisible)
1808
			// set first sheet's RTL flag (following will already be initialized because of SetDocVisible)
1804
			pDoc->SetLayoutRTL( 0, ScGlobal::IsSystemRTL() );
1809
            BOOL bSystemRTL = ScGlobal::IsSystemRTL();
1810
            pDoc->SetLayoutRTL( 0, bSystemRTL );
1811
1812
            if ( bSystemRTL )
1813
            {
1814
                // #i72028# set default cell alignment to "right"
1815
                // (only for new documents created with a RTL locale)
1816
                ScStyleSheet* pStyleSheet = static_cast<ScStyleSheet*>( pDoc->GetStyleSheetPool()->Find(
1817
                                                ScGlobal::GetRscString(STR_STYLENAME_STANDARD),
1818
                                                SFX_STYLE_FAMILY_PARA ) );
1819
                DBG_ASSERT( pStyleSheet, "style not found" );
1820
                if ( pStyleSheet )
1821
                    pStyleSheet->GetItemSet().Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_RIGHT, ATTR_HOR_JUSTIFY ) );
1822
                    pStyleSheet->GetItemSet().Put( SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, ATTR_WRITINGDIR ) ); // RTL direction causes havoc with formula entry, so make it LTR
1823
            }
1805
1824
1806
			// append additional sheets (not for OLE object)
1825
			// append additional sheets (not for OLE object)
1807
			if ( pDocSh->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
1826
			if ( pDocSh->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )

Return to issue 72028