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