coverity#1371313 Missing move assignment operator
Change-Id: I07a9d7fe837c18e66b4a2a57186f1f9b0d44daee
This commit is contained in:
@@ -74,9 +74,12 @@ namespace utl
|
||||
OConfigurationNode() :m_bEscapeNames(false) { }
|
||||
/// copy ctor
|
||||
OConfigurationNode(const OConfigurationNode& _rSource);
|
||||
/// move ctor
|
||||
OConfigurationNode(OConfigurationNode&& _rSource);
|
||||
|
||||
/// assigment
|
||||
OConfigurationNode& operator=(const OConfigurationNode& _rSource);
|
||||
OConfigurationNode& operator=(OConfigurationNode&& _rSource);
|
||||
|
||||
/// dtor
|
||||
virtual ~OConfigurationNode() override {}
|
||||
|
@@ -78,13 +78,27 @@ namespace utl
|
||||
}
|
||||
|
||||
OConfigurationNode::OConfigurationNode(const OConfigurationNode& _rSource)
|
||||
:OEventListenerAdapter()
|
||||
,m_xHierarchyAccess(_rSource.m_xHierarchyAccess)
|
||||
,m_xDirectAccess(_rSource.m_xDirectAccess)
|
||||
,m_xReplaceAccess(_rSource.m_xReplaceAccess)
|
||||
,m_xContainerAccess(_rSource.m_xContainerAccess)
|
||||
,m_bEscapeNames(_rSource.m_bEscapeNames)
|
||||
,m_sCompletePath(_rSource.m_sCompletePath)
|
||||
: OEventListenerAdapter()
|
||||
, m_xHierarchyAccess(_rSource.m_xHierarchyAccess)
|
||||
, m_xDirectAccess(_rSource.m_xDirectAccess)
|
||||
, m_xReplaceAccess(_rSource.m_xReplaceAccess)
|
||||
, m_xContainerAccess(_rSource.m_xContainerAccess)
|
||||
, m_bEscapeNames(_rSource.m_bEscapeNames)
|
||||
, m_sCompletePath(_rSource.m_sCompletePath)
|
||||
{
|
||||
Reference< XComponent > xConfigNodeComp(m_xDirectAccess, UNO_QUERY);
|
||||
if (xConfigNodeComp.is())
|
||||
startComponentListening(xConfigNodeComp);
|
||||
}
|
||||
|
||||
OConfigurationNode::OConfigurationNode(OConfigurationNode&& _rSource)
|
||||
: OEventListenerAdapter()
|
||||
, m_xHierarchyAccess(std::move(_rSource.m_xHierarchyAccess))
|
||||
, m_xDirectAccess(std::move(_rSource.m_xDirectAccess))
|
||||
, m_xReplaceAccess(std::move(_rSource.m_xReplaceAccess))
|
||||
, m_xContainerAccess(std::move(_rSource.m_xContainerAccess))
|
||||
, m_bEscapeNames(std::move(_rSource.m_bEscapeNames))
|
||||
, m_sCompletePath(std::move(_rSource.m_sCompletePath))
|
||||
{
|
||||
Reference< XComponent > xConfigNodeComp(m_xDirectAccess, UNO_QUERY);
|
||||
if (xConfigNodeComp.is())
|
||||
@@ -109,6 +123,24 @@ namespace utl
|
||||
return *this;
|
||||
}
|
||||
|
||||
OConfigurationNode& OConfigurationNode::operator=(OConfigurationNode&& _rSource)
|
||||
{
|
||||
stopAllComponentListening();
|
||||
|
||||
m_xHierarchyAccess = std::move(_rSource.m_xHierarchyAccess);
|
||||
m_xDirectAccess = std::move(_rSource.m_xDirectAccess);
|
||||
m_xContainerAccess = std::move(_rSource.m_xContainerAccess);
|
||||
m_xReplaceAccess = std::move(_rSource.m_xReplaceAccess);
|
||||
m_bEscapeNames = std::move(_rSource.m_bEscapeNames);
|
||||
m_sCompletePath = std::move(_rSource.m_sCompletePath);
|
||||
|
||||
Reference< XComponent > xConfigNodeComp(m_xDirectAccess, UNO_QUERY);
|
||||
if (xConfigNodeComp.is())
|
||||
startComponentListening(xConfigNodeComp);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void OConfigurationNode::_disposing( const EventObject& _rSource )
|
||||
{
|
||||
Reference< XComponent > xDisposingSource(_rSource.Source, UNO_QUERY);
|
||||
|
Reference in New Issue
Block a user