summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/AllLangResTarget_cui.mk1
-rw-r--r--cui/UI_cui.mk1
-rw-r--r--cui/source/inc/chardlg.hxx21
-rw-r--r--cui/source/inc/cuires.hrc5
-rw-r--r--cui/source/tabpages/chardlg.cxx393
-rw-r--r--cui/source/tabpages/chardlg.hrc78
-rw-r--r--cui/source/tabpages/chardlg.src377
-rw-r--r--cui/source/tabpages/strings.src20
-rw-r--r--cui/uiconfig/ui/charnamepage.ui654
-rw-r--r--svtools/inc/svtools/ctrlbox.hxx1
-rw-r--r--svtools/source/control/ctrlbox.cxx69
-rw-r--r--svx/inc/svx/langbox.hxx3
-rw-r--r--svx/source/dialog/fntctrl.cxx3
-rw-r--r--svx/source/dialog/langbox.cxx17
-rw-r--r--sw/source/ui/cctrl/actctrl.cxx5
-rw-r--r--sw/source/ui/misc/numberingtypelistbox.cxx4
-rw-r--r--vcl/inc/vcl/builder.hxx6
-rw-r--r--vcl/inc/vcl/combobox.hxx3
-rw-r--r--vcl/inc/vcl/layout.hxx5
-rw-r--r--vcl/inc/vcl/lstbox.hxx3
-rw-r--r--vcl/source/window/builder.cxx6
-rw-r--r--vcl/source/window/printdlg.cxx4
22 files changed, 881 insertions, 798 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>
diff --git a/svtools/inc/svtools/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx
index 5cb20efb26f5..44117464cb76 100644
--- a/svtools/inc/svtools/ctrlbox.hxx
+++ b/svtools/inc/svtools/ctrlbox.hxx
@@ -486,6 +486,7 @@ private:
using ComboBox::SetText;
public:
FontStyleBox( Window* pParent, const ResId& rResId );
+ FontStyleBox( Window* pParent, WinBits nBits );
virtual ~FontStyleBox();
virtual void Select();
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index e420d4e9fc5e..1ee95891eb5c 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -29,6 +29,7 @@
#define _CTRLBOX_CXX
#include <tools/stream.hxx>
+#include <vcl/builder.hxx>
#include <vcl/svapp.hxx>
#include <vcl/field.hxx>
#include <vcl/helper.hxx>
@@ -124,10 +125,30 @@ ColorListBox::ColorListBox( Window* pParent, const ResId& rResId ) :
ImplInit();
}
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeColorListBox(Window *pParent)
+namespace
+{
+ bool extractDropdown(VclBuilder::stringmap &rMap)
+ {
+ bool bDropdown = true;
+ VclBuilder::stringmap::iterator aFind = rMap.find(rtl::OString(RTL_CONSTASCII_STRINGPARAM("dropdown")));
+ if (aFind != rMap.end())
+ {
+ bDropdown = toBool(aFind->second);
+ rMap.erase(aFind);
+ }
+ return bDropdown;
+ }
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeColorListBox(Window *pParent, VclBuilder::stringmap &rMap)
{
- ColorListBox *pListBox = new ColorListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK);
- pListBox->SetDropDownLineCount(16); //arbitrary
+ bool bDropdown = extractDropdown(rMap);
+ WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK;
+ if (bDropdown)
+ nWinBits |= WB_DROPDOWN;
+ ColorListBox *pListBox = new ColorListBox(pParent, nWinBits);
+ if (bDropdown)
+ pListBox->SetBestDropDownLineCount();
return pListBox;
}
@@ -1040,6 +1061,18 @@ FontNameBox::FontNameBox( Window* pParent, const ResId& rResId ) :
InitFontMRUEntriesFile();
}
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeFontNameBox(Window *pParent, VclBuilder::stringmap &rMap)
+{
+ bool bDropdown = extractDropdown(rMap);
+ WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK;
+ if (bDropdown)
+ nWinBits |= WB_DROPDOWN;
+ FontNameBox *pListBox = new FontNameBox(pParent, nWinBits);
+ if (bDropdown)
+ pListBox->SetBestDropDownLineCount();
+ return pListBox;
+}
+
// -------------------------------------------------------------------
FontNameBox::~FontNameBox()
@@ -1483,7 +1516,23 @@ FontStyleBox::FontStyleBox( Window* pParent, const ResId& rResId ) :
aLastStyle = GetText();
}
-// -------------------------------------------------------------------
+FontStyleBox::FontStyleBox( Window* pParent, WinBits nBits ) :
+ ComboBox( pParent, nBits )
+{
+ aLastStyle = GetText();
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeFontStyleBox(Window *pParent, VclBuilder::stringmap &rMap)
+{
+ bool bDropdown = extractDropdown(rMap);
+ WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK;
+ if (bDropdown)
+ nWinBits |= WB_DROPDOWN;
+ FontStyleBox *pListBox = new FontStyleBox(pParent, nWinBits);
+ if (bDropdown)
+ pListBox->SetBestDropDownLineCount();
+ return pListBox;
+}
FontStyleBox::~FontStyleBox()
{
@@ -1693,6 +1742,18 @@ FontSizeBox::FontSizeBox( Window* pParent, const ResId& rResId ) :
ImplInit();
}
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeFontSizeBox(Window *pParent, VclBuilder::stringmap &rMap)
+{
+ bool bDropdown = extractDropdown(rMap);
+ WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK;
+ if (bDropdown)
+ nWinBits |= WB_DROPDOWN;
+ FontSizeBox* pListBox = new FontSizeBox(pParent, nWinBits);
+ if (bDropdown)
+ pListBox->SetBestDropDownLineCount();
+ return pListBox;
+}
+
// -----------------------------------------------------------------------
FontSizeBox::~FontSizeBox()
diff --git a/svx/inc/svx/langbox.hxx b/svx/inc/svx/langbox.hxx
index 03f1839b0c72..ccf7dc406f39 100644
--- a/svx/inc/svx/langbox.hxx
+++ b/svx/inc/svx/langbox.hxx
@@ -78,7 +78,8 @@ private:
SVX_DLLPRIVATE sal_uInt16 ImplInsertLanguage(LanguageType, sal_uInt16, sal_Int16 );
public:
- SvxLanguageBox( Window* pParent, const ResId& rResId, sal_Bool bCheck = sal_False);
+ SvxLanguageBox(Window* pParent, const ResId& rResId, sal_Bool bCheck = sal_False);
+ SvxLanguageBox(Window* pParent, WinBits nBits, sal_Bool bCheck = sal_False);
~SvxLanguageBox();
void SetLanguageList( sal_Int16 nLangList,
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index fb6f0e638d99..c09f3bfc3fac 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -28,6 +28,7 @@
#include <sfx2/viewsh.hxx> // SfxViewShell
#include <sfx2/printer.hxx> // Printer
+#include <vcl/builder.hxx>
#include <vcl/metric.hxx>
#include <vcl/svapp.hxx>
#include <unicode/uchar.h>
@@ -526,7 +527,7 @@ SvxFontPrevWindow::SvxFontPrevWindow(Window* pParent) :
Init();
}
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxFontPrevWindow(Window *pParent)
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxFontPrevWindow(Window *pParent, VclBuilder::stringmap &)
{
SvxFontPrevWindow *pWindow = new SvxFontPrevWindow(pParent);
return pWindow;
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 09f8163bf01b..72e385aa2fef 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -42,6 +42,7 @@
#include <svx/langbox.hxx>
#include <svx/dialmgr.hxx>
#include <svx/dialogs.hrc>
+#include <vcl/builder.hxx>
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::lang;
@@ -137,6 +138,22 @@ SvxLanguageBox::SvxLanguageBox( Window* pParent, const ResId& rResId, sal_Bool b
{
Init();
}
+
+SvxLanguageBox::SvxLanguageBox( Window* pParent, WinBits nBits, sal_Bool bCheck )
+ : ListBox( pParent, nBits )
+ , m_pSpellUsedLang( NULL )
+ , m_bWithCheckmark( bCheck )
+{
+ Init();
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxLanguageBox(Window *pParent, VclBuilder::stringmap &)
+{
+ SvxLanguageBox *pListBox = new SvxLanguageBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK);
+ pListBox->SetBestDropDownLineCount();
+ return pListBox;
+}
+
//------------------------------------------------------------------------
void SvxLanguageBox::Init()
{
diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx
index 0f2d02afc61f..34f9d5d7f072 100644
--- a/sw/source/ui/cctrl/actctrl.cxx
+++ b/sw/source/ui/cctrl/actctrl.cxx
@@ -28,6 +28,7 @@
#include <comphelper/string.hxx>
+#include <vcl/builder.hxx>
#include "actctrl.hxx"
void NumEditAction::Action()
@@ -125,14 +126,14 @@ void ReturnActionEdit::KeyInput( const KeyEvent& rEvt)
Edit::KeyInput(rEvt);
}
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeTableNameEdit(Window *pParent)
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeTableNameEdit(Window *pParent, VclBuilder::stringmap &)
{
TableNameEdit* pTableNameEdit = new TableNameEdit(pParent);
pTableNameEdit->SetMaxWidthInChars(25);
return pTableNameEdit;
}
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeNoSpaceEdit(Window *pParent)
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeNoSpaceEdit(Window *pParent, VclBuilder::stringmap &)
{
return new NoSpaceEdit(pParent);
}
diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx
index 1fa26fc2547e..c3e46aa4e52d 100644
--- a/sw/source/ui/misc/numberingtypelistbox.cxx
+++ b/sw/source/ui/misc/numberingtypelistbox.cxx
@@ -77,10 +77,10 @@ bool SwNumberingTypeListBox::set_property(const rtl::OString &rKey, const rtl::O
return true;
}
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSwNumberingTypeListBox(Window *pParent)
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSwNumberingTypeListBox(Window *pParent, VclBuilder::stringmap &)
{
SwNumberingTypeListBox *pListBox = new SwNumberingTypeListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK);
- pListBox->SetDropDownLineCount(16);
+ pListBox->SetBestDropDownLineCount();
return pListBox;
}
diff --git a/vcl/inc/vcl/builder.hxx b/vcl/inc/vcl/builder.hxx
index 364e75211792..bd5cd6e535d8 100644
--- a/vcl/inc/vcl/builder.hxx
+++ b/vcl/inc/vcl/builder.hxx
@@ -42,7 +42,7 @@ class VCL_DLLPUBLIC VclBuilder
{
public:
typedef std::map<rtl::OString, rtl::OString> stringmap;
- typedef Window* (*customMakeWidget)(Window *pParent);
+ typedef Window* (*customMakeWidget)(Window *pParent, stringmap &rVec);
private:
struct WinAndId
{
@@ -236,6 +236,10 @@ public:
}
};
+/*
+ * @return true if rValue is "True", "true", "1", etc.
+ */
+bool VCL_DLLPUBLIC toBool(const rtl::OString &rValue);
#endif
diff --git a/vcl/inc/vcl/combobox.hxx b/vcl/inc/vcl/combobox.hxx
index 78fd8a83c12e..ccfb8c935839 100644
--- a/vcl/inc/vcl/combobox.hxx
+++ b/vcl/inc/vcl/combobox.hxx
@@ -114,7 +114,8 @@ public:
Rectangle GetDropDownPosSizePixel() const;
void SetDropDownLineCount( sal_uInt16 nLines );
- sal_uInt16 GetDropDownLineCount() const;
+ sal_uInt16 GetDropDownLineCount() const;
+ void SetBestDropDownLineCount() { SetDropDownLineCount(16); }
void EnableAutoSize( sal_Bool bAuto );
sal_Bool IsAutoSizeEnabled() const { return mbDDAutoSize; }
diff --git a/vcl/inc/vcl/layout.hxx b/vcl/inc/vcl/layout.hxx
index 278379dbe9f7..1b007159965c 100644
--- a/vcl/inc/vcl/layout.hxx
+++ b/vcl/inc/vcl/layout.hxx
@@ -471,11 +471,6 @@ private:
};
-/*
- * @return true if rValue is "True", "true", "1", etc.
- */
-bool toBool(const rtl::OString &rValue);
-
// retro-fitting utilities //
//Get a Size which is large enough to contain all children with
diff --git a/vcl/inc/vcl/lstbox.hxx b/vcl/inc/vcl/lstbox.hxx
index 314f8d78a3a9..669f55ce7e22 100644
--- a/vcl/inc/vcl/lstbox.hxx
+++ b/vcl/inc/vcl/lstbox.hxx
@@ -111,7 +111,8 @@ public:
Rectangle GetDropDownPosSizePixel() const;
void SetDropDownLineCount( sal_uInt16 nLines );
- sal_uInt16 GetDropDownLineCount() const;
+ sal_uInt16 GetDropDownLineCount() const;
+ void SetBestDropDownLineCount() { SetDropDownLineCount(16); }
void EnableAutoSize( sal_Bool bAuto );
sal_Bool IsAutoSizeEnabled() const { return mbDDAutoSize; }
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index e7ee11b3c821..d3fa857dc9ee 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -496,14 +496,14 @@ Window *VclBuilder::makeObject(Window *pParent, const rtl::OString &name, const
{
extractModel(id, rMap);
ListBox *pListBox = new ListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK);
- pListBox->SetDropDownLineCount(16); //arbitrary
+ pListBox->SetBestDropDownLineCount();
pWindow = pListBox;
}
else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkComboBoxText")))
{
extractModel(id, rMap);
ComboBox* pComboBox = new ComboBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK);
- pComboBox->SetDropDownLineCount(16); //arbitrary
+ pComboBox->SetBestDropDownLineCount();
pWindow = pComboBox;
}
else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkTreeView")))
@@ -549,7 +549,7 @@ Window *VclBuilder::makeObject(Window *pParent, const rtl::OString &name, const
aModule.loadRelative(&thisModule, sModule.makeStringAndClear());
customMakeWidget pFunction = (customMakeWidget)aModule.getFunctionSymbol(sFunction);
if (pFunction)
- pWindow = (*pFunction)(pParent);
+ pWindow = (*pFunction)(pParent, rMap);
}
}
if (!pWindow)
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index e8b9367ba53d..ad80b51f1500 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -62,12 +62,12 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::container;
using namespace com::sun::star::beans;
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makePrintPreviewWindow(Window *pParent)
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makePrintPreviewWindow(Window *pParent, VclBuilder::stringmap &)
{
return new PrintDialog::PrintPreviewWindow(pParent);
}
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeShowNupOrderWindow(Window *pParent)
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeShowNupOrderWindow(Window *pParent, VclBuilder::stringmap &)
{
return new PrintDialog::ShowNupOrderWindow(pParent);
}