Kaydet (Commit) 49df6e0d authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Adapt file URL hackery to Windows

Change-Id: Icee10aae97e9bcef7a3db7e966c1c4ef6780fc1d
üst 4bcfde41
......@@ -22,7 +22,7 @@ class Fdo84315(unittest.TestCase):
cls._uno = UnoInProcess()
cls._uno.setUp()
workdir = os.environ[ "WORKDIR_FOR_BUILD" ]
cls._xDoc = cls._uno.openDoc(os.path.join(workdir, "CppunitTest/fdo84315.odb"))
cls._xDoc = cls._uno.openDoc(workdir + "/CppunitTest/fdo84315.odb")
@classmethod
def tearDownClass(cls):
......
......@@ -224,7 +224,10 @@ class UnoInProcess:
desktop = smgr.createInstanceWithContext("com.sun.star.frame.Desktop", self.getContext())
props = [("Hidden", True), ("ReadOnly", False), ("AsTemplate", False)]
loadProps = tuple([mkPropertyValue(name, value) for (name, value) in props])
url = "file://" + file
if os.name == "nt":
url = "file:///" + file
else:
url = "file://" + file
self.xDoc = desktop.loadComponentFromURL(url, "_blank", 0, loadProps)
assert(self.xDoc)
return self.xDoc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment