diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-01-02 17:57:22 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-01-04 01:01:13 +0100 |
commit | 6e5c4001c7b5cab2b2cc6419072acbe5fa7cb04a (patch) | |
tree | 9f7e720477c76016238fac57a6977633b46d84c8 /sw/source/core/layout/paintfrm.cxx | |
parent | 7f51df20036ed75e4324b2d2ac60b65f99d6fc9d (diff) |
Unfloat: Handle unfloat button visibility
We need to update the state of the button every time
when the frame's layout changes or when the selection
changes.
Show the button if the text frame is selected and it's
a floating table which would hang out of the actual page
after unfloating.
Change-Id: I6b64affb063f552921915a0735e80889e5fd8124
Reviewed-on: https://gerrit.libreoffice.org/65819
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sw/source/core/layout/paintfrm.cxx')
-rwxr-xr-x[-rw-r--r--] | sw/source/core/layout/paintfrm.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index b3c1c8b0cc63..815497059439 100644..100755 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -4088,12 +4088,24 @@ void SwFlyFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& // have to paint frame borders added in heaven layer here... ProcessPrimitives(gProp.pBLines->GetBorderLines_Clear()); + PaintDecorators(); + rRenderContext.Pop(); if ( gProp.pSProgress && pNoText ) SfxProgress::Reschedule(); } +void SwFlyFrame::PaintDecorators() const +{ + // Show the un-float button + SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( gProp.pSGlobalShell ); + if ( pWrtSh ) + { + UpdateUnfloatButton(pWrtSh, IsShowUnfloatButton(pWrtSh)); + } +} + void SwTabFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const { const SwViewOption* pViewOption = gProp.pSGlobalShell->GetViewOptions(); |