1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SVX_SVDOTEXT_HXX
21 #define INCLUDED_SVX_SVDOTEXT_HXX
23 #include <svx/itextprovider.hxx>
24 #include <svx/svdoattr.hxx>
25 #include <svx/sdtaitm.hxx>
26 #include <svx/sdtakitm.hxx>
27 #include <svx/sdtaditm.hxx>
28 #include <svx/svdtrans.hxx>
29 #include <tools/datetime.hxx>
30 #include <svl/style.hxx>
31 #include <svx/svdtext.hxx>
32 #include <svx/svxdllapi.h>
33 #include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
37 #include <com/sun/star/drawing/TextFitToSizeType.hpp>
39 // forward declarations
42 class OutlinerParaObject
;
43 class OverflowingText
;
49 class ImpSdrObjTextLink
;
54 enum class EEAnchorMode
;
55 enum class EETextFormat
;
57 namespace sdr::properties
{
61 namespace drawinglayer::primitive2d
{
62 class SdrContourTextPrimitive2D
;
63 class SdrPathTextPrimitive2D
;
64 class SdrBlockTextPrimitive2D
;
65 class SdrAutoFitTextPrimitive2D
;
66 class SdrStretchTextPrimitive2D
;
67 class SdrChainedTextPrimitive2D
;
70 namespace drawinglayer::animation
{
71 class AnimationEntryList
;
74 namespace drawinglayer::geometry
{
75 class ViewInformation2D
;
78 namespace sdr::table
{
80 class SdrTableRtfExporter
;
81 class SdrTableRTFParser
;
88 #define SDRUSERDATA_OBJTEXTLINK (1)
91 // helper class SdrTextObjGeoData
94 class SdrTextObjGeoData
: public SdrObjGeoData
97 tools::Rectangle aRect
;
102 // helper class ImpSdrObjTextLinkUserData
105 class ImpSdrObjTextLinkUserData final
: public SdrObjUserData
107 friend class SdrTextObj
;
108 friend class ImpSdrObjTextLink
;
110 OUString aFileName
; // name of the referenced document
111 OUString aFilterName
; // a filter, if need be
112 DateTime aFileDate0
; // avoiding unnecessary reload
113 tools::SvRef
<ImpSdrObjTextLink
>
115 rtl_TextEncoding eCharSet
;
118 ImpSdrObjTextLinkUserData();
119 virtual ~ImpSdrObjTextLinkUserData() override
;
121 virtual std::unique_ptr
<SdrObjUserData
> Clone(SdrObject
* pObj1
) const override
;
128 class CustomShapeProperties
;
129 class CellProperties
;
130 } // end of namespace properties
131 } // end of namespace sdr
135 typedef std::unique_ptr
<SdrPathObj
, SdrObjectFreeOp
> SdrPathObjUniquePtr
;
137 class SVXCORE_DLLPUBLIC SdrTextObj
: public SdrAttrObj
, public svx::ITextProvider
140 // Cell needs access to ImpGetDrawOutliner();
141 friend class sdr::table::Cell
;
142 friend class sdr::table::SdrTableRtfExporter
;
143 friend class sdr::table::SdrTableRTFParser
;
144 friend class TextChain
;
145 friend class TextChainFlow
;
146 friend class EditingTextChainFlow
;
148 // CustomShapeproperties need to access the "bTextFrame" member:
149 friend class sdr::properties::CustomShapeProperties
;
152 virtual std::unique_ptr
<sdr::properties::BaseProperties
> CreateObjectSpecificProperties() override
;
153 virtual std::unique_ptr
<sdr::contact::ViewContact
> CreateObjectSpecificViewContact() override
;
156 // This method is only allowed for sdr::properties::TextProperties
157 SVX_DLLPRIVATE SdrOutliner
* GetTextEditOutliner() const
162 // to allow sdr::properties::TextProperties access to SetPortionInfoChecked()
163 // and GetTextEditOutliner()
164 friend class sdr::properties::TextProperties
;
165 friend class sdr::properties::CellProperties
;
167 friend class ImpSdrObjTextLink
;
168 friend class ImpSdrObjTextLinkUserData
;
169 friend class SdrPowerPointImport
; // for PowerPointImport
170 friend class SdrExchangeView
; // for ImpGetDrawOutliner
171 friend class SdrView
; // for ImpGetDrawOutliner
172 friend class SdrObjEditView
; // for TextEdit
173 friend class SdrMeasureObj
; // for ImpGetDrawOutliner
174 friend class SvxMSDffManager
; // for ImpGetDrawOutliner
175 friend class SdrObjCustomShape
; // for ImpGetDrawOutliner
176 friend class SdrText
; // for ImpGetDrawOutliner
179 // The "aRect" is also the rect of RectObj and CircObj.
180 // When bTextFrame=sal_True the text will be formatted into this rect
181 // When bTextFrame=sal_False the text will be centered around its middle
182 tools::Rectangle maRect
;
184 // The GeoStat contains the rotation and shear angles
187 // this is the active text
188 std::unique_ptr
<SdrText
> mpText
;
190 // This contains the dimensions of the text
193 // an Outliner*, so that
194 // 1. the TextObj won't be edited simultaneously by multiple views, and
195 // 2. when streaming while editing Flush() can be done
196 SdrOutliner
* pEdtOutl
;
198 // Possible values for eTextKind are:
199 // OBJ_TEXT regular text frame
200 // OBJ_TITLETEXT TitleText for presentations
201 // OBJ_OUTLINETEXT OutlineText for presentations
202 // eTextKind only has meaning when bTextFrame=sal_True, since otherwise
203 // we're dealing with a labeled graphical object
204 SdrObjKind eTextKind
;
206 // For text editing in SW Header/Footer it is necessary to be
207 // able to set an offset for the text edit to allow text editing at the
208 // position of the virtual object. This offset is used when setting up
209 // and maintaining the OutlinerView.
210 Point maTextEditOffset
;
212 virtual SdrObjectUniquePtr
getFullDragClone() const override
;
216 const Point
& GetTextEditOffset() const { return maTextEditOffset
; }
217 void SetTextEditOffset(const Point
& rNew
) { maTextEditOffset
= rNew
; }
220 bool mbIsUnchainableClone
= false;
222 // the successor in a chain
223 SdrTextObj
*mpNextInChain
= nullptr;
224 SdrTextObj
*mpPrevInChain
= nullptr;
226 // For labeled graphical objects bTextFrame is FALSE. The block of text
227 // will then be centered horizontally and vertically on aRect.
228 // For bTextFalse=sal_True the text will be formatted into aRect.
229 // The actual text frame is realized by an SdrRectObj with
230 // bTextFrame=sal_True.
232 bool bNoShear
: 1; // disable shearing (->graphic+Ole+TextFrame)
233 bool bTextSizeDirty
: 1;
235 bool mbInEditMode
: 1; // Is this text object in edit mode?
237 // For objects with free size (flow text). The flag is set by the
238 // application on create. If the object width is later resized,
239 // AutoGrowWidth will be disabled (set to sal_False). This flag will
240 // then also be set to sal_False, so that the object behaves like a
241 // normal text object.
242 // Width resize can result from:
243 // - Interactive Resize in single or multiple selections
244 // - position/size dialog
245 bool bDisableAutoWidthOnDragging
: 1;
247 // Flag for allowing text animation. Default is sal_true.
248 bool mbTextAnimationAllowed
: 1;
250 // flag for preventing recursive onEditOutlinerStatusEvent calls
251 bool mbInDownScale
: 1;
253 SdrOutliner
& ImpGetDrawOutliner() const;
256 // #101029#: Extracted from ImpGetDrawOutliner()
257 SVX_DLLPRIVATE
void ImpInitDrawOutliner( SdrOutliner
& rOutl
) const;
258 // #101029#: Extracted from Paint()
259 SVX_DLLPRIVATE
void ImpSetupDrawOutlinerForPaint( bool bContourFrame
,
260 SdrOutliner
& rOutliner
,
261 tools::Rectangle
& rTextRect
,
262 tools::Rectangle
& rAnchorRect
,
263 tools::Rectangle
& rPaintRect
,
264 Fraction
& aFitXCorrection
) const;
265 void ImpAutoFitText( SdrOutliner
& rOutliner
) const;
266 void ImpAutoFitText( SdrOutliner
& rOutliner
, const Size
& rShapeSize
, bool bIsVerticalWriting
) const;
267 SVX_DLLPRIVATE SdrObjectUniquePtr
ImpConvertContainedTextToSdrPathObjs(bool bToPoly
) const;
268 SVX_DLLPRIVATE
void ImpRegisterLink();
269 SVX_DLLPRIVATE
void ImpDeregisterLink();
270 SVX_DLLPRIVATE ImpSdrObjTextLinkUserData
* GetLinkUserData() const;
272 /** Appends the style family to a provided style name */
273 static void AppendFamilyToStyleName(OUString
& styleName
, SfxStyleFamily family
);
275 /** Reads the style family from a style name to which the family has been appended. */
276 static SfxStyleFamily
ReadFamilyFromStyleName(const OUString
& styleName
);
279 bool ImpCanConvTextToCurve() const;
280 SdrPathObjUniquePtr
ImpConvertMakeObj(const basegfx::B2DPolyPolygon
& rPolyPolygon
, bool bClosed
, bool bBezier
) const;
281 SdrObjectUniquePtr
ImpConvertAddText(SdrObjectUniquePtr pObj
, bool bBezier
) const;
282 void ImpSetTextStyleSheetListeners();
283 static void ImpSetCharStretching(SdrOutliner
& rOutliner
, const Size
& rTextSize
, const Size
& rShapeSize
, Fraction
& rFitXCorrection
);
284 static void ImpJustifyRect(tools::Rectangle
& rRect
);
285 void ImpCheckShear();
286 tools::Rectangle
ImpDragCalcRect(const SdrDragStat
& rDrag
) const;
287 void ImpSetTextEditParams() const;
288 void SetTextSizeDirty() { bTextSizeDirty
=true; }
290 // rAnchorRect is InOut-Parameter!
291 void ImpSetContourPolygon( SdrOutliner
& rOutliner
, tools::Rectangle
const & rAnchorRect
, bool bLineWidth
) const;
293 virtual SdrObjGeoData
* NewGeoData() const override
;
294 virtual void SaveGeoData(SdrObjGeoData
& rGeo
) const override
;
295 virtual void RestGeoData(const SdrObjGeoData
& rGeo
) override
;
296 void NbcSetEckenradius(tools::Long nRad
);
298 // #115391# new method for SdrObjCustomShape and SdrTextObj to correctly handle and set
299 // SdrTextMinFrameWidthItem and SdrTextMinFrameHeightItem based on all settings, necessities
301 virtual void AdaptTextMinSize();
303 // constructors for labeled graphical objects
304 SdrTextObj(SdrModel
& rSdrModel
);
307 const tools::Rectangle
& rNewRect
);
309 // constructors for text frames
312 SdrObjKind eNewTextKind
);
315 SdrObjKind eNewTextKind
,
316 const tools::Rectangle
& rNewRect
);
318 // protected destructor
319 virtual ~SdrTextObj() override
;
323 bool IsInEditMode() const { return mbInEditMode
; }
325 // Currently ASCII and RTF are supported and the differentiation is done
327 // rFilterName has no meaning and must be empty
328 // Normally the application only has to call SetTextLink() - the
329 // remainder is automatic (SfxLinkManager).
330 // The LoadText() method can also be used to load a file into a text
331 // object (without linking.)
332 // TextLinks can't be edited (if needed later could be ReadOnly).
333 // Setting attributes can only be done on the text frame.
334 void SetTextLink(const OUString
& rFileName
, const OUString
& rFilterName
);
335 void ReleaseTextLink();
336 bool IsLinkedText() const { return pPlusData
!=nullptr && GetLinkUserData()!=nullptr; }
337 bool ReloadLinkedText(bool bForceLoad
);
338 bool LoadText(const OUString
& rFileName
, rtl_TextEncoding eCharSet
);
340 virtual bool AdjustTextFrameWidthAndHeight(tools::Rectangle
& rR
, bool bHgt
= true, bool bWdt
= true) const;
341 virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt
= true, bool bWdt
= true);
342 virtual bool AdjustTextFrameWidthAndHeight();
343 bool IsTextFrame() const { return bTextFrame
; }
344 bool IsOutlText() const { return bTextFrame
&& (eTextKind
==OBJ_OUTLINETEXT
|| eTextKind
==OBJ_TITLETEXT
); }
345 /// returns true if the PPT autofit of text into shape bounds is enabled. implies IsFitToSize()==false!
346 bool IsAutoFit() const;
347 /// returns true if the old feature for fitting shape content should into shape is enabled. implies IsAutoFit()==false!
348 bool IsFitToSize() const;
351 SdrTextObj
*GetNextLinkInChain() const;
352 void SetNextLinkInChain(SdrTextObj
*);
353 SdrTextObj
*GetPrevLinkInChain() const;
354 bool IsChainable() const;
355 bool GetPreventChainable() const;
356 TextChain
*GetTextChain() const;
358 SdrObjKind
GetTextKind() const { return eTextKind
; }
361 virtual bool HasText() const override
;
363 bool IsTextEditActive() const { return pEdtOutl
!= nullptr; }
365 /** returns the currently active text. */
366 virtual SdrText
* getActiveText() const;
368 /** returns the nth available text. */
369 virtual SdrText
* getText( sal_Int32 nIndex
) const override
;
371 /** returns the number of texts available for this object. */
372 virtual sal_Int32
getTextCount() const override
;
374 /** returns true only if we are in edit mode and the user actually changed anything */
375 virtual bool IsReallyEdited() const;
377 /** changes the current active text */
378 virtual void setActiveText( sal_Int32 nIndex
);
380 /** returns the index of the text that contains the given point or -1 */
381 virtual sal_Int32
CheckTextHit(const Point
& rPnt
) const;
383 void SetDisableAutoWidthOnDragging(bool bOn
) { bDisableAutoWidthOnDragging
=bOn
; }
384 void NbcSetText(const OUString
& rStr
);
385 void SetText(const OUString
& rStr
);
386 void NbcSetText(SvStream
& rInput
, const OUString
& rBaseURL
, EETextFormat eFormat
);
387 void SetText(SvStream
& rInput
, const OUString
& rBaseURL
, EETextFormat eFormat
);
389 // FitToSize and Fontwork are not taken into account in GetTextSize()!
390 virtual const Size
& GetTextSize() const;
391 void FitFrameToTextSize();
392 sal_uInt16
GetFontScaleY() const;
394 // Simultaneously sets the text into the Outliner (possibly
395 // the one of the EditOutliner) and sets the PaperSize.
396 virtual void TakeTextRect( SdrOutliner
& rOutliner
, tools::Rectangle
& rTextRect
, bool bNoEditText
,
397 tools::Rectangle
* pAnchorRect
, bool bLineWidth
= true ) const;
398 // Takes writing direction into account when adjusting the rectangle
399 void AdjustRectToTextDistance(tools::Rectangle
& rAnchorRect
) const;
400 virtual void TakeTextAnchorRect(::tools::Rectangle
& rAnchorRect
) const;
401 const GeoStat
& GetGeoStat() const { return aGeo
; }
404 tools::Long
GetEckenradius() const;
405 virtual bool IsAutoGrowHeight() const;
406 tools::Long
GetMinTextFrameHeight() const;
407 tools::Long
GetMaxTextFrameHeight() const;
408 virtual bool IsAutoGrowWidth() const;
409 tools::Long
GetMinTextFrameWidth() const;
410 tools::Long
GetMaxTextFrameWidth() const;
412 css::drawing::TextFitToSizeType
GetFitToSize() const;
413 const tools::Rectangle
&GetGeoRect() const;
415 // check if it's a TextFontwork
416 virtual bool IsFontwork() const;
418 // should the Fontwork contour be hidden?
419 bool IsHideContour() const;
421 // text flow within contour
422 bool IsContourTextFrame() const;
424 SdrTextHorzAdjust
GetTextHorizontalAdjust(const SfxItemSet
& rSet
) const;
425 SdrTextHorzAdjust
GetTextHorizontalAdjust() const;
427 SdrTextVertAdjust
GetTextVerticalAdjust(const SfxItemSet
& rSet
) const;
428 SdrTextVertAdjust
GetTextVerticalAdjust() const;
430 /** Left inner spacing to borders */
431 tools::Long
GetTextLeftDistance() const;
432 /** Right inner spacing to borders */
433 tools::Long
GetTextRightDistance() const;
434 /** Top inner spacing to borders */
435 tools::Long
GetTextUpperDistance() const;
436 /** Bottom inner spacing to borders */
437 tools::Long
GetTextLowerDistance() const;
438 SdrTextAniKind
GetTextAniKind() const;
439 SdrTextAniDirection
GetTextAniDirection() const;
441 bool HasTextColumnsNumber() const;
442 sal_Int16
GetTextColumnsNumber() const;
443 void SetTextColumnsNumber(sal_Int16 nColumns
);
444 bool HasTextColumnsSpacing() const;
445 sal_Int32
GetTextColumnsSpacing() const;
446 void SetTextColumnsSpacing(sal_Int32 nSpacing
);
448 // react on model/page change
449 virtual void handlePageChange(SdrPage
* pOldPage
, SdrPage
* pNewPage
) override
;
451 virtual void TakeObjInfo(SdrObjTransformInfoRec
& rInfo
) const override
;
452 virtual SdrObjKind
GetObjIdentifier() const override
;
454 // needed to determine text anchor area
455 virtual void TakeUnrotatedSnapRect(tools::Rectangle
& rRect
) const;
456 virtual OUString
TakeObjNameSingul() const override
;
457 virtual OUString
TakeObjNamePlural() const override
;
458 virtual SdrTextObj
* CloneSdrObject(SdrModel
& rTargetModel
) const override
;
459 SdrTextObj
& operator=(const SdrTextObj
& rObj
);
460 virtual basegfx::B2DPolyPolygon
TakeXorPoly() const override
;
461 virtual basegfx::B2DPolyPolygon
TakeContour() const override
;
462 virtual void RecalcSnapRect() override
;
463 virtual void NbcSetSnapRect(const tools::Rectangle
& rRect
) override
;
464 virtual void NbcSetLogicRect(const tools::Rectangle
& rRect
) override
;
465 virtual const tools::Rectangle
& GetLogicRect() const override
;
466 virtual tools::Long
GetRotateAngle() const override
;
467 virtual tools::Long
GetShearAngle(bool bVertical
= false) const override
;
469 virtual sal_uInt32
GetSnapPointCount() const override
;
470 virtual Point
GetSnapPoint(sal_uInt32 i
) const override
;
472 virtual sal_uInt32
GetHdlCount() const override
;
473 virtual void AddToHdlList(SdrHdlList
& rHdlList
) const override
;
475 // special drag methods
476 virtual bool hasSpecialDrag() const override
;
477 virtual bool applySpecialDrag(SdrDragStat
& rDrag
) override
;
478 virtual OUString
getSpecialDragComment(const SdrDragStat
& rDrag
) const override
;
480 virtual bool BegCreate(SdrDragStat
& rStat
) override
;
481 virtual bool MovCreate(SdrDragStat
& rStat
) override
;
482 virtual bool EndCreate(SdrDragStat
& rStat
, SdrCreateCmd eCmd
) override
;
483 virtual bool BckCreate(SdrDragStat
& rStat
) override
;
484 virtual void BrkCreate(SdrDragStat
& rStat
) override
;
485 virtual basegfx::B2DPolyPolygon
TakeCreatePoly(const SdrDragStat
& rDrag
) const override
;
486 virtual PointerStyle
GetCreatePointer() const override
;
488 virtual void NbcMove(const Size
& rSiz
) override
;
489 virtual void NbcResize(const Point
& rRef
, const Fraction
& xFact
, const Fraction
& yFact
) override
;
490 virtual void NbcRotate(const Point
& rRef
, tools::Long nAngle
, double sn
, double cs
) override
;
491 virtual void NbcMirror(const Point
& rRef1
, const Point
& rRef2
) override
;
492 virtual void NbcShear(const Point
& rRef
, tools::Long nAngle
, double tn
, bool bVShear
) override
;
494 virtual bool HasTextEdit() const override
;
495 // returns true if TextEditMode started
496 virtual bool BegTextEdit(SdrOutliner
& rOutl
);
497 virtual void TakeTextEditArea(Size
* pPaperMin
, Size
* pPaperMax
, tools::Rectangle
* pViewInit
, tools::Rectangle
* pViewMin
) const;
498 virtual void EndTextEdit(SdrOutliner
& rOutl
);
499 virtual EEAnchorMode
GetOutlinerViewAnchorMode() const;
501 virtual void NbcSetOutlinerParaObject(std::unique_ptr
<OutlinerParaObject
> pTextObject
) override
;
502 void NbcSetOutlinerParaObjectForText( std::unique_ptr
<OutlinerParaObject
> pTextObject
, SdrText
* pText
);
503 virtual OutlinerParaObject
* GetOutlinerParaObject() const override
;
504 bool CanCreateEditOutlinerParaObject() const;
505 std::unique_ptr
<OutlinerParaObject
> CreateEditOutlinerParaObject() const;
507 virtual void NbcReformatText() override
;
509 virtual bool CalcFieldValue(const SvxFieldItem
& rField
, sal_Int32 nPara
, sal_uInt16 nPos
,
510 bool bEdit
, std::optional
<Color
>& rpTxtColor
, std::optional
<Color
>& rpFldColor
, OUString
& rRet
) const;
512 virtual SdrObjectUniquePtr
DoConvertToPolyObj(bool bBezier
, bool bAddText
) const override
;
514 void SetTextEditOutliner(SdrOutliner
* pOutl
) { pEdtOutl
=pOutl
; }
516 /** Setup given Outliner equivalently to SdrTextObj::Paint()
518 To setup an arbitrary Outliner in the same way as the draw
519 outliner on SdrTextObj::Paint(). Among others, the paper size,
520 control word and character stretching are initialized, such
521 that the formatting should match the screen representation.
522 The textual content of the outliner is not touched, i.e. no
523 Init() or Clear() is called on the Outliner.
526 The Outliner to setup.
529 The region to paint the outliner content into. This is useful
530 to e.g. determine the top, left position of text in shapes.
532 void SetupOutlinerFormatting( SdrOutliner
& rOutl
, tools::Rectangle
& rPaintRect
) const;
534 /** Update given Outliner equivalently to SdrTextObj::Paint()
536 Same functionality as in SetupOutlinerFormatting(), except
537 that the outliner content is not cleared.
540 The Outliner to update.
543 The region to paint the outliner content into. This is useful
544 to e.g. determine the top, left position of text in shapes.
546 void UpdateOutlinerFormatting( SdrOutliner
& rOutl
, tools::Rectangle
& rPaintRect
) const;
547 void ForceOutlinerParaObject();
548 virtual bool IsVerticalWriting() const;
549 virtual void SetVerticalWriting(bool bVertical
);
550 bool IsTopToBottom() const;
552 /** called from the SdrObjEditView during text edit when the status of the edit outliner changes */
553 virtual void onEditOutlinerStatusEvent( EditStatus
* pEditStatus
);
555 /** called from the SdrObjEditView during text edit when a chain of boxes is to be updated */
556 void onChainingEvent();
559 // transformation interface for StarOfficeAPI. This implements support for
560 // homogen 3x3 matrices containing the transformation of the SdrObject. At the
561 // moment it contains a shearX, rotation and translation, but for setting all linear
562 // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
565 // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
566 // with the base geometry and returns TRUE. Otherwise it returns FALSE.
567 virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix
& rMatrix
, basegfx::B2DPolyPolygon
& rPolyPolygon
) const override
;
569 // sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
570 // If it's an SdrPathObj it will use the provided geometry information. The Polygon has
571 // to use (0,0) as upper left and will be scaled to the given size in the matrix.
572 virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix
& rMatrix
, const basegfx::B2DPolyPolygon
& rPolyPolygon
) override
;
574 // #103836# iterates over the paragraphs of a given SdrObject and removes all
575 // hard set character attributes with the which ids contained in the
577 void RemoveOutlinerCharacterAttribs( const std::vector
<sal_uInt16
>& rCharWhichIds
);
579 // Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a
580 // painting rectangle. Rotation is taken from the object.
581 GDIMetaFile
* GetTextScrollMetaFileAndRectangle(tools::Rectangle
& rScrollRectangle
, tools::Rectangle
& rPaintRectangle
);
583 // Access to TextAnimationAllowed flag
584 void SetTextAnimationAllowed(bool bNew
);
587 // Set single item at the local ItemSet. *Does not use* AllowItemChange(),
588 // ItemChange(), PostItemChange() and ItemSetChanged() calls.
589 void SetObjectItemNoBroadcast(const SfxPoolItem
& rItem
);
590 double GetCameraZRotation() const;
594 // text primitive decomposition helpers
595 void impDecomposeContourTextPrimitive(
596 drawinglayer::primitive2d::Primitive2DContainer
& rTarget
,
597 const drawinglayer::primitive2d::SdrContourTextPrimitive2D
& rSdrContourTextPrimitive
,
598 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
599 void impDecomposePathTextPrimitive(
600 drawinglayer::primitive2d::Primitive2DContainer
& rTarget
,
601 const drawinglayer::primitive2d::SdrPathTextPrimitive2D
& rSdrPathTextPrimitive
,
602 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
603 void impDecomposeBlockTextPrimitive(
604 drawinglayer::primitive2d::Primitive2DContainer
& rTarget
,
605 const drawinglayer::primitive2d::SdrBlockTextPrimitive2D
& rSdrBlockTextPrimitive
,
606 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
607 void impDecomposeAutoFitTextPrimitive(
608 drawinglayer::primitive2d::Primitive2DContainer
& rTarget
,
609 const drawinglayer::primitive2d::SdrAutoFitTextPrimitive2D
& rSdrAutofitTextPrimitive
,
610 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
611 void impDecomposeStretchTextPrimitive(
612 drawinglayer::primitive2d::Primitive2DContainer
& rTarget
,
613 const drawinglayer::primitive2d::SdrStretchTextPrimitive2D
& rSdrStretchTextPrimitive
,
614 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
615 void impDecomposeChainedTextPrimitive(
616 drawinglayer::primitive2d::Primitive2DContainer
& rTarget
,
617 const drawinglayer::primitive2d::SdrChainedTextPrimitive2D
& rSdrChainedTextPrimitive
,
618 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
619 void impHandleChainingEventsDuringDecomposition(SdrOutliner
&rOutliner
) const;
622 void impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryList
& rAnimList
) const;
623 void impGetScrollTextTiming(drawinglayer::animation::AnimationEntryList
& rAnimList
, double fFrameLength
, double fTextLength
) const;
625 // Direct decomposer for text visualization when you already have a prepared
626 // Outliner containing all the needed information
627 static void impDecomposeBlockTextPrimitiveDirect(
628 drawinglayer::primitive2d::Primitive2DContainer
& rTarget
,
629 SdrOutliner
& rOutliner
,
630 const basegfx::B2DHomMatrix
& rNewTransformA
,
631 const basegfx::B2DHomMatrix
& rNewTransformB
,
632 const basegfx::B2DRange
& rClipRange
);
634 /** returns false if the given pointer is NULL
635 or if the given SdrOutliner contains no text.
636 Also checks for one empty paragraph.
638 static bool HasTextImpl( SdrOutliner
const * pOutliner
);
640 friend class ::SdrTextObjTest
;
644 #endif // INCLUDED_SVX_SVDOTEXT_HXX
646 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */