1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _EDITSTT2_HXX
25 #define _EDITSTT2_HXX
26 
27 #include <editeng/editstat.hxx>
28 
29 class InternalEditStatus : public EditStatus
30 {
31 
32 public:
InternalEditStatus()33 			InternalEditStatus() { ; }
34 
TurnOnFlags(sal_uLong nFlags)35 	void	TurnOnFlags( sal_uLong nFlags )
36 				{ nControlBits |= nFlags; }
37 
TurnOffFlags(sal_uLong nFlags)38 	void	TurnOffFlags( sal_uLong nFlags )
39 				{ nControlBits &= ~nFlags; }
40 
TurnOnStatusBits(sal_uLong nBits)41 	void	TurnOnStatusBits( sal_uLong nBits )
42 				{ nStatusBits |= nBits; }
43 
TurnOffStatusBits(sal_uLong nBits)44 	void	TurnOffStatusBits( sal_uLong nBits )
45 				{ nStatusBits &= ~nBits; }
46 
47 
UseCharAttribs() const48 	sal_Bool	UseCharAttribs() const
49 				{ return ( ( nControlBits & EE_CNTRL_USECHARATTRIBS ) != 0 ); }
50 
NotifyCursorMovements() const51 	sal_Bool	NotifyCursorMovements() const
52 				{ return ( ( nControlBits & EE_CNTRL_CRSRLEFTPARA ) != 0 ); }
53 
UseIdleFormatter() const54 	sal_Bool	UseIdleFormatter() const
55 				{ return ( ( nControlBits & EE_CNTRL_DOIDLEFORMAT) != 0 ); }
56 
AllowPasteSpecial() const57 	sal_Bool	AllowPasteSpecial() const
58 				{ return ( ( nControlBits & EE_CNTRL_PASTESPECIAL ) != 0 ); }
59 
DoAutoIndenting() const60 	sal_Bool	DoAutoIndenting() const
61 				{ return ( ( nControlBits & EE_CNTRL_AUTOINDENTING ) != 0 ); }
62 
DoUndoAttribs() const63 	sal_Bool	DoUndoAttribs() const
64 				{ return ( ( nControlBits & EE_CNTRL_UNDOATTRIBS ) != 0 ); }
65 
OneCharPerLine() const66 	sal_Bool	OneCharPerLine() const
67 				{ return ( ( nControlBits & EE_CNTRL_ONECHARPERLINE ) != 0 ); }
68 
IsOutliner() const69 	sal_Bool	IsOutliner() const
70 				{ return ( ( nControlBits & EE_CNTRL_OUTLINER ) != 0 ); }
71 
IsOutliner2() const72 	sal_Bool	IsOutliner2() const
73 				{ return ( ( nControlBits & EE_CNTRL_OUTLINER2 ) != 0 ); }
74 
IsAnyOutliner() const75 	sal_Bool	IsAnyOutliner() const
76 				{ return IsOutliner() || IsOutliner2(); }
77 
DoNotUseColors() const78 	sal_Bool	DoNotUseColors() const
79 				{ return ( ( nControlBits & EE_CNTRL_NOCOLORS ) != 0 ); }
80 
AllowBigObjects() const81 	sal_Bool	AllowBigObjects() const
82 				{ return ( ( nControlBits & EE_CNTRL_ALLOWBIGOBJS ) != 0 ); }
83 
DoOnlineSpelling() const84 	sal_Bool	DoOnlineSpelling() const
85 				{ return ( ( nControlBits & EE_CNTRL_ONLINESPELLING ) != 0 ); }
86 
DoStretch() const87 	sal_Bool	DoStretch() const
88 				{ return ( ( nControlBits & EE_CNTRL_STRETCHING ) != 0 ); }
89 
AutoPageSize() const90 	sal_Bool	AutoPageSize() const
91 				{ return ( ( nControlBits & EE_CNTRL_AUTOPAGESIZE ) != 0 ); }
AutoPageWidth() const92 	sal_Bool	AutoPageWidth() const
93 				{ return ( ( nControlBits & EE_CNTRL_AUTOPAGESIZEX ) != 0 ); }
AutoPageHeight() const94 	sal_Bool	AutoPageHeight() const
95 				{ return ( ( nControlBits & EE_CNTRL_AUTOPAGESIZEY ) != 0 ); }
96 
MarkFields() const97 	sal_Bool	MarkFields() const
98 				{ return ( ( nControlBits & EE_CNTRL_MARKFIELDS ) != 0 ); }
99 
DoRestoreFont() const100 	sal_Bool	DoRestoreFont() const
101 				{ return ( ( nControlBits & EE_CNTRL_RESTOREFONT ) != 0 ); }
102 
DoImportRTFStyleSheets() const103 	sal_Bool	DoImportRTFStyleSheets() const
104 				{ return ( ( nControlBits & EE_CNTRL_RTFSTYLESHEETS ) != 0 ); }
105 
DoAutoCorrect() const106 	sal_Bool	DoAutoCorrect() const
107 				{ return ( ( nControlBits & EE_CNTRL_AUTOCORRECT ) != 0 ); }
108 
DoAutoComplete() const109 	sal_Bool	DoAutoComplete() const
110 				{ return ( ( nControlBits & EE_CNTRL_AUTOCOMPLETE ) != 0 ); }
111 
DoTabIndenting() const112 	sal_Bool	DoTabIndenting() const
113 				{ return ( ( nControlBits & EE_CNTRL_TABINDENTING ) != 0 ); }
114 
DoFormat100() const115 	sal_Bool	DoFormat100() const
116 				{ return ( ( nControlBits & EE_CNTRL_FORMAT100 ) != 0 ); }
117 
ULSpaceSummation() const118 	sal_Bool	ULSpaceSummation() const
119 				{ return ( ( nControlBits & EE_CNTRL_ULSPACESUMMATION ) != 0 ); }
120 
ULSpaceFirstParagraph() const121 	sal_Bool	ULSpaceFirstParagraph() const
122 				{ return ( ( nControlBits & EE_CNTRL_ULSPACEFIRSTPARA ) != 0 ); }
123 };
124 
125 #endif // _EDITSTT2_HXX
126 
127