[Libreoffice] [PUSHED] Re: [PATCH] partial easy hack - removal of non-compiled / dead code in sc

Caolán McNamara caolanm at redhat.com
Mon Jan 17 03:51:23 PST 2011


On Sat, 2011-01-15 at 12:44 -0600, Ed Dean wrote:
> Trying to keep up with the changes a little better by sending smaller
> files.  Hope I didn't mess up this diff as I'm new to git, and I had
> to stash to pull in some upstream changes.  Please review!
> 
> This is my first attempt at the sc/source/core/tool directory.

Thanks for this, now pushed. 

As a note, e.g.

//if asdasd
{
}

might be safest replaced by just removing the // and leaving the scoping
{}

i.e. objects created inside {} go out of scope at the end of the }, so
removing them might change the order of destruction, which might have
some subtle side-effects if the dtors are non-trivial. e.g. the xmloff
xml import/export stuff is an example of things that generally require
scope controlled dtors. So I made that change, rather than go to the
hassle of reading carefully the contents of the original {} :-)

> On another note, is there an automated test suite?  If so, I'd love to
> know how to kick it off after I make changes.

Well...

a) we have some build-time cppunit tests that run always during the
build, e.g. building sc will automatically build and run the sc unit
test which is an expanding work in progress.
b) we have "make check" which runs a quick(ish) sanity test smoketest
after a test-install

There are some older unit tests which are not built at the moment, and
have become stale. e.g. search for testshl in opengrok for them. We
should fix those up to build again, and where possible and are
reasonable  tests fix them and reenable them to be run every time.

C.



More information about the LibreOffice mailing list