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


Hy,

I have removed some dead code (0002-Remove-dead-code.patch), and one unused
method (0001-Remove-unused-method-GetListTable.patch).

Regards,
Balint Dozsa
From ade4725bd494c9c8bf01a94cb4b16b8b8baac282 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?B=C3=A1lint=20D=C3=B3zsa?= <dozsabalint@gmail.com>
Date: Mon, 14 Feb 2011 12:42:53 +0100
Subject: [PATCH] Remove unused method: GetListTable

---
 writerfilter/inc/dmapper/DomainMapper.hxx    |    1 -
 writerfilter/source/dmapper/DomainMapper.cxx |    5 -----
 2 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx
index 46cc5a0..848eff1 100644
--- a/writerfilter/inc/dmapper/DomainMapper.hxx
+++ b/writerfilter/inc/dmapper/DomainMapper.hxx
@@ -135,7 +135,6 @@ public:
     ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > GetCurrentTextRange();
 
     ::rtl::OUString getOrCreateCharStyle( PropertyValueVector_t& rCharProperties );
-    boost::shared_ptr< ListsManager > GetListTable( );
     boost::shared_ptr< StyleSheetTable > GetStyleSheetTable( );
 
 private:
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 8584268..7329ba8 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3768,11 +3768,6 @@ uno::Reference< text::XTextRange > DomainMapper::GetCurrentTextRange()
     return pStyleSheets->getOrCreateCharStyle( rCharProperties );
 }
 
-ListsManager::Pointer DomainMapper::GetListTable( )
-{
-    return m_pImpl->GetListTable( );
-}
-
 StyleSheetTablePtr DomainMapper::GetStyleSheetTable( )
 {
     return m_pImpl->GetStyleSheetTable( );
-- 
1.7.1

From c6733fffcb12f9e85d7956c480de38af93295c05 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?B=C3=A1lint=20D=C3=B3zsa?= <dozsabalint@gmail.com>
Date: Mon, 14 Feb 2011 10:42:35 +0100
Subject: [PATCH] Remove dead code

---
 writerfilter/inc/doctok/WW8Document.hxx            |   24 --------------
 writerfilter/qa/cppunittests/doctok/testdoctok.cxx |    3 --
 .../qa/cppunittests/odiapi/ExternalViewLogger.cxx  |    2 -
 writerfilter/qa/cppunittests/qname/testQName.cxx   |    1 -
 writerfilter/qa/cppunittests/xxml/testXXML.cxx     |    6 ---
 writerfilter/source/doctok/WW8DocumentImpl.cxx     |   25 --------------
 writerfilter/source/doctok/WW8FKPImpl.cxx          |    1 -
 writerfilter/source/doctok/WW8LFOTable.cxx         |   14 --------
 .../source/doctok/WW8ResourceModelImpl.cxx         |    2 -
 writerfilter/source/doctok/WW8StreamImpl.hxx       |    2 -
 writerfilter/source/doctok/WW8Text.cxx             |    5 ---
 .../debugservices/rtftok/ScannerTestService.cxx    |   34 +++-----------------
 12 files changed, 5 insertions(+), 114 deletions(-)

diff --git a/writerfilter/inc/doctok/WW8Document.hxx b/writerfilter/inc/doctok/WW8Document.hxx
index 226cca4..f88f2ae 100644
--- a/writerfilter/inc/doctok/WW8Document.hxx
+++ b/writerfilter/inc/doctok/WW8Document.hxx
@@ -130,30 +130,6 @@ public:
     virtual void dump(OutputWithDepth<string> & o) const = 0;
 };
 
-/**
-   An iterator for traversal of a set of properties.
-
-   Sample code for use of iterator:
-
-   \code
-   Return_t function(WW8PropertySet::tPointer pSet)
-   {
-       do_something;
-
-       WW8PropertySetIterator::tPointer pIt = pSet->begin();
-       WW8PropertySetIterator::tPointer pItEnd = pSet->end();
-
-       while ((*pIt) != (*pItEnd))
-       {
-           do_something();
-
-           ++(*pIt);
-       }
-
-       do_something;
-   }
-   \endcode
-*/
 class WRITERFILTER_DLLPUBLIC WW8PropertySetIterator
 {
 public:
diff --git a/writerfilter/qa/cppunittests/doctok/testdoctok.cxx 
b/writerfilter/qa/cppunittests/doctok/testdoctok.cxx
index df77336..015639d 100644
--- a/writerfilter/qa/cppunittests/doctok/testdoctok.cxx
+++ b/writerfilter/qa/cppunittests/doctok/testdoctok.cxx
@@ -105,9 +105,7 @@ namespace testdoctok
                 rtl_uString *dir=NULL;
                 osl_getProcessWorkingDir(&dir);
                 rtl_uString *fname=NULL;
-                //rtl_uString_newFromAscii(&fname, "/OpenDocument-v1.doc");
                 rtl_uString_newFromAscii(&fname, "/test.doc");
-                //rtl_uString_newFromAscii(&fname, "/numbers.doc");
                 rtl_uString *absfile=NULL;
                 rtl_uString_newConcat(&absfile, dir, fname);
 
@@ -210,7 +208,6 @@ namespace testdoctok
         CPPUNIT_TEST_SUITE(test);
         CPPUNIT_TEST(testInitUno);
         CPPUNIT_TEST(testOpenFile);
-        //CPPUNIT_TEST(testTraversal);
         CPPUNIT_TEST(testEvents);
         CPPUNIT_TEST(testEnd);        
         CPPUNIT_TEST_SUITE_END();
diff --git a/writerfilter/qa/cppunittests/odiapi/ExternalViewLogger.cxx 
b/writerfilter/qa/cppunittests/odiapi/ExternalViewLogger.cxx
index 2195155..a11e25a 100644
--- a/writerfilter/qa/cppunittests/odiapi/ExternalViewLogger.cxx
+++ b/writerfilter/qa/cppunittests/odiapi/ExternalViewLogger.cxx
@@ -83,8 +83,6 @@ namespace util
 
   void ExternalViewLoggerImpl::endTree()
   {
-    //dumpNodeContainer(mFileName + string(".dmp"));
-
     mFile << "digraph {" << endl;
     mFile << "Root [shape=box, color=grey];" << endl;
 
diff --git a/writerfilter/qa/cppunittests/qname/testQName.cxx 
b/writerfilter/qa/cppunittests/qname/testQName.cxx
index 7cfa0af..87f5b24 100644
--- a/writerfilter/qa/cppunittests/qname/testQName.cxx
+++ b/writerfilter/qa/cppunittests/qname/testQName.cxx
@@ -62,7 +62,6 @@ public:
             id%=QName::tokenizer().getQNames();
             const sal_Char *ln=QName::serializer().getLocalName((QName_t)id);
             const sal_Char *ns=QName::serializer().getNamespaceUri((QName_t)id);
-//                 printf("%i \"%s\" \"%s\"\n", i, ns, ln);
             testAdd(ns, ln);
         }
         rtl_random_destroyPool(rndPool);
diff --git a/writerfilter/qa/cppunittests/xxml/testXXML.cxx 
b/writerfilter/qa/cppunittests/xxml/testXXML.cxx
index fbce59d..735a282 100644
--- a/writerfilter/qa/cppunittests/xxml/testXXML.cxx
+++ b/writerfilter/qa/cppunittests/xxml/testXXML.cxx
@@ -94,10 +94,8 @@ public:
     virtual void startElement(QName_t name, QName_t attrName[], const xxml::Value *attrValue[], 
int attrs)
     {
         events++;
-//             printf("<{%s}:%s>\n", QName::serializer().getNamespaceUri(name), 
QName::serializer().getLocalName(name));
         for(int i=0;i<attrs;i++)
         {
-//                     printf("@{%s}:%s=\"%s\"\n", 
QName::serializer().getNamespaceUri(attrName[i]), QName::serializer().getLocalName(attrName[i]), 
attrValue[i]->getOString().getStr());
             events++;
         }
 
@@ -127,7 +125,6 @@ public:
     }
     virtual void endElement(QName_t name)
     {
-        //printf("</{%s}:%s>\n", QName::serializer().getNamespaceUri(name), 
QName::serializer().getLocalName(name));
         events++;
         switch(name)
         {
@@ -149,7 +146,6 @@ public:
     }
     virtual void characters(const xxml::Value &value)
     {
-        //printf("\"%s\"\n", value.getOString().getStr());
         events++;
     }
 
@@ -164,8 +160,6 @@ public:
         std::auto_ptr<xxml::XXmlReader> reader=xxml::XXmlReader::createXXmlReader(handler);
         TimeValue t1; osl_getSystemTime(&t1);
 
-//             reader->read("test.xml");
-//             reader->read("C:\\Documents and Settings\\fr156068\\My 
Documents\\odt\\testfile.xml");
         reader->read("C:\\Documents and Settings\\fr156068\\My 
Documents\\odt\\testfile\\content.xml");
         TimeValue t2; osl_getSystemTime(&t2);
         printf("Events=%i time=%is time/event=%0.10fs\n", handler.events, t2.Seconds-t1.Seconds, 
(double)(t2.Seconds-t1.Seconds)/(double)handler.events);
diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx 
b/writerfilter/source/doctok/WW8DocumentImpl.cxx
index 20b85dd..2a6c5a5 100644
--- a/writerfilter/source/doctok/WW8DocumentImpl.cxx
+++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx
@@ -308,8 +308,6 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false)
                                 mpFib->get_fcPlcfbteChpx(),
                                 mpFib->get_lcbPlcfbteChpx()));
 
-    //clog << "BinTable(CHP):" << mpBinTableCHPX->toString();
-
     parseBinTableCpAndFcs(*mpBinTableCHPX, PROP_CHP);
 
     mpSEDs = PLCF<WW8SED>::Pointer_t(new PLCF<WW8SED>
@@ -317,8 +315,6 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false)
                                       mpFib->get_fcPlcfsed(),
                                       mpFib->get_lcbPlcfsed()));
 
-    //mpSEDs->dump(clog);
-
     {
         PLCFHelper<WW8SED>::processPLCFCpAndFcs
             (*this, mpPieceTable, mpSEDs, PROP_SEC, 0);
@@ -590,7 +586,6 @@ string WW8DocumentImpl::getType() const
 void WW8DocumentImpl::parseBinTableCpAndFcs(WW8BinTable & rTable,
                                             PropertyType eType_)
 {
-    //clog << "<bintable type=\"" << propertyTypeToString(eType_) << "\">" << endl;
     for (sal_uInt32 i = 0; i < rTable.getEntryCount(); i++)
     {
 #if 0
@@ -607,8 +602,6 @@ void WW8DocumentImpl::parseBinTableCpAndFcs(WW8BinTable & rTable,
         bool bComplex = mpPieceTable->isComplex(aFcFromTable);
         aFcFromTable.setComplex(bComplex);
 
-        //clog << "<entry fc=\"" << aFcFromTable.toString() << "\">" << endl;
-
         try
         {
             Cp aCpFromTable(mpPieceTable->fc2cp(aFcFromTable));
@@ -645,8 +638,6 @@ void WW8DocumentImpl::parseBinTableCpAndFcs(WW8BinTable & rTable,
                 bool bComplexFKP = mpPieceTable->isComplex(aFc);
                 aFc.setComplex(bComplexFKP);
 
-                //clog << "<fkpentry fc=\"" << aFc.toString() << "\"/>" << endl;
-
                 try
                 {
                     Cp aCp = mpPieceTable->fc2cp(aFc);
@@ -654,8 +645,6 @@ void WW8DocumentImpl::parseBinTableCpAndFcs(WW8BinTable & rTable,
                     CpAndFc aCpAndFc(aCp, aFc, eType_);
 
                     mCpAndFcs.insert(aCpAndFc);
-
-                    //clog << aCpAndFc << endl;
                 }
                 catch (ExceptionNotFound e)
                 {
@@ -667,11 +656,7 @@ void WW8DocumentImpl::parseBinTableCpAndFcs(WW8BinTable & rTable,
         {
             clog << e.getText() << endl;
         }
-
-        //clog << "</entry>" << endl;
     }
-
-    //clog << "</bintable>" << endl;
 }
 
 WW8Stream::Pointer_t WW8DocumentImpl::getSubStream
@@ -1660,15 +1645,6 @@ void WW8DocumentImpl::resolve(Stream & rStream)
 {
     if (! bSubDocument)
     {
-
-        //mpPieceTable->dump(clog);
-
-        //copy(mCpAndFcs.begin(), mCpAndFcs.end(), ostream_iterator<CpAndFc>(clog, ", "));
-
-        //mpDocStream->dump(output);
-
-        //output.addItem(mTextboxHeaderEndCpAndFc.toString());
-
 #if 1
         output.addItem("<substream-names>");
         output.addItem(mpStream->getSubStreamNames());
@@ -1719,7 +1695,6 @@ void WW8DocumentImpl::resolve(Stream & rStream)
         if (mpDffBlock.get() != NULL)
         {
             DffBlock * pTmp = new DffBlock(*mpDffBlock);
-            //pTmp->dump(clog);
             writerfilter::Reference<Properties>::Pointer_t pDffBlock =
                 writerfilter::Reference<Properties>::Pointer_t(pTmp);
 
diff --git a/writerfilter/source/doctok/WW8FKPImpl.cxx b/writerfilter/source/doctok/WW8FKPImpl.cxx
index ba4e204..b7ae5b0 100644
--- a/writerfilter/source/doctok/WW8FKPImpl.cxx
+++ b/writerfilter/source/doctok/WW8FKPImpl.cxx
@@ -139,7 +139,6 @@ WW8PAPFKPImpl::getProperties(const Fc & rFc) const
             }
             
             sal_uInt32 nOffsetEnd = nOffset + nCbPapx;
-            //sal_uInt32 nOffsetSprms = nOffsetIStd + 2;
             
             if (nCbPapx > 1 && nOffset + nCbPapx <= 511)
             {
diff --git a/writerfilter/source/doctok/WW8LFOTable.cxx b/writerfilter/source/doctok/WW8LFOTable.cxx
index 6e7eaff..b0d1b14 100644
--- a/writerfilter/source/doctok/WW8LFOTable.cxx
+++ b/writerfilter/source/doctok/WW8LFOTable.cxx
@@ -89,20 +89,6 @@ WW8LFO::get_LFOData()
     (new WW8LFOData(mpParent, nPayloadOffset, nPayloadSize));
 }
 
-/*
-writerfilter::Reference<Properties>::Pointer_t
-WW8LFO::get_lfolevel(sal_uInt32 nIndex)
-{
-    WW8LFOTable * pLFOTable = dynamic_cast<WW8LFOTable *>(mpParent);
-    sal_uInt32 nPayloadIndex = pLFOTable->getPayloadIndex(mnIndex) + nIndex;
-    sal_uInt32 nPayloadOffset = pLFOTable->getPayloadOffset(nPayloadIndex);
-    sal_uInt32 nPayloadSize = pLFOTable->getPayloadSize(nPayloadIndex);
-    
-    return writerfilter::Reference<Properties>::Pointer_t
-        (new WW8LFOLevel(mpParent, nPayloadOffset, nPayloadSize));
-}
-*/
-
 void WW8LFOLevel::resolveNoAuto(Properties & /*rHandler*/)
 {
     
diff --git a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx 
b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
index 1ab94cc..74f61d6 100644
--- a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
+++ b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
@@ -169,8 +169,6 @@ void WW8PropertiesReference::resolve(Properties & rHandler)
 {
     if (mpPropSet != NULL)
     {
-        //mpPropSet->dump(clog);
-
         if (mpPropSet->isPap())
         {
             WW8IntValue aValue(mpPropSet->get_istd());
diff --git a/writerfilter/source/doctok/WW8StreamImpl.hxx 
b/writerfilter/source/doctok/WW8StreamImpl.hxx
index 9240f39..479553a 100644
--- a/writerfilter/source/doctok/WW8StreamImpl.hxx
+++ b/writerfilter/source/doctok/WW8StreamImpl.hxx
@@ -54,8 +54,6 @@ public:
     virtual Sequence get(sal_uInt32 nOffset, sal_uInt32 nCount)
         const;
 
-    //virtual bool put(sal_uInt32 nOffset, const Sequence & rSeq);
-
     virtual string getSubStreamNames() const;
     virtual uno::Sequence<rtl::OUString> getSubStreamUNames() const;
 
diff --git a/writerfilter/source/doctok/WW8Text.cxx b/writerfilter/source/doctok/WW8Text.cxx
index 4676c48..6477cd9 100644
--- a/writerfilter/source/doctok/WW8Text.cxx
+++ b/writerfilter/source/doctok/WW8Text.cxx
@@ -68,11 +68,6 @@ WW8sprmPChgTabsPapx::get_tbdAdd(sal_uInt32 pos)
                     0x4 + get_dxaDel_count() * 2 + 1 + get_dxaAdd_count() * 2 
                     + pos, 1));
     return pRet;
-    
-/*    return writerfilter::Reference<Properties>::Pointer_t
-        (new WW8TBD(this, 
-                    0x4 + get_dxaDel_count() * 2 + 1 + get_dxaAdd_count() * 2 
-                    + pos, 1));*/
 }
 }}
 
diff --git a/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx 
b/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx
index 881e09f..64a249a 100644
--- a/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx
+++ b/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx
@@ -93,7 +93,6 @@ class MyRtfScannerHandler : public writerfilter::rtftok::RTFScannerHandler
     void dest(char* token, char* /*value*/)
     {
         destMap.insert(rtl::OString(token));
-//             printf("{\\*\\%s%s ", token, value);
         if (strcmp(token, "objdata")==0)
         {
             binBuffer.clear();
@@ -104,11 +103,10 @@ class MyRtfScannerHandler : public writerfilter::rtftok::RTFScannerHandler
     void ctrl(char*token, char* /*value*/)
     {
         ctrlMap.insert(rtl::OString(token));
-//             printf("\\%s%s ", token, value);
     }
     void lbrace(void)
     {
-//             printf("{");
+
     }
     void rbrace(void)
     {
@@ -127,29 +125,13 @@ class MyRtfScannerHandler : public writerfilter::rtftok::RTFScannerHandler
             o+=4; // dummy2
             unsigned int binLen=((unsigned int)binBuffer[o]) | ((unsigned int)binBuffer[o+1])<<8 | 
((unsigned int)binBuffer[o+2])<<16 | ((unsigned int)binBuffer[o+3]<<24); o+=4;
             printf("OLE%i \"%s\" type=%i recType=%i binBuffer.size()=%u len=%u\n", numOfOLEs, str, 
type, recType, (unsigned int)(binBuffer.size()), o+binLen);
-            //assert(binBuffer.size()==o+binLen);
             char buf[100];
             sprintf(buf, "ole%02i.ole", numOfOLEs);
-/*                     if 0{
-            FILE *f=fopen(buf, "w+b");
-            unsigned char *data=binBuffer.begin();
-            fwrite(data+o, 1, binLen, f);
-            fclose(f);
-            }*/
-/*
-            rtl_uString *dir=NULL;
-            osl_getProcessWorkingDir(&dir);
-            rtl::OUString absFileUrl;
-            rtl::OUString fileUrl=rtl::OUString::createFromAscii(buf);
-            osl_getAbsoluteFileURL(dir, fileUrl.pData, &absFileUrl.pData);
-            rtl_uString_release(dir);
-*/
+
                 comphelper::ByteSequence seq(binLen);
                 unsigned char *data0=binBufferStr;
                 memcpy(seq.getArray(), data0+o, binLen);
                 uno::Reference<io::XInputStream> myStream=new comphelper::SequenceInputStream(seq);
-//                     uno::Reference<io::XStream> 
myStream=xFileAccess->openFileReadWrite(absFileUrl);
-//                     uno::Reference<io::XStream> myStream(new MyStreamImpl(binBuffer, o));
             uno::Sequence< uno::Any > aArgs0( 1 );
             aArgs0[0] <<= myStream;
             uno::Reference< container::XNameContainer > xNameContainer(
@@ -184,7 +166,6 @@ class MyRtfScannerHandler : public writerfilter::rtftok::RTFScannerHandler
             {
                 printf("NOT OK\n");
                 comphelper::ByteSequence seq2(4+binLen);
-                //                             memcpy(seq2.getArray(), &binLen, 4); assert(0); 
//TODO linux
                 seq2[0]= sal::static_int_cast<sal_Int8>(binLen&0xFF);
                 seq2[1]= sal::static_int_cast<sal_Int8>((binLen>>8)&0xFF);
                 seq2[2]= sal::static_int_cast<sal_Int8>((binLen>>16)&0xFF);
@@ -221,21 +202,17 @@ class MyRtfScannerHandler : public writerfilter::rtftok::RTFScannerHandler
             numOfOLEs++;
         }
 #endif
-//             printf("}");
     }
     void addSpaces(int /*count*/)
     {
-//             for(int i=0;i<count;i++)
-//                     printf(" ");
 
     }
     void addBinData(unsigned char /*data*/)
     {
-//             printf("%02Xh", data);
+
     }
     void addChar(char ch)
     {
-//             printf("%c", ch);
         if (objDataLevel)
         {
             if (numOfOLEChars%2==0)
@@ -258,11 +235,11 @@ class MyRtfScannerHandler : public writerfilter::rtftok::RTFScannerHandler
     }
     void addCharU(sal_Unicode /*ch*/)
     {
-//             printf("\\u%i ", ch);
+
     }
     void addHexChar(char* /*hexch*/)
     {
-//             printf("\'%s ", hexch);
+
     }
 
 
@@ -417,7 +394,6 @@ sal_Int32 SAL_CALL ScannerTestService::run( const uno::Sequence< rtl::OUString >
         TimeValue t2; osl_getSystemTime(&t2);
         printf("time=%" SAL_PRIuUINT32 "s\n", t2.Seconds-t1.Seconds);
 
-//                     eventHandler.dump();
             uno::Reference<embed::XTransactedObject> xTransact(xStorage, uno::UNO_QUERY);
             xTransact->commit();
 
-- 
1.7.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.