Kaydet (Commit) 5918816d authored tarafından Caolán McNamara's avatar Caolán McNamara

move fonts options page .ui to cui and adapt code

Change-Id: I3838de932dea44accd3ec5a8eca3706f65058661
üst 0d9a68f9
...@@ -78,7 +78,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\ ...@@ -78,7 +78,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/options/connpooloptions.src \ cui/source/options/connpooloptions.src \
cui/source/options/dbregister.src \ cui/source/options/dbregister.src \
cui/source/options/doclinkdialog.src \ cui/source/options/doclinkdialog.src \
cui/source/options/fontsubs.src \
cui/source/options/internationaloptions.src \ cui/source/options/internationaloptions.src \
cui/source/options/optasian.src \ cui/source/options/optasian.src \
cui/source/options/optchart.src \ cui/source/options/optchart.src \
......
...@@ -32,6 +32,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\ ...@@ -32,6 +32,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/objecttitledescdialog \ cui/uiconfig/ui/objecttitledescdialog \
cui/uiconfig/ui/optaccessibilitypage \ cui/uiconfig/ui/optaccessibilitypage \
cui/uiconfig/ui/optappearancepage \ cui/uiconfig/ui/optappearancepage \
cui/uiconfig/ui/optfontspage \
cui/uiconfig/ui/personalization_tab \ cui/uiconfig/ui/personalization_tab \
cui/uiconfig/ui/pickbulletpage \ cui/uiconfig/ui/pickbulletpage \
cui/uiconfig/ui/pickgraphicpage \ cui/uiconfig/ui/pickgraphicpage \
......
...@@ -178,10 +178,7 @@ ...@@ -178,10 +178,7 @@
#define HID_HANGULDLG_BUTTON_IGNOREALL "CUI_HID_HANGULDLG_BUTTON_IGNOREALL" #define HID_HANGULDLG_BUTTON_IGNOREALL "CUI_HID_HANGULDLG_BUTTON_IGNOREALL"
#define HID_HANGULDLG_BUTTON_CHANGE "CUI_HID_HANGULDLG_BUTTON_CHANGE" #define HID_HANGULDLG_BUTTON_CHANGE "CUI_HID_HANGULDLG_BUTTON_CHANGE"
#define HID_HANGULDLG_BUTTON_CHANGEALL "CUI_HID_HANGULDLG_BUTTON_CHANGEALL" #define HID_HANGULDLG_BUTTON_CHANGEALL "CUI_HID_HANGULDLG_BUTTON_CHANGEALL"
#define HID_OFA_FONT_SUBSTITUTION "CUI_HID_OFA_FONT_SUBSTITUTION"
#define HID_HANGULDLG_EDIT_NEWWORD "CUI_HID_HANGULDLG_EDIT_NEWWORD" #define HID_HANGULDLG_EDIT_NEWWORD "CUI_HID_HANGULDLG_EDIT_NEWWORD"
#define HID_OFA_SUBST_APPLY "CUI_HID_OFA_SUBST_APPLY"
#define HID_OFA_SUBST_DELETE "CUI_HID_OFA_SUBST_DELETE"
#define HID_CHARMAP_CTL_SHOWSET "CUI_HID_CHARMAP_CTL_SHOWSET" #define HID_CHARMAP_CTL_SHOWSET "CUI_HID_CHARMAP_CTL_SHOWSET"
#define HID_CHARMAP_CTL_SHOWTEXT "CUI_HID_CHARMAP_CTL_SHOWTEXT" #define HID_CHARMAP_CTL_SHOWTEXT "CUI_HID_CHARMAP_CTL_SHOWTEXT"
#define HID_CHARMAP_CTL_SHOWCHAR "CUI_HID_CHARMAP_CTL_SHOWCHAR" #define HID_CHARMAP_CTL_SHOWCHAR "CUI_HID_CHARMAP_CTL_SHOWCHAR"
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx> #include <vcl/wrkwin.hxx>
#include <svtools/fontsubstconfig.hxx> #include <svtools/fontsubstconfig.hxx>
#include "fontsubs.hrc"
#include "fontsubs.hxx" #include "fontsubs.hxx"
#include <dialmgr.hxx> #include <dialmgr.hxx>
#include "helpid.hrc" #include "helpid.hrc"
...@@ -39,111 +38,81 @@ ...@@ -39,111 +38,81 @@
/*********************************************************************/ /*********************************************************************/
SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent, SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent,
const SfxItemSet& rSet ) : const SfxItemSet& rSet )
SfxTabPage(pParent, CUI_RES(RID_SVX_FONT_SUBSTITUTION), rSet), : SfxTabPage(pParent, "OptFontsPage", "cui/ui/optfontspage.ui", rSet)
aUseTableCB (this, CUI_RES(CB_USETABLE)), , pConfig(new SvtFontSubstConfig)
aFont1FT (this, CUI_RES(FT_FONT1)), , pCheckButtonData(0)
aFont1CB (this, CUI_RES(CB_FONT1)),
aFont2FT (this, CUI_RES(FT_FONT2)),
aFont2CB (this, CUI_RES(CB_FONT2)),
aNewDelTBX (this, CUI_RES(TBX_SUBSTNEWDEL)),
m_aCheckLBContainer(this, CUI_RES(CLB_SUBSTITUTES)),
aCheckLB(m_aCheckLBContainer),
aSourceViewFontsFL (this, CUI_RES(FL_SOURCEVIEW )),
aFontNameFT (this, CUI_RES(FT_FONTNAME )),
aFontNameLB (this, CUI_RES(LB_FONTNAME )),
aNonPropFontsOnlyCB(this, CUI_RES(CB_NONPROP )),
aFontHeightFT (this, CUI_RES(FT_FONTHEIGHT )),
aFontHeightLB (this, CUI_RES(LB_FONTHEIGHT )),
aImageList (CUI_RES(IL_ICON)),
sAutomatic (CUI_RES( STR_AUTOMATIC )),
pConfig(new SvtFontSubstConfig),
sHeader1 (CUI_RES( STR_HEADER1 )),
sHeader2 (CUI_RES( STR_HEADER2 )),
sHeader3 (CUI_RES( STR_HEADER3 )),
sHeader4 (CUI_RES( STR_HEADER4 )),
pCheckButtonData(0)
{ {
FreeResource(); get(m_pUseTableCB, "usetable");
get(m_pReplacements, "replacements");
aTextColor = aCheckLB.GetTextColor(); get(m_pFont1CB, "font1");
get(m_pFont2CB, "font2");
for(sal_uInt16 k = 0; k < aNewDelTBX.GetItemCount(); k++) m_pFont1CB->SetStyle(m_pFont1CB->GetStyle() | WB_SORT);
aNewDelTBX.SetItemImage(aNewDelTBX.GetItemId(k), m_pFont2CB->SetStyle(m_pFont2CB->GetStyle() | WB_SORT);
aImageList.GetImage(aNewDelTBX.GetItemId(k))); get(m_pApply, "apply");
get(m_pDelete, "delete");
aNewDelTBX.SetSizePixel( aNewDelTBX.CalcWindowSizePixel() ); get(m_pFontNameLB, "fontname");
m_sAutomatic = m_pFontNameLB->GetEntry(0);
long nDelta = ( aFont1CB.GetSizePixel().Height() - assert(!m_sAutomatic.isEmpty());
aNewDelTBX.GetSizePixel().Height() ) / 2; get(m_pNonPropFontsOnlyCB, "nonpropfontonly");
Point aNewPnt = aNewDelTBX.GetPosPixel(); get(m_pFontHeightLB, "fontheight");
aNewPnt.Y() += nDelta;
aNewDelTBX.SetPosPixel( aNewPnt ); SvxSimpleTableContainer *pCheckLBContainer = get<SvxSimpleTableContainer>("checklb");
Size aControlSize(248, 75);
aControlSize = LogicToPixel(aControlSize, MAP_APPFONT);
pCheckLBContainer->set_width_request(aControlSize.Width());
pCheckLBContainer->set_height_request(aControlSize.Height());
m_pCheckLB = new SvxFontSubstCheckListBox(*pCheckLBContainer);
m_pCheckLB->SetHelpId(HID_OFA_FONT_SUBST_CLB);
m_pCheckLB->SetStyle(m_pCheckLB->GetStyle()|WB_HSCROLL|WB_VSCROLL);
m_pCheckLB->SetSelectionMode(MULTIPLE_SELECTION);
m_pCheckLB->SortByCol(2);
long aStaticTabs[] = { 4, 0, 0, 0, 0 };
m_pCheckLB->SvxSimpleTable::SetTabs(&aStaticTabs[0]);
OUString sHeader1(get<FixedText>("always")->GetText());
OUString sHeader2(get<FixedText>("screenonly")->GetText());
OUStringBuffer sHeader;
sHeader.append(sHeader1).append("\t").append(sHeader2)
.append("\t ").append(get<FixedText>("font")->GetText())
.append("\t ").append(get<FixedText>("replacewith")->GetText());
m_pCheckLB->InsertHeaderEntry(sHeader.makeStringAndClear());
HeaderBar &rBar = m_pCheckLB->GetTheHeaderBar();
HeaderBarItemBits nBits = rBar.GetItemBits(1) | HIB_FIXEDPOS | HIB_FIXED;
nBits &= ~HIB_CLICKABLE;
rBar.SetItemBits(1, nBits);
rBar.SetItemBits(2, nBits);
aCheckLB.SetHelpId(HID_OFA_FONT_SUBST_CLB); m_pCheckLB->setColSizes();
aCheckLB.SetStyle(aCheckLB.GetStyle()|WB_HSCROLL|WB_VSCROLL);
aCheckLB.SetSelectionMode(MULTIPLE_SELECTION);
aCheckLB.SortByCol(2);
aTextColor = m_pCheckLB->GetTextColor();
Link aLink(LINK(this, SvxFontSubstTabPage, SelectHdl)); Link aLink(LINK(this, SvxFontSubstTabPage, SelectHdl));
aCheckLB.SetSelectHdl(aLink); m_pCheckLB->SetSelectHdl(aLink);
aUseTableCB.SetClickHdl(aLink); m_pUseTableCB->SetClickHdl(aLink);
aFont1CB.SetSelectHdl(aLink); m_pFont1CB->SetSelectHdl(aLink);
aFont1CB.SetModifyHdl(aLink); m_pFont1CB->SetModifyHdl(aLink);
aFont2CB.SetSelectHdl(aLink); m_pFont2CB->SetSelectHdl(aLink);
aFont2CB.SetModifyHdl(aLink); m_pFont2CB->SetModifyHdl(aLink);
aNewDelTBX.SetClickHdl(aLink); m_pApply->SetClickHdl(aLink);
m_pDelete->SetClickHdl(aLink);
aNonPropFontsOnlyCB.SetClickHdl(LINK(this, SvxFontSubstTabPage, NonPropFontsHdl));
static long aStaticTabs[] = { 4, 0, 0, 0, 0 };
long nW1 = GetTextWidth( sHeader1 );
long nW2 = GetTextWidth( sHeader2 );
long nMax = Max( nW1, nW2 ) + 6; // width of the longest header + a little offset
long nMin = aFontNameFT.LogicToPixel( Size( 30, 0 ), MAP_APPFONT ).Width();
nMax = Max( nMax, nMin );
const long nDoubleMax = 2*nMax;
const long nRest = aCheckLB.GetSizePixel().Width() - nDoubleMax;
aStaticTabs[2] = nMax;
aStaticTabs[3] = nDoubleMax;
aStaticTabs[4] = nDoubleMax + nRest/2;
aCheckLB.SvxSimpleTable::SetTabs( aStaticTabs, MAP_PIXEL );
String sHeader(sHeader1);
rtl::OUString sTab("\t");
rtl::OUString sTabSpace("\t ");
sHeader += sTab;
sHeader += sHeader2;
sHeader += sTabSpace;
sHeader += sHeader3;
sHeader += sTabSpace;
sHeader += sHeader4;
aCheckLB.InsertHeaderEntry(sHeader);
HeaderBar &rBar = aCheckLB.GetTheHeaderBar();
HeaderBarItemBits nBits = rBar.GetItemBits(1) | HIB_FIXEDPOS | HIB_FIXED; m_pNonPropFontsOnlyCB->SetClickHdl(LINK(this, SvxFontSubstTabPage, NonPropFontsHdl));
nBits &= ~HIB_CLICKABLE;
rBar.SetItemBits(1, nBits);
rBar.SetItemBits(2, nBits);
sal_uInt16 nHeight; sal_uInt16 nHeight;
for(nHeight = 6; nHeight <= 16; nHeight++) for(nHeight = 6; nHeight <= 16; nHeight++)
aFontHeightLB.InsertEntry(OUString::number(nHeight)); m_pFontHeightLB->InsertEntry(OUString::number(nHeight));
for(nHeight = 18; nHeight <= 28; nHeight+= 2) for(nHeight = 18; nHeight <= 28; nHeight+= 2)
aFontHeightLB.InsertEntry(OUString::number(nHeight)); m_pFontHeightLB->InsertEntry(OUString::number(nHeight));
for(nHeight = 32; nHeight <= 48; nHeight+= 4) for(nHeight = 32; nHeight <= 48; nHeight+= 4)
aFontHeightLB.InsertEntry(OUString::number(nHeight)); m_pFontHeightLB->InsertEntry(OUString::number(nHeight));
for(nHeight = 54; nHeight <= 72; nHeight+= 6) for(nHeight = 54; nHeight <= 72; nHeight+= 6)
aFontHeightLB.InsertEntry(OUString::number(nHeight)); m_pFontHeightLB->InsertEntry(OUString::number(nHeight));
for(nHeight = 80; nHeight <= 96; nHeight+= 8) for(nHeight = 80; nHeight <= 96; nHeight+= 8)
aFontHeightLB.InsertEntry(OUString::number(nHeight)); m_pFontHeightLB->InsertEntry(OUString::number(nHeight));
} }
SvTreeListEntry* SvxFontSubstTabPage::CreateEntry(String& rFont1, String& rFont2) SvTreeListEntry* SvxFontSubstTabPage::CreateEntry(String& rFont1, String& rFont2)
...@@ -151,7 +120,7 @@ SvTreeListEntry* SvxFontSubstTabPage::CreateEntry(String& rFont1, String& rFont2 ...@@ -151,7 +120,7 @@ SvTreeListEntry* SvxFontSubstTabPage::CreateEntry(String& rFont1, String& rFont2
SvTreeListEntry* pEntry = new SvTreeListEntry; SvTreeListEntry* pEntry = new SvTreeListEntry;
if( !pCheckButtonData ) if( !pCheckButtonData )
pCheckButtonData = new SvLBoxButtonData( &aCheckLB ); pCheckButtonData = new SvLBoxButtonData( m_pCheckLB );
pEntry->AddItem( new SvLBoxContextBmp( pEntry, 0, Image(), Image(), 0)); // Sonst Puff! pEntry->AddItem( new SvLBoxContextBmp( pEntry, 0, Image(), Image(), 0)); // Sonst Puff!
...@@ -168,10 +137,11 @@ SvTreeListEntry* SvxFontSubstTabPage::CreateEntry(String& rFont1, String& rFont2 ...@@ -168,10 +137,11 @@ SvTreeListEntry* SvxFontSubstTabPage::CreateEntry(String& rFont1, String& rFont2
return pEntry; return pEntry;
} }
SvxFontSubstTabPage::~SvxFontSubstTabPage() SvxFontSubstTabPage::~SvxFontSubstTabPage()
{ {
delete pCheckButtonData; delete pCheckButtonData;
delete pConfig; delete pConfig;
delete m_pCheckLB;
} }
SfxTabPage* SvxFontSubstTabPage::Create( Window* pParent, SfxTabPage* SvxFontSubstTabPage::Create( Window* pParent,
...@@ -184,37 +154,37 @@ sal_Bool SvxFontSubstTabPage::FillItemSet( SfxItemSet& ) ...@@ -184,37 +154,37 @@ sal_Bool SvxFontSubstTabPage::FillItemSet( SfxItemSet& )
{ {
pConfig->ClearSubstitutions();// remove all entries pConfig->ClearSubstitutions();// remove all entries
pConfig->Enable(aUseTableCB.IsChecked()); pConfig->Enable(m_pUseTableCB->IsChecked());
SvTreeListEntry* pEntry = aCheckLB.First(); SvTreeListEntry* pEntry = m_pCheckLB->First();
while (pEntry) while (pEntry)
{ {
SubstitutionStruct aAdd; SubstitutionStruct aAdd;
aAdd.sFont = aCheckLB.GetEntryText(pEntry, 0); aAdd.sFont = m_pCheckLB->GetEntryText(pEntry, 0);
aAdd.sReplaceBy = aCheckLB.GetEntryText(pEntry, 1); aAdd.sReplaceBy = m_pCheckLB->GetEntryText(pEntry, 1);
aAdd.bReplaceAlways = aCheckLB.IsChecked(pEntry, 0); aAdd.bReplaceAlways = m_pCheckLB->IsChecked(pEntry, 0);
aAdd.bReplaceOnScreenOnly = aCheckLB.IsChecked(pEntry, 1); aAdd.bReplaceOnScreenOnly = m_pCheckLB->IsChecked(pEntry, 1);
pConfig->AddSubstitution(aAdd); pConfig->AddSubstitution(aAdd);
pEntry = aCheckLB.Next(pEntry); pEntry = m_pCheckLB->Next(pEntry);
} }
if(pConfig->IsModified()) if(pConfig->IsModified())
pConfig->Commit(); pConfig->Commit();
pConfig->Apply(); pConfig->Apply();
boost::shared_ptr< comphelper::ConfigurationChanges > batch( boost::shared_ptr< comphelper::ConfigurationChanges > batch(
comphelper::ConfigurationChanges::create()); comphelper::ConfigurationChanges::create());
if(aFontHeightLB.GetSavedValue() != aFontHeightLB.GetSelectEntryPos()) if(m_pFontHeightLB->GetSavedValue() != m_pFontHeightLB->GetSelectEntryPos())
officecfg::Office::Common::Font::SourceViewFont::FontHeight::set( officecfg::Office::Common::Font::SourceViewFont::FontHeight::set(
static_cast< sal_Int16 >(aFontHeightLB.GetSelectEntry().ToInt32()), static_cast< sal_Int16 >(m_pFontHeightLB->GetSelectEntry().ToInt32()),
batch); batch);
if(aNonPropFontsOnlyCB.GetSavedValue() != aNonPropFontsOnlyCB.IsChecked()) if(m_pNonPropFontsOnlyCB->GetSavedValue() != m_pNonPropFontsOnlyCB->IsChecked())
officecfg::Office::Common::Font::SourceViewFont:: officecfg::Office::Common::Font::SourceViewFont::
NonProportionalFontsOnly::set( NonProportionalFontsOnly::set(
aNonPropFontsOnlyCB.IsChecked(), batch); m_pNonPropFontsOnlyCB->IsChecked(), batch);
//font name changes cannot be detected by saved values //font name changes cannot be detected by saved values
rtl::OUString sFontName; rtl::OUString sFontName;
if(aFontNameLB.GetSelectEntryPos()) if(m_pFontNameLB->GetSelectEntryPos())
sFontName = aFontNameLB.GetSelectEntry(); sFontName = m_pFontNameLB->GetSelectEntry();
officecfg::Office::Common::Font::SourceViewFont::FontName::set( officecfg::Office::Common::Font::SourceViewFont::FontName::set(
boost::optional< rtl::OUString >(sFontName), batch); boost::optional< rtl::OUString >(sFontName), batch);
batch->commit(); batch->commit();
...@@ -224,124 +194,118 @@ sal_Bool SvxFontSubstTabPage::FillItemSet( SfxItemSet& ) ...@@ -224,124 +194,118 @@ sal_Bool SvxFontSubstTabPage::FillItemSet( SfxItemSet& )
void SvxFontSubstTabPage::Reset( const SfxItemSet& ) void SvxFontSubstTabPage::Reset( const SfxItemSet& )
{ {
aCheckLB.SetUpdateMode(sal_False); m_pCheckLB->SetUpdateMode(sal_False);
aCheckLB.Clear(); m_pCheckLB->Clear();
FontList aFntLst( Application::GetDefaultDevice() ); FontList aFntLst( Application::GetDefaultDevice() );
aFont1CB.Fill( &aFntLst ); m_pFont1CB->Fill( &aFntLst );
aFont2CB.Fill( &aFntLst ); m_pFont2CB->Fill( &aFntLst );
sal_Int32 nCount = pConfig->SubstitutionCount(); sal_Int32 nCount = pConfig->SubstitutionCount();
if (nCount) if (nCount)
aUseTableCB.Check(pConfig->IsEnabled()); m_pUseTableCB->Check(pConfig->IsEnabled());
for (sal_Int32 i = 0; i < nCount; i++) for (sal_Int32 i = 0; i < nCount; ++i)
{ {
const SubstitutionStruct* pSubs = pConfig->GetSubstitution(i); const SubstitutionStruct* pSubs = pConfig->GetSubstitution(i);
String aTmpStr1(pSubs->sFont); String aTmpStr1(pSubs->sFont);
String aTmpStr2(pSubs->sReplaceBy); String aTmpStr2(pSubs->sReplaceBy);
SvTreeListEntry* pEntry = CreateEntry(aTmpStr1, aTmpStr2); SvTreeListEntry* pEntry = CreateEntry(aTmpStr1, aTmpStr2);
aCheckLB.Insert(pEntry); m_pCheckLB->Insert(pEntry);
aCheckLB.CheckEntry(pEntry, 0, pSubs->bReplaceAlways); m_pCheckLB->CheckEntry(pEntry, 0, pSubs->bReplaceAlways);
aCheckLB.CheckEntry(pEntry, 1, pSubs->bReplaceOnScreenOnly); m_pCheckLB->CheckEntry(pEntry, 1, pSubs->bReplaceOnScreenOnly);
} }
CheckEnable(); CheckEnable();
aCheckLB.SetUpdateMode(sal_True); m_pCheckLB->SetUpdateMode(sal_True);
//fill font name box first //fill font name box first
aNonPropFontsOnlyCB.Check( m_pNonPropFontsOnlyCB->Check(
officecfg::Office::Common::Font::SourceViewFont:: officecfg::Office::Common::Font::SourceViewFont::
NonProportionalFontsOnly::get()); NonProportionalFontsOnly::get());
NonPropFontsHdl(&aNonPropFontsOnlyCB); NonPropFontsHdl(m_pNonPropFontsOnlyCB);
rtl::OUString sFontName( rtl::OUString sFontName(
officecfg::Office::Common::Font::SourceViewFont::FontName::get(). officecfg::Office::Common::Font::SourceViewFont::FontName::get().
get_value_or(rtl::OUString())); get_value_or(rtl::OUString()));
if(!sFontName.isEmpty()) if(!sFontName.isEmpty())
aFontNameLB.SelectEntry(sFontName); m_pFontNameLB->SelectEntry(sFontName);
else else
aFontNameLB.SelectEntryPos(0); m_pFontNameLB->SelectEntryPos(0);
aFontHeightLB.SelectEntry( m_pFontHeightLB->SelectEntry(
OUString::number( OUString::number(
officecfg::Office::Common::Font::SourceViewFont::FontHeight:: officecfg::Office::Common::Font::SourceViewFont::FontHeight::
get())); get()));
aNonPropFontsOnlyCB.SaveValue(); m_pNonPropFontsOnlyCB->SaveValue();
aFontHeightLB.SaveValue(); m_pFontHeightLB->SaveValue();
} }
IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin) IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin)
{ {
if (pWin == &aNewDelTBX) if (pWin == m_pApply || pWin == m_pDelete)
{ {
SvTreeListEntry* pEntry; SvTreeListEntry* pEntry;
// nCol is stupidly the nCol'th text column, not counted! // nCol is stupidly the nCol'th text column, not counted!
// Therefor "0" as column. // Therefor "0" as column.
sal_uLong nPos = aCheckLB.GetEntryPos(aFont1CB.GetText(), 0); sal_uLong nPos = m_pCheckLB->GetEntryPos(m_pFont1CB->GetText(), 0);
switch (aNewDelTBX.GetCurItemId()) if (pWin == m_pApply)
{
case BT_SUBSTAPPLY:
{ {
if (nPos != 0xffffffff) if (nPos != 0xffffffff)
{ {
// change entry // change entry
aCheckLB.SetEntryText(aFont2CB.GetText(), nPos, 1); m_pCheckLB->SetEntryText(m_pFont2CB->GetText(), nPos, 1);
pEntry = aCheckLB.GetEntry(nPos); pEntry = m_pCheckLB->GetEntry(nPos);
} }
else else
{ {
// new entry // new entry
String sFont1 = aFont1CB.GetText(); String sFont1 = m_pFont1CB->GetText();
String sFont2 = aFont2CB.GetText(); String sFont2 = m_pFont2CB->GetText();
pEntry = CreateEntry(sFont1, sFont2); pEntry = CreateEntry(sFont1, sFont2);
aCheckLB.Insert(pEntry); m_pCheckLB->Insert(pEntry);
} }
aCheckLB.SelectAll(sal_False); m_pCheckLB->SelectAll(sal_False);
aCheckLB.Select(pEntry); m_pCheckLB->Select(pEntry);
} }
break; else if (pWin == m_pDelete)
case BT_SUBSTDELETE:
{ {
if (nPos != 0xffffffff) if (nPos != 0xffffffff)
{ {
pEntry = aCheckLB.FirstSelected(); pEntry = m_pCheckLB->FirstSelected();
while (pEntry) while (pEntry)
{ {
SvTreeListEntry* pDelEntry = pEntry; SvTreeListEntry* pDelEntry = pEntry;
pEntry = aCheckLB.NextSelected(pEntry); pEntry = m_pCheckLB->NextSelected(pEntry);
aCheckLB.RemoveEntry(pDelEntry); m_pCheckLB->RemoveEntry(pDelEntry);
} }
} }
} }
break;
}
} }
if (pWin == &aCheckLB) if (pWin == m_pCheckLB)
{ {
SvTreeListEntry* pEntry = aCheckLB.FirstSelected(); SvTreeListEntry* pEntry = m_pCheckLB->FirstSelected();
if (aCheckLB.NextSelected(pEntry) == 0) if (m_pCheckLB->NextSelected(pEntry) == 0)
{ {
aFont1CB.SetText(aCheckLB.GetEntryText(pEntry, 0)); m_pFont1CB->SetText(m_pCheckLB->GetEntryText(pEntry, 0));
aFont2CB.SetText(aCheckLB.GetEntryText(pEntry, 1)); m_pFont2CB->SetText(m_pCheckLB->GetEntryText(pEntry, 1));
} }
} }
if (pWin == &aFont1CB) if (pWin == m_pFont1CB)
{ {
sal_uLong nPos = aCheckLB.GetEntryPos(aFont1CB.GetText(), 0); sal_uLong nPos = m_pCheckLB->GetEntryPos(m_pFont1CB->GetText(), 0);
if (nPos != 0xffffffff) if (nPos != 0xffffffff)
{ {
SvTreeListEntry* pEntry = aCheckLB.GetEntry(nPos); SvTreeListEntry* pEntry = m_pCheckLB->GetEntry(nPos);
if (pEntry != aCheckLB.FirstSelected()) if (pEntry != m_pCheckLB->FirstSelected())
{ {
aCheckLB.SelectAll(sal_False); m_pCheckLB->SelectAll(sal_False);
aCheckLB.Select(pEntry); m_pCheckLB->Select(pEntry);
} }
} }
} }
...@@ -354,79 +318,99 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin) ...@@ -354,79 +318,99 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin)
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
IMPL_LINK(SvxFontSubstTabPage, NonPropFontsHdl, CheckBox*, pBox) IMPL_LINK(SvxFontSubstTabPage, NonPropFontsHdl, CheckBox*, pBox)
{ {
String sFontName = aFontNameLB.GetSelectEntry(); String sFontName = m_pFontNameLB->GetSelectEntry();
sal_Bool bNonPropOnly = pBox->IsChecked(); sal_Bool bNonPropOnly = pBox->IsChecked();
aFontNameLB.Clear(); m_pFontNameLB->Clear();
FontList aFntLst( Application::GetDefaultDevice() ); FontList aFntLst( Application::GetDefaultDevice() );
aFontNameLB.InsertEntry(sAutomatic); m_pFontNameLB->InsertEntry(m_sAutomatic);
sal_uInt16 nFontCount = aFntLst.GetFontNameCount(); sal_uInt16 nFontCount = aFntLst.GetFontNameCount();
for(sal_uInt16 nFont = 0; nFont < nFontCount; nFont++) for(sal_uInt16 nFont = 0; nFont < nFontCount; nFont++)
{ {
const FontInfo& rInfo = aFntLst.GetFontName( nFont ); const FontInfo& rInfo = aFntLst.GetFontName( nFont );
if(!bNonPropOnly || rInfo.GetPitch() == PITCH_FIXED) if(!bNonPropOnly || rInfo.GetPitch() == PITCH_FIXED)
aFontNameLB.InsertEntry(rInfo.GetName()); m_pFontNameLB->InsertEntry(rInfo.GetName());
} }
aFontNameLB.SelectEntry(sFontName); m_pFontNameLB->SelectEntry(sFontName);
return 0; return 0;
} }
void SvxFontSubstTabPage::CheckEnable() void SvxFontSubstTabPage::CheckEnable()
{ {
sal_Bool bEnableAll = aUseTableCB.IsChecked(); sal_Bool bEnableAll = m_pUseTableCB->IsChecked();
m_pReplacements->Enable(bEnableAll);
if (bEnableAll) if (bEnableAll)
{ {
sal_Bool bApply, bDelete; sal_Bool bApply, bDelete;
SvTreeListEntry* pEntry = aCheckLB.FirstSelected(); SvTreeListEntry* pEntry = m_pCheckLB->FirstSelected();
String sEntry = aFont1CB.GetText(); String sEntry = m_pFont1CB->GetText();
sEntry += '\t'; sEntry += '\t';
sEntry += aFont2CB.GetText(); sEntry += m_pFont2CB->GetText();
// because of OS/2 optimization error (Bug #56267) a bit more intricate: // because of OS/2 optimization error (Bug #56267) a bit more intricate:
if (aFont1CB.GetText().isEmpty() || aFont2CB.GetText().isEmpty()) if (m_pFont1CB->GetText().isEmpty() || m_pFont2CB->GetText().isEmpty())
bApply = sal_False; bApply = sal_False;
else if(aFont1CB.GetText() == aFont2CB.GetText()) else if(m_pFont1CB->GetText() == m_pFont2CB->GetText())
bApply = sal_False; bApply = sal_False;
else if(aCheckLB.GetEntryPos(sEntry) != 0xffffffff) else if(m_pCheckLB->GetEntryPos(sEntry) != 0xffffffff)
bApply = sal_False; bApply = sal_False;
else if(pEntry != 0 && aCheckLB.NextSelected(pEntry) != 0) else if(pEntry != 0 && m_pCheckLB->NextSelected(pEntry) != 0)
bApply = sal_False; bApply = sal_False;
else else
bApply = sal_True; bApply = sal_True;
bDelete = pEntry != 0; bDelete = pEntry != 0;
aNewDelTBX.EnableItem(BT_SUBSTAPPLY, bApply); m_pApply->Enable(bApply);
aNewDelTBX.EnableItem(BT_SUBSTDELETE, bDelete); m_pDelete->Enable(bDelete);
} }
if (bEnableAll) if (bEnableAll)
{ {
if (!aCheckLB.IsEnabled()) if (!m_pCheckLB->IsEnabled())
{ {
aCheckLB.EnableTable(); m_pCheckLB->EnableTable();
aCheckLB.SetTextColor(aTextColor); m_pCheckLB->SetTextColor(aTextColor);
aCheckLB.Invalidate(); m_pCheckLB->Invalidate();
SelectHdl(&aFont1CB); SelectHdl(m_pFont1CB);
} }
} }
else else
{ {
if (aCheckLB.IsEnabled()) if (m_pCheckLB->IsEnabled())
{ {
aCheckLB.DisableTable(); m_pCheckLB->DisableTable();
aCheckLB.SetTextColor(Color(COL_GRAY)); m_pCheckLB->SetTextColor(Color(COL_GRAY));
aCheckLB.Invalidate(); m_pCheckLB->Invalidate();
aCheckLB.SelectAll(sal_False); m_pCheckLB->SelectAll(sal_False);
} }
} }
aNewDelTBX.Enable(bEnableAll); }
aFont1FT.Enable(bEnableAll);
aFont1CB.Enable(bEnableAll); void SvxFontSubstCheckListBox::setColSizes()
aFont2FT.Enable(bEnableAll); {
aFont2CB.Enable(bEnableAll); HeaderBar &rBar = GetTheHeaderBar();
if (rBar.GetItemCount() < 4)
return;
long nW1 = rBar.GetTextWidth(rBar.GetItemText(3));
long nW2 = rBar.GetTextWidth(rBar.GetItemText(4));
long nMax = Max( nW1, nW2 ) + 6; // width of the longest header + a little offset
long nMin = rBar.LogicToPixel(Size(10, 0), MAP_APPFONT).Width();
nMax = Max( nMax, nMin );
const long nDoubleMax = 2*nMax;
const long nRest = GetSizePixel().Width() - nDoubleMax;
long aStaticTabs[] = { 4, 0, 0, 0, 0 };
aStaticTabs[2] = nMax;
aStaticTabs[3] = nDoubleMax;
aStaticTabs[4] = nDoubleMax + nRest/2;
SvxSimpleTable::SetTabs(&aStaticTabs[0], MAP_PIXEL);
}
void SvxFontSubstCheckListBox::Resize()
{
SvxSimpleTable::Resize();
setColSizes();
} }
void SvxFontSubstCheckListBox::SetTabs() void SvxFontSubstCheckListBox::SetTabs()
......
/*
* 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_FONT_SUBSTITUTION
#define _SVX_FONT_SUBSTITUTION
#include <cuires.hrc>
// defines ------------------------------------------------------------------
#define CLB_SUBSTITUTES 1
#define FT_FONT1 2
#define CB_FONT1 3
#define FT_FONT2 4
#define CB_FONT2 5
#define TBX_SUBSTNEWDEL 6
#define BT_SUBSTAPPLY 7
#define BT_SUBSTDELETE 8
#define STR_HEADER1 10
#define STR_HEADER2 11
#define STR_HEADER3 12
#define STR_HEADER4 13
#define IL_ICON 20
#define CB_USETABLE 21
#define FL_SOURCEVIEW 22
#define FT_FONTNAME 23
#define LB_FONTNAME 24
#define CB_NONPROP 25
#define FT_FONTHEIGHT 26
#define LB_FONTHEIGHT 27
#define STR_AUTOMATIC 28
#endif
...@@ -38,6 +38,7 @@ class SvxFontSubstCheckListBox : public SvxSimpleTable ...@@ -38,6 +38,7 @@ class SvxFontSubstCheckListBox : public SvxSimpleTable
protected: protected:
virtual void SetTabs(); virtual void SetTabs();
virtual void KeyInput( const KeyEvent& rKEvt ); virtual void KeyInput( const KeyEvent& rKEvt );
virtual void Resize();
public: public:
SvxFontSubstCheckListBox(SvxSimpleTableContainer& rParent, WinBits nBits = WB_BORDER) SvxFontSubstCheckListBox(SvxSimpleTableContainer& rParent, WinBits nBits = WB_BORDER)
...@@ -54,37 +55,30 @@ class SvxFontSubstCheckListBox : public SvxSimpleTable ...@@ -54,37 +55,30 @@ class SvxFontSubstCheckListBox : public SvxSimpleTable
void CheckEntry(SvTreeListEntry* pEntry, sal_uInt16 nCol, sal_Bool bChecked); void CheckEntry(SvTreeListEntry* pEntry, sal_uInt16 nCol, sal_Bool bChecked);
SvButtonState GetCheckButtonState( SvTreeListEntry*, sal_uInt16 nCol ) const; SvButtonState GetCheckButtonState( SvTreeListEntry*, sal_uInt16 nCol ) const;
void SetCheckButtonState( SvTreeListEntry*, sal_uInt16 nCol, SvButtonState ); void SetCheckButtonState( SvTreeListEntry*, sal_uInt16 nCol, SvButtonState );
void setColSizes();
}; };
// class SvxFontSubstTabPage ---------------------------------------------------- // class SvxFontSubstTabPage ----------------------------------------------------
class SvtFontSubstConfig; class SvtFontSubstConfig;
class SvxFontSubstTabPage : public SfxTabPage class SvxFontSubstTabPage : public SfxTabPage
{ {
CheckBox aUseTableCB; CheckBox* m_pUseTableCB;
FixedText aFont1FT; VclContainer* m_pReplacements;
FontNameBox aFont1CB; FontNameBox* m_pFont1CB;
FixedText aFont2FT; FontNameBox* m_pFont2CB;
FontNameBox aFont2CB; PushButton* m_pApply;
ToolBox aNewDelTBX; PushButton* m_pDelete;
SvxSimpleTableContainer m_aCheckLBContainer;
SvxFontSubstCheckListBox aCheckLB;
FixedLine aSourceViewFontsFL;
FixedText aFontNameFT;
ListBox aFontNameLB;
CheckBox aNonPropFontsOnlyCB;
FixedText aFontHeightFT;
ListBox aFontHeightLB;
ImageList aImageList;
String sAutomatic;
SvtFontSubstConfig* pConfig; SvxFontSubstCheckListBox* m_pCheckLB;
ListBox* m_pFontNameLB;
CheckBox* m_pNonPropFontsOnlyCB;
ListBox* m_pFontHeightLB;
String sHeader1; OUString m_sAutomatic;
String sHeader2;
String sHeader3; SvtFontSubstConfig* pConfig;
String sHeader4;
Color aTextColor; Color aTextColor;
......
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "fontsubs.hrc"
#include "helpid.hrc"
/**************************************************************************/
TabPage RID_SVX_FONT_SUBSTITUTION
{
HelpID = HID_OFA_FONT_SUBSTITUTION ;
SVLook = TRUE ;
Hide = TRUE ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
CheckBox CB_USETABLE
{
HelpID = "cui:CheckBox:RID_SVX_FONT_SUBSTITUTION:CB_USETABLE";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Apply replacement table";
};
FixedText FT_FONT1
{
Pos = MAP_APPFONT ( 6 , 20 ) ;
Size = MAP_APPFONT ( 100 , 8 ) ;
Left = TRUE ;
Text [ en-US ] = "~Font";
};
ComboBox CB_FONT1
{
HelpID = "cui:ComboBox:RID_SVX_FONT_SUBSTITUTION:CB_FONT1";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 33 ) ;
Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
AutoSize = TRUE ;
AutoHScroll = TRUE ;
DDExtraWidth = TRUE ;
DropDown = TRUE;
Sort = TRUE;
};
FixedText FT_FONT2
{
Pos = MAP_APPFONT ( 110 , 20 ) ;
Size = MAP_APPFONT ( 100 , 8 ) ;
Left = TRUE ;
Text [ en-US ] = "Re~place with";
};
ComboBox CB_FONT2
{
HelpID = "cui:ComboBox:RID_SVX_FONT_SUBSTITUTION:CB_FONT2";
Border = TRUE ;
Pos = MAP_APPFONT ( 110 , 33 ) ;
Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
AutoSize = TRUE ;
AutoHScroll = TRUE ;
DDExtraWidth = TRUE ;
DropDown = TRUE;
Sort = TRUE;
};
ImageList IL_ICON
{
Prefix = "nu";
MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
IdList =
{
BT_SUBSTAPPLY ;
BT_SUBSTDELETE ;
};
IdCount = { 2 ; };
};
ToolBox TBX_SUBSTNEWDEL
{
Pos = MAP_APPFONT ( 214 , 33 ) ;
SVLook = TRUE ;
Border = FALSE ;
ItemList =
{
ToolBoxItem
{
Identifier = BT_SUBSTAPPLY ;
HelpID = HID_OFA_SUBST_APPLY ;
Text [ en-US ] = "Apply" ;
};
ToolBoxItem
{
Identifier = BT_SUBSTDELETE ;
HelpID = HID_OFA_SUBST_DELETE ;
Text [ en-US ] = "Delete" ;
};
};
};
Control CLB_SUBSTITUTES
{
Pos = MAP_APPFONT ( 6 , 48 ) ;
Size = MAP_APPFONT ( 248 , 75 ) ;
Border = TRUE ;
TabStop = TRUE ;
};
FixedLine FL_SOURCEVIEW
{
Pos = MAP_APPFONT ( 6 , 129 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Font settings for HTML, Basic and SQL sources" ;
};
FixedText FT_FONTNAME
{
Pos = MAP_APPFONT ( 6 , 142 ) ;
Size = MAP_APPFONT ( 57 , 8 ) ;
Text [ en-US ] = "Fonts" ;
};
ListBox LB_FONTNAME
{
HelpID = "cui:ListBox:RID_SVX_FONT_SUBSTITUTION:LB_FONTNAME";
Pos = MAP_APPFONT ( 65 , 140 ) ;
Size = MAP_APPFONT ( 100 , 68 ) ;
Border = TRUE ;
TabStop = TRUE ;
DropDown = TRUE;
};
CheckBox CB_NONPROP
{
HelpID = "cui:CheckBox:RID_SVX_FONT_SUBSTITUTION:CB_NONPROP";
Pos = MAP_APPFONT ( 65 , 155 ) ;
Size = MAP_APPFONT ( 180 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Non-proportional fonts only" ;
};
FixedText FT_FONTHEIGHT
{
Pos = MAP_APPFONT ( 6 , 171 ) ;
Size = MAP_APPFONT ( 57 , 8 ) ;
Text [ en-US ] ="~Size";
};
ListBox LB_FONTHEIGHT
{
HelpID = "cui:ListBox:RID_SVX_FONT_SUBSTITUTION:LB_FONTHEIGHT";
Pos = MAP_APPFONT ( 65 , 169 ) ;
Size = MAP_APPFONT ( 30 , 68 ) ;
Border = TRUE ;
TabStop = TRUE ;
DropDown = TRUE;
};
String STR_HEADER1
{
Text [ en-US ] = "Always";
};
String STR_HEADER2
{
Text [ en-US ] = "Screen only";
};
String STR_HEADER3
{
Text [ en-US ] = "Font";
};
String STR_HEADER4
{
Text [ en-US ] = "Replace with";
};
String STR_AUTOMATIC
{
Text [ en-US ] = "Automatic";
};
};
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">svx/res/nu02.png</property>
</object>
<object class="GtkBox" id="OptFontsPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">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="hexpand">True</property>
<property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkGrid" id="replacements">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Font</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">font1</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="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Re_place with</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">font2</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="svtlo:FontNameBox" id="font1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="id_column">1</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:FontNameBox" id="font2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="id_column">1</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="GtkLabel" id="always">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes">Always</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="screenonly">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes">Screen only</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="GtkLabel" id="font">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes">Font</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="replacewith">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes">Replace with</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="svxcorelo:SvxSimpleTableContainer" id="checklb">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="vexpand">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">4</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="apply">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="valign">center</property>
<property name="image">image1</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="GtkButton" id="delete">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="valign">center</property>
<property name="image">image2</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>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="usetable">
<property name="label" translatable="yes">_Apply replacement table</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">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">Replacement table</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame1">
<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="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</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="halign">start</property>
<property name="margin_top">6</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Fon_ts</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">fontname</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="label9">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Size</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">fontheight</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="fontname">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="entry_text_column">0</property>
<property name="id_column">1</property>
<items>
<item translatable="yes">Automatic</item>
</items>
</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="GtkCheckButton" id="nonpropfontonly">
<property name="label" translatable="yes">_Non-proportional fonts only</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">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="GtkComboBox" id="fontheight">
<property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</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>
<placeholder/>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Font settings for HTML, Basic and SQL sources</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">svx/res/nu01.png</property>
</object>
</interface>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment