diff options
author | jmzambon <jeanmarczambon@gmail.com> | 2017-05-26 17:52:14 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2017-05-27 16:48:36 +0200 |
commit | 52523f39aff9730a308eaca07a3c487829e36e8d (patch) | |
tree | ebe1e246e4ca84c22c8efdc0338c80c30a51ea03 /unotest/source/python/org | |
parent | 6dbf9543c6f83d7b1fe7ad27232f65152456619a (diff) |
tdf#97362: CheckBookmarks unittest migrated to python (check_bookmarks.py)
Change-Id: Ie5fa41d4346d921ed905795b76ea3c3e90b3d4a2
Reviewed-on: https://gerrit.libreoffice.org/38080
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'unotest/source/python/org')
-rw-r--r-- | unotest/source/python/org/libreoffice/unotest.py | 12 |
1 files changed, 12 insertions, 0 deletions
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): |