split up SwGetRefFieldType::FindAnchor method
[LibreOffice.git] / basic / inc / sbstdobj.hxx
blob69db5c9ba9d58888bd2e9bab364cb4085253aa21
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 #pragma once
22 #include <basic/sbxobj.hxx>
23 #include <vcl/graph.hxx>
24 #include "sbxfac.hxx"
26 class SbStdFactory final : public SbxFactory
28 public:
29 SbStdFactory();
31 virtual SbxObjectRef CreateObject( const OUString& rClassName ) override;
34 class SbStdPicture final : public SbxObject
36 Graphic aGraphic;
38 virtual ~SbStdPicture() override;
39 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
41 void PropType( SbxVariable* pVar, bool bWrite );
42 void PropWidth( SbxVariable* pVar, bool bWrite );
43 void PropHeight( SbxVariable* pVar, bool bWrite );
45 public:
47 SbStdPicture();
49 const Graphic& GetGraphic() const { return aGraphic; }
50 void SetGraphic( const Graphic& rGrf ) { aGraphic = rGrf; }
53 class SbStdFont final : public SbxObject
55 bool bBold;
56 bool bItalic;
57 bool bStrikeThrough;
58 bool bUnderline;
59 sal_uInt16 nSize;
60 OUString aName;
62 virtual ~SbStdFont() override;
63 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
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 );
72 public:
74 SbStdFont();
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; }
88 class SbStdClipboard final : public SbxObject
90 virtual ~SbStdClipboard() override;
91 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
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_ );
100 public:
102 SbStdClipboard();
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */