summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/tabpages/backgrnd.cxx22
-rw-r--r--include/vcl/window.hxx2
2 files changed, 23 insertions, 1 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 00bdcd0cadd8..3926e04f83fd 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -24,6 +24,7 @@
#include <vcl/msgbox.hxx>
#include <vcl/settings.hxx>
#include <vcl/idle.hxx>
+#include <vcl/window.hxx>
#include <tools/urlobj.hxx>
#include <sfx2/dialoghelper.hxx>
#include <sfx2/objsh.hxx>
@@ -51,6 +52,7 @@
#include <svl/intitem.hxx>
#include <sfx2/request.hxx>
#include <svtools/grfmgr.hxx>
+#include <comphelper/lok.hxx>
using namespace css;
@@ -154,6 +156,7 @@ protected:
virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect ) override;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
virtual void Resize() override;
+ virtual void LogicInvalidate(const ::tools::Rectangle* pRectangle) override;
private:
@@ -310,6 +313,25 @@ void BackgroundPreviewImpl::DataChanged( const DataChangedEvent& rDCEvt )
Window::DataChanged( rDCEvt );
}
+
+void BackgroundPreviewImpl::LogicInvalidate(const ::tools::Rectangle* /*pRectangle*/)
+{
+ // Invalidate the container dialog or floating window
+ // The code is same as in Control::LogicInvalidate() method
+ 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);
+ }
+ }
+}
+
#define HDL(hdl) LINK(this,SvxBackgroundTabPage,hdl)
SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 3fe40355bab3..7028255f5999 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -567,7 +567,7 @@ public:
SAL_DLLPRIVATE bool ImplIsWindowOrChild( const vcl::Window* pWindow, bool bSystemWindow = false ) const;
SAL_DLLPRIVATE bool ImplIsChild( const vcl::Window* pWindow, bool bSystemWindow = false ) const;
- SAL_DLLPRIVATE bool ImplIsFloatingWindow() const;
+ bool ImplIsFloatingWindow() const;
SAL_DLLPRIVATE bool ImplIsPushButton() const;
SAL_DLLPRIVATE bool ImplIsSplitter() const;
SAL_DLLPRIVATE bool ImplIsOverlapWindow() const;