LibreOffice Module sd (master)
1
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Functions
a
c
d
f
g
h
i
l
m
o
r
s
u
w
Variables
a
b
c
d
e
g
h
i
m
n
o
p
s
t
v
w
Typedefs
a
b
c
d
e
f
g
i
l
m
n
p
r
s
t
u
v
w
Enumerations
Enumerator
a
b
c
d
e
f
h
m
n
o
p
s
t
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
a
b
c
d
e
f
g
h
l
m
n
o
p
r
s
u
x
z
Typedefs
a
b
c
d
e
f
i
k
l
m
p
r
s
t
u
v
x
Enumerations
a
c
d
e
f
g
h
i
l
m
o
p
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
c
d
e
i
m
o
p
s
t
u
v
w
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
w
Variables
a
b
c
d
g
h
j
k
m
n
p
s
t
v
w
x
Typedefs
Enumerations
Enumerator
c
f
h
l
m
n
o
p
s
u
v
Macros
a
b
c
d
e
f
g
i
k
m
n
p
r
s
t
u
v
w
z
sd
source
ui
sidebar
MasterPageContainerQueue.hxx
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
* This file incorporates work covered by the following license notice:
10
*
11
* Licensed to the Apache Software Foundation (ASF) under one or more
12
* contributor license agreements. See the NOTICE file distributed
13
* with this work for additional information regarding copyright
14
* ownership. The ASF licenses this file to you under the Apache
15
* License, Version 2.0 (the "License"); you may not use this file
16
* except in compliance with the License. You may obtain a copy of
17
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
18
*/
19
20
#pragma once
21
22
#include "
MasterPageContainer.hxx
"
23
#include "
MasterPageDescriptor.hxx
"
24
25
#include <
vcl/timer.hxx
>
26
27
#include <memory>
28
29
namespace
sd::sidebar
{
30
37
class
MasterPageContainerQueue
final
38
{
39
public
:
40
class
ContainerAdapter
{
41
public
:
42
virtual
bool
UpdateDescriptor
(
43
const
SharedMasterPageDescriptor
& rpDescriptor,
44
bool
bForcePageObject,
45
bool
bForcePreview,
46
bool
bSendEvents) = 0;
47
48
protected
:
49
~ContainerAdapter
() {}
50
};
51
52
static
MasterPageContainerQueue
*
Create
(
53
const
std::weak_ptr<ContainerAdapter>& rpContainer);
54
~MasterPageContainerQueue
();
55
62
bool
RequestPreview
(
const
SharedMasterPageDescriptor
& rDescriptor);
63
67
bool
HasRequest
(
MasterPageContainer::Token
aToken)
const
;
68
71
bool
IsEmpty
()
const
;
72
78
void
ProcessAllRequests
();
79
80
private
:
81
std::weak_ptr<ContainerAdapter>
mpWeakContainer
;
82
class
PreviewCreationRequest
;
83
class
RequestQueue
;
84
std::unique_ptr<RequestQueue>
mpRequestQueue
;
85
Timer
maDelayedPreviewCreationTimer
;
86
sal_uInt32
mnRequestsServedCount
;
87
88
// There are a couple of values that define various aspects of the
89
// heuristic that defines the order and timing in which requests for
90
// preview creation are processed.
91
94
static
const
sal_Int32
snDelayedCreationTimeout
;
95
98
static
const
sal_Int32
snDelayedCreationTimeoutWhenNotIdle
;
99
103
static
const
sal_Int32
snMasterPagePriorityBoost
;
104
109
static
const
sal_Int32
snWaitForMoreRequestsPriorityThreshold
;
110
116
static
sal_uInt32
snWaitForMoreRequestsCount
;
117
118
explicit
MasterPageContainerQueue
(std::weak_ptr<ContainerAdapter> pContainer);
119
void
LateInit
();
120
124
static
sal_Int32
CalculatePriority
(
const
SharedMasterPageDescriptor
& rDescriptor);
125
126
DECL_LINK
(DelayedPreviewCreation,
Timer
*,
void
);
127
};
128
129
}
// end of namespace sd::sidebar
130
131
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
MasterPageContainer.hxx
MasterPageDescriptor.hxx
Timer
sd::sidebar::MasterPageContainerQueue::ContainerAdapter
Definition:
MasterPageContainerQueue.hxx:40
sd::sidebar::MasterPageContainerQueue::ContainerAdapter::UpdateDescriptor
virtual bool UpdateDescriptor(const SharedMasterPageDescriptor &rpDescriptor, bool bForcePageObject, bool bForcePreview, bool bSendEvents)=0
sd::sidebar::MasterPageContainerQueue::ContainerAdapter::~ContainerAdapter
~ContainerAdapter()
Definition:
MasterPageContainerQueue.hxx:49
sd::sidebar::MasterPageContainerQueue::PreviewCreationRequest
Definition:
MasterPageContainerQueue.cxx:39
sd::sidebar::MasterPageContainerQueue::RequestQueue
Definition:
MasterPageContainerQueue.cxx:79
sd::sidebar::MasterPageContainerQueue
The queue stores and processes all requests from a MasterPageContainer for the creation of previews.
Definition:
MasterPageContainerQueue.hxx:38
sd::sidebar::MasterPageContainerQueue::CalculatePriority
static sal_Int32 CalculatePriority(const SharedMasterPageDescriptor &rDescriptor)
Calculate the priority that defines the order in which requests are processed.
Definition:
MasterPageContainerQueue.cxx:151
sd::sidebar::MasterPageContainerQueue::~MasterPageContainerQueue
~MasterPageContainerQueue()
Definition:
MasterPageContainerQueue.cxx:103
sd::sidebar::MasterPageContainerQueue::RequestPreview
bool RequestPreview(const SharedMasterPageDescriptor &rDescriptor)
This method is typically called for entries in the container for which GetPreviewState() returns OS_C...
Definition:
MasterPageContainerQueue.cxx:118
sd::sidebar::MasterPageContainerQueue::mnRequestsServedCount
sal_uInt32 mnRequestsServedCount
Definition:
MasterPageContainerQueue.hxx:86
sd::sidebar::MasterPageContainerQueue::HasRequest
bool HasRequest(MasterPageContainer::Token aToken) const
Return <TRUE> when there is a request currently in the queue for the given token.
Definition:
MasterPageContainerQueue.cxx:242
sd::sidebar::MasterPageContainerQueue::IsEmpty
bool IsEmpty() const
Return <TRUE> when there is at least one request in the queue.
Definition:
MasterPageContainerQueue.cxx:250
sd::sidebar::MasterPageContainerQueue::Create
static MasterPageContainerQueue * Create(const std::weak_ptr< ContainerAdapter > &rpContainer)
Definition:
MasterPageContainerQueue.cxx:86
sd::sidebar::MasterPageContainerQueue::LateInit
void LateInit()
Definition:
MasterPageContainerQueue.cxx:110
sd::sidebar::MasterPageContainerQueue::MasterPageContainerQueue
MasterPageContainerQueue(std::weak_ptr< ContainerAdapter > pContainer)
Definition:
MasterPageContainerQueue.cxx:94
sd::sidebar::MasterPageContainerQueue::DECL_LINK
DECL_LINK(DelayedPreviewCreation, Timer *, void)
sd::sidebar::MasterPageContainerQueue::snMasterPagePriorityBoost
static const sal_Int32 snMasterPagePriorityBoost
Requests for previews of master pages in a document have their priority increased by this value.
Definition:
MasterPageContainerQueue.hxx:103
sd::sidebar::MasterPageContainerQueue::mpRequestQueue
std::unique_ptr< RequestQueue > mpRequestQueue
Definition:
MasterPageContainerQueue.hxx:83
sd::sidebar::MasterPageContainerQueue::maDelayedPreviewCreationTimer
Timer maDelayedPreviewCreationTimer
Definition:
MasterPageContainerQueue.hxx:85
sd::sidebar::MasterPageContainerQueue::ProcessAllRequests
void ProcessAllRequests()
After this call the queue does not wait anymore for requests with higher priority when only a small n...
Definition:
MasterPageContainerQueue.cxx:255
sd::sidebar::MasterPageContainerQueue::snWaitForMoreRequestsPriorityThreshold
static const sal_Int32 snWaitForMoreRequestsPriorityThreshold
When only requests which a priority lower than this threshold exist and not many requests have been m...
Definition:
MasterPageContainerQueue.hxx:109
sd::sidebar::MasterPageContainerQueue::mpWeakContainer
std::weak_ptr< ContainerAdapter > mpWeakContainer
Definition:
MasterPageContainerQueue.hxx:81
sd::sidebar::MasterPageContainerQueue::snDelayedCreationTimeoutWhenNotIdle
static const sal_Int32 snDelayedCreationTimeoutWhenNotIdle
The time to wait when the system is not idle.
Definition:
MasterPageContainerQueue.hxx:98
sd::sidebar::MasterPageContainerQueue::snDelayedCreationTimeout
static const sal_Int32 snDelayedCreationTimeout
The time to wait (in milliseconds) between the creation of previews.
Definition:
MasterPageContainerQueue.hxx:94
sd::sidebar::MasterPageContainerQueue::snWaitForMoreRequestsCount
static sal_uInt32 snWaitForMoreRequestsCount
When only requests which a priority lower than a threshold exist and not more requests than this numb...
Definition:
MasterPageContainerQueue.hxx:116
sd::sidebar::MasterPageContainer::Token
int Token
Definition:
MasterPageContainer.hxx:51
sd::sidebar
Definition:
AllMasterPagesSelector.cxx:68
sd::sidebar::SharedMasterPageDescriptor
std::shared_ptr< MasterPageDescriptor > SharedMasterPageDescriptor
Definition:
MasterPageDescriptor.hxx:33
timer.hxx
Generated on Sun Jul 30 2023 04:27:23 for LibreOffice Module sd (master) by
1.9.3