Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Karl Voit wrote:

Hi!

I was hoping that LibreOffice is able to maintain a spreadsheet
document in uncompressed XML which I can check-in to a version
control system. With this, I'd like to get a nice visualization of
*content changes*, e.g., by using the version control system
features. This is what I want to achieve.


Storing in uncompressed XML was easy via Flat XML ODF Spreadsheet
(fods). I converted a xlsx file to fods and committed it to a git
repository.

Then I changed once single cell in the fods and committed the
modified file as well.

Unfortunately, I got *many* changes:

    1 file changed, 297 insertions(+), 297 deletions(-)

«git show» shows typical lines like:

,----
| [...]
| -  <style:style style:name="ce3" style:family="table-cell" style:parent-style-name="Default">
| +  <style:style style:name="ce10" style:family="table-cell" style:parent-style-name="Default">
| [...]
| -    <table:table-column table:style-name="co21" table:default-cell-style-name="ce11"/>
| +    <table:table-column table:style-name="co21" table:default-cell-style-name="ce18"/>
| [...]
`----

Therefore, the user-made changes are drowned within an ocean of
style-name changes whose purpose is not obvious to me as someone who
is not an expert in ODF format.

With ...

  git show HEAD|grep "^[\+-].*office:value="|grep -v "table:style-name="
    
... I was able to reduce the output lines to the content changes only.

1) How stable is this solution? I.e., is it possible that I exclude
content changes with this expression as well?

2) This git/grep method is not feasible for normal end-customers. Is
there a way to reduce or omit the style-name changes?

I have done some experimentation with the fods format. Apparently when you load a .fods file, 
LibreOffice will invent some style names, which might be different from the style names in the file 
(if any) that was saved from the .xlsx.

Here are some suggestions that might help (but no guarantee):

(1) Load the .fods and save it again before putting it in the version control system. I.e. start 
from the .fods file and not from the .xlsx file.

(2) Give your columns (and cells) named custom styles. I.e. define your own cell styles and apply 
them to your spreadsheet. In this way LO may avoid inventing its own style names.

Hope this helps a bit.

-- 
Piet van Oostrum <piet@vanoostrum.org>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]


-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.