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 /svx | |
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 'svx')
-rw-r--r-- | svx/source/sdr/contact/viewcontactofgraphic.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx | 3 | ||||
-rw-r--r-- | svx/source/table/accessibletableshape.cxx | 20 | ||||
-rw-r--r-- | svx/source/xml/xmlxtexp.cxx | 2 |
4 files changed, 14 insertions, 13 deletions
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index ba0988978df7..8cb09022e000 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -268,7 +268,7 @@ namespace sdr aScale, fShearX, fRotate, aTranslate)); // directly create temp SdrBlockTextPrimitive2D - css::uno::Reference< drawinglayer::primitive2d::SdrBlockTextPrimitive2D > xBlockTextPrimitive(new drawinglayer::primitive2d::SdrBlockTextPrimitive2D( + rtl::Reference< drawinglayer::primitive2d::SdrBlockTextPrimitive2D > xBlockTextPrimitive(new drawinglayer::primitive2d::SdrBlockTextPrimitive2D( pSdrText, *pOPO, aTextRangeTransform, diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index c9cf3f59b9a8..ecedcea23397 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -25,6 +25,7 @@ #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/tools/canvastools.hxx> #include <drawinglayer/primitive2d/groupprimitive2d.hxx> +#include <rtl/ref.hxx> #include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx> @@ -84,7 +85,7 @@ namespace drawinglayer Primitive2DContainer SdrMeasurePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DContainer aRetval; - css::uno::Reference<SdrBlockTextPrimitive2D> xBlockText; + rtl::Reference<SdrBlockTextPrimitive2D> xBlockText; basegfx::B2DRange aTextRange; const basegfx::B2DVector aLine(getEnd() - getStart()); const double fDistance(aLine.getLength()); diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index cf50fcf3d002..b00e0bf20df4 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -84,8 +84,8 @@ public: Reference< XAccessible> mxAccessible; sal_Int32 mRowCount, mColCount; //get the cached AccessibleCell from XCell - Reference< AccessibleCell > getAccessibleCell (const Reference< XCell >& xCell); - Reference< AccessibleCell > getAccessibleCell (sal_Int32 nRow, sal_Int32 nColumn) throw (IndexOutOfBoundsException, RuntimeException); + rtl::Reference< AccessibleCell > getAccessibleCell (const Reference< XCell >& xCell); + rtl::Reference< AccessibleCell > getAccessibleCell (sal_Int32 nRow, sal_Int32 nColumn) throw (IndexOutOfBoundsException, RuntimeException); }; @@ -136,23 +136,23 @@ void AccessibleTableShapeImpl::dispose() //get the cached AccessibleCell from XCell -Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (const Reference< XCell >& xCell) +rtl::Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (const Reference< XCell >& xCell) { AccessibleCellMap::iterator iter( maChildMap.find( xCell ) ); if( iter != maChildMap.end() ) { - Reference< AccessibleCell > xChild( (*iter).second.get() ); + rtl::Reference< AccessibleCell > xChild( (*iter).second.get() ); return xChild; } - return Reference< AccessibleCell >(); + return rtl::Reference< AccessibleCell >(); } -Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (sal_Int32 nRow, sal_Int32 nColumn) +rtl::Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (sal_Int32 nRow, sal_Int32 nColumn) throw (IndexOutOfBoundsException, RuntimeException) { Reference< XCell > xCell( mxTable->getCellByPosition( nColumn, nRow ) ); - Reference< AccessibleCell > xChild = getAccessibleCell( xCell ); + rtl::Reference< AccessibleCell > xChild = getAccessibleCell( xCell ); if( !xChild.is() && mxTable.is() ) { @@ -164,7 +164,7 @@ Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (sal_Int xAccessibleCell->Init(); maChildMap[xCell] = xAccessibleCell; - xChild = Reference< AccessibleCell >( xAccessibleCell.get() ); + xChild = rtl::Reference< AccessibleCell >( xAccessibleCell.get() ); } return xChild; } @@ -918,7 +918,7 @@ void SAL_CALL AccessibleTableShape::selectionChanged (const EventObject& rEvent Reference< XCell > xCell(rEvent.Source, UNO_QUERY); if (xCell.is()) { - Reference< AccessibleCell > xAccCell = mxImpl->getAccessibleCell( xCell ); + rtl::Reference< AccessibleCell > xAccCell = mxImpl->getAccessibleCell( xCell ); if (xAccCell.is()) { sal_Int32 nIndex = xAccCell->getAccessibleIndexInParent(), @@ -946,7 +946,7 @@ void SAL_CALL AccessibleTableShape::selectionChanged (const EventObject& rEvent // Get the currently active cell which is text editing AccessibleCell* AccessibleTableShape::GetActiveAccessibleCell() { - Reference< AccessibleCell > xAccCell; + rtl::Reference< AccessibleCell > xAccCell; AccessibleCell* pAccCell = nullptr; SvxTableController* pController = getTableController(); if (pController) diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx index 171e27c36e90..d5998b34212a 100644 --- a/svx/source/xml/xmlxtexp.cxx +++ b/svx/source/xml/xmlxtexp.cxx @@ -293,7 +293,7 @@ bool SvxXMLXTableExportComponent::save( // Finally do the export const OUString aName; - uno::Reference< SvxXMLXTableExportComponent > xExporter( new SvxXMLXTableExportComponent( xContext, aName, xHandler, xTable, xGrfResolver ) ); + rtl::Reference< SvxXMLXTableExportComponent > xExporter( new SvxXMLXTableExportComponent( xContext, aName, xHandler, xTable, xGrfResolver ) ); bRet = xExporter->exportTable(); if( pGraphicHelper ) |