1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <TextObjectBar.hxx>
22 #include <svx/svxids.hrc>
24 #include <com/sun/star/linguistic2/XThesaurus.hpp>
26 #include <editeng/eeitem.hxx>
27 #include <editeng/udlnitem.hxx>
28 #include <editeng/ulspitem.hxx>
29 #include <editeng/lspcitem.hxx>
30 #include <editeng/adjustitem.hxx>
31 #include <editeng/cmapitem.hxx>
32 #include <editeng/editview.hxx>
33 #include <editeng/outliner.hxx>
34 #include <editeng/unolingu.hxx>
35 #include <editeng/kernitem.hxx>
36 #include <editeng/editund2.hxx>
37 #include <svl/whiter.hxx>
38 #include <svl/itempool.hxx>
39 #include <svl/stritem.hxx>
40 #include <svl/style.hxx>
41 #include <svl/languageoptions.hxx>
42 #include <svl/cjkoptions.hxx>
43 #include <svl/ctloptions.hxx>
44 #include <sfx2/tplpitem.hxx>
45 #include <editeng/escapementitem.hxx>
46 #include <svx/svdoutl.hxx>
47 #include <editeng/scripttypeitem.hxx>
48 #include <editeng/writingmodeitem.hxx>
49 #include <editeng/frmdiritem.hxx>
50 #include <editeng/fhgtitem.hxx>
51 #include <o3tl/temporary.hxx>
53 #include <sfx2/objface.hxx>
55 #include <drawdoc.hxx>
56 #include <DrawDocShell.hxx>
57 #include <DrawViewShell.hxx>
58 #include <OutlineViewShell.hxx>
59 #include <NotesPanelViewShell.hxx>
61 #include <OutlineView.hxx>
62 #include <Outliner.hxx>
64 #define ShellClass_TextObjectBar
66 #include <sdslots.hxx>
68 using namespace ::com::sun::star
;
73 * Declare default interface (Slotmap must not be empty, therefore enter
74 * something that (hopefully) never occurs.
76 SFX_IMPL_INTERFACE(TextObjectBar
, SfxShell
)
78 void TextObjectBar::InitInterface_Impl()
83 TextObjectBar::TextObjectBar (
85 SfxItemPool
& rItemPool
,
87 : SfxShell(pSdViewSh
->GetViewShell()),
88 mpViewShell( pSdViewSh
),
95 OutlineView
* pOutlinerView
= dynamic_cast< OutlineView
* >( mpView
);
98 SetUndoManager(&pOutlinerView
->GetOutliner().GetUndoManager());
102 DrawDocShell
* pDocShell
= mpView
->GetDoc().GetDocSh();
105 SetUndoManager(pDocShell
->GetUndoManager());
106 DrawViewShell
* pDrawViewShell
= dynamic_cast< DrawViewShell
* >( pSdViewSh
);
107 if ( pDrawViewShell
)
108 SetRepeatTarget(pSdView
);
113 SetName( u
"TextObjectBar"_ustr
);
115 // SetHelpId( SD_IF_SDDRAWTEXTOBJECTBAR );
118 TextObjectBar::~TextObjectBar()
120 SetRepeatTarget(nullptr);
123 void TextObjectBar::GetCharState( SfxItemSet
& rSet
)
125 GetCharStateImpl(mpViewShell
, mpView
, rSet
);
128 void TextObjectBar::GetCharStateImpl(ViewShell
* mpViewShell
, ::sd::View
* mpView
, SfxItemSet
& rSet
)
130 SfxItemSet
aCharAttrSet( mpView
->GetDoc().GetPool() );
131 mpView
->GetAttributes( aCharAttrSet
);
133 SfxItemSetFixed
<EE_ITEMS_START
,EE_ITEMS_END
> aNewAttr( mpViewShell
->GetPool() );
135 aNewAttr
.Put(aCharAttrSet
, false);
136 rSet
.Put(aNewAttr
, false);
138 SvxKerningItem aKern
= aCharAttrSet
.Get( EE_CHAR_KERNING
);
139 //aKern.SetWhich(SID_ATTR_CHAR_KERNING);
142 SfxItemState eState
= aCharAttrSet
.GetItemState( EE_CHAR_KERNING
);
143 if ( eState
== SfxItemState::INVALID
)
145 rSet
.InvalidateItem(EE_CHAR_KERNING
);
149 void TextObjectBar::GetAttrState( SfxItemSet
& rSet
)
151 GetAttrStateImpl(mpViewShell
, mpView
, rSet
, this);
155 * Status of attribute items.
157 void TextObjectBar::GetAttrStateImpl(ViewShell
* mpViewShell
, ::sd::View
* mpView
, SfxItemSet
& rSet
, SfxShell
* pTextObjectBar
)
159 SfxWhichIter
aIter( rSet
);
160 sal_uInt16 nWhich
= aIter
.FirstWhich();
161 SfxItemSet
aAttrSet( mpView
->GetDoc().GetPool() );
162 bool bDisableParagraphTextDirection
= !SvtCTLOptions::IsCTLFontEnabled();
163 bool bDisableVerticalText
= !SvtCJKOptions::IsVerticalTextEnabled();
165 mpView
->GetAttributes( aAttrSet
);
169 sal_uInt16 nSlotId
= SfxItemPool::IsWhich(nWhich
)
170 ? mpView
->GetDoc().GetPool().GetSlotId(nWhich
)
175 case SID_ATTR_CHAR_FONT
:
176 case SID_ATTR_CHAR_FONTHEIGHT
:
177 case SID_ATTR_CHAR_WEIGHT
:
178 case SID_ATTR_CHAR_POSTURE
:
179 case SID_ATTR_CHAR_SHADOWED
:
180 case SID_ATTR_CHAR_STRIKEOUT
:
181 case SID_ATTR_CHAR_CASEMAP
:
183 double stretchY
= 1.0;
184 SvxScriptSetItem
aSetItem( nSlotId
, mpView
->GetDoc().GetPool() );
185 aSetItem
.GetItemSet().Put( aAttrSet
, false );
187 SvtScriptType nScriptType
= mpView
->GetScriptType();
189 if( (nSlotId
== SID_ATTR_CHAR_FONT
) || (nSlotId
== SID_ATTR_CHAR_FONTHEIGHT
) )
191 // input language should be preferred over
192 // current cursor position to detect script type
193 OutlinerView
* pOLV
= mpView
->GetTextEditOutlinerView();
194 SdrOutliner
*pOutliner
= mpView
->GetTextEditOutliner();
198 if (OutlineView
* pOView
= dynamic_cast<OutlineView
*>(mpView
))
199 pOLV
= pOView
->GetViewByWindow(mpViewShell
->GetActiveWindow());
202 stretchY
= pOutliner
->getScalingParameters().fFontY
;
204 if(pOLV
&& !pOLV
->GetSelection().HasRange())
206 if (mpViewShell
->GetViewShell() && mpViewShell
->GetViewShell()->GetWindow())
208 LanguageType nInputLang
= mpViewShell
->GetViewShell()->GetWindow()->GetInputLanguage();
209 if(nInputLang
!= LANGUAGE_DONTKNOW
&& nInputLang
!= LANGUAGE_SYSTEM
)
210 nScriptType
= SvtLanguageOptions::GetScriptTypeOfLanguage( nInputLang
);
215 const SfxPoolItem
* pI
= aSetItem
.GetItemOfScript( nScriptType
);
218 if( nSlotId
== SID_ATTR_CHAR_FONTHEIGHT
)
220 SvxFontHeightItem aFontItem
= dynamic_cast<const SvxFontHeightItem
&>(*pI
);
221 aFontItem
.SetHeight(aFontItem
.GetHeight() * stretchY
, 100, aFontItem
.GetPropUnit());
222 aFontItem
.SetWhich(nWhich
);
223 aAttrSet
.Put( aFontItem
);
227 aAttrSet
.Put( pI
->CloneSetWhich(nWhich
) );
232 aAttrSet
.InvalidateItem( nWhich
);
237 case SID_STYLE_APPLY
:
238 case SID_STYLE_FAMILY2
:
240 SfxStyleSheet
* pStyleSheet
= mpView
->GetStyleSheetFromMarked();
242 rSet
.Put( SfxTemplateItem( nWhich
, pStyleSheet
->GetName() ) );
245 rSet
.Put( SfxTemplateItem( nWhich
, OUString() ) );
250 case SID_OUTLINE_LEFT
:
251 case SID_OUTLINE_RIGHT
:
253 case SID_OUTLINE_DOWN
:
255 bool bDisableLeft
= true;
256 bool bDisableRight
= true;
257 bool bDisableUp
= true;
258 bool bDisableDown
= true;
260 //fdo#78151 it doesn't make sense to promote or demote outline levels in master view.
261 const DrawViewShell
* pDrawViewShell
= dynamic_cast< DrawViewShell
* >(mpViewShell
);
262 const bool bInMasterView
= pDrawViewShell
&& pDrawViewShell
->GetEditMode() == EditMode::MasterPage
;
266 OutlinerView
* pOLV
= mpView
->GetTextEditOutlinerView();
268 if (OutlineView
* pOView
= dynamic_cast<OutlineView
*>(mpView
))
269 pOLV
= pOView
->GetViewByWindow(mpViewShell
->GetActiveWindow());
271 bool bOutlineViewSh
= dynamic_cast< const OutlineViewShell
*>( mpViewShell
) != nullptr;
275 // Outliner at outline-mode
276 ::Outliner
* pOutl
= pOLV
->GetOutliner();
278 std::vector
<Paragraph
*> aSelList
;
279 pOLV
->CreateSelectionList(aSelList
);
280 Paragraph
* pPara
= aSelList
.empty() ? nullptr : *(aSelList
.begin());
282 // find out if we are an OutlineView
283 bool bIsOutlineView(OutlinerMode::OutlineView
== pOLV
->GetOutliner()->GetOutlinerMode());
285 // This is ONLY for OutlineViews
288 // allow move up if position is 2 or greater OR it
289 // is a title object (and thus depth==1)
290 if(pOutl
->GetAbsPos(pPara
) > 1 || ( ::Outliner::HasParaFlag(pPara
,ParaFlag::ISPAGE
) && pOutl
->GetAbsPos(pPara
) > 0 ) )
298 // old behaviour for OutlinerMode::OutlineObject
299 if(pOutl
->GetAbsPos(pPara
) > 0)
306 for (const auto& rpItem
: aSelList
)
310 sal_Int16 nDepth
= pOutl
->GetDepth( pOutl
->GetAbsPos( pPara
) );
312 if (nDepth
> 0 || (bOutlineViewSh
&& (nDepth
<= 0) && !::Outliner::HasParaFlag( pPara
, ParaFlag::ISPAGE
)) )
315 bDisableLeft
= false;
318 if( (nDepth
< pOLV
->GetOutliner()->GetMaxDepth() && ( !bOutlineViewSh
|| pOutl
->GetAbsPos(pPara
) != 0 )) ||
319 (bOutlineViewSh
&& (nDepth
<= 0) && ::Outliner::HasParaFlag( pPara
, ParaFlag::ISPAGE
) && pOutl
->GetAbsPos(pPara
) != 0) )
321 // not maximum depth and not at top
322 bDisableRight
= false;
326 if ( ( pOutl
->GetAbsPos(pPara
) < pOutl
->GetParagraphCount() - 1 ) &&
327 ( pOutl
->GetParagraphCount() > 1 || !bOutlineViewSh
) )
329 // not last paragraph
330 bDisableDown
= false;
333 // disable when first para and 2nd is not a title
334 pPara
= aSelList
.empty() ? nullptr : *(aSelList
.begin());
336 if(!bDisableDown
&& bIsOutlineView
338 && 0 == pOutl
->GetAbsPos(pPara
)
339 && pOutl
->GetParagraphCount() > 1
340 && !::Outliner::HasParaFlag( pOutl
->GetParagraph(1), ParaFlag::ISPAGE
) )
342 // Needs to be disabled
349 rSet
.DisableItem(SID_OUTLINE_LEFT
);
351 rSet
.DisableItem(SID_OUTLINE_RIGHT
);
353 rSet
.DisableItem(SID_OUTLINE_UP
);
355 rSet
.DisableItem(SID_OUTLINE_DOWN
);
359 case SID_TEXTDIRECTION_LEFT_TO_RIGHT
:
360 case SID_TEXTDIRECTION_TOP_TO_BOTTOM
:
362 if ( bDisableVerticalText
)
364 rSet
.DisableItem( SID_TEXTDIRECTION_LEFT_TO_RIGHT
);
365 rSet
.DisableItem( SID_TEXTDIRECTION_TOP_TO_BOTTOM
);
369 bool bLeftToRight
= true;
371 SdrOutliner
* pOutl
= mpView
->GetTextEditOutliner();
374 if( pOutl
->IsVertical() )
375 bLeftToRight
= false;
378 bLeftToRight
= aAttrSet
.Get( SDRATTR_TEXTDIRECTION
).GetValue() == css::text::WritingMode_LR_TB
;
380 rSet
.Put( SfxBoolItem( SID_TEXTDIRECTION_LEFT_TO_RIGHT
, bLeftToRight
) );
381 rSet
.Put( SfxBoolItem( SID_TEXTDIRECTION_TOP_TO_BOTTOM
, !bLeftToRight
) );
384 bDisableParagraphTextDirection
= true;
389 case SID_ULINE_VAL_NONE
:
390 case SID_ULINE_VAL_SINGLE
:
391 case SID_ULINE_VAL_DOUBLE
:
392 case SID_ULINE_VAL_DOTTED
:
394 if( aAttrSet
.GetItemState( EE_CHAR_UNDERLINE
) >= SfxItemState::DEFAULT
)
396 FontLineStyle eLineStyle
= aAttrSet
.Get(EE_CHAR_UNDERLINE
).GetLineStyle();
400 case SID_ULINE_VAL_NONE
:
401 rSet
.Put(SfxBoolItem(nSlotId
, eLineStyle
== LINESTYLE_NONE
));
403 case SID_ULINE_VAL_SINGLE
:
404 rSet
.Put(SfxBoolItem(nSlotId
, eLineStyle
== LINESTYLE_SINGLE
));
406 case SID_ULINE_VAL_DOUBLE
:
407 rSet
.Put(SfxBoolItem(nSlotId
, eLineStyle
== LINESTYLE_DOUBLE
));
409 case SID_ULINE_VAL_DOTTED
:
410 rSet
.Put(SfxBoolItem(nSlotId
, eLineStyle
== LINESTYLE_DOTTED
));
417 case SID_GROW_FONT_SIZE
:
418 case SID_SHRINK_FONT_SIZE
:
426 if (mpView
->GetTextEditOutlinerView())
428 EditView
& rEditView
= mpView
->GetTextEditOutlinerView()->GetEditView();
430 LanguageType nLang
= LANGUAGE_NONE
;
431 bool bIsLookUpWord
= GetStatusValueForThesaurusFromContext( aStatusVal
, nLang
, rEditView
);
432 rSet
.Put( SfxStringItem( SID_THES
, aStatusVal
) );
434 // disable "Thesaurus" context menu entry if there is nothing to look up
435 uno::Reference
< linguistic2::XThesaurus
> xThes( LinguMgr::GetThesaurus() );
436 if (!bIsLookUpWord
||
437 !xThes
.is() || nLang
== LANGUAGE_NONE
|| !xThes
->hasLocale( LanguageTag( nLang
). getLocale() ))
438 rSet
.DisableItem( SID_THES
);
442 rSet
.DisableItem( SID_THES
);
451 nWhich
= aIter
.NextWhich();
454 rSet
.Put( aAttrSet
, false ); // <- sal_False, so DontCare-Status gets acquired
456 // these are disabled in outline-mode
458 || !(dynamic_cast<const DrawViewShell
*>(mpViewShell
)
459 || dynamic_cast<const NotesPanelViewShell
*>(mpViewShell
)))
461 rSet
.DisableItem( SID_ATTR_PARA_ADJUST_LEFT
);
462 rSet
.DisableItem( SID_ATTR_PARA_ADJUST_RIGHT
);
463 rSet
.DisableItem( SID_ATTR_PARA_ADJUST_CENTER
);
464 rSet
.DisableItem( SID_ATTR_PARA_ADJUST_BLOCK
);
465 rSet
.DisableItem( SID_ATTR_PARA_LINESPACE_10
);
466 rSet
.DisableItem( SID_ATTR_PARA_LINESPACE_15
);
467 rSet
.DisableItem( SID_ATTR_PARA_LINESPACE_20
);
468 rSet
.DisableItem( SID_DEC_INDENT
);
469 rSet
.DisableItem( SID_INC_INDENT
);
470 rSet
.DisableItem( SID_PARASPACE_INCREASE
);
471 rSet
.DisableItem( SID_PARASPACE_DECREASE
);
472 rSet
.DisableItem( SID_TEXTDIRECTION_TOP_TO_BOTTOM
);
473 rSet
.DisableItem( SID_TEXTDIRECTION_LEFT_TO_RIGHT
);
474 rSet
.DisableItem( SID_ATTR_PARA_LEFT_TO_RIGHT
);
475 rSet
.DisableItem( SID_ATTR_PARA_RIGHT_TO_LEFT
);
480 OutlinerView
* pOLV
= mpView
->GetTextEditOutlinerView();
483 ESelection aSel
= pOLV
->GetSelection();
485 sal_Int32 nStartPara
= aSel
.start
.nPara
;
486 sal_Int32 nEndPara
= aSel
.end
.nPara
;
487 if( !aSel
.HasRange() )
490 nEndPara
= pOLV
->GetOutliner()->GetParagraphCount() - 1;
492 ::tools::Long nUpper
= 0;
494 for( sal_Int32 nPara
= nStartPara
; nPara
<= nEndPara
; nPara
++ )
496 const SfxItemSet
& rItems
= pOLV
->GetOutliner()->GetParaAttribs( nPara
);
497 const SvxULSpaceItem
& rItem
= rItems
.Get( EE_PARA_ULSPACE
);
498 nUpper
= std::max( nUpper
, static_cast<::tools::Long
>(rItem
.GetUpper()) );
501 rSet
.DisableItem( SID_PARASPACE_DECREASE
);
505 // never disabled at the moment!
506 //rSet.DisableItem( SID_PARASPACE_INCREASE );
507 //rSet.DisableItem( SID_PARASPACE_DECREASE );
510 // paragraph justification
511 const SvxLRSpaceItem
& aLR
= aAttrSet
.Get( EE_PARA_LRSPACE
);
513 SvxAdjust eAdj
= aAttrSet
.Get( EE_PARA_JUST
).GetAdjust();
516 case SvxAdjust::Left
:
517 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT
, true ) );
518 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER
, false ) );
519 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT
, false ) );
520 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK
, false ) );
522 case SvxAdjust::Center
:
523 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER
, true ) );
524 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT
, false ) );
525 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT
, false ) );
526 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK
, false ) );
528 case SvxAdjust::Right
:
529 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT
, true ) );
530 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER
, false ) );
531 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT
, false ) );
532 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK
, false ) );
534 case SvxAdjust::Block
:
535 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK
, true ) );
536 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER
, false ) );
537 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT
, false ) );
538 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT
, false ) );
546 pTextObjectBar
->Invalidate(SID_ATTR_PARA_ADJUST_LEFT
);
547 pTextObjectBar
->Invalidate(SID_ATTR_PARA_ADJUST_CENTER
);
548 pTextObjectBar
->Invalidate(SID_ATTR_PARA_ADJUST_RIGHT
);
549 pTextObjectBar
->Invalidate(SID_ATTR_PARA_ADJUST_BLOCK
);
550 pTextObjectBar
->Invalidate(SID_ATTR_PARA_LINESPACE
);
551 pTextObjectBar
->Invalidate(SID_ATTR_PARA_ULSPACE
);
554 // paragraph text direction
555 if( bDisableParagraphTextDirection
)
557 rSet
.DisableItem( SID_ATTR_PARA_LEFT_TO_RIGHT
);
558 rSet
.DisableItem( SID_ATTR_PARA_RIGHT_TO_LEFT
);
562 switch( aAttrSet
.Get( EE_PARA_WRITINGDIR
).GetValue() )
564 case SvxFrameDirection::Vertical_LR_TB
:
565 case SvxFrameDirection::Vertical_RL_TB
:
567 rSet
.DisableItem( SID_ATTR_PARA_LEFT_TO_RIGHT
);
568 rSet
.DisableItem( SID_ATTR_PARA_RIGHT_TO_LEFT
);
572 case SvxFrameDirection::Horizontal_LR_TB
:
573 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_LEFT_TO_RIGHT
, true ) );
574 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_RIGHT_TO_LEFT
, false ) );
577 case SvxFrameDirection::Horizontal_RL_TB
:
578 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_LEFT_TO_RIGHT
, false ) );
579 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_RIGHT_TO_LEFT
, true ) );
582 // The case for the superordinate object is missing.
583 case SvxFrameDirection::Environment
:
585 SdDrawDocument
& rDoc
= mpView
->GetDoc();
586 css::text::WritingMode eMode
= rDoc
.GetDefaultWritingMode();
587 bool bIsLeftToRight(false);
589 if(css::text::WritingMode_LR_TB
== eMode
590 || css::text::WritingMode_TB_RL
== eMode
)
592 bIsLeftToRight
= true;
595 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_LEFT_TO_RIGHT
, bIsLeftToRight
) );
596 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_RIGHT_TO_LEFT
, !bIsLeftToRight
) );
603 SvxLRSpaceItem aLRSpace
= aAttrSet
.Get( EE_PARA_LRSPACE
);
604 aLRSpace
.SetWhich(SID_ATTR_PARA_LRSPACE
);
607 pTextObjectBar
->Invalidate(SID_ATTR_PARA_LRSPACE
);
610 SfxItemState eState
= aAttrSet
.GetItemState( EE_PARA_LRSPACE
);
611 if ( eState
== SfxItemState::INVALID
)
613 rSet
.InvalidateItem(EE_PARA_LRSPACE
);
614 rSet
.InvalidateItem(SID_ATTR_PARA_LRSPACE
);
616 sal_uInt16 nLineSpace
= aAttrSet
.Get( EE_PARA_SBL
).GetPropLineSpace();
620 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10
, true ) );
621 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15
, false ) );
622 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20
, false ) );
625 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15
, true ) );
626 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10
, false ) );
627 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20
, false ) );
630 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20
, true ) );
631 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10
, false ) );
632 rSet
.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15
, false ) );
637 // justification (superscript, subscript) is also needed in outline-mode
638 SvxEscapement eEsc
= static_cast<SvxEscapement
>(aAttrSet
.Get( EE_CHAR_ESCAPEMENT
).GetEnumValue());
639 rSet
.Put(SfxBoolItem(SID_SET_SUPER_SCRIPT
, eEsc
== SvxEscapement::Superscript
));
640 rSet
.Put(SfxBoolItem(SID_SET_SUB_SCRIPT
, eEsc
== SvxEscapement::Subscript
));
642 SvxCaseMap eCaseMap
= aAttrSet
.Get(EE_CHAR_CASEMAP
).GetCaseMap();
643 rSet
.Put(SfxBoolItem(SID_SET_SMALL_CAPS
, eCaseMap
== SvxCaseMap::SmallCaps
));
646 } // end of namespace sd
648 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */