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
RecentlyUsedMasterPages.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 <
tools/SdGlobalResourceContainer.hxx
>
23
#include <
tools/link.hxx
>
24
#include <utility>
25
#include <vector>
26
27
#include "
MasterPageContainer.hxx
"
28
29
namespace
sd
{
30
class
MasterPageObserverEvent;
31
}
32
33
namespace
sd::sidebar
{
34
37
class
RecentlyUsedMasterPages
38
:
public
SdGlobalResource
39
{
40
public
:
43
static
RecentlyUsedMasterPages
&
Instance
();
44
45
void
AddEventListener
(
const
Link<LinkParamNone*,void>
& rEventListener);
46
void
RemoveEventListener
(
const
Link<LinkParamNone*,void>
& rEventListener);
47
48
int
GetMasterPageCount
()
const
;
49
MasterPageContainer::Token
GetTokenForIndex
(sal_uInt32
nIndex
)
const
;
50
51
private
:
52
class
Descriptor
53
{
54
public
:
55
OUString
msURL
;
56
OUString
msName
;
57
::sd::sidebar::MasterPageContainer::Token
maToken
;
58
Descriptor
(
::sd::sidebar::MasterPageContainer::Token
aToken,
59
OUString sURL, OUString sName)
60
:
msURL
(
std
::move(sURL)),
61
msName
(
std
::move(
sName
)),
62
maToken
(aToken)
63
{}
64
65
class
TokenComparator
66
{
67
public
:
68
explicit
TokenComparator
(
::sd::sidebar::MasterPageContainer::Token
aToken)
69
:
maToken
(aToken) {}
70
bool
operator ()
(
const
Descriptor
& rDescriptor)
71
{
return
maToken
==rDescriptor.
maToken
; }
72
73
private
:
74
::sd::sidebar::MasterPageContainer::Token
maToken
;
75
};
76
};
77
81
static
RecentlyUsedMasterPages
*
mpInstance
;
82
83
::std::vector<Link<LinkParamNone*,void>>
maListeners
;
84
85
typedef ::std::vector<Descriptor>
MasterPageList
;
86
MasterPageList
mvMasterPages
;
87
std::shared_ptr<MasterPageContainer>
mpContainer
;
88
89
RecentlyUsedMasterPages
();
90
virtual
~RecentlyUsedMasterPages
()
override
;
91
94
void
LateInit
();
95
96
RecentlyUsedMasterPages
(
const
RecentlyUsedMasterPages
&) =
delete
;
97
98
RecentlyUsedMasterPages
&
operator=
(
const
RecentlyUsedMasterPages
&) =
delete
;
99
100
void
SendEvent
();
101
DECL_LINK
(MasterPageChangeListener,
MasterPageObserverEvent
&,
void
);
102
DECL_LINK
(MasterPageContainerChangeListener,
MasterPageContainerChangeEvent
&,
void
);
103
109
void
AddMasterPage
(
MasterPageContainer::Token
aToken);
110
114
void
LoadPersistentValues
();
115
119
void
SavePersistentValues
();
120
121
void
ResolveList
();
122
};
123
124
}
// end of namespace sd::sidebar
125
126
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
MasterPageContainer.hxx
SdGlobalResourceContainer.hxx
Link< LinkParamNone *, void >
sd::MasterPageObserverEvent
Objects of this class are sent to listeners of the MasterPageObserver singleton when the list of mast...
Definition:
MasterPageObserver.hxx:95
sd::SdGlobalResource
Definition:
SdGlobalResourceContainer.hxx:38
sd::sidebar::MasterPageContainerChangeEvent
For some changes to the set of master pages in a MasterPageContainer or to the data stored for each m...
Definition:
MasterPageContainer.hxx:174
sd::sidebar::MasterPageContainer::Token
int Token
Definition:
MasterPageContainer.hxx:51
sd::sidebar::RecentlyUsedMasterPages::Descriptor::TokenComparator
Definition:
RecentlyUsedMasterPages.hxx:66
sd::sidebar::RecentlyUsedMasterPages::Descriptor::TokenComparator::maToken
::sd::sidebar::MasterPageContainer::Token maToken
Definition:
RecentlyUsedMasterPages.hxx:74
sd::sidebar::RecentlyUsedMasterPages::Descriptor::TokenComparator::operator()
bool operator()(const Descriptor &rDescriptor)
Definition:
RecentlyUsedMasterPages.hxx:70
sd::sidebar::RecentlyUsedMasterPages::Descriptor::TokenComparator::TokenComparator
TokenComparator(::sd::sidebar::MasterPageContainer::Token aToken)
Definition:
RecentlyUsedMasterPages.hxx:68
sd::sidebar::RecentlyUsedMasterPages::Descriptor
Definition:
RecentlyUsedMasterPages.hxx:53
sd::sidebar::RecentlyUsedMasterPages::Descriptor::Descriptor
Descriptor(::sd::sidebar::MasterPageContainer::Token aToken, OUString sURL, OUString sName)
Definition:
RecentlyUsedMasterPages.hxx:58
sd::sidebar::RecentlyUsedMasterPages::Descriptor::maToken
::sd::sidebar::MasterPageContainer::Token maToken
Definition:
RecentlyUsedMasterPages.hxx:57
sd::sidebar::RecentlyUsedMasterPages::Descriptor::msName
OUString msName
Definition:
RecentlyUsedMasterPages.hxx:56
sd::sidebar::RecentlyUsedMasterPages::Descriptor::msURL
OUString msURL
Definition:
RecentlyUsedMasterPages.hxx:55
sd::sidebar::RecentlyUsedMasterPages
This singleton holds a list of the most recently used master pages.
Definition:
RecentlyUsedMasterPages.hxx:39
sd::sidebar::RecentlyUsedMasterPages::DECL_LINK
DECL_LINK(MasterPageChangeListener, MasterPageObserverEvent &, void)
sd::sidebar::RecentlyUsedMasterPages::RecentlyUsedMasterPages
RecentlyUsedMasterPages()
Definition:
RecentlyUsedMasterPages.cxx:81
sd::sidebar::RecentlyUsedMasterPages::LoadPersistentValues
void LoadPersistentValues()
Load the list of recently used master pages from the registry where it was saved to make it persisten...
Definition:
RecentlyUsedMasterPages.cxx:105
sd::sidebar::RecentlyUsedMasterPages::operator=
RecentlyUsedMasterPages & operator=(const RecentlyUsedMasterPages &)=delete
sd::sidebar::RecentlyUsedMasterPages::SavePersistentValues
void SavePersistentValues()
Save the list of recently used master pages to the registry to make it persistent.
Definition:
RecentlyUsedMasterPages.cxx:167
sd::sidebar::RecentlyUsedMasterPages::RemoveEventListener
void RemoveEventListener(const Link< LinkParamNone *, void > &rEventListener)
Definition:
RecentlyUsedMasterPages.cxx:233
sd::sidebar::RecentlyUsedMasterPages::GetMasterPageCount
int GetMasterPageCount() const
Definition:
RecentlyUsedMasterPages.cxx:242
sd::sidebar::RecentlyUsedMasterPages::AddMasterPage
void AddMasterPage(MasterPageContainer::Token aToken)
Add a descriptor for the specified master page to the end of the list of most recently used master pa...
Definition:
RecentlyUsedMasterPages.cxx:300
sd::sidebar::RecentlyUsedMasterPages::ResolveList
void ResolveList()
Definition:
RecentlyUsedMasterPages.cxx:336
sd::sidebar::RecentlyUsedMasterPages::~RecentlyUsedMasterPages
virtual ~RecentlyUsedMasterPages() override
Definition:
RecentlyUsedMasterPages.cxx:86
sd::sidebar::RecentlyUsedMasterPages::mpContainer
std::shared_ptr< MasterPageContainer > mpContainer
Definition:
RecentlyUsedMasterPages.hxx:87
sd::sidebar::RecentlyUsedMasterPages::mpInstance
static RecentlyUsedMasterPages * mpInstance
The single instance of this class.
Definition:
RecentlyUsedMasterPages.hxx:81
sd::sidebar::RecentlyUsedMasterPages::Instance
static RecentlyUsedMasterPages & Instance()
Return the single instance of this class.
Definition:
RecentlyUsedMasterPages.cxx:56
sd::sidebar::RecentlyUsedMasterPages::AddEventListener
void AddEventListener(const Link< LinkParamNone *, void > &rEventListener)
Definition:
RecentlyUsedMasterPages.cxx:222
sd::sidebar::RecentlyUsedMasterPages::LateInit
void LateInit()
Call this method after a new object has been created.
Definition:
RecentlyUsedMasterPages.cxx:95
sd::sidebar::RecentlyUsedMasterPages::MasterPageList
::std::vector< Descriptor > MasterPageList
Definition:
RecentlyUsedMasterPages.hxx:85
sd::sidebar::RecentlyUsedMasterPages::mvMasterPages
MasterPageList mvMasterPages
Definition:
RecentlyUsedMasterPages.hxx:86
sd::sidebar::RecentlyUsedMasterPages::maListeners
::std::vector< Link< LinkParamNone *, void > > maListeners
Definition:
RecentlyUsedMasterPages.hxx:83
sd::sidebar::RecentlyUsedMasterPages::GetTokenForIndex
MasterPageContainer::Token GetTokenForIndex(sal_uInt32 nIndex) const
Definition:
RecentlyUsedMasterPages.cxx:247
sd::sidebar::RecentlyUsedMasterPages::DECL_LINK
DECL_LINK(MasterPageContainerChangeListener, MasterPageContainerChangeEvent &, void)
sd::sidebar::RecentlyUsedMasterPages::RecentlyUsedMasterPages
RecentlyUsedMasterPages(const RecentlyUsedMasterPages &)=delete
sd::sidebar::RecentlyUsedMasterPages::SendEvent
void SendEvent()
Definition:
RecentlyUsedMasterPages.cxx:255
sName
OUString sName
nIndex
sal_Int32 nIndex
link.hxx
sd::sidebar
Definition:
AllMasterPagesSelector.cxx:68
sd
std
Generated on Sun Jul 30 2023 04:27:23 for LibreOffice Module sd (master) by
1.9.3