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 /editeng/qa | |
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 'editeng/qa')
-rw-r--r-- | editeng/qa/unit/core-test.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index d1c73af64bbc..d303805f0a0c 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -110,7 +110,7 @@ void Test::testUnoTextFields() { { // DATE - uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::DATE)); + rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::DATE)); uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames(); bool bGood = includes(aSvcs, "com.sun.star.text.textfield.DateTime"); CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood); @@ -118,7 +118,7 @@ void Test::testUnoTextFields() { // URL - uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::URL)); + rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::URL)); uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames(); bool bGood = includes(aSvcs, "com.sun.star.text.textfield.URL"); CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood); @@ -126,7 +126,7 @@ void Test::testUnoTextFields() { // PAGE - uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PAGE)); + rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PAGE)); uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames(); bool bGood = includes(aSvcs, "com.sun.star.text.textfield.PageNumber"); CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood); @@ -134,7 +134,7 @@ void Test::testUnoTextFields() { // PAGES - uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PAGES)); + rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PAGES)); uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames(); bool bGood = includes(aSvcs, "com.sun.star.text.textfield.PageCount"); CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood); @@ -142,7 +142,7 @@ void Test::testUnoTextFields() { // TIME - uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::TIME)); + rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::TIME)); uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames(); bool bGood = includes(aSvcs, "com.sun.star.text.textfield.DateTime"); CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood); @@ -150,7 +150,7 @@ void Test::testUnoTextFields() { // FILE - uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::DOCINFO_TITLE)); + rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::DOCINFO_TITLE)); uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames(); bool bGood = includes(aSvcs, "com.sun.star.text.textfield.docinfo.Title"); CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood); @@ -158,7 +158,7 @@ void Test::testUnoTextFields() { // TABLE - uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::TABLE)); + rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::TABLE)); uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames(); bool bGood = includes(aSvcs, "com.sun.star.text.textfield.SheetName"); CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood); @@ -166,7 +166,7 @@ void Test::testUnoTextFields() { // EXTENDED TIME - uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::EXTENDED_TIME)); + rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::EXTENDED_TIME)); uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames(); bool bGood = includes(aSvcs, "com.sun.star.text.textfield.DateTime"); CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood); @@ -174,7 +174,7 @@ void Test::testUnoTextFields() { // EXTENDED FILE - uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::EXTENDED_FILE)); + rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::EXTENDED_FILE)); uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames(); bool bGood = includes(aSvcs, "com.sun.star.text.textfield.FileName"); CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood); @@ -182,7 +182,7 @@ void Test::testUnoTextFields() { // AUTHOR - uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::AUTHOR)); + rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::AUTHOR)); uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames(); bool bGood = includes(aSvcs, "com.sun.star.text.textfield.Author"); CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood); @@ -190,7 +190,7 @@ void Test::testUnoTextFields() { // MEASURE - uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::MEASURE)); + rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::MEASURE)); uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames(); bool bGood = includes(aSvcs, "com.sun.star.text.textfield.Measure"); CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood); @@ -198,7 +198,7 @@ void Test::testUnoTextFields() { // PRESENTATION HEADER - uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PRESENTATION_HEADER)); + rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PRESENTATION_HEADER)); uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames(); bool bGood = includes(aSvcs, "com.sun.star.presentation.textfield.Header"); CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood); @@ -206,7 +206,7 @@ void Test::testUnoTextFields() { // PRESENTATION FOOTER - uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PRESENTATION_FOOTER)); + rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PRESENTATION_FOOTER)); uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames(); bool bGood = includes(aSvcs, "com.sun.star.presentation.textfield.Footer"); CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood); @@ -214,7 +214,7 @@ void Test::testUnoTextFields() { // PRESENTATION DATE TIME - uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PRESENTATION_DATE_TIME)); + rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PRESENTATION_DATE_TIME)); uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames(); bool bGood = includes(aSvcs, "com.sun.star.presentation.textfield.DateTime"); CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood); |