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