1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _SBSTDOBJ1_HXX 25 #define _SBSTDOBJ1_HXX 26 27 #include <basic/sbxobj.hxx> 28 #ifndef _GRAPH_HXX //autogen 29 #include <vcl/graph.hxx> 30 #endif 31 #include <basic/sbxfac.hxx> 32 class StarBASIC; 33 class SbStdFactory; 34 35 //-------------------- 36 // class SbStdFactory 37 //-------------------- 38 class SbStdFactory : public SbxFactory 39 { 40 public: 41 SbStdFactory(); 42 43 virtual SbxObject* CreateObject( const String& rClassName ); 44 }; 45 46 //-------------------- 47 // class SbStdPicture 48 //-------------------- 49 class SbStdPicture : public SbxObject 50 { 51 protected: 52 Graphic aGraphic; 53 54 ~SbStdPicture(); 55 virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, 56 const SfxHint& rHint, const TypeId& rHintType ); 57 58 void PropType( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); 59 void PropWidth( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); 60 void PropHeight( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); 61 62 public: 63 TYPEINFO(); 64 65 SbStdPicture(); 66 virtual SbxVariable* Find( const String&, SbxClassType ); 67 68 Graphic GetGraphic() const { return aGraphic; } 69 void SetGraphic( const Graphic& rGrf ) { aGraphic = rGrf; } 70 }; 71 72 //----------------- 73 // class SbStdFont 74 //----------------- 75 class SbStdFont : public SbxObject 76 { 77 protected: 78 sal_Bool bBold; 79 sal_Bool bItalic; 80 sal_Bool bStrikeThrough; 81 sal_Bool bUnderline; 82 sal_uInt16 nSize; 83 String aName; 84 85 ~SbStdFont(); 86 virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, 87 const SfxHint& rHint, const TypeId& rHintType ); 88 89 void PropBold( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); 90 void PropItalic( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); 91 void PropStrikeThrough( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); 92 void PropUnderline( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); 93 void PropSize( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); 94 void PropName( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); 95 96 public: 97 TYPEINFO(); 98 99 SbStdFont(); 100 virtual SbxVariable* Find( const String&, SbxClassType ); 101 102 void SetBold( sal_Bool bB ) { bBold = bB; } 103 sal_Bool IsBold() const { return bBold; } 104 void SetItalic( sal_Bool bI ) { bItalic = bI; } 105 sal_Bool IsItalic() const { return bItalic; } 106 void SetStrikeThrough( sal_Bool bS ) { bStrikeThrough = bS; } 107 sal_Bool IsStrikeThrough() const { return bStrikeThrough; } 108 void SetUnderline( sal_Bool bU ) { bUnderline = bU; } 109 sal_Bool IsUnderline() const { return bUnderline; } 110 void SetSize( sal_uInt16 nS ) { nSize = nS; } 111 sal_uInt16 GetSize() const { return nSize; } 112 void SetFontName( const String& rName ) { aName = rName; } 113 String GetFontName() const { return aName; } 114 }; 115 116 //---------------------- 117 // class SbStdClipboard 118 //---------------------- 119 class SbStdClipboard : public SbxObject 120 { 121 protected: 122 123 ~SbStdClipboard(); 124 virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, 125 const SfxHint& rHint, const TypeId& rHintType ); 126 127 void MethClear( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite ); 128 void MethGetData( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite ); 129 void MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite ); 130 void MethGetText( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite ); 131 void MethSetData( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite ); 132 void MethSetText( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite ); 133 134 public: 135 TYPEINFO(); 136 137 SbStdClipboard(); 138 virtual SbxVariable* Find( const String&, SbxClassType ); 139 }; 140 141 #endif 142