From 187445b2d2885ced92be37ffb11cd2a9bb11f8d6 Mon Sep 17 00:00:00 2001 From: Laurent Godard Date: Mon, 8 Jun 2015 10:24:42 +0200 Subject: Uno api sidebar unit test tdf#91806 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - python test subsequentcheck - correct deck setTitle APi (UI update) - enhance UnoInProcess for flexiility in loading parameter Change-Id: Id04cb78c6162ac84fb3bfd8577f84763109d993e Reviewed-on: https://gerrit.libreoffice.org/16180 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- unotest/source/python/org/libreoffice/unotest.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'unotest') diff --git a/unotest/source/python/org/libreoffice/unotest.py b/unotest/source/python/org/libreoffice/unotest.py index eb13d374e83c..ab3cd8a4919d 100644 --- a/unotest/source/python/org/libreoffice/unotest.py +++ b/unotest/source/python/org/libreoffice/unotest.py @@ -186,6 +186,20 @@ class UnoInProcess: assert(self.xDoc) return self.xDoc + def openEmptyCalcDoc(self): + self.xDoc = self.openEmptyDoc("private:factory/scalc") + return self.xDoc + + def openEmptyDoc(self, url, bHidden = True, bReadOnly = False): + assert(self.xContext) + smgr = self.getContext().ServiceManager + desktop = smgr.createInstanceWithContext("com.sun.star.frame.Desktop", self.getContext()) + props = [("Hidden", bHidden), ("ReadOnly", bReadOnly)] + loadProps = tuple([mkPropertyValue(name, value) for (name, value) in props]) + self.xDoc = desktop.loadComponentFromURL(url, "_blank", 0, loadProps) + assert(self.xDoc) + return self.xDoc + def openWriterTemplateDoc(self, file): assert(self.xContext) smgr = self.getContext().ServiceManager -- cgit