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 /sc/source | |
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 'sc/source')
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/chart2uno.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/warnpassword.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbafont.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/vba/vbawindow.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/vba/vbawindows.cxx | 2 |
7 files changed, 13 insertions, 13 deletions
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 238da0d112e3..16f81fafac3d 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -5645,7 +5645,7 @@ void SAL_CALL ScCellRangeObj::filter( const uno::Reference<sheet::XSheetFilterDe //! wenn es schon ein ScFilterDescriptor ist, direkt per getImplementation? ScDocShell* pDocSh = GetDocShell(); - uno::Reference<ScFilterDescriptor> xImpl(new ScFilterDescriptor(pDocSh)); + rtl::Reference<ScFilterDescriptor> xImpl(new ScFilterDescriptor(pDocSh)); uno::Reference< sheet::XSheetFilterDescriptor2 > xDescriptor2( xDescriptor, uno::UNO_QUERY ); if ( xDescriptor2.is() ) { diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index afe109d3159f..784bacc89d31 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -3292,9 +3292,9 @@ uno::Reference< util::XCloneable > SAL_CALL ScChart2DataSequence::createClone() aTokensNew.push_back(p); } - uno::Reference<ScChart2DataSequence> p(new ScChart2DataSequence(m_pDocument, m_xDataProvider, std::move(aTokensNew), m_bIncludeHiddenCells)); + rtl::Reference<ScChart2DataSequence> p(new ScChart2DataSequence(m_pDocument, m_xDataProvider, std::move(aTokensNew), m_bIncludeHiddenCells)); p->CopyData(*this); - Reference< util::XCloneable > xClone(p); + Reference< util::XCloneable > xClone(p.get()); return xClone; } diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 064c8b699533..43f5897930fd 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2025,7 +2025,7 @@ void SAL_CALL ScModelObj::consolidate( // die Daten in ein ScConsolidationDescriptor Objekt zu kopieren: //! wenn es schon ein ScConsolidationDescriptor ist, direkt per getImplementation? - uno::Reference< ScConsolidationDescriptor > xImpl(new ScConsolidationDescriptor); + rtl::Reference< ScConsolidationDescriptor > xImpl(new ScConsolidationDescriptor); xImpl->setFunction( xDescriptor->getFunction() ); xImpl->setSources( xDescriptor->getSources() ); xImpl->setStartOutputPosition( xDescriptor->getStartOutputPosition() ); diff --git a/sc/source/ui/unoobj/warnpassword.cxx b/sc/source/ui/unoobj/warnpassword.cxx index 27a197f63e1b..b35a81cd561c 100644 --- a/sc/source/ui/unoobj/warnpassword.cxx +++ b/sc/source/ui/unoobj/warnpassword.cxx @@ -49,7 +49,7 @@ bool ScWarnPassword::WarningOnPassword( SfxMedium& rMedium ) InteractionClassification_QUERY, ERRCODE_SVX_EXPORT_FILTER_CRYPT))); - Reference< ucbhelper::SimpleInteractionRequest > xRequest + rtl::Reference< ucbhelper::SimpleInteractionRequest > xRequest = new ucbhelper::SimpleInteractionRequest( aException, ucbhelper::CONTINUATION_APPROVE diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx index a66198916a71..b5d3bd617e73 100644 --- a/sc/source/ui/vba/vbafont.cxx +++ b/sc/source/ui/vba/vbafont.cxx @@ -84,7 +84,7 @@ ScVbaFont::setSuperscript( const uno::Any& aValue ) throw ( uno::RuntimeExceptio for ( sal_Int32 row = 0; row < nRows; ++row ) { uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ) , uno::UNO_QUERY_THROW ); - uno::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) ); + rtl::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) ); aFont->setSuperscript( aValue ); } } @@ -124,7 +124,7 @@ ScVbaFont::getSuperscript() throw ( uno::RuntimeException, std::exception ) for ( sal_Int32 row = 0; row < nRows; ++row ) { uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ), uno::UNO_QUERY_THROW ); - uno::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) ); + rtl::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) ); if ( !col && !row ) aRes = aFont->getSuperscript(); else if ( aRes != aFont->getSuperscript() ) @@ -156,7 +156,7 @@ ScVbaFont::setSubscript( const uno::Any& aValue ) throw ( uno::RuntimeException, for ( sal_Int32 row = 0; row < nRows; ++row ) { uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ) , uno::UNO_QUERY_THROW ); - uno::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) ); + rtl::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) ); aFont->setSubscript( aValue ); } } @@ -198,7 +198,7 @@ ScVbaFont::getSubscript() throw ( uno::RuntimeException, std::exception ) for ( sal_Int32 row = 0; row < nRows; ++row ) { uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ), uno::UNO_QUERY_THROW ); - uno::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) ); + rtl::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) ); if ( !col && !row ) aRes = aFont->getSubscript(); else if ( aRes != aFont->getSubscript() ) diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index edd48dc1c4d7..8e46e0a52fbb 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -307,7 +307,7 @@ ScVbaWindow::getCaption() throw (uno::RuntimeException, std::exception) if ( ( nCrudLen + nCrudIndex ) == sTitle.getLength() ) { sTitle = sTitle.copy( 0, nCrudIndex ); - uno::Reference< ScVbaWorkbook > workbook( new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel ) ); + rtl::Reference< ScVbaWorkbook > workbook( new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel ) ); OUString sName = workbook->getName(); // rather bizarre hack to make sure the name behavior // is like XL @@ -439,7 +439,7 @@ ScVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeE void ScVbaWindow::Activate() throw (css::uno::RuntimeException, std::exception) { - uno::Reference<ScVbaWorkbook> workbook( new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel ) ); + rtl::Reference<ScVbaWorkbook> workbook( new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel ) ); workbook->Activate(); } @@ -447,7 +447,7 @@ ScVbaWindow::Activate() throw (css::uno::RuntimeException, std::exception) void ScVbaWindow::Close( const uno::Any& SaveChanges, const uno::Any& FileName, const uno::Any& RouteWorkBook ) throw (uno::RuntimeException, std::exception) { - uno::Reference< ScVbaWorkbook > workbook( new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel ) ); + rtl::Reference< ScVbaWorkbook > workbook( new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel ) ); workbook->Close(SaveChanges, FileName, RouteWorkBook ); } diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx index 230aaf51fc13..d3671345fea5 100644 --- a/sc/source/ui/vba/vbawindows.cxx +++ b/sc/source/ui/vba/vbawindows.cxx @@ -128,7 +128,7 @@ public: // !! TODO !! iterate over all controllers uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_SET_THROW ); uno::Reference< XHelperInterface > xTemp; // temporary needed for g++ 3.3.5 - uno::Reference< ScVbaWindow > window( new ScVbaWindow( xTemp, m_xContext, xModel, xController ) ); + rtl::Reference< ScVbaWindow > window( new ScVbaWindow( xTemp, m_xContext, xModel, xController ) ); OUString sCaption; window->getCaption() >>= sCaption; namesToIndices[ sCaption ] = nIndex++; |