[Libreoffice-commits] core.git: sw/source
Douglas Mencken
dougmencken at gmail.com
Fri Apr 1 06:13:26 UTC 2016
sw/source/filter/ww8/wrtww8.cxx | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
New commits:
commit 94a061eae6f3ec82abf52e229cb30d201f9eabe6
Author: Douglas Mencken <dougmencken at gmail.com>
Date: Thu Mar 31 12:00:04 2016 -0400
convert "Impossible" ensures to warns
... everything is possible
Change-Id: Ic1dfab77e24e777c14de91a18352cff86904d2ee
Reviewed-on: https://gerrit.libreoffice.org/23710
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 16a4135..3fbc18b 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2194,9 +2194,11 @@ void WW8AttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t
const SwTable * pTable = pTableTextNodeInfoInner->getTable();
const SwFrameFormat *pFormat = pTable->GetFrameFormat();
- OSL_ENSURE(pFormat,"Impossible");
- if (!pFormat)
+ if ( !pFormat )
+ {
+ SAL_WARN( "sw.ww8", "FrameFormat is nil" );
return;
+ }
const SwFormatHoriOrient &rHori = pFormat->GetHoriOrient();
const SwFormatVertOrient &rVert = pFormat->GetVertOrient();
@@ -2294,9 +2296,11 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
*/
//const bool bNewTableModel = pTable->IsNewModel();
const SwFrameFormat *pFormat = pTable->GetFrameFormat();
- OSL_ENSURE(pFormat,"Impossible");
- if (!pFormat)
+ if ( !pFormat )
+ {
+ SAL_WARN( "sw.ww8", "FrameFormat is nil" );
return;
+ }
const SwFormatHoriOrient &rHori = pFormat->GetHoriOrient();
const SwFormatVertOrient &rVert = pFormat->GetVertOrient();
@@ -2389,9 +2393,11 @@ void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableT
const SwTable *pTable = pTableTextNodeInfoInner->getTable( );
const SwFrameFormat *pFormat = pTable->GetFrameFormat();
- OSL_ENSURE(pFormat,"Impossible");
- if (!pFormat)
+ if ( !pFormat )
+ {
+ SAL_WARN( "sw.ww8", "FrameFormat is nil" );
return;
+ }
const SwFormatFrameSize &rSize = pFormat->GetFrameSize();
int nWidthPercent = rSize.GetWidthPercent();
@@ -2437,12 +2443,13 @@ void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableT
}
- OSL_ENSURE(nWidthPercent, "Impossible");
- if (nWidthPercent)
+ if ( nWidthPercent )
{
nPageSize *= nWidthPercent;
nPageSize /= 100;
}
+ else
+ SAL_WARN( "sw.ww8", "nWidthPercent is zero" );
}
else
{
More information about the Libreoffice-commits
mailing list