compilerplugins/clang/unusedfields.readonly.results | 12 ------- include/svx/AccessibleShape.hxx | 5 --- include/svx/EnhancedCustomShape2d.hxx | 1 include/svx/sidebar/AreaPropertyPanelBase.hxx | 1 svx/source/accessibility/AccessibleControlShape.cxx | 4 +- svx/source/customshapes/EnhancedCustomShape2d.cxx | 3 - svx/source/dialog/frmsel.cxx | 3 - svx/source/form/navigatortree.cxx | 7 +--- svx/source/inc/fmexpl.hxx | 1 svx/source/inc/frmselimpl.hxx | 1 svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 32 ++++++++------------ svx/source/unodraw/unoshtxt.cxx | 9 +---- 12 files changed, 22 insertions(+), 57 deletions(-)
New commits: commit 7b59273c6c2bd10b9aea52753dc6b21052a9b2ed Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Thu Jul 20 15:06:37 2017 +0200 loplugin:unusedfields in svx Change-Id: I7fc5bf55b01d464815771220914f21d8e85b5a36 Reviewed-on: https://gerrit.libreoffice.org/40253 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/compilerplugins/clang/unusedfields.readonly.results b/compilerplugins/clang/unusedfields.readonly.results index f573cfec970b..0c3ddcd1516e 100644 --- a/compilerplugins/clang/unusedfields.readonly.results +++ b/compilerplugins/clang/unusedfields.readonly.results @@ -666,12 +666,6 @@ include/svtools/editsyntaxhighlighter.hxx:33 MultiLineEditSyntaxHighlight m_aColorConfig svtools::ColorConfig include/svtools/headbar.hxx:241 HeaderBar maDoubleClickHdl Link<class HeaderBar *, void> -include/svx/AccessibleShape.hxx:389 - accessibility::AccessibleShape mnIndex long -include/svx/EnhancedCustomShape2d.hxx:116 - EnhancedCustomShape2d bTextFlow _Bool -include/svx/sidebar/AreaPropertyPanelBase.hxx:112 - svx::sidebar::AreaPropertyPanelBase mnLastPosGradient sal_Int32 include/svx/svdmark.hxx:142 SdrMarkList maPointName class rtl::OUString include/svx/svdmark.hxx:143 @@ -1196,16 +1190,10 @@ svx/source/inc/datanavi.hxx:552 svxform::AddSubmissionDialog m_aMethodString class svxform::MethodString svx/source/inc/datanavi.hxx:553 svxform::AddSubmissionDialog m_aReplaceString class svxform::ReplaceString -svx/source/inc/fmexpl.hxx:410 - svxform::NavigatorTree m_bMarkingObjects _Bool -svx/source/inc/frmselimpl.hxx:138 - svx::FrameSelectorImpl mbClicked _Bool svx/source/inc/gridcell.hxx:528 DbPatternField m_pValueFormatter ::std::unique_ptr< ::dbtools::FormattedColumnValue> svx/source/inc/gridcell.hxx:529 DbPatternField m_pPaintFormatter ::std::unique_ptr< ::dbtools::FormattedColumnValue> -svx/source/unodraw/unoshtxt.cxx:93 - SvxTextEditSourceImpl mbDestroyed _Bool sw/inc/acmplwrd.hxx:43 SwAutoCompleteWord m_LookupTree editeng::Trie sw/inc/calc.hxx:162 diff --git a/include/svx/AccessibleShape.hxx b/include/svx/AccessibleShape.hxx index 8835cfaa9d7d..592a7ead9b32 100644 --- a/include/svx/AccessibleShape.hxx +++ b/include/svx/AccessibleShape.hxx @@ -383,11 +383,6 @@ protected: */ AccessibleShapeTreeInfo maShapeTreeInfo; - /** Index that is appended to the object's name to disambiguate between - different names with the otherwise same name. - */ - long mnIndex; - /** the index in parent. */ sal_Int32 m_nIndexInParent; diff --git a/include/svx/EnhancedCustomShape2d.hxx b/include/svx/EnhancedCustomShape2d.hxx index 87b21855aaf7..83e369901bab 100644 --- a/include/svx/EnhancedCustomShape2d.hxx +++ b/include/svx/EnhancedCustomShape2d.hxx @@ -113,7 +113,6 @@ class SVX_DLLPUBLIC EnhancedCustomShape2d : public SfxItemSet css::uno::Sequence< css::beans::PropertyValues > seqHandles; css::uno::Sequence< css::awt::Size > seqSubViewSize; - bool bTextFlow : 1; bool bFilled : 1; bool bStroked : 1; diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx index 5582973ce999..e2d332461d03 100644 --- a/include/svx/sidebar/AreaPropertyPanelBase.hxx +++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx @@ -109,7 +109,6 @@ public: protected: sal_uInt16 meLastXFS; - sal_Int32 mnLastPosGradient; sal_Int32 mnLastPosHatch; sal_Int32 mnLastPosBitmap; sal_Int32 mnLastPosPattern; diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx index c4c81118babf..031238accff4 100644 --- a/svx/source/accessibility/AccessibleControlShape.cxx +++ b/svx/source/accessibility/AccessibleControlShape.cxx @@ -473,7 +473,7 @@ void SAL_CALL AccessibleControlShape::modeChanged(const ModeChangeEvent& rSource // parent to replace this object with a new one. Disposing this // object and sending notifications about the replacement are in // the responsibility of our parent. - const bool bReplaced = mpParent->ReplaceChild(this, mxShape, mnIndex, maShapeTreeInfo); + const bool bReplaced = mpParent->ReplaceChild(this, mxShape, 0, maShapeTreeInfo); SAL_WARN_IF(!bReplaced, "sw.uno", "AccessibleControlShape::modeChanged: replacing ourselves away did fail"); } @@ -861,7 +861,7 @@ void SAL_CALL AccessibleControlShape::elementInserted( const css::container::Con // second, we need to replace ourself with a new version, which now can be based on the // control - OSL_VERIFY( mpParent->ReplaceChild ( this, mxShape, mnIndex, maShapeTreeInfo ) ); + OSL_VERIFY( mpParent->ReplaceChild ( this, mxShape, 0, maShapeTreeInfo ) ); } } diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index d897bbb00565..90783f13089f 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -703,7 +703,6 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : nXRef ( 0x80000000 ), nYRef ( 0x80000000 ), nColorData ( 0 ), - bTextFlow ( false ), bFilled ( static_cast<const XFillStyleItem&>(pAObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue() != drawing::FillStyle_NONE ), bStroked ( static_cast<const XLineStyleItem&>(pAObj->GetMergedItem( XATTR_LINESTYLE )).GetValue() != drawing::LineStyle_NONE ), bFlipH ( false ), @@ -1105,8 +1104,6 @@ tools::Rectangle EnhancedCustomShape2d::GetTextRect() const if ( !nSize ) return aLogicRect; nIndex = 0; - if ( bTextFlow && ( nSize > 1 ) ) - nIndex++; Point aTopLeft( GetPoint( seqTextFrames[ nIndex ].TopLeft, !bOOXMLShape, true ) ); Point aBottomRight( GetPoint( seqTextFrames[ nIndex ].BottomRight, !bOOXMLShape, true ) ); if ( bFlipH ) diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index 02c9493b9d86..894fadc00a25 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -229,7 +229,6 @@ FrameSelectorImpl::FrameSelectorImpl( FrameSelector& rFrameSel ) : mbBLTR( false ), mbFullRepaint( true ), mbAutoSelect( true ), - mbClicked( false ), mbHCMode( false ), maChildVec( 8 ) { @@ -1127,7 +1126,7 @@ void FrameSelector::MouseButtonDown( const MouseEvent& rMEvt ) /* If frame borders are set to "don't care" and the control does not support this state, hide them on first mouse click. DR 2004-01-30: Why are the borders set to "don't care" then?!? */ - bool bHideDontCare = !mxImpl->mbClicked && !SupportsDontCareState(); + bool bHideDontCare = !SupportsDontCareState(); for( FrameBorderIter aIt( mxImpl->maEnabBorders ); aIt.Is(); ++aIt ) { diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index ffa434938cae..a81783be56bd 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -129,7 +129,6 @@ namespace svxform ,m_aTimerCounter( DROP_ACTION_TIMER_INITIAL_TICKS ) ,m_bDragDataDirty(false) ,m_bPrevSelectionMixed(false) - ,m_bMarkingObjects(false) ,m_bRootSelected(false) ,m_bInitialUpdate(true) ,m_bKeyboardCut( false ) @@ -588,10 +587,8 @@ namespace svxform m_pRootEntry = InsertEntry( SvxResId(RID_STR_FORMS), aRootImage, aRootImage, nullptr, false, 0 ); } - else if (!m_bMarkingObjects && dynamic_cast<const FmNavRequestSelectHint*>(&rHint)) - { // if m_bMarkingObjects is sal_True, I mark objects myself - // and because of the synchronous mechanism, its exactly the hint, - // which was triggered by myself, and thus can be ignored + else if (dynamic_cast<const FmNavRequestSelectHint*>(&rHint)) + { FmNavRequestSelectHint* pershHint = const_cast<FmNavRequestSelectHint*>(static_cast<const FmNavRequestSelectHint*>(&rHint)); FmEntryDataArray& arredToSelect = pershHint->GetItems(); SynchronizeSelection(arredToSelect); diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx index fc6b0c09a367..f7be4afc3ddc 100644 --- a/svx/source/inc/fmexpl.hxx +++ b/svx/source/inc/fmexpl.hxx @@ -407,7 +407,6 @@ namespace svxform bool m_bDragDataDirty : 1; // ditto bool m_bPrevSelectionMixed : 1; - bool m_bMarkingObjects : 1; // if this is sal_True, I do not need to react to the RequestSelectHints bool m_bRootSelected : 1; bool m_bInitialUpdate : 1; // am I the first time in the UpdateContent? bool m_bKeyboardCut : 1; diff --git a/svx/source/inc/frmselimpl.hxx b/svx/source/inc/frmselimpl.hxx index 736a81dd2644..7e2e73b8238a 100644 --- a/svx/source/inc/frmselimpl.hxx +++ b/svx/source/inc/frmselimpl.hxx @@ -135,7 +135,6 @@ struct FrameSelectorImpl bool mbBLTR; /// true = Bottom-left to top-right frame border enabled. bool mbFullRepaint; /// Used for repainting (false = only copy virtual device). bool mbAutoSelect; /// true = Auto select a frame border, if focus reaches control. - bool mbClicked; /// true = The control has been clicked at least one time. bool mbHCMode; /// true = High contrast mode. rtl::Reference<a11y::AccFrameSelector> mxAccess; /// Pointer to accessibility object of the control. diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index 065b656cdb5a..464189990860 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -69,7 +69,6 @@ AreaPropertyPanelBase::AreaPropertyPanelBase( const css::uno::Reference<css::frame::XFrame>& rxFrame) : PanelLayout(pParent, "AreaPropertyPanel", "svx/ui/sidebararea.ui", rxFrame), meLastXFS(static_cast<sal_uInt16>(-1)), - mnLastPosGradient(0), mnLastPosHatch(0), mnLastPosBitmap(0), mnLastPosPattern(0), @@ -304,25 +303,22 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox&, void) mpMTRAngle->Enable(); mpLbFillAttr->Clear(); - if (LISTBOX_ENTRY_NOTFOUND != mnLastPosGradient) + const SvxGradientListItem aItem(*static_cast<const SvxGradientListItem*>(pSh->GetItem(SID_GRADIENT_LIST))); + + if(0 < aItem.GetGradientList()->Count()) { - const SvxGradientListItem aItem(*static_cast<const SvxGradientListItem*>(pSh->GetItem(SID_GRADIENT_LIST))); + const XGradient aGradient = aItem.GetGradientList()->GetGradient(0)->GetGradient(); + const XFillGradientItem aXFillGradientItem(aGradient); - if(mnLastPosGradient < aItem.GetGradientList()->Count()) - { - const XGradient aGradient = aItem.GetGradientList()->GetGradient(mnLastPosGradient)->GetGradient(); - const XFillGradientItem aXFillGradientItem(aGradient); - - // #i122676# change FillStyle and Gradient in one call - XFillStyleItem aXFillStyleItem(drawing::FillStyle_GRADIENT); - setFillStyleAndGradient(&aXFillStyleItem, aXFillGradientItem); - mpLbFillGradFrom->SelectEntry(aGradient.GetStartColor()); - mpLbFillGradTo->SelectEntry(aGradient.GetEndColor()); - - mpMTRAngle->SetValue(aGradient.GetAngle() / 10); - css::awt::GradientStyle eXGS = aGradient.GetGradientStyle(); - mpGradientStyle->SelectEntryPos(sal::static_int_cast< sal_Int32 >( eXGS )); - } + // #i122676# change FillStyle and Gradient in one call + XFillStyleItem aXFillStyleItem(drawing::FillStyle_GRADIENT); + setFillStyleAndGradient(&aXFillStyleItem, aXFillGradientItem); + mpLbFillGradFrom->SelectEntry(aGradient.GetStartColor()); + mpLbFillGradTo->SelectEntry(aGradient.GetEndColor()); + + mpMTRAngle->SetValue(aGradient.GetAngle() / 10); + css::awt::GradientStyle eXGS = aGradient.GetGradientStyle(); + mpGradientStyle->SelectEntryPos(sal::static_int_cast< sal_Int32 >( eXGS )); } break; } diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index c93dc7d34c05..cfb3cbb9499a 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -90,7 +90,6 @@ private: css::uno::Reference< css::linguistic2::XLinguServiceManager2 > m_xLinguServiceManager; Point maTextOffset; bool mbDataValid; - bool mbDestroyed; bool mbIsLocked; bool mbNeedsUpdate; bool mbOldUndoMode; @@ -164,7 +163,6 @@ SvxTextEditSourceImpl::SvxTextEditSourceImpl( SdrObject* pObject, SdrText* pText mpTextForwarder ( nullptr ), mpViewForwarder ( nullptr ), mbDataValid ( false ), - mbDestroyed ( false ), mbIsLocked ( false ), mbNeedsUpdate ( false ), mbOldUndoMode ( false ), @@ -201,7 +199,6 @@ SvxTextEditSourceImpl::SvxTextEditSourceImpl( SdrObject& rObject, SdrText* pText mpTextForwarder ( nullptr ), mpViewForwarder ( nullptr ), mbDataValid ( false ), - mbDestroyed ( false ), mbIsLocked ( false ), mbNeedsUpdate ( false ), mbOldUndoMode ( false ), @@ -704,7 +701,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetEditModeTextForwarder() SvxTextForwarder* SvxTextEditSourceImpl::GetTextForwarder() { - if( mbDestroyed || mpObject == nullptr ) + if( mpObject == nullptr ) return nullptr; if( mpModel == nullptr ) @@ -758,7 +755,7 @@ SvxDrawOutlinerViewForwarder* SvxTextEditSourceImpl::CreateViewForwarder() SvxEditViewForwarder* SvxTextEditSourceImpl::GetEditViewForwarder( bool bCreate ) { - if( mbDestroyed || mpObject == nullptr ) + if( mpObject == nullptr ) return nullptr; if( mpModel == nullptr ) @@ -833,7 +830,7 @@ void SvxTextEditSourceImpl::UpdateData() } else { - if( mpOutliner && mpObject && mpText && !mbDestroyed ) + if( mpOutliner && mpObject && mpText ) { SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( mpObject ); if( pTextObj ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits