summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-07-14 08:17:46 +0200
committerThomas Arnhold <thomas@arnhold.org>2011-07-14 08:22:59 +0200
commitd54c3ad1518e32938117c7e529dda375d4110888 (patch)
treee358e98a9d9af223021e178898aaa1da17945a1f /cui
parentd98ac11f3962f39efb1418588c609d03fb7cc37c (diff)
callcatcher: replace Clone() by NULL
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/SpellDialog.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index c0a53730baca..c3591b92255b 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1522,7 +1522,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
//text has been added on the right and only the 'error attribute has to be corrected
if(pErrorAttrLeft)
{
- TextAttrib* pNewError = pErrorAttrLeft->GetAttr().Clone();
+ TextAttrib* pNewError = NULL;
sal_uInt16 nStart = pErrorAttrLeft->GetStart();
sal_uInt16 nEnd = pErrorAttrLeft->GetEnd();
pTextEngine->RemoveAttrib( 0, *pErrorAttrLeft );
@@ -1542,7 +1542,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
//determine the change
sal_uInt16 nAddedChars = GetText().Len() - nCurrentLen;
- TextAttrib* pNewError = pErrorAttr->GetAttr().Clone();
+ TextAttrib* pNewError = NULL;
sal_uInt16 nStart = pErrorAttr->GetStart();
sal_uInt16 nEnd = pErrorAttr->GetEnd();
pTextEngine->RemoveAttrib( 0, *pErrorAttr );
@@ -1558,7 +1558,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
if(pBackAttrLeft)
{
- TextAttrib* pNewBack = pBackAttrLeft->GetAttr().Clone();
+ TextAttrib* pNewBack = NULL;
sal_uInt16 _nStart = pBackAttrLeft->GetStart();
sal_uInt16 _nEnd = pBackAttrLeft->GetEnd();
pTextEngine->RemoveAttrib( 0, *pBackAttrLeft );
@@ -1585,7 +1585,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
m_nErrorEnd = pFontColor->GetEnd();
if(pErrorAttrib->GetStart() != m_nErrorStart || pErrorAttrib->GetEnd() != m_nErrorEnd)
{
- TextAttrib* pNewError = pErrorAttrib->GetAttr().Clone();
+ TextAttrib* pNewError = NULL;
pTextEngine->RemoveAttrib( 0, *pErrorAttr );
SetAttrib( *pNewError, 0, m_nErrorStart, m_nErrorEnd );
delete pNewError;
@@ -1740,7 +1740,7 @@ void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageT
// undo expanded attributes!
if( pBackAttrib && pBackAttrib->GetStart() < m_nErrorStart && pBackAttrib->GetEnd() == m_nErrorEnd + nDiffLen)
{
- TextAttrib* pNewBackground = pBackAttrib->GetAttr().Clone();
+ TextAttrib* pNewBackground = NULL;
sal_uInt16 nStart = pBackAttrib->GetStart();
pTextEngine->RemoveAttrib(0, *pBackAttrib);
pTextEngine->SetAttrib(*pNewBackground, 0, nStart, m_nErrorStart);