summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-24 10:51:50 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-24 12:46:56 +0100
commit4681801f8515c18b6ecead39093effecbbc6df46 (patch)
tree1bbd615dd35546b4f66c72d3f07f57bcce0ab54e /sw
parentfb743559fb993d2d8d8b61354e734c27d9d13e1c (diff)
implement undo of character style rename
Change-Id: Ie503cccbfdbce882a429fe25f29b5b7aaf6b38e9
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/app/docstyle.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index e6d208ec8e79..a7a778d7ef58 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -962,7 +962,11 @@ bool SwDocStyleSheet::SetName(const OUString& rStr, bool bReindexNow)
OSL_ENSURE(pCharFmt, "SwCharFormat missing!");
if( pCharFmt && pCharFmt->GetName() != rStr )
{
- pCharFmt->SetName( rStr );
+ if (!pCharFmt->GetName().isEmpty())
+ rDoc.RenameFmt(*pCharFmt, rStr);
+ else
+ pCharFmt->SetName(rStr);
+
bChg = true;
}
break;