LibreOffice Module test (master) 1
|
A helper to convert SfxLokCallbackInterface to a LIbreOfficeKitCallback for tests. More...
#include <lokcallback.hxx>
Classes | |
struct | PerViewIdData |
Public Member Functions | |
TestLokCallbackWrapper (LibreOfficeKitCallback callback, void *data) | |
void | clear () |
Discard all possibly still held events. More... | |
void | setLOKViewId (int viewId) |
Set the view id of the associated SfxViewShell. More... | |
virtual void | libreOfficeKitViewCallback (int nType, const rtl::OString &pPayload) override |
virtual void | libreOfficeKitViewCallbackWithViewId (int nType, const rtl::OString &pPayload, int nViewId) override |
virtual void | libreOfficeKitViewInvalidateTilesCallback (const tools::Rectangle *pRect, int nPart, int nMode) override |
virtual void | libreOfficeKitViewUpdatedCallback (int nType) override |
virtual void | libreOfficeKitViewUpdatedCallbackPerViewId (int nType, int nViewId, int nSourceViewId) override |
virtual void | libreOfficeKitViewAddPendingInvalidateTiles () override |
virtual void | dumpState (rtl::OStringBuffer &) override |
virtual void | Invoke () override |
Public Member Functions inherited from SfxLokCallbackInterface | |
virtual | ~SfxLokCallbackInterface () |
virtual void | libreOfficeKitViewCallback (int nType, const rtl::OString &pPayload)=0 |
virtual void | libreOfficeKitViewCallbackWithViewId (int nType, const rtl::OString &pPayload, int nViewId)=0 |
virtual void | libreOfficeKitViewInvalidateTilesCallback (const tools::Rectangle *pRect, int nPart, int nMode)=0 |
virtual void | libreOfficeKitViewUpdatedCallback (int nType)=0 |
virtual void | libreOfficeKitViewUpdatedCallbackPerViewId (int nType, int nViewId, int nSourceViewId)=0 |
virtual void | libreOfficeKitViewAddPendingInvalidateTiles ()=0 |
virtual void | dumpState (rtl::OStringBuffer &rState)=0 |
Public Member Functions inherited from Idle | |
Idle (const char *pDebugName) | |
virtual void | Start (bool bStartTimer=true) override |
Public Member Functions inherited from Timer | |
Timer (const char *pDebugName) | |
Timer (const Timer &rTimer) | |
virtual | ~Timer () override |
Timer & | operator= (const Timer &rTimer) |
virtual void | Invoke () override |
void | Invoke (Timer *arg) |
void | SetInvokeHandler (const Link< Timer *, void > &rLink) |
void | ClearInvokeHandler () |
void | SetTimeout (sal_uInt64 nTimeoutMs) |
sal_uInt64 | GetTimeout () const |
virtual void | Start (bool bStartTimer=true) override |
Public Member Functions inherited from Task | |
Task (const char *pDebugName) | |
Task (const Task &rTask) | |
virtual | ~Task () COVERITY_NOEXCEPT_FALSE |
Task & | operator= (const Task &rTask) |
void | SetPriority (TaskPriority ePriority) |
TaskPriority | GetPriority () const |
const char * | GetDebugName () const |
virtual void | Invoke ()=0 |
virtual void | Start (bool bStartTimer=true) |
void | Stop () |
bool | IsActive () const |
void | SetStatic () |
bool | IsStatic () const |
Private Member Functions | |
void | callCallback (int nType, const char *pPayload, int nViewId) |
void | startTimer () |
void | flushLOKData () |
void | discardUpdatedTypes (int nType, int nViewId) |
Private Attributes | |
LibreOfficeKitCallback | m_callback |
void * | m_data |
int | m_viewId = -1 |
std::vector< int > | m_updatedTypes |
std::vector< PerViewIdData > | m_updatedTypesPerViewId |
Additional Inherited Members | |
Protected Member Functions inherited from Idle | |
virtual sal_uInt64 | UpdateMinPeriod (sal_uInt64 nTimeNow) const override |
Idle (bool bAuto, const char *pDebugName) | |
Protected Member Functions inherited from Timer | |
virtual void | SetDeletionFlags () override |
virtual sal_uInt64 | UpdateMinPeriod (sal_uInt64 nTimeNow) const override |
Timer (bool bAuto, const char *pDebugName) | |
Protected Member Functions inherited from Task | |
const ImplSchedulerData * | GetSchedulerData () const |
virtual void | SetDeletionFlags () |
virtual sal_uInt64 | UpdateMinPeriod (sal_uInt64 nTimeNow) const=0 |
Static Protected Member Functions inherited from Task | |
static void | StartTimer (sal_uInt64 nMS) |
A helper to convert SfxLokCallbackInterface to a LIbreOfficeKitCallback for tests.
It reimplements the specialized callbacks and converts them to the generic type/payload callback.
Definition at line 26 of file lokcallback.hxx.
TestLokCallbackWrapper::TestLokCallbackWrapper | ( | LibreOfficeKitCallback | callback, |
void * | data | ||
) |
Definition at line 18 of file lokcallback.cxx.
References Task::SetPriority().
|
inlineprivate |
Definition at line 43 of file lokcallback.cxx.
References discardUpdatedTypes(), m_callback, m_data, nType, and startTimer().
Referenced by libreOfficeKitViewCallback(), libreOfficeKitViewCallbackWithViewId(), and libreOfficeKitViewInvalidateTilesCallback().
void TestLokCallbackWrapper::clear | ( | ) |
Discard all possibly still held events.
Definition at line 28 of file lokcallback.cxx.
References m_updatedTypes, m_updatedTypesPerViewId, and m_viewId.
Definition at line 116 of file lokcallback.cxx.
References comphelper::LibreOfficeKit::isViewIdForVisCursorInvalidation(), m_updatedTypes, m_updatedTypesPerViewId, and nType.
Referenced by callCallback().
|
inlineoverridevirtual |
Implements SfxLokCallbackInterface.
Definition at line 43 of file lokcallback.hxx.
|
private |
Definition at line 143 of file lokcallback.cxx.
References get(), SfxViewShell::GetFirst(), SfxViewShell::getLOKPayload(), libreOfficeKitViewCallback(), libreOfficeKitViewCallbackWithViewId(), m_updatedTypes, m_updatedTypesPerViewId, m_viewId, and type.
Referenced by Invoke().
|
overridevirtual |
Reimplemented from Timer.
Definition at line 177 of file lokcallback.cxx.
References flushLOKData(), SfxViewShell::GetFirst(), and SfxViewShell::GetNext().
|
overridevirtual |
Implements SfxLokCallbackInterface.
Definition at line 110 of file lokcallback.cxx.
References startTimer().
|
overridevirtual |
Implements SfxLokCallbackInterface.
Definition at line 50 of file lokcallback.cxx.
References callCallback(), NO_VIEWID, and nType.
Referenced by flushLOKData().
|
overridevirtual |
Implements SfxLokCallbackInterface.
Definition at line 55 of file lokcallback.cxx.
References callCallback(), and nType.
Referenced by flushLOKData().
|
overridevirtual |
Implements SfxLokCallbackInterface.
Definition at line 62 of file lokcallback.cxx.
References callCallback(), comphelper::LibreOfficeKit::isPartInInvalidation(), NO_VIEWID, and tools::Rectangle::toString().
|
overridevirtual |
Implements SfxLokCallbackInterface.
Definition at line 85 of file lokcallback.cxx.
References m_updatedTypes, nType, and startTimer().
|
overridevirtual |
Implements SfxLokCallbackInterface.
Definition at line 94 of file lokcallback.cxx.
References m_updatedTypesPerViewId, nType, and startTimer().
|
inline |
Set the view id of the associated SfxViewShell.
Definition at line 33 of file lokcallback.hxx.
|
inlineprivate |
Definition at line 35 of file lokcallback.cxx.
References Task::IsActive(), and Idle::Start().
Referenced by callCallback(), libreOfficeKitViewAddPendingInvalidateTiles(), libreOfficeKitViewUpdatedCallback(), and libreOfficeKitViewUpdatedCallbackPerViewId().
|
private |
Definition at line 52 of file lokcallback.hxx.
Referenced by callCallback().
|
private |
Definition at line 53 of file lokcallback.hxx.
Referenced by callCallback().
|
private |
Definition at line 55 of file lokcallback.hxx.
Referenced by clear(), discardUpdatedTypes(), flushLOKData(), and libreOfficeKitViewUpdatedCallback().
|
private |
Definition at line 62 of file lokcallback.hxx.
Referenced by clear(), discardUpdatedTypes(), flushLOKData(), and libreOfficeKitViewUpdatedCallbackPerViewId().
|
private |
Definition at line 54 of file lokcallback.hxx.
Referenced by clear(), and flushLOKData().