diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/PostItMgr.cxx | 13 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarTxtControl.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarWin.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 10 |
5 files changed, 32 insertions, 1 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index c682566691fb..226b12325174 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -119,6 +119,8 @@ void SwViewShell::ToggleHeaderFooterEdit() void SwViewShell::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pData) { getIDocumentDrawModelAccess().GetDrawModel()->registerLibreOfficeKitCallback(pCallback, pData); + if (SwPostItMgr* pPostItMgr = GetPostItMgr()) + pPostItMgr->registerLibreOfficeKitCallback(pCallback, pData); } void SwViewShell::libreOfficeKitCallback(int nType, const char* pPayload) const diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 9feb6913f855..cba1999366d9 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -881,6 +881,19 @@ void SwPostItMgr::PaintTile(OutputDevice& rRenderContext, const Rectangle& /*rRe } } +void SwPostItMgr::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pData) +{ + for (SwSidebarItem* pItem : mvPostItFields) + { + SwSidebarWin* pPostIt = pItem->pPostIt; + if (!pPostIt) + continue; + + pPostIt->GetOutlinerView()->setTiledRendering(mpWrtShell->isTiledRendering()); + pPostIt->GetOutlinerView()->registerLibreOfficeKitCallback(pCallback, pData); + } +} + void SwPostItMgr::Scroll(const long lScroll,const unsigned long aPage) { OSL_ENSURE((lScroll % GetScrollSize() )==0,"SwPostItMgr::Scroll: scrolling by wrong value"); diff --git a/sw/source/uibase/docvw/SidebarTxtControl.hxx b/sw/source/uibase/docvw/SidebarTxtControl.hxx index 51243ed0eb14..1258412a1bdd 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.hxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.hxx @@ -40,7 +40,6 @@ class SidebarTextControl : public Control protected: virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; - virtual void KeyInput( const KeyEvent& rKeyEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; @@ -61,6 +60,7 @@ class SidebarTextControl : public Control virtual void dispose() override; virtual void GetFocus() override; + virtual void KeyInput( const KeyEvent& rKeyEvt ) override; OutlinerView* GetTextView() const; diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index cdf68384a851..c2ffc0687229 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -355,6 +355,12 @@ void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, D } } +void SwSidebarWin::KeyInput(const KeyEvent& rKeyEvent) +{ + if (mpSidebarTextControl) + mpSidebarTextControl->KeyInput(rKeyEvent); +} + void SwSidebarWin::SetPosSizePixelRect(long nX, long nY, long nWidth, long nHeight, const SwRect& aAnchorRect, const long aPageBorder) { diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index a33257ce69d1..3e90227c3e72 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -145,6 +145,7 @@ #include <xmloff/odffields.hxx> #include <PostItMgr.hxx> +#include <SidebarWin.hxx> #include <FrameControlsManager.hxx> #include <algorithm> @@ -1332,6 +1333,15 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) { SwWrtShell &rSh = m_rView.GetWrtShell(); + if (comphelper::LibreOfficeKit::isActive() && m_rView.GetPostItMgr()) + { + if (vcl::Window* pWindow = m_rView.GetPostItMgr()->GetActiveSidebarWin()) + { + pWindow->KeyInput(rKEvt); + return; + } + } + if( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE && m_pApplyTempl && m_pApplyTempl->m_pFormatClipboard ) { |