Kaydet (Commit) 78a5ce35 authored tarafından Pierre-Eric Pelloux-Prayer's avatar Pierre-Eric Pelloux-Prayer Kaydeden (comit) Miklos Vajna

docx export: explicitely use 'none' type for disabled cell borders

Otherwise, the table default borders will be used.

Change-Id: Iebab1204dc40f79e10164e4815bbdbbe054ef144
Reviewed-on: https://gerrit.libreoffice.org/909Reviewed-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
Tested-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
üst 69299e51
...@@ -1349,7 +1349,7 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co ...@@ -1349,7 +1349,7 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
// thickThinMediumGap, thickThinLargeGap, thickThinSmallGap // thickThinMediumGap, thickThinLargeGap, thickThinSmallGap
// thinThickLargeGap, thinThickMediumGap, thinThickSmallGap // thinThickLargeGap, thinThickMediumGap, thinThickSmallGap
const char* pVal = "none"; const char* pVal = "none";
if ( !pBorderLine->isEmpty( ) ) if ( pBorderLine && !pBorderLine->isEmpty( ) )
{ {
switch (pBorderLine->GetBorderLineStyle()) switch (pBorderLine->GetBorderLineStyle())
{ {
...@@ -1403,7 +1403,7 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co ...@@ -1403,7 +1403,7 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
pAttr->add( FSNS( XML_w, XML_val ), OString( pVal ) ); pAttr->add( FSNS( XML_w, XML_val ), OString( pVal ) );
if ( !pBorderLine->isEmpty() ) if ( pBorderLine && !pBorderLine->isEmpty() )
{ {
// Compute the sz attribute // Compute the sz attribute
...@@ -1452,32 +1452,29 @@ static void impl_pageBorders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, s ...@@ -1452,32 +1452,29 @@ static void impl_pageBorders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, s
for( int i = 0; i < 4; ++i, ++pBrd ) for( int i = 0; i < 4; ++i, ++pBrd )
{ {
const SvxBorderLine* pLn = rBox.GetLine( *pBrd ); const SvxBorderLine* pLn = rBox.GetLine( *pBrd );
if ( pLn ) if ( pDefaultBorders && pLn )
{ {
if ( pDefaultBorders ) const SvxBorderLine* pRefLn = pDefaultBorders->GetLine( *pBrd );
{
const SvxBorderLine* pRefLn = pDefaultBorders->GetLine( *pBrd );
// If border is equal to default border: do not output // If border is equal to default border: do not output
if ( pRefLn && *pLn == *pRefLn) { if ( pRefLn && *pLn == *pRefLn) {
continue; continue;
}
} }
}
if (!tagWritten && bWriteTag) { if (!tagWritten && bWriteTag) {
pSerializer->startElementNS( XML_w, tag, FSEND ); pSerializer->startElementNS( XML_w, tag, FSEND );
tagWritten = true; tagWritten = true;
} }
impl_borderLine( pSerializer, aXmlElements[i], pLn, 0 ); impl_borderLine( pSerializer, aXmlElements[i], pLn, 0 );
// When exporting default borders, we need to export these 2 attr // When exporting default borders, we need to export these 2 attr
if ( pDefaultBorders == 0 ) { if ( pDefaultBorders == 0 ) {
if ( i == 2 ) if ( i == 2 )
impl_borderLine( pSerializer, XML_insideH, pLn, 0 ); impl_borderLine( pSerializer, XML_insideH, pLn, 0 );
else if ( i == 3 ) else if ( i == 3 )
impl_borderLine( pSerializer, XML_insideV, pLn, 0 ); impl_borderLine( pSerializer, XML_insideV, pLn, 0 );
}
} }
} }
if (tagWritten && bWriteTag) { if (tagWritten && bWriteTag) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment