Development/NotebookBar/Extensions

    From The Document Foundation Wiki


    This page is a work-in-progress scratch pad for the extension format.

    Extension in NotebookBar

    Extension Preview in NotebookBar

    The Tabbed and Compact interface of NotebookBar has an extension tab that contains all the extensions added in LibreOffice.The extensions are available at one place under the extension tab. The task to add extension anywhere in the NotebookBar is in progress.


    Work done

    • The schema to add extensions under extension tab in Notebookbar.
    • Schema for adding extension anywhere in the NotebookBar.
    • Code to render data from an extension is similar to toolbar and menubar and is well written for the schema given above.
    • Extensions are rendered in UI during runtime. The class NotebookBarAddonsMerger is called inside the method of class VclBuilder.Reduction in runtime and redundancy is done by adding code in vcl directory.
    • The problem to display extensions on priority is solved by the following patch.The new structure :

    PriorityMergedHBox
      --OptionalBox
        --ToolBoxExtension
          --Extension1
      --OptionalBox
    .....

    Modified Extensions

    These extensions are only for testing pupose , Example .

    Example

    Developers have to add this structure to display extension in NotebookBar.Read the addons.xcs file of modified extensions for more info.

    <node oor:name="OfficeNotebookBar">
        <node oor:name="*.OfficeNotebookBar" oor:op="replace">
                <node oor:name="m001" oor:op="replace">
                    <prop oor:name="URL" oor:type="xs:string">
                        <value> </value>
                    </prop>
                    <prop oor:name="Title" oor:type="xs:string">
                        <value> </value>
                    </prop>
                    <prop oor:name="ImageIdentifier" oor:type="xs:string">
                        <value> </value>
                    </prop>
                    <prop oor:name="Target" oor:type="xs:string">
                        <value> </value>
                    </prop>
                    <prop oor:name="Context" oor:type="xs:string">
                        <value> </value>
                    </prop>
                    <prop oor:name="ControlType" oor:type="xs:string">
                        <value> </value>
                    </prop>
                    <prop oor:name="Width" oor:type="xs:string">
                        <value> </value>
                    </prop>
                    <prop oor:name="Style" oor:type="xs:string">
                        <value> </value>
                    </prop>
                </node>
        </node>
    </node>


    To do

    • The task to add extension anywhere in the NotebookBar
    • Checking the compatibility with other Notebookbar interfaces(other than Tabbed) and refine the existing work.