summaryrefslogtreecommitdiff
path: root/i18npool/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-29 08:15:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-29 09:35:30 +0200
commit497e40ad03c27837978551ba15491c3fb2a0bf53 (patch)
treebaa53156ae5234b65f645e11e590c64e569c6284 /i18npool/inc
parent71112060e0930fc58087c3762e836b1e12b60f75 (diff)
improve refcounting loplugin
to find ref-counted classes being managed via other smart pointer classes. Hopefully prevent needing fixes like 642ae256ea5b8083ba0b3c097ca8ea52304b9cdb "ChangedUIEventListener is refcounted, mustn't be helt by unique_ptr" Change-Id: I6b0c5f8f87ce3546a8a1104ce1000470c09459bd Reviewed-on: https://gerrit.libreoffice.org/39378 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool/inc')
-rw-r--r--i18npool/inc/defaultnumberingprovider.hxx5
-rw-r--r--i18npool/inc/indexentrysupplier_common.hxx3
-rw-r--r--i18npool/inc/indexentrysupplier_default.hxx2
3 files changed, 6 insertions, 4 deletions
diff --git a/i18npool/inc/defaultnumberingprovider.hxx b/i18npool/inc/defaultnumberingprovider.hxx
index 0fe3ae4b6a5e..d487ec1c4914 100644
--- a/i18npool/inc/defaultnumberingprovider.hxx
+++ b/i18npool/inc/defaultnumberingprovider.hxx
@@ -23,9 +23,10 @@
#include <com/sun/star/text/XNumberingFormatter.hpp>
#include <com/sun/star/text/XNumberingTypeInfo.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <cppuhelper/implbase.hxx>
#include <com/sun/star/i18n/XTransliteration.hpp>
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
+#include <cppuhelper/implbase.hxx>
+#include <rtl/ref.hxx>
#include <transliterationImpl.hxx>
@@ -74,7 +75,7 @@ public:
private:
css::uno::Reference < css::uno::XComponentContext > m_xContext;
css::uno::Reference < css::container::XHierarchicalNameAccess > xHierarchicalNameAccess;
- std::unique_ptr<TransliterationImpl> translit;
+ rtl::Reference<TransliterationImpl> translit;
/// @throws css::uno::RuntimeException
OUString SAL_CALL makeNumberingIdentifier( sal_Int16 index );
/// @throws css::uno::RuntimeException
diff --git a/i18npool/inc/indexentrysupplier_common.hxx b/i18npool/inc/indexentrysupplier_common.hxx
index 74983cb3708d..bdd042fe779b 100644
--- a/i18npool/inc/indexentrysupplier_common.hxx
+++ b/i18npool/inc/indexentrysupplier_common.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <rtl/ref.hxx>
#include <collatorImpl.hxx>
#include <memory>
@@ -80,7 +81,7 @@ public:
protected:
const sal_Char * implementationName;
bool usePhonetic;
- std::unique_ptr<CollatorImpl>
+ rtl::Reference<CollatorImpl>
collator;
css::lang::Locale aLocale;
OUString aAlgorithm;
diff --git a/i18npool/inc/indexentrysupplier_default.hxx b/i18npool/inc/indexentrysupplier_default.hxx
index e2a6be7fe7f7..0de94706ac2f 100644
--- a/i18npool/inc/indexentrysupplier_default.hxx
+++ b/i18npool/inc/indexentrysupplier_default.hxx
@@ -97,7 +97,7 @@ public:
sal_Int16 mkeys[MAX_KEYS];
sal_Int16 mkey_count;
OUString skipping_chars;
- std::unique_ptr<CollatorImpl> collator;
+ rtl::Reference<CollatorImpl> collator;
sal_Int16 compare(sal_Unicode c1, sal_Unicode c2);
};