LibreOffice Module svx (master)  1
textproperties.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 <sal/config.h>
21 
23 #include <svl/itemset.hxx>
24 #include <svl/style.hxx>
25 #include <svl/itemiter.hxx>
26 #include <svl/hint.hxx>
27 #include <svx/svddef.hxx>
28 #include <svx/svdotext.hxx>
29 #include <svx/svdoutl.hxx>
30 #include <svx/sdmetitm.hxx>
31 #include <svx/sdtditm.hxx>
33 #include <svx/svdmodel.hxx>
34 #include <editeng/eeitem.hxx>
35 #include <editeng/outlobj.hxx>
36 #include <svx/xfillit0.hxx>
37 #include <svx/xflclit.hxx>
38 #include <editeng/adjustitem.hxx>
39 #include <svx/svdetc.hxx>
40 #include <editeng/editeng.hxx>
41 #include <editeng/flditem.hxx>
42 #include <svx/xlineit0.hxx>
43 #include <svx/xlnwtit.hxx>
44 
45 using namespace com::sun::star;
46 
47 namespace sdr::properties
48 {
49  std::unique_ptr<SfxItemSet> TextProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
50  {
51  return std::make_unique<SfxItemSet>(rPool,
52 
53  // range from SdrAttrObj
57 
58  // range from SdrTextObj
60  }
61 
62  TextProperties::TextProperties(SdrObject& rObj)
63  : AttributeProperties(rObj),
64  maVersion(0)
65  {
66  }
67 
69  : AttributeProperties(rProps, rObj),
70  maVersion(rProps.getVersion())
71  {
72  }
73 
75  {
76  }
77 
78  std::unique_ptr<BaseProperties> TextProperties::Clone(SdrObject& rObj) const
79  {
80  return std::unique_ptr<BaseProperties>(new TextProperties(*this, rObj));
81  }
82 
84  {
85  SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
86 
87  // #i101556# ItemSet has changed -> new version
88  maVersion++;
89 
90  const svx::ITextProvider& rTextProvider(getTextProvider());
91  sal_Int32 nText = rTextProvider.getTextCount();
92  while (nText--)
93  {
94  SdrText* pText = rTextProvider.getText( nText );
95 
96  OutlinerParaObject* pParaObj = pText ? pText->GetOutlinerParaObject() : nullptr;
97 
98  if(pParaObj)
99  {
100  const bool bTextEdit = rObj.IsTextEditActive() && (rObj.getActiveText() == pText);
101 
102  // handle outliner attributes
104  Outliner* pOutliner = rObj.GetTextEditOutliner();
105 
106  if(!bTextEdit)
107  {
108  pOutliner = &rObj.ImpGetDrawOutliner();
109  pOutliner->SetText(*pParaObj);
110  }
111 
112  sal_Int32 nParaCount(pOutliner->GetParagraphCount());
113 
114  for(sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
115  {
116  SfxItemSet aSet(pOutliner->GetParaAttribs(nPara));
117  aSet.Put(rSet);
118  pOutliner->SetParaAttribs(nPara, aSet);
119  }
120 
121  if(!bTextEdit)
122  {
123  if(nParaCount)
124  {
125  // force ItemSet
127 
128  SfxItemSet aNewSet(pOutliner->GetParaAttribs(0));
129  mpItemSet->Put(aNewSet);
130  }
131 
132  std::unique_ptr<OutlinerParaObject> pTemp = pOutliner->CreateParaObject(0, nParaCount);
133  pOutliner->Clear();
134 
135  rObj.NbcSetOutlinerParaObjectForText(std::move(pTemp),pText);
136  }
137  }
138  }
139 
140  // Extra-Repaint for radical layout changes (#43139#)
141  if(SfxItemState::SET == rSet.GetItemState(SDRATTR_TEXT_CONTOURFRAME))
142  {
143  // Here only repaint wanted
144  rObj.ActionChanged();
145  //rObj.BroadcastObjectChange();
146  }
147 
148  // call parent
150  }
151 
152  void TextProperties::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem)
153  {
154  SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
155 
156  // #i25616#
157  sal_Int32 nOldLineWidth(0);
158 
160  {
161  nOldLineWidth = GetItem(XATTR_LINEWIDTH).GetValue();
162  }
163 
164  if(pNewItem && (SDRATTR_TEXTDIRECTION == nWhich))
165  {
166  bool bVertical(css::text::WritingMode_TB_RL == static_cast<const SvxWritingModeItem*>(pNewItem)->GetValue());
167  rObj.SetVerticalWriting(bVertical);
168  }
169 
170  // #95501# reset to default
171  if(!pNewItem && !nWhich && rObj.HasText() )
172  {
173  SdrOutliner& rOutliner = rObj.ImpGetDrawOutliner();
174 
175  const svx::ITextProvider& rTextProvider(getTextProvider());
176  sal_Int32 nCount = rTextProvider.getTextCount();
177  while (nCount--)
178  {
179  SdrText* pText = rTextProvider.getText( nCount );
180  OutlinerParaObject* pParaObj = pText->GetOutlinerParaObject();
181  if( pParaObj )
182  {
183  rOutliner.SetText(*pParaObj);
184  sal_Int32 nParaCount(rOutliner.GetParagraphCount());
185 
186  if(nParaCount)
187  {
188  ESelection aSelection( 0, 0, EE_PARA_ALL, EE_TEXTPOS_ALL);
189  rOutliner.RemoveAttribs(aSelection, true, 0);
190 
191  std::unique_ptr<OutlinerParaObject> pTemp = rOutliner.CreateParaObject(0, nParaCount);
192  rOutliner.Clear();
193 
194  rObj.NbcSetOutlinerParaObjectForText( std::move(pTemp), pText );
195  }
196  }
197  }
198  }
199 
200  // call parent
201  AttributeProperties::ItemChange( nWhich, pNewItem );
202 
203  // #i25616#
205  {
206  const sal_Int32 nNewLineWidth(GetItem(XATTR_LINEWIDTH).GetValue());
207  const sal_Int32 nDifference((nNewLineWidth - nOldLineWidth) / 2);
208 
209  if(nDifference)
210  {
211  const bool bLineVisible(drawing::LineStyle_NONE != GetItem(XATTR_LINESTYLE).GetValue());
212 
213  if(bLineVisible)
214  {
215  const sal_Int32 nLeftDist(GetItem(SDRATTR_TEXT_LEFTDIST).GetValue());
216  const sal_Int32 nRightDist(GetItem(SDRATTR_TEXT_RIGHTDIST).GetValue());
217  const sal_Int32 nUpperDist(GetItem(SDRATTR_TEXT_UPPERDIST).GetValue());
218  const sal_Int32 nLowerDist(GetItem(SDRATTR_TEXT_LOWERDIST).GetValue());
219 
220  SetObjectItemDirect(makeSdrTextLeftDistItem(nLeftDist + nDifference));
221  SetObjectItemDirect(makeSdrTextRightDistItem(nRightDist + nDifference));
222  SetObjectItemDirect(makeSdrTextUpperDistItem(nUpperDist + nDifference));
223  SetObjectItemDirect(makeSdrTextLowerDistItem(nLowerDist + nDifference));
224  }
225  }
226  }
227  }
228 
230  {
231  return static_cast<const SdrTextObj&>(GetSdrObject());
232  }
233 
234  void TextProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr)
235  {
236  // call parent (always first thing to do, may create the SfxItemSet)
237  AttributeProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
238 
239  // #i101556# StyleSheet has changed -> new version
240  SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
241  maVersion++;
242 
243  if(!rObj.IsLinkedText() )
244  {
245  SdrOutliner& rOutliner = rObj.ImpGetDrawOutliner();
246 
247  const svx::ITextProvider& rTextProvider(getTextProvider());
248  sal_Int32 nText = rTextProvider.getTextCount();
249  while (nText--)
250  {
251  SdrText* pText = rTextProvider.getText( nText );
252 
253  OutlinerParaObject* pParaObj = pText ? pText->GetOutlinerParaObject() : nullptr;
254  if( !pParaObj )
255  continue;
256 
257  // apply StyleSheet to all paragraphs
258  rOutliner.SetText(*pParaObj);
259  sal_Int32 nParaCount(rOutliner.GetParagraphCount());
260 
261  if(nParaCount)
262  {
263  for(sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
264  {
265  std::unique_ptr<SfxItemSet> pTempSet;
266 
267  // since setting the stylesheet removes all para attributes
268  if(bDontRemoveHardAttr)
269  {
270  // we need to remember them if we want to keep them
271  pTempSet.reset(new SfxItemSet(rOutliner.GetParaAttribs(nPara)));
272  }
273 
274  if(GetStyleSheet())
275  {
276  if((OBJ_OUTLINETEXT == rObj.GetTextKind()) && (SdrInventor::Default == rObj.GetObjInventor()))
277  {
278  OUString aNewStyleSheetName(GetStyleSheet()->GetName());
279  aNewStyleSheetName = aNewStyleSheetName.copy(0, aNewStyleSheetName.getLength() - 1);
280  sal_Int16 nDepth = rOutliner.GetDepth(nPara);
281  aNewStyleSheetName += OUString::number( nDepth <= 0 ? 1 : nDepth + 1);
283  SfxStyleSheet* pNewStyle = nullptr;
284  if(pStylePool)
285  pNewStyle = static_cast<SfxStyleSheet*>(pStylePool->Find(aNewStyleSheetName, GetStyleSheet()->GetFamily()));
286  DBG_ASSERT( pNewStyle, "AutoStyleSheetName - Style not found!" );
287 
288  if(pNewStyle)
289  {
290  rOutliner.SetStyleSheet(nPara, pNewStyle);
291  }
292  }
293  else
294  {
295  rOutliner.SetStyleSheet(nPara, GetStyleSheet());
296  }
297  }
298  else
299  {
300  // remove StyleSheet
301  rOutliner.SetStyleSheet(nPara, nullptr);
302  }
303 
304  if(bDontRemoveHardAttr)
305  {
306  if(pTempSet)
307  {
308  // restore para attributes
309  rOutliner.SetParaAttribs(nPara, *pTempSet);
310  }
311  }
312  else
313  {
314  if(pNewStyleSheet)
315  {
316  // remove all hard paragraph attributes
317  // which occur in StyleSheet, take care of
318  // parents (!)
319  SfxItemIter aIter(pNewStyleSheet->GetItemSet());
320 
321  for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem;
322  pItem = aIter.NextItem())
323  {
324  if(!IsInvalidItem(pItem))
325  {
326  sal_uInt16 nW(pItem->Which());
327 
328  if(nW >= EE_ITEMS_START && nW <= EE_ITEMS_END)
329  {
330  rOutliner.RemoveCharAttribs(nPara, nW);
331  }
332  }
333  }
334  }
335  }
336  }
337 
338  std::unique_ptr<OutlinerParaObject> pTemp = rOutliner.CreateParaObject(0, nParaCount);
339  rOutliner.Clear();
340  rObj.NbcSetOutlinerParaObjectForText(std::move(pTemp), pText);
341  }
342  }
343  }
344 
345  if(rObj.IsTextFrame())
346  {
348  }
349  }
350 
352  {
353  SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
354 
355  if( rObj.GetObjInventor() == SdrInventor::Default )
356  {
357  const sal_uInt16 nSdrObjKind = rObj.GetObjIdentifier();
358 
359  if( nSdrObjKind == OBJ_TITLETEXT || nSdrObjKind == OBJ_OUTLINETEXT )
360  return; // no defaults for presentation objects
361  }
362 
363  bool bTextFrame(rObj.IsTextFrame());
364 
365  // force ItemSet
367 
368  if(bTextFrame)
369  {
370  mpItemSet->Put(XLineStyleItem(drawing::LineStyle_NONE));
371  mpItemSet->Put(XFillColorItem(OUString(), COL_WHITE));
372  mpItemSet->Put(XFillStyleItem(drawing::FillStyle_NONE));
373  }
374  else
375  {
376  mpItemSet->Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST));
379  }
380  }
381 
383  {
384  // #i61284# call parent first to get the hard ObjectItemSet
386 
387  // #i61284# push hard ObjectItemSet to OutlinerParaObject attributes
388  // using existing functionality
389  GetObjectItemSet(); // force ItemSet
391 
392  // now the standard TextProperties stuff
393  SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
394 
395  if(!rObj.IsTextEditActive() && !rObj.IsLinkedText())
396  {
397  std::unique_ptr<Outliner> pOutliner = SdrMakeOutliner(OutlinerMode::OutlineObject, rObj.getSdrModelFromSdrObject());
398  const svx::ITextProvider& rTextProvider(getTextProvider());
399  sal_Int32 nText = rTextProvider.getTextCount();
400  while (nText--)
401  {
402  SdrText* pText = rTextProvider.getText( nText );
403 
404  OutlinerParaObject* pParaObj = pText ? pText->GetOutlinerParaObject() : nullptr;
405  if( !pParaObj )
406  continue;
407 
408  pOutliner->SetText(*pParaObj);
409 
410  sal_Int32 nParaCount(pOutliner->GetParagraphCount());
411 
412  if(nParaCount)
413  {
414  bool bBurnIn(false);
415 
416  for(sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
417  {
418  SfxStyleSheet* pSheet = pOutliner->GetStyleSheet(nPara);
419 
420  if(pSheet)
421  {
422  SfxItemSet aParaSet(pOutliner->GetParaAttribs(nPara));
423  SfxItemSet aSet(*aParaSet.GetPool());
424  aSet.Put(pSheet->GetItemSet());
425 
444  bool bHasURL(false);
445 
446  if(aSet.GetItemState(EE_CHAR_COLOR) == SfxItemState::SET)
447  {
448  EditEngine* pEditEngine = const_cast<EditEngine*>(&(pOutliner->GetEditEngine()));
449  std::vector<EECharAttrib> aAttribs;
450  pEditEngine->GetCharAttribs(nPara, aAttribs);
451 
452  for(const auto& rAttrib : aAttribs)
453  {
454  if(rAttrib.pAttr && EE_FEATURE_FIELD == rAttrib.pAttr->Which())
455  {
456  const SvxFieldItem* pFieldItem = static_cast<const SvxFieldItem*>(rAttrib.pAttr);
457 
458  if(pFieldItem)
459  {
460  const SvxFieldData* pData = pFieldItem->GetField();
461 
462  if(dynamic_cast<const SvxURLField*>( pData))
463  {
464  bHasURL = true;
465  break;
466  }
467  }
468  }
469  }
470 
471  if(bHasURL)
472  {
473  SfxItemSet aColorSet(*aSet.GetPool(), svl::Items<EE_CHAR_COLOR, EE_CHAR_COLOR>{} );
474  aColorSet.Put(aSet, false);
475 
476  ESelection aSel(nPara, 0);
477 
478  for(const auto& rAttrib : aAttribs)
479  {
480  if(EE_FEATURE_FIELD == rAttrib.pAttr->Which())
481  {
482  aSel.nEndPos = rAttrib.nStart;
483 
484  if(aSel.nStartPos != aSel.nEndPos)
485  pEditEngine->QuickSetAttribs(aColorSet, aSel);
486 
487  aSel.nStartPos = rAttrib.nEnd;
488  }
489  }
490 
491  aSel.nEndPos = pEditEngine->GetTextLen(nPara);
492 
493  if(aSel.nStartPos != aSel.nEndPos)
494  {
495  pEditEngine->QuickSetAttribs( aColorSet, aSel );
496  }
497  }
498 
499  }
500 
501  aSet.Put(aParaSet, false);
502 
503  if(bHasURL)
504  {
505  aSet.ClearItem(EE_CHAR_COLOR);
506  }
507 
508  pOutliner->SetParaAttribs(nPara, aSet);
509  bBurnIn = true; // #i51163# Flag was set wrong
510  }
511  }
512 
513  if(bBurnIn)
514  {
515  std::unique_ptr<OutlinerParaObject> pTemp = pOutliner->CreateParaObject(0, nParaCount);
516  rObj.NbcSetOutlinerParaObjectForText(std::move(pTemp),pText);
517  }
518  }
519 
520  pOutliner->Clear();
521  }
522  }
523  }
524 
526  {
528  mpItemSet->Put(rItem);
529  }
530 
531 
533  {
534  // call parent
535  AttributeProperties::Notify(rBC, rHint);
536 
537  SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
538  if(rObj.HasText())
539  {
540  const svx::ITextProvider& rTextProvider(getTextProvider());
541  if(dynamic_cast<const SfxStyleSheet *>(&rBC) != nullptr)
542  {
543  SfxHintId nId(rHint.GetId());
544 
545  if(SfxHintId::DataChanged == nId)
546  {
547  sal_Int32 nText = rTextProvider.getTextCount();
548  while (nText--)
549  {
550  OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
551  if( pParaObj )
552  pParaObj->ClearPortionInfo();
553  }
554  rObj.SetTextSizeDirty();
555 
556  if(rObj.IsTextFrame() && rObj.NbcAdjustTextFrameWidthAndHeight())
557  {
558  // here only repaint wanted
559  rObj.ActionChanged();
560  //rObj.BroadcastObjectChange();
561  }
562 
563  // #i101556# content of StyleSheet has changed -> new version
564  maVersion++;
565  }
566 
567  if(SfxHintId::Dying == nId)
568  {
569  sal_Int32 nText = rTextProvider.getTextCount();
570  while (nText--)
571  {
572  OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
573  if( pParaObj )
574  pParaObj->ClearPortionInfo();
575  }
576  }
577  }
578  else if(dynamic_cast<const SfxStyleSheetBasePool *>(&rBC) != nullptr)
579  {
580  const SfxStyleSheetModifiedHint* pExtendedHint = dynamic_cast<const SfxStyleSheetModifiedHint*>(&rHint);
581 
582  if(pExtendedHint
583  && SfxHintId::StyleSheetModified == pExtendedHint->GetId())
584  {
585  const OUString& aOldName(pExtendedHint->GetOldName());
586  OUString aNewName(pExtendedHint->GetStyleSheet()->GetName());
587  SfxStyleFamily eFamily = pExtendedHint->GetStyleSheet()->GetFamily();
588 
589  if(aOldName != aNewName)
590  {
591  sal_Int32 nText = rTextProvider.getTextCount();
592  while (nText--)
593  {
594  OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
595  if( pParaObj )
596  pParaObj->ChangeStyleSheetName(eFamily, aOldName, aNewName);
597  }
598  }
599  }
600  }
601  }
602  }
603 
604  // #i101556# Handout version information
605  sal_uInt32 TextProperties::getVersion() const
606  {
607  return maVersion;
608  }
609 } // end of namespace
610 
611 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define EE_ITEMS_START
SfxHintId
virtual SfxStyleSheet * GetStyleSheet() const override
void ChangeStyleSheetName(SfxStyleFamily eFamily, const OUString &rOldName, const OUString &rNewName)
virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt=true, bool bWdt=true)
Definition: svdotxat.cxx:239
const SfxPoolItem & GetItem(const sal_uInt16 nWhich) const
Definition: properties.cxx:119
std::unique_ptr< ContentProperties > pData
std::string GetValue
bool IsLinkedText() const
Definition: svdotext.hxx:336
bool DoesSupportTextIndentingOnLineWidthChange() const
Definition: svdobj.hxx:894
bool IsTextFrame() const
Definition: svdotext.hxx:343
#define EE_PARA_JUST
sal_Int16 nId
virtual void SetObjectItemDirect(const SfxPoolItem &rItem) override
sal_Int32 GetParagraphCount() const
virtual const SfxItemSet & GetObjectItemSet() const override
#define SDRATTR_MISC_LAST
Definition: svddef.hxx:225
virtual SfxItemSet & GetItemSet()
bool IsTextEditActive() const
Definition: svdotext.hxx:363
virtual sal_Int32 getTextCount() const =0
Return the number of texts available for this object.
std::unique_ptr< SfxItemSet > mpItemSet
SfxHintId GetId() const
virtual bool HasText() const override
Definition: svdotxat.cxx:412
#define SDRATTR_SHADOW_LAST
Definition: svddef.hxx:183
void SetTextSizeDirty()
Definition: svdotext.hxx:288
int nCount
void RemoveCharAttribs(sal_Int32 nPara, sal_uInt16 nWhich=0)
virtual void SetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr) override
This interface provides access to text object(s) in an SdrObject.
SfxStyleFamily
SfxItemSet const & GetParaAttribs(sal_Int32 nPara)
sal_Int32 nEndPos
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
SVX_DLLPRIVATE SdrOutliner * GetTextEditOutliner() const
Definition: svdotext.hxx:157
SdrMetricItem makeSdrTextUpperDistItem(long mnHeight)
Definition: sdtditm.hxx:33
void SetParaAttribs(sal_Int32 nPara, const SfxItemSet &)
void RemoveAttribs(const ESelection &rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich)
virtual std::unique_ptr< BaseProperties > Clone(SdrObject &rObj) const override
void GetCharAttribs(sal_Int32 nPara, std::vector< EECharAttrib > &rLst) const
void SetText(const OutlinerParaObject &)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define DBG_ASSERT(sCon, aError)
#define EE_PARA_ALL
sal_uInt32 GetTextLen() const
#define EE_FEATURE_FIELD
#define SDRATTR_MISC_FIRST
Definition: svddef.hxx:198
void ActionChanged() const
Definition: svdobj.cxx:256
virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:272
#define EE_CHAR_COLOR
#define SDRATTR_TEXTDIRECTION
Definition: svddef.hxx:307
virtual sal_uInt16 GetObjIdentifier() const override
Definition: svdotext.cxx:415
#define XATTR_LINESTYLE
Definition: xdef.hxx:90
#define SDRATTR_START
Definition: svddef.hxx:173
#define SDRATTR_TEXT_CONTOURFRAME
Definition: svddef.hxx:220
virtual SdrText * getActiveText() const
returns the currently active text.
Definition: svdotext.cxx:2040
virtual sal_uInt32 getVersion() const override
Abstract DrawObject.
Definition: svdobj.hxx:312
sal_Int16 GetDepth(sal_Int32 nPara) const
virtual SdrInventor GetObjInventor() const
Definition: svdobj.cxx:552
virtual void ItemSetChanged(const SfxItemSet &rSet) override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
#define SDRATTR_TEXT_UPPERDIST
Definition: svddef.hxx:205
#define XATTR_LINEWIDTH
Definition: xdef.hxx:92
virtual void SetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr) override
#define SDRATTR_TEXT_RIGHTDIST
Definition: svddef.hxx:204
TitleText, special text object for StarDraw.
Definition: svdobj.hxx:135
std::unique_ptr< OutlinerParaObject > CreateParaObject(sal_Int32 nStartPara=0, sal_Int32 nParaCount=EE_PARA_ALL) const
virtual void ForceStyleToHardAttributes() override
void SetObjectItemNoBroadcast(const SfxPoolItem &rItem)
SfxStyleSheetBasePool * GetStyleSheetPool() const
Definition: svdmodel.hxx:538
void NbcSetOutlinerParaObjectForText(std::unique_ptr< OutlinerParaObject > pTextObject, SdrText *pText)
Definition: svdotext.cxx:1368
std::unique_ptr< SdrOutliner > SdrMakeOutliner(OutlinerMode nOutlinerMode, SdrModel &rModel)
Create an Outliner with the engine-global default settings on the heap.
Definition: svdetc.cxx:328
void QuickSetAttribs(const SfxItemSet &rSet, const ESelection &rSel)
constexpr::Color COL_WHITE(0xFF, 0xFF, 0xFF)
SdrMetricItem makeSdrTextLeftDistItem(long mnHeight)
Definition: sdtditm.hxx:25
void SetStyleSheet(sal_Int32 nPara, SfxStyleSheet *pStyle)
virtual ~TextProperties() override
SdrMetricItem makeSdrTextRightDistItem(long mnHeight)
Definition: sdtditm.hxx:29
const SdrObject & GetSdrObject() const
Definition: properties.cxx:59
void Clear()
OutlinerParaObject * GetOutlinerParaObject() const
Definition: svdtext.cxx:88
SdrObjKind GetTextKind() const
Definition: svdotext.hxx:358
#define SDRATTR_TEXT_LOWERDIST
Definition: svddef.hxx:206
virtual void ForceDefaultAttributes() override
bool IsInvalidItem(const SfxPoolItem *pItem)
SdrMetricItem makeSdrTextLowerDistItem(long mnHeight)
Definition: sdtditm.hxx:37
virtual const svx::ITextProvider & getTextProvider() const
Get the TextProvider related to our SdrObject.
#define EE_TEXTPOS_ALL
SdrOutliner & ImpGetDrawOutliner() const
Definition: svdotext.cxx:1144
virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
text object
Definition: svdobj.hxx:134
virtual void SetVerticalWriting(bool bVertical)
Definition: svdotext.cxx:1501
virtual void ForceStyleToHardAttributes() override
#define SDRATTR_TEXT_LEFTDIST
Definition: svddef.hxx:203
virtual SdrText * getText(sal_Int32 nIndex) const =0
Return the nth available text.
virtual void ItemSetChanged(const SfxItemSet &rSet) override
const SvxFieldData * GetField() const
sal_Int32 nStartPos
#define EE_ITEMS_END