[Libreoffice-commits] .: sw/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Tue Oct 18 04:02:24 PDT 2011
sw/source/ui/docvw/FrameControlsManager.cxx | 17 ++++++++++++++++-
sw/source/ui/inc/FrameControl.hxx | 15 ++++++++++++++-
sw/source/ui/inc/FrameControlsManager.hxx | 3 +++
3 files changed, 33 insertions(+), 2 deletions(-)
New commits:
commit a12a2b63e2bc705c2dca85b9e3194c38dbe6d349
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date: Tue Oct 18 12:59:27 2011 +0200
Removed some -Weffc++ warnings from the Header/Footer work
diff --git a/sw/source/ui/docvw/FrameControlsManager.cxx b/sw/source/ui/docvw/FrameControlsManager.cxx
index 6fe07e2..62f9b32 100644
--- a/sw/source/ui/docvw/FrameControlsManager.cxx
+++ b/sw/source/ui/docvw/FrameControlsManager.cxx
@@ -45,6 +45,7 @@ namespace
public:
FramePredicate( const SwFrm* pFrm ) : m_pToMatch( pFrm ) { };
+ virtual ~FramePredicate() {};
virtual bool operator()( SwFrameControlPtr pToCheck )
{ return m_pToMatch == pToCheck->GetFrame(); };
@@ -52,7 +53,8 @@ namespace
}
SwFrameControlsManager::SwFrameControlsManager( SwEditWin* pEditWin ) :
- m_pEditWin( pEditWin )
+ m_pEditWin( pEditWin ),
+ m_aControls( )
{
}
@@ -68,6 +70,19 @@ SwFrameControlsManager::~SwFrameControlsManager()
m_aControls.clear();
}
+SwFrameControlsManager::SwFrameControlsManager( const SwFrameControlsManager& rCopy ) :
+ m_pEditWin( rCopy.m_pEditWin ),
+ m_aControls( rCopy.m_aControls )
+{
+}
+
+const SwFrameControlsManager& SwFrameControlsManager::operator=( const SwFrameControlsManager& rCopy )
+{
+ m_pEditWin = rCopy.m_pEditWin;
+ m_aControls = rCopy.m_aControls;
+ return *this;
+}
+
std::vector< SwFrameControlPtr >& SwFrameControlsManager::GetControls( FrameControlType eType )
{
return m_aControls[eType];
diff --git a/sw/source/ui/inc/FrameControl.hxx b/sw/source/ui/inc/FrameControl.hxx
index 0be643d..4e52918 100644
--- a/sw/source/ui/inc/FrameControl.hxx
+++ b/sw/source/ui/inc/FrameControl.hxx
@@ -41,7 +41,20 @@ class SwFrameControl
public:
SwFrameControl( SwEditWin* pEditWin, const SwFrm* pFrm ) :
m_pEditWin( pEditWin ), m_pFrm( pFrm ) {};
- ~SwFrameControl( ) {};
+ virtual ~SwFrameControl( ) {};
+
+ SwFrameControl( const SwFrameControl& rCopy ) :
+ m_pEditWin( rCopy.m_pEditWin ),
+ m_pFrm( rCopy.m_pFrm )
+ {
+ }
+
+ const SwFrameControl& operator=( const SwFrameControl& rCopy )
+ {
+ m_pEditWin = rCopy.m_pEditWin;
+ m_pFrm = rCopy.m_pFrm;
+ return *this;
+ }
const SwFrm* GetFrame( ) { return m_pFrm; }
SwEditWin* GetEditWin( ) { return m_pEditWin; }
diff --git a/sw/source/ui/inc/FrameControlsManager.hxx b/sw/source/ui/inc/FrameControlsManager.hxx
index b79843f..798c0b9 100644
--- a/sw/source/ui/inc/FrameControlsManager.hxx
+++ b/sw/source/ui/inc/FrameControlsManager.hxx
@@ -57,6 +57,9 @@ class SwFrameControlsManager
SwFrameControlsManager( SwEditWin* pEditWin );
~SwFrameControlsManager( );
+ SwFrameControlsManager( const SwFrameControlsManager& rCopy );
+ const SwFrameControlsManager& operator=( const SwFrameControlsManager& rCopy );
+
std::vector< SwFrameControlPtr >& GetControls( FrameControlType eType );
void AddControl( FrameControlType eType, SwFrameControlPtr pControl );
void RemoveControls( const SwFrm* pFrm );
More information about the Libreoffice-commits
mailing list