LibreOffice Module vcl (master) 1
DocWindow.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10#include <LibreOfficeKit/LibreOfficeKitEnums.h>
11
12#include <sal/log.hxx>
13#include <vcl/DocWindow.hxx>
15
16namespace vcl
17{
19{
20 Window::SetPointer(nPointer);
21
23 if (!pWin)
24 return;
25
26 PointerStyle aPointer = GetPointer();
27 // We don't map all possible pointers hence we need a default
28 OString aPointerString = "default";
29 auto aIt = vcl::gaLOKPointerMap.find(aPointer);
30 if (aIt != vcl::gaLOKPointerMap.end())
31 {
32 aPointerString = aIt->second;
33 }
34
35 pWin->GetLOKNotifier()->libreOfficeKitViewCallback(LOK_CALLBACK_MOUSE_POINTER, aPointerString);
36}
37} // namespace vcl
38
39/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SetPointer(PointerStyle) override
Definition: DocWindow.cxx:18
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const =0
VclPtr< vcl::Window > GetParentWithLOKNotifier()
Find the nearest parent with LOK Notifier; can be itself if this Window has LOK notifier set.
Definition: window.cxx:3256
const vcl::ILibreOfficeKitNotifier * GetLOKNotifier() const
Definition: window.cxx:3246
virtual void SetPointer(PointerStyle)
Definition: mouse.cxx:486
PointerStyle GetPointer() const
Definition: window2.cxx:1273
end
const std::map< PointerStyle, OString > gaLOKPointerMap
PointerStyle
Definition: ptrstyle.hxx:26