Kaydet (Commit) 2111f607 authored tarafından Patrick Jaap's avatar Patrick Jaap Kaydeden (comit) Julien Nabet

Fix in convertToOOXMLHoriOrient: values of VertOrient were taken

Change-Id: I47093292aeed5c0579dd4b365561ee86935632e4
Reviewed-on: https://gerrit.libreoffice.org/70197
Tested-by: Jenkins
Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst 478ecc26
...@@ -517,24 +517,21 @@ static OString convertToOOXMLVertOrient(sal_Int16 nOrient) ...@@ -517,24 +517,21 @@ static OString convertToOOXMLVertOrient(sal_Int16 nOrient)
} }
} }
static OString convertToOOXMLHoriOrient(sal_Int16 nOrient) static OString convertToOOXMLHoriOrient(sal_Int16 nOrient, bool bIsPosToggle)
{ {
switch( nOrient ) switch( nOrient )
{ {
case text::VertOrientation::NONE: case text::HoriOrientation::NONE:
return OString(); return OString();
case text::VertOrientation::CENTER: case text::HoriOrientation::LEFT:
case text::VertOrientation::LINE_CENTER: return OString( bIsPosToggle ? "inside" : "left" );
return OString( "center" ); case text::HoriOrientation::RIGHT:
case text::VertOrientation::BOTTOM: return OString( bIsPosToggle ? "outside" : "right" );
return OString( "bottom" ); case text::HoriOrientation::CENTER:
case text::VertOrientation::LINE_BOTTOM: // fall-through indended
return OString( "outside" ); case text::HoriOrientation::FULL:
case text::VertOrientation::TOP:
return OString( "top" );
case text::VertOrientation::LINE_TOP:
default: default:
return OString( "inside" ); return OString( "center" );
} }
} }
...@@ -8392,7 +8389,7 @@ void DocxAttributeOutput::FormatVertOrientation( const SwFormatVertOrient& rFlyV ...@@ -8392,7 +8389,7 @@ void DocxAttributeOutput::FormatVertOrientation( const SwFormatVertOrient& rFlyV
void DocxAttributeOutput::FormatHorizOrientation( const SwFormatHoriOrient& rFlyHori ) void DocxAttributeOutput::FormatHorizOrientation( const SwFormatHoriOrient& rFlyHori )
{ {
OString sAlign = convertToOOXMLHoriOrient( rFlyHori.GetHoriOrient() ); OString sAlign = convertToOOXMLHoriOrient( rFlyHori.GetHoriOrient(), rFlyHori.IsPosToggle() );
OString sHAnchor = convertToOOXMLHoriOrientRel( rFlyHori.GetRelationOrient() ); OString sHAnchor = convertToOOXMLHoriOrientRel( rFlyHori.GetRelationOrient() );
if (m_rExport.SdrExporter().getTextFrameSyntax()) if (m_rExport.SdrExporter().getTextFrameSyntax())
......
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