22 #include <sfx2/sfxsids.hrc>
35 if ( SfxItemState::SET == rSet.
GetItemState( SID_ATTR_METRIC,
false, &pItem ) )
36 eUnit = static_cast<FieldUnit>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
47 bool bUseCharUnit =
false;
49 if ( SfxItemState::SET == rSet.
GetItemState( SID_ATTR_APPLYCHARUNIT,
false, &pItem ) )
50 bUseCharUnit = static_cast<const SfxBoolItem*>(pItem)->GetValue();
63 pItem = pModule->
GetItem( SID_ATTR_APPLYCHARUNIT );
69 SAL_WARN(
"svx.dialog",
"GetApplyCharUnit(): no module found" );
static FieldUnit GetCurrentFieldUnit()
virtual SfxObjectShell * GetObjectShell() override
FieldUnit GetModuleFieldUnit(const SfxItemSet &rSet)
SfxModule * GetModule() const
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
static SfxViewFrame * Current()
#define SAL_WARN(area, stream)
bool GetApplyCharUnit(const SfxItemSet &rSet)