+
+# From: Joerg Jenderek
+# URL: https://en.wikipedia.org/wiki/StarOffice
+# Note: used in Star-, Open- and Libre-Office
+# named as soffice.StarConfigFile.6 or OpenOffice.org configuration by others
+0 ubeshort 0x0400
+#>(2.s+8) ubequad x \b, gap 0x%16.16llx
+# test for null value in gap after theme name maybe unreliable
+#>(2.s+9) ubyte 0 \b, 0-byte
+# look for keyword GALRESRV near the end
+# "C:\Program Files (x86)\StarOffice6.0\share\gallery\sg27.thm" Navigation, 238 objects
+#>0 search/8415 GALRESRV \b, GALRESRV found
+# "neues thema6.thm" MorePictures, 315 objects
+#>0 search/19299 GALRESRV \b, GALRESRV FOUND
+#>2 uleshort x \b, name length %u
+# skip file2147.chk by check for positive name length like for sg16.thm "3D"
+>2 uleshort >0 StarOffice Gallery theme
+!:mime application/x-stargallery-thm
+!:ext thm
+# gallery name
+>>2 pstring/h x %s
+# number of objects
+>>(2.s+4) ulelong x \b, %u object
+# plural s
+>>(2.s+4) ulelong !1 \bs
+# if available then display first object name
+>>(2.s+4) ulelong >0
+# partial file name, URL or internal name like "dd2*" of 1st object or RESRV
+>>>(2.s+11) pstring/h x \b, 1st %s
+