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 <vcl/field.hxx>
24 #include <svx/itextprovider.hxx>
25 #include <svx/svdoattr.hxx>
26 #include <svx/svdtrans.hxx>
27 #include <tools/datetime.hxx>
28 #include <rsc/rscsfx.hxx>
29 #include <svx/xtextit0.hxx>
30 #include <svx/svdtext.hxx>
32 #include <svx/svxdllapi.h>
33 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
34 #include <svx/svdpagv.hxx>
35 #include <rtl/ref.hxx>
38 // forward declarations
41 class OutlinerParaObject
;
42 class OverflowingText
;
47 class ImpSdrObjTextLink
;
51 enum class EEAnchorMode
;
53 namespace sdr
{ namespace properties
{
57 namespace drawinglayer
{ namespace primitive2d
{
58 class SdrContourTextPrimitive2D
;
59 class SdrPathTextPrimitive2D
;
60 class SdrBlockTextPrimitive2D
;
61 class SdrAutoFitTextPrimitive2D
;
62 class SdrStretchTextPrimitive2D
;
63 class SdrChainedTextPrimitive2D
;
66 namespace drawinglayer
{ namespace animation
{
67 class AnimationEntryList
;
70 namespace drawinglayer
{ namespace geometry
{
71 class ViewInformation2D
;
74 namespace sdr
{ namespace table
{
76 class SdrTableRtfExporter
;
77 class SdrTableRTFParser
;
84 #define SDRUSERDATA_OBJTEXTLINK (1)
87 // helper class SdrTextObjGeoData
90 class SdrTextObjGeoData
: public SdrObjGeoData
93 tools::Rectangle aRect
;
98 // helper class ImpSdrObjTextLinkUserData
101 class ImpSdrObjTextLinkUserData
: public SdrObjUserData
103 friend class SdrTextObj
;
104 friend class ImpSdrObjTextLink
;
106 OUString aFileName
; // name of the referenced document
107 OUString aFilterName
; // a filter, if need be
108 DateTime aFileDate0
; // avoiding unnecessary reload
109 tools::SvRef
<ImpSdrObjTextLink
>
111 rtl_TextEncoding eCharSet
;
114 ImpSdrObjTextLinkUserData();
115 virtual ~ImpSdrObjTextLinkUserData() override
;
117 virtual SdrObjUserData
* Clone(SdrObject
* pObj1
) const override
;
124 class CustomShapeProperties
;
125 class CellProperties
;
126 } // end of namespace properties
127 } // end of namespace sdr
133 class SVX_DLLPUBLIC SdrTextObj
: public SdrAttrObj
, public svx::ITextProvider
136 // Cell needs access to ImpGetDrawOutliner();
138 friend class sdr::table::Cell
;
139 friend class sdr::table::SdrTableRtfExporter
;
140 friend class sdr::table::SdrTableRTFParser
;
142 friend class TextChain
;
143 friend class TextChainFlow
;
144 friend class EditingTextChainFlow
;
147 // CustomShapeproperties need to access the "bTextFrame" member:
148 friend class sdr::properties::CustomShapeProperties
;
151 virtual sdr::properties::BaseProperties
* CreateObjectSpecificProperties() override
;
152 virtual sdr::contact::ViewContact
* CreateObjectSpecificViewContact() override
;
155 // This method is only allowed for sdr::properties::TextProperties
156 SVX_DLLPRIVATE SdrOutliner
* GetTextEditOutliner() const
161 // This method is only allowed for sdr::properties::TextProperties
162 SVX_DLLPRIVATE
void SetPortionInfoChecked(bool bNew
)
164 bPortionInfoChecked
= bNew
;
167 // to allow sdr::properties::TextProperties access to SetPortionInfoChecked()
168 // and GetTextEditOutliner()
169 friend class sdr::properties::TextProperties
;
170 friend class sdr::properties::CellProperties
;
172 friend class ImpSdrObjTextLink
;
173 friend class ImpSdrObjTextLinkUserData
;
174 friend class SdrPowerPointImport
; // for PowerPointImport
175 friend class SdrExchangeView
; // for ImpGetDrawOutliner
176 friend class SdrView
; // for ImpGetDrawOutliner
177 friend class SdrObjEditView
; // for TextEdit
178 friend class SdrMeasureObj
; // for ImpGetDrawOutliner
179 friend class SvxMSDffManager
; // for ImpGetDrawOutliner
180 friend class SdrObjCustomShape
; // for ImpGetDrawOutliner
181 friend class SdrText
; // for ImpGetDrawOutliner
184 // The "aRect" is also the rect of RectObj and CircObj.
185 // When bTextFrame=sal_True the text will be formatted into this rect
186 // When bTextFrame=sal_False the text will be centered around its middle
187 tools::Rectangle maRect
;
189 // The GeoStat contains the rotation and shear angles
192 // this is the active text
195 // This contains the dimensions of the text
198 // an Outliner*, so that
199 // 1. the TextObj won't be edited simultaneously by multiple views, and
200 // 2. when streaming while editing Flush() can be done
201 SdrOutliner
* pEdtOutl
;
203 // Possible values for eTextKind are:
204 // OBJ_TEXT regular text frame
205 // OBJ_TEXTEXT text continuation frame
206 // OBJ_TITLETEXT TitleText for presentations
207 // OBJ_OUTLINETEXT OutlineText for presentations
208 // eTextKind only has meaning when bTextFrame=sal_True, since otherwise
209 // we're dealing with a labeled graphical object
210 SdrObjKind eTextKind
;
212 // For text editing in SW Header/Footer it is necessary to be
213 // able to set an offset for the text edit to allow text editing at the
214 // position of the virtual object. This offset is used when setting up
215 // and maintaining the OutlinerView.
216 Point maTextEditOffset
;
218 virtual SdrObject
* getFullDragClone() const override
;
221 const Point
& GetTextEditOffset() const { return maTextEditOffset
; }
222 void SetTextEditOffset(const Point
& rNew
) { maTextEditOffset
= rNew
; }
225 bool mbIsUnchainableClone
= false;
227 // the successor in a chain
228 SdrTextObj
*mpNextInChain
= nullptr;
229 SdrTextObj
*mpPrevInChain
= nullptr;
231 // For labeled graphical objects bTextFrame is FALSE. The block of text
232 // will then be centered horizontally and vertically on aRect.
233 // For bTextFalse=sal_True the text will be formatted into aRect.
234 // The actual text frame is realized by an SdrRectObj with
235 // bTextFrame=sal_True.
237 bool bPortionInfoChecked
: 1; // to optimise text objects
238 bool bNoShear
: 1; // disable shearing (->graphic+Ole+TextFrame)
239 bool bNoMirror
: 1; // disable mirroring (->Ole,TextFrame)
240 bool bTextSizeDirty
: 1;
242 bool mbInEditMode
: 1; // Is this text object in edit mode?
244 // For objects with free size (flow text). The flag is set by the
245 // application on create. If the object width is later resized,
246 // AutoGrowWidth will be disabled (set to sal_False). This flag will
247 // then also be set to sal_False, so that the object behaves like a
248 // normal text object.
249 // Width resize can result from:
250 // - Interactive Resize in single or multiple selections
251 // - position/size dialog
252 bool bDisableAutoWidthOnDragging
: 1;
254 // Flag for allowing text animation. Default is sal_true.
255 bool mbTextAnimationAllowed
: 1;
257 // flag for preventing recursive onEditOutlinerStatusEvent calls
258 bool mbInDownScale
: 1;
260 SdrOutliner
& ImpGetDrawOutliner() const;
263 SVX_DLLPRIVATE
void ImpCheckMasterCachable();
264 // #101029#: Extracted from ImpGetDrawOutliner()
265 SVX_DLLPRIVATE
void ImpInitDrawOutliner( SdrOutliner
& rOutl
) const;
266 // #101029#: Extracted from Paint()
267 SVX_DLLPRIVATE
void ImpSetupDrawOutlinerForPaint( bool bContourFrame
,
268 SdrOutliner
& rOutliner
,
269 tools::Rectangle
& rTextRect
,
270 tools::Rectangle
& rAnchorRect
,
271 tools::Rectangle
& rPaintRect
,
272 Fraction
& aFitXKorreg
) const;
273 void ImpAutoFitText( SdrOutliner
& rOutliner
) const;
274 static void ImpAutoFitText( SdrOutliner
& rOutliner
, const Size
& rShapeSize
, bool bIsVerticalWriting
);
275 SVX_DLLPRIVATE SdrObject
* ImpConvertContainedTextToSdrPathObjs(bool bToPoly
) const;
276 SVX_DLLPRIVATE
void ImpLinkAnmeldung();
277 SVX_DLLPRIVATE
void ImpLinkAbmeldung();
278 SVX_DLLPRIVATE ImpSdrObjTextLinkUserData
* GetLinkUserData() const;
279 // void ImpCheckItemSetChanges(const SfxItemSet& rAttr);
281 /** Appends the style family to a provided style name */
282 static void AppendFamilyToStyleName(OUString
& styleName
, SfxStyleFamily family
);
284 /** Reads the style family from a style name to which the family has been appended. */
285 static SfxStyleFamily
ReadFamilyFromStyleName(const OUString
& styleName
);
288 bool ImpCanConvTextToCurve() const;
289 SdrObject
* ImpConvertMakeObj(const basegfx::B2DPolyPolygon
& rPolyPolygon
, bool bClosed
, bool bBezier
) const;
290 SdrObject
* ImpConvertAddText(SdrObject
* pObj
, bool bBezier
) const;
291 void ImpSetTextStyleSheetListeners();
292 static void ImpSetCharStretching(SdrOutliner
& rOutliner
, const Size
& rTextSize
, const Size
& rShapeSize
, Fraction
& rFitXKorreg
);
293 static void ImpJustifyRect(tools::Rectangle
& rRect
);
294 void ImpCheckShear();
295 tools::Rectangle
ImpDragCalcRect(const SdrDragStat
& rDrag
) const;
296 void ImpSetTextEditParams() const;
297 void SetTextSizeDirty() { bTextSizeDirty
=true; }
299 // rAnchorRect is InOut-Parameter!
300 void ImpSetContourPolygon( SdrOutliner
& rOutliner
, tools::Rectangle
& rAnchorRect
, bool bLineWidth
) const;
302 virtual SdrObjGeoData
* NewGeoData() const override
;
303 virtual void SaveGeoData(SdrObjGeoData
& rGeo
) const override
;
304 virtual void RestGeoData(const SdrObjGeoData
& rGeo
) override
;
305 void NbcSetEckenradius(long nRad
);
307 // #115391# new method for SdrObjCustomShape and SdrTextObj to correctly handle and set
308 // SdrTextMinFrameWidthItem and SdrTextMinFrameHeightItem based on all settings, necessities
310 virtual void AdaptTextMinSize();
312 // constructors for labeled graphical objects
314 SdrTextObj(const tools::Rectangle
& rNewRect
);
316 // constructors for text frames
317 SdrTextObj(SdrObjKind eNewTextKind
);
318 SdrTextObj(SdrObjKind eNewTextKind
, const tools::Rectangle
& rNewRect
);
320 virtual ~SdrTextObj() override
;
324 bool IsInEditMode() const { return mbInEditMode
; }
326 // via eCharSet the character set of a file can be passed. For
327 // RTL_TEXTENCODING_DONTKNOW the platform's character set is used.
328 // Currently ASCII and RTF are supported and the differentiation is done
330 // rFilterName has no meaning and must be empty
331 // Normally the application only has to call SetTextLink() - the
332 // remainder is automatic (SfxLinkManager).
333 // The LoadText() method can also be used to load a file into a text
334 // object (without linking.)
335 // TextLinks can't be edited (if needed later could be ReadOnly).
336 // Setting attributes can only be done on the text frame.
337 void SetTextLink(const OUString
& rFileName
, const OUString
& rFilterName
, rtl_TextEncoding eCharSet
);
338 void ReleaseTextLink();
339 bool IsLinkedText() const { return pPlusData
!=nullptr && GetLinkUserData()!=nullptr; }
340 bool ReloadLinkedText(bool bForceLoad
);
341 bool LoadText(const OUString
& rFileName
, rtl_TextEncoding eCharSet
);
343 virtual bool AdjustTextFrameWidthAndHeight(tools::Rectangle
& rR
, bool bHgt
= true, bool bWdt
= true) const;
344 virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt
= true, bool bWdt
= true);
345 virtual bool AdjustTextFrameWidthAndHeight();
346 bool IsTextFrame() const { return bTextFrame
; }
347 bool IsOutlText() const { return bTextFrame
&& (eTextKind
==OBJ_OUTLINETEXT
|| eTextKind
==OBJ_TITLETEXT
); }
348 /// returns true if the PPT autofit of text into shape bounds is enabled. implies IsFitToSize()==false!
349 bool IsAutoFit() const;
350 /// returns true if the old feature for fitting shape content should into shape is enabled. implies IsAutoFit()==false!
351 bool IsFitToSize() const;
354 SdrTextObj
*GetNextLinkInChain() const;
355 void SetNextLinkInChain(SdrTextObj
*);
356 SdrTextObj
*GetPrevLinkInChain() const;
357 bool IsChainable() const;
358 bool GetPreventChainable() const;
359 TextChain
*GetTextChain() const;
361 SdrObjKind
GetTextKind() const { return eTextKind
; }
364 virtual bool HasText() const override
;
366 bool IsTextEditActive() const { return pEdtOutl
!= nullptr; }
368 /** returns the currently active text. */
369 virtual SdrText
* getActiveText() const;
371 /** returns the nth available text. */
372 virtual SdrText
* getText( sal_Int32 nIndex
) const override
;
374 /** returns the number of texts available for this object. */
375 virtual sal_Int32
getTextCount() const override
;
377 /** returns true only if we are in edit mode and the user actually changed anything */
378 virtual bool IsReallyEdited() const;
380 /** changes the current active text */
381 virtual void setActiveText( sal_Int32 nIndex
);
383 /** returns the index of the text that contains the given point or -1 */
384 virtual sal_Int32
CheckTextHit(const Point
& rPnt
) const;
386 void SetDisableAutoWidthOnDragging(bool bOn
) { bDisableAutoWidthOnDragging
=bOn
; }
387 void NbcSetText(const OUString
& rStr
);
388 void SetText(const OUString
& rStr
);
389 void NbcSetText(SvStream
& rInput
, const OUString
& rBaseURL
, sal_uInt16 eFormat
);
390 void SetText(SvStream
& rInput
, const OUString
& rBaseURL
, sal_uInt16 eFormat
);
392 // FitToSize and Fontwork are not taken into account in GetTextSize()!
393 virtual const Size
& GetTextSize() const;
394 void FitFrameToTextSize();
396 // Simultaneously sets the text into the Outliner (possibly
397 // the one of the EditOutliner) and sets the PaperSize.
398 virtual void TakeTextRect( SdrOutliner
& rOutliner
, tools::Rectangle
& rTextRect
, bool bNoEditText
,
399 tools::Rectangle
* pAnchorRect
, bool bLineWidth
= true ) const;
400 virtual void TakeTextAnchorRect(::tools::Rectangle
& rAnchorRect
) const;
401 const GeoStat
& GetGeoStat() const { return aGeo
; }
404 long GetEckenradius() const;
405 virtual bool IsAutoGrowHeight() const;
406 long GetMinTextFrameHeight() const;
407 long GetMaxTextFrameHeight() const;
408 virtual bool IsAutoGrowWidth() const;
409 long GetMinTextFrameWidth() const;
410 long GetMaxTextFrameWidth() const;
412 SdrFitToSizeType
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 long GetTextLeftDistance() const;
432 /** Right inner spacing to borders */
433 long GetTextRightDistance() const;
434 /** Top inner spacing to borders */
435 long GetTextUpperDistance() const;
436 /** Bottom inner spacing to borders */
437 long GetTextLowerDistance() const;
438 SdrTextAniKind
GetTextAniKind() const;
439 SdrTextAniDirection
GetTextAniDirection() const;
441 virtual void SetPage(SdrPage
* pNewPage
) override
;
442 virtual void SetModel(SdrModel
* pNewModel
) override
;
443 virtual void TakeObjInfo(SdrObjTransformInfoRec
& rInfo
) const override
;
444 virtual sal_uInt16
GetObjIdentifier() const override
;
446 // needed to determine text anchor area
447 virtual void TakeUnrotatedSnapRect(tools::Rectangle
& rRect
) const;
448 virtual OUString
TakeObjNameSingul() const override
;
449 virtual OUString
TakeObjNamePlural() const override
;
450 virtual SdrTextObj
* Clone() const override
;
451 SdrTextObj
& operator=(const SdrTextObj
& rObj
);
452 virtual basegfx::B2DPolyPolygon
TakeXorPoly() const override
;
453 virtual basegfx::B2DPolyPolygon
TakeContour() const override
;
454 virtual void RecalcSnapRect() override
;
455 virtual void NbcSetSnapRect(const tools::Rectangle
& rRect
) override
;
456 virtual void NbcSetLogicRect(const tools::Rectangle
& rRect
) override
;
457 virtual const tools::Rectangle
& GetLogicRect() const override
;
458 virtual long GetRotateAngle() const override
;
459 virtual long GetShearAngle(bool bVertical
= false) const override
;
461 virtual sal_uInt32
GetSnapPointCount() const override
;
462 virtual Point
GetSnapPoint(sal_uInt32 i
) const override
;
464 virtual sal_uInt32
GetHdlCount() const override
;
465 virtual SdrHdl
* GetHdl(sal_uInt32 nHdlNum
) const override
;
467 // special drag methods
468 virtual bool hasSpecialDrag() const override
;
469 virtual bool applySpecialDrag(SdrDragStat
& rDrag
) override
;
470 virtual OUString
getSpecialDragComment(const SdrDragStat
& rDrag
) const override
;
472 virtual bool BegCreate(SdrDragStat
& rStat
) override
;
473 virtual bool MovCreate(SdrDragStat
& rStat
) override
;
474 virtual bool EndCreate(SdrDragStat
& rStat
, SdrCreateCmd eCmd
) override
;
475 virtual bool BckCreate(SdrDragStat
& rStat
) override
;
476 virtual void BrkCreate(SdrDragStat
& rStat
) override
;
477 virtual basegfx::B2DPolyPolygon
TakeCreatePoly(const SdrDragStat
& rDrag
) const override
;
478 virtual Pointer
GetCreatePointer() const override
;
480 virtual void NbcMove(const Size
& rSiz
) override
;
481 virtual void NbcResize(const Point
& rRef
, const Fraction
& xFact
, const Fraction
& yFact
) override
;
482 virtual void NbcRotate(const Point
& rRef
, long nAngle
, double sn
, double cs
) override
;
483 virtual void NbcMirror(const Point
& rRef1
, const Point
& rRef2
) override
;
484 virtual void NbcShear(const Point
& rRef
, long nAngle
, double tn
, bool bVShear
) override
;
486 virtual bool HasTextEdit() const override
;
487 virtual bool BegTextEdit(SdrOutliner
& rOutl
) override
;
488 virtual void TakeTextEditArea(Size
* pPaperMin
, Size
* pPaperMax
, tools::Rectangle
* pViewInit
, tools::Rectangle
* pViewMin
) const;
489 virtual void EndTextEdit(SdrOutliner
& rOutl
) override
;
490 virtual EEAnchorMode
GetOutlinerViewAnchorMode() const;
492 virtual void NbcSetOutlinerParaObject(OutlinerParaObject
* pTextObject
) override
;
493 void NbcSetOutlinerParaObjectForText( OutlinerParaObject
* pTextObject
, SdrText
* pText
);
494 virtual OutlinerParaObject
* GetOutlinerParaObject() const override
;
495 OutlinerParaObject
* GetEditOutlinerParaObject() const;
497 virtual void NbcReformatText() override
;
498 virtual void ReformatText() override
;
500 virtual bool CalcFieldValue(const SvxFieldItem
& rField
, sal_Int32 nPara
, sal_uInt16 nPos
,
501 bool bEdit
, Color
*& rpTxtColor
, Color
*& rpFldColor
, OUString
& rRet
) const;
503 virtual SdrObject
* DoConvertToPolyObj(bool bBezier
, bool bAddText
) const override
;
505 void SetTextEditOutliner(SdrOutliner
* pOutl
) { pEdtOutl
=pOutl
; }
507 /** Setup given Outliner equivalently to SdrTextObj::Paint()
509 To setup an arbitrary Outliner in the same way as the draw
510 outliner on SdrTextObj::Paint(). Among others, the paper size,
511 control word and character stretching are initialized, such
512 that the formatting should match the screen representation.
513 The textual content of the outliner is not touched, i.e. no
514 Init() or Clear() is called on the Outliner.
517 The Outliner to setup.
520 The region to paint the outliner content into. This is useful
521 to e.g. determine the top, left position of text in shapes.
523 void SetupOutlinerFormatting( SdrOutliner
& rOutl
, tools::Rectangle
& rPaintRect
) const;
525 /** Update given Outliner equivalently to SdrTextObj::Paint()
527 Same functionality as in SetupOutlinerFormatting(), except
528 that the outliner content is not cleared.
531 The Outliner to update.
534 The region to paint the outliner content into. This is useful
535 to e.g. determine the top, left position of text in shapes.
537 void UpdateOutlinerFormatting( SdrOutliner
& rOutl
, tools::Rectangle
& rPaintRect
) const;
538 void ForceOutlinerParaObject();
539 virtual bool IsVerticalWriting() const;
540 virtual void SetVerticalWriting(bool bVertical
);
542 /** called from the SdrObjEditView during text edit when the status of the edit outliner changes */
543 virtual void onEditOutlinerStatusEvent( EditStatus
* pEditStatus
);
545 /** called from the SdrObjEditView during text edit when a chain of boxes is to be updated */
546 void onChainingEvent();
549 // transformation interface for StarOfficeAPI. This implements support for
550 // homogen 3x3 matrices containing the transformation of the SdrObject. At the
551 // moment it contains a shearX, rotation and translation, but for setting all linear
552 // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
555 // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
556 // with the base geometry and returns TRUE. Otherwise it returns FALSE.
557 virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix
& rMatrix
, basegfx::B2DPolyPolygon
& rPolyPolygon
) const override
;
559 // sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
560 // If it's an SdrPathObj it will use the provided geometry information. The Polygon has
561 // to use (0,0) as upper left and will be scaled to the given size in the matrix.
562 virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix
& rMatrix
, const basegfx::B2DPolyPolygon
& rPolyPolygon
) override
;
564 // #103836# iterates over the paragraphs of a given SdrObject and removes all
565 // hard set character attributes with the which ids contained in the
567 void RemoveOutlinerCharacterAttribs( const std::vector
<sal_uInt16
>& rCharWhichIds
);
569 // Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a
570 // painting rectangle. Rotation is taken from the object.
571 GDIMetaFile
* GetTextScrollMetaFileAndRectangle(tools::Rectangle
& rScrollRectangle
, tools::Rectangle
& rPaintRectangle
);
573 // Access to TextAnimationAllowed flag
574 void SetTextAnimationAllowed(bool bNew
);
577 // Set single item at the local ItemSet. *Does not use* AllowItemChange(),
578 // ItemChange(), PostItemChange() and ItemSetChanged() calls.
579 void SetObjectItemNoBroadcast(const SfxPoolItem
& rItem
);
583 // text primitive decomposition helpers
584 void impDecomposeContourTextPrimitive(
585 drawinglayer::primitive2d::Primitive2DContainer
& rTarget
,
586 const drawinglayer::primitive2d::SdrContourTextPrimitive2D
& rSdrContourTextPrimitive
,
587 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
588 void impDecomposePathTextPrimitive(
589 drawinglayer::primitive2d::Primitive2DContainer
& rTarget
,
590 const drawinglayer::primitive2d::SdrPathTextPrimitive2D
& rSdrPathTextPrimitive
,
591 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
592 void impDecomposeBlockTextPrimitive(
593 drawinglayer::primitive2d::Primitive2DContainer
& rTarget
,
594 const drawinglayer::primitive2d::SdrBlockTextPrimitive2D
& rSdrBlockTextPrimitive
,
595 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
596 void impDecomposeAutoFitTextPrimitive(
597 drawinglayer::primitive2d::Primitive2DContainer
& rTarget
,
598 const drawinglayer::primitive2d::SdrAutoFitTextPrimitive2D
& rSdrAutofitTextPrimitive
,
599 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
600 void impDecomposeStretchTextPrimitive(
601 drawinglayer::primitive2d::Primitive2DContainer
& rTarget
,
602 const drawinglayer::primitive2d::SdrStretchTextPrimitive2D
& rSdrStretchTextPrimitive
,
603 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
604 void impDecomposeChainedTextPrimitive(
605 drawinglayer::primitive2d::Primitive2DContainer
& rTarget
,
606 const drawinglayer::primitive2d::SdrChainedTextPrimitive2D
& rSdrChainedTextPrimitive
,
607 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
608 void impHandleChainingEventsDuringDecomposition(SdrOutliner
&rOutliner
) const;
612 void impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryList
& rAnimList
) const;
613 void impGetScrollTextTiming(drawinglayer::animation::AnimationEntryList
& rAnimList
, double fFrameLength
, double fTextLength
) const;
615 /** returns false if the given pointer is NULL
616 or if the given SdrOutliner contains no text.
617 Also checks for one empty paragraph.
619 static bool HasTextImpl( SdrOutliner
* pOutliner
);
621 friend class ::SdrTextObjTest
;
625 #endif // INCLUDED_SVX_SVDOTEXT_HXX
627 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */