LibreOffice Module sw (master) 1
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
27
29
30#include <vcl/svapp.hxx>
31
32class SfxPoolItem;
33class SwDoc;
35
36typedef ::cppu::WeakImplHelper
37< css::lang::XServiceInfo
38, css::container::XEnumeration
39>
41
42enum class CursorType
43{
44 Body,
45 Frame,
48 Header,
49 Footer,
50 Redline,
51 All, // for Search&Replace
52 Selection, // create a paragraph enumeration from
53 // a text range or cursor
55 Meta, // meta/meta-field
57};
58
59namespace sw {
60
62{
63 Default = 0,
64 ForceExpandHints = (1<<0),
65 ForceReplace = (1<<1),
66};
67
68} // namespace sw
69
70namespace 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*/
79{
80private:
82
83public:
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*/
94{
95private:
96 SwDoc *const m_pDoc;
97
98public:
99 UnoActionRemoveContext(SwDoc *const pDoc);
101 ~UnoActionRemoveContext() COVERITY_NOEXCEPT_FALSE;
102};
103
104namespace sw {
105 template<typename T>
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: */
Definition: doc.hxx:194
UnoActionContext(SwDoc *const pDoc)
Definition: unoobj2.cxx:183
~UnoActionContext() COVERITY_NOEXCEPT_FALSE
Definition: unoobj2.cxx:193
Header
Footer
Dialog to specify the properties of date form field.
DeleteAndInsertMode
std::unique_ptr< T, UnoImplPtrDeleter< T > > UnoImplPtr
Smart pointer class ensuring that the pointed object is deleted with a locked SolarMutex.
void operator()(T *pUnoImpl)
css::uno::Reference< css::i18n::XExtendedTransliteration > Body
::cppu::WeakImplHelper< css::lang::XServiceInfo, css::container::XEnumeration > SwSimpleEnumeration_Base
CursorType