LibreOffice Module sw (master)
1
sw
inc
unobaseclass.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
#ifndef INCLUDED_SW_INC_UNOBASECLASS_HXX
20
#define INCLUDED_SW_INC_UNOBASECLASS_HXX
21
22
#include <memory>
23
#include <com/sun/star/lang/XServiceInfo.hpp>
24
#include <com/sun/star/container/XEnumeration.hpp>
25
26
#include <
cppuhelper/implbase.hxx
>
27
28
#include <
o3tl/typed_flags_set.hxx
>
29
30
#include <
vcl/svapp.hxx
>
31
32
class
SfxPoolItem
;
33
class
SwDoc
;
34
class
SwUnoTableCursor
;
35
36
typedef
::cppu::WeakImplHelper
37
< css::lang::XServiceInfo
38
, css::container::XEnumeration
39
>
40
SwSimpleEnumeration_Base
;
41
42
enum class
CursorType
43
{
44
Body
,
45
Frame
,
46
TableText
,
47
Footnote
,
48
Header
,
49
Footer
,
50
Redline
,
51
All
,
// for Search&Replace
52
Selection
,
// create a paragraph enumeration from
53
// a text range or cursor
54
SelectionInTable
,
55
Meta
,
// meta/meta-field
56
ContentControl
,
57
};
58
59
namespace
sw
{
60
61
enum class
DeleteAndInsertMode
62
{
63
Default
= 0,
64
ForceExpandHints
= (1<<0),
65
ForceReplace
= (1<<1),
66
};
67
68
}
// namespace sw
69
70
namespace
o3tl
71
{
72
template
<>
struct
typed_flags
<::
sw::DeleteAndInsertMode
> :
is_typed_flags
<::sw::DeleteAndInsertMode, 0x03> {};
73
}
74
75
/*
76
Start/EndAction or Start/EndAllAction
77
*/
78
class
UnoActionContext
79
{
80
private
:
81
SwDoc
*
m_pDoc
;
82
83
public
:
84
UnoActionContext
(
SwDoc
*
const
pDoc);
85
~UnoActionContext
() COVERITY_NOEXCEPT_FALSE;
86
};
87
88
/*
89
interrupt Actions for a little while
90
FIXME: this is a vile abomination that may cause recursive layout actions!
91
C'thulhu fhtagn.
92
*/
93
class
UnoActionRemoveContext
94
{
95
private
:
96
SwDoc
*
const
m_pDoc
;
97
98
public
:
99
UnoActionRemoveContext
(
SwDoc
*
const
pDoc);
100
UnoActionRemoveContext
(
SwUnoTableCursor
const
& rCursor);
101
~UnoActionRemoveContext
() COVERITY_NOEXCEPT_FALSE;
102
};
103
104
namespace
sw
{
105
template
<
typename
T>
106
struct
UnoImplPtrDeleter
107
{
108
void
operator()
(T* pUnoImpl)
109
{
110
SolarMutexGuard
g;
// #i105557#: call dtor with locked solar mutex
111
delete
pUnoImpl;
112
}
113
};
115
template
<
typename
T>
116
using
UnoImplPtr
= std::unique_ptr<T, UnoImplPtrDeleter<T> >;
117
118
}
// namespace sw
119
120
#endif
// INCLUDED_SW_INC_UNOBASECLASS_HXX
121
122
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScMF::All
@ All
Selection
SfxPoolItem
SolarMutexGuard
SwDoc
Definition:
doc.hxx:197
SwUnoTableCursor
Definition:
unocrsr.hxx:80
UnoActionContext
Definition:
unobaseclass.hxx:79
UnoActionContext::UnoActionContext
UnoActionContext(SwDoc *const pDoc)
Definition:
unoobj2.cxx:180
UnoActionContext::~UnoActionContext
~UnoActionContext() COVERITY_NOEXCEPT_FALSE
Definition:
unoobj2.cxx:190
UnoActionContext::m_pDoc
SwDoc * m_pDoc
Definition:
unobaseclass.hxx:81
UnoActionRemoveContext
Definition:
unobaseclass.hxx:94
UnoActionRemoveContext::m_pDoc
SwDoc *const m_pDoc
Definition:
unobaseclass.hxx:96
IsAttrAtPos::Redline
@ Redline
ScCloneFlags::Default
@ Default
implbase.hxx
o3tl
Header
Header
Footer
Footer
sw
Dialog to specify the properties of date form field.
Definition:
AccessibilityCheck.cxx:48
sw::DeleteAndInsertMode
DeleteAndInsertMode
Definition:
unobaseclass.hxx:62
sw::DeleteAndInsertMode::ForceExpandHints
@ ForceExpandHints
sw::DeleteAndInsertMode::ForceReplace
@ ForceReplace
sw::UnoImplPtr
std::unique_ptr< T, UnoImplPtrDeleter< T > > UnoImplPtr
Smart pointer class ensuring that the pointed object is deleted with a locked SolarMutex.
Definition:
unobaseclass.hxx:116
o3tl::is_typed_flags
o3tl::typed_flags
sw::UnoImplPtrDeleter
Definition:
unobaseclass.hxx:107
sw::UnoImplPtrDeleter::operator()
void operator()(T *pUnoImpl)
Definition:
unobaseclass.hxx:108
SfxStyleFamily::Frame
@ Frame
svapp.hxx
Body
css::uno::Reference< css::i18n::XExtendedTransliteration > Body
PortionType::Footnote
@ Footnote
PortionType::Meta
@ Meta
PortionType::ContentControl
@ ContentControl
typed_flags_set.hxx
SwSimpleEnumeration_Base
::cppu::WeakImplHelper< css::lang::XServiceInfo, css::container::XEnumeration > SwSimpleEnumeration_Base
Definition:
unobaseclass.hxx:34
CursorType
CursorType
Definition:
unobaseclass.hxx:43
CursorType::SelectionInTable
@ SelectionInTable
CursorType::TableText
@ TableText
Generated on Sun Jul 30 2023 04:28:05 for LibreOffice Module sw (master) by
1.9.3