summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml/swxml.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/xml/swxml.cxx')
-rw-r--r--sw/source/filter/xml/swxml.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 31ee26289830..b679f111a3b6 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -159,11 +159,11 @@ ErrCode ReadThroughComponent(
if( !xFilter.is() )
return ERR_SWG_READ_ERROR;
// the underlying SvXMLImport implements XFastParser, XImporter, XFastDocumentHandler
- XFastParser* pFastParser = dynamic_cast<XFastParser*>(xFilter.get());
+ uno::Reference< xml::sax::XFastParser > xFastParser(xFilter, UNO_QUERY);
uno::Reference< xml::sax::XDocumentHandler > xDocumentHandler;
- if (!pFastParser)
+ if (!xFastParser)
xDocumentHandler.set(xFilter, UNO_QUERY);
- if (!xDocumentHandler && !pFastParser)
+ if (!xDocumentHandler && !xFastParser)
{
SAL_WARN("sd", "service does not implement XFastParser or XDocumentHandler");
assert(false);
@@ -177,8 +177,8 @@ ErrCode ReadThroughComponent(
// finally, parse the stream
try
{
- if (pFastParser)
- pFastParser->parseStream( aParserInput );
+ if (xFastParser)
+ xFastParser->parseStream( aParserInput );
else
{
uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(rxContext);