sd/source/ui/table/TableDesignPane.cxx | 2 +- sw/source/filter/ww8/wrtww8gr.cxx | 16 ++++++++++------ sw/source/filter/ww8/ww8atr.cxx | 8 ++++++-- 3 files changed, 17 insertions(+), 9 deletions(-)
New commits: commit 8f1d6909f519526312d9c9384b715a4db730eafc Author: Noel Grandin <[email protected]> Date: Tue Aug 11 15:02:05 2015 +0200 tdf#92885 - Incorrect cell border drawing in DOC file after saving in 5.0 caused by commit 4b66829390b286010b37b37ec1537a320d8cea8f "convert BOX_LINE and BOXINFO_LINE to enum class" (cherry picked from commit 78446df26f45e2a71187873726388c9d2f6ba6e5) Conflicts: sw/source/filter/ww8/wrtww8gr.cxx Change-Id: I23eb359a40035dd40bdb60703de567b1c328e793 Reviewed-on: https://gerrit.libreoffice.org/17691 Tested-by: Jenkins <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index aac2f0f..206a08b 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -710,7 +710,7 @@ const Bitmap CreateDesignPreview( const Reference< XIndexAccess >& xTableStyle, boost::shared_ptr< CellInfo > xBorderInfo( aMatrix[nBorderCol][nBorderRow] ); if( xBorderInfo.get() ) { - const ::editeng::SvxBorderLine* pBorderLine2 = xBorderInfo->maBorder.GetLine(static_cast<SvxBoxItemLine>(static_cast<int>(nLine)^1^1)); + const ::editeng::SvxBorderLine* pBorderLine2 = xBorderInfo->maBorder.GetLine(static_cast<SvxBoxItemLine>(static_cast<int>(nLine)^1)); if( pBorderLine2 && pBorderLine2->HasPriority(*pBorderLine) ) continue; // other border line wins } diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index dcd3277..f7b31e6 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -570,14 +570,16 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly, (pSI->GetWidth() != 0); } - for( SvxBoxItemLine i : o3tl::enumrange<SvxBoxItemLine>() ) + static const SvxBoxItemLine aLnArr[4] = { SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT, + SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT }; + for( sal_uInt8 i = 0; i < 4; ++i ) { - const ::editeng::SvxBorderLine* pLn = pBox->GetLine( i ); + const ::editeng::SvxBorderLine* pLn = pBox->GetLine( aLnArr[i] ); WW8_BRC aBrc; if (pLn) { WW8_BRCVer9 aBrc90 = rWrt.TranslateBorderLine( *pLn, - pBox->GetDistance( i ), bShadow ); + pBox->GetDistance( aLnArr[i] ), bShadow ); sal_uInt8 ico = msfilter::util::TransColToIco(msfilter::util::BGRToRGB( aBrc90.cv())); aBrc = WW8_BRC(aBrc90.dptLineWidth(), aBrc90.brcType(), ico, @@ -588,7 +590,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly, // border will really be in word and adjust accordingly short nSpacing; short nThick = aBrc.DetermineBorderProperties(&nSpacing); - switch (i) + switch (aLnArr[i]) { case SvxBoxItemLine::TOP: case SvxBoxItemLine::BOTTOM: @@ -758,13 +760,15 @@ void SwWW8WrGrf::WritePICBulletFHeader(SvStream& rStrm, const Graphic &rGrf, sal_uInt8* pArr = aArr + 0x2E; //Do borders first - for( SvxBoxItemLine i : o3tl::enumrange<SvxBoxItemLine>() ) + static const SvxBoxItemLine aLnArr[4] = { SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT, + SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT }; + for( sal_uInt8 i = 0; i < 4; ++i ) { WW8_BRC aBrc; short nSpacing; short nThick = aBrc.DetermineBorderProperties(&nSpacing); - switch (i) + switch (aLnArr[i]) { case SvxBoxItemLine::TOP: case SvxBoxItemLine::BOTTOM: diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index c5354b7..3ac52bb 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -4466,13 +4466,17 @@ void WW8Export::Out_SwFormatBox(const SvxBoxItem& rBox, bool bShadow) void WW8Export::Out_SwFormatTableBox( ww::bytes& rO, const SvxBoxItem * pBox ) { // moeglich und vielleicht besser waere 0xffff + static const SvxBoxItemLine aBorders[] = + { + SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT, SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT + }; static const SvxBorderLine aBorderLine; - for( SvxBoxItemLine i : o3tl::enumrange<SvxBoxItemLine>() ) + for( int i = 0; i < 4; ++i ) { const SvxBorderLine* pLn; if (pBox != NULL) - pLn = pBox->GetLine( i ); + pLn = pBox->GetLine( aBorders[i] ); else pLn = & aBorderLine;
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
