diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-02-19 19:06:50 +0530 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.co.uk> | 2017-02-20 13:58:14 +0530 |
commit | 6a4bf88c581b7fc1b6303099c804235027fd9f3e (patch) | |
tree | 3380d5ae381e129a274cfa26c603c001c55c68c7 | |
parent | sd lok: Use IDs in ViewAnnotations output (diff) | |
download | core-6a4bf88c581b7fc1b6303099c804235027fd9f3e.tar.gz core-6a4bf88c581b7fc1b6303099c804235027fd9f3e.zip |
gtktiledviewer: Adjust for different delete uno cmd for impress
Change-Id: I7fa82096298a8a7c9f586a1d3c06aa5852e6842e
-rw-r--r-- | libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx index 1996368f5e4a..19ae65ca12c8 100644 --- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx @@ -1110,21 +1110,28 @@ static void initWindow(TiledWindow& rWindow) gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(rWindow.m_pEnableEditing), TRUE); LibreOfficeKitDocument* pDocument = lok_doc_view_get_document(LOK_DOC_VIEW(rWindow.m_pDocView)); - if (pDocument && pDocument->pClass->getDocumentType(pDocument) == LOK_DOCTYPE_SPREADSHEET) + if (pDocument) { - // Align to top left corner, so the tiles are in sync with the - // row/column bar, even when zooming out enough that not all space is - // used. - gtk_widget_set_halign(GTK_WIDGET(rWindow.m_pDocView), GTK_ALIGN_START); - gtk_widget_set_valign(GTK_WIDGET(rWindow.m_pDocView), GTK_ALIGN_START); - - // 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)); - - lcl_registerToolItem(rWindow, rWindow.m_pDeleteComment, ".uno:DeleteNote"); + if (pDocument->pClass->getDocumentType(pDocument) == LOK_DOCTYPE_SPREADSHEET) + { + // Align to top left corner, so the tiles are in sync with the + // row/column bar, even when zooming out enough that not all space is + // used. + gtk_widget_set_halign(GTK_WIDGET(rWindow.m_pDocView), GTK_ALIGN_START); + gtk_widget_set_valign(GTK_WIDGET(rWindow.m_pDocView), GTK_ALIGN_START); + + // 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)); + + lcl_registerToolItem(rWindow, rWindow.m_pDeleteComment, ".uno:DeleteNote"); + } + else if (pDocument->pClass->getDocumentType(pDocument) == LOK_DOCTYPE_PRESENTATION) + { + lcl_registerToolItem(rWindow, rWindow.m_pDeleteComment, ".uno:DeleteAnnotation"); + } } // Fill our comments sidebar |