[Libreoffice-commits] .: writerfilter/qa writerfilter/source writerfilter/unocomponent
Thomas Arnhold
tarnhold at kemper.freedesktop.org
Mon Feb 14 08:51:28 PST 2011
writerfilter/qa/cppunittests/doctok/testdoctok.cxx | 3
writerfilter/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 ----
writerfilter/source/doctok/WW8ResourceModelImpl.cxx | 2
writerfilter/source/doctok/WW8StreamImpl.hxx | 2
writerfilter/source/doctok/WW8Text.cxx | 5 -
writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx | 31 ----------
11 files changed, 1 insertion(+), 91 deletions(-)
New commits:
commit dfb93fb60c3b695062d3a7039b0892ffa72f3e92
Author: Bálint Dózsa <dozsabalint at gmail.com>
Date: Mon Feb 14 17:21:49 2011 +0100
Remove dead code
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..5081dae 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,9 @@ 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 +124,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 +165,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 +201,15 @@ 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 +232,9 @@ class MyRtfScannerHandler : public writerfilter::rtftok::RTFScannerHandler
}
void addCharU(sal_Unicode /*ch*/)
{
-// printf("\\u%i ", ch);
}
void addHexChar(char* /*hexch*/)
{
-// printf("\'%s ", hexch);
}
@@ -417,7 +389,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();
More information about the Libreoffice-commits
mailing list