Kaydet (Commit) 7f0bdd5e authored tarafından Stephan Bergmann's avatar Stephan Bergmann

unotools: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)

...by explicitly defaulting the copy/move functions (and, where needed in turn,
also a default ctor) for classes that have a user-declared dtor that does
nothing other than an implicitly-defined one would do, but needs to be user-
declared because it is virtual and potentially serves as a key function to
emit the vtable, or is non-public, etc.; and by removing explicitly user-
provided functions that do the same as their implicitly-defined counterparts,
but may prevent implicitly declared copy functions from being defined as non-
deleted in the future.  (Even if such a user-provided function was declared
non-inline in an include file, the apparently-used implicitly-defined copy
functions are already include, so why bother with non-inline functions.)

Change-Id: Iaa08ef916a2d266e011a2cb66592b377cb1eb23c
Reviewed-on: https://gerrit.libreoffice.org/58095
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 322acaa9
...@@ -37,8 +37,6 @@ class UNOTOOLS_DLLPUBLIC CollatorWrapper ...@@ -37,8 +37,6 @@ class UNOTOOLS_DLLPUBLIC CollatorWrapper
CollatorWrapper ( CollatorWrapper (
const css::uno::Reference< css::uno::XComponentContext > &rxContext); const css::uno::Reference< css::uno::XComponentContext > &rxContext);
~CollatorWrapper();
sal_Int32 sal_Int32
compareString ( compareString (
const OUString& s1, const OUString& s2) const; const OUString& s1, const OUString& s2) const;
......
...@@ -67,7 +67,6 @@ class UNOTOOLS_DLLPUBLIC SvtCompatibilityEntry ...@@ -67,7 +67,6 @@ class UNOTOOLS_DLLPUBLIC SvtCompatibilityEntry
}; };
SvtCompatibilityEntry(); SvtCompatibilityEntry();
~SvtCompatibilityEntry();
static OUString getName( const Index rIdx ); static OUString getName( const Index rIdx );
......
...@@ -165,6 +165,11 @@ namespace utl ...@@ -165,6 +165,11 @@ namespace utl
public: public:
virtual ~ConfigItem() override; virtual ~ConfigItem() override;
ConfigItem(ConfigItem const &) = default;
ConfigItem(ConfigItem &&) = default;
ConfigItem & operator =(ConfigItem const &) = default;
ConfigItem & operator =(ConfigItem &&) = default;
/** is called from the ConfigManager before application ends of from the /** is called from the ConfigManager before application ends of from the
PropertyChangeListener if the sub tree broadcasts changes. */ PropertyChangeListener if the sub tree broadcasts changes. */
virtual void Notify( const css::uno::Sequence<OUString>& aPropertyNames)=0; virtual void Notify( const css::uno::Sequence<OUString>& aPropertyNames)=0;
......
...@@ -221,10 +221,6 @@ namespace utl ...@@ -221,10 +221,6 @@ namespace utl
const bool i_bUpdatable const bool i_bUpdatable
); );
/// copy ctor
OConfigurationTreeRoot(const OConfigurationTreeRoot& _rSource)
:OConfigurationNode(_rSource), m_xCommitter(_rSource.m_xCommitter) { }
/** open a new top-level configuration node /** open a new top-level configuration node
opens a new node which is the root if an own configuration sub tree. This is what "top level" means: The opens a new node which is the root if an own configuration sub tree. This is what "top level" means: The
......
...@@ -67,10 +67,6 @@ SvtCompatibilityEntry::SvtCompatibilityEntry() ...@@ -67,10 +67,6 @@ SvtCompatibilityEntry::SvtCompatibilityEntry()
setDefaultEntry( false ); setDefaultEntry( false );
} }
SvtCompatibilityEntry::~SvtCompatibilityEntry()
{
}
OUString SvtCompatibilityEntry::getName( const Index rIdx ) OUString SvtCompatibilityEntry::getName( const Index rIdx )
{ {
static const char* sPropertyName[] = static const char* sPropertyName[] =
......
...@@ -30,10 +30,6 @@ CollatorWrapper::CollatorWrapper ( const uno::Reference< uno::XComponentContext ...@@ -30,10 +30,6 @@ CollatorWrapper::CollatorWrapper ( const uno::Reference< uno::XComponentContext
mxInternationalCollator = i18n::Collator::create( rxContext ); mxInternationalCollator = i18n::Collator::create( rxContext );
} }
CollatorWrapper::~CollatorWrapper()
{
}
sal_Int32 sal_Int32
CollatorWrapper::compareString (const OUString& s1, const OUString& s2) const CollatorWrapper::compareString (const OUString& s1, const OUString& s2) const
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment