LibreOffice Module sd (master) 1
drtxtob.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <TextObjectBar.hxx>
21
22#include <svx/svxids.hrc>
23
24#include <com/sun/star/linguistic2/XThesaurus.hpp>
25
26#include <editeng/eeitem.hxx>
27#include <editeng/udlnitem.hxx>
28#include <editeng/ulspitem.hxx>
29#include <editeng/lspcitem.hxx>
31#include <editeng/editview.hxx>
32#include <editeng/outliner.hxx>
33#include <editeng/unolingu.hxx>
34#include <editeng/kernitem.hxx>
35#include <svl/whiter.hxx>
36#include <svl/itempool.hxx>
37#include <svl/stritem.hxx>
38#include <svl/style.hxx>
40#include <svl/cjkoptions.hxx>
41#include <svl/ctloptions.hxx>
42#include <sfx2/tplpitem.hxx>
44#include <svx/svdoutl.hxx>
48#include <editeng/fhgtitem.hxx>
49#include <o3tl/temporary.hxx>
50
51#include <sfx2/objface.hxx>
52
53#include <drawdoc.hxx>
54#include <DrawDocShell.hxx>
55#include <DrawViewShell.hxx>
56#include <OutlineViewShell.hxx>
57#include <Window.hxx>
58#include <OutlineView.hxx>
59
60using namespace sd;
61using namespace ::com::sun::star;
62
63#define ShellClass_TextObjectBar
64#include <sdslots.hxx>
65
66namespace sd {
67
73
74void TextObjectBar::InitInterface_Impl()
75{
76}
77
78
80 ViewShell* pSdViewSh,
81 SfxItemPool& rItemPool,
82 ::sd::View* pSdView )
83 : SfxShell(pSdViewSh->GetViewShell()),
84 mpViewShell( pSdViewSh ),
85 mpView( pSdView )
86{
87 SetPool(&rItemPool);
88
89 if( mpView )
90 {
91 OutlineView* pOutlinerView = dynamic_cast< OutlineView* >( mpView );
92 if( pOutlinerView )
93 {
94 SetUndoManager(&pOutlinerView->GetOutliner().GetUndoManager());
95 }
96 else
97 {
98 DrawDocShell* pDocShell = mpView->GetDoc().GetDocSh();
99 if( pDocShell )
100 {
101 SetUndoManager(pDocShell->GetUndoManager());
102 DrawViewShell* pDrawViewShell = dynamic_cast< DrawViewShell* >( pSdViewSh );
103 if ( pDrawViewShell )
104 SetRepeatTarget(pSdView);
105 }
106 }
107 }
108
109 SetName( "TextObjectBar");
110
111 // SetHelpId( SD_IF_SDDRAWTEXTOBJECTBAR );
112}
113
115{
116 SetRepeatTarget(nullptr);
117}
118
120{
121 SfxItemSet aCharAttrSet( mpView->GetDoc().GetPool() );
122 mpView->GetAttributes( aCharAttrSet );
123
125
126 aNewAttr.Put(aCharAttrSet, false);
127 rSet.Put(aNewAttr, false);
128
129 SvxKerningItem aKern = aCharAttrSet.Get( EE_CHAR_KERNING );
130 //aKern.SetWhich(SID_ATTR_CHAR_KERNING);
131 rSet.Put(aKern);
132
133 SfxItemState eState = aCharAttrSet.GetItemState( EE_CHAR_KERNING );
134 if ( eState == SfxItemState::DONTCARE )
135 {
137 }
138}
139
144{
145 SfxWhichIter aIter( rSet );
146 sal_uInt16 nWhich = aIter.FirstWhich();
147 SfxItemSet aAttrSet( mpView->GetDoc().GetPool() );
148 bool bDisableParagraphTextDirection = !SvtCTLOptions::IsCTLFontEnabled();
149 bool bDisableVerticalText = !SvtCJKOptions::IsVerticalTextEnabled();
150
151 mpView->GetAttributes( aAttrSet );
152
153 while ( nWhich )
154 {
155 sal_uInt16 nSlotId = SfxItemPool::IsWhich(nWhich)
156 ? GetPool().GetSlotId(nWhich)
157 : nWhich;
158
159 switch ( nSlotId )
160 {
161 case SID_ATTR_CHAR_FONT:
162 case SID_ATTR_CHAR_FONTHEIGHT:
163 case SID_ATTR_CHAR_WEIGHT:
164 case SID_ATTR_CHAR_POSTURE:
165 case SID_ATTR_CHAR_SHADOWED:
166 case SID_ATTR_CHAR_STRIKEOUT:
167 case SID_ATTR_CHAR_CASEMAP:
168 {
169 double stretchY = 100.0;
170 SvxScriptSetItem aSetItem( nSlotId, GetPool() );
171 aSetItem.GetItemSet().Put( aAttrSet, false );
172
173 SvtScriptType nScriptType = mpView->GetScriptType();
174
175 if( (nSlotId == SID_ATTR_CHAR_FONT) || (nSlotId == SID_ATTR_CHAR_FONTHEIGHT) )
176 {
177 // input language should be preferred over
178 // current cursor position to detect script type
180 SdrOutliner *pOutliner = mpView->GetTextEditOutliner();
181
182 assert(mpViewShell);
183
184 if (OutlineView* pOView = dynamic_cast<OutlineView*>(mpView))
185 pOLV = pOView->GetViewByWindow(mpViewShell->GetActiveWindow());
186
187 if (pOutliner)
188 pOutliner->getGlobalScale(o3tl::temporary(double()), stretchY, o3tl::temporary(double()), o3tl::temporary(double()));
189
190 if(pOLV && !pOLV->GetSelection().HasRange())
191 {
193 {
195 if(nInputLang != LANGUAGE_DONTKNOW && nInputLang != LANGUAGE_SYSTEM)
196 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nInputLang );
197 }
198 }
199 }
200
201 const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
202 if( pI )
203 {
204 if( nSlotId == SID_ATTR_CHAR_FONTHEIGHT )
205 {
206 SvxFontHeightItem aFontItem = dynamic_cast<const SvxFontHeightItem&>(*pI);
207 aFontItem.SetHeight(aFontItem.GetHeight() * (stretchY / 100.0), 100, aFontItem.GetPropUnit());
208 aFontItem.SetWhich(nWhich);
209 aAttrSet.Put( aFontItem );
210 }
211 else
212 {
213 aAttrSet.Put( pI->CloneSetWhich(nWhich) );
214 }
215 }
216 else
217 {
218 aAttrSet.InvalidateItem( nWhich );
219 }
220 }
221 break;
222
223 case SID_STYLE_APPLY:
224 case SID_STYLE_FAMILY2:
225 {
227 if( pStyleSheet )
228 rSet.Put( SfxTemplateItem( nWhich, pStyleSheet->GetName() ) );
229 else
230 {
231 rSet.Put( SfxTemplateItem( nWhich, OUString() ) );
232 }
233 }
234 break;
235
236 case SID_OUTLINE_LEFT:
237 case SID_OUTLINE_RIGHT:
238 case SID_OUTLINE_UP:
239 case SID_OUTLINE_DOWN:
240 {
241 bool bDisableLeft = true;
242 bool bDisableRight = true;
243 bool bDisableUp = true;
244 bool bDisableDown = true;
245
246 //fdo#78151 it doesn't make sense to promote or demote outline levels in master view.
247 const DrawViewShell* pDrawViewShell = dynamic_cast< DrawViewShell* >(mpViewShell);
248 const bool bInMasterView = pDrawViewShell && pDrawViewShell->GetEditMode() == EditMode::MasterPage;
249
250 if (!bInMasterView)
251 {
253
254 if (OutlineView* pOView = dynamic_cast<OutlineView*>(mpView))
255 pOLV = pOView->GetViewByWindow(mpViewShell->GetActiveWindow());
256
257 bool bOutlineViewSh = dynamic_cast< const OutlineViewShell *>( mpViewShell ) != nullptr;
258
259 if (pOLV)
260 {
261 // Outliner at outline-mode
262 ::Outliner* pOutl = pOLV->GetOutliner();
263
264 std::vector<Paragraph*> aSelList;
265 pOLV->CreateSelectionList(aSelList);
266 Paragraph* pPara = aSelList.empty() ? nullptr : *(aSelList.begin());
267
268 // find out if we are an OutlineView
269 bool bIsOutlineView(OutlinerMode::OutlineView == pOLV->GetOutliner()->GetOutlinerMode());
270
271 // This is ONLY for OutlineViews
272 if(bIsOutlineView)
273 {
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 || ( ::Outliner::HasParaFlag(pPara,ParaFlag::ISPAGE) && pOutl->GetAbsPos(pPara) > 0 ) )
277 {
278 // not at top
279 bDisableUp = false;
280 }
281 }
282 else
283 {
284 // old behaviour for OutlinerMode::OutlineObject
285 if(pOutl->GetAbsPos(pPara) > 0)
286 {
287 // not at top
288 bDisableUp = false;
289 }
290 }
291
292 for (const auto& rpItem : aSelList)
293 {
294 pPara = rpItem;
295
296 sal_Int16 nDepth = pOutl->GetDepth( pOutl->GetAbsPos( pPara ) );
297
298 if (nDepth > 0 || (bOutlineViewSh && (nDepth <= 0) && !::Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE )) )
299 {
300 // not minimum depth
301 bDisableLeft = false;
302 }
303
304 if( (nDepth < pOLV->GetOutliner()->GetMaxDepth() && ( !bOutlineViewSh || pOutl->GetAbsPos(pPara) != 0 )) ||
305 (bOutlineViewSh && (nDepth <= 0) && ::Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ) && pOutl->GetAbsPos(pPara) != 0) )
306 {
307 // not maximum depth and not at top
308 bDisableRight = false;
309 }
310 }
311
312 if ( ( pOutl->GetAbsPos(pPara) < pOutl->GetParagraphCount() - 1 ) &&
313 ( pOutl->GetParagraphCount() > 1 || !bOutlineViewSh) )
314 {
315 // not last paragraph
316 bDisableDown = false;
317 }
318
319 // disable when first para and 2nd is not a title
320 pPara = aSelList.empty() ? nullptr : *(aSelList.begin());
321
322 if(!bDisableDown && bIsOutlineView
323 && pPara
324 && 0 == pOutl->GetAbsPos(pPara)
325 && pOutl->GetParagraphCount() > 1
326 && !::Outliner::HasParaFlag( pOutl->GetParagraph(1), ParaFlag::ISPAGE ) )
327 {
328 // Needs to be disabled
329 bDisableDown = true;
330 }
331 }
332 }
333
334 if (bDisableLeft)
335 rSet.DisableItem(SID_OUTLINE_LEFT);
336 if (bDisableRight)
337 rSet.DisableItem(SID_OUTLINE_RIGHT);
338 if (bDisableUp)
339 rSet.DisableItem(SID_OUTLINE_UP);
340 if (bDisableDown)
341 rSet.DisableItem(SID_OUTLINE_DOWN);
342 }
343 break;
344
345 case SID_TEXTDIRECTION_LEFT_TO_RIGHT:
346 case SID_TEXTDIRECTION_TOP_TO_BOTTOM:
347 {
348 if ( bDisableVerticalText )
349 {
350 rSet.DisableItem( SID_TEXTDIRECTION_LEFT_TO_RIGHT );
351 rSet.DisableItem( SID_TEXTDIRECTION_TOP_TO_BOTTOM );
352 }
353 else
354 {
355 bool bLeftToRight = true;
356
358 if( pOutl )
359 {
360 if( pOutl->IsVertical() )
361 bLeftToRight = false;
362 }
363 else
364 bLeftToRight = aAttrSet.Get( SDRATTR_TEXTDIRECTION ).GetValue() == css::text::WritingMode_LR_TB;
365
366 rSet.Put( SfxBoolItem( SID_TEXTDIRECTION_LEFT_TO_RIGHT, bLeftToRight ) );
367 rSet.Put( SfxBoolItem( SID_TEXTDIRECTION_TOP_TO_BOTTOM, !bLeftToRight ) );
368
369 if( !bLeftToRight )
370 bDisableParagraphTextDirection = true;
371 }
372 }
373 break;
374
375 case SID_ULINE_VAL_NONE:
376 case SID_ULINE_VAL_SINGLE:
377 case SID_ULINE_VAL_DOUBLE:
378 case SID_ULINE_VAL_DOTTED:
379 {
380 if( aAttrSet.GetItemState( EE_CHAR_UNDERLINE ) >= SfxItemState::DEFAULT )
381 {
382 FontLineStyle eLineStyle = aAttrSet.Get(EE_CHAR_UNDERLINE).GetLineStyle();
383
384 switch (nSlotId)
385 {
386 case SID_ULINE_VAL_NONE:
387 rSet.Put(SfxBoolItem(nSlotId, eLineStyle == LINESTYLE_NONE));
388 break;
389 case SID_ULINE_VAL_SINGLE:
390 rSet.Put(SfxBoolItem(nSlotId, eLineStyle == LINESTYLE_SINGLE));
391 break;
392 case SID_ULINE_VAL_DOUBLE:
393 rSet.Put(SfxBoolItem(nSlotId, eLineStyle == LINESTYLE_DOUBLE));
394 break;
395 case SID_ULINE_VAL_DOTTED:
396 rSet.Put(SfxBoolItem(nSlotId, eLineStyle == LINESTYLE_DOTTED));
397 break;
398 }
399 }
400 }
401 break;
402
403 case SID_GROW_FONT_SIZE:
404 case SID_SHRINK_FONT_SIZE:
405 {
406 // todo
407 }
408 break;
409
410 case SID_THES:
411 {
413 {
415 OUString aStatusVal;
417 bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, rEditView );
418 rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
419
420 // disable "Thesaurus" context menu entry if there is nothing to look up
421 uno::Reference< linguistic2::XThesaurus > xThes( LinguMgr::GetThesaurus() );
422 if (!bIsLookUpWord ||
423 !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( LanguageTag( nLang). getLocale() ))
424 rSet.DisableItem( SID_THES );
425 }
426 else
427 {
428 rSet.DisableItem( SID_THES );
429 }
430 }
431 break;
432
433 default:
434 break;
435 }
436
437 nWhich = aIter.NextWhich();
438 }
439
440 rSet.Put( aAttrSet, false ); // <- sal_False, so DontCare-Status gets acquired
441
442 // these are disabled in outline-mode
443 if (!mpViewShell || dynamic_cast< const DrawViewShell *>( mpViewShell ) == nullptr)
444 {
445 rSet.DisableItem( SID_ATTR_PARA_ADJUST_LEFT );
446 rSet.DisableItem( SID_ATTR_PARA_ADJUST_RIGHT );
447 rSet.DisableItem( SID_ATTR_PARA_ADJUST_CENTER );
448 rSet.DisableItem( SID_ATTR_PARA_ADJUST_BLOCK );
449 rSet.DisableItem( SID_ATTR_PARA_LINESPACE_10 );
450 rSet.DisableItem( SID_ATTR_PARA_LINESPACE_15 );
451 rSet.DisableItem( SID_ATTR_PARA_LINESPACE_20 );
452 rSet.DisableItem( SID_DEC_INDENT );
453 rSet.DisableItem( SID_INC_INDENT );
454 rSet.DisableItem( SID_PARASPACE_INCREASE );
455 rSet.DisableItem( SID_PARASPACE_DECREASE );
456 rSet.DisableItem( SID_TEXTDIRECTION_TOP_TO_BOTTOM );
457 rSet.DisableItem( SID_TEXTDIRECTION_LEFT_TO_RIGHT );
458 rSet.DisableItem( SID_ATTR_PARA_LEFT_TO_RIGHT );
459 rSet.DisableItem( SID_ATTR_PARA_RIGHT_TO_LEFT );
460 }
461 else
462 {
463 // paragraph spacing
465 if( pOLV )
466 {
467 ESelection aSel = pOLV->GetSelection();
468 aSel.Adjust();
469 sal_Int32 nStartPara = aSel.nStartPara;
470 sal_Int32 nEndPara = aSel.nEndPara;
471 if( !aSel.HasRange() )
472 {
473 nStartPara = 0;
474 nEndPara = pOLV->GetOutliner()->GetParagraphCount() - 1;
475 }
476 ::tools::Long nUpper = 0;
477
478 for( sal_Int32 nPara = nStartPara; nPara <= nEndPara; nPara++ )
479 {
480 const SfxItemSet& rItems = pOLV->GetOutliner()->GetParaAttribs( nPara );
481 const SvxULSpaceItem& rItem = rItems.Get( EE_PARA_ULSPACE );
482 nUpper = std::max( nUpper, static_cast<::tools::Long>(rItem.GetUpper()) );
483 }
484 if( nUpper == 0 )
485 rSet.DisableItem( SID_PARASPACE_DECREASE );
486 }
487 else
488 {
489 // never disabled at the moment!
490 //rSet.DisableItem( SID_PARASPACE_INCREASE );
491 //rSet.DisableItem( SID_PARASPACE_DECREASE );
492 }
493
494 // paragraph justification
495 const SvxLRSpaceItem& aLR = aAttrSet.Get( EE_PARA_LRSPACE );
496 rSet.Put(aLR);
497 SvxAdjust eAdj = aAttrSet.Get( EE_PARA_JUST ).GetAdjust();
498 switch( eAdj )
499 {
500 case SvxAdjust::Left:
501 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, true ) );
502 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, false ) );
503 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, false ) );
504 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, false ) );
505 break;
506 case SvxAdjust::Center:
507 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, true ) );
508 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, false ) );
509 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, false ) );
510 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, false ) );
511 break;
512 case SvxAdjust::Right:
513 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, true ) );
514 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, false ) );
515 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, false ) );
516 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, false ) );
517 break;
518 case SvxAdjust::Block:
519 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, true ) );
520 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, false ) );
521 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, false ) );
522 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, false ) );
523 break;
524 default:
525 break;
526 }
527
528 Invalidate(SID_ATTR_PARA_ADJUST_LEFT);
529 Invalidate(SID_ATTR_PARA_ADJUST_CENTER);
530 Invalidate(SID_ATTR_PARA_ADJUST_RIGHT);
531 Invalidate(SID_ATTR_PARA_ADJUST_BLOCK);
532 Invalidate(SID_ATTR_PARA_LINESPACE);
533 Invalidate(SID_ATTR_PARA_ULSPACE);
534
535 // paragraph text direction
536 if( bDisableParagraphTextDirection )
537 {
538 rSet.DisableItem( SID_ATTR_PARA_LEFT_TO_RIGHT );
539 rSet.DisableItem( SID_ATTR_PARA_RIGHT_TO_LEFT );
540 }
541 else
542 {
543 switch( aAttrSet.Get( EE_PARA_WRITINGDIR ).GetValue() )
544 {
545 case SvxFrameDirection::Vertical_LR_TB:
546 case SvxFrameDirection::Vertical_RL_TB:
547 {
548 rSet.DisableItem( SID_ATTR_PARA_LEFT_TO_RIGHT );
549 rSet.DisableItem( SID_ATTR_PARA_RIGHT_TO_LEFT );
550 }
551 break;
552
553 case SvxFrameDirection::Horizontal_LR_TB:
554 rSet.Put( SfxBoolItem( SID_ATTR_PARA_LEFT_TO_RIGHT, true ) );
555 rSet.Put( SfxBoolItem( SID_ATTR_PARA_RIGHT_TO_LEFT, false ) );
556 break;
557
558 case SvxFrameDirection::Horizontal_RL_TB:
559 rSet.Put( SfxBoolItem( SID_ATTR_PARA_LEFT_TO_RIGHT, false ) );
560 rSet.Put( SfxBoolItem( SID_ATTR_PARA_RIGHT_TO_LEFT, true ) );
561 break;
562
563 // The case for the superordinate object is missing.
564 case SvxFrameDirection::Environment:
565 {
566 SdDrawDocument& rDoc = mpView->GetDoc();
567 css::text::WritingMode eMode = rDoc.GetDefaultWritingMode();
568 bool bIsLeftToRight(false);
569
570 if(css::text::WritingMode_LR_TB == eMode
571 || css::text::WritingMode_TB_RL == eMode)
572 {
573 bIsLeftToRight = true;
574 }
575
576 rSet.Put( SfxBoolItem( SID_ATTR_PARA_LEFT_TO_RIGHT, bIsLeftToRight ) );
577 rSet.Put( SfxBoolItem( SID_ATTR_PARA_RIGHT_TO_LEFT, !bIsLeftToRight ) );
578 }
579 break;
580 default: break;
581 }
582 }
583
584 SvxLRSpaceItem aLRSpace = aAttrSet.Get( EE_PARA_LRSPACE );
585 aLRSpace.SetWhich(SID_ATTR_PARA_LRSPACE);
586 rSet.Put(aLRSpace);
587 Invalidate(SID_ATTR_PARA_LRSPACE);
588
589 //Added by xuxu
590 SfxItemState eState = aAttrSet.GetItemState( EE_PARA_LRSPACE );
591 if ( eState == SfxItemState::DONTCARE )
592 {
594 rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE);
595 }
596 sal_uInt16 nLineSpace = aAttrSet.Get( EE_PARA_SBL ).GetPropLineSpace();
597 switch( nLineSpace )
598 {
599 case 100:
600 rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10, true ) );
601 rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15, false ) );
602 rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20, false ) );
603 break;
604 case 150:
605 rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15, true ) );
606 rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10, false ) );
607 rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20, false ) );
608 break;
609 case 200:
610 rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20, true ) );
611 rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10, false ) );
612 rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15, false ) );
613 break;
614 }
615 }
616
617 // justification (superscript, subscript) is also needed in outline-mode
618 SvxEscapement eEsc = static_cast<SvxEscapement>(aAttrSet.Get( EE_CHAR_ESCAPEMENT ).GetEnumValue());
619 rSet.Put(SfxBoolItem(SID_SET_SUPER_SCRIPT, eEsc == SvxEscapement::Superscript));
620 rSet.Put(SfxBoolItem(SID_SET_SUB_SCRIPT, eEsc == SvxEscapement::Subscript));
621}
622
623} // end of namespace sd
624
625/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static css::uno::Reference< css::linguistic2::XThesaurus > GetThesaurus()
void CreateSelectionList(std::vector< Paragraph * > &aSelList)
ESelection GetSelection() const
Outliner * GetOutliner() const
EditView & GetEditView() const
static bool HasParaFlag(const Paragraph *pPara, ParaFlag nFlag)
OutlinerMode GetOutlinerMode() const
Paragraph * GetParagraph(sal_Int32 nAbsPos) const
sal_Int16 GetDepth(sal_Int32 nPara) const
sal_Int32 GetAbsPos(Paragraph const *pPara) const
SfxItemSet const & GetParaAttribs(sal_Int32 nPara) const
sal_Int32 GetParagraphCount() const
SAL_DLLPRIVATE SfxItemPool & GetPool()
Definition: drawdoc.hxx:237
css::text::WritingMode GetDefaultWritingMode() const
Definition: drawdoc4.cxx:1184
SAL_DLLPRIVATE::sd::DrawDocShell * GetDocSh() const
Definition: drawdoc.hxx:242
SfxStyleSheet * GetStyleSheetFromMarked() const
const OutlinerView * GetTextEditOutlinerView() const
virtual SvtScriptType GetScriptType() const
const SdrOutliner * GetTextEditOutliner() const
sal_uInt16 GetSlotId(sal_uInt16 nWhich) const
static bool IsWhich(sal_uInt16 nId)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void DisableItem(sal_uInt16 nWhich)
void InvalidateItem(sal_uInt16 nWhich)
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
void SetUndoManager(SfxUndoManager *pNewUndoMgr)
SfxItemPool & GetPool() const
void SetRepeatTarget(SfxRepeatTarget *pTarget)
virtual void Invalidate(sal_uInt16 nId=0)
SfxViewShell * GetViewShell() const
void SetPool(SfxItemPool *pNewPool)
void SetName(const OUString &rName)
const OUString & GetName() const
vcl::Window * GetWindow() const
sal_uInt16 FirstWhich()
sal_uInt16 NextWhich()
static bool IsCTLFontEnabled()
sal_uInt32 GetHeight() const
MapUnit GetPropUnit() const
void SetHeight(sal_uInt32 nNewHeight, const sal_uInt16 nNewProp=100, MapUnit eUnit=MapUnit::MapRelative)
const SfxPoolItem * GetItemOfScript(SvtScriptType nScript) const
sal_uInt16 GetUpper() const
virtual SfxUndoManager * GetUndoManager() override
Definition: docshell.cxx:363
Base class of the stacked shells that provide graphical views to Draw and Impress documents and editi...
EditMode GetEditMode() const
Show a textual overview of the text contents of all slides.
Derivative of sd::View for the outline mode |* .
Definition: OutlineView.hxx:55
SdrOutliner & GetOutliner()
Definition: OutlineView.hxx:82
TextObjectBar(ViewShell *pSdViewShell, SfxItemPool &rItemPool, ::sd::View *pSdView)
Definition: drtxtob.cxx:79
void GetAttrState(SfxItemSet &rSet)
Status of attribute items.
Definition: drtxtob.cxx:143
ViewShell * mpViewShell
::sd::View * mpView
virtual ~TextObjectBar() override
Definition: drtxtob.cxx:114
void GetCharState(SfxItemSet &rSet)
Definition: drtxtob.cxx:119
Base class of the stacked shell hierarchy.
Definition: ViewShell.hxx:92
::sd::Window * GetActiveWindow() const
The active window is usually the mpContentWindow.
Definition: ViewShell.hxx:155
virtual void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
Definition: sdview.cxx:515
SdDrawDocument & GetDoc() const
Definition: View.hxx:293
LanguageType GetInputLanguage() const
constexpr TypedWhichId< SvxKerningItem > EE_CHAR_KERNING(EE_CHAR_START+12)
constexpr TypedWhichId< SvxUnderlineItem > EE_CHAR_UNDERLINE(EE_CHAR_START+5)
constexpr TypedWhichId< SvxAdjustItem > EE_PARA_JUST(EE_PARA_START+16)
constexpr TypedWhichId< SvxULSpaceItem > EE_PARA_ULSPACE(EE_PARA_START+14)
constexpr TypedWhichId< SvxLRSpaceItem > EE_PARA_LRSPACE(EE_PARA_START+13)
constexpr TypedWhichId< SvxLineSpacingItem > EE_PARA_SBL(EE_PARA_START+15)
constexpr TypedWhichId< SvxEscapementItem > EE_CHAR_ESCAPEMENT(EE_CHAR_START+10)
constexpr TypedWhichId< SvxFrameDirectionItem > EE_PARA_WRITINGDIR(EE_PARA_START+0)
FontLineStyle
LINESTYLE_SINGLE
LINESTYLE_DOUBLE
LINESTYLE_NONE
LINESTYLE_DOTTED
Mode eMode
#define LANGUAGE_SYSTEM
#define LANGUAGE_NONE
#define LANGUAGE_DONTKNOW
SvtScriptType
bool IsVerticalTextEnabled()
SvtScriptType GetScriptTypeOfLanguage(LanguageType nLang)
const LanguageTag & getLocale()
constexpr T & temporary(T &&x)
long Long
bool GetStatusValueForThesaurusFromContext(OUString &rStatusVal, LanguageType &rLang, const EditView &rEditView)
SfxItemState
static SfxItemSet & rSet
#define SFX_IMPL_INTERFACE(Class, SuperClass)
UnoViewSharedPtr mpView
bool HasRange() const
sal_Int32 nStartPara
void Adjust()
sal_Int32 nEndPara
constexpr TypedWhichId< SvxWritingModeItem > SDRATTR_TEXTDIRECTION(SDRATTR_NOTPERSIST_FIRST+34)
SvxEscapement
SvxAdjust