summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2018-02-10 13:24:21 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2018-02-10 16:35:17 +0100
commitb33287cde2d270d83e2658529be768a99dba98f0 (patch)
tree001636e3915d11dd0ff8ab60b603e50a0945f110 /vcl
parent48c47db6e7e79f0accb3221a34ec03202e8fa413 (diff)
lokdialog: Handle dialog items' invalidation in general
Change-Id: Ib7b178fe97964bc5fd6ac173a143ba8ba089e237 Reviewed-on: https://gerrit.libreoffice.org/49240 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
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 4ece999ab75b..7cc4cff385bf 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -416,24 +416,6 @@ void Control::ImplInitSettings()
ApplySettings(*this);
}
-void Control::LogicInvalidate(const tools::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 tools::Rectangle aRect(Point(GetOutOffXPixel(), GetOutOffYPixel()), Size(GetOutputWidthPixel(), GetOutputHeightPixel()));
- pParent->LogicInvalidate(&aRect);
- }
- }
-}
-
tools::Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const tools::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 53b4e8cc55f1..80f09b193b66 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1189,7 +1189,7 @@ void Window::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags )
void Window::LogicInvalidate(const tools::Rectangle* pRectangle)
{
- if (comphelper::LibreOfficeKit::isDialogPainting())
+ if (comphelper::LibreOfficeKit::isDialogPainting() || !comphelper::LibreOfficeKit::isActive())
return;
if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
@@ -1201,6 +1201,12 @@ void Window::LogicInvalidate(const tools::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()