20#include <com/sun/star/drawing/ColorMode.hpp>
25#include <osl/diagnose.h>
52 return bEnum != bToggle;
67 nMemberId &= ~CONVERT_TWIPS;
81 OSL_ENSURE(
false,
"unknown MemberId" );
91 bool bVal = *o3tl::doAccess<bool>(rVal);
93 nMemberId &= ~CONVERT_TWIPS;
108 bool bToggle = bOnOddPages != bOnEvenPages;
130 OSL_ENSURE(
false,
"unknown MemberId" );
154 DBG_ASSERT(
false,
"SwRotationGrf: Value is in 10th degree and *has* to be in [0 .. 3600[ (!)");
155 return 3600_deg10 +
nValue % 3600_deg10;
157 else if (
nValue >= 3600_deg10)
160 DBG_ASSERT(
false,
"SwRotationGrf: Value is in 10th degree and *has* to be in [0 .. 3600[ (!)");
161 return nValue % 3600_deg10;
170 m_aUnrotatedSize( rSz )
189 rVal <<= static_cast<sal_Int16>(
GetValue());
206 OSL_FAIL(
"SwRotationGrf::PutValue - Wrong type!" );
279 OSL_ENSURE( 0 <= nRet && nRet <= 100,
"value out of range" );
288 if(!(rVal >>= nVal) || nVal < -100 || nVal > 100)
294 nVal = ( ( nVal * 128 ) - (99/2) ) / 100;
297 OSL_ENSURE( 0 <= nVal && nVal <= 100,
"value out of range" );
313 return sal_uInt16(GraphicDrawMode::Watermark) + 1;
319 drawing::ColorMode eRet =
static_cast<drawing::ColorMode
>(
GetEnumValue());
328 if(eVal >= 0 && eVal <= sal_uInt16(GraphicDrawMode::Watermark))
void SetValue(sal_uInt8 nTheValue)
sal_uInt8 GetValue() const
virtual bool operator==(const SfxPoolItem &rItem) const override
virtual sal_uInt16 GetEnumValue() const override
void SetValue(EnumT nTheValue)
virtual void SetEnumValue(sal_uInt16 nTheValue) override
virtual bool operator==(SfxPoolItem const &other) const override
virtual bool operator==(const SfxPoolItem &) const=0
SwChannelBGrf(sal_Int16 nVal=0)
virtual SwChannelBGrf * Clone(SfxItemPool *pPool=nullptr) const override
SwChannelGGrf(sal_Int16 nVal=0)
virtual SwChannelGGrf * Clone(SfxItemPool *pPool=nullptr) const override
SwChannelRGrf(sal_Int16 nVal=0)
virtual SwChannelRGrf * Clone(SfxItemPool *pPool=nullptr) const override
SwContrastGrf(sal_Int16 nVal=0)
virtual SwContrastGrf * Clone(SfxItemPool *pPool=nullptr) const override
virtual SwCropGrf * Clone(SfxItemPool *pPool=nullptr) const override
virtual SwDrawModeGrf * Clone(SfxItemPool *pPool=nullptr) const override
virtual sal_uInt16 GetValueCount() const override
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
SwDrawModeGrf(GraphicDrawMode nMode=GraphicDrawMode::Standard)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
virtual bool operator==(const SfxPoolItem &) const override
const double & GetValue() const
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
virtual SwGammaGrf * Clone(SfxItemPool *pPool=nullptr) const override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
virtual SwInvertGrf * Clone(SfxItemPool *pPool=nullptr) const override
SwInvertGrf(bool bVal=false)
virtual SwLuminanceGrf * Clone(SfxItemPool *pPool=nullptr) const override
SwLuminanceGrf(sal_Int16 nVal=0)
virtual SwMirrorGrf * Clone(SfxItemPool *pPool=nullptr) const override
SwMirrorGrf(MirrorGraph eMiro=MirrorGraph::Dont)
virtual bool operator==(const SfxPoolItem &) const override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
void SetGrfToggle(bool bNew)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
virtual sal_uInt16 GetValueCount() const override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
virtual bool operator==(const SfxPoolItem &) const override
static Degree10 checkAndCorrectValue(Degree10 nValue)
virtual SwRotationGrf * Clone(SfxItemPool *pPool=nullptr) const override
const Size & GetUnrotatedSize() const
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
void SetValue(Degree10 d)
Degree10 GetValue() const
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
SwTransparencyGrf(sal_Int8 nVal=0)
virtual SwTransparencyGrf * Clone(SfxItemPool *pPool=nullptr) const override
#define DBG_ASSERT(sCon, aError)
static bool lcl_IsHoriOnEvenPages(MirrorGraph nEnum, bool bToggle)
static bool lcl_IsHoriOnOddPages(MirrorGraph nEnum)
constexpr TypedWhichId< SwRotationGrf > RES_GRFATR_ROTATION(143)
constexpr TypedWhichId< SwCropGrf > RES_GRFATR_CROPGRF(142)
sal_Int32 GetEnumAsInt32(const css::uno::Any &rVal)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
#define MID_MIRROR_HORZ_ODD_PAGES
#define MID_MIRROR_HORZ_EVEN_PAGES