summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-08-11 15:02:05 +0200
committerNoel Grandin <noel@peralex.com>2015-08-11 15:02:26 +0200
commit78446df26f45e2a71187873726388c9d2f6ba6e5 (patch)
treeaea44e5de8040972beded5cdb8f224f6a735b5e3
parent-fsanitize=undefined (diff)
downloadcore-78446df26f45e2a71187873726388c9d2f6ba6e5.tar.gz
core-78446df26f45e2a71187873726388c9d2f6ba6e5.zip
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" Change-Id: I23eb359a40035dd40bdb60703de567b1c328e793
-rw-r--r--sd/source/ui/table/TableDesignPane.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx16
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx8
3 files changed, 17 insertions, 9 deletions
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index aac2f0f4add7..206a08bb0993 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 a99881ee7fdd..12f3aeb0a2e0 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -544,14 +544,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 = WW8Export::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,
@@ -562,7 +564,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:
@@ -696,13 +698,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 5a5f243d4dbd..f9f7c6ec676d 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4064,13 +4064,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;