You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by mb...@apache.org on 2011/09/18 22:41:16 UTC
svn commit: r1172341 - in /incubator/ooo/trunk/main: ./
sfx2/source/appl/module.cxx svx/source/dialog/dlgutil.cxx
Author: mbauer
Date: Sun Sep 18 20:41:16 2011
New Revision: 1172341
URL: http://svn.apache.org/viewvc?rev=1172341&view=rev
Log:
cws mba34issues01: #i117713#: remove superfluous assertions about field unit fallbacks
Modified:
incubator/ooo/trunk/main/ (props changed)
incubator/ooo/trunk/main/sfx2/source/appl/module.cxx
incubator/ooo/trunk/main/svx/source/dialog/dlgutil.cxx
Propchange: incubator/ooo/trunk/main/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Sep 18 20:41:16 2011
@@ -0,0 +1 @@
+*
Modified: incubator/ooo/trunk/main/sfx2/source/appl/module.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sfx2/source/appl/module.cxx?rev=1172341&r1=1172340&r2=1172341&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sfx2/source/appl/module.cxx (original)
+++ incubator/ooo/trunk/main/sfx2/source/appl/module.cxx Sun Sep 18 20:41:16 2011
@@ -441,20 +441,9 @@ FieldUnit SfxModule::GetModuleFieldUnit(
// find the module
SfxModule const * pModule = GetActiveModule( pViewFrame );
ENSURE_OR_RETURN( pModule != NULL, "SfxModule::GetModuleFieldUnit: no SfxModule for the given frame!", FUNIT_100TH_MM );
-
- SfxPoolItem const * pItem = pModule->GetItem( SID_ATTR_METRIC );
- if ( pItem == NULL )
- {
-#if OSL_DEBUG_LEVEL > 0
- ::rtl::OStringBuffer message;
- message.append( "SfxModule::GetFieldUnit: no metric item in the module implemented by '" );
- message.append( typeid( *pModule ).name() );
- message.append( "'!" );
- OSL_ENSURE( false, message.makeStringAndClear().getStr() );
-#endif
- return FUNIT_100TH_MM;
- }
- return (FieldUnit)( (SfxUInt16Item*)pItem )->GetValue();
+ if ( pModule )
+ return pModule->GetFieldUnit();
+ return FUNIT_INCH;
}
FieldUnit SfxModule::GetCurrentFieldUnit()
@@ -464,7 +453,6 @@ FieldUnit SfxModule::GetCurrentFieldUnit
if ( pModule )
{
const SfxPoolItem* pItem = pModule->GetItem( SID_ATTR_METRIC );
- DBG_ASSERT( pItem, "GetFieldUnit(): no item" );
if ( pItem )
eUnit = (FieldUnit)( (SfxUInt16Item*)pItem )->GetValue();
}
@@ -477,7 +465,6 @@ FieldUnit SfxModule::GetFieldUnit() cons
{
FieldUnit eUnit = FUNIT_INCH;
const SfxPoolItem* pItem = GetItem( SID_ATTR_METRIC );
- DBG_ASSERT( pItem, "GetFieldUnit(): no item" );
if ( pItem )
eUnit = (FieldUnit)( (SfxUInt16Item*)pItem )->GetValue();
return eUnit;
Modified: incubator/ooo/trunk/main/svx/source/dialog/dlgutil.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/dialog/dlgutil.cxx?rev=1172341&r1=1172340&r2=1172341&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/dialog/dlgutil.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/dialog/dlgutil.cxx Sun Sep 18 20:41:16 2011
@@ -46,7 +46,6 @@ FieldUnit GetModuleFieldUnit( const SfxI
eUnit = (FieldUnit)( (const SfxUInt16Item*)pItem )->GetValue();
else
{
- DBG_ERROR("Using fallback for field unit - field unit should be provided in ItemSet");
return SfxModule::GetCurrentFieldUnit();
}