From 6a0951a9bc564d8e214472bd84aec2971b9e9d64 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 18 Sep 2012 21:26:54 +0100 Subject: convert hard-coded layout of position tabpage to .ui Change-Id: I760ac60a341a9942fef5a911cdb8b5af304ff1ad --- cui/UI_cui.mk | 1 + cui/source/inc/chardlg.hxx | 58 ++--- cui/source/inc/helpid.hrc | 2 - cui/source/tabpages/chardlg.cxx | 421 ++++++++++++++----------------- cui/source/tabpages/chardlg.hrc | 29 --- cui/source/tabpages/chardlg.src | 223 ----------------- cui/uiconfig/ui/positionpage.ui | 532 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 747 insertions(+), 519 deletions(-) create mode 100644 cui/uiconfig/ui/positionpage.ui diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk index 779eef474bbd..f5a9cae4dc51 100644 --- a/cui/UI_cui.mk +++ b/cui/UI_cui.mk @@ -11,6 +11,7 @@ $(eval $(call gb_UI_UI,cui)) $(eval $(call gb_UI_add_uifiles,cui,\ cui/uiconfig/ui/10000 \ + cui/uiconfig/ui/positionpage \ cui/uiconfig/ui/twolinespage \ )) diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index fd30443d039e..dde780763f26 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -280,40 +280,30 @@ class SvxCharPositionPage : public SvxCharBasePage { private: - VclVBox m_aBox; - - FixedLine m_aPositionLine; - - VclGrid m_aPositionGrid; - RadioButton m_aHighPosBtn; - RadioButton m_aNormalPosBtn; - RadioButton m_aLowPosBtn; - FixedText m_aHighLowFT; - MetricField m_aHighLowEdit; - CheckBox m_aHighLowRB; - FixedText m_aFontSizeFT; - MetricField m_aFontSizeEdit; - - FixedLine m_aRotationScalingFL; - - VclHBox m_aRotationBox; - FixedLine m_aScalingFL; - RadioButton m_a0degRB; - RadioButton m_a90degRB; - RadioButton m_a270degRB; - CheckBox m_aFitToLineCB; - - VclHBox m_aScaleBox; - FixedText m_aScaleWidthFT; - MetricField m_aScaleWidthMF; - - FixedLine m_aKerningLine; - - VclHBox m_aKerningBox; - ListBox m_aKerningLB; - FixedText m_aKerningFT; - MetricField m_aKerningEdit; - CheckBox m_aPairKerningBtn; + RadioButton* m_pHighPosBtn; + RadioButton* m_pNormalPosBtn; + RadioButton* m_pLowPosBtn; + FixedText* m_pHighLowFT; + MetricField* m_pHighLowMF; + CheckBox* m_pHighLowRB; + FixedText* m_pFontSizeFT; + MetricField* m_pFontSizeMF; + + VclContainer* m_pRotationContainer; + + FixedText* m_pScalingFT; + FixedText* m_pScalingAndRotationFT; + RadioButton* m_p0degRB; + RadioButton* m_p90degRB; + RadioButton* m_p270degRB; + CheckBox* m_pFitToLineCB; + + MetricField* m_pScaleWidthMF; + + ListBox* m_pKerningLB; + FixedText* m_pKerningFT; + MetricField* m_pKerningMF; + CheckBox* m_pPairKerningBtn; short m_nSuperEsc; short m_nSubEsc; diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc index fb1991fc8a01..508f55630f36 100644 --- a/cui/source/inc/helpid.hrc +++ b/cui/source/inc/helpid.hrc @@ -354,7 +354,6 @@ #define HID_HYPHENATE "CUI_HID_HYPHENATE" #define HID_SVXPAGE_CHAR_NAME "CUI_HID_SVXPAGE_CHAR_NAME" #define HID_SVXPAGE_CHAR_EFFECTS "CUI_HID_SVXPAGE_CHAR_EFFECTS" -#define HID_SVXPAGE_CHAR_POSITION "CUI_HID_SVXPAGE_CHAR_POSITION" #define HID_HYPERLINK_INTERNET "CUI_HID_HYPERLINK_INTERNET" #define HID_HYPERLINK_MAIL "CUI_HID_HYPERLINK_MAIL" #define HID_HYPERLINK_DOCUMENT "CUI_HID_HYPERLINK_DOCUMENT" @@ -370,7 +369,6 @@ #define HID_HYPERLINK_MARKWND_APPLY "CUI_HID_HYPERLINK_MARKWND_APPLY" #define HID_HYPERLINK_MARKWND_CLOSE "CUI_HID_HYPERLINK_MARKWND_CLOSE" #define HID_HYPERLINK_MARKWND_TREE "CUI_HID_HYPERLINK_MARKWND_TREE" -#define HID_SVXPAGE_CHAR_TWOLINES "CUI_HID_SVXPAGE_CHAR_TWOLINES" #define HID_GRFFILTER_EMBOSS_LIGHT "CUI_HID_GRFFILTER_EMBOSS_LIGHT" #define HID_PASTE_DLG "CUI_HID_PASTE_DLG" #define HID_LINKDLG_TABLB "CUI_HID_LINKDLG_TABLB" diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 791f895896d3..35110a5f85a4 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -2797,34 +2797,7 @@ void SvxCharEffectsPage::PageCreated (SfxAllItemSet aSet) // class SvxCharPositionPage --------------------------------------------- SvxCharPositionPage::SvxCharPositionPage( Window* pParent, const SfxItemSet& rInSet ) - : SvxCharBasePage(pParent, CUI_RES(RID_SVXPAGE_CHAR_POSITION), rInSet) - , m_aBox(this, false, 7) - , m_aPositionLine(&m_aBox, CUI_RES(FL_POSITION)) - , m_aPositionGrid(&m_aBox) - , m_aHighPosBtn(&m_aPositionGrid, CUI_RES(RB_HIGHPOS)) - , m_aNormalPosBtn(&m_aPositionGrid, CUI_RES( RB_NORMALPOS)) - , m_aLowPosBtn(&m_aPositionGrid, CUI_RES(RB_LOWPOS)) - , m_aHighLowFT(&m_aPositionGrid, CUI_RES(FT_HIGHLOW)) - , m_aHighLowEdit(&m_aPositionGrid, CUI_RES(ED_HIGHLOW)) - , m_aHighLowRB(&m_aPositionGrid, CUI_RES(CB_HIGHLOW)) - , m_aFontSizeFT(&m_aPositionGrid, CUI_RES(FT_FONTSIZE)) - , m_aFontSizeEdit(&m_aPositionGrid, CUI_RES(ED_FONTSIZE)) - , m_aRotationScalingFL(&m_aBox, CUI_RES(FL_ROTATION_SCALING)) - , m_aRotationBox(&m_aBox, false, 7) - , m_aScalingFL(&m_aRotationBox, CUI_RES(FL_SCALING)) - , m_a0degRB(&m_aRotationBox, CUI_RES(RB_0_DEG)) - , m_a90degRB(&m_aRotationBox, CUI_RES(RB_90_DEG)) - , m_a270degRB(&m_aRotationBox, CUI_RES(RB_270_DEG)) - , m_aFitToLineCB(&m_aRotationBox, CUI_RES(CB_FIT_TO_LINE)) - , m_aScaleBox(&m_aBox, false, 7) - , m_aScaleWidthFT(&m_aScaleBox, CUI_RES(FT_SCALE_WIDTH)) - , m_aScaleWidthMF(&m_aScaleBox, CUI_RES(MF_SCALE_WIDTH)) - , m_aKerningLine(&m_aBox, CUI_RES(FL_KERNING2)) - , m_aKerningBox(&m_aBox, false, 7) - , m_aKerningLB(&m_aKerningBox, CUI_RES(LB_KERNING2)) - , m_aKerningFT(&m_aKerningBox, CUI_RES(FT_KERNING2)) - , m_aKerningEdit(&m_aKerningBox, CUI_RES(ED_KERNING2)) - , m_aPairKerningBtn(&m_aKerningBox, CUI_RES(CB_PAIRKERNING)) + : SvxCharBasePage(pParent, "PositionPage", "cui/ui/positionpage.ui", rInSet) , m_nSuperEsc((short)DFLT_ESC_SUPER) , m_nSubEsc((short)DFLT_ESC_SUB) , m_nScaleWidthItemSetVal(100) @@ -2832,22 +2805,29 @@ SvxCharPositionPage::SvxCharPositionPage( Window* pParent, const SfxItemSet& rIn , m_nSuperProp((sal_uInt8)DFLT_ESC_PROP) , m_nSubProp((sal_uInt8)DFLT_ESC_PROP) { - m_aBox.set_expand(true); + get(m_pHighPosBtn, "superscript"); + get(m_pNormalPosBtn, "normal"); + get(m_pLowPosBtn, "subscript"); + get(m_pHighLowFT, "raiselower"); + get(m_pHighLowMF, "raiselowersb"); + get(m_pHighLowRB, "automatic"); + get(m_pFontSizeFT, "relativefontsize"); + get(m_pFontSizeMF, "fontsizesb"); + get(m_pRotationContainer, "rotationcontainer"); + get(m_pScalingFT, "rotate"); + get(m_pScalingAndRotationFT, "rotateandscale"); + get(m_p0degRB, "0deg"); + get(m_p90degRB, "90deg"); + get(m_p270degRB, "270deg"); + get(m_pFitToLineCB, "fittoline"); + get(m_pScaleWidthMF, "scalewidthsb"); + get(m_pKerningLB, "kerninglb"); + get(m_pKerningFT, "kerningft"); + get(m_pKerningMF, "kerningsb"); + get(m_pPairKerningBtn, "pairkerning"); - m_aPositionGrid.set_column_spacing(7); - m_aPositionGrid.set_row_spacing(2); - - setGridAttach(m_aHighPosBtn, 0, 0); - setGridAttach(m_aHighLowFT, 1, 0); - setGridAttach(m_aHighLowEdit, 2, 0); - setGridAttach(m_aHighLowRB, 3, 0); - setGridAttach(m_aNormalPosBtn, 0, 1); - setGridAttach(m_aFontSizeFT, 1, 1); - setGridAttach(m_aFontSizeEdit, 2, 1); - setGridAttach(m_aLowPosBtn, 0, 2); + get(m_pPreviewWin, "preview"); - makeWidgets(&m_aBox, CUI_RES(RID_SVXPAGE_CHAR_POSITION), WIN_POS_PREVIEW, FT_POS_FONTTYPE); - FreeResource(); Initialize(); } @@ -2862,44 +2842,42 @@ void SvxCharPositionPage::Initialize() GetPreviewCJKFont().SetSize( Size( 0, 240 ) ); GetPreviewCTLFont().SetSize( Size( 0, 240 ) ); - m_aNormalPosBtn.Check(); - PositionHdl_Impl( &m_aNormalPosBtn ); - m_aKerningLB.SelectEntryPos( 0 ); + m_pNormalPosBtn->Check(); + PositionHdl_Impl( m_pNormalPosBtn ); + m_pKerningLB->SelectEntryPos( 0 ); KerningSelectHdl_Impl( NULL ); Link aLink = LINK( this, SvxCharPositionPage, PositionHdl_Impl ); - m_aHighPosBtn.SetClickHdl( aLink ); - m_aNormalPosBtn.SetClickHdl( aLink ); - m_aLowPosBtn.SetClickHdl( aLink ); + m_pHighPosBtn->SetClickHdl( aLink ); + m_pNormalPosBtn->SetClickHdl( aLink ); + m_pLowPosBtn->SetClickHdl( aLink ); aLink = LINK( this, SvxCharPositionPage, RotationHdl_Impl ); - m_a0degRB .SetClickHdl( aLink ); - m_a90degRB .SetClickHdl( aLink ); - m_a270degRB.SetClickHdl( aLink ); + m_p0degRB->SetClickHdl( aLink ); + m_p90degRB->SetClickHdl( aLink ); + m_p270degRB->SetClickHdl( aLink ); aLink = LINK( this, SvxCharPositionPage, FontModifyHdl_Impl ); - m_aHighLowEdit.SetModifyHdl( aLink ); - m_aFontSizeEdit.SetModifyHdl( aLink ); + m_pHighLowMF->SetModifyHdl( aLink ); + m_pFontSizeMF->SetModifyHdl( aLink ); aLink = LINK( this, SvxCharPositionPage, LoseFocusHdl_Impl ); - m_aHighLowEdit.SetLoseFocusHdl( aLink ); - m_aFontSizeEdit.SetLoseFocusHdl( aLink ); + m_pHighLowMF->SetLoseFocusHdl( aLink ); + m_pFontSizeMF->SetLoseFocusHdl( aLink ); - m_aHighLowRB.SetClickHdl( LINK( this, SvxCharPositionPage, AutoPositionHdl_Impl ) ); - m_aFitToLineCB.SetClickHdl( LINK( this, SvxCharPositionPage, FitToLineHdl_Impl ) ); - m_aKerningLB.SetSelectHdl( LINK( this, SvxCharPositionPage, KerningSelectHdl_Impl ) ); - m_aKerningEdit.SetModifyHdl( LINK( this, SvxCharPositionPage, KerningModifyHdl_Impl ) ); - m_aPairKerningBtn.SetClickHdl( LINK( this, SvxCharPositionPage, PairKerningHdl_Impl ) ); - m_aScaleWidthMF.SetModifyHdl( LINK( this, SvxCharPositionPage, ScaleWidthModifyHdl_Impl ) ); + m_pHighLowRB->SetClickHdl( LINK( this, SvxCharPositionPage, AutoPositionHdl_Impl ) ); + m_pFitToLineCB->SetClickHdl( LINK( this, SvxCharPositionPage, FitToLineHdl_Impl ) ); + m_pKerningLB->SetSelectHdl( LINK( this, SvxCharPositionPage, KerningSelectHdl_Impl ) ); + m_pKerningMF->SetModifyHdl( LINK( this, SvxCharPositionPage, KerningModifyHdl_Impl ) ); + m_pPairKerningBtn->SetClickHdl( LINK( this, SvxCharPositionPage, PairKerningHdl_Impl ) ); + m_pScaleWidthMF->SetModifyHdl( LINK( this, SvxCharPositionPage, ScaleWidthModifyHdl_Impl ) ); } SvxCharPositionPage::~SvxCharPositionPage() { - delete m_pPreviewWin, m_pPreviewWin = NULL; - delete m_pFontTypeFT, m_pFontTypeFT = NULL; + m_pPreviewWin = NULL; //to-do, when all of these tab pages are converted to .ui this and the parent delete can go } - // ----------------------------------------------------------------------- void SvxCharPositionPage::UpdatePreview_Impl( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ) @@ -2926,30 +2904,30 @@ void SvxCharPositionPage::SetEscapement_Impl( sal_uInt16 nEsc ) short nFac = aEscItm.GetEsc() < 0 ? -1 : 1; - m_aHighLowEdit.SetValue( aEscItm.GetEsc() * nFac ); - m_aFontSizeEdit.SetValue( aEscItm.GetProp() ); + m_pHighLowMF->SetValue( aEscItm.GetEsc() * nFac ); + m_pFontSizeMF->SetValue( aEscItm.GetProp() ); if ( SVX_ESCAPEMENT_OFF == nEsc ) { - m_aHighLowFT.Disable(); - m_aHighLowEdit.Disable(); - m_aFontSizeFT.Disable(); - m_aFontSizeEdit.Disable(); - m_aHighLowRB.Disable(); + m_pHighLowFT->Disable(); + m_pHighLowMF->Disable(); + m_pFontSizeFT->Disable(); + m_pFontSizeMF->Disable(); + m_pHighLowRB->Disable(); } else { - m_aFontSizeFT.Enable(); - m_aFontSizeEdit.Enable(); - m_aHighLowRB.Enable(); + m_pFontSizeFT->Enable(); + m_pFontSizeMF->Enable(); + m_pHighLowRB->Enable(); - if ( !m_aHighLowRB.IsChecked() ) + if ( !m_pHighLowRB->IsChecked() ) { - m_aHighLowFT.Enable(); - m_aHighLowEdit.Enable(); + m_pHighLowFT->Enable(); + m_pHighLowMF->Enable(); } else - AutoPositionHdl_Impl( &m_aHighLowRB ); + AutoPositionHdl_Impl( m_pHighLowRB ); } UpdatePreview_Impl( 100, aEscItm.GetProp(), aEscItm.GetEsc() ); @@ -2961,9 +2939,9 @@ IMPL_LINK( SvxCharPositionPage, PositionHdl_Impl, RadioButton*, pBtn ) { sal_uInt16 nEsc = SVX_ESCAPEMENT_OFF; // also when pBtn == NULL - if ( &m_aHighPosBtn == pBtn ) + if ( m_pHighPosBtn == pBtn ) nEsc = SVX_ESCAPEMENT_SUPERSCRIPT; - else if ( &m_aLowPosBtn == pBtn ) + else if ( m_pLowPosBtn == pBtn ) nEsc = SVX_ESCAPEMENT_SUBSCRIPT; SetEscapement_Impl( nEsc ); @@ -2975,11 +2953,11 @@ IMPL_LINK( SvxCharPositionPage, PositionHdl_Impl, RadioButton*, pBtn ) IMPL_LINK( SvxCharPositionPage, RotationHdl_Impl, RadioButton*, pBtn ) { sal_Bool bEnable = sal_False; - if (&m_a90degRB == pBtn || &m_a270degRB == pBtn) + if (m_p90degRB == pBtn || m_p270degRB == pBtn) bEnable = sal_True; else - OSL_ENSURE( &m_a0degRB == pBtn, "unexpected button" ); - m_aFitToLineCB.Enable( bEnable ); + OSL_ENSURE( m_p0degRB == pBtn, "unexpected button" ); + m_pFitToLineCB->Enable( bEnable ); return 0; } @@ -2987,9 +2965,9 @@ IMPL_LINK( SvxCharPositionPage, RotationHdl_Impl, RadioButton*, pBtn ) IMPL_LINK_NOARG(SvxCharPositionPage, FontModifyHdl_Impl) { - sal_uInt8 nEscProp = (sal_uInt8)m_aFontSizeEdit.GetValue(); - short nEsc = (short)m_aHighLowEdit.GetValue(); - nEsc *= m_aLowPosBtn.IsChecked() ? -1 : 1; + sal_uInt8 nEscProp = (sal_uInt8)m_pFontSizeMF->GetValue(); + short nEsc = (short)m_pHighLowMF->GetValue(); + nEsc *= m_pLowPosBtn->IsChecked() ? -1 : 1; UpdatePreview_Impl( 100, nEscProp, nEsc ); return 0; } @@ -3000,13 +2978,13 @@ IMPL_LINK( SvxCharPositionPage, AutoPositionHdl_Impl, CheckBox*, pBox ) { if ( pBox->IsChecked() ) { - m_aHighLowFT.Disable(); - m_aHighLowEdit.Disable(); + m_pHighLowFT->Disable(); + m_pHighLowMF->Disable(); } else - PositionHdl_Impl( m_aHighPosBtn.IsChecked() ? &m_aHighPosBtn - : m_aLowPosBtn.IsChecked() ? &m_aLowPosBtn - : &m_aNormalPosBtn ); + PositionHdl_Impl( m_pHighPosBtn->IsChecked() ? m_pHighPosBtn + : m_pLowPosBtn->IsChecked() ? m_pLowPosBtn + : m_pNormalPosBtn ); return 0; } @@ -3014,12 +2992,12 @@ IMPL_LINK( SvxCharPositionPage, AutoPositionHdl_Impl, CheckBox*, pBox ) IMPL_LINK( SvxCharPositionPage, FitToLineHdl_Impl, CheckBox*, pBox ) { - if ( &m_aFitToLineCB == pBox) + if (m_pFitToLineCB == pBox) { sal_uInt16 nVal = m_nScaleWidthInitialVal; - if (m_aFitToLineCB.IsChecked()) + if (m_pFitToLineCB->IsChecked()) nVal = m_nScaleWidthItemSetVal; - m_aScaleWidthMF.SetValue( nVal ); + m_pScaleWidthMF->SetValue( nVal ); m_pPreviewWin->SetFontWidthScale( nVal ); } @@ -3030,30 +3008,30 @@ IMPL_LINK( SvxCharPositionPage, FitToLineHdl_Impl, CheckBox*, pBox ) IMPL_LINK_NOARG(SvxCharPositionPage, KerningSelectHdl_Impl) { - if ( m_aKerningLB.GetSelectEntryPos() > 0 ) + if ( m_pKerningLB->GetSelectEntryPos() > 0 ) { - m_aKerningFT.Enable(); - m_aKerningEdit.Enable(); + m_pKerningFT->Enable(); + m_pKerningMF->Enable(); - if ( m_aKerningLB.GetSelectEntryPos() == 2 ) + if ( m_pKerningLB->GetSelectEntryPos() == 2 ) { // Condensed -> max value == 1/6 of the current font height SvxFont& rFont = GetPreviewFont(); long nMax = rFont.GetSize().Height() / 6; - m_aKerningEdit.SetMax( m_aKerningEdit.Normalize( nMax ), FUNIT_TWIP ); - m_aKerningEdit.SetLast( m_aKerningEdit.GetMax( m_aKerningEdit.GetUnit() ) ); + m_pKerningMF->SetMax( m_pKerningMF->Normalize( nMax ), FUNIT_TWIP ); + m_pKerningMF->SetLast( m_pKerningMF->GetMax( m_pKerningMF->GetUnit() ) ); } else { - m_aKerningEdit.SetMax( 9999 ); - m_aKerningEdit.SetLast( 9999 ); + m_pKerningMF->SetMax( 9999 ); + m_pKerningMF->SetLast( 9999 ); } } else { - m_aKerningEdit.SetValue( 0 ); - m_aKerningFT.Disable(); - m_aKerningEdit.Disable(); + m_pKerningMF->SetValue( 0 ); + m_pKerningFT->Disable(); + m_pKerningMF->Disable(); } KerningModifyHdl_Impl( NULL ); @@ -3065,12 +3043,12 @@ IMPL_LINK_NOARG(SvxCharPositionPage, KerningSelectHdl_Impl) IMPL_LINK_NOARG(SvxCharPositionPage, KerningModifyHdl_Impl) { - long nVal = static_cast(m_aKerningEdit.GetValue()); + long nVal = static_cast(m_pKerningMF->GetValue()); nVal = LogicToLogic( nVal, MAP_POINT, MAP_TWIP ); - long nKern = (short)m_aKerningEdit.Denormalize( nVal ); + long nKern = (short)m_pKerningMF->Denormalize( nVal ); // Condensed? -> then negative - if ( m_aKerningLB.GetSelectEntryPos() == 2 ) + if ( m_pKerningLB->GetSelectEntryPos() == 2 ) nKern *= -1; SvxFont& rFont = GetPreviewFont(); @@ -3096,24 +3074,24 @@ IMPL_LINK_NOARG(SvxCharPositionPage, PairKerningHdl_Impl) IMPL_LINK( SvxCharPositionPage, LoseFocusHdl_Impl, MetricField*, pField ) { #ifdef DBG_UTIL - sal_Bool bHigh = m_aHighPosBtn.IsChecked(); + sal_Bool bHigh = m_pHighPosBtn->IsChecked(); #endif - sal_Bool bLow = m_aLowPosBtn.IsChecked(); + sal_Bool bLow = m_pLowPosBtn->IsChecked(); DBG_ASSERT( bHigh || bLow, "normal position is not valid" ); - if ( &m_aHighLowEdit == pField ) + if ( m_pHighLowMF == pField ) { if ( bLow ) - m_nSubEsc = (short)m_aHighLowEdit.GetValue() * -1; + m_nSubEsc = (short)m_pHighLowMF->GetValue() * -1; else - m_nSuperEsc = (short)m_aHighLowEdit.GetValue(); + m_nSuperEsc = (short)m_pHighLowMF->GetValue(); } - else if ( &m_aFontSizeEdit == pField ) + else if ( m_pFontSizeMF == pField ) { if ( bLow ) - m_nSubProp = (sal_uInt8)m_aFontSizeEdit.GetValue(); + m_nSubProp = (sal_uInt8)m_pFontSizeMF->GetValue(); else - m_nSuperProp = (sal_uInt8)m_aFontSizeEdit.GetValue(); + m_nSuperProp = (sal_uInt8)m_pFontSizeMF->GetValue(); } return 0; } @@ -3122,7 +3100,7 @@ IMPL_LINK( SvxCharPositionPage, LoseFocusHdl_Impl, MetricField*, pField ) IMPL_LINK_NOARG(SvxCharPositionPage, ScaleWidthModifyHdl_Impl) { - m_pPreviewWin->SetFontWidthScale( sal_uInt16( m_aScaleWidthMF.GetValue() ) ); + m_pPreviewWin->SetFontWidthScale( sal_uInt16( m_pScaleWidthMF->GetValue() ) ); return 0; } @@ -3134,14 +3112,14 @@ void SvxCharPositionPage::ActivatePage( const SfxItemSet& rSet ) //the only thing that has to be checked is the max. allowed value for the //condense edit field - if ( m_aKerningLB.GetSelectEntryPos() == 2 ) + if ( m_pKerningLB->GetSelectEntryPos() == 2 ) { // Condensed -> max value == 1/6 of the current font height SvxFont& rFont = GetPreviewFont(); long nMax = rFont.GetSize().Height() / 6; - long nKern = (short)m_aKerningEdit.Denormalize( LogicToLogic( static_cast(m_aKerningEdit.GetValue()), MAP_POINT, MAP_TWIP ) ); - m_aKerningEdit.SetMax( m_aKerningEdit.Normalize( nKern > nMax ? nKern : nMax ), FUNIT_TWIP ); - m_aKerningEdit.SetLast( m_aKerningEdit.GetMax( m_aKerningEdit.GetUnit() ) ); + long nKern = (short)m_pKerningMF->Denormalize( LogicToLogic( static_cast(m_pKerningMF->GetValue()), MAP_POINT, MAP_TWIP ) ); + m_pKerningMF->SetMax( m_pKerningMF->Normalize( nKern > nMax ? nKern : nMax ), FUNIT_TWIP ); + m_pKerningMF->SetLast( m_pKerningMF->GetMax( m_pKerningMF->GetUnit() ) ); } } @@ -3185,10 +3163,10 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) sal_uInt8 nEscProp = 100; sal_uInt8 nProp = 100; - m_aHighLowFT.Disable(); - m_aHighLowEdit.Disable(); - m_aFontSizeFT.Disable(); - m_aFontSizeEdit.Disable(); + m_pHighLowFT->Disable(); + m_pHighLowMF->Disable(); + m_pFontSizeFT->Disable(); + m_pFontSizeMF->Disable(); SvxFont& rFont = GetPreviewFont(); SvxFont& rCJKFont = GetPreviewCJKFont(); @@ -3203,10 +3181,10 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) if ( nEsc != 0 ) { - m_aHighLowFT.Enable(); - m_aHighLowEdit.Enable(); - m_aFontSizeFT.Enable(); - m_aFontSizeEdit.Enable(); + m_pHighLowFT->Enable(); + m_pHighLowMF->Enable(); + m_pFontSizeFT->Enable(); + m_pFontSizeMF->Enable(); short nFac; sal_Bool bAutomatic(sal_False); @@ -3214,7 +3192,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) if ( nEsc > 0 ) { nFac = 1; - m_aHighPosBtn.Check( sal_True ); + m_pHighPosBtn->Check( sal_True ); if ( nEsc == DFLT_ESC_AUTO_SUPER ) { nEsc = DFLT_ESC_SUPER; @@ -3224,40 +3202,40 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) else { nFac = -1; - m_aLowPosBtn.Check( sal_True ); + m_pLowPosBtn->Check( sal_True ); if ( nEsc == DFLT_ESC_AUTO_SUB ) { nEsc = DFLT_ESC_SUB; bAutomatic = sal_True; } } - if (!m_aHighLowRB.IsEnabled()) + if (!m_pHighLowRB->IsEnabled()) { - m_aHighLowRB.Enable(); + m_pHighLowRB->Enable(); } - m_aHighLowRB.Check(bAutomatic); + m_pHighLowRB->Check(bAutomatic); - if ( m_aHighLowRB.IsChecked() ) + if ( m_pHighLowRB->IsChecked() ) { - m_aHighLowFT.Disable(); - m_aHighLowEdit.Disable(); + m_pHighLowFT->Disable(); + m_pHighLowMF->Disable(); } - m_aHighLowEdit.SetValue( m_aHighLowEdit.Normalize( nFac * nEsc ) ); + m_pHighLowMF->SetValue( m_pHighLowMF->Normalize( nFac * nEsc ) ); } else { - m_aNormalPosBtn.Check( sal_True ); - m_aHighLowRB.Check( sal_True ); + m_pNormalPosBtn->Check( sal_True ); + m_pHighLowRB->Check( sal_True ); PositionHdl_Impl( NULL ); } //the height has to be set after the handler is called to keep the value also if the escapement is zero - m_aFontSizeEdit.SetValue( m_aFontSizeEdit.Normalize( nEscProp ) ); + m_pFontSizeMF->SetValue( m_pFontSizeMF->Normalize( nEscProp ) ); } else { - m_aHighPosBtn.Check( sal_False ); - m_aNormalPosBtn.Check( sal_False ); - m_aLowPosBtn.Check( sal_False ); + m_pHighPosBtn->Check( sal_False ); + m_pNormalPosBtn->Check( sal_False ); + m_pLowPosBtn->Check( sal_False ); } // set BspFont @@ -3272,7 +3250,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) SfxMapUnit eUnit = rSet.GetPool()->GetMetric( nWhich ); MapUnit eOrgUnit = (MapUnit)eUnit; MapUnit ePntUnit( MAP_POINT ); - long nBig = static_cast(m_aKerningEdit.Normalize( static_cast(rItem.GetValue()) )); + long nBig = static_cast(m_pKerningMF->Normalize( static_cast(rItem.GetValue()) )); long nKerning = LogicToLogic( nBig, eOrgUnit, ePntUnit ); // set Kerning at the Font, convert into Twips before @@ -3283,28 +3261,28 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) if ( nKerning > 0 ) { - m_aKerningLB.SelectEntryPos( LW_GESPERRT ); + m_pKerningLB->SelectEntryPos( LW_GESPERRT ); } else if ( nKerning < 0 ) { - m_aKerningLB.SelectEntryPos( LW_SCHMAL ); + m_pKerningLB->SelectEntryPos( LW_SCHMAL ); nKerning = -nKerning; } else { nKerning = 0; - m_aKerningLB.SelectEntryPos( LW_NORMAL ); + m_pKerningLB->SelectEntryPos( LW_NORMAL ); } //enable/disable and set min/max of the Edit - KerningSelectHdl_Impl(&m_aKerningLB); + KerningSelectHdl_Impl(m_pKerningLB); //the attribute value must be displayed also if it's above the maximum allowed value - long nVal = static_cast(m_aKerningEdit.GetMax()); + long nVal = static_cast(m_pKerningMF->GetMax()); if(nVal < nKerning) - m_aKerningEdit.SetMax( nKerning ); - m_aKerningEdit.SetValue( nKerning ); + m_pKerningMF->SetMax( nKerning ); + m_pKerningMF->SetValue( nKerning ); } else - m_aKerningEdit.SetText( String() ); + m_pKerningMF->SetText( String() ); // Pair kerning nWhich = GetWhich( SID_ATTR_CHAR_AUTOKERN ); @@ -3312,10 +3290,10 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) if ( rSet.GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) { const SvxAutoKernItem& rItem = (SvxAutoKernItem&)rSet.Get( nWhich ); - m_aPairKerningBtn.Check( rItem.GetValue() ); + m_pPairKerningBtn->Check( rItem.GetValue() ); } else - m_aPairKerningBtn.Check( sal_False ); + m_pPairKerningBtn->Check( sal_False ); // Scale Width nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); @@ -3323,10 +3301,10 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) { const SvxCharScaleWidthItem& rItem = ( SvxCharScaleWidthItem& ) rSet.Get( nWhich ); m_nScaleWidthInitialVal = rItem.GetValue(); - m_aScaleWidthMF.SetValue( m_nScaleWidthInitialVal ); + m_pScaleWidthMF->SetValue( m_nScaleWidthInitialVal ); } else - m_aScaleWidthMF.SetValue( 100 ); + m_pScaleWidthMF->SetValue( 100 ); nWhich = GetWhich( SID_ATTR_CHAR_WIDTH_FIT_TO_LINE ); if ( rSet.GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) @@ -3337,85 +3315,66 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) SfxItemState eState = rSet.GetItemState( nWhich ); if( SFX_ITEM_UNKNOWN == eState ) { - m_aRotationScalingFL.Hide(); - m_aScalingFL.Show(); - m_a0degRB.Hide(); - m_a90degRB.Hide(); - m_a270degRB.Hide(); - m_aFitToLineCB.Hide(); - m_aFitToLineCB .Hide(); - - - // move the following controls upwards - Window* aCntrlArr[] = { - &m_aScaleWidthFT, &m_aScaleWidthMF, &m_aKerningLine, - &m_aKerningLB, &m_aKerningFT, &m_aKerningEdit, &m_aPairKerningBtn, - 0 }; - - long nDiff = m_aScaleWidthMF.GetPosPixel().Y() - - m_a0degRB.GetPosPixel().Y(); - - for( Window** ppW = aCntrlArr; *ppW; ++ppW ) - { - Point aPnt( (*ppW)->GetPosPixel() ); - aPnt.Y() -= nDiff; - (*ppW)->SetPosPixel( aPnt ); - } + m_pRotationContainer->Hide(); + m_pScalingAndRotationFT->Hide(); + m_pScalingFT->Show(); } else { - m_aScalingFL.Hide(); + m_pRotationContainer->Show(); + m_pScalingAndRotationFT->Show(); + m_pScalingFT->Hide(); - Link aOldLink( m_aFitToLineCB.GetClickHdl() ); - m_aFitToLineCB.SetClickHdl( Link() ); + Link aOldLink( m_pFitToLineCB->GetClickHdl() ); + m_pFitToLineCB->SetClickHdl( Link() ); if( eState >= SFX_ITEM_DEFAULT ) { const SvxCharRotateItem& rItem = (SvxCharRotateItem&) rSet.Get( nWhich ); if (rItem.IsBottomToTop()) - m_a90degRB.Check( sal_True ); + m_p90degRB->Check( sal_True ); else if (rItem.IsTopToBotton()) - m_a270degRB.Check( sal_True ); + m_p270degRB->Check( sal_True ); else { DBG_ASSERT( 0 == rItem.GetValue(), "incorrect value" ); - m_a0degRB.Check( sal_True ); + m_p0degRB->Check( sal_True ); } - m_aFitToLineCB.Check( rItem.IsFitToLine() ); + m_pFitToLineCB->Check( rItem.IsFitToLine() ); } else { if( eState == SFX_ITEM_DONTCARE ) { - m_a0degRB.Check( sal_False ); - m_a90degRB.Check( sal_False ); - m_a270degRB.Check( sal_False ); + m_p0degRB->Check( sal_False ); + m_p90degRB->Check( sal_False ); + m_p270degRB->Check( sal_False ); } else - m_a0degRB.Check( sal_True ); + m_p0degRB->Check( sal_True ); - m_aFitToLineCB.Check( sal_False ); + m_pFitToLineCB->Check( sal_False ); } - m_aFitToLineCB.SetClickHdl( aOldLink ); - m_aFitToLineCB.Enable( !m_a0degRB.IsChecked() ); + m_pFitToLineCB->SetClickHdl( aOldLink ); + m_pFitToLineCB->Enable( !m_p0degRB->IsChecked() ); // is this value set? if( SFX_ITEM_UNKNOWN == rSet.GetItemState( GetWhich( SID_ATTR_CHAR_WIDTH_FIT_TO_LINE ) )) - m_aFitToLineCB.Hide(); + m_pFitToLineCB->Hide(); } - m_aHighPosBtn.SaveValue(); - m_aNormalPosBtn.SaveValue(); - m_aLowPosBtn.SaveValue(); - m_a0degRB.SaveValue(); - m_a90degRB.SaveValue(); - m_a270degRB.SaveValue(); - m_aFitToLineCB.SaveValue(); - m_aScaleWidthMF.SaveValue(); - m_aKerningLB.SaveValue(); - m_aKerningEdit.SaveValue(); - m_aPairKerningBtn.SaveValue(); + m_pHighPosBtn->SaveValue(); + m_pNormalPosBtn->SaveValue(); + m_pLowPosBtn->SaveValue(); + m_p0degRB->SaveValue(); + m_p90degRB->SaveValue(); + m_p270degRB->SaveValue(); + m_pFitToLineCB->SaveValue(); + m_pScaleWidthMF->SaveValue(); + m_pKerningLB->SaveValue(); + m_pKerningMF->SaveValue(); + m_pPairKerningBtn->SaveValue(); } // ----------------------------------------------------------------------- @@ -3427,20 +3386,20 @@ sal_Bool SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) sal_Bool bModified = sal_False, bChanged = sal_True; sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); const SfxPoolItem* pOld = GetOldItem( rSet, SID_ATTR_CHAR_ESCAPEMENT ); - const bool bHigh = m_aHighPosBtn.IsChecked(); + const bool bHigh = m_pHighPosBtn->IsChecked(); short nEsc; sal_uInt8 nEscProp; - if ( bHigh || m_aLowPosBtn.IsChecked() ) + if ( bHigh || m_pLowPosBtn->IsChecked() ) { - if ( m_aHighLowRB.IsChecked() ) + if ( m_pHighLowRB->IsChecked() ) nEsc = bHigh ? DFLT_ESC_AUTO_SUPER : DFLT_ESC_AUTO_SUB; else { - nEsc = (short)m_aHighLowEdit.Denormalize( m_aHighLowEdit.GetValue() ); + nEsc = (short)m_pHighLowMF->Denormalize( m_pHighLowMF->GetValue() ); nEsc *= (bHigh ? 1 : -1); } - nEscProp = (sal_uInt8)m_aFontSizeEdit.Denormalize( m_aFontSizeEdit.GetValue() ); + nEscProp = (sal_uInt8)m_pFontSizeMF->Denormalize( m_pFontSizeMF->GetValue() ); } else { @@ -3455,12 +3414,12 @@ sal_Bool SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) bChanged = sal_False; } - if ( !bChanged && !m_aHighPosBtn.GetSavedValue() && - !m_aNormalPosBtn.GetSavedValue() && !m_aLowPosBtn.GetSavedValue() ) + if ( !bChanged && !m_pHighPosBtn->GetSavedValue() && + !m_pNormalPosBtn->GetSavedValue() && !m_pLowPosBtn->GetSavedValue() ) bChanged = sal_True; if ( bChanged && - ( m_aHighPosBtn.IsChecked() || m_aNormalPosBtn.IsChecked() || m_aLowPosBtn.IsChecked() ) ) + ( m_pHighPosBtn->IsChecked() || m_pNormalPosBtn->IsChecked() || m_pLowPosBtn->IsChecked() ) ) { rSet.Put( SvxEscapementItem( nEsc, nEscProp, nWhich ) ); bModified = sal_True; @@ -3473,15 +3432,15 @@ sal_Bool SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) // Kerning nWhich = GetWhich( SID_ATTR_CHAR_KERNING ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_KERNING ); - sal_uInt16 nPos = m_aKerningLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_pKerningLB->GetSelectEntryPos(); short nKerning = 0; SfxMapUnit eUnit = rSet.GetPool()->GetMetric( nWhich ); if ( nPos == LW_GESPERRT || nPos == LW_SCHMAL ) { - long nTmp = static_cast(m_aKerningEdit.GetValue()); + long nTmp = static_cast(m_pKerningMF->GetValue()); long nVal = LogicToLogic( nTmp, MAP_POINT, (MapUnit)eUnit ); - nKerning = (short)m_aKerningEdit.Denormalize( nVal ); + nKerning = (short)m_pKerningMF->Denormalize( nVal ); if ( nPos == LW_SCHMAL ) nKerning *= - 1; @@ -3495,8 +3454,8 @@ sal_Bool SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) } if ( !bChanged && - ( m_aKerningLB.GetSavedValue() == LISTBOX_ENTRY_NOTFOUND || - ( !m_aKerningEdit.GetSavedValue().Len() && m_aKerningEdit.IsEnabled() ) ) ) + ( m_pKerningLB->GetSavedValue() == LISTBOX_ENTRY_NOTFOUND || + ( !m_pKerningMF->GetSavedValue().Len() && m_pKerningMF->IsEnabled() ) ) ) bChanged = sal_True; if ( bChanged && nPos != LISTBOX_ENTRY_NOTFOUND ) @@ -3512,9 +3471,9 @@ sal_Bool SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) // Pair-Kerning nWhich = GetWhich( SID_ATTR_CHAR_AUTOKERN ); - if ( m_aPairKerningBtn.IsChecked() != m_aPairKerningBtn.GetSavedValue() ) + if ( m_pPairKerningBtn->IsChecked() != m_pPairKerningBtn->GetSavedValue() ) { - rSet.Put( SvxAutoKernItem( m_aPairKerningBtn.IsChecked(), nWhich ) ); + rSet.Put( SvxAutoKernItem( m_pPairKerningBtn->IsChecked(), nWhich ) ); bModified = sal_True; } else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) @@ -3522,9 +3481,9 @@ sal_Bool SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) // Scale Width nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); - if ( m_aScaleWidthMF.GetText() != m_aScaleWidthMF.GetSavedValue() ) + if ( m_pScaleWidthMF->GetText() != m_pScaleWidthMF->GetSavedValue() ) { - rSet.Put( SvxCharScaleWidthItem( (sal_uInt16)m_aScaleWidthMF.GetValue(), nWhich ) ); + rSet.Put( SvxCharScaleWidthItem( (sal_uInt16)m_pScaleWidthMF->GetValue(), nWhich ) ); bModified = sal_True; } else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) @@ -3532,15 +3491,15 @@ sal_Bool SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) // Rotation nWhich = GetWhich( SID_ATTR_CHAR_ROTATED ); - if ( m_a0degRB .IsChecked() != m_a0degRB .GetSavedValue() || - m_a90degRB .IsChecked() != m_a90degRB .GetSavedValue() || - m_a270degRB .IsChecked() != m_a270degRB .GetSavedValue() || - m_aFitToLineCB.IsChecked() != m_aFitToLineCB.GetSavedValue() ) + if ( m_p0degRB->IsChecked() != m_p0degRB->GetSavedValue() || + m_p90degRB->IsChecked() != m_p90degRB->GetSavedValue() || + m_p270degRB->IsChecked() != m_p270degRB->GetSavedValue() || + m_pFitToLineCB->IsChecked() != m_pFitToLineCB->GetSavedValue() ) { - SvxCharRotateItem aItem( 0, m_aFitToLineCB.IsChecked(), nWhich ); - if (m_a90degRB.IsChecked()) + SvxCharRotateItem aItem( 0, m_pFitToLineCB->IsChecked(), nWhich ); + if (m_p90degRB->IsChecked()) aItem.SetBottomToTop(); - else if (m_a270degRB.IsChecked()) + else if (m_p270degRB->IsChecked()) aItem.SetTopToBotton(); rSet.Put( aItem ); bModified = sal_True; diff --git a/cui/source/tabpages/chardlg.hrc b/cui/source/tabpages/chardlg.hrc index 0108f75dc133..f379afad20d1 100644 --- a/cui/source/tabpages/chardlg.hrc +++ b/cui/source/tabpages/chardlg.hrc @@ -118,35 +118,6 @@ #define STR_EFFECTS_SHADOW 266 #define STR_EFFECTS_BLINKING 267 -// PositionPage ------------------------------------------------------------- - -#define FL_POSITION 300 -#define RB_HIGHPOS 301 -#define RB_NORMALPOS 302 -#define RB_LOWPOS 303 -#define FT_HIGHLOW 304 -#define ED_HIGHLOW 305 -#define CB_HIGHLOW 306 -#define FT_FONTSIZE 307 -#define ED_FONTSIZE 308 -#define FL_ROTATION_SCALING 309 -#define FL_SCALING 310 -#define RB_0_DEG 311 -#define RB_90_DEG 312 -#define RB_270_DEG 313 -#define CB_FIT_TO_LINE 314 -#define FT_SCALE_WIDTH 315 -#define MF_SCALE_WIDTH 316 - -#define FL_KERNING2 320 -#define LB_KERNING2 321 -#define FT_KERNING2 322 -#define ED_KERNING2 323 -#define CB_PAIRKERNING 324 - -#define WIN_POS_PREVIEW 331 -#define FT_POS_FONTTYPE 332 - #define FT_WEST_NAME_NOCJK 423 #define LB_WEST_NAME_NOCJK 424 #define FT_WEST_STYLE_NOCJK 425 diff --git a/cui/source/tabpages/chardlg.src b/cui/source/tabpages/chardlg.src index c1a925f6fd76..2fb4cf7269a5 100644 --- a/cui/source/tabpages/chardlg.src +++ b/cui/source/tabpages/chardlg.src @@ -704,226 +704,3 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS Text [ en-US ] = "Transparent"; }; }; - -// RID_SVXPAGE_CHAR_POSITION ------------------------------------------------ - -TabPage RID_SVXPAGE_CHAR_POSITION -{ - HelpId = HID_SVXPAGE_CHAR_POSITION ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - Hide = TRUE ; - FixedLine FL_POSITION - { - Pos = MAP_APPFONT ( 6 , 3 ); - Size = MAP_APPFONT ( 248 , 8 ); - Text [ en-US ] = "Position" ; - }; - RadioButton RB_HIGHPOS - { - HelpID = "cui:RadioButton:RID_SVXPAGE_CHAR_POSITION:RB_HIGHPOS"; - Pos = MAP_APPFONT ( 12 , 16 ); - Size = MAP_APPFONT ( 58 , 10 ); - Text [ en-US ] = "Superscript" ; - TabStop = TRUE; - }; - RadioButton RB_NORMALPOS - { - HelpID = "cui:RadioButton:RID_SVXPAGE_CHAR_POSITION:RB_NORMALPOS"; - Pos = MAP_APPFONT ( 12 , 30 ); - Size = MAP_APPFONT ( 58 , 10 ); - Text [ en-US ] = "Normal" ; - TabStop = TRUE; - }; - RadioButton RB_LOWPOS - { - HelpID = "cui:RadioButton:RID_SVXPAGE_CHAR_POSITION:RB_LOWPOS"; - Pos = MAP_APPFONT ( 12 , 44 ); - Size = MAP_APPFONT ( 58 , 10 ); - Text [ en-US ] = "Subscript" ; - TabStop = TRUE; - }; - FixedText FT_HIGHLOW - { - Pos = MAP_APPFONT ( 74 , 16 ); - Size = MAP_APPFONT ( 58 , 8 ); - Text [ en-US ] = "~Raise/lower by" ; - }; - MetricField ED_HIGHLOW - { - HelpID = "cui:MetricField:RID_SVXPAGE_CHAR_POSITION:ED_HIGHLOW"; - Border = TRUE; - Pos = MAP_APPFONT ( 136 , 14 ); - Size = MAP_APPFONT ( 30 , 12 ); - TabStop = TRUE; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 1 ; - Maximum = 100 ; - Unit = FUNIT_CUSTOM ; - CustomUnitText = "%" ; - First = 1 ; - Last = 100 ; - SpinSize = 1 ; - }; - CheckBox CB_HIGHLOW - { - HelpID = "cui:CheckBox:RID_SVXPAGE_CHAR_POSITION:CB_HIGHLOW"; - Pos = MAP_APPFONT ( 172 , 16 ); - Size = MAP_APPFONT ( 76 , 10 ); - Text [ en-US ] = "A~utomatic" ; - TabStop = TRUE; - }; - FixedText FT_FONTSIZE - { - Pos = MAP_APPFONT ( 74 , 32 ); - Size = MAP_APPFONT ( 58 , 8 ); - Text [ en-US ] = "Relative font size" ; - }; - MetricField ED_FONTSIZE - { - HelpID = "cui:MetricField:RID_SVXPAGE_CHAR_POSITION:ED_FONTSIZE"; - Border = TRUE; - Pos = MAP_APPFONT ( 136 , 30 ); - Size = MAP_APPFONT ( 30 , 12 ); - TabStop = TRUE; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 1 ; - Maximum = 100 ; - Unit = FUNIT_CUSTOM ; - CustomUnitText = "%" ; - First = 1 ; - Last = 100 ; - SpinSize = 1 ; - }; - FixedLine FL_ROTATION_SCALING - { - Pos = MAP_APPFONT ( 6 , 59 ); - Size = MAP_APPFONT ( 248 , 8 ); - Text [ en-US ] = "Rotation / scaling" ; - }; - FixedLine FL_SCALING - { - Pos = MAP_APPFONT ( 6 , 59 ); - Size = MAP_APPFONT ( 248 , 8 ); - Text [ en-US ] = "Scaling" ; - }; - RadioButton RB_0_DEG - { - HelpID = "cui:RadioButton:RID_SVXPAGE_CHAR_POSITION:RB_0_DEG"; - Pos = MAP_APPFONT ( 12 , 70 ); - Size = MAP_APPFONT ( 46 , 10 ); - TabStop = TRUE; - Text [ en-US ] = "~0 degrees" ; - }; - RadioButton RB_90_DEG - { - HelpID = "cui:RadioButton:RID_SVXPAGE_CHAR_POSITION:RB_90_DEG"; - Pos = MAP_APPFONT ( 62 , 70 ); - Size = MAP_APPFONT ( 46 , 10 ); - TabStop = TRUE; - Text [ en-US ] = "~90 degrees" ; - }; - RadioButton RB_270_DEG - { - HelpID = "cui:RadioButton:RID_SVXPAGE_CHAR_POSITION:RB_270_DEG"; - Pos = MAP_APPFONT ( 112 , 70 ); - Size = MAP_APPFONT ( 46 , 10 ); - TabStop = TRUE; - Text [ en-US ] = "~270 degrees" ; - }; - CheckBox CB_FIT_TO_LINE - { - HelpID = "cui:CheckBox:RID_SVXPAGE_CHAR_POSITION:CB_FIT_TO_LINE"; - Pos = MAP_APPFONT ( 162 , 70 ); - Size = MAP_APPFONT ( 86 , 10 ); - TabStop = TRUE; - Text [ en-US ] = "Fit to line" ; - }; - FixedText FT_SCALE_WIDTH - { - Pos = MAP_APPFONT ( 12 , 86 ); - Size = MAP_APPFONT ( 80 , 8 ); - Text [ en-US ] = "Scale ~width" ; - }; - MetricField MF_SCALE_WIDTH - { - HelpID = "cui:MetricField:RID_SVXPAGE_CHAR_POSITION:MF_SCALE_WIDTH"; - Border = TRUE; - Pos = MAP_APPFONT ( 94 , 84 ); - Size = MAP_APPFONT ( 30 , 12 ); - TabStop = TRUE; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 1 ; - Maximum = 999 ; - Unit = FUNIT_CUSTOM ; - CustomUnitText = "%" ; - First = 50 ; - Last = 200 ; - SpinSize = 1 ; - }; - FixedLine FL_KERNING2 - { - Pos = MAP_APPFONT ( 6 , 100 ); - Size = MAP_APPFONT ( 248 , 8 ); - Text [ en-US ] = "Spacing" ; - }; - ListBox LB_KERNING2 - { - HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_POSITION:LB_KERNING2"; - Border = TRUE; - Pos = MAP_APPFONT ( 12 , 111 ); - Size = MAP_APPFONT ( 72 , 48 ) ; - DropDown = TRUE ; - StringList [ en-US ] = - { - < "Default" ; Default ; > ; - < "Expanded" ; Default ; > ; - < "Condensed" ; Default ; > ; - }; - }; - FixedText FT_KERNING2 - { - Pos = MAP_APPFONT ( 86 , 113 ); - Size = MAP_APPFONT ( 24 , 8 ); - Center = TRUE ; - Text [ en-US ] = "b~y" ; - }; - MetricField ED_KERNING2 - { - HelpID = "cui:MetricField:RID_SVXPAGE_CHAR_POSITION:ED_KERNING2"; - Border = TRUE; - Pos = MAP_APPFONT ( 112 , 111 ); - Size = MAP_APPFONT ( 40 , 12 ); - TabStop = TRUE; - Repeat = TRUE ; - Spin = TRUE ; - Maximum = 9999 ; - DecimalDigits = 1 ; - Unit = FUNIT_POINT ; - SpinSize = 10 ; - }; - CheckBox CB_PAIRKERNING - { - HelpID = "cui:CheckBox:RID_SVXPAGE_CHAR_POSITION:CB_PAIRKERNING"; - Pos = MAP_APPFONT ( 156 , 113 ); - Size = MAP_APPFONT ( 92 , 10 ); - Text [ en-US ] = "~Pair kerning" ; - TabStop = TRUE; - }; - Window WIN_POS_PREVIEW - { - Text [ en-US ] = "Example" ; - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 149 ) ; - Size = MAP_APPFONT ( 248 , 37 ) ; - }; - FixedText FT_POS_FONTTYPE - { - Pos = MAP_APPFONT ( 6 , 168 ) ; - Size = MAP_APPFONT ( 248 , 16 ) ; - WordBreak = TRUE ; - Hide = TRUE; - }; -}; diff --git a/cui/uiconfig/ui/positionpage.ui b/cui/uiconfig/ui/positionpage.ui new file mode 100644 index 000000000000..2dd1401fe7d7 --- /dev/null +++ b/cui/uiconfig/ui/positionpage.ui @@ -0,0 +1,532 @@ + + + + + 1 + 100 + 1 + 1 + 10 + + + 1 + 999 + 100 + 1 + 10 + + + 999.89999999999998 + 1 + 10 + + + + + + + + + Default + + + Expanded + + + Condensed + + + + + True + False + vertical + + + True + False + 0 + none + + + True + False + 12 + + + True + False + 6 + + + Superscript + False + True + True + False + False + 0 + True + normal + + + 0 + 0 + 1 + 1 + + + + + Normal + False + True + True + False + False + 0 + True + subscript + + + 0 + 1 + 1 + 1 + + + + + Subscript + False + True + True + False + False + 0 + True + superscript + + + 0 + 2 + 1 + 1 + + + + + True + False + 0 + Raise/lower by + + + 1 + 0 + 1 + 1 + + + + + True + False + 0 + Relative font size + + + 1 + 1 + 1 + 1 + + + + + True + True + + True + adjustment1 + + + 2 + 0 + 1 + 1 + + + + + True + True + + True + adjustment1 + + + 2 + 1 + 1 + 1 + + + + + Automatic + False + True + True + False + False + 0 + True + + + 3 + 0 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + True + False + Position + True + + + + + False + True + 0 + + + + + True + False + 0 + none + + + True + False + 12 + + + True + False + vertical + + + True + False + + + 0 degrees + False + True + True + False + False + 0 + True + 90deg + + + False + True + 0 + + + + + 90 degrees + False + True + True + False + False + 0 + True + 270deg + + + False + True + 1 + + + + + 270 degrees + False + True + True + False + False + 0 + True + 0deg + + + False + True + 2 + + + + + Fit to line + False + True + True + False + False + 0 + True + + + False + True + 3 + + + + + False + True + 0 + + + + + True + False + 2 + + + True + False + Scale width + + + False + True + 0 + + + + + True + True + + True + adjustment2 + + + False + True + 1 + + + + + False + True + 1 + + + + + + + + + True + False + vertical + + + True + False + Rotation / Scaling + True + + + False + True + 0 + + + + + True + False + 0 + Rotation + + + False + True + 1 + + + + + + + False + True + 1 + + + + + True + False + 0 + none + + + True + False + 12 + + + True + False + 2 + + + True + False + liststore1 + + + False + True + 0 + + + + + True + False + by + + + False + True + 1 + + + + + True + True + + True + adjustment3 + 1 + + + False + True + 2 + + + + + Pair kerning + False + True + True + False + False + 0 + True + + + False + True + 3 + + + + + + + + + True + False + Spacing + True + + + + + False + True + 2 + + + + + True + False + 0 + none + + + True + False + 12 + + + 100 + True + False + + + + + + + True + False + Preview + True + + + + + False + True + end + 3 + + + + -- cgit