TimeStamp Backup

Discussions about using 3rd party extension with OpenOffice.org

TimeStamp Backup

Postby Zizi64 » Sun Jan 01, 2017 5:29 pm

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
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.

You can download the latest version of this extension for LibreOffice
and for OpenOffice from the pages (updated):
https://extensions.libreoffice.org/exte ... amp-backup
http://flowcont.hu/LO_oxt_store/

This extension licenced under the GPL v3 licence.

timeStampBackup_v1-1-2.oxt
(53.59 KiB) Downloaded 94 times


 Edit: See the latest version on the linked pages above or below in this topic. 
Last edited by Zizi64 on Thu Apr 05, 2018 7:58 am, edited 4 times in total.
Tibor Kovacs, Hungary; LO4.4.7, LO5.4.6 on Win7x64Prof.
PortableApps, winPenPack: LO3.3.0-LO6.0.2 and AOO4.1.5
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6465
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Postby charlie.it » Sun Jan 01, 2017 5:56 pm

Ciao Zizi64, it's your job? My compliments to you.
I report a problem: you must have first saved the file normally?

Schermata 01-2457755 alle 16.51.49.png

Then, it does not exist for Base?
charlie
macOS 10.12 Sierra: Open Office 4.1.5 - LibreOffice 5.4.3.2
Windows 7 pro (VirtualBox): Open Office 4.1.5 - LibreOffice 5.4.4.2
Ubuntu 17.04 LTE (VirtualBox): LibreOffice 5.1.6.2
http://www.charlieopenoffice.altervista.org
User avatar
charlie.it
Volunteer
 
Posts: 288
Joined: Wed Aug 21, 2013 2:12 pm
Location: Italy

Re: TimeStamp Backup

Postby Zizi64 » Sun Jan 01, 2017 6:33 pm

Thank you.
Yes, it is my job, but it is based on the structure of the extension MultiSave:
http://extensions.openoffice.org/en/project/multisave
and the extension MultiFormatSave:
http://extensions.openoffice.org/en/pro ... formatsave

And yes: you must save a new document first when you use this version of the extension. The extension works with documents that have URL.

The extension localised for three languages only: HU, EN, and DE
Sorry for my poor english, (and sorry for the german translation of the Google Translator;-) )
If you can fix (grammatically) my english and german (deutch) strings inside the extension, or if you can make the italian (and other language) strings, please help me.

I never used the Base application, therefere I have not created icons for the Base. But I suppose the StarBasic/API code can work with the Base too...
I will try to insert menu item and toolbar icon for the Base.
Last edited by Zizi64 on Sun Jan 01, 2017 7:07 pm, edited 1 time in total.
Tibor Kovacs, Hungary; LO4.4.7, LO5.4.6 on Win7x64Prof.
PortableApps, winPenPack: LO3.3.0-LO6.0.2 and AOO4.1.5
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6465
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Postby charlie.it » Sun Jan 01, 2017 6:39 pm

Some time ago I reported that this extension, also works with Base: https://forum.openoffice.org/en/forum/v ... 47&t=77024.
charlie
macOS 10.12 Sierra: Open Office 4.1.5 - LibreOffice 5.4.3.2
Windows 7 pro (VirtualBox): Open Office 4.1.5 - LibreOffice 5.4.4.2
Ubuntu 17.04 LTE (VirtualBox): LibreOffice 5.1.6.2
http://www.charlieopenoffice.altervista.org
User avatar
charlie.it
Volunteer
 
Posts: 288
Joined: Wed Aug 21, 2013 2:12 pm
Location: Italy

Re: TimeStamp Backup

Postby charlie.it » Sun Jan 01, 2017 6:50 pm

Ciao, here is the original extension in French and the translated extension in Italian (this one works with AOO. With LO it works, but there are not the icon in the bar):
Edit: Also here you must save a new document first when you use this version of the extension
Attachments
acIncrSav-ITA.oxt
Translated Italian extension
(30.35 KiB) Downloaded 68 times
acIncrSav-A-2.1.oxt
Original French extension
(20.82 KiB) Downloaded 69 times
charlie
macOS 10.12 Sierra: Open Office 4.1.5 - LibreOffice 5.4.3.2
Windows 7 pro (VirtualBox): Open Office 4.1.5 - LibreOffice 5.4.4.2
Ubuntu 17.04 LTE (VirtualBox): LibreOffice 5.1.6.2
http://www.charlieopenoffice.altervista.org
User avatar
charlie.it
Volunteer
 
Posts: 288
Joined: Wed Aug 21, 2013 2:12 pm
Location: Italy

Re: TimeStamp Backup

Postby Zizi64 » Sun Jan 01, 2017 7:04 pm

I have published a version of my code in this forum in year 2015 (but it was created some years before):
https://forum.openoffice.org/en/forum/v ... y+#p362314
It is my first extension what i created. We used the code with manually associating to the menu items before. But my collegues have not experience in the associating procedure of the macro codes to a menu item or to a toolbar icon, therefore I tried to create an "easy to install" extension based on the code.

Unfortunatelly, I never found your extension on the non-english, non-hungarian web pages...)

As I see now your code is much larger than mine. Have your code some other functionalities?
Last edited by Zizi64 on Sun Jan 01, 2017 7:19 pm, edited 1 time in total.
Tibor Kovacs, Hungary; LO4.4.7, LO5.4.6 on Win7x64Prof.
PortableApps, winPenPack: LO3.3.0-LO6.0.2 and AOO4.1.5
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6465
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Postby charlie.it » Sun Jan 01, 2017 7:16 pm

The code in not mine, I have only traslate the text from French (with Google :oops: ). Than a volunteer/user in Italian forum has compiled it.
In the menu it allows you to make some settings, like choose the backup folder.
But yours is a great work too :super: :bravo: .
charlie
macOS 10.12 Sierra: Open Office 4.1.5 - LibreOffice 5.4.3.2
Windows 7 pro (VirtualBox): Open Office 4.1.5 - LibreOffice 5.4.4.2
Ubuntu 17.04 LTE (VirtualBox): LibreOffice 5.1.6.2
http://www.charlieopenoffice.altervista.org
User avatar
charlie.it
Volunteer
 
Posts: 288
Joined: Wed Aug 21, 2013 2:12 pm
Location: Italy

Re: TimeStamp Backup

Postby Zizi64 » Sun Jan 01, 2017 7:29 pm

It would be nice if we had a similar feature embedded in the AOO/LO software package.
Tibor Kovacs, Hungary; LO4.4.7, LO5.4.6 on Win7x64Prof.
PortableApps, winPenPack: LO3.3.0-LO6.0.2 and AOO4.1.5
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6465
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Postby charlie.it » Sun Jan 01, 2017 7:58 pm

But then we would not know what to do ...
charlie
macOS 10.12 Sierra: Open Office 4.1.5 - LibreOffice 5.4.3.2
Windows 7 pro (VirtualBox): Open Office 4.1.5 - LibreOffice 5.4.4.2
Ubuntu 17.04 LTE (VirtualBox): LibreOffice 5.1.6.2
http://www.charlieopenoffice.altervista.org
User avatar
charlie.it
Volunteer
 
Posts: 288
Joined: Wed Aug 21, 2013 2:12 pm
Location: Italy

Re: TimeStamp Backup

Postby Zizi64 » Tue Jan 03, 2017 12:48 pm

The version 1.1.4 contains HU, EN, DE, IT, ES, RU localisation. (The Google translator helped me. :oops: )

You can download the recent version from this webpage:
http://flowcont.hu/LO_oxt_store/

And I uploaded it here:
timeStampBackup_v1-1-4.oxt
(93.58 KiB) Downloaded 85 times
Tibor Kovacs, Hungary; LO4.4.7, LO5.4.6 on Win7x64Prof.
PortableApps, winPenPack: LO3.3.0-LO6.0.2 and AOO4.1.5
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6465
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Postby charlie.it » Tue Jan 03, 2017 1:06 pm

Great! :bravo:
(Now we expect integration with Base ;) )
charlie
macOS 10.12 Sierra: Open Office 4.1.5 - LibreOffice 5.4.3.2
Windows 7 pro (VirtualBox): Open Office 4.1.5 - LibreOffice 5.4.4.2
Ubuntu 17.04 LTE (VirtualBox): LibreOffice 5.1.6.2
http://www.charlieopenoffice.altervista.org
User avatar
charlie.it
Volunteer
 
Posts: 288
Joined: Wed Aug 21, 2013 2:12 pm
Location: Italy

Re: TimeStamp Backup

Postby Zizi64 » Tue Jan 03, 2017 1:54 pm

I tried to integrate my extension to the Basic IDE. The icon, and the menu iten is appeared on the UI of the IDE, but - unfortunately - my code can NOT archive the Basic code of the active Module, or the active Directory. It can save the active (Calc, Writer, etc...) document only.
(I will examine the code of the extension linked by you for some "ideas"...)

I suppose it: the Base integration will cause some Problems for me.
Tibor Kovacs, Hungary; LO4.4.7, LO5.4.6 on Win7x64Prof.
PortableApps, winPenPack: LO3.3.0-LO6.0.2 and AOO4.1.5
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6465
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Postby john1320 » Fri Jun 16, 2017 10:21 pm

Very useful. Why not add this extension to extensions.openoffice.org or post it on GitHub? )
LibreOffice 5.2.7 on Windows 7
john1320
 
Posts: 70
Joined: Mon Jun 12, 2017 8:22 pm

Re: TimeStamp Backup

Postby Zizi64 » Sun Jun 18, 2017 2:04 pm

My son (Kovács Levente) has uploaded the project onto GIThub:

https://github.com/kovleventer/timeStampBackup
Tibor Kovacs, Hungary; LO4.4.7, LO5.4.6 on Win7x64Prof.
PortableApps, winPenPack: LO3.3.0-LO6.0.2 and AOO4.1.5
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6465
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Postby hubert lambert » Tue Jun 20, 2017 10:17 am

Hello Tibor,

Thank you for this extension, that I just discover yesterday.
I've translated it to french. Hope all is fine.
In addition, I think there is no need anymore to reference the description files in the manifest, if you want to trim it a little ;).
Regards,
HL

 Edit: It seems to work fine with Base, provided that the BaseWindowState.xcu file is included and the module identifier com.sun.star.sdb.DatabaseDocument added in the mergecontext entries of Addons.xcu file. 

 Edit: Nope, sorry: this works on LibreOffice only. 
Attachments
timeStampBackup-v1-1-4.oxt
(108.81 KiB) Downloaded 66 times
AOOo 4.1.2 on Win7 | LibreOffice on various Linux systems
hubert lambert
 
Posts: 72
Joined: Mon Jun 13, 2016 10:50 am

Re: TimeStamp Backup

Postby hubert lambert » Tue Jun 20, 2017 12:45 pm

Finally I found a solution to make your extension available from within Base.
There was two pitfalls :
- the identifier of the module is com.sun.star.sdb.OfficeDatabaseDocument instead of com.sun.star.sdb.DatabaseDocument
- there's no standardbar in Base, only a toolbar.
Hope this works this time.
Attachments
timeStampBackup-v1-1-4.oxt
Base compatible + french translation
(108.86 KiB) Downloaded 54 times
AOOo 4.1.2 on Win7 | LibreOffice on various Linux systems
hubert lambert
 
Posts: 72
Joined: Mon Jun 13, 2016 10:50 am

Re: TimeStamp Backup

Postby Villeroy » Tue Jun 20, 2017 12:46 pm

I think it can not work with embedded Base. When you save a copy of the document only, the currently edited database will not be included. The database is written back into the document when the last reference is closed. Any kind of grid view, form, query keeps a reference, may be reports, import ranges, pivot tables too.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 25147
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: TimeStamp Backup

Postby hubert lambert » Tue Jun 20, 2017 5:55 pm

The new save option is only available in the main base window, not in the subcomponents. Thus it should be safe.
On the other hand, the global variable ThisComponent seems to be sometimes inconsistent with Base. Maybe would it be better to use instead StarDesktop.CurrentComponent ?

Zizi64 wrote:And yes: you must save a new document first when you use this version of the extension. The extension works with documents that have URL.

One way to avoid this problem could be to use the uno:Save dispatch command (that will pop-up the save file picker if the document has no location):
Code: Select all   Expand viewCollapse view
   [...]
   oDoc = ThisComponent
   ' save
   oFrame = oDoc.CurrentController.Frame
   oDispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
   oDispatcher.executeDispatch(oFrame, ".uno:Save", "", 0, Array())
   ' backup
   sDocURL = oDoc.getURL()
   sBackupURL = CreateUnoService("com.sun.star.util.PathSettings").Backup & "/" & _
   GetFileNameWithoutExtension(sDocURL, "/") & _
   sTimeStamp() & "." & _
   GetFileNameExtension(sDocURL, "/")      
   oDoc.storeToURL(sBackupURL, array())

But first of all, thanks to Zizi64 for this extension!
AOOo 4.1.2 on Win7 | LibreOffice on various Linux systems
hubert lambert
 
Posts: 72
Joined: Mon Jun 13, 2016 10:50 am

Re: TimeStamp Backup

Postby Kovlev » Sun Jun 25, 2017 6:50 pm

The added French localization and Base support now forms the newest (1.1.5) version of TimeStampBackup (thanks for those contributions, I tried to give proper credit in git commit messages). The displayed file saving dialog on pathless files is not yet included, as it's inclusion is still in consideration.
So the new version can be obtained either from github, FlowCont .oxt store (links were posted above), and additionally, this attachment below.
 Edit: Thanks for approval! 
Attachments
timeStampBackup_v1-1-5.oxt
(112.82 KiB) Downloaded 77 times
Last edited by Kovlev on Sun Jun 25, 2017 10:58 pm, edited 1 time in total.
LibreOffice 5 on KDE Neon
Kovlev
 
Posts: 3
Joined: Wed Apr 17, 2013 10:29 am

Re: TimeStamp Backup

Postby Zizi64 » Sun Jun 25, 2017 9:06 pm

My son, Levente (Kovlev - https://forum.openoffice.org/en/forum/m ... le&u=62579) has updated the code on the github, and the directly downloadable .oxt file on the original place based on your ideas and code snippets:
http://www.flowcont.hu/LO_oxt_store/oxt ... v1-1-5.oxt

The 1.1.5 version of the extension contains the french language support and a limited support for Base. Special thanks to Hubert Lambert.

Unfortunatelly my son can not post into this forum. There is some problem with his authorization in this forum with his registration.

 Edit: He can post now. Thanks to thomasjk 
Last edited by Zizi64 on Sun Jun 25, 2017 10:52 pm, edited 3 times in total.
Tibor Kovacs, Hungary; LO4.4.7, LO5.4.6 on Win7x64Prof.
PortableApps, winPenPack: LO3.3.0-LO6.0.2 and AOO4.1.5
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6465
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Postby thomasjk » Sun Jun 25, 2017 9:28 pm

Zizi64. I just approved your son's post under Kovlev. Its now part of the discussion. All new users first post are reviewed and approved by a moderator to avoid spammers.
Tom K.
Windows 10 Home version 1709 16299.125
LibreOffice 5.3.7.2
thomasjk
Volunteer
 
Posts: 4341
Joined: Tue Dec 25, 2007 4:52 pm
Location: North Carolina

Re: TimeStamp Backup

Postby Zizi64 » Fri Jan 05, 2018 9:41 am

Version 1.1.6: NL localisation added.


http://www.flowcont.hu/LO_oxt_store/oxt ... v1-1-6.oxt
Tibor Kovacs, Hungary; LO4.4.7, LO5.4.6 on Win7x64Prof.
PortableApps, winPenPack: LO3.3.0-LO6.0.2 and AOO4.1.5
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6465
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Postby GerhardW » Mon Apr 02, 2018 6:51 pm

Hi zizi64, kovlev,

here are better german and english texts:
Code: Select all   Expand viewCollapse view
MsgBox("The document does not yet have a URL (no valid file name and / or path) ." & Chr(10) & "The document will not be archived. Save your document first.",16,"Attention:")

MsgBox("Das Dokument hat noch keine URL (keinen gültigen Dateinamen und Pfad)." & Chr(10) & "Das Dokument wird nicht archiviert. Speichern Sie zuerst das Dokument.",16,"Achtung:")

But I suggest you consider the proposiion by Hubert Lambert. It has the great advantage that you do not need any language-dependent text, then.
Simply save the document using the dispatcher call if it has no URL or with stor, if it has one, saving the timstamp copy is then identical for both cases. Here is the code:
Code: Select all   Expand viewCollapse view
   If oDoc.hasLocation() then
      oDoc.store()
     else
      document   = ThisComponent.CurrentController.Frame
      dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
      dispatcher.executeDispatch(document, ".uno:Save", "", 0, Array())
   end if
   sDocURL = oDoc.getURL()
   sBackupURL = CreateUnoService("com.sun.star.util.PathSettings").Backup & "/" & _
   GetFileNameWithoutExtension(sDocURL, "/") & _
   sTimeStamp() & "." & _
   GetFileNameExtension(sDocURL, "/")      
   oDoc.storeToURL(sBackupURL, array())

You also have to add the decaration:
Code: Select all   Expand viewCollapse view
dim dispatcher as object, document as object


Gerhard
OpenOffice 4.1.2 on Windows 10
GerhardW
 
Posts: 2
Joined: Mon Apr 02, 2018 6:39 pm

Re: TimeStamp Backup

Postby Kovlev » Tue Apr 03, 2018 9:01 pm

Hi

About the texts, those translations were updated recently by swhib on github (https://github.com/kovleventer/timeStampBackup/pull/4), which did include the pkg descriptions as well. (Just in case if you have planned to update those.)

The file saving dialog threw an error message when the user cancelled the initial file save dialog. With that fixed (a simple 'if' check to see if the document still not has a location) I see no reason not to include this patch. This new version is available now at http://flowcont.hu/LO_oxt_store/, github, and the newly created LO extensions page: https://extensions.libreoffice.org/extensions/timestamp-backup
LibreOffice 5 on KDE Neon
Kovlev
 
Posts: 3
Joined: Wed Apr 17, 2013 10:29 am

Re: TimeStamp Backup

Postby GerhardW » Thu Apr 05, 2018 12:26 am

Hi kovlev,

I simply don't understand what the link https://github.com/kovleventer/timeStampBackup/pull/4 means. None of the entries does tell me anything.
I proposed a better german and english translation and a code (not my invention) that will make a translations unnecessary. Take it or leave it!
I will use your - or your father's - code with my changes, thanks for that.
I am working with LibreOffice, so perhaps this will be my last post here.

Gerhard
OpenOffice 4.1.2 on Windows 10
GerhardW
 
Posts: 2
Joined: Mon Apr 02, 2018 6:39 pm

Re: TimeStamp Backup

Postby Kovlev » Thu Apr 05, 2018 12:39 am

Hi

Those entries are edited files with translations from another guy. But this is irrelevant in this case, since I did accept your proposed code (thanks for you and hubert lambert). With this update the current version number is 1.1.8, and this version does contain your edit (in case you don't want to modify the code everytime you reinstall this extension, you can use that).
LibreOffice 5 on KDE Neon
Kovlev
 
Posts: 3
Joined: Wed Apr 17, 2013 10:29 am


Return to Extensions

Who is online

Users browsing this forum: No registered users and 3 guests