summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/SpellDialog.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@erack.de>2011-10-19 01:36:59 +0200
committerEike Rathke <erack@erack.de>2011-10-19 01:38:19 +0200
commit9796ac726e4c194e3cfa35e201815f9f1bb03e6a (patch)
tree9f0f5a63f5b8e8c39b5b613d7d821f14a3a967ef /cui/source/dialogs/SpellDialog.cxx
parentc35fb339f5aaf3ed8dea71baefb1521f0506e2cb (diff)
Revert "callcatcher: replace Clone() by NULL"
That doesn't make sense, not even with a callcatcher excuse. This reverts commit d54c3ad1518e32938117c7e529dda375d4110888.
Diffstat (limited to 'cui/source/dialogs/SpellDialog.cxx')
-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 8db9ef0da12b..389cee6a7887 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1537,7 +1537,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 = NULL;
+ TextAttrib* pNewError = pErrorAttrLeft->GetAttr().Clone();
sal_uInt16 nStart = pErrorAttrLeft->GetStart();
sal_uInt16 nEnd = pErrorAttrLeft->GetEnd();
pTextEngine->RemoveAttrib( 0, *pErrorAttrLeft );
@@ -1557,7 +1557,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
//determine the change
sal_uInt16 nAddedChars = GetText().Len() - nCurrentLen;
- TextAttrib* pNewError = NULL;
+ TextAttrib* pNewError = pErrorAttr->GetAttr().Clone();
sal_uInt16 nStart = pErrorAttr->GetStart();
sal_uInt16 nEnd = pErrorAttr->GetEnd();
pTextEngine->RemoveAttrib( 0, *pErrorAttr );
@@ -1573,7 +1573,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
if(pBackAttrLeft)
{
- TextAttrib* pNewBack = NULL;
+ TextAttrib* pNewBack = pBackAttrLeft->GetAttr().Clone();
sal_uInt16 _nStart = pBackAttrLeft->GetStart();
sal_uInt16 _nEnd = pBackAttrLeft->GetEnd();
pTextEngine->RemoveAttrib( 0, *pBackAttrLeft );
@@ -1600,7 +1600,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
m_nErrorEnd = pFontColor->GetEnd();
if(pErrorAttrib->GetStart() != m_nErrorStart || pErrorAttrib->GetEnd() != m_nErrorEnd)
{
- TextAttrib* pNewError = NULL;
+ TextAttrib* pNewError = pErrorAttrib->GetAttr().Clone();
pTextEngine->RemoveAttrib( 0, *pErrorAttr );
SetAttrib( *pNewError, 0, m_nErrorStart, m_nErrorEnd );
delete pNewError;
@@ -1755,7 +1755,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 = NULL;
+ TextAttrib* pNewBackground = pBackAttrib->GetAttr().Clone();
sal_uInt16 nStart = pBackAttrib->GetStart();
pTextEngine->RemoveAttrib(0, *pBackAttrib);
pTextEngine->SetAttrib(*pNewBackground, 0, nStart, m_nErrorStart);