LibreOffice Module svx (master) 1
svdotext.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
21#include <comphelper/string.hxx>
22#include <svl/stritem.hxx>
23#include <svx/svdotext.hxx>
24#include <svx/svdpage.hxx>
25#include <svx/svdoutl.hxx>
26#include <svx/svdmodel.hxx>
27#include <svx/dialmgr.hxx>
28#include <svx/strings.hrc>
30#include <svx/sdtfchim.hxx>
31#include <editeng/editdata.hxx>
32#include <editeng/editstat.hxx>
33#include <editeng/outlobj.hxx>
34#include <editeng/editobj.hxx>
35#include <editeng/outliner.hxx>
36#include <textchain.hxx>
37#include <textchainflow.hxx>
38#include <tools/helpers.hxx>
39#include <svx/sderitm.hxx>
40#include <svx/sdooitm.hxx>
41#include <svx/sdshitm.hxx>
42#include <svx/sdtagitm.hxx>
43#include <svx/sdtfsitm.hxx>
44#include <svx/sdtmfitm.hxx>
45#include <svx/xtextit0.hxx>
50#include <vcl/gdimtf.hxx>
51#include <vcl/virdev.hxx>
53#include <sal/log.hxx>
54#include <o3tl/temporary.hxx>
56
57using namespace com::sun::star;
58
59// BaseProperties section
60std::unique_ptr<sdr::properties::BaseProperties> SdrTextObj::CreateObjectSpecificProperties()
61{
62 return std::make_unique<sdr::properties::TextProperties>(*this);
63}
64
65// DrawContact section
66std::unique_ptr<sdr::contact::ViewContact> SdrTextObj::CreateObjectSpecificViewContact()
67{
68 return std::make_unique<sdr::contact::ViewContactOfTextObj>(*this);
69}
70
72 : SdrAttrObj(rSdrModel)
73 , mpEditingOutliner(nullptr)
74 , meTextKind(SdrObjKind::Text)
75 , maTextEditOffset(Point(0, 0))
76 , mbTextFrame(false)
77 , mbNoShear(false)
78 , mbTextSizeDirty(false)
79 , mbInEditMode(false)
80 , mbDisableAutoWidthOnDragging(false)
81 , mbTextAnimationAllowed(true)
82 , mbInDownScale(false)
83{
84 // #i25616#
86}
87
88SdrTextObj::SdrTextObj(SdrModel& rSdrModel, SdrTextObj const & rSource)
89 : SdrAttrObj(rSdrModel, rSource)
90 , mpEditingOutliner(nullptr)
91 , meTextKind(rSource.meTextKind)
92 , maTextEditOffset(Point(0, 0))
93 , mbTextFrame(rSource.mbTextFrame)
94 , mbNoShear(rSource.mbNoShear)
95 , mbTextSizeDirty(rSource.mbTextSizeDirty)
96 , mbInEditMode(false)
97 , mbDisableAutoWidthOnDragging(rSource.mbDisableAutoWidthOnDragging)
98 , mbTextAnimationAllowed(true)
99 , mbInDownScale(false)
100{
101 // #i25616#
103
104 maRect = rSource.maRect;
105 maGeo = rSource.maGeo;
106 maTextSize = rSource.maTextSize;
107
108 // Not all of the necessary parameters were copied yet.
109 SdrText* pText = getActiveText();
110
111 if( pText && rSource.HasText() )
112 {
113 // before pNewOutlinerParaObject was created the same, but
114 // set at mpText (outside this scope), but mpText might be
115 // empty (this operator== seems not prepared for MultiText
116 // objects). In the current form it makes only sense to
117 // create locally and use locally on a known existing SdrText
118 const Outliner* pEO = rSource.mpEditingOutliner;
119 std::optional<OutlinerParaObject> pNewOutlinerParaObject;
120
121 if (pEO!=nullptr)
122 {
123 pNewOutlinerParaObject = pEO->CreateParaObject();
124 }
125 else if (nullptr != rSource.getActiveText()->GetOutlinerParaObject())
126 {
127 pNewOutlinerParaObject = *rSource.getActiveText()->GetOutlinerParaObject();
128 }
129
130 pText->SetOutlinerParaObject( std::move(pNewOutlinerParaObject) );
131 }
132
134}
135
137 : SdrAttrObj(rSdrModel)
138 , maRect(rNewRect)
139 , mpEditingOutliner(nullptr)
140 , meTextKind(SdrObjKind::Text)
141 , maTextEditOffset(Point(0, 0))
142 , mbTextFrame(false)
143 , mbNoShear(false)
144 , mbTextSizeDirty(false)
145 , mbInEditMode(false)
146 , mbDisableAutoWidthOnDragging(false)
147 , mbTextAnimationAllowed(true)
148 , mbInDownScale(false)
149{
151
152 // #i25616#
154}
155
157 : SdrAttrObj(rSdrModel)
158 , mpEditingOutliner(nullptr)
159 , meTextKind(eNewTextKind)
160 , maTextEditOffset(Point(0, 0))
161 , mbTextFrame(true)
162 , mbNoShear(true)
163 , mbTextSizeDirty(false)
164 , mbInEditMode(false)
165 , mbDisableAutoWidthOnDragging(false)
166 , mbTextAnimationAllowed(true)
167 , mbInDownScale(false)
168{
169 // #i25616#
171}
172
174 const tools::Rectangle& rNewRect)
175 : SdrAttrObj(rSdrModel)
176 , maRect(rNewRect)
177 , mpEditingOutliner(nullptr)
178 , meTextKind(eNewTextKind)
179 , maTextEditOffset(Point(0, 0))
180 , mbTextFrame(true)
181 , mbNoShear(true)
182 , mbTextSizeDirty(false)
183 , mbInEditMode(false)
184 , mbDisableAutoWidthOnDragging(false)
185 , mbTextAnimationAllowed(true)
186 , mbInDownScale(false)
187{
189
190 // #i25616#
192}
193
195{
196 mxText.clear();
198}
199
201{
203
204 SdrText* pText = getActiveText();
205 if(pText==nullptr || !pText->GetOutlinerParaObject())
206 return;
207
208 SdrOutliner& rOutliner=ImpGetDrawOutliner();
210 rOutliner.SetUpdateLayout(true);
211 rOutliner.SetText(*pText->GetOutlinerParaObject());
212 Size aNewSize(rOutliner.CalcTextSize());
213 rOutliner.Clear();
214 aNewSize.AdjustWidth( 1 ); // because of possible rounding errors
217 tools::Rectangle aNewRect(maRect);
218 aNewRect.SetSize(aNewSize);
219 ImpJustifyRect(aNewRect);
220 if (aNewRect!=maRect) {
221 SetLogicRect(aNewRect);
222 }
223}
224
225void SdrTextObj::NbcSetText(const OUString& rStr)
226{
227 SdrOutliner& rOutliner=ImpGetDrawOutliner();
228 rOutliner.SetStyleSheet( 0, GetStyleSheet());
229 rOutliner.SetText(rStr,rOutliner.GetParagraph( 0 ));
231 NbcSetOutlinerParaObject(std::move(pNewText));
232 mbTextSizeDirty=true;
233}
234
235void SdrTextObj::SetText(const OUString& rStr)
236{
237 tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
238 NbcSetText(rStr);
239 SetChanged();
242}
243
244void SdrTextObj::NbcSetText(SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat)
245{
246 SdrOutliner& rOutliner=ImpGetDrawOutliner();
247 rOutliner.SetStyleSheet( 0, GetStyleSheet());
248 rOutliner.Read(rInput,rBaseURL,eFormat);
250 rOutliner.SetUpdateLayout(true);
251 Size aSize(rOutliner.CalcTextSize());
252 rOutliner.Clear();
253 NbcSetOutlinerParaObject(std::move(pNewText));
254 maTextSize=aSize;
255 mbTextSizeDirty=false;
256}
257
258void SdrTextObj::SetText(SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat)
259{
260 tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
261 NbcSetText(rInput,rBaseURL,eFormat);
262 SetChanged();
265}
266
268{
269 if (mbTextSizeDirty)
270 {
271 Size aSiz;
272 SdrText* pText = getActiveText();
273 if( pText && pText->GetOutlinerParaObject ())
274 {
275 SdrOutliner& rOutliner=ImpGetDrawOutliner();
276 rOutliner.SetText(*pText->GetOutlinerParaObject());
277 rOutliner.SetUpdateLayout(true);
278 aSiz=rOutliner.CalcTextSize();
279 rOutliner.Clear();
280 }
281 // casting to nonconst twice
282 const_cast<SdrTextObj*>(this)->maTextSize = aSiz;
283 const_cast<SdrTextObj*>(this)->mbTextSizeDirty = false;
284 }
285 return maTextSize;
286}
287
289{
290 if(!mbTextFrame)
291 return false; // AutoGrow only together with TextFrames
292
294 bool bRet = rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT).GetValue();
295
296 if(bRet)
297 {
298 SdrTextAniKind eAniKind = rSet.Get(SDRATTR_TEXT_ANIKIND).GetValue();
299
300 if(eAniKind == SdrTextAniKind::Scroll || eAniKind == SdrTextAniKind::Alternate || eAniKind == SdrTextAniKind::Slide)
301 {
302 SdrTextAniDirection eDirection = rSet.Get(SDRATTR_TEXT_ANIDIRECTION).GetValue();
303
304 if(eDirection == SdrTextAniDirection::Up || eDirection == SdrTextAniDirection::Down)
305 {
306 bRet = false;
307 }
308 }
309 }
310 return bRet;
311}
312
314{
315 if (!mbTextFrame)
316 return false; // AutoGrow only together with TextFrames
317
319 bool bRet = rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH).GetValue();
320
321 bool bInEditMOde = IsInEditMode();
322
323 if(!bInEditMOde && bRet)
324 {
325 SdrTextAniKind eAniKind = rSet.Get(SDRATTR_TEXT_ANIKIND).GetValue();
326
327 if(eAniKind == SdrTextAniKind::Scroll || eAniKind == SdrTextAniKind::Alternate || eAniKind == SdrTextAniKind::Slide)
328 {
329 SdrTextAniDirection eDirection = rSet.Get(SDRATTR_TEXT_ANIDIRECTION).GetValue();
330
331 if(eDirection == SdrTextAniDirection::Left || eDirection == SdrTextAniDirection::Right)
332 {
333 bRet = false;
334 }
335 }
336 }
337 return bRet;
338}
339
341{
343}
344
346{
349
351
352 bool bInEditMode = IsInEditMode();
353
354 if(!bInEditMode && eRet == SDRTEXTHORZADJUST_BLOCK)
355 {
356 SdrTextAniKind eAniKind = rSet.Get(SDRATTR_TEXT_ANIKIND).GetValue();
357
358 if(eAniKind == SdrTextAniKind::Scroll || eAniKind == SdrTextAniKind::Alternate || eAniKind == SdrTextAniKind::Slide)
359 {
360 SdrTextAniDirection eDirection = rSet.Get(SDRATTR_TEXT_ANIDIRECTION).GetValue();
361
362 if(eDirection == SdrTextAniDirection::Left || eDirection == SdrTextAniDirection::Right)
363 {
365 }
366 }
367 }
368
369 return eRet;
370} // defaults: BLOCK (justify) for text frame, CENTER for captions of drawing objects
371
373{
375}
376
378{
381
382 // Take care for vertical text animation here
384 bool bInEditMode = IsInEditMode();
385
386 // Take care for vertical text animation here
387 if(!bInEditMode && eRet == SDRTEXTVERTADJUST_BLOCK)
388 {
389 SdrTextAniKind eAniKind = rSet.Get(SDRATTR_TEXT_ANIKIND).GetValue();
390
391 if(eAniKind == SdrTextAniKind::Scroll || eAniKind == SdrTextAniKind::Alternate || eAniKind == SdrTextAniKind::Slide)
392 {
393 SdrTextAniDirection eDirection = rSet.Get(SDRATTR_TEXT_ANIDIRECTION).GetValue();
394
395 if(eDirection == SdrTextAniDirection::Left || eDirection == SdrTextAniDirection::Right)
396 {
398 }
399 }
400 }
401
402 return eRet;
403} // defaults: TOP for text frame, CENTER for captions of drawing objects
404
406{
407 if (!rRect.IsEmpty()) {
408 rRect.Normalize();
409 if (rRect.Left()==rRect.Right()) rRect.AdjustRight( 1 );
410 if (rRect.Top()==rRect.Bottom()) rRect.AdjustBottom( 1 );
411 }
412}
413
415{
417 {
418 maGeo.nShearAngle = 0_deg100;
420 }
421}
422
424{
425 bool bNoTextFrame=!IsTextFrame();
426 rInfo.bResizeFreeAllowed=bNoTextFrame || ((maGeo.nRotationAngle.get() % 9000) == 0);
427 rInfo.bResizePropAllowed=true;
428 rInfo.bRotateFreeAllowed=true;
429 rInfo.bRotate90Allowed =true;
430 rInfo.bMirrorFreeAllowed=bNoTextFrame;
431 rInfo.bMirror45Allowed =bNoTextFrame;
432 rInfo.bMirror90Allowed =bNoTextFrame;
433
434 // allow transparency
435 rInfo.bTransparenceAllowed = true;
436
437 rInfo.bShearAllowed =bNoTextFrame;
438 rInfo.bEdgeRadiusAllowed=true;
439 bool bCanConv=ImpCanConvTextToCurve();
440 rInfo.bCanConvToPath =bCanConv;
441 rInfo.bCanConvToPoly =bCanConv;
442 rInfo.bCanConvToPathLineToArea=bCanConv;
443 rInfo.bCanConvToPolyLineToArea=bCanConv;
445}
446
448{
449 return meTextKind;
450}
451
452bool SdrTextObj::HasTextImpl( SdrOutliner const * pOutliner )
453{
454 bool bRet=false;
455 if(pOutliner)
456 {
457 Paragraph* p1stPara=pOutliner->GetParagraph( 0 );
458 sal_Int32 nParaCount=pOutliner->GetParagraphCount();
459 if(p1stPara==nullptr)
460 nParaCount=0;
461
462 if(nParaCount==1)
463 {
464 // if it is only one paragraph, check if that paragraph is empty
465 if( pOutliner->GetText(p1stPara).isEmpty() )
466 nParaCount = 0;
467 }
468
469 bRet= nParaCount!=0;
470 }
471 return bRet;
472}
473
475{
476 const bool bRemove(pNewPage == nullptr && pOldPage != nullptr);
477 const bool bInsert(pNewPage != nullptr && pOldPage == nullptr);
478 const bool bLinked(IsLinkedText());
479
480 if (bLinked && bRemove)
481 {
483 }
484
485 // call parent
486 SdrAttrObj::handlePageChange(pOldPage, pNewPage);
487
488 if (bLinked && bInsert)
491 }
492}
493
495{
497}
498
499// #115391# This implementation is based on the object size (aRect) and the
500// states of IsAutoGrowWidth/Height to correctly set TextMinFrameWidth/Height
502{
503 if (!mbTextFrame)
504 // Only do this for text frame.
505 return;
506
507 if (getSdrModelFromSdrObject().IsPasteResize())
508 // Don't do this during paste resize.
509 return;
510
511 const bool bW = IsAutoGrowWidth();
512 const bool bH = IsAutoGrowHeight();
513
514 if (!bW && !bH)
515 // No auto grow requested. Bail out.
516 return;
517
519 SDRATTR_TEXT_MINFRAMEWIDTH, SDRATTR_TEXT_AUTOGROWWIDTH> // contains SDRATTR_TEXT_MAXFRAMEWIDTH
520 aSet(*GetObjectItemSet().GetPool());
521
522 if(bW)
523 {
524 // Set minimum width.
526 const tools::Long nW = std::max<tools::Long>(0, maRect.GetWidth() - 1 - nDist); // text width without margins
527
528 aSet.Put(makeSdrTextMinFrameWidthItem(nW));
529
531 {
533 aSet.Put(makeSdrTextAutoGrowWidthItem(false));
534 }
535 }
536
537 if(bH)
538 {
539 // Set Minimum height.
541 const tools::Long nH = std::max<tools::Long>(0, maRect.GetHeight() - 1 - nDist); // text height without margins
542
543 aSet.Put(makeSdrTextMinFrameHeightItem(nH));
544
546 {
548 aSet.Put(makeSdrTextAutoGrowHeightItem(false));
549 }
550 }
551
552 SetObjectItemSet(aSet);
553}
554
555void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, tools::Rectangle const & rAnchorRect, bool bLineWidth ) const
556{
557 basegfx::B2DPolyPolygon aXorPolyPolygon(TakeXorPoly());
558 std::optional<basegfx::B2DPolyPolygon> pContourPolyPolygon;
560 -rAnchorRect.Left(), -rAnchorRect.Top()));
561
563 {
564 // Unrotate!
566 }
567
568 aXorPolyPolygon.transform(aMatrix);
569
570 if( bLineWidth )
571 {
572 // Take line width into account.
573 // When doing the hit test, avoid this. (Performance!)
574 pContourPolyPolygon.emplace();
575
576 // test if shadow needs to be avoided for TakeContour()
578 bool bShadowOn = rSet.Get(SDRATTR_SHADOW).GetValue();
579
580 // #i33696#
581 // Remember TextObject currently set at the DrawOutliner, it WILL be
582 // replaced during calculating the outline since it uses an own paint
583 // and that one uses the DrawOutliner, too.
584 const SdrTextObj* pLastTextObject = rOutliner.GetTextObj();
585
586 if(bShadowOn)
587 {
588 // force shadow off
590 pCopy->SetMergedItem(makeSdrShadowItem(false));
591 *pContourPolyPolygon = pCopy->TakeContour();
592 }
593 else
594 {
595 *pContourPolyPolygon = TakeContour();
596 }
597
598 // #i33696#
599 // restore remembered text object
600 if(pLastTextObject != rOutliner.GetTextObj())
601 {
602 rOutliner.SetTextObj(pLastTextObject);
603 }
604
605 pContourPolyPolygon->transform(aMatrix);
606 }
607
608 rOutliner.SetPolygon(aXorPolyPolygon, pContourPolyPolygon ? &*pContourPolyPolygon : nullptr);
609}
610
612{
613 rRect=maRect;
614}
615
616// See also: <unnamed>::getTextAnchorRange in svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
618{
619 const tools::Long nLeftDist = GetTextLeftDistance();
620 const tools::Long nRightDist = GetTextRightDistance();
621 const tools::Long nUpperDist = GetTextUpperDistance();
622 const tools::Long nLowerDist = GetTextLowerDistance();
623 if (!IsVerticalWriting())
624 {
625 rAnchorRect.AdjustLeft(nLeftDist);
626 rAnchorRect.AdjustTop(nUpperDist);
627 rAnchorRect.AdjustRight(-nRightDist);
628 rAnchorRect.AdjustBottom(-nLowerDist);
629 }
630 else if (IsTopToBottom())
631 {
632 rAnchorRect.AdjustLeft(nLowerDist);
633 rAnchorRect.AdjustTop(nLeftDist);
634 rAnchorRect.AdjustRight(-nUpperDist);
635 rAnchorRect.AdjustBottom(-nRightDist);
636 }
637 else
638 {
639 rAnchorRect.AdjustLeft(nUpperDist);
640 rAnchorRect.AdjustTop(nRightDist);
641 rAnchorRect.AdjustRight(-nLowerDist);
642 rAnchorRect.AdjustBottom(-nLeftDist);
643 }
644
645 // Since sizes may be bigger than the object bounds it is necessary to
646 // justify the rect now.
647 ImpJustifyRect(rAnchorRect);
648}
649
651{
652 tools::Rectangle aAnkRect(maRect); // the rectangle in which we anchor
653 bool bFrame=IsTextFrame();
654 if (!bFrame) {
655 TakeUnrotatedSnapRect(aAnkRect);
656 }
657 Point aRotateRef(aAnkRect.TopLeft());
658 AdjustRectToTextDistance(aAnkRect);
659
660 if (bFrame) {
661 // TODO: Optimize this.
662 if (aAnkRect.GetWidth()<2) aAnkRect.SetRight(aAnkRect.Left()+1 ); // minimum size h and v: 2 px
663 if (aAnkRect.GetHeight()<2) aAnkRect.SetBottom(aAnkRect.Top()+1 );
664 }
665 if (maGeo.nRotationAngle) {
666 Point aTmpPt(aAnkRect.TopLeft());
668 aTmpPt-=aAnkRect.TopLeft();
669 aAnkRect.Move(aTmpPt.X(),aTmpPt.Y());
670 }
671 rAnchorRect=aAnkRect;
672}
673
674void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText,
675 tools::Rectangle* pAnchorRect, bool bLineWidth ) const
676{
677 tools::Rectangle aAnkRect; // the rectangle in which we anchor
678 TakeTextAnchorRect(aAnkRect);
683
684 bool bFitToSize(IsFitToSize());
685 bool bContourFrame=IsContourTextFrame();
686
687 bool bFrame=IsTextFrame();
688 EEControlBits nStat0=rOutliner.GetControlWord();
689 Size aNullSize;
690 if (!bContourFrame)
691 {
692 rOutliner.SetControlWord(nStat0|EEControlBits::AUTOPAGESIZE);
693 rOutliner.SetMinAutoPaperSize(aNullSize);
694 rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000));
695 }
696
697 if (!bFitToSize && !bContourFrame)
698 {
699 tools::Long nAnkWdt=aAnkRect.GetWidth();
700 tools::Long nAnkHgt=aAnkRect.GetHeight();
701 if (bFrame)
702 {
703 tools::Long nWdt=nAnkWdt;
704 tools::Long nHgt=nAnkHgt;
705
706 bool bInEditMode = IsInEditMode();
707
708 if (!bInEditMode && (eAniKind==SdrTextAniKind::Scroll || eAniKind==SdrTextAniKind::Alternate || eAniKind==SdrTextAniKind::Slide))
709 {
710 // unlimited paper size for ticker text
711 if (eAniDirection==SdrTextAniDirection::Left || eAniDirection==SdrTextAniDirection::Right) nWdt=1000000;
712 if (eAniDirection==SdrTextAniDirection::Up || eAniDirection==SdrTextAniDirection::Down) nHgt=1000000;
713 }
714
715 bool bChainedFrame = IsChainable();
716 // Might be required for overflow check working: do limit height to frame if box is chainable.
717 if (!bChainedFrame) {
718 // #i119885# Do not limit/force height to geometrical frame (vice versa for vertical writing)
719
721 {
722 nWdt = 1000000;
723 }
724 else
725 {
726 nHgt = 1000000;
727 }
728 }
729
730 rOutliner.SetMaxAutoPaperSize(Size(nWdt,nHgt));
731 }
732
733 // New try with _BLOCK for hor and ver after completely
734 // supporting full width for vertical text.
736 {
737 rOutliner.SetMinAutoPaperSize(Size(nAnkWdt, 0));
738 rOutliner.SetMinColumnWrapHeight(nAnkHgt);
739 }
740
742 {
743 rOutliner.SetMinAutoPaperSize(Size(0, nAnkHgt));
744 rOutliner.SetMinColumnWrapHeight(nAnkWdt);
745 }
746 }
747
748 rOutliner.SetPaperSize(aNullSize);
749 if (bContourFrame)
750 ImpSetContourPolygon( rOutliner, aAnkRect, bLineWidth );
751
752 // put text into the outliner, if available from the edit outliner
753 SdrText* pText = getActiveText();
754 OutlinerParaObject* pOutlinerParaObject = pText ? pText->GetOutlinerParaObject() : nullptr;
756 if (mpEditingOutliner && !bNoEditText)
758 else if (pOutlinerParaObject)
759 pPara = *pOutlinerParaObject;
760
761 if (pPara)
762 {
763 const bool bHitTest(&getSdrModelFromSdrObject().GetHitTestOutliner() == &rOutliner);
764 const SdrTextObj* pTestObj = rOutliner.GetTextObj();
765
766 if( !pTestObj || !bHitTest || pTestObj != this ||
767 pTestObj->GetOutlinerParaObject() != pOutlinerParaObject )
768 {
769 if( bHitTest ) // #i33696# take back fix #i27510#
770 {
771 rOutliner.SetTextObj( this );
773 }
774
775 rOutliner.SetUpdateLayout(true);
776 rOutliner.SetText(*pPara);
777 }
778 }
779 else
780 {
781 rOutliner.SetTextObj( nullptr );
782 }
783
784 rOutliner.SetUpdateLayout(true);
785 rOutliner.SetControlWord(nStat0);
786
787 if( pText )
788 pText->CheckPortionInfo(rOutliner);
789
790 Point aTextPos(aAnkRect.TopLeft());
791 Size aTextSiz(rOutliner.GetPaperSize()); // GetPaperSize() adds a little tolerance, right?
792
793 // For draw objects containing text correct hor/ver alignment if text is bigger
794 // than the object itself. Without that correction, the text would always be
795 // formatted to the left edge (or top edge when vertical) of the draw object.
796 if(!IsTextFrame())
797 {
798 if(aAnkRect.GetWidth() < aTextSiz.Width() && !IsVerticalWriting())
799 {
800 // Horizontal case here. Correct only if eHAdj == SDRTEXTHORZADJUST_BLOCK,
801 // else the alignment is wanted.
802 if(SDRTEXTHORZADJUST_BLOCK == eHAdj)
803 {
805 }
806 }
807
808 if(aAnkRect.GetHeight() < aTextSiz.Height() && IsVerticalWriting())
809 {
810 // Vertical case here. Correct only if eHAdj == SDRTEXTVERTADJUST_BLOCK,
811 // else the alignment is wanted.
812 if(SDRTEXTVERTADJUST_BLOCK == eVAdj)
813 {
815 }
816 }
817 }
818
820 {
821 tools::Long nFreeWdt=aAnkRect.GetWidth()-aTextSiz.Width();
822 if (eHAdj==SDRTEXTHORZADJUST_CENTER)
823 aTextPos.AdjustX(nFreeWdt/2 );
824 if (eHAdj==SDRTEXTHORZADJUST_RIGHT)
825 aTextPos.AdjustX(nFreeWdt );
826 }
828 {
829 tools::Long nFreeHgt=aAnkRect.GetHeight()-aTextSiz.Height();
830 if (eVAdj==SDRTEXTVERTADJUST_CENTER)
831 aTextPos.AdjustY(nFreeHgt/2 );
832 if (eVAdj==SDRTEXTVERTADJUST_BOTTOM)
833 aTextPos.AdjustY(nFreeHgt );
834 }
837
838 if (pAnchorRect)
839 *pAnchorRect=aAnkRect;
840
841 // rTextRect might not be correct in some cases at ContourFrame
842 rTextRect=tools::Rectangle(aTextPos,aTextSiz);
843 if (bContourFrame)
844 rTextRect=aAnkRect;
845}
846
848{
850 {
852 }
853 return false;
854}
855
857{
860 {
861 sal_Int32 nParaCount = mpEditingOutliner->GetParagraphCount();
862 pPara = mpEditingOutliner->CreateParaObject(0, nParaCount);
863 }
864 return pPara;
865}
866
867void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXCorrection)
868{
869 OutputDevice* pOut = rOutliner.GetRefDevice();
870 bool bNoStretching(false);
871
872 if(pOut && pOut->GetOutDevType() == OUTDEV_PRINTER)
873 {
874 // check whether CharStretching is possible at all
875 GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
876 OUString aTestString(u'J');
877
878 if(pMtf && (!pMtf->IsRecord() || pMtf->IsPause()))
879 pMtf = nullptr;
880
881 if(pMtf)
882 pMtf->Pause(true);
883
884 vcl::Font aOriginalFont(pOut->GetFont());
885 vcl::Font aTmpFont( OutputDevice::GetDefaultFont( DefaultFontType::SERIF, LANGUAGE_SYSTEM, GetDefaultFontFlags::OnlyOne ) );
886
887 aTmpFont.SetFontSize(Size(0,100));
888 pOut->SetFont(aTmpFont);
889 Size aSize1(pOut->GetTextWidth(aTestString), pOut->GetTextHeight());
890 aTmpFont.SetFontSize(Size(800,100));
891 pOut->SetFont(aTmpFont);
892 Size aSize2(pOut->GetTextWidth(aTestString), pOut->GetTextHeight());
893 pOut->SetFont(aOriginalFont);
894
895 if(pMtf)
896 pMtf->Pause(false);
897
898 bNoStretching = (aSize1 == aSize2);
899
900#ifdef _WIN32
901 // Windows zooms the font proportionally when using Size(100,500),
902 // we don't like that.
903 if(aSize2.Height() >= aSize1.Height() * 2)
904 {
905 bNoStretching = true;
906 }
907#endif
908 }
909 unsigned nLoopCount=0;
910 bool bNoMoreLoop = false;
911 tools::Long nXDiff0=0x7FFFFFFF;
912 tools::Long nWantWdt=rShapeSize.Width();
913 tools::Long nIsWdt=rTextSize.Width();
914 if (nIsWdt==0) nIsWdt=1;
915
916 tools::Long nWantHgt=rShapeSize.Height();
917 tools::Long nIsHgt=rTextSize.Height();
918 if (nIsHgt==0) nIsHgt=1;
919
920 tools::Long nXTolPl=nWantWdt/100; // tolerance: +1%
921 tools::Long nXTolMi=nWantWdt/25; // tolerance: -4%
922 tools::Long nXCorr =nWantWdt/20; // correction scale: 5%
923
924 double nX = (nWantWdt * 100.0) / double(nIsWdt); // calculate X stretching
925 double nY = (nWantHgt * 100.0) / double(nIsHgt); // calculate Y stretching
926 bool bChkX = true;
927 if (bNoStretching)
928 { // might only be possible proportionally
929 if (nX > nY)
930 {
931 nX = nY;
932 bChkX = false;
933 }
934 else
935 {
936 nY = nX;
937 }
938 }
939
940 while (nLoopCount<5 && !bNoMoreLoop)
941 {
942 if (nX < 0.0)
943 nX = -nX;
944 if (nX < 1.0)
945 {
946 nX = 1.0;
947 bNoMoreLoop = true;
948 }
949 if (nX > 65535.0)
950 {
951 nX = 65535.0;
952 bNoMoreLoop = true;
953 }
954
955 if (nY < 0.0)
956 {
957 nY = -nY;
958 }
959 if (nY < 1.0)
960 {
961 nY = 1.0;
962 bNoMoreLoop = true;
963 }
964 if (nY > 65535.0)
965 {
966 nY = 65535.0;
967 bNoMoreLoop = true;
968 }
969
970 // exception, there is no text yet (horizontal case)
971 if (nIsWdt <= 1)
972 {
973 nX = nY;
974 bNoMoreLoop = true;
975 }
976
977 // exception, there is no text yet (vertical case)
978 if (nIsHgt <= 1)
979 {
980 nY = nX;
981 bNoMoreLoop = true;
982 }
983 rOutliner.SetGlobalCharStretching(nX, nY);
984 nLoopCount++;
985 Size aSiz(rOutliner.CalcTextSize());
986 tools::Long nXDiff = aSiz.Width() - nWantWdt;
987 rFitXCorrection=Fraction(nWantWdt,aSiz.Width());
988 if (((nXDiff>=nXTolMi || !bChkX) && nXDiff<=nXTolPl) || nXDiff==nXDiff0) {
989 bNoMoreLoop = true;
990 } else {
991 // correct stretching factors
992 tools::Long nMul = nWantWdt;
993 tools::Long nDiv = aSiz.Width();
994 if (std::abs(nXDiff) <= 2 * nXCorr)
995 {
996 if (nMul > nDiv)
997 nDiv += (nMul - nDiv) / 2.0; // but only add half of what we calculated,
998 else
999 nMul += (nDiv - nMul) / 2.0;// because the EditEngine calculates wrongly later on
1000 }
1001 nX = nX * double(nMul) / double(nDiv);
1002 if (bNoStretching)
1003 nY = nX;
1004 }
1005 nXDiff0 = nXDiff;
1006 }
1007}
1008
1010{
1011 OUString aStr;
1012
1013 switch(meTextKind)
1014 {
1016 {
1017 aStr = SvxResId(STR_ObjNameSingulOUTLINETEXT);
1018 break;
1019 }
1020
1022 {
1023 aStr = SvxResId(STR_ObjNameSingulTITLETEXT);
1024 break;
1025 }
1026
1027 default:
1028 {
1029 if(IsLinkedText())
1030 aStr = SvxResId(STR_ObjNameSingulTEXTLNK);
1031 else
1032 aStr = SvxResId(STR_ObjNameSingulTEXT);
1033 break;
1034 }
1035 }
1036
1037 OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject();
1038 if(pOutlinerParaObject && meTextKind != SdrObjKind::OutlineText)
1039 {
1040 // shouldn't currently cause any problems at OUTLINETEXT
1041 OUString aStr2(comphelper::string::stripStart(pOutlinerParaObject->GetTextObject().GetText(0), ' '));
1042
1043 // avoid non expanded text portions in object name
1044 // (second condition is new)
1045 if(!aStr2.isEmpty() && aStr2.indexOf(u'\x00FF') == -1)
1046 {
1047 // space between ResStr and content text
1048 aStr += " \'";
1049
1050 if(aStr2.getLength() > 10)
1051 {
1052 aStr2 = OUString::Concat(aStr2.subView(0, 8)) + "...";
1053 }
1054
1055 aStr += aStr2 + "\'";
1056 }
1057 }
1058
1059 OUString sName(aStr);
1060
1061 OUString aName(GetName());
1062 if (!aName.isEmpty())
1063 sName += " '" + aName + "'";
1064
1065 return sName;
1066}
1067
1069{
1070 OUString sName;
1071 switch (meTextKind)
1072 {
1073 case SdrObjKind::OutlineText: sName=SvxResId(STR_ObjNamePluralOUTLINETEXT); break;
1074 case SdrObjKind::TitleText : sName=SvxResId(STR_ObjNamePluralTITLETEXT); break;
1075 default: {
1076 if (IsLinkedText()) {
1077 sName=SvxResId(STR_ObjNamePluralTEXTLNK);
1078 } else {
1079 sName=SvxResId(STR_ObjNamePluralTEXT);
1080 }
1081 } break;
1082 } // switch
1083 return sName;
1084}
1085
1087{
1088 return new SdrTextObj(rTargetModel, *this);
1089}
1090
1092{
1093 tools::Polygon aPol(maRect);
1096
1098 aRetval.append(aPol.getB2DPolygon());
1099 return aRetval;
1100}
1101
1103{
1105
1106 // and now add the BoundRect of the text, if necessary
1108 {
1109 // using Clone()-Paint() strategy inside TakeContour() leaves a destroyed
1110 // SdrObject as pointer in DrawOutliner. Set *this again in fetching the outliner
1111 // in every case
1112 SdrOutliner& rOutliner=ImpGetDrawOutliner();
1113
1114 tools::Rectangle aAnchor2;
1116 TakeTextRect(rOutliner,aR,false,&aAnchor2);
1117 rOutliner.Clear();
1118 bool bFitToSize(IsFitToSize());
1119 if (bFitToSize) aR=aAnchor2;
1120 tools::Polygon aPol(aR);
1122
1123 aRetval.append(aPol.getB2DPolygon());
1124 }
1125
1126 return aRetval;
1127}
1128
1130{
1132 {
1134 } else {
1136 }
1137}
1138
1140{
1141 return 4;
1142}
1143
1145{
1146 Point aP;
1147 switch (i) {
1148 case 0: aP=maRect.TopLeft(); break;
1149 case 1: aP=maRect.TopRight(); break;
1150 case 2: aP=maRect.BottomLeft(); break;
1151 case 3: aP=maRect.BottomRight(); break;
1152 default: aP=maRect.Center(); break;
1153 }
1156 return aP;
1157}
1158
1159// Extracted from ImpGetDrawOutliner()
1161{
1162 rOutl.SetUpdateLayout(false);
1163 OutlinerMode nOutlinerMode = OutlinerMode::OutlineObject;
1164 if ( !IsOutlText() )
1165 nOutlinerMode = OutlinerMode::TextObject;
1166 rOutl.Init( nOutlinerMode );
1167
1168 rOutl.SetGlobalCharStretching(100.0, 100.0);
1169 EEControlBits nStat=rOutl.GetControlWord();
1170 nStat &= ~EEControlBits(EEControlBits::STRETCHING|EEControlBits::AUTOPAGESIZE);
1171 rOutl.SetControlWord(nStat);
1172 Size aMaxSize(100000,100000);
1173 rOutl.SetMinAutoPaperSize(Size());
1174 rOutl.SetMaxAutoPaperSize(aMaxSize);
1175 rOutl.SetPaperSize(aMaxSize);
1176 rOutl.ClearPolygon();
1177}
1178
1180{
1181 SdrOutliner& rOutl(getSdrModelFromSdrObject().GetDrawOutliner(this));
1182
1183 // Code extracted to ImpInitDrawOutliner()
1184 ImpInitDrawOutliner( rOutl );
1185
1186 return rOutl;
1187}
1188
1189// Extracted from Paint()
1191 SdrOutliner& rOutliner,
1192 tools::Rectangle& rTextRect,
1193 tools::Rectangle& rAnchorRect,
1194 tools::Rectangle& rPaintRect,
1195 Fraction& rFitXCorrection ) const
1196{
1197 if (!bContourFrame)
1198 {
1199 // FitToSize can't be used together with ContourFrame for now
1200 if (IsFitToSize() || IsAutoFit())
1201 {
1202 EEControlBits nStat=rOutliner.GetControlWord();
1203 nStat|=EEControlBits::STRETCHING|EEControlBits::AUTOPAGESIZE;
1204 rOutliner.SetControlWord(nStat);
1205 }
1206 }
1208 TakeTextRect(rOutliner, rTextRect, false, &rAnchorRect);
1209 rPaintRect = rTextRect;
1210
1211 if (bContourFrame)
1212 return;
1213
1214 // FitToSize can't be used together with ContourFrame for now
1215 if (IsFitToSize())
1216 {
1217 ImpSetCharStretching(rOutliner,rTextRect.GetSize(),rAnchorRect.GetSize(),rFitXCorrection);
1218 rPaintRect=rAnchorRect;
1219 }
1220 else if (IsAutoFit())
1221 {
1222 ImpAutoFitText(rOutliner);
1223 }
1224}
1225
1227{
1228 SdrOutliner& rOutliner = ImpGetDrawOutliner();
1229 // This eventually calls ImpAutoFitText
1231
1232 double nStretchY;
1233 rOutliner.GetGlobalCharStretching(o3tl::temporary(double()), nStretchY);
1234 return nStretchY;
1235}
1236
1238{
1239 const Size aShapeSize=GetSnapRect().GetSize();
1240 ImpAutoFitText( rOutliner,
1244}
1245
1246void SdrTextObj::ImpAutoFitText(SdrOutliner& rOutliner, const Size& rTextSize,
1247 bool bIsVerticalWriting) const
1248{
1249 // EditEngine formatting is unstable enough for
1250 // line-breaking text that we need some more samples
1251
1252 // loop early-exits if we detect an already attained value
1253 double nMinStretchX = 0.0;
1254 double nMinStretchY = 0.0;
1255 std::array<sal_Int32, 10> aOldStretchXVals = {0,0,0,0,0,0,0,0,0,0};
1256 for (size_t i = 0; i < aOldStretchXVals.size(); ++i)
1257 {
1258 const Size aCurrTextSize = rOutliner.CalcTextSizeNTP();
1259 double fFactor = 1.0;
1260 if( bIsVerticalWriting )
1261 {
1262 if (aCurrTextSize.Width() != 0)
1263 {
1264 fFactor = double(rTextSize.Width())/aCurrTextSize.Width();
1265 }
1266 }
1267 else if (aCurrTextSize.Height() != 0)
1268 {
1269 fFactor = double(rTextSize.Height())/aCurrTextSize.Height();
1270 }
1271 // fFactor scales in both x and y directions
1272 // - this is fine for bulleted words
1273 // - but it scales too much for a long paragraph
1274 // - taking sqrt scales long paragraphs the best
1275 // - bulleted words will have to go through more iterations
1276 fFactor = std::sqrt(fFactor);
1277
1278 double nCurrStretchX, nCurrStretchY;
1279 rOutliner.GetGlobalCharStretching(nCurrStretchX, nCurrStretchY);
1280
1281 if (fFactor >= 0.98)
1282 {
1283 // resulting text area fits into available shape rect -
1284 // err on the larger stretching, to optimally fill area
1285 nMinStretchX = std::max(nMinStretchX, nCurrStretchX);
1286 nMinStretchY = std::max(nMinStretchY, nCurrStretchY);
1287 }
1288
1289 aOldStretchXVals[i] = basegfx::fround(nCurrStretchX * 10.0);
1290 if (std::find(aOldStretchXVals.begin(), aOldStretchXVals.begin() + i, basegfx::fround(nCurrStretchX * 10.0)) != aOldStretchXVals.begin() + i)
1291 break; // same value already attained once; algo is looping, exit
1292
1293 if (fFactor < 1.0 || nCurrStretchX != 100)
1294 {
1295 nCurrStretchX = double(basegfx::fround(nCurrStretchX * fFactor * 100.0)) / 100.00;
1296 nCurrStretchY = double(basegfx::fround(nCurrStretchY * fFactor * 100.0)) / 100.00;
1297
1298 rOutliner.SetGlobalCharStretching(std::min(100.0, nCurrStretchX), std::min(100.0, nCurrStretchY));
1299 SAL_INFO("svx", "zoom is " << nCurrStretchX);
1300 }
1301 }
1302
1304 if (rItem.GetMaxScale() > 0)
1305 {
1306 nMinStretchX = std::min<sal_uInt16>(rItem.GetMaxScale(), nMinStretchX);
1307 nMinStretchY = std::min<sal_uInt16>(rItem.GetMaxScale(), nMinStretchY);
1308 }
1309
1310 SAL_INFO("svx", "final zoom is " << nMinStretchX);
1311 rOutliner.SetGlobalCharStretching(std::min(100.0, nMinStretchX), std::min(100.0, nMinStretchY));
1312}
1313
1315{
1316 ImpInitDrawOutliner( rOutl );
1317 UpdateOutlinerFormatting( rOutl, rPaintRect );
1318}
1319
1321{
1322 tools::Rectangle aTextRect;
1323 tools::Rectangle aAnchorRect;
1324 Fraction aFitXCorrection(1,1);
1325
1326 const bool bContourFrame(IsContourTextFrame());
1327 const MapMode aMapMode(
1328 getSdrModelFromSdrObject().GetScaleUnit(),
1329 Point(0,0),
1330 getSdrModelFromSdrObject().GetScaleFraction(),
1331 getSdrModelFromSdrObject().GetScaleFraction());
1332
1333 rOutl.SetRefMapMode(aMapMode);
1335 bContourFrame,
1336 rOutl,
1337 aTextRect,
1338 aAnchorRect,
1339 rPaintRect,
1340 aFitXCorrection);
1341}
1342
1343
1345{
1346 SdrText* pText = getActiveText();
1347 if( pText )
1348 return pText->GetOutlinerParaObject();
1349 else
1350 return nullptr;
1351}
1352
1354{
1355 NbcSetOutlinerParaObjectForText( std::move(pTextObject), getActiveText() );
1356}
1357
1358namespace
1359{
1360 bool IsAutoGrow(const SdrTextObj& rObj)
1361 {
1362 bool bAutoGrow = rObj.IsAutoGrowHeight() || rObj.IsAutoGrowWidth();
1363 return bAutoGrow && !utl::ConfigManager::IsFuzzing();
1364 }
1365}
1366
1368{
1369 if( pText )
1370 pText->SetOutlinerParaObject( std::move(pTextObject) );
1371
1372 if (pText && pText->GetOutlinerParaObject())
1373 {
1375 ? css::text::WritingMode_TB_RL
1376 : css::text::WritingMode_LR_TB,
1378 GetProperties().SetObjectItemDirect(aWritingMode);
1379 }
1380
1382 if (IsTextFrame() && IsAutoGrow(*this))
1383 { // adapt text frame!
1385 }
1386 if (!IsTextFrame())
1387 {
1388 // the SnapRect keeps its size
1390 }
1391
1392 // always invalidate BoundRect on change
1394 ActionChanged();
1395
1397}
1398
1400{
1401 SdrText* pText = getActiveText();
1402 if( !(pText && pText->GetOutlinerParaObject()) )
1403 return;
1404
1405 pText->ReformatText();
1406 if (mbTextFrame)
1407 {
1409 }
1410 else
1411 {
1412 // the SnapRect keeps its size
1414 SetBoundAndSnapRectsDirty(/*bNotMyself*/true);
1415 }
1417 ActionChanged();
1418 // i22396
1419 // Necessary here since we have no compare operator at the outliner
1420 // para object which may detect changes regarding the combination
1421 // of outliner para data and configuration (e.g., change of
1422 // formatting of text numerals)
1424}
1425
1426std::unique_ptr<SdrObjGeoData> SdrTextObj::NewGeoData() const
1427{
1428 return std::make_unique<SdrTextObjGeoData>();
1429}
1430
1432{
1434 SdrTextObjGeoData& rTGeo=static_cast<SdrTextObjGeoData&>(rGeo);
1435 rTGeo.maRect = maRect;
1436 rTGeo.maGeo = maGeo;
1437}
1438
1440{ // RectsDirty is called by SdrObject
1442 const SdrTextObjGeoData& rTGeo=static_cast<const SdrTextObjGeoData&>(rGeo);
1443 NbcSetLogicRect(rTGeo.maRect);
1444 maGeo = rTGeo.maGeo;
1446}
1447
1448drawing::TextFitToSizeType SdrTextObj::GetFitToSize() const
1449{
1450 drawing::TextFitToSizeType eType = drawing::TextFitToSizeType_NONE;
1451
1452 if(!IsAutoGrowWidth())
1454
1455 return eType;
1456}
1457
1459{
1460 return maRect;
1461}
1462
1464{
1465 SdrText* pText = getActiveText();
1466 if( pText && (pText->GetOutlinerParaObject() == nullptr) )
1467 {
1468 OutlinerMode nOutlMode = OutlinerMode::TextObject;
1470 nOutlMode = OutlinerMode::OutlineObject;
1471
1472 pText->ForceOutlinerParaObject( nOutlMode );
1473 }
1474}
1475
1477{
1478 //if (!IsChainable())
1479 // return NULL;
1480
1482}
1483
1485{
1487 {
1488 return mpEditingOutliner->IsVertical();
1489 }
1490
1491 OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject();
1492 if(pOutlinerParaObject)
1493 {
1494 return pOutlinerParaObject->IsEffectivelyVertical();
1495 }
1496
1497 return false;
1498}
1499
1501{
1502 OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject();
1503
1504 if( !pOutlinerParaObject && bVertical )
1505 {
1506 // we only need to force an outliner para object if the default of
1507 // horizontal text is changed
1509 pOutlinerParaObject = GetOutlinerParaObject();
1510 }
1511
1512 if (!pOutlinerParaObject ||
1513 (pOutlinerParaObject->IsEffectivelyVertical() == bVertical))
1514 return;
1515
1516 // get item settings
1517 const SfxItemSet& rSet = GetObjectItemSet();
1518 bool bAutoGrowWidth = rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH).GetValue();
1519 bool bAutoGrowHeight = rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT).GetValue();
1520
1521 // Also exchange hor/ver adjust items
1524
1525 // rescue object size
1526 tools::Rectangle aObjectRect = GetSnapRect();
1527
1528 // prepare ItemSet to set exchanged width and height items
1530 // Expanded item ranges to also support hor and ver adjust.
1533
1534 aNewSet.Put(rSet);
1535 aNewSet.Put(makeSdrTextAutoGrowWidthItem(bAutoGrowHeight));
1536 aNewSet.Put(makeSdrTextAutoGrowHeightItem(bAutoGrowWidth));
1537
1538 // Exchange horz and vert adjusts
1539 switch (eVert)
1540 {
1545 }
1546 switch (eHorz)
1547 {
1552 }
1553
1554 SetObjectItemSet(aNewSet);
1555
1556 pOutlinerParaObject = GetOutlinerParaObject();
1557 if (pOutlinerParaObject)
1558 {
1559 // set ParaObject orientation accordingly
1560 pOutlinerParaObject->SetVertical(bVertical);
1561 }
1562
1563 // restore object size
1564 SetSnapRect(aObjectRect);
1565}
1566
1568{
1571
1572 if (OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject())
1573 return pOutlinerParaObject->IsTopToBottom();
1574
1575 return false;
1576}
1577
1578// transformation interface for StarOfficeAPI. This implements support for
1579// homogeneous 3x3 matrices containing the transformation of the SdrObject. At the
1580// moment it contains a shearX, rotation and translation, but for setting all linear
1581// transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
1582
1583
1584// gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
1585// with the base geometry and returns TRUE. Otherwise it returns FALSE.
1587{
1588 // get turn and shear
1589 double fRotate = toRadians(maGeo.nRotationAngle);
1590 double fShearX = toRadians(maGeo.nShearAngle);
1591
1592 // get aRect, this is the unrotated snaprect
1593 tools::Rectangle aRectangle(maRect);
1594
1595 // fill other values
1596 basegfx::B2DTuple aScale(aRectangle.GetWidth(), aRectangle.GetHeight());
1597 basegfx::B2DTuple aTranslate(aRectangle.Left(), aRectangle.Top());
1598
1599 // position maybe relative to anchorpos, convert
1600 if( getSdrModelFromSdrObject().IsWriter() )
1601 {
1602 if(GetAnchorPos().X() || GetAnchorPos().Y())
1603 {
1604 aTranslate -= basegfx::B2DTuple(GetAnchorPos().X(), GetAnchorPos().Y());
1605 }
1606 }
1607
1608 // build matrix
1610 aScale,
1611 basegfx::fTools::equalZero(fShearX) ? 0.0 : tan(fShearX),
1612 basegfx::fTools::equalZero(fRotate) ? 0.0 : -fRotate,
1613 aTranslate);
1614
1615 return false;
1616}
1617
1618// sets the base geometry of the object using infos contained in the homogeneous 3x3 matrix.
1619// If it's an SdrPathObj it will use the provided geometry information. The Polygon has
1620// to use (0,0) as upper left and will be scaled to the given size in the matrix.
1622{
1623 // break up matrix
1624 basegfx::B2DTuple aScale;
1625 basegfx::B2DTuple aTranslate;
1626 double fRotate(0.0);
1627 double fShearX(0.0);
1628 rMatrix.decompose(aScale, aTranslate, fRotate, fShearX);
1629
1630 // flip?
1631 bool bFlipX = aScale.getX() < 0.0,
1632 bFlipY = aScale.getY() < 0.0;
1633 if (bFlipX)
1634 {
1635 aScale.setX(fabs(aScale.getX()));
1636 }
1637 if (bFlipY)
1638 {
1639 aScale.setY(fabs(aScale.getY()));
1640 }
1641
1642 // reset object shear and rotations
1643 maGeo.nRotationAngle = 0_deg100;
1645 maGeo.nShearAngle = 0_deg100;
1646 maGeo.RecalcTan();
1647
1648 // if anchor is used, make position relative to it
1649 if( getSdrModelFromSdrObject().IsWriter() )
1650 {
1651 if(GetAnchorPos().X() || GetAnchorPos().Y())
1652 {
1653 aTranslate += basegfx::B2DTuple(GetAnchorPos().X(), GetAnchorPos().Y());
1654 }
1655 }
1656
1657 // build and set BaseRect (use scale)
1658 Size aSize(FRound(aScale.getX()), FRound(aScale.getY()));
1659 tools::Rectangle aBaseRect(Point(), aSize);
1660 SetSnapRect(aBaseRect);
1661
1662 // flip?
1663 if (bFlipX)
1664 {
1665 Mirror(Point(), Point(0, 1));
1666 }
1667 if (bFlipY)
1668 {
1669 Mirror(Point(), Point(1, 0));
1670 }
1671
1672 // shear?
1673 if(!basegfx::fTools::equalZero(fShearX))
1674 {
1675 GeoStat aGeoStat;
1676 aGeoStat.nShearAngle = Degree100(FRound(basegfx::rad2deg<100>(atan(fShearX))));
1677 aGeoStat.RecalcTan();
1678 Shear(Point(), aGeoStat.nShearAngle, aGeoStat.mfTanShearAngle, false);
1679 }
1680
1681 // rotation?
1682 if(!basegfx::fTools::equalZero(fRotate))
1683 {
1684 GeoStat aGeoStat;
1685
1686 // #i78696#
1687 // fRotate is matematically correct, but aGeoStat.nRotationAngle is
1688 // mirrored -> mirror value here
1689 aGeoStat.nRotationAngle = NormAngle36000(Degree100(FRound(-basegfx::rad2deg<100>(fRotate))));
1690 aGeoStat.RecalcSinCos();
1691 Rotate(Point(), aGeoStat.nRotationAngle, aGeoStat.mfSinRotationAngle, aGeoStat.mfCosRotationAngle);
1692 }
1693
1694 // translate?
1695 if(!aTranslate.equalZero())
1696 {
1697 Move(Size(FRound(aTranslate.getX()), FRound(aTranslate.getY())));
1698 }
1699}
1700
1702{
1704}
1705
1706// moved inlines here form hxx
1707
1709{
1710 return GetObjectItemSet().Get(SDRATTR_CORNER_RADIUS).GetValue();
1711}
1712
1714{
1716}
1717
1719{
1721}
1722
1724{
1725 return GetObjectItemSet().Get(SDRATTR_TEXT_MINFRAMEWIDTH).GetValue();
1726}
1727
1729{
1730 return GetObjectItemSet().Get(SDRATTR_TEXT_MAXFRAMEWIDTH).GetValue();
1731}
1732
1734{
1735 return !mbTextFrame // Default is FALSE
1737}
1738
1740{
1741 return !mbTextFrame // Default is: no, don't HideContour; HideContour not together with TextFrames
1743}
1744
1746{
1747 return !mbTextFrame // ContourFrame not together with normal TextFrames
1749}
1750
1752{
1753 return GetObjectItemSet().Get(SDRATTR_TEXT_LEFTDIST).GetValue();
1754}
1755
1757{
1758 return GetObjectItemSet().Get(SDRATTR_TEXT_RIGHTDIST).GetValue();
1759}
1760
1762{
1763 return GetObjectItemSet().Get(SDRATTR_TEXT_UPPERDIST).GetValue();
1764}
1765
1767{
1768 return GetObjectItemSet().Get(SDRATTR_TEXT_LOWERDIST).GetValue();
1769}
1770
1772{
1773 return GetObjectItemSet().Get(SDRATTR_TEXT_ANIKIND).GetValue();
1774}
1775
1777{
1778 return GetObjectItemSet().Get(SDRATTR_TEXT_ANIDIRECTION).GetValue();
1779}
1780
1782{
1784}
1785
1787{
1788 return GetObjectItemSet().Get(SDRATTR_TEXTCOLUMNS_NUMBER).GetValue();
1789}
1790
1791void SdrTextObj::SetTextColumnsNumber(sal_Int16 nColumns)
1792{
1794}
1795
1797{
1799}
1800
1802{
1804}
1805
1807{
1809}
1810
1811// Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a
1812// painting rectangle. Rotation is excluded from the returned values.
1814 tools::Rectangle& rScrollRectangle, tools::Rectangle& rPaintRectangle)
1815{
1816 GDIMetaFile* pRetval = nullptr;
1817 SdrOutliner& rOutliner = ImpGetDrawOutliner();
1818 tools::Rectangle aTextRect;
1819 tools::Rectangle aAnchorRect;
1820 tools::Rectangle aPaintRect;
1821 Fraction aFitXCorrection(1,1);
1822 bool bContourFrame(IsContourTextFrame());
1823
1824 // get outliner set up. To avoid getting a somehow rotated MetaFile,
1825 // temporarily disable object rotation.
1827 maGeo.nRotationAngle = 0_deg100;
1828 ImpSetupDrawOutlinerForPaint( bContourFrame, rOutliner, aTextRect, aAnchorRect, aPaintRect, aFitXCorrection );
1829 maGeo.nRotationAngle = nAngle;
1830
1831 tools::Rectangle aScrollFrameRect(aPaintRect);
1832 const SfxItemSet& rSet = GetObjectItemSet();
1833 SdrTextAniDirection eDirection = rSet.Get(SDRATTR_TEXT_ANIDIRECTION).GetValue();
1834
1835 if(SdrTextAniDirection::Left == eDirection || SdrTextAniDirection::Right == eDirection)
1836 {
1837 aScrollFrameRect.SetLeft( aAnchorRect.Left() );
1838 aScrollFrameRect.SetRight( aAnchorRect.Right() );
1839 }
1840
1841 if(SdrTextAniDirection::Up == eDirection || SdrTextAniDirection::Down == eDirection)
1842 {
1843 aScrollFrameRect.SetTop( aAnchorRect.Top() );
1844 aScrollFrameRect.SetBottom( aAnchorRect.Bottom() );
1845 }
1846
1847 // create the MetaFile
1848 pRetval = new GDIMetaFile;
1850 pBlackHole->EnableOutput(false);
1851 pRetval->Record(pBlackHole);
1852 Point aPaintPos = aPaintRect.TopLeft();
1853
1854 rOutliner.Draw(*pBlackHole, aPaintPos);
1855
1856 pRetval->Stop();
1857 pRetval->WindStart();
1858
1859 // return PaintRectanglePixel and pRetval;
1860 rScrollRectangle = aScrollFrameRect;
1861 rPaintRectangle = aPaintRect;
1862
1863 return pRetval;
1864}
1865
1866// Access to TextAnimationAllowed flag
1868{
1869 return GetFitToSize() == drawing::TextFitToSizeType_AUTOFIT;
1870}
1871
1873{
1874 const drawing::TextFitToSizeType eFit = GetFitToSize();
1875 return (eFit == drawing::TextFitToSizeType_PROPORTIONAL
1876 || eFit == drawing::TextFitToSizeType_ALLLINES);
1877}
1878
1880{
1881 if(mbTextAnimationAllowed != bNew)
1882 {
1884 ActionChanged();
1885 }
1886}
1887
1890{
1891 const EditStatusFlags nStat = pEditStatus->GetStatusWord();
1892 const bool bGrowX = bool(nStat & EditStatusFlags::TEXTWIDTHCHANGED);
1893 const bool bGrowY = bool(nStat & EditStatusFlags::TextHeightChanged);
1894 if(!(mbTextFrame && (bGrowX || bGrowY)))
1895 return;
1896
1897 if ((bGrowX && IsAutoGrowWidth()) || (bGrowY && IsAutoGrowHeight()))
1898 {
1900 }
1901 else if ( (IsAutoFit() || IsFitToSize()) && !mbInDownScale)
1902 {
1903 assert(mpEditingOutliner);
1904 mbInDownScale = true;
1905
1906 // sucks that we cannot disable paints via
1907 // mpEditingOutliner->SetUpdateMode(FALSE) - but EditEngine skips
1908 // formatting as well, then.
1910 mbInDownScale = false;
1911 }
1912}
1913
1914/* Begin chaining code */
1915
1916// XXX: Make it a method somewhere?
1917static SdrObject *ImpGetObjByName(SdrObjList const *pObjList, std::u16string_view aObjName)
1918{
1919 // scan the whole list
1920 size_t nObjCount = pObjList->GetObjCount();
1921 for (size_t i = 0; i < nObjCount; i++) {
1922 SdrObject *pCurObj = pObjList->GetObj(i);
1923
1924 if (pCurObj->GetName() == aObjName) {
1925 return pCurObj;
1926 }
1927 }
1928 // not found
1929 return nullptr;
1930}
1931
1932// XXX: Make it a (private) method of SdrTextObj
1933static void ImpUpdateChainLinks(SdrTextObj *pTextObj, std::u16string_view aNextLinkName)
1934{
1935 // XXX: Current implementation constraints text boxes to be on the same page
1936
1937 // No next link
1938 if (aNextLinkName.empty()) {
1939 pTextObj->SetNextLinkInChain(nullptr);
1940 return;
1941 }
1942
1943 SdrPage *pPage(pTextObj->getSdrPageFromSdrObject());
1944 assert(pPage);
1945 SdrTextObj *pNextTextObj = DynCastSdrTextObj
1946 (ImpGetObjByName(pPage, aNextLinkName));
1947 if (!pNextTextObj) {
1948 SAL_INFO("svx.chaining", "[CHAINING] Can't find object as next link.");
1949 return;
1950 }
1951
1952 pTextObj->SetNextLinkInChain(pNextTextObj);
1953}
1954
1956{
1957 // Read it as item
1958 const SfxItemSet& rSet = GetObjectItemSet();
1959 OUString aNextLinkName = rSet.Get(SDRATTR_TEXT_CHAINNEXTNAME).GetValue();
1960
1961 // Update links if any inconsistency is found
1962 bool bNextLinkUnsetYet = !aNextLinkName.isEmpty() && !mpNextInChain;
1963 bool bInconsistentNextLink = mpNextInChain && mpNextInChain->GetName() != aNextLinkName;
1964 // if the link is not set despite there should be one OR if it has changed
1965 if (bNextLinkUnsetYet || bInconsistentNextLink) {
1966 ImpUpdateChainLinks(const_cast<SdrTextObj *>(this), aNextLinkName);
1967 }
1968
1969 return !aNextLinkName.isEmpty(); // XXX: Should we also check for GetNilChainingEvent? (see old code below)
1970
1971/*
1972 // Check that no overflow is going on
1973 if (!GetTextChain() || GetTextChain()->GetNilChainingEvent(this))
1974 return false;
1975*/
1976}
1977
1979{
1980 if (!mpEditingOutliner)
1981 return;
1982
1983 // Outliner for text transfer
1984 SdrOutliner &aDrawOutliner = ImpGetDrawOutliner();
1985
1986 EditingTextChainFlow aTxtChainFlow(this);
1988
1989 if (aTxtChainFlow.IsOverflow()) {
1990 SAL_INFO("svx.chaining", "[CHAINING] Overflow going on");
1991 // One outliner is for non-overflowing text, the other for overflowing text
1992 // We remove text directly from the editing outliner
1993 aTxtChainFlow.ExecuteOverflow(mpEditingOutliner, &aDrawOutliner);
1994 } else if (aTxtChainFlow.IsUnderflow()) {
1995 SAL_INFO("svx.chaining", "[CHAINING] Underflow going on");
1996 // underflow-induced overflow
1997 aTxtChainFlow.ExecuteUnderflow(&aDrawOutliner);
1998 bool bIsOverflowFromUnderflow = aTxtChainFlow.IsOverflow();
1999 // handle overflow
2000 if (bIsOverflowFromUnderflow) {
2001 SAL_INFO("svx.chaining", "[CHAINING] Overflow going on (underflow induced)");
2002 // prevents infinite loops when setting text for editing outliner
2003 aTxtChainFlow.ExecuteOverflow(&aDrawOutliner, &aDrawOutliner);
2004 }
2005 }
2006}
2007
2009{
2010 /*
2011 if (GetTextChain())
2012 return GetTextChain()->GetNextLink(this);
2013
2014 return NULL;
2015 */
2016
2017 return mpNextInChain;
2018}
2019
2021{
2022 // Basically a doubly linked list implementation
2023
2024 SdrTextObj *pOldNextObj = mpNextInChain;
2025
2026 // Replace next link
2027 mpNextInChain = pNextObj;
2028 // Deal with old next link's prev link
2029 if (pOldNextObj) {
2030 pOldNextObj->mpPrevInChain = nullptr;
2031 }
2032
2033 // Deal with new next link's prev link
2034 if (mpNextInChain) {
2035 // If there is a prev already at all and this is not already the current object
2040 }
2041
2042 // TODO: Introduce check for circular chains
2043
2044}
2045
2047{
2048 /*
2049 if (GetTextChain())
2050 return GetTextChain()->GetPrevLink(this);
2051
2052 return NULL;
2053 */
2054
2055 return mpPrevInChain;
2056}
2057
2059{
2060 // Prevent chaining it 1) during dragging && 2) when we are editing next link
2062}
2063
2065{
2067 SdrTextObj *pTextObjClone = DynCastSdrTextObj(pClone.get());
2068 if (pTextObjClone != nullptr) {
2069 // Avoid transferring of text for chainable object during dragging
2070 pTextObjClone->mbIsUnchainableClone = true;
2071 }
2072
2073 return pClone;
2074 }
2075
2076/* End chaining code */
2077
2080{
2081 if( !mxText )
2082 return getText( 0 );
2083 else
2084 return mxText.get();
2085}
2086
2088SdrText* SdrTextObj::getText( sal_Int32 nIndex ) const
2089{
2090 if( nIndex == 0 )
2091 {
2092 if( !mxText )
2093 const_cast< SdrTextObj* >(this)->mxText = new SdrText( *const_cast< SdrTextObj* >(this) );
2094 return mxText.get();
2095 }
2096 else
2097 {
2098 return nullptr;
2099 }
2100}
2101
2104{
2105 return 1;
2106}
2107
2109void SdrTextObj::setActiveText( sal_Int32 /*nIndex*/ )
2110{
2111}
2112
2114sal_Int32 SdrTextObj::CheckTextHit(const Point& /*rPnt*/) const
2115{
2116 return 0;
2117}
2118
2120{
2122}
2123
2124
2125// The concept of the text object:
2126// ~~~~~~~~~~~~~~~~~~~~~~~~
2127// Attributes/Variations:
2128// - bool text frame / graphics object with caption
2129// - bool FontWork (if it is not a text frame and not a ContourTextFrame)
2130// - bool ContourTextFrame (if it is not a text frame and not Fontwork)
2131// - long rotation angle (if it is not FontWork)
2132// - long text frame margins (if it is not FontWork)
2133// - bool FitToSize (if it is not FontWork)
2134// - bool AutoGrowingWidth/Height (if it is not FitToSize and not FontWork)
2135// - long Min/MaxFrameWidth/Height (if AutoGrowingWidth/Height)
2136// - enum horizontal text anchoring left,center,right,justify/block,Stretch(ni)
2137// - enum vertical text anchoring top, middle, bottom, block, stretch(ni)
2138// - enum ticker text (if it is not FontWork)
2139
2140// Every derived object is either a text frame (mbTextFrame=true)
2141// or a drawing object with a caption (mbTextFrame=false).
2142
2143// Default anchoring for text frames:
2144// SDRTEXTHORZADJUST_BLOCK, SDRTEXTVERTADJUST_TOP
2145// = static Pool defaults
2146// Default anchoring for drawing objects with a caption:
2147// SDRTEXTHORZADJUST_CENTER, SDRTEXTVERTADJUST_CENTER
2148// via "hard" attribution of SdrAttrObj
2149
2150// Every object derived from SdrTextObj must return an "UnrotatedSnapRect"
2151// (->TakeUnrotatedSnapRect()) (the reference point for the rotation is the top
2152// left of the rectangle (maGeo.nRotationAngle)) which is the basis for anchoring
2153// text. We then subtract the text frame margins from this rectangle, as a re-
2154// sult we get the anchoring area (->TakeTextAnchorRect()). Within this area, we
2155// calculate the anchoring point and the painting area, depending on the hori-
2156// zontal and vertical adjustment of the text (SdrTextVertAdjust,
2157// SdrTextHorzAdjust).
2158// In the case of drawing objects with a caption the painting area might well
2159// be larger than the anchoring area, for text frames on the other hand, it is
2160// always of the same or a smaller size (except when there are negative text
2161// frame margins).
2162
2163// FitToSize takes priority over text anchoring and AutoGrowHeight/Width. When
2164// FitToSize is turned on, the painting area is always equal to the anchoring
2165// area. Additionally, FitToSize doesn't allow automatic line breaks.
2166
2167// ContourTextFrame:
2168// - long rotation angle
2169// - long text frame margins (maybe later)
2170// - bool FitToSize (maybe later)
2171// - bool AutoGrowingWidth/Height (maybe much later)
2172// - long Min/MaxFrameWidth/Height (maybe much later)
2173// - enum horizontal text anchoring (maybe later, for now: left, centered)
2174// - enum vertical text anchoring (maybe later, for now: top)
2175// - enum ticker text (maybe later, maybe even with correct clipping)
2176
2177// When making changes, check these:
2178// - Paint
2179// - HitTest
2180// - ConvertToPoly
2181// - Edit
2182// - Printing, Saving, Painting in neighboring View while editing
2183// - ModelChanged (e. g. through a neighboring View or rulers) while editing
2184// - FillColorChanged while editing
2185// - and many more...
2186
2187
2188/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
EditStatusFlags GetStatusWord() const
virtual OUString GetText(sal_Int32 nPara) const=0
virtual void CheckForFlowEvents(SdrOutliner *) override
void WindStart()
bool IsPause() const
void Pause(bool bPause)
bool IsRecord() const
void Record(OutputDevice *pOutDev)
The transformation of a rectangle into a polygon, by using angle parameters from GeoStat.
Definition: svdtrans.hxx:201
double mfTanShearAngle
Definition: svdtrans.hxx:205
double mfCosRotationAngle
Definition: svdtrans.hxx:207
Degree100 nShearAngle
Definition: svdtrans.hxx:204
double mfSinRotationAngle
Definition: svdtrans.hxx:206
void RecalcTan()
Definition: svdtrans.cxx:456
void RecalcSinCos()
Definition: svdtrans.cxx:444
Degree100 nRotationAngle
Definition: svdtrans.hxx:203
const EditTextObject & GetTextObject() const
void SetVertical(bool bNew)
bool IsTopToBottom() const
bool IsEffectivelyVertical() const
void SetMaxAutoPaperSize(const Size &rSz)
void SetText(const OutlinerParaObject &)
OUString GetText(Paragraph const *pPara, sal_Int32 nParaCount=1) const
const Size & GetPaperSize() const
void SetMinColumnWrapHeight(tools::Long nVal)
Paragraph * GetParagraph(sal_Int32 nAbsPos) const
void GetGlobalCharStretching(double &rX, double &rY) const
void SetGlobalCharStretching(double nX=100.0, double nY=100.0)
void SetMinAutoPaperSize(const Size &rSz)
std::optional< OutlinerParaObject > CreateParaObject(sal_Int32 nStartPara=0, sal_Int32 nParaCount=EE_PARA_ALL) const
void SetPaperSize(const Size &rSize)
void Clear()
void SetStyleSheet(sal_Int32 nPara, SfxStyleSheet *pStyle)
bool SetUpdateLayout(bool bUpdate)
void SetFixedCellHeight(bool bUseFixedCellHeight)
EEControlBits GetControlWord() const
void SetControlWord(EEControlBits nWord)
void ClearPolygon()
void SetPolygon(const basegfx::B2DPolyPolygon &rPolyPolygon)
Size CalcTextSize()
bool IsVertical() const
void Draw(OutputDevice &rOutDev, const tools::Rectangle &rOutRect)
ErrCode Read(SvStream &rInput, const OUString &rBaseURL, EETextFormat, SvKeyValueIterator *pHTTPHeaderAttrs=nullptr)
void SetRefMapMode(const MapMode &)
void Init(OutlinerMode nMode)
OutputDevice * GetRefDevice() const
bool IsModified() const
bool IsTopToBottom() const
Size CalcTextSizeNTP()
sal_Int32 GetParagraphCount() const
static vcl::Font GetDefaultFont(DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
virtual const tools::Rectangle & GetSnapRect() const override
Definition: svdoattr.cxx:49
tools::Rectangle maSnapRect
Definition: svdoattr.hxx:41
TextChain * GetTextChain() const
Definition: svdmodel.cxx:1809
All geometrical data of an arbitrary object for use in undo/redo.
Definition: svdobj.hxx:175
SdrObject * GetObj(size_t nNum) const
Definition: svdpage.cxx:822
size_t GetObjCount() const
Definition: svdpage.cxx:816
Provides information about various ZObject properties.
Definition: svdobj.hxx:197
Abstract DrawObject.
Definition: svdobj.hxx:261
const SfxPoolItem & GetMergedItem(const sal_uInt16 nWhich) const
Definition: svdobj.cxx:2012
const Point & GetAnchorPos() const
Definition: svdobj.cxx:1656
void ActionChanged() const
Definition: svdobj.cxx:273
virtual rtl::Reference< SdrObject > getFullDragClone() const
Definition: svdobj.cxx:1306
virtual sdr::properties::BaseProperties & GetProperties() const
Definition: svdobj.cxx:220
virtual void Shear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1599
bool LineGeometryUsageIsNecessary() const
Definition: svdobj.cxx:1035
void BroadcastObjectChange() const
Definition: svdobj.cxx:978
void SetObjectItemSet(const SfxItemSet &rSet)
Definition: svdobj.cxx:1997
virtual void RestoreGeoData(const SdrObjGeoData &rGeo)
Definition: svdobj.cxx:1926
bool mbSupportTextIndentingOnLineWidthChange
Definition: svdobj.hxx:928
void SetObjectItem(const SfxPoolItem &rItem)
Definition: svdobj.cxx:1982
const SfxPoolItem & GetObjectItem(const sal_uInt16 nWhich) const
Definition: svdobj.cxx:2007
virtual void Mirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1590
virtual void handlePageChange(SdrPage *pOldPage, SdrPage *pNewPage)
Definition: svdobj.cxx:523
virtual void SaveGeoData(SdrObjGeoData &rGeo) const
Definition: svdobj.cxx:1903
static rtl::Reference< T > Clone(T const &rObj, SdrModel &rTargetModel)
Definition: svdobj.hxx:449
virtual void Move(const Size &rSiz)
Definition: svdobj.cxx:1534
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:289
SdrObjUserCall * m_pUserCall
Definition: svdobj.hxx:903
virtual void SetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1699
SfxStyleSheet * GetStyleSheet() const
Definition: svdobj.cxx:2247
virtual const OUString & GetName() const
Definition: svdobj.cxx:769
sdr::contact::ViewContact & GetViewContact() const
Definition: svdobj.cxx:261
virtual void Rotate(const Point &rRef, Degree100 nAngle, double sn, double cs)
Definition: svdobj.cxx:1579
void SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle &rBoundRect) const
Definition: svdobj.cxx:2766
virtual void SetChanged()
Definition: svdobj.cxx:1002
virtual const tools::Rectangle & GetLastBoundRect() const
Definition: svdobj.cxx:940
SdrPage * getSdrPageFromSdrObject() const
Definition: svdobj.cxx:279
virtual basegfx::B2DPolyPolygon TakeContour() const
contour for TextToContour
Definition: svdobj.cxx:1105
virtual void SetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1690
virtual void SetBoundRectDirty()
Definition: svdobj.cxx:329
virtual void SetBoundAndSnapRectsDirty(bool bNotMyself=false, bool bRecursive=true)
Definition: svdobj.cxx:509
const SfxItemSet & GetObjectItemSet() const
Definition: svdobj.cxx:1972
void SetTextObj(const SdrTextObj *pObj)
Definition: svdoutl.cxx:40
const SdrTextObj * GetTextObj() const
Definition: svdoutl.cxx:87
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:377
sal_Int16 GetMaxScale() const
Definition: sdtfsitm.hxx:59
tools::Rectangle maRect
Definition: svdotext.hxx:91
SdrTextObj * GetPrevLinkInChain() const
Definition: svdotext.cxx:2046
SdrTextHorzAdjust GetTextHorizontalAdjust() const
Definition: svdotext.cxx:340
virtual std::unique_ptr< sdr::properties::BaseProperties > CreateObjectSpecificProperties() override
Definition: svdotext.cxx:60
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const override
Definition: svdotext.cxx:1086
virtual std::unique_ptr< SdrObjGeoData > NewGeoData() const override
A derived class must override these 3 methods if it has own geometric data that must be saved for Und...
Definition: svdotext.cxx:1426
GeoStat maGeo
Definition: svdotext.hxx:171
virtual void AdaptTextMinSize()
Definition: svdotext.cxx:501
bool HasTextColumnsSpacing() const
Definition: svdotext.cxx:1796
virtual bool IsAutoGrowWidth() const
Definition: svdotext.cxx:313
tools::Long GetMaxTextFrameHeight() const
Definition: svdotext.cxx:1718
virtual void SaveGeoData(SdrObjGeoData &rGeo) const override
Definition: svdotext.cxx:1431
bool IsTopToBottom() const
Definition: svdotext.cxx:1567
virtual void RestoreGeoData(const SdrObjGeoData &rGeo) override
Definition: svdotext.cxx:1439
void UpdateOutlinerFormatting(SdrOutliner &rOutl, tools::Rectangle &rPaintRect) const
Update given Outliner equivalently to SdrTextObj::Paint()
Definition: svdotext.cxx:1320
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
Definition: svdotext.cxx:1129
tools::Long GetTextLowerDistance() const
Bottom inner spacing to borders.
Definition: svdotext.cxx:1766
bool IsChainable() const
Definition: svdotext.cxx:1955
SVX_DLLPRIVATE void ImpDeregisterLink()
Definition: svdotxln.cxx:266
SdrOutliner & ImpGetDrawOutliner() const
Definition: svdotext.cxx:1179
SdrTextObj * GetNextLinkInChain() const
Definition: svdotext.cxx:2008
sal_Int32 GetTextColumnsSpacing() const
Definition: svdotext.cxx:1801
void ImpSetTextStyleSheetListeners()
Definition: svdotxat.cxx:298
virtual sal_Int32 CheckTextHit(const Point &rPnt) const
returns the index of the text that contains the given point or -1
Definition: svdotext.cxx:2114
tools::Long GetMinTextFrameHeight() const
Definition: svdotext.cxx:1713
virtual OUString TakeObjNameSingul() const override
Definition: svdotext.cxx:1009
void SetTextColumnsSpacing(sal_Int32 nSpacing)
Definition: svdotext.cxx:1806
bool IsAutoFit() const
returns true if the PPT autofit of text into shape bounds is enabled. implies IsFitToSize()==false!
Definition: svdotext.cxx:1867
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const override
Definition: svdotext.cxx:423
virtual const Size & GetTextSize() const
Definition: svdotext.cxx:267
void NbcSetEckenradius(tools::Long nRad)
Definition: svdotext.cxx:494
bool IsFitToSize() const
returns true if the old feature for fitting shape content should into shape is enabled....
Definition: svdotext.cxx:1872
bool CanCreateEditOutlinerParaObject() const
Definition: svdotext.cxx:847
bool IsInEditMode() const
Definition: svdotext.hxx:312
SVX_DLLPRIVATE void ImpRegisterLink()
Definition: svdotxln.cxx:254
SdrTextObj * mpPrevInChain
Definition: svdotext.hxx:210
virtual ~SdrTextObj() override
Definition: svdotext.cxx:194
static void ImpSetCharStretching(SdrOutliner &rOutliner, const Size &rTextSize, const Size &rShapeSize, Fraction &rFitXCorrection)
Definition: svdotext.cxx:867
SVX_DLLPRIVATE void ImpSetupDrawOutlinerForPaint(bool bContourFrame, SdrOutliner &rOutliner, tools::Rectangle &rTextRect, tools::Rectangle &rAnchorRect, tools::Rectangle &rPaintRect, Fraction &aFitXCorrection) const
Definition: svdotext.cxx:1190
virtual SdrText * getActiveText() const
returns the currently active text.
Definition: svdotext.cxx:2079
SdrOutliner * mpEditingOutliner
Definition: svdotext.hxx:182
tools::Long GetMaxTextFrameWidth() const
Definition: svdotext.cxx:1728
virtual void TakeTextAnchorRect(::tools::Rectangle &rAnchorRect) const
Definition: svdotext.cxx:650
void ImpSetContourPolygon(SdrOutliner &rOutliner, tools::Rectangle const &rAnchorRect, bool bLineWidth) const
Definition: svdotext.cxx:555
tools::Rectangle maRect
Definition: svdotext.hxx:168
virtual OutlinerParaObject * GetOutlinerParaObject() const override
Definition: svdotext.cxx:1344
bool mbIsUnchainableClone
Definition: svdotext.hxx:206
void SetText(const OUString &rStr)
Definition: svdotext.cxx:235
void NbcSetOutlinerParaObjectForText(std::optional< OutlinerParaObject > pTextObject, SdrText *pText)
Definition: svdotext.cxx:1367
void ImpCheckShear()
Definition: svdotext.cxx:414
virtual bool IsReallyEdited() const
returns true only if we are in edit mode and the user actually changed anything
Definition: svdotext.cxx:1701
virtual void onEditOutlinerStatusEvent(EditStatus *pEditStatus)
called from the SdrObjEditView during text edit when the status of the edit outliner changes
Definition: svdotext.cxx:1889
virtual void NbcReformatText() override
Definition: svdotext.cxx:1399
tools::Long GetTextLeftDistance() const
Left inner spacing to borders
Definition: svdotext.cxx:1751
virtual OUString TakeObjNamePlural() const override
Definition: svdotext.cxx:1068
std::optional< OutlinerParaObject > CreateEditOutlinerParaObject() const
Definition: svdotext.cxx:856
GDIMetaFile * GetTextScrollMetaFileAndRectangle(tools::Rectangle &rScrollRectangle, tools::Rectangle &rPaintRectangle)
Definition: svdotext.cxx:1813
bool mbInDownScale
Definition: svdotext.hxx:237
virtual basegfx::B2DPolyPolygon TakeContour() const override
contour for TextToContour
Definition: svdotext.cxx:1102
virtual bool IsAutoGrowHeight() const
Definition: svdotext.cxx:288
bool ImpCanConvTextToCurve() const
Definition: svdotxtr.cxx:413
void ImpAutoFitText(SdrOutliner &rOutliner) const
Definition: svdotext.cxx:1237
bool mbTextAnimationAllowed
Definition: svdotext.hxx:234
virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix &rMatrix, const basegfx::B2DPolyPolygon &rPolyPolygon) override
Definition: svdotext.cxx:1621
tools::Long GetTextRightDistance() const
Right inner spacing to borders
Definition: svdotext.cxx:1756
rtl::Reference< SdrText > mxText
Definition: svdotext.hxx:174
void NbcSetText(const OUString &rStr)
Definition: svdotext.cxx:225
virtual bool IsFontwork() const
Definition: svdotext.cxx:1733
virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt=true, bool bWdt=true)
Definition: svdotxat.cxx:241
SVX_DLLPRIVATE void ImpInitDrawOutliner(SdrOutliner &rOutl) const
Definition: svdotext.cxx:1160
virtual basegfx::B2DPolyPolygon TakeXorPoly() const override
The Xor-Polygon is required by the View to drag the object.
Definition: svdotext.cxx:1091
friend class SdrText
Definition: svdotext.hxx:162
SdrTextAniDirection GetTextAniDirection() const
Definition: svdotext.cxx:1776
static void ImpJustifyRect(tools::Rectangle &rRect)
Definition: svdotext.cxx:405
bool IsContourTextFrame() const
Definition: svdotext.cxx:1745
virtual std::unique_ptr< sdr::contact::ViewContact > CreateObjectSpecificViewContact() override
Definition: svdotext.cxx:66
virtual Point GetSnapPoint(sal_uInt32 i) const override
Definition: svdotext.cxx:1144
bool IsLinkedText() const
Definition: svdotext.hxx:325
bool mbDisableAutoWidthOnDragging
Definition: svdotext.hxx:231
SdrTextObj(SdrModel &rSdrModel)
Definition: svdotext.cxx:71
void SetTextSizeDirty()
Definition: svdotext.hxx:274
bool mbTextSizeDirty
Definition: svdotext.hxx:219
virtual bool HasText() const override
Definition: svdotxat.cxx:418
virtual void handlePageChange(SdrPage *pOldPage, SdrPage *pNewPage) override
Definition: svdotext.cxx:474
virtual sal_uInt32 GetSnapPointCount() const override
snap to special points of an Object (polygon points, center of circle)
Definition: svdotext.cxx:1139
const tools::Rectangle & GetGeoRect() const
Definition: svdotext.cxx:1458
static bool HasTextImpl(SdrOutliner const *pOutliner)
returns false if the given pointer is NULL or if the given SdrOutliner contains no text.
Definition: svdotext.cxx:452
virtual void SetVerticalWriting(bool bVertical)
Definition: svdotext.cxx:1500
void SetTextColumnsNumber(sal_Int16 nColumns)
Definition: svdotext.cxx:1791
virtual void TakeTextRect(SdrOutliner &rOutliner, tools::Rectangle &rTextRect, bool bNoEditText, tools::Rectangle *pAnchorRect, bool bLineWidth=true) const
Definition: svdotext.cxx:674
virtual sal_Int32 getTextCount() const override
returns the number of texts available for this object.
Definition: svdotext.cxx:2103
bool IsOutlText() const
Definition: svdotext.hxx:333
css::drawing::TextFitToSizeType GetFitToSize() const
Definition: svdotext.cxx:1448
sal_uInt16 GetFontScaleY() const
Definition: svdotext.cxx:1226
virtual bool AdjustTextFrameWidthAndHeight()
Definition: svdotxat.cxx:257
virtual rtl::Reference< SdrObject > getFullDragClone() const override
Definition: svdotext.cxx:2064
virtual void NbcSetOutlinerParaObject(std::optional< OutlinerParaObject > pTextObject) override
Definition: svdotext.cxx:1353
void onChainingEvent()
called from the SdrObjEditView during text edit when a chain of boxes is to be updated
Definition: svdotext.cxx:1978
tools::Long GetMinTextFrameWidth() const
Definition: svdotext.cxx:1723
SdrObjKind meTextKind
Definition: svdotext.hxx:190
virtual void setActiveText(sal_Int32 nIndex)
changes the current active text
Definition: svdotext.cxx:2109
SdrTextObj * mpNextInChain
Definition: svdotext.hxx:209
tools::Long GetEckenradius() const
Definition: svdotext.cxx:1708
bool IsTextFrame() const
Definition: svdotext.hxx:332
SdrTextVertAdjust GetTextVerticalAdjust() const
Definition: svdotext.cxx:372
TextChain * GetTextChain() const
Definition: svdotext.cxx:1476
void AdjustRectToTextDistance(tools::Rectangle &rAnchorRect) const
Definition: svdotext.cxx:617
virtual SdrObjKind GetObjIdentifier() const override
Definition: svdotext.cxx:447
virtual void TakeUnrotatedSnapRect(tools::Rectangle &rRect) const
Definition: svdotext.cxx:611
virtual SdrText * getText(sal_Int32 nIndex) const override
returns the nth available text.
Definition: svdotext.cxx:2088
void SetTextAnimationAllowed(bool bNew)
Definition: svdotext.cxx:1879
void ForceOutlinerParaObject()
Definition: svdotext.cxx:1463
bool mbNoShear
Definition: svdotext.hxx:218
SdrTextAniKind GetTextAniKind() const
Definition: svdotext.cxx:1771
bool IsHideContour() const
Definition: svdotext.cxx:1739
void FitFrameToTextSize()
Definition: svdotext.cxx:200
Size maTextSize
Definition: svdotext.hxx:177
bool HasTextColumnsNumber() const
Definition: svdotext.cxx:1781
void SetObjectItemNoBroadcast(const SfxPoolItem &rItem)
Definition: svdotext.cxx:2119
bool GetPreventChainable() const
Definition: svdotext.cxx:2058
void SetNextLinkInChain(SdrTextObj *)
Definition: svdotext.cxx:2020
void SetupOutlinerFormatting(SdrOutliner &rOutl, tools::Rectangle &rPaintRect) const
Setup given Outliner equivalently to SdrTextObj::Paint()
Definition: svdotext.cxx:1314
sal_Int16 GetTextColumnsNumber() const
Definition: svdotext.cxx:1786
bool mbTextFrame
Definition: svdotext.hxx:217
tools::Long GetTextUpperDistance() const
Top inner spacing to borders.
Definition: svdotext.cxx:1761
virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix &rMatrix, basegfx::B2DPolyPolygon &rPolyPolygon) const override
Definition: svdotext.cxx:1586
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
Definition: svdotxtr.cxx:74
virtual bool IsVerticalWriting() const
Definition: svdotext.cxx:1484
OutlinerParaObject * GetOutlinerParaObject()
Definition: svdtext.cxx:88
void CheckPortionInfo(const SdrOutliner &rOutliner)
Definition: svdtext.cxx:41
void ReformatText()
Definition: svdtext.cxx:61
void ForceOutlinerParaObject(OutlinerMode nOutlMode)
Definition: svdtext.cxx:117
virtual void SetOutlinerParaObject(std::optional< OutlinerParaObject > pTextObject)
Definition: svdtext.cxx:72
SfxItemPool * GetPool() const
bool HasItem(sal_uInt16 nWhich, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
tools::Long AdjustWidth(tools::Long n)
constexpr tools::Long Width() const
bool IsOverflow() const
bool IsUnderflow() const
void ExecuteUnderflow(SdrOutliner *)
void ExecuteOverflow(SdrOutliner *, SdrOutliner *)
bool decompose(B2DTuple &rScale, B2DTuple &rTranslate, double &rRotate, double &rShearX) const
void rotate(double fRadiant)
void append(const B2DPolygon &rPolygon, sal_uInt32 nCount=1)
void transform(const basegfx::B2DHomMatrix &rMatrix)
bool equalZero() const
TYPE getX() const
void setY(TYPE fY)
TYPE getY() const
void setX(TYPE fX)
void flushViewObjectContacts(bool bWithHierarchy=true)
virtual void SetObjectItemDirect(const SfxPoolItem &rItem)=0
::basegfx::B2DPolygon getB2DPolygon() const
tools::Rectangle GetBoundRect() const
constexpr Point Center() const
constexpr tools::Long GetWidth() const
constexpr void SetLeft(tools::Long v)
constexpr void SetTop(tools::Long v)
constexpr tools::Long Top() const
void SetSize(const Size &)
constexpr Point TopLeft() const
constexpr void SetRight(tools::Long v)
constexpr Size GetSize() const
void Move(tools::Long nHorzMoveDelta, tools::Long nVertMoveDelta)
constexpr tools::Long Right() const
tools::Long AdjustTop(tools::Long nVertMoveDelta)
tools::Long AdjustRight(tools::Long nHorzMoveDelta)
constexpr void SetBottom(tools::Long v)
constexpr Point BottomRight() const
constexpr Point TopRight() const
constexpr tools::Long GetHeight() const
tools::Long AdjustBottom(tools::Long nVertMoveDelta)
tools::Long AdjustLeft(tools::Long nHorzMoveDelta)
constexpr tools::Long Left() const
constexpr tools::Long Bottom() const
constexpr bool IsEmpty() const
constexpr Point BottomLeft() const
static bool IsFuzzing()
void SetFontSize(const Size &)
double toRadians(D x)
OUString SvxResId(TranslateId aId)
Definition: dialmgr.cxx:24
float u
EETextFormat
EEControlBits
EditStatusFlags
DocumentType eType
OUString sName
tools::Long FRound(double fVal)
sal_Int32 nIndex
OUString aName
#define LANGUAGE_SYSTEM
#define SAL_INFO(area, stream)
aStr
bool equalZero(const T &rfVal)
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
B2DHomMatrix createScaleShearXRotateTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fShearX, double fRadiant, double fTranslateX, double fTranslateY)
B2IRange fround(const B2DRange &rRange)
OString stripStart(const OString &rIn, char c)
int i
constexpr T & temporary(T &&x)
long Long
const char GetValue[]
OUTDEV_PRINTER
OutlinerMode
#define Y
SdrMetricItem makeSdrEckenradiusItem(tools::Long nRadius)
Definition: sderitm.hxx:25
SdrOnOffItem makeSdrShadowItem(bool bShadow)
Definition: sdshitm.hxx:25
SdrTextAniDirection
Definition: sdtaditm.hxx:30
SdrOnOffItem makeSdrTextAutoGrowHeightItem(bool bAuto)
Definition: sdtagitm.hxx:25
SdrOnOffItem makeSdrTextAutoGrowWidthItem(bool bAuto)
Definition: sdtagitm.hxx:30
SdrTextVertAdjust
Definition: sdtaitm.hxx:29
@ SDRTEXTVERTADJUST_BOTTOM
Definition: sdtaitm.hxx:31
@ SDRTEXTVERTADJUST_BLOCK
Definition: sdtaitm.hxx:32
@ SDRTEXTVERTADJUST_CENTER
Definition: sdtaitm.hxx:30
@ SDRTEXTVERTADJUST_TOP
Definition: sdtaitm.hxx:29
SdrTextHorzAdjust
Definition: sdtaitm.hxx:53
@ SDRTEXTHORZADJUST_LEFT
Definition: sdtaitm.hxx:53
@ SDRTEXTHORZADJUST_BLOCK
Definition: sdtaitm.hxx:56
@ SDRTEXTHORZADJUST_CENTER
Definition: sdtaitm.hxx:54
@ SDRTEXTHORZADJUST_RIGHT
Definition: sdtaitm.hxx:55
SdrTextAniKind
Animation type for text frame.
Definition: sdtakitm.hxx:29
@ Scroll
blinking
@ Slide
scroll back and forth
@ Alternate
scroll through
SdrMetricItem makeSdrTextMinFrameHeightItem(tools::Long mnHeight)
Definition: sdtmfitm.hxx:25
SdrMetricItem makeSdrTextMinFrameWidthItem(tools::Long mnWidth)
Definition: sdtmfitm.hxx:35
static SfxItemSet & rSet
UNDERLYING_TYPE get() const
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_SHADOW(SDRATTR_SHADOW_FIRST+0)
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_TEXT_AUTOGROWWIDTH(SDRATTR_MISC_FIRST+12)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_LEFTDIST(SDRATTR_MISC_FIRST+4)
constexpr TypedWhichId< SdrTextFitToSizeTypeItem > SDRATTR_TEXT_FITTOSIZE(SDRATTR_MISC_FIRST+3)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_MAXFRAMEHEIGHT(SDRATTR_MISC_FIRST+9)
constexpr TypedWhichId< SdrTextFixedCellHeightItem > SDRATTR_TEXT_USEFIXEDCELLHEIGHT(SDRATTR_MISC_FIRST+23)
constexpr TypedWhichId< SdrTextHorzAdjustItem > SDRATTR_TEXT_HORZADJUST(SDRATTR_MISC_FIRST+13)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_MINFRAMEWIDTH(SDRATTR_MISC_FIRST+10)
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_TEXT_AUTOGROWHEIGHT(SDRATTR_MISC_FIRST+2)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_MINFRAMEHEIGHT(SDRATTR_MISC_FIRST+1)
constexpr TypedWhichId< SdrTextVertAdjustItem > SDRATTR_TEXT_VERTADJUST(SDRATTR_MISC_FIRST+8)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_MAXFRAMEWIDTH(SDRATTR_MISC_FIRST+11)
constexpr TypedWhichId< SdrTextAniKindItem > SDRATTR_TEXT_ANIKIND(SDRATTR_MISC_FIRST+14)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_RIGHTDIST(SDRATTR_MISC_FIRST+5)
constexpr TypedWhichId< SdrTextAniDirectionItem > SDRATTR_TEXT_ANIDIRECTION(SDRATTR_MISC_FIRST+15)
constexpr TypedWhichId< SfxInt16Item > SDRATTR_TEXTCOLUMNS_NUMBER(SDRATTR_TEXTCOLUMNS_FIRST+0)
constexpr TypedWhichId< SfxStringItem > SDRATTR_TEXT_CHAINNEXTNAME(SDRATTR_MISC_FIRST+25)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_LOWERDIST(SDRATTR_MISC_FIRST+7)
constexpr TypedWhichId< SvxWritingModeItem > SDRATTR_TEXTDIRECTION(SDRATTR_NOTPERSIST_FIRST+34)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_CORNER_RADIUS(SDRATTR_MISC_FIRST+0)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXTCOLUMNS_SPACING(SDRATTR_TEXTCOLUMNS_FIRST+1)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_UPPERDIST(SDRATTR_MISC_FIRST+6)
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_TEXT_CONTOURFRAME(SDRATTR_MISC_FIRST+21)
SdrTextObj * DynCastSdrTextObj(SdrObject *pObj)
Definition: svdobj.cxx:3217
SdrObjKind
Definition: svdobjkind.hxx:25
@ OutlineText
TitleText, special text object for StarDraw.
@ TitleText
text object
static SdrObject * ImpGetObjByName(SdrObjList const *pObjList, std::u16string_view aObjName)
Definition: svdotext.cxx:1917
static void ImpUpdateChainLinks(SdrTextObj *pTextObj, std::u16string_view aNextLinkName)
Definition: svdotext.cxx:1933
tools::Polygon Rect2Poly(const tools::Rectangle &rRect, const GeoStat &rGeo)
Definition: svdtrans.cxx:467
void RotatePoly(tools::Polygon &rPoly, const Point &rRef, double sn, double cs)
Definition: svdtrans.cxx:81
void ShearPoly(tools::Polygon &rPoly, const Point &rRef, double tn)
Definition: svdtrans.cxx:147
Degree100 NormAngle36000(Degree100 a)
Normalize angle to -180.00..179.99.
Definition: svdtrans.cxx:408
void ShearPoint(Point &rPnt, const Point &rRef, double tn, bool bVShear=false)
Definition: svdtrans.hxx:109
void RotatePoint(Point &rPnt, const Point &rRef, double sn, double cs)
Definition: svdtrans.hxx:101
oslFileHandle & pOut
constexpr TypedWhichId< XFormTextStyleItem > XATTR_FORMTXTSTYLE(XATTR_TEXT_FIRST)
constexpr TypedWhichId< XFormTextHideFormItem > XATTR_FORMTXTHIDEFORM(XATTR_TEXT_FIRST+10)