summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/convwatch.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/convwatch.py b/bin/convwatch.py
index bef3f9e16c77..283e67e52581 100644
--- a/bin/convwatch.py
+++ b/bin/convwatch.py
@@ -240,8 +240,11 @@ def loadFromURL(xContext, url):
xGEB = xContext.getValueByName(
"/singletons/com.sun.star.frame.theGlobalEventBroadcaster")
xGEB.addDocumentEventListener(xListener)
+ xDoc = None
try:
xDoc = xDesktop.loadComponentFromURL(url, "_blank", 0, loadProps)
+ if xDoc is None:
+ raise Exception("No document loaded?")
time_ = 0
while time_ < 30:
if xListener.layoutFinished:
@@ -280,6 +283,7 @@ class LoadPrintFileTest:
self.prtsuffix = prtsuffix
def run(self, xContext):
print("Loading document: " + self.file)
+ xDoc = None
try:
url = "file://" + quote(self.file)
xDoc = loadFromURL(xContext, url)