summaryrefslogtreecommitdiff
path: root/sdext/source/minimizer
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-21 15:21:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-21 15:21:16 +0100
commit7c704c78d3c652504c064b4ac7af55a2c1ee49bb (patch)
tree623358cf25839219ef4fd90eea4f3eaa55389a1f /sdext/source/minimizer
parent0d5167915b47df7c3e450614ea50d845ba959df3 (diff)
Removed some unused parameters; added SAL_UNUSED_PARAMETER.
SAL_UNUSED_PARAMETER (expanding to __attribute__ ((unused)) for GCC) is used to annotate legitimately unused parameters, so that static analysis tools can tell legitimately unused parameters from truly unnecessary ones. To that end, some patches for external modules are also added, that are only applied when compiling with GCC and add necessary __attribute__ ((unused)) in headers.
Diffstat (limited to 'sdext/source/minimizer')
-rw-r--r--sdext/source/minimizer/graphiccollector.cxx10
-rw-r--r--sdext/source/minimizer/pppoptimizeruno.cxx7
2 files changed, 10 insertions, 7 deletions
diff --git a/sdext/source/minimizer/graphiccollector.cxx b/sdext/source/minimizer/graphiccollector.cxx
index d6c76abd6275..3832af5df407 100644
--- a/sdext/source/minimizer/graphiccollector.cxx
+++ b/sdext/source/minimizer/graphiccollector.cxx
@@ -391,8 +391,8 @@ void ImpCountGraphicObjects( const Reference< XComponentContext >& rxMSF, const
}
}
-void ImpCountBackgroundGraphic( const Reference< XComponentContext >& /* rxMSF */, const Reference< XDrawPage >& rxDrawPage,
- const GraphicSettings& /* rGraphicSettings */, sal_Int32& rnGraphics )
+void ImpCountBackgroundGraphic(
+ const Reference< XDrawPage >& rxDrawPage, sal_Int32& rnGraphics )
{
try
{
@@ -430,13 +430,13 @@ void GraphicCollector::CountGraphics( const Reference< XComponentContext >& rxMS
for ( i = 0; i < xDrawPages->getCount(); i++ )
{
Reference< XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), UNO_QUERY_THROW );
- ImpCountBackgroundGraphic( rxMSF, xDrawPage, rGraphicSettings, rnGraphics );
+ ImpCountBackgroundGraphic( xDrawPage, rnGraphics );
Reference< XShapes > xDrawShapes( xDrawPage, UNO_QUERY_THROW );
ImpCountGraphicObjects( rxMSF, xDrawShapes, rGraphicSettings, rnGraphics );
Reference< XPresentationPage > xPresentationPage( xDrawPage, UNO_QUERY_THROW );
Reference< XDrawPage > xNotesPage( xPresentationPage->getNotesPage() );
- ImpCountBackgroundGraphic( rxMSF, xNotesPage, rGraphicSettings, rnGraphics );
+ ImpCountBackgroundGraphic( xNotesPage, rnGraphics );
Reference< XShapes > xNotesShapes( xNotesPage, UNO_QUERY_THROW );
ImpCountGraphicObjects( rxMSF, xNotesShapes, rGraphicSettings, rnGraphics );
}
@@ -445,7 +445,7 @@ void GraphicCollector::CountGraphics( const Reference< XComponentContext >& rxMS
for ( i = 0; i < xMasterPages->getCount(); i++ )
{
Reference< XDrawPage > xMasterPage( xMasterPages->getByIndex( i ), UNO_QUERY_THROW );
- ImpCountBackgroundGraphic( rxMSF, xMasterPage, rGraphicSettings, rnGraphics );
+ ImpCountBackgroundGraphic( xMasterPage, rnGraphics );
Reference< XShapes > xMasterPageShapes( xMasterPage, UNO_QUERY_THROW );
ImpCountGraphicObjects( rxMSF, xMasterPageShapes, rGraphicSettings, rnGraphics );
}
diff --git a/sdext/source/minimizer/pppoptimizeruno.cxx b/sdext/source/minimizer/pppoptimizeruno.cxx
index 6430c2c3e260..cc3fd3584727 100644
--- a/sdext/source/minimizer/pppoptimizeruno.cxx
+++ b/sdext/source/minimizer/pppoptimizeruno.cxx
@@ -42,7 +42,8 @@ using namespace ::com::sun::star::registry;
extern "C"
{
- sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey )
+ sal_Bool SAL_CALL component_writeInfo(
+ SAL_UNUSED_PARAMETER void* /*pServiceManager*/, void* pRegistryKey )
{
if (pRegistryKey)
{
@@ -77,7 +78,9 @@ extern "C"
// -------------------------------------------------------------------------
- SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
+ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
+ const sal_Char * pImplName, void * pServiceManager,
+ SAL_UNUSED_PARAMETER void * /*pRegistryKey*/ )
{
OUString aImplName( OUString::createFromAscii( pImplName ) );
void* pRet = 0;