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