[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - cui/source
Maxim Monastirsky (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 3 16:55:12 UTC 2020
cui/source/customize/SvxConfigPageHelper.cxx | 15 ---------------
cui/source/customize/cfg.cxx | 15 ++++++---------
cui/source/inc/SvxConfigPageHelper.hxx | 3 ---
3 files changed, 6 insertions(+), 27 deletions(-)
New commits:
commit 843f418ecd1b1cea1787e8adec9072d6ac251f3b
Author: Maxim Monastirsky <momonasmon at gmail.com>
AuthorDate: Sun Feb 9 17:58:42 2020 +0200
Commit: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Tue Mar 3 17:54:42 2020 +0100
Fix crash with Tools > Customize... in Master Document
Need to compare by full module id here, as otherwise
Master Document is detected as Writer, causing crash
as the notebookbar tab isn't prepared to handle the
Master Document variant.
Change-Id: I872255c42517b4223fb31e2074e4d5d083c76e93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88344
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
(cherry picked from commit 0ad3558a0c84e97306dfd6d235680ed6e053711b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89775
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/cui/source/customize/SvxConfigPageHelper.cxx b/cui/source/customize/SvxConfigPageHelper.cxx
index f59ccb118adc..ead3f59da7d4 100644
--- a/cui/source/customize/SvxConfigPageHelper.cxx
+++ b/cui/source/customize/SvxConfigPageHelper.cxx
@@ -449,21 +449,6 @@ css::uno::Sequence< css::beans::PropertyValue > SvxConfigPageHelper::ConvertTool
return aPropSeq;
}
-bool SvxConfigPageHelper::showKeyConfigTabPage(
- const css::uno::Reference< css::frame::XFrame >& xFrame )
-{
- if (!xFrame.is())
- {
- return false;
- }
- OUString sModuleId(
- css::frame::ModuleManager::create(
- comphelper::getProcessComponentContext())
- ->identify(xFrame));
- return !sModuleId.isEmpty()
- && sModuleId != "com.sun.star.frame.StartModule";
-}
-
bool SvxConfigPageHelper::EntrySort( SvxConfigEntry const * a, SvxConfigEntry const * b )
{
return a->GetName().compareTo( b->GetName() ) < 0;
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 8daf8409ed68..7b5e51b9d521 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -228,18 +228,15 @@ SvxConfigDialog::SvxConfigDialog(weld::Window * pParent, const SfxItemSet* pInSe
void SvxConfigDialog::SetFrame(const css::uno::Reference<css::frame::XFrame>& xFrame)
{
m_xFrame = xFrame;
- uno::Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext(),
- uno::UNO_SET_THROW);
-
OUString aModuleId = SvxConfigPage::GetFrameWithDefaultAndIdentify(m_xFrame);
- uno::Reference<css::frame::XModuleManager2> xModuleManager(
- css::frame::ModuleManager::create(xContext));
- OUString aModuleName = SvxConfigPageHelper::GetUIModuleName(aModuleId, xModuleManager);
- if (aModuleName != "Writer" && aModuleName != "Calc" && aModuleName != "Impress"
- && aModuleName != "Draw")
+
+ if (aModuleId != "com.sun.star.text.TextDocument" &&
+ aModuleId != "com.sun.star.sheet.SpreadsheetDocument" &&
+ aModuleId != "com.sun.star.presentation.PresentationDocument" &&
+ aModuleId != "com.sun.star.drawing.DrawingDocument")
RemoveTabPage("notebookbar");
- if (!SvxConfigPageHelper::showKeyConfigTabPage(xFrame))
+ if (aModuleId == "com.sun.star.frame.StartModule")
RemoveTabPage("keyboard");
}
diff --git a/cui/source/inc/SvxConfigPageHelper.hxx b/cui/source/inc/SvxConfigPageHelper.hxx
index e78fc10cfd87..8aaba7ae90e2 100644
--- a/cui/source/inc/SvxConfigPageHelper.hxx
+++ b/cui/source/inc/SvxConfigPageHelper.hxx
@@ -81,9 +81,6 @@ public:
static css::uno::Sequence< css::beans::PropertyValue > ConvertToolbarEntry(
const SvxConfigEntry* pEntry );
- static bool showKeyConfigTabPage(
- const css::uno::Reference< css::frame::XFrame >& xFrame );
-
static bool EntrySort( SvxConfigEntry const * a, SvxConfigEntry const * b );
static bool SvxConfigEntryModified( SvxConfigEntry const * pEntry );
More information about the Libreoffice-commits
mailing list