summaryrefslogtreecommitdiffstats
path: root/writerfilter/unocomponent
diff options
context:
space:
mode:
authorBálint Dózsa <dozsabalint@gmail.com>2011-02-14 17:21:49 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-02-14 17:49:00 +0100
commite7c76f4aba5fdf5b708ea4b309e837b021bc8eaf (patch)
tree3697a60b64e9d8b1a0485d5d2bdbdaea26da5c8f /writerfilter/unocomponent
parentthese variables are used, do not (void)var them (diff)
downloadcore-e7c76f4aba5fdf5b708ea4b309e837b021bc8eaf.tar.gz
core-e7c76f4aba5fdf5b708ea4b309e837b021bc8eaf.zip
Remove dead code
Diffstat (limited to 'writerfilter/unocomponent')
-rw-r--r--writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx31
1 files changed, 1 insertions, 30 deletions
diff --git a/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx b/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx
index c0726fb44c73..b4c977943935 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();