summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2012-01-09 18:15:11 +0100
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2012-01-09 18:16:06 +0100
commit3d3584237424b8efefdb0579e131892e1ddf00a9 (patch)
treeab537e0445f0c4774a10c10c5e423c80d0a90669
parent0d6e8c35133c10b3b4e0ef69bbca51ac7506b5d2 (diff)
fdo#36681: refresh the layout after inserting a picture
-rw-r--r--sw/source/core/frmedt/fefly1.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 97c6a5d67f00..473f6f33bb65 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -846,6 +846,12 @@ void SwFEShell::Insert( const String& rGrfName, const String& rFltName,
const Point aPt( GetCrsrDocPos() );
SwFlyFrm* pFrm = pFmt->GetFrm( &aPt );
+ // Invalidate the content and layout to refresh the picture anchoring
+ // properly
+ SwPageFrm* pPageFrm = pFrm->FindPageFrmOfAnchor();
+ pPageFrm->InvalidateFlyLayout();
+ pPageFrm->InvalidateCntnt();
+
if( pFrm )
SelectFlyFrm( *pFrm, sal_True );
else