From 5c3b2638f53fed967b2956614edc4b0b31f4bf84 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 28 May 2020 13:17:21 +0300 Subject: [PATCH] [SSE] Set vertical text for cell --- .../main/app/controller/Toolbar.js | 7 +++++-- apps/spreadsheeteditor/main/app/view/Toolbar.js | 11 ++++++++++- apps/spreadsheeteditor/main/locale/en.json | 1 + .../img/toolbar/1.25x/text-orient-vertical.png | Bin 0 -> 335 bytes .../img/toolbar/1.5x/text-orient-vertical.png | Bin 0 -> 411 bytes .../img/toolbar/1.75x/text-orient-vertical.png | Bin 0 -> 467 bytes .../img/toolbar/1x/text-orient-vertical.png | Bin 0 -> 268 bytes .../img/toolbar/2x/text-orient-vertical.png | Bin 0 -> 526 bytes 8 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/text-orient-vertical.png create mode 100644 apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/text-orient-vertical.png create mode 100644 apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/text-orient-vertical.png create mode 100644 apps/spreadsheeteditor/main/resources/img/toolbar/1x/text-orient-vertical.png create mode 100644 apps/spreadsheeteditor/main/resources/img/toolbar/2x/text-orient-vertical.png diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index eaf086b4f..dfaddf1ea 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -801,6 +801,7 @@ define([ switch (item.value) { case 'countcw': angle = 45; break; case 'clockwise': angle = -45; break; + case 'vertical': angle = 255; break; case 'rotateup': angle = 90; break; case 'rotatedown': angle = -90; break; } @@ -2289,6 +2290,7 @@ define([ need_disable = (fontparam == AscCommon.align_Justify || selectionType == Asc.c_oAscSelectionType.RangeShapeText || selectionType == Asc.c_oAscSelectionType.RangeShape); toolbar.btnTextOrient.menu.items[1].setDisabled(need_disable); toolbar.btnTextOrient.menu.items[2].setDisabled(need_disable); + toolbar.btnTextOrient.menu.items[3].setDisabled(need_disable); /* read cell vertical align */ fontparam = xfs.asc_getVertAlign(); @@ -2391,8 +2393,9 @@ define([ switch(val) { case 45: toolbar.btnTextOrient.menu.items[1].setChecked(true, true); break; case -45: toolbar.btnTextOrient.menu.items[2].setChecked(true, true); break; - case 90: toolbar.btnTextOrient.menu.items[3].setChecked(true, true); break; - case -90: toolbar.btnTextOrient.menu.items[4].setChecked(true, true); break; + case 255: toolbar.btnTextOrient.menu.items[3].setChecked(true, true); break; + case 90: toolbar.btnTextOrient.menu.items[4].setChecked(true, true); break; + case -90: toolbar.btnTextOrient.menu.items[5].setChecked(true, true); break; case 0: toolbar.btnTextOrient.menu.items[0].setChecked(true, true); break; } this._state.angle = val; diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index e2ff01a99..dcbb1666c 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -630,6 +630,14 @@ define([ toggleGroup : 'textorientgroup', value : 'clockwise' }, + { + caption : me.textVertical, + iconCls : 'menu__icon text-orient-vertical', + checkable : true, + checkmark : false, + toggleGroup : 'textorientgroup', + value : 'vertical' + }, { caption : me.textRotateUp, iconCls : 'menu__icon text-orient-rup', @@ -2398,6 +2406,7 @@ define([ tipInsertSymbol: 'Insert symbol', txtAutosumTip: 'Summation', capBtnPrintTitles: 'Print Titles', - tipPrintTitles: 'Print titles' + tipPrintTitles: 'Print titles', + textVertical: 'Vertical Text' }, SSE.Views.Toolbar || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 424987743..a9d5cd25c 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -2662,6 +2662,7 @@ "SSE.Views.Toolbar.txtTime": "Time", "SSE.Views.Toolbar.txtUnmerge": "Unmerge Cells", "SSE.Views.Toolbar.txtYen": "¥ Yen", + "SSE.Views.Toolbar.textVertical": "Vertical Text", "SSE.Views.Top10FilterDialog.textType": "Show", "SSE.Views.Top10FilterDialog.txtBottom": "Bottom", "SSE.Views.Top10FilterDialog.txtItems": "Item", diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/text-orient-vertical.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/text-orient-vertical.png new file mode 100644 index 0000000000000000000000000000000000000000..d000dc4329d01b65e263119cab90326ca3f1e185 GIT binary patch literal 335 zcmV-V0kHmwP)X1ONa4*JNE*~NYqnys5*ctZnL?~Y?5W=(B07C8e}z2x77<}OD1UohHKBQ8dtDet^3V6R zDgG5dxUWA*6wz680}@4;$t}pD*@}KOAPbqo{zU9v$fbWHV;c0aUp(Clp?@PI1CQO} zFTHvSMheMew_4X#eTV3A0uXSz)w-_u{!fCskvxWV@mB1%`;&mLi~cRXaQm>|81zk4 h9&k9kr88&#F+U1y)0Tv9Q1Ji&002ovPDHLkV1lvEimLzs literal 0 HcmV?d00001 diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/text-orient-vertical.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/text-orient-vertical.png new file mode 100644 index 0000000000000000000000000000000000000000..bd523533e325f8ac65c692753f6147ebca38091d GIT binary patch literal 411 zcmV;M0c8G(P)x-i5Rnox- zz9{IC46yBOSJis8J_Fp-QFFy7gHOgrb?VgFxJR%h7(>M2aKv4LEx}biYo$(`L~uQ8 zg`-IX>nLV=lTt$>c;r4yNk{~zh7V@ntww`}Drz{HWVs*^hy+Xq_-=Q%$Ln|S{n_pE z`gibm^8vWo08fRPP;+?{>#et52U)$YsW202E)U@Gc!rIu)}ZYKw&&SlMMXu$4%)7Q z1MLLnJUa{sf-umopV-)_tzyqM&gYx2T8!RS!G=f+oQaPb@%VS!*pV0;l_z!~*Tu$- z{Td=Xu?z5pxT%L24a;pl>m=o-TIRJli#l!29y#*g^8+K21A>)v*Zlwh002ovPDHLk FV1lC&xg`Jq literal 0 HcmV?d00001 diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/text-orient-vertical.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/text-orient-vertical.png new file mode 100644 index 0000000000000000000000000000000000000000..36e5a9a64462c0bef27602f5b279eedf0563407f GIT binary patch literal 467 zcmV;^0WAKBP)&3<1aK8Zr5nhSb|fBj(0H&qpi9 zb2PQmh;brHX~LLV6%nywdLDyPMMNlQ1162xtysyP`UcF1Qz$t7X^eI@<)}e}Mw|AR zc#EN9A`%EhrUND3V)88wU%!<7C4R!(_?kjFP~t7d>e7@WC4R!xr74F>{L|4p9)4xY z_iZA3cAKoG;cRC_0LPiA45vFIVrUQ%(O}g+8!$mcgh1u986%R%rOanBB8&_T7*h=z z{=HkBS*I{cAn;D*^^_cQTrl&Kh+)-=6{~4@dpU+kTrl&K2v8{$D#H$p#^gCZFga$| z`23nu|9Z8FIPrm*KR>;ue%ES0IL4Z?#+dF|`v(Emlnq9AuD!?0$>GvT-R+ip3 zuoDjWeF&f^HhLD`N@Rtvw`QgP0G$E~UvK^T+aSZ&H_X~z8DD|V3uk-fKj#DBKAM)M S%-H7u0000-*q=3WYhhC13zv6*nEIrLa56I_ys_h3Gix!^9l;~BL^S` z@B{)MSpe(1a8LIX`pg1&2cA5E&pd!$SR*UyAq$`f3>FwN0LlstRaI3A=|R~8zQ71S z2+AIC3dp>=(|}_@W_2e4uSN*<(;_t}TR;o|{j^99$`-J`3;kKX_NhVH0p5Ydk3Kml zTR;uM{a%jymKu~D-~cRs+>(QGJg9%J<3W8w|0Uom!@;%ZLNf173bZFfGVi(8wXSns zsLuk}($e99J`3RZW-p@lIRK}(3*a*Xx<`nl$6W|*s~o5LPN!J0_41~bE8 zXbyW20&#wNh}w_;jjO4>(BqpPjG9|K06+aV3?6uV(}Qty&>H7O?Zx4PY z(U@r&61s3k+~RFQ(%Vb4-H7P70B<4bN${(x%9_~vL?dSPD=I1~D*8wC7j*DWKoImz Q1poj507*qoM6N<$f*Kj+SO5S3 literal 0 HcmV?d00001