summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-04 11:17:25 +0200
committerNoel Grandin <noel@peralex.com>2015-03-19 10:45:01 +0200
commitc97ccd3b3635a53e6bdc07b83c9bf8666b66000a (patch)
treed52bb0c6d93c0913375fdbd8eb6d36bbae3abbfe /svx
parent2ebd79b3d214c62c0997606115ebc50700d6a760 (diff)
loplugin:constantfunction: svx
Change-Id: Ib8c3599d245fbc371d00f28d812138b26c3f706d
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svdibrow.hxx1
-rw-r--r--svx/source/accessibility/svxrectctaccessiblecontext.cxx8
-rw-r--r--svx/source/dialog/fontwork.cxx4
-rw-r--r--svx/source/dialog/hdft.cxx19
-rw-r--r--svx/source/form/datanavi.cxx17
-rw-r--r--svx/source/inc/datanavi.hxx1
-rw-r--r--svx/source/inc/svxrectctaccessiblecontext.hxx3
-rw-r--r--svx/source/sdr/contact/viewcontact.cxx23
-rw-r--r--svx/source/sdr/properties/attributeproperties.cxx4
-rw-r--r--svx/source/svdraw/svdfmtf.cxx12
-rw-r--r--svx/source/svdraw/svdfmtf.hxx2
-rw-r--r--svx/source/svdraw/svdglev.cxx5
-rw-r--r--svx/source/svdraw/svdobj.cxx81
-rw-r--r--svx/source/svdraw/svdpntv.cxx1
-rw-r--r--svx/source/svdraw/svdtrans.cxx2
15 files changed, 23 insertions, 160 deletions
diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx
index 8c154edd1542..2e44db53db50 100644
--- a/svx/inc/svdibrow.hxx
+++ b/svx/inc/svdibrow.hxx
@@ -107,7 +107,6 @@ public:
virtual void GetFocus() SAL_OVERRIDE;
void Clear() { aBrowse.Clear(); }
void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* p2ndSet=NULL) { aBrowse.SetAttributes(pAttr,p2ndSet); }
- void SetFloatingMode(bool /*bOn*/) {}
const _SdrItemBrowserControl& GetBrowserControl() const { return aBrowse; }
_SdrItemBrowserControl& GetBrowserControl() { return aBrowse; }
};
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index bd6a3393894e..16c07cd9d06b 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -234,11 +234,6 @@ awt::Size SAL_CALL SvxRectCtlAccessibleContext::getSize() throw( RuntimeExceptio
return AWTSize( GetBoundingBox().GetSize() );
}
-bool SAL_CALL SvxRectCtlAccessibleContext::isShowing() throw( RuntimeException )
-{
- return true;
-}
-
bool SAL_CALL SvxRectCtlAccessibleContext::isVisible() throw( RuntimeException )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -387,8 +382,7 @@ Reference< XAccessibleStateSet > SAL_CALL SvxRectCtlAccessibleContext::getAccess
pStateSetHelper->AddState( AccessibleStateType::FOCUSED );
pStateSetHelper->AddState( AccessibleStateType::OPAQUE );
- if( isShowing() )
- pStateSetHelper->AddState( AccessibleStateType::SHOWING );
+ pStateSetHelper->AddState( AccessibleStateType::SHOWING );
if( isVisible() )
pStateSetHelper->AddState( AccessibleStateType::VISIBLE );
diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx
index a566a9de59dd..2f4df736ca92 100644
--- a/svx/source/dialog/fontwork.cxx
+++ b/svx/source/dialog/fontwork.cxx
@@ -800,10 +800,6 @@ void SvxFontWorkDialog::SetColorList(const XColorListRef &pList)
}
}
-void SvxFontWorkDialog::SetActive(bool /*bActivate*/)
-{
-}
-
void SvxFontWorkDialog::ApplyImageList()
{
if (nLastShadowTbxId == nShadowSlantId)
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index cacc9e8c107d..ab4be910413a 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -62,7 +62,7 @@ static const long MINBODY = 56; // 1mm in twips rounded
static const long DEF_DIST_WRITER = 500; // 5mm (Writer)
static const long DEF_DIST_CALC = 250; // 2.5mm (Calc)
-static const sal_uInt16 pRanges[] =
+const sal_uInt16 SvxHFPage::pRanges[] =
{
SID_ATTR_BRUSH, SID_ATTR_BRUSH,
@@ -115,16 +115,6 @@ namespace svx {
}
}
-// returns the Which values to the range
-
-
-const sal_uInt16* SvxHeaderPage::GetRanges()
-{
- return pRanges;
-}
-
-
-
SfxTabPage* SvxHeaderPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
return new SvxHeaderPage( pParent, *rSet );
@@ -132,13 +122,6 @@ SfxTabPage* SvxHeaderPage::Create( vcl::Window* pParent, const SfxItemSet* rSet
-const sal_uInt16* SvxFooterPage::GetRanges()
-{
- return pRanges;
-}
-
-
-
SfxTabPage* SvxFooterPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
return new SvxFooterPage( pParent, *rSet );
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 1b2f7738e66d..74f7c37d9d2c 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -2150,24 +2150,10 @@ namespace svxform
}
- void DataNavigator::Update( FmFormShell* /*pFormShell*/ )
+ void DataNavigator::StateChanged( sal_uInt16 , SfxItemState , const SfxPoolItem* )
{
}
- void DataNavigator::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
- {
- if ( !pState || SID_FM_DATANAVIGATOR_CONTROL != nSID )
- return;
-
- if ( eState >= SfxItemState::DEFAULT )
- {
- FmFormShell* pShell = PTR_CAST( FmFormShell, static_cast<const SfxObjectItem*>(pState)->GetShell() );
- Update( pShell );
- }
- else
- Update( NULL );
- }
-
void DataNavigator::GetFocus()
{
@@ -2177,7 +2163,6 @@ namespace svxform
bool DataNavigator::Close()
{
- Update( NULL );
return SfxDockingWindow::Close();
}
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index 14e456a68cd7..49bb1e3b2510 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -404,7 +404,6 @@ namespace svxform
using Window::Update;
using SfxDockingWindow::StateChanged;
- void Update( FmFormShell* pFormShell );
void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState ) SAL_OVERRIDE;
};
diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx
index e4091b9005fb..2ef95908230d 100644
--- a/svx/source/inc/svxrectctaccessiblecontext.hxx
+++ b/svx/source/inc/svxrectctaccessiblecontext.hxx
@@ -105,9 +105,6 @@ public:
getSize() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
bool SAL_CALL
- isShowing() throw( ::com::sun::star::uno::RuntimeException );
-
- bool SAL_CALL
isVisible() throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL
diff --git a/svx/source/sdr/contact/viewcontact.cxx b/svx/source/sdr/contact/viewcontact.cxx
index 39053e8be4a9..21062b218d23 100644
--- a/svx/source/sdr/contact/viewcontact.cxx
+++ b/svx/source/sdr/contact/viewcontact.cxx
@@ -44,17 +44,6 @@ ViewContact::ViewContact()
{
}
-// Methods to react on start getting viewed or stop getting
-// viewed. This info is derived from the count of members of
-// registered ViewObjectContacts. Default does nothing.
-void ViewContact::StartGettingViewed()
-{
-}
-
-void ViewContact::StopGettingViewed()
-{
-}
-
ViewContact::~ViewContact()
{
deleteAllVOCs();
@@ -118,11 +107,6 @@ ViewObjectContact& ViewContact::GetViewObjectContact(ObjectContact& rObjectConta
void ViewContact::AddViewObjectContact(ViewObjectContact& rVOContact)
{
maViewObjectContactVector.push_back(&rVOContact);
-
- if(1L == maViewObjectContactVector.size())
- {
- StartGettingViewed();
- }
}
// A ViewObjectContact was deleted and shall be forgotten.
@@ -133,13 +117,6 @@ void ViewContact::RemoveViewObjectContact(ViewObjectContact& rVOContact)
if(aFindResult != maViewObjectContactVector.end())
{
maViewObjectContactVector.erase(aFindResult);
-
- if(maViewObjectContactVector.empty())
- {
- // This may need to get asynchron later since it eventually triggers
- // deletes of OCs where the VOC is still added.
- StopGettingViewed();
- }
}
}
diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx
index 33ca83a0c9a9..978a4f5d09d7 100644
--- a/svx/source/sdr/properties/attributeproperties.cxx
+++ b/svx/source/sdr/properties/attributeproperties.cxx
@@ -309,7 +309,7 @@ namespace sdr
void AttributeProperties::SetModel(SdrModel* pOldModel, SdrModel* pNewModel)
{
- if(pOldModel != pNewModel && pNewModel && !pNewModel->IsLoading())
+ if(pOldModel != pNewModel && pNewModel)
{
// For a living model move the items from one pool to the other
if(pOldModel)
@@ -466,7 +466,7 @@ namespace sdr
}
// each object gets the default Style if there is none set yet.
- if(!GetStyleSheet() && pNewModel && !pNewModel->IsLoading())
+ if(!GetStyleSheet() && pNewModel)
{
GetObjectItemSet(); // #118414 force ItemSet to allow style to be set
SetStyleSheet(pNewModel->GetDefaultStyleSheet(), true);
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index d441a8e6f9d0..70734e9be2d7 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -138,8 +138,8 @@ void ImpSdrGDIMetaFileImport::DoLoopActions(GDIMetaFile& rMtf, SvdProgressInfo*
switch (pAct->GetType())
{
- case META_PIXEL_ACTION : DoAction(static_cast<MetaPixelAction &>(*pAct)); break;
- case META_POINT_ACTION : DoAction(static_cast<MetaPointAction &>(*pAct)); break;
+ case META_PIXEL_ACTION : break;
+ case META_POINT_ACTION : break;
case META_LINE_ACTION : DoAction(static_cast<MetaLineAction &>(*pAct)); break;
case META_RECT_ACTION : DoAction(static_cast<MetaRectAction &>(*pAct)); break;
case META_ROUNDRECT_ACTION : DoAction(static_cast<MetaRoundRectAction &>(*pAct)); break;
@@ -670,14 +670,6 @@ void ImpSdrGDIMetaFileImport::InsertObj(SdrObject* pObj, bool bScale)
}
}
-void ImpSdrGDIMetaFileImport::DoAction(MetaPixelAction& /*rAct*/) const
-{
-}
-
-void ImpSdrGDIMetaFileImport::DoAction(MetaPointAction& /*rAct*/) const
-{
-}
-
void ImpSdrGDIMetaFileImport::DoAction(MetaLineAction& rAct)
{
// #i73407# reformulation to use new B2DPolygon classes
diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx
index 5494b1f3c3c1..3e317feed5ac 100644
--- a/svx/source/svdraw/svdfmtf.hxx
+++ b/svx/source/svdraw/svdfmtf.hxx
@@ -86,8 +86,6 @@ protected:
bool isClip() const;
// actions
- void DoAction(MetaPixelAction & rAct) const;
- void DoAction(MetaPointAction & rAct) const;
void DoAction(MetaLineAction & rAct);
void DoAction(MetaRectAction & rAct);
void DoAction(MetaRoundRectAction & rAct);
diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx
index 03f94abe8fa9..3b063f1af611 100644
--- a/svx/source/svdraw/svdglev.cxx
+++ b/svx/source/svdraw/svdglev.cxx
@@ -31,14 +31,9 @@
-void SdrGlueEditView::ImpClearVars()
-{
-}
-
SdrGlueEditView::SdrGlueEditView(SdrModel* pModel1, OutputDevice* pOut):
SdrPolyEditView(pModel1,pOut)
{
- ImpClearVars();
}
SdrGlueEditView::~SdrGlueEditView()
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 269514b16697..9897ad87ab22 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -179,11 +179,6 @@ SdrObjUserData::~SdrObjUserData() {}
-bool SdrObjUserData::HasMacro(const SdrObject* /*pObj*/) const
-{
- return false;
-}
-
SdrObject* SdrObjUserData::CheckMacroHit(const SdrObjMacroHitRec& rRec, const SdrObject* pObj) const
{
if(pObj)
@@ -223,11 +218,6 @@ void SdrObjUserData::PaintMacro(OutputDevice& rOut, const Rectangle& /*rDirtyRec
rOut.SetRasterOp(eRop);
}
-bool SdrObjUserData::DoMacro(const SdrObjMacroHitRec& /*rRec*/, SdrObject* /*pObj*/)
-{
- return false;
-}
-
OUString SdrObjUserData::GetMacroPopupComment(const SdrObjMacroHitRec& /*rRec*/, const SdrObject* /*pObj*/) const
{
return OUString();
@@ -1883,33 +1873,13 @@ void SdrObject::BurnInStyleSheetAttributes()
GetProperties().ForceStyleToHardAttributes();
}
-SdrObjUserData* SdrObject::ImpGetMacroUserData() const
-{
- SdrObjUserData* pData=NULL;
- sal_uInt16 nCount=GetUserDataCount();
- for (sal_uInt16 nNum=nCount; nNum>0 && pData==NULL;) {
- nNum--;
- pData=GetUserData(nNum);
- if (!pData->HasMacro(this)) pData=NULL;
- }
- return pData;
-}
-
bool SdrObject::HasMacro() const
{
- SdrObjUserData* pData=ImpGetMacroUserData();
- return pData && pData->HasMacro(this);
+ return false;
}
SdrObject* SdrObject::CheckMacroHit(const SdrObjMacroHitRec& rRec) const
{
- SdrObjUserData* pData = ImpGetMacroUserData();
-
- if(pData)
- {
- return pData->CheckMacroHit(rRec, this);
- }
-
if(rRec.pPageView)
{
return SdrObjectPrimitiveHit(*this, rRec.aPos, rRec.nTol, *rRec.pPageView, rRec.pVisiLayer, false);
@@ -1918,57 +1888,36 @@ SdrObject* SdrObject::CheckMacroHit(const SdrObjMacroHitRec& rRec) const
return 0;
}
-Pointer SdrObject::GetMacroPointer(const SdrObjMacroHitRec& rRec) const
+Pointer SdrObject::GetMacroPointer(const SdrObjMacroHitRec&) const
{
- SdrObjUserData* pData=ImpGetMacroUserData();
- if (pData!=NULL) {
- return pData->GetMacroPointer(rRec,this);
- }
return Pointer(POINTER_REFHAND);
}
-void SdrObject::PaintMacro(OutputDevice& rOut, const Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const
+void SdrObject::PaintMacro(OutputDevice& rOut, const Rectangle& , const SdrObjMacroHitRec& ) const
{
- SdrObjUserData* pData=ImpGetMacroUserData();
+ const RasterOp eRop(rOut.GetRasterOp());
+ const basegfx::B2DPolyPolygon aPolyPolygon(TakeXorPoly());
+ const sal_uInt32 nCount(aPolyPolygon.count());
- if(pData)
+ rOut.SetLineColor(COL_BLACK);
+ rOut.SetFillColor();
+ rOut.SetRasterOp(ROP_INVERT);
+
+ for(sal_uInt32 a(0); a < nCount; a++)
{
- pData->PaintMacro(rOut,rDirtyRect,rRec,this);
+ rOut.DrawPolyLine(aPolyPolygon.getB2DPolygon(a));
}
- else
- {
- const RasterOp eRop(rOut.GetRasterOp());
- const basegfx::B2DPolyPolygon aPolyPolygon(TakeXorPoly());
- const sal_uInt32 nCount(aPolyPolygon.count());
-
- rOut.SetLineColor(COL_BLACK);
- rOut.SetFillColor();
- rOut.SetRasterOp(ROP_INVERT);
-
- for(sal_uInt32 a(0); a < nCount; a++)
- {
- rOut.DrawPolyLine(aPolyPolygon.getB2DPolygon(a));
- }
- rOut.SetRasterOp(eRop);
- }
+ rOut.SetRasterOp(eRop);
}
-bool SdrObject::DoMacro(const SdrObjMacroHitRec& rRec)
+bool SdrObject::DoMacro(const SdrObjMacroHitRec&)
{
- SdrObjUserData* pData=ImpGetMacroUserData();
- if (pData!=NULL) {
- return pData->DoMacro(rRec,this);
- }
return false;
}
-OUString SdrObject::GetMacroPopupComment(const SdrObjMacroHitRec& rRec) const
+OUString SdrObject::GetMacroPopupComment(const SdrObjMacroHitRec&) const
{
- SdrObjUserData* pData=ImpGetMacroUserData();
- if (pData!=NULL) {
- return pData->GetMacroPopupComment(rRec,this);
- }
return OUString();
}
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 982327c8b057..907ec59116d3 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -1128,7 +1128,6 @@ void SdrPaintView::ShowItemBrowser(bool bShow)
if (bShow) {
if (pItemBrowser==NULL) {
pItemBrowser=new SdrItemBrowser(*static_cast<SdrView*>(this));
- pItemBrowser->SetFloatingMode(true);
}
pItemBrowser->Show();
pItemBrowser->GrabFocus();
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index 1cb007867eee..e95b56aa5669 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -860,7 +860,7 @@ void SdrFormatter::TakeStr(long nVal, OUString& rStr) const
// decimal separator necessary
sal_Int32 nCount(nC - aStr.getLength());
- if(nCount >= 0 && rLoc.isNumLeadingZero())
+ if(nCount >= 0 && LocaleDataWrapper::isNumLeadingZero())
nCount++;
for(sal_Int32 i=0; i<nCount; i++)