hanya / MRI

An object introspection tool for OpenOffice API
http://extensions.openoffice.org/en/project/MRI
Apache License 2.0
46 stars 7 forks source link

Support link to Doxygen based IDL reference from LibreOffice #2

Closed hanya closed 9 years ago

hanya commented 10 years ago

Since LO 4.2 or earlier, LO switched their document generator for IDL reference to Doxygen.

Current URL: "{SDK_BASE}docs/common/ref/{PAGE_NAME}.html#{ANCHOR}" LO: "{SDK_BASE}docs/idl/ref/{TYPE}{PAGE_NAME}.html#{ANCHOR}

Format of the definition: struct: type module_name::namename (name is duplicated in this case) long com::sun::star::awt::Point::YY

enum: @ module_name::namename (no enum name, only value name) @ com::sun::star::awt::OBLIQUEOBLIQUE no value spacified for the enum: @

const: const type module_name::namename const short com::sun::star::lang::SystemDependent::SYSTEM_ANDROIDSYSTEM_ANDROID

interface: type module_name::namenamedefs com::sun::star::uno::XInterface com::sun::star::lang::XSingleServiceFactory::createInstanceWithArgumentscreateInstanceWithArguments([in] sequence< any > aArguments)

property: type module_name::namename boolean com::sun::star::awt::UnoControlFixedTextModel::PrintablePrintable

hanya commented 10 years ago

I found some problems before starting to code to generated anchor id. Type name of the complex type can be abbreviated when the type is defined in the same module. This is the optional way and not unified in the files. Doxygen uses written type name even they are abbreviated or not in the definition. And there is no way to know the type is abbreviated or not in the specific IDL file through the API.

hanya commented 10 years ago

Part of support to generate link to Doxygen generated IDL reference is commited. But still link to specific anchor is not supported yet. And also, output function should use link generator from the web module.

hanya commented 10 years ago

Link against anchor is partially supported now.

When I generate the reference from IDL files with Doxygen 1.8.7, I could make the same anchor code against them on locale environment. But anchor code for methods that have two or more parameters are not match with the them in my locally generated references. Other methods having no parameters and single parameter are OK. I do not know why this is happen because the result for the these methods are OK for my environment.

Note, in doxygen_source/src/memberdef.cpp, MemberDef::setAnchor function gives the way to genearete the anchor code used in the Doxygen generated references. If someone want to see the original string which is base of the hash, remove the comment marks in the code before the print statement.

hanya commented 9 years ago

To generate anchor for methods having multiple number of arguments is supported. No space separator before the comma between each arguments was not required.

The following still cannot be supported:

Type name of the complex type can be abbreviated when the type is defined in the same module. This is the optional way and not unified in the files. Doxygen uses written type name even they are abbreviated or not in the definition. And there is no way to know the type is abbreviated or not in the specific IDL file through the API.

There is no way to support except reading IDL file to get the information about that. I made another issue for this task: https://github.com/hanya/MRI/issues/3