sw/source/filter/ww8/wrtww8.cxx | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-)
New commits: commit 94a061eae6f3ec82abf52e229cb30d201f9eabe6 Author: Douglas Mencken <dougmenc...@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 <c...@libreoffice.org> Reviewed-by: Noel Grandin <noelgran...@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 { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits