Bug 104606 - Left-to-right (vertical) direction is not available in Calc (with solution suggestion in Comment 7)
Summary: Left-to-right (vertical) direction is not available in Calc (with solution su...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL: http://www.gb688.cn/bzgk/gb/newGbInfo...
Depends on:
Blocks: RTL-CTL Vertical-Text Text-Direction-Unification
  Show dependency treegraph
Reported: 2016-12-12 13:40 UTC by Volga
Modified: 2018-08-18 21:32 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Full text of the standard (530.46 KB, application/pdf)
2016-12-13 07:36 UTC, Volga

Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2016-12-12 13:40:10 UTC
LibreOffice Writer have implemented Left-to-right (vertical) direction, but Calc and Impress have no way to use it.

Chinese standard GB/T 26233-2010 have related requirements for sheets and presentations in Section 5 and 6. See: http://down.bzwxw.com/21/GB_T 26233-2010.pdf

Steps to Reproduce:
1. Open LibreOfficeDev Calc
2. Open Format > Page
3. Open LibreOfficeDev Impress
4. Open Page > Page properties

Actual Results:  
Both Calc and Impress have no entry to use this text direction.

Expected Results:
Calc and Impress should allow Left-to-right (vertical) direction to be used in sheet and presentation to respect GB/T 26233-2010.

Reproducible: Always

User Profile Reset: No

Additional Info:

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0
Comment 1 Volga 2016-12-13 07:36:03 UTC
Created attachment 129563 [details]
Full text of the standard
Comment 2 Buovjaga 2016-12-18 18:51:47 UTC
Let's set to NEW
Comment 3 Mark Hung 2016-12-20 15:43:18 UTC
Suggest report separate issues for Calc and Impress. 

For Calc, there isn't page setting for vertical writing but there is one for cell format configuration.

On the other hand, Impress allows vertical writing text boxes, also there are no setting at page level.
Comment 4 Buovjaga 2016-12-20 15:45:51 UTC Comment hidden (obsolete)
Comment 5 Volga 2016-12-21 13:32:40 UTC
(In reply to Buovjaga from comment #4)
> Ok I changed this to be about Calc. Volga can do the rest of the work ;)

Comment 6 Volga 2017-01-30 09:16:40 UTC
This can be done via coping related codes from Writer, but we need to break through some technical limits as bug 103720 pointed out.
Comment 7 aron 2017-03-28 03:00:17 UTC
To solve this problem, the following UNO commands must be introduced firstly. 

      // insert a tb-lr text box
      <node oor:name=".uno:VerticalLeftToRightText" oor:op="replace">
          <prop oor:name="Label" oor:type="xs:string">
              <value xml:lang="x-no-translate"></value><value xml:lang="en-US">Vertical Left To Right Text</value>
          <prop oor:name="Properties" oor:type="xs:int">
      // set text direction of textbox to tb-lr
      <node oor:name=".uno:TextdirectionTopToBottomLeftToRight" oor:op="replace">
        <prop oor:name="Label" oor:type="xs:string">
          <value xml:lang="en-US">Text direction from top to bottom and left to right</value>
        <prop oor:name="Properties" oor:type="xs:int">

In case of calc,  a new enum constant must be introduced 

 enum SvxCellOrientationEnum
+    //by aron, for traditional Mongolian 
+    //

Of course it will bring a log lot of coding work to handle the new logic.

We have already released  a new version of Libreoffice which have a good compatibility with traditional Mongolian. and available on the following link.

We are considering merging the source code of DelehiOffice to LibreOffice at right timing.
Comment 8 Volga 2017-03-28 15:19:32 UTC
(In reply to aron from comment #7)
> We are considering merging the source code of DelehiOffice to LibreOffice at
> right timing.
You can submit some patches into our Gerrit server: http://gerrit.libreoffice.org
Comment 9 Volga 2017-03-28 15:31:26 UTC
By the time LibreOffice developers announced a new bug hunting session, you will have more chances to contribute your enhancements into LibreOffice.
Comment 10 Volga 2017-04-19 14:07:42 UTC

You can visit our gerrit server [1] (our patch review tool) and send a license statement [2] to the mailing list. 

[1] https://wiki.documentfoundation.org/Development/gerrit 
[2] https://wiki.documentfoundation.org/Development/Developers#Example_Code_Contributor_Statement 

Feel free to contribute. And I hope you can join in our new bug hunting session in 28 April.