https://bugs.freedesktop.org/show_bug.cgi?id=63756

--- Comment #23 from Anton Derbenev <[email protected]> 
---
It seems doomed, xslt2-transformer did not help.

To relief poor users' pain, I've written small AutoHotkey script to convert
files.



#NoEnv

If %0%
    Loop %0%
    ConvertFiles(%A_Index%)
Else {
    FileSelectFile srcFilesList, M,, Файлы для преобразования, Файлы XML
(*.xml)
    Loop Parse, srcFilesList, `n
    {
    If A_Index = 1
        srcDir=%A_LoopField%\
    Else
        ConvertFiles(srcDir . A_LoopField)
    }
}

Exit

ConvertFiles(srcMask) {
    Loop %srcMask%
    {
    LoopFileDir=
    If A_LoopFileDir
        LoopFileDir=%A_LoopFileDir%\
    dstName=%LoopFileDir%%A_LoopFileName%.UTF-8.xml
    srcName=%A_LoopFileFullPath%

    FileEncoding CP1251
    FileRead srcXML, %srcName%

    FileEncoding UTF-8-RAW
    StringReplace srcXML, srcXML, encoding="Windows-1251", encoding="UTF-8"

    IfExist %dstName%
    {
        If Not ReplaceSilently
        {
        MsgBox 35, Сохранение обработанного файла, Файл уже существует`,
заменить?`n`n%dstName%
        IfMsgBox Cancel
            Exit

        IfMsgBox No
            continue

        ; IfMsgBox Yes 
        If Not AskedOnce
        {
            AskedOnce=1
        } Else {
            AskedOnce=-1
            MsgBox 36, Сохранение обработанных файлов, Заменять все файлы без
дополнительных вопросов?
            IfMsgBox Yes
            ReplaceSilently=1
        }
        }

        FileDelete %dstName%
    }
    FileAppend %srcXML%, %dstName%
    }
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to