LCOV - code coverage report
Current view: top level - include/editeng - editstat.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 22 0.0 %
Date: 2014-04-14 Functions: 0 10 0.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10