Bug 76295 - Easier way to back-up/restore AutoText and AutoCorrect items
Summary: Easier way to back-up/restore AutoText and AutoCorrect items
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 154586 (view as bug list)
Depends on:
Blocks: AutoCorrect-Complete User-Profile AutoText
  Show dependency treegraph
 
Reported: 2014-03-17 23:00 UTC by Rogerio Luz Coelho
Modified: 2023-10-31 09:23 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rogerio Luz Coelho 2014-03-17 23:00:40 UTC
Say you are a power user, and say you just love Writer's AutoCorrect and AutoText capabilities, but since you work on lots of different computers (3 at home and 10 at work) there should be an EASY WAY to backup and restore your AutoCorrect and AutoText configurations. 

The way it works now, I have to get a file way down in the LibreOffice tree, and copy it to these other machines. Now that I know what to do, it is mostly painless, but it was a slow learning curve. 

Besides, this files are not "user friendly" in a way I can edit them directly with LibO. 

The window of AutoText (CTRL+F3) is also a little ugly and difficult to understand at first glance, and this should also be redone (Categories, Path and Import are not as easy to understand as it should).    

My DREAM REQUEST would be to make both AutoText and the AutoCorrect each a .ods file and this file be made user-editable. Besides I think it would be very useful for a Export/Import routine for these 2 capabilities. But also maintaining the power they already have. 

This would greatly facilitate transitions to new versions, and I don't think the bigger .ods file would be THAT burdensome. 

Hope someone gets interested in this :) 

Rogerio
Comment 1 tommy27 2014-04-13 18:09:46 UTC
enhancement request.
Comment 2 Buovjaga 2016-01-15 19:20:31 UTC
*** Bug 97096 has been marked as a duplicate of this bug. ***
Comment 3 tommy27 2016-01-16 06:21:59 UTC
in the past I've done an autocorrect to calc macro that did something like you ask.

basically I extracted the  documentlist.xml from the acor.dat file where I had the autocorrect list and then pasted it's address into the E1 cell of an empty Calc sheet

here's the code (sorry but comments are in italian so you need to translate them). I don't know it it's still working... I used it years ago.


Sub AutocorrToCalc 
 dim s as string 
 dim f(1) as string 
 If msgbox("Vuoi continuare?",1)=2 then 
 msgbox("Procedura annullata") 
 exit sub 
 end if 

dim oDoc 
 dim oSheet 
 dim oCell 

oDoc = ThisComponent 
 oSheet = oDoc.Sheets("Foglio1") 
 oCell = oSheet.GetCellRangeByName("E1") 
 ' inserire l'indirizzo del file .xml nella cella E1 del Foglio 1 
 fileName = oCell.String 
 Nome = convertToURL(fileName) 
 Nome2=Nome+".tmp" 
 oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") 
 'xray oucb 
 txt = createUnoService("com.sun.star.io.TextInputStream") 
 txt2 = createUnoService("com.sun.star.io.TextOutputStream") 

txt.setEncoding("UTF-8") 

if FileExists(Nome) Then 

Pippo=oUcb.openFileRead(Nome) 
 txt.setInputStream(Pippo) 
 Pappo=oUcb.openFileWrite(Nome2) 
 txt2.setOutputStream(Pappo) 

Dim a() as variant 
 while txt.readBytes(a(), 1) = 1 
 if a(0)=62 then 
 txt2.writeBytes(a(),1) 
 a(0)=13 
 txt2.writeBytes(a(),1) 
 a(0)=10 
 end if 
 txt2.writeBytes(a(),1) 
 wend 
 txt.closeInput 
 txt2.closeOutput 

Pippo=oUcb.openFileRead(Nome2) 
 txt.setInputStream(Pippo) 
 s = "" 
 qq = """" 
 row = 0 

while not txt.iseof(1) 
 f(0)="<" 
 f(1)=">" 
 s= txt.ReadLine() 
 'print s 
 pip()=Split(s, ">") 
 l = UBound(pip) 
 for n=0 to l 
 s=pip(n)+">" 
      if InStr(s, "abbreviated-name") then 
          s1 = InStr(s, qq) + 1 
          s2 = InStr(s1, s, qq) + 1 
          s3 = InStr(s2, s, qq) + 1 
              s4 = InStr(s3, s, qq) + 1 

         w1 = mid(s, s1, s2-s1-1) 
          w2 = mid(s, s3, s4-s3-1) 

          oSheet.GetCellByPosition(0, row).String = w1 
            oSheet.GetCellByPosition(1, row).String = w2 

           row = row+1 
            s = "" 
      end if 
 next 
 wend 
 end if 
 txt.closeInput 
 Print "esportazione completata"
 End Sub
Comment 4 tommy27 2016-01-16 10:17:54 UTC
playing with BASIC code could fit that macro to your needs and a power user could even build an extension from it
Comment 5 Stéphane Guillou (stragu) 2023-04-18 09:10:08 UTC
*** Bug 154586 has been marked as a duplicate of this bug. ***