[Libreoffice-commits] .: writerperfect/source
Fridrich Strba
fridrich at kemper.freedesktop.org
Sat May 7 00:55:57 PDT 2011
writerperfect/source/wpdimp/WordPerfectImportFilter.cxx | 2 +-
writerperfect/source/wpgimp/WPGImportFilter.cxx | 7 ++-----
writerperfect/source/wpsimp/MSWorksImportFilter.cxx | 2 +-
3 files changed, 4 insertions(+), 7 deletions(-)
New commits:
commit 0db9e091e5072b5e7ce418eef77aeae434d0cb98
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Sat May 7 09:55:21 2011 +0200
Remove unnecessary casts
diff --git a/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx b/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx
index c9ca5a7..ab86baf 100644
--- a/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx
@@ -162,7 +162,7 @@ sal_Bool SAL_CALL WordPerfectImportFilter::importImpl( const Sequence< ::com::su
OdtGenerator collector(&xHandler, ODF_FLAT_XML);
collector.registerEmbeddedObjectHandler("image/x-wpg", &handleEmbeddedWPG);
- if (WPD_OK == WPDocument::parse(&input, static_cast<WPXDocumentInterface*>(&collector), (const char*)(aUtf8Passwd.getStr())))
+ if (WPD_OK == WPDocument::parse(&input, &collector, aUtf8Passwd.getStr()))
return sal_True;
return sal_False;
}
diff --git a/writerperfect/source/wpgimp/WPGImportFilter.cxx b/writerperfect/source/wpgimp/WPGImportFilter.cxx
index cf00a99..32cd575 100644
--- a/writerperfect/source/wpgimp/WPGImportFilter.cxx
+++ b/writerperfect/source/wpgimp/WPGImportFilter.cxx
@@ -118,13 +118,10 @@ sal_Bool SAL_CALL WPGImportFilter::filter( const Sequence< ::com::sun::star::bea
// writes to in-memory target doc
DocumentHandler xHandler(xInternalHandler);
- WPXInputStream* input = new WPXSvInputStream( xInputStream );
+ WPXSvInputStream input( xInputStream );
OdgGenerator exporter(&xHandler, ODF_FLAT_XML);
- bool tmpParseResult = libwpg::WPGraphics::parse(input, &exporter);
- if (input)
- delete input;
- xInputStream->closeInput();
+ bool tmpParseResult = libwpg::WPGraphics::parse(&input, &exporter);
return tmpParseResult;
}
diff --git a/writerperfect/source/wpsimp/MSWorksImportFilter.cxx b/writerperfect/source/wpsimp/MSWorksImportFilter.cxx
index 152caba..dcff9ff 100644
--- a/writerperfect/source/wpsimp/MSWorksImportFilter.cxx
+++ b/writerperfect/source/wpsimp/MSWorksImportFilter.cxx
@@ -115,7 +115,7 @@ sal_Bool SAL_CALL MSWorksImportFilter::importImpl( const Sequence< ::com::sun::s
WPXSvInputStream input( xInputStream );
OdtGenerator collector(&xHandler, ODF_FLAT_XML);
- if (WPS_OK == WPSDocument::parse(&input, static_cast<WPXDocumentInterface*>(&collector)))
+ if (WPS_OK == WPSDocument::parse(&input, &collector))
return sal_True;
return sal_False;
}
More information about the Libreoffice-commits
mailing list