diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-05 09:05:29 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-05 09:59:30 +0200 |
commit | 1c3d3ffa81d1a451b5a694cff022df3c5c94ba8e (patch) | |
tree | 08f3672567dba72161354624743c046cd2cb081b /starmath | |
parent | c8782b39116eee3ddc3ef0a38c6f6dde09b6ec00 (diff) |
use uno::Reference::set method instead of assignment
Change-Id: Ib93d762cf523e0029bbed16e08beebd9f418ae24
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/mathmlexport.cxx | 16 | ||||
-rw-r--r-- | starmath/source/mathmlimport.cxx | 13 |
2 files changed, 9 insertions, 20 deletions
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index 2e557a7d87c9..1749b99be7fd 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -101,8 +101,7 @@ bool SmXMLExportWrapper::Export(SfxMedium &rMedium) uno::Reference< lang::XComponent > xModelComp(xModel, uno::UNO_QUERY ); bool bEmbedded = false; - uno::Reference <lang::XUnoTunnel> xTunnel; - xTunnel = uno::Reference <lang::XUnoTunnel> (xModel,uno::UNO_QUERY); + uno::Reference <lang::XUnoTunnel> xTunnel(xModel,uno::UNO_QUERY); SmModel *pModel = reinterpret_cast<SmModel *> (xTunnel->getSomething(SmModel::getUnoTunnelId())); @@ -294,9 +293,7 @@ bool SmXMLExportWrapper::WriteThroughComponent( uno::Sequence< PropertyValue > aProps(0); xFilter->filter( aProps ); - uno::Reference<lang::XUnoTunnel> xFilterTunnel; - xFilterTunnel = uno::Reference<lang::XUnoTunnel> - ( xFilter, uno::UNO_QUERY ); + uno::Reference<lang::XUnoTunnel> xFilterTunnel( xFilter, uno::UNO_QUERY ); SmXMLExport *pFilter = reinterpret_cast< SmXMLExport * >( sal::static_int_cast< sal_uIntPtr >( xFilterTunnel->getSomething( SmXMLExport::getUnoTunnelId() ))); @@ -436,8 +433,7 @@ sal_uInt32 SmXMLExport::exportDoc(enum XMLTokenEnum eClass) else { uno::Reference <frame::XModel> xModel = GetModel(); - uno::Reference <lang::XUnoTunnel> xTunnel; - xTunnel = uno::Reference <lang::XUnoTunnel> (xModel,uno::UNO_QUERY); + uno::Reference <lang::XUnoTunnel> xTunnel(xModel,uno::UNO_QUERY); SmModel *pModel = reinterpret_cast<SmModel *> (xTunnel->getSomething(SmModel::getUnoTunnelId())); @@ -475,8 +471,7 @@ sal_uInt32 SmXMLExport::exportDoc(enum XMLTokenEnum eClass) void SmXMLExport::_ExportContent() { uno::Reference <frame::XModel> xModel = GetModel(); - uno::Reference <lang::XUnoTunnel> xTunnel; - xTunnel = uno::Reference <lang::XUnoTunnel> (xModel,uno::UNO_QUERY); + uno::Reference <lang::XUnoTunnel> xTunnel(xModel,uno::UNO_QUERY); SmModel *pModel = reinterpret_cast<SmModel *> (xTunnel->getSomething(SmModel::getUnoTunnelId())); SmDocShell *pDocShell = pModel ? @@ -530,8 +525,7 @@ void SmXMLExport::GetViewSettings( Sequence < PropertyValue >& aProps) if ( !xModel.is() ) return; - uno::Reference <lang::XUnoTunnel> xTunnel; - xTunnel = uno::Reference <lang::XUnoTunnel> (xModel,uno::UNO_QUERY); + uno::Reference <lang::XUnoTunnel> xTunnel(xModel,uno::UNO_QUERY); SmModel *pModel = reinterpret_cast<SmModel *> (xTunnel->getSomething(SmModel::getUnoTunnelId())); diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index d8c635624c11..658b6b486878 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -95,8 +95,7 @@ sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium) uno::Reference<task::XStatusIndicator> xStatusIndicator; bool bEmbedded = false; - uno::Reference <lang::XUnoTunnel> xTunnel; - xTunnel = uno::Reference <lang::XUnoTunnel> (xModel,uno::UNO_QUERY); + uno::Reference <lang::XUnoTunnel> xTunnel(xModel,uno::UNO_QUERY); SmModel *pModel = reinterpret_cast<SmModel *> (xTunnel->getSomething(SmModel::getUnoTunnelId())); @@ -279,9 +278,7 @@ sal_uLong SmXMLImportWrapper::ReadThroughComponent( { xParser->parseStream( aParserInput ); - uno::Reference<lang::XUnoTunnel> xFilterTunnel; - xFilterTunnel = uno::Reference<lang::XUnoTunnel> - ( xFilter, uno::UNO_QUERY ); + uno::Reference<lang::XUnoTunnel> xFilterTunnel( xFilter, uno::UNO_QUERY ); SmXMLImport *pFilter = reinterpret_cast< SmXMLImport * >( sal::static_int_cast< sal_uIntPtr >( xFilterTunnel->getSomething( SmXMLImport::getUnoTunnelId() ))); @@ -491,8 +488,7 @@ void SmXMLImport::endDocument() if (NULL != (pTree = GetTree())) { uno::Reference <frame::XModel> xModel = GetModel(); - uno::Reference <lang::XUnoTunnel> xTunnel; - xTunnel = uno::Reference <lang::XUnoTunnel> (xModel,uno::UNO_QUERY); + uno::Reference <lang::XUnoTunnel> xTunnel(xModel,uno::UNO_QUERY); SmModel *pModel = reinterpret_cast<SmModel *> (xTunnel->getSomething(SmModel::getUnoTunnelId())); @@ -2896,8 +2892,7 @@ void SmXMLImport::SetViewSettings(const Sequence<PropertyValue>& aViewProps) if ( !xModel.is() ) return; - uno::Reference <lang::XUnoTunnel> xTunnel; - xTunnel = uno::Reference <lang::XUnoTunnel> (xModel,uno::UNO_QUERY); + uno::Reference <lang::XUnoTunnel> xTunnel(xModel,uno::UNO_QUERY); SmModel *pModel = reinterpret_cast<SmModel *> (xTunnel->getSomething(SmModel::getUnoTunnelId())); |