1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 <svx/xtextit0.hxx>
29 #include <svx/svdtext.hxx>
31 #include <boost/shared_ptr.hpp>
32 #include <svx/svxdllapi.h>
33 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
34 #include <svx/svdpagv.hxx>
37 // Vorausdeklarationen
40 class OutlinerParaObject
;
44 class ImpSdrObjTextLink
;
47 namespace sdr
{ namespace properties
{
51 namespace drawinglayer
{ namespace primitive2d
{
52 class SdrContourTextPrimitive2D
;
53 class SdrPathTextPrimitive2D
;
54 class SdrBlockTextPrimitive2D
;
55 class SdrAutoFitTextPrimitive2D
;
56 class SdrStretchTextPrimitive2D
;
59 namespace drawinglayer
{ namespace animation
{
60 class AnimationEntryList
;
63 namespace drawinglayer
{ namespace geometry
{
64 class ViewInformation2D
;
67 namespace sdr
{ namespace table
{
69 class SdrTableRtfExporter
;
70 class SdrTableRTFParser
;
77 #define SDRUSERDATA_OBJTEXTLINK (1)
80 // Hilfsklasse SdrTextObjGeoData
83 class SdrTextObjGeoData
: public SdrObjGeoData
91 // Hilfsklasse ImpSdrObjTextLinkUserData
94 class ImpSdrObjTextLinkUserData
: public SdrObjUserData
96 friend class SdrTextObj
;
97 friend class ImpSdrObjTextLink
;
100 OUString aFileName
; // Name des referenzierten Dokuments
101 OUString aFilterName
; // ggf. ein Filter
102 DateTime aFileDate0
; // Unnoetiges neuladen vermeiden
103 ImpSdrObjTextLink
* pLink
;
104 rtl_TextEncoding eCharSet
;
108 ImpSdrObjTextLinkUserData(SdrTextObj
* pObj1
);
109 virtual ~ImpSdrObjTextLinkUserData();
111 virtual SdrObjUserData
* Clone(SdrObject
* pObj1
) const SAL_OVERRIDE
;
118 class CustomShapeProperties
;
119 class CellProperties
;
120 } // end of namespace properties
121 } // end of namespace sdr
127 class SVX_DLLPUBLIC SdrTextObj
: public SdrAttrObj
, public svx::ITextProvider
130 // Cell needs access to ImpGetDrawOutliner();
132 friend class sdr::table::Cell
;
133 friend class sdr::table::SdrTableRtfExporter
;
134 friend class sdr::table::SdrTableRTFParser
;
136 // CustomShapeproperties need to access the "bTextFrame" member:
137 friend class sdr::properties::CustomShapeProperties
;
140 virtual sdr::properties::BaseProperties
* CreateObjectSpecificProperties() SAL_OVERRIDE
;
141 virtual sdr::contact::ViewContact
* CreateObjectSpecificViewContact() SAL_OVERRIDE
;
144 // This method is only allowed for sdr::properties::TextProperties
145 SVX_DLLPRIVATE SdrOutliner
* GetTextEditOutliner() const
150 // This method is only allowed for sdr::properties::TextProperties
151 SVX_DLLPRIVATE
void SetPortionInfoChecked(bool bNew
)
153 bPortionInfoChecked
= bNew
;
156 // to allow sdr::properties::TextProperties access to SetPortionInfoChecked()
157 // and GetTextEditOutliner()
158 friend class sdr::properties::TextProperties
;
159 friend class sdr::properties::CellProperties
;
161 friend class ImpSdrObjTextLink
;
162 friend class ImpSdrObjTextLinkUserData
;
163 friend class SdrPowerPointImport
; // fuer PowerPointImport
164 friend class SdrExchangeView
; // fuer ImpGetDrawOutliner
165 friend class SdrView
; // fuer ImpGetDrawOutliner
166 friend class SdrObjEditView
; // fuer TextEdit
167 friend class SdrMeasureObj
; // fuer ImpGetDrawOutliner
168 friend class SvxMSDffManager
; // fuer ImpGetDrawOutliner
169 friend class SdrObjCustomShape
;// fuer ImpGetDrawOutliner
170 friend class SdrText
; // fuer ImpGetDrawOutliner
173 // Das aRect ist gleichzeig auch das Rect vom RectObj und CircObj.
174 // Bei bTextFrame=sal_True wird der Text in dieses Rect hineinformatiert.
175 // Bei bTextFrame=sal_False wird der Text am Mittelpunkt des Rect zentriert.
178 // Der GeoStat enthaelt den Drehwinkel und einen Shearwinkel
181 // this is the active text
184 // Hier merke ich mir die Ausmasse des Textes (n.i.)
187 // Ein Outliner*, damit
188 // 1. das TextObj nicht von mehreren Views gleichzeitig editiert und
189 // 2. beim Streamen waerend des Editierens ein Flush() ausgefuehrt
191 SdrOutliner
* pEdtOutl
;
193 // Bei Fontwork muss soviel auf's BoundRect draufgerechnet werden
194 // damit es ausreichend gross ist.
195 Rectangle
* pFormTextBoundRect
;
197 // Moegliche Werte fuer eTextKind sind:
198 // OBJ_TEXT normaler Textrahmen
199 // OBJ_TEXTEXT Textfortsetzungsrahmen
200 // OBJ_TITLETEXT TitleText fuer StarDraw-Praesentation
201 // OBJ_OUTLINETEXT OutlineText fuer StarDraw-Praesentation
202 // eTextKind hat nur Bedeutung, wenn bTextFrame=sal_True, da es sich sonst
203 // um ein beschriftetes Grafikobjekt handelt.
204 SdrObjKind eTextKind
;
207 // For text editing in SW Haeder/Footer it is necessary to be
208 // able to set an offset for the text edit to allow text editing at the
209 // position of the virtual object. This offset is used when setting up
210 // and maintaining the OutlinerView.
211 Point maTextEditOffset
;
213 const Point
& GetTextEditOffset() const { return maTextEditOffset
; }
214 void SetTextEditOffset(const Point
& rNew
) { maTextEditOffset
= rNew
; }
217 // Fuer beschriftete Zeichenobjekte ist bTextFrame=FALSE. Der Textblock
218 // wird dann hoizontal und vertikal an aRect zentriert. Bei bTextFrame=
219 // sal_True wird der Text in aRect hineinformatiert. Der eigentliche Textrahmen
220 // ist durch ein SdrRectObj mit bTextFrame=sal_True realisiert.
222 bool bPortionInfoChecked
: 1; // Fuer Optimierung von Textobjekten
223 bool bNoShear
: 1; // Obj darf nicht gesheart werden (->Graf+Ole+TextFrame)
224 bool bNoRotate
: 1; // Obj darf nicht gedreht werden (->Ole)
225 bool bNoMirror
: 1; // Obj darf nicht gespiegelt werden (->Ole,TextFrame)
226 bool bTextSizeDirty
: 1;
229 bool mbInEditMode
: 1; // Is this text object in edit mode?
231 // Fuer Objekt mit freier Groesse im Draw (Mengentext). Das Flag wird vom
232 // der App beim Create gesetzt.
233 // Wenn das Objekt dann spaeter in der Breite resized wird, wird
234 // AutoGrowWidth abgeschaltet (Hart auf sal_False attributiert). Das Flag wird
235 // dann ebenfalls auf sal_False gesetzt, sodass sich das Objekt anschliessend
236 // wie ein normales Textobjekt verhaelt.
237 // Resize in der Breite kann sein:
238 // - Interaktives Resize in Einfach- oder Mehrfachselektion
239 // - Positions+Groesse Dialog
240 bool bDisableAutoWidthOnDragging
: 1;
243 // Allow text suppression
244 bool mbTextHidden
: 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;
256 SVX_DLLPRIVATE
void ImpCheckMasterCachable();
257 // #101029#: Extracted from ImpGetDrawOutliner()
258 SVX_DLLPRIVATE
void ImpInitDrawOutliner( SdrOutliner
& rOutl
) const;
259 // #101029#: Extracted from Paint()
260 SVX_DLLPRIVATE
void ImpSetupDrawOutlinerForPaint( bool bContourFrame
,
261 SdrOutliner
& rOutliner
,
262 Rectangle
& rTextRect
,
263 Rectangle
& rAnchorRect
,
264 Rectangle
& rPaintRect
,
265 Fraction
& aFitXKorreg
) const;
266 void ImpAutoFitText( SdrOutliner
& rOutliner
) const;
267 static void ImpAutoFitText( SdrOutliner
& rOutliner
, const Size
& rShapeSize
, bool bIsVerticalWriting
);
268 SVX_DLLPRIVATE SdrObject
* ImpConvertContainedTextToSdrPathObjs(bool bToPoly
) const;
269 SVX_DLLPRIVATE
void ImpLinkAnmeldung();
270 SVX_DLLPRIVATE
void ImpLinkAbmeldung();
271 SVX_DLLPRIVATE ImpSdrObjTextLinkUserData
* GetLinkUserData() const;
272 // void ImpCheckItemSetChanges(const SfxItemSet& rAttr);
275 bool ImpCanConvTextToCurve() const;
276 SdrObject
* ImpConvertMakeObj(const basegfx::B2DPolyPolygon
& rPolyPolygon
, bool bClosed
, bool bBezier
, bool bNoSetAttr
= false) const;
277 SdrObject
* ImpConvertAddText(SdrObject
* pObj
, bool bBezier
) const;
278 void ImpSetTextStyleSheetListeners();
279 void ImpSetCharStretching(SdrOutliner
& rOutliner
, const Size
& rTextSize
, const Size
& rShapeSize
, Fraction
& rFitXKorreg
) const;
280 void ImpJustifyRect(Rectangle
& rRect
) const;
281 void ImpCheckShear();
282 Rectangle
ImpDragCalcRect(const SdrDragStat
& rDrag
) const;
283 void ImpSetTextEditParams() const;
284 void SetTextSizeDirty() { bTextSizeDirty
=true; }
286 // rAnchorRect ist InOut-Parameter!
287 void ImpSetContourPolygon( SdrOutliner
& rOutliner
, Rectangle
& rAnchorRect
, bool bLineWidth
) const;
289 virtual SdrObjGeoData
* NewGeoData() const SAL_OVERRIDE
;
290 virtual void SaveGeoData(SdrObjGeoData
& rGeo
) const SAL_OVERRIDE
;
291 virtual void RestGeoData(const SdrObjGeoData
& rGeo
) SAL_OVERRIDE
;
292 bool NbcSetEckenradius(long nRad
);
294 // #115391# new method for SdrObjCustomShape and SdrTextObj to correctly handle and set
295 // SdrTextMinFrameWidthItem and SdrTextMinFrameHeightItem based on all settings, necessities
297 virtual void AdaptTextMinSize();
299 // Konstruktoren fuer beschriftete Zeichenobjekte
301 SdrTextObj(const Rectangle
& rNewRect
);
303 // Konstruktoren fuer Textrahmen
304 SdrTextObj(SdrObjKind eNewTextKind
);
305 SdrTextObj(SdrObjKind eNewTextKind
, const Rectangle
& rNewRect
);
307 virtual ~SdrTextObj();
313 bool IsInEditMode() const { return mbInEditMode
; }
315 // via eCharSet kann der CharSet der vorliegenden Datei uebergeben werden.
316 // Bei RTL_TEXTENCODING_DONTKNOW wird der CharSet der aktuellen Plattform verwendet.
317 // Derzeit unterstuetzt wird ASCII und RTF wobei ich die Unterscheidung
318 // selbst treffe. rFilterName ist noch ohne Bedeutung und muss leer gelassen
320 // I.d.R. muss die App nur SetTextLink() rufen - der Rest geschieht von
321 // selbst (SfxLinkManager). Die Methode LoadText() kann ausserdem verwendet
322 // werden, um eine Datei in ein Textobjekt zu laden (ohne Verknuepfung).
323 // TextLinks koennen nicht editiert werden (allenfalls spaeter mal ReadOnly).
324 // Eine Attributierung kann nur am Textrahmen vollzogen werden.
325 void SetTextLink(const OUString
& rFileName
, const OUString
& rFilterName
, rtl_TextEncoding eCharSet
);
326 void ReleaseTextLink();
327 bool IsLinkedText() const { return pPlusData
!=NULL
&& GetLinkUserData()!=NULL
; }
328 bool ReloadLinkedText(bool bForceLoad
= false);
329 bool LoadText(const OUString
& rFileName
, const OUString
& rFilterName
, rtl_TextEncoding eCharSet
);
331 virtual bool AdjustTextFrameWidthAndHeight(Rectangle
& rR
, bool bHgt
= true, bool bWdt
= true) const;
332 virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt
= true, bool bWdt
= true);
333 virtual bool AdjustTextFrameWidthAndHeight(bool bHgt
= true, bool bWdt
= true);
334 bool IsTextFrame() const { return bTextFrame
; }
335 bool IsOutlText() const { return bTextFrame
&& (eTextKind
==OBJ_OUTLINETEXT
|| eTextKind
==OBJ_TITLETEXT
); }
336 /// returns true if the PPT autofit of text into shape bounds is enabled. implies IsFitToSize()==false!
337 bool IsAutoFit() const;
338 /// returns true if the old feature for fitting shape content should into shape is enabled. implies IsAutoFit()==false!
339 bool IsFitToSize() const;
340 SdrObjKind
GetTextKind() const { return eTextKind
; }
343 virtual bool HasText() const SAL_OVERRIDE
;
345 bool HasEditText() const;
346 bool IsTextEditActive() const { return (pEdtOutl
!= 0L); }
348 /** returns the currently active text. */
349 virtual SdrText
* getActiveText() const;
351 /** returns the nth available text. */
352 virtual SdrText
* getText( sal_Int32 nIndex
) const SAL_OVERRIDE
;
354 /** returns the number of texts available for this object. */
355 virtual sal_Int32
getTextCount() const SAL_OVERRIDE
;
357 /** returns true only if we are in edit mode and the user actually changed anything */
358 virtual bool IsRealyEdited() const;
360 /** changes the current active text */
361 virtual void setActiveText( sal_Int32 nIndex
);
363 /** returns the index of the text that contains the given point or -1 */
364 virtual sal_Int32
CheckTextHit(const Point
& rPnt
) const;
366 void SetDisableAutoWidthOnDragging(bool bOn
) { bDisableAutoWidthOnDragging
=bOn
; }
367 bool IsDisableAutoWidthOnDragging() { return bDisableAutoWidthOnDragging
; }
368 void NbcSetText(const OUString
& rStr
);
369 void SetText(const OUString
& rStr
);
370 void NbcSetText(SvStream
& rInput
, const OUString
& rBaseURL
, sal_uInt16 eFormat
);
371 void SetText(SvStream
& rInput
, const OUString
& rBaseURL
, sal_uInt16 eFormat
);
373 // FitToSize und Fontwork wird bei GetTextSize() nicht berueksichtigt!
374 virtual const Size
& GetTextSize() const;
375 void FitFrameToTextSize();
377 // Gleichzeitig wird der Text in den Outliner gesetzt (ggf.
378 // der des EditOutliners) und die PaperSize gesetzt.
379 virtual void TakeTextRect( SdrOutliner
& rOutliner
, Rectangle
& rTextRect
, bool bNoEditText
= false,
380 Rectangle
* pAnchorRect
=NULL
, bool bLineWidth
= true ) const;
381 virtual void TakeTextAnchorRect(::Rectangle
& rAnchorRect
) const;
382 const GeoStat
& GetGeoStat() const { return aGeo
; }
384 long GetEckenradius() const;
385 virtual bool IsAutoGrowHeight() const;
386 long GetMinTextFrameHeight() const;
387 long GetMaxTextFrameHeight() const;
388 virtual bool IsAutoGrowWidth() const;
389 long GetMinTextFrameWidth() const;
390 long GetMaxTextFrameWidth() const;
392 SdrFitToSizeType
GetFitToSize() const;
393 const Rectangle
&GetGeoRect() const { return aRect
; }
395 // Feststellen, ob TextFontwork
396 virtual bool IsFontwork() const;
398 // Soll die Fontwork-Kontour versteckt werden?
399 bool IsHideContour() const;
401 // Textfluss innerhalb Kontur
402 bool IsContourTextFrame() const;
404 // Horizontale Textausrichtung
405 SdrTextHorzAdjust
GetTextHorizontalAdjust(const SfxItemSet
& rSet
) const;
406 SdrTextHorzAdjust
GetTextHorizontalAdjust() const;
408 // Vertikale Textausrichtung
409 SdrTextVertAdjust
GetTextVerticalAdjust(const SfxItemSet
& rSet
) const;
410 SdrTextVertAdjust
GetTextVerticalAdjust() const;
412 // Textrahmenabstaende
413 long GetTextLeftDistance() const;
414 long GetTextRightDistance() const;
415 long GetTextUpperDistance() const;
416 long GetTextLowerDistance() const;
417 SdrTextAniKind
GetTextAniKind() const;
418 SdrTextAniDirection
GetTextAniDirection() const;
420 virtual void SetPage(SdrPage
* pNewPage
) SAL_OVERRIDE
;
421 virtual void SetModel(SdrModel
* pNewModel
) SAL_OVERRIDE
;
422 virtual void TakeObjInfo(SdrObjTransformInfoRec
& rInfo
) const SAL_OVERRIDE
;
423 virtual sal_uInt16
GetObjIdentifier() const SAL_OVERRIDE
;
425 // Wird zur Bestimmung des Textankerbereichs benoetigt
426 virtual void TakeUnrotatedSnapRect(Rectangle
& rRect
) const;
427 virtual OUString
TakeObjNameSingul() const SAL_OVERRIDE
;
428 virtual OUString
TakeObjNamePlural() const SAL_OVERRIDE
;
429 virtual SdrTextObj
* Clone() const SAL_OVERRIDE
;
430 SdrTextObj
& operator=(const SdrTextObj
& rObj
);
431 virtual basegfx::B2DPolyPolygon
TakeXorPoly() const SAL_OVERRIDE
;
432 virtual basegfx::B2DPolyPolygon
TakeContour() const SAL_OVERRIDE
;
433 virtual void RecalcSnapRect() SAL_OVERRIDE
;
434 virtual void NbcSetSnapRect(const Rectangle
& rRect
) SAL_OVERRIDE
;
435 virtual void NbcSetLogicRect(const Rectangle
& rRect
) SAL_OVERRIDE
;
436 virtual const Rectangle
& GetLogicRect() const SAL_OVERRIDE
;
437 virtual long GetRotateAngle() const SAL_OVERRIDE
;
438 virtual long GetShearAngle(bool bVertical
= false) const SAL_OVERRIDE
;
440 virtual sal_uInt32
GetSnapPointCount() const SAL_OVERRIDE
;
441 virtual Point
GetSnapPoint(sal_uInt32 i
) const SAL_OVERRIDE
;
443 virtual sal_uInt32
GetHdlCount() const SAL_OVERRIDE
;
444 virtual SdrHdl
* GetHdl(sal_uInt32 nHdlNum
) const SAL_OVERRIDE
;
446 // special drag methods
447 virtual bool hasSpecialDrag() const SAL_OVERRIDE
;
448 virtual bool applySpecialDrag(SdrDragStat
& rDrag
) SAL_OVERRIDE
;
449 virtual OUString
getSpecialDragComment(const SdrDragStat
& rDrag
) const SAL_OVERRIDE
;
451 virtual bool BegCreate(SdrDragStat
& rStat
) SAL_OVERRIDE
;
452 virtual bool MovCreate(SdrDragStat
& rStat
) SAL_OVERRIDE
;
453 virtual bool EndCreate(SdrDragStat
& rStat
, SdrCreateCmd eCmd
) SAL_OVERRIDE
;
454 virtual bool BckCreate(SdrDragStat
& rStat
) SAL_OVERRIDE
;
455 virtual void BrkCreate(SdrDragStat
& rStat
) SAL_OVERRIDE
;
456 virtual basegfx::B2DPolyPolygon
TakeCreatePoly(const SdrDragStat
& rDrag
) const SAL_OVERRIDE
;
457 virtual Pointer
GetCreatePointer() const SAL_OVERRIDE
;
459 virtual void NbcMove(const Size
& rSiz
) SAL_OVERRIDE
;
460 virtual void NbcResize(const Point
& rRef
, const Fraction
& xFact
, const Fraction
& yFact
) SAL_OVERRIDE
;
461 virtual void NbcRotate(const Point
& rRef
, long nWink
, double sn
, double cs
) SAL_OVERRIDE
;
462 virtual void NbcMirror(const Point
& rRef1
, const Point
& rRef2
) SAL_OVERRIDE
;
463 virtual void NbcShear(const Point
& rRef
, long nWink
, double tn
, bool bVShear
) SAL_OVERRIDE
;
465 virtual bool HasTextEdit() const SAL_OVERRIDE
;
466 virtual bool BegTextEdit(SdrOutliner
& rOutl
) SAL_OVERRIDE
;
467 virtual void TakeTextEditArea(Size
* pPaperMin
, Size
* pPaperMax
, Rectangle
* pViewInit
, Rectangle
* pViewMin
) const;
468 virtual void EndTextEdit(SdrOutliner
& rOutl
) SAL_OVERRIDE
;
469 virtual sal_uInt16
GetOutlinerViewAnchorMode() const;
471 virtual void NbcSetOutlinerParaObject(OutlinerParaObject
* pTextObject
) SAL_OVERRIDE
;
472 void NbcSetOutlinerParaObjectForText( OutlinerParaObject
* pTextObject
, SdrText
* pText
);
473 virtual OutlinerParaObject
* GetOutlinerParaObject() const SAL_OVERRIDE
;
474 virtual OutlinerParaObject
* GetEditOutlinerParaObject() const;
476 virtual void NbcReformatText() SAL_OVERRIDE
;
477 virtual void ReformatText() SAL_OVERRIDE
;
479 virtual bool CalcFieldValue(const SvxFieldItem
& rField
, sal_Int32 nPara
, sal_uInt16 nPos
,
480 bool bEdit
, Color
*& rpTxtColor
, Color
*& rpFldColor
, OUString
& rRet
) const;
482 virtual SdrObject
* DoConvertToPolyObj(bool bBezier
, bool bAddText
) const SAL_OVERRIDE
;
484 void SetTextEditOutliner(SdrOutliner
* pOutl
) { pEdtOutl
=pOutl
; }
486 /** Setup given Outliner equivalently to SdrTextObj::Paint()
488 To setup an arbitrary Outliner in the same way as the draw
489 outliner on SdrTextObj::Paint(). Among others, the paper size,
490 control word and character stretching are initialized, such
491 that the formatting should match the screen representation.
492 The textual content of the outliner is not touched, i.e. no
493 Init() or Clear() is called on the Outliner.
496 The Outliner to setup.
499 The region to paint the outliner content into. This is useful
500 to e.g. determine the top, left position of text in shapes.
502 void SetupOutlinerFormatting( SdrOutliner
& rOutl
, Rectangle
& rPaintRect
) const;
504 /** Update given Outliner equivalently to SdrTextObj::Paint()
506 Same functionality as in SetupOutlinerFormatting(), except
507 that the outliner content is not cleared.
510 The Outliner to update.
513 The region to paint the outliner content into. This is useful
514 to e.g. determine the top, left position of text in shapes.
516 void UpdateOutlinerFormatting( SdrOutliner
& rOutl
, Rectangle
& rPaintRect
) const;
517 void ForceOutlinerParaObject();
518 virtual bool IsVerticalWriting() const;
519 virtual void SetVerticalWriting(bool bVertical
);
521 /** called from the SdrObjEditView during text edit when the status of the edit outliner changes */
522 virtual void onEditOutlinerStatusEvent( EditStatus
* pEditStatus
);
526 // transformation interface for StarOfficeAPI. This implements support for
527 // homogen 3x3 matrices containing the transformation of the SdrObject. At the
528 // moment it contains a shearX, rotation and translation, but for setting all linear
529 // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
532 // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
533 // with the base geometry and returns TRUE. Otherwise it returns FALSE.
534 virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix
& rMatrix
, basegfx::B2DPolyPolygon
& rPolyPolygon
) const SAL_OVERRIDE
;
536 // sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
537 // If it's an SdrPathObj it will use the provided geometry information. The Polygon has
538 // to use (0,0) as upper left and will be scaled to the given size in the matrix.
539 virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix
& rMatrix
, const basegfx::B2DPolyPolygon
& rPolyPolygon
) SAL_OVERRIDE
;
541 // #103836# iterates over the paragraphs of a given SdrObject and removes all
542 // hard set character attributes with the which ids contained in the
544 virtual void RemoveOutlinerCharacterAttribs( const std::vector
<sal_uInt16
>& rCharWhichIds
);
547 // Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a
548 // painting rectangle. Rotation is taken from the object.
549 GDIMetaFile
* GetTextScrollMetaFileAndRectangle(Rectangle
& rScrollRectangle
, Rectangle
& rPaintRectangle
);
552 // Access to TextAnimationAllowed flag
553 void SetTextAnimationAllowed(bool bNew
);
556 // Set single item at the local ItemSet. *Does not use* AllowItemChange(),
557 // ItemChange(), PostItemChange() and ItemSetChanged() calls.
558 void SetObjectItemNoBroadcast(const SfxPoolItem
& rItem
);
562 // text primitive decomposition helpers
563 void impDecomposeContourTextPrimitive(
564 drawinglayer::primitive2d::Primitive2DSequence
& rTarget
,
565 const drawinglayer::primitive2d::SdrContourTextPrimitive2D
& rSdrContourTextPrimitive
,
566 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
567 void impDecomposePathTextPrimitive(
568 drawinglayer::primitive2d::Primitive2DSequence
& rTarget
,
569 const drawinglayer::primitive2d::SdrPathTextPrimitive2D
& rSdrPathTextPrimitive
,
570 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
571 void impDecomposeBlockTextPrimitive(
572 drawinglayer::primitive2d::Primitive2DSequence
& rTarget
,
573 const drawinglayer::primitive2d::SdrBlockTextPrimitive2D
& rSdrBlockTextPrimitive
,
574 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
575 void impDecomposeAutoFitTextPrimitive(
576 drawinglayer::primitive2d::Primitive2DSequence
& rTarget
,
577 const drawinglayer::primitive2d::SdrAutoFitTextPrimitive2D
& rSdrAutofitTextPrimitive
,
578 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
579 void impDecomposeStretchTextPrimitive(
580 drawinglayer::primitive2d::Primitive2DSequence
& rTarget
,
581 const drawinglayer::primitive2d::SdrStretchTextPrimitive2D
& rSdrStretchTextPrimitive
,
582 const drawinglayer::geometry::ViewInformation2D
& aViewInformation
) const;
586 void impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryList
& rAnimList
) const;
587 void impGetScrollTextTiming(drawinglayer::animation::AnimationEntryList
& rAnimList
, double fFrameLength
, double fTextLength
) const;
589 /** returns false if the given pointer is NULL
590 or if the given SdrOutliner contains no text.
591 Also checks for one empty paragraph.
593 static bool HasTextImpl( SdrOutliner
* pOutliner
);
598 #endif // INCLUDED_SVX_SVDOTEXT_HXX
600 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */