summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Jaap <patrick.jaap@tu-dresden.de>2019-04-03 14:58:05 +0200
committerJulien Nabet <serval2412@yahoo.fr>2019-04-03 20:49:12 +0200
commit2111f607973166ebc39414ba6d2019832bcfe4da (patch)
treedbd9d1f4b8c294b133a1f05c88f5358f57d2180b
parent478ecc26a65188e332df2ce0ba108474c735dfd1 (diff)
Fix in convertToOOXMLHoriOrient: values of VertOrient were taken
Change-Id: I47093292aeed5c0579dd4b365561ee86935632e4 Reviewed-on: https://gerrit.libreoffice.org/70197 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx25
1 files changed, 11 insertions, 14 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 969c2f2e830f..663670e38c9c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -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 )
{
- case text::VertOrientation::NONE:
+ case text::HoriOrientation::NONE:
return OString();
- case text::VertOrientation::CENTER:
- case text::VertOrientation::LINE_CENTER:
- return OString( "center" );
- case text::VertOrientation::BOTTOM:
- return OString( "bottom" );
- case text::VertOrientation::LINE_BOTTOM:
- return OString( "outside" );
- case text::VertOrientation::TOP:
- return OString( "top" );
- case text::VertOrientation::LINE_TOP:
+ case text::HoriOrientation::LEFT:
+ return OString( bIsPosToggle ? "inside" : "left" );
+ case text::HoriOrientation::RIGHT:
+ return OString( bIsPosToggle ? "outside" : "right" );
+ case text::HoriOrientation::CENTER:
+ // fall-through indended
+ case text::HoriOrientation::FULL:
default:
- return OString( "inside" );
+ return OString( "center" );
}
}
@@ -8392,7 +8389,7 @@ void DocxAttributeOutput::FormatVertOrientation( const SwFormatVertOrient& rFlyV
void DocxAttributeOutput::FormatHorizOrientation( const SwFormatHoriOrient& rFlyHori )
{
- OString sAlign = convertToOOXMLHoriOrient( rFlyHori.GetHoriOrient() );
+ OString sAlign = convertToOOXMLHoriOrient( rFlyHori.GetHoriOrient(), rFlyHori.IsPosToggle() );
OString sHAnchor = convertToOOXMLHoriOrientRel( rFlyHori.GetRelationOrient() );
if (m_rExport.SdrExporter().getTextFrameSyntax())