summaryrefslogtreecommitdiff
path: root/reportdesign/source
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-06-15 21:46:13 +0300
committerStephan Bergmann <sbergman@redhat.com>2019-06-17 08:56:36 +0200
commitadc295a1b2e1f2ed43e7eb587fc89d7229e0f122 (patch)
treed045a927d1f88d2574bdef441bc1cbc0b81fd16b /reportdesign/source
parentd39846bfd16ad9873795149c370a95f42363bfd9 (diff)
Add comphelper::getUnoTunnelImplementation template
Use it instead of classname::getImplementation from UNO3_GETIMPLEMENTATION_* Change-Id: Ifcc8cfcd6369c576250008c76ce31ba79ea3a596 Reviewed-on: https://gerrit.libreoffice.org/74107 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'reportdesign/source')
-rw-r--r--reportdesign/source/core/api/Shape.cxx2
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx2
-rw-r--r--reportdesign/source/core/sdr/RptPage.cxx2
-rw-r--r--reportdesign/source/core/sdr/UndoActions.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx6
-rw-r--r--reportdesign/source/ui/misc/RptUndo.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx4
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx2
8 files changed, 11 insertions, 11 deletions
diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx
index 5b59b8924b30..99f9d21ab1de 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -306,7 +306,7 @@ uno::Reference< util::XCloneable > SAL_CALL OShape::createClone( )
uno::Reference< report::XReportComponent> xSet;
try
{
- SvxShape* pShape = SvxShape::getImplementation( xSource );
+ SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xSource );
if ( pShape )
{
SdrObject* pObject = pShape->GetSdrObject();
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 0fe29d2d0252..bbfc0e47d41e 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -447,7 +447,7 @@ void OObjectBase::ensureSdrObjectOwnership( const uno::Reference< uno::XInterfac
// which are removed from it, which is deadly for us. To prevent this,
// we give the XShape implementation the ownership of the SdrObject, which
// ensures the SvxDrawPage won't delete it.
- SvxShape* pShape = SvxShape::getImplementation( _rxShape );
+ SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( _rxShape );
OSL_ENSURE( pShape, "OObjectBase::ensureSdrObjectOwnership: can't access the SvxShape!" );
if ( pShape )
{
diff --git a/reportdesign/source/core/sdr/RptPage.cxx b/reportdesign/source/core/sdr/RptPage.cxx
index d344397bd6db..c20f11f363cd 100644
--- a/reportdesign/source/core/sdr/RptPage.cxx
+++ b/reportdesign/source/core/sdr/RptPage.cxx
@@ -114,7 +114,7 @@ void OReportPage::insertObject(const uno::Reference< report::XReportComponent >&
if ( nPos < GetObjCount() )
return; // Object already in list
- SvxShape* pShape = SvxShape::getImplementation( _xObject );
+ SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( _xObject );
OObjectBase* pObject = pShape ? dynamic_cast< OObjectBase* >( pShape->GetSdrObject() ) : nullptr;
OSL_ENSURE( pObject, "OReportPage::insertObject: no implementation object found for the given shape/component!" );
if ( pObject )
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx
index db4418c4b34c..2c6ea11629b3 100644
--- a/reportdesign/source/core/sdr/UndoActions.cxx
+++ b/reportdesign/source/core/sdr/UndoActions.cxx
@@ -129,7 +129,7 @@ OUndoContainerAction::~OUndoContainerAction()
rEnv.RemoveElement( m_xOwnElement );
#if OSL_DEBUG_LEVEL > 0
- SvxShape* pShape = SvxShape::getImplementation( xChild );
+ SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xChild );
SdrObject* pObject = pShape ? pShape->GetSdrObject() : nullptr;
OSL_ENSURE( pObject == nullptr || (pShape->HasSdrObjectOwnership() && !pObject->IsInserted()),
"OUndoContainerAction::~OUndoContainerAction: inconsistency in the shape/object ownership!" );
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index 86b29c1f4e99..b2c4ace59a14 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -59,7 +59,7 @@ OUString lcl_createAttribute(const xmloff::token::XMLTokenEnum& _eNamespace,cons
static void lcl_correctCellAddress(const OUString & _sName, const uno::Reference< xml::sax::XAttributeList > & xAttribs)
{
- SvXMLAttributeList* pList = SvXMLAttributeList::getImplementation(xAttribs);
+ SvXMLAttributeList* pList = comphelper::getUnoTunnelImplementation<SvXMLAttributeList>(xAttribs);
OUString sCellAddress = pList->getValueByName(_sName);
const sal_Int32 nPos = sCellAddress.lastIndexOf('$');
if ( nPos != -1 )
@@ -206,7 +206,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const
bExport = false;
else if ( _sName == "chart:plot-area" )
{
- SvXMLAttributeList* pList = SvXMLAttributeList::getImplementation(xAttribs);
+ SvXMLAttributeList* pList = comphelper::getUnoTunnelImplementation<SvXMLAttributeList>(xAttribs);
pList->RemoveAttribute("table:cell-range-address");
}
else if ( _sName == "chart:categories" )
@@ -221,7 +221,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const
}
else if ( m_bTableRowsStarted && !m_bFirstRowExported && _sName == "table:table-cell" )
{
- SvXMLAttributeList* pList = SvXMLAttributeList::getImplementation(xAttribs);
+ SvXMLAttributeList* pList = comphelper::getUnoTunnelImplementation<SvXMLAttributeList>(xAttribs);
static OUString s_sValue(lcl_createAttribute(XML_NP_OFFICE,XML_VALUE));
pList->RemoveAttribute(s_sValue);
}
diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx
index 3bfd9d22ca80..1f53e763207a 100644
--- a/reportdesign/source/ui/misc/RptUndo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -131,7 +131,7 @@ OSectionUndo::~OSectionUndo()
rEnv.RemoveElement(xShape);
#if OSL_DEBUG_LEVEL > 0
- SvxShape* pShape = SvxShape::getImplementation( xShape );
+ SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xShape );
SdrObject* pObject = pShape ? pShape->GetSdrObject() : nullptr;
OSL_ENSURE( pShape && pShape->HasSdrObjectOwnership() && pObject && !pObject->IsInserted(),
"OSectionUndo::~OSectionUndo: inconsistency in the shape/object ownership!" );
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index d064f485f328..20cb5428e5c4 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -257,7 +257,7 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC
const uno::Reference<report::XReportComponent>* pCopiesEnd = pCopiesIter + aCopies.getLength();
for (;pCopiesIter != pCopiesEnd ; ++pCopiesIter)
{
- SvxShape* pShape = SvxShape::getImplementation( *pCopiesIter );
+ SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( *pCopiesIter );
SdrObject* pObject = pShape ? pShape->GetSdrObject() : nullptr;
if ( pObject )
{
@@ -507,7 +507,7 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I
uno::Reference< report::XReportComponent> xReportComponent(m_xSection->getByIndex(i),uno::UNO_QUERY_THROW);
awt::Point aPos = xReportComponent->getPosition();
awt::Size aSize = xReportComponent->getSize();
- SvxShape* pShape = SvxShape::getImplementation( xReportComponent );
+ SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xReportComponent );
SdrObject* pObject = pShape ? pShape->GetSdrObject() : nullptr;
if ( pObject )
{
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 6204f2808d8e..0ce9ecf3b984 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -617,7 +617,7 @@ void OViewsWindow::setMarked(const uno::Sequence< uno::Reference< report::XRepor
OSectionWindow* pSectionWindow = getSectionWindow(xSection);
if ( pSectionWindow )
{
- SvxShape* pShape = SvxShape::getImplementation( *pIter );
+ SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( *pIter );
SdrObject* pObject = pShape ? pShape->GetSdrObject() : nullptr;
OSL_ENSURE( pObject, "OViewsWindow::setMarked: no SdrObject for the shape!" );
if ( pObject )