summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-04-04 15:33:20 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-04-04 17:13:21 +0100
commit1a3c99f2c31dbc4dd6b3b5788ea0b49a34bea2c6 (patch)
treea2be3e4b33ed214e331b013983643fc8cd488cbf /vcl
parent9f1be6c65210e600baee5c63480df58e8b8ce7b1 (diff)
callcatcher: update unusedcode
mostly changed due to loplugin:constantfunction Change-Id: Ib677c78db256f8032a99b3f02a3e363fee68ebcc
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/impvect.cxx36
-rw-r--r--vcl/source/gdi/impvect.hxx28
-rw-r--r--vcl/source/window/menu.cxx11
-rw-r--r--vcl/source/window/toolbox2.cxx12
4 files changed, 31 insertions, 56 deletions
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index d5435efdb58c..9a71a241fd65 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -46,6 +46,18 @@
if(_def_pProgress&&_def_pProgress->IsSet()) \
(_def_pProgress->Call(reinterpret_cast<void*>(_def_nVal)));
+class ImplVectMap;
+class ImplChain;
+
+namespace ImplVectorizer
+{
+ ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor );
+ void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uLong nFlags );
+ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain );
+ bool ImplIsUp( ImplVectMap* pMap, long nY, long nX );
+ void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly );
+}
+
struct ChainMove { long nDX; long nDY; };
static const ChainMove aImplMove[ 8 ] = {
@@ -619,15 +631,9 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr )
aNewArr2.ImplCreatePoly( maPoly );
}
-ImplVectorizer::ImplVectorizer()
-{
-}
+namespace ImplVectorizer {
-ImplVectorizer::~ImplVectorizer()
-{
-}
-
-bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
+bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress )
{
bool bRet = false;
@@ -729,7 +735,7 @@ bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
return bRet;
}
-bool ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
+bool ImplVectorize( const Bitmap& rMonoBmp,
tools::PolyPolygon& rPolyPoly,
sal_uLong nFlags, const Link* pProgress )
{
@@ -823,7 +829,7 @@ bool ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
return bRet;
}
-void ImplVectorizer::ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly )
+void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly )
{
if( rPolyPoly.Count() > VECT_POLY_MAX )
{
@@ -855,7 +861,7 @@ void ImplVectorizer::ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly )
}
}
-ImplVectMap* ImplVectorizer::ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor )
+ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor )
{
ImplVectMap* pMap = NULL;
@@ -942,7 +948,7 @@ ImplVectMap* ImplVectorizer::ImplExpand( BitmapReadAccess* pRAcc, const Color& r
return pMap;
}
-void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uLong nFlags )
+void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uLong nFlags )
{
const long nWidth = pMap->Width(), nHeight= pMap->Height();
@@ -1009,7 +1015,7 @@ void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPoly
}
}
-bool ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain )
+bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain )
{
long nActX = rStartPt.X();
long nActY = rStartPt.Y();
@@ -1059,7 +1065,7 @@ bool ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, Im
return true;
}
-bool ImplVectorizer::ImplIsUp( ImplVectMap* pMap, long nY, long nX )
+bool ImplIsUp( ImplVectMap* pMap, long nY, long nX )
{
if( pMap->IsDone( nY - 1L, nX ) )
return true;
@@ -1071,4 +1077,6 @@ bool ImplVectorizer::ImplIsUp( ImplVectMap* pMap, long nY, long nX )
return false;
}
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/impvect.hxx b/vcl/source/gdi/impvect.hxx
index 0051bef68bab..4e1ec38b7b17 100644
--- a/vcl/source/gdi/impvect.hxx
+++ b/vcl/source/gdi/impvect.hxx
@@ -24,30 +24,12 @@
#include <vcl/gdimtf.hxx>
// - Vectorizer -
-
-class BitmapReadAccess;
-class ImplChain;
-class ImplVectMap;
-
-class ImplVectorizer
+namespace ImplVectorizer
{
-private:
-
- static ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor );
- static void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uLong nFlags );
- static bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain );
- static bool ImplIsUp( ImplVectMap* pMap, long nY, long nX );
- static void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly );
-
-public:
-
- ImplVectorizer();
- ~ImplVectorizer();
-
- static bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
- sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress );
- static bool ImplVectorize( const Bitmap& rMonoBmp, tools::PolyPolygon& rPolyPoly,
- sal_uLong nFlags, const Link* pProgress );
+ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
+ sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress );
+ bool ImplVectorize( const Bitmap& rMonoBmp, tools::PolyPolygon& rPolyPoly,
+ sal_uLong nFlags, const Link* pProgress );
};
#endif
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index b1cc88b06c87..d32c86f3f07c 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -3154,21 +3154,18 @@ ImplMenuDelData::~ImplMenuDelData()
const_cast< Menu* >( mpMenu )->ImplRemoveDel( *this );
}
-namespace vcl
-{
- MenuInvalidator::MenuInvalidator() {};
-
+namespace vcl { namespace MenuInvalidator {
static VclEventListeners2* pMenuInvalidateListeners = NULL;
- VclEventListeners2* MenuInvalidator::GetMenuInvalidateListeners()
+ VclEventListeners2* GetMenuInvalidateListeners()
{
if(!pMenuInvalidateListeners)
pMenuInvalidateListeners = new VclEventListeners2();
return pMenuInvalidateListeners;
}
- void MenuInvalidator::Invalidated()
+ void Invalidated()
{
VclSimpleEvent aEvent(0);
GetMenuInvalidateListeners()->callListeners(&aEvent);
};
-}
+} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 7fbdb39ddbd3..2c9a9d0eda9e 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1022,18 +1022,6 @@ Rectangle ToolBox::GetItemPosRect( sal_uInt16 nPos ) const
return Rectangle();
}
-Size ToolBox::GetItemContentSize( sal_uInt16 nItemId ) const
-{
- if ( mbCalc || mbFormat )
- const_cast<ToolBox*>(this)->ImplFormat();
-
- sal_uInt16 nPos = GetItemPos( nItemId );
- if ( nPos < mpData->m_aItems.size() )
- return mpData->m_aItems[nPos].maContentSize;
- else
- return Size();
-}
-
bool ToolBox::ImplHasExternalMenubutton()
{
// check if the borderwindow (i.e. the decoration) provides the menu button