diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-12 17:12:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-15 19:22:21 +0200 |
commit | eaf0c263eb1a72a58d2a67cc0506ab022d7c4be4 (patch) | |
tree | 4c732e95b560235e83c6de4b5b96260b638fa88d /svx | |
parent | 921ae49cd7e332d7e1ad702efe2198b2780cc829 (diff) |
loplugin:staticconstfield improvements
And fix
ScXMLCachedRowAttrAccess::Cache
which was never setting its mnTab field, and hence would never
be hit.
And fix oox::xls::CellBlockBuffer, which was never setting mnCurrRow.
Change-Id: I2c46aa050b9ebe3c2dc2e52579555f97945dd61c
Reviewed-on: https://gerrit.libreoffice.org/61772
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/ClassificationDialog.cxx | 1 | ||||
-rw-r--r-- | svx/source/svdraw/svdpdf.cxx | 3 | ||||
-rw-r--r-- | svx/source/svdraw/svdpdf.hxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/colrctrl.cxx | 27 |
4 files changed, 16 insertions, 17 deletions
diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx index b9040fbb981b..db5d4f29e22e 100644 --- a/svx/source/dialog/ClassificationDialog.cxx +++ b/svx/source/dialog/ClassificationDialog.cxx @@ -167,7 +167,6 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer , m_bPerParagraph(bPerParagraph) , m_aParagraphSignHandler(rParagraphSignHandler) , m_nCurrentSelectedCategory(-1) - , m_nInsertMarkings(-1) { get(m_pOkButton, "ok"); get(m_pEditWindow, "classificationEditWindow"); diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index 4dd99ec9b3e3..5c739744c285 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -125,7 +125,6 @@ ImpSdrPdfImport::ImpSdrPdfImport(SdrModel& rModel, SdrLayerID nLay, const tools: , mnLayer(nLay) , maOldLineColor() , mnLineWidth(0) - , maLineCap(css::drawing::LineCap_BUTT) , maDash(css::drawing::DashStyle_RECT, 0, 0, 0, 0, 0) , mbMov(false) , mbSize(false) @@ -386,7 +385,7 @@ void ImpSdrPdfImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr) mpLineAttr->Put(XLineJointItem(css::drawing::LineJoint_NONE)); // Add LineCap support - mpLineAttr->Put(XLineCapItem(maLineCap)); + mpLineAttr->Put(XLineCapItem(gaLineCap)); if (((maDash.GetDots() && maDash.GetDotLen()) || (maDash.GetDashes() && maDash.GetDashLen())) diff --git a/svx/source/svdraw/svdpdf.hxx b/svx/source/svdraw/svdpdf.hxx index 462b8f6451bb..fac2847e953e 100644 --- a/svx/source/svdraw/svdpdf.hxx +++ b/svx/source/svdraw/svdpdf.hxx @@ -170,7 +170,7 @@ class ImpSdrPdfImport final SdrLayerID const mnLayer; Color maOldLineColor; sal_Int32 mnLineWidth; - css::drawing::LineCap const maLineCap; + static constexpr css::drawing::LineCap gaLineCap = css::drawing::LineCap_BUTT; XDash const maDash; bool mbMov; diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index 34e403b7cf11..c7bc43f67f23 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -168,6 +168,9 @@ IMPL_LINK_NOARG(SvxColorValueSet_docking, ExecDragHdl, void*, void) DoDrag(); } +static constexpr sal_uInt16 gnLeftSlot = SID_ATTR_FILL_COLOR; +static constexpr sal_uInt16 gnRightSlot = SID_ATTR_LINE_COLOR; + SvxColorDockingWindow::SvxColorDockingWindow ( SfxBindings* _pBindings, @@ -178,8 +181,6 @@ SvxColorDockingWindow::SvxColorDockingWindow SfxDockingWindow( _pBindings, pCW, _pParent, WB_MOVEABLE|WB_CLOSEABLE|WB_SIZEABLE|WB_DOCKABLE ), pColorList (), aColorSet ( VclPtr<SvxColorValueSet_docking>::Create(this) ), - nLeftSlot ( SID_ATTR_FILL_COLOR ), - nRightSlot ( SID_ATTR_LINE_COLOR ), nCols ( 20 ), nLines ( 1 ), nCount ( 0 ) @@ -343,12 +344,12 @@ IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl, ValueSet*, void) if (aColorSet->IsLeftButton()) { - if ( nLeftSlot == SID_ATTR_FILL_COLOR ) + if ( gnLeftSlot == SID_ATTR_FILL_COLOR ) { if ( nPos == 1 ) // invisible { XFillStyleItem aXFillStyleItem( drawing::FillStyle_NONE ); - pDispatcher->ExecuteList(nLeftSlot, SfxCallMode::RECORD, + pDispatcher->ExecuteList(gnLeftSlot, SfxCallMode::RECORD, { &aXFillStyleItem }); } else @@ -373,26 +374,26 @@ IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl, ValueSet*, void) { XFillStyleItem aXFillStyleItem( drawing::FillStyle_SOLID ); XFillColorItem aXFillColorItem( aStr, aColor ); - pDispatcher->ExecuteList(nLeftSlot, SfxCallMode::RECORD, + pDispatcher->ExecuteList(gnLeftSlot, SfxCallMode::RECORD, { &aXFillColorItem, &aXFillStyleItem }); } } } else if ( nPos != 1 ) // invisible { - SvxColorItem aLeftColorItem( aColor, nLeftSlot ); - pDispatcher->ExecuteList(nLeftSlot, SfxCallMode::RECORD, + SvxColorItem aLeftColorItem( aColor, gnLeftSlot ); + pDispatcher->ExecuteList(gnLeftSlot, SfxCallMode::RECORD, { &aLeftColorItem }); } } else { - if ( nRightSlot == SID_ATTR_LINE_COLOR ) + if ( gnRightSlot == SID_ATTR_LINE_COLOR ) { if( nPos == 1 ) // invisible { XLineStyleItem aXLineStyleItem( drawing::LineStyle_NONE ); - pDispatcher->ExecuteList(nRightSlot, SfxCallMode::RECORD, + pDispatcher->ExecuteList(gnRightSlot, SfxCallMode::RECORD, { &aXLineStyleItem }); } else @@ -413,7 +414,7 @@ IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl, ValueSet*, void) if ( eXLS == drawing::LineStyle_NONE ) { XLineStyleItem aXLineStyleItem( drawing::LineStyle_SOLID ); - pDispatcher->ExecuteList(nRightSlot, + pDispatcher->ExecuteList(gnRightSlot, SfxCallMode::RECORD, { &aXLineStyleItem }); } } @@ -421,14 +422,14 @@ IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl, ValueSet*, void) } XLineColorItem aXLineColorItem( aStr, aColor ); - pDispatcher->ExecuteList(nRightSlot, SfxCallMode::RECORD, + pDispatcher->ExecuteList(gnRightSlot, SfxCallMode::RECORD, { &aXLineColorItem }); } } else if ( nPos != 1 ) // invisible { - SvxColorItem aRightColorItem( aColor, nRightSlot ); - pDispatcher->ExecuteList(nRightSlot, SfxCallMode::RECORD, + SvxColorItem aRightColorItem( aColor, gnRightSlot ); + pDispatcher->ExecuteList(gnRightSlot, SfxCallMode::RECORD, { &aRightColorItem }); } } |