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>
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
45using namespace com::sun::star;
46
47namespace sdr::properties
48{
50 {
51 return SfxItemSet(rPool,
52
53 // range from SdrAttrObj
58
59 // range from SdrTextObj
61 }
62
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
84 void TextProperties::ItemSetChanged(o3tl::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich)
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(),
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 for (const SfxPoolItem* pItem : aChangedItems)
125 aSet.Put(*pItem);
126 if (nDeletedWhich)
127 aSet.ClearItem(nDeletedWhich);
128 pOutliner->SetParaAttribs(nPara, aSet);
129 }
130
131 if(!bTextEdit)
132 {
133 if(nParaCount)
134 {
135 // force ItemSet
137
138 mxItemSet->Put(pOutliner->GetParaAttribs(0));
139 }
140
141 std::optional<OutlinerParaObject> pTemp = pOutliner->CreateParaObject(0, nParaCount);
142 pOutliner->Clear();
143
144 rObj.NbcSetOutlinerParaObjectForText(std::move(pTemp),pText);
145 }
146 }
147 }
148
149 // Extra-Repaint for radical layout changes (#43139#)
150 for (const SfxPoolItem* pItem : aChangedItems)
151 if (pItem->Which() == SDRATTR_TEXT_CONTOURFRAME)
152 {
153 // Here only repaint wanted
154 rObj.ActionChanged();
155 //rObj.BroadcastObjectChange();
156 break;
157 }
158
159 // call parent
160 AttributeProperties::ItemSetChanged(aChangedItems, nDeletedWhich);
161 }
162
163 void TextProperties::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem)
164 {
165 SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
166
167 // #i25616#
168 sal_Int32 nOldLineWidth(0);
169
171 {
172 nOldLineWidth = GetItem(XATTR_LINEWIDTH).GetValue();
173 }
174
175 if(pNewItem && (SDRATTR_TEXTDIRECTION == nWhich))
176 {
177 bool bVertical(css::text::WritingMode_TB_RL == static_cast<const SvxWritingModeItem*>(pNewItem)->GetValue());
178 rObj.SetVerticalWriting(bVertical);
179 }
180
181 // #95501# reset to default
182 if(!pNewItem && !nWhich && rObj.HasText() )
183 {
184 SdrOutliner& rOutliner = rObj.ImpGetDrawOutliner();
185
186 const svx::ITextProvider& rTextProvider(getTextProvider());
187 sal_Int32 nCount = rTextProvider.getTextCount();
188 while (nCount--)
189 {
190 SdrText* pText = rTextProvider.getText( nCount );
191 OutlinerParaObject* pParaObj = pText->GetOutlinerParaObject();
192 if( pParaObj )
193 {
194 rOutliner.SetText(*pParaObj);
195 sal_Int32 nParaCount(rOutliner.GetParagraphCount());
196
197 if(nParaCount)
198 {
199 ESelection aSelection( 0, 0, EE_PARA_ALL, EE_TEXTPOS_ALL);
200 rOutliner.RemoveAttribs(aSelection, true, 0);
201
202 std::optional<OutlinerParaObject> pTemp = rOutliner.CreateParaObject(0, nParaCount);
203 rOutliner.Clear();
204
205 rObj.NbcSetOutlinerParaObjectForText( std::move(pTemp), pText );
206 }
207 }
208 }
209 }
210
211 // call parent
212 AttributeProperties::ItemChange( nWhich, pNewItem );
213
214 // #i25616#
216 return;
217
218 const sal_Int32 nNewLineWidth(GetItem(XATTR_LINEWIDTH).GetValue());
219 const sal_Int32 nDifference((nNewLineWidth - nOldLineWidth) / 2);
220
221 if(!nDifference)
222 return;
223
224 const bool bLineVisible(drawing::LineStyle_NONE != GetItem(XATTR_LINESTYLE).GetValue());
225
226 if(bLineVisible)
227 {
228 const sal_Int32 nLeftDist(GetItem(SDRATTR_TEXT_LEFTDIST).GetValue());
229 const sal_Int32 nRightDist(GetItem(SDRATTR_TEXT_RIGHTDIST).GetValue());
230 const sal_Int32 nUpperDist(GetItem(SDRATTR_TEXT_UPPERDIST).GetValue());
231 const sal_Int32 nLowerDist(GetItem(SDRATTR_TEXT_LOWERDIST).GetValue());
232
233 SetObjectItemDirect(makeSdrTextLeftDistItem(nLeftDist + nDifference));
234 SetObjectItemDirect(makeSdrTextRightDistItem(nRightDist + nDifference));
235 SetObjectItemDirect(makeSdrTextUpperDistItem(nUpperDist + nDifference));
236 SetObjectItemDirect(makeSdrTextLowerDistItem(nLowerDist + nDifference));
237 }
238 }
239
241 {
242 return static_cast<const SdrTextObj&>(GetSdrObject());
243 }
244
245 void TextProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
246 bool bBroadcast)
247 {
248 // call parent (always first thing to do, may create the SfxItemSet)
249 AttributeProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr, bBroadcast);
250
251 // #i101556# StyleSheet has changed -> new version
252 SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
253 maVersion++;
254
255 if(!rObj.IsLinkedText() )
256 {
257 SdrOutliner& rOutliner = rObj.ImpGetDrawOutliner();
258
259 const svx::ITextProvider& rTextProvider(getTextProvider());
260 sal_Int32 nText = rTextProvider.getTextCount();
261 while (nText--)
262 {
263 SdrText* pText = rTextProvider.getText( nText );
264
265 OutlinerParaObject* pParaObj = pText ? pText->GetOutlinerParaObject() : nullptr;
266 if( !pParaObj )
267 continue;
268
269 // apply StyleSheet to all paragraphs
270 rOutliner.SetText(*pParaObj);
271 sal_Int32 nParaCount(rOutliner.GetParagraphCount());
272
273 if(nParaCount)
274 {
275 for(sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
276 {
277 std::optional<SfxItemSet> pTempSet;
278
279 // since setting the stylesheet removes all para attributes
280 if(bDontRemoveHardAttr)
281 {
282 // we need to remember them if we want to keep them
283 pTempSet.emplace(rOutliner.GetParaAttribs(nPara));
284 }
285
286 if(GetStyleSheet())
287 {
289 {
290 OUString aNewStyleSheetName(GetStyleSheet()->GetName());
291 aNewStyleSheetName = aNewStyleSheetName.copy(0, aNewStyleSheetName.getLength() - 1);
292 sal_Int16 nDepth = rOutliner.GetDepth(nPara);
293 aNewStyleSheetName += OUString::number( nDepth <= 0 ? 1 : nDepth + 1);
295 SfxStyleSheet* pNewStyle = nullptr;
296 if(pStylePool)
297 pNewStyle = static_cast<SfxStyleSheet*>(pStylePool->Find(aNewStyleSheetName, GetStyleSheet()->GetFamily()));
298 DBG_ASSERT( pNewStyle, "AutoStyleSheetName - Style not found!" );
299
300 if(pNewStyle)
301 {
302 rOutliner.SetStyleSheet(nPara, pNewStyle);
303 }
304 }
305 else
306 {
307 rOutliner.SetStyleSheet(nPara, GetStyleSheet());
308 }
309 }
310 else
311 {
312 // remove StyleSheet
313 rOutliner.SetStyleSheet(nPara, nullptr);
314 }
315
316 if(bDontRemoveHardAttr)
317 {
318 if(pTempSet)
319 {
320 // restore para attributes
321 rOutliner.SetParaAttribs(nPara, *pTempSet);
322 }
323 }
324 else
325 {
326 if(pNewStyleSheet)
327 {
328 // remove all hard paragraph attributes
329 // which occur in StyleSheet, take care of
330 // parents (!)
331 SfxItemIter aIter(pNewStyleSheet->GetItemSet());
332
333 for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem;
334 pItem = aIter.NextItem())
335 {
336 if(!IsInvalidItem(pItem))
337 {
338 sal_uInt16 nW(pItem->Which());
339
340 if(nW >= EE_ITEMS_START && nW <= EE_ITEMS_END)
341 {
342 rOutliner.RemoveCharAttribs(nPara, nW);
343 }
344 }
345 }
346 }
347 }
348 }
349
350 std::optional<OutlinerParaObject> pTemp = rOutliner.CreateParaObject(0, nParaCount);
351 rOutliner.Clear();
352 rObj.NbcSetOutlinerParaObjectForText(std::move(pTemp), pText);
353 }
354 }
355 }
356
357 if(rObj.IsTextFrame())
358 {
360 }
361 }
362
364 {
365 SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
366
368 {
369 const SdrObjKind nSdrObjKind = rObj.GetObjIdentifier();
370
371 if( nSdrObjKind == SdrObjKind::TitleText || nSdrObjKind == SdrObjKind::OutlineText )
372 return; // no defaults for presentation objects
373 }
374
375 bool bTextFrame(rObj.IsTextFrame());
376
377 // force ItemSet
379
380 if(bTextFrame)
381 {
382 mxItemSet->Put(XLineStyleItem(drawing::LineStyle_NONE));
383 mxItemSet->Put(XFillColorItem(OUString(), COL_WHITE));
384 mxItemSet->Put(XFillStyleItem(drawing::FillStyle_NONE));
385 }
386 else
387 {
388 mxItemSet->Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST));
391 }
392 }
393
395 {
396 // #i61284# call parent first to get the hard ObjectItemSet
398
399 // #i61284# push hard ObjectItemSet to OutlinerParaObject attributes
400 // using existing functionality
401 GetObjectItemSet(); // force ItemSet
402 std::vector<const SfxPoolItem*> aChangedItems;
403 SfxItemIter aIter(*mxItemSet);
404 for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem; pItem = aIter.NextItem())
405 {
406 if(!IsInvalidItem(pItem))
407 aChangedItems.push_back(pItem);
408 }
409 ItemSetChanged(aChangedItems, 0);
410
411 // now the standard TextProperties stuff
412 SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
413
414 if(rObj.IsTextEditActive() || rObj.IsLinkedText())
415 return;
416
417 std::unique_ptr<Outliner> pOutliner = SdrMakeOutliner(OutlinerMode::OutlineObject, rObj.getSdrModelFromSdrObject());
418 const svx::ITextProvider& rTextProvider(getTextProvider());
419 sal_Int32 nText = rTextProvider.getTextCount();
420 while (nText--)
421 {
422 SdrText* pText = rTextProvider.getText( nText );
423
424 OutlinerParaObject* pParaObj = pText ? pText->GetOutlinerParaObject() : nullptr;
425 if( !pParaObj )
426 continue;
427
428 pOutliner->SetText(*pParaObj);
429
430 sal_Int32 nParaCount(pOutliner->GetParagraphCount());
431
432 if(nParaCount)
433 {
434 bool bBurnIn(false);
435
436 for(sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
437 {
438 SfxStyleSheet* pSheet = pOutliner->GetStyleSheet(nPara);
439
440 if(pSheet)
441 {
442 SfxItemSet aParaSet(pOutliner->GetParaAttribs(nPara));
443 SfxItemSet aSet(*aParaSet.GetPool());
444 aSet.Put(pSheet->GetItemSet());
445
464 bool bHasURL(false);
465
466 if(aSet.GetItemState(EE_CHAR_COLOR) == SfxItemState::SET)
467 {
468 EditEngine* pEditEngine = const_cast<EditEngine*>(&(pOutliner->GetEditEngine()));
469 std::vector<EECharAttrib> aAttribs;
470 pEditEngine->GetCharAttribs(nPara, aAttribs);
471
472 for(const auto& rAttrib : aAttribs)
473 {
474 if(rAttrib.pAttr && EE_FEATURE_FIELD == rAttrib.pAttr->Which())
475 {
476 const SvxFieldItem* pFieldItem = static_cast<const SvxFieldItem*>(rAttrib.pAttr);
477
478 if(pFieldItem)
479 {
480 const SvxFieldData* pData = pFieldItem->GetField();
481
482 if(dynamic_cast<const SvxURLField*>( pData))
483 {
484 bHasURL = true;
485 break;
486 }
487 }
488 }
489 }
490
491 if(bHasURL)
492 {
494 aColorSet.Put(aSet, false);
495
496 ESelection aSel(nPara, 0);
497
498 for(const auto& rAttrib : aAttribs)
499 {
500 if(EE_FEATURE_FIELD == rAttrib.pAttr->Which())
501 {
502 aSel.nEndPos = rAttrib.nStart;
503
504 if(aSel.nStartPos != aSel.nEndPos)
505 pEditEngine->QuickSetAttribs(aColorSet, aSel);
506
507 aSel.nStartPos = rAttrib.nEnd;
508 }
509 }
510
511 aSel.nEndPos = pEditEngine->GetTextLen(nPara);
512
513 if(aSel.nStartPos != aSel.nEndPos)
514 {
515 pEditEngine->QuickSetAttribs( aColorSet, aSel );
516 }
517 }
518
519 }
520
521 aSet.Put(aParaSet, false);
522
523 if(bHasURL)
524 {
526 }
527
528 pOutliner->SetParaAttribs(nPara, aSet);
529 bBurnIn = true; // #i51163# Flag was set wrong
530 }
531 }
532
533 if(bBurnIn)
534 {
535 std::optional<OutlinerParaObject> pTemp = pOutliner->CreateParaObject(0, nParaCount);
536 rObj.NbcSetOutlinerParaObjectForText(std::move(pTemp),pText);
537 }
538 }
539
540 pOutliner->Clear();
541 }
542 }
543
545 {
547 mxItemSet->Put(rItem);
548 }
549
550
552 {
553 // call parent
554 AttributeProperties::Notify(rBC, rHint);
555
556 SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
557 if(!rObj.HasText())
558 return;
559
560 const svx::ITextProvider& rTextProvider(getTextProvider());
561 if(dynamic_cast<const SfxStyleSheet *>(&rBC) != nullptr)
562 {
563 SfxHintId nId(rHint.GetId());
564
565 if(SfxHintId::DataChanged == nId)
566 {
567 sal_Int32 nText = rTextProvider.getTextCount();
568 while (nText--)
569 {
570 OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
571 if( pParaObj )
572 pParaObj->ClearPortionInfo();
573 }
574 rObj.SetTextSizeDirty();
575
577 {
578 // here only repaint wanted
579 rObj.ActionChanged();
580 //rObj.BroadcastObjectChange();
581 }
582
583 // #i101556# content of StyleSheet has changed -> new version
584 maVersion++;
585 }
586
587 if(SfxHintId::Dying == nId)
588 {
589 sal_Int32 nText = rTextProvider.getTextCount();
590 while (nText--)
591 {
592 OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
593 if( pParaObj )
594 pParaObj->ClearPortionInfo();
595 }
596 }
597 }
598 else if(dynamic_cast<const SfxStyleSheetBasePool *>(&rBC) != nullptr)
599 {
600 const SfxStyleSheetModifiedHint* pExtendedHint = dynamic_cast<const SfxStyleSheetModifiedHint*>(&rHint);
601
602 if(pExtendedHint
603 && SfxHintId::StyleSheetModified == pExtendedHint->GetId())
604 {
605 const OUString& aOldName(pExtendedHint->GetOldName());
606 OUString aNewName(pExtendedHint->GetStyleSheet()->GetName());
607 SfxStyleFamily eFamily = pExtendedHint->GetStyleSheet()->GetFamily();
608
609 if(aOldName != aNewName)
610 {
611 sal_Int32 nText = rTextProvider.getTextCount();
612 while (nText--)
613 {
614 OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
615 if( pParaObj )
616 pParaObj->ChangeStyleSheetName(eFamily, aOldName, aNewName);
617 }
618 }
619 }
620 }
621 }
622
623 // #i101556# Handout version information
624 sal_uInt32 TextProperties::getVersion() const
625 {
626 return maVersion;
627 }
628} // end of namespace
629
630/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int32 GetTextLen() const
void QuickSetAttribs(const SfxItemSet &rSet, const ESelection &rSel)
void GetCharAttribs(sal_Int32 nPara, std::vector< EECharAttrib > &rLst) const
void ChangeStyleSheetName(SfxStyleFamily eFamily, std::u16string_view rOldName, const OUString &rNewName)
void SetText(const OutlinerParaObject &)
std::optional< OutlinerParaObject > CreateParaObject(sal_Int32 nStartPara=0, sal_Int32 nParaCount=EE_PARA_ALL) const
void Clear()
sal_Int16 GetDepth(sal_Int32 nPara) const
void SetStyleSheet(sal_Int32 nPara, SfxStyleSheet *pStyle)
void SetParaAttribs(sal_Int32 nPara, const SfxItemSet &)
void RemoveAttribs(const ESelection &rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich)
SfxItemSet const & GetParaAttribs(sal_Int32 nPara) const
void RemoveCharAttribs(sal_Int32 nPara, sal_uInt16 nWhich=0)
sal_Int32 GetParagraphCount() const
SfxStyleSheetBasePool * GetStyleSheetPool() const
Definition: svdmodel.hxx:538
Abstract DrawObject.
Definition: svdobj.hxx:260
void ActionChanged() const
Definition: svdobj.cxx:273
virtual SdrInventor GetObjInventor() const
Definition: svdobj.cxx:621
bool DoesSupportTextIndentingOnLineWidthChange() const
Definition: svdobj.hxx:847
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:289
bool IsTextEditActive() const
Definition: svdotext.hxx:379
SdrOutliner & ImpGetDrawOutliner() const
Definition: svdotext.cxx:1194
sal_Int32 GetTextColumnsSpacing() const
Definition: svdotext.cxx:1869
virtual SdrText * getActiveText() const
returns the currently active text.
Definition: svdotext.cxx:2147
void NbcSetOutlinerParaObjectForText(std::optional< OutlinerParaObject > pTextObject, SdrText *pText)
Definition: svdotext.cxx:1435
virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt=true, bool bWdt=true)
Definition: svdotxat.cxx:241
bool IsLinkedText() const
Definition: svdotext.hxx:352
void SetTextSizeDirty()
Definition: svdotext.hxx:301
SdrObjKind GetTextKind() const
Definition: svdotext.hxx:374
virtual bool HasText() const override
Definition: svdotxat.cxx:420
virtual void SetVerticalWriting(bool bVertical)
Definition: svdotext.cxx:1568
bool IsTextFrame() const
Definition: svdotext.hxx:359
virtual SdrObjKind GetObjIdentifier() const override
Definition: svdotext.cxx:453
SVX_DLLPRIVATE SdrOutliner * GetTextEditOutliner() const
Definition: svdotext.hxx:143
sal_Int16 GetTextColumnsNumber() const
Definition: svdotext.cxx:1854
OutlinerParaObject * GetOutlinerParaObject()
Definition: svdtext.cxx:78
SfxHintId GetId() const
const SfxPoolItem * GetCurItem() const
const SfxPoolItem * NextItem()
SfxItemPool * GetPool() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
virtual SfxItemSet & GetItemSet()
const SvxFieldData * GetField() const
virtual void ItemSetChanged(o3tl::span< const SfxPoolItem *const > aChangedItems, sal_uInt16 nDeletedWhich) override
virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
virtual void ForceStyleToHardAttributes() override
virtual const SfxItemSet & GetObjectItemSet() const override
virtual void SetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast) override
virtual SfxStyleSheet * GetStyleSheet() const override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
const SdrObject & GetSdrObject() const
Definition: properties.cxx:43
const SfxPoolItem & GetItem(const sal_uInt16 nWhich) const
Definition: properties.cxx:103
std::optional< SfxItemSet > mxItemSet
virtual void SetObjectItemDirect(const SfxPoolItem &rItem) override
virtual void SetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast) override
virtual std::unique_ptr< BaseProperties > Clone(SdrObject &rObj) const override
void SetObjectItemNoBroadcast(const SfxPoolItem &rItem)
virtual const svx::ITextProvider & getTextProvider() const
Get the TextProvider related to our SdrObject.
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
virtual void ForceStyleToHardAttributes() override
virtual void ForceDefaultAttributes() override
virtual void ItemSetChanged(o3tl::span< const SfxPoolItem *const > aChangedItems, sal_uInt16 nDeletedWhich) override
virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool &rPool) override
virtual sal_uInt32 getVersion() const override
virtual ~TextProperties() override
This interface provides access to text object(s) in an SdrObject.
virtual sal_Int32 getTextCount() const =0
Return the number of texts available for this object.
virtual SdrText * getText(sal_Int32 nIndex) const =0
Return the nth available text.
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
int nCount
#define DBG_ASSERT(sCon, aError)
virtual OUString GetName() const override
#define EE_PARA_ALL
#define EE_TEXTPOS_ALL
constexpr TypedWhichId< SvxFieldItem > EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
constexpr TypedWhichId< SvxAdjustItem > EE_PARA_JUST(EE_PARA_START+16)
constexpr sal_uInt16 EE_ITEMS_END(EE_FEATURE_END)
constexpr TypedWhichId< SvxColorItem > EE_CHAR_COLOR(EE_CHAR_START+0)
constexpr sal_uInt16 EE_ITEMS_START(OWN_ATTR_VALUE_END+1)
SfxHintId
std::unique_ptr< sal_Int32[]> pData
static constexpr auto Items
sal_Int16 nId
const char GetValue[]
bool IsInvalidItem(const SfxPoolItem *pItem)
@ SDRTEXTVERTADJUST_CENTER
Definition: sdtaitm.hxx:30
@ SDRTEXTHORZADJUST_CENTER
Definition: sdtaitm.hxx:54
SdrMetricItem makeSdrTextUpperDistItem(tools::Long mnHeight)
Definition: sdtditm.hxx:35
SdrMetricItem makeSdrTextRightDistItem(tools::Long mnHeight)
Definition: sdtditm.hxx:30
SdrMetricItem makeSdrTextLowerDistItem(tools::Long mnHeight)
Definition: sdtditm.hxx:40
SdrMetricItem makeSdrTextLeftDistItem(tools::Long mnHeight)
Definition: sdtditm.hxx:25
sal_Int32 nEndPos
sal_Int32 nStartPos
SfxStyleFamily
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_LEFTDIST(SDRATTR_MISC_FIRST+4)
constexpr sal_uInt16 SDRATTR_START(XATTR_START)
constexpr sal_uInt16 SDRATTR_TEXTCOLUMNS_FIRST(SDRATTR_SOFTEDGE_LAST+1)
constexpr sal_uInt16 SDRATTR_MISC_LAST(SDRATTR_TEXT_CLIPVERTOVERFLOW)
constexpr sal_uInt16 SDRATTR_MISC_FIRST(SDRATTR_CAPTION_LAST+1)
constexpr sal_uInt16 SDRATTR_TEXTCOLUMNS_LAST(SDRATTR_TEXTCOLUMNS_SPACING)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_RIGHTDIST(SDRATTR_MISC_FIRST+5)
constexpr sal_uInt16 SDRATTR_SHADOW_LAST(SDRATTR_SHADOWALIGNMENT)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_LOWERDIST(SDRATTR_MISC_FIRST+7)
constexpr TypedWhichId< SvxWritingModeItem > SDRATTR_TEXTDIRECTION(SDRATTR_NOTPERSIST_FIRST+34)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_UPPERDIST(SDRATTR_MISC_FIRST+6)
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_TEXT_CONTOURFRAME(SDRATTR_MISC_FIRST+21)
std::unique_ptr< SdrOutliner > SdrMakeOutliner(OutlinerMode nOutlinerMode, SdrModel &rModel)
Create an Outliner with the engine-global default settings on the heap.
Definition: svdetc.cxx:332
SdrObjKind
Definition: svdobjkind.hxx:25
@ OutlineText
TitleText, special text object for StarDraw.
@ TitleText
text object
constexpr TypedWhichId< XLineWidthItem > XATTR_LINEWIDTH(XATTR_LINE_FIRST+2)
constexpr TypedWhichId< XLineStyleItem > XATTR_LINESTYLE(XATTR_LINE_FIRST)