diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-23 08:36:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-23 09:24:58 +0100 |
commit | 0bbb687d37f6493956259fe8486820618a28af0b (patch) | |
tree | 7e76bc0bb14dc1c0675007e00b4b663d5d778c82 /i18npool | |
parent | dff09e9021171c7a14bc751d17e27ceb211239cc (diff) |
loplugin:refcounting in i18npool
Change-Id: I48075fa6633436f0004e107721b37d2ca78baaf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111369
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/localedata/saxparser.cxx | 10 |
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; |