From 62b71564201e2df91fc9bb677b097c8fdeadba8b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 3 Mar 2011 15:22:23 +0100 Subject: 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 --- svx/source/stbctrls/pszctrl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'svx/source/stbctrls/pszctrl.cxx') 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; -- cgit