[Libreoffice-commits] .: sw/source
Miklos Vajna
vmiklos at kemper.freedesktop.org
Fri Jul 20 09:25:27 PDT 2012
sw/source/core/unocore/unofield.cxx | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
New commits:
commit c69bd0ead5852967492046caa311732ebe549a7c
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Fri Jul 20 18:25:06 2012 +0200
SwXTextField::attachToRange: avoid unnecessary dynamic_cast
Change-Id: I76aab7b0405db206fa03e03021ac872fc435eec2
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 1b14610..957cb6b 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -1766,12 +1766,8 @@ void SwXTextField::attachToRange(
// The fieldmark always has a (generated) name.
pPostItField->SetName(pFieldmark->GetName());
else
- {
// The field has a name already, use it.
- sw::mark::MarkBase* pMarkBase = dynamic_cast<sw::mark::MarkBase*>(pFieldmark);
- if (pMarkBase)
- pMarkBase->SetName(pPostItField->GetName());
- }
+ pMarksAccess->renameMark(pFieldmark, pPostItField->GetName());
// Make sure we always insert the field at the end
SwPaM aEnd(*aPam.End(), *aPam.End());
More information about the Libreoffice-commits
mailing list