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


Hi,

On Mon, Mar 23, 2015 at 10:27:29AM +0100, Bjoern Michaelsen wrote:
On Mon, Mar 23, 2015 at 09:54:45AM +0100, Miklos Vajna wrote:
/home/vmiklos/git/libreoffice/master-clang/sw/source/core/doc/docfmt.cxx:657:26: error: c-style 
cast, type=5, from='const sw::WriterListener *', to='SwClient *', recommendedFix=static_cast 
[loplugin:cstylecast]
    while( 0 != ( pDep = (SwClient*)aCallMod.GetDepends()) )

just adding quickly: All of that btw seems to be a workaround for the weird API
discussed: One would assume you could call something like:

 aCallMod.CallSwClientNotify(aDeregisterFromMeNowHint);

and universally cause Clients to deregister. There is something almost like that
historically:

 SwPtrMsgPoolItem aDying(RES_OBJECT_DYING, aCallMod);
 aCallMod.ModifyBroadcast(nullptr, aDying);

... however, it has the nasty side effect of reregistering the clients of the
"dying" object at the SwModify the "dying" object was registered itself. Thats
really not expected behaviour. It seems though, that instead of creating a sane
"deregister" hint, that triggers some more obvious behaviour, people just
played around with the private parts of the SwModify/SwClient classes(*).

Best,

Bjoern

(*) This might have been reenforced by "if I touch calbck.hxx, I need to
recompile all of sw/, OMG dont want to do that." avoidance strategies back in
the days.

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.