diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-05-07 09:55:21 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-05-07 09:55:46 +0200 |
commit | 1db2a898b057c35bc05d350317c294e4e9b34f50 (patch) | |
tree | e06f3de84c713ef8f18bc392f5b5e9befb3dfcc7 /writerperfect | |
parent | d41b17a5e0a47acea7e84a9c23092022c691d33b (diff) |
Remove unnecessary casts
Diffstat (limited to 'writerperfect')
-rw-r--r-- | writerperfect/source/wpdimp/WordPerfectImportFilter.cxx | 2 | ||||
-rw-r--r-- | writerperfect/source/wpgimp/WPGImportFilter.cxx | 7 | ||||
-rw-r--r-- | writerperfect/source/wpsimp/MSWorksImportFilter.cxx | 2 |
3 files changed, 4 insertions, 7 deletions
diff --git a/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx b/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx index d1ff550a3973..99e2f27b323b 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 cf00a99b1105..32cd57505465 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 152caba37549..dcff9ff5e12e 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; } |