Bug 106197 - xlsx import: support Body Properties "upright"
Summary: xlsx import: support Body Properties "upright"
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Szabolcs Toth
URL: https://msdn.microsoft.com/en-us/libr...
Whiteboard: target:7.1.0
Keywords: filter:xlsx
Depends on:
Blocks: XLSX-Shapes 83672
  Show dependency treegraph
 
Reported: 2017-02-26 11:38 UTC by JoNi
Modified: 2021-04-12 12:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Rotated star with upright text (15.67 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2020-09-16 13:47 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JoNi 2017-02-26 11:38:16 UTC
https://cgit.freedesktop.org/libreoffice/core/commit/?id=1abc0695d770eebd21256a86aeee14a5384d84c7
> don't rotate calc shapes if twoCellAnchor, partial fix bnc#762542
fixed an issue with rotated shapes. an unit test was added in:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=b99c869c4361c7d5f51462c922fd7e9d64e1433b
> bnc#762542: Unit test for 1abc0695d770eebd21256a86aeee14a5384d84c7
this introduced the regression described in bug 83672.

I think the fix only works by chance. The shapes in the bugdoc are rotated by 90° but also have the attribute "upright" in the Body Properties "bodyPr"
> <a:bodyPr vertOverflow="clip" vert="horz" wrap="square" lIns="0" tIns="0" rIns="0" bIns="0" anchor="ctr" upright="1"/>
https://msdn.microsoft.com/en-us/library/documentformat.openxml.drawing.bodyproperties(v=office.15).aspx
>Specifies whether text should remain upright, regardless of the transform
>applied to it and the accompanying shape transform. If this attribute is
>omitted, then a value of 0, or false is implied.
> 
>[Example: Consider text that has been rotated within the text body but has
>the upright flag set.
> 
><p:txBody>
>  <a:bodyPr upright="1" rot="5400000" …/>
>  …  (Some text)  …</p:txBody>
> 
>This text appears as though no transform has been applied to it. end example]
> 
>The possible values for this attribute are defined by the W3C XML Schema
>boolean datatype.

I could not find a way to create shapes with "upright" property in Excel2016 but maybe some Excel SmartArt set the property in their shapes. 

For a demo document take attachment 113662 [details] from bug 83672.
Could someone with access to bnc#762542 can tell how the bugdoc was created?


(Note: This issue looks a bit like bug 104290 but that shape has a vert="vert270" attribute which turns the text by an additional 270° to the 90° shape rotation which results in a upright text in Excel.)
Comment 1 Buovjaga 2017-03-04 18:01:16 UTC
enhancement -> NEW
Comment 2 Regina Henschel 2020-09-16 13:47:55 UTC
Created attachment 165573 [details]
Rotated star with upright text

The problem is not only in Excel but in presentations too. The text "Hello" in the attached example is horizontal in PowerPoint but rotated in LibreOffice.
Comment 3 Commit Notification 2020-09-24 10:55:25 UTC
Szabolcs Toth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8c23be49fb5a9044989532e6e20feb1e3ff64f2b

tdf#106197 XLSX shape import: keep text upright

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.