diff options
author | Douglas Mencken <dougmencken@gmail.com> | 2016-03-31 12:00:04 -0400 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-01 06:13:04 +0000 |
commit | 94a061eae6f3ec82abf52e229cb30d201f9eabe6 (patch) | |
tree | 3fdd1bec0c541f17afbcf8deee23ac7bd253b4d3 | |
parent | 29f1c4ed9be3557894af3824213447cf96166534 (diff) |
convert "Impossible" ensures to warns
... everything is possible
Change-Id: Ic1dfab77e24e777c14de91a18352cff86904d2ee
Reviewed-on: https://gerrit.libreoffice.org/23710
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 16a413547916..3fbc18b3d137 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 { |