LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/editeng - editstat.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 4 22 18.2 %
Date: 2012-08-25 Functions: 4 10 40.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 2 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                 :            : 
      29                 :            : #ifndef _EDITSTAT_HXX
      30                 :            : #define _EDITSTAT_HXX
      31                 :            : 
      32                 :            : #include <tools/string.hxx>
      33                 :            : #include <i18npool/lang.h>
      34                 :            : 
      35                 :            : #define EE_CNTRL_USECHARATTRIBS     0x00000001  // Use of hard character attributes
      36                 :            : #define EE_CNTRL_USEPARAATTRIBS     0x00000002  // Using paragraph attributes.
      37                 :            : #define EE_CNTRL_CRSRLEFTPARA       0x00000004  // Cursor is moved to another paragraph
      38                 :            : #define EE_CNTRL_DOIDLEFORMAT       0x00000008  // Formatting idle
      39                 :            : #define EE_CNTRL_PASTESPECIAL       0x00000010  // Allow PasteSpecial
      40                 :            : #define EE_CNTRL_AUTOINDENTING      0x00000020  // Automatic indenting
      41                 :            : #define EE_CNTRL_UNDOATTRIBS        0x00000040  // Undo for Attributes....
      42                 :            : #define EE_CNTRL_ONECHARPERLINE     0x00000080  // One character per line
      43                 :            : #define EE_CNTRL_NOCOLORS           0x00000100  // Engine: No Color
      44                 :            : #define EE_CNTRL_OUTLINER           0x00000200  // Special treatment Outliner/Outline mode
      45                 :            : #define EE_CNTRL_OUTLINER2          0x00000400  // Special treatment Outliner/Page
      46                 :            : #define EE_CNTRL_ALLOWBIGOBJS       0x00000800  // Portion info in text object
      47                 :            : #define EE_CNTRL_ONLINESPELLING     0x00001000  // During the edit Spelling
      48                 :            : #define EE_CNTRL_STRETCHING         0x00002000  // Stretch mode
      49                 :            : #define EE_CNTRL_MARKFIELDS         0x00004000  // Mark Fields with color
      50                 :            : #define EE_CNTRL_URLSFXEXECUTE      0x00008000  // !!!OLD!!!: SFX-URL-Execute.
      51                 :            : #define EE_CNTRL_RESTOREFONT        0x00010000  // Restore Font in OutDev
      52                 :            : #define EE_CNTRL_RTFSTYLESHEETS     0x00020000  // Use Stylesheets when imported
      53                 :            : //#define EE_CNTRL_NOREDLINES            0x00040000  // No RedLines when OnlineSpellError     /* removed #i91949 */
      54                 :            : #define EE_CNTRL_AUTOCORRECT        0x00080000  // AutoCorrect
      55                 :            : #define EE_CNTRL_AUTOCOMPLETE       0x00100000  // AutoComplete
      56                 :            : #define EE_CNTRL_AUTOPAGESIZEX      0x00200000  // Adjust paper width to Text
      57                 :            : #define EE_CNTRL_AUTOPAGESIZEY      0x00400000  // Adjust paper height to Text
      58                 :            : #define EE_CNTRL_AUTOPAGESIZE       (EE_CNTRL_AUTOPAGESIZEX|EE_CNTRL_AUTOPAGESIZEY)
      59                 :            : #define EE_CNTRL_TABINDENTING       0x00800000  // Indent with tab
      60                 :            : #define EE_CNTRL_FORMAT100          0x01000000  // Always format to 100%
      61                 :            : #define EE_CNTRL_ULSPACESUMMATION   0x02000000  // MS Compat: sum SA and SB, not maximum value
      62                 :            : #define EE_CNTRL_ULSPACEFIRSTPARA   0x04000000  // MS Compat: evaluate also at the first paragraph
      63                 :            : 
      64                 :            : #define EV_CNTRL_AUTOSCROLL         0x00000001  // Auto scrolling horizontally
      65                 :            : #define EV_CNTRL_BIGSCROLL          0x00000002  // Scroll further to the cursor
      66                 :            : #define EV_CNTRL_ENABLEPASTE        0x00000004  // Enable Paste
      67                 :            : #define EV_CNTRL_SINGLELINEPASTE    0x00000008  // View: Paste in input line ...
      68                 :            : #define EV_CNTRL_OVERWRITE          0x00000010  // Overwrite mode
      69                 :            : #define EV_CNTRL_INVONEMORE         0x00000020  // Invalidate one pixel more
      70                 :            : #define EV_CNTRL_AUTOSIZEX          0x00000040  // Automatically adapt to text width
      71                 :            : #define EV_CNTRL_AUTOSIZEY          0x00000080  // Automatically adapt to Text width
      72                 :            : #define EV_CNTRL_AUTOSIZE           (EV_CNTRL_AUTOSIZEX|EV_CNTRL_AUTOSIZEY)
      73                 :            : 
      74                 :            : #define EE_STAT_HSCROLL             0x00000001
      75                 :            : #define EE_STAT_VSCROLL             0x00000002
      76                 :            : #define EE_STAT_CURSOROUT           0x00000004
      77                 :            : #define EE_STAT_CRSRMOVEFAIL        0x00000008
      78                 :            : #define EE_STAT_CRSRLEFTPARA        0x00000010
      79                 :            : #define EE_STAT_TEXTWIDTHCHANGED    0x00000020
      80                 :            : #define EE_STAT_TEXTHEIGHTCHANGED   0x00000040
      81                 :            : #define EE_STAT_WRONGWORDCHANGED    0x00000080
      82                 :            : // #define EE_STAT_MODIFIED         0x00000100
      83                 :            : 
      84                 :            : /*
      85                 :            :     EE_STAT_CRSRLEFTPARA at the time cursor movement and the enter.
      86                 :            : */
      87                 :            : 
      88                 :          0 : inline void SetFlags( sal_uLong& rBits, const sal_uInt32 nMask, bool bOn )
      89                 :            : {
      90         [ #  # ]:          0 :     if ( bOn )
      91                 :          0 :         rBits |= nMask;
      92                 :            :     else
      93                 :          0 :         rBits &= ~nMask;
      94                 :          0 : }
      95                 :            : 
      96                 :            : class EditStatus
      97                 :            : {
      98                 :            : protected:
      99                 :            :     sal_uLong   nStatusBits;
     100                 :            :     sal_uLong   nControlBits;
     101                 :            :     sal_uInt16  nPrevPara;                  // for EE_STAT_CRSRLEFTPARA
     102                 :            : 
     103                 :            : public:
     104                 :      30636 :             EditStatus()                { nStatusBits = 0; nControlBits = 0; nPrevPara = 0xFFFF; }
     105                 :            : 
     106                 :       3187 :     void    Clear()                     { nStatusBits = 0; }
     107                 :            :     void    SetControlBits( sal_uLong nMask, bool bOn )
     108                 :            :                 { SetFlags( nControlBits, nMask, bOn ); }
     109                 :            : 
     110                 :          0 :     sal_uLong   GetStatusWord() const       { return nStatusBits; }
     111                 :     277808 :     sal_uLong&  GetStatusWord()             { return nStatusBits; }
     112                 :            : 
     113                 :            :     sal_uLong   GetControlWord() const      { return nControlBits; }
     114                 :    1942237 :     sal_uLong&  GetControlWord()            { return nControlBits; }
     115                 :            : 
     116                 :            :     sal_uInt16  GetPrevParagraph() const    { return nPrevPara; }
     117                 :          0 :     sal_uInt16& GetPrevParagraph()          { return nPrevPara; }
     118                 :            : };
     119                 :            : 
     120                 :            : #define SPELLCMD_IGNOREWORD         0x0001
     121                 :            : #define SPELLCMD_STARTSPELLDLG      0x0002
     122                 :            : #define SPELLCMD_ADDTODICTIONARY    0x0003
     123                 :            : #define SPELLCMD_WORDLANGUAGE       0x0004
     124                 :            : #define SPELLCMD_PARALANGUAGE       0x0005
     125                 :            : 
     126                 :          0 : struct SpellCallbackInfo
     127                 :            : {
     128                 :            :     sal_uInt16          nCommand;
     129                 :            :     String          aWord;
     130                 :            :     LanguageType    eLanguage;
     131                 :            : 
     132                 :          0 :     SpellCallbackInfo( sal_uInt16 nCMD, const String& rWord )
     133                 :          0 :     : aWord( rWord )
     134                 :            :     {
     135                 :          0 :         nCommand = nCMD;
     136                 :          0 :         eLanguage = LANGUAGE_DONTKNOW;
     137                 :          0 :     }
     138                 :            : 
     139                 :          0 :     SpellCallbackInfo( sal_uInt16 nCMD, LanguageType eLang )
     140                 :          0 :     {
     141                 :          0 :         nCommand = nCMD;
     142                 :          0 :         eLanguage = eLang;
     143                 :          0 :     }
     144                 :            : };
     145                 :            : 
     146                 :            : #endif // _EDITSTAT_HXX
     147                 :            : 
     148                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10