On Fri, 2012-01-06 at 19:03 +0100, Stephan Bergmann wrote:
So, I would appreciate it if some Calc aficionado could look at the
patch, whether it actually makes any sense.
First, I have to say all this auto format code is not something I'm
familiar with. So, my opinion is based on what I gathered in the past
~10 minutes of reading how the global ScAutoFormat instance is used
throughout the calc code. I'm CC'ing Eike in case my answer is off the
mark.
Anyway, it's my understanding that the main problem is that the global
ScAutoFormat instance unintentionally get instantiated in the destructor
of ScAutoFormatObj during the termination of the cppunit? In that case,
what I would do is to add ScGlobal::HasAutoFormat() which simply checks
whether the instance already exists, and if yes go on ahead and save if
the flag is set. When no such instance exists there is no need to save
stuff anyway (since there is no data to save).
Another advantage of this is that we wouldn't have to modify all the
code that currently uses GetAutoFormat() expecting it to return a live
instance at all times, and we could only modify the code in
~ScAutoFormatObj().
Would that solve the problem you are facing?
Kohei
--
Kohei Yoshida, LibreOffice hacker, Calc
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.