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 : :
30 : : #include <svl/intitem.hxx>
31 : : #include <editeng/editeng.hxx>
32 : : #include <editeng/editview.hxx>
33 : : #include <editeng/editdata.hxx>
34 : : #include <editeng/eerdll.hxx>
35 : : #include <editeng/lrspitem.hxx>
36 : : #include <editeng/fhgtitem.hxx>
37 : : #include <svl/style.hxx>
38 : : #include <vcl/mapmod.hxx>
39 : :
40 : : #include <editeng/forbiddencharacterstable.hxx>
41 : :
42 : : #define _OUTLINER_CXX
43 : :
44 : : #include <editeng/outliner.hxx>
45 : : #include <paralist.hxx>
46 : : #include <editeng/outlobj.hxx>
47 : : #include <outleeng.hxx>
48 : : #include <outlundo.hxx>
49 : : #include <editeng/eeitem.hxx>
50 : : #include <editeng/editstat.hxx>
51 : :
52 : : DBG_NAMEEX(Outliner)
53 : :
54 : : using namespace ::com::sun::star::uno;
55 : : using namespace ::com::sun::star::linguistic2;
56 : :
57 : : // ======================================================================
58 : : // ====================== Simple pass-through =======================
59 : : // ======================================================================
60 : :
61 : 507022 : void Outliner::SetUpdateMode( sal_Bool bUpdate )
62 : : {
63 : : DBG_CHKTHIS(Outliner,0);
64 : 507022 : pEditEngine->SetUpdateMode( bUpdate );
65 : 507022 : }
66 : :
67 : :
68 : 1272 : sal_Bool Outliner::GetUpdateMode() const
69 : : {
70 : : DBG_CHKTHIS(Outliner,0);
71 : 1272 : return pEditEngine->GetUpdateMode();
72 : : }
73 : :
74 : 3091 : const SfxItemSet& Outliner::GetEmptyItemSet() const
75 : : {
76 : : DBG_CHKTHIS(Outliner,0);
77 : 3091 : return pEditEngine->GetEmptyItemSet();
78 : : }
79 : :
80 : 253456 : void Outliner::EnableUndo( sal_Bool bEnable )
81 : : {
82 : : DBG_CHKTHIS(Outliner,0);
83 : 253456 : pEditEngine->EnableUndo( bEnable );
84 : 253456 : }
85 : :
86 : 574 : sal_Bool Outliner::IsUndoEnabled() const
87 : : {
88 : : DBG_CHKTHIS(Outliner,0);
89 : 574 : return pEditEngine->IsUndoEnabled();
90 : : }
91 : :
92 : 0 : MapMode Outliner::GetRefMapMode() const
93 : : {
94 : : DBG_CHKTHIS(Outliner,0);
95 : 0 : return pEditEngine->GetRefMapMode();
96 : : }
97 : :
98 : 15372 : void Outliner::SetRefMapMode( const MapMode& rMMode )
99 : : {
100 : : DBG_CHKTHIS(Outliner,0);
101 : 15372 : pEditEngine->SetRefMapMode( rMMode );
102 : 15372 : }
103 : :
104 : 51122 : void Outliner::SetBackgroundColor( const Color& rColor )
105 : : {
106 : : DBG_CHKTHIS(Outliner,0);
107 : 51122 : pEditEngine->SetBackgroundColor( rColor );
108 : 51122 : }
109 : :
110 : 153247 : Color Outliner::GetBackgroundColor() const
111 : : {
112 : : DBG_CHKTHIS(Outliner,0);
113 : 153247 : return pEditEngine->GetBackgroundColor();
114 : : }
115 : :
116 : :
117 : 18 : void Outliner::ClearModifyFlag()
118 : : {
119 : : DBG_CHKTHIS(Outliner,0);
120 : 18 : pEditEngine->ClearModifyFlag();
121 : 18 : }
122 : :
123 : 0 : sal_Bool Outliner::IsModified() const
124 : : {
125 : : DBG_CHKTHIS(Outliner,0);
126 : 0 : return pEditEngine->IsModified();
127 : : }
128 : :
129 : 73685 : sal_uLong Outliner::GetTextHeight() const
130 : : {
131 : : DBG_CHKTHIS(Outliner,0);
132 : 73685 : return pEditEngine->GetTextHeight();
133 : : }
134 : :
135 : 72 : void Outliner::SetModifyHdl( const Link& rLink )
136 : : {
137 : : DBG_CHKTHIS(Outliner,0);
138 : 72 : pEditEngine->SetModifyHdl( rLink );
139 : 72 : }
140 : :
141 : 18 : Link Outliner::GetModifyHdl() const
142 : : {
143 : : DBG_CHKTHIS(Outliner,0);
144 : 18 : return pEditEngine->GetModifyHdl();
145 : : }
146 : :
147 : 7143 : void Outliner::SetNotifyHdl( const Link& rLink )
148 : : {
149 : : DBG_CHKTHIS(Outliner,0);
150 : 7143 : pEditEngine->aOutlinerNotifyHdl = rLink;
151 : :
152 [ - + ]: 7143 : if ( rLink.IsSet() )
153 [ # # ]: 0 : pEditEngine->SetNotifyHdl( LINK( this, Outliner, EditEngineNotifyHdl ) );
154 : : else
155 [ + - ]: 7143 : pEditEngine->SetNotifyHdl( Link() );
156 : :
157 : 7143 : }
158 : :
159 : 418 : void Outliner::SetStatusEventHdl( const Link& rLink )
160 : : {
161 : : DBG_CHKTHIS(Outliner,0);
162 : 418 : pEditEngine->SetStatusEventHdl( rLink );
163 : 418 : }
164 : :
165 : 209 : Link Outliner::GetStatusEventHdl() const
166 : : {
167 : : DBG_CHKTHIS(Outliner,0);
168 : 209 : return pEditEngine->GetStatusEventHdl();
169 : : }
170 : :
171 : 30322 : void Outliner::SetDefTab( sal_uInt16 nTab )
172 : : {
173 : : DBG_CHKTHIS(Outliner,0);
174 : 30322 : pEditEngine->SetDefTab( nTab );
175 : 30322 : }
176 : :
177 : 0 : sal_Bool Outliner::IsFlatMode() const
178 : : {
179 : : DBG_CHKTHIS(Outliner,0);
180 : 0 : return pEditEngine->IsFlatMode();
181 : : }
182 : :
183 : 0 : sal_Bool Outliner::UpdateFields()
184 : : {
185 : : DBG_CHKTHIS(Outliner,0);
186 : 0 : return pEditEngine->UpdateFields();
187 : : }
188 : :
189 : 0 : void Outliner::RemoveFields( sal_Bool bKeepFieldText, TypeId aType )
190 : : {
191 : : DBG_CHKTHIS(Outliner,0);
192 : 0 : pEditEngine->RemoveFields( bKeepFieldText, aType );
193 : 0 : }
194 : :
195 : 0 : void Outliner::SetWordDelimiters( const String& rDelimiters )
196 : : {
197 : : DBG_CHKTHIS(Outliner,0);
198 : 0 : pEditEngine->SetWordDelimiters( rDelimiters );
199 : 0 : }
200 : :
201 : 0 : String Outliner::GetWordDelimiters() const
202 : : {
203 : : DBG_CHKTHIS(Outliner,0);
204 : 0 : return pEditEngine->GetWordDelimiters();
205 : : }
206 : :
207 : 0 : String Outliner::GetWord( sal_uInt16 nPara, sal_uInt16 nIndex )
208 : : {
209 : : DBG_CHKTHIS(Outliner,0);
210 : 0 : return pEditEngine->GetWord( nPara, nIndex );
211 : : }
212 : :
213 : 0 : void Outliner::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect )
214 : : {
215 : : DBG_CHKTHIS(Outliner,0);
216 : 0 : pEditEngine->Draw( pOutDev, rOutRect );
217 : 0 : }
218 : :
219 : 0 : void Outliner::Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation )
220 : : {
221 : : DBG_CHKTHIS(Outliner,0);
222 : 0 : pEditEngine->Draw( pOutDev, rStartPos, nOrientation );
223 : 0 : }
224 : :
225 : 499522 : void Outliner::SetPaperSize( const Size& rSize )
226 : : {
227 : : DBG_CHKTHIS(Outliner,0);
228 : 499522 : pEditEngine->SetPaperSize( rSize );
229 : 499522 : }
230 : :
231 : 14863 : const Size& Outliner::GetPaperSize() const
232 : : {
233 : : DBG_CHKTHIS(Outliner,0);
234 : 14863 : return pEditEngine->GetPaperSize();
235 : : }
236 : :
237 : 0 : void Outliner::SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon )
238 : : {
239 : : DBG_CHKTHIS( Outliner, 0 );
240 : 0 : pEditEngine->SetPolygon( rPolyPolygon );
241 : 0 : }
242 : :
243 : 0 : void Outliner::SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon)
244 : : {
245 : : DBG_CHKTHIS( Outliner, 0 );
246 : 0 : pEditEngine->SetPolygon( rPolyPolygon, pLinePolyPolygon);
247 : 0 : }
248 : :
249 : 353510 : void Outliner::ClearPolygon()
250 : : {
251 : : DBG_CHKTHIS( Outliner, 0 );
252 : 353510 : pEditEngine->ClearPolygon();
253 : 353510 : }
254 : :
255 : 0 : const Size& Outliner::GetMinAutoPaperSize() const
256 : : {
257 : : DBG_CHKTHIS(Outliner,0);
258 : 0 : return pEditEngine->GetMinAutoPaperSize();
259 : : }
260 : :
261 : 369487 : void Outliner::SetMinAutoPaperSize( const Size& rSz )
262 : : {
263 : : DBG_CHKTHIS(Outliner,0);
264 : 369487 : pEditEngine->SetMinAutoPaperSize( rSz );
265 : 369487 : }
266 : :
267 : 0 : const Size& Outliner::GetMaxAutoPaperSize() const
268 : : {
269 : : DBG_CHKTHIS(Outliner,0);
270 : 0 : return pEditEngine->GetMaxAutoPaperSize();
271 : : }
272 : :
273 : 380894 : void Outliner::SetMaxAutoPaperSize( const Size& rSz )
274 : : {
275 : : DBG_CHKTHIS(Outliner,0);
276 : 380894 : pEditEngine->SetMaxAutoPaperSize( rSz );
277 : 380894 : }
278 : :
279 : 0 : sal_Bool Outliner::IsExpanded( Paragraph* pPara ) const
280 : : {
281 : : DBG_CHKTHIS(Outliner,0);
282 : 0 : return pParaList->HasVisibleChildren( pPara );
283 : : }
284 : :
285 : 0 : Paragraph* Outliner::GetParent( Paragraph* pParagraph ) const
286 : : {
287 : : DBG_CHKTHIS(Outliner,0);
288 : 0 : return pParaList->GetParent( pParagraph );
289 : : }
290 : :
291 : 0 : sal_uLong Outliner::GetChildCount( Paragraph* pParent ) const
292 : : {
293 : : DBG_CHKTHIS(Outliner,0);
294 : 0 : return pParaList->GetChildCount( pParent );
295 : : }
296 : :
297 : 56473 : Size Outliner::CalcTextSize()
298 : : {
299 : : DBG_CHKTHIS(Outliner,0);
300 : 56473 : return Size(pEditEngine->CalcTextWidth(),pEditEngine->GetTextHeight());
301 : : }
302 : :
303 : 62 : Size Outliner::CalcTextSizeNTP()
304 : : {
305 : : DBG_CHKTHIS(Outliner,0);
306 : 62 : return Size(pEditEngine->CalcTextWidth(),pEditEngine->GetTextHeightNTP());
307 : : }
308 : :
309 : 24516 : void Outliner::SetStyleSheetPool( SfxStyleSheetPool* pSPool )
310 : : {
311 : : DBG_CHKTHIS(Outliner,0);
312 : 24516 : pEditEngine->SetStyleSheetPool( pSPool );
313 : 24516 : }
314 : :
315 : 12 : SfxStyleSheetPool* Outliner::GetStyleSheetPool()
316 : : {
317 : : DBG_CHKTHIS(Outliner,0);
318 : 12 : return pEditEngine->GetStyleSheetPool();
319 : : }
320 : :
321 : 129 : SfxStyleSheet* Outliner::GetStyleSheet( sal_uLong nPara )
322 : : {
323 : : DBG_CHKTHIS(Outliner,0);
324 : 129 : return pEditEngine->GetStyleSheet( (sal_uInt16)nPara );
325 : : }
326 : :
327 : 0 : sal_Bool Outliner::IsInSelectionMode() const
328 : : {
329 : : DBG_CHKTHIS(Outliner,0);
330 : 0 : return pEditEngine->IsInSelectionMode();
331 : : }
332 : :
333 : 382357 : void Outliner::SetControlWord( sal_uLong nWord )
334 : : {
335 : : DBG_CHKTHIS(Outliner,0);
336 : 382357 : pEditEngine->SetControlWord( nWord );
337 : 382357 : }
338 : :
339 : 396650 : sal_uLong Outliner::GetControlWord() const
340 : : {
341 : : DBG_CHKTHIS(Outliner,0);
342 : 396650 : return pEditEngine->GetControlWord();
343 : : }
344 : :
345 : 43009 : void Outliner::SetAsianCompressionMode( sal_uInt16 n )
346 : : {
347 : : DBG_CHKTHIS(Outliner,0);
348 : 43009 : pEditEngine->SetAsianCompressionMode( n );
349 : 43009 : }
350 : :
351 : 43009 : void Outliner::SetKernAsianPunctuation( sal_Bool b )
352 : : {
353 : : DBG_CHKTHIS(Outliner,0);
354 : 43009 : pEditEngine->SetKernAsianPunctuation( b );
355 : 43009 : }
356 : :
357 : 42987 : void Outliner::SetAddExtLeading( sal_Bool bExtLeading )
358 : : {
359 : : DBG_CHKTHIS(Outliner,0);
360 : 42987 : pEditEngine->SetAddExtLeading( bExtLeading );
361 : 42987 : }
362 : :
363 : 429623 : void Outliner::UndoActionStart( sal_uInt16 nId )
364 : : {
365 : : DBG_CHKTHIS(Outliner,0);
366 : 429623 : pEditEngine->UndoActionStart( nId );
367 : 429623 : }
368 : :
369 : 429623 : void Outliner::UndoActionEnd( sal_uInt16 nId )
370 : : {
371 : : DBG_CHKTHIS(Outliner,0);
372 : 429623 : pEditEngine->UndoActionEnd( nId );
373 : 429623 : }
374 : :
375 : 52 : void Outliner::InsertUndo( EditUndo* pUndo )
376 : : {
377 : : DBG_CHKTHIS(Outliner,0);
378 : 52 : pEditEngine->GetUndoManager().AddUndoAction( pUndo, sal_False );
379 : 52 : }
380 : :
381 : 534657 : sal_Bool Outliner::IsInUndo()
382 : : {
383 : : DBG_CHKTHIS(Outliner,0);
384 : 534657 : return pEditEngine->IsInUndo();
385 : : }
386 : :
387 : 0 : sal_uLong Outliner::GetLineCount( sal_uLong nParagraph ) const
388 : : {
389 : : DBG_CHKTHIS(Outliner,0);
390 : 0 : return pEditEngine->GetLineCount( (sal_uInt16)nParagraph );
391 : : }
392 : :
393 : 0 : sal_uInt16 Outliner::GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const
394 : : {
395 : : DBG_CHKTHIS(Outliner,0);
396 : 0 : return pEditEngine->GetLineLen( (sal_uInt16)nParagraph, nLine );
397 : : }
398 : :
399 : 0 : sal_uLong Outliner::GetLineHeight( sal_uLong nParagraph, sal_uLong nLine )
400 : : {
401 : : DBG_CHKTHIS(Outliner,0);
402 : 0 : return pEditEngine->GetLineHeight( (sal_uInt16)nParagraph, (sal_uInt16)nLine );
403 : : }
404 : :
405 : 25478 : void Outliner::QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich )
406 : : {
407 : : DBG_CHKTHIS(Outliner,0);
408 : 25478 : pEditEngine->QuickRemoveCharAttribs( nPara, nWhich );
409 : 25478 : }
410 : :
411 : 0 : EESpellState Outliner::HasSpellErrors()
412 : : {
413 : : DBG_CHKTHIS(Outliner,0);
414 : 0 : return pEditEngine->HasSpellErrors();
415 : : }
416 : :
417 : 0 : sal_Bool Outliner::HasConvertibleTextPortion( LanguageType nLang )
418 : : {
419 : : DBG_CHKTHIS(Outliner,0);
420 : 0 : return pEditEngine->HasConvertibleTextPortion( nLang );
421 : : }
422 : :
423 : 0 : sal_Bool Outliner::ConvertNextDocument()
424 : : {
425 : : DBG_CHKTHIS(Outliner,0);
426 : 0 : return sal_False;
427 : : }
428 : :
429 : 4214 : void Outliner::SetDefaultLanguage( LanguageType eLang )
430 : : {
431 : : DBG_CHKTHIS(Outliner,0);
432 : 4214 : pEditEngine->SetDefaultLanguage( eLang );
433 : 4214 : }
434 : :
435 : 0 : LanguageType Outliner::GetDefaultLanguage() const
436 : : {
437 : : DBG_CHKTHIS(Outliner,0);
438 : 0 : return pEditEngine->GetDefaultLanguage();
439 : : }
440 : :
441 : 245 : void Outliner::CompleteOnlineSpelling()
442 : : {
443 : : DBG_CHKTHIS(Outliner,0);
444 : 245 : pEditEngine->CompleteOnlineSpelling();
445 : 245 : }
446 : :
447 : 0 : sal_Bool Outliner::HasText( const SvxSearchItem& rSearchItem )
448 : : {
449 : : DBG_CHKTHIS(Outliner,0);
450 : 0 : return pEditEngine->HasText( rSearchItem );
451 : : }
452 : :
453 : 29843 : void Outliner::SetEditTextObjectPool( SfxItemPool* pPool )
454 : : {
455 : : DBG_CHKTHIS(Outliner,0);
456 : 29843 : pEditEngine->SetEditTextObjectPool( pPool );
457 : 29843 : }
458 : :
459 : 678 : SfxItemPool* Outliner::GetEditTextObjectPool() const
460 : : {
461 : : DBG_CHKTHIS(Outliner,0);
462 : 678 : return pEditEngine->GetEditTextObjectPool();
463 : : }
464 : :
465 : 0 : sal_Bool Outliner::SpellNextDocument()
466 : : {
467 : : DBG_CHKTHIS(Outliner,0);
468 : 0 : return sal_False;
469 : : }
470 : :
471 : :
472 : 2368 : void Outliner::SetSpeller( Reference< XSpellChecker1 > &xSpeller )
473 : : {
474 : : DBG_CHKTHIS(Outliner,0);
475 : 2368 : pEditEngine->SetSpeller( xSpeller );
476 : 2368 : }
477 : 0 : Reference< XSpellChecker1 > Outliner::GetSpeller()
478 : : {
479 : : DBG_CHKTHIS(Outliner,0);
480 : 0 : return pEditEngine->GetSpeller();
481 : : }
482 : :
483 : 43141 : void Outliner::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars )
484 : : {
485 : : DBG_CHKTHIS(Outliner,0);
486 [ + - ]: 43141 : pEditEngine->SetForbiddenCharsTable( xForbiddenChars );
487 : 43141 : }
488 : :
489 : 25361 : void Outliner::SetHyphenator( Reference< XHyphenator >& xHyph )
490 : : {
491 : : DBG_CHKTHIS(Outliner,0);
492 : 25361 : pEditEngine->SetHyphenator( xHyph );
493 : 25361 : }
494 : :
495 : 56 : OutputDevice* Outliner::GetRefDevice() const
496 : : {
497 : : DBG_CHKTHIS(Outliner,0);
498 : 56 : return pEditEngine->GetRefDevice();
499 : : }
500 : :
501 : 0 : sal_uLong Outliner::GetTextHeight( sal_uLong nParagraph ) const
502 : : {
503 : : DBG_CHKTHIS(Outliner,0);
504 : 0 : return pEditEngine->GetTextHeight((sal_uInt16)nParagraph );
505 : : }
506 : :
507 : 0 : Point Outliner::GetDocPos( const Point& rPaperPos ) const
508 : : {
509 : : DBG_CHKTHIS(Outliner,0);
510 : 0 : return pEditEngine->GetDocPos( rPaperPos );
511 : : }
512 : :
513 : 0 : Point Outliner::GetDocPosTopLeft( sal_uLong nParagraph )
514 : : {
515 : : DBG_CHKTHIS(Outliner,0);
516 : 0 : return pEditEngine->GetDocPosTopLeft( (sal_uInt16)nParagraph );
517 : : }
518 : :
519 : 0 : sal_Bool Outliner::IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder )
520 : : {
521 : 0 : return IsTextPos( rPaperPos, nBorder, NULL );
522 : : }
523 : :
524 : 0 : sal_Bool Outliner::IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder, sal_Bool* pbBullet )
525 : : {
526 : : DBG_CHKTHIS(Outliner,0);
527 [ # # ]: 0 : if ( pbBullet)
528 : 0 : *pbBullet = sal_False;
529 : 0 : sal_Bool bTextPos = pEditEngine->IsTextPos( rPaperPos, nBorder );
530 [ # # ]: 0 : if ( !bTextPos )
531 : : {
532 [ # # ]: 0 : Point aDocPos = GetDocPos( rPaperPos );
533 [ # # ]: 0 : sal_uInt16 nPara = pEditEngine->FindParagraph( aDocPos.Y() );
534 [ # # ][ # # ]: 0 : if ( ( nPara != EE_PARA_NOT_FOUND ) && ImplHasBullet( nPara ) )
[ # # ][ # # ]
535 : : {
536 [ # # ]: 0 : Rectangle aBulArea = ImpCalcBulletArea( nPara, sal_True, sal_True );
537 [ # # ][ # # ]: 0 : if ( aBulArea.IsInside( rPaperPos ) )
538 : : {
539 : 0 : bTextPos = sal_True;
540 [ # # ]: 0 : if ( pbBullet)
541 : 0 : *pbBullet = sal_True;
542 : : }
543 : : }
544 : : }
545 : :
546 : 0 : return bTextPos;
547 : : }
548 : :
549 : 996 : void Outliner::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel )
550 : : {
551 : : DBG_CHKTHIS(Outliner,0);
552 : 996 : pEditEngine->QuickSetAttribs( rSet, rSel );
553 : 996 : }
554 : :
555 : 23083 : void Outliner::QuickInsertText( const XubString& rText, const ESelection& rSel )
556 : : {
557 : 23083 : bFirstParaIsEmpty = sal_False;
558 : 23083 : pEditEngine->QuickInsertText( rText, rSel );
559 : 23083 : }
560 : :
561 : 451 : void Outliner::QuickDelete( const ESelection& rSel )
562 : : {
563 : 451 : bFirstParaIsEmpty = sal_False;
564 : 451 : pEditEngine->QuickDelete( rSel );
565 : 451 : }
566 : :
567 : 695 : void Outliner::QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel )
568 : : {
569 : : DBG_CHKTHIS(Outliner,0);
570 : 695 : bFirstParaIsEmpty = sal_False;
571 : 695 : pEditEngine->QuickInsertField( rFld, rSel );
572 : 695 : }
573 : :
574 : 8 : void Outliner::QuickInsertLineBreak( const ESelection& rSel )
575 : : {
576 : : DBG_CHKTHIS(Outliner,0);
577 : 8 : bFirstParaIsEmpty = sal_False;
578 : 8 : pEditEngine->QuickInsertLineBreak( rSel );
579 : 8 : }
580 : :
581 : 0 : void Outliner::QuickFormatDoc( sal_Bool bFull )
582 : : {
583 : : DBG_CHKTHIS(Outliner,0);
584 : 0 : pEditEngine->QuickFormatDoc( bFull );
585 : 0 : }
586 : :
587 : 353541 : void Outliner::SetGlobalCharStretching( sal_uInt16 nX, sal_uInt16 nY )
588 : : {
589 : : DBG_CHKTHIS(Outliner,0);
590 : :
591 : : // reset bullet size
592 : 353541 : sal_uInt16 nParagraphs = (sal_uInt16)pParaList->GetParagraphCount();
593 [ + + ]: 707268 : for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ )
594 : : {
595 : 353727 : Paragraph* pPara = pParaList->GetParagraph( nPara );
596 [ + - ]: 353727 : if ( pPara )
597 : 353727 : pPara->aBulSize.Width() = -1;
598 : : }
599 : :
600 : 353541 : pEditEngine->SetGlobalCharStretching( nX, nY );
601 : 353541 : }
602 : :
603 : 3127 : void Outliner::GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY )
604 : : {
605 : : DBG_CHKTHIS(Outliner,0);
606 : 3127 : pEditEngine->GetGlobalCharStretching( rX, rY );
607 : 3127 : }
608 : :
609 : 6656 : void Outliner::EraseVirtualDevice()
610 : : {
611 : : DBG_CHKTHIS(Outliner,0);
612 : 6656 : pEditEngine->EraseVirtualDevice();
613 : 6656 : }
614 : :
615 : 0 : sal_Bool Outliner::ShouldCreateBigTextObject() const
616 : : {
617 : : DBG_CHKTHIS(Outliner,0);
618 : 0 : return pEditEngine->ShouldCreateBigTextObject();
619 : : }
620 : :
621 : 8373 : void Outliner::SetVertical( sal_Bool b )
622 : : {
623 : : DBG_CHKTHIS(Outliner,0);
624 : 8373 : pEditEngine->SetVertical( b );
625 : 8373 : }
626 : :
627 : 3065 : sal_Bool Outliner::IsVertical() const
628 : : {
629 : : DBG_CHKTHIS(Outliner,0);
630 : 3065 : return pEditEngine->IsVertical();
631 : : }
632 : :
633 : 96755 : void Outliner::SetFixedCellHeight( sal_Bool bUseFixedCellHeight )
634 : : {
635 : : DBG_CHKTHIS(Outliner,0);
636 : 96755 : pEditEngine->SetFixedCellHeight( bUseFixedCellHeight );
637 : 96755 : }
638 : :
639 : 52287 : void Outliner::SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir )
640 : : {
641 : : DBG_CHKTHIS(Outliner,0);
642 : 52287 : pEditEngine->SetDefaultHorizontalTextDirection( eHTextDir );
643 : 52287 : }
644 : :
645 : 24756 : EEHorizontalTextDirection Outliner::GetDefaultHorizontalTextDirection() const
646 : : {
647 : 24756 : return pEditEngine->GetDefaultHorizontalTextDirection();
648 : : }
649 : :
650 : 2645 : sal_uInt16 Outliner::GetScriptType( const ESelection& rSelection ) const
651 : : {
652 : : DBG_CHKTHIS(Outliner,0);
653 : 2645 : return pEditEngine->GetScriptType( rSelection );
654 : : }
655 : :
656 : 12 : LanguageType Outliner::GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const
657 : : {
658 : : DBG_CHKTHIS(Outliner,0);
659 : 12 : return pEditEngine->GetLanguage( nPara, nPos );
660 : : }
661 : :
662 : 76 : void Outliner::RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich )
663 : : {
664 : : DBG_CHKTHIS(Outliner,0);
665 : 76 : pEditEngine->RemoveAttribs( rSelection, bRemoveParaAttribs, nWhich );
666 : 76 : }
667 : :
668 : 2757 : void Outliner::EnableAutoColor( sal_Bool b )
669 : : {
670 : : DBG_CHKTHIS(Outliner,0);
671 : 2757 : pEditEngine->EnableAutoColor( b );
672 : 2757 : }
673 : :
674 : 0 : void Outliner::ForceAutoColor( sal_Bool b )
675 : : {
676 : : DBG_CHKTHIS(Outliner,0);
677 : 0 : pEditEngine->ForceAutoColor( b );
678 : 0 : }
679 : :
680 : 189 : sal_Bool Outliner::IsForceAutoColor() const
681 : : {
682 : : DBG_CHKTHIS(Outliner,0);
683 : 189 : return pEditEngine->IsForceAutoColor();
684 : : }
685 : :
686 : 0 : void Outliner::StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc)
687 : : {
688 : 0 : pEditEngine->StartSpelling(rEditView, bMultipleDoc);
689 : 0 : }
690 : :
691 : 0 : bool Outliner::SpellSentence(EditView& rEditView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking )
692 : : {
693 : 0 : return pEditEngine->SpellSentence(rEditView, rToFill, bIsGrammarChecking );
694 : : }
695 : :
696 : 0 : void Outliner::PutSpellingToSentenceStart( EditView& rEditView )
697 : : {
698 : 0 : pEditEngine->PutSpellingToSentenceStart( rEditView );
699 : 0 : }
700 : :
701 : 0 : void Outliner::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck )
702 : : {
703 : 0 : pEditEngine->ApplyChangedSentence( rEditView, rNewPortions, bRecheck );
704 : 0 : }
705 : :
706 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|