Bump version to 6.4-15
[LibreOffice.git] / include / svx / svdotext.hxx
blob6efae0b58feb1b9f17dea4c78c7298008dbf7299
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 <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/baseprimitive2d.hxx>
34 #include <memory>
35 #include <vector>
37 #include <com/sun/star/drawing/TextFitToSizeType.hpp>
39 // forward declarations
42 class OutlinerParaObject;
43 class OverflowingText;
44 class SdrOutliner;
45 class SdrPathObj;
46 class SdrTextObj;
47 class SdrTextObjTest;
48 class SvxFieldItem;
49 class ImpSdrObjTextLink;
50 class EditStatus;
51 class TextChain;
52 class TextChainFlow;
54 enum class EEAnchorMode;
55 enum class EETextFormat;
57 namespace sdr { namespace properties {
58 class TextProperties;
61 namespace drawinglayer { namespace primitive2d {
62 class SdrContourTextPrimitive2D;
63 class SdrPathTextPrimitive2D;
64 class SdrBlockTextPrimitive2D;
65 class SdrAutoFitTextPrimitive2D;
66 class SdrStretchTextPrimitive2D;
67 class SdrChainedTextPrimitive2D;
70 namespace drawinglayer { namespace animation {
71 class AnimationEntryList;
74 namespace drawinglayer { namespace geometry {
75 class ViewInformation2D;
78 namespace sdr { namespace table {
79 class Cell;
80 class SdrTableRtfExporter;
81 class SdrTableRTFParser;
85 // Defines
88 #define SDRUSERDATA_OBJTEXTLINK (1)
91 // helper class SdrTextObjGeoData
94 class SdrTextObjGeoData : public SdrObjGeoData
96 public:
97 tools::Rectangle aRect;
98 GeoStat aGeo;
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>
114 pLink;
115 rtl_TextEncoding eCharSet;
117 public:
118 ImpSdrObjTextLinkUserData();
119 virtual ~ImpSdrObjTextLinkUserData() override;
121 virtual std::unique_ptr<SdrObjUserData> Clone(SdrObject* pObj1) const override;
124 namespace sdr
126 namespace properties
128 class CustomShapeProperties;
129 class CellProperties;
130 } // end of namespace properties
131 } // end of namespace sdr
133 // SdrTextObj
135 typedef std::unique_ptr<SdrPathObj, SdrObjectFreeOp> SdrPathObjUniquePtr;
137 class SVX_DLLPUBLIC SdrTextObj : public SdrAttrObj, public svx::ITextProvider
139 private:
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;
151 protected:
152 virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
153 virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
155 private:
156 // This method is only allowed for sdr::properties::TextProperties
157 SVX_DLLPRIVATE SdrOutliner* GetTextEditOutliner() const
159 return pEdtOutl;
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
178 protected:
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
185 GeoStat aGeo;
187 // this is the active text
188 std::unique_ptr<SdrText> mpText;
190 // This contains the dimensions of the text
191 Size aTextSize;
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;
215 public:
216 const Point& GetTextEditOffset() const { return maTextEditOffset; }
217 void SetTextEditOffset(const Point& rNew) { maTextEditOffset = rNew; }
219 protected:
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.
231 bool bTextFrame : 1;
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;
255 private:
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);
278 protected:
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(long nRad);
298 // #115391# new method for SdrObjCustomShape and SdrTextObj to correctly handle and set
299 // SdrTextMinFrameWidthItem and SdrTextMinFrameHeightItem based on all settings, necessities
300 // and object sizes
301 virtual void AdaptTextMinSize();
303 // constructors for labeled graphical objects
304 SdrTextObj(SdrModel& rSdrModel);
305 SdrTextObj(
306 SdrModel& rSdrModel,
307 const tools::Rectangle& rNewRect);
309 // constructors for text frames
310 SdrTextObj(
311 SdrModel& rSdrModel,
312 SdrObjKind eNewTextKind);
313 SdrTextObj(
314 SdrModel& rSdrModel,
315 SdrObjKind eNewTextKind,
316 const tools::Rectangle& rNewRect);
318 // protected destructor
319 virtual ~SdrTextObj() override;
321 public:
323 bool IsInEditMode() const { return mbInEditMode; }
325 // Currently ASCII and RTF are supported and the differentiation is done
326 // internally.
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;
350 // Chaining
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; }
360 // #i121917#
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 double 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 virtual void TakeTextAnchorRect(::tools::Rectangle& rAnchorRect) const;
399 const GeoStat& GetGeoStat() const { return aGeo; }
401 // get corner radius
402 long GetEckenradius() const;
403 virtual bool IsAutoGrowHeight() const;
404 long GetMinTextFrameHeight() const;
405 long GetMaxTextFrameHeight() const;
406 virtual bool IsAutoGrowWidth() const;
407 long GetMinTextFrameWidth() const;
408 long GetMaxTextFrameWidth() const;
410 css::drawing::TextFitToSizeType GetFitToSize() const;
411 const tools::Rectangle &GetGeoRect() const;
413 // check if it's a TextFontwork
414 virtual bool IsFontwork() const;
416 // should the Fontwork contour be hidden?
417 bool IsHideContour() const;
419 // text flow within contour
420 bool IsContourTextFrame() const;
422 SdrTextHorzAdjust GetTextHorizontalAdjust(const SfxItemSet& rSet) const;
423 SdrTextHorzAdjust GetTextHorizontalAdjust() const;
425 SdrTextVertAdjust GetTextVerticalAdjust(const SfxItemSet& rSet) const;
426 SdrTextVertAdjust GetTextVerticalAdjust() const;
428 /** Left inner spacing to borders */
429 long GetTextLeftDistance() const;
430 /** Right inner spacing to borders */
431 long GetTextRightDistance() const;
432 /** Top inner spacing to borders */
433 long GetTextUpperDistance() const;
434 /** Bottom inner spacing to borders */
435 long GetTextLowerDistance() const;
436 SdrTextAniKind GetTextAniKind() const;
437 SdrTextAniDirection GetTextAniDirection() const;
439 // react on model/page change
440 virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
442 virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
443 virtual sal_uInt16 GetObjIdentifier() const override;
445 // needed to determine text anchor area
446 virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const;
447 virtual OUString TakeObjNameSingul() const override;
448 virtual OUString TakeObjNamePlural() const override;
449 virtual SdrTextObj* CloneSdrObject(SdrModel& rTargetModel) const override;
450 SdrTextObj& operator=(const SdrTextObj& rObj);
451 virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
452 virtual basegfx::B2DPolyPolygon TakeContour() const override;
453 virtual void RecalcSnapRect() override;
454 virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
455 virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
456 virtual const tools::Rectangle& GetLogicRect() const override;
457 virtual long GetRotateAngle() const override;
458 virtual long GetShearAngle(bool bVertical = false) const override;
460 virtual sal_uInt32 GetSnapPointCount() const override;
461 virtual Point GetSnapPoint(sal_uInt32 i) const override;
463 virtual sal_uInt32 GetHdlCount() const override;
464 virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
466 // special drag methods
467 virtual bool hasSpecialDrag() const override;
468 virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
469 virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override;
471 virtual bool BegCreate(SdrDragStat& rStat) override;
472 virtual bool MovCreate(SdrDragStat& rStat) override;
473 virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
474 virtual bool BckCreate(SdrDragStat& rStat) override;
475 virtual void BrkCreate(SdrDragStat& rStat) override;
476 virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
477 virtual PointerStyle GetCreatePointer() const override;
479 virtual void NbcMove(const Size& rSiz) override;
480 virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
481 virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
482 virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
483 virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
485 virtual bool HasTextEdit() const override;
486 // returns true if TextEditMode started
487 virtual bool BegTextEdit(SdrOutliner& rOutl);
488 virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const;
489 virtual void EndTextEdit(SdrOutliner& rOutl);
490 virtual EEAnchorMode GetOutlinerViewAnchorMode() const;
492 virtual void NbcSetOutlinerParaObject(std::unique_ptr<OutlinerParaObject> pTextObject) override;
493 void NbcSetOutlinerParaObjectForText( std::unique_ptr<OutlinerParaObject> pTextObject, SdrText* pText );
494 virtual OutlinerParaObject* GetOutlinerParaObject() const override;
495 bool CanCreateEditOutlinerParaObject() const;
496 std::unique_ptr<OutlinerParaObject> CreateEditOutlinerParaObject() const;
498 virtual void NbcReformatText() override;
500 virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
501 bool bEdit, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, OUString& rRet) const;
503 virtual SdrObjectUniquePtr 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.
516 @param rOutl
517 The Outliner to setup.
519 @param rPaintRect
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.
530 @param rOutl
531 The Outliner to update.
533 @param rPaintRect
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
566 // given vector
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);
576 // #i8824#
577 // Set single item at the local ItemSet. *Does not use* AllowItemChange(),
578 // ItemChange(), PostItemChange() and ItemSetChanged() calls.
579 void SetObjectItemNoBroadcast(const SfxPoolItem& rItem);
580 double GetCameraZRotation() const;
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: */