diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-24 10:51:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-24 12:46:56 +0100 |
commit | 4681801f8515c18b6ecead39093effecbbc6df46 (patch) | |
tree | 1bbd615dd35546b4f66c72d3f07f57bcce0ab54e /sw | |
parent | fb743559fb993d2d8d8b61354e734c27d9d13e1c (diff) |
implement undo of character style rename
Change-Id: Ie503cccbfdbce882a429fe25f29b5b7aaf6b38e9
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/app/docstyle.cxx | 6 |
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; |