summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-26 16:02:39 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-31 06:25:45 +0000
commit0b23eec200c8c12db5778405df44f4bf8e38e4ad (patch)
treeee45856fe1781195c51f63835024865f283cdab8 /editeng
parent88c03cd07a171e05c7fb4dcade8baa28e7c5a770 (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')
-rw-r--r--editeng/qa/unit/core-test.cxx28
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx10
-rw-r--r--editeng/source/misc/svxacorr.cxx4
-rw-r--r--editeng/source/xml/xmltxtexp.cxx2
4 files changed, 22 insertions, 22 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);
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index b036de066c49..f17996fd4230 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -1596,7 +1596,7 @@ namespace accessibility
// SvxAccessibleTextPropertySet aPropSet( &GetEditSource(),
// ImplGetSvxCharAndParaPropertiesMap() );
// MT IA2 TODO: Check if this is the correct replacement for ImplGetSvxCharAndParaPropertiesMap
- uno::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(), ImplGetSvxTextPortionSvxPropertySet() ) );
+ rtl::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(), ImplGetSvxTextPortionSvxPropertySet() ) );
xPropSet->SetSelection( MakeSelection( 0, GetTextLen() ) );
rRes.Value = xPropSet->_getPropertyValue( rRes.Name, mnParagraphIndex );
@@ -1619,7 +1619,7 @@ namespace accessibility
else
{
// MT IA2 TODO: Check if this is the correct replacement for ImplGetSvxCharAndParaPropertiesMap
- uno::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(), ImplGetSvxTextPortionSvxPropertySet() ) );
+ rtl::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(), ImplGetSvxTextPortionSvxPropertySet() ) );
xPropSet->SetSelection( MakeSelection( 0, GetTextLen() ) );
rRes.Value = xPropSet->_getPropertyValue( rRes.Name, mnParagraphIndex );
rRes.State = xPropSet->_getPropertyState( rRes.Name, mnParagraphIndex );
@@ -2399,7 +2399,7 @@ namespace accessibility
// do the indices span the whole paragraph? Then use the outliner map
// TODO: hold it as a member?
- uno::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(),
+ rtl::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(),
0 == nStartIndex &&
rCacheTF.GetTextLen(nPara) == nEndIndex ?
ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() :
@@ -2464,7 +2464,7 @@ namespace accessibility
// get XPropertySetInfo for paragraph attributes and
// character attributes that span all the paragraphs text.
- uno::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(),
+ rtl::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(),
ImplGetSvxCharAndParaPropertiesSet() ) );
xPropSet->SetSelection( MakeSelection( 0, GetTextLen() ) );
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
@@ -2566,7 +2566,7 @@ namespace accessibility
else
CheckPosition(nIndex);
- uno::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(),
+ rtl::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(),
ImplGetSvxCharAndParaPropertiesSet() ) );
xPropSet->SetSelection( MakeSelection( nIndex ) );
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 5545432fd11c..86589673072a 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2060,7 +2060,7 @@ void SvxAutoCorrectLanguageLists::SaveExceptList_Imp(
xWriter->setOutputStream(xOut);
uno::Reference < xml::sax::XDocumentHandler > xHandler(xWriter, UNO_QUERY_THROW);
- uno::Reference< SvXMLExceptionListExport > xExp( new SvXMLExceptionListExport( xContext, rLst, sStrmName, xHandler ) );
+ rtl::Reference< SvXMLExceptionListExport > xExp( new SvXMLExceptionListExport( xContext, rLst, sStrmName, xHandler ) );
xExp->exportDoc( XML_BLOCK_LIST );
@@ -2427,7 +2427,7 @@ bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SotStorage& rStg )
xWriter->setOutputStream(xOut);
uno::Reference<xml::sax::XDocumentHandler> xHandler(xWriter, uno::UNO_QUERY);
- uno::Reference< SvXMLAutoCorrectExport > xExp( new SvXMLAutoCorrectExport( xContext, pAutocorr_List, sStrmName, xHandler ) );
+ rtl::Reference< SvXMLAutoCorrectExport > xExp( new SvXMLAutoCorrectExport( xContext, pAutocorr_List, sStrmName, xHandler ) );
xExp->exportDoc( XML_BLOCK_LIST );
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index 28e4f497ed8e..a291f76964af 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -395,7 +395,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection&
// SvxXMLTextExportComponent aExporter( &rEditEngine, rSel, aName, xHandler );
uno::Reference< xml::sax::XDocumentHandler > xHandler(xWriter, UNO_QUERY_THROW);
- uno::Reference< SvxXMLTextExportComponent > xExporter( new SvxXMLTextExportComponent( xContext, &rEditEngine, rSel, aName, xHandler ) );
+ rtl::Reference< SvxXMLTextExportComponent > xExporter( new SvxXMLTextExportComponent( xContext, &rEditEngine, rSel, aName, xHandler ) );
xExporter->exportDoc();