diff --git a/README.md b/README.md index 26db7b0..88f8dca 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,25 @@ -# Timestamp Backup LibreOffice extension - -This extension created for the LibreOffice and OpenOffice enables the -user to make normal Save and to create a TimeStamped Backup copy of the -actual document at once. -The archiv file with a time stamped filename will placed into the -Backup directory given in the -Tools - Options - Open/LibreOffice - Paths -It is better to adjust the path of the Backup directory to a user +# Timestamp Backup LibreOffice Extension + +This extension for LibreOffice and OpenOffice enables the +user to make a normal save and to additionally create a timestamped backup copy of the +document with just one click. + +The backup copy will be placed into the +backup directory set in `Tools - Options - Open/LibreOffice - Paths - Backups` + +It is recommended to adjust the path of the backup directory to a user friendly place. -The extension has a menu item in the File menu, and a toolbar icon -in the Standard toolbar, and it works in the applications listed below: -Writer, WriterWeb, WriterMaster; Calc, Draw, Impress, Math applications. +The extension has a menu item in the `File` menu, and a toolbar icon +in the `standard` toolbar. + +It works in these applications: Writer, WriterWeb, WriterMaster, Calc, Draw, Impress, Math. You can download the latest version of this extension for LibreOffice -and for OpenOffice from the page: +and for OpenOffice from this page: http://flowcont.hu/LO_oxt_store/ -This extension under licenced in the GPL v3 licence. +License: GPL v3 Original creator: Kovács Tibor diff --git a/timeStampBackup/Addons.xcu b/timeStampBackup/Addons.xcu index 5411bd8..2530bf4 100644 --- a/timeStampBackup/Addons.xcu +++ b/timeStampBackup/Addons.xcu @@ -18,7 +18,7 @@ Save and Timestamp-backup Mentés és időbélyeges archiválás - Speichern und Zeitstempelspeichern + Speichern, auch als Backup mit Zeitstempel Salva e archivio con date e ora Guardar y archivar con fecha y hora Сохранение и архив с указанием даты и времени @@ -64,7 +64,7 @@ Save and Timestamp-backup Mentés és időbélyeges archiválás - Speichern und Zeitstempelspeichern + Speichern, auch als Backup mit Zeitstempel Salva e archivio con date e ora Guardar y archivar con fecha y hora Сохранение и архив с указанием даты и времени @@ -103,7 +103,7 @@ Save and Timestamp-backup Mentés és időbélyeges archiválás - Speichern und Zeitstempelspeichern + Speichern, auch als Backup mit Zeitstempel Salva e archivio con date e ora Guardar y archivar con fecha y hora Сохранение и архив с указанием даты и времени diff --git a/timeStampBackup/pkg-desc/pkg-description.de b/timeStampBackup/pkg-desc/pkg-description.de index 9eaa130..409bc4f 100644 --- a/timeStampBackup/pkg-desc/pkg-description.de +++ b/timeStampBackup/pkg-desc/pkg-description.de @@ -1,14 +1,19 @@ -Diese Erweiterung wurde für LibreOffice und OpenOffice erstellt und ermöglicht es den Benutzern, normale Save zu erstellen und eine TimeStamped Backup-Kopie des aktuellen Dokuments auf einmal zu erstellen. -Die Archivdatei mit einem zeitgestempelten Dateinamen wird in das Backup-Verzeichnis in den Tools - Optionen - Open / LibreOffice - Pfade platziert -Es ist besser, den Pfad des Backup-Verzeichnisses an einen benutzerfreundlichen Ort anzupassen. +Diese Erweiterung wurde für LibreOffice und OpenOffice erstellt und ermöglicht es dem Benutzer, +gleichzeitig die Datei zu speichern und eine Backup-Kopie mit Zeitspempel zu erstellen. -Die Erweiterung verfügt über einen Menüpunkt im Menü Datei und ein Symbolleistensymbol in der Symbolleiste Standard, und es funktioniert in den folgenden Anwendungen: -Writer, WriterWeb, WriterMaster; Calc, Draw, Impress, Base, Mathematische Anwendungen. +Diese Backup-Kopie wird in das unter Extras - Optionen - Open-/LibreOffice - Pfade - Backup +eingestellte Verzeichnis gespeichert. Es wird empfohlen, das Backup-Verzeichnis auf einen +benutzerfreundlicheren Ort umzustellen. -Sie können die neueste Version dieser Erweiterung für LibreOffice herunterladen -Und für OpenOffice von der Seite: +Die Erweiterung fügt einen Eintrag im Menü Datei und ein Symbol in der Symbolleiste Standard hinzu. + +Die Erweiterung funktioniert in den folgenden Anwendungen: +Writer, WriterWeb, WriterMaster; Calc, Draw, Impress, Base, Math + +Sie können die neueste Version dieser Erweiterung für LibreOffice und OpenOffice +von dieser Seite herunterladen: Http://flowcont.hu/LO_oxt_store/ -Diese Erweiterung lizenziert unter der GPL v3 Lizenz. +Diese Erweiterung ist lizenziert unter der GPL v3. Tibor Kovács - Flow-Cont Ltd. diff --git a/timeStampBackup/pkg-desc/pkg-description.en b/timeStampBackup/pkg-desc/pkg-description.en index af50ec3..92925e0 100644 --- a/timeStampBackup/pkg-desc/pkg-description.en +++ b/timeStampBackup/pkg-desc/pkg-description.en @@ -1,14 +1,19 @@ -This extension was created for the LibreOffice and OpenOffice and it enables the users to make normal Save and to create a TimeStamped Backup copy of the actual document at once. -The archive file with a time stamped filename will placed into the Backup directory given in the Tools - Options - Open/LibreOffice - Paths -It is better to adjust the path of the Backup directory to a user friendly place. +This extension for LibreOffice and OpenOffice enables the user to make a normal save and to additionally create a timestamped backup copy of the document with just one click. -The extension has a menu item in the File menu, and a toolbar icon in the Standard toolbar, and it works in the applications listed below: -Writer, WriterWeb, WriterMaster; Calc, Draw, Impress, Base, Math applications. +The backup copy will be placed into the backup directory set in Tools - Options - Open/LibreOffice - Paths - Backups -You can download the latest version of this extension for LibreOffice -and for OpenOffice from the page: -http://flowcont.hu/LO_oxt_store/ +It is recommended to adjust the path of the backup directory to a user friendly place. -This extension licenced under the GPL v3 licence. +The extension has a menu item in the File menu, and a toolbar icon in the standard toolbar. -Tibor Kovács - Flow-Cont Ltd. +It works in these applications: Writer, WriterWeb, WriterMaster, Calc, Draw, Impress, Math. + +You can download the latest version of this extension for LibreOffice and for OpenOffice from this page: http://flowcont.hu/LO_oxt_store/ + +License: GPL v3 + +Original creator: Kovács Tibor + +Project maintainer: kovlev, however any contribution is appreciated + +Relevant OOo forum thread: https://forum.openoffice.org/en/forum/viewtopic.php?f=47&t=86742 diff --git a/timeStampBackup/timeStampBackup/timeStampBackup.xba b/timeStampBackup/timeStampBackup/timeStampBackup.xba index cb76ce4..da05d17 100644 --- a/timeStampBackup/timeStampBackup/timeStampBackup.xba +++ b/timeStampBackup/timeStampBackup/timeStampBackup.xba @@ -30,17 +30,20 @@ Sub timeStampBackup Dim sTimeStamp as string Dim sLocale as string Dim oDoc as object + Dim dirname as string If (Not GlobalScope.BasicLibraries.isLibraryLoaded("Tools")) Then GlobalScope.BasicLibraries.LoadLibrary("Tools") End If - sTimeStamp = "_" & Format(Year(Now), "0000") & Format(Month(Now), "00") & Format(Day(Now), "00") & "_" & _ + sTimeStamp = "___" & Format(Year(Now), "0000") & Format(Month(Now), "00") & Format(Day(Now), "00") & "_" & _ Format(Hour(Now), "00") & Format(Minute(Now), "00") & Format(Second(Now), "00") oDoc = Thiscomponent If oDoc.hasLocation() then sDocURL = oDoc.getURL() + dirname=ReplaceString(DirectoryNameoutofPath(sDocURL, "/"),"_",":") sBackupURL = CreateUnoService("com.sun.star.util.PathSettings").Backup & "/" & _ + ReplaceString(RIGHT(dirname,LEN(dirname)-8),"_","/") & "___" & _ GetFileNameWithoutExtension(sDocURL, "/") & _ sTimeStamp() & "." & _ GetFileNameExtension(sDocURL, "/") @@ -50,11 +53,11 @@ Sub timeStampBackup sLocale = GetRegistryKeyContent("org.openoffice.Setup/L10N",FALSE).getByName("ooLocale") Select case sLocale case "en-GB", "en-US" - MsgBox("The document have not any URL (have not a valid file name and / or path) yet." & Chr(10) & "The document will not be archived. Save your document first.",16,"Attention:") + MsgBox("The document has not any URL (has not a valid file name and / or path) yet." & Chr(10) & "The document will not be archived. Save your document first.",16,"Attention:") case "hu" MsgBox("A dokumentum még nem rendelkezik fájlnévvel és/vagy elérési útvonallal!" & Chr(10) & "Az archiválás nem végrahajtható. Előbb mentsd el a dokumentumot!",16,"Figyelem:") case "de" - MsgBox("Das Dokument haben keine URL (keine gültige Dateinamen und / oder Pfad) noch." & Chr(10) & "Das Dokument wird nicht archiviert. Speichern Sie zuerst das Dokument.",16,"Achtung:") + MsgBox("Das Dokument hat noch keine URL (keinen gültigen Dateinamen und / oder Pfad)." & Chr(10) & "Das Dokument wird nicht archiviert. Speichern Sie zuerst das Dokument.",16,"Achtung:") case "it" MsgBox("Il documento non ha alcun URL (non hanno un nome valido di file e / o percorso) ancora." & Chr(10) & "Il documento non verrà archiviato. Salvare il documento prima.",16,"Attenzione:") case "es"