Power loss while saving a LibreOffice Writer file -> Cryptic Recovery

While saving a LibreOffice Writer file my power was cut. Windows did some repairs by it self while booting but now my file is somewhat cryptic.

It starts like this followed by 675 Pages with cryptic characters.

// Mozilla User Preferences

// DO NOT EDIT THIS FILE.
//
// If you make changes to this file while the application is running,
// the changes will be overwritten when the application exits.
//
// To change a preference value, you can either:
// - modify it via the UI (e.g. via about:config in the browser); or
// - set it within a user.js file in your profile.

user_pref("accessibility.typeaheadfind.flashBar", 0);
user_pref("app.update.auto.migrated", true);
user_pref("app.update.background.previous.reasons", "[\"cannot usually check for updates due to policy, testing configuration, or runtime environment\",\"on Windows but cannot usually use BITS\",\"not default profile\",\"the maintenance service registry key is not present\"]");
user_pref("app.update.lastUpdateTime.addon-background-update-timer", 1705262715);

Is that still my writer document or did windows replaced the content with something different? I did a google search and judging by the “Mozilla User Preferences” it seems to be somehow java related. That is strange.

I would make a copy of the file immediately so that any experiments you do to recover are only on a copy, not the original. I don’t think I can help with this file.

My first idea would be to see if there is a temporary file still available that could be used to recreate the document.

  1. Find where LibreOffice has set it temporary files. Look in Tools > Options > LibreOffice > Paths to find out, e.g. C:\Users[username]\AppData\Local\Temp
  2. In a file manager, go to that folder and look for a folder beginning with lu and ending .tmp dated around time of crash
  3. Open the folder, find the largest file named luxxxxxxx.tmp and copy it to another location.
  4. From LibreOffice, navigate to the the copied file and open it.
  5. If it looks OK, Save as [anothername].odt