diff options
author | Andrzej Hunt <andrzej@ahunt.org> | 2015-11-11 17:09:47 +0100 |
---|---|---|
committer | Andrzej Hunt <andrzej@ahunt.org> | 2015-11-11 20:36:17 +0000 |
commit | 0b5991e4862501f0fa8e34f1b403aca40e51436f (patch) | |
tree | c8b5455ac68ad29d5eb77d4f2be37217f62d4e6f /desktop | |
parent | 981c217b125baf154897233020510fe608a07eda (diff) |
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 <andrzej@ahunt.org>
Tested-by: Andrzej Hunt <andrzej@ahunt.org>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/Library_sofficeapp.mk | 1 | ||||
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 8 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 8 |
3 files changed, 15 insertions, 2 deletions
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk index 0254b74b9f66..274bb1af84f1 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 f32f4bdd1ce6..2351c7bff79b 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 6d7d079c3c37..78e08f0c2d53 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); |