summaryrefslogtreecommitdiff
path: root/svx/source/editeng
diff options
context:
space:
mode:
authorMalte Timmermann <mt@openoffice.org>2001-08-28 08:52:58 +0000
committerMalte Timmermann <mt@openoffice.org>2001-08-28 08:52:58 +0000
commitf6efc1591b5721e4f27c052ab688e63ee2dfeb24 (patch)
tree211655ff087ada90f493592fdf27d9c066373236 /svx/source/editeng
parent72e7d80d7fab5bfb12b7dbdd583da2e9357e58e5 (diff)
SetStyleSheet: pStyle may be NULL (Undo)
Diffstat (limited to 'svx/source/editeng')
-rw-r--r--svx/source/editeng/impedit5.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/svx/source/editeng/impedit5.cxx b/svx/source/editeng/impedit5.cxx
index f4dd9c4248cc..ed7d348f5887 100644
--- a/svx/source/editeng/impedit5.cxx
+++ b/svx/source/editeng/impedit5.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: impedit5.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: mt $ $Date: 2001-08-21 11:00:40 $
+ * last change: $Author: mt $ $Date: 2001-08-28 09:52:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -124,11 +124,14 @@ void ImpEditEngine::SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle )
if ( pCurStyle )
aPrevStyleName = pCurStyle->GetName();
+ XubString aNewStyleName;
+ if ( pStyle )
+ aNewStyleName = pStyle->GetName();
+
InsertUndo(
new EditUndoSetStyleSheet( this, aEditDoc.GetPos( pNode ),
- aPrevStyleName,
- pCurStyle ? pCurStyle->GetFamily() : SFX_STYLE_FAMILY_PARA,
- pStyle->GetName(), pStyle->GetFamily(),
+ aPrevStyleName, pCurStyle ? pCurStyle->GetFamily() : SFX_STYLE_FAMILY_PARA,
+ aNewStyleName, pStyle ? pStyle->GetFamily() : SFX_STYLE_FAMILY_PARA,
pNode->GetContentAttribs().GetItems() ) );
}
#endif