LibreOffice Module comphelper (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
j
k
l
m
n
o
p
q
r
s
t
u
w
y
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
y
Variables
Typedefs
a
c
e
f
i
k
m
o
p
s
t
Enumerations
Enumerator
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
~
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
e
g
m
n
o
p
r
s
t
x
Typedefs
Enumerations
Related Functions
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
w
x
z
Functions
a
c
d
e
f
g
i
m
n
o
w
Variables
a
b
g
m
n
o
p
r
s
x
z
Typedefs
Enumerations
Macros
a
c
d
e
f
i
p
r
s
t
u
w
include
comphelper
accessiblecontexthelper.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
#ifndef INCLUDED_COMPHELPER_ACCESSIBLECONTEXTHELPER_HXX
21
#define INCLUDED_COMPHELPER_ACCESSIBLECONTEXTHELPER_HXX
22
23
#include <
comphelper/accessiblecomponenthelper.hxx
>
24
#include <
comphelper/solarmutex.hxx
>
25
26
27
namespace
comphelper
28
{
29
30
31
//= OContextEntryGuard
32
45
class
OContextEntryGuard
:
public
::osl::ClearableMutexGuard
46
{
47
public
:
57
inline
OContextEntryGuard
(
OCommonAccessibleComponent
* _pContext );
58
};
59
60
61
inline
OContextEntryGuard::OContextEntryGuard
(
OCommonAccessibleComponent
* _pContext )
62
: ::
osl
::ClearableMutexGuard( _pContext->GetMutex() )
63
{
64
_pContext->
ensureAlive
();
65
}
66
67
68
//= OExternalLockGuard
69
70
class
OExternalLockGuard
71
:
public
osl::Guard<SolarMutex>
72
,
public
OContextEntryGuard
73
{
74
public
:
75
inline
OExternalLockGuard
(
OCommonAccessibleComponent
* _pContext );
76
};
77
78
79
inline
OExternalLockGuard::OExternalLockGuard
(
OCommonAccessibleComponent
* _pContext )
80
:
osl
::Guard<
SolarMutex
>(
SolarMutex
::
get
() )
81
,
OContextEntryGuard
( _pContext )
82
{
83
// Only lock the external mutex,
84
// release the ::osl::Mutex of the OCommonAccessibleComponent instance.
85
// If you call into another UNO object with locked ::osl::Mutex,
86
// this may lead to dead locks.
87
clear();
88
}
89
90
91
}
// namespace comphelper
92
93
94
#endif
// INCLUDED_COMPHELPER_ACCESSIBLECONTEXTHELPER_HXX
95
96
97
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
accessiblecomponenthelper.hxx
comphelper::OCommonAccessibleComponent
base class encapsulating common functionality for the helper classes implementing the XAccessibleComp...
Definition:
accessiblecomponenthelper.hxx:51
comphelper::OCommonAccessibleComponent::ensureAlive
void ensureAlive() const
checks for being alive. If the object is already disposed (i.e. not alive), an exception is thrown.
Definition:
accessiblecomponenthelper.cxx:137
comphelper::OContextEntryGuard
helper class for guarding the entry into OCommonAccessibleComponent methods.
Definition:
accessiblecontexthelper.hxx:46
comphelper::OContextEntryGuard::OContextEntryGuard
OContextEntryGuard(OCommonAccessibleComponent *_pContext)
constructs the guard
Definition:
accessiblecontexthelper.hxx:61
comphelper::OExternalLockGuard
Definition:
accessiblecontexthelper.hxx:73
comphelper::OExternalLockGuard::OExternalLockGuard
OExternalLockGuard(OCommonAccessibleComponent *_pContext)
Definition:
accessiblecontexthelper.hxx:79
comphelper::SolarMutex
SolarMutex, needed for VCL's Application::GetSolarMutex().
Definition:
solarmutex.hxx:46
comphelper
osl
get
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
solarmutex.hxx
Generated on Sun Jul 30 2023 04:30:34 for LibreOffice Module comphelper (master) by
1.9.3