From b2f994469f3e2f1fe72e9f103b840aa949ace6dd Mon Sep 17 00:00:00 2001 From: Henry Castro Date: Tue, 24 May 2016 17:24:16 -0400 Subject: lok: reset the font list when there are no items In the pre-init stage the devices were initialized with no font list, but later the font list is updated. So those devices were not updated. Change-Id: I157d4c7079f9b1252916eb92b512aadb8e77329f Reviewed-on: https://gerrit.libreoffice.org/25419 Tested-by: Jenkins Reviewed-by: Ashod Nakashian --- desktop/qa/desktop_lib/test_desktop_lib.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'desktop/qa') diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index efa055adea92..bdda55ea7b7d 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -270,7 +270,8 @@ void DesktopLOKTest::testGetStyles() void DesktopLOKTest::testGetFonts() { - LibLODocument_Impl* pDocument = loadDoc("blank_text.odt"); + comphelper::LibreOfficeKit::setActive(); + LibLODocument_Impl* pDocument = loadDoc("blank_presentation.odp"); boost::property_tree::ptree aTree; char* pJSON = pDocument->m_pDocumentClass->getCommandValues(pDocument, ".uno:CharFontName"); std::stringstream aStream(pJSON); @@ -285,6 +286,8 @@ void DesktopLOKTest::testGetFonts() // check that we have font sizes available for each font CPPUNIT_ASSERT( rPair.second.size() > 0); } + free(pJSON); + comphelper::LibreOfficeKit::setActive(false); } void DesktopLOKTest::testCreateView() -- cgit