summaryrefslogtreecommitdiff
path: root/svx/source
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
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')
-rw-r--r--svx/source/stbctrls/pszctrl.cxx2
-rw-r--r--svx/source/tbxctrls/itemwin.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index 094cfbd96ee5..d1bc7d4d610e 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -78,7 +78,7 @@
String SvxPosSizeStatusBarControl::GetMetricStr_Impl( long nVal )
{
// Applikations-Metrik besorgen und setzen
- FieldUnit eOutUnit = SfxModule::GetCurrentFieldUnit();
+ FieldUnit eOutUnit = SfxModule::GetModuleFieldUnit( getFrameInterface() );
FieldUnit eInUnit = FUNIT_100TH_MM;
String sMetric;
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;