summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2018-02-10 13:24:21 +0100
committerAndras Timar <andras.timar@collabora.com>2018-02-12 18:05:20 +0100
commit1c5ba7f055f8dc9f2ff081ad0e8509a18e74c61c (patch)
tree659fc811b6e206f5558d473486ed8b2895d94770 /vcl
parentd319b8ea37122b494992c76fd9dc890b95e48e01 (diff)
lokdialog: Handle dialog items' invalidation in general
Reviewed-on: https://gerrit.libreoffice.org/49240 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit b33287cde2d270d83e2658529be768a99dba98f0) Signed-off-by: Andras Timar <andras.timar@collabora.com> Change-Id: Ib7b178fe97964bc5fd6ac173a143ba8ba089e237
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/ctrl.cxx18
-rw-r--r--vcl/source/window/paint.cxx8
2 files changed, 7 insertions, 19 deletions
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 15c3a4ea61cf..007b430f580f 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -415,24 +415,6 @@ void Control::ImplInitSettings(const bool, const bool)
ApplySettings(*this);
}
-void Control::LogicInvalidate(const Rectangle* /*pRectangle*/)
-{
- // Several repaint, resize invalidations are emitted when we are painting,
- // ignore all of those
- if (comphelper::LibreOfficeKit::isActive() && !comphelper::LibreOfficeKit::isDialogPainting())
- {
- if (VclPtr<vcl::Window> pParent = GetParentWithLOKNotifier())
- {
- // invalidate the complete floating window for now
- if (pParent->ImplIsFloatingWindow())
- return pParent->LogicInvalidate(nullptr);
-
- const Rectangle aRect(Point(GetOutOffXPixel(), GetOutOffYPixel()), Size(GetOutputWidthPixel(), GetOutputHeightPixel()));
- pParent->LogicInvalidate(&aRect);
- }
- }
-}
-
Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const Rectangle& rRect, const OUString& _rStr,
DrawTextFlags _nStyle, MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize ) const
{
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index a3fe6a6612b3..54341c5e4039 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1214,7 +1214,7 @@ void Window::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags )
void Window::LogicInvalidate(const Rectangle* pRectangle)
{
- if (comphelper::LibreOfficeKit::isDialogPainting())
+ if (comphelper::LibreOfficeKit::isDialogPainting() || !comphelper::LibreOfficeKit::isActive())
return;
if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
@@ -1226,6 +1226,12 @@ void Window::LogicInvalidate(const Rectangle* pRectangle)
pNotifier->notifyWindow(GetLOKWindowId(), "invalidate", aPayload);
}
+ // Added for dialog items. Pass invalidation to the parent window.
+ else if (VclPtr<vcl::Window> pParent = GetParentWithLOKNotifier())
+ {
+ const tools::Rectangle aRect(Point(GetOutOffXPixel(), GetOutOffYPixel()), Size(GetOutputWidthPixel(), GetOutputHeightPixel()));
+ pParent->LogicInvalidate(&aRect);
+ }
}
void Window::Validate()