summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-02-25 14:14:40 -0500
committerAndras Timar <andras.timar@collabora.com>2018-03-27 12:23:02 +0200
commitf1c5471d781f3f1549d23c9de8e09cdc7a2f4b84 (patch)
tree2280cc6bf7e4f844b51dce802e61efca6aed06a5 /sfx2
parent9554b95413c82ee4e18e08a69fb7a6477b0c9e22 (diff)
lok: notify clients of clipboard changes
Change-Id: I93d8eacc0defb1176ec5d767f49356812cf90ff6 Reviewed-on: https://gerrit.libreoffice.org/50327 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit de774e261a59625336fe4d744d8c8e2966b570d2)
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/viewsh.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 0174aa2caa40..65213c459ed6 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -155,12 +155,18 @@ SfxClipboardChangeListener::SfxClipboardChangeListener( SfxViewShell* pView, con
void SfxClipboardChangeListener::ChangedContents()
{
const SolarMutexGuard aGuard;
- if( m_pViewShell )
+ if (m_pViewShell)
{
SfxBindings& rBind = m_pViewShell->GetViewFrame()->GetBindings();
- rBind.Invalidate( SID_PASTE );
- rBind.Invalidate( SID_PASTE_SPECIAL );
- rBind.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
+ rBind.Invalidate(SID_PASTE);
+ rBind.Invalidate(SID_PASTE_SPECIAL);
+ rBind.Invalidate(SID_CLIPBOARD_FORMAT_ITEMS);
+
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ // In the future we might send the payload as well.
+ SfxLokHelper::notifyAllViews(LOK_CALLBACK_CLIPBOARD_CHANGED, "");
+ }
}
}
@@ -815,7 +821,7 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveClient() const
if ( !pClients )
return nullptr;
- bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
+ const bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
for (SfxInPlaceClient* pIPClient : *pClients)
{