summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorPranam Lashkari <lpranam@collabora.com>2021-03-02 06:04:40 +0530
committerAndras Timar <andras.timar@collabora.com>2021-03-07 21:55:59 +0100
commit4f7121822037f89a1802e00dddf9f21a8df7c91c (patch)
tree9ad91d1bb01f6153e0c320a9c9d9d7b790cc9701 /svx
parent5ad541462aec381bb6a9d86db5ed20ecb6ddb496 (diff)
LOK: added missing PixelInvalidate method for currency list
when docking window is displayed in popup mode, there are two windows created docking window and floating window, to make the this window work correctly with LOK, we have to invalidate the floating window to update floating window, as well as docking window. Change-Id: Ia1b4220646664aa0666a24e34fc14bf41421f9e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111892 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index ff8aeb8b6db8..0d06766d6ef2 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -321,6 +321,8 @@ public:
LanguageType& eSelectLanguage );
virtual ~SvxCurrencyList_Impl() override { disposeOnce(); }
virtual void dispose() override;
+
+ void PixelInvalidate(const tools::Rectangle* pRectangle) override;
};
class SvxStyleToolBoxControl;
@@ -2352,15 +2354,32 @@ SvxCurrencyList_Impl::SvxCurrencyList_Impl(
if ( nSelectedPos >= 0 )
m_pCurrencyLb->SelectEntryPos( nSelectedPos );
m_pCurrencyLb->Show();
+
+ auto parentNotifier = GetParentWithLOKNotifier();
+ if (parentNotifier)
+ SetLOKNotifier(parentNotifier->GetLOKNotifier());
}
void SvxCurrencyList_Impl::dispose()
{
+ ReleaseLOKNotifier();
m_xControl.clear();
m_pCurrencyLb.disposeAndClear();
ToolbarPopup::dispose();
}
+void SvxCurrencyList_Impl::PixelInvalidate(const tools::Rectangle* pRectangle)
+{
+ const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier();
+ if (pNotifier && pRectangle && GetPopUpWindowLOKId() != 0)
+ {
+ std::vector<vcl::LOKPayloadItem> aPayload;
+ aPayload.push_back(std::make_pair(OString("rectangle"), pRectangle->toString()));
+ pNotifier->notifyWindow(GetPopUpWindowLOKId(), "invalidate", aPayload);
+ }
+ svtools::ToolbarPopup::PixelInvalidate(pRectangle);
+}
+
SvxLineWindow_Impl::SvxLineWindow_Impl( svt::ToolboxController& rController, vcl::Window* pParentWindow ) :
ToolbarPopup( rController.getFrameInterface(), pParentWindow, WB_STDPOPUP | WB_MOVEABLE | WB_CLOSEABLE ),
m_aLineStyleLb( VclPtr<LineListBox>::Create(this) ),