summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2016-04-13 17:19:57 +0100
committerMichael Meeks <michael.meeks@collabora.com>2016-04-14 09:29:55 +0000
commit19219efc8610f25fe6b3277b99c8607847ecc8b1 (patch)
treea8de85824cb6a3f3d0cd965d81665ef50b734354 /vcl
parent81c9d54db34647fb1db311b228de6749c089dcf8 (diff)
Unit test hook for online / fonts.
Change-Id: I2ae50c826f7fc66367a379447ab3b99cd1f29b4d Reviewed-on: https://gerrit.libreoffice.org/24077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index 7a660e7dbb0a..5cc202c4f2c7 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -2216,4 +2216,25 @@ std::list< sal_Unicode > PrintFontManager::getUnicodeFromAdobeName( const OStri
return aRet;
}
+/// used by online unit tests via dlopen.
+extern "C" {
+SAL_DLLPUBLIC_EXPORT const char * unit_online_get_fonts(void)
+{
+ std::list< fontID > aFontIDs;
+ PrintFontManager &rMgr = PrintFontManager::get();
+ rMgr.getFontList(aFontIDs);
+ OStringBuffer aBuf;
+ aBuf.append( (sal_Int32)aFontIDs.size() );
+ aBuf.append( " PS fonts.\n" );
+ for( auto nId : aFontIDs )
+ {
+ const OUString& rName = rMgr.getPSName( nId );
+ aBuf.append( OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ) );
+ aBuf.append( "\n" );
+ }
+ static OString aResult = aBuf.makeStringAndClear();
+ return aResult.getStr();
+}
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */