[Libreoffice-commits] core.git: 5 commits - vcl/source wizards/com
Michael Stahl
mstahl at redhat.com
Tue Aug 4 14:58:36 PDT 2015
vcl/source/app/svapp.cxx | 4 ++--
wizards/com/sun/star/wizards/common/FileAccess.py | 14 ++++++--------
wizards/com/sun/star/wizards/text/TextDocument.py | 1 +
wizards/com/sun/star/wizards/web/Process.py | 2 +-
4 files changed, 10 insertions(+), 11 deletions(-)
New commits:
commit 62de18ab98289fc80984299f13ad71e4a4452ea3
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Aug 4 23:36:13 2015 +0200
tdf#76845: wizards: fix Web wizard XSLT deadlock on Windows
The web wizard runs some XSLT over the exported file. It registers
a handler that is called when the output stream is closed, and this
Process.streamClosedHandler() calls terminate(), which causes the
deadlock, because it wants to join() the extra XSLT thread but the
handler is actually called from the XSLT thread itself.
Fix that by moving the terminate() to another function that runs in the
main thread.
It does not deadlock on Unixes because osl_joinWithThread() actually
detects an attempt to join the calling thread and returns early.
Change-Id: Ia176562fa28b97c7e8956c1e8975c9aa6ee23236
diff --git a/wizards/com/sun/star/wizards/web/Process.py b/wizards/com/sun/star/wizards/web/Process.py
index 3de4c6c..3c1121d 100644
--- a/wizards/com/sun/star/wizards/web/Process.py
+++ b/wizards/com/sun/star/wizards/web/Process.py
@@ -375,6 +375,7 @@ class Process(ProcessErrors):
self.tf.start()
while (not self.tfCompleted):
pass
+ self.tf.terminate()
task.advance(True)
@@ -400,7 +401,6 @@ class Process(ProcessErrors):
print ("DEBUG !!! Stream 'error' event handler")
def streamClosedHandler(self, parent):
- parent.tf.terminate()
parent.tfCompleted = True
# I broke the export method to two methods
commit c1617b8d74b5e232efeec864241ada89f874fe63
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Aug 4 23:03:05 2015 +0200
wizards: text.TextDocument.getPageCount called as class method only
Change-Id: I9888f8ab7bccdd2902d619487279999f2ff9ab13
diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py
index b52f885..3119b16 100644
--- a/wizards/com/sun/star/wizards/text/TextDocument.py
+++ b/wizards/com/sun/star/wizards/text/TextDocument.py
@@ -211,6 +211,7 @@ class TextDocument(object):
@return the page count of the document.
'''
+ @classmethod
def getPageCount(self, model):
xController = model.getCurrentController()
xPC = xController.getViewCursor()
commit 71dbc4acd0d7ec9fd42a289514435457c5bc462c
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Aug 4 22:46:27 2015 +0200
wizards: FileAccess.getURL1 is unused
Change-Id: I3afde8e7f8b0b88e8f1a5d1ad71429c2aa7d7a94
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py
index 7ff92c3..a5e08b3 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.py
+++ b/wizards/com/sun/star/wizards/common/FileAccess.py
@@ -310,10 +310,6 @@ class FileAccess(object):
path = parentURL + "/" + childPath
return path
- def getURL1(self, path):
- f = "/"
- return self.filenameConverter.getFileURLFromSystemPath(path, f)
-
'''
return the filename out of a system-dependent path
'''
commit 8bf374b98d07c24a37933b8c03a53abb3a8ff5c6
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Aug 4 22:44:06 2015 +0200
wizards: FileAccess.getURL does not work on Windows
The hard-coded "/" separator causes getFileURLFromSystemPath to fail,
and it's not obvious why the URL is being converted to a system path
in the first place.
Change-Id: I06ebe6d92954c4f3c884ae6f0b327ea8a36c10a4
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py
index 0e67851..7ff92c3 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.py
+++ b/wizards/com/sun/star/wizards/common/FileAccess.py
@@ -303,10 +303,12 @@ class FileAccess(object):
i += 1
return url
- def getURL(self, parentPath, childPath):
- parent = self.filenameConverter.getSystemPathFromFileURL(parentPath);
- path = parent + "/" + childPath
- return self.filenameConverter.getFileURLFromSystemPath(parentPath, path)
+ def getURL(self, parentURL, childPath):
+ if len(childPath) > 0 and childPath[0] == "/":
+ path = parentURL + childPath
+ else:
+ path = parentURL + "/" + childPath
+ return path
def getURL1(self, path):
f = "/"
commit 4231274abaec8e45538788bd67261044d7ef4bea
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Aug 4 18:05:20 2015 +0200
tdf#76845: vcl: main thread does not necessarily have SolarMutex
... at least not if VCLXWindowImpl::OnProcessCallbacks drops it and
calls arbitrary event handlers.
So try to make nested SolarMutexReleaser work in that case (although
poorly).
Change-Id: I1e2a1f4d6f42f826692696f7d92d1c3d71291f39
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 73c9175..c7dff0b 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -394,9 +394,9 @@ void Application::ReAcquireSolarMutex(sal_uLong const nReleased)
{
// 0 would mean that events/timers will be handled without locking
// SolarMutex (racy)
- assert(nReleased != 0);
+ SAL_WARN_IF(nReleased == 0, "vcl", "SolarMutexReleaser without SolarMutex");
#ifdef WNT
- if (ImplGetSVData()->mbDeInit) // do not Yield in DeInitVCL
+ if (nReleased == 0 || ImplGetSVData()->mbDeInit) //do not Yield in DeInitVCL
AcquireSolarMutex(nReleased);
else
ImplYield(false, false, nReleased);
More information about the Libreoffice-commits
mailing list