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  return;
206 
207  const sal_Int32 nNewLineWidth(GetItem(XATTR_LINEWIDTH).GetValue());
208  const sal_Int32 nDifference((nNewLineWidth - nOldLineWidth) / 2);
209 
210  if(!nDifference)
211  return;
212 
213  const bool bLineVisible(drawing::LineStyle_NONE != GetItem(XATTR_LINESTYLE).GetValue());
214 
215  if(bLineVisible)
216  {
217  const sal_Int32 nLeftDist(GetItem(SDRATTR_TEXT_LEFTDIST).GetValue());
218  const sal_Int32 nRightDist(GetItem(SDRATTR_TEXT_RIGHTDIST).GetValue());
219  const sal_Int32 nUpperDist(GetItem(SDRATTR_TEXT_UPPERDIST).GetValue());
220  const sal_Int32 nLowerDist(GetItem(SDRATTR_TEXT_LOWERDIST).GetValue());
221 
222  SetObjectItemDirect(makeSdrTextLeftDistItem(nLeftDist + nDifference));
223  SetObjectItemDirect(makeSdrTextRightDistItem(nRightDist + nDifference));
224  SetObjectItemDirect(makeSdrTextUpperDistItem(nUpperDist + nDifference));
225  SetObjectItemDirect(makeSdrTextLowerDistItem(nLowerDist + nDifference));
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  return;
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 
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  return;
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  // #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: */
SdrMetricItem makeSdrTextUpperDistItem(tools::Long mnHeight)
Definition: sdtditm.hxx:35
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
virtual SdrObjKind GetObjIdentifier() const override
Definition: svdotext.cxx:415
std::unique_ptr< ContentProperties > pData
std::string GetValue
bool IsLinkedText() const
Definition: svdotext.hxx:336
bool DoesSupportTextIndentingOnLineWidthChange() const
Definition: svdobj.hxx:843
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_TEXT_CONTOURFRAME(SDRATTR_MISC_FIRST+21)
bool IsTextFrame() const
Definition: svdotext.hxx:343
constexpr TypedWhichId< XLineWidthItem > XATTR_LINEWIDTH(XATTR_LINE_FIRST+2)
sal_Int16 nId
constexpr sal_uInt16 EE_ITEMS_END(EE_FEATURE_END)
virtual void SetObjectItemDirect(const SfxPoolItem &rItem) override
constexpr TypedWhichId< XLineStyleItem > XATTR_LINESTYLE(XATTR_LINE_FIRST)
sal_Int32 GetParagraphCount() const
virtual const SfxItemSet & GetObjectItemSet() const override
constexpr TypedWhichId< SvxAdjustItem > EE_PARA_JUST(EE_PARA_START+15)
virtual SfxItemSet & GetItemSet()
SdrMetricItem makeSdrTextRightDistItem(tools::Long mnHeight)
Definition: sdtditm.hxx:30
SdrMetricItem makeSdrTextLowerDistItem(tools::Long mnHeight)
Definition: sdtditm.hxx:40
constexpr sal_uInt16 SDRATTR_MISC_LAST(SDRATTR_TEXT_CHAINNEXTNAME)
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:413
constexpr sal_uInt16 SDRATTR_START(XATTR_START)
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
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_LOWERDIST(SDRATTR_MISC_FIRST+7)
void SetParaAttribs(sal_Int32 nPara, const SfxItemSet &)
void RemoveAttribs(const ESelection &rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich)
constexpr TypedWhichId< SvxWritingModeItem > SDRATTR_TEXTDIRECTION(SDRATTR_NOTPERSIST_FIRST+34)
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
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_LEFTDIST(SDRATTR_MISC_FIRST+4)
void ActionChanged() const
Definition: svdobj.cxx:257
constexpr sal_uInt16 EE_ITEMS_START(OWN_ATTR_VALUE_END+1)
virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:273
virtual SdrText * getActiveText() const
returns the currently active text.
Definition: svdotext.cxx:2048
virtual sal_uInt32 getVersion() const override
Abstract DrawObject.
Definition: svdobj.hxx:260
sal_Int16 GetDepth(sal_Int32 nPara) const
virtual SdrInventor GetObjInventor() const
Definition: svdobj.cxx:553
SdrMetricItem makeSdrTextLeftDistItem(tools::Long mnHeight)
Definition: sdtditm.hxx:25
virtual void ItemSetChanged(const SfxItemSet &rSet) override
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_UPPERDIST(SDRATTR_MISC_FIRST+6)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual void SetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr) override
constexpr sal_uInt16 SDRATTR_SHADOW_LAST(SDRATTR_SHADOWBLUR)
std::unique_ptr< OutlinerParaObject > CreateParaObject(sal_Int32 nStartPara=0, sal_Int32 nParaCount=EE_PARA_ALL) const
virtual void ForceStyleToHardAttributes() override
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_RIGHTDIST(SDRATTR_MISC_FIRST+5)
void SetObjectItemNoBroadcast(const SfxPoolItem &rItem)
SfxStyleSheetBasePool * GetStyleSheetPool() const
Definition: svdmodel.hxx:537
void NbcSetOutlinerParaObjectForText(std::unique_ptr< OutlinerParaObject > pTextObject, SdrText *pText)
Definition: svdotext.cxx:1376
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
constexpr TypedWhichId< SvxColorItem > EE_CHAR_COLOR(EE_CHAR_START+0)
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)
void SetStyleSheet(sal_Int32 nPara, SfxStyleSheet *pStyle)
virtual ~TextProperties() override
text object
Definition: svdobjkind.hxx:43
const SdrObject & GetSdrObject() const
Definition: properties.cxx:59
constexpr sal_uInt16 EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
void Clear()
OutlinerParaObject * GetOutlinerParaObject() const
Definition: svdtext.cxx:88
SdrObjKind GetTextKind() const
Definition: svdotext.hxx:358
virtual void ForceDefaultAttributes() override
bool IsInvalidItem(const SfxPoolItem *pItem)
TitleText, special text object for StarDraw.
Definition: svdobjkind.hxx:44
constexpr sal_uInt16 SDRATTR_MISC_FIRST(SDRATTR_CAPTION_LAST+1)
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
virtual void SetVerticalWriting(bool bVertical)
Definition: svdotext.cxx:1509
virtual void ForceStyleToHardAttributes() override
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