diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-01-21 15:21:16 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-01-21 15:21:16 +0100 |
commit | 7c704c78d3c652504c064b4ac7af55a2c1ee49bb (patch) | |
tree | 623358cf25839219ef4fd90eea4f3eaa55389a1f /editeng | |
parent | 0d5167915b47df7c3e450614ea50d845ba959df3 (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 'editeng')
-rw-r--r-- | editeng/inc/editeng/svxacorr.hxx | 2 | ||||
-rw-r--r-- | editeng/inc/editeng/svxrtf.hxx | 2 | ||||
-rw-r--r-- | editeng/inc/editeng/tstpitem.hxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/editdoc.hxx | 18 | ||||
-rw-r--r-- | editeng/source/editeng/editobj.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/editobj2.hxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/bulitem.cxx | 4 | ||||
-rw-r--r-- | editeng/source/items/textitem.cxx | 7 | ||||
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 10 | ||||
-rw-r--r-- | editeng/source/rtf/svxrtf.cxx | 2 |
12 files changed, 30 insertions, 31 deletions
diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx index 53e0e2c12996..51de3294d1a2 100644 --- a/editeng/inc/editeng/svxacorr.hxx +++ b/editeng/inc/editeng/svxacorr.hxx @@ -129,7 +129,7 @@ public: }; typedef SvxAutocorrWord* SvxAutocorrWordPtr; -SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvxAutocorrWordList, SvxAutocorrWordPtr, 10, 10 , EDITENG_DLLPUBLIC) +SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvxAutocorrWordList, SvxAutocorrWordPtr, 10, EDITENG_DLLPUBLIC) class EDITENG_DLLPUBLIC SvxAutoCorrectLanguageLists { diff --git a/editeng/inc/editeng/svxrtf.hxx b/editeng/inc/editeng/svxrtf.hxx index 125ce5535a3f..c79f2bd846f7 100644 --- a/editeng/inc/editeng/svxrtf.hxx +++ b/editeng/inc/editeng/svxrtf.hxx @@ -88,7 +88,7 @@ typedef std::deque< ColorPtr > SvxRTFColorTbl; DECLARE_TABLE( SvxRTFFontTbl, Font* ) DECLARE_TABLE( SvxRTFStyleTbl, SvxRTFStyleType* ) typedef SvxRTFItemStackType* SvxRTFItemStackTypePtr; -SV_DECL_PTRARR_DEL( SvxRTFItemStackList, SvxRTFItemStackTypePtr, 1, 1 ) +SV_DECL_PTRARR_DEL( SvxRTFItemStackList, SvxRTFItemStackTypePtr, 1 ) // SvxRTFItemStack can't be "std::stack< SvxRTFItemStackTypePtr >" type, because // the methods are using operator[] in sw/source/filter/rtf/rtftbl.cxx file diff --git a/editeng/inc/editeng/tstpitem.hxx b/editeng/inc/editeng/tstpitem.hxx index f15a5d194347..90052bfc3426 100644 --- a/editeng/inc/editeng/tstpitem.hxx +++ b/editeng/inc/editeng/tstpitem.hxx @@ -103,7 +103,7 @@ public: // class SvxTabStopItem -------------------------------------------------- -SV_DECL_VARARR_SORT_VISIBILITY( SvxTabStopArr, SvxTabStop, SVX_TAB_DEFCOUNT, 1, EDITENG_DLLPUBLIC ) +SV_DECL_VARARR_SORT_VISIBILITY( SvxTabStopArr, SvxTabStop, SVX_TAB_DEFCOUNT, EDITENG_DLLPUBLIC ) /* [Description] diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index b29c3a0608d1..2b35c3e13801 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -118,7 +118,7 @@ struct WritingDirectionInfo typedef std::deque< WritingDirectionInfo > WritingDirectionInfos; typedef EditCharAttrib* EditCharAttribPtr; -SV_DECL_PTRARR( CharAttribArray, EditCharAttribPtr, 0, 4 ) +SV_DECL_PTRARR( CharAttribArray, EditCharAttribPtr, 0 ) class ContentAttribsInfo { @@ -136,7 +136,7 @@ public: }; typedef ContentAttribsInfo* ContentAttribsInfoPtr; -SV_DECL_PTRARR( ContentInfoArray, ContentAttribsInfoPtr, 1, 1 ) +SV_DECL_PTRARR( ContentInfoArray, ContentAttribsInfoPtr, 1 ) // ---------------------------------------------------------------------- // class SvxFontTable @@ -304,13 +304,13 @@ public: }; typedef ContentNode* ContentNodePtr; -SV_DECL_PTRARR( DummyContentList, ContentNodePtr, 0, 4 ) +SV_DECL_PTRARR( DummyContentList, ContentNodePtr, 0 ) class ContentList : public DummyContentList { sal_uInt16 nLastCache; public: - ContentList() : DummyContentList( 0, 4 ), nLastCache(0) {} + ContentList() : DummyContentList( 0 ), nLastCache(0) {} sal_uInt16 GetPos( const ContentNodePtr &rPtr ) const; }; @@ -439,7 +439,7 @@ public: // class TextPortionList // ------------------------------------------------------------------------- typedef TextPortion* TextPortionPtr; -SV_DECL_PTRARR( TextPortionArray, TextPortionPtr, 0, 8 ) +SV_DECL_PTRARR( TextPortionArray, TextPortionPtr, 0 ) class TextPortionList : public TextPortionArray { @@ -455,7 +455,7 @@ public: class ParaPortion; -SV_DECL_VARARR( CharPosArray, sal_Int32, 0, CHARPOSGROW ) +SV_DECL_VARARR( CharPosArray, sal_Int32, 0 ) // ------------------------------------------------------------------------ // class EditLine @@ -550,7 +550,7 @@ public: // class LineList // ------------------------------------------------------------------------- typedef EditLine* EditLinePtr; -SV_DECL_PTRARR( LineArray, EditLinePtr, 0, 4 ) +SV_DECL_PTRARR( LineArray, EditLinePtr, 0 ) class EditLineList : public LineArray { @@ -633,7 +633,7 @@ public: }; typedef ParaPortion* ParaPortionPtr; -SV_DECL_PTRARR( DummyParaPortionList, ParaPortionPtr, 0, 4 ) +SV_DECL_PTRARR( DummyParaPortionList, ParaPortionPtr, 0 ) // ------------------------------------------------------------------------- // class ParaPortionList @@ -712,7 +712,7 @@ public: }; typedef DeletedNodeInfo* DeletedNodeInfoPtr; -SV_DECL_PTRARR( DeletedNodesList, DeletedNodeInfoPtr, 0, 4 ) +SV_DECL_PTRARR( DeletedNodesList, DeletedNodeInfoPtr, 0 ) // ------------------------------------------------------------------------- // class EditDoc diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index b4555d8123f0..e06f8101899d 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -1038,7 +1038,7 @@ void BinTextObject::StoreData( SvStream& rOStream ) const } // Store Current text encoding ... - rtl_TextEncoding eEncoding = GetSOStoreTextEncoding( osl_getThreadTextEncoding(), (sal_uInt16) rOStream.GetVersion() ); + rtl_TextEncoding eEncoding = GetSOStoreTextEncoding( osl_getThreadTextEncoding() ); rOStream << (sal_uInt16) eEncoding; // The number of paragraphs ... @@ -1214,7 +1214,7 @@ void BinTextObject::CreateData( SvStream& rIStream ) sal_uInt16 nCharSet; rIStream >> nCharSet; - rtl_TextEncoding eSrcEncoding = GetSOLoadTextEncoding( (rtl_TextEncoding)nCharSet, (sal_uInt16)rIStream.GetVersion() ); + rtl_TextEncoding eSrcEncoding = GetSOLoadTextEncoding( (rtl_TextEncoding)nCharSet ); // The number of paragraphs ... sal_uInt16 nParagraphs; diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx index f4a7d2e25026..426435aeef5f 100644 --- a/editeng/source/editeng/editobj2.hxx +++ b/editeng/source/editeng/editobj2.hxx @@ -87,7 +87,7 @@ inline sal_Bool XEditAttribute::IsFeature() } typedef XEditAttribute* XEditAttributePtr; -SV_DECL_PTRARR( XEditAttributeListImpl, XEditAttributePtr, 0, 4 ) +SV_DECL_PTRARR( XEditAttributeListImpl, XEditAttributePtr, 0 ) class XEditAttributeList : public XEditAttributeListImpl { @@ -105,7 +105,7 @@ struct XParaPortion }; typedef XParaPortion* XParaPortionPtr; -SV_DECL_PTRARR( XBaseParaPortionList, XParaPortionPtr, 0, 4 ) +SV_DECL_PTRARR( XBaseParaPortionList, XParaPortionPtr, 0 ) class XParaPortionList : public XBaseParaPortionList { @@ -174,7 +174,7 @@ public: }; typedef ContentInfo* ContentInfoPtr; -SV_DECL_PTRARR( ContentInfoList, ContentInfoPtr, 1, 4 ) +SV_DECL_PTRARR( ContentInfoList, ContentInfoPtr, 1 ) class BinTextObject : public EditTextObject, public SfxItemPoolUser { diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 39107a43fc62..1c008fbc03e1 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -380,7 +380,7 @@ public: // ---------------------------------------------------------------------- typedef EditView* EditViewPtr; -SV_DECL_PTRARR( EditViews, EditViewPtr, 0, 1 ) +SV_DECL_PTRARR( EditViews, EditViewPtr, 0 ) class ImpEditEngine : public SfxListener { diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 757db0c7b6a6..719a8753472b 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -86,7 +86,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::linguistic2; -SV_DECL_VARARR_SORT( SortedPositions, sal_uInt32, 16, 8 ) +SV_DECL_VARARR_SORT( SortedPositions, sal_uInt32, 16 ) SV_IMPL_VARARR_SORT( SortedPositions, sal_uInt32 ); #define CH_HYPH '-' diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index cbfc20821591..ce6c789f9a8e 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -53,7 +53,7 @@ void SvxBulletItem::StoreFont( SvStream& rStream, const Font& rFont ) rStream << rFont.GetColor(); nTemp = (sal_uInt16)rFont.GetFamily(); rStream << nTemp; - nTemp = (sal_uInt16)GetSOStoreTextEncoding((rtl_TextEncoding)rFont.GetCharSet(), (sal_uInt16)rStream.GetVersion()); + nTemp = (sal_uInt16)GetSOStoreTextEncoding((rtl_TextEncoding)rFont.GetCharSet()); rStream << nTemp; nTemp = (sal_uInt16)rFont.GetPitch(); rStream << nTemp; @@ -82,7 +82,7 @@ Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer ) rStream >> nTemp; aFont.SetFamily((FontFamily)nTemp); rStream >> nTemp; - nTemp = (sal_uInt16)GetSOLoadTextEncoding((rtl_TextEncoding)nTemp, (sal_uInt16)rStream.GetVersion()); + nTemp = (sal_uInt16)GetSOLoadTextEncoding((rtl_TextEncoding)nTemp); aFont.SetCharSet((rtl_TextEncoding)nTemp); rStream >> nTemp; aFont.SetPitch((FontPitch)nTemp); diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index abbb90354f56..9a2f3391c967 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -393,7 +393,7 @@ SvStream& SvxFontItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) co GetFamilyName().EqualsAscii( "OpenSymbol", 0, sizeof("OpenSymbol")-1 ); rStrm << (sal_uInt8) GetFamily() << (sal_uInt8) GetPitch() - << (sal_uInt8)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion())); + << (sal_uInt8)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetSOStoreTextEncoding(GetCharSet())); String aStoreFamilyName( GetFamilyName() ); if( bToBats ) @@ -430,7 +430,7 @@ SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, sal_uInt16) const aStyle = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet()); // Set the "correct" textencoding - eFontTextEncoding = (sal_uInt8)GetSOLoadTextEncoding( eFontTextEncoding, (sal_uInt16)rStrm.GetVersion() ); + eFontTextEncoding = (sal_uInt8)GetSOLoadTextEncoding( eFontTextEncoding ); // at some point, the StarBats changes from ANSI font to SYMBOL font if ( RTL_TEXTENCODING_SYMBOL != eFontTextEncoding && aName.EqualsAscii("StarBats") ) @@ -2104,8 +2104,7 @@ SfxPoolItem* SvxCharSetColorItem::Clone( SfxItemPool * ) const SvStream& SvxCharSetColorItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (sal_uInt8)GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion()) - << GetValue(); + rStrm << (sal_uInt8)GetSOStoreTextEncoding(GetCharSet()) << GetValue(); return rStrm; } diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 169c403b84bc..ac726c84a437 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1999,7 +1999,7 @@ void SvxAutoCorrectLanguageLists::LoadXMLExceptList_Imp( if( rpLst ) rpLst->DeleteAndDestroy( 0, rpLst->Count() ); else - rpLst = new SvStringsISortDtor( 16, 16 ); + rpLst = new SvStringsISortDtor( 16 ); { String sStrmName( pStrmName, RTL_TEXTENCODING_MS_1252 ); @@ -2153,7 +2153,7 @@ SvxAutocorrWordList* SvxAutoCorrectLanguageLists::LoadAutocorrWordList() if( pAutocorr_List ) pAutocorr_List->DeleteAndDestroy( 0, pAutocorr_List->Count() ); else - pAutocorr_List = new SvxAutocorrWordList( 16, 16 ); + pAutocorr_List = new SvxAutocorrWordList( 16 ); try { @@ -2201,7 +2201,7 @@ void SvxAutoCorrectLanguageLists::SetAutocorrWordList( SvxAutocorrWordList* pLis if( !pAutocorr_List ) { OSL_ENSURE( !this, "No valid list" ); - pAutocorr_List = new SvxAutocorrWordList( 16, 16 ); + pAutocorr_List = new SvxAutocorrWordList( 16 ); } nFlags |= ChgWordLstLoad; } @@ -2297,7 +2297,7 @@ void SvxAutoCorrectLanguageLists::SetCplSttExceptList( SvStringsISortDtor* pList if( !pCplStt_ExcptLst ) { OSL_ENSURE( !this, "No valid list" ); - pCplStt_ExcptLst = new SvStringsISortDtor( 16, 16 ); + pCplStt_ExcptLst = new SvStringsISortDtor( 16 ); } nFlags |= CplSttLstLoad; } @@ -2333,7 +2333,7 @@ void SvxAutoCorrectLanguageLists::SetWrdSttExceptList( SvStringsISortDtor* pList if( !pWrdStt_ExcptLst ) { OSL_ENSURE( !this, "No valid list" ); - pWrdStt_ExcptLst = new SvStringsISortDtor( 16, 16 ); + pWrdStt_ExcptLst = new SvStringsISortDtor( 16 ); } nFlags |= WrdSttLstLoad; } diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 7f2e710d5db4..8b9d93cd163c 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -1213,7 +1213,7 @@ SvxRTFItemStackType::~SvxRTFItemStackType() void SvxRTFItemStackType::Add( SvxRTFItemStackType* pIns ) { if( !pChildList ) - pChildList = new SvxRTFItemStackList( 4, 16 ); + pChildList = new SvxRTFItemStackList( 4 ); pChildList->Insert( pIns, pChildList->Count() ); } |