LCOV - code coverage report
Current view: top level - toolkit/components/find - nsFindService.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 44 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 16 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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/. */
       5             : 
       6             : /*
       7             :  * The sole purpose of the Find service is to store globally the
       8             :  * last used Find settings
       9             :  *
      10             :  */
      11             : 
      12             : 
      13             : #include "nsFindService.h"
      14             : 
      15             : 
      16           0 : nsFindService::nsFindService()
      17             : : mFindBackwards(false)
      18             : , mWrapFind(true)
      19             : , mEntireWord(false)
      20           0 : , mMatchCase(false)
      21             : {
      22           0 : }
      23             : 
      24             : 
      25             : nsFindService::~nsFindService() = default;
      26             : 
      27           0 : NS_IMPL_ISUPPORTS(nsFindService, nsIFindService)
      28             : 
      29           0 : NS_IMETHODIMP nsFindService::GetSearchString(nsAString & aSearchString)
      30             : {
      31           0 :     aSearchString = mSearchString;
      32           0 :     return NS_OK;
      33             : }
      34             : 
      35           0 : NS_IMETHODIMP nsFindService::SetSearchString(const nsAString & aSearchString)
      36             : {
      37           0 :     mSearchString = aSearchString;
      38           0 :     return NS_OK;
      39             : }
      40             : 
      41           0 : NS_IMETHODIMP nsFindService::GetReplaceString(nsAString & aReplaceString)
      42             : {
      43           0 :     aReplaceString = mReplaceString;
      44           0 :     return NS_OK;
      45             : }
      46           0 : NS_IMETHODIMP nsFindService::SetReplaceString(const nsAString & aReplaceString)
      47             : {
      48           0 :     mReplaceString = aReplaceString;
      49           0 :     return NS_OK;
      50             : }
      51             : 
      52           0 : NS_IMETHODIMP nsFindService::GetFindBackwards(bool *aFindBackwards)
      53             : {
      54           0 :     NS_ENSURE_ARG_POINTER(aFindBackwards);
      55           0 :     *aFindBackwards = mFindBackwards;
      56           0 :     return NS_OK;
      57             : }
      58           0 : NS_IMETHODIMP nsFindService::SetFindBackwards(bool aFindBackwards)
      59             : {
      60           0 :     mFindBackwards = aFindBackwards;
      61           0 :     return NS_OK;
      62             : }
      63             : 
      64           0 : NS_IMETHODIMP nsFindService::GetWrapFind(bool *aWrapFind)
      65             : {
      66           0 :     NS_ENSURE_ARG_POINTER(aWrapFind);
      67           0 :     *aWrapFind = mWrapFind;
      68           0 :     return NS_OK;
      69             : }
      70           0 : NS_IMETHODIMP nsFindService::SetWrapFind(bool aWrapFind)
      71             : {
      72           0 :     mWrapFind = aWrapFind;
      73           0 :     return NS_OK;
      74             : }
      75             : 
      76           0 : NS_IMETHODIMP nsFindService::GetEntireWord(bool *aEntireWord)
      77             : {
      78           0 :     NS_ENSURE_ARG_POINTER(aEntireWord);
      79           0 :     *aEntireWord = mEntireWord;
      80           0 :     return NS_OK;
      81             : }
      82           0 : NS_IMETHODIMP nsFindService::SetEntireWord(bool aEntireWord)
      83             : {
      84           0 :     mEntireWord = aEntireWord;
      85           0 :     return NS_OK;
      86             : }
      87             : 
      88           0 : NS_IMETHODIMP nsFindService::GetMatchCase(bool *aMatchCase)
      89             : {
      90           0 :     NS_ENSURE_ARG_POINTER(aMatchCase);
      91           0 :     *aMatchCase = mMatchCase;
      92           0 :     return NS_OK;
      93             : }
      94           0 : NS_IMETHODIMP nsFindService::SetMatchCase(bool aMatchCase)
      95             : {
      96           0 :     mMatchCase = aMatchCase;
      97           0 :     return NS_OK;
      98             : }
      99             : 

Generated by: LCOV version 1.13