[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source
Caolán McNamara
caolanm at redhat.com
Tue May 28 05:37:42 PDT 2013
svx/source/svdraw/svdundo.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 116eda4dc9723b41de3b6dcf1adaee041bb52f9d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue May 28 13:21:19 2013 +0100
Fix editing text in draw object undo regression
Regression since 6e29f56895cd38aa7dee85112370a7cfc0d24632 and
28d2a0c162b477a013c7c51c19a94fb08b55b276 pText1 can legally be NULL
Change-Id: I0d54f4aeaa18834c32daeabad43776bc4f68088b
(cherry picked from commit 90df8be13d8f72e0d431161a864f108e74549aff)
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 5026435..8209282 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -1144,10 +1144,10 @@ void SdrUndoObjSetText::Undo()
AfterSetText();
SdrText* pText = static_cast< SdrTextObj*>( pObj )->getText(mnText);
- if (pText && pOldText)
+ if (pText)
{
// copy text for Undo, because the original now belongs to SetOutlinerParaObject()
- OutlinerParaObject* pText1 = new OutlinerParaObject(*pOldText);
+ OutlinerParaObject* pText1 = pOldText ? new OutlinerParaObject(*pOldText) : NULL;
pText->SetOutlinerParaObject(pText1);
}
@@ -1158,10 +1158,10 @@ void SdrUndoObjSetText::Undo()
void SdrUndoObjSetText::Redo()
{
SdrText* pText = static_cast< SdrTextObj*>( pObj )->getText(mnText);
- if (pText && pNewText)
+ if (pText)
{
// copy text for Undo, because the original now belongs to SetOutlinerParaObject()
- OutlinerParaObject* pText1 = new OutlinerParaObject(*pNewText);
+ OutlinerParaObject* pText1 = pNewText ? new OutlinerParaObject(*pNewText) : NULL;
static_cast< SdrTextObj* >( pObj )->NbcSetOutlinerParaObjectForText( pText1, pText );
}
pObj->ActionChanged();
More information about the Libreoffice-commits
mailing list