The python script [http://websvn.kde.org/trunk/koffice/kword/plugins/scripting/scripts/ooimport.py ooimport.py] uses the PyUNO module to access OpenOffice.org and import content from any by OpenOffice.org supported fileformat.

+

For this an optional hidden OpenOffice.org instance need to be started. Then the script connects as client to this OpenOffice.org server instance and controls it. If the script got executed and the connecting to the server failed, then it will startup such a hidden OpenOffice.org server instance and shuts it down again once the work is done.

Intro

The Scripting Plugin

The KWord Scripting Plugin implements a plugin to dynamic access the scripting functionality from within KWord.

The KWScriptingPart class implements a KPart component to integrate scripting as plugin into KWord.

The Scripting::Module class enables access to the KWord functionality from within the scripting backends.

The FrameSet and Frame classes are holding the content that is displayed on screen.

The TextDocument class represents a QTextDocument within the Scribe text-engine KWord uses to enable editing of text content. The TextCursor implements a control structure for the successive traversal of content within such a TextDocument .

Scripting Handbook

The KWord Scripting Handbook contains a full reference of all objects and methods accessible from within the scripting backends.

The Handbook is generated from the sourcecode using doxygen and the doxy2doc.py Python script as postprocessor to create visible output from the by doxygen produced XML files.

Connect KWord with OpenOffice.org

The python script ooimport.py uses the PyUNO module to access OpenOffice.org and import content from any by OpenOffice.org supported fileformat.
For this an optional hidden OpenOffice.org instance need to be started. Then the script connects as client to this OpenOffice.org server instance and controls it. If the script got executed and the connecting to the server failed, then it will startup such a hidden OpenOffice.org server instance and shuts it down again once the work is done.