[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - 2 commits - jurt/com vcl/generic

Michael Meeks michael.meeks at collabora.com
Wed Apr 13 18:48:02 UTC 2016


 jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java |   26 +++++++++++-
 vcl/generic/fontmanager/fontmanager.cxx                     |   21 +++++++++
 2 files changed, 45 insertions(+), 2 deletions(-)

New commits:
commit 205b2be73a970508fda071310f26c0e1156da057
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed Apr 13 17:19:57 2016 +0100

    Unit test hook for online / fonts.
    
    Change-Id: I2ae50c826f7fc66367a379447ab3b99cd1f29b4d

diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index 87027d4..b122370 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -2219,4 +2219,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: */
commit 964787c6b9cf834639298081b0168dd1593ee4e1
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Apr 1 15:27:52 2016 +0100

    Java debugging agro.

diff --git a/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java b/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java
index 2572c5c..ab6599b 100644
--- a/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java
+++ b/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java
@@ -19,6 +19,7 @@
 package com.sun.star.lib.uno.environments.remote;
 
 import java.text.*;
+import java.util.*;
 import com.sun.star.lang.DisposedException;
 
 /**
@@ -85,6 +86,24 @@ public class JobQueue {
 	}
     }
 
+    public static void printTrace()
+    {
+	Map<Thread, StackTraceElement[]> trace = Thread.getAllStackTraces();
+	Set<Thread> set = trace.keySet();
+	Iterator<Thread> i = set.iterator();
+	while(i.hasNext())
+	{
+		Thread key = i.next();
+		System.out.println("Trace information for the thread " + key);
+		StackTraceElement[] frames = trace.get(key);
+
+		for(int j = 0; j < frames.length; j++){
+			System.err.println(frames[j]);
+		}
+		System.err.println();
+	}
+    }
+
     /**
      * A thread for dispatching jobs.
      */
@@ -288,13 +307,16 @@ public class JobQueue {
 	int count = 0;
 	for (Job i = _head; i != null; i = i._next)
 	{
-		if (i.isRequest())
+		if (!i.isRequest())
 			multipleReturns = true;
 		count++;
 	}
 
 	if (multipleReturns)
-		printDebug("ERROR: MULTIPLE RETURNS");
+	{
+		printDebug("ERROR: MULTIPLE RETURNS.patch.2");
+		printTrace();
+	}
         if(DEBUG) printDebug("##### " + getClass().getName() + ".putJob to queue of " + count);
 	printDebug("new job : " + job.toString());
 	for (Job i = _head; i != null; i = i._next)


More information about the Libreoffice-commits mailing list