From 939f9bd0b502ab5dc240be0c6f334becb1c944c8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 21 Jul 2017 12:56:37 +0200 Subject: loplugin:unusedfields in cppcanvas..cui Change-Id: I1cf1f7919e03d863c6f7756e1caf3b9313777479 Reviewed-on: https://gerrit.libreoffice.org/40294 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- cui/source/inc/cuitabarea.hxx | 4 ---- cui/source/inc/numpages.hxx | 1 - cui/source/tabpages/macroass.cxx | 8 +++----- cui/source/tabpages/numpages.cxx | 13 +------------ cui/source/tabpages/tabarea.cxx | 5 ++--- cui/source/tabpages/tpcolor.cxx | 3 +-- 6 files changed, 7 insertions(+), 27 deletions(-) (limited to 'cui') diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 6b0cd7309254..2f6befc45d3b 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -122,8 +122,6 @@ private: ChangeType mnGradientListState; ChangeType mnHatchingListState; - PageType mnPageType; - virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override; protected: @@ -656,8 +654,6 @@ class SvxColorTabPage : public SfxTabPage using TabPage::DeactivatePage; private: - XPropertyListType meType; - VclPtr mpTopDlg; PaletteManager maPaletteManager; diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index 025300b9964b..7b12d8d00879 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -48,7 +48,6 @@ class SvxNumberingPreview : public vcl::Window { const SvxNumRule* pActNum; vcl::Font aStdFont; - long nPageWidth; bool bPosition; sal_uInt16 nActLevel; diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index 9c176a9ae989..79c0fcd6f64c 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -55,7 +55,6 @@ public: VclPtr pMacroFrame; VclPtr pMacroLB; - bool bReadOnly; Idle maFillGroupIdle; bool bGotEvents; bool m_bDummyActivated; ///< has this tab page already been activated @@ -69,7 +68,6 @@ SfxMacroTabPage_Impl::SfxMacroTabPage_Impl() , pGroupLB(nullptr) , pMacroFrame(nullptr) , pMacroLB(nullptr) - , bReadOnly(false) , bGotEvents(false) , m_bDummyActivated(false) { @@ -120,12 +118,12 @@ void SfxMacroTabPage::EnableButtons() { // get bound macro const SvxMacro* pM = aTbl.Get( (sal_uInt16)reinterpret_cast(pE->GetUserData()) ); - mpImpl->pDeletePB->Enable( nullptr != pM && !mpImpl->bReadOnly ); + mpImpl->pDeletePB->Enable( nullptr != pM ); OUString sEventMacro = static_cast(pE->GetItem( LB_MACROS_ITEMPOS )).GetText(); OUString sScriptURI = mpImpl->pMacroLB->GetSelectedScriptURI(); - mpImpl->pAssignPB->Enable( !mpImpl->bReadOnly && !sScriptURI.equalsIgnoreAsciiCase( sEventMacro ) ); + mpImpl->pAssignPB->Enable( !sScriptURI.equalsIgnoreAsciiCase( sEventMacro ) ); } else mpImpl->pAssignPB->Enable( false ); @@ -270,7 +268,7 @@ void SfxMacroTabPage::Reset( const SfxItemSet* rSet ) bool SfxMacroTabPage::IsReadOnly() const { - return mpImpl->bReadOnly; + return false; } IMPL_LINK_NOARG( SfxMacroTabPage, SelectEvent_Impl, SvTreeListBox*, void) diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 03e39ec27b7b..24d60aa85c14 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -2337,7 +2337,6 @@ static sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev, SvxNumberingPreview::SvxNumberingPreview(vcl::Window* pParent, WinBits nWinBits) : Window(pParent, nWinBits) , pActNum(nullptr) - , nPageWidth(0) , bPosition(false) , nActLevel(SAL_MAX_UINT16) { @@ -2368,17 +2367,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool if (pActNum) { - sal_uInt16 nWidthRelation; - if (nPageWidth) - { - nWidthRelation = sal_uInt16 (nPageWidth / aSize.Width()); - if (bPosition) - nWidthRelation = nWidthRelation * 2 / 3; - else - nWidthRelation = nWidthRelation / 4; - } - else - nWidthRelation = 30; // chapter dialog + sal_uInt16 nWidthRelation = 30; // chapter dialog // height per level sal_uInt16 nXStep = sal::static_int_cast(aSize.Width() / (3 * pActNum->GetLevelCount())); diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx index 9676abbf774b..5ee18ede6045 100644 --- a/cui/source/tabpages/tabarea.cxx +++ b/cui/source/tabpages/tabarea.cxx @@ -65,8 +65,7 @@ SvxAreaTabDialog::SvxAreaTabDialog mnBitmapListState ( ChangeType::NONE ), mnPatternListState ( ChangeType::NONE ), mnGradientListState ( ChangeType::NONE ), - mnHatchingListState ( ChangeType::NONE ), - mnPageType( PageType::Area ) + mnHatchingListState ( ChangeType::NONE ) { m_nAreaTabPage = AddTabPage( "RID_SVXPAGE_AREA", SvxAreaTabPage::Create, nullptr ); @@ -261,7 +260,7 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) } else if (nId == m_nTransparenceTabPage) { - static_cast(rPage).SetPageType( mnPageType ); + static_cast(rPage).SetPageType( PageType::Area ); static_cast(rPage).SetDlgType( 0 ); } } diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 3518c9daea0d..3735ced06a89 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -56,7 +56,6 @@ using namespace com::sun::star; SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs) : SfxTabPage(pParent, "ColorPage", "cui/ui/colorpage.ui", &rInAttrs) - , meType( XPropertyListType::Color ) , mpTopDlg( GetParentDialog() ) , rOutAttrs ( rInAttrs ) // All the horrific pointers we store and should not @@ -485,7 +484,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectPaletteLBHdl, ListBox&, void) { XColorListRef pList = XPropertyList::AsColorList( XPropertyList::CreatePropertyListFromURL( - meType, maPaletteManager.GetSelectedPalettePath())); + XPropertyListType::Color, maPaletteManager.GetSelectedPalettePath())); pList->SetName(maPaletteManager.GetPaletteName()); if(pList->Load()) { -- cgit