Bug 1888590 - Mark some subtests on trusted-types-event-handlers.html as failing...
[gecko.git] / toolkit / components / find / nsFindService.cpp
blob7499132c2c2c2dc9f88ad9dc0e34e0c82919930b
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /*
7 * The sole purpose of the Find service is to store globally the
8 * last used Find settings
12 #include "nsFindService.h"
14 nsFindService::nsFindService()
15 : mFindBackwards(false),
16 mWrapFind(true),
17 mEntireWord(false),
18 mMatchCase(false) {}
20 nsFindService::~nsFindService() = default;
22 NS_IMPL_ISUPPORTS(nsFindService, nsIFindService)
24 NS_IMETHODIMP nsFindService::GetSearchString(nsAString& aSearchString) {
25 aSearchString = mSearchString;
26 return NS_OK;
29 NS_IMETHODIMP nsFindService::SetSearchString(const nsAString& aSearchString) {
30 mSearchString = aSearchString;
31 return NS_OK;
34 NS_IMETHODIMP nsFindService::GetReplaceString(nsAString& aReplaceString) {
35 aReplaceString = mReplaceString;
36 return NS_OK;
38 NS_IMETHODIMP nsFindService::SetReplaceString(const nsAString& aReplaceString) {
39 mReplaceString = aReplaceString;
40 return NS_OK;
43 NS_IMETHODIMP nsFindService::GetFindBackwards(bool* aFindBackwards) {
44 NS_ENSURE_ARG_POINTER(aFindBackwards);
45 *aFindBackwards = mFindBackwards;
46 return NS_OK;
48 NS_IMETHODIMP nsFindService::SetFindBackwards(bool aFindBackwards) {
49 mFindBackwards = aFindBackwards;
50 return NS_OK;
53 NS_IMETHODIMP nsFindService::GetWrapFind(bool* aWrapFind) {
54 NS_ENSURE_ARG_POINTER(aWrapFind);
55 *aWrapFind = mWrapFind;
56 return NS_OK;
58 NS_IMETHODIMP nsFindService::SetWrapFind(bool aWrapFind) {
59 mWrapFind = aWrapFind;
60 return NS_OK;
63 NS_IMETHODIMP nsFindService::GetEntireWord(bool* aEntireWord) {
64 NS_ENSURE_ARG_POINTER(aEntireWord);
65 *aEntireWord = mEntireWord;
66 return NS_OK;
68 NS_IMETHODIMP nsFindService::SetEntireWord(bool aEntireWord) {
69 mEntireWord = aEntireWord;
70 return NS_OK;
73 NS_IMETHODIMP nsFindService::GetMatchCase(bool* aMatchCase) {
74 NS_ENSURE_ARG_POINTER(aMatchCase);
75 *aMatchCase = mMatchCase;
76 return NS_OK;
78 NS_IMETHODIMP nsFindService::SetMatchCase(bool aMatchCase) {
79 mMatchCase = aMatchCase;
80 return NS_OK;
83 NS_IMETHODIMP nsFindService::GetMatchDiacritics(bool* aMatchDiacritics) {
84 NS_ENSURE_ARG_POINTER(aMatchDiacritics);
85 *aMatchDiacritics = mMatchDiacritics;
86 return NS_OK;
88 NS_IMETHODIMP nsFindService::SetMatchDiacritics(bool aMatchDiacritics) {
89 mMatchDiacritics = aMatchDiacritics;
90 return NS_OK;