Hi Lubos
On 25/03/11 18:52, Lubos Lunak wrote:
printf( "%p %p %s %p %p %s %p %p %s\n", ptr, dynamic_cast< void*>( ptr ),
typeid( *ptr ).name(), pFieldmark, dynamic_cast< void*>( pFieldmark ),
typeid( *pFieldmark ).name(), pCheckboxFm, dynamic_cast< void*>(
pCheckboxFm ), typeid( *pCheckboxFm ).name());
(where 'ptr' is what you get from the pMarksAccess->makeNoTextFieldBookmark()
call before casting to anything)
Okay, managed to put in some debug
here the code snippet(s) were the debug was done ( same for
distro/no-distro except for some text to distinguish one from the other )
ww8par3.cxx: ( SwWW8ImplReader::Read_F_FormCheckBox )
[...]
if (aBookmarkName.Len()>0)
{
IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( );
//IFieldmark* pFieldmark = dynamic_cast<IFieldmark*>(
pMarksAccess->makeNoTextFieldBookmark(
IFieldmark* ptr = ( pMarksAccess->makeNoTextFieldBookmark(
*pPaM, aBookmarkName,
rtl::OUString::createFromAscii( ODF_FORMCHECKBOX ) ) );
IFieldmark* pFieldmark = dynamic_cast<IFieldmark*>( ptr );
OSL_ENSURE(pFieldmark!=NULL, "hmmm; why was the bookmark not
created?");
if (pFieldmark!=NULL) {
IFieldmark::parameter_map_t* const pParameters =
pFieldmark->GetParameters();
ICheckboxFieldmark* pCheckboxFm =
reinterpret_cast<ICheckboxFieldmark*>(pFieldmark);
OSL_TRACE( "distro ( Read_F_FormCheckBox ) %p %p %s %p %p
%s %p %p %s reinterpret %p %s\n",
ptr, dynamic_cast< void* >( ptr ), typeid( *ptr ).name(),
pFieldmark, dynamic_cast< void* >( pFieldmark ),
typeid( *pFieldmark ).name(),
pCheckboxFm, dynamic_cast< void* >( pCheckboxFm ),
typeid( *pCheckboxFm ).name(),
reinterpret_cast<ICheckboxFieldmark*>( ptr ), typeid(
(*reinterpret_cast<ICheckboxFieldmark*>( ptr ))).name() );
OSL_TRACE("dynamic_cast<ICheckboxFieldmark*>( ptr ) %p",
dynamic_cast<ICheckboxFieldmark*>( ptr ));
[...]
docbm.cxx ( MarkManager::makeNoTextFieldBookmark )
[...]
sw::mark::IMark* pMark = makeMark( rPaM, rName,
IDocumentMarkAccess::CHECKBOX_FIELDMARK );
sw::mark::IFieldmark* pFieldMark =
dynamic_cast<sw::mark::IFieldmark*>( pMark );
sw::mark::ICheckboxFieldmark* pCBmark =
dynamic_cast<sw::mark::ICheckboxFieldmark*>( pMark );
OSL_TRACE( "distro (makeNoTextFieldBookmark ) %p %p %s %p %p
%s \n", pMark, dynamic_cast< void* >( pMark ), typeid( *pMark ).name(),
pCBmark, dynamic_cast< void* >( pCBmark ), typeid( *pCBmark ).name( )
[...]
and the results......
disto 32-bit
============
distro (makeNoTextFieldBookmark ) 0x8d013a4 0x8d01370
N2sw4mark17CheckboxFieldmarkE 0x8d013a4 0x8d01370
N2sw4mark17CheckboxFieldmarkE
(interesting in the library the implementation is in the dynamic_cast
works )
distro 0x8d013a4 0x8d01370 N2sw4mark17CheckboxFieldmarkE 0x8d013a4
0x8d01370 N2sw4mark17CheckboxFieldmarkE 0x8d013a4 0x8d01370
N2sw4mark17CheckboxFieldmarkE reinterpret 0x8d013a4
N2sw4mark17CheckboxFieldmarkE
dynamic_cast<ICheckboxFieldmark*>( ptr ) (nil)
( and here it doesn't so I guess there is some symbol confusion.. but I
don't see it )
output from nm:
nm unxlngi6.pro/lib/libswli.so | c++filt | grep ICheckboxField
00343c90 t sw::mark::ICheckboxFieldmark::ICheckboxFieldmark()
00344bdc t sw::mark::ICheckboxFieldmark::~ICheckboxFieldmark()
00344d98 t sw::mark::ICheckboxFieldmark::~ICheckboxFieldmark()
00344f36 t sw::mark::ICheckboxFieldmark::~ICheckboxFieldmark()
00ebc9c0 d construction vtable for
sw::mark::ICheckboxFieldmark-in-sw::mark::CheckboxFieldmark
00ebe3a0 V construction vtable for
sw::mark::IFieldmark-in-sw::mark::ICheckboxFieldmark
00ebe460 V construction vtable for
sw::mark::IMark-in-sw::mark::ICheckboxFieldmark
00ebdea0 V typeinfo for sw::mark::ICheckboxFieldmark
00d4ef30 V typeinfo name for sw::mark::ICheckboxFieldmark
00ebe360 V VTT for sw::mark::ICheckboxFieldmark
00ebe280 V vtable for sw::mark::ICheckboxFieldmark
00344bbe t virtual thunk to
sw::mark::ICheckboxFieldmark::~ICheckboxFieldmark()
00344d7a t virtual thunk to
sw::mark::ICheckboxFieldmark::~ICheckboxFieldmark()
00344bcd t virtual thunk to
sw::mark::ICheckboxFieldmark::~ICheckboxFieldmark()
00344d89 t virtual thunk to
sw::mark::ICheckboxFieldmark::~ICheckboxFieldmark()
nm unxlngi6.pro/lib/libmswordli.so | c++filt | grep ICheckboxField
0023b9b8 V typeinfo for sw::mark::ICheckboxFieldmark
001f303c V typeinfo name for sw::mark::ICheckboxFieldmark
non - disto 32-bit
==================
no-distro (makeNoTextFieldBookmark ) 0x8c8c2ec 0x8c8c2b8
N2sw4mark17CheckboxFieldmarkE 0x8c8c2ec 0x8c8c2b8
N2sw4mark17CheckboxFieldmarkE
no-distro 0x8c8c2ec 0x8c8c2b8 N2sw4mark17CheckboxFieldmarkE 0x8c8c2ec
0x8c8c2b8 N2sw4mark17CheckboxFieldmarkE 0x8c8c2ec 0x8c8c2b8
N2sw4mark17CheckboxFieldmarkE reinterpret 0x8c8c2ec
N2sw4mark17CheckboxFieldmarkE
dynamic_cast<ICheckboxFieldmark*>( ptr ) 0x8c8c2ec
nm unxlngi6.pro/lib/libswli.so | c++filt | grep ICheckboxField
00355fc8 t sw::mark::ICheckboxFieldmark::ICheckboxFieldmark()
00356f14 t sw::mark::ICheckboxFieldmark::~ICheckboxFieldmark()
003570d0 t sw::mark::ICheckboxFieldmark::~ICheckboxFieldmark()
0035726e t sw::mark::ICheckboxFieldmark::~ICheckboxFieldmark()
00eb2e60 d construction vtable for
sw::mark::ICheckboxFieldmark-in-sw::mark::CheckboxFieldmark
00eb4840 V construction vtable for
sw::mark::IFieldmark-in-sw::mark::ICheckboxFieldmark
00eb4900 V construction vtable for
sw::mark::IMark-in-sw::mark::ICheckboxFieldmark
00eb4340 V typeinfo for sw::mark::ICheckboxFieldmark
00d4f5d8 V typeinfo name for sw::mark::ICheckboxFieldmark
00eb4800 V VTT for sw::mark::ICheckboxFieldmark
00eb4720 V vtable for sw::mark::ICheckboxFieldmark
00356ef6 t virtual thunk to
sw::mark::ICheckboxFieldmark::~ICheckboxFieldmark()
003570b2 t virtual thunk to
sw::mark::ICheckboxFieldmark::~ICheckboxFieldmark()
00356f05 t virtual thunk to
sw::mark::ICheckboxFieldmark::~ICheckboxFieldmark()
003570c1 t virtual thunk to
sw::mark::ICheckboxFieldmark::~ICheckboxFieldmark()
nm unxlngi6.pro/lib/libmswordli.so | c++filt | grep ICheckboxField
002399f8 V typeinfo for sw::mark::ICheckboxFieldmark
001f201c V typeinfo name for sw::mark::ICheckboxFieldmark
does anything here stand out? ( /me is not that up on library symbol
binding, visibility etc. stuff.... must read more :-) )
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.