merge the formfield patch from ooo-build
[ooovba.git] / basic / inc / basic / sbstdobj.hxx
bloba4e3e1e8268556039967725650886314129f397f
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: sbstdobj.hxx,v $
10 * $Revision: 1.5 $
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 _SBSTDOBJ1_HXX
32 #define _SBSTDOBJ1_HXX
34 #include <basic/sbxobj.hxx>
35 #ifndef _GRAPH_HXX //autogen
36 #include <vcl/graph.hxx>
37 #endif
38 #include <basic/sbxfac.hxx>
39 class StarBASIC;
40 class SbStdFactory;
42 //--------------------
43 // class SbStdFactory
44 //--------------------
45 class SbStdFactory : public SbxFactory
47 public:
48 SbStdFactory();
50 virtual SbxObject* CreateObject( const String& rClassName );
53 //--------------------
54 // class SbStdPicture
55 //--------------------
56 class SbStdPicture : public SbxObject
58 protected:
59 Graphic aGraphic;
61 ~SbStdPicture();
62 virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
63 const SfxHint& rHint, const TypeId& rHintType );
65 void PropType( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
66 void PropWidth( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
67 void PropHeight( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
69 public:
70 TYPEINFO();
72 SbStdPicture();
73 virtual SbxVariable* Find( const String&, SbxClassType );
75 Graphic GetGraphic() const { return aGraphic; }
76 void SetGraphic( const Graphic& rGrf ) { aGraphic = rGrf; }
79 //-----------------
80 // class SbStdFont
81 //-----------------
82 class SbStdFont : public SbxObject
84 protected:
85 BOOL bBold;
86 BOOL bItalic;
87 BOOL bStrikeThrough;
88 BOOL bUnderline;
89 USHORT nSize;
90 String aName;
92 ~SbStdFont();
93 virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
94 const SfxHint& rHint, const TypeId& rHintType );
96 void PropBold( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
97 void PropItalic( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
98 void PropStrikeThrough( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
99 void PropUnderline( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
100 void PropSize( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
101 void PropName( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
103 public:
104 TYPEINFO();
106 SbStdFont();
107 virtual SbxVariable* Find( const String&, SbxClassType );
109 void SetBold( BOOL bB ) { bBold = bB; }
110 BOOL IsBold() const { return bBold; }
111 void SetItalic( BOOL bI ) { bItalic = bI; }
112 BOOL IsItalic() const { return bItalic; }
113 void SetStrikeThrough( BOOL bS ) { bStrikeThrough = bS; }
114 BOOL IsStrikeThrough() const { return bStrikeThrough; }
115 void SetUnderline( BOOL bU ) { bUnderline = bU; }
116 BOOL IsUnderline() const { return bUnderline; }
117 void SetSize( USHORT nS ) { nSize = nS; }
118 USHORT GetSize() const { return nSize; }
119 void SetFontName( const String& rName ) { aName = rName; }
120 String GetFontName() const { return aName; }
123 //----------------------
124 // class SbStdClipboard
125 //----------------------
126 class SbStdClipboard : public SbxObject
128 protected:
130 ~SbStdClipboard();
131 virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
132 const SfxHint& rHint, const TypeId& rHintType );
134 void MethClear( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite );
135 void MethGetData( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite );
136 void MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite );
137 void MethGetText( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite );
138 void MethSetData( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite );
139 void MethSetText( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite );
141 public:
142 TYPEINFO();
144 SbStdClipboard();
145 virtual SbxVariable* Find( const String&, SbxClassType );
148 #endif