Branch data 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 _SBSTDOBJ1_HXX
21 : : #define _SBSTDOBJ1_HXX
22 : :
23 : : #include <basic/sbxobj.hxx>
24 : : #include <vcl/graph.hxx>
25 : : #include <basic/sbxfac.hxx>
26 : : #include "basicdllapi.h"
27 : :
28 : : class StarBASIC;
29 : : class SbStdFactory;
30 : :
31 : : //--------------------
32 : : // class SbStdFactory
33 : : //--------------------
34 [ - + ]: 1556 : class BASIC_DLLPUBLIC SbStdFactory : public SbxFactory
35 : : {
36 : : public:
37 : : SbStdFactory();
38 : :
39 : : virtual SbxObject* CreateObject( const rtl::OUString& rClassName );
40 : : };
41 : :
42 : : //--------------------
43 : : // class SbStdPicture
44 : : //--------------------
45 : : class BASIC_DLLPUBLIC SbStdPicture : public SbxObject
46 : : {
47 : : protected:
48 : : Graphic aGraphic;
49 : :
50 : : ~SbStdPicture();
51 : : virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
52 : : const SfxHint& rHint, const TypeId& rHintType );
53 : :
54 : : void PropType( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
55 : : void PropWidth( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
56 : : void PropHeight( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
57 : :
58 : : public:
59 : : TYPEINFO();
60 : :
61 : : SbStdPicture();
62 : : virtual SbxVariable* Find( const rtl::OUString&, SbxClassType );
63 : :
64 : 0 : Graphic GetGraphic() const { return aGraphic; }
65 : 0 : void SetGraphic( const Graphic& rGrf ) { aGraphic = rGrf; }
66 : : };
67 : :
68 : : //-----------------
69 : : // class SbStdFont
70 : : //-----------------
71 : : class BASIC_DLLPUBLIC SbStdFont : public SbxObject
72 : : {
73 : : protected:
74 : : sal_Bool bBold;
75 : : sal_Bool bItalic;
76 : : sal_Bool bStrikeThrough;
77 : : sal_Bool bUnderline;
78 : : sal_uInt16 nSize;
79 : : String aName;
80 : :
81 : : ~SbStdFont();
82 : : virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
83 : : const SfxHint& rHint, const TypeId& rHintType );
84 : :
85 : : void PropBold( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
86 : : void PropItalic( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
87 : : void PropStrikeThrough( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
88 : : void PropUnderline( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
89 : : void PropSize( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
90 : : void PropName( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
91 : :
92 : : public:
93 : : TYPEINFO();
94 : :
95 : : SbStdFont();
96 : : virtual SbxVariable* Find( const rtl::OUString&, SbxClassType );
97 : :
98 : 0 : void SetBold( sal_Bool bB ) { bBold = bB; }
99 : 0 : sal_Bool IsBold() const { return bBold; }
100 : 0 : void SetItalic( sal_Bool bI ) { bItalic = bI; }
101 : 0 : sal_Bool IsItalic() const { return bItalic; }
102 : 0 : void SetStrikeThrough( sal_Bool bS ) { bStrikeThrough = bS; }
103 : 0 : sal_Bool IsStrikeThrough() const { return bStrikeThrough; }
104 : 0 : void SetUnderline( sal_Bool bU ) { bUnderline = bU; }
105 : 0 : sal_Bool IsUnderline() const { return bUnderline; }
106 : 0 : void SetSize( sal_uInt16 nS ) { nSize = nS; }
107 : 0 : sal_uInt16 GetSize() const { return nSize; }
108 : 0 : void SetFontName( const String& rName ) { aName = rName; }
109 : 0 : String GetFontName() const { return aName; }
110 : : };
111 : :
112 : : //----------------------
113 : : // class SbStdClipboard
114 : : //----------------------
115 : : class BASIC_DLLPUBLIC SbStdClipboard : public SbxObject
116 : : {
117 : : protected:
118 : :
119 : : ~SbStdClipboard();
120 : : virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
121 : : const SfxHint& rHint, const TypeId& rHintType );
122 : :
123 : : void MethClear( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
124 : : void MethGetData( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
125 : : void MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
126 : : void MethGetText( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
127 : : void MethSetData( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
128 : : void MethSetText( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
129 : :
130 : : public:
131 : : TYPEINFO();
132 : :
133 : : SbStdClipboard();
134 : : virtual SbxVariable* Find( const rtl::OUString&, SbxClassType );
135 : : };
136 : :
137 : : #endif
138 : :
139 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|