fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / svx / svdotext.hxx
blobc6f0eed25cdf0039540b740d8c3310dc0f59d8f2
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 _SVDOTEXT_HXX
21 #define _SVDOTEXT_HXX
23 #include <vcl/field.hxx>
24 #include <svx/itextprovider.hxx>
25 #include <svx/svdoattr.hxx>
26 #include <svx/svdtrans.hxx> // GeoStat
27 #include <tools/datetime.hxx>
28 #include <svx/xtextit0.hxx>
29 #include "svdtext.hxx"
30 #include <vector>
31 #include <boost/shared_ptr.hpp>
32 #include "svx/svxdllapi.h"
33 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
34 #include <svx/svdpagv.hxx>
36 //************************************************************
37 // Vorausdeklarationen
38 //************************************************************
40 class OutlinerParaObject;
41 class SdrOutliner;
42 class SdrTextObj;
43 class SvxFieldItem;
44 class ImpSdrObjTextLink;
45 class EditStatus;
47 namespace sdr { namespace properties {
48 class TextProperties;
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 {
68 class Cell;
69 class SdrTableRtfExporter;
70 class SdrTableRTFParser;
73 //************************************************************
74 // Defines
75 //************************************************************
77 #define SDRUSERDATA_OBJTEXTLINK (1)
79 //************************************************************
80 // Hilfsklasse SdrTextObjGeoData
81 //************************************************************
83 class SdrTextObjGeoData : public SdrObjGeoData
85 public:
86 Rectangle aRect;
87 GeoStat aGeo;
90 //************************************************************
91 // Hilfsklasse ImpSdrObjTextLinkUserData
92 //************************************************************
94 class ImpSdrObjTextLinkUserData : public SdrObjUserData
96 friend class SdrTextObj;
97 friend class ImpSdrObjTextLink;
99 SdrTextObj* pObj;
100 String aFileName; // Name des referenzierten Dokuments
101 String aFilterName; // ggf. ein Filter
102 DateTime aFileDate0; // Unnoetiges neuladen vermeiden
103 ImpSdrObjTextLink* pLink;
104 rtl_TextEncoding eCharSet;
106 public:
107 TYPEINFO();
108 ImpSdrObjTextLinkUserData(SdrTextObj* pObj1);
109 virtual ~ImpSdrObjTextLinkUserData();
111 virtual SdrObjUserData* Clone(SdrObject* pObj1) const;
114 namespace sdr
116 namespace properties
118 class CustomShapeProperties;
119 class CellProperties;
120 } // end of namespace properties
121 } // end of namespace sdr
123 //************************************************************
124 // SdrTextObj
125 //************************************************************
127 class SVX_DLLPUBLIC SdrTextObj : public SdrAttrObj, public svx::ITextProvider
129 private:
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;
139 protected:
140 virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties();
141 virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
143 private:
144 // This method is only allowed for sdr::properties::TextProperties
145 SVX_DLLPRIVATE SdrOutliner* GetTextEditOutliner() const
147 return pEdtOutl;
150 // This method is only allowed for sdr::properties::TextProperties
151 SVX_DLLPRIVATE void SetPortionInfoChecked(sal_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
172 protected:
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.
176 Rectangle aRect;
178 // Der GeoStat enthaelt den Drehwinkel und einen Shearwinkel
179 GeoStat aGeo;
181 // this is the active text
182 SdrText* mpText;
184 // Hier merke ich mir die Ausmasse des Textes (n.i.)
185 Size aTextSize;
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
190 // werden kann
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;
206 // #108784#
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;
212 public:
213 const Point& GetTextEditOffset() const { return maTextEditOffset; }
214 void SetTextEditOffset(const Point& rNew) { maTextEditOffset = rNew; }
216 protected:
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.
221 sal_Bool bTextFrame : 1;
222 sal_Bool bPortionInfoChecked : 1; // Fuer Optimierung von Textobjekten
223 sal_Bool bNoShear : 1; // Obj darf nicht gesheart werden (->Graf+Ole+TextFrame)
224 sal_Bool bNoRotate : 1; // Obj darf nicht gedreht werden (->Ole)
225 sal_Bool bNoMirror : 1; // Obj darf nicht gespiegelt werden (->Ole,TextFrame)
226 sal_Bool bTextSizeDirty : 1;
228 // #101684#
229 sal_Bool mbInEditMode : 1; // Is this text obejct 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 sal_Bool bDisableAutoWidthOnDragging : 1;
242 // #111096#
243 // Allow text suppression
244 sal_Bool mbTextHidden : 1;
246 // #111096#
247 // Flag for allowing text animation. Default is sal_true.
248 sal_Bool mbTextAnimationAllowed : 1;
250 // flag for preventing recursive onEditOutlinerStatusEvent calls
251 sal_Bool mbInDownScale : 1;
253 SdrOutliner& ImpGetDrawOutliner() const;
255 private:
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);
274 protected:
275 bool ImpCanConvTextToCurve() const;
276 SdrObject* ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, sal_Bool bClosed, sal_Bool bBezier, sal_Bool bNoSetAttr = sal_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=sal_True; }
286 // rAnchorRect ist InOut-Parameter!
287 void ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAnchorRect, sal_Bool bLineWidth ) const;
289 virtual SdrObjGeoData* NewGeoData() const;
290 virtual void SaveGeoData(SdrObjGeoData& rGeo) const;
291 virtual void RestGeoData(const SdrObjGeoData& rGeo);
292 bool NbcSetEckenradius(long nRad);
293 bool NbcSetMinTextFrameHeight(long nHgt);
294 bool NbcSetMinTextFrameWidth(long nWdt);
296 // Konstruktoren fuer beschriftete Zeichenobjekte
297 SdrTextObj();
298 SdrTextObj(const Rectangle& rNewRect);
300 // Konstruktoren fuer Textrahmen
301 SdrTextObj(SdrObjKind eNewTextKind);
302 SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect);
304 virtual ~SdrTextObj();
306 public:
307 TYPEINFO();
309 // #101684#
310 sal_Bool IsInEditMode() const { return mbInEditMode; }
312 // via eCharSet kann der CharSet der vorliegenden Datei uebergeben werden.
313 // Bei RTL_TEXTENCODING_DONTKNOW wird der CharSet der aktuellen Plattform verwendet.
314 // Derzeit unterstuetzt wird ASCII und RTF wobei ich die Unterscheidung
315 // selbst treffe. rFilterName ist noch ohne Bedeutung und muss leer gelassen
316 // werden.
317 // I.d.R. muss die App nur SetTextLink() rufen - der Rest geschieht von
318 // selbst (SfxLinkManager). Die Methode LoadText() kann ausserdem verwendet
319 // werden, um eine Datei in ein Textobjekt zu laden (ohne Verknuepfung).
320 // TextLinks koennen nicht editiert werden (allenfalls spaeter mal ReadOnly).
321 // Eine Attributierung kann nur am Textrahmen vollzogen werden.
322 void SetTextLink(const String& rFileName, const String& rFilterName, rtl_TextEncoding eCharSet);
323 void ReleaseTextLink();
324 bool IsLinkedText() const { return pPlusData!=NULL && GetLinkUserData()!=NULL; }
325 bool ReloadLinkedText(bool bForceLoad = false);
326 bool LoadText(const String& rFileName, const String& rFilterName, rtl_TextEncoding eCharSet);
328 virtual bool AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt = true, bool bWdt = true) const;
329 virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true);
330 virtual bool AdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true);
331 bool IsTextFrame() const { return bTextFrame; }
332 bool IsOutlText() const { return bTextFrame && (eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT); }
333 /// returns true if the PPT autofit of text into shape bounds is enabled. implies IsFitToSize()==false!
334 bool IsAutoFit() const;
335 /// returns true if the old feature for fitting shape content should into shape is enabled. implies IsAutoFit()==false!
336 bool IsFitToSize() const;
337 SdrObjKind GetTextKind() const { return eTextKind; }
339 virtual bool HasText() const;
340 bool HasEditText() const;
341 sal_Bool IsTextEditActive() const { return (pEdtOutl != 0L); }
343 /** returns the currently active text. */
344 virtual SdrText* getActiveText() const;
346 /** returns the nth available text. */
347 virtual SdrText* getText( sal_Int32 nIndex ) const;
349 /** returns the number of texts available for this object. */
350 virtual sal_Int32 getTextCount() const;
352 /** returns true only if we are in edit mode and the user actually changed anything */
353 virtual bool IsRealyEdited() const;
355 /** changes the current active text */
356 virtual void setActiveText( sal_Int32 nIndex );
358 /** returns the index of the text that contains the given point or -1 */
359 virtual sal_Int32 CheckTextHit(const Point& rPnt) const;
361 void SetDisableAutoWidthOnDragging(bool bOn) { bDisableAutoWidthOnDragging=bOn; }
362 bool IsDisableAutoWidthOnDragging() { return bDisableAutoWidthOnDragging; }
363 void NbcSetText(const String& rStr);
364 void SetText(const String& rStr);
365 void NbcSetText(SvStream& rInput, const String& rBaseURL, sal_uInt16 eFormat);
366 void SetText(SvStream& rInput, const String& rBaseURL, sal_uInt16 eFormat);
368 // FitToSize und Fontwork wird bei GetTextSize() nicht berueksichtigt!
369 virtual const Size& GetTextSize() const;
370 void FitFrameToTextSize();
372 // Gleichzeitig wird der Text in den Outliner gesetzt (ggf.
373 // der des EditOutliners) und die PaperSize gesetzt.
374 virtual void TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText = false,
375 Rectangle* pAnchorRect=NULL, bool bLineWidth = true ) const;
376 virtual void TakeTextAnchorRect(::Rectangle& rAnchorRect) const;
377 const GeoStat& GetGeoStat() const { return aGeo; }
379 long GetEckenradius() const;
380 virtual bool IsAutoGrowHeight() const;
381 long GetMinTextFrameHeight() const;
382 long GetMaxTextFrameHeight() const;
383 virtual bool IsAutoGrowWidth() const;
384 long GetMinTextFrameWidth() const;
385 long GetMaxTextFrameWidth() const;
387 SdrFitToSizeType GetFitToSize() const;
388 const Rectangle &GetGeoRect() const { return aRect; }
390 // Feststellen, ob TextFontwork
391 virtual bool IsFontwork() const;
393 // Soll die Fontwork-Kontour versteckt werden?
394 bool IsHideContour() const;
396 // Textfluss innerhalb Kontur
397 bool IsContourTextFrame() const;
399 // Horizontale Textausrichtung
400 SdrTextHorzAdjust GetTextHorizontalAdjust(const SfxItemSet& rSet) const;
401 SdrTextHorzAdjust GetTextHorizontalAdjust() const;
403 // Vertikale Textausrichtung
404 SdrTextVertAdjust GetTextVerticalAdjust(const SfxItemSet& rSet) const;
405 SdrTextVertAdjust GetTextVerticalAdjust() const;
407 // Textrahmenabstaende
408 long GetTextLeftDistance() const;
409 long GetTextRightDistance() const;
410 long GetTextUpperDistance() const;
411 long GetTextLowerDistance() const;
412 SdrTextAniKind GetTextAniKind() const;
413 SdrTextAniDirection GetTextAniDirection() const;
415 virtual void SetPage(SdrPage* pNewPage);
416 virtual void SetModel(SdrModel* pNewModel);
417 virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
418 virtual sal_uInt16 GetObjIdentifier() const;
420 // Wird zur Bestimmung des Textankerbereichs benoetigt
421 virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const;
422 virtual void TakeObjNameSingul(String& rName) const;
423 virtual void TakeObjNamePlural(String& rName) const;
424 virtual SdrTextObj* Clone() const;
425 SdrTextObj& operator=(const SdrTextObj& rObj);
426 virtual basegfx::B2DPolyPolygon TakeXorPoly() const;
427 virtual basegfx::B2DPolyPolygon TakeContour() const;
428 virtual void RecalcSnapRect();
429 virtual void NbcSetSnapRect(const Rectangle& rRect);
430 virtual void NbcSetLogicRect(const Rectangle& rRect);
431 virtual const Rectangle& GetLogicRect() const;
432 virtual long GetRotateAngle() const;
433 virtual long GetShearAngle(bool bVertical = false) const;
435 virtual sal_uInt32 GetSnapPointCount() const;
436 virtual Point GetSnapPoint(sal_uInt32 i) const;
438 virtual sal_uInt32 GetHdlCount() const;
439 virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const;
441 // special drag methods
442 virtual bool hasSpecialDrag() const;
443 virtual bool applySpecialDrag(SdrDragStat& rDrag);
444 virtual String getSpecialDragComment(const SdrDragStat& rDrag) const;
446 virtual bool BegCreate(SdrDragStat& rStat);
447 virtual bool MovCreate(SdrDragStat& rStat);
448 virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd);
449 virtual bool BckCreate(SdrDragStat& rStat);
450 virtual void BrkCreate(SdrDragStat& rStat);
451 virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const;
452 virtual Pointer GetCreatePointer() const;
454 virtual void NbcMove(const Size& rSiz);
455 virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
456 virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs);
457 virtual void NbcMirror(const Point& rRef1, const Point& rRef2);
458 virtual void NbcShear(const Point& rRef, long nWink, double tn, bool bVShear);
460 virtual bool HasTextEdit() const;
461 virtual sal_Bool BegTextEdit(SdrOutliner& rOutl);
462 virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const;
463 virtual void EndTextEdit(SdrOutliner& rOutl);
464 virtual sal_uInt16 GetOutlinerViewAnchorMode() const;
466 virtual void NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject);
467 void NbcSetOutlinerParaObjectForText( OutlinerParaObject* pTextObject, SdrText* pText );
468 virtual OutlinerParaObject* GetOutlinerParaObject() const;
469 virtual OutlinerParaObject* GetEditOutlinerParaObject() const;
471 virtual void NbcReformatText();
472 virtual void ReformatText();
474 virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
475 bool bEdit, Color*& rpTxtColor, Color*& rpFldColor, String& rRet) const;
477 virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const;
479 void SetTextEditOutliner(SdrOutliner* pOutl) { pEdtOutl=pOutl; }
481 /** Setup given Outliner equivalently to SdrTextObj::Paint()
483 To setup an arbitrary Outliner in the same way as the draw
484 outliner on SdrTextObj::Paint(). Among others, the paper size,
485 control word and character stretching are initialized, such
486 that the formatting should match the screen representation.
487 The textual content of the outliner is not touched, i.e. no
488 Init() or Clear() is called on the Outliner.
490 @param rOutl
491 The Outliner to setup.
493 @param rPaintRect
494 The region to paint the outliner content into. This is useful
495 to e.g. determine the top, left position of text in shapes.
497 void SetupOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const;
499 /** Update given Outliner equivalently to SdrTextObj::Paint()
501 Same functionality as in SetupOutlinerFormatting(), except
502 that the outliner content is not cleared.
504 @param rOutl
505 The Outliner to update.
507 @param rPaintRect
508 The region to paint the outliner content into. This is useful
509 to e.g. determine the top, left position of text in shapes.
511 void UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const;
512 void ForceOutlinerParaObject();
513 virtual sal_Bool IsVerticalWriting() const;
514 virtual void SetVerticalWriting(sal_Bool bVertical);
516 /** called from the SdrObjEditView during text edit when the status of the edit outliner changes */
517 virtual void onEditOutlinerStatusEvent( EditStatus* pEditStatus );
519 ////////////////////////////////////////////////////////////////////////////////////////////////////
521 // transformation interface for StarOfficeAPI. This implements support for
522 // homogen 3x3 matrices containing the transformation of the SdrObject. At the
523 // moment it contains a shearX, rotation and translation, but for setting all linear
524 // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
526 ////////////////////////////////////////////////////////////////////////////////////////////////////
527 // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
528 // with the base geometry and returns TRUE. Otherwise it returns FALSE.
529 virtual sal_Bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const;
531 // sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
532 // If it's an SdrPathObj it will use the provided geometry information. The Polygon has
533 // to use (0,0) as upper left and will be scaled to the given size in the matrix.
534 virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon);
536 // #103836# iterates over the paragraphs of a given SdrObject and removes all
537 // hard set character attributes with the which ids contained in the
538 // given vector
539 virtual void RemoveOutlinerCharacterAttribs( const std::vector<sal_uInt16>& rCharWhichIds );
541 // #111096#
542 // Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a
543 // painting rectangle. Rotation is taken from the object.
544 GDIMetaFile* GetTextScrollMetaFileAndRectangle(Rectangle& rScrollRectangle, Rectangle& rPaintRectangle);
546 // #111096#
547 // Access to TextAnimationAllowed flag
548 void SetTextAnimationAllowed(sal_Bool bNew);
550 // #i8824#
551 // Set single item at the local ItemSet. *Does not use* AllowItemChange(),
552 // ItemChange(), PostItemChange() and ItemSetChanged() calls.
553 void SetObjectItemNoBroadcast(const SfxPoolItem& rItem);
555 public:
556 //////////////////////////////////////////////////////////////////////////////
557 // text primitive decomposition helpers
558 void impDecomposeContourTextPrimitive(
559 drawinglayer::primitive2d::Primitive2DSequence& rTarget,
560 const drawinglayer::primitive2d::SdrContourTextPrimitive2D& rSdrContourTextPrimitive,
561 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
562 void impDecomposePathTextPrimitive(
563 drawinglayer::primitive2d::Primitive2DSequence& rTarget,
564 const drawinglayer::primitive2d::SdrPathTextPrimitive2D& rSdrPathTextPrimitive,
565 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
566 void impDecomposeBlockTextPrimitive(
567 drawinglayer::primitive2d::Primitive2DSequence& rTarget,
568 const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive,
569 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
570 void impDecomposeAutoFitTextPrimitive(
571 drawinglayer::primitive2d::Primitive2DSequence& rTarget,
572 const drawinglayer::primitive2d::SdrAutoFitTextPrimitive2D& rSdrAutofitTextPrimitive,
573 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
574 void impDecomposeStretchTextPrimitive(
575 drawinglayer::primitive2d::Primitive2DSequence& rTarget,
576 const drawinglayer::primitive2d::SdrStretchTextPrimitive2D& rSdrStretchTextPrimitive,
577 const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
579 //////////////////////////////////////////////////////////////////////////////
580 // timing generators
581 void impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList) const;
582 void impGetScrollTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList, double fFrameLength, double fTextLength) const;
584 /** returns false if the given pointer is NULL
585 or if the given SdrOutliner contains no text.
586 Also checks for one empty paragraph.
588 static bool HasTextImpl( SdrOutliner* pOutliner );
591 ////////////////////////////////////////////////////////////////////////////////////////////////////
593 #endif //_SVDOTEXT_HXX
595 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */