LibreOffice Module basic (master) 1
sbstdobj.hxx
Go to the documentation of this file.
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#pragma once
21
22#include <basic/sbxobj.hxx>
23#include <vcl/graph.hxx>
24#include "sbxfac.hxx"
25
26class SbStdFactory final : public SbxFactory
27{
28public:
30
31 virtual SbxObjectRef CreateObject( const OUString& rClassName ) override;
32};
33
34class SbStdPicture final : public SbxObject
35{
37
38 virtual ~SbStdPicture() override;
39 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
40
41 void PropType( SbxVariable* pVar, bool bWrite );
42 void PropWidth( SbxVariable* pVar, bool bWrite );
43 void PropHeight( SbxVariable* pVar, bool bWrite );
44
45public:
46
48
49 const Graphic& GetGraphic() const { return aGraphic; }
50 void SetGraphic( const Graphic& rGrf ) { aGraphic = rGrf; }
51};
52
53class SbStdFont final : public SbxObject
54{
55 bool bBold;
56 bool bItalic;
59 sal_uInt16 nSize;
60 OUString aName;
61
62 virtual ~SbStdFont() override;
63 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
64
65 void PropBold( SbxVariable* pVar, bool bWrite );
66 void PropItalic( SbxVariable* pVar, bool bWrite );
67 void PropStrikeThrough( SbxVariable* pVar, bool bWrite );
68 void PropUnderline( SbxVariable* pVar, bool bWrite );
69 void PropSize( SbxVariable* pVar, bool bWrite );
70 void PropName( SbxVariable* pVar, bool bWrite );
71
72public:
73
74 SbStdFont();
75
76 void SetBold( bool bB ) { bBold = bB; }
77 bool IsBold() const { return bBold; }
78 void SetItalic( bool bI ) { bItalic = bI; }
79 bool IsItalic() const { return bItalic; }
80 void SetStrikeThrough( bool bS ) { bStrikeThrough = bS; }
81 bool IsStrikeThrough() const { return bStrikeThrough; }
82 void SetUnderline( bool bU ) { bUnderline = bU; }
83 bool IsUnderline() const { return bUnderline; }
84 void SetSize( sal_uInt16 nS ) { nSize = nS; }
85 sal_uInt16 GetSize() const { return nSize; }
86};
87
88class SbStdClipboard final : public SbxObject
89{
90 virtual ~SbStdClipboard() override;
91 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
92
93 static void MethClear( SbxArray const * pPar_ );
94 static void MethGetData( SbxArray* pPar_ );
95 static void MethGetFormat( SbxVariable* pVar, SbxArray* pPar_ );
96 static void MethGetText( SbxVariable* pVar, SbxArray const * pPar_ );
97 static void MethSetData( SbxArray* pPar_ );
98 static void MethSetText( SbxArray const * pPar_ );
99
100public:
101
103};
104
105/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static void MethSetText(SbxArray const *pPar_)
Definition: stdobj1.cxx:351
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: stdobj1.cxx:394
virtual ~SbStdClipboard() override
Definition: stdobj1.cxx:390
static void MethGetText(SbxVariable *pVar, SbxArray const *pPar_)
Definition: stdobj1.cxx:323
static void MethGetData(SbxArray *pPar_)
Definition: stdobj1.cxx:288
static void MethClear(SbxArray const *pPar_)
Definition: stdobj1.cxx:278
static void MethSetData(SbxArray *pPar_)
Definition: stdobj1.cxx:334
static void MethGetFormat(SbxVariable *pVar, SbxArray *pPar_)
Definition: stdobj1.cxx:305
virtual SbxObjectRef CreateObject(const OUString &rClassName) override
Definition: stdobj1.cxx:50
void SetUnderline(bool bU)
Definition: sbstdobj.hxx:82
void PropSize(SbxVariable *pVar, bool bWrite)
Definition: stdobj1.cxx:189
bool IsUnderline() const
Definition: sbstdobj.hxx:83
void PropName(SbxVariable *pVar, bool bWrite)
Definition: stdobj1.cxx:197
bool IsBold() const
Definition: sbstdobj.hxx:77
void SetSize(sal_uInt16 nS)
Definition: sbstdobj.hxx:84
void PropStrikeThrough(SbxVariable *pVar, bool bWrite)
Definition: stdobj1.cxx:173
sal_uInt16 nSize
Definition: sbstdobj.hxx:59
bool bStrikeThrough
Definition: sbstdobj.hxx:57
void SetStrikeThrough(bool bS)
Definition: sbstdobj.hxx:80
bool IsItalic() const
Definition: sbstdobj.hxx:79
bool bItalic
Definition: sbstdobj.hxx:56
void PropUnderline(SbxVariable *pVar, bool bWrite)
Definition: stdobj1.cxx:181
bool bUnderline
Definition: sbstdobj.hxx:58
void PropBold(SbxVariable *pVar, bool bWrite)
Definition: stdobj1.cxx:157
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: stdobj1.cxx:245
bool bBold
Definition: sbstdobj.hxx:55
void SetBold(bool bB)
Definition: sbstdobj.hxx:76
bool IsStrikeThrough() const
Definition: sbstdobj.hxx:81
OUString aName
Definition: sbstdobj.hxx:60
void SetItalic(bool bI)
Definition: sbstdobj.hxx:78
void PropItalic(SbxVariable *pVar, bool bWrite)
Definition: stdobj1.cxx:165
virtual ~SbStdFont() override
Definition: stdobj1.cxx:241
sal_uInt16 GetSize() const
Definition: sbstdobj.hxx:85
Graphic aGraphic
Definition: sbstdobj.hxx:36
void PropHeight(SbxVariable *pVar, bool bWrite)
Definition: stdobj1.cxx:93
void PropType(SbxVariable *pVar, bool bWrite)
Definition: stdobj1.cxx:61
const Graphic & GetGraphic() const
Definition: sbstdobj.hxx:49
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: stdobj1.cxx:126
void PropWidth(SbxVariable *pVar, bool bWrite)
Definition: stdobj1.cxx:81
void SetGraphic(const Graphic &rGrf)
Definition: sbstdobj.hxx:50
virtual ~SbStdPicture() override
Definition: stdobj1.cxx:121
Definition: sbx.hxx:95