Kaydet (Commit) 3d4d89cf authored tarafından Faisal M. Al-Otaibi's avatar Faisal M. Al-Otaibi

Convert option Complex text layout to .ui

convert the complex text layout widget and do the rest
of the conversion.

Change-Id: I8d928284e9532dfbc2f5e8d7d59f789de7865925
üst 963737d4
...@@ -54,7 +54,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\ ...@@ -54,7 +54,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/options/optasian.src \ cui/source/options/optasian.src \
cui/source/options/optchart.src \ cui/source/options/optchart.src \
cui/source/options/optcolor.src \ cui/source/options/optcolor.src \
cui/source/options/optctl.src \
cui/source/options/optdict.src \ cui/source/options/optdict.src \
cui/source/options/optfltr.src \ cui/source/options/optfltr.src \
cui/source/options/optgdlg.src \ cui/source/options/optgdlg.src \
......
...@@ -43,6 +43,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ ...@@ -43,6 +43,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/optadvancedpage \ cui/uiconfig/ui/optadvancedpage \
cui/uiconfig/ui/optappearancepage \ cui/uiconfig/ui/optappearancepage \
cui/uiconfig/ui/optbrowserpage \ cui/uiconfig/ui/optbrowserpage \
cui/uiconfig/ui/optctlpage \
cui/uiconfig/ui/optemailpage \ cui/uiconfig/ui/optemailpage \
cui/uiconfig/ui/optfltrpage \ cui/uiconfig/ui/optfltrpage \
cui/uiconfig/ui/optfontspage \ cui/uiconfig/ui/optfontspage \
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "optctl.hxx" #include "optctl.hxx"
#include <dialmgr.hxx> #include <dialmgr.hxx>
#include "optctl.hrc"
#include <cuires.hrc> #include <cuires.hrc>
#include <svl/ctloptions.hxx> #include <svl/ctloptions.hxx>
...@@ -27,40 +26,35 @@ ...@@ -27,40 +26,35 @@
IMPL_LINK_NOARG(SvxCTLOptionsPage, SequenceCheckingCB_Hdl) IMPL_LINK_NOARG(SvxCTLOptionsPage, SequenceCheckingCB_Hdl)
{ {
sal_Bool bIsSequenceChecking = m_aSequenceCheckingCB.IsChecked(); sal_Bool bIsSequenceChecking = m_pSequenceCheckingCB->IsChecked();
m_aRestrictedCB.Enable( bIsSequenceChecking ); m_pRestrictedCB->Enable( bIsSequenceChecking );
m_aTypeReplaceCB.Enable( bIsSequenceChecking ); m_pTypeReplaceCB->Enable( bIsSequenceChecking );
// #i48117#: by default restricted and type&replace have to be switched on // #i48117#: by default restricted and type&replace have to be switched on
if(bIsSequenceChecking) if(bIsSequenceChecking)
{ {
m_aTypeReplaceCB.Check( sal_True ); m_pTypeReplaceCB->Check( sal_True );
m_aRestrictedCB.Check( sal_True ); m_pRestrictedCB->Check( sal_True );
} }
return 0; return 0;
} }
SvxCTLOptionsPage::SvxCTLOptionsPage( Window* pParent, const SfxItemSet& rSet ) : SvxCTLOptionsPage::SvxCTLOptionsPage( Window* pParent, const SfxItemSet& rSet ) :
SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_OPTIONS_CTL ), rSet ), SfxTabPage( pParent, "OptCTLPage", "cui/ui/optctlpage.ui", rSet )
m_aSequenceCheckingFL ( this, CUI_RES( FL_SEQUENCECHECKING ) ),
m_aSequenceCheckingCB ( this, CUI_RES( CB_SEQUENCECHECKING ) ),
m_aRestrictedCB ( this, CUI_RES( CB_RESTRICTED ) ),
m_aTypeReplaceCB ( this, CUI_RES( CB_TYPE_REPLACE ) ),
m_aCursorControlFL ( this, CUI_RES( FL_CURSORCONTROL ) ),
m_aMovementFT ( this, CUI_RES( FT_MOVEMENT ) ),
m_aMovementLogicalRB ( this, CUI_RES( RB_MOVEMENT_LOGICAL ) ),
m_aMovementVisualRB ( this, CUI_RES( RB_MOVEMENT_VISUAL ) ),
m_aGeneralFL ( this, CUI_RES( FL_GENERAL ) ),
m_aNumeralsFT ( this, CUI_RES( FT_NUMERALS ) ),
m_aNumeralsLB ( this, CUI_RES( LB_NUMERALS ) )
{ {
FreeResource(); get( m_pSequenceCheckingCB, "sequencechecking");
get( m_pRestrictedCB, "restricted");
get( m_pTypeReplaceCB, "typeandreplace");
get( m_pMovementLogicalRB, "movementlogical");
get( m_pMovementVisualRB, "movementvisual");
get( m_pNumeralsLB, "numerals");
m_aSequenceCheckingCB.SetClickHdl( LINK( this, SvxCTLOptionsPage, SequenceCheckingCB_Hdl ) ); m_pSequenceCheckingCB->SetClickHdl( LINK( this, SvxCTLOptionsPage, SequenceCheckingCB_Hdl ) );
m_aNumeralsLB.SetDropDownLineCount( m_aNumeralsLB.GetEntryCount() ); m_pNumeralsLB->SetDropDownLineCount( m_pNumeralsLB->GetEntryCount() );
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
SvxCTLOptionsPage::~SvxCTLOptionsPage() SvxCTLOptionsPage::~SvxCTLOptionsPage()
...@@ -78,30 +72,30 @@ sal_Bool SvxCTLOptionsPage::FillItemSet( SfxItemSet& ) ...@@ -78,30 +72,30 @@ sal_Bool SvxCTLOptionsPage::FillItemSet( SfxItemSet& )
SvtCTLOptions aCTLOptions; SvtCTLOptions aCTLOptions;
// Sequence checking // Sequence checking
sal_Bool bChecked = m_aSequenceCheckingCB.IsChecked(); sal_Bool bChecked = m_pSequenceCheckingCB->IsChecked();
if ( bChecked != m_aSequenceCheckingCB.GetSavedValue() ) if ( bChecked != m_pSequenceCheckingCB->GetSavedValue() )
{ {
aCTLOptions.SetCTLSequenceChecking( bChecked ); aCTLOptions.SetCTLSequenceChecking( bChecked );
bModified = sal_True; bModified = sal_True;
} }
bChecked = m_aRestrictedCB.IsChecked(); bChecked = m_pRestrictedCB->IsChecked();
if( bChecked != m_aRestrictedCB.GetSavedValue() ) if( bChecked != m_pRestrictedCB->GetSavedValue() )
{ {
aCTLOptions.SetCTLSequenceCheckingRestricted( bChecked ); aCTLOptions.SetCTLSequenceCheckingRestricted( bChecked );
bModified = sal_True; bModified = sal_True;
} }
bChecked = m_aTypeReplaceCB.IsChecked(); bChecked = m_pTypeReplaceCB->IsChecked();
if( bChecked != m_aTypeReplaceCB.GetSavedValue()) if( bChecked != m_pTypeReplaceCB->GetSavedValue())
{ {
aCTLOptions.SetCTLSequenceCheckingTypeAndReplace(bChecked); aCTLOptions.SetCTLSequenceCheckingTypeAndReplace(bChecked);
bModified = sal_True; bModified = sal_True;
} }
sal_Bool bLogicalChecked = m_aMovementLogicalRB.IsChecked(); sal_Bool bLogicalChecked = m_pMovementLogicalRB->IsChecked();
sal_Bool bVisualChecked = m_aMovementVisualRB.IsChecked(); sal_Bool bVisualChecked = m_pMovementVisualRB->IsChecked();
if ( bLogicalChecked != m_aMovementLogicalRB.GetSavedValue() || if ( bLogicalChecked != m_pMovementLogicalRB->GetSavedValue() ||
bVisualChecked != m_aMovementVisualRB.GetSavedValue() ) bVisualChecked != m_pMovementVisualRB->GetSavedValue() )
{ {
SvtCTLOptions::CursorMovement eMovement = SvtCTLOptions::CursorMovement eMovement =
bLogicalChecked ? SvtCTLOptions::MOVEMENT_LOGICAL : SvtCTLOptions::MOVEMENT_VISUAL; bLogicalChecked ? SvtCTLOptions::MOVEMENT_LOGICAL : SvtCTLOptions::MOVEMENT_VISUAL;
...@@ -109,8 +103,8 @@ sal_Bool SvxCTLOptionsPage::FillItemSet( SfxItemSet& ) ...@@ -109,8 +103,8 @@ sal_Bool SvxCTLOptionsPage::FillItemSet( SfxItemSet& )
bModified = sal_True; bModified = sal_True;
} }
sal_uInt16 nPos = m_aNumeralsLB.GetSelectEntryPos(); sal_uInt16 nPos = m_pNumeralsLB->GetSelectEntryPos();
if ( nPos != m_aNumeralsLB.GetSavedValue() ) if ( nPos != m_pNumeralsLB->GetSavedValue() )
{ {
aCTLOptions.SetCTLTextNumerals( (SvtCTLOptions::TextNumerals)nPos ); aCTLOptions.SetCTLTextNumerals( (SvtCTLOptions::TextNumerals)nPos );
bModified = sal_True; bModified = sal_True;
...@@ -123,19 +117,19 @@ void SvxCTLOptionsPage::Reset( const SfxItemSet& ) ...@@ -123,19 +117,19 @@ void SvxCTLOptionsPage::Reset( const SfxItemSet& )
{ {
SvtCTLOptions aCTLOptions; SvtCTLOptions aCTLOptions;
m_aSequenceCheckingCB.Check( aCTLOptions.IsCTLSequenceChecking() ); m_pSequenceCheckingCB->Check( aCTLOptions.IsCTLSequenceChecking() );
m_aRestrictedCB.Check( aCTLOptions.IsCTLSequenceCheckingRestricted() ); m_pRestrictedCB->Check( aCTLOptions.IsCTLSequenceCheckingRestricted() );
m_aTypeReplaceCB.Check( aCTLOptions.IsCTLSequenceCheckingTypeAndReplace() ); m_pTypeReplaceCB->Check( aCTLOptions.IsCTLSequenceCheckingTypeAndReplace() );
SvtCTLOptions::CursorMovement eMovement = aCTLOptions.GetCTLCursorMovement(); SvtCTLOptions::CursorMovement eMovement = aCTLOptions.GetCTLCursorMovement();
switch ( eMovement ) switch ( eMovement )
{ {
case SvtCTLOptions::MOVEMENT_LOGICAL : case SvtCTLOptions::MOVEMENT_LOGICAL :
m_aMovementLogicalRB.Check(); m_pMovementLogicalRB->Check();
break; break;
case SvtCTLOptions::MOVEMENT_VISUAL : case SvtCTLOptions::MOVEMENT_VISUAL :
m_aMovementVisualRB.Check(); m_pMovementVisualRB->Check();
break; break;
default: default:
...@@ -143,19 +137,19 @@ void SvxCTLOptionsPage::Reset( const SfxItemSet& ) ...@@ -143,19 +137,19 @@ void SvxCTLOptionsPage::Reset( const SfxItemSet& )
} }
sal_uInt16 nPos = (sal_uInt16)aCTLOptions.GetCTLTextNumerals(); sal_uInt16 nPos = (sal_uInt16)aCTLOptions.GetCTLTextNumerals();
DBG_ASSERT( nPos < m_aNumeralsLB.GetEntryCount(), "SvxCTLOptionsPage::Reset(): invalid numerals enum" ); DBG_ASSERT( nPos < m_pNumeralsLB->GetEntryCount(), "SvxCTLOptionsPage::Reset(): invalid numerals enum" );
m_aNumeralsLB.SelectEntryPos( nPos ); m_pNumeralsLB->SelectEntryPos( nPos );
m_aSequenceCheckingCB.SaveValue(); m_pSequenceCheckingCB->SaveValue();
m_aRestrictedCB.SaveValue(); m_pRestrictedCB->SaveValue();
m_aTypeReplaceCB.SaveValue(); m_pTypeReplaceCB->SaveValue();
m_aMovementLogicalRB.SaveValue(); m_pMovementLogicalRB->SaveValue();
m_aMovementVisualRB.SaveValue(); m_pMovementVisualRB->SaveValue();
m_aNumeralsLB.SaveValue(); m_pNumeralsLB->SaveValue();
sal_Bool bIsSequenceChecking = m_aSequenceCheckingCB.IsChecked(); sal_Bool bIsSequenceChecking = m_pSequenceCheckingCB->IsChecked();
m_aRestrictedCB.Enable( bIsSequenceChecking ); m_pRestrictedCB->Enable( bIsSequenceChecking );
m_aTypeReplaceCB.Enable( bIsSequenceChecking ); m_pTypeReplaceCB->Enable( bIsSequenceChecking );
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef _SVX_OPTCTL_HRC
#define _SVX_OPTCTL_HRC
#include <svtools/controldims.hrc>
#define FL_SEQUENCECHECKING 10
#define CB_SEQUENCECHECKING 11
#define CB_RESTRICTED 12
#define CB_TYPE_REPLACE 13
#define FL_CURSORCONTROL 20
#define FT_MOVEMENT 21
#define RB_MOVEMENT_LOGICAL 22
#define RB_MOVEMENT_VISUAL 23
#define FL_GENERAL 30
#define FT_NUMERALS 31
#define LB_NUMERALS 32
#define EXTRA_SPACE_Y 16
#define ROW_0 (RSC_SP_TBPG_INNERBORDER_TOP)
#define ROW_1 (ROW_0+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_SPACE_Y)
#define ROW_2 (ROW_1+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y)
#define ROW_3 (ROW_2+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_CTRL_Y+EXTRA_SPACE_Y)
#define ROW_4 (ROW_3+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_SPACE_Y)
#define ROW_5 (ROW_4+(RSC_CD_RADIOBUTTON_HEIGHT-RSC_CD_FIXEDTEXT_HEIGHT)/2)
#define ROW_6 (ROW_5+RSC_CD_RADIOBUTTON_HEIGHT+RSC_SP_CTRL_Y+EXTRA_SPACE_Y)
#define ROW_7 (ROW_6+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_SPACE_Y)
#define ROW_8 (ROW_7+(RSC_CD_DROPDOWN_HEIGHT-RSC_CD_FIXEDTEXT_HEIGHT)/2)
#endif // #ifndef _SVX_OPTCTL_HRC
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -29,19 +29,15 @@ ...@@ -29,19 +29,15 @@
class SvxCTLOptionsPage : public SfxTabPage class SvxCTLOptionsPage : public SfxTabPage
{ {
private: private:
FixedLine m_aSequenceCheckingFL;
CheckBox m_aSequenceCheckingCB; CheckBox* m_pSequenceCheckingCB;
CheckBox m_aRestrictedCB; CheckBox* m_pRestrictedCB;
CheckBox m_aTypeReplaceCB; CheckBox* m_pTypeReplaceCB;
FixedLine m_aCursorControlFL; RadioButton* m_pMovementLogicalRB;
FixedText m_aMovementFT; RadioButton* m_pMovementVisualRB;
RadioButton m_aMovementLogicalRB;
RadioButton m_aMovementVisualRB; ListBox* m_pNumeralsLB;
FixedLine m_aGeneralFL;
FixedText m_aNumeralsFT;
ListBox m_aNumeralsLB;
DECL_LINK( SequenceCheckingCB_Hdl, void* ); DECL_LINK( SequenceCheckingCB_Hdl, void* );
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "optctl.hrc"
#include "helpid.hrc"
#include <cuires.hrc>
#include <sfx2/sfx.hrc>
TabPage RID_SVXPAGE_OPTIONS_CTL
{
HelpId = HID_OPTIONS_CTL ;
OutputSize = TRUE ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
SVLook = TRUE ;
Hide = TRUE ;
Text [ en-US ] = "Complex Text Layout" ;
FixedLine FL_SEQUENCECHECKING
{
Pos = MAP_APPFONT ( 6, ROW_0 ) ;
Size = MAP_APPFONT ( 248 , RSC_CD_FIXEDLINE_HEIGHT ) ;
Text [ en-US ] = "Sequence checking";
};
CheckBox CB_SEQUENCECHECKING
{
HelpID = "cui:CheckBox:RID_SVXPAGE_OPTIONS_CTL:CB_SEQUENCECHECKING";
Pos = MAP_APPFONT ( 12, ROW_1 ) ;
Size = MAP_APPFONT ( 236 , RSC_CD_CHECKBOX_HEIGHT ) ;
Text [ en-US ] = "Use se~quence checking";
};
CheckBox CB_RESTRICTED
{
HelpID = "cui:CheckBox:RID_SVXPAGE_OPTIONS_CTL:CB_RESTRICTED";
Pos = MAP_APPFONT ( 18, ROW_2 );
Size = MAP_APPFONT ( 236, RSC_CD_CHECKBOX_HEIGHT );
Text[ en-US ] = "Restricted";
};
CheckBox CB_TYPE_REPLACE
{
HelpID = "cui:CheckBox:RID_SVXPAGE_OPTIONS_CTL:CB_TYPE_REPLACE";
Pos = MAP_APPFONT ( 18, ROW_2+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y );
Size = MAP_APPFONT ( 236, RSC_CD_CHECKBOX_HEIGHT );
Text[ en-US ] = "~Type and replace";
};
FixedLine FL_CURSORCONTROL
{
Pos = MAP_APPFONT ( 6, ROW_3 ) ;
Size = MAP_APPFONT ( 248 , RSC_CD_FIXEDLINE_HEIGHT ) ;
Text [ en-US ] = "Cursor control";
};
FixedText FT_MOVEMENT
{
Pos = MAP_APPFONT ( 12, ROW_5 ) ;
Size = MAP_APPFONT ( 90 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Movement";
};
RadioButton RB_MOVEMENT_LOGICAL
{
HelpID = "cui:RadioButton:RID_SVXPAGE_OPTIONS_CTL:RB_MOVEMENT_LOGICAL";
Pos = MAP_APPFONT ( 105, ROW_4 ) ;
Size = MAP_APPFONT ( 69 , RSC_CD_RADIOBUTTON_HEIGHT ) ;
Text [ en-US ] = "Lo~gical";
};
RadioButton RB_MOVEMENT_VISUAL
{
HelpID = "cui:RadioButton:RID_SVXPAGE_OPTIONS_CTL:RB_MOVEMENT_VISUAL";
Pos = MAP_APPFONT ( 177, ROW_4 ) ;
Size = MAP_APPFONT ( 69 , RSC_CD_RADIOBUTTON_HEIGHT ) ;
Text [ en-US ] = "~Visual";
};
FixedLine FL_GENERAL
{
Pos = MAP_APPFONT ( 6, ROW_6 ) ;
Size = MAP_APPFONT ( 248 , RSC_CD_FIXEDLINE_HEIGHT ) ;
Text [ en-US ] = "General options";
};
FixedText FT_NUMERALS
{
Pos = MAP_APPFONT ( 12, ROW_8 ) ;
Size = MAP_APPFONT ( 90 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "~Numerals";
};
ListBox LB_NUMERALS
{
HelpID = "cui:ListBox:RID_SVXPAGE_OPTIONS_CTL:LB_NUMERALS";
Pos = MAP_APPFONT ( 105, ROW_7 ) ;
Size = MAP_APPFONT ( 69 , 3*RSC_CD_DROPDOWN_HEIGHT ) ;
DropDown = TRUE ;
Border = TRUE ;
StringList [ en-US ]=
{
< "Arabic" ; > ;
< "Hindi" ; > ;
< "System" ; > ;
< "Context" ; > ;
};
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment