fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / editeng / unoipset.hxx
blob584eb367f5a15a66457f7d5afd1ea83cc129cb95
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 _SVX_UNOIPSET_HXX_
21 #define _SVX_UNOIPSET_HXX_
23 #include <com/sun/star/beans/XPropertySetInfo.hpp>
24 #include <com/sun/star/beans/XPropertySet.hpp>
25 #include "editeng/editengdllapi.h"
26 #include <svl/itemprop.hxx>
27 #include <vector>
29 class SdrItemPool;
30 class SfxItemSet;
31 class SvxShape;
32 struct SvxIDPropertyCombine;
34 #define SFX_METRIC_ITEM (0x40)
36 class EDITENG_DLLPUBLIC SvxItemPropertySet
38 SfxItemPropertyMap m_aPropertyMap;
39 mutable com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo> m_xInfo;
40 const SfxItemPropertyMapEntry* _pMap;
41 ::std::vector< SvxIDPropertyCombine* > aCombineList;
42 sal_Bool mbConvertTwips;
43 SfxItemPool& mrItemPool;
45 public:
46 SvxItemPropertySet( const SfxItemPropertyMapEntry *pMap, SfxItemPool& rPool, sal_Bool bConvertTwips = sal_False );
47 ~SvxItemPropertySet();
49 // Methods, which work directly with the ItemSet
50 ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet, bool bSearchInParent, bool bDontConvertNegativeValues ) const;
51 void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& rVal, SfxItemSet& rSet, bool bDontConvertNegativeValues ) const;
53 // Methods that use Any instead
54 ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap ) const;
55 void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& rVal ) const;
57 sal_Bool AreThereOwnUsrAnys() const { return ( aCombineList.empty() ? sal_False : sal_True ); }
58 ::com::sun::star::uno::Any* GetUsrAnyForID(sal_uInt16 nWID) const;
59 void AddUsrAnyForID(const ::com::sun::star::uno::Any& rAny, sal_uInt16 nWID);
60 void ClearAllUsrAny();
62 com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > getPropertySetInfo() const;
63 const SfxItemPropertyMapEntry* getPropertyMapEntries() const {return _pMap;}
64 const SfxItemPropertyMap* getPropertyMap()const { return &m_aPropertyMap;}
65 const SfxItemPropertySimpleEntry* getPropertyMapEntry(const OUString &rName) const;
67 static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > getPropertySetInfo( const SfxItemPropertyMapEntry* pMap );
70 /** converts the given any with a metric to 100th/mm if needed */
71 EDITENG_DLLPUBLIC void SvxUnoConvertToMM( const SfxMapUnit eSourceMapUnit, com::sun::star::uno::Any & rMetric ) throw();
73 /** converts the given any with a metric from 100th/mm to the given metric if needed */
74 EDITENG_DLLPUBLIC void SvxUnoConvertFromMM( const SfxMapUnit eDestinationMapUnit, com::sun::star::uno::Any & rMetric ) throw();
76 #endif // _SVX_UNOIPSET_HXX_
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */