summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-05-10 10:13:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-13 08:15:27 +0200
commita361231b1363d072d737e9b1d411b71aa9550d84 (patch)
tree08641fe2af10c1f22c7fd58e62f99b6dbe301c62 /xmloff
parentce76026231d9536d2025a1e69f435bcbf39fe4f8 (diff)
fix wrong SET/QUERY flags passed to uno::Reference
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx4
-rw-r--r--xmloff/source/draw/animationexport.cxx14
-rw-r--r--xmloff/source/draw/animationimport.cxx6
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx4
-rw-r--r--xmloff/source/draw/shapeexport.cxx8
-rw-r--r--xmloff/source/draw/ximpshap.cxx2
-rw-r--r--xmloff/source/style/XMLFontAutoStylePool.cxx2
-rw-r--r--xmloff/source/style/XMLFontStylesContext.cxx4
-rw-r--r--xmloff/source/table/XMLTableExport.cxx2
-rw-r--r--xmloff/source/text/txtparai.cxx2
10 files changed, 24 insertions, 24 deletions
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index 7d3f71cb6ca9..a81505752c3c 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -682,8 +682,8 @@ void copyProperties(
try
{
- Reference< beans::XPropertySetInfo > xSrcInfo( xSource->getPropertySetInfo(), uno::UNO_QUERY_THROW );
- Reference< beans::XPropertySetInfo > xDestInfo( xDestination->getPropertySetInfo(), uno::UNO_QUERY_THROW );
+ Reference< beans::XPropertySetInfo > xSrcInfo( xSource->getPropertySetInfo(), uno::UNO_SET_THROW );
+ Reference< beans::XPropertySetInfo > xDestInfo( xDestination->getPropertySetInfo(), uno::UNO_SET_THROW );
Sequence< beans::Property > aProperties( xSrcInfo->getProperties());
const sal_Int32 nLength = aProperties.getLength();
for( sal_Int32 i = 0; i < nLength; ++i )
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index b721d22fce90..e36109229975 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -527,9 +527,9 @@ static OUString lcl_StoreMediaAndGetURL(SvXMLExport & rExport, OUString const& r
uno::Reference<document::XStorageBasedDocument> const xSBD(
rExport.GetModel(), uno::UNO_QUERY_THROW);
uno::Reference<embed::XStorage> const xSource(
- xSBD->getDocumentStorage(), uno::UNO_QUERY_THROW);
+ xSBD->getDocumentStorage(), uno::UNO_SET_THROW);
uno::Reference<embed::XStorage> const xTarget(
- rExport.GetTargetStorage(), uno::UNO_QUERY_THROW);
+ rExport.GetTargetStorage(), uno::UNO_SET_THROW);
urlPath = rURL.copy(SAL_N_ELEMENTS(s_PkgScheme)-1);
@@ -687,7 +687,7 @@ void AnimationsExporterImpl::prepareNode( const Reference< XAnimationNode >& xNo
case AnimationNodeType::SEQ:
{
Reference< XEnumerationAccess > xEnumerationAccess( xNode, UNO_QUERY_THROW );
- Reference< XEnumeration > xEnumeration( xEnumerationAccess->createEnumeration(), UNO_QUERY_THROW );
+ Reference< XEnumeration > xEnumeration( xEnumerationAccess->createEnumeration(), css::uno::UNO_SET_THROW );
while( xEnumeration->hasMoreElements() )
{
Reference< XAnimationNode > xChildNode( xEnumeration->nextElement(), UNO_QUERY_THROW );
@@ -1062,7 +1062,7 @@ void AnimationsExporterImpl::exportContainer( const Reference< XTimeContainer >&
exportTransitionNode();
Reference< XEnumerationAccess > xEnumerationAccess( xContainer, UNO_QUERY_THROW );
- Reference< XEnumeration > xEnumeration( xEnumerationAccess->createEnumeration(), UNO_QUERY_THROW );
+ Reference< XEnumeration > xEnumeration( xEnumerationAccess->createEnumeration(), css::uno::UNO_SET_THROW );
while( xEnumeration->hasMoreElements() )
{
Reference< XAnimationNode > xChildNode( xEnumeration->nextElement(), UNO_QUERY_THROW );
@@ -1401,7 +1401,7 @@ Reference< XInterface > AnimationsExporterImpl::getParagraphTarget( const Paragr
{
Reference< XEnumerationAccess > xParaEnumAccess( pTarget.Shape, UNO_QUERY_THROW );
- Reference< XEnumeration > xEnumeration( xParaEnumAccess->createEnumeration(), UNO_QUERY_THROW );
+ Reference< XEnumeration > xEnumeration( xParaEnumAccess->createEnumeration(), css::uno::UNO_SET_THROW );
sal_Int32 nParagraph = pTarget.Paragraph;
while( xEnumeration->hasMoreElements() )
@@ -1678,13 +1678,13 @@ void AnimationsExporter::exportAnimations( const Reference< XAnimationNode >& xR
{
// first check if there are no animations
Reference< XEnumerationAccess > xEnumerationAccess( xRootNode, UNO_QUERY_THROW );
- Reference< XEnumeration > xEnumeration( xEnumerationAccess->createEnumeration(), UNO_QUERY_THROW );
+ Reference< XEnumeration > xEnumeration( xEnumerationAccess->createEnumeration(), css::uno::UNO_SET_THROW );
if( xEnumeration->hasMoreElements() )
{
// first child node may be an empty main sequence, check this
Reference< XAnimationNode > xMainNode( xEnumeration->nextElement(), UNO_QUERY_THROW );
Reference< XEnumerationAccess > xMainEnumerationAccess( xMainNode, UNO_QUERY_THROW );
- Reference< XEnumeration > xMainEnumeration( xMainEnumerationAccess->createEnumeration(), UNO_QUERY_THROW );
+ Reference< XEnumeration > xMainEnumeration( xMainEnumerationAccess->createEnumeration(), css::uno::UNO_SET_THROW );
// only export if the main sequence is not empty or if there are additional
// trigger sequences
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx
index 274032429cba..e6f8156fc58f 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.cxx
@@ -337,7 +337,7 @@ Any AnimationsImportHelperImpl::convertTarget( const OUString& rValue )
Reference< XTextRangeCompare > xTextRangeCompare( xShape, UNO_QUERY_THROW );
Reference< XEnumerationAccess > xParaEnumAccess( xShape, UNO_QUERY_THROW );
- Reference< XEnumeration > xEnumeration( xParaEnumAccess->createEnumeration(), UNO_QUERY_THROW );
+ Reference< XEnumeration > xEnumeration( xParaEnumAccess->createEnumeration(), UNO_SET_THROW );
sal_Int16 nParagraph = 0;
while( xEnumeration->hasMoreElements() )
@@ -1298,7 +1298,7 @@ void AnimationNodeContext::postProcessRootNode( const Reference< XAnimationNode
if( xRootNode.is() && xPageProps.is() ) try
{
Reference< XEnumerationAccess > xEnumerationAccess( xRootNode, UNO_QUERY_THROW );
- Reference< XEnumeration > xEnumeration( xEnumerationAccess->createEnumeration(), UNO_QUERY_THROW );
+ Reference< XEnumeration > xEnumeration( xEnumerationAccess->createEnumeration(), UNO_SET_THROW );
if( xEnumeration->hasMoreElements() )
{
Reference< XAnimationNode > xNode( xEnumeration->nextElement(), UNO_QUERY_THROW );
@@ -1309,7 +1309,7 @@ void AnimationNodeContext::postProcessRootNode( const Reference< XAnimationNode
{
// found transition node
Reference< XEnumerationAccess > xChildEnumerationAccess( xNode, UNO_QUERY_THROW );
- Reference< XEnumeration > xChildEnumeration( xChildEnumerationAccess->createEnumeration(), UNO_QUERY_THROW );
+ Reference< XEnumeration > xChildEnumeration( xChildEnumerationAccess->createEnumeration(), UNO_SET_THROW );
while( xChildEnumeration->hasMoreElements() )
{
Reference< XAnimationNode > xChildNode( xChildEnumeration->nextElement(), UNO_QUERY_THROW );
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 2ee81abcf686..7ef1932f588e 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2540,7 +2540,7 @@ void SdXMLExport::collectAnnotationAutoStyles( const Reference<XDrawPage>& xDraw
{
while( xAnnotationEnumeration->hasMoreElements() )
{
- Reference< XAnnotation > xAnnotation( xAnnotationEnumeration->nextElement(), UNO_QUERY_THROW );
+ Reference< XAnnotation > xAnnotation( xAnnotationEnumeration->nextElement(), UNO_SET_THROW );
Reference< XText > xText( xAnnotation->getTextRange() );
if(xText.is() && !xText->getString().isEmpty())
GetTextParagraphExport()->collectTextAutoStyles( xText );
@@ -2568,7 +2568,7 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage )
OUStringBuffer sStringBuffer;
do
{
- Reference< XAnnotation > xAnnotation( xAnnotationEnumeration->nextElement(), UNO_QUERY_THROW );
+ Reference< XAnnotation > xAnnotation( xAnnotationEnumeration->nextElement(), UNO_SET_THROW );
RealPoint2D aPosition( xAnnotation->getPosition() );
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index c10213a3d7a7..e6495a68da05 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -3218,7 +3218,7 @@ lcl_StoreMediaAndGetURL(SvXMLExport & rExport,
try // video is embedded
{
uno::Reference<embed::XStorage> const xTarget(
- rExport.GetTargetStorage(), uno::UNO_QUERY_THROW);
+ rExport.GetTargetStorage(), uno::UNO_SET_THROW);
uno::Reference<io::XInputStream> xInStream;
xPropSet->getPropertyValue("PrivateStream")
>>= xInStream;
@@ -4879,9 +4879,9 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape
}
else
{
- xStorage.set( GetExport().GetTargetStorage(), uno::UNO_QUERY_THROW );
+ xStorage.set( GetExport().GetTargetStorage(), uno::UNO_SET_THROW );
- xPictureStorage.set( xStorage->openStorageElement( "Pictures" , ::embed::ElementModes::READWRITE ), uno::UNO_QUERY_THROW );
+ xPictureStorage.set( xStorage->openStorageElement( "Pictures" , ::embed::ElementModes::READWRITE ), uno::UNO_SET_THROW );
sal_Int32 nIndex = 0;
do
@@ -4890,7 +4890,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape
}
while( xPictureStorage->hasByName( sPictureName ) );
- xPictureStream.set( xPictureStorage->openStreamElement( sPictureName, ::embed::ElementModes::READWRITE ), uno::UNO_QUERY_THROW );
+ xPictureStream.set( xPictureStorage->openStreamElement( sPictureName, ::embed::ElementModes::READWRITE ), uno::UNO_SET_THROW );
}
uno::Reference< graphic::XGraphicProvider > xProvider( graphic::GraphicProvider::create(xContext) );
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 43ca70cb59ed..6b19c48742c2 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -378,7 +378,7 @@ void SdXMLShapeContext::EndElement()
if( xEventsSupplier.is() )
{
- Reference< XNameReplace > xEvents( xEventsSupplier->getEvents(), UNO_QUERY_THROW );
+ Reference< XNameReplace > xEvents( xEventsSupplier->getEvents(), UNO_SET_THROW );
uno::Sequence< beans::PropertyValue > aProperties( 3 );
aProperties[0].Name = "EventType";
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index e0d11241be4d..407f1ae8ecc6 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -605,7 +605,7 @@ OUString XMLFontAutoStylePool::embedFontFile(OUString const & fileUrl, OUString
uno::Reference< embed::XStorage > storage;
storage.set( GetExport().GetTargetStorage()->openStorageElement( "Fonts",
- ::embed::ElementModes::WRITE ), uno::UNO_QUERY_THROW );
+ ::embed::ElementModes::WRITE ), uno::UNO_SET_THROW );
OUString name = getFreeFontName(storage, rFamilyName);
diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx
index b56460353b0b..ba57fea0da03 100644
--- a/xmloff/source/style/XMLFontStylesContext.cxx
+++ b/xmloff/source/style/XMLFontStylesContext.cxx
@@ -317,10 +317,10 @@ void XMLFontStyleContextFontFaceUri::handleEmbeddedFont( const OUString& url, bo
if( GetImport().IsPackageURL( url ))
{
uno::Reference< embed::XStorage > storage;
- storage.set( GetImport().GetSourceStorage(), UNO_QUERY_THROW );
+ storage.set( GetImport().GetSourceStorage(), UNO_SET_THROW );
if( url.indexOf( '/' ) > -1 ) // TODO what if more levels?
storage.set( storage->openStorageElement( url.copy( 0, url.indexOf( '/' )),
- ::embed::ElementModes::READ ), uno::UNO_QUERY_THROW );
+ ::embed::ElementModes::READ ), uno::UNO_SET_THROW );
uno::Reference< io::XInputStream > inputStream;
inputStream.set( storage->openStreamElement( url.copy( url.indexOf( '/' ) + 1 ), ::embed::ElementModes::READ ),
UNO_QUERY_THROW );
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index 39eb2d530afd..228ce12d1233 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -362,7 +362,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
for ( sal_Int32 columnIndex = 0; columnIndex < columnCount; columnIndex++ )
{
// get current cell, remarks row index is 0, because we get the range for each row separate
- Reference< XCell > xCell( xCellRange->getCellByPosition(columnIndex, 0), UNO_QUERY_THROW );
+ Reference< XCell > xCell( xCellRange->getCellByPosition(columnIndex, 0), UNO_SET_THROW );
// use XMergeableCell interface from offapi
Reference< XMergeableCell > xMergeableCell( xCell, UNO_QUERY_THROW );
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 9fa9ca8701ca..f961f0694fc6 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -1922,7 +1922,7 @@ void XMLParaContext::EndElement()
const uno::Reference<container::XEnumerationAccess> xEA
(xAttrCursor, uno::UNO_QUERY_THROW);
const uno::Reference<container::XEnumeration> xEnum(
- xEA->createEnumeration(), uno::UNO_QUERY_THROW);
+ xEA->createEnumeration(), uno::UNO_SET_THROW);
SAL_WARN_IF(!xEnum->hasMoreElements(), "xmloff.text", "xml:id: no paragraph?");
if (xEnum->hasMoreElements()) {
uno::Reference<rdf::XMetadatable> xMeta;