merge the formfield patch from ooo-build
[ooovba.git] / binfilter / inc / bf_sw / redlenum.hxx
blob228888e5f6a97da6f7aaf1bc37bf37d535bceb4f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: redlenum.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _REDLENUM_HXX
31 #define _REDLENUM_HXX
32 namespace binfilter {
35 // Redline Typen
36 enum SwRedlineType
38 // die RedlineTypen gehen von 0 bis 127
39 REDLINE_INSERT, // Inhalt wurde eingefuegt
40 REDLINE_DELETE, // Inhalt wurde geloescht
41 REDLINE_FORMAT, // Attributierung wurde angewendet
42 REDLINE_TABLE, // TabellenStruktur wurde veraendert
43 REDLINE_FMTCOLL, // FormatVorlage wurde veraendert (Autoformat!)
45 // ab 128 koennen Flags hineinverodert werden
46 REDLINE_NO_FLAG_MASK = 0x007f,
47 REDLINE_FLAG_MASK = 0xff80,
48 REDLINE_FORM_AUTOFMT = 0x0080 // kann als Flag im RedlineType stehen
52 // Redline Modus vom Doc
53 enum SwRedlineMode
55 REDLINE_NONE, // kein RedlineMode
56 REDLINE_ON = 0x01, // RedlineMode on
57 REDLINE_IGNORE = 0x02, // auf Redlines nicht reagieren
59 REDLINE_SHOW_INSERT = 0x10, // alle Einfuegungen anzeigen
60 REDLINE_SHOW_DELETE = 0x20, // alle Loeschungen anzeigen
62 REDLINE_SHOW_MASK = REDLINE_SHOW_INSERT | REDLINE_SHOW_DELETE,
64 // fuer die interne Verwaltung:
65 // die originalen Redlines inclusive des Contents entfernen
66 // (ClipBoard/Textbausteine)
67 REDLINE_DELETE_REDLINES = 0x100,
68 // beim Loeschen innerhalb ein RedlineObjectes, waehrend des Appends,
69 // das DeleteRedline ignorieren
70 REDLINE_IGNOREDELETE_REDLINES = 0x200,
71 // don't combine any readlines. This flags is may only used in the Undo.
72 REDLINE_DONTCOMBINE_REDLINES = 0x400
75 inline int IsShowChanges( const USHORT eM )
77 return (REDLINE_SHOW_INSERT | REDLINE_SHOW_DELETE) ==
78 (eM & REDLINE_SHOW_MASK);
80 inline int IsHideChanges( const USHORT eM )
82 return REDLINE_SHOW_INSERT == (eM & REDLINE_SHOW_MASK);
84 inline int IsShowOriginal( const USHORT eM )
86 return REDLINE_SHOW_DELETE == (eM & REDLINE_SHOW_MASK);
88 inline int IsRedlineOn( const USHORT eM )
90 return REDLINE_ON == (eM & (REDLINE_ON | REDLINE_IGNORE ));
95 } //namespace binfilter
96 #endif