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/source/items | |
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/source/items')
-rw-r--r-- | editeng/source/items/bulitem.cxx | 4 | ||||
-rw-r--r-- | editeng/source/items/textitem.cxx | 7 |
2 files changed, 5 insertions, 6 deletions
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; } |