diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-11-30 23:35:05 +0530 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.co.uk> | 2017-12-04 17:14:00 +0530 |
commit | ec09f526114ef289e7a0a7804f443f2b16a67f15 (patch) | |
tree | 0768791d7bc516b03977d7789f7efc047e62a012 | |
parent | 2f2679a56c0ae5dbcab6a0e6aa523587ecdc84fe (diff) |
lokdialog: Kill some code; use already existing method to paint
This is not require now in the new approach where the dialog is already
created by the time paint request call for dialog happens. Layouting is
already complete by that time.
Change-Id: I610b050a268e61e8d4036aa7eb5766cf0c8b37e0
-rw-r--r-- | desktop/source/lib/init.cxx | 2 | ||||
-rw-r--r-- | include/vcl/dialog.hxx | 3 | ||||
-rw-r--r-- | include/vcl/window.hxx | 1 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 11 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 9 |
5 files changed, 1 insertions, 25 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 02790af6b2f4..34ada55de87e 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3310,7 +3310,7 @@ static void doc_paintWindow(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKWind pDevice->SetMapMode(aMapMode); comphelper::LibreOfficeKit::setDialogPainting(true); - pWindow->paintDialog(*pDevice.get()); + pWindow->PaintToDevice(pDevice.get(), Point(0, 0), Size()); comphelper::LibreOfficeKit::setDialogPainting(false); } diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index acc1ceef2701..f8c58122396d 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -78,9 +78,6 @@ public: void InvalidateFloatingWindow(const Point& rPos); void CloseFloatingWindow(); - /// Paints the current dialog to the given virtual device - void paintDialog(VirtualDevice& rDevice) override; - protected: explicit Dialog( WindowType nType ); explicit Dialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription, WindowType nType, InitFlag eFlag = InitFlag::Default, bool bBorder = false ); diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index a638dfa88f94..603e7307291f 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -1215,7 +1215,6 @@ public: static VclPtr<Window> FindLOKWindow(vcl::LOKWindowId nWindowId); /// Dialog / window tunneling related methods. - virtual void paintDialog(VirtualDevice& rDevice); Size PaintActiveFloatingWindow(VirtualDevice& rDevice) const; void LogicMouseButtonDown(const MouseEvent& rMouseEvent); diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 59fcf1518eff..5ef3c0fb0238 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -882,17 +882,6 @@ bool Dialog::selectPageByUIXMLDescription(const OString& /*rUIXMLDescription*/) return true; } -void Dialog::paintDialog(VirtualDevice& rDevice) -{ - setDeferredProperties(); - ImplAdjustNWFSizes(); - Show(); - ToTop(); - ensureRepaint(); - - PaintToDevice(&rDevice, Point(0, 0), Size()); -} - void Dialog::InvalidateFloatingWindow(const Point& rPos) { if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 26a63eea7870..2e6669e46904 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3203,15 +3203,6 @@ vcl::LOKWindowId Window::GetLOKWindowId() const return mpWindowImpl->mnLOKWindowId; } -void Window::paintDialog(VirtualDevice& rDevice) -{ - // FIXME are these two necessary? - Show(); - ToTop(); - - PaintToDevice(&rDevice, Point(0, 0), Size()); -} - Size Window::PaintActiveFloatingWindow(VirtualDevice& rDevice) const { Size aRet; |