LibreOffice Module editeng (master) 1
unoipset.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#ifndef INCLUDED_EDITENG_UNOIPSET_HXX
21#define INCLUDED_EDITENG_UNOIPSET_HXX
22
24#include <svl/itemprop.hxx>
25#include <vector>
26
27namespace com::sun::star::beans { class XPropertySetInfo; }
28
29class SfxItemSet;
31
33{
35 mutable css::uno::Reference<css::beans::XPropertySetInfo> m_xInfo;
37
38public:
41
42 SvxItemPropertySet& operator=( SvxItemPropertySet const & ) = delete; // MSVC2015 workaround
43 SvxItemPropertySet( SvxItemPropertySet const & ) = delete; // MSVC2015 workaround
44
45 // Methods, which work directly with the ItemSet
46 static css::uno::Any getPropertyValue( const SfxItemPropertyMapEntry* pMap, const SfxItemSet& rSet, bool bSearchInParent, bool bDontConvertNegativeValues );
47 static void setPropertyValue( const SfxItemPropertyMapEntry* pMap, const css::uno::Any& rVal, SfxItemSet& rSet, bool bDontConvertNegativeValues );
48
49 // Methods that use Any instead
50 css::uno::Any getPropertyValue( const SfxItemPropertyMapEntry* pMap, SvxItemPropertySetUsrAnys& rAnys ) const;
51 static void setPropertyValue( const SfxItemPropertyMapEntry* pMap, const css::uno::Any& rVal, SvxItemPropertySetUsrAnys& rAnys );
52
53 css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const;
54 const SfxItemPropertyMap& getPropertyMap() const { return m_aPropertyMap;}
55 const SfxItemPropertyMapEntry* getPropertyMapEntry(std::u16string_view rName) const;
56};
57
59{
60 sal_uInt16 nWID;
62 css::uno::Any aAny;
63};
64
65
67{
68 ::std::vector< SvxIDPropertyCombine > aCombineList;
69
70public:
73 bool AreThereOwnUsrAnys() const { return ! aCombineList.empty(); }
74 css::uno::Any* GetUsrAnyForID(SfxItemPropertyMapEntry const & entry) const;
75 void AddUsrAnyForID(const css::uno::Any& rAny, SfxItemPropertyMapEntry const & entry);
76 void ClearAllUsrAny();
77};
78
80EDITENG_DLLPUBLIC void SvxUnoConvertToMM( const MapUnit eSourceMapUnit, css::uno::Any & rMetric ) noexcept;
81
83EDITENG_DLLPUBLIC void SvxUnoConvertFromMM( const MapUnit eDestinationMapUnit, css::uno::Any & rMetric ) noexcept;
84
85#endif // INCLUDED_EDITENG_UNOIPSET_HXX
86
87/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::std::vector< SvxIDPropertyCombine > aCombineList
Definition: unoipset.hxx:68
bool AreThereOwnUsrAnys() const
Definition: unoipset.hxx:73
SvxItemPropertySet(SvxItemPropertySet const &)=delete
static void setPropertyValue(const SfxItemPropertyMapEntry *pMap, const css::uno::Any &rVal, SfxItemSet &rSet, bool bDontConvertNegativeValues)
SfxItemPropertyMap m_aPropertyMap
Definition: unoipset.hxx:34
css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo
Definition: unoipset.hxx:35
SfxItemPool & mrItemPool
Definition: unoipset.hxx:36
SvxItemPropertySet & operator=(SvxItemPropertySet const &)=delete
static void setPropertyValue(const SfxItemPropertyMapEntry *pMap, const css::uno::Any &rVal, SvxItemPropertySetUsrAnys &rAnys)
const SfxItemPropertyMap & getPropertyMap() const
Definition: unoipset.hxx:54
#define EDITENG_DLLPUBLIC
Definition: editengdllapi.h:28
MapUnit
bool getPropertyValue(ValueType &rValue, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, OUString const &propName)
sal_uInt8 memberId
Definition: unoipset.hxx:61
css::uno::Any aAny
Definition: unoipset.hxx:62
unsigned char sal_uInt8
EDITENG_DLLPUBLIC void SvxUnoConvertFromMM(const MapUnit eDestinationMapUnit, css::uno::Any &rMetric) noexcept
converts the given any with a metric from 100th/mm to the given metric if needed
EDITENG_DLLPUBLIC void SvxUnoConvertToMM(const MapUnit eSourceMapUnit, css::uno::Any &rMetric) noexcept
converts the given any with a metric to 100th/mm if needed