diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-20 15:06:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-21 08:38:06 +0200 |
commit | 7b59273c6c2bd10b9aea52753dc6b21052a9b2ed (patch) | |
tree | a8baf61493eba8cc63982861a3b8b2cfc68890a8 /svx | |
parent | 65c69af584152a5f8f3d2f9752d9f051660b7755 (diff) |
loplugin:unusedfields in svx
Change-Id: I7fc5bf55b01d464815771220914f21d8e85b5a36
Reviewed-on: https://gerrit.libreoffice.org/40253
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/AccessibleControlShape.cxx | 4 | ||||
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape2d.cxx | 3 | ||||
-rw-r--r-- | svx/source/dialog/frmsel.cxx | 3 | ||||
-rw-r--r-- | svx/source/form/navigatortree.cxx | 7 | ||||
-rw-r--r-- | svx/source/inc/fmexpl.hxx | 1 | ||||
-rw-r--r-- | svx/source/inc/frmselimpl.hxx | 1 | ||||
-rw-r--r-- | svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 32 | ||||
-rw-r--r-- | svx/source/unodraw/unoshtxt.cxx | 9 |
8 files changed, 22 insertions, 38 deletions
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 ) |