cui: blind fix for crash in SvxAppearanceTabPage::SvxAppearanceTabPage
My guess is that it crashes getting officecfg::Office::Common::Misc::UseVerticalNotebookbar See https://crashreport.libreoffice.org/stats/signature/SvxAppearanceTabPage::SvxAppearanceTabPage(weld::Container%20*,weld::DialogController%20*,SfxItemSet%20const%20&) Change-Id: I2ae6ed177f0d3d41db558301d23bcbd37858e563 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204745 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
This commit is contained in:
@@ -86,7 +86,7 @@ void WelcomeDialog::PageCreated(const OUString& rId, SfxTabPage& rPage)
|
||||
}
|
||||
else if (rId == sAppearanceTab)
|
||||
{
|
||||
rPage.getAdditionalProperties().emplace(u"HideAdvancedControls"_ustr, css::uno::Any(true));
|
||||
rPage.getAdditionalProperties().emplace(u"IsWelcomeDialog"_ustr, css::uno::Any(true));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,8 @@ SvxAppearanceTabPage::SvxAppearanceTabPage(weld::Container* pPage,
|
||||
InitThemes();
|
||||
InitCustomization();
|
||||
InitIcons();
|
||||
InitDialogs();
|
||||
|
||||
m_xVerticalToolbars->connect_toggled(LINK(this, SvxAppearanceTabPage, OnTabPosChange));
|
||||
}
|
||||
|
||||
void SvxAppearanceTabPage::LoadSchemeList()
|
||||
@@ -206,13 +207,23 @@ bool SvxAppearanceTabPage::FillItemSet(SfxItemSet* /* rSet */)
|
||||
|
||||
void SvxAppearanceTabPage::Reset(const SfxItemSet* /* rSet */)
|
||||
{
|
||||
// hide advanced controls
|
||||
auto& aProperties = getAdditionalProperties();
|
||||
auto aIterator = aProperties.find(u"HideAdvancedControls"_ustr);
|
||||
auto aIterator = aProperties.find(u"IsWelcomeDialog"_ustr);
|
||||
if (aIterator != aProperties.end())
|
||||
{
|
||||
// hide advanced controls
|
||||
m_xSizeGrid->set_visible(false);
|
||||
m_xCustomizationFrame->set_visible(false);
|
||||
|
||||
// default to vertical avoiding to check UseVerticalNotebookbar
|
||||
m_xVerticalToolbars->set_active(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (officecfg::Office::Common::Misc::UseVerticalNotebookbar::get())
|
||||
m_xVerticalToolbars->set_active(true);
|
||||
else
|
||||
m_xHorizontalToolbars->set_active(true);
|
||||
}
|
||||
|
||||
// reset scheme list
|
||||
@@ -567,16 +578,6 @@ void SvxAppearanceTabPage::InitIcons()
|
||||
m_xIconsDropDown->append(installIconTheme.GetThemeId(), installIconTheme.GetDisplayName());
|
||||
}
|
||||
|
||||
void SvxAppearanceTabPage::InitDialogs()
|
||||
{
|
||||
if (officecfg::Office::Common::Misc::UseVerticalNotebookbar::get())
|
||||
m_xVerticalToolbars->set_active(true);
|
||||
else
|
||||
m_xHorizontalToolbars->set_active(true);
|
||||
|
||||
m_xVerticalToolbars->connect_toggled(LINK(this, SvxAppearanceTabPage, OnTabPosChange));
|
||||
}
|
||||
|
||||
IMPL_LINK_NOARG(SvxAppearanceTabPage, OnTabPosChange, weld::Toggleable&, void)
|
||||
{
|
||||
std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
|
||||
|
||||
@@ -77,7 +77,6 @@ private:
|
||||
void InitThemes();
|
||||
void InitCustomization();
|
||||
void InitIcons();
|
||||
void InitDialogs();
|
||||
|
||||
void LoadSchemeList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user