LibreOffice Module svx (master) 1
fmsrccfg.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_SVX_FMSRCCFG_HXX
21#define INCLUDED_SVX_FMSRCCFG_HXX
22
24#include <com/sun/star/uno/Sequence.hxx>
25#include <svx/svxdllapi.h>
26
27enum class TransliterationFlags;
28
29#define MATCHING_ANYWHERE 0
30#define MATCHING_BEGINNING 1
31#define MATCHING_END 2
32#define MATCHING_WHOLETEXT 3
33
34// this constants should NOT be just changed, since the SearchDialog performs no conversion of the settings of
35// its ListBox, but instead just passes them along to the appropriate methods of SearchEngine
36// (so if you change the constants or the order of the listbox entries in the dialog, then the other has
37// to be adapted)
38
39
40namespace svxform
41{
42
43
44 // = struct FmSearchParams - parameters of a search
45
46
48 {
49 protected:
52 // they're way too sensitive for direct access...
53
54 public:
55 // no bit fields at all (want to pass the addresses to the OConfigurationValueContainer)
56 css::uno::Sequence< OUString >
59
60 sal_Int16 nSearchForType;
61 sal_Int16 nPosition;
62 sal_Int16 nLevOther;
63 sal_Int16 nLevShorter;
64 sal_Int16 nLevLonger;
66
73 // the last three are mutually exclusive
74
76
77
79
80 bool isIgnoreWidthCJK( ) const;
81
83 getTransliterationFlags( ) const { return nTransliterationFlags; }
84 void setTransliterationFlags( TransliterationFlags _nFlags ) { nTransliterationFlags = _nFlags; }
85
86 bool isCaseSensitive( ) const;
87 void setCaseSensitive( bool _bCase );
88 };
89
90
91 // = class FmSearchConfigItem - a ConfigItem, that remembers search parameters
92
93
95 :protected FmSearchParams
96 ,public ::utl::OConfigurationValueContainer
97 // order matters!
98 {
99 private:
100 ::osl::Mutex m_aMutex;
101
102 // wrapper properties:
103 // some of the members of FmSearchParams are must be translated to be stored in the configuration
106
126
127 public:
130
131 const FmSearchParams& getParams( ) const;
132 void setParams( const FmSearchParams& _rParams );
133
134 private:
135 SVX_DLLPRIVATE void implTranslateFromConfig( );
136 SVX_DLLPRIVATE void implTranslateToConfig( );
137 };
138
139
140}
141
142
143#endif // INCLUDED_SVX_FMSRCCFG_HXX
144
145/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
class FmSearchEngine - Impl class for FmSearchDialog
sal_Int16 nSearchForType
Definition: fmsrccfg.hxx:60
TransliterationFlags nTransliterationFlags
Definition: fmsrccfg.hxx:51
OUString sSingleSearchField
Definition: fmsrccfg.hxx:58
TransliterationFlags getTransliterationFlags() const
Definition: fmsrccfg.hxx:83
void setTransliterationFlags(TransliterationFlags _nFlags)
Definition: fmsrccfg.hxx:84
css::uno::Sequence< OUString > aHistory
Definition: fmsrccfg.hxx:57
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28
#define SVX_DLLPRIVATE
Definition: svxdllapi.h:30
TransliterationFlags
#define SAL_WARN_UNUSED