summaryrefslogtreecommitdiff
path: root/cui/source/customize/cfg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/customize/cfg.cxx')
-rw-r--r--cui/source/customize/cfg.cxx15
1 files changed, 6 insertions, 9 deletions
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");
}