Revert "cui: blind fix for crash in SvxAppearanceTabPage::SvxAppearanceTabPage"
This reverts commit b68b3123c2.
Reason for revert: it didn't fix the crash and it's happening in
LibreOffice 26.2.4: https://crashreport.libreoffice.org/stats/version/26.2.4.2
Change-Id: I48ada843137bbe34b781744495a66daab86900af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207293
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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"IsWelcomeDialog"_ustr, css::uno::Any(true));
|
||||
rPage.getAdditionalProperties().emplace(u"HideAdvancedControls"_ustr, css::uno::Any(true));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -129,8 +129,7 @@ SvxAppearanceTabPage::SvxAppearanceTabPage(weld::Container* pPage,
|
||||
InitThemes();
|
||||
InitCustomization();
|
||||
InitIcons();
|
||||
|
||||
m_xVerticalToolbars->connect_toggled(LINK(this, SvxAppearanceTabPage, OnTabPosChange));
|
||||
InitDialogs();
|
||||
}
|
||||
|
||||
void SvxAppearanceTabPage::LoadSchemeList()
|
||||
@@ -209,24 +208,14 @@ bool SvxAppearanceTabPage::FillItemSet(SfxItemSet* /* rSet */)
|
||||
|
||||
void SvxAppearanceTabPage::Reset(const SfxItemSet* /* rSet */)
|
||||
{
|
||||
// hide advanced controls
|
||||
auto& aProperties = getAdditionalProperties();
|
||||
auto aIterator = aProperties.find(u"IsWelcomeDialog"_ustr);
|
||||
auto aIterator = aProperties.find(u"HideAdvancedControls"_ustr);
|
||||
if (aIterator != aProperties.end())
|
||||
{
|
||||
// hide advanced controls
|
||||
m_xSizeGrid->set_visible(false);
|
||||
m_xCustomizationFrame->set_visible(false);
|
||||
m_xDialogFrame->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
|
||||
@@ -581,6 +570,16 @@ 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(
|
||||
|
||||
@@ -80,6 +80,7 @@ private:
|
||||
void InitThemes();
|
||||
void InitCustomization();
|
||||
void InitIcons();
|
||||
void InitDialogs();
|
||||
|
||||
void LoadSchemeList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user