Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Another patch removing some unused methods.
From 9ab3fcd3e16bdb0c0ea565777d7537bd9bf761f0 Mon Sep 17 00:00:00 2001
From: Petr Vorel <petr.vorel@gmail.com>
Date: Sun, 26 Feb 2012 00:04:49 +0100
Subject: [PATCH] Removed unused code

---
 sc/source/filter/excel/xepivot.cxx   |    9 ---------
 sc/source/filter/excel/xestring.cxx  |   17 -----------------
 sc/source/filter/excel/xestyle.cxx   |    6 ------
 sc/source/filter/excel/xlformula.cxx |   11 -----------
 sc/source/filter/excel/xlstyle.cxx   |    5 -----
 sc/source/filter/inc/xepivot.hxx     |    2 --
 sc/source/filter/inc/xestring.hxx    |    2 --
 sc/source/filter/inc/xestyle.hxx     |    6 ------
 sc/source/filter/inc/xlformula.hxx   |    3 ---
 sc/source/filter/inc/xlstyle.hxx     |    2 --
 unusedcode.easy                      |    6 ------
 11 files changed, 0 insertions(+), 69 deletions(-)

diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 60e2166..908b986 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -779,15 +779,6 @@ XclExpPCField* XclExpPivotCache::GetFieldAcc( sal_uInt16 nFieldIdx )
     return maFieldList.GetRecord( nFieldIdx ).get();
 }
 
-XclExpPCField* XclExpPivotCache::GetFieldAcc( const rtl::OUString& rFieldName )
-{
-    XclExpPCField* pField = 0;
-    for( size_t nPos = 0, nSize = maFieldList.GetSize(); !pField && (nPos < nSize); ++nPos )
-        if( maFieldList.GetRecord( nPos )->GetFieldName() == rFieldName )
-            pField = maFieldList.GetRecord( nPos ).get();
-    return pField;
-}
-
 void XclExpPivotCache::AddFields( const ScDPObject& rDPObj )
 {
     AddStdFields( rDPObj );
diff --git a/sc/source/filter/excel/xestring.cxx b/sc/source/filter/excel/xestring.cxx
index d12ebe8..2053a68 100644
--- a/sc/source/filter/excel/xestring.cxx
+++ b/sc/source/filter/excel/xestring.cxx
@@ -184,23 +184,6 @@ void XclExpString::AppendByte( sal_Unicode cChar, rtl_TextEncoding eTextEnc )
 
 // formatting runs ------------------------------------------------------------
 
-void XclExpString::SetFormats( const XclFormatRunVec& rFormats )
-{
-    maFormats = rFormats;
-#if OSL_DEBUG_LEVEL > 0
-    if( IsRich() )
-    {
-        XclFormatRunVec::const_iterator aCurr = maFormats.begin();
-        XclFormatRunVec::const_iterator aPrev = aCurr;
-        XclFormatRunVec::const_iterator aEnd = maFormats.end();
-        for( ++aCurr; aCurr != aEnd; ++aCurr, ++aPrev )
-            OSL_ENSURE( aPrev->mnChar < aCurr->mnChar, "XclExpString::SetFormats - invalid char 
order" );
-        OSL_ENSURE( aPrev->mnChar <= mnLen, "XclExpString::SetFormats - invalid char index" );
-    }
-#endif
-    LimitFormatCount( mbIsBiff8 ? EXC_STR_MAXLEN : EXC_STR_MAXLEN_8BIT );
-}
-
 void XclExpString::AppendFormat( sal_uInt16 nChar, sal_uInt16 nFontIdx, bool bDropDuplicate )
 {
     OSL_ENSURE( maFormats.empty() || (maFormats.back().mnChar < nChar), 
"XclExpString::AppendFormat - invalid char index" );
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 1d7f190..ae51486 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -1124,12 +1124,6 @@ sal_uInt16 XclExpFontBuffer::Insert( const SfxItemSet& rItemSet,
     return Insert( aFont, eColorType, bAppFont );
 }
 
-sal_uInt16 XclExpFontBuffer::Insert( const ScPatternAttr& rPattern,
-        sal_Int16 nScript, XclExpColorType eColorType, bool bAppFont )
-{
-    return Insert( rPattern.GetItemSet(), nScript, eColorType, bAppFont );
-}
-
 void XclExpFontBuffer::Save( XclExpStream& rStrm )
 {
     maFontList.Save( rStrm );
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index 02154ba..8685041 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -483,12 +483,6 @@ XclTokenArray::XclTokenArray( bool bVolatile ) :
 {
 }
 
-XclTokenArray::XclTokenArray( ScfUInt8Vec& rTokVec, bool bVolatile ) :
-    mbVolatile( bVolatile )
-{
-    maTokVec.swap( rTokVec );
-}
-
 XclTokenArray::XclTokenArray( ScfUInt8Vec& rTokVec, ScfUInt8Vec& rExtDataVec, bool bVolatile ) :
     mbVolatile( bVolatile )
 {
@@ -598,11 +592,6 @@ XclTokenArrayIterator::XclTokenArrayIterator( const XclTokenArrayIterator& 
rTokA
     SkipSpaces();
 }
 
-void XclTokenArrayIterator::Init()
-{
-    mppScTokenBeg = mppScTokenEnd = mppScToken = 0;
-}
-
 void XclTokenArrayIterator::Init( const ScTokenArray& rScTokArr, bool bSkipSpaces )
 {
     sal_uInt16 nTokArrLen = rScTokArr.GetLen();
diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx
index db0603d..e8ef58e 100644
--- a/sc/source/filter/excel/xlstyle.cxx
+++ b/sc/source/filter/excel/xlstyle.cxx
@@ -1751,11 +1751,6 @@ void XclXFBase::SetAllUsedFlags( bool bUsed )
     mbProtUsed = mbFontUsed = mbFmtUsed = mbAlignUsed = mbBorderUsed = mbAreaUsed = bUsed;
 }
 
-bool XclXFBase::HasUsedFlags() const
-{
-    return mbProtUsed || mbFontUsed || mbFmtUsed || mbAlignUsed || mbBorderUsed || mbAreaUsed;
-}
-
 bool XclXFBase::Equals( const XclXFBase& rCmp ) const
 {
     return
diff --git a/sc/source/filter/inc/xepivot.hxx b/sc/source/filter/inc/xepivot.hxx
index a3472bc..5c25188 100644
--- a/sc/source/filter/inc/xepivot.hxx
+++ b/sc/source/filter/inc/xepivot.hxx
@@ -209,8 +209,6 @@ public:
 private:
     /** Returns read/write access to a pivot cache field. */
     XclExpPCField*      GetFieldAcc( sal_uInt16 nFieldIdx );
-    /** Returns read/write access to a pivot cache field. */
-    XclExpPCField*      GetFieldAcc( const rtl::OUString& rFieldName );
 
     /** Adds all pivot cache fields. */
     void                AddFields( const ScDPObject& rDPObj );
diff --git a/sc/source/filter/inc/xestring.hxx b/sc/source/filter/inc/xestring.hxx
index abc6f33..42ab5db 100644
--- a/sc/source/filter/inc/xestring.hxx
+++ b/sc/source/filter/inc/xestring.hxx
@@ -131,8 +131,6 @@ public:
 
     // formatting runs --------------------------------------------------------
 
-    /** Sets new formatting runs for the current text. */
-    void                SetFormats( const XclFormatRunVec& rFormats );
     /** Appends a formatting run. nChar must be greater than last contained character index. */
     void                AppendFormat( sal_uInt16 nChar, sal_uInt16 nFontIdx, bool bDropDuplicate = 
true );
     /** Appends a trailing formatting run with the passed font index. */
diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx
index 8f38b6f..c1263b3 100644
--- a/sc/source/filter/inc/xestyle.hxx
+++ b/sc/source/filter/inc/xestyle.hxx
@@ -247,12 +247,6 @@ public:
         @return  The resulting Excel font index. */
     sal_uInt16          Insert( const SfxItemSet& rItemSet, sal_Int16 nScript,
                             XclExpColorType eColorType, bool bAppFont = false );
-    /** Inserts the font contained in rPattern into the buffer if not present.
-        @param nScript  The script type of the font properties to be used.
-        @param bAppFont  true = Sets the application font; false = Inserts a new font.
-        @return  The resulting Excel font index. */
-    sal_uInt16          Insert( const ScPatternAttr& rPattern, sal_Int16 nScript,
-                            XclExpColorType eColorType, bool bAppFont = false );
 
     /** Writes all FONT records contained in this buffer. */
     virtual void        Save( XclExpStream& rStrm );
diff --git a/sc/source/filter/inc/xlformula.hxx b/sc/source/filter/inc/xlformula.hxx
index 3a9e6e7..3281d25 100644
--- a/sc/source/filter/inc/xlformula.hxx
+++ b/sc/source/filter/inc/xlformula.hxx
@@ -373,8 +373,6 @@ class XclTokenArray
 public:
     /** Creates an empty token array. */
     explicit            XclTokenArray( bool bVolatile = false );
-    /** Creates a token array, swaps passed token vector into own data. */
-    explicit            XclTokenArray( ScfUInt8Vec& rTokVec, bool bVolatile = false );
     /** Creates a token array, swaps passed token vectors into own data. */
     explicit            XclTokenArray( ScfUInt8Vec& rTokVec, ScfUInt8Vec& rExtDataVec, bool 
bVolatile = false );
 
@@ -444,7 +442,6 @@ public:
     /** Copy constructor that allows to change the skip-spaces mode. */
     explicit            XclTokenArrayIterator( const XclTokenArrayIterator& rTokArrIt, bool 
bSkipSpaces );
 
-    void                Init();
     void                Init( const ScTokenArray& rScTokArr, bool bSkipSpaces );
 
     inline bool         Is() const { return mppScToken != 0; }
diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx
index 7935763..0c2ab6c 100644
--- a/sc/source/filter/inc/xlstyle.hxx
+++ b/sc/source/filter/inc/xlstyle.hxx
@@ -593,8 +593,6 @@ public:
 
     /** Sets all "attribute used" flags to the passed state. */
     void                SetAllUsedFlags( bool bUsed );
-    /** Returns true, if any "attribute used" flags are ste in this XF. */
-    bool                HasUsedFlags() const;
 
     /** Returns true, if this is a hard cell format. */
     inline bool         IsCellXF() const    { return mbCellXF; }
diff --git a/unusedcode.easy b/unusedcode.easy
index e845b81..f6056ea6 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -507,12 +507,6 @@ XMLTextListAutoStylePool_Impl::Remove(XMLTextListAutoStylePoolEntry_Impl*)
 XMLVisAreaContext::XMLVisAreaContext(SvXMLImport&, unsigned short, rtl::OUString const&, 
com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList> const&, Rectangle&, short)
 XWindowItem::XWindowItem(unsigned short, Window*)
 XWindowItem::XWindowItem(unsigned short, 
com::sun::star::uno::Reference<com::sun::star::awt::XWindow>&)
-XclExpFontBuffer::Insert(ScPatternAttr const&, short, XclExpColorType, bool)
-XclExpPivotCache::GetFieldAcc(rtl::OUString const&)
-XclExpString::SetFormats(std::__debug::vector<XclFormatRun, std::allocator<XclFormatRun> > const&)
-XclTokenArray::XclTokenArray(std::__debug::vector<unsigned char, std::allocator<unsigned char> >&, 
bool)
-XclTokenArrayIterator::Init()
-XclXFBase::HasUsedFlags() const
 ZipPackageStream::SetBaseEncryptionData(rtl::Reference<BaseEncryptionData> const&)
 _CpyTabFrms::Insert(_CpyTabFrm const&, unsigned short&)
 _CpyTabFrms::Insert(_CpyTabFrm const*, unsigned short)
-- 
1.7.9.1


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.