update credits
[LibreOffice.git] / include / svl / visitem.hxx
blobadb72d0578e7788115ebef14cb972fd6967e64c6
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 _SFXVISIBILITYITEM_HXX
21 #define _SFXVISIBILITYITEM_HXX
23 #include "svl/svldllapi.h"
24 #include <tools/debug.hxx>
25 #include <svl/poolitem.hxx>
26 #include <com/sun/star/frame/status/Visibility.hpp>
28 //============================================================================
29 DBG_NAMEEX_VISIBILITY(SfxVisibilityItem, SVL_DLLPUBLIC)
31 class SVL_DLLPUBLIC SfxVisibilityItem: public SfxPoolItem
33 ::com::sun::star::frame::status::Visibility m_nValue;
35 public:
36 TYPEINFO();
38 explicit SfxVisibilityItem(sal_uInt16 which = 0, sal_Bool bVisible = sal_True):
39 SfxPoolItem(which)
41 m_nValue.bVisible = bVisible;
42 DBG_CTOR(SfxVisibilityItem, 0);
45 SfxVisibilityItem(sal_uInt16 which, SvStream & rStream);
47 SfxVisibilityItem(const SfxVisibilityItem & rItem):
48 SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
49 { DBG_CTOR(SfxVisibilityItem, 0); }
51 virtual ~SfxVisibilityItem() { DBG_DTOR(SfxVisibilityItem, 0); }
53 virtual int operator ==(const SfxPoolItem & rItem) const;
55 using SfxPoolItem::Compare;
56 virtual int Compare(const SfxPoolItem & rWith) const;
58 virtual SfxItemPresentation GetPresentation(SfxItemPresentation,
59 SfxMapUnit, SfxMapUnit,
60 OUString & rText,
61 const IntlWrapper * = 0)
62 const;
64 virtual bool QueryValue( com::sun::star::uno::Any& rVal,
65 sal_uInt8 nMemberId = 0 ) const;
67 virtual bool PutValue( const com::sun::star::uno::Any& rVal,
68 sal_uInt8 nMemberId = 0 );
70 virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
72 virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
74 virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
76 virtual sal_uInt16 GetValueCount() const;
78 virtual OUString GetValueTextByVal(sal_Bool bTheValue) const;
80 sal_Bool GetValue() const { return m_nValue.bVisible; }
82 void SetValue(sal_Bool bVisible) { m_nValue.bVisible = bVisible; }
85 #endif // _SFXVISIBILITYITEM_HXX
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */