From 52523f39aff9730a308eaca07a3c487829e36e8d Mon Sep 17 00:00:00 2001 From: jmzambon Date: Fri, 26 May 2017 17:52:14 +0200 Subject: tdf#97362: CheckBookmarks unittest migrated to python (check_bookmarks.py) Change-Id: Ie5fa41d4346d921ed905795b76ea3c3e90b3d4a2 Reviewed-on: https://gerrit.libreoffice.org/38080 Tested-by: Jenkins Reviewed-by: Michael Meeks --- unotest/source/python/org/libreoffice/unotest.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'unotest') diff --git a/unotest/source/python/org/libreoffice/unotest.py b/unotest/source/python/org/libreoffice/unotest.py index 13b00845bb36..0bb5212c9d4a 100644 --- a/unotest/source/python/org/libreoffice/unotest.py +++ b/unotest/source/python/org/libreoffice/unotest.py @@ -43,6 +43,18 @@ except ImportError: def mkPropertyValue(name, value): return uno.createUnoStruct("com.sun.star.beans.PropertyValue", name, 0, value, 0) +def mkPropertyValues(**kwargs): + '''mkPropertyValues(Name=Value, Name=Value,...) -> (PropertyValue, PropertyValue,...) + ex. : mkPropertyValues(Hidden=True, ReadOnly=False)''' + from com.sun.star.beans import PropertyValue + return tuple(PropertyValue(k,0,kwargs[k],0) for k in kwargs) + +def fileUrlToSystemPath(url): + return pyuno.fileUrlToSystemPath(url) + +def systemPathToFileUrl(systemPath): + return pyuno.systemPathToFileUrl(systemPath) + ### UNO utilities ### class OfficeConnection(object): -- cgit