Beiträge von bschmitz

    Hallo,


    die Konfigurationsdatei von LibreOffice (registrymodifications.xcu) hat eine xml-Struktur. Leider schaffe ich es nicht die bestimmte Zeile für die Standardschriftart auszulesen:

    <item oor:path="/org.openoffice.Office.Writer/DefaultFont"><prop oor:name="Standard" oor:op="fuse"><value>Open Sans</value></prop></item>


    Ich scheitere am XPath. Fehlermeldung z.B.:

    Parent XPath: /oor:items/item[1188]/prop[1]

    Error on select XML nodes with XPath "/oor:items/item[1188]/prop[1]":


    Kann mir jemand helfen, wie ich den XPath angeben muss, damit er diese Zeile findet?


    Danke für jeden Tipp.

    BS

    Habe mir vorerst damit geholfen, die Ausgabe auf eine Schriftart zu beschränken. Das passt in die Tabelle :smiling_face:

    Code
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
    $fontCollection = (New-Object System.Drawing.Text.InstalledFontCollection).Families
    $fontName = "Arial"
    $fontCollection | Where-Object { $_.Name -match $fontName } | ForEach-Object { $_.Name -replace '^Name ' }

    Ich habe jetzt auch ein passendes PowerShell Script gefunden:

    Code
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
    $objFonts = New-Object System.Drawing.Text.InstalledFontCollection
    $objFonts.Families

    Damit werden alle Schriftarten untereinander aufgelistet.
    Bei der Ausgabe in eine Variable habe ich jedoch das Problem, dass das Feld wohl zu klein ist.

    Zitat

    ERROR: String or binary data would be truncated in table 'ACMP202112131142.dbo.CF_VAL_B590032A8249467298BD2F52', column 'CF_DC0E8961CD1042329AA7B19618E4'. Truncated value: 'Name

    ----

    ABSALOM

    A'

    Hast du noch einen Tipp, wie ich die Tabelle dafür anlege?
    Danke vorab!