diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-26 16:02:39 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-31 06:25:45 +0000 |
commit | 0b23eec200c8c12db5778405df44f4bf8e38e4ad (patch) | |
tree | ee45856fe1781195c51f63835024865f283cdab8 /sax | |
parent | 88c03cd07a171e05c7fb4dcade8baa28e7c5a770 (diff) |
teach refcounting clang plugin about uno::Reference
uno::Reference is only allowed to used with classes that have a
::static_type member.
So convert all those places to rtl::Reference.
Maybe we need some LIBO_INTERNAL_ONLY constructors on rtl::Reference and
uno::Reference to make this a little smoother?
Change-Id: Icdcb35d71ca40a87b1dc474096776412adbfc7e3
Reviewed-on: https://gerrit.libreoffice.org/25516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sax')
-rw-r--r-- | sax/qa/cppunit/attributes.cxx | 3 | ||||
-rw-r--r-- | sax/qa/cppunit/parser.cxx | 4 | ||||
-rw-r--r-- | sax/qa/cppunit/xmlimport.cxx | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/sax/qa/cppunit/attributes.cxx b/sax/qa/cppunit/attributes.cxx index 3697190277ee..7bd09b5fe8e9 100644 --- a/sax/qa/cppunit/attributes.cxx +++ b/sax/qa/cppunit/attributes.cxx @@ -13,6 +13,7 @@ #include <cppunit/extensions/HelperMacros.h> #include <cppunit/plugin/TestPlugIn.h> +#include <rtl/ref.hxx> #include <sax/fastattribs.hxx> using namespace css; @@ -32,7 +33,7 @@ public: void AttributesTest::test() { - uno::Reference<sax_fastparser::FastAttributeList> xAttributeList( new sax_fastparser::FastAttributeList(nullptr) ); + rtl::Reference<sax_fastparser::FastAttributeList> xAttributeList( new sax_fastparser::FastAttributeList(nullptr) ); xAttributeList->add(1, "1"); xAttributeList->add(2, OString("2")); diff --git a/sax/qa/cppunit/parser.cxx b/sax/qa/cppunit/parser.cxx index 5381f36e060d..a94d5957c70d 100644 --- a/sax/qa/cppunit/parser.cxx +++ b/sax/qa/cppunit/parser.cxx @@ -45,8 +45,8 @@ public: class ParserTest: public test::BootstrapFixture { InputSource maInput; - uno::Reference< sax_fastparser::FastSaxParser > mxParser; - uno::Reference< DummyTokenHandler > mxTokenHandler; + rtl::Reference< sax_fastparser::FastSaxParser > mxParser; + rtl::Reference< DummyTokenHandler > mxTokenHandler; public: virtual void setUp() override; diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx index bf7cd1512513..ab8a7593bd34 100644 --- a/sax/qa/cppunit/xmlimport.cxx +++ b/sax/qa/cppunit/xmlimport.cxx @@ -194,7 +194,7 @@ class XMLImportTest : public test::BootstrapFixture { private: OUString m_sDirPath; - Reference< TestDocumentHandler > m_xDocumentHandler; + rtl::Reference< TestDocumentHandler > m_xDocumentHandler; Reference< xml::sax::XParser > m_xParser; Reference< lang::XMultiServiceFactory > m_xSMgr; @@ -217,7 +217,7 @@ void XMLImportTest::setUp() m_xSMgr = getMultiServiceFactory(); m_xParser = xml::sax::Parser::create( ::comphelper::getProcessComponentContext() ); - m_xParser->setDocumentHandler( m_xDocumentHandler ); + m_xParser->setDocumentHandler( m_xDocumentHandler.get() ); m_sDirPath = m_directories.getPathFromSrc( "/sax/qa/data/" ); } |