LibreOffice Module svx (master)  1
svdotext.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_SVX_SVDOTEXT_HXX
21 #define INCLUDED_SVX_SVDOTEXT_HXX
22 
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>
34 #include <memory>
35 #include <vector>
36 
37 #include <com/sun/star/drawing/TextFitToSizeType.hpp>
38 
39 // forward declarations
40 
41 
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;
53 
54 enum class EEAnchorMode;
55 enum class EETextFormat;
56 
57 namespace sdr { namespace properties {
58  class TextProperties;
59 }}
60 
61 namespace drawinglayer { namespace primitive2d {
62  class SdrContourTextPrimitive2D;
63  class SdrPathTextPrimitive2D;
64  class SdrBlockTextPrimitive2D;
65  class SdrAutoFitTextPrimitive2D;
66  class SdrStretchTextPrimitive2D;
67  class SdrChainedTextPrimitive2D;
68 }}
69 
70 namespace drawinglayer { namespace animation {
71  class AnimationEntryList;
72 }}
73 
74 namespace drawinglayer { namespace geometry {
75  class ViewInformation2D;
76 }}
77 
78 namespace sdr { namespace table {
79  class Cell;
80  class SdrTableRtfExporter;
81  class SdrTableRTFParser;
82 }}
83 
84 
85 // Defines
86 
87 
88 #define SDRUSERDATA_OBJTEXTLINK (1)
89 
90 
91 // helper class SdrTextObjGeoData
92 
93 
95 {
96 public:
99 };
100 
101 
102 // helper class ImpSdrObjTextLinkUserData
103 
104 
106 {
107  friend class SdrTextObj;
108  friend class ImpSdrObjTextLink;
109 
110  OUString aFileName; // name of the referenced document
111  OUString aFilterName; // a filter, if need be
112  DateTime aFileDate0; // avoiding unnecessary reload
115  rtl_TextEncoding eCharSet;
116 
117 public:
119  virtual ~ImpSdrObjTextLinkUserData() override;
120 
121  virtual std::unique_ptr<SdrObjUserData> Clone(SdrObject* pObj1) const override;
122 };
123 
124 namespace sdr
125 {
126  namespace properties
127  {
128  class CustomShapeProperties;
129  class CellProperties;
130  } // end of namespace properties
131 } // end of namespace sdr
132 
133 // SdrTextObj
134 
135 typedef std::unique_ptr<SdrPathObj, SdrObjectFreeOp> SdrPathObjUniquePtr;
136 
138 {
139 private:
140  // Cell needs access to ImpGetDrawOutliner();
141  friend class sdr::table::Cell;
144  friend class TextChain;
145  friend class TextChainFlow;
146  friend class EditingTextChainFlow;
147 
148  // CustomShapeproperties need to access the "bTextFrame" member:
150 
151 protected:
152  virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
153  virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
154 
155 private:
156  // This method is only allowed for sdr::properties::TextProperties
158  {
159  return pEdtOutl;
160  }
161 
162  // to allow sdr::properties::TextProperties access to SetPortionInfoChecked()
163  // and GetTextEditOutliner()
166 
167  friend class ImpSdrObjTextLink;
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
177 
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
183 
184  // The GeoStat contains the rotation and shear angles
186 
187  // this is the active text
188  std::unique_ptr<SdrText> mpText;
189 
190  // This contains the dimensions of the text
192 
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
197 
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
205 
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.
211 
212  virtual SdrObjectUniquePtr getFullDragClone() const override;
213 
214 
215 public:
216  const Point& GetTextEditOffset() const { return maTextEditOffset; }
217  void SetTextEditOffset(const Point& rNew) { maTextEditOffset = rNew; }
218 
219 protected:
220  bool mbIsUnchainableClone = false;
221 
222  // the successor in a chain
223  SdrTextObj *mpNextInChain = nullptr;
224  SdrTextObj *mpPrevInChain = nullptr;
225 
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;
234 
235  bool mbInEditMode : 1; // Is this text object in edit mode?
236 
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;
246 
247  // Flag for allowing text animation. Default is sal_true.
248  bool mbTextAnimationAllowed : 1;
249 
250  // flag for preventing recursive onEditOutlinerStatusEvent calls
251  bool mbInDownScale : 1;
252 
253  SdrOutliner& ImpGetDrawOutliner() const;
254 
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  static void ImpAutoFitText( SdrOutliner& rOutliner, const Size& rShapeSize, bool bIsVerticalWriting );
267  SVX_DLLPRIVATE SdrObjectUniquePtr ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const;
268  SVX_DLLPRIVATE void ImpRegisterLink();
269  SVX_DLLPRIVATE void ImpDeregisterLink();
270  SVX_DLLPRIVATE ImpSdrObjTextLinkUserData* GetLinkUserData() const;
271 
273  static void AppendFamilyToStyleName(OUString& styleName, SfxStyleFamily family);
274 
276  static SfxStyleFamily ReadFamilyFromStyleName(const OUString& styleName);
277 
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; }
289 
290  // rAnchorRect is InOut-Parameter!
291  void ImpSetContourPolygon( SdrOutliner& rOutliner, tools::Rectangle const & rAnchorRect, bool bLineWidth ) const;
292 
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);
297 
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();
302 
303  // constructors for labeled graphical objects
304  SdrTextObj(SdrModel& rSdrModel);
305  SdrTextObj(
306  SdrModel& rSdrModel,
307  const tools::Rectangle& rNewRect);
308 
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);
317 
318  // protected destructor
319  virtual ~SdrTextObj() override;
320 
321 public:
322 
323  bool IsInEditMode() const { return mbInEditMode; }
324 
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);
339 
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); }
346  bool IsAutoFit() const;
348  bool IsFitToSize() const;
349 
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;
357 
358  SdrObjKind GetTextKind() const { return eTextKind; }
359 
360  // #i121917#
361  virtual bool HasText() const override;
362 
363  bool IsTextEditActive() const { return pEdtOutl != nullptr; }
364 
366  virtual SdrText* getActiveText() const;
367 
369  virtual SdrText* getText( sal_Int32 nIndex ) const override;
370 
372  virtual sal_Int32 getTextCount() const override;
373 
375  virtual bool IsReallyEdited() const;
376 
378  virtual void setActiveText( sal_Int32 nIndex );
379 
381  virtual sal_Int32 CheckTextHit(const Point& rPnt) const;
382 
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);
388 
389  // FitToSize and Fontwork are not taken into account in GetTextSize()!
390  virtual const Size& GetTextSize() const;
391  void FitFrameToTextSize();
392  double GetFontScaleY() const;
393 
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; }
400 
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;
409 
410  css::drawing::TextFitToSizeType GetFitToSize() const;
411  const tools::Rectangle &GetGeoRect() const;
412 
413  // check if it's a TextFontwork
414  virtual bool IsFontwork() const;
415 
416  // should the Fontwork contour be hidden?
417  bool IsHideContour() const;
418 
419  // text flow within contour
420  bool IsContourTextFrame() const;
421 
422  SdrTextHorzAdjust GetTextHorizontalAdjust(const SfxItemSet& rSet) const;
423  SdrTextHorzAdjust GetTextHorizontalAdjust() const;
424 
427 
429  long GetTextLeftDistance() const;
431  long GetTextRightDistance() const;
433  long GetTextUpperDistance() const;
435  long GetTextLowerDistance() const;
436  SdrTextAniKind GetTextAniKind() const;
437  SdrTextAniDirection GetTextAniDirection() const;
438 
439  // react on model/page change
440  virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
441 
442  virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
443  virtual sal_uInt16 GetObjIdentifier() const override;
444 
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;
459 
460  virtual sal_uInt32 GetSnapPointCount() const override;
461  virtual Point GetSnapPoint(sal_uInt32 i) const override;
462 
463  virtual sal_uInt32 GetHdlCount() const override;
464  virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
465 
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;
470 
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;
478 
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;
484 
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;
491 
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  std::unique_ptr<OutlinerParaObject> GetEditOutlinerParaObject() const;
496 
497  virtual void NbcReformatText() override;
498 
499  virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
500  bool bEdit, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor, OUString& rRet) const;
501 
502  virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
503 
504  void SetTextEditOutliner(SdrOutliner* pOutl) { pEdtOutl=pOutl; }
505 
522  void SetupOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const;
523 
536  void UpdateOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const;
538  virtual bool IsVerticalWriting() const;
539  virtual void SetVerticalWriting(bool bVertical);
540 
542  virtual void onEditOutlinerStatusEvent( EditStatus* pEditStatus );
543 
545  void onChainingEvent();
546 
547 
548  // transformation interface for StarOfficeAPI. This implements support for
549  // homogen 3x3 matrices containing the transformation of the SdrObject. At the
550  // moment it contains a shearX, rotation and translation, but for setting all linear
551  // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
552 
553 
554  // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
555  // with the base geometry and returns TRUE. Otherwise it returns FALSE.
556  virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const override;
557 
558  // sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
559  // If it's an SdrPathObj it will use the provided geometry information. The Polygon has
560  // to use (0,0) as upper left and will be scaled to the given size in the matrix.
561  virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon) override;
562 
563  // #103836# iterates over the paragraphs of a given SdrObject and removes all
564  // hard set character attributes with the which ids contained in the
565  // given vector
566  void RemoveOutlinerCharacterAttribs( const std::vector<sal_uInt16>& rCharWhichIds );
567 
568  // Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a
569  // painting rectangle. Rotation is taken from the object.
570  GDIMetaFile* GetTextScrollMetaFileAndRectangle(tools::Rectangle& rScrollRectangle, tools::Rectangle& rPaintRectangle);
571 
572  // Access to TextAnimationAllowed flag
573  void SetTextAnimationAllowed(bool bNew);
574 
575  // #i8824#
576  // Set single item at the local ItemSet. *Does not use* AllowItemChange(),
577  // ItemChange(), PostItemChange() and ItemSetChanged() calls.
578  void SetObjectItemNoBroadcast(const SfxPoolItem& rItem);
579 
580 public:
581 
582  // text primitive decomposition helpers
583  void impDecomposeContourTextPrimitive(
585  const drawinglayer::primitive2d::SdrContourTextPrimitive2D& rSdrContourTextPrimitive,
586  const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
587  void impDecomposePathTextPrimitive(
589  const drawinglayer::primitive2d::SdrPathTextPrimitive2D& rSdrPathTextPrimitive,
590  const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
591  void impDecomposeBlockTextPrimitive(
593  const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive,
594  const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
595  void impDecomposeAutoFitTextPrimitive(
597  const drawinglayer::primitive2d::SdrAutoFitTextPrimitive2D& rSdrAutofitTextPrimitive,
598  const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
599  void impDecomposeStretchTextPrimitive(
601  const drawinglayer::primitive2d::SdrStretchTextPrimitive2D& rSdrStretchTextPrimitive,
602  const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
603  void impDecomposeChainedTextPrimitive(
605  const drawinglayer::primitive2d::SdrChainedTextPrimitive2D& rSdrChainedTextPrimitive,
606  const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
607  void impHandleChainingEventsDuringDecomposition(SdrOutliner &rOutliner) const;
608 
609  // timing generators
610  void impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList) const;
611  void impGetScrollTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList, double fFrameLength, double fTextLength) const;
612 
613  // Direct decomposer for text visualization when you already have a prepared
614  // Outliner containing all the needed information
615  static void impDecomposeBlockTextPrimitiveDirect(
617  SdrOutliner& rOutliner,
618  const basegfx::B2DHomMatrix& rNewTransformA,
619  const basegfx::B2DHomMatrix& rNewTransformB,
620  const basegfx::B2DRange& rClipRange);
621 
626  static bool HasTextImpl( SdrOutliner const * pOutliner );
627 
628  friend class ::SdrTextObjTest;
629 };
630 
631 
632 #endif // INCLUDED_SVX_SVDOTEXT_HXX
633 
634 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool HasTextEdit() const
Definition: svdobj.cxx:1715
virtual bool BckCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1379
User data of a drawing object, e.g.
Definition: svdobj.hxx:204
virtual basegfx::B2DPolyPolygon TakeXorPoly() const
The Xor-Polygon is required by the View to drag the object.
Definition: svdobj.cxx:1094
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const
Definition: svdobj.cxx:590
virtual bool BegCreate(SdrDragStat &rStat)
Every object must be able to create itself interactively.
Definition: svdobj.cxx:1348
Point maTextEditOffset
Definition: svdotext.hxx:210
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const
Definition: svdobj.cxx:1335
TextVerticalAdjust GetTextVerticalAdjust(sal_Int32 nToken)
virtual void handlePageChange(SdrPage *pOldPage, SdrPage *pNewPage)
Definition: svdobj.cxx:476
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact)
Definition: svdobj.cxx:1407
void SetTextEditOffset(const Point &rNew)
Definition: svdotext.hxx:217
GeoStat aGeo
Definition: svdotext.hxx:185
bool IsLinkedText() const
Definition: svdotext.hxx:336
SdrTextHorzAdjust
Definition: sdtaitm.hxx:53
virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const
Definition: svdobj.cxx:2552
SdrOutliner * pEdtOutl
Definition: svdotext.hxx:196
bool IsTextFrame() const
Definition: svdotext.hxx:343
std::unique_ptr< SdrText > mpText
Definition: svdotext.hxx:188
virtual bool HasText() const
Definition: svdobj.cxx:3011
bool IsInEditMode() const
Definition: svdotext.hxx:323
void SetDisableAutoWidthOnDragging(bool bOn)
Definition: svdotext.hxx:383
virtual bool hasSpecialDrag() const
The standard transformations (Move,Resize,Rotate,Mirror,Shear) are taken over by the View (TakeXorPol...
Definition: svdobj.cxx:1296
virtual OUString TakeObjNameSingul() const
Definition: svdobj.cxx:1045
tools::Rectangle ImpDragCalcRect(const SdrDragStat &rDrag) const
Definition: svdobj.cxx:1226
virtual void AddToHdlList(SdrHdlList &rHdlList) const
Definition: svdobj.cxx:1196
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28
bool IsTextEditActive() const
Definition: svdotext.hxx:363
virtual sal_Int32 getTextCount() const =0
Return the number of texts available for this object.
All geometrical data of an arbitrary object for use in undo/redo.
Definition: svdobj.hxx:226
std::unique_ptr< SdrPathObj, SdrObjectFreeOp > SdrPathObjUniquePtr
Definition: svdotext.hxx:135
SdrTextAniKind
Animation type for text frame.
Definition: sdtakitm.hxx:29
EETextFormat
Provides information about various ZObject properties.
Definition: svdobj.hxx:248
virtual void BrkCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1375
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd)
Definition: svdobj.cxx:1367
virtual Point GetSnapPoint(sal_uInt32 i) const
Definition: svdobj.cxx:1682
void SetTextSizeDirty()
Definition: svdotext.hxx:288
The transformation of a rectangle into a polygon, by using angle parameters from GeoStat.
Definition: svdtrans.hxx:214
tools::Rectangle maRect
Definition: svdotext.hxx:182
This interface provides access to text object(s) in an SdrObject.
virtual void RecalcSnapRect()
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
Definition: svdobj.cxx:1620
const Point & GetTextEditOffset() const
Definition: svdotext.hxx:216
SdrAttrObj & operator=(SdrAttrObj const &)=default
SfxStyleFamily
const GeoStat & GetGeoStat() const
Definition: svdotext.hxx:399
void SetTextEditOutliner(SdrOutliner *pOutl)
Definition: svdotext.hxx:504
SVX_DLLPRIVATE SdrOutliner * GetTextEditOutliner() const
Definition: svdotext.hxx:157
virtual void NbcRotate(const Point &rRef, long nAngle, double sn, double cs)
Definition: svdobj.cxx:1428
virtual bool MovCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1358
tools::Rectangle aRect
Definition: svdotext.hxx:97
virtual sal_uInt16 GetObjIdentifier() const
Definition: svdobj.cxx:585
virtual void NbcMirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1456
virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix &rMatrix, const basegfx::B2DPolyPolygon &rPolyPolygon)
Definition: svdobj.cxx:2936
virtual void SaveGeoData(SdrObjGeoData &rGeo) const
Definition: svdobj.cxx:1837
virtual basegfx::B2DPolyPolygon TakeContour() const
contour for TextToContour
Definition: svdobj.cxx:1103
virtual long GetShearAngle(bool bVertical=false) const
Definition: svdobj.cxx:1672
virtual sal_uInt32 GetHdlCount() const
Via GetHdlCount the number of Handles can be retrieved.
Definition: svdobj.cxx:1191
tools::SvRef< ImpSdrObjTextLink > pLink
Definition: svdotext.hxx:114
virtual std::unique_ptr< sdr::properties::BaseProperties > CreateObjectSpecificProperties() override
Definition: svdoattr.cxx:76
Abstract DrawObject.
Definition: svdobj.hxx:312
SdrObjKind eTextKind
Definition: svdotext.hxx:204
void ForceOutlinerParaObject(OutlinerMode nOutlMode)
Definition: svdtext.cxx:112
virtual void NbcShear(const Point &rRef, long nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1487
virtual void RestGeoData(const SdrObjGeoData &rGeo)
Definition: svdobj.cxx:1860
virtual void NbcReformatText()
Definition: svdobj.cxx:1775
rtl_TextEncoding eCharSet
Definition: svdotext.hxx:115
TitleText, special text object for StarDraw.
Definition: svdobj.hxx:135
virtual std::unique_ptr< sdr::contact::ViewContact > CreateObjectSpecificViewContact()
Definition: svdobj.cxx:266
virtual void NbcSetOutlinerParaObject(std::unique_ptr< OutlinerParaObject > pTextObject)
Definition: svdobj.cxx:1766
virtual SdrObjGeoData * NewGeoData() const
A derived class must override these 3 methods if it has own geometric data that must be saved for Und...
Definition: svdobj.cxx:1832
SdrObjKind
Definition: svdobj.hxx:116
virtual void NbcSetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1629
virtual void NbcSetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1639
virtual void NbcMove(const Size &rSiz)
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
Definition: svdobj.cxx:1401
virtual PointerStyle GetCreatePointer() const
get the cursor/pointer that signals creating this object
Definition: svdobj.cxx:1395
virtual ~ImpSdrObjTextLinkUserData() override
Definition: svdotxln.cxx:107
float GetTextSize(const OUString &sValue)
virtual SdrObject * CloneSdrObject(SdrModel &rTargetModel) const
Definition: svdobj.cxx:1001
Size aTextSize
Definition: svdotext.hxx:191
virtual long GetRotateAngle() const
Definition: svdobj.cxx:1667
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
Definition: svdobj.hxx:114
virtual SdrObjectUniquePtr getFullDragClone() const
Definition: svdobj.cxx:1306
SdrTextAniDirection
Definition: sdtaditm.hxx:29
PointerStyle
virtual OUString TakeObjNamePlural() const
Definition: svdobj.cxx:1060
bool IsOutlText() const
Definition: svdotext.hxx:344
virtual std::unique_ptr< SdrObjUserData > Clone(SdrObject *pObj1) const override
Definition: svdotxln.cxx:111
EEAnchorMode
virtual bool applySpecialDrag(SdrDragStat &rDrag)
Definition: svdobj.cxx:1323
virtual const tools::Rectangle & GetLogicRect() const
Definition: svdobj.cxx:1634
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:366
SdrObjKind GetTextKind() const
Definition: svdotext.hxx:358
virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix &rMatrix, basegfx::B2DPolyPolygon &rPolyPolygon) const
Definition: svdobj.cxx:2909
SdrCreateCmd
Definition: svdtypes.hxx:27
#define SVX_DLLPRIVATE
Definition: svxdllapi.h:30
virtual OutlinerParaObject * GetOutlinerParaObject() const
Definition: svdobj.cxx:1770
text object
Definition: svdobj.hxx:134
virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat &rDrag) const
Polygon dragged by the user when creating the object.
Definition: svdobj.cxx:1384
SdrTextVertAdjust
Definition: sdtaitm.hxx:29
virtual sal_uInt32 GetSnapPointCount() const
snap to special points of an Object (polygon points, center of circle)
Definition: svdobj.cxx:1677
virtual SdrText * getText(sal_Int32 nIndex) const =0
Return the nth available text.