summaryrefslogtreecommitdiff
path: root/sdext
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
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')
-rw-r--r--sdext/source/minimizer/graphiccollector.cxx10
-rw-r--r--sdext/source/minimizer/pppoptimizeruno.cxx7
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfparse.cxx24
-rw-r--r--sdext/source/pdfimport/services.cxx7
-rw-r--r--sdext/source/pdfimport/tree/pdfiprocessor.cxx6
-rw-r--r--sdext/source/pdfimport/tree/pdfiprocessor.hxx2
-rw-r--r--sdext/source/presenter/PresenterNotesView.cxx3
-rw-r--r--sdext/source/presenter/PresenterTheme.cxx3
-rw-r--r--sdext/source/presenter/PresenterTheme.hxx3
9 files changed, 30 insertions, 35 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;
diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
index 1638f523485f..ccd33b430d77 100644
--- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
@@ -300,7 +300,7 @@ public:
return aStr.makeStringAndClear();
}
- void haveFile( iteratorT pBegin, iteratorT /*pEnd*/ )
+ void haveFile( iteratorT pBegin, SAL_UNUSED_PARAMETER iteratorT /*pEnd*/ )
{
if( m_aObjectStack.empty() )
{
@@ -387,7 +387,7 @@ public:
insertNewValue( new PDFName(iteratorToString(first,last)), first );
}
- void pushDouble( iteratorT first, iteratorT /*last*/ )
+ void pushDouble( iteratorT first, SAL_UNUSED_PARAMETER iteratorT /*last*/ )
{
insertNewValue( new PDFNumber(m_fDouble), first );
}
@@ -402,13 +402,13 @@ public:
insertNewValue( new PDFBool( (last-first == 4) ), first );
}
- void pushNull( iteratorT first, iteratorT )
+ void pushNull( iteratorT first, SAL_UNUSED_PARAMETER iteratorT )
{
insertNewValue( new PDFNull(), first );
}
- void beginObject( iteratorT first, iteratorT /*last*/ )
+ void beginObject( iteratorT first, SAL_UNUSED_PARAMETER iteratorT /*last*/ )
{
if( m_aObjectStack.empty() )
m_aObjectStack.push_back( new PDFPart() );
@@ -433,7 +433,7 @@ public:
parseError( "object in wrong place", first );
}
- void endObject( iteratorT first, iteratorT )
+ void endObject( iteratorT first, SAL_UNUSED_PARAMETER iteratorT )
{
if( m_aObjectStack.empty() )
parseError( "endobj without obj", first );
@@ -443,7 +443,7 @@ public:
m_aObjectStack.pop_back();
}
- void pushObjectRef( iteratorT first, iteratorT )
+ void pushObjectRef( iteratorT first, SAL_UNUSED_PARAMETER iteratorT )
{
unsigned int nGeneration = m_aUIntStack.back();
m_aUIntStack.pop_back();
@@ -452,7 +452,7 @@ public:
insertNewValue( new PDFObjectRef(nObject,nGeneration), first );
}
- void beginDict( iteratorT first, iteratorT )
+ void beginDict( iteratorT first, SAL_UNUSED_PARAMETER iteratorT )
{
PDFDict* pDict = new PDFDict();
pDict->m_nOffset = first - m_aGlobalBegin;
@@ -461,7 +461,7 @@ public:
// will not come here if insertion fails (exception)
m_aObjectStack.push_back( pDict );
}
- void endDict( iteratorT first, iteratorT )
+ void endDict( iteratorT first, SAL_UNUSED_PARAMETER iteratorT )
{
PDFDict* pDict = NULL;
if( m_aObjectStack.empty() )
@@ -482,7 +482,7 @@ public:
}
}
- void beginArray( iteratorT first, iteratorT )
+ void beginArray( iteratorT first, SAL_UNUSED_PARAMETER iteratorT )
{
PDFArray* pArray = new PDFArray();
pArray->m_nOffset = first - m_aGlobalBegin;
@@ -492,7 +492,7 @@ public:
m_aObjectStack.push_back( pArray );
}
- void endArray( iteratorT first, iteratorT )
+ void endArray( iteratorT first, SAL_UNUSED_PARAMETER iteratorT )
{
if( m_aObjectStack.empty() )
parseError( "array end without begin", first );
@@ -525,7 +525,7 @@ public:
parseError( "stream without object", first );
}
- void beginTrailer( iteratorT first, iteratorT )
+ void beginTrailer( iteratorT first, SAL_UNUSED_PARAMETER iteratorT )
{
if( m_aObjectStack.empty() )
m_aObjectStack.push_back( new PDFPart() );
@@ -545,7 +545,7 @@ public:
parseError( "trailer in wrong place", first );
}
- void endTrailer( iteratorT first, iteratorT )
+ void endTrailer( iteratorT first, SAL_UNUSED_PARAMETER iteratorT )
{
if( m_aObjectStack.empty() )
parseError( "%%EOF without trailer", first );
diff --git a/sdext/source/pdfimport/services.cxx b/sdext/source/pdfimport/services.cxx
index 296ef7f7dfa1..e15d9a5f78ee 100644
--- a/sdext/source/pdfimport/services.cxx
+++ b/sdext/source/pdfimport/services.cxx
@@ -120,7 +120,8 @@ namespace
}
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL
-component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey )
+component_writeInfo(
+ SAL_UNUSED_PARAMETER void* /*pServiceManager*/, void* pRegistryKey )
{
Reference< XRegistryKey > xRootKey( static_cast< XRegistryKey* >( pRegistryKey ) );
@@ -149,7 +150,9 @@ component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey )
}
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
- const sal_Char* pImplementationName, void* /*pServiceManager*/, void* /*pRegistryKey*/ )
+ const sal_Char* pImplementationName,
+ SAL_UNUSED_PARAMETER void* /*pServiceManager*/,
+ SAL_UNUSED_PARAMETER void* /*pRegistryKey*/ )
{
::rtl::OUString sImplementationName( ::rtl::OUString::createFromAscii( pImplementationName ) );
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index e6e9b33e4ed1..2e933e586ade 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -422,9 +422,7 @@ void PDFIProcessor::processGlyph( double fPreAvarageSpaceValue,
drawCharGlyphs( aGlyph.getGlyph(),
aGlyph.getRect(),
- aGlyph.getFontMatrix(),
aGlyph.getGC(),
- aGlyph.getCurElement(),
pPara,
pFrame,
flag);
@@ -433,9 +431,7 @@ void PDFIProcessor::processGlyph( double fPreAvarageSpaceValue,
{
drawCharGlyphs( aGlyph.getGlyph(),
aGlyph.getRect(),
- aGlyph.getFontMatrix(),
aGlyph.getGC(),
- aGlyph.getCurElement(),
pPara,
pFrame,
false );
@@ -513,9 +509,7 @@ GraphicsContext& PDFIProcessor::getTransformGlyphContext( CharGlyph& rGlyph )
}
void PDFIProcessor::drawCharGlyphs( rtl::OUString& rGlyphs,
geometry::RealRectangle2D& rRect,
- geometry::Matrix2D& ,
GraphicsContext aGC,
- Element* ,
ParagraphElement* pPara,
FrameElement* pFrame,
bool bSpaceFlag )
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.hxx b/sdext/source/pdfimport/tree/pdfiprocessor.hxx
index 4b66f4c31d54..349a4a9b34bc 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.hxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.hxx
@@ -128,9 +128,7 @@ namespace pdfi
void drawCharGlyphs( rtl::OUString& rGlyphs,
::com::sun::star::geometry::RealRectangle2D& rRect,
- ::com::sun::star::geometry::Matrix2D& rFontMatrix,
GraphicsContext aGC,
- Element* pCurElement,
ParagraphElement* pPara,
FrameElement* pFrame,
bool bSpaceFlag );
diff --git a/sdext/source/presenter/PresenterNotesView.cxx b/sdext/source/presenter/PresenterNotesView.cxx
index ccdadf1b15ef..481bb6756523 100644
--- a/sdext/source/presenter/PresenterNotesView.cxx
+++ b/sdext/source/presenter/PresenterNotesView.cxx
@@ -665,8 +665,7 @@ void PresenterNotesView::ChangeFontSize (const sal_Int32 nSizeChange)
mxViewId->getResourceURL()));
::boost::shared_ptr<PresenterConfigurationAccess> pConfiguration (
mpPresenterController->GetTheme()->GetNodeForViewStyle(
- sStyleName,
- PresenterConfigurationAccess::READ_WRITE));
+ sStyleName));
if (pConfiguration.get()==NULL || ! pConfiguration->IsValid())
return;
diff --git a/sdext/source/presenter/PresenterTheme.cxx b/sdext/source/presenter/PresenterTheme.cxx
index 7f0ed3abc432..8990416c19fc 100644
--- a/sdext/source/presenter/PresenterTheme.cxx
+++ b/sdext/source/presenter/PresenterTheme.cxx
@@ -381,8 +381,7 @@ bool PresenterTheme::ConvertToColor (
}
::boost::shared_ptr<PresenterConfigurationAccess> PresenterTheme::GetNodeForViewStyle (
- const ::rtl::OUString& rsStyleName,
- const PresenterConfigurationAccess::WriteMode) const
+ const ::rtl::OUString& rsStyleName) const
{
if (mpTheme.get() == NULL)
return ::boost::shared_ptr<PresenterConfigurationAccess>();
diff --git a/sdext/source/presenter/PresenterTheme.hxx b/sdext/source/presenter/PresenterTheme.hxx
index b4b263efea41..26aa3e3d79b0 100644
--- a/sdext/source/presenter/PresenterTheme.hxx
+++ b/sdext/source/presenter/PresenterTheme.hxx
@@ -133,8 +133,7 @@ public:
sal_uInt32& rColor);
::boost::shared_ptr<PresenterConfigurationAccess> GetNodeForViewStyle (
- const ::rtl::OUString& rsStyleName,
- const PresenterConfigurationAccess::WriteMode) const;
+ const ::rtl::OUString& rsStyleName) const;
private:
css::uno::Reference<css::uno::XComponentContext> mxContext;