summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-11-27 15:03:19 +0100
committerJan Holesovsky <kendy@collabora.com>2017-11-28 19:49:26 +0100
commit57c0ccf77627b485e8ed05cad295c4eef5eb16e4 (patch)
tree61757c9dd00f4813ca789e76585f9ef18bf5aabc
parent80d9696eb76e69101996c7a35ffec4c247e079d8 (diff)
lokdialog: Move the LogicInvalidate from Dialog down to Window.
Another step towards the autofilter popup working... Change-Id: I4907a23fcd0fc64da0c7f51e2f36b1657a17638c
-rw-r--r--include/vcl/dialog.hxx1
-rw-r--r--include/vcl/window.hxx1
-rw-r--r--vcl/source/window/dialog.cxx15
-rw-r--r--vcl/source/window/paint.cxx16
4 files changed, 17 insertions, 16 deletions
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 73a68d657254..8f01f32cec3f 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -65,7 +65,6 @@ protected:
public:
SAL_DLLPRIVATE bool IsInClose() const { return mbInClose; }
virtual void doDeferredInit(WinBits nBits) override;
- virtual void LogicInvalidate(const Rectangle* pRectangle) override;
void InvalidateFloatingWindow(const Point& rPos);
void CloseFloatingWindow();
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index d424f6fd14ab..f4e154816f3d 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1066,6 +1066,7 @@ public:
virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE );
virtual void Invalidate( const Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE );
virtual void Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags = InvalidateFlags::NONE );
+ virtual void LogicInvalidate(const Rectangle* pRectangle) override;
void Validate();
bool HasPaintEvent() const;
void Update();
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index c1265b69e1b9..9e50f32cbe0f 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -896,21 +896,6 @@ void Dialog::CloseFloatingWindow()
pNotifier->notifyWindowChild(GetLOKWindowId(), "close", Point(0, 0));
}
-void Dialog::LogicInvalidate(const Rectangle* pRectangle)
-{
- if (comphelper::LibreOfficeKit::isDialogPainting())
- return;
-
- if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
- {
- std::vector<vcl::LOKPayloadItem> aPayload;
- if (pRectangle)
- aPayload.push_back(std::make_pair(OString("rectangle"), pRectangle->toString()));
-
- pNotifier->notifyWindow(GetLOKWindowId(), "invalidate", aPayload);
- }
-}
-
void Dialog::ensureRepaint()
{
// ensure repaint
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 7639a0ee8115..fcfbc4bf905c 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1212,6 +1212,22 @@ void Window::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags )
}
}
+void Window::LogicInvalidate(const Rectangle* pRectangle)
+{
+ if (comphelper::LibreOfficeKit::isDialogPainting())
+ return;
+
+ if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
+ {
+ // In case we are routing the window, notify the client
+ std::vector<vcl::LOKPayloadItem> aPayload;
+ if (pRectangle)
+ aPayload.push_back(std::make_pair(OString("rectangle"), pRectangle->toString()));
+
+ pNotifier->notifyWindow(GetLOKWindowId(), "invalidate", aPayload);
+ }
+}
+
void Window::Validate()
{
if ( !comphelper::LibreOfficeKit::isActive() && (!IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight) )