diff options
-rw-r--r-- | sw/source/core/fields/docufld.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/unocore/unofield.cxx | 13 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index b031ab747ca1..cdb73706b3c2 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -1951,6 +1951,12 @@ BOOL SwPostItField::PutValue( const uno::Any& rAny, USHORT nWhichId ) break; case FIELD_PROP_PAR2: ::GetString( rAny, sTxt ); + //#i100374# new string via api, delete complex text object so SwPostItNote picks up the new string + if (mpText) + { + delete mpText; + mpText = 0; + } break; case FIELD_PROP_TEXT: DBG_ERROR("Not implemented!"); diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 96aa8a01f5d0..431c2fd213c5 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -1988,12 +1988,25 @@ void SwXTextField::setPropertyValue(const OUString& rPropertyName, const uno::An // <- #111840# } pField->PutValue( rValue, pMap->nWID ); + + //#i100374# notify SwPostIt about new field content + if (RES_POSTITFLD== nWhich && pFmtFld) + { + const_cast<SwFmtFld*>(pFmtFld)->Broadcast(SwFmtFldHint( 0, SWFMTFLD_CHANGED )); + } + //#114571# changes of the expanded string have to be notified //#to the SwTxtFld if(RES_DBFLD == nWhich && pFmtFld->GetTxtFld()) { pFmtFld->GetTxtFld()->Expand(); } + + //#i100374# changing a document field should set the modify flag + SwDoc* pDoc = GetDoc(); + if (pDoc) + pDoc->SetModified(); + } else if(m_pProps) { |