Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / basic / inc / sbstdobj.hxx
blob6fe0d54125549cae2a98ca4874e88fc58c226af7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_BASIC_INC_SBSTDOBJ_HXX
21 #define INCLUDED_BASIC_INC_SBSTDOBJ_HXX
23 #include <basic/sbxobj.hxx>
24 #include <vcl/graph.hxx>
25 #include <basic/sbxfac.hxx>
26 #include <basic/basicdllapi.h>
28 // class SbStdFactory
29 class SbStdFactory : public SbxFactory
31 public:
32 SbStdFactory();
34 virtual SbxObject* CreateObject( const OUString& rClassName ) override;
37 // class SbStdPicture
38 class SbStdPicture final : public SbxObject
40 Graphic aGraphic;
42 virtual ~SbStdPicture() override;
43 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
45 void PropType( SbxVariable* pVar, bool bWrite );
46 void PropWidth( SbxVariable* pVar, bool bWrite );
47 void PropHeight( SbxVariable* pVar, bool bWrite );
49 public:
51 SbStdPicture();
53 const Graphic& GetGraphic() const { return aGraphic; }
54 void SetGraphic( const Graphic& rGrf ) { aGraphic = rGrf; }
57 // class SbStdFont
58 class SbStdFont final : public SbxObject
60 bool bBold;
61 bool bItalic;
62 bool bStrikeThrough;
63 bool bUnderline;
64 sal_uInt16 nSize;
65 OUString aName;
67 virtual ~SbStdFont() override;
68 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
70 void PropBold( SbxVariable* pVar, bool bWrite );
71 void PropItalic( SbxVariable* pVar, bool bWrite );
72 void PropStrikeThrough( SbxVariable* pVar, bool bWrite );
73 void PropUnderline( SbxVariable* pVar, bool bWrite );
74 void PropSize( SbxVariable* pVar, bool bWrite );
75 void PropName( SbxVariable* pVar, bool bWrite );
77 public:
79 SbStdFont();
81 void SetBold( bool bB ) { bBold = bB; }
82 bool IsBold() const { return bBold; }
83 void SetItalic( bool bI ) { bItalic = bI; }
84 bool IsItalic() const { return bItalic; }
85 void SetStrikeThrough( bool bS ) { bStrikeThrough = bS; }
86 bool IsStrikeThrough() const { return bStrikeThrough; }
87 void SetUnderline( bool bU ) { bUnderline = bU; }
88 bool IsUnderline() const { return bUnderline; }
89 void SetSize( sal_uInt16 nS ) { nSize = nS; }
90 sal_uInt16 GetSize() const { return nSize; }
91 const OUString& GetFontName() const { return aName; }
94 // class SbStdClipboard
95 class SbStdClipboard final : public SbxObject
97 virtual ~SbStdClipboard() override;
98 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
100 static void MethClear( SbxArray const * pPar_ );
101 static void MethGetData( SbxArray* pPar_ );
102 static void MethGetFormat( SbxVariable* pVar, SbxArray* pPar_ );
103 static void MethGetText( SbxVariable* pVar, SbxArray const * pPar_ );
104 static void MethSetData( SbxArray* pPar_ );
105 static void MethSetText( SbxArray const * pPar_ );
107 public:
109 SbStdClipboard();
112 #endif // INCLUDED_BASIC_INC_SBSTDOBJ_HXX
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */