LCOV - code coverage report
Current view: top level - include/svx - svdotext.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 15 19 78.9 %
Date: 2014-04-11 Functions: 14 18 77.8 %
Legend: Lines: hit not hit

          Line data    Source code
       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 <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>
      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>
      35             : 
      36             : 
      37             : //   Vorausdeklarationen
      38             : 
      39             : 
      40             : class OutlinerParaObject;
      41             : class SdrOutliner;
      42             : class SdrTextObj;
      43             : class SvxFieldItem;
      44             : class ImpSdrObjTextLink;
      45             : class EditStatus;
      46             : 
      47             : namespace sdr { namespace properties {
      48             :     class TextProperties;
      49             : }}
      50             : 
      51             : namespace drawinglayer { namespace primitive2d {
      52             :     class SdrContourTextPrimitive2D;
      53             :     class SdrPathTextPrimitive2D;
      54             :     class SdrBlockTextPrimitive2D;
      55             :     class SdrAutoFitTextPrimitive2D;
      56             :     class SdrStretchTextPrimitive2D;
      57             : }}
      58             : 
      59             : namespace drawinglayer { namespace animation {
      60             :     class AnimationEntryList;
      61             : }}
      62             : 
      63             : namespace drawinglayer { namespace geometry {
      64             :     class ViewInformation2D;
      65             : }}
      66             : 
      67             : namespace sdr { namespace table {
      68             :     class Cell;
      69             :     class SdrTableRtfExporter;
      70             :     class SdrTableRTFParser;
      71             : }}
      72             : 
      73             : 
      74             : //   Defines
      75             : 
      76             : 
      77             : #define SDRUSERDATA_OBJTEXTLINK         (1)
      78             : 
      79             : 
      80             : //   Hilfsklasse SdrTextObjGeoData
      81             : 
      82             : 
      83        1302 : class SdrTextObjGeoData : public SdrObjGeoData
      84             : {
      85             : public:
      86             :     Rectangle                   aRect;
      87             :     GeoStat                     aGeo;
      88             : };
      89             : 
      90             : 
      91             : //   Hilfsklasse ImpSdrObjTextLinkUserData
      92             : 
      93             : 
      94             : class ImpSdrObjTextLinkUserData : public SdrObjUserData
      95             : {
      96             :     friend class                SdrTextObj;
      97             :     friend class                ImpSdrObjTextLink;
      98             : 
      99             :     SdrTextObj*                 pObj;
     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;
     105             : 
     106             : public:
     107             :     TYPEINFO_OVERRIDE();
     108             :     ImpSdrObjTextLinkUserData(SdrTextObj* pObj1);
     109             :     virtual ~ImpSdrObjTextLinkUserData();
     110             : 
     111             :     virtual SdrObjUserData* Clone(SdrObject* pObj1) const SAL_OVERRIDE;
     112             : };
     113             : 
     114             : namespace sdr
     115             : {
     116             :     namespace properties
     117             :     {
     118             :         class CustomShapeProperties;
     119             :         class CellProperties;
     120             :     } // end of namespace properties
     121             : } // end of namespace sdr
     122             : 
     123             : 
     124             : //   SdrTextObj
     125             : 
     126             : 
     127             : class SVX_DLLPUBLIC SdrTextObj : public SdrAttrObj, public svx::ITextProvider
     128             : {
     129             : private:
     130             :     // Cell needs access to ImpGetDrawOutliner();
     131             : 
     132             :     friend class                sdr::table::Cell;
     133             :     friend class                sdr::table::SdrTableRtfExporter;
     134             :     friend class                sdr::table::SdrTableRTFParser;
     135             : 
     136             :     // CustomShapeproperties need to access the "bTextFrame" member:
     137             :     friend class sdr::properties::CustomShapeProperties;
     138             : 
     139             : protected:
     140             :     virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties() SAL_OVERRIDE;
     141             :     virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact() SAL_OVERRIDE;
     142             : 
     143             : private:
     144             :     // This method is only allowed for sdr::properties::TextProperties
     145       38673 :     SVX_DLLPRIVATE SdrOutliner* GetTextEditOutliner() const
     146             :     {
     147       38673 :         return pEdtOutl;
     148             :     }
     149             : 
     150             :     // This method is only allowed for sdr::properties::TextProperties
     151       17688 :     SVX_DLLPRIVATE void SetPortionInfoChecked(bool bNew)
     152             :     {
     153       17688 :         bPortionInfoChecked = bNew;
     154       17688 :     }
     155             : 
     156             :     // to allow sdr::properties::TextProperties access to SetPortionInfoChecked()
     157             :     // and GetTextEditOutliner()
     158             :     friend class sdr::properties::TextProperties;
     159             :     friend class sdr::properties::CellProperties;
     160             : 
     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
     171             : 
     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;
     177             : 
     178             :     // Der GeoStat enthaelt den Drehwinkel und einen Shearwinkel
     179             :     GeoStat                     aGeo;
     180             : 
     181             :     // this is the active text
     182             :     SdrText*                    mpText;
     183             : 
     184             :     // Hier merke ich mir die Ausmasse des Textes (n.i.)
     185             :     Size                        aTextSize;
     186             : 
     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;
     192             : 
     193             :     // Bei Fontwork muss soviel auf's BoundRect draufgerechnet werden
     194             :     // damit es ausreichend gross ist.
     195             :     Rectangle*                  pFormTextBoundRect;
     196             : 
     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;
     205             : 
     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           0 :     const Point& GetTextEditOffset() const { return maTextEditOffset; }
     214           0 :     void SetTextEditOffset(const Point& rNew) { maTextEditOffset = rNew; }
     215             : 
     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             :     bool                        bTextFrame : 1;
     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;
     227             : 
     228             :     // #101684#
     229             :     bool                        mbInEditMode : 1;   // Is this text object in edit mode?
     230             : 
     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;
     241             : 
     242             :     // #111096#
     243             :     // Allow text suppression
     244             :     bool                        mbTextHidden : 1;
     245             : 
     246             :     // #111096#
     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             :     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);
     273             : 
     274             : protected:
     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       76994 :     void SetTextSizeDirty() { bTextSizeDirty=true; }
     285             : 
     286             :     // rAnchorRect ist InOut-Parameter!
     287             :     void ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAnchorRect, bool bLineWidth ) const;
     288             : 
     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);
     293             :     bool NbcSetAutoGrowHeight(bool bAuto);
     294             :     bool NbcSetMaxTextFrameHeight(long nHgt);
     295             :     bool NbcSetAutoGrowWidth(bool bAuto);
     296             :     bool NbcSetMaxTextFrameWidth(long nWdt);
     297             :     bool NbcSetFitToSize(SdrFitToSizeType eFit);
     298             : 
     299             :     // #115391# new method for SdrObjCustomShape and SdrTextObj to correctly handle and set
     300             :     // SdrTextMinFrameWidthItem and SdrTextMinFrameHeightItem based on all settings, necessities
     301             :     // and object sizes
     302             :     virtual void AdaptTextMinSize();
     303             : 
     304             :     // Konstruktoren fuer beschriftete Zeichenobjekte
     305             :     SdrTextObj();
     306             :     SdrTextObj(const Rectangle& rNewRect);
     307             : 
     308             :     // Konstruktoren fuer Textrahmen
     309             :     SdrTextObj(SdrObjKind eNewTextKind);
     310             :     SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect);
     311             : 
     312             :     virtual ~SdrTextObj();
     313             : 
     314             : public:
     315             :     TYPEINFO_OVERRIDE();
     316             : 
     317             :     // #101684#
     318      736325 :     bool IsInEditMode() const { return mbInEditMode; }
     319             : 
     320             :     // via eCharSet kann der CharSet der vorliegenden Datei uebergeben werden.
     321             :     // Bei RTL_TEXTENCODING_DONTKNOW wird der CharSet der aktuellen Plattform verwendet.
     322             :     // Derzeit unterstuetzt wird ASCII und RTF wobei ich die Unterscheidung
     323             :     // selbst treffe. rFilterName ist noch ohne Bedeutung und muss leer gelassen
     324             :     // werden.
     325             :     // I.d.R. muss die App nur SetTextLink() rufen - der Rest geschieht von
     326             :     // selbst (SfxLinkManager). Die Methode LoadText() kann ausserdem verwendet
     327             :     // werden, um eine Datei in ein Textobjekt zu laden (ohne Verknuepfung).
     328             :     // TextLinks koennen nicht editiert werden (allenfalls spaeter mal ReadOnly).
     329             :     // Eine Attributierung kann nur am Textrahmen vollzogen werden.
     330             :     void SetTextLink(const OUString& rFileName, const OUString& rFilterName, rtl_TextEncoding eCharSet);
     331             :     void ReleaseTextLink();
     332      216478 :     bool IsLinkedText() const { return pPlusData!=NULL && GetLinkUserData()!=NULL; }
     333             :     bool ReloadLinkedText(bool bForceLoad = false);
     334             :     bool LoadText(const OUString& rFileName, const OUString& rFilterName, rtl_TextEncoding eCharSet);
     335             : 
     336             :     virtual bool AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt = true, bool bWdt = true) const;
     337             :     virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true);
     338             :     virtual bool AdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true);
     339      595323 :     bool IsTextFrame() const { return bTextFrame; }
     340      333544 :     bool IsOutlText() const { return bTextFrame && (eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT); }
     341             :     /// returns true if the PPT autofit of text into shape bounds is enabled. implies IsFitToSize()==false!
     342             :     bool IsAutoFit() const;
     343             :     /// returns true if the old feature for fitting shape content should into shape is enabled. implies IsAutoFit()==false!
     344             :     bool IsFitToSize() const;
     345       17772 :     SdrObjKind GetTextKind() const { return eTextKind; }
     346             : 
     347             :     // #i121917#
     348             :     virtual bool HasText() const SAL_OVERRIDE;
     349             : 
     350             :     bool HasEditText() const;
     351       39064 :     bool IsTextEditActive() const { return (pEdtOutl != 0L); }
     352             : 
     353             :     /** returns the currently active text. */
     354             :     virtual SdrText* getActiveText() const;
     355             : 
     356             :     /** returns the nth available text. */
     357             :     virtual SdrText* getText( sal_Int32 nIndex ) const SAL_OVERRIDE;
     358             : 
     359             :     /** returns the number of texts available for this object. */
     360             :     virtual sal_Int32 getTextCount() const SAL_OVERRIDE;
     361             : 
     362             :     /** returns true only if we are in edit mode and the user actually changed anything */
     363             :     virtual bool IsRealyEdited() const;
     364             : 
     365             :     /** changes the current active text */
     366             :     virtual void setActiveText( sal_Int32 nIndex );
     367             : 
     368             :     /** returns the index of the text that contains the given point or -1 */
     369             :     virtual sal_Int32 CheckTextHit(const Point& rPnt) const;
     370             : 
     371           0 :     void SetDisableAutoWidthOnDragging(bool bOn) { bDisableAutoWidthOnDragging=bOn; }
     372             :     bool IsDisableAutoWidthOnDragging() { return bDisableAutoWidthOnDragging; }
     373             :     void NbcSetText(const OUString& rStr);
     374             :     void SetText(const OUString& rStr);
     375             :     void NbcSetText(SvStream& rInput, const OUString& rBaseURL, sal_uInt16 eFormat);
     376             :     void SetText(SvStream& rInput, const OUString& rBaseURL, sal_uInt16 eFormat);
     377             : 
     378             :     // FitToSize und Fontwork wird bei GetTextSize() nicht berueksichtigt!
     379             :     virtual const Size& GetTextSize() const;
     380             :     void FitFrameToTextSize();
     381             : 
     382             :     // Gleichzeitig wird der Text in den Outliner gesetzt (ggf.
     383             :     // der des EditOutliners) und die PaperSize gesetzt.
     384             :     virtual void TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText = false,
     385             :         Rectangle* pAnchorRect=NULL, bool bLineWidth = true ) const;
     386             :     virtual void TakeTextAnchorRect(::Rectangle& rAnchorRect) const;
     387       45372 :     const GeoStat& GetGeoStat() const { return aGeo; }
     388             : 
     389             :     long GetEckenradius() const;
     390             :     virtual bool IsAutoGrowHeight() const;
     391             :     long GetMinTextFrameHeight() const;
     392             :     long GetMaxTextFrameHeight() const;
     393             :     virtual bool IsAutoGrowWidth() const;
     394             :     long GetMinTextFrameWidth() const;
     395             :     long GetMaxTextFrameWidth() const;
     396             : 
     397             :     SdrFitToSizeType GetFitToSize() const;
     398       36606 :     const Rectangle &GetGeoRect() const { return aRect; }
     399             : 
     400             :     // Feststellen, ob TextFontwork
     401             :     virtual bool IsFontwork() const;
     402             : 
     403             :     // Soll die Fontwork-Kontour versteckt werden?
     404             :     bool IsHideContour() const;
     405             : 
     406             :     // Textfluss innerhalb Kontur
     407             :     bool IsContourTextFrame() const;
     408             : 
     409             :     // Horizontale Textausrichtung
     410             :     SdrTextHorzAdjust GetTextHorizontalAdjust(const SfxItemSet& rSet) const;
     411             :     SdrTextHorzAdjust GetTextHorizontalAdjust() const;
     412             : 
     413             :     // Vertikale Textausrichtung
     414             :     SdrTextVertAdjust GetTextVerticalAdjust(const SfxItemSet& rSet) const;
     415             :     SdrTextVertAdjust GetTextVerticalAdjust() const;
     416             : 
     417             :     // Textrahmenabstaende
     418             :     long GetTextLeftDistance() const;
     419             :     long GetTextRightDistance() const;
     420             :     long GetTextUpperDistance() const;
     421             :     long GetTextLowerDistance() const;
     422             :     SdrTextAniKind GetTextAniKind() const;
     423             :     SdrTextAniDirection GetTextAniDirection() const;
     424             : 
     425             :     virtual void SetPage(SdrPage* pNewPage) SAL_OVERRIDE;
     426             :     virtual void SetModel(SdrModel* pNewModel) SAL_OVERRIDE;
     427             :     virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const SAL_OVERRIDE;
     428             :     virtual sal_uInt16 GetObjIdentifier() const SAL_OVERRIDE;
     429             : 
     430             :     // Wird zur Bestimmung des Textankerbereichs benoetigt
     431             :     virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const;
     432             :     virtual OUString TakeObjNameSingul() const SAL_OVERRIDE;
     433             :     virtual OUString TakeObjNamePlural() const SAL_OVERRIDE;
     434             :     virtual SdrTextObj* Clone() const SAL_OVERRIDE;
     435             :     SdrTextObj& operator=(const SdrTextObj& rObj);
     436             :     virtual basegfx::B2DPolyPolygon TakeXorPoly() const SAL_OVERRIDE;
     437             :     virtual basegfx::B2DPolyPolygon TakeContour() const SAL_OVERRIDE;
     438             :     virtual void RecalcSnapRect() SAL_OVERRIDE;
     439             :     virtual void NbcSetSnapRect(const Rectangle& rRect) SAL_OVERRIDE;
     440             :     virtual void NbcSetLogicRect(const Rectangle& rRect) SAL_OVERRIDE;
     441             :     virtual const Rectangle& GetLogicRect() const SAL_OVERRIDE;
     442             :     virtual long GetRotateAngle() const SAL_OVERRIDE;
     443             :     virtual long GetShearAngle(bool bVertical = false) const SAL_OVERRIDE;
     444             : 
     445             :     virtual sal_uInt32 GetSnapPointCount() const SAL_OVERRIDE;
     446             :     virtual Point GetSnapPoint(sal_uInt32 i) const SAL_OVERRIDE;
     447             : 
     448             :     virtual sal_uInt32 GetHdlCount() const SAL_OVERRIDE;
     449             :     virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const SAL_OVERRIDE;
     450             : 
     451             :     // special drag methods
     452             :     virtual bool hasSpecialDrag() const SAL_OVERRIDE;
     453             :     virtual bool applySpecialDrag(SdrDragStat& rDrag) SAL_OVERRIDE;
     454             :     virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const SAL_OVERRIDE;
     455             : 
     456             :     virtual bool BegCreate(SdrDragStat& rStat) SAL_OVERRIDE;
     457             :     virtual bool MovCreate(SdrDragStat& rStat) SAL_OVERRIDE;
     458             :     virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) SAL_OVERRIDE;
     459             :     virtual bool BckCreate(SdrDragStat& rStat) SAL_OVERRIDE;
     460             :     virtual void BrkCreate(SdrDragStat& rStat) SAL_OVERRIDE;
     461             :     virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const SAL_OVERRIDE;
     462             :     virtual Pointer GetCreatePointer() const SAL_OVERRIDE;
     463             : 
     464             :     virtual void NbcMove(const Size& rSiz) SAL_OVERRIDE;
     465             :     virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) SAL_OVERRIDE;
     466             :     virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs) SAL_OVERRIDE;
     467             :     virtual void NbcMirror(const Point& rRef1, const Point& rRef2) SAL_OVERRIDE;
     468             :     virtual void NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) SAL_OVERRIDE;
     469             : 
     470             :     virtual bool HasTextEdit() const SAL_OVERRIDE;
     471             :     virtual bool BegTextEdit(SdrOutliner& rOutl) SAL_OVERRIDE;
     472             :     virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const;
     473             :     virtual void EndTextEdit(SdrOutliner& rOutl) SAL_OVERRIDE;
     474             :     virtual sal_uInt16 GetOutlinerViewAnchorMode() const;
     475             : 
     476             :     virtual void NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject) SAL_OVERRIDE;
     477             :     void NbcSetOutlinerParaObjectForText( OutlinerParaObject* pTextObject, SdrText* pText );
     478             :     virtual OutlinerParaObject* GetOutlinerParaObject() const SAL_OVERRIDE;
     479             :     virtual OutlinerParaObject* GetEditOutlinerParaObject() const;
     480             : 
     481             :     virtual void NbcReformatText() SAL_OVERRIDE;
     482             :     virtual void ReformatText() SAL_OVERRIDE;
     483             : 
     484             :     virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
     485             :         bool bEdit, Color*& rpTxtColor, Color*& rpFldColor, OUString& rRet) const;
     486             : 
     487             :     virtual SdrObject* DoConvertToPolyObj(bool bBezier, bool bAddText) const SAL_OVERRIDE;
     488             : 
     489           0 :     void SetTextEditOutliner(SdrOutliner* pOutl) { pEdtOutl=pOutl; }
     490             : 
     491             :     /** Setup given Outliner equivalently to SdrTextObj::Paint()
     492             : 
     493             :         To setup an arbitrary Outliner in the same way as the draw
     494             :         outliner on SdrTextObj::Paint(). Among others, the paper size,
     495             :         control word and character stretching are initialized, such
     496             :         that the formatting should match the screen representation.
     497             :         The textual content of the outliner is not touched, i.e. no
     498             :         Init() or Clear() is called on the Outliner.
     499             : 
     500             :         @param rOutl
     501             :         The Outliner to setup.
     502             : 
     503             :         @param rPaintRect
     504             :         The region to paint the outliner content into. This is useful
     505             :         to e.g. determine the top, left position of text in shapes.
     506             :      */
     507             :     void SetupOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const;
     508             : 
     509             :     /** Update given Outliner equivalently to SdrTextObj::Paint()
     510             : 
     511             :         Same functionality as in SetupOutlinerFormatting(), except
     512             :         that the outliner content is not cleared.
     513             : 
     514             :         @param rOutl
     515             :         The Outliner to update.
     516             : 
     517             :         @param rPaintRect
     518             :         The region to paint the outliner content into. This is useful
     519             :         to e.g. determine the top, left position of text in shapes.
     520             :      */
     521             :     void UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const;
     522             :     void ForceOutlinerParaObject();
     523             :     virtual bool IsVerticalWriting() const;
     524             :     virtual void SetVerticalWriting(bool bVertical);
     525             : 
     526             :     /** called from the SdrObjEditView during text edit when the status of the edit outliner changes */
     527             :     virtual void onEditOutlinerStatusEvent( EditStatus* pEditStatus );
     528             : 
     529             : 
     530             : 
     531             :     // transformation interface for StarOfficeAPI. This implements support for
     532             :     // homogen 3x3 matrices containing the transformation of the SdrObject. At the
     533             :     // moment it contains a shearX, rotation and translation, but for setting all linear
     534             :     // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
     535             : 
     536             : 
     537             :     // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
     538             :     // with the base geometry and returns TRUE. Otherwise it returns FALSE.
     539             :     virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const SAL_OVERRIDE;
     540             : 
     541             :     // sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
     542             :     // If it's an SdrPathObj it will use the provided geometry information. The Polygon has
     543             :     // to use (0,0) as upper left and will be scaled to the given size in the matrix.
     544             :     virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon) SAL_OVERRIDE;
     545             : 
     546             :     // #103836# iterates over the paragraphs of a given SdrObject and removes all
     547             :     //          hard set character attributes with the which ids contained in the
     548             :     //          given vector
     549             :     virtual void RemoveOutlinerCharacterAttribs( const std::vector<sal_uInt16>& rCharWhichIds );
     550             : 
     551             :     // #111096#
     552             :     // Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a
     553             :     // painting rectangle. Rotation is taken from the object.
     554             :     GDIMetaFile* GetTextScrollMetaFileAndRectangle(Rectangle& rScrollRectangle, Rectangle& rPaintRectangle);
     555             : 
     556             :     // #111096#
     557             :     // Access to TextAnimationAllowed flag
     558             :     void SetTextAnimationAllowed(bool bNew);
     559             : 
     560             :     // #i8824#
     561             :     // Set single item at the local ItemSet. *Does not use* AllowItemChange(),
     562             :     // ItemChange(), PostItemChange() and ItemSetChanged() calls.
     563             :     void SetObjectItemNoBroadcast(const SfxPoolItem& rItem);
     564             : 
     565             : public:
     566             : 
     567             :     // text primitive decomposition helpers
     568             :     void impDecomposeContourTextPrimitive(
     569             :         drawinglayer::primitive2d::Primitive2DSequence& rTarget,
     570             :         const drawinglayer::primitive2d::SdrContourTextPrimitive2D& rSdrContourTextPrimitive,
     571             :         const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
     572             :     void impDecomposePathTextPrimitive(
     573             :         drawinglayer::primitive2d::Primitive2DSequence& rTarget,
     574             :         const drawinglayer::primitive2d::SdrPathTextPrimitive2D& rSdrPathTextPrimitive,
     575             :         const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
     576             :     void impDecomposeBlockTextPrimitive(
     577             :         drawinglayer::primitive2d::Primitive2DSequence& rTarget,
     578             :         const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive,
     579             :         const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
     580             :     void impDecomposeAutoFitTextPrimitive(
     581             :         drawinglayer::primitive2d::Primitive2DSequence& rTarget,
     582             :         const drawinglayer::primitive2d::SdrAutoFitTextPrimitive2D& rSdrAutofitTextPrimitive,
     583             :         const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
     584             :     void impDecomposeStretchTextPrimitive(
     585             :         drawinglayer::primitive2d::Primitive2DSequence& rTarget,
     586             :         const drawinglayer::primitive2d::SdrStretchTextPrimitive2D& rSdrStretchTextPrimitive,
     587             :         const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
     588             : 
     589             : 
     590             :     // timing generators
     591             :     void impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList) const;
     592             :     void impGetScrollTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList, double fFrameLength, double fTextLength) const;
     593             : 
     594             :     /** returns false if the given pointer is NULL
     595             :         or if the given SdrOutliner contains no text.
     596             :         Also checks for one empty paragraph.
     597             :     */
     598             :     static bool HasTextImpl( SdrOutliner* pOutliner );
     599             : };
     600             : 
     601             : 
     602             : 
     603             : #endif // INCLUDED_SVX_SVDOTEXT_HXX
     604             : 
     605             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10