summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/localedata/saxparser.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/i18npool/source/localedata/saxparser.cxx b/i18npool/source/localedata/saxparser.cxx
index d26ad504f7b9..d13e99bb7345 100644
--- a/i18npool/source/localedata/saxparser.cxx
+++ b/i18npool/source/localedata/saxparser.cxx
@@ -36,6 +36,7 @@
#include <cppuhelper/bootstrap.hxx>
#include <cppuhelper/implbase.hxx>
#include <tools/long.hxx>
+#include <rtl/ref.hxx>
#include "LocaleNode.hxx"
@@ -316,13 +317,10 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
int nError = 0;
// create and connect the document handler to the parser
- TestDocumentHandler *pDocHandler = new TestDocumentHandler( argv[1], argv[3]);
+ rtl::Reference<TestDocumentHandler> pDocHandler = new TestDocumentHandler( argv[1], argv[3]);
- Reference < XDocumentHandler > rDocHandler( static_cast<XDocumentHandler *>(pDocHandler) );
- Reference< XEntityResolver > rEntityResolver( static_cast<XEntityResolver *>(pDocHandler) );
-
- rParser->setDocumentHandler( rDocHandler );
- rParser->setEntityResolver( rEntityResolver );
+ rParser->setDocumentHandler( pDocHandler );
+ rParser->setEntityResolver( pDocHandler );
// create the input stream
InputSource source;