21#include <com/sun/star/uno/Sequence.hxx>
22#include <com/sun/star/beans/PropertyValue.hpp>
25#include <osl/diagnose.h>
34#define VIEWLAYOUT_PARAMS 2
44 mbBookMode( bBookMode )
51 mbBookMode( rOrig.IsBookMode() )
67 assert(SfxPoolItem::operator==(rAttr));
77 nMemberId &= ~CONVERT_TWIPS;
82 css::uno::Sequence< css::beans::PropertyValue >
aSeq{
91 case MID_VIEWLAYOUT_COLUMNS : rVal <<= static_cast<sal_Int32>(
GetValue());
break;
92 case MID_VIEWLAYOUT_BOOKMODE: rVal <<=
mbBookMode;
break;
94 OSL_FAIL(
"svx::SvxViewLayoutItem::QueryValue(), Wrong MemberId!");
103 nMemberId &= ~CONVERT_TWIPS;
108 css::uno::Sequence< css::beans::PropertyValue >
aSeq;
111 sal_Int32 nColumns( 0 );
112 bool bBookMode =
false;
113 bool bAllConverted(
true );
114 sal_Int16 nConvertedCount( 0 );
115 for (
const auto& rProp : std::as_const(
aSeq) )
119 bAllConverted &= ( rProp.Value >>= nColumns );
124 bAllConverted &= ( rProp.Value >>= bBookMode );
131 SetValue(
static_cast<sal_uInt16
>(nColumns) );
140 case MID_VIEWLAYOUT_COLUMNS:
145 SetValue(
static_cast<sal_uInt16
>(nVal) );
152 case MID_VIEWLAYOUT_BOOKMODE:
154 bool bBookMode =
false;
155 if ( rVal >>= bBookMode )
165 OSL_FAIL(
"svx::SvxViewLayoutItem::PutValue(), Wrong MemberId!");
sal_uInt16 GetValue() const
void SetValue(sal_uInt16 nTheValue)
virtual bool operator==(const SfxPoolItem &) const override
virtual ~SvxViewLayoutItem() override
SvxViewLayoutItem(sal_uInt16 nColumns=0, bool bBookMode=false, TypedWhichId< SvxViewLayoutItem > nWhich=SID_ATTR_VIEWLAYOUT)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
static SfxPoolItem * CreateDefault()
virtual SvxViewLayoutItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
Sequence< sal_Int8 > aSeq
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
constexpr OUStringLiteral VIEWLAYOUT_PARAM_BOOKMODE
#define VIEWLAYOUT_PARAMS
constexpr OUStringLiteral VIEWLAYOUT_PARAM_COLUMNS