binaryurp/source/incomingrequest.cxx | 7 - binaryurp/source/proxy.cxx | 6 - bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx | 19 ---- bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx | 18 ---- desktop/qa/desktop_app/test_desktop_app.cxx | 2 desktop/qa/desktop_lib/test_desktop_lib.cxx | 4 desktop/source/app/app.cxx | 3 desktop/source/app/cmdlineargs.cxx | 2 desktop/source/app/officeipcthread.cxx | 2 desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 9 -- desktop/source/deployment/gui/dp_gui_service.cxx | 7 - desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx | 5 - desktop/source/deployment/manager/dp_informationprovider.cxx | 7 - desktop/source/deployment/manager/dp_managerfac.cxx | 7 - desktop/source/deployment/misc/dp_descriptioninfoset.cxx | 9 -- helpcompiler/source/HelpIndexer.cxx | 3 include/o3tl/runtimetooustring.hxx | 48 +++++++++++ oox/source/drawingml/chart/plotareaconverter.cxx | 5 - oox/source/drawingml/diagram/layoutnodecontext.cxx | 4 oox/source/ole/olestorage.cxx | 5 - oox/source/ppt/customshowlistcontext.cxx | 6 - oox/source/ppt/timenodelistcontext.cxx | 27 ------ ucb/source/sorter/sortresult.cxx | 5 - ucb/source/ucp/cmis/cmis_content.cxx | 15 +-- ucb/source/ucp/expand/ucpexpand.cxx | 7 - ucb/source/ucp/file/prov.cxx | 8 - ucb/source/ucp/hierarchy/hierarchydatasource.cxx | 8 - vcl/unx/gtk3/gtk3gtkframe.cxx | 3 28 files changed, 76 insertions(+), 175 deletions(-)
New commits: commit d689ad29c28ad7f077c2239a8fa4c2b6307a6aa1 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Nov 23 23:10:29 2016 +0100 New o3tl::runtimeToOUString to convert from C++ runtime NTBS to OUString Change-Id: I613bb70b6828f615fd45af38b2d873ece55ace60 diff --git a/binaryurp/source/incomingrequest.cxx b/binaryurp/source/incomingrequest.cxx index cf66f9c..a1c4ef3 100644 --- a/binaryurp/source/incomingrequest.cxx +++ b/binaryurp/source/incomingrequest.cxx @@ -25,6 +25,7 @@ #include "com/sun/star/bridge/XInstanceProvider.hpp" #include "cppuhelper/exc_hlp.hxx" +#include "o3tl/runtimetooustring.hxx" #include "rtl/byteseq.hxx" #include "rtl/ref.hxx" #include "rtl/ustring.hxx" @@ -77,10 +78,8 @@ void IncomingRequest::execute() const { isExc = !execute_throw(&ret, &outArgs); } catch (const std::exception & e) { throw css::uno::RuntimeException( - "caught C++ exception: " + - OStringToOUString( - OString(e.what()), RTL_TEXTENCODING_ASCII_US)); - // best-effort string conversion + "caught C++ exception: " + + o3tl::runtimeToOUString(e.what())); } } catch (const css::uno::RuntimeException &) { css::uno::Any exc(cppu::getCaughtException()); diff --git a/binaryurp/source/proxy.cxx b/binaryurp/source/proxy.cxx index 5f23b46..1834968 100644 --- a/binaryurp/source/proxy.cxx +++ b/binaryurp/source/proxy.cxx @@ -24,6 +24,7 @@ #include <vector> #include "cppuhelper/exc_hlp.hxx" +#include "o3tl/runtimetooustring.hxx" #include "rtl/ref.hxx" #include "rtl/ustring.hxx" #include "sal/types.h" @@ -100,10 +101,7 @@ void Proxy::do_dispatch( do_dispatch_throw(member, returnValue, arguments, exception); } catch (const std::exception & e) { throw css::uno::RuntimeException( - "caught C++ exception: " + - OStringToOUString( - OString(e.what()), RTL_TEXTENCODING_ASCII_US)); - // best-effort string conversion + "caught C++ exception: " + o3tl::runtimeToOUString(e.what())); } } catch (const css::uno::RuntimeException &) { css::uno::Any exc(cppu::getCaughtException()); diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx index 71e76a9..fb7bf08 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx @@ -23,10 +23,10 @@ #include <typeinfo> #include "rtl/alloc.h" -#include "rtl/ustrbuf.hxx" #include <com/sun/star/uno/genfunc.hxx> #include "com/sun/star/uno/RuntimeException.hpp" +#include <o3tl/runtimetooustring.hxx> #include <uno/data.h> #include <bridge.hxx> @@ -95,14 +95,6 @@ void INSERT_INT8( *pDS++ = *static_cast<sal_uInt8 const *>( pSV ); } -void appendCString(OUStringBuffer & buffer, char const * text) { - if (text != nullptr) { - buffer.append( - OStringToOUString(OString(text), RTL_TEXTENCODING_ISO_8859_1)); - // use 8859-1 to avoid conversion failure - } -} - } static void cpp_call( @@ -246,12 +238,9 @@ static void cpp_call( } catch (const Exception &) { throw; } catch (const std::exception & e) { - OUStringBuffer buf; - buf.append("C++ code threw "); - appendCString(buf, typeid(e).name()); - buf.append(": "); - appendCString(buf, e.what()); - throw RuntimeException(buf.makeStringAndClear()); + throw RuntimeException( + "C++ code threw " + o3tl::runtimeToOUString(typeid(e).name()) + + ": " + o3tl::runtimeToOUString(e.what())); } catch (...) { throw RuntimeException("C++ code threw unknown exception"); } diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx index f606f72..9770dba 100644 --- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx @@ -23,10 +23,10 @@ #include <typeinfo> #include "rtl/alloc.h" -#include "rtl/ustrbuf.hxx" #include <com/sun/star/uno/genfunc.hxx> #include "com/sun/star/uno/RuntimeException.hpp" +#include <o3tl/runtimetooustring.hxx> #include <uno/data.h> #include <bridge.hxx> @@ -95,14 +95,6 @@ void INSERT_INT8( *pDS++ = *static_cast<sal_uInt8 const *>( pSV ); } -void appendCString(OUStringBuffer & buffer, char const * text) { - if (text != nullptr) { - buffer.append( - OStringToOUString(OString(text), RTL_TEXTENCODING_ISO_8859_1)); - // use 8859-1 to avoid conversion failure - } -} - } static void cpp_call( @@ -246,13 +238,9 @@ static void cpp_call( } catch (const Exception &) { throw; } catch (const std::exception & e) { - OUStringBuffer buf; - buf.append("C++ code threw "); - appendCString(buf, typeid(e).name()); - buf.append(": "); - appendCString(buf, e.what()); throw RuntimeException( - buf.makeStringAndClear()); + "C++ code threw " + o3tl::runtimeToOUString(typeid(e).name()) + + ": " + o3tl::runtimeToOUString(e.what())); } catch (...) { throw RuntimeException("C++ code threw unknown exception"); } diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 7abfdda..501ebe1 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -37,6 +37,7 @@ #include "desktopcontext.hxx" #include "migration.hxx" +#include <o3tl/runtimetooustring.hxx> #include <svl/languageoptions.hxx> #include <svtools/javacontext.hxx> #include <com/sun/star/beans/XPropertySet.hpp> @@ -1696,7 +1697,7 @@ int Desktop::Main() catch( const std::exception& exSTD) { RequestHandler::SetDowning(); - FatalError( OUString::createFromAscii( exSTD.what())); + FatalError(o3tl::runtimeToOUString(exSTD.what())); } catch( ...) { diff --git a/helpcompiler/source/HelpIndexer.cxx b/helpcompiler/source/HelpIndexer.cxx index e6a26fc..0c10da9 100644 --- a/helpcompiler/source/HelpIndexer.cxx +++ b/helpcompiler/source/HelpIndexer.cxx @@ -12,6 +12,7 @@ #include <rtl/string.hxx> #include <rtl/uri.hxx> #include <rtl/ustrbuf.hxx> +#include <o3tl/runtimetooustring.hxx> #include <osl/file.hxx> #include <osl/thread.h> #include <algorithm> @@ -72,7 +73,7 @@ bool HelpIndexer::indexDocuments() } catch (CLuceneError &e) { - d_error = OUString::createFromAscii(e.what()); + d_error = o3tl::runtimeToOUString(e.what()); return false; } diff --git a/include/o3tl/runtimetooustring.hxx b/include/o3tl/runtimetooustring.hxx new file mode 100644 index 0000000..7f20158 --- /dev/null +++ b/include/o3tl/runtimetooustring.hxx @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_O3TL_RUNTIMETOOUSTRING_HXX +#define INCLUDED_O3TL_RUNTIMETOOUSTRING_HXX + +#include <sal/config.h> + +#include <cassert> +#include <cstring> + +#include <rtl/textcvt.h> +#include <rtl/textenc.h> +#include <rtl/ustring.h> +#include <rtl/ustring.hxx> + +namespace o3tl { + +/** Convert an NTBS from the C++ runtime to an OUString. + + This is used to convert an NTBS as provided by std::exception::what or + std::type_info::name into an OUString in a "lossless" way. The conversion + is done using RTL_TEXTENCODING_ISO_8859_1, so each char in the input maps + to one Unicode character in the output. +*/ +inline OUString runtimeToOUString(char const * runtimeString) { + OUString s; + bool ok = rtl_convertStringToUString( + &s.pData, runtimeString, std::strlen(runtimeString), + RTL_TEXTENCODING_ISO_8859_1, + (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR + | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR + | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)); + assert(ok); (void) ok; + return s; +} + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index c3fca07..c5fa4a5 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -43,6 +43,7 @@ #include <comphelper/processfactory.hxx> #include <cppuhelper/exc_hlp.hxx> #include <config_oauth2.h> +#include <o3tl/runtimetooustring.hxx> #include <ucbhelper/cancelcommandexecution.hxx> #include <ucbhelper/content.hxx> #include <ucbhelper/contentidentifier.hxx> @@ -1133,7 +1134,7 @@ namespace cmis ucb::IOErrorCode_GENERAL, uno::Sequence< uno::Any >( 0 ), xEnv, - OUString::createFromAscii( e.what() ) ); + o3tl::runtimeToOUString(e.what())); } return aRet; } @@ -1199,7 +1200,7 @@ namespace cmis ucb::IOErrorCode_GENERAL, uno::Sequence< uno::Any >( 0 ), xEnv, - OUString::createFromAscii( e.what() ) ); + o3tl::runtimeToOUString(e.what())); } return aRet; } @@ -1240,7 +1241,7 @@ namespace cmis ucb::IOErrorCode_GENERAL, uno::Sequence< uno::Any >( 0 ), xEnv, - OUString::createFromAscii( e.what() ) ); + o3tl::runtimeToOUString(e.what())); } return uno::Sequence< document::CmisVersion > ( ); } @@ -1449,7 +1450,7 @@ namespace cmis ucb::IOErrorCode_GENERAL, uno::Sequence< uno::Any >( 0 ), xEnv, - OUString::createFromAscii( e.what() ) ); + o3tl::runtimeToOUString(e.what())); } sal_Int32 nCount = rValues.getLength(); @@ -1517,7 +1518,7 @@ namespace cmis ucb::IOErrorCode_GENERAL, uno::Sequence< uno::Any >( 0 ), xEnv, - OUString::createFromAscii( e.what() ) ); + o3tl::runtimeToOUString(e.what())); } return aRet; @@ -1564,7 +1565,7 @@ namespace cmis ucb::IOErrorCode_GENERAL, uno::Sequence< uno::Any >( 0 ), xEnv, - OUString::createFromAscii( e.what() ) ); + o3tl::runtimeToOUString(e.what())); } return true; @@ -1843,7 +1844,7 @@ namespace cmis ucb::IOErrorCode_GENERAL, uno::Sequence< uno::Any >( 0 ), xEnv, - OUString::createFromAscii( e.what() ) ); + o3tl::runtimeToOUString(e.what())); } } else if ( aCommand.Name == "checkout" ) diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index c1f70ad..e3a6286 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -30,6 +30,7 @@ #include <unx/genprn.h> #include <unx/geninst.h> #include <headless/svpgdi.hxx> +#include <o3tl/runtimetooustring.hxx> #include <osl/file.hxx> #include <rtl/bootstrap.hxx> #include <rtl/process.h> @@ -4274,7 +4275,7 @@ long GtkSalFrame::CallCallbackExc(SalEvent nEvent, const void* pEvent) const css::uno::Any( css::uno::RuntimeException( "wrapped std::exception " - + OUString::createFromAscii(e.what())))); + + o3tl::runtimeToOUString(e.what())))); } catch (...) { commit 5645c15d3df900f65a1d9513155ee38743c543fa Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Nov 23 23:05:39 2016 +0100 loplugin:unnecessaryoverride (dtors) in oox Change-Id: I55b82f4669d89e8492b456ff8b0b430f444674a3 diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx index 71477a9..19784b3 100644 --- a/oox/source/drawingml/chart/plotareaconverter.cxx +++ b/oox/source/drawingml/chart/plotareaconverter.cxx @@ -65,7 +65,6 @@ class AxesSetConverter : public ConverterBase< AxesSetModel > { public: explicit AxesSetConverter( const ConverterRoot& rParent, AxesSetModel& rModel ); - virtual ~AxesSetConverter() override; /** Converts the axes set model to a chart2 diagram. Returns an automatic chart title from a single series title, if possible. */ @@ -99,10 +98,6 @@ AxesSetConverter::AxesSetConverter( const ConverterRoot& rParent, AxesSetModel& { } -AxesSetConverter::~AxesSetConverter() -{ -} - ModelRef< AxisModel > lclGetOrCreateAxis( const AxesSetModel::AxisMap& rFromAxes, sal_Int32 nAxisIdx, sal_Int32 nDefTypeId, bool bMSO2007Doc ) { ModelRef< AxisModel > xAxis = rFromAxes.get( nAxisIdx ); diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx b/oox/source/drawingml/diagram/layoutnodecontext.cxx index 9bb90a8..a028d33 100644 --- a/oox/source/drawingml/diagram/layoutnodecontext.cxx +++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx @@ -158,10 +158,6 @@ public: { } - virtual ~LayoutVariablePropertySetContext() override - { - } - virtual ContextHandlerRef onCreateContext( ::sal_Int32 aElement, const AttributeList& rAttribs ) throw (SAXException, RuntimeException) override { diff --git a/oox/source/ole/olestorage.cxx b/oox/source/ole/olestorage.cxx index 19c665f..ee8dc65 100644 --- a/oox/source/ole/olestorage.cxx +++ b/oox/source/ole/olestorage.cxx @@ -58,7 +58,6 @@ public: const Reference< XComponentContext >& rxContext, const Reference< XNameContainer >& rxStorage, const OUString& rElementName ); - virtual ~OleOutputStream() override; virtual void SAL_CALL seek( sal_Int64 nPos ) throw( IllegalArgumentException, IOException, RuntimeException, std::exception ) override; virtual sal_Int64 SAL_CALL getPosition() throw( IOException, RuntimeException, std::exception ) override; @@ -96,10 +95,6 @@ OleOutputStream::OleOutputStream( const Reference< XComponentContext >& rxContex } } -OleOutputStream::~OleOutputStream() -{ -} - void SAL_CALL OleOutputStream::seek( sal_Int64 nPos ) throw( IllegalArgumentException, IOException, RuntimeException, std::exception ) { ensureSeekable(); diff --git a/oox/source/ppt/customshowlistcontext.cxx b/oox/source/ppt/customshowlistcontext.cxx index e8839ab..cccd54b 100644 --- a/oox/source/ppt/customshowlistcontext.cxx +++ b/oox/source/ppt/customshowlistcontext.cxx @@ -37,7 +37,7 @@ public: CustomShowContext( ::oox::core::FragmentHandler2& rParent, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttribs, CustomShow& rCustomShow ); - virtual ~CustomShowContext( ) override; + virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override; }; @@ -51,10 +51,6 @@ CustomShowContext::CustomShowContext( FragmentHandler2& rParent, mrCustomShow.mnId = rxAttribs->getOptionalValue( XML_id ); } -CustomShowContext::~CustomShowContext( ) -{ -} - ::oox::core::ContextHandlerRef CustomShowContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) { switch( aElementToken ) diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx index e795b6e..483442f 100644 --- a/oox/source/ppt/timenodelistcontext.cxx +++ b/oox/source/ppt/timenodelistcontext.cxx @@ -240,10 +240,6 @@ namespace oox { namespace ppt { } } - virtual ~CmdTimeNodeContext() throw () override - { - } - virtual void onEndElement() override { if( isCurrentElement( PPT_TOKEN( cmd ) ) ) @@ -353,10 +349,6 @@ namespace oox { namespace ppt { mnPrevAc = xAttribs->getOptionalValueToken( XML_prevAc, 0 ); } - virtual ~SequenceTimeNodeContext() throw() override - { - } - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override { switch ( aElementToken ) @@ -426,9 +418,6 @@ namespace oox { namespace ppt { , m_byColor( AnimationColorSpace::RGB, 0, 0, 0) { } - virtual ~AnimColorContext() throw() override - { - } virtual void onEndElement() override { @@ -627,10 +616,6 @@ namespace oox { namespace ppt { = makeAny((sal_Int16)AnimationTransformType::SCALE); } - virtual ~AnimScaleContext( ) throw( ) override - { - } - virtual void onEndElement() override { if( isCurrentElement( mnElement ) ) @@ -726,10 +711,6 @@ namespace oox { namespace ppt { } } - virtual ~AnimRotContext( ) throw( ) override - { - } - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override { switch ( aElementToken ) @@ -783,10 +764,6 @@ namespace oox { namespace ppt { // TODO make sure the units are right. Likely not. } - virtual ~AnimMotionContext( ) throw() override - { - } - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override { switch ( aElementToken ) @@ -866,10 +843,6 @@ namespace oox { namespace ppt { } } - virtual ~AnimEffectContext( ) throw() override - { - } - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override { switch ( aElementToken ) commit fe3005f4acd0b06f2fe133018b068efe8b6dd96c Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Nov 23 23:00:14 2016 +0100 loplugin:unnecessaryoverride (dtors) in ucb Change-Id: Ic19075cf0b237415c47a358c677eb19969e98fa5 diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx index 392775b..e6b28f8 100644 --- a/ucb/source/sorter/sortresult.cxx +++ b/ucb/source/sorter/sortresult.cxx @@ -97,7 +97,6 @@ private: public: SRSPropertySetInfo(); - virtual ~SRSPropertySetInfo() override; // XPropertySetInfo virtual Sequence< Property > SAL_CALL getProperties() @@ -1928,10 +1927,6 @@ SRSPropertySetInfo::SRSPropertySetInfo() maProps[1].Attributes = -1; } - -SRSPropertySetInfo::~SRSPropertySetInfo() -{} - // XPropertySetInfo methods. Sequence< Property > SAL_CALL diff --git a/ucb/source/ucp/expand/ucpexpand.cxx b/ucb/source/ucp/expand/ucpexpand.cxx index 2f4cd39..71ed084 100644 --- a/ucb/source/ucp/expand/ucpexpand.cxx +++ b/ucb/source/ucp/expand/ucpexpand.cxx @@ -69,7 +69,6 @@ public: m_xComponentContext( xComponentContext ), m_xMacroExpander( util::theMacroExpander::get(xComponentContext) ) {} - virtual ~ExpandContentProviderImpl() throw () override; // XServiceInfo virtual OUString SAL_CALL getImplementationName() @@ -104,12 +103,6 @@ inline void ExpandContentProviderImpl::check() const } } - -ExpandContentProviderImpl::~ExpandContentProviderImpl() throw () -{ -} - - void ExpandContentProviderImpl::disposing() { } diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx index b67304e..99c6091 100644 --- a/ucb/source/ucp/file/prov.cxx +++ b/ucb/source/ucp/file/prov.cxx @@ -258,7 +258,6 @@ class XPropertySetInfoImpl2 { public: XPropertySetInfoImpl2(); - virtual ~XPropertySetInfoImpl2() override; // XInterface virtual Any SAL_CALL @@ -312,13 +311,6 @@ XPropertySetInfoImpl2::XPropertySetInfoImpl2() PropertyAttribute::READONLY ); } - -XPropertySetInfoImpl2::~XPropertySetInfoImpl2() -{ - // nothing -} - - void SAL_CALL XPropertySetInfoImpl2::acquire() throw() diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx index a3eed99..a43fd2c 100644 --- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx @@ -89,7 +89,6 @@ public: HierarchyDataAccess( const uno::Reference< uno::XInterface > & xConfigAccess, bool bReadOnly ); - virtual ~HierarchyDataAccess() override; // XInterface virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) @@ -594,13 +593,6 @@ HierarchyDataAccess::HierarchyDataAccess( const uno::Reference< { } - -// virtual -HierarchyDataAccess::~HierarchyDataAccess() -{ -} - - // XInterface methods. void SAL_CALL HierarchyDataAccess::acquire() throw() commit 7c70681bf76af56bd82818dad2823dff402e095e Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Nov 23 22:30:33 2016 +0100 loplugin:unnecessaryoverride (dtors) in desktop Change-Id: I9153f2506a9d054ec2e81a5c0d6f9bb089b73f64 diff --git a/desktop/qa/desktop_app/test_desktop_app.cxx b/desktop/qa/desktop_app/test_desktop_app.cxx index fe663dc..76a0584 100644 --- a/desktop/qa/desktop_app/test_desktop_app.cxx +++ b/desktop/qa/desktop_app/test_desktop_app.cxx @@ -48,7 +48,7 @@ public: class TestSupplier : public desktop::CommandLineArgs::Supplier { public: explicit TestSupplier(const std::initializer_list<OUString>& args) : m_args(args) {} - virtual ~TestSupplier() override {} + virtual boost::optional< OUString > getCwdUrl() override { return boost::optional< OUString >(); } virtual bool next(OUString * argument) override { CPPUNIT_ASSERT(argument != nullptr); diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 7200967..308492b 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -53,10 +53,6 @@ public: { } - virtual ~DesktopLOKTest() override - { - } - virtual void setUp() override { UnoApiTest::setUp(); diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index 41d3512..112fa58 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -82,8 +82,6 @@ public: } } - virtual ~ExtCommandLineSupplier() override {} - virtual boost::optional< OUString > getCwdUrl() override { return m_cwdUrl; } virtual bool next(OUString * argument) override { diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index 7a2fd46..8b85258 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -140,8 +140,6 @@ public: } } - virtual ~Parser() override {} - virtual boost::optional< OUString > getCwdUrl() override { return m_cwdUrl; } virtual bool next(OUString * argument) override { return next(argument, true); } diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index 8409ca9..763ecf0 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -131,8 +131,6 @@ class ProgressCmdEnv void update_( uno::Any const & Status ) throw ( uno::RuntimeException ); public: - virtual ~ProgressCmdEnv() override; - /** When param bAskWhenInstalling = true, then the user is asked if he agrees to install this extension. In case this extension is already installed then the user is also notified and asked if he wants to replace that existing @@ -308,13 +306,6 @@ void ProgressCmdEnv::updateProgress() m_pDialogHelper->updateProgress( nProgress ); } - -ProgressCmdEnv::~ProgressCmdEnv() -{ - // TODO: stop all threads and wait -} - - // XCommandEnvironment uno::Reference< task::XInteractionHandler > ProgressCmdEnv::getInteractionHandler() diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx index 750336e..0014cec 100644 --- a/desktop/source/deployment/gui/dp_gui_service.cxx +++ b/desktop/source/deployment/gui/dp_gui_service.cxx @@ -53,7 +53,6 @@ class MyApp : public Application { public: MyApp(); - virtual ~MyApp() override; MyApp(const MyApp&) = delete; const MyApp& operator=(const MyApp&) = delete; @@ -63,12 +62,6 @@ public: virtual void DeInit() override; }; - -MyApp::~MyApp() -{ -} - - MyApp::MyApp() { } diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx index 11a9b39..4670e3b 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx @@ -121,7 +121,6 @@ class UpdateCommandEnv cssu::Reference< cssu::XComponentContext > m_xContext; public: - virtual ~UpdateCommandEnv() override; UpdateCommandEnv( cssu::Reference< cssu::XComponentContext > const & xCtx, ::rtl::Reference<UpdateInstallDialog::Thread>const & thread); @@ -631,10 +630,6 @@ UpdateCommandEnv::UpdateCommandEnv( cssu::Reference< cssu::XComponentContext > c { } -UpdateCommandEnv::~UpdateCommandEnv() -{ -} - // XCommandEnvironment cssu::Reference<css::task::XInteractionHandler> UpdateCommandEnv::getInteractionHandler() throw (cssu::RuntimeException, std::exception) diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx index ca82cf2..134a822 100644 --- a/desktop/source/deployment/manager/dp_informationprovider.cxx +++ b/desktop/source/deployment/manager/dp_informationprovider.cxx @@ -63,7 +63,6 @@ class PackageInformationProvider : { public: explicit PackageInformationProvider( uno::Reference< uno::XComponentContext >const& xContext); - virtual ~PackageInformationProvider() override; // XPackageInformationProvider virtual OUString SAL_CALL getPackageLocation( const OUString& extensionId ) @@ -90,12 +89,6 @@ PackageInformationProvider::PackageInformationProvider( uno::Reference< uno::XCo { } - -PackageInformationProvider::~PackageInformationProvider() -{ -} - - OUString PackageInformationProvider::getPackageLocation( const OUString & repository, const OUString& _rExtensionId ) diff --git a/desktop/source/deployment/manager/dp_managerfac.cxx b/desktop/source/deployment/manager/dp_managerfac.cxx index cf8be3c..bcc4a7a 100644 --- a/desktop/source/deployment/manager/dp_managerfac.cxx +++ b/desktop/source/deployment/manager/dp_managerfac.cxx @@ -55,7 +55,6 @@ protected: virtual void SAL_CALL disposing() override; public: - virtual ~PackageManagerFactoryImpl() override; explicit PackageManagerFactoryImpl( Reference<XComponentContext> const & xComponentContext ); @@ -81,12 +80,6 @@ PackageManagerFactoryImpl::PackageManagerFactoryImpl( { } - -PackageManagerFactoryImpl::~PackageManagerFactoryImpl() -{ -} - - inline void PackageManagerFactoryImpl::check() { ::osl::MutexGuard guard( getMutex() ); diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx index 732b026..6b6d7a9 100644 --- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx +++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx @@ -62,8 +62,6 @@ class EmptyNodeList: public: EmptyNodeList(); - virtual ~EmptyNodeList() override; - EmptyNodeList(const EmptyNodeList&) = delete; const EmptyNodeList& operator=(const EmptyNodeList&) = delete; @@ -75,8 +73,6 @@ public: EmptyNodeList::EmptyNodeList() {} -EmptyNodeList::~EmptyNodeList() {} - ::sal_Int32 EmptyNodeList::getLength() throw (css::uno::RuntimeException, std::exception) { return 0; } @@ -146,7 +142,6 @@ class FileDoesNotExistFilter css::uno::Reference< css::ucb::XCommandEnvironment > m_xCommandEnv; public: - virtual ~FileDoesNotExistFilter() override; explicit FileDoesNotExistFilter( const css::uno::Reference< css::ucb::XCommandEnvironment >& xCmdEnv); @@ -257,10 +252,6 @@ FileDoesNotExistFilter::FileDoesNotExistFilter( m_bExist(true), m_xCommandEnv(xCmdEnv) {} -FileDoesNotExistFilter::~FileDoesNotExistFilter() -{ -}; - // XCommandEnvironment Reference<css::task::XInteractionHandler > FileDoesNotExistFilter::getInteractionHandler() throw (css::uno::RuntimeException, std::exception) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits