xref: /aoo41x/main/sd/source/ui/view/drtxtob.cxx (revision 766ce4d0)
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 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sd.hxx"
26 
27 #include "TextObjectBar.hxx"
28 
29 #include <svx/svxids.hrc>
30 
31 #include <i18npool/mslangid.hxx>
32 #include <editeng/ulspitem.hxx>
33 #include <editeng/lspcitem.hxx>
34 #include <editeng/adjitem.hxx>
35 #include <editeng/editview.hxx>
36 #include <editeng/editeng.hxx>
37 #include <editeng/outliner.hxx>
38 #include <editeng/unolingu.hxx>
39 #include <editeng/ulspitem.hxx>
40 #include <editeng/lspcitem.hxx>
41 #include <editeng/adjitem.hxx>
42 #include <vcl/vclenum.hxx>
43 #include <sfx2/app.hxx>
44 #include <svl/whiter.hxx>
45 #include <svl/itempool.hxx>
46 #include <svl/stritem.hxx>
47 #include <svl/style.hxx>
48 #include <svl/languageoptions.hxx>
49 #include <sfx2/tplpitem.hxx>
50 #include <editeng/escpitem.hxx>
51 #include <svx/svdoutl.hxx>
52 #include <svl/intitem.hxx>
53 #include <editeng/scripttypeitem.hxx>
54 #include <editeng/outlobj.hxx>
55 #include <editeng/writingmodeitem.hxx>
56 #include <editeng/frmdiritem.hxx>
57 
58 
59 #include <sfx2/objface.hxx>
60 
61 #include "app.hrc"
62 #include "glob.hrc"
63 #include "res_bmp.hrc"
64 
65 #include "eetext.hxx"
66 
67 #include "drawdoc.hxx"
68 #include "DrawViewShell.hxx"
69 #include "OutlineViewShell.hxx"
70 #include "ViewShellBase.hxx"
71 #include "ToolBarManager.hxx"
72 #include "futempl.hxx"
73 #include "sdresid.hxx"
74 #include "Window.hxx"
75 #include "OutlineView.hxx"
76 
77 
78 using namespace sd;
79 using namespace ::com::sun::star;
80 
81 #define TextObjectBar
82 #include "sdslots.hxx"
83 
84 namespace sd {
85 
86 /*************************************************************************
87 |*
88 |* Standardinterface deklarieren (Die Slotmap darf nicht leer sein, also
89 |* tragen wir etwas ein, was hier (hoffentlich) nie vorkommt).
90 |*
91 \************************************************************************/
92 
93 
94 SFX_IMPL_INTERFACE( TextObjectBar, SfxShell, SdResId(STR_TEXTOBJECTBARSHELL) )
95 {
96 }
97 
98 TYPEINIT1( TextObjectBar, SfxShell );
99 
100 /*************************************************************************
101 |*
102 |* Standard-Konstruktor
103 |*
104 \************************************************************************/
105 
106 TextObjectBar::TextObjectBar (
107     ViewShell* pSdViewSh,
108     SfxItemPool& rItemPool,
109     ::sd::View* pSdView )
110     : SfxShell(pSdViewSh->GetViewShell()),
111       mpViewShell( pSdViewSh ),
112       mpView( pSdView )
113 {
114 	SetPool(&rItemPool);
115 
116 	if( mpView )
117 	{
118 		OutlineView* pOutlinerView = dynamic_cast< OutlineView* >( mpView );
119 		if( pOutlinerView )
120 		{
121 			SetUndoManager(&pOutlinerView->GetOutliner()->GetUndoManager());
122 		}
123 		else
124 		{
125 			SdDrawDocument* pDoc = mpView->GetDoc();
126 			if( pDoc )
127 			{
128 				DrawDocShell* pDocShell = pDoc->GetDocSh();
129 				if( pDocShell )
130 				{
131 					SetUndoManager(pDocShell->GetUndoManager());
132 					DrawViewShell* pDrawViewShell = dynamic_cast< DrawViewShell* >( pSdViewSh );
133 					if ( pDrawViewShell )
134 						SetRepeatTarget(pSdView);
135 				}
136 			}
137 		}
138 	}
139 
140 	SetName( String( RTL_CONSTASCII_USTRINGPARAM( "TextObjectBar" )));
141 
142 	// SetHelpId( SD_IF_SDDRAWTEXTOBJECTBAR );
143 }
144 
145 /*************************************************************************
146 |*
147 |* Destruktor
148 |*
149 \************************************************************************/
150 
151 TextObjectBar::~TextObjectBar()
152 {
153 	SetRepeatTarget(NULL);
154 }
155 
156 /*************************************************************************
157 |*
158 |* Status der Attribut-Items
159 |*
160 \************************************************************************/
161 
162 void TextObjectBar::GetAttrState( SfxItemSet& rSet )
163 {
164 	SfxWhichIter	    aIter( rSet );
165 	sal_uInt16			    nWhich = aIter.FirstWhich();
166 	sal_Bool			    bTemplate = sal_False;
167 	SfxItemSet 		    aAttrSet( mpView->GetDoc()->GetPool() );
168     SvtLanguageOptions  aLangOpt;
169     sal_Bool            bDisableParagraphTextDirection = !aLangOpt.IsCTLFontEnabled();
170     sal_Bool			bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled();
171 
172 	mpView->GetAttributes( aAttrSet );
173 
174 	while ( nWhich )
175 	{
176 		sal_uInt16 nSlotId = SfxItemPool::IsWhich(nWhich)
177 			? GetPool().GetSlotId(nWhich)
178 			: nWhich;
179 
180 		switch ( nSlotId )
181 		{
182 			case SID_ATTR_CHAR_FONT:
183             case SID_ATTR_CHAR_FONTHEIGHT:
184             case SID_ATTR_CHAR_WEIGHT:
185             case SID_ATTR_CHAR_POSTURE:
186 		case SID_ATTR_CHAR_SHADOWED:
187             case SID_ATTR_CHAR_STRIKEOUT:
188             {
189                 SvxScriptSetItem aSetItem( nSlotId, GetPool() );
190                 aSetItem.GetItemSet().Put( aAttrSet, sal_False );
191 
192 				sal_uInt16 nScriptType = mpView->GetScriptType();
193 
194 				if( (nSlotId == SID_ATTR_CHAR_FONT) || (nSlotId == SID_ATTR_CHAR_FONTHEIGHT) )
195 				{
196 					// #42732# input language should be preferred over
197 					// current cursor position to detect script type
198 					OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
199 
200 					if (mpView->ISA(OutlineView))
201 					{
202 						pOLV = static_cast<OutlineView*>(mpView)->GetViewByWindow(
203 							mpViewShell->GetActiveWindow());
204 					}
205 
206 					if(pOLV && !pOLV->GetSelection().HasRange())
207 					{
208 						if( mpViewShell && mpViewShell->GetViewShell() && mpViewShell->GetViewShell()->GetWindow() )
209 						{
210 							LanguageType nInputLang = mpViewShell->GetViewShell()->GetWindow()->GetInputLanguage();
211 							if(nInputLang != LANGUAGE_DONTKNOW && nInputLang != LANGUAGE_SYSTEM)
212 								nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nInputLang );
213 						}
214 					}
215 				}
216 
217                 const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
218                 if( pI )
219                 	aAttrSet.Put( *pI, nWhich );
220                 else
221                     aAttrSet.InvalidateItem( nWhich );
222             }
223             break;
224 
225 
226 			case SID_STYLE_APPLY:
227 			case SID_STYLE_FAMILY2:
228 			{
229 				SfxStyleSheet* pStyleSheet = mpView->GetStyleSheetFromMarked();
230 				if( pStyleSheet )
231 					rSet.Put( SfxTemplateItem( nWhich, pStyleSheet->GetName() ) );
232 				else
233 				{
234 					rSet.Put( SfxTemplateItem( nWhich, String() ) );
235 				}
236 				bTemplate = sal_True;
237 			}
238 			break;
239 
240 			case SID_OUTLINE_LEFT:
241 			case SID_OUTLINE_RIGHT:
242 			case SID_OUTLINE_UP:
243 			case SID_OUTLINE_DOWN:
244 			{
245 				sal_Bool bDisableLeft     = sal_True;
246 				sal_Bool bDisableRight    = sal_True;
247 				sal_Bool bDisableUp       = sal_True;
248 				sal_Bool bDisableDown     = sal_True;
249 				OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
250 
251 				if (mpView->ISA(OutlineView))
252 				{
253 					pOLV = static_cast<OutlineView*>(mpView)->GetViewByWindow(
254                         mpViewShell->GetActiveWindow());
255 				}
256 
257 				sal_Bool bOutlineViewSh = mpViewShell->ISA(OutlineViewShell);
258 
259 				if (pOLV &&
260 					( pOLV->GetOutliner()->GetMode() == OUTLINERMODE_OUTLINEOBJECT || bOutlineViewSh ) )
261 				{
262 					// Outliner im Gliederungsmodus
263 					::Outliner* pOutl = pOLV->GetOutliner();
264 					List* pList = pOLV->CreateSelectionList();
265 					Paragraph* pPara = (Paragraph*) pList->First();
266 
267 					// #96539# find out if we are a OutlineView
268 					sal_Bool bIsOutlineView(OUTLINERMODE_OUTLINEVIEW == pOLV->GetOutliner()->GetMode());
269 
270 					// #96539# This is ONLY for OutlineViews
271 					if(bIsOutlineView)
272 					{
273 						// #96250# and #78665#
274 						// allow move up if position is 2 or greater OR it
275 						// is a title object (and thus depth==1)
276 						if(pOutl->GetAbsPos(pPara) > 1 || ( pOutl->HasParaFlag(pPara,PARAFLAG_ISPAGE) && pOutl->GetAbsPos(pPara) > 0 ) )
277 						{
278 							// Nicht ganz oben
279 							bDisableUp = sal_False;
280 						}
281 					}
282 					else
283 					{
284 						// #96539# old behaviour for OUTLINERMODE_OUTLINEOBJECT
285 						if(pOutl->GetAbsPos(pPara) > 0)
286 						{
287 							// Nicht ganz oben
288 							bDisableUp = sal_False;
289 						}
290 					}
291 
292 					while (pPara)
293 					{
294 						sal_Int16 nDepth = pOutl->GetDepth( (sal_uInt16) pOutl->GetAbsPos( pPara ) );
295 
296 						if (nDepth > 0 || (bOutlineViewSh && (nDepth <= 0) && !pOutl->HasParaFlag( pPara, PARAFLAG_ISPAGE )) )
297 						{
298 							// Nicht minimale Tiefe
299 							bDisableLeft = sal_False;
300 						}
301 
302 						if( (nDepth < pOLV->GetOutliner()->GetMaxDepth() && ( !bOutlineViewSh || pOutl->GetAbsPos(pPara) != 0 )) ||
303                             (bOutlineViewSh && (nDepth <= 0) && pOutl->HasParaFlag( pPara, PARAFLAG_ISPAGE ) && pOutl->GetAbsPos(pPara) != 0) )
304 						{
305 							// Nicht maximale Tiefe und nicht ganz oben
306 							bDisableRight = sal_False;
307 						}
308 
309 						pPara = static_cast<Paragraph*>( pList->Next() );
310 					}
311 
312 					if ( ( pOutl->GetAbsPos((Paragraph*) pList->Last()) < pOutl->GetParagraphCount() - 1 ) &&
313 						 ( pOutl->GetParagraphCount() > 1 || !bOutlineViewSh) )
314 					{
315 						// Nicht letzter Absatz
316 						bDisableDown = sal_False;
317 					}
318 
319 					// #96250# and #78665#
320 					// disable when first para and 2nd is not a title
321 					pPara = static_cast< Paragraph* >( pList->First() );
322 					if(!bDisableDown && bIsOutlineView
323 						&& pPara
324 						&& 0 == pOutl->GetAbsPos(pPara)
325 						&& pOutl->GetParagraphCount() > 1
326 						&& !pOutl->HasParaFlag( pOutl->GetParagraph(1), PARAFLAG_ISPAGE ) )
327 					{
328 						// Needs to be disabled
329 						bDisableDown = sal_True;
330 					}
331 
332 					delete pList;
333 				}
334 
335 				if (bDisableLeft)
336 					rSet.DisableItem(SID_OUTLINE_LEFT);
337 				if (bDisableRight)
338 					rSet.DisableItem(SID_OUTLINE_RIGHT);
339 				if (bDisableUp)
340 					rSet.DisableItem(SID_OUTLINE_UP);
341 				if (bDisableDown)
342 					rSet.DisableItem(SID_OUTLINE_DOWN);
343 			}
344 			break;
345 
346 			case SID_TEXTDIRECTION_LEFT_TO_RIGHT:
347 			case SID_TEXTDIRECTION_TOP_TO_BOTTOM:
348 			{
349 				if ( bDisableVerticalText )
350 				{
351 					rSet.DisableItem( SID_TEXTDIRECTION_LEFT_TO_RIGHT );
352 					rSet.DisableItem( SID_TEXTDIRECTION_TOP_TO_BOTTOM );
353 				}
354 				else
355 				{
356 					sal_Bool bLeftToRight = sal_True;
357 
358 					SdrOutliner* pOutl = mpView->GetTextEditOutliner();
359 					if( pOutl )
360 					{
361 						if( pOutl->IsVertical() )
362 							bLeftToRight = sal_False;
363 					}
364 					else
365 						bLeftToRight = ( (const SvxWritingModeItem&) aAttrSet.Get( SDRATTR_TEXTDIRECTION ) ).GetValue() == com::sun::star::text::WritingMode_LR_TB;
366 
367 					rSet.Put( SfxBoolItem( SID_TEXTDIRECTION_LEFT_TO_RIGHT, bLeftToRight ) );
368                     rSet.Put( SfxBoolItem( SID_TEXTDIRECTION_TOP_TO_BOTTOM, !bLeftToRight ) );
369 
370 					if( !bLeftToRight )
371 						bDisableParagraphTextDirection = sal_True;
372 				}
373 			}
374 			break;
375 
376             case SID_GROW_FONT_SIZE:
377             case SID_SHRINK_FONT_SIZE:
378             {
379                 // todo
380             }
381             break;
382 
383             case SID_THES:
384             {
385 				if( mpView && mpView->GetTextEditOutlinerView() )
386 				{
387 					EditView & rEditView = mpView->GetTextEditOutlinerView()->GetEditView();;
388 					String          aStatusVal;
389 					LanguageType    nLang = LANGUAGE_NONE;
390 					bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, rEditView );
391 					rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
392 
393 					// disable "Thesaurus" context menu entry if there is nothing to look up
394 					lang::Locale aLocale( SvxCreateLocale( nLang ) );
395 					uno::Reference< linguistic2::XThesaurus > xThes( LinguMgr::GetThesaurus() );
396 					if (!bIsLookUpWord ||
397 						!xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale ))
398 						rSet.DisableItem( SID_THES );
399 				}
400 				else
401 				{
402 					rSet.DisableItem( SID_THES );
403 				}
404                 //! avoid puting the same item as SfxBoolItem at the end of this function
405                 nSlotId = 0;
406             }
407             break;
408 
409 			default:
410 			break;
411 		}
412 
413 		nWhich = aIter.NextWhich();
414 	}
415 
416 	rSet.Put( aAttrSet, sal_False ); // <- sal_False, damit DontCare-Status uebernommen wird
417 
418 
419 	// die sind im Gliederungsmodus disabled
420 	if (!mpViewShell->ISA(DrawViewShell))
421 	{
422 		rSet.DisableItem( SID_ATTR_PARA_ADJUST_LEFT );
423 		rSet.DisableItem( SID_ATTR_PARA_ADJUST_RIGHT );
424 		rSet.DisableItem( SID_ATTR_PARA_ADJUST_CENTER );
425 		rSet.DisableItem( SID_ATTR_PARA_ADJUST_BLOCK );
426 		rSet.DisableItem( SID_ATTR_PARA_LINESPACE_10 );
427 		rSet.DisableItem( SID_ATTR_PARA_LINESPACE_15 );
428 		rSet.DisableItem( SID_ATTR_PARA_LINESPACE_20 );
429 		rSet.DisableItem( SID_PARASPACE_INCREASE );
430 		rSet.DisableItem( SID_PARASPACE_DECREASE );
431 		rSet.DisableItem( SID_TEXTDIRECTION_TOP_TO_BOTTOM );
432 		rSet.DisableItem( SID_TEXTDIRECTION_LEFT_TO_RIGHT );
433         rSet.DisableItem( SID_ATTR_PARA_LEFT_TO_RIGHT );
434         rSet.DisableItem( SID_ATTR_PARA_RIGHT_TO_LEFT );
435 	}
436 	else
437 	{
438 		// Absatzabstand
439 		OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
440 		if( pOLV )
441 		{
442 			ESelection aSel = pOLV->GetSelection();
443 			aSel.Adjust();
444 			sal_uLong nStartPara = aSel.nStartPara;
445 			sal_uLong nEndPara = aSel.nEndPara;
446 			if( !aSel.HasRange() )
447 			{
448 				nStartPara = 0;
449 				nEndPara = pOLV->GetOutliner()->GetParagraphCount() - 1;
450 			}
451 			long nUpper = 0L;
452 			for( sal_uLong nPara = nStartPara; nPara <= nEndPara; nPara++ )
453 			{
454 				const SfxItemSet& rItems = pOLV->GetOutliner()->GetParaAttribs( (sal_uInt16)nPara );
455                 const SvxULSpaceItem& rItem = (const SvxULSpaceItem&) rItems.Get( EE_PARA_ULSPACE );
456 				nUpper = Max( nUpper, (long)rItem.GetUpper() );
457 			}
458 			if( nUpper == 0L )
459 				rSet.DisableItem( SID_PARASPACE_DECREASE );
460 		}
461 		else
462 		{
463 			// Wird zur Zeit nie disabled !
464 			//rSet.DisableItem( SID_PARASPACE_INCREASE );
465 			//rSet.DisableItem( SID_PARASPACE_DECREASE );
466 		}
467 
468 		// Absatzausrichtung
469         SvxAdjust eAdj = ( (const SvxAdjustItem&) aAttrSet.Get( EE_PARA_JUST ) ).GetAdjust();
470 		switch( eAdj )
471 		{
472 			case SVX_ADJUST_LEFT:
473 				rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, sal_True ) );
474 			break;
475 			case SVX_ADJUST_CENTER:
476 				rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, sal_True ) );
477 			break;
478 			case SVX_ADJUST_RIGHT:
479 				rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, sal_True ) );
480 			break;
481 			case SVX_ADJUST_BLOCK:
482 				rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, sal_True ) );
483 			break;
484 			default:
485 			break;
486 		}
487 
488 		Invalidate(SID_ATTR_PARA_ADJUST_LEFT);
489 		Invalidate(SID_ATTR_PARA_ADJUST_CENTER);
490 		Invalidate(SID_ATTR_PARA_ADJUST_RIGHT);
491 		Invalidate(SID_ATTR_PARA_ADJUST_BLOCK);
492 		Invalidate(SID_ATTR_PARA_LINESPACE);
493 		Invalidate(SID_ATTR_PARA_ULSPACE);
494 
495         // paragraph text direction
496         if( bDisableParagraphTextDirection )
497         {
498             rSet.DisableItem( SID_ATTR_PARA_LEFT_TO_RIGHT );
499             rSet.DisableItem( SID_ATTR_PARA_RIGHT_TO_LEFT );
500         }
501         else
502         {
503             switch( ( ( (SvxFrameDirectionItem&) aAttrSet.Get( EE_PARA_WRITINGDIR ) ) ).GetValue() )
504             {
505                 case FRMDIR_VERT_TOP_LEFT:
506                 case FRMDIR_VERT_TOP_RIGHT:
507                 {
508                     rSet.DisableItem( SID_ATTR_PARA_LEFT_TO_RIGHT );
509                     rSet.DisableItem( SID_ATTR_PARA_RIGHT_TO_LEFT );
510                 }
511                 break;
512 
513                 case FRMDIR_HORI_LEFT_TOP:
514 				    rSet.Put( SfxBoolItem( SID_ATTR_PARA_LEFT_TO_RIGHT, sal_True ) );
515 				    rSet.Put( SfxBoolItem( SID_ATTR_PARA_RIGHT_TO_LEFT, sal_False ) );
516                 break;
517 
518                 case FRMDIR_HORI_RIGHT_TOP:
519 				    rSet.Put( SfxBoolItem( SID_ATTR_PARA_LEFT_TO_RIGHT, sal_False ) );
520 				    rSet.Put( SfxBoolItem( SID_ATTR_PARA_RIGHT_TO_LEFT, sal_True ) );
521                 break;
522 
523 				// #107865#
524 				// The case for the superordinate object is missing.
525 				case FRMDIR_ENVIRONMENT:
526 				{
527 					SdDrawDocument* pDoc = mpView->GetDoc();
528 					::com::sun::star::text::WritingMode eMode = pDoc->GetDefaultWritingMode();
529 					sal_Bool bIsLeftToRight(sal_False);
530 
531 					if(::com::sun::star::text::WritingMode_LR_TB == eMode
532 						|| ::com::sun::star::text::WritingMode_TB_RL == eMode)
533 					{
534 						bIsLeftToRight = sal_True;
535 					}
536 
537 					rSet.Put( SfxBoolItem( SID_ATTR_PARA_LEFT_TO_RIGHT, bIsLeftToRight ) );
538 					rSet.Put( SfxBoolItem( SID_ATTR_PARA_RIGHT_TO_LEFT, !bIsLeftToRight ) );
539 				}
540 				break;
541             }
542         }
543 
544 /* #i35937#
545 		if (aAttrSet.GetItemState(EE_PARA_BULLETSTATE) == SFX_ITEM_ON)
546 		{
547 			SfxUInt16Item aBulletState((const SfxUInt16Item&) aAttrSet.Get(EE_PARA_BULLETSTATE));
548 
549 			if (aBulletState.GetValue() != 0)
550 			{
551 				rSet.Put(SfxBoolItem(FN_NUM_BULLET_ON, sal_True));
552 			}
553 			else
554 			{
555 				rSet.Put(SfxBoolItem(FN_NUM_BULLET_ON, sal_False));
556 			}
557 		}
558 */
559 		SvxLRSpaceItem aLRSpace = ( (const SvxLRSpaceItem&) aAttrSet.Get( EE_PARA_LRSPACE ) );
560 		aLRSpace.SetWhich(SID_ATTR_PARA_LRSPACE);
561 		rSet.Put(aLRSpace);
562 		Invalidate(SID_ATTR_PARA_LRSPACE);
563 		//Added by xuxu
564 		SfxItemState eState = aAttrSet.GetItemState( EE_PARA_LRSPACE );
565 		if ( eState == SFX_ITEM_DONTCARE )
566 		{
567 			rSet.InvalidateItem(EE_PARA_LRSPACE);
568 			rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE);
569 		}
570 		sal_uInt16 nLineSpace = (sal_uInt16) ( (const SvxLineSpacingItem&) aAttrSet.
571                             Get( EE_PARA_SBL ) ).GetPropLineSpace();
572 		switch( nLineSpace )
573 		{
574 			case 100:
575 				rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10, sal_True ) );
576 			break;
577 			case 150:
578 				rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15, sal_True ) );
579 			break;
580 			case 200:
581 				rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20, sal_True ) );
582 			break;
583 		}
584 	}
585 
586 	// Ausrichtung (hoch/tief) wird auch im Gliederungsmodus gebraucht
587 	SvxEscapement eEsc = (SvxEscapement ) ( (const SvxEscapementItem&)
588                     aAttrSet.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
589 
590 	if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT )
591 		rSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, sal_True ) );
592 	else if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT )
593 		rSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, sal_True ) );
594 }
595 
596 /*************************************************************************
597 |*
598 |* Command event
599 |*
600 \************************************************************************/
601 
602 void TextObjectBar::Command( const CommandEvent& )
603 {
604 }
605 
606 
607 } // end of namespace sd
608