desktop/Library_sofficeapp.mk | 1 + desktop/qa/desktop_lib/test_desktop_lib.cxx | 8 ++++++-- desktop/source/lib/init.cxx | 8 ++++++++ 3 files changed, 15 insertions(+), 2 deletions(-)
New commits: commit 0b5991e4862501f0fa8e34f1b403aca40e51436f Author: Andrzej Hunt <andr...@ahunt.org> Date: Wed Nov 11 17:09:47 2015 +0100 lok: add Clear formatting to getStyles() This requires client-side support too. Change-Id: I5197ed3ed2b8244b50f7faf84a1cadde6a61b2cb Reviewed-on: https://gerrit.libreoffice.org/19917 Reviewed-by: Andrzej Hunt <andr...@ahunt.org> Tested-by: Andrzej Hunt <andr...@ahunt.org> diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk index 0254b74..274bb1a 100644 --- a/desktop/Library_sofficeapp.mk +++ b/desktop/Library_sofficeapp.mk @@ -53,6 +53,7 @@ $(eval $(call gb_Library_use_libraries,sofficeapp,\ sb \ sfx \ svl \ + svxcore \ svt \ tk \ tl \ diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index f32f4bd..2351c7b 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -181,14 +181,18 @@ void DesktopLOKTest::testGetStyles() CPPUNIT_ASSERT( aValues.size() > 0 ); for (const std::pair<std::string, boost::property_tree::ptree>& rPair : aValues) { - CPPUNIT_ASSERT( rPair.second.size() > 0); + if( rPair.first != "ClearStyle") + { + CPPUNIT_ASSERT( rPair.second.size() > 0); + } if (rPair.first != "CharacterStyles" && rPair.first != "ParagraphStyles" && rPair.first != "FrameStyles" && rPair.first != "PageStyles" && rPair.first != "NumberingStyles" && rPair.first != "CellStyles" && - rPair.first != "ShapeStyles") + rPair.first != "ShapeStyles" && + rPair.first != "ClearStyle") { CPPUNIT_FAIL("Unknown style family: " + rPair.first); } diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 6d7d079..78e08f0 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -59,6 +59,8 @@ #include <sfx2/lokhelper.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/viewsh.hxx> +#include <svx/dialmgr.hxx> +#include <svx/dialogs.hrc> #include <svx/svxids.hrc> #include <vcl/svapp.hxx> #include <vcl/svpforlokit.hxx> @@ -1265,6 +1267,12 @@ static char* getStyles(LibreOfficeKitDocument* pThis, const char* pCommand) } aValues.add_child(sStyleFam.toUtf8().getStr(), aChildren); } + + boost::property_tree::ptree aChildClearFormat; + OUString sClearFormat = SVX_RESSTR( RID_SVXSTR_CLEARFORM ); + aChildClearFormat.put("", sClearFormat.toUtf8()); + aValues.add_child("ClearStyle", aChildClearFormat); + aTree.add_child("commandValues", aValues); std::stringstream aStream; boost::property_tree::write_json(aStream, aTree); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits