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 #pragma once
21 
22 #include <svx/itextprovider.hxx>
23 #include <svx/svdoattr.hxx>
24 #include <svx/sdtaitm.hxx>
25 #include <svx/sdtakitm.hxx>
26 #include <svx/sdtaditm.hxx>
27 #include <svx/svdtrans.hxx>
28 #include <tools/datetime.hxx>
29 #include <svl/style.hxx>
30 #include <svx/svdtext.hxx>
31 #include <svx/svxdllapi.h>
33 #include <memory>
34 #include <vector>
35 
36 #include <com/sun/star/drawing/TextFitToSizeType.hpp>
37 
38 // forward declarations
39 
40 class OutlinerParaObject;
41 class OverflowingText;
42 class SdrOutliner;
43 class SdrPathObj;
44 class SdrTextObj;
45 class SdrTextObjTest;
46 class SvxFieldItem;
47 class ImpSdrObjTextLink;
48 class EditStatus;
49 class TextChain;
50 class TextChainFlow;
51 
52 enum class EEAnchorMode;
53 enum class EETextFormat;
54 
55 namespace sdr::properties {
56  class TextProperties;
57 }
58 
59 namespace drawinglayer::primitive2d {
60  class SdrContourTextPrimitive2D;
61  class SdrPathTextPrimitive2D;
62  class SdrBlockTextPrimitive2D;
63  class SdrAutoFitTextPrimitive2D;
64  class SdrStretchTextPrimitive2D;
65  class SdrChainedTextPrimitive2D;
66 }
67 
68 namespace drawinglayer::animation {
69  class AnimationEntryList;
70 }
71 
72 namespace drawinglayer::geometry {
73  class ViewInformation2D;
74 }
75 
76 namespace sdr::table {
77  class Cell;
78  class SdrTableRtfExporter;
79  class SdrTableRTFParser;
80 }
81 
82 
83 // Defines
84 constexpr const sal_uInt16 SDRUSERDATA_OBJTEXTLINK = 1;
85 
86 
87 // helper class SdrTextObjGeoData
89 {
90 public:
93 };
94 
95 
96 // helper class ImpSdrObjTextLinkUserData
98 {
99  friend class SdrTextObj;
100  friend class ImpSdrObjTextLink;
101 
102  OUString maFileName; // name of the referenced document
103  OUString maFilterName; // a filter, if need be
104  DateTime maFileDate0; // avoiding unnecessary reload
106  rtl_TextEncoding meCharSet;
107 
108 public:
110  virtual ~ImpSdrObjTextLinkUserData() override;
111 
112  virtual std::unique_ptr<SdrObjUserData> Clone(SdrObject* pObj1) const override;
113 };
114 
115 namespace sdr::properties
116 {
117  class CustomShapeProperties;
118  class CellProperties;
119 }
120 
121 // SdrTextObj
122 
123 typedef std::unique_ptr<SdrPathObj, SdrObjectFreeOp> SdrPathObjUniquePtr;
124 
126 {
127 private:
128  // Cell needs access to ImpGetDrawOutliner();
129  friend class sdr::table::Cell;
132  friend class TextChain;
133  friend class TextChainFlow;
134  friend class EditingTextChainFlow;
135 
136  // CustomShapeproperties need to access the "bTextFrame" member:
138 
139 protected:
140  virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
141  virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
142 
143 private:
144  // This method is only allowed for sdr::properties::TextProperties
146  {
147  return mpEditingOutliner;
148  }
149 
150  // to allow sdr::properties::TextProperties access to SetPortionInfoChecked()
151  // and GetTextEditOutliner()
154 
155  friend class ImpSdrObjTextLink;
157  friend class SdrPowerPointImport; // for PowerPointImport
158  friend class SdrExchangeView; // for ImpGetDrawOutliner
159  friend class SdrView; // for ImpGetDrawOutliner
160  friend class SdrObjEditView; // for TextEdit
161  friend class SdrMeasureObj; // for ImpGetDrawOutliner
162  friend class SvxMSDffManager; // for ImpGetDrawOutliner
163  friend class SdrObjCustomShape; // for ImpGetDrawOutliner
164  friend class SdrText; // for ImpGetDrawOutliner
165 
166 protected:
167  // The "aRect" is also the rect of RectObj and CircObj.
168  // When bTextFrame=sal_True the text will be formatted into this rect
169  // When bTextFrame=sal_False the text will be centered around its middle
171 
172  // The GeoStat contains the rotation and shear angles
174 
175  // this is the active text
176  std::unique_ptr<SdrText> mpText;
177 
178  // This contains the dimensions of the text
180 
181  // an Outliner*, so that
182  // 1. the TextObj won't be edited simultaneously by multiple views, and
183  // 2. when streaming while editing Flush() can be done
185 
186  // Possible values for eTextKind are:
187  // OBJ_TEXT regular text frame
188  // OBJ_TITLETEXT TitleText for presentations
189  // OBJ_OUTLINETEXT OutlineText for presentations
190  // eTextKind only has meaning when bTextFrame=sal_True, since otherwise
191  // we're dealing with a labeled graphical object
193 
194  // For text editing in SW Header/Footer it is necessary to be
195  // able to set an offset for the text edit to allow text editing at the
196  // position of the virtual object. This offset is used when setting up
197  // and maintaining the OutlinerView.
199 
200  virtual SdrObjectUniquePtr getFullDragClone() const override;
201 
202 
203 public:
204  const Point& GetTextEditOffset() const { return maTextEditOffset; }
205  void SetTextEditOffset(const Point& rNew) { maTextEditOffset = rNew; }
206 
207 protected:
208  bool mbIsUnchainableClone = false;
209 
210  // the successor in a chain
211  SdrTextObj* mpNextInChain = nullptr;
212  SdrTextObj* mpPrevInChain = nullptr;
213 
214  // For labeled graphical objects bTextFrame is FALSE. The block of text
215  // will then be centered horizontally and vertically on aRect.
216  // For bTextFalse=sal_True the text will be formatted into aRect.
217  // The actual text frame is realized by an SdrRectObj with
218  // bTextFrame=sal_True.
219  bool mbTextFrame : 1;
220  bool mbNoShear : 1; // disable shearing (->graphic+Ole+TextFrame)
221  bool mbTextSizeDirty : 1;
222 
223  bool mbInEditMode : 1; // Is this text object in edit mode?
224 
225  // For objects with free size (flow text). The flag is set by the
226  // application on create. If the object width is later resized,
227  // AutoGrowWidth will be disabled (set to sal_False). This flag will
228  // then also be set to sal_False, so that the object behaves like a
229  // normal text object.
230  // Width resize can result from:
231  // - Interactive Resize in single or multiple selections
232  // - position/size dialog
233  bool mbDisableAutoWidthOnDragging : 1;
234 
235  // Flag for allowing text animation. Default is sal_true.
236  bool mbTextAnimationAllowed : 1;
237 
238  // flag for preventing recursive onEditOutlinerStatusEvent calls
239  bool mbInDownScale : 1;
240 
241  SdrOutliner& ImpGetDrawOutliner() const;
242 
243 private:
244  // #101029#: Extracted from ImpGetDrawOutliner()
245  SVX_DLLPRIVATE void ImpInitDrawOutliner( SdrOutliner& rOutl ) const;
246  // #101029#: Extracted from Paint()
247  SVX_DLLPRIVATE void ImpSetupDrawOutlinerForPaint( bool bContourFrame,
248  SdrOutliner& rOutliner,
249  tools::Rectangle& rTextRect,
250  tools::Rectangle& rAnchorRect,
251  tools::Rectangle& rPaintRect,
252  Fraction& aFitXCorrection ) const;
253  void ImpAutoFitText( SdrOutliner& rOutliner ) const;
254  void ImpAutoFitText( SdrOutliner& rOutliner, const Size& rShapeSize, bool bIsVerticalWriting ) const;
255  SVX_DLLPRIVATE SdrObjectUniquePtr ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const;
256  SVX_DLLPRIVATE void ImpRegisterLink();
257  SVX_DLLPRIVATE void ImpDeregisterLink();
258  SVX_DLLPRIVATE ImpSdrObjTextLinkUserData* GetLinkUserData() const;
259 
261  static void AppendFamilyToStyleName(OUString& styleName, SfxStyleFamily family);
262 
264  static SfxStyleFamily ReadFamilyFromStyleName(const OUString& styleName);
265 
266 protected:
267  bool ImpCanConvTextToCurve() const;
268  SdrPathObjUniquePtr ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, bool bClosed, bool bBezier) const;
269  SdrObjectUniquePtr ImpConvertAddText(SdrObjectUniquePtr pObj, bool bBezier) const;
270  void ImpSetTextStyleSheetListeners();
271  static void ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXCorrection);
272  static void ImpJustifyRect(tools::Rectangle& rRect);
273  void ImpCheckShear();
274  tools::Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const;
275  void ImpSetTextEditParams() const;
276  void SetTextSizeDirty() { mbTextSizeDirty = true; }
277 
278  // rAnchorRect is InOut-Parameter!
279  void ImpSetContourPolygon( SdrOutliner& rOutliner, tools::Rectangle const & rAnchorRect, bool bLineWidth ) const;
280 
281  virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
282  virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
283  virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override;
284  void NbcSetEckenradius(tools::Long nRad);
285 
286  // #115391# new method for SdrObjCustomShape and SdrTextObj to correctly handle and set
287  // SdrTextMinFrameWidthItem and SdrTextMinFrameHeightItem based on all settings, necessities
288  // and object sizes
289  virtual void AdaptTextMinSize();
290 
291  // constructors for labeled graphical objects
292  SdrTextObj(SdrModel& rSdrModel);
293  SdrTextObj(
294  SdrModel& rSdrModel,
295  const tools::Rectangle& rNewRect);
296 
297  // constructors for text frames
298  SdrTextObj(
299  SdrModel& rSdrModel,
300  SdrObjKind eNewTextKind);
301  SdrTextObj(
302  SdrModel& rSdrModel,
303  SdrObjKind eNewTextKind,
304  const tools::Rectangle& rNewRect);
305 
306  // copy constructor
307  SdrTextObj(SdrModel& rSdrModel, SdrTextObj const & rSource);
308 
309  // protected destructor
310  virtual ~SdrTextObj() override;
311 
312 public:
313 
314  bool IsInEditMode() const { return mbInEditMode; }
315 
316  // Currently ASCII and RTF are supported and the differentiation is done
317  // internally.
318  // rFilterName has no meaning and must be empty
319  // Normally the application only has to call SetTextLink() - the
320  // remainder is automatic (SfxLinkManager).
321  // The LoadText() method can also be used to load a file into a text
322  // object (without linking.)
323  // TextLinks can't be edited (if needed later could be ReadOnly).
324  // Setting attributes can only be done on the text frame.
325  void SetTextLink(const OUString& rFileName, const OUString& rFilterName);
326  void ReleaseTextLink();
327  bool IsLinkedText() const { return m_pPlusData != nullptr && GetLinkUserData() != nullptr; }
328  bool ReloadLinkedText(bool bForceLoad);
329  bool LoadText(const OUString& rFileName, rtl_TextEncoding eCharSet);
330 
331  virtual bool AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHgt = true, bool bWdt = true) const;
332  virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true);
333  virtual bool AdjustTextFrameWidthAndHeight();
334  bool IsTextFrame() const { return mbTextFrame; }
335  bool IsOutlText() const { return mbTextFrame && (meTextKind==OBJ_OUTLINETEXT || meTextKind==OBJ_TITLETEXT); }
337  bool IsAutoFit() const;
339  bool IsFitToSize() const;
340 
341  // Chaining
342  SdrTextObj *GetNextLinkInChain() const;
343  void SetNextLinkInChain(SdrTextObj *);
344  SdrTextObj *GetPrevLinkInChain() const;
345  bool IsChainable() const;
346  bool GetPreventChainable() const;
347  TextChain *GetTextChain() const;
348 
349  SdrObjKind GetTextKind() const { return meTextKind; }
350 
351  // #i121917#
352  virtual bool HasText() const override;
353 
354  bool IsTextEditActive() const { return mpEditingOutliner != nullptr; }
355 
357  virtual SdrText* getActiveText() const;
358 
360  virtual SdrText* getText( sal_Int32 nIndex ) const override;
361 
363  virtual sal_Int32 getTextCount() const override;
364 
366  virtual bool IsReallyEdited() const;
367 
369  virtual void setActiveText( sal_Int32 nIndex );
370 
372  virtual sal_Int32 CheckTextHit(const Point& rPnt) const;
373 
374  void SetDisableAutoWidthOnDragging(bool bOn) { mbDisableAutoWidthOnDragging=bOn; }
375  void NbcSetText(const OUString& rStr);
376  void SetText(const OUString& rStr);
377  void NbcSetText(SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat);
378  void SetText(SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat);
379 
380  // FitToSize and Fontwork are not taken into account in GetTextSize()!
381  virtual const Size& GetTextSize() const;
382  void FitFrameToTextSize();
383  sal_uInt16 GetFontScaleY() const;
384 
385  // Simultaneously sets the text into the Outliner (possibly
386  // the one of the EditOutliner) and sets the PaperSize.
387  virtual void TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText,
388  tools::Rectangle* pAnchorRect, bool bLineWidth = true ) const;
389  // Takes writing direction into account when adjusting the rectangle
390  void AdjustRectToTextDistance(tools::Rectangle& rAnchorRect) const;
391  virtual void TakeTextAnchorRect(::tools::Rectangle& rAnchorRect) const;
392  const GeoStat& GetGeoStat() const { return maGeo; }
393 
394  // get corner radius
395  tools::Long GetEckenradius() const;
396  virtual bool IsAutoGrowHeight() const;
397  tools::Long GetMinTextFrameHeight() const;
398  tools::Long GetMaxTextFrameHeight() const;
399  virtual bool IsAutoGrowWidth() const;
400  tools::Long GetMinTextFrameWidth() const;
401  tools::Long GetMaxTextFrameWidth() const;
402 
403  css::drawing::TextFitToSizeType GetFitToSize() const;
404  const tools::Rectangle &GetGeoRect() const;
405 
406  // check if it's a TextFontwork
407  virtual bool IsFontwork() const;
408 
409  // should the Fontwork contour be hidden?
410  bool IsHideContour() const;
411 
412  // text flow within contour
413  bool IsContourTextFrame() const;
414 
415  SdrTextHorzAdjust GetTextHorizontalAdjust(const SfxItemSet& rSet) const;
416  SdrTextHorzAdjust GetTextHorizontalAdjust() const;
417 
420 
422  tools::Long GetTextLeftDistance() const;
424  tools::Long GetTextRightDistance() const;
426  tools::Long GetTextUpperDistance() const;
428  tools::Long GetTextLowerDistance() const;
429  SdrTextAniKind GetTextAniKind() const;
430  SdrTextAniDirection GetTextAniDirection() const;
431 
432  bool HasTextColumnsNumber() const;
433  sal_Int16 GetTextColumnsNumber() const;
434  void SetTextColumnsNumber(sal_Int16 nColumns);
435  bool HasTextColumnsSpacing() const;
436  sal_Int32 GetTextColumnsSpacing() const;
437  void SetTextColumnsSpacing(sal_Int32 nSpacing);
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 SdrObjKind 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  virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
451  virtual basegfx::B2DPolyPolygon TakeContour() const override;
452  virtual void RecalcSnapRect() override;
453  virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
454  virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
455  virtual const tools::Rectangle& GetLogicRect() const override;
456  virtual Degree100 GetRotateAngle() const override;
457  virtual Degree100 GetShearAngle(bool bVertical = false) const override;
458 
459  virtual sal_uInt32 GetSnapPointCount() const override;
460  virtual Point GetSnapPoint(sal_uInt32 i) const override;
461 
462  virtual sal_uInt32 GetHdlCount() const override;
463  virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
464 
465  // special drag methods
466  virtual bool hasSpecialDrag() const override;
467  virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
468  virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override;
469 
470  virtual bool BegCreate(SdrDragStat& rStat) override;
471  virtual bool MovCreate(SdrDragStat& rStat) override;
472  virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
473  virtual bool BckCreate(SdrDragStat& rStat) override;
474  virtual void BrkCreate(SdrDragStat& rStat) override;
475  virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
476  virtual PointerStyle GetCreatePointer() const override;
477 
478  virtual void NbcMove(const Size& rSiz) override;
479  virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
480  virtual void NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
481  virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
482  virtual void NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
483 
484  virtual bool HasTextEdit() const override;
485  // returns true if TextEditMode started
486  virtual bool BegTextEdit(SdrOutliner& rOutl);
487  virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const;
488  virtual void EndTextEdit(SdrOutliner& rOutl);
489  virtual EEAnchorMode GetOutlinerViewAnchorMode() const;
490 
491  virtual void NbcSetOutlinerParaObject(std::optional<OutlinerParaObject> pTextObject) override;
492  void NbcSetOutlinerParaObjectForText( std::optional<OutlinerParaObject> pTextObject, SdrText* pText );
493  virtual OutlinerParaObject* GetOutlinerParaObject() const override;
494  bool CanCreateEditOutlinerParaObject() const;
495  std::optional<OutlinerParaObject> CreateEditOutlinerParaObject() const;
496 
497  virtual void NbcReformatText() override;
498 
499  virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
500  bool bEdit, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor, OUString& rRet) const;
501 
502  virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
503 
504  void SetTextEditOutliner(SdrOutliner* pOutl) { mpEditingOutliner = 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  bool IsTopToBottom() const;
541 
543  virtual void onEditOutlinerStatusEvent( EditStatus* pEditStatus );
544 
546  void onChainingEvent();
547 
548 
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.
553 
554 
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;
558 
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;
563 
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 );
568 
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);
572 
573  // Access to TextAnimationAllowed flag
574  void SetTextAnimationAllowed(bool bNew);
575 
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;
581 
582 public:
583 
584  // text primitive decomposition helpers
585  void impDecomposeContourTextPrimitive(
587  const drawinglayer::primitive2d::SdrContourTextPrimitive2D& rSdrContourTextPrimitive,
588  const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
589  void impDecomposePathTextPrimitive(
591  const drawinglayer::primitive2d::SdrPathTextPrimitive2D& rSdrPathTextPrimitive,
592  const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
593  void impDecomposeBlockTextPrimitive(
595  const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive,
596  const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
597  void impDecomposeAutoFitTextPrimitive(
599  const drawinglayer::primitive2d::SdrAutoFitTextPrimitive2D& rSdrAutofitTextPrimitive,
600  const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
601  void impDecomposeStretchTextPrimitive(
603  const drawinglayer::primitive2d::SdrStretchTextPrimitive2D& rSdrStretchTextPrimitive,
604  const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
605  void impDecomposeChainedTextPrimitive(
607  const drawinglayer::primitive2d::SdrChainedTextPrimitive2D& rSdrChainedTextPrimitive,
608  const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
609  void impHandleChainingEventsDuringDecomposition(SdrOutliner &rOutliner) const;
610 
611  // timing generators
612  void impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList) const;
613  void impGetScrollTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList, double fFrameLength, double fTextLength) const;
614 
615  // Direct decomposer for text visualization when you already have a prepared
616  // Outliner containing all the needed information
617  static void impDecomposeBlockTextPrimitiveDirect(
619  SdrOutliner& rOutliner,
620  const basegfx::B2DHomMatrix& rNewTransformA,
621  const basegfx::B2DHomMatrix& rNewTransformB,
622  const basegfx::B2DRange& rClipRange);
623 
628  static bool HasTextImpl( SdrOutliner const * pOutliner );
629 
630  friend class ::SdrTextObjTest;
631 };
632 
633 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool HasTextEdit() const
Definition: svdobj.cxx:1757
virtual bool BckCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1411
User data of a drawing object, e.g.
Definition: svdobj.hxx:151
virtual basegfx::B2DPolyPolygon TakeXorPoly() const
The Xor-Polygon is required by the View to drag the object.
Definition: svdobj.cxx:1126
virtual std::unique_ptr< 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:1899
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const
Definition: svdobj.cxx:664
virtual bool BegCreate(SdrDragStat &rStat)
Every object must be able to create itself interactively.
Definition: svdobj.cxx:1380
Point maTextEditOffset
Definition: svdotext.hxx:198
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const
Definition: svdobj.cxx:1367
TextVerticalAdjust GetTextVerticalAdjust(sal_Int32 nToken)
virtual void handlePageChange(SdrPage *pOldPage, SdrPage *pNewPage)
Definition: svdobj.cxx:524
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact)
Definition: svdobj.cxx:1439
void SetTextEditOffset(const Point &rNew)
Definition: svdotext.hxx:205
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs)
Definition: svdobj.cxx:1469
bool IsLinkedText() const
Definition: svdotext.hxx:327
SdrTextHorzAdjust
Definition: sdtaitm.hxx:53
tools::Rectangle maRect
Definition: svdotext.hxx:91
long Long
virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const
Definition: svdobj.cxx:2615
bool IsTextFrame() const
Definition: svdotext.hxx:334
std::unique_ptr< SdrText > mpText
Definition: svdotext.hxx:176
virtual void NbcShear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1528
virtual bool HasText() const
Definition: svdobj.cxx:3075
bool IsInEditMode() const
Definition: svdotext.hxx:314
void SetDisableAutoWidthOnDragging(bool bOn)
Definition: svdotext.hxx:374
virtual bool hasSpecialDrag() const
The standard transformations (Move,Resize,Rotate,Mirror,Shear) are taken over by the View (TakeXorPol...
Definition: svdobj.cxx:1328
virtual OUString TakeObjNameSingul() const
Definition: svdobj.cxx:1082
tools::Rectangle ImpDragCalcRect(const SdrDragStat &rDrag) const
Definition: svdobj.cxx:1258
virtual void AddToHdlList(SdrHdlList &rHdlList) const
Definition: svdobj.cxx:1228
virtual SdrObjKind GetObjIdentifier() const
Definition: svdobj.cxx:659
bool IsTextEditActive() const
Definition: svdotext.hxx:354
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:173
SdrObjKind
Definition: svdobjkind.hxx:24
std::unique_ptr< SdrPathObj, SdrObjectFreeOp > SdrPathObjUniquePtr
Definition: svdotext.hxx:123
SdrTextAniKind
Animation type for text frame.
Definition: sdtakitm.hxx:29
EETextFormat
Provides information about various ZObject properties.
Definition: svdobj.hxx:195
virtual void BrkCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1407
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd)
Definition: svdobj.cxx:1399
virtual Point GetSnapPoint(sal_uInt32 i) const
Definition: svdobj.cxx:1724
rtl_TextEncoding meCharSet
Definition: svdotext.hxx:106
void SetTextSizeDirty()
Definition: svdotext.hxx:276
The transformation of a rectangle into a polygon, by using angle parameters from GeoStat.
Definition: svdtrans.hxx:214
tools::Rectangle maRect
Definition: svdotext.hxx:170
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:1662
const Point & GetTextEditOffset() const
Definition: svdotext.hxx:204
SfxStyleFamily
const GeoStat & GetGeoStat() const
Definition: svdotext.hxx:392
void SetTextEditOutliner(SdrOutliner *pOutl)
Definition: svdotext.hxx:504
SVX_DLLPRIVATE SdrOutliner * GetTextEditOutliner() const
Definition: svdotext.hxx:145
SdrObjKind meTextKind
Definition: svdotext.hxx:192
virtual bool MovCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1390
virtual void RestoreGeoData(const SdrObjGeoData &rGeo)
Definition: svdobj.cxx:1927
Size maTextSize
Definition: svdotext.hxx:179
SdrOutliner * mpEditingOutliner
Definition: svdotext.hxx:184
virtual void NbcMirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1497
virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix &rMatrix, const basegfx::B2DPolyPolygon &rPolyPolygon)
Definition: svdobj.cxx:3000
virtual Degree100 GetShearAngle(bool bVertical=false) const
Definition: svdobj.cxx:1714
virtual void SaveGeoData(SdrObjGeoData &rGeo) const
Definition: svdobj.cxx:1904
virtual basegfx::B2DPolyPolygon TakeContour() const
contour for TextToContour
Definition: svdobj.cxx:1135
virtual sal_uInt32 GetHdlCount() const
Via GetHdlCount the number of Handles can be retrieved.
Definition: svdobj.cxx:1223
virtual std::unique_ptr< sdr::properties::BaseProperties > CreateObjectSpecificProperties() override
Definition: svdoattr.cxx:32
Abstract DrawObject.
Definition: svdobj.hxx:259
void ForceOutlinerParaObject(OutlinerMode nOutlMode)
Definition: svdtext.cxx:118
virtual void NbcReformatText()
Definition: svdobj.cxx:1842
virtual void NbcSetOutlinerParaObject(std::optional< OutlinerParaObject > pTextObject)
Definition: svdobj.cxx:1833
virtual std::unique_ptr< sdr::contact::ViewContact > CreateObjectSpecificViewContact()
Definition: svdobj.cxx:246
virtual void NbcSetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1671
virtual void NbcSetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1681
GeoStat maGeo
Definition: svdotext.hxx:173
virtual void NbcMove(const Size &rSiz)
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
Definition: svdobj.cxx:1433
virtual PointerStyle GetCreatePointer() const
get the cursor/pointer that signals creating this object
Definition: svdobj.cxx:1427
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
virtual ~ImpSdrObjTextLinkUserData() override
Definition: svdotxln.cxx:106
virtual SdrObject * CloneSdrObject(SdrModel &rTargetModel) const
Definition: svdobj.cxx:1077
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
Definition: svdobj.hxx:97
virtual SdrObjectUniquePtr getFullDragClone() const
Definition: svdobj.cxx:1338
SdrTextAniDirection
Definition: sdtaditm.hxx:29
PointerStyle
text object
Definition: svdobjkind.hxx:43
virtual OUString TakeObjNamePlural() const
Definition: svdobj.cxx:1092
bool IsOutlText() const
Definition: svdotext.hxx:335
virtual std::unique_ptr< SdrObjUserData > Clone(SdrObject *pObj1) const override
Definition: svdotxln.cxx:110
EEAnchorMode
virtual bool applySpecialDrag(SdrDragStat &rDrag)
Definition: svdobj.cxx:1355
virtual Degree100 GetRotateAngle() const
Definition: svdobj.cxx:1709
virtual const tools::Rectangle & GetLogicRect() const
Definition: svdobj.cxx:1676
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:365
SdrObjKind GetTextKind() const
Definition: svdotext.hxx:349
virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix &rMatrix, basegfx::B2DPolyPolygon &rPolyPolygon) const
Definition: svdobj.cxx:2973
SdrCreateCmd
Definition: svdtypes.hxx:26
TitleText, special text object for StarDraw.
Definition: svdobjkind.hxx:44
#define SVX_DLLPRIVATE
Definition: svxdllapi.h:30
float GetTextSize(std::u16string_view sValue)
virtual OutlinerParaObject * GetOutlinerParaObject() const
Definition: svdobj.cxx:1837
virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat &rDrag) const
Polygon dragged by the user when creating the object.
Definition: svdobj.cxx:1416
constexpr const sal_uInt16 SDRUSERDATA_OBJTEXTLINK
Definition: svdotext.hxx:84
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:1719
virtual SdrText * getText(sal_Int32 nIndex) const =0
Return the nth available text.
tools::SvRef< ImpSdrObjTextLink > mpLink
Definition: svdotext.hxx:105