21#include <com/sun/star/uno/Sequence.hxx>
22#include <com/sun/star/beans/PropertyValue.hpp>
25#include <osl/diagnose.h>
57 assert(SfxPoolItem::operator==(rAttr));
68 nMemberId &= ~CONVERT_TWIPS;
73 css::uno::Sequence< css::beans::PropertyValue >
aSeq{
87 OSL_FAIL(
"sfx2::SvxZoomItem::QueryValue(), Wrong MemberId!");
96 nMemberId &= ~CONVERT_TWIPS;
101 css::uno::Sequence< css::beans::PropertyValue >
aSeq;
104 sal_Int32 nValueTmp( 0 );
105 sal_Int16 nValueSetTmp( 0 );
106 sal_Int16 nTypeTmp( 0 );
107 bool bAllConverted(
true );
108 sal_Int16 nConvertedCount( 0 );
109 for (
const auto& rProp : std::as_const(
aSeq) )
113 bAllConverted &= ( rProp.Value >>= nValueTmp );
118 bAllConverted &= ( rProp.Value >>= nValueSetTmp );
123 bAllConverted &= ( rProp.Value >>= nTypeTmp );
128 if ( bAllConverted && nConvertedCount ==
ZOOM_PARAMS )
130 SetValue(
static_cast<sal_uInt16
>(nValueTmp) );
143 SetValue(
static_cast<sal_uInt16
>(nVal) );
167 OSL_FAIL(
"sfx2::SvxZoomItem::PutValue(), Wrong MemberId!");
sal_uInt16 GetValue() const
void SetValue(sal_uInt16 nTheValue)
SvxZoomEnableFlags GetValueSet() const
virtual SvxZoomItem * Clone(SfxItemPool *pPool=nullptr) const override
SvxZoomEnableFlags nValueSet
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
static SfxPoolItem * CreateDefault()
virtual bool operator==(const SfxPoolItem &) const override
SvxZoomType GetType() const
SvxZoomItem(SvxZoomType eZoomType=SvxZoomType::PERCENT, sal_uInt16 nVal=0, TypedWhichId< SvxZoomItem > nWhich=SID_ATTR_ZOOM)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
Sequence< sal_Int8 > aSeq
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
constexpr OUStringLiteral ZOOM_PARAM_VALUE
constexpr OUStringLiteral ZOOM_PARAM_TYPE
constexpr OUStringLiteral ZOOM_PARAM_VALUESET