summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-02-19 19:06:50 +0530
committerAndras Timar <andras.timar@collabora.com>2017-02-28 11:10:49 +0100
commit0c708a0b28f2ef9b5f7551070e44e82731b335f5 (patch)
treec4d918836605ae5d5cd706b4bc80d72c666e7c77 /libreofficekit
parent1c22cf5a7f6ddf41dd63918fced13a1c80d8d50a (diff)
gtktiledviewer: Adjust for different delete uno cmd for impress
Change-Id: I7fa82096298a8a7c9f586a1d3c06aa5852e6842e (cherry picked from commit 6a4bf88c581b7fc1b6303099c804235027fd9f3e)
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx35
1 files changed, 21 insertions, 14 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 09888e15b3e8..765b25d4f248 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -1109,21 +1109,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