From 9e57e164844e67faaf2b0424181c2df29e871992 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 5 May 2022 09:59:06 +0200 Subject: loplugin:unusedvariableplus Change-Id: Id93086be1224b6f6bf0bdaa1d50b4f289099027e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133876 Tested-by: Jenkins Reviewed-by: Noel Grandin --- cui/source/dialogs/toolbarmodedlg.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'cui') diff --git a/cui/source/dialogs/toolbarmodedlg.cxx b/cui/source/dialogs/toolbarmodedlg.cxx index 5ca568adf576..f1dbdeb106cb 100644 --- a/cui/source/dialogs/toolbarmodedlg.cxx +++ b/cui/source/dialogs/toolbarmodedlg.cxx @@ -67,11 +67,9 @@ static OUString GetCurrentApp() static OUString GetCurrentMode() { OUString sResult; - if (SfxViewFrame* pViewFrame = SfxViewFrame::Current()) + if (SfxViewFrame::Current()) { - const auto xCurrentFrame = pViewFrame->GetFrame().GetFrameInterface(); const auto xContext = comphelper::getProcessComponentContext(); - const auto xModuleManager = css::frame::ModuleManager::create(xContext); const utl::OConfigurationTreeRoot aAppNode( xContext, "org.openoffice.Office.UI.ToolbarMode/Applications/" + GetCurrentApp(), true); if (aAppNode.isValid()) @@ -189,11 +187,9 @@ IMPL_LINK(ToolbarmodeDialog, OnApplyClick, weld::Button&, rButton, void) aBatch->commit(); OUString sCurrentApp = GetCurrentApp(); - if (SfxViewFrame* pViewFrame = SfxViewFrame::Current()) + if (SfxViewFrame::Current()) { - const auto xCurrentFrame = pViewFrame->GetFrame().GetFrameInterface(); const auto xContext = comphelper::getProcessComponentContext(); - const auto xModuleManager = css::frame::ModuleManager::create(xContext); const utl::OConfigurationTreeRoot aAppNode( xContext, "org.openoffice.Office.UI.ToolbarMode/Applications/", true); if (sCurrentApp != "Writer") -- cgit