xref: /aoo41x/main/cui/source/inc/textattr.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _SVX_TEXTATTR_HXX
28 #define _SVX_TEXTATTR_HXX
29 
30 // include ---------------------------------------------------------------
31 
32 #include <svx/dlgctrl.hxx>
33 
34 #ifndef _GROUP_HXX //autogen
35 #include <vcl/group.hxx>
36 #endif
37 
38 #ifndef _FIXED_HXX //autogen
39 #include <vcl/fixed.hxx>
40 #endif
41 #include <sfx2/basedlgs.hxx>
42 
43 class SdrView;
44 
45 /*************************************************************************
46 |*
47 |* Dialog zum "Andern von TextAttributen
48 |*
49 \************************************************************************/
50 
51 class SvxTextAttrPage : public SvxTabPage
52 {
53 private:
54 	FixedLine			aFlText;
55 	TriStateBox         aTsbAutoGrowWidth;
56 	TriStateBox         aTsbAutoGrowHeight;
57 	TriStateBox			aTsbFitToSize;
58 	TriStateBox			aTsbContour;
59     TriStateBox         aTsbWordWrapText;
60     TriStateBox         aTsbAutoGrowSize;
61 
62 
63 	FixedLine			aFlDistance;
64 	FixedText			aFtLeft;
65 	MetricField			aMtrFldLeft;
66 	FixedText			aFtRight;
67 	MetricField			aMtrFldRight;
68 	FixedText			aFtTop;
69 	MetricField			aMtrFldTop;
70 	FixedText			aFtBottom;
71 	MetricField			aMtrFldBottom;
72 
73 	FixedLine			aFlSeparator;
74 
75 	FixedLine			aFlPosition;
76 	SvxRectCtl			aCtlPosition;
77 	TriStateBox			aTsbFullWidth;
78 
79 	const SfxItemSet&	rOutAttrs;
80 	const SdrView*		pView;
81 
82 	sal_Bool				bAutoGrowSizeEnabled;
83 	sal_Bool				bContourEnabled;
84     sal_Bool                bAutoGrowWidthEnabled;
85     sal_Bool                bAutoGrowHeightEnabled;
86     sal_Bool                bWordWrapTextEnabled;
87     sal_Bool                bFitToSizeEnabled;
88 
89 
90 #ifdef _SVX_TEXTATTR_CXX
91 	DECL_LINK( ClickFullWidthHdl_Impl, void * );
92 	DECL_LINK( ClickHdl_Impl, void * );
93 #endif
94 
95     /** Return whether the text direction is from left to right (</sal_True>) or
96         top to bottom (</sal_False>).
97     */
98     bool IsTextDirectionLeftToRight (void) const;
99 
100 public:
101 
102 	SvxTextAttrPage( Window* pWindow, const SfxItemSet& rInAttrs );
103 	~SvxTextAttrPage();
104 
105 	static SfxTabPage* 	Create( Window*, const SfxItemSet& );
106 	static  sal_uInt16*	    GetRanges();
107 
108 	virtual sal_Bool 		FillItemSet( SfxItemSet& );
109 	virtual void 		Reset( const SfxItemSet & );
110 
111 	virtual void 		PointChanged( Window* pWindow, RECT_POINT eRP );
112 
113 	void 		 Construct();
114 	void		 SetView( const SdrView* pSdrView ) { pView = pSdrView; }
115 	virtual void 			PageCreated(SfxAllItemSet aSet); // add CHINA001
116 };
117 
118 /*************************************************************************
119 |*
120 |* Von SfxSingleTabDialog abgeleitet, um vom Control "uber virtuelle Methode
121 |* benachrichtigt werden zu k"onnen.
122 |*
123 \************************************************************************/
124 
125 //CHINA001 class SvxTextAttrDialog : public SfxSingleTabDialog
126 //CHINA001 {
127 //CHINA001 public:
128 //CHINA001 SvxTextAttrDialog( Window* pParent, const SfxItemSet& rAttr,
129 //CHINA001 const SdrView* pView );
130 //CHINA001 ~SvxTextAttrDialog();
131 //CHINA001 };
132 
133 
134 #endif // _SVX_TEXTATTR_HXX
135 
136