bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / svx / svdotext.hxx
blob218fe94e81858b4815567c429e22def25431a633
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/sdtaitm.hxx>
27 #include <svx/sdtakitm.hxx>
28 #include <svx/sdtaditm.hxx>
29 #include <svx/svdtrans.hxx>
30 #include <tools/datetime.hxx>
31 #include <svl/style.hxx>
32 #include <svx/xtextit0.hxx>
33 #include <svx/svdtext.hxx>
34 #include <svx/svxdllapi.h>
35 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
36 #include <svx/svdpagv.hxx>
37 #include <rtl/ref.hxx>
38 #include <memory>
39 #include <vector>
41 #include <com/sun/star/drawing/TextFitToSizeType.hpp>
43 // forward declarations
46 class OutlinerParaObject;
47 class OverflowingText;
48 class SdrOutliner;
49 class SdrTextObj;
50 class SdrTextObjTest;
51 class SvxFieldItem;
52 class ImpSdrObjTextLink;
53 class EditStatus;
54 class TextChain;
55 class TextChainFlow;
56 enum class EEAnchorMode;
57 enum class EETextFormat;
59 namespace sdr { namespace properties {
60 class TextProperties;
63 namespace drawinglayer { namespace primitive2d {
64 class SdrContourTextPrimitive2D;
65 class SdrPathTextPrimitive2D;
66 class SdrBlockTextPrimitive2D;
67 class SdrAutoFitTextPrimitive2D;
68 class SdrStretchTextPrimitive2D;
69 class SdrChainedTextPrimitive2D;
72 namespace drawinglayer { namespace animation {
73 class AnimationEntryList;
76 namespace drawinglayer { namespace geometry {
77 class ViewInformation2D;
80 namespace sdr { namespace table {
81 class Cell;
82 class SdrTableRtfExporter;
83 class SdrTableRTFParser;
87 // Defines
90 #define SDRUSERDATA_OBJTEXTLINK (1)
93 // helper class SdrTextObjGeoData
96 class SdrTextObjGeoData : public SdrObjGeoData
98 public:
99 tools::Rectangle aRect;
100 GeoStat aGeo;
104 // helper class ImpSdrObjTextLinkUserData
107 class ImpSdrObjTextLinkUserData : public SdrObjUserData
109 friend class SdrTextObj;
110 friend class ImpSdrObjTextLink;
112 OUString aFileName; // name of the referenced document
113 OUString aFilterName; // a filter, if need be
114 DateTime aFileDate0; // avoiding unnecessary reload
115 tools::SvRef<ImpSdrObjTextLink>
116 pLink;
117 rtl_TextEncoding eCharSet;
119 public:
120 ImpSdrObjTextLinkUserData();
121 virtual ~ImpSdrObjTextLinkUserData() override;
123 virtual std::unique_ptr<SdrObjUserData> Clone(SdrObject* pObj1) const override;
126 namespace sdr
128 namespace properties
130 class CustomShapeProperties;
131 class CellProperties;
132 } // end of namespace properties
133 } // end of namespace sdr
136 // SdrTextObj
139 class SVX_DLLPUBLIC SdrTextObj : public SdrAttrObj, public svx::ITextProvider
141 private:
142 // Cell needs access to ImpGetDrawOutliner();
143 friend class sdr::table::Cell;
144 friend class sdr::table::SdrTableRtfExporter;
145 friend class sdr::table::SdrTableRTFParser;
146 friend class TextChain;
147 friend class TextChainFlow;
148 friend class EditingTextChainFlow;
150 // CustomShapeproperties need to access the "bTextFrame" member:
151 friend class sdr::properties::CustomShapeProperties;
153 protected:
154 virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
155 virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
157 private:
158 // This method is only allowed for sdr::properties::TextProperties
159 SVX_DLLPRIVATE SdrOutliner* GetTextEditOutliner() const
161 return pEdtOutl;
164 // to allow sdr::properties::TextProperties access to SetPortionInfoChecked()
165 // and GetTextEditOutliner()
166 friend class sdr::properties::TextProperties;
167 friend class sdr::properties::CellProperties;
169 friend class ImpSdrObjTextLink;
170 friend class ImpSdrObjTextLinkUserData;
171 friend class SdrPowerPointImport; // for PowerPointImport
172 friend class SdrExchangeView; // for ImpGetDrawOutliner
173 friend class SdrView; // for ImpGetDrawOutliner
174 friend class SdrObjEditView; // for TextEdit
175 friend class SdrMeasureObj; // for ImpGetDrawOutliner
176 friend class SvxMSDffManager; // for ImpGetDrawOutliner
177 friend class SdrObjCustomShape; // for ImpGetDrawOutliner
178 friend class SdrText; // for ImpGetDrawOutliner
180 protected:
181 // The "aRect" is also the rect of RectObj and CircObj.
182 // When bTextFrame=sal_True the text will be formatted into this rect
183 // When bTextFrame=sal_False the text will be centered around its middle
184 tools::Rectangle maRect;
186 // The GeoStat contains the rotation and shear angles
187 GeoStat aGeo;
189 // this is the active text
190 std::unique_ptr<SdrText> mpText;
192 // This contains the dimensions of the text
193 Size aTextSize;
195 // an Outliner*, so that
196 // 1. the TextObj won't be edited simultaneously by multiple views, and
197 // 2. when streaming while editing Flush() can be done
198 SdrOutliner* pEdtOutl;
200 // Possible values for eTextKind are:
201 // OBJ_TEXT regular text frame
202 // OBJ_TITLETEXT TitleText for presentations
203 // OBJ_OUTLINETEXT OutlineText for presentations
204 // eTextKind only has meaning when bTextFrame=sal_True, since otherwise
205 // we're dealing with a labeled graphical object
206 SdrObjKind eTextKind;
208 // For text editing in SW Header/Footer it is necessary to be
209 // able to set an offset for the text edit to allow text editing at the
210 // position of the virtual object. This offset is used when setting up
211 // and maintaining the OutlinerView.
212 Point maTextEditOffset;
214 virtual SdrObject* getFullDragClone() const override;
217 public:
218 const Point& GetTextEditOffset() const { return maTextEditOffset; }
219 void SetTextEditOffset(const Point& rNew) { maTextEditOffset = rNew; }
221 protected:
222 bool mbIsUnchainableClone = false;
224 // the successor in a chain
225 SdrTextObj *mpNextInChain = nullptr;
226 SdrTextObj *mpPrevInChain = nullptr;
228 // For labeled graphical objects bTextFrame is FALSE. The block of text
229 // will then be centered horizontally and vertically on aRect.
230 // For bTextFalse=sal_True the text will be formatted into aRect.
231 // The actual text frame is realized by an SdrRectObj with
232 // bTextFrame=sal_True.
233 bool bTextFrame : 1;
234 bool bNoShear : 1; // disable shearing (->graphic+Ole+TextFrame)
235 bool bTextSizeDirty : 1;
237 bool mbInEditMode : 1; // Is this text object in edit mode?
239 // For objects with free size (flow text). The flag is set by the
240 // application on create. If the object width is later resized,
241 // AutoGrowWidth will be disabled (set to sal_False). This flag will
242 // then also be set to sal_False, so that the object behaves like a
243 // normal text object.
244 // Width resize can result from:
245 // - Interactive Resize in single or multiple selections
246 // - position/size dialog
247 bool bDisableAutoWidthOnDragging : 1;
249 // Flag for allowing text animation. Default is sal_true.
250 bool mbTextAnimationAllowed : 1;
252 // flag for preventing recursive onEditOutlinerStatusEvent calls
253 bool mbInDownScale : 1;
255 SdrOutliner& ImpGetDrawOutliner() const;
257 private:
258 // #101029#: Extracted from ImpGetDrawOutliner()
259 SVX_DLLPRIVATE void ImpInitDrawOutliner( SdrOutliner& rOutl ) const;
260 // #101029#: Extracted from Paint()
261 SVX_DLLPRIVATE void ImpSetupDrawOutlinerForPaint( bool bContourFrame,
262 SdrOutliner& rOutliner,
263 tools::Rectangle& rTextRect,
264 tools::Rectangle& rAnchorRect,
265 tools::Rectangle& rPaintRect,
266 Fraction& aFitXCorrection ) const;
267 void ImpAutoFitText( SdrOutliner& rOutliner ) const;
268 static void ImpAutoFitText( SdrOutliner& rOutliner, const Size& rShapeSize, bool bIsVerticalWriting );
269 SVX_DLLPRIVATE SdrObject* ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const;
270 SVX_DLLPRIVATE void ImpRegisterLink();
271 SVX_DLLPRIVATE void ImpDeregisterLink();
272 SVX_DLLPRIVATE ImpSdrObjTextLinkUserData* GetLinkUserData() const;
274 /** Appends the style family to a provided style name */
275 static void AppendFamilyToStyleName(OUString& styleName, SfxStyleFamily family);
277 /** Reads the style family from a style name to which the family has been appended. */
278 static SfxStyleFamily ReadFamilyFromStyleName(const OUString& styleName);
280 protected:
281 bool ImpCanConvTextToCurve() const;
282 SdrObject* ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, bool bClosed, bool bBezier) const;
283 SdrObject* ImpConvertAddText(SdrObject* pObj, bool bBezier) const;
284 void ImpSetTextStyleSheetListeners();
285 static void ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXCorrection);
286 static void ImpJustifyRect(tools::Rectangle& rRect);
287 void ImpCheckShear();
288 tools::Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const;
289 void ImpSetTextEditParams() const;
290 void SetTextSizeDirty() { bTextSizeDirty=true; }
292 // rAnchorRect is InOut-Parameter!
293 void ImpSetContourPolygon( SdrOutliner& rOutliner, tools::Rectangle const & rAnchorRect, bool bLineWidth ) const;
295 virtual SdrObjGeoData* NewGeoData() const override;
296 virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
297 virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
298 void NbcSetEckenradius(long nRad);
300 // #115391# new method for SdrObjCustomShape and SdrTextObj to correctly handle and set
301 // SdrTextMinFrameWidthItem and SdrTextMinFrameHeightItem based on all settings, necessities
302 // and object sizes
303 virtual void AdaptTextMinSize();
305 // constructors for labeled graphical objects
306 SdrTextObj(SdrModel& rSdrModel);
307 SdrTextObj(
308 SdrModel& rSdrModel,
309 const tools::Rectangle& rNewRect);
311 // constructors for text frames
312 SdrTextObj(
313 SdrModel& rSdrModel,
314 SdrObjKind eNewTextKind);
315 SdrTextObj(
316 SdrModel& rSdrModel,
317 SdrObjKind eNewTextKind,
318 const tools::Rectangle& rNewRect);
320 // protected destructor
321 virtual ~SdrTextObj() override;
323 public:
325 bool IsInEditMode() const { return mbInEditMode; }
327 // Currently ASCII and RTF are supported and the differentiation is done
328 // internally.
329 // rFilterName has no meaning and must be empty
330 // Normally the application only has to call SetTextLink() - the
331 // remainder is automatic (SfxLinkManager).
332 // The LoadText() method can also be used to load a file into a text
333 // object (without linking.)
334 // TextLinks can't be edited (if needed later could be ReadOnly).
335 // Setting attributes can only be done on the text frame.
336 void SetTextLink(const OUString& rFileName, const OUString& rFilterName);
337 void ReleaseTextLink();
338 bool IsLinkedText() const { return pPlusData!=nullptr && GetLinkUserData()!=nullptr; }
339 bool ReloadLinkedText(bool bForceLoad);
340 bool LoadText(const OUString& rFileName, rtl_TextEncoding eCharSet);
342 virtual bool AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHgt = true, bool bWdt = true) const;
343 virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true);
344 virtual bool AdjustTextFrameWidthAndHeight();
345 bool IsTextFrame() const { return bTextFrame; }
346 bool IsOutlText() const { return bTextFrame && (eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT); }
347 /// returns true if the PPT autofit of text into shape bounds is enabled. implies IsFitToSize()==false!
348 bool IsAutoFit() const;
349 /// returns true if the old feature for fitting shape content should into shape is enabled. implies IsAutoFit()==false!
350 bool IsFitToSize() const;
352 // Chaining
353 SdrTextObj *GetNextLinkInChain() const;
354 void SetNextLinkInChain(SdrTextObj *);
355 SdrTextObj *GetPrevLinkInChain() const;
356 bool IsChainable() const;
357 bool GetPreventChainable() const;
358 TextChain *GetTextChain() const;
360 SdrObjKind GetTextKind() const { return eTextKind; }
362 // #i121917#
363 virtual bool HasText() const override;
365 bool IsTextEditActive() const { return pEdtOutl != nullptr; }
367 /** returns the currently active text. */
368 virtual SdrText* getActiveText() const;
370 /** returns the nth available text. */
371 virtual SdrText* getText( sal_Int32 nIndex ) const override;
373 /** returns the number of texts available for this object. */
374 virtual sal_Int32 getTextCount() const override;
376 /** returns true only if we are in edit mode and the user actually changed anything */
377 virtual bool IsReallyEdited() const;
379 /** changes the current active text */
380 virtual void setActiveText( sal_Int32 nIndex );
382 /** returns the index of the text that contains the given point or -1 */
383 virtual sal_Int32 CheckTextHit(const Point& rPnt) const;
385 void SetDisableAutoWidthOnDragging(bool bOn) { bDisableAutoWidthOnDragging=bOn; }
386 void NbcSetText(const OUString& rStr);
387 void SetText(const OUString& rStr);
388 void NbcSetText(SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat);
389 void SetText(SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat);
391 // FitToSize and Fontwork are not taken into account in GetTextSize()!
392 virtual const Size& GetTextSize() const;
393 void FitFrameToTextSize();
394 double GetFontScaleY() const;
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; }
403 // get corner radius
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 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 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 // react on model/page change
442 virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
444 virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
445 virtual sal_uInt16 GetObjIdentifier() const override;
447 // needed to determine text anchor area
448 virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const;
449 virtual OUString TakeObjNameSingul() const override;
450 virtual OUString TakeObjNamePlural() const override;
451 virtual SdrTextObj* CloneSdrObject(SdrModel& rTargetModel) const override;
452 SdrTextObj& operator=(const SdrTextObj& rObj);
453 virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
454 virtual basegfx::B2DPolyPolygon TakeContour() const override;
455 virtual void RecalcSnapRect() override;
456 virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
457 virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
458 virtual const tools::Rectangle& GetLogicRect() const override;
459 virtual long GetRotateAngle() const override;
460 virtual long GetShearAngle(bool bVertical = false) const override;
462 virtual sal_uInt32 GetSnapPointCount() const override;
463 virtual Point GetSnapPoint(sal_uInt32 i) const override;
465 virtual sal_uInt32 GetHdlCount() const override;
466 virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
468 // special drag methods
469 virtual bool hasSpecialDrag() const override;
470 virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
471 virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override;
473 virtual bool BegCreate(SdrDragStat& rStat) override;
474 virtual bool MovCreate(SdrDragStat& rStat) override;
475 virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
476 virtual bool BckCreate(SdrDragStat& rStat) override;
477 virtual void BrkCreate(SdrDragStat& rStat) override;
478 virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
479 virtual PointerStyle GetCreatePointer() const override;
481 virtual void NbcMove(const Size& rSiz) override;
482 virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
483 virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
484 virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
485 virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
487 virtual bool HasTextEdit() const override;
488 // returns true if TextEditMode started
489 virtual bool BegTextEdit(SdrOutliner& rOutl);
490 virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const;
491 virtual void EndTextEdit(SdrOutliner& rOutl);
492 virtual EEAnchorMode GetOutlinerViewAnchorMode() const;
494 virtual void NbcSetOutlinerParaObject(std::unique_ptr<OutlinerParaObject> pTextObject) override;
495 void NbcSetOutlinerParaObjectForText( std::unique_ptr<OutlinerParaObject> pTextObject, SdrText* pText );
496 virtual OutlinerParaObject* GetOutlinerParaObject() const override;
497 std::unique_ptr<OutlinerParaObject> GetEditOutlinerParaObject() const;
499 virtual void NbcReformatText() override;
501 virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
502 bool bEdit, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, OUString& rRet) const;
504 virtual SdrObject* DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
506 void SetTextEditOutliner(SdrOutliner* pOutl) { pEdtOutl=pOutl; }
508 /** Setup given Outliner equivalently to SdrTextObj::Paint()
510 To setup an arbitrary Outliner in the same way as the draw
511 outliner on SdrTextObj::Paint(). Among others, the paper size,
512 control word and character stretching are initialized, such
513 that the formatting should match the screen representation.
514 The textual content of the outliner is not touched, i.e. no
515 Init() or Clear() is called on the Outliner.
517 @param rOutl
518 The Outliner to setup.
520 @param rPaintRect
521 The region to paint the outliner content into. This is useful
522 to e.g. determine the top, left position of text in shapes.
524 void SetupOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const;
526 /** Update given Outliner equivalently to SdrTextObj::Paint()
528 Same functionality as in SetupOutlinerFormatting(), except
529 that the outliner content is not cleared.
531 @param rOutl
532 The Outliner to update.
534 @param rPaintRect
535 The region to paint the outliner content into. This is useful
536 to e.g. determine the top, left position of text in shapes.
538 void UpdateOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const;
539 void ForceOutlinerParaObject();
540 virtual bool IsVerticalWriting() const;
541 virtual void SetVerticalWriting(bool bVertical);
543 /** called from the SdrObjEditView during text edit when the status of the edit outliner changes */
544 virtual void onEditOutlinerStatusEvent( EditStatus* pEditStatus );
546 /** called from the SdrObjEditView during text edit when a chain of boxes is to be updated */
547 void onChainingEvent();
550 // transformation interface for StarOfficeAPI. This implements support for
551 // homogen 3x3 matrices containing the transformation of the SdrObject. At the
552 // moment it contains a shearX, rotation and translation, but for setting all linear
553 // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
556 // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
557 // with the base geometry and returns TRUE. Otherwise it returns FALSE.
558 virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const override;
560 // sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
561 // If it's an SdrPathObj it will use the provided geometry information. The Polygon has
562 // to use (0,0) as upper left and will be scaled to the given size in the matrix.
563 virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon) override;
565 // #103836# iterates over the paragraphs of a given SdrObject and removes all
566 // hard set character attributes with the which ids contained in the
567 // given vector
568 void RemoveOutlinerCharacterAttribs( const std::vector<sal_uInt16>& rCharWhichIds );
570 // Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a
571 // painting rectangle. Rotation is taken from the object.
572 GDIMetaFile* GetTextScrollMetaFileAndRectangle(tools::Rectangle& rScrollRectangle, tools::Rectangle& rPaintRectangle);
574 // Access to TextAnimationAllowed flag
575 void SetTextAnimationAllowed(bool bNew);
577 // #i8824#
578 // Set single item at the local ItemSet. *Does not use* AllowItemChange(),
579 // ItemChange(), PostItemChange() and ItemSetChanged() calls.
580 void SetObjectItemNoBroadcast(const SfxPoolItem& rItem);
582 public:
584 // text primitive decomposition helpers
585 void impDecomposeContourTextPrimitive(
586 drawinglayer::primitive2d::Primitive2DContainer& rTarget,
587 const drawinglayer::primitive2d::SdrContourTextPrimitive2D& rSdrContourTextPrimitive,
588 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
589 void impDecomposePathTextPrimitive(
590 drawinglayer::primitive2d::Primitive2DContainer& rTarget,
591 const drawinglayer::primitive2d::SdrPathTextPrimitive2D& rSdrPathTextPrimitive,
592 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
593 void impDecomposeBlockTextPrimitive(
594 drawinglayer::primitive2d::Primitive2DContainer& rTarget,
595 const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive,
596 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
597 void impDecomposeAutoFitTextPrimitive(
598 drawinglayer::primitive2d::Primitive2DContainer& rTarget,
599 const drawinglayer::primitive2d::SdrAutoFitTextPrimitive2D& rSdrAutofitTextPrimitive,
600 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
601 void impDecomposeStretchTextPrimitive(
602 drawinglayer::primitive2d::Primitive2DContainer& rTarget,
603 const drawinglayer::primitive2d::SdrStretchTextPrimitive2D& rSdrStretchTextPrimitive,
604 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
605 void impDecomposeChainedTextPrimitive(
606 drawinglayer::primitive2d::Primitive2DContainer& rTarget,
607 const drawinglayer::primitive2d::SdrChainedTextPrimitive2D& rSdrChainedTextPrimitive,
608 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
609 void impHandleChainingEventsDuringDecomposition(SdrOutliner &rOutliner) const;
611 // timing generators
612 void impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList) const;
613 void impGetScrollTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList, double fFrameLength, double fTextLength) const;
615 // Direct decomposer for text visualization when you already have a prepared
616 // Outliner containing all the needed information
617 static void impDecomposeBlockTextPrimitiveDirect(
618 drawinglayer::primitive2d::Primitive2DContainer& rTarget,
619 SdrOutliner& rOutliner,
620 const basegfx::B2DHomMatrix& rNewTransformA,
621 const basegfx::B2DHomMatrix& rNewTransformB,
622 const basegfx::B2DRange& rClipRange);
624 /** returns false if the given pointer is NULL
625 or if the given SdrOutliner contains no text.
626 Also checks for one empty paragraph.
628 static bool HasTextImpl( SdrOutliner const * pOutliner );
630 friend class ::SdrTextObjTest;
634 #endif // INCLUDED_SVX_SVDOTEXT_HXX
636 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */