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 _OUTLINER_HXX
29 : : #define _OUTLINER_HXX
30 : :
31 : : #include <tools/gen.hxx>
32 : : #include <tools/string.hxx>
33 : :
34 : : #include <svl/brdcst.hxx>
35 : :
36 : : #include <editeng/editdata.hxx>
37 : : #include <i18npool/lang.h>
38 : : #include <tools/color.hxx>
39 : : #include <tools/contnr.hxx>
40 : : #include <vcl/graph.hxx>
41 : : #include <tools/link.hxx>
42 : : #include <rsc/rscsfx.hxx>
43 : : #include "editeng/editengdllapi.h"
44 : : #include <com/sun/star/lang/Locale.hpp>
45 : :
46 : : #include <svtools/grfmgr.hxx>
47 : :
48 : : #include <tools/rtti.hxx> // due to typedef TypeId
49 : : #include <vector>
50 : :
51 : : class OutlinerEditEng;
52 : : class Outliner;
53 : : class EditView;
54 : : class EditUndo;
55 : : class ParagraphList;
56 : : class OutlinerParaObject;
57 : : class SvStream;
58 : : class SvxBulletItem;
59 : : class SvxFont;
60 : : class SvxSearchItem;
61 : : class SvxFieldItem;
62 : : class Window;
63 : : class KeyEvent;
64 : : class MouseEvent;
65 : : class Pointer;
66 : : class CommandEvent;
67 : : class MapMode;
68 : : class OutputDevice;
69 : : class PolyPolygon;
70 : : class SfxStyleSheetPool;
71 : : class SfxStyleSheet;
72 : : class SfxItemPool;
73 : : class SfxItemSet;
74 : : class SvxNumBulletItem;
75 : : class SvxNumberFormat;
76 : : class SvxLRSpaceItem;
77 : : class EditEngine;
78 : : class SvKeyValueIterator;
79 : : class SvxForbiddenCharactersTable;
80 : :
81 : : namespace svl
82 : : {
83 : : class IUndoManager;
84 : : }
85 : :
86 : : #include <com/sun/star/uno/Reference.h>
87 : :
88 : : #include <rtl/ref.hxx>
89 : : #include <editeng/svxfont.hxx>
90 : : #include <editeng/eedata.hxx>
91 : : #include <editeng/paragraphdata.hxx>
92 : :
93 : : class SvxFieldData;
94 : : //////////////////////////////////////////////////////////////////////////////
95 : :
96 : : namespace com { namespace sun { namespace star { namespace linguistic2 {
97 : : class XSpellChecker1;
98 : : class XHyphenator;
99 : : }}}}
100 : : namespace svx{
101 : : struct SpellPortion;
102 : : typedef std::vector<SpellPortion> SpellPortions;
103 : : }
104 : :
105 : : namespace basegfx { class B2DPolyPolygon; }
106 : :
107 : : // internal use only!
108 : : #define PARAFLAG_DROPTARGET 0x1000
109 : : #define PARAFLAG_DROPTARGET_EMPTY 0x2000
110 : : #define PARAFLAG_HOLDDEPTH 0x4000
111 : : #define PARAFLAG_SETBULLETTEXT 0x8000
112 : : #define PARAFLAG_ISPAGE 0x0100
113 : :
114 : : // Undo-Action-Ids
115 : : #define OLUNDO_DEPTH EDITUNDO_USER
116 : : // #define OLUNDO_HEIGHT EDITUNDO_USER+1
117 : : #define OLUNDO_EXPAND EDITUNDO_USER+2
118 : : #define OLUNDO_COLLAPSE EDITUNDO_USER+3
119 : : // #define OLUNDO_REMOVE EDITUNDO_USER+4
120 : : #define OLUNDO_ATTR EDITUNDO_USER+5
121 : : #define OLUNDO_INSERT EDITUNDO_USER+6
122 : : // #define OLUNDO_MOVEPARAGRAPHS EDITUNDO_USER+7
123 : : #define OLUNDO_CHECKPARA EDITUNDO_USER+8
124 : :
125 : : class Paragraph : protected ParagraphData
126 : : {
127 : : private:
128 : : friend class Outliner;
129 : : friend class ParagraphList;
130 : : friend class OutlinerView;
131 : : friend class OutlinerParaObject;
132 : : friend class OutlinerEditEng;
133 : : friend class OutlinerUndoCheckPara;
134 : : friend class OutlinerUndoChangeParaFlags;
135 : :
136 : : Paragraph& operator=(const Paragraph& rPara );
137 : :
138 : : sal_uInt16 nFlags;
139 : : rtl::OUString aBulText;
140 : : Size aBulSize;
141 : : sal_Bool bVisible;
142 : :
143 : 360 : sal_Bool IsVisible() const { return bVisible; }
144 : 3271 : void SetText( const rtl::OUString& rText ) { aBulText = rText; aBulSize.Width() = -1; }
145 : 725155 : void Invalidate() { aBulSize.Width() = -1; }
146 : 1086812 : void SetDepth( sal_Int16 nNewDepth ) { nDepth = nNewDepth; aBulSize.Width() = -1; }
147 : 1244724 : const rtl::OUString& GetText() const { return aBulText; }
148 : :
149 : : Paragraph( sal_Int16 nDepth );
150 : : Paragraph( const Paragraph& );
151 : : Paragraph( const ParagraphData& );
152 : : ~Paragraph();
153 : :
154 : 2523945 : sal_Int16 GetDepth() const { return nDepth; }
155 : :
156 : 241 : sal_Int16 GetNumberingStartValue() const { return mnNumberingStartValue; }
157 : : void SetNumberingStartValue( sal_Int16 nNumberingStartValue );
158 : :
159 : 52 : sal_Bool IsParaIsNumberingRestart() const { return mbParaIsNumberingRestart; }
160 : : void SetParaIsNumberingRestart( sal_Bool bParaIsNumberingRestart );
161 : :
162 : 0 : void SetFlag( sal_uInt16 nFlag ) { nFlags |= nFlag; }
163 : 0 : void RemoveFlag( sal_uInt16 nFlag ) { nFlags &= ~nFlag; }
164 : 22 : bool HasFlag( sal_uInt16 nFlag ) const { return (nFlags & nFlag) != 0; }
165 : : };
166 : :
167 : : struct ParaRange
168 : : {
169 : : sal_uInt16 nStartPara;
170 : : sal_uInt16 nEndPara;
171 : :
172 : 42 : ParaRange( sal_uInt16 nS, sal_uInt16 nE ) { nStartPara = nS, nEndPara = nE; }
173 : :
174 : : void Adjust();
175 : : sal_uInt16 Len() const { return 1 + ( ( nEndPara > nStartPara ) ? (nEndPara-nStartPara) : (nStartPara-nEndPara) ); }
176 : : };
177 : :
178 : 42 : inline void ParaRange::Adjust()
179 : : {
180 [ - + ]: 42 : if ( nStartPara > nEndPara )
181 : : {
182 : 0 : sal_uInt16 nTmp = nStartPara;
183 : 0 : nStartPara = nEndPara;
184 : 0 : nEndPara = nTmp;
185 : : }
186 : 42 : }
187 : :
188 : : class EDITENG_DLLPUBLIC OutlinerView
189 : : {
190 : : friend class Outliner;
191 : :
192 : : private:
193 : :
194 : : Outliner* pOwner;
195 : : EditView* pEditView;
196 : :
197 : : // Drag & Drop
198 : : sal_Bool bBeginDragAtMove_OLDMEMBER;
199 : : sal_Bool bInDragMode;
200 : : Point aDDStartPosRef;
201 : : Point aDDStartPosPix;
202 : : sal_uLong nDDStartPara;
203 : : sal_uLong nDDStartParaVisChildCount;
204 : : sal_uLong nDDCurPara;
205 : : sal_uInt16 nDDStartDepth;
206 : : sal_uInt16 nDDCurDepth;
207 : : sal_uInt16 nDDMaxDepth;
208 : : sal_Bool bDDChangingDepth;
209 : : sal_Bool bDDCursorVisible;
210 : : long* pHorTabArrDoc;
211 : : long nDDScrollLRBorderWidthWin; // Left Right
212 : : long nDDScrollTBBorderWidthWin; // Top Bottom
213 : : long nDDScrollLROffs;
214 : : long nDDScrollTDOffs;
215 : :
216 : : void* pDummy;
217 : : sal_uLong nDummy;
218 : :
219 : : enum MouseTarget {
220 : : MouseText = 0,
221 : : MouseBullet = 1,
222 : : MouseHypertext = 2, // Outside OutputArea
223 : : MouseOutside = 3, // Outside OutputArea
224 : : MouseDontKnow = 4
225 : : };
226 : : MouseTarget OLD_ePrevMouseTarget;
227 : :
228 : : #ifdef _OUTLINER_CXX
229 : :
230 : : EDITENG_DLLPRIVATE void ImplExpandOrCollaps( sal_uInt16 nStartPara, sal_uInt16 nEndPara, sal_Bool bExpand );
231 : :
232 : : EDITENG_DLLPRIVATE sal_uLong ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget);
233 : : EDITENG_DLLPRIVATE void ImpToggleExpand( Paragraph* pParentPara );
234 : : EDITENG_DLLPRIVATE ParaRange ImpGetSelectedParagraphs( sal_Bool bIncludeHiddenChildren );
235 : :
236 : : EDITENG_DLLPRIVATE Pointer ImpGetMousePointer( MouseTarget eTarget );
237 : : EDITENG_DLLPRIVATE sal_uInt16 ImpInitPaste( sal_uLong& rStart );
238 : : EDITENG_DLLPRIVATE void ImpPasted( sal_uLong nStart, sal_uLong nPrevParaCount, sal_uInt16 nSize);
239 : : EDITENG_DLLPRIVATE sal_uInt16 ImpCalcSelectedPages( sal_Bool bIncludeFirstSelected );
240 : : EDITENG_DLLPRIVATE sal_Bool ImpIsIndentingPages();
241 : :
242 : : #endif
243 : :
244 : : public:
245 : : OutlinerView( Outliner* pOut, Window* pWindow );
246 : : virtual ~OutlinerView();
247 : :
248 : 54 : EditView& GetEditView() const { return *pEditView; }
249 : :
250 : : void Scroll( long nHorzScroll, long nVertScroll );
251 : :
252 : : void Paint( const Rectangle& rRect );
253 : : sal_Bool PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin = NULL );
254 : : sal_Bool MouseButtonDown( const MouseEvent& );
255 : : sal_Bool MouseButtonUp( const MouseEvent& );
256 : : sal_Bool MouseMove( const MouseEvent& );
257 : :
258 : : void ShowCursor( sal_Bool bGotoCursor = sal_True );
259 : : void HideCursor();
260 : :
261 : 0 : Outliner* GetOutliner() const { return pOwner; }
262 : :
263 : : void SetWindow( Window* pWindow );
264 : : Window* GetWindow() const;
265 : :
266 : : void SetReadOnly( sal_Bool bReadOnly );
267 : : sal_Bool IsReadOnly() const;
268 : :
269 : : void SetOutputArea( const Rectangle& rRect );
270 : : Rectangle GetOutputArea() const;
271 : :
272 : : Rectangle GetVisArea() const;
273 : :
274 : : void CreateSelectionList (std::vector<Paragraph*> &aSelList) ;
275 : :
276 : : // Retruns the number of selected paragraphs
277 : : sal_uLong Select( Paragraph* pParagraph,
278 : : sal_Bool bSelect=sal_True,
279 : : sal_Bool bWChildren=sal_True);
280 : :
281 : : String GetSelected() const;
282 : : void SelectRange( sal_uLong nFirst, sal_uInt16 nCount );
283 : : void SetAttribs( const SfxItemSet& );
284 : : void Indent( short nDiff );
285 : : void AdjustDepth( short nDX ); // Later replace with Indent!
286 : :
287 : : sal_Bool AdjustHeight( long nDY );
288 : :
289 : : sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect = sal_False, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
290 : :
291 : : void InsertText( const String& rNew, sal_Bool bSelect = sal_False );
292 : : void InsertText( const OutlinerParaObject& rParaObj );
293 : : void Expand();
294 : : void Collapse();
295 : : void ExpandAll();
296 : : void CollapseAll();
297 : :
298 : : void SetBackgroundColor( const Color& rColor );
299 : : Color GetBackgroundColor();
300 : :
301 : : SfxItemSet GetAttribs();
302 : :
303 : : void Cut();
304 : : void Copy();
305 : : void Paste();
306 : : void PasteSpecial();
307 : :
308 : : const SfxStyleSheet* GetStyleSheet() const;
309 : : SfxStyleSheet* GetStyleSheet();
310 : :
311 : : void SetControlWord( sal_uLong nWord );
312 : : sal_uLong GetControlWord() const;
313 : :
314 : : void SetAnchorMode( EVAnchorMode eMode );
315 : : EVAnchorMode GetAnchorMode() const;
316 : :
317 : : Pointer GetPointer( const Point& rPosPixel );
318 : : void Command( const CommandEvent& rCEvt );
319 : :
320 : : EESpellState StartSpeller( sal_Bool bMultipleDoc = sal_False );
321 : : EESpellState StartThesaurus();
322 : : sal_uInt16 StartSearchAndReplace( const SvxSearchItem& rSearchItem );
323 : :
324 : : // for text conversion
325 : : void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc );
326 : :
327 : : void TransliterateText( sal_Int32 nTransliterationMode );
328 : :
329 : : ESelection GetSelection();
330 : :
331 : : sal_uInt16 GetSelectedScriptType() const;
332 : :
333 : : void SetVisArea( const Rectangle& rRec );
334 : : void SetSelection( const ESelection& );
335 : :
336 : : void RemoveAttribs( sal_Bool bRemoveParaAttribs = sal_False, sal_uInt16 nWhich = 0, sal_Bool bKeepLanguages = sal_False );
337 : : void RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs );
338 : : sal_Bool HasSelection() const;
339 : :
340 : : void InsertField( const SvxFieldItem& rFld );
341 : : const SvxFieldItem* GetFieldUnderMousePointer() const;
342 : : const SvxFieldItem* GetFieldAtSelection() const;
343 : :
344 : : /** enables numbering for the selected paragraphs if the numbering of the first paragraph is off
345 : : or disables numbering for the selected paragraphs if the numbering of the first paragraph is on
346 : : */
347 : : void ToggleBullets();
348 : :
349 : : /** enables numbering for the selected paragraphs that are not enabled and ignore all selected
350 : : paragraphs that already have numbering enabled.
351 : : */
352 : : void EnableBullets();
353 : :
354 : : sal_Bool IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong = sal_False );
355 : : sal_Bool IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMarkIfWrong = sal_False );
356 : : void ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 );
357 : :
358 : : void SetInvalidateMore( sal_uInt16 nPixel );
359 : : sal_uInt16 GetInvalidateMore() const;
360 : :
361 : : String GetSurroundingText() const;
362 : : Selection GetSurroundingTextSelection() const;
363 : : };
364 : :
365 : :
366 : : // some thesaurus functionality to avoid code duplication in different projects...
367 : : bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext( String &rStatusVal, LanguageType &rLang, const EditView &rEditView );
368 : : void EDITENG_DLLPUBLIC ReplaceTextWithSynonym( EditView &rEditView, const String &rSynonmText );
369 : :
370 : : typedef ::std::vector< OutlinerView* > ViewList;
371 : :
372 : : class EDITENG_DLLPUBLIC DrawPortionInfo
373 : : {
374 : : public:
375 : : const Point& mrStartPos;
376 : : const String& mrText;
377 : : sal_uInt16 mnTextStart;
378 : : sal_uInt16 mnTextLen;
379 : : sal_uInt16 mnPara;
380 : : xub_StrLen mnIndex;
381 : : const SvxFont& mrFont;
382 : : const sal_Int32* mpDXArray;
383 : :
384 : : const EEngineData::WrongSpellVector* mpWrongSpellVector;
385 : : const SvxFieldData* mpFieldData;
386 : : const ::com::sun::star::lang::Locale* mpLocale;
387 : : const Color maOverlineColor;
388 : : const Color maTextLineColor;
389 : :
390 : : sal_uInt8 mnBiDiLevel;
391 : :
392 : : bool mbFilled;
393 : : long mnWidthToFill;
394 : :
395 : : // bitfield
396 : : unsigned mbEndOfLine : 1;
397 : : unsigned mbEndOfParagraph : 1;
398 : : unsigned mbEndOfBullet : 1;
399 : :
400 : : sal_uInt8 GetBiDiLevel() const { return mnBiDiLevel; }
401 : : sal_Bool IsRTL() const;
402 : :
403 : 18454 : DrawPortionInfo(
404 : : const Point& rPos,
405 : : const String& rTxt,
406 : : sal_uInt16 nTxtStart,
407 : : sal_uInt16 nTxtLen,
408 : : const SvxFont& rFnt,
409 : : sal_uInt16 nPar,
410 : : xub_StrLen nIdx,
411 : : const sal_Int32* pDXArr,
412 : : const EEngineData::WrongSpellVector* pWrongSpellVector,
413 : : const SvxFieldData* pFieldData,
414 : : const ::com::sun::star::lang::Locale* pLocale,
415 : : const Color& rOverlineColor,
416 : : const Color& rTextLineColor,
417 : : sal_uInt8 nBiDiLevel,
418 : : bool bFilled,
419 : : long nWidthToFill,
420 : : bool bEndOfLine,
421 : : bool bEndOfParagraph,
422 : : bool bEndOfBullet)
423 : : : mrStartPos(rPos),
424 : : mrText(rTxt),
425 : : mnTextStart(nTxtStart),
426 : : mnTextLen(nTxtLen),
427 : : mnPara(nPar),
428 : : mnIndex(nIdx),
429 : : mrFont(rFnt),
430 : : mpDXArray(pDXArr),
431 : : mpWrongSpellVector(pWrongSpellVector),
432 : : mpFieldData(pFieldData),
433 : : mpLocale(pLocale),
434 : : maOverlineColor(rOverlineColor),
435 : : maTextLineColor(rTextLineColor),
436 : : mnBiDiLevel(nBiDiLevel),
437 : : mbFilled( bFilled ),
438 : : mnWidthToFill( nWidthToFill ),
439 : : mbEndOfLine(bEndOfLine),
440 : : mbEndOfParagraph(bEndOfParagraph),
441 : 18454 : mbEndOfBullet(bEndOfBullet)
442 : 18454 : {}
443 : : };
444 : :
445 : 0 : class EDITENG_DLLPUBLIC DrawBulletInfo
446 : : {
447 : : public:
448 : : const GraphicObject maBulletGraphicObject;
449 : : Point maBulletPosition;
450 : : Size maBulletSize;
451 : :
452 : 0 : DrawBulletInfo(
453 : : const GraphicObject& rBulletGraphicObject,
454 : : const Point& rBulletPosition,
455 : : const Size& rBulletSize)
456 : : : maBulletGraphicObject(rBulletGraphicObject),
457 : : maBulletPosition(rBulletPosition),
458 : 0 : maBulletSize(rBulletSize)
459 : 0 : {}
460 : : };
461 : :
462 : : struct EDITENG_DLLPUBLIC PaintFirstLineInfo
463 : : {
464 : : sal_uInt16 mnPara;
465 : : const Point& mrStartPos;
466 : : long mnBaseLineY;
467 : : const Point& mrOrigin;
468 : : short mnOrientation;
469 : : OutputDevice* mpOutDev;
470 : :
471 : 0 : PaintFirstLineInfo( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
472 : 0 : : mnPara( nPara ), mrStartPos( rStartPos ), mnBaseLineY( nBaseLineY ), mrOrigin( rOrigin ), mnOrientation( nOrientation ), mpOutDev( pOutDev )
473 : 0 : {}
474 : : };
475 : :
476 : : class SdrPage;
477 : :
478 : : class EditFieldInfo
479 : : {
480 : : private:
481 : : Outliner* pOutliner;
482 : : const SvxFieldItem& rFldItem;
483 : :
484 : : Color* pTxtColor;
485 : : Color* pFldColor;
486 : :
487 : : String aRepresentation;
488 : :
489 : : sal_uInt16 nPara;
490 : : xub_StrLen nPos;
491 : : sal_Bool bSimpleClick;
492 : :
493 : : EditFieldInfo();
494 : : EditFieldInfo( const EditFieldInfo& );
495 : :
496 : : SdrPage* mpSdrPage;
497 : :
498 : : public:
499 : 2503 : EditFieldInfo( Outliner* pOutl, const SvxFieldItem& rFItem, sal_uInt16 nPa, xub_StrLen nPo )
500 : 2503 : : rFldItem( rFItem )
501 : : {
502 : 2503 : pOutliner = pOutl;
503 : 2503 : nPara = nPa; nPos = nPo;
504 : 2503 : pTxtColor = 0; pFldColor = 0; bSimpleClick = sal_False;
505 : 2503 : mpSdrPage = 0;
506 : 2503 : }
507 : 2503 : ~EditFieldInfo()
508 : 2503 : {
509 : 2503 : delete pTxtColor;
510 : 2503 : delete pFldColor;
511 : 2503 : }
512 : :
513 : 5006 : Outliner* GetOutliner() const { return pOutliner; }
514 : :
515 : 2503 : const SvxFieldItem& GetField() const { return rFldItem; }
516 : :
517 : 2503 : Color* GetTxtColor() const { return pTxtColor; }
518 : 0 : void SetTxtColor( const Color& rColor )
519 : 0 : { delete pTxtColor; pTxtColor = new Color( rColor ); }
520 : :
521 : 2535 : Color* GetFldColor() const { return pFldColor; }
522 : 32 : void SetFldColor( const Color& rColor )
523 : 32 : { delete pFldColor; pFldColor = new Color( rColor ); }
524 : 0 : void ClearFldColor()
525 : 0 : { delete pFldColor; pFldColor = 0; }
526 : :
527 : 12 : sal_uInt16 GetPara() const { return nPara; }
528 : 12 : xub_StrLen GetPos() const { return nPos; }
529 : :
530 : : sal_Bool IsSimpleClick() const { return bSimpleClick; }
531 : 0 : void SetSimpleClick( sal_Bool bSimple ) { bSimpleClick = bSimple; }
532 : :
533 : : const String& GetRepresentation() const { return aRepresentation; }
534 : 2503 : String& GetRepresentation() { return aRepresentation; }
535 : 2503 : void SetRepresentation( const String& rStr ) { aRepresentation = rStr; }
536 : :
537 : 0 : void SetSdrPage( SdrPage* pPage ) { mpSdrPage = pPage; }
538 : 2491 : SdrPage* GetSdrPage() const { return mpSdrPage; }
539 : : };
540 : :
541 [ + - ][ + - ]: 1401 : struct EBulletInfo
542 : : {
543 : : sal_Bool bVisible;
544 : : sal_uInt16 nType; // see SvxNumberType
545 : : String aText;
546 : : SvxFont aFont;
547 : : Graphic aGraphic;
548 : : sal_uInt16 nParagraph;
549 : : Rectangle aBounds;
550 : :
551 [ + - ][ + - ]: 1401 : EBulletInfo() : bVisible( sal_False ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {}
[ + - ]
552 : : };
553 : :
554 : : #define OUTLINERMODE_DONTKNOW 0x0000
555 : : #define OUTLINERMODE_TEXTOBJECT 0x0001
556 : : #define OUTLINERMODE_TITLEOBJECT 0x0002
557 : : #define OUTLINERMODE_OUTLINEOBJECT 0x0003
558 : : #define OUTLINERMODE_OUTLINEVIEW 0x0004
559 : :
560 : : #define OUTLINERMODE_USERMASK 0x00FF
561 : :
562 : : #define OUTLINERMODE_SUBTITLE (0x0100|OUTLINERMODE_TEXTOBJECT)
563 : : #define OUTLINERMODE_NOTE (0x0200|OUTLINERMODE_TEXTOBJECT)
564 : :
565 : : class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
566 : : {
567 : : friend class OutlinerView;
568 : : friend class OutlinerEditEng;
569 : : friend class OutlinerParaObject;
570 : : friend class OLUndoExpand;
571 : : friend class OutlinerUndoChangeDepth;
572 : : friend class OutlinerUndoCheckPara;
573 : : friend class OutlinerUndoChangeParaFlags;
574 : :
575 : : OutlinerEditEng* pEditEngine;
576 : :
577 : : ParagraphList* pParaList;
578 : : ViewList aViewList;
579 : :
580 : : Paragraph* pHdlParagraph;
581 : : sal_uLong mnFirstSelPage;
582 : : Link aDrawPortionHdl;
583 : : Link aDrawBulletHdl;
584 : : Link aExpandHdl;
585 : : Link aParaInsertedHdl;
586 : : Link aParaRemovingHdl;
587 : : Link aDepthChangedHdl;
588 : : Link aWidthArrReqHdl;
589 : : Link aBeginMovingHdl;
590 : : Link aEndMovingHdl;
591 : : Link aIndentingPagesHdl;
592 : : Link aRemovingPagesHdl;
593 : : Link aFieldClickedHdl;
594 : : Link aCalcFieldValueHdl;
595 : : Link maPaintFirstLineHdl;
596 : : Link maBeginPasteOrDropHdl;
597 : : Link maEndPasteOrDropHdl;
598 : :
599 : : sal_Int16 nDepthChangedHdlPrevDepth;
600 : : sal_uInt16 mnDepthChangeHdlPrevFlags;
601 : : sal_Int16 nMaxDepth;
602 : : const sal_Int16 nMinDepth;
603 : : sal_uInt16 nFirstPage;
604 : :
605 : : sal_uInt16 nOutlinerMode;
606 : :
607 : : sal_Bool bIsExpanding; // Only valid in Expand/Collaps-Hdl, reset
608 : : sal_Bool bFirstParaIsEmpty;
609 : : sal_Bool bBlockInsCallback;
610 : : sal_Bool bStrippingPortions;
611 : : sal_Bool bPasting;
612 : :
613 : : sal_uLong nDummy;
614 : :
615 : : #ifdef _OUTLINER_CXX
616 : :
617 : : DECL_LINK( ParaVisibleStateChangedHdl, Paragraph* );
618 : : DECL_LINK( BeginMovingParagraphsHdl, void* );
619 : : DECL_LINK( EndMovingParagraphsHdl, MoveParagraphsInfo* );
620 : : DECL_LINK( BeginPasteOrDropHdl, PasteOrDropInfos* );
621 : : DECL_LINK( EndPasteOrDropHdl, PasteOrDropInfos* );
622 : : DECL_LINK( EditEngineNotifyHdl, EENotify* );
623 : : void ImplCheckParagraphs( sal_uInt16 nStart, sal_uInt16 nEnd );
624 : : sal_Bool ImplHasBullet( sal_uInt16 nPara ) const;
625 : : Size ImplGetBulletSize( sal_uInt16 nPara );
626 : : sal_uInt16 ImplGetNumbering( sal_uInt16 nPara, const SvxNumberFormat* pParaFmt );
627 : : void ImplCalcBulletText( sal_uInt16 nPara, sal_Bool bRecalcLevel, sal_Bool bRecalcChildren );
628 : : String ImplGetBulletText( sal_uInt16 nPara );
629 : : void ImplCheckNumBulletItem( sal_uInt16 nPara );
630 : : void ImplInitDepth( sal_uInt16 nPara, sal_Int16 nDepth, sal_Bool bCreateUndo, sal_Bool bUndoAction = sal_False );
631 : : void ImplSetLevelDependendStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pLevelStyle = NULL );
632 : :
633 : : void ImplBlockInsertionCallbacks( sal_Bool b );
634 : :
635 : : void ImplCheckStyleSheet( sal_uInt16 nPara, sal_Bool bReplaceExistingStyle );
636 : : void ImpRecalcBulletIndent( sal_uLong nPara );
637 : :
638 : : const SvxBulletItem& ImpGetBullet( sal_uLong nPara, sal_uInt16& );
639 : : void ImpFilterIndents( sal_uLong nFirstPara, sal_uLong nLastPara );
640 : : bool ImpConvertEdtToOut( sal_uInt32 nPara, EditView* pView = 0 );
641 : :
642 : : void ImpTextPasted( sal_uLong nStartPara, sal_uInt16 nCount );
643 : : long ImpCalcMaxBulletWidth( sal_uInt16 nPara, const SvxBulletItem& rBullet );
644 : : Font ImpCalcBulletFont( sal_uInt16 nPara ) const;
645 : : Rectangle ImpCalcBulletArea( sal_uInt16 nPara, sal_Bool bAdjust, sal_Bool bReturnPaperPos );
646 : : long ImpGetTextIndent( sal_uLong nPara );
647 : : sal_Bool ImpCanIndentSelectedPages( OutlinerView* pCurView );
648 : : sal_Bool ImpCanDeleteSelectedPages( OutlinerView* pCurView );
649 : : sal_Bool ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_uInt16 nFirstPage, sal_uInt16 nPages );
650 : :
651 : 564031 : sal_uInt16 ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
652 : : void ImplCheckDepth( sal_Int16& rnDepth ) const;
653 : : #endif
654 : :
655 : : protected:
656 : : void ParagraphInserted( sal_uInt16 nParagraph );
657 : : void ParagraphDeleted( sal_uInt16 nParagraph );
658 : : void ParaAttribsChanged( sal_uInt16 nParagraph );
659 : :
660 : : virtual void StyleSheetChanged( SfxStyleSheet* pStyle );
661 : :
662 : : void InvalidateBullet( Paragraph* pPara, sal_uLong nPara );
663 : : void PaintBullet( sal_uInt16 nPara, const Point& rStartPos,
664 : : const Point& rOrigin, short nOrientation,
665 : : OutputDevice* pOutDev );
666 : :
667 : : // used by OutlinerEditEng. Allows Outliner objects to provide
668 : : // bullet access to the EditEngine.
669 : : virtual const SvxNumberFormat* GetNumberFormat( sal_uInt16 nPara ) const;
670 : :
671 : : public:
672 : :
673 : : Outliner( SfxItemPool* pPool, sal_uInt16 nOutlinerMode );
674 : : virtual ~Outliner();
675 : :
676 : : void Init( sal_uInt16 nOutlinerMode );
677 : 56418 : sal_uInt16 GetMode() const { return nOutlinerMode; }
678 : :
679 : : void SetVertical( sal_Bool bVertical );
680 : : sal_Bool IsVertical() const;
681 : :
682 : : void SetFixedCellHeight( sal_Bool bUseFixedCellHeight );
683 : :
684 : : void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir );
685 : : EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const;
686 : :
687 : : sal_uInt16 GetScriptType( const ESelection& rSelection ) const;
688 : : LanguageType GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const;
689 : :
690 : : void SetAsianCompressionMode( sal_uInt16 nCompressionMode );
691 : :
692 : : void SetKernAsianPunctuation( sal_Bool bEnabled );
693 : :
694 : : void SetAddExtLeading( sal_Bool b );
695 : :
696 : : size_t InsertView( OutlinerView* pView, size_t nIndex = size_t(-1) );
697 : : OutlinerView* RemoveView( OutlinerView* pView );
698 : : OutlinerView* RemoveView( size_t nIndex );
699 : : OutlinerView* GetView( size_t nIndex ) const;
700 : : size_t GetViewCount() const;
701 : :
702 : : Paragraph* Insert( const String& rText, sal_uLong nAbsPos = CONTAINER_APPEND, sal_Int16 nDepth = 0 );
703 : : void SetText( const OutlinerParaObject& );
704 : : void AddText( const OutlinerParaObject& );
705 : : void SetText( const String& rText, Paragraph* pParagraph );
706 : : String GetText( Paragraph* pPara, sal_uLong nParaCount=1 ) const;
707 : :
708 : : OutlinerParaObject* CreateParaObject( sal_uInt16 nStartPara = 0, sal_uInt16 nParaCount = 0xFFFF ) const;
709 : :
710 : : const SfxItemSet& GetEmptyItemSet() const;
711 : :
712 : : void SetRefMapMode( const MapMode& );
713 : : MapMode GetRefMapMode() const;
714 : :
715 : : void SetBackgroundColor( const Color& rColor );
716 : : Color GetBackgroundColor() const;
717 : :
718 : 508350 : sal_Int16 GetMinDepth() const { return -1; }
719 : :
720 : : void SetMaxDepth( sal_Int16 nDepth, sal_Bool bCheckParas = sal_False );
721 : 0 : sal_Int16 GetMaxDepth() const { return nMaxDepth; }
722 : :
723 : : void SetUpdateMode( sal_Bool bUpdate );
724 : : sal_Bool GetUpdateMode() const;
725 : :
726 : : void Clear();
727 : :
728 : : void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
729 : :
730 : : sal_uLong GetParagraphCount() const;
731 : : Paragraph* GetParagraph( sal_uLong nAbsPos ) const;
732 : :
733 : : sal_Bool HasParent( Paragraph* pParagraph ) const;
734 : : sal_Bool HasChildren( Paragraph* pParagraph ) const;
735 : : sal_uLong GetChildCount( Paragraph* pParent ) const;
736 : : sal_Bool IsExpanded( Paragraph* pPara ) const;
737 : : Paragraph* GetParent( Paragraph* pParagraph ) const;
738 : : sal_uLong GetAbsPos( Paragraph* pPara );
739 : :
740 : : sal_Int16 GetDepth( sal_uLong nPara ) const;
741 : : void SetDepth( Paragraph* pParagraph, sal_Int16 nNewDepth );
742 : :
743 : : sal_Bool IsVisible( Paragraph* pPara ) const { return pPara->IsVisible(); }
744 : :
745 : : void EnableUndo( sal_Bool bEnable );
746 : : sal_Bool IsUndoEnabled() const;
747 : : void UndoActionStart( sal_uInt16 nId );
748 : : void UndoActionEnd( sal_uInt16 nId );
749 : : void InsertUndo( EditUndo* pUndo );
750 : : sal_Bool IsInUndo();
751 : :
752 : : void ClearModifyFlag();
753 : : sal_Bool IsModified() const;
754 : :
755 : 0 : Paragraph* GetHdlParagraph() const { return pHdlParagraph; }
756 : : sal_Bool IsExpanding() const { return bIsExpanding; }
757 : :
758 : : virtual void ExpandHdl();
759 : : void SetExpandHdl( const Link& rLink ) { aExpandHdl = rLink; }
760 : : Link GetExpandHdl() const { return aExpandHdl; }
761 : :
762 : : virtual void ParagraphInsertedHdl();
763 : 0 : void SetParaInsertedHdl(const Link& rLink){aParaInsertedHdl=rLink;}
764 : 0 : Link GetParaInsertedHdl() const { return aParaInsertedHdl; }
765 : :
766 : : virtual void ParagraphRemovingHdl();
767 : 0 : void SetParaRemovingHdl(const Link& rLink){aParaRemovingHdl=rLink;}
768 : 0 : Link GetParaRemovingHdl() const { return aParaRemovingHdl; }
769 : :
770 : : virtual void DepthChangedHdl();
771 : 0 : void SetDepthChangedHdl(const Link& rLink){aDepthChangedHdl=rLink;}
772 : 0 : Link GetDepthChangedHdl() const { return aDepthChangedHdl; }
773 : 0 : sal_Int16 GetPrevDepth() const { return nDepthChangedHdlPrevDepth; }
774 : 0 : sal_uInt16 GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; }
775 : :
776 : : virtual long RemovingPagesHdl( OutlinerView* );
777 : 0 : void SetRemovingPagesHdl(const Link& rLink){aRemovingPagesHdl=rLink;}
778 : : Link GetRemovingPagesHdl() const { return aRemovingPagesHdl; }
779 : : virtual long IndentingPagesHdl( OutlinerView* );
780 : 0 : void SetIndentingPagesHdl(const Link& rLink){aIndentingPagesHdl=rLink;}
781 : : Link GetIndentingPagesHdl() const { return aIndentingPagesHdl; }
782 : : // valid only in the two upper handlers
783 : 0 : sal_uInt16 GetSelPageCount() const { return nDepthChangedHdlPrevDepth; }
784 : :
785 : : // valid only in the two upper handlers
786 : : sal_uLong GetFirstSelPage() const { return mnFirstSelPage; }
787 : :
788 : 20467 : void SetCalcFieldValueHdl(const Link& rLink ) { aCalcFieldValueHdl= rLink; }
789 : 16409 : Link GetCalcFieldValueHdl() const { return aCalcFieldValueHdl; }
790 : :
791 : : void SetFieldClickedHdl(const Link& rLink ) { aFieldClickedHdl= rLink; }
792 : : Link GetFieldClickedHdl() const { return aFieldClickedHdl; }
793 : :
794 : 27392 : void SetDrawPortionHdl(const Link& rLink){aDrawPortionHdl=rLink;}
795 : : Link GetDrawPortionHdl() const { return aDrawPortionHdl; }
796 : :
797 : 27392 : void SetDrawBulletHdl(const Link& rLink){aDrawBulletHdl=rLink;}
798 : : Link GetDrawBulletHdl() const { return aDrawBulletHdl; }
799 : :
800 : 0 : void SetPaintFirstLineHdl(const Link& rLink) { maPaintFirstLineHdl = rLink; }
801 : : Link GetPaintFirstLineHdl() const { return maPaintFirstLineHdl; }
802 : :
803 : : void SetModifyHdl( const Link& rLink );
804 : : Link GetModifyHdl() const;
805 : :
806 : : void SetNotifyHdl( const Link& rLink );
807 : :
808 : : void SetStatusEventHdl( const Link& rLink );
809 : : Link GetStatusEventHdl() const;
810 : :
811 : : void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect );
812 : : void Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 );
813 : :
814 : : const Size& GetPaperSize() const;
815 : : void SetPaperSize( const Size& rSize );
816 : :
817 : 0 : void SetFirstPageNumber( sal_uInt16 n ) { nFirstPage = n; }
818 : : sal_uInt16 GetFirstPageNumber() const { return nFirstPage; }
819 : :
820 : : void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon );
821 : : void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon);
822 : : void ClearPolygon();
823 : :
824 : : const Size& GetMinAutoPaperSize() const;
825 : : void SetMinAutoPaperSize( const Size& rSz );
826 : :
827 : : const Size& GetMaxAutoPaperSize() const;
828 : : void SetMaxAutoPaperSize( const Size& rSz );
829 : :
830 : : void SetDefTab( sal_uInt16 nTab );
831 : :
832 : : sal_Bool IsFlatMode() const;
833 : : void SetFlatMode( sal_Bool bFlat );
834 : :
835 : : void EnableAutoColor( sal_Bool b );
836 : :
837 : : void ForceAutoColor( sal_Bool b );
838 : : sal_Bool IsForceAutoColor() const;
839 : :
840 : : EBulletInfo GetBulletInfo( sal_uInt16 nPara );
841 : :
842 : : void SetWordDelimiters( const String& rDelimiters );
843 : : String GetWordDelimiters() const;
844 : : String GetWord( sal_uInt16 nPara, xub_StrLen nIndex );
845 : :
846 : : void StripPortions();
847 : :
848 : : virtual void DrawingText(
849 : : const Point& rStartPos, const String& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen,
850 : : const sal_Int32* pDXArray, const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
851 : : const EEngineData::WrongSpellVector* pWrongSpellVector,
852 : : const SvxFieldData* pFieldData,
853 : : bool bEndOfLine,
854 : : bool bEndOfParagraph,
855 : : bool bEndOfBullet,
856 : : const ::com::sun::star::lang::Locale* pLocale,
857 : : const Color& rOverlineColor,
858 : : const Color& rTextLineColor);
859 : :
860 : : virtual void DrawingTab(
861 : : const Point& rStartPos, long nWidth, const String& rChar,
862 : : const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
863 : : bool bEndOfLine,
864 : : bool bEndOfParagraph,
865 : : const Color& rOverlineColor,
866 : : const Color& rTextLineColor);
867 : :
868 : : Size CalcTextSize();
869 : : Size CalcTextSizeNTP();
870 : :
871 : : void SetStyleSheetPool( SfxStyleSheetPool* pSPool );
872 : : SfxStyleSheetPool* GetStyleSheetPool();
873 : :
874 : : sal_Bool IsInSelectionMode() const;
875 : :
876 : : void SetStyleSheet( sal_uLong nPara, SfxStyleSheet* pStyle );
877 : : SfxStyleSheet* GetStyleSheet( sal_uLong nPara );
878 : :
879 : : void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& );
880 : : SfxItemSet GetParaAttribs( sal_uInt16 nPara );
881 : :
882 : : void Remove( Paragraph* pPara, sal_uLong nParaCount );
883 : : sal_Bool Expand( Paragraph* );
884 : : sal_Bool Collapse( Paragraph* );
885 : :
886 : : void SetParaFlag( Paragraph* pPara, sal_uInt16 nFlag );
887 : : bool HasParaFlag( const Paragraph* pPara, sal_uInt16 nFlag ) const;
888 : :
889 : : // Returns an array containing the widths of the Bullet Indentations
890 : : // Last value must be -1. Is deleted by the outliner.
891 : : Link GetWidthArrReqHdl() const{ return aWidthArrReqHdl; }
892 : : void SetWidthArrReqHdl(const Link& rLink){aWidthArrReqHdl=rLink; }
893 : :
894 : : void SetControlWord( sal_uLong nWord );
895 : : sal_uLong GetControlWord() const;
896 : :
897 : 0 : Link GetBeginMovingHdl() const { return aBeginMovingHdl; }
898 : 0 : void SetBeginMovingHdl(const Link& rLink) {aBeginMovingHdl=rLink;}
899 : 0 : Link GetEndMovingHdl() const {return aEndMovingHdl;}
900 : 0 : void SetEndMovingHdl( const Link& rLink){aEndMovingHdl=rLink;}
901 : :
902 : : sal_uLong GetLineCount( sal_uLong nParagraph ) const;
903 : : sal_uInt16 GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const;
904 : : sal_uLong GetLineHeight( sal_uLong nParagraph, sal_uLong nLine = 0 );
905 : :
906 : : // nFormat must be a value from the enum EETextFormat (due to CLOOKS)
907 : : sal_uLong Read( SvStream& rInput, const String& rBaseURL, sal_uInt16, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
908 : :
909 : : ::svl::IUndoManager&
910 : : GetUndoManager();
911 : :
912 : : void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel );
913 : : void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
914 : : void QuickInsertLineBreak( const ESelection& rSel );
915 : :
916 : : // Only for EditEngine mode
917 : : void QuickInsertText( const String& rText, const ESelection& rSel );
918 : : void QuickDelete( const ESelection& rSel );
919 : : void QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 );
920 : : void QuickFormatDoc( sal_Bool bFull = sal_False );
921 : :
922 : : sal_Bool UpdateFields();
923 : : void RemoveFields( sal_Bool bKeepFieldText, TypeId aType = NULL );
924 : :
925 : : virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
926 : : virtual void FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
927 : : virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
928 : :
929 : : void SetSpeller( ::com::sun::star::uno::Reference<
930 : : ::com::sun::star::linguistic2::XSpellChecker1 > &xSpeller );
931 : : ::com::sun::star::uno::Reference<
932 : : ::com::sun::star::linguistic2::XSpellChecker1 >
933 : : GetSpeller();
934 : : void SetHyphenator( ::com::sun::star::uno::Reference<
935 : : ::com::sun::star::linguistic2::XHyphenator >& xHyph );
936 : :
937 : : void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
938 : :
939 : : // Depricated
940 : : void SetDefaultLanguage( LanguageType eLang );
941 : : LanguageType GetDefaultLanguage() const;
942 : :
943 : : void CompleteOnlineSpelling();
944 : :
945 : : EESpellState HasSpellErrors();
946 : : sal_Bool HasText( const SvxSearchItem& rSearchItem );
947 : : virtual sal_Bool SpellNextDocument();
948 : :
949 : : // for text conversion
950 : : sal_Bool HasConvertibleTextPortion( LanguageType nLang );
951 : : virtual sal_Bool ConvertNextDocument();
952 : :
953 : : void SetEditTextObjectPool( SfxItemPool* pPool );
954 : : SfxItemPool* GetEditTextObjectPool() const;
955 : :
956 : : void SetRefDevice( OutputDevice* pRefDev );
957 : : OutputDevice* GetRefDevice() const;
958 : :
959 : : sal_uLong GetTextHeight() const;
960 : : sal_uLong GetTextHeight( sal_uLong nParagraph ) const;
961 : : Point GetDocPosTopLeft( sal_uLong nParagraph );
962 : : Point GetDocPos( const Point& rPaperPos ) const;
963 : : sal_Bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 );
964 : : sal_Bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder, sal_Bool* pbBuuletPos );
965 : :
966 : : void SetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 );
967 : : void GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY );
968 : : void EraseVirtualDevice();
969 : :
970 : : sal_Bool ShouldCreateBigTextObject() const;
971 : :
972 : 359961 : const EditEngine& GetEditEngine() const { return *((EditEngine*)pEditEngine); }
973 : :
974 : : // this is needed for StarOffice Api
975 : : void SetLevelDependendStyleSheet( sal_uInt16 nPara );
976 : :
977 : 23101 : sal_uInt16 GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
978 : :
979 : : void StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc);
980 : : // spell and return a sentence
981 : : bool SpellSentence(EditView& rEditView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking );
982 : : // put spell position to start of current sentence
983 : : void PutSpellingToSentenceStart( EditView& rEditView );
984 : : // applies a changed sentence
985 : : void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck );
986 : :
987 : : /** sets a link that is called at the beginning of a drag operation at an edit view */
988 : : void SetBeginDropHdl( const Link& rLink );
989 : :
990 : : /** sets a link that is called at the end of a drag operation at an edit view */
991 : : void SetEndDropHdl( const Link& rLink );
992 : :
993 : : /** sets a link that is called before a drop or paste operation. */
994 : : void SetBeginPasteOrDropHdl( const Link& rLink );
995 : : Link GetBeginPasteOrDropHdl() const { return maBeginPasteOrDropHdl; }
996 : :
997 : : /** sets a link that is called after a drop or paste operation. */
998 : : void SetEndPasteOrDropHdl( const Link& rLink );
999 : : Link GetEndPasteOrDropHdl() const { return maEndPasteOrDropHdl; }
1000 : :
1001 : : virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara );
1002 : : virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue );
1003 : :
1004 : : virtual sal_Bool IsParaIsNumberingRestart( sal_uInt16 nPara );
1005 : : virtual void SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumberingRestart );
1006 : : };
1007 : :
1008 : : #endif
1009 : :
1010 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|