summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/itemwin.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-03-03 15:22:23 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-03-03 15:22:23 +0100
commit62b71564201e2df91fc9bb677b097c8fdeadba8b (patch)
tree2a943023ddc51ae7166fa75f8f3267c5786cec22 /svx/source/tbxctrls/itemwin.cxx
parentdf2a51edb0119d25465117c7a21baa75c34f99cb (diff)
debuglevels: introduce SfxModule::GetModuleFieldUnit, taking an XFrame, to not rely on SfxObjectShell::Current, which is implicitly used by SfxModule::GetCurrentFieldUnit, and might (like all this static crap) fail unforseeably. Use this new method in the Metric Field (to be used in toolbars) and the Pos/Size status bar control. Finally, this prevents a sporadic assertion during the smoketest, where GetCurrentFieldUnit fails for whatever reasons
Diffstat (limited to 'svx/source/tbxctrls/itemwin.cxx')
-rw-r--r--svx/source/tbxctrls/itemwin.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index 76fd7d423324..7666c1064e15 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -491,7 +491,7 @@ SvxMetricField::SvxMetricField(
SetLast( 5000 );
SetFirst( 0 );
- eDlgUnit = SfxModule::GetCurrentFieldUnit();
+ eDlgUnit = SfxModule::GetModuleFieldUnit( mxFrame );
SetFieldUnit( *this, eDlgUnit, sal_False );
Show();
}
@@ -576,7 +576,7 @@ void SvxMetricField::SetCoreUnit( SfxMapUnit eUnit )
void SvxMetricField::RefreshDlgUnit()
{
- FieldUnit eTmpUnit = SfxModule::GetCurrentFieldUnit();
+ FieldUnit eTmpUnit = SfxModule::GetModuleFieldUnit( mxFrame );
if ( eDlgUnit != eTmpUnit )
{
eDlgUnit = eTmpUnit;