Update ooo320-m1
[ooovba.git] / svx / source / items / boxobj.hxx
blobc9dd80a5556a6b81a4c9309109a2d2297cf66a0e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: boxobj.hxx,v $
10 * $Revision: 1.3.76.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SVX_BOXOBJ_HXX
31 #define _SVX_BOXOBJ_HXX
34 #ifndef _SFX_SHOBJ_HXX //autogen
35 #include <sfx2/shobj.hxx>
36 #endif
37 class SvxBoxItem;
38 class SvxBoxInfoItem;
39 class SvxBorderLine;
41 //-------------------------------------------------------------------------
43 class SvxBoxObject: public SfxShellSubObject
45 /* [Beschreibung]
47 Diese SbxObject-Subklasse kann das <SvxBoxItem> und <SvxBoxInfoItem>
48 im SBX-System recorden und wieder abspielen. Hier werden keine
49 G"ultigkeitspr"ufungen durchgef"uhrt, diese m"ussen in abgeleiteten
50 Klassen spezifisch implementiert werden; dazu sind virtuelle Methoden
51 vorhanden.
55 friend class SvxBoxLineObject_Impl;
57 SvxBoxItem* pBox;
58 SvxBoxInfoItem* pBoxInfo;
60 #ifdef _SVX_BOXOBJ_CXX
61 private:
62 const SvxBorderLine* GetLine_Impl( USHORT nSID ) const;
63 BOOL SetLine_Impl( USHORT nSID, const SvxBorderLine *pLine );
64 void Update_Impl() const;
65 #endif
67 protected:
68 // Schnittstelle zum SbxObject/SvDispatch/SfxShell..Object
69 void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
70 virtual ULONG SetProperty( USHORT nSID, SbxVariable &rRet );
71 virtual ULONG GetProperty( USHORT nSID, SbxVariable &rRet );
73 // bei den folgenden Methoden sind die Items bereits besorgt worden
74 virtual SbxError GetLineColor( USHORT nSID, Color &rColor ) const;
75 virtual SbxError GetLineStyle( USHORT nSID,
76 USHORT &rOutWidth, USHORT &rDist, USHORT &rInWidth ) const;
77 virtual SbxError GetDistance( USHORT &rDist ) const;
79 // nach den folgenden Methoden werden die Items wieder in die Shell gesetzt
80 virtual SbxError SetLineColor( USHORT nSID, const Color &rColor );
81 virtual SbxError SetLineStyle( USHORT nSID,
82 USHORT nOutWidth, USHORT nDist, USHORT nInWidth );
83 virtual SbxError SetDistance( USHORT nDist );
85 public:
86 TYPEINFO();
87 SvxBoxObject( SfxShell *pShell = 0 );
89 ~SvxBoxObject();
91 const SvxBoxItem& GetBoxItem() const { return *pBox; }
92 const SvxBoxInfoItem& GetBoxInfoItem() const { return *pBoxInfo; }
94 virtual String GenerateSource( const String &rLinePrefix,
95 const SbxObject *pRelativeTo );
99 #endif