Is there a way to control which line break format libreOffice writer will use?
I have a collection of odt
files that are managed in a git versioning repository. I love working with odt because most text changes are very clear on git’s textual diff display.
One (small) problem I am having is that I have those files edited on LibreOffice running on several platforms, and libreoffice saves the linebreaks in the text portion of the odt file in using the OS’ preference for line break. It’s not really a problem as it only impacts the diff display (e.g. it shows ^M
when a linux file is later edited in windows) and we do not plan to manipulate those odt
files outside of libreoffice (though it would be nice to know the lines breaks will not cause problem we decide to use other tools on them).
Ideally i’d like to have all platforms using UNIX line breaks.
edit:
here’s a preview what I get for git diff file.odt
diff --git a/file.odt b/file.odt
index f1033bb..12f130fa 100644
--- a/file.odt
+++ b/file.odt
@@ -1,50 +1,15 @@
Context line. not changed. keep linux line breaks.
-- original line.
++ original line.^M
++ a new line added.^M