diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-02-03 11:03:54 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-02-03 11:03:54 +0100 |
commit | 3eab2443ad2d4ebb53af8ee6a27987564c631690 (patch) | |
tree | 19780010af9845ce67c9121608b3b547fad1cf8e /svx | |
parent | 804ec146aef02c1f7b4fc8ae3e3b1b76dee5fc6e (diff) |
#i107450#: need to reintroduce guessing of metric as not all ItemSets provide the item
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/dlgutil.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/svx/source/dialog/dlgutil.cxx b/svx/source/dialog/dlgutil.cxx index 75e96845e549..0a2685522c14 100644 --- a/svx/source/dialog/dlgutil.cxx +++ b/svx/source/dialog/dlgutil.cxx @@ -36,6 +36,7 @@ #include "dlgutil.hxx" #include <svl/itemset.hxx> #include <sfx2/sfxsids.hrc> +#include <sfx2/module.hxx> #include <svl/intitem.hxx> // ----------------------------------------------------------------------- @@ -46,6 +47,12 @@ FieldUnit GetModuleFieldUnit( const SfxItemSet& rSet ) const SfxPoolItem* pItem = NULL; if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_METRIC, FALSE, &pItem ) ) eUnit = (FieldUnit)( (const SfxUInt16Item*)pItem )->GetValue(); + else + { + DBG_ERROR("Using fallback for field unit - field unit should be provided in ItemSet"); + return SfxModule::GetCurrentFieldUnit(); + } + return eUnit; } |