diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-01-21 01:03:34 +0530 |
---|---|---|
committer | pranavk <pranavk@collabora.co.uk> | 2017-01-23 06:47:34 +0000 |
commit | a27e09079596eeae81cced01eaeabf94d6675085 (patch) | |
tree | 9117256d779b298aa5e572e8aac62dd1aff99c4a /libreofficekit | |
parent | 115797f070888cbad93656dda8fa01ec6c98a3f5 (diff) |
lok: Listen for state change events for cell alignment commands
We used to use HorizontalAlignment uno command for cell alignment
both in online and gtktiledviewer. To make things simpler, lets
use separate cell alignment uno commands for spreadsheets like we
have in writer and impres.
Change-Id: I2a959d1892f6b02db7a9ce51d55309216e4b3c6c
Reviewed-on: https://gerrit.libreoffice.org/33444
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx index 3c774c1a7fce..b53789b0a7d8 100644 --- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx @@ -374,18 +374,11 @@ gboolean TiledRowColumnBar::docConfigureEvent(GtkWidget* pDocView, GdkEventConfi gtk_widget_queue_draw(rWindow.m_pColumnBar->m_pDrawingArea); gtk_widget_show(rWindow.m_pFormulabarEntry); - // Change horizontal alignment uno commands for spreadsheet - const std::string argsPrefix = - "{" - "\"HorizontalAlignment\":{" - "\"type\":\"unsigned short\", " - "\"value\":\""; - const std::string argsSuffix = "\"}}"; - - lcl_registerToolItem(rWindow, rWindow.m_pLeftpara, ".uno:HorizontalAlignment", argsPrefix + std::to_string(1) + argsSuffix); - lcl_registerToolItem(rWindow, rWindow.m_pCenterpara, ".uno:HorizontalAlignment", argsPrefix + std::to_string(2) + argsSuffix); - lcl_registerToolItem(rWindow, rWindow.m_pRightpara, ".uno:HorizontalAlignment", argsPrefix + std::to_string(3) + argsSuffix); - lcl_registerToolItem(rWindow, rWindow.m_pJustifypara, ".uno:HorizontalAlignment", argsPrefix + std::to_string(4) + argsSuffix); + // Change cell alignment uno commands for spreadsheet + lcl_registerToolItem(rWindow, rWindow.m_pLeftpara, ".uno:AlignLeft"); + lcl_registerToolItem(rWindow, rWindow.m_pCenterpara, ".uno:AlignHorizontalCenter"); + lcl_registerToolItem(rWindow, rWindow.m_pRightpara, ".uno:AlignRight"); + gtk_widget_hide(GTK_WIDGET(rWindow.m_pJustifypara)); } return TRUE; |