summaryrefslogtreecommitdiff
path: root/sfx2/inc/sfx2/module.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/inc/sfx2/module.hxx')
-rw-r--r--sfx2/inc/sfx2/module.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sfx2/inc/sfx2/module.hxx b/sfx2/inc/sfx2/module.hxx
index f944b29c18da..5551df850ff2 100644
--- a/sfx2/inc/sfx2/module.hxx
+++ b/sfx2/inc/sfx2/module.hxx
@@ -34,6 +34,7 @@
#include <sfx2/imgdef.hxx>
#include <sal/types.h>
#include <tools/fldunit.hxx>
+#include <com/sun/star/uno/Reference.hxx>
class ImageList;
@@ -56,6 +57,9 @@ class SfxStbCtrlFactArr_Impl;
class SfxTabPage;
class Window;
+namespace com { namespace sun { namespace star { namespace frame {
+ class XFrame;
+} } } }
//====================================================================
class SFX2_DLLPUBLIC SfxModule : public SfxShell
@@ -97,6 +101,14 @@ public:
static SfxModule* GetActiveModule( SfxViewFrame* pFrame=NULL );
static FieldUnit GetCurrentFieldUnit();
+ /** retrieves the field unit of the module belonging to the document displayed in the given frame
+
+ Effectively, this method looks up the SfxViewFrame belonging to the given XFrame, then the SfxModule belonging to
+ the document in this frame, then this module's field unit.
+
+ Failures in any of those steps are reported as assertion in non-product builds, and then FUNIT_100TH_MM is returned.
+ */
+ static FieldUnit GetModuleFieldUnit( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > const & i_frame );
FieldUnit GetFieldUnit() const;
//#if 0 // _SOLAR__PRIVATE