Hi all,
I’ve been getting an OSL_ENSURE failure when I run LibreOffice on my Ubuntu Linux VM.
The error is:
warn:legacy.osl:25546:1:sw/source/core/attr/format.cxx:227: SwFormat::~SwFormat: Def dependents!
This appears to be occuring because the OSL_ENSURE is calling on DerivedFrom(), which actually
returns the following:
return const_cast <http://opengrok.libreoffice.org/s?defs=const_cast&project=core><SwFormat
<http://opengrok.libreoffice.org/xref/core/sw/inc/format.hxx#SwFormat>*>(static_cast
<http://opengrok.libreoffice.org/s?defs=static_cast&project=core><const SwFormat
<http://opengrok.libreoffice.org/xref/core/sw/inc/format.hxx#SwFormat>*>(GetRegisteredIn
<http://opengrok.libreoffice.org/s?defs=GetRegisteredIn&project=core>()));
GetRegisteredIn() is just an event source of type SwModify, the odd thing is that it calls on
GetRegistedIn() which is NOT a member of SwModify (or any child classes).
In fact, I’m surprised that this even compiles, as I was under the impression that a static_cast
was a compile time check...
http://opengrok.libreoffice.org/xref/core/sw/inc/format.hxx#110
<http://opengrok.libreoffice.org/xref/core/sw/inc/format.hxx#110>
Anyway, what *exactly* is this attempting to do? The name looks like it’s doing a debugging check
to ensure that the SwFormat class was registered in a derived class, but I can’t see how this would
ever work!
In fact, wouldn’t a dynamic_cast be better, as this most specifically down or upcasts a pointer,
and returns NULL if it fails?
Any advise on this would be greatly appreciated, got me thoroughly tricked...
Chris
Context
- SwFormat::DerviedFrom() · Chris Sherlock
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.