Lines Matching refs:tryf

23 def tryf(f, d="n/a"):  function
26 def has(doc, s): return tryf(lambda: doc.supportsService(s), False)
30 …d = {"t": tryf(lambda: s.ShapeType), "name": tryf(lambda: s.Name), "pos": v(tryf(lambda: s.Positio…
31 "text": tryf(lambda: s.String[:80]), "p": gs(s, SHAPE_PROPS)}
36 …d["ole"] = {"cls": g(s, "CLSID"), "internal": g(s, "IsInternal"), "model": embedded(tryf(lambda: s…
38 if tryf(lambda: s.supportsService("com.sun.star.drawing.GroupShape"), False) and depth < 4:
48 …if tryf(lambda: e.supportsService("com.sun.star.form.FormComponents"), False) or tryf(lambda: e.su…
49 out.append(["FORM", tryf(lambda: e.Name)]); walk(e)
51 names = tryf(lambda: [p.Name for p in e.getPropertySetInfo().getProperties()], [])
52 …out.append([tryf(lambda: e.Name), tryf(lambda: e.ImplementationName), g(e, "ObjIDinMSO") if "ObjID…
53 …tryf(lambda: e.getValueBinding() is not None, "-"), tryf(lambda: (e.getListEntrySource() is not No…
59 …r = {"title": tryf(lambda: m.Title.String if m.HasMainTitle else ""), "diagram": tryf(lambda: m.Di…
60 …pes": tryf(lambda: [m.DrawPage.Count, sorted(m.DrawPage.getByIndex(i).ShapeType.split(".")[-1] for…
71 return {"other": tryf(lambda: list(m.SupportedServiceNames)[:3])}
75 …ud = tryf(lambda: [[n, v(p.UserDefinedProperties.getPropertyValue(n))] for n in sorted(i.Name for …
82 out[k] = tryf(lambda: sorted(getattr(doc, k).ElementNames), "n/a")
100 …if ty == "TextField": sig.append(tryf(lambda: t.TextField.ServiceName if hasattr(t.TextField, "Ser…
123 …: t.Columns.Count, "cells": len(cn), "cellhash": h("|".join(cn) + "".join(tryf(lambda: t.getCellBy…
124 …"split": [tryf(lambda: t.Rows.getByIndex(r).IsSplitAllowed) for r in range(min(t.Rows.Count, 50))]…
130 sn = tryf(lambda: ",".join(f.SupportedServiceNames))
136 …o["footnotes"] = [doc.Footnotes.Count, [tryf(lambda: doc.Footnotes.getByIndex(i).String[:30], "") …
137 …o["endnotes"] = [doc.Endnotes.Count, [tryf(lambda: doc.Endnotes.getByIndex(i).String[:30], "") for…
143 if name == "embedded": fr[-1].append(embedded(tryf(lambda: f.Model, None)))
156 o["bookmarks"] = tryf(lambda: sorted(doc.Bookmarks.ElementNames))
157 o["refmarks"] = tryf(lambda: sorted(doc.ReferenceMarks.ElementNames))
158 o["indexes"] = tryf(lambda: doc.DocumentIndexes.Count)
168 if k not in ftype: ftype[k] = tryf(lambda: nfs.getByKey(k).Type)
188 …so["annotations"] = [sh.Annotations.Count, h("".join(tryf(lambda: sh.Annotations.getByIndex(k).Str…
189 …so["charts"] = {n: chart_info(tryf(lambda: sh.Charts.getByName(n).EmbeddedObject, None)) for n in …
201 …if pt.TextPortionType == "TextField": urls.append([r, c, tryf(lambda: pt.TextField.URL), tryf(lamb…
210 …o["dde"] = tryf(lambda: [[n, doc.DDELinks.getByName(n).Application, doc.DDELinks.getByName(n).Topi…
211 o["names"] = tryf(lambda: sorted(doc.NamedRanges.ElementNames))
223 …po = {"name": tryf(lambda: pg.Name), "shapes": [shape(pg.getByIndex(k)) for k in range(min(pg.Coun…
224 …, "Layout"), "bg": tryf(lambda: gs(pg.Background, ["FillStyle", "FillColor", "FillTransparence", "…
226 …po["notes"] = tryf(lambda: [pg.NotesPage.getByIndex(k).String[:40] for k in range(min(pg.NotesPage…
229 …o["masters"] = [[tryf(lambda: masters.getByIndex(i).Name), len(shape_list(masters.getByIndex(i)))]…
250 out["props"] = tryf(lambda: docprops(doc), "ERR")