diff options
author | Mihai Varga <mihai.varga@collabora.com> | 2015-09-09 15:08:26 +0300 |
---|---|---|
committer | Mihai Varga <mihai.varga@collabora.com> | 2015-09-09 18:02:10 +0300 |
commit | 2290efa4a22d42cd9099b63b9138e4ff994c07f9 (patch) | |
tree | 421a915212dc86349f69196ba88fa1ddaa100359 /libreofficekit | |
parent | 98483599b76fe6d0113a657f057ff5ad799ade96 (diff) |
LOK: moved the decalaration of LibLODocument_Impl to make it visible
We needed a better way to test LOK methods that are not app specific,
but are defined in /desktop/source/lib/init.cxx. So the decalaration
needs to be visible.
I also moved the `getStyles` test in the new test file
Change-Id: I98d97dc17a66e72732ca7bd848c131610790f48e
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/qa/unit/tiledrendering.cxx | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/libreofficekit/qa/unit/tiledrendering.cxx b/libreofficekit/qa/unit/tiledrendering.cxx index a4e552507c39..515fe8e0e978 100644 --- a/libreofficekit/qa/unit/tiledrendering.cxx +++ b/libreofficekit/qa/unit/tiledrendering.cxx @@ -68,7 +68,6 @@ public: void testDocumentTypes( Office* pOffice ); void testImpressSlideNames( Office* pOffice ); void testCalcSheetNames( Office* pOffice ); - void testGetStyles( Office* pOffice ); #if 0 void testOverlay( Office* pOffice ); #endif @@ -95,7 +94,6 @@ void TiledRenderingTest::runAllTests() testDocumentTypes( pOffice.get() ); testImpressSlideNames( pOffice.get() ); testCalcSheetNames( pOffice.get() ); - testGetStyles( pOffice.get() ); #if 0 testOverlay( pOffice.get() ); #endif @@ -184,38 +182,6 @@ void TiledRenderingTest::testCalcSheetNames( Office* pOffice ) CPPUNIT_ASSERT( strcmp( pDocument->getPartName( 2 ), "Sheet3" ) == 0 ); } -void TiledRenderingTest::testGetStyles( Office* pOffice ) -{ - const string sDocPath = m_sSrcRoot + "/libreofficekit/qa/data/blank_text.odt"; - const string sLockFile = m_sSrcRoot +"/libreofficekit/qa/data/.~lock.blank_text.odt#"; - - // FIXME: LOK will fail when trying to open a locked file - remove( sLockFile.c_str() ); - - scoped_ptr< Document> pDocument( pOffice->documentLoad( sDocPath.c_str() ) ); - - boost::property_tree::ptree aTree; - char* pJSON = pDocument->getStyles(); - std::stringstream aStream(pJSON); - boost::property_tree::read_json(aStream, aTree); - CPPUNIT_ASSERT( aTree.size() > 0 ); - - for (const std::pair<std::string, boost::property_tree::ptree>& rPair : aTree) - { - 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") - { - CPPUNIT_FAIL("Unknown style family: " + rPair.first); - } - } -} - #if 0 static void dumpRGBABitmap( const OUString& rPath, const unsigned char* pBuffer, const int nWidth, const int nHeight ) |