[Libreoffice] are files bigpointerarry-new.[hc]xx used?

Jan Holesovsky kendy at suse.cz
Fri Dec 30 10:37:00 PST 2011


Hi Terry,

On 2011-12-30 at 10:19 -0500, Terrence Enger wrote:

> I have stumbled upon file sw/source/core/bigpointerarray-new.hxx,

I guess you mean sw/qa/core/bigpointerarray-new.hxx, right?

> but I have not found any place where it is used.  In particular
> both opengrok full search for bigpointerarry and git-grep for
> bigpointerarray come up empty.  And yet, the file was last
> maintained in May, 2011.
> 
> Implementation file sw/qa/core/bigpointerarray-new.cxx was last
> changed in November, 2011.  Does the build system have magic to
> use this file without naming it explicitly?  This file includes
> bparr.hxx for the definition of classes BigPtrEntry and
> BigPtrArray, and I have seen a bunch of other code in sw/ also
> using bparr.hxx.
> 
> So, I am asking if these two files have a purpose?

Not really - it seems that at some point of time, somebody was
experimenting with replacing the BigPtrArray from a linked list to
std::deque, and did that in this qa/... location.  Then over the time,
the files were changed when there were some automatic updates, like
header changes, or editor modelines introduction.

The BigPtrArray is part of the Writer core, but I am not that convinced
that changing its implementation would bring us that much; if we wanted
to redesign the Writer core, I'd be more interested in looking into /
experiment with more advanced data structures that have undo / redo /
change tracking 'built-in', like piece tables, or some variants of them.
Some read for long winter evenings:

http://cgit.freedesktop.org/libreoffice/build/tree/doc/sw.txt

http://www.cs.unm.edu/~crowley/papers/sds.pdf

http://e98cuenc.free.fr/wordprocessor/piecetable.html

http://catch22.net/tuts/neatpad/17

Either way - such a change would be like a heart transplant; or maybe a
brain transplant ;-)

> Is it
> possible and desirable to remove them?

Yes, I removed bigptrarray-new.*, no point in keeping them:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=16ea3bec808dc53de557bf1765c503b38848ab8d

> If not, is there a way
> that I could figure that out without bothering the experts
> reading this list?

First you want to check if the file is compiled at all; then look into
its history - 'git log -p path/to/the/file.cxx', and see if the changes
there have any substance, or if it is just series of automated changes.
Then if still in doubt, mail the list :-)

Regards,
Kendy



More information about the LibreOffice mailing list