summaryrefslogtreecommitdiffstats
path: root/svx/source/dialog/dlgutil.cxx
diff options
context:
space:
mode:
authorSven Jacobi <sj@openoffice.org>2001-10-16 08:29:42 +0000
committerSven Jacobi <sj@openoffice.org>2001-10-16 08:29:42 +0000
commit61f17a240dc217430b65d98eac1aaa360d37308f (patch)
treeee85d8d962c7576a391e387c2cef7034c17cccd2 /svx/source/dialog/dlgutil.cxx
parent#91486# added xml alien attributes (diff)
downloadcore-61f17a240dc217430b65d98eac1aaa360d37308f.tar.gz
core-61f17a240dc217430b65d98eac1aaa360d37308f.zip
#93209# assertions, objectshell is not always available during reload
Diffstat (limited to 'svx/source/dialog/dlgutil.cxx')
-rw-r--r--svx/source/dialog/dlgutil.cxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/svx/source/dialog/dlgutil.cxx b/svx/source/dialog/dlgutil.cxx
index c5b5b7513a7c..4f8193db865c 100644
--- a/svx/source/dialog/dlgutil.cxx
+++ b/svx/source/dialog/dlgutil.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgutil.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: tl $ $Date: 2001-03-22 11:00:04 $
+ * last change: $Author: sj $ $Date: 2001-10-16 09:29:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -225,16 +225,19 @@ FieldUnit GetModuleFieldUnit( const SfxItemSet* pSet )
SfxObjectShell* pSh = NULL;
if ( pFrame )
pSh = pFrame->GetObjectShell();
- SfxModule* pModule = pSh ? pSh->GetModule() : NULL;
- if ( pModule )
+ if ( pSh ) // #93209# the object shell is not always available during reload
{
- const SfxPoolItem* pItem = pModule->GetItem( SID_ATTR_METRIC );
- if ( pItem )
- eUnit = (FieldUnit)( (SfxUInt16Item*)pItem )->GetValue();
- }
- else
- {
- DBG_ERRORFILE( "GetModuleFieldUnit(): no module found" );
+ SfxModule* pModule = pSh->GetModule();
+ if ( pModule )
+ {
+ const SfxPoolItem* pItem = pModule->GetItem( SID_ATTR_METRIC );
+ if ( pItem )
+ eUnit = (FieldUnit)( (SfxUInt16Item*)pItem )->GetValue();
+ }
+ else
+ {
+ DBG_ERRORFILE( "GetModuleFieldUnit(): no module found" );
+ }
}
}
return eUnit;