diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-09-19 22:01:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-09-28 08:48:49 +0100 |
commit | adda1a25f248586b46682bb9e19cd7a6b2c9debc (patch) | |
tree | 30d29d5107bcf9b37c35ca8032a677cb3bdf46c6 /cui | |
parent | 29d6cfdca55c56a61c5a22c42f764697b5dc03b4 (diff) |
convert hard-coded layout of char name tabpage to .ui
Change-Id: I20829b6a0835bf96489d67b6f7effcfa84650328
Diffstat (limited to 'cui')
-rw-r--r-- | cui/AllLangResTarget_cui.mk | 1 | ||||
-rw-r--r-- | cui/UI_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/inc/chardlg.hxx | 21 | ||||
-rw-r--r-- | cui/source/inc/cuires.hrc | 5 | ||||
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 393 | ||||
-rw-r--r-- | cui/source/tabpages/chardlg.hrc | 78 | ||||
-rw-r--r-- | cui/source/tabpages/chardlg.src | 377 | ||||
-rw-r--r-- | cui/source/tabpages/strings.src | 20 | ||||
-rw-r--r-- | cui/uiconfig/ui/charnamepage.ui | 654 |
9 files changed, 775 insertions, 775 deletions
diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk index b0cd1def25c8..83b36a551c67 100644 --- a/cui/AllLangResTarget_cui.mk +++ b/cui/AllLangResTarget_cui.mk @@ -116,7 +116,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\ cui/source/tabpages/backgrnd.src \ cui/source/tabpages/bbdlg.src \ cui/source/tabpages/border.src \ - cui/source/tabpages/chardlg.src \ cui/source/tabpages/connect.src \ cui/source/tabpages/dstribut.src \ cui/source/tabpages/frmdirlbox.src \ diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk index 4419c3d412ae..1fe00b2b0afa 100644 --- a/cui/UI_cui.mk +++ b/cui/UI_cui.mk @@ -12,6 +12,7 @@ $(eval $(call gb_UI_UI,cui)) $(eval $(call gb_UI_add_uifiles,cui,\ cui/uiconfig/ui/10000 \ cui/uiconfig/ui/effectspage \ + cui/uiconfig/ui/charnamepage \ cui/uiconfig/ui/positionpage \ cui/uiconfig/ui/twolinespage \ )) diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index d01d38c3cdf2..90abbb1ed780 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -57,7 +57,6 @@ class SvxCharBasePage : public SfxTabPage { protected: SvxFontPrevWindow* m_pPreviewWin; - FixedInfo* m_pFontTypeFT; sal_Bool m_bPreviewBackgroundToCharacter; @@ -66,9 +65,6 @@ protected: virtual ~SvxCharBasePage(); - void makeWidgets(Window *pParent, const ResId& rResId, - sal_uInt16 nResIdPrewievWin, sal_uInt16 nResIdFontTypeFT); - void SetPrevFontWidthScale( const SfxItemSet& rSet ); void SetPrevFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ); @@ -92,10 +88,7 @@ class SvxCharNamePage : public SvxCharBasePage { private: - VclVBox m_aBox; - VclGrid m_aGrid; - - FixedLine* m_pWestLine; + VclContainer* m_pWestFrame; FixedText* m_pWestFontNameFT; FontNameBox* m_pWestFontNameLB; FixedText* m_pWestFontStyleFT; @@ -105,7 +98,7 @@ private: FixedText* m_pWestFontLanguageFT; SvxLanguageBox* m_pWestFontLanguageLB; - FixedLine* m_pEastLine; + VclContainer* m_pEastFrame; FixedText* m_pEastFontNameFT; FontNameBox* m_pEastFontNameLB; FixedText* m_pEastFontStyleFT; @@ -115,7 +108,7 @@ private: FixedText* m_pEastFontLanguageFT; SvxLanguageBox* m_pEastFontLanguageLB; - FixedLine* m_pCTLLine; + VclContainer* m_pCTLFrame; FixedText* m_pCTLFontNameFT; FontNameBox* m_pCTLFontNameLB; FixedText* m_pCTLFontStyleFT; @@ -125,10 +118,6 @@ private: FixedText* m_pCTLFontLanguageFT; SvxLanguageBox* m_pCTLFontLanguageLB; - FixedLine* m_pColorFL; - FixedText* m_pColorFT; - ColorListBox* m_pColorLB; - SvxCharNamePage_Impl* m_pImpl; SvxCharNamePage( Window* pParent, const SfxItemSet& rSet ); @@ -155,12 +144,10 @@ private: }; void Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp ); - sal_Bool FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp ); - void ResetColor_Impl( const SfxItemSet& rSet ); + sal_Bool FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp ); DECL_LINK(UpdateHdl_Impl, void *); DECL_LINK( FontModifyHdl_Impl, void* ); - DECL_LINK( ColorBoxSelectHdl_Impl, ColorListBox* ); public: using SfxTabPage::ActivatePage; diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index 85d6738a865c..f9e9571737b1 100644 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -103,6 +103,11 @@ #define RID_SVXSTR_WARN_NAME_DUPLICATE (RID_SVX_START + 236) #define RID_SVXSTR_CHARNAME_TRANSPARENT (RID_SVX_START + 237) #define RID_SVXSTR_DESC_LINEEND (RID_SVX_START + 238) +#define RID_SVXSTR_CHARNAME_NOSTYLE (RID_SVX_START + 239) +#define RID_SVXSTR_CHARNAME_FAMILY (RID_SVX_START + 240) +#define RID_SVXSTR_CHARNAME_FONT (RID_SVX_START + 241) +#define RID_SVXSTR_CHARNAME_STYLE (RID_SVX_START + 242) +#define RID_SVXSTR_CHARNAME_TYPEFACE (RID_SVX_START + 243) // autocor #define RID_OFAPAGE_AUTOCOMPLETE_OPTIONS (RID_OFA_START + 119) diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 29bee1393853..6536973b89ec 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -41,9 +41,6 @@ #include <svx/dialogs.hrc> #include <svtools/unitconv.hxx> #include <svl/languageoptions.hxx> - -#include "chardlg.hrc" - #include <svx/xtable.hxx> // XColorList #include "chardlg.hxx" #include "editeng/fontitem.hxx" @@ -190,7 +187,6 @@ inline SvxFont& SvxCharBasePage::GetPreviewCTLFont() SvxCharBasePage::SvxCharBasePage( Window* pParent, const ResId& rResId, const SfxItemSet& rItemset) : SfxTabPage( pParent, rResId, rItemset ) , m_pPreviewWin(NULL) - , m_pFontTypeFT(NULL) , m_bPreviewBackgroundToCharacter( sal_False ) { } @@ -198,26 +194,14 @@ SvxCharBasePage::SvxCharBasePage( Window* pParent, const ResId& rResId, const Sf SvxCharBasePage::SvxCharBasePage( Window* pParent, const rtl::OString& rID, const rtl::OUString& rUIXMLDescription, const SfxItemSet& rItemset) : SfxTabPage( pParent, rID, rUIXMLDescription, rItemset ) , m_pPreviewWin(NULL) - , m_pFontTypeFT(NULL) , m_bPreviewBackgroundToCharacter( sal_False ) { } -void SvxCharBasePage::makeWidgets(Window *pParent, const ResId& rResId, - sal_uInt16 nResIdPrewievWin, sal_uInt16 nResIdFontTypeFT) -{ - m_pFontTypeFT = new FixedInfo(pParent, ResId( nResIdFontTypeFT, *rResId.GetResMgr())); - m_pPreviewWin = new SvxFontPrevWindow(pParent, ResId( nResIdPrewievWin, *rResId.GetResMgr())); - - m_pPreviewWin->set_expand(true); -} - // ----------------------------------------------------------------------- SvxCharBasePage::~SvxCharBasePage() { - delete m_pPreviewWin; - delete m_pFontTypeFT; } // ----------------------------------------------------------------------- @@ -293,17 +277,27 @@ struct SvxCharNamePage_Impl } }; +namespace +{ + void equalize_width_requests(Window *pA, Window *pB, Window *pC) + { + long nWidthWest = pA->GetOptimalSize(WINDOWSIZE_PREFERRED).Width(); + long nWidthEast = pB->GetOptimalSize(WINDOWSIZE_PREFERRED).Width(); + long nWidthCTL = pC->GetOptimalSize(WINDOWSIZE_PREFERRED).Width(); + long nLargest = std::max(nWidthWest, std::max(nWidthEast, nWidthCTL)); + pA->set_width_request(nLargest); + pB->set_width_request(nLargest); + pC->set_width_request(nLargest); + } +} + // class SvxCharNamePage ------------------------------------------------- SvxCharNamePage::SvxCharNamePage( Window* pParent, const SfxItemSet& rInSet ) - : SvxCharBasePage(pParent, CUI_RES( RID_SVXPAGE_CHAR_NAME ), rInSet) - , m_aBox(this, false, 7) - , m_aGrid(&m_aBox) + : SvxCharBasePage(pParent, "CharNamePage", "cui/ui/charnamepage.ui", rInSet) , m_pImpl(new SvxCharNamePage_Impl) { - m_aBox.set_expand(true); - - m_pImpl->m_aNoStyleText = String( CUI_RES( STR_CHARNAME_NOSTYLE ) ); + m_pImpl->m_aNoStyleText = String( CUI_RES( RID_SVXSTR_CHARNAME_NOSTYLE ) ); m_pImpl->m_aTransparentText = String( CUI_RES( RID_SVXSTR_CHARNAME_TRANSPARENT ) ); SvtLanguageOptions aLanguageOptions; @@ -311,95 +305,52 @@ SvxCharNamePage::SvxCharNamePage( Window* pParent, const SfxItemSet& rInSet ) sal_Bool bShowCTL = aLanguageOptions.IsCTLFontEnabled(); sal_Bool bShowNonWestern = bShowCJK || bShowCTL; - m_aGrid.set_column_spacing(7); - m_aGrid.set_row_spacing(2); - - m_pWestLine = new FixedLine(&m_aGrid, CUI_RES(FL_WEST)); - setGridAttach(*m_pWestLine, 0, 0, 4); - - m_pWestFontNameFT = new FixedText(&m_aGrid, CUI_RES( bShowNonWestern ? FT_WEST_NAME : FT_WEST_NAME_NOCJK ) ); - setGridAttach(*m_pWestFontNameFT, 0, 1); - - m_pWestFontNameLB = new FontNameBox(&m_aGrid, CUI_RES( bShowNonWestern ? LB_WEST_NAME : LB_WEST_NAME_NOCJK ) ); - setGridAttach(*m_pWestFontNameLB, 0, 2); - - m_pWestFontStyleFT = new FixedText(&m_aGrid, CUI_RES( bShowNonWestern ? FT_WEST_STYLE : FT_WEST_STYLE_NOCJK ) ); - setGridAttach(*m_pWestFontStyleFT, 1, 1); - m_pWestFontStyleLB = new FontStyleBox(&m_aGrid, CUI_RES( bShowNonWestern ? LB_WEST_STYLE : LB_WEST_STYLE_NOCJK ) ); - setGridAttach(*m_pWestFontStyleLB, 1, 2); - m_pWestFontSizeFT = new FixedText(&m_aGrid, CUI_RES( bShowNonWestern ? FT_WEST_SIZE : FT_WEST_SIZE_NOCJK ) ); - setGridAttach(*m_pWestFontSizeFT, 2, 1); - m_pWestFontSizeLB = new FontSizeBox(&m_aGrid, CUI_RES( bShowNonWestern ? LB_WEST_SIZE : LB_WEST_SIZE_NOCJK ) ); - setGridAttach(*m_pWestFontSizeLB, 2, 2); - - if( !bShowNonWestern ) + if (bShowNonWestern) { - m_pColorFL = new FixedLine(&m_aBox, CUI_RES( FL_COLOR2 ) ); - m_pColorFT = new FixedText(&m_aBox, CUI_RES( FT_COLOR2 ) ); - m_pColorLB = new ColorListBox(&m_aBox, CUI_RES( LB_COLOR2 ) ); - } - - m_pWestFontLanguageFT = new FixedText(&m_aGrid, CUI_RES( bShowNonWestern ? FT_WEST_LANG : FT_WEST_LANG_NOCJK ) ); - setGridAttach(*m_pWestFontLanguageFT, bShowNonWestern ? 3 : 1, bShowNonWestern ? 1 : 3); - m_pWestFontLanguageLB = new SvxLanguageBox(&m_aGrid, CUI_RES( bShowNonWestern ? LB_WEST_LANG : LB_WEST_LANG_NOCJK ) ); - setGridAttach(*m_pWestFontLanguageLB, bShowNonWestern ? 3 : 1, bShowNonWestern ? 2 : 4); + get(m_pWestFrame, "western"); + get(m_pWestFontNameFT, "westfontnameft-cjk"); + get(m_pWestFontNameLB, "westfontnamelb-cjk"); + get(m_pWestFontStyleFT, "weststyleft-cjk"); + get(m_pWestFontStyleLB, "weststylelb-cjk"); + get(m_pWestFontSizeFT, "westsizeft-cjk"); + get(m_pWestFontSizeLB, "westsizelb-cjk"); - if (!bShowNonWestern) - { - //10 lines - sal_Int32 nHeight = m_pWestFontSizeLB->CalcWindowSizePixel(10); - - m_pWestFontNameLB->set_height_request(nHeight); - m_pWestFontStyleLB->set_height_request(nHeight); - m_pWestFontSizeLB->set_height_request(nHeight); - } - - m_pEastLine = new FixedLine(&m_aGrid, CUI_RES( FL_EAST ) ); - setGridAttach(*m_pEastLine, 0, 3, 4); - - m_pEastFontNameFT = new FixedText(&m_aGrid, CUI_RES( FT_EAST_NAME ) ); - setGridAttach(*m_pEastFontNameFT, 0, 4); - m_pEastFontNameLB = new FontNameBox(&m_aGrid, CUI_RES( LB_EAST_NAME ) ); - setGridAttach(*m_pEastFontNameLB, 0, 5); - m_pEastFontStyleFT = new FixedText(&m_aGrid, CUI_RES( FT_EAST_STYLE ) ); - setGridAttach(*m_pEastFontStyleFT, 1, 4); - m_pEastFontStyleLB = new FontStyleBox(&m_aGrid, CUI_RES( LB_EAST_STYLE ) ); - setGridAttach(*m_pEastFontStyleLB, 1, 5); - m_pEastFontSizeFT = new FixedText(&m_aGrid, CUI_RES( FT_EAST_SIZE ) ); - setGridAttach(*m_pEastFontSizeFT, 2, 4); - m_pEastFontSizeLB = new FontSizeBox(&m_aGrid, CUI_RES( LB_EAST_SIZE ) ); - setGridAttach(*m_pEastFontSizeLB, 2, 5); - m_pEastFontLanguageFT = new FixedText(&m_aGrid, CUI_RES( FT_EAST_LANG ) ); - setGridAttach(*m_pEastFontLanguageFT, 3, 4); - m_pEastFontLanguageLB = new SvxLanguageBox(&m_aGrid, CUI_RES( LB_EAST_LANG ) ); - setGridAttach(*m_pEastFontLanguageLB, 3, 5); - - m_pCTLLine = new FixedLine(&m_aGrid, CUI_RES( FL_CTL ) ); - setGridAttach(*m_pCTLLine, 0, 6, 4); - - m_pCTLFontNameFT = new FixedText(&m_aGrid, CUI_RES( FT_CTL_NAME ) ); - setGridAttach(*m_pCTLFontNameFT, 0, 7); - m_pCTLFontNameLB = new FontNameBox(&m_aGrid, CUI_RES( LB_CTL_NAME ) ); - setGridAttach(*m_pCTLFontNameLB, 0, 8); - m_pCTLFontStyleFT = new FixedText(&m_aGrid, CUI_RES( FT_CTL_STYLE ) ); - setGridAttach(*m_pCTLFontStyleFT, 1, 7); - m_pCTLFontStyleLB = new FontStyleBox(&m_aGrid, CUI_RES( LB_CTL_STYLE ) ); - setGridAttach(*m_pCTLFontStyleLB, 1, 8); - m_pCTLFontSizeFT = new FixedText(&m_aGrid, CUI_RES( FT_CTL_SIZE ) ); - setGridAttach(*m_pCTLFontSizeFT, 2, 7); - m_pCTLFontSizeLB = new FontSizeBox(&m_aGrid, CUI_RES( LB_CTL_SIZE ) ); - setGridAttach(*m_pCTLFontSizeLB, 2, 8); - m_pCTLFontLanguageFT = new FixedText(&m_aGrid, CUI_RES( FT_CTL_LANG ) ); - setGridAttach(*m_pCTLFontLanguageFT, 3, 7); - m_pCTLFontLanguageLB = new SvxLanguageBox(&m_aGrid, CUI_RES( LB_CTL_LANG ) ); - setGridAttach(*m_pCTLFontLanguageLB, 3, 8); - - if( bShowNonWestern ) - { - m_pColorFL = new FixedLine(&m_aBox, CUI_RES( FL_COLOR2 ) ); - m_pColorFT = new FixedText(&m_aBox, CUI_RES( FT_COLOR2 ) ); - m_pColorLB = new ColorListBox(&m_aBox, CUI_RES( LB_COLOR2 ) ); + get(m_pWestFontLanguageFT, "westlangft-cjk"); + get(m_pWestFontLanguageLB, "westlanglb-cjk"); } + else + { + get(m_pWestFrame, "simple"); + get(m_pWestFontNameFT, "westfontnameft-nocjk"); + get(m_pWestFontNameLB, "westfontnamelb-nocjk"); + get(m_pWestFontStyleFT, "weststyleft-nocjk"); + get(m_pWestFontStyleLB, "weststylelb-nocjk"); + get(m_pWestFontSizeFT, "westsizeft-nocjk"); + get(m_pWestFontSizeLB, "westsizelb-nocjk"); + + get(m_pWestFontLanguageFT, "westlangft-nocjk"); + get(m_pWestFontLanguageLB, "westlanglb-nocjk"); + } + + get(m_pEastFrame, "asian"); + get(m_pEastFontNameFT, "eastfontnameft"); + get(m_pEastFontNameLB, "eastfontnamelb"); + get(m_pEastFontStyleFT, "eaststyleft"); + get(m_pEastFontStyleLB, "eaststylelb"); + get(m_pEastFontSizeFT, "eastsizeft"); + get(m_pEastFontSizeLB, "eastsizelb"); + get(m_pEastFontLanguageFT, "eastlangft"); + get(m_pEastFontLanguageLB, "eastlanglb"); + + get(m_pCTLFrame, "ctl"); + get(m_pCTLFontNameFT, "ctlfontnameft"); + get(m_pCTLFontNameLB, "ctlfontnamelb"); + get(m_pCTLFontStyleFT, "ctlstyleft"); + get(m_pCTLFontStyleLB, "ctlstylelb"); + get(m_pCTLFontSizeFT, "ctlsizeft"); + get(m_pCTLFontSizeLB, "ctlsizelb"); + get(m_pCTLFontLanguageFT, "ctllangft"); + get(m_pCTLFontLanguageLB, "ctllanglb"); //In MacOSX the standard dialogs name font-name, font-style as //Family, Typeface @@ -408,53 +359,45 @@ SvxCharNamePage::SvxCharNamePage( Window* pParent, const SfxItemSet& rInSet ) //In Windows the standard dialogs name font-name, font-style as //Font, Style #ifdef WNT - String sFontFamilyString(CUI_RES(STR_CHARNAME_FONT)); + String sFontFamilyString(CUI_RES(RID_SVXSTR_CHARNAME_FONT)); #else - String sFontFamilyString(CUI_RES(STR_CHARNAME_FAMILY)); + String sFontFamilyString(CUI_RES(RID_SVXSTR_CHARNAME_FAMILY)); #endif m_pWestFontNameFT->SetText(sFontFamilyString); m_pEastFontNameFT->SetText(sFontFamilyString); m_pCTLFontNameFT->SetText(sFontFamilyString); #ifdef MACOSX - String sFontStyleString(CUI_RES(STR_CHARNAME_TYPEFACE)); + String sFontStyleString(CUI_RES(RID_SVXSTR_CHARNAME_TYPEFACE)); #else - String sFontStyleString(CUI_RES(STR_CHARNAME_STYLE)); + String sFontStyleString(CUI_RES(RID_SVXSTR_CHARNAME_STYLE)); #endif m_pWestFontStyleFT->SetText(sFontStyleString); m_pEastFontStyleFT->SetText(sFontStyleString); m_pCTLFontStyleFT->SetText(sFontStyleString); - m_pWestLine ->Show( bShowNonWestern ); - m_pColorFL ->Show( bShowNonWestern ); - - m_pEastLine ->Show( bShowCJK ); - m_pEastFontNameFT ->Show( bShowCJK ); - m_pEastFontNameLB ->Show( bShowCJK ); - m_pEastFontStyleFT ->Show( bShowCJK ); - m_pEastFontStyleLB ->Show( bShowCJK ); - m_pEastFontSizeFT ->Show( bShowCJK ); - m_pEastFontSizeLB ->Show( bShowCJK ); - m_pEastFontLanguageFT ->Show( bShowCJK ); - m_pEastFontLanguageLB ->Show( bShowCJK ); - - m_pCTLLine ->Show( bShowCTL ); - m_pCTLFontNameFT ->Show( bShowCTL ); - m_pCTLFontNameLB ->Show( bShowCTL ); - m_pCTLFontStyleFT ->Show( bShowCTL ); - m_pCTLFontStyleLB ->Show( bShowCTL ); - m_pCTLFontSizeFT ->Show( bShowCTL ); - m_pCTLFontSizeLB ->Show( bShowCTL ); - m_pCTLFontLanguageFT ->Show( bShowCTL ); - m_pCTLFontLanguageLB ->Show( bShowCTL ); - - makeWidgets(&m_aBox, CUI_RES(RID_SVXPAGE_CHAR_NAME), WIN_CHAR_PREVIEW, FT_CHAR_FONTTYPE); - - FreeResource(); - - m_pWestFontLanguageLB->SetLanguageList( LANG_LIST_WESTERN, sal_True, sal_False, sal_True ); - m_pEastFontLanguageLB->SetLanguageList( LANG_LIST_CJK, sal_True, sal_False, sal_True ); - m_pCTLFontLanguageLB->SetLanguageList( LANG_LIST_CTL, sal_True, sal_False, sal_True ); + m_pWestFrame->Show(true); + m_pEastFrame->Show(bShowCJK); + m_pCTLFrame->Show(bShowCTL); + + get(m_pPreviewWin, "preview"); + + m_pWestFontLanguageLB->SetLanguageList(LANG_LIST_WESTERN, sal_True, sal_False, sal_True); + m_pEastFontLanguageLB->SetLanguageList(LANG_LIST_CJK, sal_True, sal_False, sal_True); + m_pCTLFontLanguageLB->SetLanguageList(LANG_LIST_CTL, sal_True, sal_False, sal_True); + + if (!bShowNonWestern) + { + //10 lines + sal_Int32 nHeight = m_pWestFontSizeLB->CalcWindowSizePixel(10); + m_pWestFontNameLB->set_height_request(nHeight); + m_pWestFontStyleLB->set_height_request(nHeight); + m_pWestFontSizeLB->set_height_request(nHeight); + } + else + { + equalize_width_requests(m_pWestFontLanguageLB, m_pEastFontLanguageLB, m_pCTLFontLanguageLB); + } Initialize(); } @@ -464,43 +407,6 @@ SvxCharNamePage::SvxCharNamePage( Window* pParent, const SfxItemSet& rInSet ) SvxCharNamePage::~SvxCharNamePage() { delete m_pImpl; - - delete m_pWestLine; - delete m_pWestFontNameFT; - delete m_pWestFontNameLB; - delete m_pWestFontStyleFT; - delete m_pWestFontStyleLB; - delete m_pWestFontSizeFT; - delete m_pWestFontSizeLB; - delete m_pWestFontLanguageFT; - delete m_pWestFontLanguageLB; - - delete m_pEastLine; - delete m_pEastFontNameFT; - delete m_pEastFontNameLB; - delete m_pEastFontStyleFT; - delete m_pEastFontStyleLB; - delete m_pEastFontSizeFT; - delete m_pEastFontSizeLB; - delete m_pEastFontLanguageFT; - delete m_pEastFontLanguageLB; - - delete m_pCTLLine; - delete m_pCTLFontNameFT; - delete m_pCTLFontNameLB; - delete m_pCTLFontStyleFT; - delete m_pCTLFontStyleLB; - delete m_pCTLFontSizeFT; - delete m_pCTLFontSizeLB; - delete m_pCTLFontLanguageFT; - delete m_pCTLFontLanguageLB; - - delete m_pColorFL; - delete m_pColorFT; - delete m_pColorLB; - - delete m_pPreviewWin, m_pPreviewWin = NULL; - delete m_pFontTypeFT, m_pFontTypeFT = NULL; } // ----------------------------------------------------------------------- @@ -510,40 +416,6 @@ void SvxCharNamePage::Initialize() // to handle the changes of the other pages SetExchangeSupport(); - // fill the color box - SfxObjectShell* pDocSh = SfxObjectShell::Current(); - XColorListRef pColorTable; - const SfxPoolItem* pItem = NULL; - - if ( pDocSh ) - { - pItem = pDocSh->GetItem( SID_COLOR_TABLE ); - if ( pItem != NULL ) - pColorTable = ( (SvxColorListItem*)pItem )->GetColorList(); - } - - if ( !pColorTable.is() ) - pColorTable = XColorList::CreateStdColorList(); - - m_pColorLB->SetUpdateMode( sal_False ); - - { - SfxPoolItem* pDummy; - SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocSh ); - if( !pFrame || SFX_ITEM_DEFAULT > pFrame->GetBindings().QueryState( - SID_ATTR_AUTO_COLOR_INVALID, pDummy )) - m_pColorLB->InsertEntry( Color( COL_AUTO ), - SVX_RESSTR( RID_SVXSTR_AUTOMATIC )); - } - for ( long i = 0; i < pColorTable->Count(); i++ ) - { - XColorEntry* pEntry = pColorTable->GetColor(i); - m_pColorLB->InsertEntry( pEntry->GetColor(), pEntry->GetName() ); - } - - m_pColorLB->SetUpdateMode( sal_True ); - m_pColorLB->SetSelectHdl( LINK( this, SvxCharNamePage, ColorBoxSelectHdl_Impl ) ); - Link aLink = LINK( this, SvxCharNamePage, FontModifyHdl_Impl ); m_pWestFontNameLB->SetModifyHdl( aLink ); m_pWestFontStyleLB->SetModifyHdl( aLink ); @@ -559,10 +431,6 @@ void SvxCharNamePage::Initialize() m_pCTLFontLanguageLB->SetSelectHdl( aLink ); m_pImpl->m_aUpdateTimer.SetTimeoutHdl( LINK( this, SvxCharNamePage, UpdateHdl_Impl ) ); - - m_pColorFL->Hide(); - m_pColorFT->Hide(); - m_pColorLB->Hide(); } // ----------------------------------------------------------------------- @@ -684,15 +552,14 @@ void SvxCharNamePage::UpdatePreview_Impl() aCTLSize.Width() = 0; // Font const FontList* pFontList = GetFontList(); - FontInfo aFontInfo = - calcFontInfo(rFont,this,m_pWestFontNameLB,m_pWestFontStyleLB,m_pWestFontSizeLB,m_pWestFontLanguageLB,pFontList,GetWhich( SID_ATTR_CHAR_FONT ),GetWhich( SID_ATTR_CHAR_FONTHEIGHT )); + + calcFontInfo(rFont,this,m_pWestFontNameLB,m_pWestFontStyleLB,m_pWestFontSizeLB,m_pWestFontLanguageLB,pFontList,GetWhich( SID_ATTR_CHAR_FONT ),GetWhich( SID_ATTR_CHAR_FONTHEIGHT )); calcFontInfo(rCJKFont,this,m_pEastFontNameLB,m_pEastFontStyleLB,m_pEastFontSizeLB,m_pEastFontLanguageLB,pFontList,GetWhich( SID_ATTR_CHAR_CJK_FONT ),GetWhich( SID_ATTR_CHAR_CJK_FONTHEIGHT )); calcFontInfo(rCTLFont,this,m_pCTLFontNameLB,m_pCTLFontStyleLB,m_pCTLFontSizeLB,m_pCTLFontLanguageLB,pFontList,GetWhich( SID_ATTR_CHAR_CTL_FONT ),GetWhich( SID_ATTR_CHAR_CTL_FONTHEIGHT )); m_pPreviewWin->Invalidate(); - m_pFontTypeFT->SetText( pFontList->GetFontMapText( aFontInfo ) ); } // ----------------------------------------------------------------------- @@ -968,10 +835,6 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp } } - if ( Western == eLangGrp ) - m_pFontTypeFT->SetText( pFontList->GetFontMapText( - pFontList->Get( pNameBox->GetText(), pStyleBox->GetText() ) ) ); - // save these settings pNameBox->SaveValue(); pStyleBox->SaveValue(); @@ -1255,60 +1118,6 @@ sal_Bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLan // ----------------------------------------------------------------------- -void SvxCharNamePage::ResetColor_Impl( const SfxItemSet& rSet ) -{ - sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); - SfxItemState eState = rSet.GetItemState( nWhich ); - - switch ( eState ) - { - case SFX_ITEM_UNKNOWN: - m_pColorLB->Hide(); - break; - - case SFX_ITEM_DISABLED: - case SFX_ITEM_READONLY: - m_pColorLB->Disable(); - break; - - case SFX_ITEM_DONTCARE: - m_pColorLB->SetNoSelection(); - break; - - case SFX_ITEM_DEFAULT: - case SFX_ITEM_SET: - { - SvxFont& rFont = GetPreviewFont(); - SvxFont& rCJKFont = GetPreviewCJKFont(); - SvxFont& rCTLFont = GetPreviewCTLFont(); - const SvxColorItem& rItem = (SvxColorItem&)rSet.Get( nWhich ); - Color aColor = rItem.GetValue(); - rFont.SetColor( aColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aColor ); - rCJKFont.SetColor( aColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aColor ); - rCTLFont.SetColor( aColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aColor ); - m_pPreviewWin->Invalidate(); - sal_uInt16 nSelPos = m_pColorLB->GetEntryPos( aColor ); - if ( nSelPos == LISTBOX_ENTRY_NOTFOUND && aColor == Color( COL_TRANSPARENT ) ) - nSelPos = m_pColorLB->GetEntryPos( m_pImpl->m_aTransparentText ); - - if ( LISTBOX_ENTRY_NOTFOUND != nSelPos ) - m_pColorLB->SelectEntryPos( nSelPos ); - else - { - nSelPos = m_pColorLB->GetEntryPos( aColor ); - if ( LISTBOX_ENTRY_NOTFOUND != nSelPos ) - m_pColorLB->SelectEntryPos( nSelPos ); - else - m_pColorLB->SelectEntryPos( - m_pColorLB->InsertEntry( aColor, String( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) ); - } - break; - } - } -} - -// ----------------------------------------------------------------------- - IMPL_LINK_NOARG(SvxCharNamePage, UpdateHdl_Impl) { UpdatePreview_Impl(); @@ -1331,25 +1140,6 @@ IMPL_LINK( SvxCharNamePage, FontModifyHdl_Impl, void*, pNameBox ) // ----------------------------------------------------------------------- -IMPL_LINK( SvxCharNamePage, ColorBoxSelectHdl_Impl, ColorListBox*, pBox ) -{ - SvxFont& rFont = GetPreviewFont(); - SvxFont& rCJKFont = GetPreviewCJKFont(); - SvxFont& rCTLFont = GetPreviewCTLFont(); - Color aSelectedColor; - if ( pBox->GetSelectEntry() == m_pImpl->m_aTransparentText ) - aSelectedColor = Color( COL_TRANSPARENT ); - else - aSelectedColor = pBox->GetSelectEntryColor(); - rFont.SetColor( aSelectedColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aSelectedColor ); - rCJKFont.SetColor( aSelectedColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aSelectedColor ); - rCTLFont.SetColor( aSelectedColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aSelectedColor ); - m_pPreviewWin->Invalidate(); - return 0; -} - -// ----------------------------------------------------------------------- - void SvxCharNamePage::ActivatePage( const SfxItemSet& rSet ) { SvxCharBasePage::ActivatePage( rSet ); @@ -1387,8 +1177,10 @@ void SvxCharNamePage::Reset( const SfxItemSet& rSet ) Reset_Impl( rSet, Western ); Reset_Impl( rSet, Asian ); Reset_Impl( rSet, Ctl ); - ResetColor_Impl( rSet ); - m_pColorLB->SaveValue(); + + equalize_width_requests(m_pWestFontNameLB, m_pEastFontNameLB, m_pCTLFontNameLB); + equalize_width_requests(m_pWestFontStyleLB, m_pEastFontStyleLB, m_pCTLFontStyleLB); + equalize_width_requests(m_pWestFontSizeLB, m_pEastFontSizeLB, m_pCTLFontSizeLB); SetPrevFontWidthScale( rSet ); UpdatePreview_Impl(); @@ -1640,7 +1432,6 @@ void SvxCharEffectsPage::Initialize() SvxCharEffectsPage::~SvxCharEffectsPage() { - m_pPreviewWin = NULL; //to-do, when all of these tab pages are converted to .ui this and the parent delete can go } // ----------------------------------------------------------------------- @@ -2835,7 +2626,6 @@ void SvxCharPositionPage::Initialize() SvxCharPositionPage::~SvxCharPositionPage() { - m_pPreviewWin = NULL; //to-do, when all of these tab pages are converted to .ui this and the parent delete can go } // ----------------------------------------------------------------------- @@ -3521,7 +3311,6 @@ SvxCharTwoLinesPage::SvxCharTwoLinesPage(Window* pParent, const SfxItemSet& rInS SvxCharTwoLinesPage::~SvxCharTwoLinesPage() { - m_pPreviewWin = NULL; //to-do, when all of these tab pages are converted to .ui this and the parent delete can go } // ----------------------------------------------------------------------- diff --git a/cui/source/tabpages/chardlg.hrc b/cui/source/tabpages/chardlg.hrc deleted file mode 100644 index 6a187aa5f649..000000000000 --- a/cui/source/tabpages/chardlg.hrc +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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_CHARDLG_HRC -#define _SVX_CHARDLG_HRC - -// defines ------------------------------------------------------------------ - -// NamePage ----------------------------------------------------------------- - -#define FL_WEST 100 -#define FT_WEST_NAME 101 -#define LB_WEST_NAME 102 -#define FT_WEST_STYLE 103 -#define LB_WEST_STYLE 104 -#define FT_WEST_SIZE 105 -#define LB_WEST_SIZE 106 -#define FT_WEST_LANG 107 -#define LB_WEST_LANG 108 - -#define FL_EAST 110 -#define FT_EAST_NAME 111 -#define LB_EAST_NAME 112 -#define FT_EAST_STYLE 113 -#define LB_EAST_STYLE 114 -#define FT_EAST_SIZE 115 -#define LB_EAST_SIZE 116 -#define FT_EAST_LANG 117 -#define LB_EAST_LANG 118 - -#define FL_CTL 120 -#define FT_CTL_NAME 121 -#define LB_CTL_NAME 122 -#define FT_CTL_STYLE 123 -#define LB_CTL_STYLE 124 -#define FT_CTL_SIZE 125 -#define LB_CTL_SIZE 126 -#define FT_CTL_LANG 127 -#define LB_CTL_LANG 128 - -#define WIN_CHAR_PREVIEW 131 -#define FT_CHAR_FONTTYPE 132 - -#define FL_COLOR2 140 -#define FT_COLOR2 141 -#define LB_COLOR2 142 - -#define STR_CHARNAME_NOSTYLE 150 -#define STR_CHARNAME_FAMILY 152 -#define STR_CHARNAME_FONT 153 -#define STR_CHARNAME_STYLE 154 -#define STR_CHARNAME_TYPEFACE 155 - -#define FT_WEST_NAME_NOCJK 423 -#define LB_WEST_NAME_NOCJK 424 -#define FT_WEST_STYLE_NOCJK 425 -#define LB_WEST_STYLE_NOCJK 426 -#define FT_WEST_SIZE_NOCJK 427 -#define LB_WEST_SIZE_NOCJK 428 -#define FT_WEST_LANG_NOCJK 429 -#define LB_WEST_LANG_NOCJK 430 - -#endif - diff --git a/cui/source/tabpages/chardlg.src b/cui/source/tabpages/chardlg.src deleted file mode 100644 index fa509e24a222..000000000000 --- a/cui/source/tabpages/chardlg.src +++ /dev/null @@ -1,377 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "helpid.hrc" -#include <cuires.hrc> -#include "chardlg.hrc" -#include "chardlg.h" -#include <svx/dialogs.hrc> - -// RID_SVXPAGE_CHAR_NAME ---------------------------------------------------- - -TabPage RID_SVXPAGE_CHAR_NAME -{ - HelpId = HID_SVXPAGE_CHAR_NAME ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - Hide = TRUE ; - FixedLine FL_WEST - { - Pos = MAP_APPFONT ( 6 , 3 ); - Size = MAP_APPFONT ( 248 , 8 ); - Text [ en-US ] = "Western text font"; - }; - FixedText FT_WEST_NAME - { - Pos = MAP_APPFONT ( 12 , 14 ); - Size = MAP_APPFONT ( 80 , 8 ); - }; - FixedText FT_WEST_NAME_NOCJK - { - Pos = MAP_APPFONT ( 12 , 6 ); - Size = MAP_APPFONT ( 112 , 8 ); - }; - ComboBox LB_WEST_NAME - { - HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_NAME"; - Border = TRUE; - Pos = MAP_APPFONT ( 12 , 25 ); - Size = MAP_APPFONT ( 80 , 72 ); - TabStop = TRUE; - DropDown = TRUE; - }; - ComboBox LB_WEST_NAME_NOCJK - { - HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_NAME_NOCJK"; - Border = TRUE; - Pos = MAP_APPFONT ( 12 , 17 ); - Size = MAP_APPFONT ( 112 , 71 ); - TabStop = TRUE; - DropDown = FALSE; - }; - FixedText FT_WEST_STYLE - { - Pos = MAP_APPFONT ( 96 , 14 ); - Size = MAP_APPFONT ( 40 , 8 ); - }; - FixedText FT_WEST_STYLE_NOCJK - { - Pos = MAP_APPFONT ( 130 , 6 ); - Size = MAP_APPFONT ( 72 , 8 ); - }; - ComboBox LB_WEST_STYLE - { - HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_STYLE"; - Border = TRUE; - Pos = MAP_APPFONT ( 96 , 25 ); - Size = MAP_APPFONT ( 40 , 48 ); - TabStop = TRUE; - DropDown = TRUE; - StringList [ en-US ] = - { - "Normal" ; - "Italic" ; - "Bold" ; - "Bold italic" ; - }; - }; - ComboBox LB_WEST_STYLE_NOCJK - { - HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_STYLE_NOCJK"; - Border = TRUE; - Pos = MAP_APPFONT ( 130 , 17 ); - Size = MAP_APPFONT ( 72 , 71 ); - TabStop = TRUE; - DropDown = FALSE; - StringList [ en-US ] = - { - "Normal" ; - "Italic" ; - "Bold" ; - "Bold italic" ; - }; - }; - FixedText FT_WEST_SIZE - { - Pos = MAP_APPFONT ( 140 , 14 ); - Size = MAP_APPFONT ( 38 , 8 ); - Text [ en-US ] = "Size"; - }; - FixedText FT_WEST_SIZE_NOCJK - { - Pos = MAP_APPFONT ( 208 , 6 ); - Size = MAP_APPFONT ( 40 , 8 ); - Text [ en-US ] = "Size"; - }; - MetricBox LB_WEST_SIZE - { - HelpID = "cui:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_SIZE"; - Border = TRUE; - Pos = MAP_APPFONT ( 140 , 25 ); - Size = MAP_APPFONT ( 38 , 72 ); - TabStop = TRUE; - DropDown = TRUE; - }; - MetricBox LB_WEST_SIZE_NOCJK - { - HelpID = "cui:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_SIZE_NOCJK"; - Border = TRUE; - Pos = MAP_APPFONT ( 208 , 17 ); - Size = MAP_APPFONT ( 40 , 71 ); - TabStop = TRUE; - DropDown = FALSE; - }; - FixedText FT_WEST_LANG - { - Pos = MAP_APPFONT ( 182 , 14 ); - Size = MAP_APPFONT ( 66 , 8 ); - Text [ en-US ] = "Language"; - }; - FixedText FT_WEST_LANG_NOCJK - { - Pos = MAP_APPFONT ( 130 , 94 ); - Size = MAP_APPFONT ( 72 , 8 ); - Text [ en-US ] = "~Language"; - }; - ListBox LB_WEST_LANG - { - HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_LANG"; - Border = TRUE; - Pos = MAP_APPFONT ( 182 , 25 ); - Size = MAP_APPFONT ( 66 , 72 ); - TabStop = TRUE; - Sort = TRUE ; - DropDown = TRUE; - }; - ListBox LB_WEST_LANG_NOCJK - { - HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_LANG_NOCJK"; - Border = TRUE; - Pos = MAP_APPFONT ( 130 , 105 ); - Size = MAP_APPFONT ( 72 , 72 ); - TabStop = TRUE; - Sort = TRUE ; - DropDown = TRUE; - }; - FixedLine FL_EAST - { - Pos = MAP_APPFONT ( 6 , 43 ); - Size = MAP_APPFONT ( 248 , 8 ); - Text [ en-US ] = "Asian text font"; - }; - FixedText FT_EAST_NAME - { - Pos = MAP_APPFONT ( 12 , 54 ); - Size = MAP_APPFONT ( 80 , 8 ); - }; - ComboBox LB_EAST_NAME - { - HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_NAME"; - Border = TRUE; - Pos = MAP_APPFONT ( 12 , 65 ); - Size = MAP_APPFONT ( 80 , 72 ); - TabStop = TRUE; - DropDown = TRUE; - }; - FixedText FT_EAST_STYLE - { - Pos = MAP_APPFONT ( 96 , 54 ); - Size = MAP_APPFONT ( 40 , 8 ); - }; - ComboBox LB_EAST_STYLE - { - HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_STYLE"; - Border = TRUE; - Pos = MAP_APPFONT ( 96 , 65 ); - Size = MAP_APPFONT ( 40 , 48 ); - TabStop = TRUE; - DropDown = TRUE; - StringList [ en-US ] = - { - "Normal" ; - "Italic" ; - "Bold" ; - "Bold italic" ; - }; - }; - FixedText FT_EAST_SIZE - { - Pos = MAP_APPFONT ( 140 , 54 ); - Size = MAP_APPFONT ( 38 , 8 ); - Text [ en-US ] = "Size"; - }; - MetricBox LB_EAST_SIZE - { - HelpID = "cui:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_SIZE"; - Border = TRUE; - Pos = MAP_APPFONT ( 140 , 65 ); - Size = MAP_APPFONT ( 38 , 72 ); - TabStop = TRUE; - DropDown = TRUE; - }; - FixedText FT_EAST_LANG - { - Pos = MAP_APPFONT ( 182 , 54 ); - Size = MAP_APPFONT ( 66 , 8 ); - Text [ en-US ] = "Language"; - }; - ListBox LB_EAST_LANG - { - HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_LANG"; - Border = TRUE; - Pos = MAP_APPFONT ( 182 , 65 ); - Size = MAP_APPFONT ( 66 , 72 ); - TabStop = TRUE; - Sort = TRUE ; - DropDown = TRUE; - }; - FixedLine FL_CTL - { - Pos = MAP_APPFONT ( 6 , 83 ); - Size = MAP_APPFONT ( 248 , 8 ); - Text [ en-US ] = "CTL font"; - }; - FixedText FT_CTL_NAME - { - Pos = MAP_APPFONT ( 12 , 94 ); - Size = MAP_APPFONT ( 80 , 8 ); - }; - ComboBox LB_CTL_NAME - { - HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_CTL_NAME"; - Border = TRUE; - Pos = MAP_APPFONT ( 12 , 105 ); - Size = MAP_APPFONT ( 80 , 72 ); - TabStop = TRUE; - DropDown = TRUE; - }; - FixedText FT_CTL_STYLE - { - Pos = MAP_APPFONT ( 96 , 94 ); - Size = MAP_APPFONT ( 40 , 8 ); - }; - ComboBox LB_CTL_STYLE - { - HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_CTL_STYLE"; - Border = TRUE; - Pos = MAP_APPFONT ( 96 , 105 ); - Size = MAP_APPFONT ( 40 , 48 ); - TabStop = TRUE; - DropDown = TRUE; - StringList [ en-US ] = - { - "Normal" ; - "Italic" ; - "Bold" ; - "Bold italic" ; - }; - }; - FixedText FT_CTL_SIZE - { - Pos = MAP_APPFONT ( 140 , 94 ); - Size = MAP_APPFONT ( 38 , 8 ); - Text [ en-US ] = "Size"; - }; - MetricBox LB_CTL_SIZE - { - HelpID = "cui:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_CTL_SIZE"; - Border = TRUE; - Pos = MAP_APPFONT ( 140 , 105 ); - Size = MAP_APPFONT ( 38 , 72 ); - TabStop = TRUE; - DropDown = TRUE; - }; - FixedText FT_CTL_LANG - { - Pos = MAP_APPFONT ( 182 , 94 ); - Size = MAP_APPFONT ( 66 , 8 ); - Text [ en-US ] = "Language"; - }; - ListBox LB_CTL_LANG - { - HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_CTL_LANG"; - Border = TRUE; - Pos = MAP_APPFONT ( 182 , 105 ); - Size = MAP_APPFONT ( 66 , 72 ); - TabStop = TRUE; - Sort = TRUE ; - DropDown = TRUE; - }; - Window WIN_CHAR_PREVIEW - { - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 149 ) ; - Size = MAP_APPFONT ( 248 , 37 ) ; - Text [ en-US ] = "Example"; - }; - FixedText FT_CHAR_FONTTYPE - { - Pos = MAP_APPFONT ( 6 , 129 ) ; - Size = MAP_APPFONT ( 248 , 16 ) ; - WordBreak = TRUE ; - }; - FixedLine FL_COLOR2 - { - Pos = MAP_APPFONT ( 6 , 83 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Color" ; - }; - FixedText FT_COLOR2 - { - Pos = MAP_APPFONT ( 12 , 94 ); - Size = MAP_APPFONT ( 58 , 8 ); - Text [ en-US ] = "Font ~color" ; - }; - ListBox LB_COLOR2 - { - HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_COLOR2"; - Border = TRUE; - Pos = MAP_APPFONT ( 12 , 105 ); - Size = MAP_APPFONT ( 58 , 100 ); - TabStop = TRUE; - DropDown = TRUE; - }; - String STR_CHARNAME_NOSTYLE - { - Text [ en-US ] = "No %1"; - }; - String STR_CHARNAME_FAMILY - { - Text [ en-US ] = "Family"; - }; - String STR_CHARNAME_FONT - { - Text [ en-US ] = "Font"; - }; - String STR_CHARNAME_STYLE - { - Text [ en-US ] = "Style"; - }; - String STR_CHARNAME_TYPEFACE - { - Text [ en-US ] = "Typeface"; - }; -}; diff --git a/cui/source/tabpages/strings.src b/cui/source/tabpages/strings.src index 53fe4445a4ac..046959574dcc 100644 --- a/cui/source/tabpages/strings.src +++ b/cui/source/tabpages/strings.src @@ -135,3 +135,23 @@ String RID_SVXSTR_CHARNAME_TRANSPARENT { Text [ en-US ] = "Transparent"; }; +String RID_SVXSTR_CHARNAME_NOSTYLE +{ + Text [ en-US ] = "No %1"; +}; +String RID_SVXSTR_CHARNAME_FAMILY +{ + Text [ en-US ] = "Family"; +}; +String RID_SVXSTR_CHARNAME_FONT +{ + Text [ en-US ] = "Font"; +}; +String RID_SVXSTR_CHARNAME_STYLE +{ + Text [ en-US ] = "Style"; +}; +String RID_SVXSTR_CHARNAME_TYPEFACE +{ + Text [ en-US ] = "Typeface"; +}; diff --git a/cui/uiconfig/ui/charnamepage.ui b/cui/uiconfig/ui/charnamepage.ui new file mode 100644 index 000000000000..05d2527df308 --- /dev/null +++ b/cui/uiconfig/ui/charnamepage.ui @@ -0,0 +1,654 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkBox" id="CharNamePage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkFrame" id="simple"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="westfontnameft-nocjk"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Family </property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="weststyleft-nocjk"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Style</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="westsizeft-nocjk"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Size</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="westlangft-nocjk"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Language</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svxlo:SvxLanguageBox" id="westlanglb-nocjk"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <object class="svtlo:FontNameBox" id="westfontnamelb-nocjk"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="dropdown">False</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svtlo:FontStyleBox" id="weststylelb-nocjk"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="dropdown">False</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svtlo:FontSizeBox" id="westsizelb-nocjk"> + <property name="height_request">150</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="dropdown">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label21"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Font</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="western"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="westfontnameft-cjk"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Family </property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="weststyleft-cjk"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Style</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="westsizeft-cjk"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Size</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="westlangft-cjk"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Language</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svtlo:FontNameBox" id="westfontnamelb-cjk"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svtlo:FontStyleBox" id="weststylelb-cjk"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svtlo:FontSizeBox" id="westsizelb-cjk"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svxlo:SvxLanguageBox" id="westlanglb-cjk"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Western text font</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="asian"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="eastfontnameft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Family </property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="eaststyleft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Style</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="eastsizeft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Size</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="eastlangft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Language</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svtlo:FontNameBox" id="eastfontnamelb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svtlo:FontStyleBox" id="eaststylelb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svtlo:FontSizeBox" id="eastsizelb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svxlo:SvxLanguageBox" id="eastlanglb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Asian text font</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="ctl"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="ctlfontnameft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Family </property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="ctlstyleft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Style</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="ctlsizeft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Size</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="ctllangft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Language</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svtlo:FontNameBox" id="ctlfontnamelb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svtlo:FontStyleBox" id="ctlstylelb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svtlo:FontSizeBox" id="ctlsizelb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svxlo:SvxLanguageBox" id="ctllanglb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">CTL font</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="svxlo:SvxFontPrevWindow" id="preview"> + <property name="height_request">100</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label19"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Preview</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">4</property> + </packing> + </child> + </object> +</interface> |