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