From a55d9d57e5bfe40a6d97c78b35646372f599c840 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 21 Nov 2022 11:11:39 +0200 Subject: [PATCH] loplugin:unusedfields Change-Id: I726b8b9dee3a424f731078cd6b10027423454bee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143086 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/sfx2/templatedlg.hxx | 3 --- include/svtools/PlaceEditDialog.hxx | 1 - include/svx/rubydialog.hxx | 2 -- package/source/xstor/switchpersistencestream.cxx | 4 ---- package/source/xstor/switchpersistencestream.hxx | 4 ---- package/source/xstor/xstorage.cxx | 6 +++--- reportdesign/source/ui/dlg/AddField.cxx | 1 - reportdesign/source/ui/dlg/PageNumber.cxx | 2 -- reportdesign/source/ui/inc/AddField.hxx | 1 - reportdesign/source/ui/inc/PageNumber.hxx | 2 -- sfx2/source/doc/templatedlg.cxx | 2 -- svtools/source/dialogs/PlaceEditDialog.cxx | 2 -- svx/source/dialog/rubydialog.cxx | 2 -- 13 files changed, 3 insertions(+), 29 deletions(-) diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx index 10d3107fc3e1..49d559152563 100644 --- a/include/sfx2/templatedlg.hxx +++ b/include/sfx2/templatedlg.hxx @@ -128,7 +128,6 @@ protected: std::unique_ptr mxCBXHideDlg; std::unique_ptr mxActionBar; std::unique_ptr mxLocalView; - std::unique_ptr mxTemplateDefaultMenu; std::unique_ptr mxLocalViewWeld; std::unique_ptr mxListViewButton; std::unique_ptr mxThumbnailViewButton; @@ -145,9 +144,7 @@ private: bool mbIsNewCategory; std::unique_ptr mxLBCategory; - std::unique_ptr mxSelectLabel; std::unique_ptr mxNewCategoryEdit; - std::unique_ptr mxCreateLabel; std::unique_ptr mxOKButton; public: diff --git a/include/svtools/PlaceEditDialog.hxx b/include/svtools/PlaceEditDialog.hxx index 931aad16f811..2f4fd5426fd1 100644 --- a/include/svtools/PlaceEditDialog.hxx +++ b/include/svtools/PlaceEditDialog.hxx @@ -42,7 +42,6 @@ public: std::unique_ptr m_xEDUsername; std::unique_ptr m_xFTUsernameLabel; std::unique_ptr m_xBTOk; - std::unique_ptr m_xBTCancel; std::unique_ptr m_xBTDelete; std::unique_ptr m_xBTRepoRefresh; std::unique_ptr m_xCBPassword; diff --git a/include/svx/rubydialog.hxx b/include/svx/rubydialog.hxx index 12593c73ffc6..655b4f2ae049 100644 --- a/include/svx/rubydialog.hxx +++ b/include/svx/rubydialog.hxx @@ -64,8 +64,6 @@ class SvxRubyDialog final : public SfxModelessDialogController rtl::Reference m_pImpl; weld::Entry* aEditArr[8]; - std::unique_ptr m_xLeftFT; - std::unique_ptr m_xRightFT; std::unique_ptr m_xLeft1ED; std::unique_ptr m_xRight1ED; std::unique_ptr m_xLeft2ED; diff --git a/package/source/xstor/switchpersistencestream.cxx b/package/source/xstor/switchpersistencestream.cxx index f27dce18edc5..ff6118726628 100644 --- a/package/source/xstor/switchpersistencestream.cxx +++ b/package/source/xstor/switchpersistencestream.cxx @@ -63,17 +63,13 @@ struct SPStreamData_Impl }; SwitchablePersistenceStream::SwitchablePersistenceStream( - uno::Reference< uno::XComponentContext > xContext, const uno::Reference< io::XStream >& xStream ) -: m_xContext(std::move( xContext )) { SwitchPersistenceTo( xStream ); } SwitchablePersistenceStream::SwitchablePersistenceStream( - uno::Reference< uno::XComponentContext > xContext, const uno::Reference< io::XInputStream >& xInputStream ) -: m_xContext(std::move( xContext )) { SwitchPersistenceTo( xInputStream ); } diff --git a/package/source/xstor/switchpersistencestream.hxx b/package/source/xstor/switchpersistencestream.hxx index ad0293be8110..64d4e37fd025 100644 --- a/package/source/xstor/switchpersistencestream.hxx +++ b/package/source/xstor/switchpersistencestream.hxx @@ -49,8 +49,6 @@ class SwitchablePersistenceStream { std::mutex m_aMutex; - const css::uno::Reference< css::uno::XComponentContext > m_xContext; - std::unique_ptr m_pStreamData; void CloseAll_Impl(); @@ -58,11 +56,9 @@ class SwitchablePersistenceStream public: SwitchablePersistenceStream( - css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::io::XStream >& xStream ); SwitchablePersistenceStream( - css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::io::XInputStream >& xInStream ); virtual ~SwitchablePersistenceStream() override; diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 5ac7f0618b7d..31aa1924048b 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -165,7 +165,7 @@ OStorage_Impl::OStorage_Impl( uno::Reference< io::XInputStream > const & xInpu SAL_WARN_IF( !xInputStream.is(), "package.xstor", "No input stream is provided!" ); assert(xContext.is()); - m_pSwitchStream = new SwitchablePersistenceStream(xContext, xInputStream); + m_pSwitchStream = new SwitchablePersistenceStream(xInputStream); m_xInputStream = m_pSwitchStream->getInputStream(); if ( m_nStorageMode & embed::ElementModes::WRITE ) @@ -207,12 +207,12 @@ OStorage_Impl::OStorage_Impl( uno::Reference< io::XStream > const & xStream, if ( m_nStorageMode & embed::ElementModes::WRITE ) { - m_pSwitchStream = new SwitchablePersistenceStream(xContext, xStream); + m_pSwitchStream = new SwitchablePersistenceStream(xStream); m_xStream = static_cast< io::XStream* >( m_pSwitchStream.get() ); } else { - m_pSwitchStream = new SwitchablePersistenceStream(xContext, xStream->getInputStream()); + m_pSwitchStream = new SwitchablePersistenceStream(xStream->getInputStream()); m_xInputStream = m_pSwitchStream->getInputStream(); } } diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx index d9fe4f679e14..6ae0ccabebf1 100644 --- a/reportdesign/source/ui/dlg/AddField.cxx +++ b/reportdesign/source/ui/dlg/AddField.cxx @@ -67,7 +67,6 @@ OAddFieldWindow::OAddFieldWindow(weld::Window* pParent, uno::Reference< beans::X , m_xRowSet(std::move(xRowSet)) , m_xActions(m_xBuilder->weld_toolbar("toolbox")) , m_xListBox(m_xBuilder->weld_tree_view("treeview")) - , m_xHelpText(m_xBuilder->weld_label("helptext")) , m_nCommandType(0) , m_bEscapeProcessing(false) { diff --git a/reportdesign/source/ui/dlg/PageNumber.cxx b/reportdesign/source/ui/dlg/PageNumber.cxx index 312d0772712b..1e267fb1fb10 100644 --- a/reportdesign/source/ui/dlg/PageNumber.cxx +++ b/reportdesign/source/ui/dlg/PageNumber.cxx @@ -38,10 +38,8 @@ OPageNumberDialog::OPageNumberDialog(weld::Window* pParent, : GenericDialogController(pParent, "modules/dbreport/ui/pagenumberdialog.ui", "PageNumberDialog") , m_pController(_pController) , m_xHoldAlive(std::move(_xHoldAlive)) - , m_xPageN(m_xBuilder->weld_radio_button("pagen")) , m_xPageNofM(m_xBuilder->weld_radio_button("pagenofm")) , m_xTopPage(m_xBuilder->weld_radio_button("toppage")) - , m_xBottomPage(m_xBuilder->weld_radio_button("bottompage")) , m_xAlignmentLst(m_xBuilder->weld_combo_box("alignment")) , m_xShowNumberOnFirstPage(m_xBuilder->weld_check_button("shownumberonfirstpage")) { diff --git a/reportdesign/source/ui/inc/AddField.hxx b/reportdesign/source/ui/inc/AddField.hxx index be33db5799ca..c5d8eb603d94 100644 --- a/reportdesign/source/ui/inc/AddField.hxx +++ b/reportdesign/source/ui/inc/AddField.hxx @@ -52,7 +52,6 @@ class OAddFieldWindow : public weld::GenericDialogController std::unique_ptr m_xActions; std::unique_ptr m_xListBox; - std::unique_ptr m_xHelpText; Link m_aCreateLink; OUString m_aCommandName; diff --git a/reportdesign/source/ui/inc/PageNumber.hxx b/reportdesign/source/ui/inc/PageNumber.hxx index ce39f2bfac83..89a857b49857 100644 --- a/reportdesign/source/ui/inc/PageNumber.hxx +++ b/reportdesign/source/ui/inc/PageNumber.hxx @@ -35,10 +35,8 @@ class OPageNumberDialog : public weld::GenericDialogController ::rptui::OReportController* m_pController; css::uno::Reference< css::report::XReportDefinition> m_xHoldAlive; - std::unique_ptr m_xPageN; std::unique_ptr m_xPageNofM; std::unique_ptr m_xTopPage; - std::unique_ptr m_xBottomPage; std::unique_ptr m_xAlignmentLst; std::unique_ptr m_xShowNumberOnFirstPage; diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 8a710fd84609..6bbb7988e726 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -1265,9 +1265,7 @@ SfxTemplateCategoryDialog::SfxTemplateCategoryDialog(weld::Window* pParent) : GenericDialogController(pParent, "sfx/ui/templatecategorydlg.ui", "TemplatesCategoryDialog") , mbIsNewCategory(false) , mxLBCategory(m_xBuilder->weld_tree_view("categorylb")) - , mxSelectLabel(m_xBuilder->weld_label("select_label")) , mxNewCategoryEdit(m_xBuilder->weld_entry("category_entry")) - , mxCreateLabel(m_xBuilder->weld_label("create_label")) , mxOKButton(m_xBuilder->weld_button("ok")) { mxLBCategory->append_text(SfxResId(STR_CATEGORY_NONE)); diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx index 8e66c1b326ed..2275965e866a 100644 --- a/svtools/source/dialogs/PlaceEditDialog.cxx +++ b/svtools/source/dialogs/PlaceEditDialog.cxx @@ -32,7 +32,6 @@ PlaceEditDialog::PlaceEditDialog(weld::Window* pParent) , m_xEDUsername(m_xBuilder->weld_entry("login")) , m_xFTUsernameLabel(m_xBuilder->weld_label("loginLabel")) , m_xBTOk(m_xBuilder->weld_button("ok")) - , m_xBTCancel(m_xBuilder->weld_button("cancel")) , m_xBTDelete(m_xBuilder->weld_button("delete")) , m_xBTRepoRefresh(m_xBuilder->weld_button("repositoriesRefresh")) , m_xCBPassword(m_xBuilder->weld_check_button("rememberPassword")) @@ -84,7 +83,6 @@ PlaceEditDialog::PlaceEditDialog(weld::Window* pParent, const std::shared_ptrweld_entry("login")) , m_xFTUsernameLabel(m_xBuilder->weld_label("loginLabel")) , m_xBTOk(m_xBuilder->weld_button("ok")) - , m_xBTCancel(m_xBuilder->weld_button("cancel")) , m_xBTDelete(m_xBuilder->weld_button("delete")) , m_xBTRepoRefresh(m_xBuilder->weld_button("repositoriesRefresh")) , m_xCBPassword(m_xBuilder->weld_check_button("rememberPassword")) diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 3abd7e9b3517..4059e8d35c8c 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -188,8 +188,6 @@ SvxRubyDialog::SvxRubyDialog(SfxBindings* pBind, SfxChildWindow* pCW, weld::Wind , bModified(false) , pBindings(pBind) , m_pImpl(new SvxRubyData_Impl) - , m_xLeftFT(m_xBuilder->weld_label("basetextft")) - , m_xRightFT(m_xBuilder->weld_label("rubytextft")) , m_xLeft1ED(m_xBuilder->weld_entry("Left1ED")) , m_xRight1ED(m_xBuilder->weld_entry("Right1ED")) , m_xLeft2ED(m_xBuilder->weld_entry("Left2ED"))