How to reproduce:
* Download https://www.libreoffice.org/bugzilla/attachment.cgi?id=80191
* Open it using LibreOffice
* File > Save
* Re-save it with another name as .docx
* Re-open it
Behavior: at the first seconds when the file is loaded, the figure numbers are correctly showed ('figure 1' for the first picture, 'figure 2' for the second). But a second afterwards, 'figure 2' changes to 'figure 1'. So in general the number is correctly imported, but is recalculated somehow which result in an incorrect figure number.
Tested on 3 independent computers; Windows 7 x64, windows 8 x64 and Linux Mint 15 x64 (build today).
All with master Version: 188.8.131.52.alpha0+
Build ID: bfaea05b711ff3e204429ce9bd26c5fe63b0b687
TinderBox: Win-x86@42, Branch:master, Time: 2013-10-24_00:06:20
Log on IRC with instructions related to this problem:
[17:02] <@vmiklos> jorendc: aha. so after the import on the first "onfocus" event some field is updated. that happens in writerfilter/source/dmapper/ModelEventListener.cxx. my first try would be to see if i disable everything in notifyEvent(), see if that helps.
[17:02] <@vmiklos> jorendc: if so, then the cached result of the field is OK, but not the field instruction, that's why you get bad results after the field update.
[17:03] <@vmiklos> if you look into the docx file manually, that may help to decide if the field instruction is already wrong (export problem), or that's ok, then you have an import problem.
The exported file from LibreOffice opens correctly using Microsoft Word 2010.
The bad behavior happens somewhere in SwLayIdle::_DoIdleJob (sw/source/core/layout/layact.cxx).
Placing all code of that function in comments result in 'good behavior'.
I ended up somewhere in vcl and svx.
Caolan: Any thoughts about this one? Looks like repainting is the cause of this problem. The whole repaining starts in SwLayIdle. I ended in my quest to hunt this down in SalGraphics::CopyBits , without result :s (there CopyBits is called again and again, as C++ noob this really weird :) ). But Probably I took somewhere the wrong 'track' in the code, which result in ending there.
@Caolan: forgot you to add you in CC when posting comment 4. ^^ Sorry for the noise.
Not reproducible anymore, tested using Mac OSX 10.9 with LibreOffice Version: 184.108.40.206.alpha0+
Build ID: 619b4c40da9e85febbb08a3f7cf8aa8d10963fc1
TinderBox: MacOSX-x86@49-TDF, Branch:master, Time: 2014-04-18_00:07:53