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

weld SwOutlineSettingsTabPage

Change-Id: I5032c0d446cee1eae443a4c0876f862c3a6af81a
Reviewed-on: https://gerrit.libreoffice.org/53838Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 71bbb098
...@@ -399,46 +399,45 @@ short SwOutlineTabDialog::Ok() ...@@ -399,46 +399,45 @@ short SwOutlineTabDialog::Ok()
return RET_OK; return RET_OK;
} }
SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(vcl::Window* pParent, SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(TabPageParent pPage,
const SfxItemSet& rSet) const SfxItemSet& rSet)
: SfxTabPage(pParent, "OutlineNumberingPage", : SfxTabPage(pPage, "modules/swriter/ui/outlinenumberingpage.ui", "OutlineNumberingPage", &rSet)
"modules/swriter/ui/outlinenumberingpage.ui", &rSet)
, aNoFormatName(SwResId(SW_STR_NONE)) , aNoFormatName(SwResId(SW_STR_NONE))
, pSh(nullptr) , pSh(nullptr)
, pNumRule(nullptr) , pNumRule(nullptr)
, pCollNames(nullptr) , pCollNames(nullptr)
, nActLevel(1) , nActLevel(1)
, m_xLevelLB(m_xBuilder->weld_tree_view("level"))
, m_xCollBox(m_xBuilder->weld_combo_box_text("style"))
, m_xNumberBox(new NumberingTypeListBox(m_xBuilder->weld_combo_box_text("numbering")))
, m_xCharFormatLB(m_xBuilder->weld_combo_box_text("charstyle"))
, m_xAllLevelFT(m_xBuilder->weld_label("sublevelsft"))
, m_xAllLevelNF(m_xBuilder->weld_spin_button("sublevelsnf"))
, m_xPrefixED(m_xBuilder->weld_entry("prefix"))
, m_xSuffixED(m_xBuilder->weld_entry("suffix"))
, m_xStartEdit(m_xBuilder->weld_spin_button("startat"))
, m_xPreviewWIN(new SwNumberingPreview(m_xBuilder->weld_drawing_area("preview")))
{ {
get(m_pLevelLB, "level");
get(m_pCollBox, "style");
m_pCollBox->SetStyle(m_pCollBox->GetStyle()|WB_SORT);
get(m_pNumberBox, "numbering");
get(m_pCharFormatLB, "charstyle");
get(m_pAllLevelFT, "sublevelsft");
get(m_pAllLevelNF, "sublevelsnf");
get(m_pPrefixED, "prefix");
get(m_pSuffixED, "suffix");
get(m_pStartEdit, "startat");
get(m_pPreviewWIN, "preview");
SetExchangeSupport(); SetExchangeSupport();
m_pCollBox->InsertEntry(aNoFormatName); m_xNumberBox->Reload(SwInsertNumTypes::NoNumbering | SwInsertNumTypes::Extended);
m_pLevelLB->SetSelectHdl(LINK(this, SwOutlineSettingsTabPage, LevelHdl)); m_xCollBox->make_sorted();
m_pAllLevelNF->SetModifyHdl(LINK(this, SwOutlineSettingsTabPage, ToggleComplete)); m_xCollBox->append_text(aNoFormatName);
m_pCollBox->SetSelectHdl(LINK(this, SwOutlineSettingsTabPage, CollSelect)); m_xLevelLB->connect_changed(LINK(this, SwOutlineSettingsTabPage, LevelHdl));
m_pCollBox->SetGetFocusHdl(LINK(this, SwOutlineSettingsTabPage, CollSelectGetFocus)); m_xAllLevelNF->connect_value_changed(LINK(this, SwOutlineSettingsTabPage, ToggleComplete));
m_pNumberBox->SetSelectHdl(LINK(this, SwOutlineSettingsTabPage, NumberSelect)); m_xCollBox->connect_changed(LINK(this, SwOutlineSettingsTabPage, CollSelect));
m_pPrefixED->SetModifyHdl(LINK(this, SwOutlineSettingsTabPage, DelimModify)); m_xCollBox->connect_focus_in(LINK(this, SwOutlineSettingsTabPage, CollSelectGetFocus));
m_pSuffixED->SetModifyHdl(LINK(this, SwOutlineSettingsTabPage, DelimModify)); m_xNumberBox->connect_changed(LINK(this, SwOutlineSettingsTabPage, NumberSelect));
m_pStartEdit->SetModifyHdl(LINK(this, SwOutlineSettingsTabPage, StartModified)); m_xPrefixED->connect_changed(LINK(this, SwOutlineSettingsTabPage, DelimModify));
m_pCharFormatLB->SetSelectHdl(LINK(this, SwOutlineSettingsTabPage, CharFormatHdl)); m_xSuffixED->connect_changed(LINK(this, SwOutlineSettingsTabPage, DelimModify));
m_xStartEdit->connect_value_changed(LINK(this, SwOutlineSettingsTabPage, StartModified));
m_xCharFormatLB->connect_changed(LINK(this, SwOutlineSettingsTabPage, CharFormatHdl));
} }
void SwOutlineSettingsTabPage::Update() void SwOutlineSettingsTabPage::Update()
{ {
// if a template was already selected for this level, select it in the ListBox // if a template was already selected for this level, select it in the ListBox
m_pCollBox->Enable(USHRT_MAX != nActLevel); m_xCollBox->set_sensitive(USHRT_MAX != nActLevel);
if(USHRT_MAX == nActLevel) if(USHRT_MAX == nActLevel)
{ {
bool bSamePrefix = true; bool bSamePrefix = true;
...@@ -470,43 +469,43 @@ void SwOutlineSettingsTabPage::Update() ...@@ -470,43 +469,43 @@ void SwOutlineSettingsTabPage::Update()
} }
} }
CheckForStartValue_Impl(aNumFormatArr[0]->GetNumberingType()); CheckForStartValue_Impl(aNumFormatArr[0]->GetNumberingType());
if(bSameType) if (bSameType)
m_pNumberBox->SelectNumberingType( aNumFormatArr[0]->GetNumberingType() ); m_xNumberBox->SelectNumberingType( aNumFormatArr[0]->GetNumberingType() );
else else
m_pNumberBox->SetNoSelection(); m_xNumberBox->SetNoSelection();
if(bSameStart) if(bSameStart)
m_pStartEdit->SetValue(aNumFormatArr[0]->GetStart()); m_xStartEdit->set_value(aNumFormatArr[0]->GetStart());
else else
m_pStartEdit->SetText(OUString()); m_xStartEdit->set_text(OUString());
if(bSamePrefix) if(bSamePrefix)
m_pPrefixED->SetText(aNumFormatArr[0]->GetPrefix()); m_xPrefixED->set_text(aNumFormatArr[0]->GetPrefix());
else else
m_pPrefixED->SetText(OUString()); m_xPrefixED->set_text(OUString());
if(bSameSuffix) if(bSameSuffix)
m_pSuffixED->SetText(aNumFormatArr[0]->GetSuffix()); m_xSuffixED->set_text(aNumFormatArr[0]->GetSuffix());
else else
m_pSuffixED->SetText(OUString()); m_xSuffixED->set_text(OUString());
if(bSameCharFormat) if (bSameCharFormat)
{ {
if(pFirstFormat) if (pFirstFormat)
m_pCharFormatLB->SelectEntry(pFirstFormat->GetName()); m_xCharFormatLB->set_active_text(pFirstFormat->GetName());
else else
m_pCharFormatLB->SelectEntry( SwViewShell::GetShellRes()->aStrNone ); m_xCharFormatLB->set_active_text(SwViewShell::GetShellRes()->aStrNone);
} }
else else
m_pCharFormatLB->SetNoSelection(); m_xCharFormatLB->set_active(-1);
m_pAllLevelFT->Enable(); m_xAllLevelFT->set_sensitive(true);
m_pAllLevelNF->Enable(); m_xAllLevelNF->set_sensitive(true);
m_pAllLevelNF->SetMax(MAXLEVEL); m_xAllLevelNF->set_max(MAXLEVEL);
if(bSameComplete) if (bSameComplete)
{ {
m_pAllLevelNF->SetValue(aNumFormatArr[0]->GetIncludeUpperLevels()); m_xAllLevelNF->set_value(aNumFormatArr[0]->GetIncludeUpperLevels());
} }
else else
{ {
m_pAllLevelNF->SetText(OUString()); m_xAllLevelNF->set_text(OUString());
} }
} }
else else
...@@ -514,43 +513,44 @@ void SwOutlineSettingsTabPage::Update() ...@@ -514,43 +513,44 @@ void SwOutlineSettingsTabPage::Update()
sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel); sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel);
OUString aColl(pCollNames[nTmpLevel]); OUString aColl(pCollNames[nTmpLevel]);
if(!aColl.isEmpty()) if(!aColl.isEmpty())
m_pCollBox->SelectEntry(aColl); m_xCollBox->set_active_text(aColl);
else else
m_pCollBox->SelectEntry(aNoFormatName); m_xCollBox->set_active_text(aNoFormatName);
const SwNumFormat &rFormat = pNumRule->Get(nTmpLevel); const SwNumFormat &rFormat = pNumRule->Get(nTmpLevel);
m_pNumberBox->SelectNumberingType( rFormat.GetNumberingType() ); m_xNumberBox->SelectNumberingType( rFormat.GetNumberingType() );
m_pPrefixED->SetText(rFormat.GetPrefix()); m_xPrefixED->set_text(rFormat.GetPrefix());
m_pSuffixED->SetText(rFormat.GetSuffix()); m_xSuffixED->set_text(rFormat.GetSuffix());
const SwCharFormat* pFormat = rFormat.GetCharFormat(); const SwCharFormat* pFormat = rFormat.GetCharFormat();
if(pFormat) if(pFormat)
m_pCharFormatLB->SelectEntry(pFormat->GetName()); m_xCharFormatLB->set_active_text(pFormat->GetName());
else else
m_pCharFormatLB->SelectEntry( SwViewShell::GetShellRes()->aStrNone ); m_xCharFormatLB->set_active_text(SwViewShell::GetShellRes()->aStrNone);
if(nTmpLevel) if(nTmpLevel)
{ {
m_pAllLevelFT->Enable(); m_xAllLevelFT->set_sensitive(true);
m_pAllLevelNF->Enable(); m_xAllLevelNF->set_sensitive(true);
m_pAllLevelNF->SetMax(nTmpLevel + 1); m_xAllLevelNF->set_max(nTmpLevel + 1);
m_pAllLevelNF->SetValue(rFormat.GetIncludeUpperLevels()); m_xAllLevelNF->set_value(rFormat.GetIncludeUpperLevels());
} }
else else
{ {
m_pAllLevelNF->SetText(OUString()); m_xAllLevelNF->set_text(OUString());
m_pAllLevelNF->Enable(false); m_xAllLevelNF->set_sensitive(false);
m_pAllLevelFT->Enable(false); m_xAllLevelFT->set_sensitive(false);
} }
CheckForStartValue_Impl(rFormat.GetNumberingType()); CheckForStartValue_Impl(rFormat.GetNumberingType());
m_pStartEdit->SetValue( rFormat.GetStart() ); m_xStartEdit->set_value( rFormat.GetStart() );
} }
SetModified(); SetModified();
} }
IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox&, rBox, void ) IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, weld::TreeView&, rBox, void )
{ {
nActLevel = 0; nActLevel = 0;
if(rBox.IsEntryPosSelected( MAXLEVEL )) auto aRows = rBox.get_selected_rows();
if (std::find(aRows.begin(), aRows.end(), MAXLEVEL) != aRows.end())
{ {
nActLevel = 0xFFFF; nActLevel = 0xFFFF;
} }
...@@ -559,7 +559,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox&, rBox, void ) ...@@ -559,7 +559,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox&, rBox, void )
sal_uInt16 nMask = 1; sal_uInt16 nMask = 1;
for( sal_uInt16 i = 0; i < MAXLEVEL; i++ ) for( sal_uInt16 i = 0; i < MAXLEVEL; i++ )
{ {
if(rBox.IsEntryPosSelected( i )) if (std::find(aRows.begin(), aRows.end(), i) != aRows.end())
nActLevel |= nMask; nActLevel |= nMask;
nMask <<= 1; nMask <<= 1;
} }
...@@ -567,7 +567,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox&, rBox, void ) ...@@ -567,7 +567,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox&, rBox, void )
Update(); Update();
} }
IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, Edit&, rEdit, void ) IMPL_LINK(SwOutlineSettingsTabPage, ToggleComplete, weld::SpinButton&, rEdit, void)
{ {
sal_uInt16 nMask = 1; sal_uInt16 nMask = 1;
for(sal_uInt16 i = 0; i < MAXLEVEL; i++) for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
...@@ -575,7 +575,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, Edit&, rEdit, void ) ...@@ -575,7 +575,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, Edit&, rEdit, void )
if(nActLevel & nMask) if(nActLevel & nMask)
{ {
SwNumFormat aNumFormat(pNumRule->Get(i)); SwNumFormat aNumFormat(pNumRule->Get(i));
aNumFormat.SetIncludeUpperLevels( std::min( static_cast<sal_uInt8>(static_cast<NumericField&>(rEdit).GetValue()), aNumFormat.SetIncludeUpperLevels( std::min( static_cast<sal_uInt8>(rEdit.get_value()),
static_cast<sal_uInt8>(i + 1)) ); static_cast<sal_uInt8>(i + 1)) );
pNumRule->Set(i, aNumFormat); pNumRule->Set(i, aNumFormat);
} }
...@@ -584,11 +584,11 @@ IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, Edit&, rEdit, void ) ...@@ -584,11 +584,11 @@ IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, Edit&, rEdit, void )
SetModified(); SetModified();
} }
IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox&, rBox, void ) IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, weld::ComboBoxText&, rBox, void )
{ {
sal_uInt8 i; sal_uInt8 i;
const OUString aCollName(rBox.GetSelectedEntry()); const OUString aCollName(rBox.get_active_text());
//0xFFFF not allowed here (disable) //0xFFFF not allowed here (disable)
sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel); sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel);
OUString sOldName( pCollNames[nTmpLevel] ); OUString sOldName( pCollNames[nTmpLevel] );
...@@ -626,16 +626,16 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox&, rBox, void ) ...@@ -626,16 +626,16 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox&, rBox, void )
SetModified(); SetModified();
} }
IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CollSelectGetFocus, Control&, void) IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CollSelectGetFocus, weld::Widget&, void)
{ {
for( sal_uInt8 i = 0; i < MAXLEVEL; ++i) for (sal_uInt8 i = 0; i < MAXLEVEL; ++i)
aSaveCollNames[i] = pCollNames[i]; aSaveCollNames[i] = pCollNames[i];
} }
IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, ListBox&, rBox, void ) IMPL_LINK_NOARG(SwOutlineSettingsTabPage, NumberSelect, weld::ComboBoxText&, void)
{ {
sal_uInt16 nMask = 1; sal_uInt16 nMask = 1;
SvxNumType nNumberType = static_cast<SwNumberingTypeListBox&>(rBox).GetSelectedNumberingType(); SvxNumType nNumberType = m_xNumberBox->GetSelectedNumberingType();
for(sal_uInt16 i = 0; i < MAXLEVEL; i++) for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{ {
if(nActLevel & nMask) if(nActLevel & nMask)
...@@ -650,7 +650,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, ListBox&, rBox, void ) ...@@ -650,7 +650,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, ListBox&, rBox, void )
SetModified(); SetModified();
} }
IMPL_LINK_NOARG(SwOutlineSettingsTabPage, DelimModify, Edit&, void) IMPL_LINK_NOARG(SwOutlineSettingsTabPage, DelimModify, weld::Entry&, void)
{ {
sal_uInt16 nMask = 1; sal_uInt16 nMask = 1;
for(sal_uInt16 i = 0; i < MAXLEVEL; i++) for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
...@@ -658,8 +658,8 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, DelimModify, Edit&, void) ...@@ -658,8 +658,8 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, DelimModify, Edit&, void)
if(nActLevel & nMask) if(nActLevel & nMask)
{ {
SwNumFormat aNumFormat(pNumRule->Get(i)); SwNumFormat aNumFormat(pNumRule->Get(i));
aNumFormat.SetPrefix( m_pPrefixED->GetText() ); aNumFormat.SetPrefix( m_xPrefixED->get_text() );
aNumFormat.SetSuffix( m_pSuffixED->GetText() ); aNumFormat.SetSuffix( m_xSuffixED->get_text() );
pNumRule->Set(i, aNumFormat); pNumRule->Set(i, aNumFormat);
} }
nMask <<= 1; nMask <<= 1;
...@@ -667,7 +667,7 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, DelimModify, Edit&, void) ...@@ -667,7 +667,7 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, DelimModify, Edit&, void)
SetModified(); SetModified();
} }
IMPL_LINK( SwOutlineSettingsTabPage, StartModified, Edit&, rEdit, void ) IMPL_LINK( SwOutlineSettingsTabPage, StartModified, weld::SpinButton&, rEdit, void )
{ {
sal_uInt16 nMask = 1; sal_uInt16 nMask = 1;
for(sal_uInt16 i = 0; i < MAXLEVEL; i++) for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
...@@ -675,7 +675,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, StartModified, Edit&, rEdit, void ) ...@@ -675,7 +675,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, StartModified, Edit&, rEdit, void )
if(nActLevel & nMask) if(nActLevel & nMask)
{ {
SwNumFormat aNumFormat(pNumRule->Get(i)); SwNumFormat aNumFormat(pNumRule->Get(i));
aNumFormat.SetStart( static_cast<sal_uInt16>(static_cast<NumericField&>(rEdit).GetValue()) ); aNumFormat.SetStart(static_cast<sal_uInt16>(rEdit.get_value()));
pNumRule->Set(i, aNumFormat); pNumRule->Set(i, aNumFormat);
} }
nMask <<= 1; nMask <<= 1;
...@@ -683,9 +683,9 @@ IMPL_LINK( SwOutlineSettingsTabPage, StartModified, Edit&, rEdit, void ) ...@@ -683,9 +683,9 @@ IMPL_LINK( SwOutlineSettingsTabPage, StartModified, Edit&, rEdit, void )
SetModified(); SetModified();
} }
IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFormatHdl, ListBox&, void) IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFormatHdl, weld::ComboBoxText&, void)
{ {
OUString sEntry = m_pCharFormatLB->GetSelectedEntry(); OUString sEntry = m_xCharFormatLB->get_active_text();
sal_uInt16 nMask = 1; sal_uInt16 nMask = 1;
bool bFormatNone = sEntry == SwViewShell::GetShellRes()->aStrNone; bool bFormatNone = sEntry == SwViewShell::GetShellRes()->aStrNone;
SwCharFormat* pFormat = nullptr; SwCharFormat* pFormat = nullptr;
...@@ -730,25 +730,8 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFormatHdl, ListBox&, void) ...@@ -730,25 +730,8 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFormatHdl, ListBox&, void)
SwOutlineSettingsTabPage::~SwOutlineSettingsTabPage() SwOutlineSettingsTabPage::~SwOutlineSettingsTabPage()
{ {
disposeOnce();
} }
void SwOutlineSettingsTabPage::dispose()
{
m_pLevelLB.clear();
m_pCollBox.clear();
m_pNumberBox.clear();
m_pCharFormatLB.clear();
m_pAllLevelFT.clear();
m_pAllLevelNF.clear();
m_pPrefixED.clear();
m_pSuffixED.clear();
m_pStartEdit.clear();
m_pPreviewWIN.clear();
SfxTabPage::dispose();
}
void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
{ {
pSh = pShell; pSh = pShell;
...@@ -756,53 +739,52 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) ...@@ -756,53 +739,52 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
pNumRule = static_cast<SwOutlineTabDialog*>(GetTabDialog())->GetNumRule(); pNumRule = static_cast<SwOutlineTabDialog*>(GetTabDialog())->GetNumRule();
pCollNames = static_cast<SwOutlineTabDialog*>(GetTabDialog())->GetCollNames(); pCollNames = static_cast<SwOutlineTabDialog*>(GetTabDialog())->GetCollNames();
m_pPreviewWIN->SetNumRule(pNumRule); m_xPreviewWIN->SetNumRule(pNumRule);
m_pPreviewWIN->SetOutlineNames(pCollNames); m_xPreviewWIN->SetOutlineNames(pCollNames);
// set start value - nActLevel must be 1 here // set start value - nActLevel must be 1 here
sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel); sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel);
const SwNumFormat& rNumFormat = pNumRule->Get( nTmpLevel ); const SwNumFormat& rNumFormat = pNumRule->Get( nTmpLevel );
m_pStartEdit->SetValue( rNumFormat.GetStart() ); m_xStartEdit->set_value( rNumFormat.GetStart() );
// create pool formats for headlines // create pool formats for headlines
sal_uInt16 i; for (sal_uInt16 i = 0; i < MAXLEVEL; ++i)
for( i = 0; i < MAXLEVEL; ++i )
{ {
m_pCollBox->InsertEntry( SwStyleNameMapper::GetUIName( m_xCollBox->append_text( SwStyleNameMapper::GetUIName(
static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i), OUString())); static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i), OUString()));
m_pLevelLB->InsertEntry( OUString::number(i + 1) ); m_xLevelLB->append_text( OUString::number(i + 1) );
} }
OUString sStr("1 - "); OUString sStr("1 - ");
sStr += OUString::number(MAXLEVEL); sStr += OUString::number(MAXLEVEL);
m_pLevelLB->InsertEntry( sStr ); m_xLevelLB->append_text(sStr);
// query the texttemplates' outlining levels // query the texttemplates' outlining levels
const sal_uInt16 nCount = pSh->GetTextFormatCollCount(); const sal_uInt16 nCount = pSh->GetTextFormatCollCount();
for( i = 0; i < nCount; ++i ) for (sal_uInt16 i = 0; i < nCount; ++i)
{ {
SwTextFormatColl &rTextColl = pSh->GetTextFormatColl(i); SwTextFormatColl &rTextColl = pSh->GetTextFormatColl(i);
if(!rTextColl.IsDefault()) if(!rTextColl.IsDefault())
{ {
sStr = rTextColl.GetName(); sStr = rTextColl.GetName();
if(LISTBOX_ENTRY_NOTFOUND == m_pCollBox->GetEntryPos( sStr )) if (m_xCollBox->find_text(sStr) == -1)
m_pCollBox->InsertEntry( sStr ); m_xCollBox->append_text(sStr);
} }
} }
m_pNumberBox->SelectNumberingType(rNumFormat.GetNumberingType()); m_xNumberBox->SelectNumberingType(rNumFormat.GetNumberingType());
SwOutlineNodes::size_type nOutlinePos = pSh->GetOutlinePos(MAXLEVEL); SwOutlineNodes::size_type nOutlinePos = pSh->GetOutlinePos(MAXLEVEL);
sal_uInt16 nTmp = 0; int nTmp = 0;
if(nOutlinePos != SwOutlineNodes::npos) if(nOutlinePos != SwOutlineNodes::npos)
{ {
nTmp = static_cast<sal_uInt16>(pSh->getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos)); nTmp = static_cast<sal_uInt16>(pSh->getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos));
} }
m_pLevelLB->SelectEntryPos(nTmp-1); m_xLevelLB->select(nTmp-1);
// collect char styles // collect char styles
m_pCharFormatLB->Clear(); m_xCharFormatLB->clear();
m_pCharFormatLB->InsertEntry( SwViewShell::GetShellRes()->aStrNone ); m_xCharFormatLB->append_text(SwViewShell::GetShellRes()->aStrNone);
// char styles // char styles
::FillCharStyleListBox(*m_pCharFormatLB, ::FillCharStyleListBox(*m_xCharFormatLB,
pSh->GetView().GetDocShell()); pSh->GetView().GetDocShell());
Update(); Update();
} }
...@@ -811,10 +793,10 @@ void SwOutlineSettingsTabPage::ActivatePage(const SfxItemSet& ) ...@@ -811,10 +793,10 @@ void SwOutlineSettingsTabPage::ActivatePage(const SfxItemSet& )
{ {
nActLevel = SwOutlineTabDialog::GetActNumLevel(); nActLevel = SwOutlineTabDialog::GetActNumLevel();
if(nActLevel != USHRT_MAX) if(nActLevel != USHRT_MAX)
m_pLevelLB->SelectEntryPos(lcl_BitToLevel(nActLevel)); m_xLevelLB->select(lcl_BitToLevel(nActLevel));
else else
m_pLevelLB->SelectEntryPos(MAXLEVEL); m_xLevelLB->select(MAXLEVEL);
LevelHdl(*m_pLevelLB); LevelHdl(*m_xLevelLB);
} }
DeactivateRC SwOutlineSettingsTabPage::DeactivatePage(SfxItemSet*) DeactivateRC SwOutlineSettingsTabPage::DeactivatePage(SfxItemSet*)
...@@ -833,21 +815,21 @@ void SwOutlineSettingsTabPage::Reset( const SfxItemSet* rSet ) ...@@ -833,21 +815,21 @@ void SwOutlineSettingsTabPage::Reset( const SfxItemSet* rSet )
ActivatePage(*rSet); ActivatePage(*rSet);
} }
VclPtr<SfxTabPage> SwOutlineSettingsTabPage::Create( TabPageParent pParent, VclPtr<SfxTabPage> SwOutlineSettingsTabPage::Create(TabPageParent pParent,
const SfxItemSet* rAttrSet) const SfxItemSet* rAttrSet)
{ {
return VclPtr<SwOutlineSettingsTabPage>::Create(pParent.pParent, *rAttrSet); return VclPtr<SwOutlineSettingsTabPage>::Create(pParent, *rAttrSet);
} }
void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType) void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType)
{ {
bool bIsNull = m_pStartEdit->GetValue() == 0; bool bIsNull = m_xStartEdit->get_value() == 0;
bool bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC || bool bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC ||
SVX_NUM_CHARS_UPPER_LETTER_N == nNumberingType || SVX_NUM_CHARS_UPPER_LETTER_N == nNumberingType ||
SVX_NUM_CHARS_LOWER_LETTER_N == nNumberingType; SVX_NUM_CHARS_LOWER_LETTER_N == nNumberingType;
m_pStartEdit->SetMin(bNoZeroAllowed ? 1 : 0); m_xStartEdit->set_min(bNoZeroAllowed ? 1 : 0);
if(bIsNull && bNoZeroAllowed) if (bIsNull && bNoZeroAllowed)
m_pStartEdit->GetModifyHdl().Call(*m_pStartEdit); StartModified(*m_xStartEdit);
} }
static long lcl_DrawBullet(vcl::RenderContext* pVDev, const SwNumFormat& rFormat, long nXStart, long nYStart, const Size& rSize) static long lcl_DrawBullet(vcl::RenderContext* pVDev, const SwNumFormat& rFormat, long nXStart, long nYStart, const Size& rSize)
...@@ -1092,6 +1074,218 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Re ...@@ -1092,6 +1074,218 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Re
rRenderContext.DrawOutDev(Point(0,0), aSize, Point(0,0), aSize, *pVDev); rRenderContext.DrawOutDev(Point(0,0), aSize, Point(0,0), aSize, *pVDev);
} }
IMPL_LINK(SwNumberingPreview, DoResize, const Size&, rSize, void)
{
m_aSize = rSize;
}
IMPL_LINK(SwNumberingPreview, DoPaint, weld::DrawingArea::draw_args, aPayload, void)
{
vcl::RenderContext& rRenderContext = aPayload.first;
const Size aSize(rRenderContext.PixelToLogic(m_aSize));
ScopedVclPtrInstance<VirtualDevice> pVDev(rRenderContext);
pVDev->SetMapMode(rRenderContext.GetMapMode());
pVDev->SetOutputSize(aSize);
// #101524# OJ
pVDev->SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor());
pVDev->SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetButtonTextColor());
pVDev->DrawRect(tools::Rectangle(Point(0,0), aSize));
if (pActNum)
{
long nWidthRelation = 30; // chapter dialog
if(nPageWidth)
{
nWidthRelation = nPageWidth / aSize.Width();
if(bPosition)
nWidthRelation = nWidthRelation * 2 / 3;
else
nWidthRelation = nWidthRelation / 4;
}
// height per level
const long nXStep = aSize.Width() / (3 * MAXLEVEL * ((MAXLEVEL < 10) ? 2 : 1));
const long nYStep = (aSize.Height() - 6)/ MAXLEVEL;
long nYStart = 4;
aStdFont = OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, GetAppLanguage(),
GetDefaultFontFlags::OnlyOne, &rRenderContext);
// #101524# OJ
aStdFont.SetColor(SwViewOption::GetFontColor());
const long nFontHeight = nYStep * ( bPosition ? 15 : 6 ) / 10;
aStdFont.SetFontSize(Size( 0, nFontHeight ));
long nPreNum = pActNum->Get(0).GetStart();
if (bPosition)
{
const long nLineHeight = nFontHeight * 8 / 7;
sal_uInt8 nStart = 0;
while (!(nActLevel & (1 << nStart)))
{
nStart++;
}
if(nStart) // so that possible predecessors and successors are showed
nStart--;
SwNumberTree::tNumberVector aNumVector;
sal_uInt8 nEnd = std::min(sal_uInt8(nStart + 3), MAXLEVEL);
for (sal_uInt8 nLevel = nStart; nLevel < nEnd; ++nLevel)
{
const SwNumFormat &rFormat = pActNum->Get(nLevel);
aNumVector.push_back(rFormat.GetStart());
long nXStart( 0 );
long nTextOffset( 0 );
long nNumberXPos( 0 );
if (rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
{
nXStart = rFormat.GetAbsLSpace() / nWidthRelation;
nTextOffset = rFormat.GetCharTextDistance() / nWidthRelation;
nNumberXPos = nXStart;
const long nFirstLineOffset = (-rFormat.GetFirstLineOffset()) / nWidthRelation;
if(nFirstLineOffset <= nNumberXPos)
nNumberXPos -= nFirstLineOffset;
else
nNumberXPos = 0;
}
else if (rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT)
{
const long nTmpNumberXPos((rFormat.GetIndentAt() + rFormat.GetFirstLineIndent()) / nWidthRelation);
nNumberXPos = (nTmpNumberXPos < 0) ? 0 : nTmpNumberXPos;
}
long nBulletWidth = 0;
if (SVX_NUM_BITMAP == rFormat.GetNumberingType())
{
nBulletWidth = lcl_DrawGraphic(pVDev.get(), rFormat, nNumberXPos,
nYStart, nWidthRelation);
}
else if (SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType())
{
nBulletWidth = lcl_DrawBullet(pVDev.get(), rFormat, nNumberXPos,
nYStart, aStdFont.GetFontSize());
}
else
{
pVDev->SetFont(aStdFont);
if(pActNum->IsContinusNum())
aNumVector[nLevel] = nPreNum;
OUString aText(pActNum->MakeNumString( aNumVector ));
pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
nBulletWidth = pVDev->GetTextWidth(aText);
nPreNum++;
}
if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT &&
rFormat.GetLabelFollowedBy() == SvxNumberFormat::SPACE )
{
pVDev->SetFont(aStdFont);
OUString aText(' ');
pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
nBulletWidth += pVDev->GetTextWidth(aText);
}
long nTextXPos(0);
if (rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
{
nTextXPos = nXStart;
if (nTextOffset < 0)
nTextXPos = nTextXPos + nTextOffset;
if (nNumberXPos + nBulletWidth + nTextOffset > nTextXPos)
nTextXPos = nNumberXPos + nBulletWidth + nTextOffset;
}
else if (rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT)
{
switch (rFormat.GetLabelFollowedBy())
{
case SvxNumberFormat::LISTTAB:
{
nTextXPos = rFormat.GetListtabPos() / nWidthRelation;
if (nTextXPos < nNumberXPos + nBulletWidth)
{
nTextXPos = nNumberXPos + nBulletWidth;
}
}
break;
case SvxNumberFormat::SPACE:
case SvxNumberFormat::NOTHING:
case SvxNumberFormat::NEWLINE:
{
nTextXPos = nNumberXPos + nBulletWidth;
}
break;
}
nXStart = rFormat.GetIndentAt() / nWidthRelation;
}
tools::Rectangle aRect1(Point(nTextXPos, nYStart + nFontHeight / 2), Size(aSize.Width() / 2, 2));
pVDev->SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor()); // COL_BLACK );
pVDev->DrawRect(aRect1);
tools::Rectangle aRect2(Point(nXStart, nYStart + nLineHeight + nFontHeight / 2), Size(aSize.Width() / 2, 2));
pVDev->DrawRect(aRect2);
nYStart += 2 * nLineHeight;
}
}
else
{
SwNumberTree::tNumberVector aNumVector;
const long nLineHeight = nFontHeight * 3 / 2;
for (sal_uInt8 nLevel = 0; nLevel < MAXLEVEL; ++nLevel, nYStart = nYStart + nYStep)
{
const SwNumFormat &rFormat = pActNum->Get(nLevel);
aNumVector.push_back(rFormat.GetStart());
long nXStart(0);
if (rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
{
nXStart = rFormat.GetAbsLSpace() / nWidthRelation;
}
else if (rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT)
{
const long nTmpXStart((rFormat.GetIndentAt() + rFormat.GetFirstLineIndent() ) / nWidthRelation);
nXStart = (nTmpXStart < 0) ? 0 : nTmpXStart;
}
nXStart /= 2;
nXStart += 2;
long nTextOffset;
if (SVX_NUM_BITMAP == rFormat.GetNumberingType())
{
lcl_DrawGraphic(pVDev.get(), rFormat, nXStart, nYStart, nWidthRelation);
nTextOffset = nLineHeight + nXStep;
}
else if (SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType())
{
nTextOffset = lcl_DrawBullet(pVDev.get(), rFormat, nXStart, nYStart, aStdFont.GetFontSize());
nTextOffset += nXStep;
}
else
{
pVDev->SetFont(aStdFont);
if (pActNum->IsContinusNum())
aNumVector[nLevel] = nPreNum;
OUString aText(pActNum->MakeNumString( aNumVector ));
pVDev->DrawText( Point(nXStart, nYStart), aText );
nTextOffset = pVDev->GetTextWidth(aText) + nXStep;
nPreNum++;
}
pVDev->SetFont(aStdFont);
pVDev->DrawText(
Point(nXStart + nTextOffset, nYStart),
(pOutlineNames == nullptr
? utl::ConfigManager::getProductName()
: pOutlineNames[nLevel]));
}
}
}
rRenderContext.DrawOutDev(Point(0,0), aSize, Point(0,0), aSize, *pVDev);
}
NumberingPreview::~NumberingPreview() NumberingPreview::~NumberingPreview()
{ {
} }
......
...@@ -67,9 +67,12 @@ public: ...@@ -67,9 +67,12 @@ public:
NumberingTypeListBox(weld::ComboBoxText* pWidget); NumberingTypeListBox(weld::ComboBoxText* pWidget);
~NumberingTypeListBox(); ~NumberingTypeListBox();
void connect_changed(const Link<weld::ComboBoxText&, void>& rLink) { m_xWidget->connect_changed(rLink); }
void Reload(SwInsertNumTypes nTypeFlags); void Reload(SwInsertNumTypes nTypeFlags);
SvxNumType GetSelectedNumberingType(); SvxNumType GetSelectedNumberingType();
bool SelectNumberingType(SvxNumType nType); bool SelectNumberingType(SvxNumType nType);
void SetNoSelection() { m_xWidget->set_active(-1); }
}; };
#endif #endif
......
...@@ -59,6 +59,56 @@ class NumberingPreview : public vcl::Window ...@@ -59,6 +59,56 @@ class NumberingPreview : public vcl::Window
}; };
class SwNumberingPreview
{
std::unique_ptr<weld::DrawingArea> m_xDrawingArea;
Size m_aSize;
const SwNumRule* pActNum;
vcl::Font aStdFont;
long nPageWidth;
const OUString* pOutlineNames;
bool bPosition;
sal_uInt16 nActLevel;
private:
DECL_LINK(DoPaint, weld::DrawingArea::draw_args, void);
DECL_LINK(DoResize, const Size& rSize, void);
public:
SwNumberingPreview(weld::DrawingArea* pDrawingArea)
: m_xDrawingArea(pDrawingArea)
, pActNum(nullptr)
, nPageWidth(0)
, pOutlineNames(nullptr)
, bPosition(false)
, nActLevel(USHRT_MAX)
{
m_xDrawingArea->connect_size_allocate(LINK(this, SwNumberingPreview, DoResize));
m_xDrawingArea->connect_draw(LINK(this, SwNumberingPreview, DoPaint));
}
void queue_draw()
{
m_xDrawingArea->queue_draw();
}
void SetNumRule(const SwNumRule* pNum)
{
pActNum = pNum;
queue_draw();
}
void SetPageWidth(long nPgWidth)
{nPageWidth = nPgWidth;}
void SetOutlineNames(const OUString* pNames)
{pOutlineNames = pNames;}
void SetPositionMode()
{ bPosition = true;}
void SetLevel(sal_uInt16 nSet) {nActLevel = nSet;}
};
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -82,46 +82,44 @@ public: ...@@ -82,46 +82,44 @@ public:
class SwOutlineSettingsTabPage : public SfxTabPage class SwOutlineSettingsTabPage : public SfxTabPage
{ {
VclPtr<ListBox> m_pLevelLB;
VclPtr<ListBox> m_pCollBox;
VclPtr<SwNumberingTypeListBox> m_pNumberBox;
VclPtr<ListBox> m_pCharFormatLB;
VclPtr<FixedText> m_pAllLevelFT;
VclPtr<NumericField> m_pAllLevelNF;
VclPtr<Edit> m_pPrefixED;
VclPtr<Edit> m_pSuffixED;
VclPtr<NumericField> m_pStartEdit;
VclPtr<NumberingPreview> m_pPreviewWIN;
OUString aNoFormatName; OUString aNoFormatName;
OUString aSaveCollNames[MAXLEVEL]; OUString aSaveCollNames[MAXLEVEL];
SwWrtShell* pSh; SwWrtShell* pSh;
SwNumRule* pNumRule; SwNumRule* pNumRule;
OUString* pCollNames; OUString* pCollNames;
sal_uInt16 nActLevel; sal_uInt16 nActLevel;
DECL_LINK( LevelHdl, ListBox&, void ); std::unique_ptr<weld::TreeView> m_xLevelLB;
DECL_LINK( ToggleComplete, Edit&, void ); std::unique_ptr<weld::ComboBoxText> m_xCollBox;
DECL_LINK( CollSelect, ListBox&, void ); std::unique_ptr<NumberingTypeListBox> m_xNumberBox;
DECL_LINK( CollSelectGetFocus, Control&, void ); std::unique_ptr<weld::ComboBoxText> m_xCharFormatLB;
DECL_LINK( NumberSelect, ListBox&, void ); std::unique_ptr<weld::Label> m_xAllLevelFT;
DECL_LINK( DelimModify, Edit&, void ); std::unique_ptr<weld::SpinButton> m_xAllLevelNF;
DECL_LINK( StartModified, Edit&, void ); std::unique_ptr<weld::Entry> m_xPrefixED;
DECL_LINK( CharFormatHdl, ListBox&, void ); std::unique_ptr<weld::Entry> m_xSuffixED;
std::unique_ptr<weld::SpinButton> m_xStartEdit;
std::unique_ptr<SwNumberingPreview> m_xPreviewWIN;
DECL_LINK( LevelHdl, weld::TreeView&, void );
DECL_LINK( ToggleComplete, weld::SpinButton&, void );
DECL_LINK( CollSelect, weld::ComboBoxText&, void );
DECL_LINK( CollSelectGetFocus, weld::Widget&, void );
DECL_LINK( NumberSelect, weld::ComboBoxText&, void );
DECL_LINK( DelimModify, weld::Entry&, void );
DECL_LINK( StartModified, weld::SpinButton&, void );
DECL_LINK( CharFormatHdl, weld::ComboBoxText&, void );
void Update(); void Update();
void SetModified(){m_pPreviewWIN->Invalidate();} void SetModified() { m_xPreviewWIN->queue_draw(); }
void CheckForStartValue_Impl(sal_uInt16 nNumberingType); void CheckForStartValue_Impl(sal_uInt16 nNumberingType);
using SfxTabPage::ActivatePage; using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage; using SfxTabPage::DeactivatePage;
public: public:
SwOutlineSettingsTabPage(vcl::Window* pParent, const SfxItemSet& rSet); SwOutlineSettingsTabPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwOutlineSettingsTabPage() override; virtual ~SwOutlineSettingsTabPage() override;
virtual void dispose() override;
void SetWrtShell(SwWrtShell* pShell); void SetWrtShell(SwWrtShell* pShell);
...@@ -135,7 +133,7 @@ public: ...@@ -135,7 +133,7 @@ public:
void SetNumRule(SwNumRule *pRule) void SetNumRule(SwNumRule *pRule)
{ {
pNumRule = pRule; pNumRule = pRule;
m_pPreviewWIN->SetNumRule(pNumRule); m_xPreviewWIN->SetNumRule(pNumRule);
} }
}; };
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 --> <!-- Generated with glade 3.20.4 -->
<interface domain="sw"> <interface domain="sw">
<requires lib="gtk+" version="3.18"/> <requires lib="gtk+" version="3.18"/>
<requires lib="LibreOffice" version="1.0"/> <requires lib="LibreOffice" version="1.0"/>
...@@ -15,6 +15,14 @@ ...@@ -15,6 +15,14 @@
<property name="step_increment">1</property> <property name="step_increment">1</property>
<property name="page_increment">1</property> <property name="page_increment">1</property>
</object> </object>
<object class="GtkListStore" id="liststore1">
<columns>
<!-- column-name text -->
<column type="gchararray"/>
<!-- column-name id -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkBox" id="OutlineNumberingPage"> <object class="GtkBox" id="OutlineNumberingPage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
...@@ -33,13 +41,35 @@ ...@@ -33,13 +41,35 @@
<property name="top_padding">6</property> <property name="top_padding">6</property>
<property name="left_padding">12</property> <property name="left_padding">12</property>
<child> <child>
<object class="GtkTreeView" id="level:border"> <object class="GtkScrolledWindow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="headers_visible">False</property> <property name="hexpand">True</property>
<property name="search_column">0</property> <property name="vexpand">True</property>
<child internal-child="selection"> <property name="shadow_type">in</property>
<object class="GtkTreeSelection" id="treeview-selection4"/> <child>
<object class="GtkTreeView" id="level">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="model">liststore1</property>
<property name="headers_visible">False</property>
<property name="headers_clickable">False</property>
<property name="search_column">0</property>
<property name="show_expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection1"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
<child>
<object class="GtkCellRendererText" id="cellrenderertext1"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child> </child>
</object> </object>
</child> </child>
...@@ -51,7 +81,6 @@ ...@@ -51,7 +81,6 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes" context="outlinenumberingpage|label1">Level</property> <property name="label" translatable="yes" context="outlinenumberingpage|label1">Level</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="mnemonic_widget">level:border</property>
<attributes> <attributes>
<attribute name="weight" value="bold"/> <attribute name="weight" value="bold"/>
</attributes> </attributes>
...@@ -92,10 +121,10 @@ ...@@ -92,10 +121,10 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="hexpand">True</property> <property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="outlinenumberingpage|label3">Paragraph style:</property> <property name="label" translatable="yes" context="outlinenumberingpage|label3">Paragraph style:</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="mnemonic_widget">style</property> <property name="mnemonic_widget">style</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -104,7 +133,7 @@ ...@@ -104,7 +133,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBox" id="style"> <object class="GtkComboBoxText" id="style">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
</object> </object>
...@@ -118,10 +147,10 @@ ...@@ -118,10 +147,10 @@
<object class="GtkLabel" id="label4"> <object class="GtkLabel" id="label4">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="outlinenumberingpage|label4">Number:</property> <property name="label" translatable="yes" context="outlinenumberingpage|label4">Number:</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="mnemonic_widget">numbering</property> <property name="mnemonic_widget">numbering</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -132,10 +161,10 @@ ...@@ -132,10 +161,10 @@
<object class="GtkLabel" id="label5"> <object class="GtkLabel" id="label5">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="outlinenumberingpage|label5">Character style:</property> <property name="label" translatable="yes" context="outlinenumberingpage|label5">Character style:</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="mnemonic_widget">charstyle</property> <property name="mnemonic_widget">charstyle</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -146,10 +175,10 @@ ...@@ -146,10 +175,10 @@
<object class="GtkLabel" id="sublevelsft"> <object class="GtkLabel" id="sublevelsft">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="outlinenumberingpage|sublevelsft">Show sublevels:</property> <property name="label" translatable="yes" context="outlinenumberingpage|sublevelsft">Show sublevels:</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="mnemonic_widget">sublevelsnf</property> <property name="mnemonic_widget">sublevelsnf</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -160,8 +189,8 @@ ...@@ -160,8 +189,8 @@
<object class="GtkLabel" id="label7"> <object class="GtkLabel" id="label7">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="outlinenumberingpage|label7">Separator</property> <property name="label" translatable="yes" context="outlinenumberingpage|label7">Separator</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -170,10 +199,9 @@ ...@@ -170,10 +199,9 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="swlo-SwNumberingTypeListBox" id="numbering"> <object class="GtkComboBoxText" id="numbering">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="type">17</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
...@@ -181,7 +209,7 @@ ...@@ -181,7 +209,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBox" id="charstyle"> <object class="GtkComboBoxText" id="charstyle">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
</object> </object>
...@@ -195,6 +223,7 @@ ...@@ -195,6 +223,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="sensitive">False</property> <property name="sensitive">False</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="activates_default">True</property>
<property name="adjustment">adjustment2</property> <property name="adjustment">adjustment2</property>
</object> </object>
<packing> <packing>
...@@ -206,6 +235,7 @@ ...@@ -206,6 +235,7 @@
<object class="GtkEntry" id="prefix"> <object class="GtkEntry" id="prefix">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="activates_default">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
...@@ -216,6 +246,7 @@ ...@@ -216,6 +246,7 @@
<object class="GtkEntry" id="suffix"> <object class="GtkEntry" id="suffix">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="activates_default">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
...@@ -226,6 +257,7 @@ ...@@ -226,6 +257,7 @@
<object class="GtkSpinButton" id="startat"> <object class="GtkSpinButton" id="startat">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="activates_default">True</property>
<property name="adjustment">adjustment1</property> <property name="adjustment">adjustment1</property>
</object> </object>
<packing> <packing>
...@@ -242,10 +274,10 @@ ...@@ -242,10 +274,10 @@
<object class="GtkLabel" id="label8"> <object class="GtkLabel" id="label8">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="outlinenumberingpage|label8">Before:</property> <property name="label" translatable="yes" context="outlinenumberingpage|label8">Before:</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="mnemonic_widget">prefix</property> <property name="mnemonic_widget">prefix</property>
<property name="xalign">0</property>
</object> </object>
</child> </child>
</object> </object>
...@@ -263,10 +295,10 @@ ...@@ -263,10 +295,10 @@
<object class="GtkLabel" id="label9"> <object class="GtkLabel" id="label9">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="outlinenumberingpage|label9">After:</property> <property name="label" translatable="yes" context="outlinenumberingpage|label9">After:</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="mnemonic_widget">suffix</property> <property name="mnemonic_widget">suffix</property>
<property name="xalign">0</property>
</object> </object>
</child> </child>
</object> </object>
...@@ -279,10 +311,10 @@ ...@@ -279,10 +311,10 @@
<object class="GtkLabel" id="label10"> <object class="GtkLabel" id="label10">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="outlinenumberingpage|label10">Start at:</property> <property name="label" translatable="yes" context="outlinenumberingpage|label10">Start at:</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="mnemonic_widget">startat</property> <property name="mnemonic_widget">startat</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -297,7 +329,7 @@ ...@@ -297,7 +329,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="swuilo-NumberingPreview" id="preview"> <object class="GtkDrawingArea" id="preview">
<property name="width_request">150</property> <property name="width_request">150</property>
<property name="height_request">260</property> <property name="height_request">260</property>
<property name="visible">True</property> <property name="visible">True</property>
......
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