diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-10 10:13:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-13 08:15:27 +0200 |
commit | a361231b1363d072d737e9b1d411b71aa9550d84 (patch) | |
tree | 08641fe2af10c1f22c7fd58e62f99b6dbe301c62 /writerfilter | |
parent | ce76026231d9536d2025a1e69f435bcbf39fe4f8 (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 'writerfilter')
-rw-r--r-- | writerfilter/source/filter/RtfFilter.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/filter/WriterFilter.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx index b024a2214e1e..a80c82c43e2f 100644 --- a/writerfilter/source/filter/RtfFilter.cxx +++ b/writerfilter/source/filter/RtfFilter.cxx @@ -87,7 +87,7 @@ sal_Bool RtfFilter::filter(const uno::Sequence< beans::PropertyValue >& rDescrip if (m_xSrcDoc.is()) { uno::Reference< lang::XMultiServiceFactory > xMSF(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW); - uno::Reference< uno::XInterface > xIfc(xMSF->createInstance("com.sun.star.comp.Writer.RtfExport"), uno::UNO_QUERY_THROW); + uno::Reference< uno::XInterface > xIfc(xMSF->createInstance("com.sun.star.comp.Writer.RtfExport"), uno::UNO_SET_THROW); uno::Reference< document::XExporter > xExporter(xIfc, uno::UNO_QUERY_THROW); uno::Reference< document::XFilter > xFilter(xIfc, uno::UNO_QUERY_THROW); xExporter->setSourceDocument(m_xSrcDoc); diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx index 04151f5308dc..826c2a0a516b 100644 --- a/writerfilter/source/filter/WriterFilter.cxx +++ b/writerfilter/source/filter/WriterFilter.cxx @@ -129,7 +129,7 @@ sal_Bool WriterFilter::filter(const uno::Sequence< beans::PropertyValue >& rDesc uno::Reference< uno::XInterface > xIfc; try { - xIfc.set(xMSF->createInstance("com.sun.star.comp.Writer.DocxExport"), uno::UNO_QUERY_THROW); + xIfc.set(xMSF->createInstance("com.sun.star.comp.Writer.DocxExport"), uno::UNO_SET_THROW); } catch (uno::RuntimeException&) { diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 076f4dd48f1f..d11275b3bc63 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2776,7 +2776,7 @@ RTFError RTFDocumentImpl::popState() uno::Reference<embed::XEmbeddedObject> xObject = aContainer.CreateEmbeddedObject(aGlobalName.GetByteSequence(), aName); uno::Reference<util::XCloseable> xComponent(xObject->getComponent(), - uno::UNO_QUERY_THROW); + uno::UNO_SET_THROW); // gcc4.4 (and 4.3 and possibly older) have a problem with dynamic_cast directly to the target class, // so help it with an intermediate cast. I'm not sure what exactly the problem is, seems to be unrelated // to RTLD_GLOBAL, so most probably a gcc bug. |