LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/editeng - acorrcfg.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 22 9.1 %
Date: 2012-08-25 Functions: 2 16 12.5 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _SVXACCFG_HXX
      29                 :            : #define _SVXACCFG_HXX
      30                 :            : 
      31                 :            : #include "editeng/editengdllapi.h"
      32                 :            : #include <unotools/configitem.hxx>
      33                 :            : 
      34                 :            : class SvxAutoCorrect;
      35                 :            : class SvxAutoCorrCfg;
      36                 :            : class EDITENG_DLLPUBLIC SvxBaseAutoCorrCfg : public utl::ConfigItem
      37                 :            : {
      38                 :            :     SvxAutoCorrCfg& rParent;
      39                 :            :     com::sun::star::uno::Sequence<rtl::OUString>    GetPropertyNames();
      40                 :            : 
      41                 :            : public:
      42                 :            :     SvxBaseAutoCorrCfg(SvxAutoCorrCfg& rParent);
      43                 :            :     ~SvxBaseAutoCorrCfg();
      44                 :            : 
      45                 :            :     void                    Load(sal_Bool bInit);
      46                 :            :     virtual void            Commit();
      47                 :            :     virtual void            Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames);
      48                 :          0 :     void                    SetModified() {ConfigItem::SetModified();}
      49                 :            : };
      50                 :            : 
      51                 :            : class EDITENG_DLLPUBLIC SvxSwAutoCorrCfg : public utl::ConfigItem
      52                 :            : {
      53                 :            :     SvxAutoCorrCfg& rParent;
      54                 :            :     com::sun::star::uno::Sequence<rtl::OUString>    GetPropertyNames();
      55                 :            : 
      56                 :            : public:
      57                 :            :     SvxSwAutoCorrCfg(SvxAutoCorrCfg& rParent);
      58                 :            :     ~SvxSwAutoCorrCfg();
      59                 :            : 
      60                 :            :     void                    Load(sal_Bool bInit);
      61                 :            :     virtual void            Commit();
      62                 :            :     virtual void            Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames);
      63                 :          0 :     void                    SetModified() {ConfigItem::SetModified();}
      64                 :            : };
      65                 :            : /*--------------------------------------------------------------------
      66                 :            :     Description:   Configuration for Auto Correction
      67                 :            :  --------------------------------------------------------------------*/
      68                 :            : class EDITENG_DLLPUBLIC SvxAutoCorrCfg
      69                 :            : {
      70                 :            :     friend class SvxBaseAutoCorrCfg;
      71                 :            :     friend class SvxSwAutoCorrCfg;
      72                 :            : 
      73                 :            :     SvxAutoCorrect* pAutoCorrect;
      74                 :            : 
      75                 :            :     SvxBaseAutoCorrCfg      aBaseConfig;
      76                 :            :     SvxSwAutoCorrCfg        aSwConfig;
      77                 :            : 
      78                 :            :     // Flags for Autotext:
      79                 :            :     sal_Bool    bFileRel;
      80                 :            :     sal_Bool    bNetRel;
      81                 :            :     // Help tip for Autotext as you type
      82                 :            :     sal_Bool    bAutoTextTip;
      83                 :            :     sal_Bool    bAutoTextPreview;
      84                 :            :     sal_Bool    bAutoFmtByInput;
      85                 :            :     sal_Bool    bSearchInAllCategories;
      86                 :            : 
      87                 :            : public:
      88                 :          0 :     void        SetModified()
      89                 :            :                 {
      90                 :          0 :                     aBaseConfig.SetModified();
      91                 :          0 :                     aSwConfig.SetModified();
      92                 :          0 :                 }
      93                 :          0 :     void        Commit()
      94                 :            :                 {
      95                 :          0 :                     aBaseConfig.Commit();
      96                 :          0 :                     aSwConfig.Commit();
      97                 :          0 :                 }
      98                 :            : 
      99                 :      15877 :           SvxAutoCorrect* GetAutoCorrect()          { return pAutoCorrect; }
     100                 :            :     const SvxAutoCorrect* GetAutoCorrect() const    { return pAutoCorrect; }
     101                 :            :     // the pointer is transfered to the possession of the ConfigItems!
     102                 :            :     void SetAutoCorrect( SvxAutoCorrect* );
     103                 :            : 
     104                 :          0 :     sal_Bool IsAutoFmtByInput() const       { return bAutoFmtByInput; }
     105                 :          0 :     void SetAutoFmtByInput( sal_Bool bSet ) { bAutoFmtByInput = bSet;aSwConfig.SetModified();}
     106                 :            : 
     107                 :         14 :     sal_Bool IsSaveRelFile() const          { return bFileRel; }
     108                 :          0 :     void SetSaveRelFile( sal_Bool bSet )    { bFileRel = bSet; aSwConfig.SetModified(); }
     109                 :            : 
     110                 :          0 :     sal_Bool IsSaveRelNet() const           { return bNetRel; }
     111                 :          0 :     void SetSaveRelNet( sal_Bool bSet )     { bNetRel = bSet; aSwConfig.SetModified();}
     112                 :            : 
     113                 :          0 :     sal_Bool IsAutoTextPreview() const {return bAutoTextPreview;}
     114                 :          0 :     void     SetAutoTextPreview(sal_Bool bSet) {bAutoTextPreview = bSet; aSwConfig.SetModified();}
     115                 :            : 
     116                 :          0 :     sal_Bool IsAutoTextTip() const          { return bAutoTextTip; }
     117                 :          0 :     void SetAutoTextTip(sal_Bool bSet )     { bAutoTextTip = bSet;aSwConfig.SetModified();}
     118                 :            : 
     119                 :          0 :     sal_Bool IsSearchInAllCategories() const        { return bSearchInAllCategories;}
     120                 :            :     void SetSearchInAllCategories(sal_Bool bSet )   { bSearchInAllCategories = bSet; aSwConfig.SetModified(); }
     121                 :            : 
     122                 :            :     SvxAutoCorrCfg();
     123                 :            :     virtual ~SvxAutoCorrCfg();
     124                 :            :     static SvxAutoCorrCfg& Get();
     125                 :            : };
     126                 :            : 
     127                 :            : 
     128                 :            : #endif
     129                 :            : 
     130                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10