Blob Blame History Raw
From e3dfae0741aae8581cd3fc713ba1b4459bb22d88 Mon Sep 17 00:00:00 2001
From: Michael Stahl <mstahl@redhat.com>
Date: Fri, 2 Mar 2012 21:32:27 +0100
Subject: [PATCH 2/2] fdo#42073: sw: expand all text fields when setting
 properties:

SwXTextField::setPropertyValue: call Expand() for all text fields
Fixes getPresentation returning stale values.
(regression from CWS sw34bf01, 8485708f3001fca132c3353c464fe7187ef62bed)
Also, without this the text formatting does not actually update and the new
content is not displayed until some other unrelated editing operation.
---
 sw/source/core/unocore/unofield.cxx |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index c12ac14..0cc0223 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -1912,9 +1912,8 @@ void SwXTextField::setPropertyValue(const OUString& rPropertyName, const uno::An
         const_cast<SwFmtFld*>(pFmtFld)->Broadcast(SwFmtFldHint( 0, SWFMTFLD_CHANGED ));
     }
 
-        // changes of the expanded string have to be notified
-        //#to the SwTxtFld
-        if(RES_DBFLD == nWhich && pFmtFld->GetTxtFld())
+        // fdo#42073 notify SwTxtFld about changes of the expanded string
+        if (pFmtFld->GetTxtFld())
         {
             pFmtFld->GetTxtFld()->Expand();
         }
-- 
1.7.7.6