[Libreoffice-commits] .: writerperfect/source
Fridrich Strba
fridrich at kemper.freedesktop.org
Tue May 10 02:24:28 PDT 2011
writerperfect/source/wpgimp/WPGImportFilter.cxx | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
New commits:
commit 747ba161b94dcf90131ef3bda6200b1c41e09340
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Tue May 10 11:24:10 2011 +0200
Don't allocate with new if not necessary
diff --git a/writerperfect/source/wpgimp/WPGImportFilter.cxx b/writerperfect/source/wpgimp/WPGImportFilter.cxx
index 32cd575..6b6df43 100644
--- a/writerperfect/source/wpgimp/WPGImportFilter.cxx
+++ b/writerperfect/source/wpgimp/WPGImportFilter.cxx
@@ -164,14 +164,11 @@ OUString SAL_CALL WPGImportFilter::detect( com::sun::star::uno::Sequence< Proper
pValue[i].Value >>= xInputStream;
}
- WPXInputStream* input = new WPXSvInputStream( xInputStream );
+ WPXSvInputStream input( xInputStream );
- if (libwpg::WPGraphics::isSupported(input))
+ if (libwpg::WPGraphics::isSupported(&input))
sTypeName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "draw_WordPerfect_Graphics" ) );
- if (input)
- delete input;
-
if (sTypeName.getLength())
{
if ( location == Descriptor.getLength() )
More information about the Libreoffice-commits
mailing list