Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_svx / svdocapt.hxx
blob6c1a1c60cb605ac47ea90dd2a678a448d6fb59d5
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: svdocapt.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SVDCAPT_HXX
32 #define _SVDCAPT_HXX
34 #ifndef _SVDORECT_HXX
35 #include <bf_svx/svdorect.hxx>
36 #endif
37 namespace binfilter {
39 //************************************************************
40 // Vorausdeklarationen
41 //************************************************************
43 class SdrCaptionSetItem;
44 class ImpCaptParams;
46 #define SDRSETITEM_CAPTION_ATTR SDRSETITEM_ATTR_COUNT
48 //************************************************************
49 // Hilfsklasse SdrCaptObjGeoData
50 //************************************************************
52 class SdrCaptObjGeoData : public SdrRectObjGeoData
54 public:
55 Polygon aTailPoly;
58 //************************************************************
59 // SdrCaptionObj
60 //************************************************************
62 class SdrCaptionObj : public SdrRectObj
64 friend class SdrTextObj; // fuer ImpRecalcTail() bei AutoGrow
66 protected:
67 Polygon aTailPoly; // das ganze Polygon des Schwanzes
68 sal_Bool mbSpecialTextBoxShadow; // for calc special shadow, default FALSE
70 private:
71 void ImpGetCaptParams(ImpCaptParams& rPara) const;
72 void ImpCalcTail3(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const;
73 void ImpCalcTail (const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const;
74 void ImpRecalcTail();
76 public:
77 TYPEINFO();
78 SdrCaptionObj();
79 virtual ~SdrCaptionObj();
81 virtual UINT16 GetObjIdentifier() const;
82 virtual void RecalcBoundRect();
84 // for calc: special shadow only for text box
85 void SetSpecialTextBoxShadow() { mbSpecialTextBoxShadow = TRUE; }
88 virtual void SetModel(SdrModel* pNewModel);
90 // ItemSet access
91 virtual SfxItemSet* CreateNewItemSet(SfxItemPool& rPool);
93 // private support routines for ItemSet access. NULL pointer means clear item.
94 virtual void ItemSetChanged(const SfxItemSet& rSet);
96 // pre- and postprocessing for objects for saving
97 virtual void PreSave();
98 virtual void PostSave();
100 virtual void NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr);
105 virtual void NbcMove(const Size& rSiz);
106 virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
108 virtual void NbcSetAnchorPos(const Point& rPnt);
109 virtual const Point& GetAnchorPos() const;
111 virtual void RecalcSnapRect();
112 virtual const Rectangle& GetSnapRect() const;
113 virtual void NbcSetSnapRect(const Rectangle& rRect);
116 protected:
118 public:
120 virtual void WriteData(SvStream& rOut) const;
121 virtual void ReadData(const SdrObjIOHeader& rHead, SvStream& rIn);
123 const Point& GetTailPos() const;
124 void SetTailPos(const Point& rPos);
125 void NbcSetTailPos(const Point& rPos);
128 ////////////////////////////////////////////////////////////////////////////////////////////////////
130 }//end of namespace binfilter
131 #endif //_SVDOCAPT_HXX