LibreOffice Module sw (master) 1
pamtyp.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_SW_SOURCE_CORE_INC_PAMTYP_HXX
21#define INCLUDED_SW_SOURCE_CORE_INC_PAMTYP_HXX
22
24
25#include <memory>
26#include <optional>
27
28class SwpHints;
29struct SwPosition;
30class SwPaM;
31class SwTextAttr;
32class SwFormat;
33class SfxPoolItem;
34class SwRootFrame;
35class SwNode;
36class SwNodeIndex;
37class SwContentNode;
38class SwContentIndex;
39class SvxSearchItem;
40enum class SwCursorSkipMode;
41
42namespace i18nutil {
43 struct SearchOptions2;
44}
45
46// function prototypes for the move/find methods of SwPaM
47
49void GoEndDoc( SwPosition*);
54const SwTextAttr* GetFrwrdTextHint( const SwpHints&, size_t&, sal_Int32 );
55const SwTextAttr* GetBkwrdTextHint( const SwpHints&, size_t&, sal_Int32 );
56
57bool GoNext(SwNode* pNd, SwContentIndex * pIdx, SwCursorSkipMode nMode );
58bool GoPrevious(SwNode* pNd, SwContentIndex * pIdx, SwCursorSkipMode nMode );
59SwContentNode* GoNextNds( SwNodeIndex * pIdx, bool );
61SwContentNode* GoNextPos( SwPosition * pIdx, bool );
63
64// type definitions of functions
66typedef SwContentNode* (*GoNds)( SwNodeIndex*, bool );
67typedef SwContentNode* (*GoPos)( SwPosition*, bool );
68typedef void (*GoDoc)( SwPosition* );
69typedef void (*GoSection)( SwPosition* );
70typedef bool (SwPosition::*CmpOp)( const SwPosition& ) const;
71typedef const SwTextAttr* (*GetHint)( const SwpHints&, size_t&, sal_Int32 );
72typedef bool (utl::TextSearch::*SearchText)( const OUString&, sal_Int32*,
73 sal_Int32*, css::util::SearchResult* );
74typedef void (*MvSection)( SwPosition * );
75
77{
87};
88
89// function prototype for searching
91 bool bInReadOnly = false, SwRootFrame const* pLayout = nullptr);
92
93namespace sw {
94
95 void MakeRegion(SwMoveFnCollection const & fnMove,
96 const SwPaM & rOrigRg, std::optional<SwPaM>& rDestinaton);
97
99 bool FindTextImpl(SwPaM & rSearchPam,
100 const i18nutil::SearchOptions2& rSearchOpt,
101 bool bSearchInNotes,
102 utl::TextSearch& rSText,
103 SwMoveFnCollection const & fnMove,
104 const SwPaM & rRegion, bool bInReadOnly,
105 SwRootFrame const* pLayout,
106 std::unique_ptr<SvxSearchItem>& xSearchItem);
107 bool FindFormatImpl(SwPaM & rSearchPam,
108 const SwFormat& rFormat,
109 SwMoveFnCollection const & fnMove,
110 const SwPaM & rRegion, bool bInReadOnly,
111 SwRootFrame const* pLayout);
112 bool FindAttrImpl(SwPaM & rSearchPam,
113 const SfxPoolItem& rAttr,
114 SwMoveFnCollection const & fnMove,
115 const SwPaM & rPam, bool bInReadOnly,
116 SwRootFrame const* pLayout);
117
118} // namespace sw
119
120#endif
121
122/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Marks a character position inside a document model content node (SwContentNode)
Base class for various Writer styles.
Definition: format.hxx:47
Marks a node in the document model.
Definition: ndindex.hxx:31
Base class of the Writer document model elements.
Definition: node.hxx:98
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:188
The root element of a Writer document layout.
Definition: rootfrm.hxx:85
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
Definition: txatbase.hxx:44
An SwTextAttr container, stores all directly formatted text portions for a text node.
Definition: ndhints.hxx:68
Dialog to specify the properties of date form field.
bool FindTextImpl(SwPaM &rSearchPam, const i18nutil::SearchOptions2 &rSearchOpt, bool bSearchInNotes, utl::TextSearch &rSText, SwMoveFnCollection const &fnMove, const SwPaM &rRegion, bool bInReadOnly, SwRootFrame const *const pLayout, std::unique_ptr< SvxSearchItem > &xSearchItem)
Search.
Definition: findtxt.cxx:369
void MakeRegion(SwMoveFnCollection const &fnMove, const SwPaM &rOrigRg, std::optional< SwPaM > &rPam)
make a new region
Definition: pam.cxx:676
bool FindAttrImpl(SwPaM &rSearchPam, const SfxPoolItem &rAttr, SwMoveFnCollection const &fnMove, const SwPaM &rRegion, bool bInReadOnly, SwRootFrame const *const pLayout)
Definition: findattr.cxx:910
bool FindFormatImpl(SwPaM &rSearchPam, const SwFormat &rFormat, SwMoveFnCollection const &fnMove, const SwPaM &rRegion, bool bInReadOnly, SwRootFrame const *const pLayout)
Definition: findfmt.cxx:28
SwContentNode *(* GoNds)(SwNodeIndex *, bool)
Definition: pamtyp.hxx:66
void GoEndOfSection(SwPosition *)
Definition: pam.cxx:1175
void GoEndDoc(SwPosition *)
Definition: pam.cxx:1131
SwContentNode *(* GoPos)(SwPosition *, bool)
Definition: pamtyp.hxx:67
void(* MvSection)(SwPosition *)
Definition: pamtyp.hxx:74
SwContentNode * GetNode(SwPaM &, bool &, SwMoveFnCollection const &, bool bInReadOnly=false, SwRootFrame const *pLayout=nullptr)
This function returns the next node in direction of search.
Definition: pam.cxx:1043
SwContentNode * GoPreviousPos(SwPosition *pIdx, bool)
Definition: pam.cxx:440
const SwTextAttr * GetFrwrdTextHint(const SwpHints &, size_t &, sal_Int32)
Definition: findattr.cxx:76
void GoStartOfSection(SwPosition *)
Definition: pam.cxx:1153
bool(utl::TextSearch::* SearchText)(const OUString &, sal_Int32 *, sal_Int32 *, css::util::SearchResult *)
Definition: pamtyp.hxx:72
SwContentNode * GoNextNds(SwNodeIndex *pIdx, bool)
Definition: pam.cxx:395
bool(* GoNd)(SwNode *, SwContentIndex *, SwCursorSkipMode)
Definition: pamtyp.hxx:65
bool GoNext(SwNode *pNd, SwContentIndex *pIdx, SwCursorSkipMode nMode)
Definition: pam.cxx:381
void(* GoSection)(SwPosition *)
Definition: pamtyp.hxx:69
void GoEndSection(SwPosition *)
go to the end of the current base section
Definition: pam.cxx:1161
SwContentNode * GoNextPos(SwPosition *pIdx, bool)
Definition: pam.cxx:425
const SwTextAttr * GetBkwrdTextHint(const SwpHints &, size_t &, sal_Int32)
Definition: findattr.cxx:89
SwContentNode * GoPreviousNds(SwNodeIndex *pIdx, bool)
Definition: pam.cxx:410
void GoStartDoc(SwPosition *)
Definition: pam.cxx:1123
bool(SwPosition::* CmpOp)(const SwPosition &) const
Definition: pamtyp.hxx:70
bool GoPrevious(SwNode *pNd, SwContentIndex *pIdx, SwCursorSkipMode nMode)
Definition: pam.cxx:388
const SwTextAttr *(* GetHint)(const SwpHints &, size_t &, sal_Int32)
Definition: pamtyp.hxx:71
void(* GoDoc)(SwPosition *)
Definition: pamtyp.hxx:68
void GoStartSection(SwPosition *)
Definition: pam.cxx:1140
MvSection fnSection
Definition: pamtyp.hxx:86
GoSection fnSections
Definition: pamtyp.hxx:82
GetHint fnGetHint
Definition: pamtyp.hxx:84
SearchText fnSearch
Definition: pamtyp.hxx:85
Marks a position in the document model.
Definition: pam.hxx:38
SwCursorSkipMode
Definition: swcrsr.hxx:65