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 SfxItemSet aNewSet(pOutliner->GetParaAttribs(0));
139 mxItemSet->Put(aNewSet);
140 }
141
142 std::optional<OutlinerParaObject> pTemp = pOutliner->CreateParaObject(0, nParaCount);
143 pOutliner->Clear();
144
145 rObj.NbcSetOutlinerParaObjectForText(std::move(pTemp),pText);
146 }
147 }
148 }
149
150 // Extra-Repaint for radical layout changes (#43139#)
151 for (const SfxPoolItem* pItem : aChangedItems)
152 if (pItem->Which() == SDRATTR_TEXT_CONTOURFRAME)
153 {
154 // Here only repaint wanted
155 rObj.ActionChanged();
156 //rObj.BroadcastObjectChange();
157 break;
158 }
159
160 // call parent
161 AttributeProperties::ItemSetChanged(aChangedItems, nDeletedWhich);
162 }
163
164 void TextProperties::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem)
165 {
166 SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
167
168 // #i25616#
169 sal_Int32 nOldLineWidth(0);
170
172 {
173 nOldLineWidth = GetItem(XATTR_LINEWIDTH).GetValue();
174 }
175
176 if(pNewItem && (SDRATTR_TEXTDIRECTION == nWhich))
177 {
178 bool bVertical(css::text::WritingMode_TB_RL == static_cast<const SvxWritingModeItem*>(pNewItem)->GetValue());
179 rObj.SetVerticalWriting(bVertical);
180 }
181
182 // #95501# reset to default
183 if(!pNewItem && !nWhich && rObj.HasText() )
184 {
185 SdrOutliner& rOutliner = rObj.ImpGetDrawOutliner();
186
187 const svx::ITextProvider& rTextProvider(getTextProvider());
188 sal_Int32 nCount = rTextProvider.getTextCount();
189 while (nCount--)
190 {
191 SdrText* pText = rTextProvider.getText( nCount );
192 OutlinerParaObject* pParaObj = pText->GetOutlinerParaObject();
193 if( pParaObj )
194 {
195 rOutliner.SetText(*pParaObj);
196 sal_Int32 nParaCount(rOutliner.GetParagraphCount());
197
198 if(nParaCount)
199 {
200 ESelection aSelection( 0, 0, EE_PARA_ALL, EE_TEXTPOS_ALL);
201 rOutliner.RemoveAttribs(aSelection, true, 0);
202
203 std::optional<OutlinerParaObject> pTemp = rOutliner.CreateParaObject(0, nParaCount);
204 rOutliner.Clear();
205
206 rObj.NbcSetOutlinerParaObjectForText( std::move(pTemp), pText );
207 }
208 }
209 }
210 }
211
212 // call parent
213 AttributeProperties::ItemChange( nWhich, pNewItem );
214
215 // #i25616#
217 return;
218
219 const sal_Int32 nNewLineWidth(GetItem(XATTR_LINEWIDTH).GetValue());
220 const sal_Int32 nDifference((nNewLineWidth - nOldLineWidth) / 2);
221
222 if(!nDifference)
223 return;
224
225 const bool bLineVisible(drawing::LineStyle_NONE != GetItem(XATTR_LINESTYLE).GetValue());
226
227 if(bLineVisible)
228 {
229 const sal_Int32 nLeftDist(GetItem(SDRATTR_TEXT_LEFTDIST).GetValue());
230 const sal_Int32 nRightDist(GetItem(SDRATTR_TEXT_RIGHTDIST).GetValue());
231 const sal_Int32 nUpperDist(GetItem(SDRATTR_TEXT_UPPERDIST).GetValue());
232 const sal_Int32 nLowerDist(GetItem(SDRATTR_TEXT_LOWERDIST).GetValue());
233
234 SetObjectItemDirect(makeSdrTextLeftDistItem(nLeftDist + nDifference));
235 SetObjectItemDirect(makeSdrTextRightDistItem(nRightDist + nDifference));
236 SetObjectItemDirect(makeSdrTextUpperDistItem(nUpperDist + nDifference));
237 SetObjectItemDirect(makeSdrTextLowerDistItem(nLowerDist + nDifference));
238 }
239 }
240
242 {
243 return static_cast<const SdrTextObj&>(GetSdrObject());
244 }
245
246 void TextProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
247 bool bBroadcast)
248 {
249 // call parent (always first thing to do, may create the SfxItemSet)
250 AttributeProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr, bBroadcast);
251
252 // #i101556# StyleSheet has changed -> new version
253 SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
254 maVersion++;
255
256 if(!rObj.IsLinkedText() )
257 {
258 SdrOutliner& rOutliner = rObj.ImpGetDrawOutliner();
259
260 const svx::ITextProvider& rTextProvider(getTextProvider());
261 sal_Int32 nText = rTextProvider.getTextCount();
262 while (nText--)
263 {
264 SdrText* pText = rTextProvider.getText( nText );
265
266 OutlinerParaObject* pParaObj = pText ? pText->GetOutlinerParaObject() : nullptr;
267 if( !pParaObj )
268 continue;
269
270 // apply StyleSheet to all paragraphs
271 rOutliner.SetText(*pParaObj);
272 sal_Int32 nParaCount(rOutliner.GetParagraphCount());
273
274 if(nParaCount)
275 {
276 for(sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
277 {
278 std::optional<SfxItemSet> pTempSet;
279
280 // since setting the stylesheet removes all para attributes
281 if(bDontRemoveHardAttr)
282 {
283 // we need to remember them if we want to keep them
284 pTempSet.emplace(rOutliner.GetParaAttribs(nPara));
285 }
286
287 if(GetStyleSheet())
288 {
290 {
291 OUString aNewStyleSheetName(GetStyleSheet()->GetName());
292 aNewStyleSheetName = aNewStyleSheetName.copy(0, aNewStyleSheetName.getLength() - 1);
293 sal_Int16 nDepth = rOutliner.GetDepth(nPara);
294 aNewStyleSheetName += OUString::number( nDepth <= 0 ? 1 : nDepth + 1);
296 SfxStyleSheet* pNewStyle = nullptr;
297 if(pStylePool)
298 pNewStyle = static_cast<SfxStyleSheet*>(pStylePool->Find(aNewStyleSheetName, GetStyleSheet()->GetFamily()));
299 DBG_ASSERT( pNewStyle, "AutoStyleSheetName - Style not found!" );
300
301 if(pNewStyle)
302 {
303 rOutliner.SetStyleSheet(nPara, pNewStyle);
304 }
305 }
306 else
307 {
308 rOutliner.SetStyleSheet(nPara, GetStyleSheet());
309 }
310 }
311 else
312 {
313 // remove StyleSheet
314 rOutliner.SetStyleSheet(nPara, nullptr);
315 }
316
317 if(bDontRemoveHardAttr)
318 {
319 if(pTempSet)
320 {
321 // restore para attributes
322 rOutliner.SetParaAttribs(nPara, *pTempSet);
323 }
324 }
325 else
326 {
327 if(pNewStyleSheet)
328 {
329 // remove all hard paragraph attributes
330 // which occur in StyleSheet, take care of
331 // parents (!)
332 SfxItemIter aIter(pNewStyleSheet->GetItemSet());
333
334 for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem;
335 pItem = aIter.NextItem())
336 {
337 if(!IsInvalidItem(pItem))
338 {
339 sal_uInt16 nW(pItem->Which());
340
341 if(nW >= EE_ITEMS_START && nW <= EE_ITEMS_END)
342 {
343 rOutliner.RemoveCharAttribs(nPara, nW);
344 }
345 }
346 }
347 }
348 }
349 }
350
351 std::optional<OutlinerParaObject> pTemp = rOutliner.CreateParaObject(0, nParaCount);
352 rOutliner.Clear();
353 rObj.NbcSetOutlinerParaObjectForText(std::move(pTemp), pText);
354 }
355 }
356 }
357
358 if(rObj.IsTextFrame())
359 {
361 }
362 }
363
365 {
366 SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
367
369 {
370 const SdrObjKind nSdrObjKind = rObj.GetObjIdentifier();
371
372 if( nSdrObjKind == SdrObjKind::TitleText || nSdrObjKind == SdrObjKind::OutlineText )
373 return; // no defaults for presentation objects
374 }
375
376 bool bTextFrame(rObj.IsTextFrame());
377
378 // force ItemSet
380
381 if(bTextFrame)
382 {
383 mxItemSet->Put(XLineStyleItem(drawing::LineStyle_NONE));
384 mxItemSet->Put(XFillColorItem(OUString(), COL_WHITE));
385 mxItemSet->Put(XFillStyleItem(drawing::FillStyle_NONE));
386 }
387 else
388 {
389 mxItemSet->Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST));
392 }
393 }
394
396 {
397 // #i61284# call parent first to get the hard ObjectItemSet
399
400 // #i61284# push hard ObjectItemSet to OutlinerParaObject attributes
401 // using existing functionality
402 GetObjectItemSet(); // force ItemSet
403 std::vector<const SfxPoolItem*> aChangedItems;
404 SfxItemIter aIter(*mxItemSet);
405 for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem; pItem = aIter.NextItem())
406 {
407 if(!IsInvalidItem(pItem))
408 aChangedItems.push_back(pItem);
409 }
410 ItemSetChanged(aChangedItems, 0);
411
412 // now the standard TextProperties stuff
413 SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
414
415 if(rObj.IsTextEditActive() || rObj.IsLinkedText())
416 return;
417
418 std::unique_ptr<Outliner> pOutliner = SdrMakeOutliner(OutlinerMode::OutlineObject, rObj.getSdrModelFromSdrObject());
419 const svx::ITextProvider& rTextProvider(getTextProvider());
420 sal_Int32 nText = rTextProvider.getTextCount();
421 while (nText--)
422 {
423 SdrText* pText = rTextProvider.getText( nText );
424
425 OutlinerParaObject* pParaObj = pText ? pText->GetOutlinerParaObject() : nullptr;
426 if( !pParaObj )
427 continue;
428
429 pOutliner->SetText(*pParaObj);
430
431 sal_Int32 nParaCount(pOutliner->GetParagraphCount());
432
433 if(nParaCount)
434 {
435 bool bBurnIn(false);
436
437 for(sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
438 {
439 SfxStyleSheet* pSheet = pOutliner->GetStyleSheet(nPara);
440
441 if(pSheet)
442 {
443 SfxItemSet aParaSet(pOutliner->GetParaAttribs(nPara));
444 SfxItemSet aSet(*aParaSet.GetPool());
445 aSet.Put(pSheet->GetItemSet());
446
465 bool bHasURL(false);
466
467 if(aSet.GetItemState(EE_CHAR_COLOR) == SfxItemState::SET)
468 {
469 EditEngine* pEditEngine = const_cast<EditEngine*>(&(pOutliner->GetEditEngine()));
470 std::vector<EECharAttrib> aAttribs;
471 pEditEngine->GetCharAttribs(nPara, aAttribs);
472
473 for(const auto& rAttrib : aAttribs)
474 {
475 if(rAttrib.pAttr && EE_FEATURE_FIELD == rAttrib.pAttr->Which())
476 {
477 const SvxFieldItem* pFieldItem = static_cast<const SvxFieldItem*>(rAttrib.pAttr);
478
479 if(pFieldItem)
480 {
481 const SvxFieldData* pData = pFieldItem->GetField();
482
483 if(dynamic_cast<const SvxURLField*>( pData))
484 {
485 bHasURL = true;
486 break;
487 }
488 }
489 }
490 }
491
492 if(bHasURL)
493 {
495 aColorSet.Put(aSet, false);
496
497 ESelection aSel(nPara, 0);
498
499 for(const auto& rAttrib : aAttribs)
500 {
501 if(EE_FEATURE_FIELD == rAttrib.pAttr->Which())
502 {
503 aSel.nEndPos = rAttrib.nStart;
504
505 if(aSel.nStartPos != aSel.nEndPos)
506 pEditEngine->QuickSetAttribs(aColorSet, aSel);
507
508 aSel.nStartPos = rAttrib.nEnd;
509 }
510 }
511
512 aSel.nEndPos = pEditEngine->GetTextLen(nPara);
513
514 if(aSel.nStartPos != aSel.nEndPos)
515 {
516 pEditEngine->QuickSetAttribs( aColorSet, aSel );
517 }
518 }
519
520 }
521
522 aSet.Put(aParaSet, false);
523
524 if(bHasURL)
525 {
527 }
528
529 pOutliner->SetParaAttribs(nPara, aSet);
530 bBurnIn = true; // #i51163# Flag was set wrong
531 }
532 }
533
534 if(bBurnIn)
535 {
536 std::optional<OutlinerParaObject> pTemp = pOutliner->CreateParaObject(0, nParaCount);
537 rObj.NbcSetOutlinerParaObjectForText(std::move(pTemp),pText);
538 }
539 }
540
541 pOutliner->Clear();
542 }
543 }
544
546 {
548 mxItemSet->Put(rItem);
549 }
550
551
553 {
554 // call parent
555 AttributeProperties::Notify(rBC, rHint);
556
557 SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
558 if(!rObj.HasText())
559 return;
560
561 const svx::ITextProvider& rTextProvider(getTextProvider());
562 if(dynamic_cast<const SfxStyleSheet *>(&rBC) != nullptr)
563 {
564 SfxHintId nId(rHint.GetId());
565
566 if(SfxHintId::DataChanged == nId)
567 {
568 sal_Int32 nText = rTextProvider.getTextCount();
569 while (nText--)
570 {
571 OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
572 if( pParaObj )
573 pParaObj->ClearPortionInfo();
574 }
575 rObj.SetTextSizeDirty();
576
578 {
579 // here only repaint wanted
580 rObj.ActionChanged();
581 //rObj.BroadcastObjectChange();
582 }
583
584 // #i101556# content of StyleSheet has changed -> new version
585 maVersion++;
586 }
587
588 if(SfxHintId::Dying == nId)
589 {
590 sal_Int32 nText = rTextProvider.getTextCount();
591 while (nText--)
592 {
593 OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
594 if( pParaObj )
595 pParaObj->ClearPortionInfo();
596 }
597 }
598 }
599 else if(dynamic_cast<const SfxStyleSheetBasePool *>(&rBC) != nullptr)
600 {
601 const SfxStyleSheetModifiedHint* pExtendedHint = dynamic_cast<const SfxStyleSheetModifiedHint*>(&rHint);
602
603 if(pExtendedHint
604 && SfxHintId::StyleSheetModified == pExtendedHint->GetId())
605 {
606 const OUString& aOldName(pExtendedHint->GetOldName());
607 OUString aNewName(pExtendedHint->GetStyleSheet()->GetName());
608 SfxStyleFamily eFamily = pExtendedHint->GetStyleSheet()->GetFamily();
609
610 if(aOldName != aNewName)
611 {
612 sal_Int32 nText = rTextProvider.getTextCount();
613 while (nText--)
614 {
615 OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
616 if( pParaObj )
617 pParaObj->ChangeStyleSheetName(eFamily, aOldName, aNewName);
618 }
619 }
620 }
621 }
622 }
623
624 // #i101556# Handout version information
625 sal_uInt32 TextProperties::getVersion() const
626 {
627 return maVersion;
628 }
629} // end of namespace
630
631/* 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:542
Abstract DrawObject.
Definition: svdobj.hxx:261
void ActionChanged() const
Definition: svdobj.cxx:273
virtual SdrInventor GetObjInventor() const
Definition: svdobj.cxx:621
bool DoesSupportTextIndentingOnLineWidthChange() const
Definition: svdobj.hxx:853
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:289
bool IsTextEditActive() const
Definition: svdotext.hxx:352
SdrOutliner & ImpGetDrawOutliner() const
Definition: svdotext.cxx:1179
sal_Int32 GetTextColumnsSpacing() const
Definition: svdotext.cxx:1801
virtual SdrText * getActiveText() const
returns the currently active text.
Definition: svdotext.cxx:2079
void NbcSetOutlinerParaObjectForText(std::optional< OutlinerParaObject > pTextObject, SdrText *pText)
Definition: svdotext.cxx:1367
virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt=true, bool bWdt=true)
Definition: svdotxat.cxx:241
bool IsLinkedText() const
Definition: svdotext.hxx:325
void SetTextSizeDirty()
Definition: svdotext.hxx:274
SdrObjKind GetTextKind() const
Definition: svdotext.hxx:347
virtual bool HasText() const override
Definition: svdotxat.cxx:418
virtual void SetVerticalWriting(bool bVertical)
Definition: svdotext.cxx:1500
bool IsTextFrame() const
Definition: svdotext.hxx:332
virtual SdrObjKind GetObjIdentifier() const override
Definition: svdotext.cxx:447
SVX_DLLPRIVATE SdrOutliner * GetTextEditOutliner() const
Definition: svdotext.hxx:143
sal_Int16 GetTextColumnsNumber() const
Definition: svdotext.cxx:1786
OutlinerParaObject * GetOutlinerParaObject()
Definition: svdtext.cxx:88
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) const
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_FIRST(SDRATTR_CAPTION_LAST+1)
constexpr sal_uInt16 SDRATTR_SHADOW_LAST(SDRATTR_SHADOWBLUR)
constexpr sal_uInt16 SDRATTR_MISC_LAST(SDRATTR_TEXT_CHAINNEXTNAME)
constexpr sal_uInt16 SDRATTR_TEXTCOLUMNS_LAST(SDRATTR_TEXTCOLUMNS_SPACING)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_RIGHTDIST(SDRATTR_MISC_FIRST+5)
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:340
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)