[Libreoffice-commits] core.git: 2 commits - vcl/osx vcl/source vcl/unx vcl/workben winaccessibility/source writerfilter/qa writerfilter/source xmlhelp/source xmloff/source xmlsecurity/source xmlsecurity/workben
Noel Grandin
noel at peralex.com
Thu Nov 5 03:32:56 PST 2015
vcl/osx/DragSource.cxx | 4 -
vcl/osx/DropTarget.cxx | 4 -
vcl/osx/a11ycomponentwrapper.mm | 2
vcl/osx/a11ywrapper.mm | 24 ++++----
vcl/osx/service_entry.cxx | 2
vcl/source/filter/FilterConfigItem.cxx | 2
vcl/source/gdi/print.cxx | 2
vcl/source/opengl/OpenGLHelper.cxx | 2
vcl/unx/gtk/gdi/salprn-gtk.cxx | 14 ++--
vcl/unx/gtk/window/gtksalframe.cxx | 2
vcl/workben/mtfdemo.cxx | 3 -
vcl/workben/vcldemo.cxx | 3 -
winaccessibility/source/service/AccObject.cxx | 4 -
writerfilter/qa/cppunittests/rtftok/testrtftok.cxx | 2
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 26 +++------
writerfilter/source/dmapper/FormControlHelper.cxx | 6 +-
writerfilter/source/dmapper/GraphicImport.cxx | 2
writerfilter/source/dmapper/PropertyMap.cxx | 24 +++-----
writerfilter/source/dmapper/StyleSheetTable.cxx | 8 +-
xmlhelp/source/cxxhelp/provider/databases.cxx | 8 +-
xmlhelp/source/cxxhelp/provider/provider.hxx | 5 -
xmlhelp/source/cxxhelp/provider/resultset.cxx | 4 -
xmlhelp/source/cxxhelp/provider/resultsetbase.cxx | 3 -
xmlhelp/source/treeview/tvfactory.cxx | 6 --
xmlhelp/source/treeview/tvread.cxx | 2
xmloff/source/chart/SchXMLAxisContext.cxx | 4 -
xmloff/source/chart/SchXMLChartContext.cxx | 2
xmloff/source/chart/SchXMLExport.cxx | 4 -
xmloff/source/chart/SchXMLSeries2Context.cxx | 2
xmloff/source/chart/SchXMLSeriesHelper.cxx | 6 --
xmloff/source/chart/SchXMLTools.cxx | 3 -
xmloff/source/core/XMLEmbeddedObjectImportContext.cxx | 2
xmloff/source/core/xmlexp.cxx | 14 ++--
xmloff/source/core/xmlimp.cxx | 34 +++++-------
xmloff/source/core/xmluconv.cxx | 2
xmloff/source/draw/animationimport.cxx | 4 -
xmloff/source/draw/animimp.cxx | 2
xmloff/source/draw/layerimp.cxx | 2
xmloff/source/draw/ximp3dscene.cxx | 2
xmloff/source/draw/ximpgrp.cxx | 2
xmloff/source/draw/ximppage.cxx | 5 -
xmloff/source/draw/ximpshap.cxx | 16 ++---
xmloff/source/draw/ximpshow.cxx | 6 +-
xmloff/source/forms/elementimport.cxx | 4 -
xmloff/source/forms/elementimport_impl.hxx | 2
xmloff/source/forms/layerexport.cxx | 2
xmloff/source/meta/MetaExportComponent.cxx | 2
xmloff/source/meta/MetaImportComponent.cxx | 2
xmloff/source/meta/xmlversion.cxx | 2
xmloff/source/style/prstylei.cxx | 2
xmloff/source/style/styleexp.cxx | 4 -
xmloff/source/style/xmlnumi.cxx | 2
xmloff/source/text/XMLTextFrameContext.cxx | 2
xmloff/source/text/XMLTextMasterPageContext.cxx | 2
xmloff/source/text/txtflde.cxx | 2
xmloff/source/text/txtimp.cxx | 7 +-
xmloff/source/transform/OOo2Oasis.cxx | 2
xmlsecurity/source/component/documentdigitalsignatures.cxx | 4 -
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 2
xmlsecurity/source/framework/saxeventkeeperimpl.cxx | 6 --
xmlsecurity/source/helper/xsecctl.cxx | 6 +-
xmlsecurity/source/helper/xsecsign.cxx | 2
xmlsecurity/source/helper/xsecverify.cxx | 2
xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx | 2
xmlsecurity/source/xmlsec/nss/nssinitializer.cxx | 3 -
xmlsecurity/source/xmlsec/nss/xsec_nss.cxx | 4 -
xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx | 2
xmlsecurity/workben/signaturetest.cxx | 2
68 files changed, 162 insertions(+), 186 deletions(-)
New commits:
commit 9e8ff13eb2405f7e3dcb4f90cb38e9e4b1da2bd5
Author: Noel Grandin <noel at peralex.com>
Date: Thu Nov 5 13:26:24 2015 +0200
use uno::Reference::set method instead of assignment
Change-Id: I60e52ef2abc3107ba77e81811dfe1bffbfd77218
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index b9e47ea..16aff94 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -104,7 +104,7 @@ OUString Databases::expandURL( const OUString& aURL, Reference< uno::XComponentC
Reference< uri::XUriReference > uriRef;
for (;;)
{
- uriRef = Reference< uri::XUriReference >( xFac->parse( aRetURL ), UNO_QUERY );
+ uriRef.set( xFac->parse( aRetURL ), UNO_QUERY );
if ( uriRef.is() )
{
Reference < uri::XVndSunStarExpandUrl > sxUri( uriRef, UNO_QUERY );
@@ -138,7 +138,7 @@ Databases::Databases( bool showBasic,
vendVersion( "%VENDORVERSION" ),
vendShort( "%VENDORSHORT" )
{
- m_xSMgr = Reference< XMultiComponentFactory >( m_xContext->getServiceManager(), UNO_QUERY );
+ m_xSMgr.set( m_xContext->getServiceManager(), UNO_QUERY );
m_vAdd[0] = 12;
m_vAdd[1] = 15;
@@ -880,7 +880,7 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const OUString& jar,
if ( xIfc.is() )
{
- it->second = Reference< XHierarchicalNameAccess >( xIfc, UNO_QUERY );
+ it->second.set( xIfc, UNO_QUERY );
OSL_ENSURE( it->second.is(),
"ContentProvider::createPackage - "
@@ -1679,7 +1679,7 @@ Reference< XHierarchicalNameAccess > JarFileIterator::implGetJarFromPackage
if ( xIfc.is() )
{
- xNA = Reference< XHierarchicalNameAccess >( xIfc, UNO_QUERY );
+ xNA.set( xIfc, UNO_QUERY );
OSL_ENSURE( xNA.is(),
"JarFileIterator::implGetJarFromPackage() - "
diff --git a/xmlhelp/source/cxxhelp/provider/provider.hxx b/xmlhelp/source/cxxhelp/provider/provider.hxx
index f80ebe8..cd6cf86 100644
--- a/xmlhelp/source/cxxhelp/provider/provider.hxx
+++ b/xmlhelp/source/cxxhelp/provider/provider.hxx
@@ -118,11 +118,10 @@ namespace chelp {
// XConainerListener ( derive from XEventListener )
virtual void SAL_CALL
- disposing( const ::com::sun::star::lang::EventObject& Source )
+ disposing( const ::com::sun::star::lang::EventObject& /*Source*/ )
throw (::com::sun::star::uno::RuntimeException, std::exception) override
{
- (void)Source;
- m_xContainer = com::sun::star::uno::Reference<com::sun::star::container::XContainer>(0);
+ m_xContainer.clear();
}
virtual void SAL_CALL
diff --git a/xmlhelp/source/cxxhelp/provider/resultset.cxx b/xmlhelp/source/cxxhelp/provider/resultset.cxx
index 597392b..64b7d5f 100644
--- a/xmlhelp/source/cxxhelp/provider/resultset.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultset.cxx
@@ -53,12 +53,12 @@ DynamicResultSet::~DynamicResultSet()
void DynamicResultSet::initStatic()
{
- m_xResultSet1 = Reference< XResultSet >( m_pFactory->createResultSet() );
+ m_xResultSet1.set( m_pFactory->createResultSet() );
}
void DynamicResultSet::initDynamic()
{
- m_xResultSet1 = Reference< XResultSet >( m_pFactory->createResultSet() );
+ m_xResultSet1.set( m_pFactory->createResultSet() );
m_xResultSet2 = m_xResultSet1;
}
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
index 04e53e3..d7fa688 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
@@ -403,8 +403,7 @@ ResultSetBase::queryContentIdentifier(
{
OUString url = queryContentIdentifierString();
if( ! m_aIdents[m_nRow].is() && !url.isEmpty() )
- m_aIdents[m_nRow] = uno::Reference< ucb::XContentIdentifier >(
- new ::ucbhelper::ContentIdentifier( url ) );
+ m_aIdents[m_nRow].set( new ::ucbhelper::ContentIdentifier( url ) );
return m_aIdents[m_nRow];
}
diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx
index 81881f8..abb4d9b0 100644
--- a/xmlhelp/source/treeview/tvfactory.cxx
+++ b/xmlhelp/source/treeview/tvfactory.cxx
@@ -86,17 +86,15 @@ TVFactory::createInstance(
Reference< XInterface > SAL_CALL
TVFactory::createInstanceWithArguments(
- const OUString& ServiceSpecifier,
+ const OUString& /*ServiceSpecifier*/,
const Sequence< Any >& Arguments )
throw( Exception,
RuntimeException, std::exception )
{
- (void)ServiceSpecifier;
-
if( ! m_xHDS.is() )
{
cppu::OWeakObject* p = new TVChildTarget( m_xContext );
- m_xHDS = Reference< XInterface >( p );
+ m_xHDS.set( p );
}
Reference< XInterface > ret = m_xHDS;
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index 4cb3e40..28ad152 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -1142,7 +1142,7 @@ OUString TreeFileIterator::expandURL( const OUString& aURL )
Reference< uri::XUriReference > uriRef;
for (;;)
{
- uriRef = Reference< uri::XUriReference >( xFac->parse( aRetURL ), UNO_QUERY );
+ uriRef.set( xFac->parse( aRetURL ), UNO_QUERY );
if ( uriRef.is() )
{
Reference < uri::XVndSunStarExpandUrl > sxUri( uriRef, UNO_QUERY );
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx
index 7bae970..c480081 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -169,7 +169,7 @@ Reference< drawing::XShape > SchXMLAxisContext::getTitleShape()
break;
}
xDiaProp->setPropertyValue( aPropName, uno::makeAny(sal_True) );
- xResult = Reference< drawing::XShape >( xAxis->getAxisTitle(), uno::UNO_QUERY );
+ xResult.set( xAxis->getAxisTitle(), uno::UNO_QUERY );
return xResult;
}
@@ -433,7 +433,7 @@ void SchXMLAxisContext::CreateAxis()
return;
}
- m_xAxisProps = Reference<beans::XPropertySet>( lcl_getChartAxis( m_aCurrentAxis, m_xDiagram ), uno::UNO_QUERY );
+ m_xAxisProps.set( lcl_getChartAxis( m_aCurrentAxis, m_xDiagram ), uno::UNO_QUERY );
if( m_bAddMissingXAxisForNetCharts && m_aCurrentAxis.eDimension==SCH_XML_AXIS_Y && m_aCurrentAxis.nAxisIndex==0 )
{
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 08c05e8..b33438a 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -1080,7 +1080,7 @@ SvXMLImportContext* SchXMLChartContext::CreateChildContext(
{
uno::Reference< drawing::XDrawPageSupplier > xSupp( xDoc, uno::UNO_QUERY );
if( xSupp.is())
- mxDrawPage = uno::Reference< drawing::XShapes >( xSupp->getDrawPage(), uno::UNO_QUERY );
+ mxDrawPage.set( xSupp->getDrawPage(), uno::UNO_QUERY );
SAL_WARN_IF( !mxDrawPage.is(), "xmloff.chart", "Invalid Chart Page" );
}
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 9ecdffe..527be59 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -1586,7 +1586,7 @@ void SchXMLExportHelper_Impl::exportTable()
{
Reference< chart::XChartDocument > xChartDoc( mrExport.GetModel(), uno::UNO_QUERY );
if( xChartDoc.is() )
- xAnyDescriptionAccess = Reference< chart2::XAnyDescriptionAccess >( xChartDoc->getData(), uno::UNO_QUERY );
+ xAnyDescriptionAccess.set( xChartDoc->getData(), uno::UNO_QUERY );
}
if( bHasOwnData )
@@ -1856,7 +1856,7 @@ void SchXMLExportHelper_Impl::exportPlotArea(
std::unique_ptr<SvXMLElementExport> xElPlotArea;
// get property states for autostyles
- xPropSet = Reference< beans::XPropertySet >( xDiagram, uno::UNO_QUERY );
+ xPropSet.set( xDiagram, uno::UNO_QUERY );
if( xPropSet.is())
{
if( mxExpPropMapper.is())
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index fae7430..fcb0a91 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -229,7 +229,7 @@ Reference< chart2::data::XLabeledDataSequence2 > lcl_createAndAddSequenceToSerie
Sequence< Reference< chart2::data::XLabeledDataSequence > > aOldSeq( xSeriesSource->getDataSequences());
sal_Int32 nOldCount = aOldSeq.getLength();
Sequence< Reference< chart2::data::XLabeledDataSequence > > aNewSeq( nOldCount + 1 );
- aNewSeq[0] = Reference< chart2::data::XLabeledDataSequence >(xLabeledSeq, uno::UNO_QUERY_THROW);
+ aNewSeq[0].set(xLabeledSeq, uno::UNO_QUERY_THROW);
for( sal_Int32 nN=0; nN<nOldCount; nN++ )
aNewSeq[nN+1] = aOldSeq[nN];
xSeriesSink->setData( aNewSeq );
diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx
index 610a69a..b2024ff 100644
--- a/xmloff/source/chart/SchXMLSeriesHelper.cxx
+++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx
@@ -180,8 +180,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPISeriesProp
uno::Reference< lang::XMultiServiceFactory > xFactory( xChartModel, uno::UNO_QUERY );
if( xFactory.is() )
{
- xRet = uno::Reference< beans::XPropertySet >( xFactory->createInstance(
- "com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY );
+ xRet.set( xFactory->createInstance( "com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY );
Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY );
if(xInit.is())
{
@@ -215,8 +214,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPIDataPointP
uno::Reference< lang::XMultiServiceFactory > xFactory( xChartModel, uno::UNO_QUERY );
if( xFactory.is() )
{
- xRet = uno::Reference< beans::XPropertySet >( xFactory->createInstance(
- "com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY );
+ xRet.set( xFactory->createInstance( "com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY );
Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY );
if(xInit.is())
{
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index 6430427..0f16505 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -859,8 +859,7 @@ Reference< chart2::data::XDataProvider > getDataProviderFromParent( const Refere
const OUString * pEnd = pBegin + aServiceNames.getLength();
if( ::std::find( pBegin, pEnd, aDataProviderServiceName ) != pEnd )
{
- xRet = Reference< chart2::data::XDataProvider >(
- xFact->createInstance( aDataProviderServiceName ), uno::UNO_QUERY );
+ xRet.set( xFact->createInstance( aDataProviderServiceName ), uno::UNO_QUERY );
}
}
}
diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
index 10a4eda..8b597d5 100644
--- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
+++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
@@ -150,7 +150,7 @@ bool XMLEmbeddedObjectImportContext::SetComponent(
Reference< XComponentContext > xContext( GetImport().GetComponentContext() );
- xHandler = Reference < XDocumentHandler >(
+ xHandler.set(
xContext->getServiceManager()->createInstanceWithArgumentsAndContext(sFilterService, aArgs, xContext),
UNO_QUERY);
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 1bbbb98..70d392d 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -302,7 +302,7 @@ SvXMLExport_Impl::SvXMLExport_Impl()
void SvXMLExport::SetDocHandler( const uno::Reference< xml::sax::XDocumentHandler > &rHandler )
{
mxHandler = rHandler;
- mxExtHandler = uno::Reference<xml::sax::XExtendedDocumentHandler>( mxHandler, UNO_QUERY );
+ mxExtHandler.set( mxHandler, UNO_QUERY );
}
void SvXMLExport::_InitCtor()
@@ -599,7 +599,7 @@ SvXMLExport::~SvXMLExport()
void SAL_CALL SvXMLExport::setSourceDocument( const uno::Reference< lang::XComponent >& xDoc )
throw(lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{
- mxModel = uno::Reference< frame::XModel >::query( xDoc );
+ mxModel.set( xDoc, UNO_QUERY );
if( !mxModel.is() )
throw lang::IllegalArgumentException();
if (mxModel.is() && ! mxEventListener.is())
@@ -1336,15 +1336,15 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
{
if( !mxGraphicResolver.is() )
{
- mxGraphicResolver = Reference< XGraphicObjectResolver >::query(
- xFactory->createInstance( "com.sun.star.document.ExportGraphicObjectResolver" ));
+ mxGraphicResolver.set(
+ xFactory->createInstance( "com.sun.star.document.ExportGraphicObjectResolver" ), UNO_QUERY);
bOwnGraphicResolver = mxGraphicResolver.is();
}
if( !mxEmbeddedResolver.is() )
{
- mxEmbeddedResolver = Reference< XEmbeddedObjectResolver >::query(
- xFactory->createInstance( "com.sun.star.document.ExportEmbeddedObjectResolver" ));
+ mxEmbeddedResolver.set(
+ xFactory->createInstance( "com.sun.star.document.ExportEmbeddedObjectResolver" ), UNO_QUERY);
bOwnEmbeddedResolver = mxEmbeddedResolver.is();
}
}
@@ -1391,7 +1391,7 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
if( xTmpDocHandler.is() )
{
mxHandler = xTmpDocHandler;
- mxExtHandler = uno::Reference<xml::sax::XExtendedDocumentHandler>( mxHandler, UNO_QUERY );
+ mxExtHandler.set( mxHandler, UNO_QUERY );
}
}
catch(const com::sun::star::uno::Exception&)
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 88579a8..7b7c36c 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -508,19 +508,19 @@ void SAL_CALL SvXMLImport::startDocument()
{
if( !mxGraphicResolver.is() )
{
- mxGraphicResolver = Reference< XGraphicObjectResolver >::query(
- xFactory->createInstance(
- // #99870# Import... instead of Export...
- "com.sun.star.document.ImportGraphicObjectResolver"));
+ // #99870# Import... instead of Export...
+ mxGraphicResolver.set(
+ xFactory->createInstance("com.sun.star.document.ImportGraphicObjectResolver"),
+ UNO_QUERY);
mpImpl->mbOwnGraphicResolver = mxGraphicResolver.is();
}
if( !mxEmbeddedResolver.is() )
{
- mxEmbeddedResolver = Reference< XEmbeddedObjectResolver >::query(
- xFactory->createInstance(
- // #99870# Import... instead of Export...
- "com.sun.star.document.ImportEmbeddedObjectResolver"));
+ // #99870# Import... instead of Export...
+ mxEmbeddedResolver.set(
+ xFactory->createInstance("com.sun.star.document.ImportEmbeddedObjectResolver"),
+ UNO_QUERY);
mpImpl->mbOwnEmbeddedResolver = mxEmbeddedResolver.is();
}
}
@@ -910,7 +910,7 @@ void SvXMLImport::SetStatistics(const uno::Sequence< beans::NamedValue> &)
void SAL_CALL SvXMLImport::setTargetDocument( const uno::Reference< lang::XComponent >& xDoc )
throw(lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{
- mxModel = uno::Reference< frame::XModel >::query( xDoc );
+ mxModel.set( xDoc, UNO_QUERY );
if( !mxModel.is() )
throw lang::IllegalArgumentException();
@@ -1122,7 +1122,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetGradientHelper()
{
try
{
- mxGradientHelper = Reference< container::XNameContainer >( xServiceFact->createInstance(
+ mxGradientHelper.set( xServiceFact->createInstance(
"com.sun.star.drawing.GradientTable" ), UNO_QUERY);
}
catch( lang::ServiceNotRegisteredException& )
@@ -1145,7 +1145,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetHatchHelper()
{
try
{
- mxHatchHelper = Reference< container::XNameContainer >( xServiceFact->createInstance(
+ mxHatchHelper.set( xServiceFact->createInstance(
"com.sun.star.drawing.HatchTable" ), UNO_QUERY);
}
catch( lang::ServiceNotRegisteredException& )
@@ -1168,7 +1168,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetBitmapHelper()
{
try
{
- mxBitmapHelper = Reference< container::XNameContainer >( xServiceFact->createInstance(
+ mxBitmapHelper.set( xServiceFact->createInstance(
"com.sun.star.drawing.BitmapTable" ), UNO_QUERY);
}
catch( lang::ServiceNotRegisteredException& )
@@ -1191,7 +1191,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetTransGradientHelp
{
try
{
- mxTransGradientHelper = Reference< container::XNameContainer >( xServiceFact->createInstance(
+ mxTransGradientHelper.set( xServiceFact->createInstance(
"com.sun.star.drawing.TransparencyGradientTable" ), UNO_QUERY);
}
catch( lang::ServiceNotRegisteredException& )
@@ -1214,8 +1214,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetMarkerHelper()
{
try
{
- mxMarkerHelper = Reference< container::XNameContainer >( xServiceFact->createInstance(
- "com.sun.star.drawing.MarkerTable" ), UNO_QUERY);
+ mxMarkerHelper.set( xServiceFact->createInstance( "com.sun.star.drawing.MarkerTable" ), UNO_QUERY);
}
catch( lang::ServiceNotRegisteredException& )
{}
@@ -1237,8 +1236,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetDashHelper()
{
try
{
- mxDashHelper = Reference< container::XNameContainer >( xServiceFact->createInstance(
- "com.sun.star.drawing.DashTable" ), UNO_QUERY);
+ mxDashHelper.set( xServiceFact->createInstance( "com.sun.star.drawing.DashTable" ), UNO_QUERY);
}
catch( lang::ServiceNotRegisteredException& )
{}
@@ -1518,7 +1516,7 @@ ProgressBarHelper* SvXMLImport::GetProgressBarHelper()
void SvXMLImport::AddNumberStyle(sal_Int32 nKey, const OUString& rName)
{
if (!mxNumberStyles.is())
- mxNumberStyles = uno::Reference< container::XNameContainer >( comphelper::NameContainer_createInstance( ::cppu::UnoType<sal_Int32>::get()) );
+ mxNumberStyles.set( comphelper::NameContainer_createInstance( ::cppu::UnoType<sal_Int32>::get()) );
if (mxNumberStyles.is())
{
uno::Any aAny;
diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx
index eaded06..e0652bb 100644
--- a/xmloff/source/core/xmluconv.cxx
+++ b/xmloff/source/core/xmluconv.cxx
@@ -85,7 +85,7 @@ struct SvXMLUnitConverter::Impl
void SvXMLUnitConverter::Impl::createNumTypeInfo() const
{
Reference<XDefaultNumberingProvider> xDefNum = DefaultNumberingProvider::create(m_xContext);
- m_xNumTypeInfo = Reference<XNumberingTypeInfo>(xDefNum, uno::UNO_QUERY);
+ m_xNumTypeInfo.set(xDefNum, uno::UNO_QUERY);
}
const uno::Reference< text::XNumberingTypeInfo >&
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx
index fece4dd..becd540 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.cxx
@@ -701,7 +701,7 @@ AnimationNodeContext::AnimationNodeContext(
{
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- mxNode = Reference< XAnimationNode >(
+ mxNode.set(
xContext->getServiceManager()->createInstanceWithContext(OUString::createFromAscii(pServiceName), xContext),
UNO_QUERY_THROW );
@@ -1296,7 +1296,7 @@ AnimationsImport::AnimationsImport( const Reference< XComponentContext > & rxCon
GetXMLToken(XML_N_ANIMATION),
XML_NAMESPACE_ANIMATION);
- mxRootNode = Reference<XAnimationNode>( SequenceTimeContainer::create(rxContext), UNO_QUERY_THROW );
+ mxRootNode.set( SequenceTimeContainer::create(rxContext), UNO_QUERY_THROW );
}
AnimationsImport::~AnimationsImport() throw ()
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index 4226e69..04e910e 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -563,7 +563,7 @@ void XMLAnimationsEffectContext::EndElement()
Reference< XPropertySet > xSet;
if( mpImpl->maLastShapeId != maShapeId )
{
- xSet = Reference< XPropertySet >::query( GetImport().getInterfaceToIdentifierMapper().getReference( maShapeId ) );
+ xSet.set( GetImport().getInterfaceToIdentifierMapper().getReference( maShapeId ), UNO_QUERY );
if( xSet.is() )
{
// check for presentation shape service
diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx
index ea4547f..1324131 100644
--- a/xmloff/source/draw/layerimp.cxx
+++ b/xmloff/source/draw/layerimp.cxx
@@ -122,7 +122,7 @@ void SdXMLLayerContext::EndElement()
{
Reference< XLayerManager > xLayerManager( mxLayerManager, UNO_QUERY );
if( xLayerManager.is() )
- xLayer = Reference< XPropertySet >::query( xLayerManager->insertNewByIndex( xLayerManager->getCount() ) );
+ xLayer.set( xLayerManager->insertNewByIndex( xLayerManager->getCount() ), UNO_QUERY );
DBG_ASSERT( xLayer.is(), "xmloff::SdXMLLayerContext::EndElement(), failed to create new XLayer!" );
if( xLayer.is() )
diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx
index 15b7fb9..2bb82e0 100644
--- a/xmloff/source/draw/ximp3dscene.cxx
+++ b/xmloff/source/draw/ximp3dscene.cxx
@@ -111,7 +111,7 @@ void SdXML3DSceneShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
{
SetStyle();
- mxChildren = uno::Reference< drawing::XShapes >::query( mxShape );
+ mxChildren.set( mxShape, uno::UNO_QUERY );
if( mxChildren.is() )
GetImport().GetShapeImport()->pushGroupForSorting( mxChildren );
diff --git a/xmloff/source/draw/ximpgrp.cxx b/xmloff/source/draw/ximpgrp.cxx
index d97d349..4d62c92 100644
--- a/xmloff/source/draw/ximpgrp.cxx
+++ b/xmloff/source/draw/ximpgrp.cxx
@@ -88,7 +88,7 @@ void SdXMLGroupShapeContext::StartElement(const uno::Reference< xml::sax::XAttri
{
SetStyle( false );
- mxChildren = uno::Reference< drawing::XShapes >::query( mxShape );
+ mxChildren.set( mxShape, uno::UNO_QUERY );
if( mxChildren.is() )
GetImport().GetShapeImport()->pushGroupForSorting( mxChildren );
}
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index 678109e..3d33780 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -382,8 +382,7 @@ void SdXMLGenericPageContext::SetStyle( OUString& rStyleName )
Reference< lang::XMultiServiceFactory > xServiceFact(GetSdImport().GetModel(), uno::UNO_QUERY);
if(xServiceFact.is())
{
- xBackgroundSet = Reference< beans::XPropertySet >::query(
- xServiceFact->createInstance("com.sun.star.drawing.Background"));
+ xBackgroundSet.set(xServiceFact->createInstance("com.sun.star.drawing.Background"), UNO_QUERY);
}
}
@@ -595,7 +594,7 @@ void SdXMLGenericPageContext::SetNavigationOrder()
if( !aEnumerator.getNextToken(sId) )
break;
- aShapes[nIndex] = Reference< XShape >( rIdMapper.getReference( sId ), UNO_QUERY );
+ aShapes[nIndex].set( rIdMapper.getReference( sId ), UNO_QUERY );
}
for( nIndex = 0; nIndex < nCount; ++nIndex )
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index bf05af3..57edea2 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -259,7 +259,7 @@ void SdXMLShapeContext::addGluePoint( const uno::Reference< xml::sax::XAttribute
if( !xSupplier.is() )
return;
- mxGluePoints = uno::Reference< container::XIdentifierContainer >::query( xSupplier->getGluePoints() );
+ mxGluePoints.set( xSupplier->getGluePoints(), UNO_QUERY );
if( !mxGluePoints.is() )
return;
@@ -479,7 +479,7 @@ void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape)
}
}
- mxLockable = uno::Reference< document::XActionLockable >::query( xShape );
+ mxLockable.set( xShape, UNO_QUERY );
if( mxLockable.is() )
mxLockable->addActionLock();
@@ -503,7 +503,7 @@ void SdXMLShapeContext::AddShape(OUString const & serviceName)
if ( serviceName == "com.sun.star.drawing.OLE2Shape" &&
uno::Reference< text::XTextDocument >(GetImport().GetModel(), uno::UNO_QUERY).is() )
{
- xShape = uno::Reference< drawing::XShape >(xServiceFact->createInstance("com.sun.star.drawing.temporaryForXMLImportOLE2Shape"), uno::UNO_QUERY);
+ xShape.set(xServiceFact->createInstance("com.sun.star.drawing.temporaryForXMLImportOLE2Shape"), uno::UNO_QUERY);
}
else if (serviceName == "com.sun.star.drawing.GraphicObjectShape"
|| serviceName == "com.sun.star.drawing.MediaShape"
@@ -511,14 +511,12 @@ void SdXMLShapeContext::AddShape(OUString const & serviceName)
{
css::uno::Sequence<css::uno::Any> args(1);
args[0] <<= GetImport().GetDocumentBase();
- xShape = css::uno::Reference<css::drawing::XShape>(
- xServiceFact->createInstanceWithArguments(
- serviceName, args),
- css::uno::UNO_QUERY);
+ xShape.set( xServiceFact->createInstanceWithArguments(serviceName, args),
+ css::uno::UNO_QUERY);
}
else
{
- xShape = uno::Reference< drawing::XShape >(xServiceFact->createInstance(serviceName), uno::UNO_QUERY);
+ xShape.set(xServiceFact->createInstance(serviceName), uno::UNO_QUERY);
}
if( xShape.is() )
AddShape( xShape );
@@ -970,7 +968,7 @@ void SdXMLShapeContext::onDemandRescueUsefulDataFromTemporary( const SvXMLImport
if( !xSupplier.is() )
return;
- mxGluePoints = uno::Reference< container::XIdentifierContainer >::query( xSupplier->getGluePoints() );
+ mxGluePoints.set( xSupplier->getGluePoints(), UNO_QUERY );
if( !mxGluePoints.is() )
return;
diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx
index 3e154ec..2ecde45 100644
--- a/xmloff/source/draw/ximpshow.cxx
+++ b/xmloff/source/draw/ximpshow.cxx
@@ -72,16 +72,16 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
if( xShowsSupplier.is() )
{
mpImpl->mxShows = xShowsSupplier->getCustomPresentations();
- mpImpl->mxShowFactory = Reference< XSingleServiceFactory >::query( mpImpl->mxShows );
+ mpImpl->mxShowFactory.set( mpImpl->mxShows, UNO_QUERY );
}
Reference< XDrawPagesSupplier > xDrawPagesSupplier( rImport.GetModel(), UNO_QUERY );
if( xDrawPagesSupplier.is() )
- mpImpl->mxPages = Reference< XNameAccess >::query( xDrawPagesSupplier->getDrawPages() );
+ mpImpl->mxPages.set( xDrawPagesSupplier->getDrawPages(), UNO_QUERY );
Reference< XPresentationSupplier > xPresentationSupplier( rImport.GetModel(), UNO_QUERY );
if( xPresentationSupplier.is() )
- mpImpl->mxPresProps = Reference< XPropertySet >::query( xPresentationSupplier->getPresentation() );
+ mpImpl->mxPresProps.set( xPresentationSupplier->getPresentation(), UNO_QUERY );
if( mpImpl->mxPresProps.is() )
{
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index fec7bd2..cd10c32 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -619,7 +619,7 @@ namespace xmloff
Reference< XInterface > xPure = xContext->getServiceManager()->createInstanceWithContext(m_sServiceName, xContext);
OSL_ENSURE(xPure.is(),
OStringBuffer("OElementImport::createElement: service factory gave me no object (service name: ").append(OUStringToOString(m_sServiceName, RTL_TEXTENCODING_ASCII_US)).append(")!").getStr());
- xReturn = Reference< XPropertySet >(xPure, UNO_QUERY);
+ xReturn.set(xPure, UNO_QUERY);
}
else
OSL_FAIL("OElementImport::createElement: no service name to create an element!");
@@ -1853,7 +1853,7 @@ namespace xmloff
Reference< XCloneable > xCloneList(_rxAttrList, UNO_QUERY);
OSL_ENSURE(xCloneList.is(), "OColumnWrapperImport::StartElement: AttributeList not cloneable!");
if ( xCloneList.is() )
- m_xOwnAttributes = Reference< XAttributeList >(xCloneList->createClone(), UNO_QUERY);
+ m_xOwnAttributes.set(xCloneList->createClone(), UNO_QUERY);
OSL_ENSURE(m_xOwnAttributes.is(), "OColumnWrapperImport::StartElement: no cloned list!");
}
diff --git a/xmloff/source/forms/elementimport_impl.hxx b/xmloff/source/forms/elementimport_impl.hxx
index a9cfc99..d498594 100644
--- a/xmloff/source/forms/elementimport_impl.hxx
+++ b/xmloff/source/forms/elementimport_impl.hxx
@@ -59,7 +59,7 @@ inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
return xReturn;
// ensure that the object is a XNameContainer (we strongly need this for inserting child elements)
- m_xMeAsContainer = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >(xReturn, ::com::sun::star::uno::UNO_QUERY);
+ m_xMeAsContainer.set(xReturn, ::com::sun::star::uno::UNO_QUERY);
if (!m_xMeAsContainer.is())
{
OSL_FAIL("OContainerImport::createElement: invalid element (no XNameContainer) created!");
diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx
index 3a487a4..f0145f1 100644
--- a/xmloff/source/forms/layerexport.cxx
+++ b/xmloff/source/forms/layerexport.cxx
@@ -113,7 +113,7 @@ namespace xmloff
// nothing to do at all
return false;
- _rxForms = Reference< XIndexAccess >(xFormsSupp->getForms(), UNO_QUERY);
+ _rxForms.set(xFormsSupp->getForms(), UNO_QUERY);
Reference< XServiceInfo > xSI(_rxForms, UNO_QUERY); // order is important!
OSL_ENSURE(xSI.is(), "OFormLayerXMLExport_Impl::impl_isFormPageContainingForms: invalid collection (must not be NULL and must have a ServiceInfo)!");
if (!xSI.is())
diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx
index a9e0b3e..3f9d0eb 100644
--- a/xmloff/source/meta/MetaExportComponent.cxx
+++ b/xmloff/source/meta/MetaExportComponent.cxx
@@ -106,7 +106,7 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum )
aArgs[2] <<= GetModel();
// get filter component
- xDocHandler = uno::Reference< xml::sax::XDocumentHandler >(
+ xDocHandler.set(
xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
"com.sun.star.comp.Oasis2OOoTransformer", aArgs, xContext),
uno::UNO_QUERY_THROW );
diff --git a/xmloff/source/meta/MetaImportComponent.cxx b/xmloff/source/meta/MetaImportComponent.cxx
index 0ffcc128..326b84a 100644
--- a/xmloff/source/meta/MetaImportComponent.cxx
+++ b/xmloff/source/meta/MetaImportComponent.cxx
@@ -103,7 +103,7 @@ void SAL_CALL XMLMetaImportComponent::setTargetDocument(
const uno::Reference< lang::XComponent >& xDoc )
throw(lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{
- mxDocProps = uno::Reference< document::XDocumentProperties >::query( xDoc );
+ mxDocProps.set( xDoc, uno::UNO_QUERY );
if( !mxDocProps.is() )
throw lang::IllegalArgumentException(OUString(
"XMLMetaImportComponent::setTargetDocument: argument is no "
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index 8812f8e..236d03f 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -354,7 +354,7 @@ void SAL_CALL XMLVersionListPersistence::store( const uno::Reference< embed::XSt
xExp->exportDoc( ::xmloff::token::XML_VERSION );
- xVerStream = uno::Reference< io::XStream >(); // use refcounting for now to dispose
+ xVerStream.clear(); // use refcounting for now to dispose
}
catch( uno::Exception& )
{
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index da1cfbf..45723a9 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -241,7 +241,7 @@ Reference < XStyle > XMLPropStyleContext::Create()
Reference < XInterface > xIfc =
xFactory->createInstance( sServiceName );
if( xIfc.is() )
- xNewStyle = Reference < XStyle >( xIfc, UNO_QUERY );
+ xNewStyle.set( xIfc, UNO_QUERY );
}
}
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index 7ea0ba1..0625ce2 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -275,7 +275,7 @@ bool XMLStyleExport::exportStyle(
}
else
{
- xPropState = Reference< XPropertyState >( xStyles->getByName( aParentStyle ), UNO_QUERY );
+ xPropState.set( xStyles->getByName( aParentStyle ), UNO_QUERY );
if ( !xPropState.is() )
{
break;
@@ -287,7 +287,7 @@ bool XMLStyleExport::exportStyle(
}
else
{
- xStyle = Reference<XStyle>( xPropState, UNO_QUERY );
+ xStyle.set( xPropState, UNO_QUERY );
}
}
}
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index a99ef11..107fba2 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -1252,7 +1252,7 @@ Reference < XIndexReplace > SvxXMLListStyleContext::CreateNumRule(
if( !xIfc.is() )
return xNumRule;
- xNumRule = Reference<XIndexReplace>( xIfc, UNO_QUERY );
+ xNumRule.set( xIfc, UNO_QUERY );
DBG_ASSERT( xNumRule.is(), "go no numbering rule" );
return xNumRule;
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index 8a012ea..7680d1b 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -571,7 +571,7 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
Reference<XInterface> xIfc = xFactory->createInstance( sServiceName );
DBG_ASSERT( xIfc.is(), "couldn't create frame" );
if( xIfc.is() )
- xPropSet = Reference < XPropertySet >( xIfc, UNO_QUERY );
+ xPropSet.set( xIfc, UNO_QUERY );
}
}
}
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx
index 21eafe4..9d7290a 100644
--- a/xmloff/source/text/XMLTextMasterPageContext.cxx
+++ b/xmloff/source/text/XMLTextMasterPageContext.cxx
@@ -53,7 +53,7 @@ Reference < XStyle > XMLTextMasterPageContext::Create()
Reference < XInterface > xIfc =
xFactory->createInstance("com.sun.star.style.PageStyle");
if( xIfc.is() )
- xNewStyle = Reference < XStyle >( xIfc, UNO_QUERY );
+ xNewStyle.set( xIfc, UNO_QUERY );
}
return xNewStyle;
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 43478b0..0e96c95 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -2935,7 +2935,7 @@ bool XMLTextFieldExport::GetDependentFieldPropertySet(
{
// get first one and return
Reference<XDependentTextField> xTField = aFields[0];
- xField = Reference<XPropertySet>(xTField, UNO_QUERY);
+ xField.set(xTField, UNO_QUERY);
DBG_ASSERT(xField.is(),
"Surprisinlgy, this TextField refuses to be a PropertySet!");
return true;
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 2374fee..2fe6628 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1338,9 +1338,8 @@ static bool lcl_HasListStyle( const OUString& sStyleName,
}
else
{
- xPropState = Reference< XPropertyState >(
- xParaStyles->getByName( aParentStyle ),
- UNO_QUERY );
+ xPropState.set( xParaStyles->getByName( aParentStyle ),
+ UNO_QUERY );
if ( !xPropState.is() )
{
// error case
@@ -1379,7 +1378,7 @@ static bool lcl_HasListStyle( const OUString& sStyleName,
else
{
// search list style at parent
- xStyle = Reference<XStyle>( xPropState, UNO_QUERY );
+ xStyle.set( xPropState, UNO_QUERY );
}
}
}
diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx
index 5210021..3c22221 100644
--- a/xmloff/source/transform/OOo2Oasis.cxx
+++ b/xmloff/source/transform/OOo2Oasis.cxx
@@ -1942,7 +1942,7 @@ void SAL_CALL OOo2OasisTransformer::Initialize(
try
{
// get filter component
- xDocHandler = Reference< XDocumentHandler >(
+ xDocHandler.set(
xContext->getServiceManager()->createInstanceWithArgumentsAndContext(m_aSubServiceName, rArguments, xContext),
UNO_QUERY);
}
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 1b01baa..9ce81d6 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -210,7 +210,7 @@ bool DocumentDigitalSignatures::ImplViewSignatures(
{
Reference< io::XStream > xStream;
if ( xSignStream.is() )
- xStream = Reference< io::XStream >( xSignStream, UNO_QUERY );
+ xStream.set( xSignStream, UNO_QUERY );
return ImplViewSignatures( rxStorage, xStream, eMode, bReadOnly );
}
@@ -269,7 +269,7 @@ DocumentDigitalSignatures::ImplVerifySignatures(
{
aStreamHelper = DocumentSignatureHelper::OpenSignatureStream( rxStorage, embed::ElementModes::READ, eMode );
if ( aStreamHelper.xSignatureStream.is() )
- xInputStream = Reference< io::XInputStream >( aStreamHelper.xSignatureStream, UNO_QUERY );
+ xInputStream.set( aStreamHelper.xSignatureStream, UNO_QUERY );
}
if ( !xInputStream.is() )
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index ba2c30c..a1e0ce5 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -780,7 +780,7 @@ SignatureStreamHelper DigitalSignaturesDialog::ImplOpenSignatureStream(
if (nStreamOpenMode & css::embed::ElementModes::TRUNCATE)
{
//We write always into a new temporary stream.
- mxTempSignatureStream = Reference < css::io::XStream >(css::io::TempFile::create(mxCtx), UNO_QUERY_THROW);
+ mxTempSignatureStream.set(css::io::TempFile::create(mxCtx), UNO_QUERY_THROW);
aHelper.xSignatureStream = mxTempSignatureStream;
}
else
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
index 666063a..69a5ecd 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
@@ -1341,10 +1341,8 @@ void SAL_CALL SAXEventKeeperImpl::initialize( const cssu::Sequence< cssu::Any >&
OSL_ASSERT(aArguments.getLength() == 1);
aArguments[0] >>= m_xXMLDocument;
- m_xDocumentHandler = cssu::Reference< cssxs::XDocumentHandler >(
- m_xXMLDocument, cssu::UNO_QUERY );
- m_xCompressedDocumentHandler = cssu::Reference< cssxcsax::XCompressedDocumentHandler >(
- m_xXMLDocument, cssu::UNO_QUERY );
+ m_xDocumentHandler.set( m_xXMLDocument, cssu::UNO_QUERY );
+ m_xCompressedDocumentHandler.set( m_xXMLDocument, cssu::UNO_QUERY );
m_pRootBufferNode = new BufferNode(m_xXMLDocument->getCurrentElement());
m_pCurrentBufferNode = m_pRootBufferNode;
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx
index 774645f..666b67b 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -148,7 +148,7 @@ void XSecController::createXSecComponent( )
cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
- m_xXMLSignature = cssu::Reference< cssxc::XXMLSignature >(
+ m_xXMLSignature.set(
xMCF->createInstanceWithContext( sXMLSignature, mxCtx ),
cssu::UNO_QUERY );
@@ -158,7 +158,7 @@ void XSecController::createXSecComponent( )
* XMLSignature created successfully.
*/
{
- m_xXMLDocumentWrapper = cssu::Reference< cssxw::XXMLDocumentWrapper >(
+ m_xXMLDocumentWrapper.set(
xMCF->createInstanceWithContext( sXMLDocument, mxCtx ),
cssu::UNO_QUERY );
}
@@ -169,7 +169,7 @@ void XSecController::createXSecComponent( )
* XMLDocumentWrapper created successfully.
*/
{
- m_xSAXEventKeeper = cssu::Reference< cssxc::sax::XSecuritySAXEventKeeper >(
+ m_xSAXEventKeeper.set(
xMCF->createInstanceWithContext( sSAXEventKeeper, mxCtx ),
cssu::UNO_QUERY );
}
diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx
index e37836f..c1a7b09 100644
--- a/xmlsecurity/source/helper/xsecsign.cxx
+++ b/xmlsecurity/source/helper/xsecsign.cxx
@@ -74,7 +74,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
* create a SignatureCreator
*/
cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
- xReferenceResolvedListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
+ xReferenceResolvedListener.set(
xMCF->createInstanceWithContext(SIGNATURECREATOR_COMPONENT, mxCtx),
cssu::UNO_QUERY);
diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx
index 8666389..325279f5 100644
--- a/xmlsecurity/source/helper/xsecverify.cxx
+++ b/xmlsecurity/source/helper/xsecverify.cxx
@@ -60,7 +60,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
* create a SignatureVerifier
*/
cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
- xReferenceResolvedListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
+ xReferenceResolvedListener.set(
xMCF->createInstanceWithContext(SIGNATUREVERIFIER_COMPONENT, mxCtx),
cssu::UNO_QUERY);
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx b/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx
index 3af07cf..ece35be 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx
@@ -54,7 +54,7 @@ void* SAL_CALL mscrypt_component_getFactory( const sal_Char* pImplName , void* p
} else if( XMLEncryption_MSCryptImpl::impl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) ) {
xFactory = XMLEncryption_MSCryptImpl::impl_createFactory( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
} else if( SEInitializer_MSCryptImpl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) ) {
- xFactory = Reference< XSingleServiceFactory >( createSingleFactory(
+ xFactory.set( createSingleFactory(
reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
OUString::createFromAscii( pImplName ),
SEInitializer_MSCryptImpl_createInstance, SEInitializer_MSCryptImpl_getSupportedServiceNames() ) );
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index a61ebd6..71a3b87 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -193,8 +193,7 @@ OString getMozillaCurrentProfile( const css::uno::Reference< css::uno::XComponen
uno::Reference<uno::XInterface> xInstance = rxContext->getServiceManager()->createInstanceWithContext("com.sun.star.mozilla.MozillaBootstrap", rxContext);
OSL_ENSURE( xInstance.is(), "failed to create instance" );
- uno::Reference<mozilla::XMozillaBootstrap> xMozillaBootstrap
- = uno::Reference<mozilla::XMozillaBootstrap>(xInstance,uno::UNO_QUERY);
+ uno::Reference<mozilla::XMozillaBootstrap> xMozillaBootstrap(xInstance,uno::UNO_QUERY);
OSL_ENSURE( xMozillaBootstrap.is(), "failed to create instance" );
if (xMozillaBootstrap.is())
diff --git a/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx b/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
index f26f18a..35e8aa0 100644
--- a/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
@@ -50,7 +50,7 @@ void* SAL_CALL nss_component_getFactory( const sal_Char* pImplName , void* pServ
#ifdef XMLSEC_CRYPTO_NSS
if( SEInitializer_NssImpl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
{
- xFactory = Reference< XSingleServiceFactory >( createSingleFactory(
+ xFactory.set( createSingleFactory(
static_cast< XMultiServiceFactory * >( pServiceManager ),
OUString::createFromAscii( pImplName ),
SEInitializer_NssImpl_createInstance, SEInitializer_NssImpl_getSupportedServiceNames() ) );
@@ -74,7 +74,7 @@ void* SAL_CALL nss_component_getFactory( const sal_Char* pImplName , void* pServ
#else
if( ONSSInitializer_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
{
- xFactory = Reference< XSingleServiceFactory >( createSingleFactory(
+ xFactory.set( createSingleFactory(
reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
OUString::createFromAscii( pImplName ),
ONSSInitializer_createInstance, ONSSInitializer_getSupportedServiceNames() ) );
diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
index 55bcaba..f61dbfe 100644
--- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
@@ -214,7 +214,7 @@ void XMLDocumentWrapper_XmlSecImpl::sendStartElement(
******************************************************************************/
{
SvXMLAttributeList* pAttributeList = new SvXMLAttributeList();
- cssu::Reference < cssxs::XAttributeList > xAttrList = cssu::Reference< cssxs::XAttributeList > (pAttributeList);
+ cssu::Reference < cssxs::XAttributeList > xAttrList(pAttributeList);
xmlNsPtr pNsDef = pNode->nsDef;
diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx
index d16e946..42ac155 100644
--- a/xmlsecurity/workben/signaturetest.cxx
+++ b/xmlsecurity/workben/signaturetest.cxx
@@ -77,7 +77,7 @@ void Main();
return -1;
}
- xMSF = uno::Reference< lang::XMultiServiceFactory >(xCtx->getServiceManager(), uno::UNO_QUERY );
+ xMSF.set(xCtx->getServiceManager(), uno::UNO_QUERY );
if ( !xMSF.is() )
{
commit 281296330735158d6265e0b146b5d5301f6e610e
Author: Noel Grandin <noel at peralex.com>
Date: Thu Nov 5 12:55:32 2015 +0200
use uno::Reference::set method instead of assignment
Change-Id: I31a69a997098eb1807361b8049c3312a4f287d75
diff --git a/vcl/osx/DragSource.cxx b/vcl/osx/DragSource.cxx
index d2ce6d1..bc3ee97 100644
--- a/vcl/osx/DragSource.cxx
+++ b/vcl/osx/DragSource.cxx
@@ -123,7 +123,7 @@ Sequence<OUString> dragSource_getSupportedServiceNames()
bDropSuccess );
mDragSource->mXDragSrcListener->dragDropEnd(dsde);
- mDragSource->mXDragSrcListener = uno::Reference<XDragSourceListener>();
+ mDragSource->mXDragSrcListener.clear();
}
-(void)draggedImage:(NSImage *)draggedImage movedTo:(NSPoint)screenPoint
@@ -276,7 +276,7 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger,
[dragImage release];
- g_XTransferable = uno::Reference<XTransferable>();
+ g_XTransferable.clear();
g_DragSourceView = nil;
// reset drop success flags
diff --git a/vcl/osx/DropTarget.cxx b/vcl/osx/DropTarget.cxx
index 3c836ee..bd7467d 100644
--- a/vcl/osx/DropTarget.cxx
+++ b/vcl/osx/DropTarget.cxx
@@ -338,7 +338,7 @@ void DropTarget::concludeDragOperation(id /*sender*/)
{
mDragSourceSupportedActions = DNDConstants::ACTION_NONE;
mSelectedDropAction = DNDConstants::ACTION_NONE;
- mXCurrentDragClipboard = uno::Reference<XClipboard>();
+ mXCurrentDragClipboard.clear();
[[NSCursor arrowCursor] set];
}
@@ -438,7 +438,7 @@ void SAL_CALL DropTarget::dropComplete(sal_Bool success) throw (RuntimeException
{
// Reset the internal transferable used as shortcut in case this is
// an internal D&D operation
- DragSource::g_XTransferable = uno::Reference<XTransferable>();
+ DragSource::g_XTransferable.clear();
DragSource::g_DropSuccessSet = true;
DragSource::g_DropSuccess = success;
}
diff --git a/vcl/osx/a11ycomponentwrapper.mm b/vcl/osx/a11ycomponentwrapper.mm
index 5b61c12..d7d0327 100644
--- a/vcl/osx/a11ycomponentwrapper.mm
+++ b/vcl/osx/a11ycomponentwrapper.mm
@@ -85,7 +85,7 @@ using namespace ::com::sun::star::uno;
if ( rxParent.is() ) {
Reference < XAccessibleContext > rxContext = rxParent->getAccessibleContext();
if ( rxContext.is() && rxContext -> getAccessibleRole() == AccessibleRole::PANEL ) {
- Reference < XAccessibleComponent > rxComponent = Reference < XAccessibleComponent > ( rxParent -> getAccessibleContext(), UNO_QUERY );
+ Reference < XAccessibleComponent > rxComponent( rxParent -> getAccessibleContext(), UNO_QUERY );
if ( rxComponent.is() ) {
rxComponent -> grabFocus();
}
diff --git a/vcl/osx/a11ywrapper.mm b/vcl/osx/a11ywrapper.mm
index a90f917..cd6a28b 100644
--- a/vcl/osx/a11ywrapper.mm
+++ b/vcl/osx/a11ywrapper.mm
@@ -83,27 +83,27 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) {
// Querying all supported interfaces
try {
// XAccessibleComponent
- mpReferenceWrapper -> rAccessibleComponent = Reference < XAccessibleComponent > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleComponent.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleExtendedComponent
- mpReferenceWrapper -> rAccessibleExtendedComponent = Reference < XAccessibleExtendedComponent > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleExtendedComponent.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleSelection
- mpReferenceWrapper -> rAccessibleSelection = Reference< XAccessibleSelection > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleSelection.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleTable
- mpReferenceWrapper -> rAccessibleTable = Reference < XAccessibleTable > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleTable.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleText
- mpReferenceWrapper -> rAccessibleText = Reference < XAccessibleText > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleText.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleEditableText
- mpReferenceWrapper -> rAccessibleEditableText = Reference < XAccessibleEditableText > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleEditableText.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleValue
- mpReferenceWrapper -> rAccessibleValue = Reference < XAccessibleValue > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleValue.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleAction
- mpReferenceWrapper -> rAccessibleAction = Reference < XAccessibleAction > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleAction.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleTextAttributes
- mpReferenceWrapper -> rAccessibleTextAttributes = Reference < XAccessibleTextAttributes > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleTextAttributes.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleMultiLineText
- mpReferenceWrapper -> rAccessibleMultiLineText = Reference < XAccessibleMultiLineText > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleMultiLineText.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleTextMarkup
- mpReferenceWrapper -> rAccessibleTextMarkup = Reference < XAccessibleTextMarkup > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleTextMarkup.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleEventBroadcaster
#if 0
/* #i102033# NSAccessibility does not seemt to know an equivalent for transient children.
@@ -313,7 +313,7 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) {
AccessibleRelation relationMemberOf = rxAccessibleRelationSet -> getRelationByType ( AccessibleRelationType::MEMBER_OF );
if ( relationMemberOf.RelationType == AccessibleRelationType::MEMBER_OF && relationMemberOf.TargetSet.hasElements() ) {
for ( int index = 0; index < relationMemberOf.TargetSet.getLength(); index++ ) {
- Reference < XAccessible > rMateAccessible = Reference < XAccessible > ( relationMemberOf.TargetSet[index], UNO_QUERY );
+ Reference < XAccessible > rMateAccessible( relationMemberOf.TargetSet[index], UNO_QUERY );
if ( rMateAccessible.is() ) {
Reference< XAccessibleContext > rMateAccessibleContext( rMateAccessible -> getAccessibleContext() );
if ( rMateAccessibleContext.is() ) {
diff --git a/vcl/osx/service_entry.cxx b/vcl/osx/service_entry.cxx
index a8ac53c..3679d97 100644
--- a/vcl/osx/service_entry.cxx
+++ b/vcl/osx/service_entry.cxx
@@ -42,7 +42,7 @@ uno::Reference< XInterface > AquaSalInstance::CreateClipboard( const Sequence< A
SalData* pSalData = GetSalData();
if( ! pSalData->mxClipboard.is() )
- pSalData->mxClipboard = uno::Reference<XInterface>(static_cast< XClipboard* >(new AquaClipboard()), UNO_QUERY);
+ pSalData->mxClipboard.set(static_cast< XClipboard* >(new AquaClipboard()), UNO_QUERY);
return pSalData->mxClipboard;
}
diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx
index 34ad8af..a70a0c4 100644
--- a/vcl/source/filter/FilterConfigItem.cxx
+++ b/vcl/source/filter/FilterConfigItem.cxx
@@ -137,7 +137,7 @@ void FilterConfigItem::ImpInitTree( const OUString& rSubTree )
"com.sun.star.configuration.ConfigurationUpdateAccess",
aArguments );
if ( xUpdatableView.is() )
- xPropSet = Reference< XPropertySet >( xUpdatableView, UNO_QUERY );
+ xPropSet.set( xUpdatableView, UNO_QUERY );
}
catch ( ::com::sun::star::uno::Exception& )
{
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 88d118c..6b02440 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -157,7 +157,7 @@ bool PrinterOptions::ReadFromConfig( bool i_bFile )
else
aVal.Value <<= OUString( "/org.openoffice.Office.Common/Print/Option/Printer" );
aArgs.getArray()[0] <<= aVal;
- xConfigAccess = Reference< XNameAccess >(
+ xConfigAccess.set(
xConfigProvider->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationAccess", aArgs ),
UNO_QUERY );
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index ae42776..a051245 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -837,7 +837,7 @@ void OpenGLWatchdogThread::start()
{
assert (gxWatchdog == NULL);
gpWatchdogExit = osl_createCondition();
- gxWatchdog = rtl::Reference<OpenGLWatchdogThread>(new OpenGLWatchdogThread());
+ gxWatchdog.set(new OpenGLWatchdogThread());
gxWatchdog->launch();
}
diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx
index cf20b2c..ce4088b 100644
--- a/vcl/unx/gtk/gdi/salprn-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx
@@ -895,7 +895,7 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe
uno::Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );
uno::Reference < XFrame > xFrame(xDesktop->getActiveFrame());
if (!xFrame.is())
- xFrame = uno::Reference < XFrame >(xDesktop, UNO_QUERY);
+ xFrame.set(xDesktop, UNO_QUERY);
uno::Reference < XFilter > xFilter(
::comphelper::getProcessServiceFactory()->createInstance("com.sun.star.document.PDFFilter"),
@@ -908,7 +908,7 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe
if (xFrame.is())
xController = xFrame->getController();
if (xController.is())
- xDoc = uno::Reference< XComponent >(xController->getModel(), UNO_QUERY);
+ xDoc.set(xController->getModel(), UNO_QUERY);
SvFileStream aStream(rFileURL, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC);
uno::Reference< XOutputStream > xOStm(new utl::OOutputStreamWrapper(aStream));
@@ -954,15 +954,15 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe
uno::Reference< XNamed > xName;
if (xController.is())
- xSpreadsheetView = uno::Reference< XSpreadsheetView >(xController, UNO_QUERY);
+ xSpreadsheetView.set(xController, UNO_QUERY);
if (xSpreadsheetView.is())
- xSheet = uno::Reference< XSpreadsheet>(xSpreadsheetView->getActiveSheet());
+ xSheet.set(xSpreadsheetView->getActiveSheet());
if (xSheet.is())
- xName = uno::Reference < XNamed >(xSheet, UNO_QUERY);
+ xName.set(xSheet, UNO_QUERY);
if (xName.is())
- xSheetDoc = uno::Reference< XSpreadsheetDocument >(xController->getModel(), UNO_QUERY);
+ xSheetDoc.set(xController->getModel(), UNO_QUERY);
if (xSheetDoc.is())
- xSheets = uno::Reference< XIndexAccess >(xSheetDoc->getSheets(), UNO_QUERY);
+ xSheets.set(xSheetDoc->getSheets(), UNO_QUERY);
if (xSheets.is())
{
const OUString &rName = xName->getName();
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 929fa5e..8fe6152 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -592,7 +592,7 @@ static void activate_uno(GSimpleAction *action, GVariant*, gpointer)
uno::Reference < css::frame::XFrame > xFrame(xDesktop->getActiveFrame());
if (!xFrame.is())
- xFrame = uno::Reference < css::frame::XFrame >(xDesktop, uno::UNO_QUERY);
+ xFrame.set(xDesktop, uno::UNO_QUERY);
if (!xFrame.is())
return;
diff --git a/vcl/workben/mtfdemo.cxx b/vcl/workben/mtfdemo.cxx
index 4045527..3488a1e 100644
--- a/vcl/workben/mtfdemo.cxx
+++ b/vcl/workben/mtfdemo.cxx
@@ -130,8 +130,7 @@ protected:
uno::Reference<uno::XComponentContext> xComponentContext
= ::cppu::defaultBootstrap_InitialComponentContext();
- xMSF = uno::Reference<lang::XMultiServiceFactory>
- (xComponentContext->getServiceManager(), uno::UNO_QUERY);
+ xMSF.set(xComponentContext->getServiceManager(), uno::UNO_QUERY);
if(!xMSF.is())
Application::Abort("Bootstrap failure - no service manager");
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 1e7c5cc..0e98530 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1864,8 +1864,7 @@ protected:
{
uno::Reference<uno::XComponentContext> xComponentContext
= ::cppu::defaultBootstrap_InitialComponentContext();
- xMSF = uno::Reference<lang::XMultiServiceFactory>
- (xComponentContext->getServiceManager(), uno::UNO_QUERY);
+ xMSF.set(xComponentContext->getServiceManager(), uno::UNO_QUERY);
if(!xMSF.is())
Application::Abort("Bootstrap failure - no service manager");
diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx
index 17d35bd..050b83b 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -160,7 +160,7 @@ AccObject::AccObject(XAccessible* pAcc, AccObjectManagerAgent* pAgent,
ImplInitializeCreateObj();
m_xAccContextRef = m_xAccRef->getAccessibleContext();
- m_xAccActionRef = Reference< XAccessibleAction > (m_xAccContextRef,UNO_QUERY);
+ m_xAccActionRef.set(m_xAccContextRef,UNO_QUERY);
m_accRole = m_xAccContextRef -> getAccessibleRole();
if( m_pIMAcc )
{
@@ -302,7 +302,7 @@ void AccObject::UpdateDescription()
*/
void AccObject::UpdateAction()
{
- m_xAccActionRef = Reference< XAccessibleAction > (m_xAccContextRef,UNO_QUERY);
+ m_xAccActionRef.set(m_xAccContextRef,UNO_QUERY);
if( m_xAccActionRef.is() && m_pIMAcc )
{
diff --git a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
index 1f3a9b4..8c31f92 100644
--- a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
+++ b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
@@ -50,7 +50,7 @@ void RtfTest::setUp()
{
test::BootstrapFixture::setUp();
- m_xFilter = uno::Reference< document::XFilter >(m_xSFactory->createInstance("com.sun.star.comp.Writer.RtfFilter"), uno::UNO_QUERY_THROW);
+ m_xFilter.set(m_xSFactory->createInstance("com.sun.star.comp.Writer.RtfFilter"), uno::UNO_QUERY_THROW);
}
bool RtfTest::load(const OUString&,
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index c51d4ea..1c2778e 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -242,7 +242,7 @@ DomainMapper_Impl::DomainMapper_Impl(
{
appendTableManager( );
GetBodyText();
- uno::Reference< text::XTextAppend > xBodyTextAppend = uno::Reference< text::XTextAppend >( m_xBodyText, uno::UNO_QUERY );
+ uno::Reference< text::XTextAppend > xBodyTextAppend( m_xBodyText, uno::UNO_QUERY );
m_aTextAppendStack.push(TextAppendContext(xBodyTextAppend,
m_bIsNewDoc ? uno::Reference<text::XTextCursor>() : m_xBodyText->createTextCursorByRange(m_xInsertTextRange)));
@@ -301,8 +301,7 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::GetDocumentSettings()
{
if( !m_xDocumentSettings.is() && m_xTextFactory.is())
{
- m_xDocumentSettings = uno::Reference< beans::XPropertySet >(
- m_xTextFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY );
+ m_xDocumentSettings.set( m_xTextFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY );
}
return m_xDocumentSettings;
}
@@ -1447,7 +1446,7 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::appendTextSectionAfter(
static const char sSectionService[] = "com.sun.star.text.TextSection";
uno::Reference< text::XTextContent > xSection( m_xTextFactory->createInstance(sSectionService), uno::UNO_QUERY_THROW );
xSection->attach( uno::Reference< text::XTextRange >( xCursor, uno::UNO_QUERY_THROW) );
- xRet = uno::Reference< beans::XPropertySet > (xSection, uno::UNO_QUERY );
+ xRet.set(xSection, uno::UNO_QUERY );
}
catch(const uno::Exception&)
{
@@ -1719,9 +1718,8 @@ void DomainMapper_Impl::PushAnnotation()
m_bIsInComments = true;
if (!GetTextFactory().is())
return;
- m_xAnnotationField = uno::Reference< beans::XPropertySet >( GetTextFactory()->createInstance(
- "com.sun.star.text.TextField.Annotation" ),
- uno::UNO_QUERY_THROW );
+ m_xAnnotationField.set( GetTextFactory()->createInstance( "com.sun.star.text.TextField.Annotation" ),
+ uno::UNO_QUERY_THROW );
uno::Reference< text::XText > xAnnotationText;
m_xAnnotationField->getPropertyValue("TextRange") >>= xAnnotationText;
m_aTextAppendStack.push(TextAppendContext(uno::Reference< text::XTextAppend >( xAnnotationText, uno::UNO_QUERY_THROW ),
@@ -2607,16 +2605,14 @@ uno::Reference<beans::XPropertySet> DomainMapper_Impl::FindOrCreateFieldMaster(c
if(xFieldMasterAccess->hasByName(sFieldMasterName))
{
//get the master
- xMaster = uno::Reference< beans::XPropertySet >(xFieldMasterAccess->getByName(sFieldMasterName),
- uno::UNO_QUERY_THROW);
+ xMaster.set(xFieldMasterAccess->getByName(sFieldMasterName), uno::UNO_QUERY_THROW);
}
else
{
//create the master
- xMaster = uno::Reference< beans::XPropertySet >(
- m_xTextFactory->createInstance(sFieldMasterService), uno::UNO_QUERY_THROW);
+ xMaster.set( m_xTextFactory->createInstance(sFieldMasterService), uno::UNO_QUERY_THROW);
//set the master's name
- xMaster->setPropertyValue(
+ xMaster->setPropertyValue(
getPropertyName(PROP_NAME),
uno::makeAny(rFieldMasterName));
}
@@ -3623,7 +3619,7 @@ void DomainMapper_Impl::CloseFieldCommand()
if (m_xTextFactory.is())
{
xFieldInterface = m_xTextFactory->createInstance(sServiceName);
- xFieldProperties = uno::Reference< beans::XPropertySet >( xFieldInterface, uno::UNO_QUERY_THROW);
+ xFieldProperties.set( xFieldInterface, uno::UNO_QUERY_THROW);
}
}
switch( aIt->second.eFieldId )
@@ -4480,9 +4476,9 @@ void DomainMapper_Impl::PopFieldContext()
}
else
{
- xToInsert = uno::Reference< text::XTextContent >(pContext->GetTC(), uno::UNO_QUERY);
+ xToInsert.set(pContext->GetTC(), uno::UNO_QUERY);
if( !xToInsert.is() && !m_bStartTOC && !m_bStartIndex && !m_bStartBibliography )
- xToInsert = uno::Reference< text::XTextContent >(pContext->GetTextField(), uno::UNO_QUERY);
+ xToInsert.set( pContext->GetTextField(), uno::UNO_QUERY);
if( xToInsert.is() && !m_bStartTOC && !m_bStartIndex && !m_bStartBibliography)
{
PropertyMap aMap;
diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx
index 1e2d491..c35edcf 100644
--- a/writerfilter/source/dmapper/FormControlHelper.cxx
+++ b/writerfilter/source/dmapper/FormControlHelper.cxx
@@ -75,7 +75,7 @@ uno::Reference<drawing::XDrawPage> FormControlHelper::FormControlHelper_Impl::ge
uno::Reference<lang::XMultiServiceFactory> FormControlHelper::FormControlHelper_Impl::getServiceFactory()
{
if (! rServiceFactory.is())
- rServiceFactory = uno::Reference<lang::XMultiServiceFactory>(rTextDocument, uno::UNO_QUERY);
+ rServiceFactory.set(rTextDocument, uno::UNO_QUERY);
return rServiceFactory;
}
@@ -110,7 +110,7 @@ uno::Reference<form::XForm> FormControlHelper::FormControlHelper_Impl::getForm()
xFormProperties->setPropertyValue("Name", aAny);
}
- rForm = uno::Reference<form::XForm>(xForm, uno::UNO_QUERY);
+ rForm.set(xForm, uno::UNO_QUERY);
uno::Reference<container::XIndexContainer> xForms(xFormsNamedContainer, uno::UNO_QUERY);
uno::Any aAny(xForm);
@@ -157,7 +157,7 @@ bool FormControlHelper::createCheckbox(uno::Reference<text::XTextRange> const& x
if (!xInterface.is())
return false;
- m_pImpl->rFormComponent = uno::Reference<form::XFormComponent>(xInterface, uno::UNO_QUERY);
+ m_pImpl->rFormComponent.set(xInterface, uno::UNO_QUERY);
if (!m_pImpl->rFormComponent.is())
return false;
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index a384dea..9cd8852 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1143,7 +1143,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
uno::makeAny( m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR ?
text::TextContentAnchorType_AT_CHARACTER :
text::TextContentAnchorType_AS_CHARACTER ));
- xGraphicObject = uno::Reference< text::XTextContent >( xGraphicObjectProperties, uno::UNO_QUERY_THROW );
+ xGraphicObject.set( xGraphicObjectProperties, uno::UNO_QUERY_THROW );
//shapes have only one border
table::BorderLine2 aBorderLine;
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index afff853..536a00c 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -502,9 +502,8 @@ uno::Reference< beans::XPropertySet > SectionPropertyMap::GetPageStyle(
{
uno::Sequence< OUString > aPageStyleNames = xPageStyles->getElementNames();
m_sFirstPageStyleName = lcl_FindUnusedPageStyleName(aPageStyleNames);
- m_aFirstPageStyle = uno::Reference< beans::XPropertySet > (
- xTextFactory->createInstance("com.sun.star.style.PageStyle"),
- uno::UNO_QUERY);
+ m_aFirstPageStyle.set( xTextFactory->createInstance("com.sun.star.style.PageStyle"),
+ uno::UNO_QUERY);
// Call insertByName() before GetPageStyle(), otherwise the
// first and the follow page style will have the same name, and
@@ -530,9 +529,8 @@ uno::Reference< beans::XPropertySet > SectionPropertyMap::GetPageStyle(
{
uno::Sequence< OUString > aPageStyleNames = xPageStyles->getElementNames();
m_sFollowPageStyleName = lcl_FindUnusedPageStyleName(aPageStyleNames);
- m_aFollowPageStyle = uno::Reference< beans::XPropertySet > (
- xTextFactory->createInstance("com.sun.star.style.PageStyle"),
- uno::UNO_QUERY);
+ m_aFollowPageStyle.set( xTextFactory->createInstance("com.sun.star.style.PageStyle"),
+ uno::UNO_QUERY);
xPageStyles->insertByName( m_sFollowPageStyleName, uno::makeAny(m_aFollowPageStyle) );
}
else if(!m_aFollowPageStyle.is() && xPageStyles.is() )
@@ -959,10 +957,10 @@ uno::Reference<beans::XPropertySet> lcl_GetRangeProperties(bool bIsFirstSection,
{
uno::Reference<container::XEnumerationAccess> xEnumAccess(rDM_Impl.GetBodyText(), uno::UNO_QUERY_THROW);
uno::Reference<container::XEnumeration> xEnum = xEnumAccess->createEnumeration();
- xRangeProperties = uno::Reference<beans::XPropertySet>(xEnum->nextElement(), uno::UNO_QUERY_THROW);
+ xRangeProperties.set(xEnum->nextElement(), uno::UNO_QUERY_THROW);
}
else if (xStartingRange.is())
- xRangeProperties = uno::Reference<beans::XPropertySet>(xStartingRange, uno::UNO_QUERY_THROW);
+ xRangeProperties.set(xStartingRange, uno::UNO_QUERY_THROW);
return xRangeProperties;
}
@@ -1036,12 +1034,12 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
uno::Reference< beans::XPropertySet > xRangeProperties;
if( m_xStartingRange.is() )
{
- xRangeProperties = uno::Reference< beans::XPropertySet >( m_xStartingRange, uno::UNO_QUERY_THROW );
+ xRangeProperties.set( m_xStartingRange, uno::UNO_QUERY_THROW );
}
else
{
//set the start value at the beginning of the document
- xRangeProperties = uno::Reference< beans::XPropertySet >( rDM_Impl.GetTextDocument()->getText()->getStart(), uno::UNO_QUERY_THROW );
+ xRangeProperties.set( rDM_Impl.GetTextDocument()->getText()->getStart(), uno::UNO_QUERY_THROW );
}
xRangeProperties->setPropertyValue( getPropertyName( PROP_PARA_LINE_NUMBER_START_VALUE ), uno::makeAny( m_nLnnMin ));
}
@@ -1091,12 +1089,12 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
uno::Reference< beans::XPropertySet > xRangeProperties;
if( m_xStartingRange.is() )
{
- xRangeProperties = uno::Reference< beans::XPropertySet >( m_xStartingRange, uno::UNO_QUERY_THROW );
+ xRangeProperties.set( m_xStartingRange, uno::UNO_QUERY_THROW );
}
else
{
//set the start value at the beginning of the document
- xRangeProperties = uno::Reference< beans::XPropertySet >( rDM_Impl.GetTextDocument()->getText()->getStart(), uno::UNO_QUERY_THROW );
+ xRangeProperties.set( rDM_Impl.GetTextDocument()->getText()->getStart(), uno::UNO_QUERY_THROW );
}
xRangeProperties->setPropertyValue(getPropertyName(PROP_BREAK_TYPE), uno::makeAny(style::BreakType_COLUMN_BEFORE));
}
@@ -1193,7 +1191,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
try
{
uno::Reference< beans::XPropertySet > xDocProperties;
- xDocProperties = uno::Reference< beans::XPropertySet >( rDM_Impl.GetTextDocument(), uno::UNO_QUERY_THROW );
+ xDocProperties.set( rDM_Impl.GetTextDocument(), uno::UNO_QUERY_THROW );
bool bSquaredPageMode = false;
Insert(PROP_GRID_STANDARD_MODE, uno::makeAny( !bSquaredPageMode ));
xDocProperties->setPropertyValue("DefaultPageMode", uno::makeAny( bSquaredPageMode ));
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index c062917..31206a7 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -975,11 +975,11 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
else
{
bInsert = true;
- xStyle = uno::Reference< style::XStyle >(xDocFactory->createInstance(
- bParaStyle ?
+ xStyle.set(xDocFactory->createInstance(
+ bParaStyle ?
getPropertyName( PROP_SERVICE_PARA_STYLE ) :
(bListStyle ? OUString("com.sun.star.style.NumberingStyle") : getPropertyName( PROP_SERVICE_CHAR_STYLE ))),
- uno::UNO_QUERY_THROW);
+ uno::UNO_QUERY_THROW);
// Numbering styles have to be inserted early, as e.g. the NumberingRules property is only available after insertion.
if (bListStyle)
@@ -1493,7 +1493,7 @@ void StyleSheetTable::applyDefaults(bool bParaProperties)
try{
if(!m_pImpl->m_xTextDefaults.is())
{
- m_pImpl->m_xTextDefaults = uno::Reference< beans::XPropertySet>(
+ m_pImpl->m_xTextDefaults.set(
m_pImpl->m_rDMapper.GetTextFactory()->createInstance("com.sun.star.text.Defaults"),
uno::UNO_QUERY_THROW );
}
More information about the Libreoffice-commits
mailing list