[Libreoffice-commits] .: writerfilter/source

Marc-André Laverdière malaverdiere at kemper.freedesktop.org
Thu Jul 21 03:30:33 PDT 2011


 writerfilter/source/doctok/DffImpl.cxx              |    5 
 writerfilter/source/doctok/WW8DocumentImpl.cxx      |  131 --------------------
 writerfilter/source/doctok/WW8PropertySetImpl.cxx   |   35 -----
 writerfilter/source/doctok/WW8ResourceModelImpl.cxx |   12 -
 4 files changed, 183 deletions(-)

New commits:
commit 3096f37078859486f06c5d64b5810a4c9e1d6636
Author: Marc-Andre Laverdiere <marc-andre at atc.tcs.com / marcandre.laverdiere at tcs.com>
Date:   Thu Jul 21 15:55:01 2011 +0530

    Removed dead code listed in unusedcode.easy

diff --git a/writerfilter/source/doctok/DffImpl.cxx b/writerfilter/source/doctok/DffImpl.cxx
index a8dfdaa..e690cb5 100644
--- a/writerfilter/source/doctok/DffImpl.cxx
+++ b/writerfilter/source/doctok/DffImpl.cxx
@@ -285,11 +285,6 @@ DffOPT::get_property(sal_uInt32 nPos)
     return writerfilter::Reference<Properties>::Pointer_t(pTmp);
 }
 
-sal_uInt32 DffOPT::get_extraoffset_count()
-{
-    return get_property_count();
-}
-
 sal_uInt32 DffOPT::get_extraoffset(sal_uInt32 pos)
 {
     sal_uInt32 nResult;
diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx b/writerfilter/source/doctok/WW8DocumentImpl.cxx
index f7b79a3..6c6e649 100644
--- a/writerfilter/source/doctok/WW8DocumentImpl.cxx
+++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx
@@ -116,11 +116,6 @@ WW8DocumentIteratorImpl::getSubDocument() const
     return mpDocument->getSubDocument(mCpAndFc);
 }
 
-WW8SED * WW8DocumentIteratorImpl::getSED() const
-{
-    return mpDocument->getSED(mCpAndFc);
-}
-
 WW8Stream::Sequence WW8DocumentIteratorImpl::getText()
 {
     return mpDocument->getText(mCpAndFc);
@@ -588,12 +583,6 @@ void WW8DocumentImpl::parseBinTableCpAndFcs(WW8BinTable & rTable,
 {
     for (sal_uInt32 i = 0; i < rTable.getEntryCount(); i++)
     {
-#if 0
-        char sBuffer[255];
-        snprintf(sBuffer, 255, "%ld", i);
-        char sBufferPageNum[255];
-        snprintf(sBufferPageNum, 255, "%ld", rTable.getPageNumber(i));
-#endif
         Fc aFcFromTable(rTable.getFc(i));
 
         if (aFcFromTable < mpPieceTable->getFirstFc())
@@ -751,16 +740,6 @@ CpAndFc WW8DocumentImpl::getEndnoteEndCp() const
     return mEndnoteEndCpAndFc;
 }
 
-CpAndFc WW8DocumentImpl::getTextboxEndCp() const
-{
-    return mTextboxEndCpAndFc;
-}
-
-CpAndFc WW8DocumentImpl::getTextboxHeaderEndCp() const
-{
-    return mTextboxHeaderEndCpAndFc;
-}
-
 CpAndFc WW8DocumentImpl::getNextCp(const CpAndFc & rCpAndFc) const
 {
     CpAndFc aResult = mCpAndFcEnd;
@@ -1129,16 +1108,6 @@ writerfilter::Reference<Stream>::Pointer_t WW8DocumentImpl::getHeader(sal_uInt32
     CpAndFc aCpAndFcStart(getHeaderCpAndFc(nPos));
     CpAndFc aCpAndFcEnd(getHeaderCpAndFc(nPos + 1));
 
-#if 0
-    sal_uInt32 nEquals = 1;
-    while (aCpAndFcEnd == aCpAndFcStart && nPos + nEquals < getHeaderCount())
-    {
-        ++nEquals;
-
-        aCpAndFcEnd = getHeaderCpAndFc(nPos + nEquals);
-    }
-#endif
-
     if (aCpAndFcStart < aCpAndFcEnd)
         pResult = writerfilter::Reference<Stream>::Pointer_t
             (new WW8DocumentImpl(*this, aCpAndFcStart, aCpAndFcEnd));
@@ -1146,22 +1115,6 @@ writerfilter::Reference<Stream>::Pointer_t WW8DocumentImpl::getHeader(sal_uInt32
     return pResult;
 }
 
-sal_uInt32 WW8DocumentImpl::getFootnoteCount() const
-{
-    return (mpFootnoteHelper.get() != NULL) ? mpFootnoteHelper->getCount() : 0;
-}
-
-writerfilter::Reference<Stream>::Pointer_t
-WW8DocumentImpl::getFootnote(sal_uInt32 nPos)
-{
-    writerfilter::Reference<Stream>::Pointer_t pResult;
-
-    if (! bSubDocument)
-        pResult = mpFootnoteHelper->get(nPos);
-
-    return pResult;
-}
-
 writerfilter::Reference<Stream>::Pointer_t
 WW8DocumentImpl::getFootnote(const CpAndFc & rCpAndFc)
 {
@@ -1173,22 +1126,6 @@ WW8DocumentImpl::getFootnote(const CpAndFc & rCpAndFc)
     return pResult;
 }
 
-sal_uInt32 WW8DocumentImpl::getEndnoteCount() const
-{
-    return mpEndnoteHelper.get() != NULL ? mpEndnoteHelper->getCount() : 0;
-}
-
-writerfilter::Reference<Stream>::Pointer_t
-WW8DocumentImpl::getEndnote(sal_uInt32 nPos)
-{
-    writerfilter::Reference<Stream>::Pointer_t pResult;
-
-    if (! bSubDocument)
-        pResult = mpEndnoteHelper->get(nPos);
-
-    return pResult;
-}
-
 writerfilter::Reference<Stream>::Pointer_t
 WW8DocumentImpl::getEndnote(const CpAndFc & rCpAndFc)
 {
@@ -1200,22 +1137,6 @@ WW8DocumentImpl::getEndnote(const CpAndFc & rCpAndFc)
     return pResult;
 }
 
-sal_uInt32 WW8DocumentImpl::getAnnotationCount() const
-{
-    return mpAnnotationHelper.get() != NULL ?
-        mpAnnotationHelper->getCount() : 0;
-}
-
-writerfilter::Reference<Stream>::Pointer_t
-WW8DocumentImpl::getAnnotation(sal_uInt32 nPos)
-{
-    writerfilter::Reference<Stream>::Pointer_t pResult;
-
-    if (! bSubDocument)
-        pResult = mpAnnotationHelper->get(nPos);
-
-    return pResult;
-}
 
 writerfilter::Reference<Stream>::Pointer_t
 WW8DocumentImpl::getAnnotation(const CpAndFc & rCpAndFc)
@@ -1308,11 +1229,6 @@ WW8FLD::Pointer_t WW8DocumentImpl::getCurrentFLD() const
     return mpFLD;
 }
 
-sal_uInt32 WW8DocumentImpl::getPicLocation() const
-{
-    return mfcPicLoc;
-}
-
 void WW8DocumentImpl::setPicLocation(sal_uInt32 fcPicLoc)
 {
     mfcPicLoc = fcPicLoc;
@@ -1421,13 +1337,6 @@ CpAndFc WW8DocumentImpl::getCpAndFc(const Cp & cp, PropertyType type) const
     return CpAndFc(cp, aFc, type);
 }
 
-CpAndFc WW8DocumentImpl::getCpAndFc(const Fc & fc, PropertyType type) const
-{
-    Cp aCp = fc2cp(fc);
-
-    return CpAndFc(aCp, fc, type);
-}
-
 void WW8DocumentImpl::resolvePicture(Stream & rStream)
 {
     WW8Stream::Pointer_t pStream = getDataStream();
@@ -1672,24 +1581,11 @@ void WW8DocumentImpl::resolve(Stream & rStream)
             rStream.props(pFibRgFcLcb2000);
         }
 
-#if 0
-        if (mpTextBoxStories.get() != NULL)
-        {
-            output.addItem("<textbox.boxes>");
-            mpTextBoxStories->dump(output);
-            output.addItem("</textbox.boxes>");
-        }
-#endif
         if (mpFib->get_lcbPlcftxbxBkd() > 0)
         {
             PLCF<WW8BKD> aPLCF(*mpTableStream,
                                mpFib->get_fcPlcftxbxBkd(),
                                mpFib->get_lcbPlcftxbxBkd());
-#if 0
-            output.addItem("<textbox.breaks>");
-            aPLCF.dump(output);
-            output.addItem("</textbox.breaks>");
-#endif
         }
 
         if (mpDffBlock.get() != NULL)
@@ -1711,33 +1607,6 @@ void WW8DocumentImpl::resolve(Stream & rStream)
             rStream.info("/headers");
         }
 
-#if 0
-        {
-            sal_uInt32 nFootnoteCount = getFootnoteCount();
-            for (sal_uInt32 n = 0; n < nFootnoteCount; ++n)
-            {
-                //clog << "<footnote num=\"" << n << "\"/>" << endl;
-
-                writerfilter::Reference<Stream>::Pointer_t pFootnote(getFootnote(n));
-
-                if (pFootnote.get() != NULL)
-                    rStream.substream(NS_rtf::LN_footnote, pFootnote);
-            }
-        }
-        {
-            sal_uInt32 nEndnoteCount = getEndnoteCount();
-            for (sal_uInt32 n = 0; n < nEndnoteCount; ++n)
-            {
-                //clog << "<endnote num=\"" << n << "\"/>" << endl;
-
-                writerfilter::Reference<Stream>::Pointer_t pEndnote(getEndnote(n));
-
-                if (pEndnote.get() != NULL)
-                    rStream.substream(NS_rtf::LN_endnote, pEndnote);
-            }
-        }
-#endif
-
         writerfilter::Reference<Table>::Pointer_t pSttbRgtplc = getListTplcs();
 
         if (pSttbRgtplc.get() != NULL)
diff --git a/writerfilter/source/doctok/WW8PropertySetImpl.cxx b/writerfilter/source/doctok/WW8PropertySetImpl.cxx
index 897fd75..1cd8aa2 100644
--- a/writerfilter/source/doctok/WW8PropertySetImpl.cxx
+++ b/writerfilter/source/doctok/WW8PropertySetImpl.cxx
@@ -54,12 +54,6 @@ WW8PropertySetIterator::~WW8PropertySetIterator()
 {
 }
 
-WW8PropertyImpl::WW8PropertyImpl(WW8Stream & rStream,
-                                 sal_uInt32 nOffset, sal_uInt32 nCount)
-: WW8StructBase(rStream, nOffset, nCount)
-{
-}
-
 WW8PropertyImpl::WW8PropertyImpl(const WW8StructBase & rBase,
                                  sal_uInt32 nOffset,
                                  sal_uInt32 nCount)
@@ -67,13 +61,6 @@ WW8PropertyImpl::WW8PropertyImpl(const WW8StructBase & rBase,
 {
 }
 
-WW8PropertyImpl::WW8PropertyImpl(WW8StructBase * pBase,
-                                 sal_uInt32 nOffset,
-                                 sal_uInt32 nCount)
-: WW8StructBase(pBase, nOffset, nCount)
-{
-}
-
 WW8PropertyImpl::~WW8PropertyImpl()
 {
 }
@@ -164,28 +151,6 @@ sal_uInt32 WW8PropertyImpl::getByteLength() const
     return nParamSize + 2;
 }
 
-sal_uInt32 WW8PropertyImpl::getParamOffset() const
-{
-    sal_uInt32 nReturn = 0;
-
-    if (get_spra() == 6)
-        nReturn = 1;
-
-    switch (getId())
-    {
-    case 0xd608:
-    case 0xd609:
-        nReturn = 3;
-
-        break;
-
-    default:
-        break;
-    }
-
-    return nReturn;
-}
-
 void WW8PropertyImpl::dump(OutputWithDepth<string> & o) const
 {
     o.addItem(toString());
diff --git a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
index f4d807a..807363e 100644
--- a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
+++ b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
@@ -201,12 +201,6 @@ string WW8PropertiesReference::getType() const
 }
 
 WW8BinaryObjReference::WW8BinaryObjReference
-(WW8StructBase & rParent, sal_uInt32 nOffset, sal_uInt32 nCount)
-: WW8StructBase(rParent, nOffset, nCount)
-{
-}
-
-WW8BinaryObjReference::WW8BinaryObjReference
 (WW8StructBase * pParent, sal_uInt32 nOffset, sal_uInt32 nCount)
 : WW8StructBase(pParent, nOffset, nCount)
 {
@@ -218,12 +212,6 @@ WW8BinaryObjReference::WW8BinaryObjReference
 {
 }
 
-WW8BinaryObjReference::WW8BinaryObjReference
-(WW8Stream & rStream, sal_uInt32 nOffset, sal_uInt32 nCount)
-: WW8StructBase(rStream, nOffset, nCount)
-{
-}
-
 writerfilter::Reference<BinaryObj>::Pointer_t
 WW8BinaryObjReference::getBinary()
 {


More information about the Libreoffice-commits mailing list