summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode
diff options
context:
space:
mode:
authorOliver-Rainer Wittmann <orw@apache.org>2014-06-13 14:08:22 +0000
committerMichael Stahl <mstahl@redhat.com>2014-06-13 20:32:14 +0200
commitcd94a84b89c476760ad74bf088a5d6f8ba4ce209 (patch)
tree8093be7a73ad668d1ee014aa4d0122504e215555 /sw/source/core/txtnode
parentb8bee05dbf85bc4f5834520aa5d64e9ae18aba4e (diff)
125044: - use field's content cache on <SwTxtFld> construction only
... for clipboard documents - assure invalidation and updates on code to update fields (cherry picked from commit 3d4d98d4d98bc62474ec295cdc4d070a01dcac13) The substantial bug was already fixed years ago by commit 9519deda120b73b72e75d89c3b2ae3d66220ec2d Conflicts: sw/inc/txtannotationfld.hxx sw/inc/txtfld.hxx sw/source/core/crsr/crstrvl.cxx sw/source/core/txtnode/atrfld.cxx sw/source/core/txtnode/thints.cxx Change-Id: Ib4965c5d443b60bab11bad1a9249fc6547976a3c
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r--sw/source/core/txtnode/atrfld.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index faf2b81581b5..e533eb54e8cd 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -269,7 +269,9 @@ void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
pType->GetValue( aCalc );
}
}
- mpTxtFld->ExpandTxtFld();
+
+ const bool bForceNotify = (pOld == NULL) && (pNew == NULL);
+ mpTxtFld->ExpandTxtFld( bForceNotify );
}
bool SwFmtFld::GetInfo( SfxPoolItem& rInfo ) const
@@ -326,14 +328,15 @@ bool SwTxtFld::IsFldInDoc() const
&& GetpTxtNode()->GetNodes().IsDocNodes();
}
-void SwTxtFld::ExpandTxtFld() const
+void SwTxtFld::ExpandTxtFld(const bool bForceNotify) const
{
OSL_ENSURE( m_pTxtNode, "SwTxtFld: where is my TxtNode?" );
const SwField* pFld = GetFmtFld().GetField();
const OUString aNewExpand( pFld->ExpandField(m_pTxtNode->GetDoc()->IsClipBoard()) );
- if( aNewExpand == m_aExpand )
+ if (!bForceNotify &&
+ aNewExpand == m_aExpand)
{
// Bei Seitennummernfeldern
const sal_uInt16 nWhich = pFld->GetTyp()->Which();