diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-08-15 19:44:25 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2019-08-15 20:49:17 +0200 |
commit | f817ce79d501ce32d54d6c8a3492f1913fb85a55 (patch) | |
tree | 94d7d1dac8a6e452a1d52594f220cbcbd9ea2568 /writerperfect | |
parent | dc50b7f952cf339f66fcdf1ac78d7fbeb31014d4 (diff) |
tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
in writerperfect
+ remove some using
Change-Id: I7ced8e49ba2d85a4354d9a5d048531c023faacf0
Reviewed-on: https://gerrit.libreoffice.org/77540
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'writerperfect')
19 files changed, 73 insertions, 231 deletions
diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx index 919184a1fd75..e1c9b18d4163 100644 --- a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx +++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx @@ -34,12 +34,6 @@ using namespace ::com::sun::star; -using uno::Exception; -using uno::RuntimeException; -using uno::Sequence; -using uno::XComponentContext; -using uno::XInterface; - namespace MSWorksCalcImportFilterInternal { /// returns the list of stream name present in a folder @@ -435,13 +429,10 @@ sal_Bool SAL_CALL MSWorksCalcImportFilter::supportsService(const OUString& rServ return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL MSWorksCalcImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL MSWorksCalcImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/calc/MWAWCalcImportFilter.cxx b/writerperfect/source/calc/MWAWCalcImportFilter.cxx index ce9834bdf8ec..5e4236d4772f 100644 --- a/writerperfect/source/calc/MWAWCalcImportFilter.cxx +++ b/writerperfect/source/calc/MWAWCalcImportFilter.cxx @@ -17,11 +17,6 @@ #include "MWAWCalcImportFilter.hxx" -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData& data, OdfDocumentHandler* pHandler, const OdfStreamType streamType) @@ -116,13 +111,10 @@ sal_Bool SAL_CALL MWAWCalcImportFilter::supportsService(const OUString& rService return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL MWAWCalcImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL MWAWCalcImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/calc/NumbersImportFilter.cxx b/writerperfect/source/calc/NumbersImportFilter.cxx index 8cf18b492b9e..0352b2fa2981 100644 --- a/writerperfect/source/calc/NumbersImportFilter.cxx +++ b/writerperfect/source/calc/NumbersImportFilter.cxx @@ -16,11 +16,6 @@ #include "NumbersImportFilter.hxx" -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - using libetonyek::EtonyekDocument; bool NumbersImportFilter::doImportDocument(weld::Window*, librevenge::RVNGInputStream& rInput, @@ -56,13 +51,10 @@ sal_Bool SAL_CALL NumbersImportFilter::supportsService(const OUString& rServiceN return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL NumbersImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL NumbersImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/draw/CDRImportFilter.cxx b/writerperfect/source/draw/CDRImportFilter.cxx index fd317ec26bac..649b1f47e628 100644 --- a/writerperfect/source/draw/CDRImportFilter.cxx +++ b/writerperfect/source/draw/CDRImportFilter.cxx @@ -20,11 +20,6 @@ #include "CDRImportFilter.hxx" -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - bool CDRImportFilter::doImportDocument(weld::Window*, librevenge::RVNGInputStream& rInput, OdgGenerator& rGenerator, utl::MediaDescriptor&) { @@ -53,13 +48,10 @@ sal_Bool SAL_CALL CDRImportFilter::supportsService(const OUString& rServiceName) return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL CDRImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL CDRImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/draw/CMXImportFilter.cxx b/writerperfect/source/draw/CMXImportFilter.cxx index 117da40e3540..68a2db3557bd 100644 --- a/writerperfect/source/draw/CMXImportFilter.cxx +++ b/writerperfect/source/draw/CMXImportFilter.cxx @@ -20,11 +20,6 @@ #include "CMXImportFilter.hxx" -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - bool CMXImportFilter::doImportDocument(weld::Window*, librevenge::RVNGInputStream& rInput, OdgGenerator& rGenerator, utl::MediaDescriptor&) { @@ -53,13 +48,10 @@ sal_Bool SAL_CALL CMXImportFilter::supportsService(const OUString& rServiceName) return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL CMXImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL CMXImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/draw/FreehandImportFilter.cxx b/writerperfect/source/draw/FreehandImportFilter.cxx index 432532647fd2..2e07914937f8 100644 --- a/writerperfect/source/draw/FreehandImportFilter.cxx +++ b/writerperfect/source/draw/FreehandImportFilter.cxx @@ -16,11 +16,6 @@ #include "FreehandImportFilter.hxx" -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - bool FreehandImportFilter::doImportDocument(weld::Window*, librevenge::RVNGInputStream& rInput, OdgGenerator& rGenerator, utl::MediaDescriptor&) { @@ -49,13 +44,10 @@ sal_Bool SAL_CALL FreehandImportFilter::supportsService(const OUString& rService return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL FreehandImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL FreehandImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/draw/MSPUBImportFilter.cxx b/writerperfect/source/draw/MSPUBImportFilter.cxx index 7ed175efcb85..d895334b8b9a 100644 --- a/writerperfect/source/draw/MSPUBImportFilter.cxx +++ b/writerperfect/source/draw/MSPUBImportFilter.cxx @@ -16,11 +16,6 @@ #include "MSPUBImportFilter.hxx" -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - bool MSPUBImportFilter::doImportDocument(weld::Window*, librevenge::RVNGInputStream& rInput, OdgGenerator& rGenerator, utl::MediaDescriptor&) { @@ -49,13 +44,10 @@ sal_Bool SAL_CALL MSPUBImportFilter::supportsService(const OUString& rServiceNam return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL MSPUBImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL MSPUBImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/draw/MWAWDrawImportFilter.cxx b/writerperfect/source/draw/MWAWDrawImportFilter.cxx index 72495b7b24a2..0a3c701bbbaf 100644 --- a/writerperfect/source/draw/MWAWDrawImportFilter.cxx +++ b/writerperfect/source/draw/MWAWDrawImportFilter.cxx @@ -17,11 +17,6 @@ #include "MWAWDrawImportFilter.hxx" -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData& data, OdfDocumentHandler* pHandler, const OdfStreamType streamType) @@ -108,13 +103,10 @@ sal_Bool SAL_CALL MWAWDrawImportFilter::supportsService(const OUString& rService return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL MWAWDrawImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL MWAWDrawImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/draw/PageMakerImportFilter.cxx b/writerperfect/source/draw/PageMakerImportFilter.cxx index 49409141cd59..cb12957b5c91 100644 --- a/writerperfect/source/draw/PageMakerImportFilter.cxx +++ b/writerperfect/source/draw/PageMakerImportFilter.cxx @@ -17,11 +17,6 @@ #include "PageMakerImportFilter.hxx" -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - bool PageMakerImportFilter::doImportDocument(weld::Window*, librevenge::RVNGInputStream& rInput, OdgGenerator& rGenerator, utl::MediaDescriptor&) { @@ -50,13 +45,10 @@ sal_Bool SAL_CALL PageMakerImportFilter::supportsService(const OUString& rServic return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL PageMakerImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL PageMakerImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/draw/VisioImportFilter.cxx b/writerperfect/source/draw/VisioImportFilter.cxx index 7338f930450a..d4060407151a 100644 --- a/writerperfect/source/draw/VisioImportFilter.cxx +++ b/writerperfect/source/draw/VisioImportFilter.cxx @@ -16,11 +16,6 @@ #include "VisioImportFilter.hxx" -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - bool VisioImportFilter::doImportDocument(weld::Window*, librevenge::RVNGInputStream& rInput, OdgGenerator& rGenerator, utl::MediaDescriptor&) { @@ -49,13 +44,10 @@ sal_Bool SAL_CALL VisioImportFilter::supportsService(const OUString& rServiceNam return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL VisioImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL VisioImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/draw/WPGImportFilter.cxx b/writerperfect/source/draw/WPGImportFilter.cxx index e11badb7ac9d..4b0ec488b503 100644 --- a/writerperfect/source/draw/WPGImportFilter.cxx +++ b/writerperfect/source/draw/WPGImportFilter.cxx @@ -23,11 +23,6 @@ #include "WPGImportFilter.hxx" -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - bool WPGImportFilter::doImportDocument(weld::Window*, librevenge::RVNGInputStream& rInput, OdgGenerator& rGenerator, utl::MediaDescriptor&) { @@ -56,13 +51,10 @@ sal_Bool SAL_CALL WPGImportFilter::supportsService(const OUString& rServiceName) return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL WPGImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL WPGImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/impress/KeynoteImportFilter.cxx b/writerperfect/source/impress/KeynoteImportFilter.cxx index 124f0cbc3c81..9b8a2b27e8e3 100644 --- a/writerperfect/source/impress/KeynoteImportFilter.cxx +++ b/writerperfect/source/impress/KeynoteImportFilter.cxx @@ -33,16 +33,6 @@ #include "KeynoteImportFilter.hxx" -using std::shared_ptr; - -using com::sun::star::io::XInputStream; -using com::sun::star::uno::Reference; -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::UNO_QUERY; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - using writerperfect::DocumentHandler; using writerperfect::WPXSvInputStream; @@ -78,10 +68,10 @@ KeynoteImportFilter::detect(css::uno::Sequence<css::beans::PropertyValue>& Descr bool bIsPackage = false; bool bUCBContentChanged = false; const beans::PropertyValue* pValue = Descriptor.getConstArray(); - Reference<XInputStream> xInputStream; - Reference<ucb::XContent> xContent; - Sequence<beans::NamedValue> lComponentDataNV; - Sequence<beans::PropertyValue> lComponentDataPV; + css::uno::Reference<com::sun::star::io::XInputStream> xInputStream; + css::uno::Reference<ucb::XContent> xContent; + css::uno::Sequence<beans::NamedValue> lComponentDataNV; + css::uno::Sequence<beans::PropertyValue> lComponentDataPV; bool bComponentDataNV = true; for (sal_Int32 i = 0; i < nLength; i++) @@ -115,7 +105,7 @@ KeynoteImportFilter::detect(css::uno::Sequence<css::beans::PropertyValue>& Descr if (!xInputStream.is()) return OUString(); - shared_ptr<librevenge::RVNGInputStream> input(new WPXSvInputStream(xInputStream)); + std::shared_ptr<librevenge::RVNGInputStream> input(new WPXSvInputStream(xInputStream)); /* Apple Keynote documents come in two variants: * * actual files (zip), only produced by Keynote 5 (at least with @@ -248,13 +238,10 @@ sal_Bool SAL_CALL KeynoteImportFilter::supportsService(const OUString& rServiceN return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL KeynoteImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL KeynoteImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/impress/MWAWPresentationImportFilter.cxx b/writerperfect/source/impress/MWAWPresentationImportFilter.cxx index 8cccdb469cfa..df202dcc252e 100644 --- a/writerperfect/source/impress/MWAWPresentationImportFilter.cxx +++ b/writerperfect/source/impress/MWAWPresentationImportFilter.cxx @@ -17,11 +17,6 @@ #include "MWAWPresentationImportFilter.hxx" -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData& data, OdfDocumentHandler* pHandler, const OdfStreamType streamType) @@ -96,13 +91,10 @@ sal_Bool SAL_CALL MWAWPresentationImportFilter::supportsService(const OUString& { return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL MWAWPresentationImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL MWAWPresentationImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/writer/AbiWordImportFilter.cxx b/writerperfect/source/writer/AbiWordImportFilter.cxx index 217305369ca2..a1a6a6320479 100644 --- a/writerperfect/source/writer/AbiWordImportFilter.cxx +++ b/writerperfect/source/writer/AbiWordImportFilter.cxx @@ -16,11 +16,6 @@ #include "AbiWordImportFilter.hxx" -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - bool AbiWordImportFilter::doImportDocument(weld::Window*, librevenge::RVNGInputStream& rInput, OdtGenerator& rGenerator, utl::MediaDescriptor&) { @@ -49,13 +44,10 @@ sal_Bool SAL_CALL AbiWordImportFilter::supportsService(const OUString& rServiceN return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL AbiWordImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL AbiWordImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/writer/EBookImportFilter.cxx b/writerperfect/source/writer/EBookImportFilter.cxx index b1915deabe99..2d4e6bc66efb 100644 --- a/writerperfect/source/writer/EBookImportFilter.cxx +++ b/writerperfect/source/writer/EBookImportFilter.cxx @@ -17,11 +17,6 @@ #include "EBookImportFilter.hxx" -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - using libebook::EBOOKDocument; bool EBookImportFilter::doImportDocument(weld::Window*, librevenge::RVNGInputStream& rInput, @@ -105,13 +100,10 @@ sal_Bool SAL_CALL EBookImportFilter::supportsService(const OUString& rServiceNam return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL EBookImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL EBookImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx index 7a929f62598f..426781f84558 100644 --- a/writerperfect/source/writer/MSWorksImportFilter.cxx +++ b/writerperfect/source/writer/MSWorksImportFilter.cxx @@ -21,12 +21,6 @@ #include "MSWorksImportFilter.hxx" #include <strings.hrc> -using com::sun::star::uno::Exception; -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - static bool handleEmbeddedWKSObject(const librevenge::RVNGBinaryData& data, OdfDocumentHandler* pHandler, const OdfStreamType streamType) { @@ -137,13 +131,10 @@ sal_Bool SAL_CALL MSWorksImportFilter::supportsService(const OUString& rServiceN return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL MSWorksImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL MSWorksImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/writer/MWAWImportFilter.cxx b/writerperfect/source/writer/MWAWImportFilter.cxx index 1640366464cb..afaabc85061c 100644 --- a/writerperfect/source/writer/MWAWImportFilter.cxx +++ b/writerperfect/source/writer/MWAWImportFilter.cxx @@ -16,11 +16,6 @@ #include "MWAWImportFilter.hxx" -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData& data, OdfDocumentHandler* pHandler, const OdfStreamType streamType) @@ -108,13 +103,10 @@ sal_Bool SAL_CALL MWAWImportFilter::supportsService(const OUString& rServiceName return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL MWAWImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL MWAWImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/writer/PagesImportFilter.cxx b/writerperfect/source/writer/PagesImportFilter.cxx index 869a7c900aae..84d743776c17 100644 --- a/writerperfect/source/writer/PagesImportFilter.cxx +++ b/writerperfect/source/writer/PagesImportFilter.cxx @@ -16,11 +16,6 @@ #include "PagesImportFilter.hxx" -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; - using libetonyek::EtonyekDocument; bool PagesImportFilter::doImportDocument(weld::Window*, librevenge::RVNGInputStream& rInput, @@ -54,13 +49,10 @@ sal_Bool SAL_CALL PagesImportFilter::supportsService(const OUString& rServiceNam return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL PagesImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL PagesImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx index 53634c40eac7..d9b897053e57 100644 --- a/writerperfect/source/writer/WordPerfectImportFilter.cxx +++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx @@ -33,16 +33,7 @@ #include "WordPerfectImportFilter.hxx" -using com::sun::star::beans::PropertyValue; -using com::sun::star::document::XExtendedFilterDetection; -using com::sun::star::uno::Any; -using com::sun::star::uno::Exception; using com::sun::star::uno::Reference; -using com::sun::star::uno::RuntimeException; -using com::sun::star::uno::Sequence; -using com::sun::star::uno::UNO_QUERY; -using com::sun::star::uno::XComponentContext; -using com::sun::star::uno::XInterface; using com::sun::star::awt::XWindow; using com::sun::star::document::XImporter; @@ -90,7 +81,8 @@ static bool handleEmbeddedWPGImage(const librevenge::RVNGBinaryData& input, return true; } -bool WordPerfectImportFilter::importImpl(const Sequence<css::beans::PropertyValue>& aDescriptor) +bool WordPerfectImportFilter::importImpl( + const css::uno::Sequence<css::beans::PropertyValue>& aDescriptor) { Reference<XInputStream> xInputStream; Reference<XWindow> xDialogParent; @@ -141,7 +133,7 @@ bool WordPerfectImportFilter::importImpl(const Sequence<css::beans::PropertyValu css::uno::UNO_QUERY_THROW); // The XImporter sets up an empty target document for XDocumentHandler to write to. - Reference<XImporter> xImporter(xInternalHandler, UNO_QUERY); + Reference<XImporter> xImporter(xInternalHandler, css::uno::UNO_QUERY); xImporter->setTargetDocument(mxDoc); // OO Document Handler: abstract class to handle document SAX messages, concrete implementation here @@ -158,7 +150,7 @@ bool WordPerfectImportFilter::importImpl(const Sequence<css::beans::PropertyValu } sal_Bool SAL_CALL -WordPerfectImportFilter::filter(const Sequence<css::beans::PropertyValue>& aDescriptor) +WordPerfectImportFilter::filter(const css::uno::Sequence<css::beans::PropertyValue>& aDescriptor) { return importImpl(aDescriptor); } @@ -172,13 +164,14 @@ WordPerfectImportFilter::setTargetDocument(const Reference<css::lang::XComponent } // XExtendedFilterDetection -OUString SAL_CALL WordPerfectImportFilter::detect(Sequence<PropertyValue>& Descriptor) +OUString SAL_CALL +WordPerfectImportFilter::detect(css::uno::Sequence<css::beans::PropertyValue>& Descriptor) { libwpd::WPDConfidence confidence = libwpd::WPD_CONFIDENCE_NONE; OUString sTypeName; sal_Int32 nLength = Descriptor.getLength(); sal_Int32 location = nLength; - const PropertyValue* pValue = Descriptor.getConstArray(); + const css::beans::PropertyValue* pValue = Descriptor.getConstArray(); Reference<XInputStream> xInputStream; for (sal_Int32 i = 0; i < nLength; i++) { @@ -214,7 +207,10 @@ OUString SAL_CALL WordPerfectImportFilter::detect(Sequence<PropertyValue>& Descr } // XInitialization -void SAL_CALL WordPerfectImportFilter::initialize(const Sequence<Any>& /*aArguments*/) {} +void SAL_CALL +WordPerfectImportFilter::initialize(const css::uno::Sequence<css::uno::Any>& /*aArguments*/) +{ +} // XServiceInfo OUString SAL_CALL WordPerfectImportFilter::getImplementationName() @@ -227,13 +223,10 @@ sal_Bool SAL_CALL WordPerfectImportFilter::supportsService(const OUString& rServ return cppu::supportsService(this, rServiceName); } -Sequence<OUString> SAL_CALL WordPerfectImportFilter::getSupportedServiceNames() +css::uno::Sequence<OUString> SAL_CALL WordPerfectImportFilter::getSupportedServiceNames() { - Sequence<OUString> aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return css::uno::Sequence<OUString>{ "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExtendedTypeDetection" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* |