From 8536b96ab71bff7c996ad01063c5b514aaf4726f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 8 Aug 2018 10:48:23 +0200 Subject: loplugin:singlevalfields Change-Id: I75554209ad247173381ea96a14c8bf532bed13a8 Reviewed-on: https://gerrit.libreoffice.org/58724 Tested-by: Jenkins Reviewed-by: Noel Grandin --- compilerplugins/clang/singlevalfields.results | 83 ++++++++++++++------------- include/svx/dialcontrol.hxx | 1 - include/svx/svdograf.hxx | 6 -- svx/source/dialog/dialcontrol.cxx | 20 ++----- svx/source/svdraw/svdograf.cxx | 29 ---------- 5 files changed, 49 insertions(+), 90 deletions(-) diff --git a/compilerplugins/clang/singlevalfields.results b/compilerplugins/clang/singlevalfields.results index 6647455fd247..34b3d39416e8 100644 --- a/compilerplugins/clang/singlevalfields.results +++ b/compilerplugins/clang/singlevalfields.results @@ -1,4 +1,4 @@ -chart2/source/model/main/DataPoint.hxx:107 +chart2/source/model/main/DataPoint.hxx:108 chart::DataPoint m_bNoParentPropAllowed 0 connectivity/source/inc/dbase/DIndexIter.hxx:37 @@ -13,6 +13,9 @@ include/basic/sbxvar.hxx:70 include/editeng/charsetcoloritem.hxx:35 SvxCharSetColorItem eFrom 0 +include/editeng/swafopt.hxx:58 + editeng::SortedAutoCompleteStrings owning_ + 1 include/filter/msfilter/dffpropset.hxx:33 DffPropFlags bSet 0 @@ -22,7 +25,7 @@ include/filter/msfilter/dffpropset.hxx:35 include/o3tl/vector_pool.hxx:93 o3tl::detail::struct_from_value::type nextFree -1 -include/oox/dump/dumperbase.hxx:1661 +include/oox/dump/dumperbase.hxx:1683 oox::dump::RecordObjectBase mbBinaryOnly 0 include/oox/ole/axcontrol.hxx:427 @@ -37,7 +40,13 @@ include/svtools/svparser.hxx:74 include/svtools/svparser.hxx:75 SvParser::TokenStackType bTokenHasValue 0 -include/vcl/filter/pdfdocument.hxx:188 +include/svx/dialcontrol.hxx:212 + svx::SvxDialControl::DialControl_Impl mbNoRot + 0 +include/svx/svdograf.hxx:106 + SdrGrafObj mbInsidePaint + 0 +include/vcl/filter/pdfdocument.hxx:200 vcl::filter::PDFNameElement m_nLength 0 libreofficekit/source/gtk/lokdocview.cxx:84 @@ -55,7 +64,7 @@ pyuno/source/module/pyuno_impl.hxx:312 sax/source/tools/fastserializer.hxx:231 sax_fastparser::FastSaxSerializer mbXescape 1 -sc/inc/compiler.hxx:111 +sc/inc/compiler.hxx:112 ScRawToken::(anonymous union)::(anonymous) eInForceArray 0 sc/qa/unit/ucalc.hxx:41 @@ -73,10 +82,10 @@ sfx2/source/appl/lnkbase2.cxx:77 sfx2/source/appl/lnkbase2.cxx:82 sfx2::ImplBaseLinkData::(anonymous) DDEType 0 -sfx2/source/doc/doctemplates.cxx:136 +sfx2/source/doc/doctemplates.cxx:137 (anonymous namespace)::WaitWindow_Impl mnTextStyle 12576 -sfx2/source/view/ipclient.cxx:81 +sfx2/source/view/ipclient.cxx:82 SfxBooleanFlagGuard m_bLifeValue 1 soltools/cpp/cpp.h:120 @@ -91,24 +100,18 @@ soltools/mkdepend/def.h:132 stoc/source/inspect/introspection.cxx:1530 (anonymous namespace)::Cache::Data hits 1 -svtools/source/control/valueimp.hxx:81 - SvtValueSetItem mpData - 0 -svx/source/svdraw/svdpdf.hxx:168 +svx/source/svdraw/svdpdf.hxx:173 ImpSdrPdfImport maLineJoin 0 -svx/source/svdraw/svdpdf.hxx:169 +svx/source/svdraw/svdpdf.hxx:174 ImpSdrPdfImport maLineCap 0 sw/inc/hints.hxx:199 SwAttrSetChg m_bDelSet 0 -sw/inc/pagepreviewlayout.hxx:49 +sw/inc/pagepreviewlayout.hxx:46 SwPagePreviewLayout mnYFree 568 -sw/inc/swbaslnk.hxx:32 - SwBaseLink m_bIgnoreDataChanged - 0 sw/source/core/inc/frmtool.hxx:260 SwBorderAttrs m_bBorderDist 1 @@ -124,24 +127,18 @@ sw/source/filter/html/htmlcss1.cxx:78 sw/source/filter/html/htmlcss1.cxx:79 SwCSS1ItemIds nFormatKeep 109 -sw/source/filter/html/svxcss1.hxx:201 +sw/source/filter/html/svxcss1.hxx:202 SvxCSS1Parser nMinFixLineSpace 141 sw/source/filter/inc/rtf.hxx:30 RTFSurround::(anonymous union)::(anonymous) nJunk 0 -sw/source/filter/ww8/ww8par.hxx:655 +sw/source/filter/ww8/ww8par.hxx:660 WW8FormulaControl mfUnknown 0 -sw/source/filter/ww8/ww8par.hxx:664 +sw/source/filter/ww8/ww8par.hxx:669 WW8FormulaControl mhpsCheckBox 20 -sw/source/uibase/inc/envlop.hxx:76 - SwEnvDlg pAddresseeSet - 0 -sw/source/uibase/inc/envlop.hxx:77 - SwEnvDlg pSenderSet - 0 unotools/source/config/saveopt.cxx:77 SvtSaveOptions_Impl bROUserAutoSave 0 @@ -175,51 +172,57 @@ vcl/source/filter/jpeg/transupp.h:131 vcl/source/font/font.cxx:539 (anonymous namespace)::WeightSearchEntry weight 5 -vcl/source/gdi/dibtools.cxx:50 +vcl/source/gdi/dibtools.cxx:51 (anonymous namespace)::CIEXYZ aXyzX 0 -vcl/source/gdi/dibtools.cxx:51 +vcl/source/gdi/dibtools.cxx:52 (anonymous namespace)::CIEXYZ aXyzY 0 -vcl/source/gdi/dibtools.cxx:52 +vcl/source/gdi/dibtools.cxx:53 (anonymous namespace)::CIEXYZ aXyzZ 0 -vcl/source/gdi/dibtools.cxx:105 +vcl/source/gdi/dibtools.cxx:106 (anonymous namespace)::DIBV5Header nV5RedMask 0 -vcl/source/gdi/dibtools.cxx:106 +vcl/source/gdi/dibtools.cxx:107 (anonymous namespace)::DIBV5Header nV5GreenMask 0 -vcl/source/gdi/dibtools.cxx:107 +vcl/source/gdi/dibtools.cxx:108 (anonymous namespace)::DIBV5Header nV5BlueMask 0 -vcl/source/gdi/dibtools.cxx:108 +vcl/source/gdi/dibtools.cxx:109 (anonymous namespace)::DIBV5Header nV5AlphaMask 0 -vcl/source/gdi/dibtools.cxx:111 +vcl/source/gdi/dibtools.cxx:112 (anonymous namespace)::DIBV5Header nV5GammaRed 0 -vcl/source/gdi/dibtools.cxx:112 +vcl/source/gdi/dibtools.cxx:113 (anonymous namespace)::DIBV5Header nV5GammaGreen 0 -vcl/source/gdi/dibtools.cxx:113 +vcl/source/gdi/dibtools.cxx:114 (anonymous namespace)::DIBV5Header nV5GammaBlue 0 -vcl/source/gdi/dibtools.cxx:115 +vcl/source/gdi/dibtools.cxx:116 (anonymous namespace)::DIBV5Header nV5ProfileData 0 -vcl/source/gdi/dibtools.cxx:116 +vcl/source/gdi/dibtools.cxx:117 (anonymous namespace)::DIBV5Header nV5ProfileSize 0 -vcl/source/gdi/dibtools.cxx:117 +vcl/source/gdi/dibtools.cxx:118 (anonymous namespace)::DIBV5Header nV5Reserved 0 -vcl/source/gdi/pdfwriter_impl.hxx:699 +vcl/source/gdi/pdfwriter_impl.hxx:698 vcl::PDFWriterImpl m_nInheritedPageWidth 595 -vcl/source/gdi/pdfwriter_impl.hxx:700 +vcl/source/gdi/pdfwriter_impl.hxx:699 vcl::PDFWriterImpl m_nInheritedPageHeight 842 -writerfilter/source/dmapper/GraphicImport.cxx:223 +writerfilter/source/dmapper/GraphicImport.cxx:208 writerfilter::dmapper::GraphicImport_Impl nCurrentBorderLine 2 +writerfilter/source/rtftok/rtfdocumentimpl.hxx:620 + writerfilter::rtftok::RTFDocumentImpl m_nNestedTRLeft + 0 +writerfilter/source/rtftok/rtfdocumentimpl.hxx:621 + writerfilter::rtftok::RTFDocumentImpl m_nTopLevelTRLeft + 0 diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx index a245ea3e6e7e..085cb0ce4c1c 100644 --- a/include/svx/dialcontrol.hxx +++ b/include/svx/dialcontrol.hxx @@ -209,7 +209,6 @@ protected: sal_Int32 mnOldAngle; long mnCenterX; long mnCenterY; - bool mbNoRot; explicit DialControl_Impl(OutputDevice& rReference); void Init( const Size& rWinSize, const vcl::Font& rWinFont ); diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx index bdcb24d32b83..11334b98f4cc 100644 --- a/include/svx/svdograf.hxx +++ b/include/svx/svdograf.hxx @@ -102,9 +102,6 @@ private: // Flag for allowing text animation. Default is true. bool mbGrafAnimationAllowed:1; - // #i25616# - bool mbInsidePaint:1; - bool mbIsSignatureLine; OUString maSignatureLineId; OUString maSignatureLineSuggestedSignerName; @@ -180,9 +177,6 @@ public: virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; - // #i25616# - virtual basegfx::B2DPolyPolygon TakeXorPoly() const override; - virtual SdrGrafObj* CloneSdrObject(SdrModel& rTargetModel) const override; SdrGrafObj& operator=(const SdrGrafObj& rObj); diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index f4bc875fccf6..81978611458f 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -517,8 +517,7 @@ SvxDialControl::DialControl_Impl::DialControl_Impl(OutputDevice& rReference) : mnInitialAngle( 0 ), mnOldAngle( 0 ), mnCenterX( 0 ), - mnCenterY( 0 ), - mbNoRot( false ) + mnCenterY( 0 ) { } @@ -690,26 +689,19 @@ void SvxDialControl::Init( const Size& rWinSize ) void SvxDialControl::InvalidateControl() { mpImpl->mxBmpBuffered->CopyBackground( IsEnabled() ? *mpImpl->mxBmpEnabled : *mpImpl->mxBmpDisabled ); - if( !mpImpl->mbNoRot ) - mpImpl->mxBmpBuffered->DrawElements( OUString(), mpImpl->mnAngle ); + mpImpl->mxBmpBuffered->DrawElements( OUString(), mpImpl->mnAngle ); Invalidate(); } void SvxDialControl::SetRotation( sal_Int32 nAngle ) { - bool bOldSel = mpImpl->mbNoRot; - mpImpl->mbNoRot = false; - while( nAngle < 0 ) nAngle += 36000; - if( !bOldSel || (mpImpl->mnAngle != nAngle) ) - { - mpImpl->mnAngle = nAngle; - InvalidateControl(); - if( mpImpl->mpLinkField ) - mpImpl->mpLinkField->set_value(GetRotation() / mpImpl->mnLinkedFieldValueMultiplyer); - } + mpImpl->mnAngle = nAngle; + InvalidateControl(); + if( mpImpl->mpLinkField ) + mpImpl->mpLinkField->set_value(GetRotation() / mpImpl->mnLinkedFieldValueMultiplyer); } void SvxDialControl::HandleMouseEvent( const Point& rPos, bool bInitial ) diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 2e5f955b0165..6e6e926ba849 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -346,7 +346,6 @@ SdrGrafObj::SdrGrafObj(SdrModel& rSdrModel) // #i25616# mbLineIsOutsideGeometry = true; - mbInsidePaint = false; // #i25616# mbSupportTextIndentingOnLineWidthChange = false; @@ -373,7 +372,6 @@ SdrGrafObj::SdrGrafObj( // #i25616# mbLineIsOutsideGeometry = true; - mbInsidePaint = false; // #i25616# mbSupportTextIndentingOnLineWidthChange = false; @@ -399,7 +397,6 @@ SdrGrafObj::SdrGrafObj( // #i25616# mbLineIsOutsideGeometry = true; - mbInsidePaint = false; // #i25616# mbSupportTextIndentingOnLineWidthChange = false; @@ -909,32 +906,6 @@ SdrGrafObj& SdrGrafObj::operator=( const SdrGrafObj& rObj ) return *this; } -basegfx::B2DPolyPolygon SdrGrafObj::TakeXorPoly() const -{ - if(mbInsidePaint) - { - basegfx::B2DPolyPolygon aRetval; - - // take grown rectangle - const sal_Int32 nHalfLineWidth(ImpGetLineWdt() / 2); - const tools::Rectangle aGrownRect( - maRect.Left() - nHalfLineWidth, - maRect.Top() - nHalfLineWidth, - maRect.Right() + nHalfLineWidth, - maRect.Bottom() + nHalfLineWidth); - - XPolygon aXPoly(ImpCalcXPoly(aGrownRect, GetEckenradius())); - aRetval.append(aXPoly.getB2DPolygon()); - - return aRetval; - } - else - { - // call parent - return SdrRectObj::TakeXorPoly(); - } -} - sal_uInt32 SdrGrafObj::GetHdlCount() const { return 8L; -- cgit