diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/scheduler.cxx | 3 | ||||
-rw-r--r-- | vcl/source/window/accel.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/generic/printer/jobdata.cxx | 3 |
4 files changed, 11 insertions, 0 deletions
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx index c2a3b07d4d3a..23bba5d7a25e 100644 --- a/vcl/source/app/scheduler.cxx +++ b/vcl/source/app/scheduler.cxx @@ -609,6 +609,9 @@ void Task::SetPriority(TaskPriority ePriority) Task& Task::operator=( const Task& rTask ) { + if(this == &rTask) + return *this; + if ( IsActive() ) Stop(); diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx index 3a5e31baf8d2..0b16a053730f 100644 --- a/vcl/source/window/accel.cxx +++ b/vcl/source/window/accel.cxx @@ -281,6 +281,8 @@ Accelerator* Accelerator::GetAccel( sal_uInt16 nItemId ) const Accelerator& Accelerator::operator=( const Accelerator& rAccel ) { + if(this == &rAccel) + return *this; // assign new data maCurKeyCode = vcl::KeyCode(); diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 9d7c5cc9e3d2..516d5930d183 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -1166,6 +1166,9 @@ OString Menu::GetHelpId( sal_uInt16 nItemId ) const Menu& Menu::operator=( const Menu& rMenu ) { + if(this == &rMenu) + return *this; + // clean up Clear(); diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx index 8f2b0018ca07..02d10cf48077 100644 --- a/vcl/unx/generic/printer/jobdata.cxx +++ b/vcl/unx/generic/printer/jobdata.cxx @@ -29,6 +29,9 @@ using namespace psp; JobData& JobData::operator=(const JobData& rRight) { + if(this == &rRight) + return *this; + m_nCopies = rRight.m_nCopies; m_bCollate = rRight.m_bCollate; m_nLeftMarginAdjust = rRight.m_nLeftMarginAdjust; |