summaryrefslogtreecommitdiff
path: root/sw
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 /sw
parent066c55d4352a0e7930c5fe069a8148fb7f5e4ecf (diff)
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
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx16
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx8
2 files changed, 16 insertions, 8 deletions
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;