diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2016-01-07 15:57:21 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-08 10:33:44 +0100 |
commit | 6b7d41094d06bbb4c248927d02318cf1b5faba0a (patch) | |
tree | 34d1ff3845c4517e7ed0acace5d4864790730cb9 /libreofficekit | |
parent | 1f1ddaad5dd401b70ae69fb18f7873d652242154 (diff) |
lool - page border shadow can be disabled
Support for text documents and presentations.
Added a command line option for gtktiledviewer:
--hide-page-shadow.
Reviewed on:
https://gerrit.libreoffice.org/21210
Change-Id: I1e427693d7af40cb5731d1730ac5b7c486d45c29
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx index 04d74d6646c3..7c2cc56c283b 100644 --- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx @@ -32,8 +32,9 @@ static int help() { fprintf(stderr, "Usage: gtktiledviewer <absolute-path-to-libreoffice-install's-program-directory> <path-to-document> [<options> ... ]\n\n"); fprintf(stderr, "Options:\n\n"); - fprintf(stderr, "--hide-whitespace: Hide whitespace between pages in text documents.\n"); fprintf(stderr, "--background-color <color>: Set custom background color, e.g. 'yellow'.\n"); + fprintf(stderr, "--hide-page-shadow: Hide page/slide shadow.\n"); + fprintf(stderr, "--hide-whitespace: Hide whitespace between pages in text documents.\n"); return 1; } @@ -507,12 +508,7 @@ static void createModelAndView(const char* pLOPath, const char* pDocPath, const for (size_t i = 0; i < rArguments.size(); ++i) { const std::string& rArgument = rArguments[i]; - if (rArgument == "--hide-whitespace") - { - aTree.put(boost::property_tree::ptree::path_type(".uno:HideWhitespace/type", '/'), "boolean"); - aTree.put(boost::property_tree::ptree::path_type(".uno:HideWhitespace/value", '/'), true); - } - else if (rArgument == "--background-color" && i + 1 < rArguments.size()) + if (rArgument == "--background-color" && i + 1 < rArguments.size()) { GdkRGBA color; gdk_rgba_parse(&color, rArguments[i + 1].c_str()); @@ -520,7 +516,18 @@ static void createModelAndView(const char* pLOPath, const char* pDocPath, const gtk_widget_override_background_color(gtk_widget_get_toplevel(pDocView), GTK_STATE_FLAG_NORMAL, &color); SAL_WNODEPRECATED_DECLARATIONS_POP } + else if (rArgument == "--hide-page-shadow") + { + aTree.put(boost::property_tree::ptree::path_type(".uno:ShowBorderShadow/type", '/'), "boolean"); + aTree.put(boost::property_tree::ptree::path_type(".uno:ShowBorderShadow/value", '/'), false); + } + else if (rArgument == "--hide-whitespace") + { + aTree.put(boost::property_tree::ptree::path_type(".uno:HideWhitespace/type", '/'), "boolean"); + aTree.put(boost::property_tree::ptree::path_type(".uno:HideWhitespace/value", '/'), true); + } } + std::stringstream aStream; boost::property_tree::write_json(aStream, aTree); std::string aArguments = aStream.str(); |