summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2011-05-10 11:24:10 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2011-05-10 11:24:10 +0200
commitc5bf70f5a555e289de7f82896c06acdf8f2106aa (patch)
tree414640be13fca78464c79d5a01a8766e17db7d59 /writerperfect
parent3e34d5da0957264b85a29716f42df6a2730e6f19 (diff)
Don't allocate with new if not necessary
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/source/wpgimp/WPGImportFilter.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/writerperfect/source/wpgimp/WPGImportFilter.cxx b/writerperfect/source/wpgimp/WPGImportFilter.cxx
index 32cd57505465..6b6df43e1da8 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() )