tdf#124953: Use rangelist's combined range top-left address...
[LibreOffice.git] / include / svx / svdotext.hxx
blobc87444c5fe4a4d7ebc3ec7858d46db70169f8e78
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/svdtrans.hxx>
27 #include <tools/datetime.hxx>
28 #include <svl/style.hxx>
29 #include <svx/xtextit0.hxx>
30 #include <svx/svdtext.hxx>
31 #include <svx/svxdllapi.h>
32 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
33 #include <svx/svdpagv.hxx>
34 #include <rtl/ref.hxx>
35 #include <memory>
36 #include <vector>
39 // forward declarations
42 class OutlinerParaObject;
43 class OverflowingText;
44 class SdrOutliner;
45 class SdrTextObj;
46 class SdrTextObjTest;
47 class SvxFieldItem;
48 class ImpSdrObjTextLink;
49 class EditStatus;
50 class TextChain;
51 class TextChainFlow;
52 enum class EEAnchorMode;
53 enum class EETextFormat;
55 namespace sdr { namespace properties {
56 class TextProperties;
59 namespace drawinglayer { namespace primitive2d {
60 class SdrContourTextPrimitive2D;
61 class SdrPathTextPrimitive2D;
62 class SdrBlockTextPrimitive2D;
63 class SdrAutoFitTextPrimitive2D;
64 class SdrStretchTextPrimitive2D;
65 class SdrChainedTextPrimitive2D;
68 namespace drawinglayer { namespace animation {
69 class AnimationEntryList;
72 namespace drawinglayer { namespace geometry {
73 class ViewInformation2D;
76 namespace sdr { namespace table {
77 class Cell;
78 class SdrTableRtfExporter;
79 class SdrTableRTFParser;
83 // Defines
86 #define SDRUSERDATA_OBJTEXTLINK (1)
89 // helper class SdrTextObjGeoData
92 class SdrTextObjGeoData : public SdrObjGeoData
94 public:
95 tools::Rectangle aRect;
96 GeoStat aGeo;
100 // helper class ImpSdrObjTextLinkUserData
103 class ImpSdrObjTextLinkUserData : public SdrObjUserData
105 friend class SdrTextObj;
106 friend class ImpSdrObjTextLink;
108 OUString aFileName; // name of the referenced document
109 OUString aFilterName; // a filter, if need be
110 DateTime aFileDate0; // avoiding unnecessary reload
111 tools::SvRef<ImpSdrObjTextLink>
112 pLink;
113 rtl_TextEncoding eCharSet;
115 public:
116 ImpSdrObjTextLinkUserData();
117 virtual ~ImpSdrObjTextLinkUserData() override;
119 virtual std::unique_ptr<SdrObjUserData> Clone(SdrObject* pObj1) const override;
122 namespace sdr
124 namespace properties
126 class CustomShapeProperties;
127 class CellProperties;
128 } // end of namespace properties
129 } // end of namespace sdr
132 // SdrTextObj
135 class SVX_DLLPUBLIC SdrTextObj : public SdrAttrObj, public svx::ITextProvider
137 private:
138 // Cell needs access to ImpGetDrawOutliner();
139 friend class sdr::table::Cell;
140 friend class sdr::table::SdrTableRtfExporter;
141 friend class sdr::table::SdrTableRTFParser;
142 friend class TextChain;
143 friend class TextChainFlow;
144 friend class EditingTextChainFlow;
146 // CustomShapeproperties need to access the "bTextFrame" member:
147 friend class sdr::properties::CustomShapeProperties;
149 protected:
150 virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
151 virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
153 private:
154 // This method is only allowed for sdr::properties::TextProperties
155 SVX_DLLPRIVATE SdrOutliner* GetTextEditOutliner() const
157 return pEdtOutl;
160 // to allow sdr::properties::TextProperties access to SetPortionInfoChecked()
161 // and GetTextEditOutliner()
162 friend class sdr::properties::TextProperties;
163 friend class sdr::properties::CellProperties;
165 friend class ImpSdrObjTextLink;
166 friend class ImpSdrObjTextLinkUserData;
167 friend class SdrPowerPointImport; // for PowerPointImport
168 friend class SdrExchangeView; // for ImpGetDrawOutliner
169 friend class SdrView; // for ImpGetDrawOutliner
170 friend class SdrObjEditView; // for TextEdit
171 friend class SdrMeasureObj; // for ImpGetDrawOutliner
172 friend class SvxMSDffManager; // for ImpGetDrawOutliner
173 friend class SdrObjCustomShape; // for ImpGetDrawOutliner
174 friend class SdrText; // for ImpGetDrawOutliner
176 protected:
177 // The "aRect" is also the rect of RectObj and CircObj.
178 // When bTextFrame=sal_True the text will be formatted into this rect
179 // When bTextFrame=sal_False the text will be centered around its middle
180 tools::Rectangle maRect;
182 // The GeoStat contains the rotation and shear angles
183 GeoStat aGeo;
185 // this is the active text
186 std::unique_ptr<SdrText> mpText;
188 // This contains the dimensions of the text
189 Size aTextSize;
191 // an Outliner*, so that
192 // 1. the TextObj won't be edited simultaneously by multiple views, and
193 // 2. when streaming while editing Flush() can be done
194 SdrOutliner* pEdtOutl;
196 // Possible values for eTextKind are:
197 // OBJ_TEXT regular text frame
198 // OBJ_TITLETEXT TitleText for presentations
199 // OBJ_OUTLINETEXT OutlineText for presentations
200 // eTextKind only has meaning when bTextFrame=sal_True, since otherwise
201 // we're dealing with a labeled graphical object
202 SdrObjKind eTextKind;
204 // For text editing in SW Header/Footer it is necessary to be
205 // able to set an offset for the text edit to allow text editing at the
206 // position of the virtual object. This offset is used when setting up
207 // and maintaining the OutlinerView.
208 Point maTextEditOffset;
210 virtual SdrObject* getFullDragClone() const override;
213 public:
214 const Point& GetTextEditOffset() const { return maTextEditOffset; }
215 void SetTextEditOffset(const Point& rNew) { maTextEditOffset = rNew; }
217 protected:
218 bool mbIsUnchainableClone = false;
220 // the successor in a chain
221 SdrTextObj *mpNextInChain = nullptr;
222 SdrTextObj *mpPrevInChain = nullptr;
224 // For labeled graphical objects bTextFrame is FALSE. The block of text
225 // will then be centered horizontally and vertically on aRect.
226 // For bTextFalse=sal_True the text will be formatted into aRect.
227 // The actual text frame is realized by an SdrRectObj with
228 // bTextFrame=sal_True.
229 bool bTextFrame : 1;
230 bool bNoShear : 1; // disable shearing (->graphic+Ole+TextFrame)
231 bool bTextSizeDirty : 1;
233 bool mbInEditMode : 1; // Is this text object in edit mode?
235 // For objects with free size (flow text). The flag is set by the
236 // application on create. If the object width is later resized,
237 // AutoGrowWidth will be disabled (set to sal_False). This flag will
238 // then also be set to sal_False, so that the object behaves like a
239 // normal text object.
240 // Width resize can result from:
241 // - Interactive Resize in single or multiple selections
242 // - position/size dialog
243 bool bDisableAutoWidthOnDragging : 1;
245 // Flag for allowing text animation. Default is sal_true.
246 bool mbTextAnimationAllowed : 1;
248 // flag for preventing recursive onEditOutlinerStatusEvent calls
249 bool mbInDownScale : 1;
251 SdrOutliner& ImpGetDrawOutliner() const;
253 private:
254 // #101029#: Extracted from ImpGetDrawOutliner()
255 SVX_DLLPRIVATE void ImpInitDrawOutliner( SdrOutliner& rOutl ) const;
256 // #101029#: Extracted from Paint()
257 SVX_DLLPRIVATE void ImpSetupDrawOutlinerForPaint( bool bContourFrame,
258 SdrOutliner& rOutliner,
259 tools::Rectangle& rTextRect,
260 tools::Rectangle& rAnchorRect,
261 tools::Rectangle& rPaintRect,
262 Fraction& aFitXCorrection ) const;
263 void ImpAutoFitText( SdrOutliner& rOutliner ) const;
264 static void ImpAutoFitText( SdrOutliner& rOutliner, const Size& rShapeSize, bool bIsVerticalWriting );
265 SVX_DLLPRIVATE SdrObject* ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const;
266 SVX_DLLPRIVATE void ImpRegisterLink();
267 SVX_DLLPRIVATE void ImpDeregisterLink();
268 SVX_DLLPRIVATE ImpSdrObjTextLinkUserData* GetLinkUserData() const;
270 /** Appends the style family to a provided style name */
271 static void AppendFamilyToStyleName(OUString& styleName, SfxStyleFamily family);
273 /** Reads the style family from a style name to which the family has been appended. */
274 static SfxStyleFamily ReadFamilyFromStyleName(const OUString& styleName);
276 protected:
277 bool ImpCanConvTextToCurve() const;
278 SdrObject* ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, bool bClosed, bool bBezier) const;
279 SdrObject* ImpConvertAddText(SdrObject* pObj, bool bBezier) const;
280 void ImpSetTextStyleSheetListeners();
281 static void ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXCorrection);
282 static void ImpJustifyRect(tools::Rectangle& rRect);
283 void ImpCheckShear();
284 tools::Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const;
285 void ImpSetTextEditParams() const;
286 void SetTextSizeDirty() { bTextSizeDirty=true; }
288 // rAnchorRect is InOut-Parameter!
289 void ImpSetContourPolygon( SdrOutliner& rOutliner, tools::Rectangle const & rAnchorRect, bool bLineWidth ) const;
291 virtual SdrObjGeoData* NewGeoData() const override;
292 virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
293 virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
294 void NbcSetEckenradius(long nRad);
296 // #115391# new method for SdrObjCustomShape and SdrTextObj to correctly handle and set
297 // SdrTextMinFrameWidthItem and SdrTextMinFrameHeightItem based on all settings, necessities
298 // and object sizes
299 virtual void AdaptTextMinSize();
301 // constructors for labeled graphical objects
302 SdrTextObj(SdrModel& rSdrModel);
303 SdrTextObj(
304 SdrModel& rSdrModel,
305 const tools::Rectangle& rNewRect);
307 // constructors for text frames
308 SdrTextObj(
309 SdrModel& rSdrModel,
310 SdrObjKind eNewTextKind);
311 SdrTextObj(
312 SdrModel& rSdrModel,
313 SdrObjKind eNewTextKind,
314 const tools::Rectangle& rNewRect);
316 // protected destructor
317 virtual ~SdrTextObj() override;
319 public:
321 bool IsInEditMode() const { return mbInEditMode; }
323 // Currently ASCII and RTF are supported and the differentiation is done
324 // internally.
325 // rFilterName has no meaning and must be empty
326 // Normally the application only has to call SetTextLink() - the
327 // remainder is automatic (SfxLinkManager).
328 // The LoadText() method can also be used to load a file into a text
329 // object (without linking.)
330 // TextLinks can't be edited (if needed later could be ReadOnly).
331 // Setting attributes can only be done on the text frame.
332 void SetTextLink(const OUString& rFileName, const OUString& rFilterName);
333 void ReleaseTextLink();
334 bool IsLinkedText() const { return pPlusData!=nullptr && GetLinkUserData()!=nullptr; }
335 bool ReloadLinkedText(bool bForceLoad);
336 bool LoadText(const OUString& rFileName, rtl_TextEncoding eCharSet);
338 virtual bool AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHgt = true, bool bWdt = true) const;
339 virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true);
340 virtual bool AdjustTextFrameWidthAndHeight();
341 bool IsTextFrame() const { return bTextFrame; }
342 bool IsOutlText() const { return bTextFrame && (eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT); }
343 /// returns true if the PPT autofit of text into shape bounds is enabled. implies IsFitToSize()==false!
344 bool IsAutoFit() const;
345 /// returns true if the old feature for fitting shape content should into shape is enabled. implies IsAutoFit()==false!
346 bool IsFitToSize() const;
348 // Chaining
349 SdrTextObj *GetNextLinkInChain() const;
350 void SetNextLinkInChain(SdrTextObj *);
351 SdrTextObj *GetPrevLinkInChain() const;
352 bool IsChainable() const;
353 bool GetPreventChainable() const;
354 TextChain *GetTextChain() const;
356 SdrObjKind GetTextKind() const { return eTextKind; }
358 // #i121917#
359 virtual bool HasText() const override;
361 bool IsTextEditActive() const { return pEdtOutl != nullptr; }
363 /** returns the currently active text. */
364 virtual SdrText* getActiveText() const;
366 /** returns the nth available text. */
367 virtual SdrText* getText( sal_Int32 nIndex ) const override;
369 /** returns the number of texts available for this object. */
370 virtual sal_Int32 getTextCount() const override;
372 /** returns true only if we are in edit mode and the user actually changed anything */
373 virtual bool IsReallyEdited() const;
375 /** changes the current active text */
376 virtual void setActiveText( sal_Int32 nIndex );
378 /** returns the index of the text that contains the given point or -1 */
379 virtual sal_Int32 CheckTextHit(const Point& rPnt) const;
381 void SetDisableAutoWidthOnDragging(bool bOn) { bDisableAutoWidthOnDragging=bOn; }
382 void NbcSetText(const OUString& rStr);
383 void SetText(const OUString& rStr);
384 void NbcSetText(SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat);
385 void SetText(SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat);
387 // FitToSize and Fontwork are not taken into account in GetTextSize()!
388 virtual const Size& GetTextSize() const;
389 void FitFrameToTextSize();
390 double GetFontScaleY() const;
392 // Simultaneously sets the text into the Outliner (possibly
393 // the one of the EditOutliner) and sets the PaperSize.
394 virtual void TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText,
395 tools::Rectangle* pAnchorRect, bool bLineWidth = true ) const;
396 virtual void TakeTextAnchorRect(::tools::Rectangle& rAnchorRect) const;
397 const GeoStat& GetGeoStat() const { return aGeo; }
399 // get corner radius
400 long GetEckenradius() const;
401 virtual bool IsAutoGrowHeight() const;
402 long GetMinTextFrameHeight() const;
403 long GetMaxTextFrameHeight() const;
404 virtual bool IsAutoGrowWidth() const;
405 long GetMinTextFrameWidth() const;
406 long GetMaxTextFrameWidth() const;
408 css::drawing::TextFitToSizeType GetFitToSize() const;
409 const tools::Rectangle &GetGeoRect() const;
411 // check if it's a TextFontwork
412 virtual bool IsFontwork() const;
414 // should the Fontwork contour be hidden?
415 bool IsHideContour() const;
417 // text flow within contour
418 bool IsContourTextFrame() const;
420 SdrTextHorzAdjust GetTextHorizontalAdjust(const SfxItemSet& rSet) const;
421 SdrTextHorzAdjust GetTextHorizontalAdjust() const;
423 SdrTextVertAdjust GetTextVerticalAdjust(const SfxItemSet& rSet) const;
424 SdrTextVertAdjust GetTextVerticalAdjust() const;
426 /** Left inner spacing to borders */
427 long GetTextLeftDistance() const;
428 /** Right inner spacing to borders */
429 long GetTextRightDistance() const;
430 /** Top inner spacing to borders */
431 long GetTextUpperDistance() const;
432 /** Bottom inner spacing to borders */
433 long GetTextLowerDistance() const;
434 SdrTextAniKind GetTextAniKind() const;
435 SdrTextAniDirection GetTextAniDirection() const;
437 // react on model/page change
438 virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
440 virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
441 virtual sal_uInt16 GetObjIdentifier() const override;
443 // needed to determine text anchor area
444 virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const;
445 virtual OUString TakeObjNameSingul() const override;
446 virtual OUString TakeObjNamePlural() const override;
447 virtual SdrTextObj* CloneSdrObject(SdrModel& rTargetModel) const override;
448 SdrTextObj& operator=(const SdrTextObj& rObj);
449 virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
450 virtual basegfx::B2DPolyPolygon TakeContour() const override;
451 virtual void RecalcSnapRect() override;
452 virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
453 virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
454 virtual const tools::Rectangle& GetLogicRect() const override;
455 virtual long GetRotateAngle() const override;
456 virtual long GetShearAngle(bool bVertical = false) const override;
458 virtual sal_uInt32 GetSnapPointCount() const override;
459 virtual Point GetSnapPoint(sal_uInt32 i) const override;
461 virtual sal_uInt32 GetHdlCount() const override;
462 virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
464 // special drag methods
465 virtual bool hasSpecialDrag() const override;
466 virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
467 virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override;
469 virtual bool BegCreate(SdrDragStat& rStat) override;
470 virtual bool MovCreate(SdrDragStat& rStat) override;
471 virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
472 virtual bool BckCreate(SdrDragStat& rStat) override;
473 virtual void BrkCreate(SdrDragStat& rStat) override;
474 virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
475 virtual PointerStyle GetCreatePointer() const override;
477 virtual void NbcMove(const Size& rSiz) override;
478 virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
479 virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
480 virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
481 virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
483 virtual bool HasTextEdit() const override;
484 // returns true if TextEditMode started
485 virtual bool BegTextEdit(SdrOutliner& rOutl);
486 virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const;
487 virtual void EndTextEdit(SdrOutliner& rOutl);
488 virtual EEAnchorMode GetOutlinerViewAnchorMode() const;
490 virtual void NbcSetOutlinerParaObject(std::unique_ptr<OutlinerParaObject> pTextObject) override;
491 void NbcSetOutlinerParaObjectForText( std::unique_ptr<OutlinerParaObject> pTextObject, SdrText* pText );
492 virtual OutlinerParaObject* GetOutlinerParaObject() const override;
493 std::unique_ptr<OutlinerParaObject> GetEditOutlinerParaObject() const;
495 virtual void NbcReformatText() override;
497 virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
498 bool bEdit, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, OUString& rRet) const;
500 virtual SdrObject* DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
502 void SetTextEditOutliner(SdrOutliner* pOutl) { pEdtOutl=pOutl; }
504 /** Setup given Outliner equivalently to SdrTextObj::Paint()
506 To setup an arbitrary Outliner in the same way as the draw
507 outliner on SdrTextObj::Paint(). Among others, the paper size,
508 control word and character stretching are initialized, such
509 that the formatting should match the screen representation.
510 The textual content of the outliner is not touched, i.e. no
511 Init() or Clear() is called on the Outliner.
513 @param rOutl
514 The Outliner to setup.
516 @param rPaintRect
517 The region to paint the outliner content into. This is useful
518 to e.g. determine the top, left position of text in shapes.
520 void SetupOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const;
522 /** Update given Outliner equivalently to SdrTextObj::Paint()
524 Same functionality as in SetupOutlinerFormatting(), except
525 that the outliner content is not cleared.
527 @param rOutl
528 The Outliner to update.
530 @param rPaintRect
531 The region to paint the outliner content into. This is useful
532 to e.g. determine the top, left position of text in shapes.
534 void UpdateOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const;
535 void ForceOutlinerParaObject();
536 virtual bool IsVerticalWriting() const;
537 virtual void SetVerticalWriting(bool bVertical);
539 /** called from the SdrObjEditView during text edit when the status of the edit outliner changes */
540 virtual void onEditOutlinerStatusEvent( EditStatus* pEditStatus );
542 /** called from the SdrObjEditView during text edit when a chain of boxes is to be updated */
543 void onChainingEvent();
546 // transformation interface for StarOfficeAPI. This implements support for
547 // homogen 3x3 matrices containing the transformation of the SdrObject. At the
548 // moment it contains a shearX, rotation and translation, but for setting all linear
549 // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
552 // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
553 // with the base geometry and returns TRUE. Otherwise it returns FALSE.
554 virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const override;
556 // sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
557 // If it's an SdrPathObj it will use the provided geometry information. The Polygon has
558 // to use (0,0) as upper left and will be scaled to the given size in the matrix.
559 virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon) override;
561 // #103836# iterates over the paragraphs of a given SdrObject and removes all
562 // hard set character attributes with the which ids contained in the
563 // given vector
564 void RemoveOutlinerCharacterAttribs( const std::vector<sal_uInt16>& rCharWhichIds );
566 // Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a
567 // painting rectangle. Rotation is taken from the object.
568 GDIMetaFile* GetTextScrollMetaFileAndRectangle(tools::Rectangle& rScrollRectangle, tools::Rectangle& rPaintRectangle);
570 // Access to TextAnimationAllowed flag
571 void SetTextAnimationAllowed(bool bNew);
573 // #i8824#
574 // Set single item at the local ItemSet. *Does not use* AllowItemChange(),
575 // ItemChange(), PostItemChange() and ItemSetChanged() calls.
576 void SetObjectItemNoBroadcast(const SfxPoolItem& rItem);
578 public:
580 // text primitive decomposition helpers
581 void impDecomposeContourTextPrimitive(
582 drawinglayer::primitive2d::Primitive2DContainer& rTarget,
583 const drawinglayer::primitive2d::SdrContourTextPrimitive2D& rSdrContourTextPrimitive,
584 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
585 void impDecomposePathTextPrimitive(
586 drawinglayer::primitive2d::Primitive2DContainer& rTarget,
587 const drawinglayer::primitive2d::SdrPathTextPrimitive2D& rSdrPathTextPrimitive,
588 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
589 void impDecomposeBlockTextPrimitive(
590 drawinglayer::primitive2d::Primitive2DContainer& rTarget,
591 const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive,
592 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
593 void impDecomposeAutoFitTextPrimitive(
594 drawinglayer::primitive2d::Primitive2DContainer& rTarget,
595 const drawinglayer::primitive2d::SdrAutoFitTextPrimitive2D& rSdrAutofitTextPrimitive,
596 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
597 void impDecomposeStretchTextPrimitive(
598 drawinglayer::primitive2d::Primitive2DContainer& rTarget,
599 const drawinglayer::primitive2d::SdrStretchTextPrimitive2D& rSdrStretchTextPrimitive,
600 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
601 void impDecomposeChainedTextPrimitive(
602 drawinglayer::primitive2d::Primitive2DContainer& rTarget,
603 const drawinglayer::primitive2d::SdrChainedTextPrimitive2D& rSdrChainedTextPrimitive,
604 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
605 void impHandleChainingEventsDuringDecomposition(SdrOutliner &rOutliner) const;
607 // timing generators
608 void impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList) const;
609 void impGetScrollTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList, double fFrameLength, double fTextLength) const;
611 // Direct decomposer for text visualization when you already have a prepared
612 // Outliner containing all the needed information
613 static void impDecomposeBlockTextPrimitiveDirect(
614 drawinglayer::primitive2d::Primitive2DContainer& rTarget,
615 SdrOutliner& rOutliner,
616 const basegfx::B2DHomMatrix& rNewTransformA,
617 const basegfx::B2DHomMatrix& rNewTransformB,
618 const basegfx::B2DRange& rClipRange);
620 /** returns false if the given pointer is NULL
621 or if the given SdrOutliner contains no text.
622 Also checks for one empty paragraph.
624 static bool HasTextImpl( SdrOutliner const * pOutliner );
626 friend class ::SdrTextObjTest;
630 #endif // INCLUDED_SVX_SVDOTEXT_HXX
632 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */