LibreOffice Module comphelper (master) 1
lok.hxx
Go to the documentation of this file.
1/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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#ifndef INCLUDED_COMPHELPER_LOK_HXX
11#define INCLUDED_COMPHELPER_LOK_HXX
12
14#include <rtl/ustring.hxx>
15
16class LanguageTag;
17
18// Interface between the LibreOfficeKit implementation called by LibreOfficeKit clients and other
19// LibreOffice code.
20
22{
23// Functions to be called only from the LibreOfficeKit implementation in desktop, not from other
24// places in LibreOffice code.
25
26COMPHELPER_DLLPUBLIC void setActive(bool bActive = true);
27
29{
30 Start,
32 Finish
33};
34
36 void (*callback)(void* data, statusIndicatorCallbackType type, int percent, const char* pText),
37 void* data);
38
39// Functions that can be called from arbitrary places in LibreOffice.
40
41// Check whether the code is running as invoked through LibreOfficeKit.
43
48COMPHELPER_DLLPUBLIC void setLocalRendering(bool bLocalRendering = true);
50
54COMPHELPER_DLLPUBLIC void setPartInInvalidation(bool bPartInInvalidation);
55
59COMPHELPER_DLLPUBLIC void setTiledPainting(bool bTiledPainting);
63COMPHELPER_DLLPUBLIC void setDialogPainting(bool bDialogPainting);
65COMPHELPER_DLLPUBLIC void setDPIScale(double fDPIScale);
69COMPHELPER_DLLPUBLIC void setTiledAnnotations(bool bTiledAnnotations);
73COMPHELPER_DLLPUBLIC void setRangeHeaders(bool bTiledAnnotations);
76
77enum Compat : sal_uInt32
78{
79 none = 0,
82};
89
93COMPHELPER_DLLPUBLIC void setViewIdForVisCursorInvalidation(bool bViewIdForVisCursorInvalidation);
94
96COMPHELPER_DLLPUBLIC void setLocale(const LanguageTag& languageTag);
99
101COMPHELPER_DLLPUBLIC void setLanguageTag(const LanguageTag& languageTag);
105COMPHELPER_DLLPUBLIC bool isAllowlistedLanguage(const OUString& lang);
106
108COMPHELPER_DLLPUBLIC void setTimezone(bool isSet, const OUString& rTimezone);
109
110// Status indicator handling. Even if in theory there could be several status indicators active at
111// the same time, in practice there is only one at a time, so we don't handle any identification of
112// status indicator in this API.
113COMPHELPER_DLLPUBLIC void statusIndicatorStart(const OUString& sText);
116
117COMPHELPER_DLLPUBLIC void setBlockedCommandList(const char* blockedCommandList);
118}
119
120#endif // INCLUDED_COMPHELPER_LOK_HXX
121
122/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define COMPHELPER_DLLPUBLIC
virtual void SetValue(tools::Long nNew) override
void statusIndicatorStart(const OUString &sText)
Definition: lok.cxx:288
void statusIndicatorFinish()
Definition: lok.cxx:300
void setTiledPainting(bool bTiledPainting)
Set if we are doing tiled painting.
Definition: lok.cxx:111
void setCompatFlag(Compat flag)
Set compatibility flags.
Definition: lok.cxx:181
double getDPIScale()
Get the DPI scale for rendering for HiDPI displays.
Definition: lok.cxx:136
void setDialogPainting(bool bDialogPainting)
Set if we are painting the dialog.
Definition: lok.cxx:121
bool isDialogPainting()
Check if we are painting the dialog.
Definition: lok.cxx:126
COMPHELPER_DLLPUBLIC void setBlockedCommandList(const char *blockedCommandList)
bool isTiledPainting()
Check if we are doing tiled painting.
Definition: lok.cxx:116
void setTimezone(bool isSet, const OUString &rTimezone)
Update the current LOK's timezone.
Definition: lok.cxx:261
bool isTiledAnnotations()
Check if annotations rendering is turned off.
Definition: lok.cxx:146
void statusIndicatorSetValue(int percent)
Definition: lok.cxx:294
bool isAllowlistedLanguage(const OUString &lang)
If the language name should be used for this LOK instance.
Definition: lok.cxx:211
bool isCompatFlagSet(Compat flag)
Get compatibility flags.
Definition: lok.cxx:183
bool isPartInInvalidation()
Check whether clients want a part number in an invalidation payload.
Definition: lok.cxx:106
const LanguageTag & getLocale()
Get the current LOK's locale.
Definition: lok.cxx:192
bool isRangeHeaders()
Check if range based header data is enabled.
Definition: lok.cxx:166
void setRangeHeaders(bool bRangeHeaders)
Set if we want range based header data.
Definition: lok.cxx:151
const LanguageTag & getLanguageTag()
Get the current LOK's language.
Definition: lok.cxx:204
void setPartInInvalidation(bool bPartInInvalidation)
Set whether clients want a part number in an invalidation payload.
Definition: lok.cxx:101
void resetCompatFlag()
Reset compatibility flags.
Definition: lok.cxx:185
bool isViewIdForVisCursorInvalidation()
Check whether clients want viewId in visible cursor invalidation payload.
Definition: lok.cxx:161
void setLocale(const LanguageTag &rLanguageTag)
Update the current LOK's locale.
Definition: lok.cxx:187
void setTiledAnnotations(bool bTiledAnnotations)
Set if we want no annotations rendering.
Definition: lok.cxx:141
void setLanguageTag(const LanguageTag &rLanguageTag)
Update the current LOK's language.
Definition: lok.cxx:199
void setStatusIndicatorCallback(void(*callback)(void *data, statusIndicatorCallbackType type, int percent, const char *pText), void *data)
Definition: lok.cxx:282
void setLocalRendering(bool bLocalRendering)
Shift the coordinates before rendering each bitmap.
Definition: lok.cxx:171
void setActive(bool bActive)
Definition: lok.cxx:91
void setViewIdForVisCursorInvalidation(bool bViewIdForVisCursorInvalidation)
Set whether clients want viewId in visible cursor invalidation payload.
Definition: lok.cxx:156
void setDPIScale(double fDPIScale)
Set the DPI scale for rendering for HiDPI displays.
Definition: lok.cxx:131