![]() ![]() Name = OUString :: createFromAscii ( "FontHeight.Height" ) OUString :: createFromAscii ( ".uno:Bold" ),Īrgs1. Value executeDispatch (rDispatchProvider, Name = OUString :: createFromAscii ( "Bold" ) Īrgs1. The first step is to obtain a .XDispatchHelper interface.Īrgs1. APACHE OPENOFFICE WRITER. APACHE. HOW TOHow to translate such a code in C++ ? The problem is to handle the dispatcher. executeDispatch (document, ".uno:FontHeight", "", 0, args4 ( ) ) end sub ![]() executeDispatch (document, ".uno:Bold", "", 0, args2 ( ) ) rem -ĭim args4 ( 2 ) as new com. executeDispatch (document, ".uno:InsertText", "", 0, args1 ( ) ) rem -ĭim args2 ( 0 ) as new com. Frameĭispatcher = createUnoService ( ".DispatchHelper" ) rem -ĭim args1 ( 0 ) as new com. Rem -ĭim document as object dim dispatcher as object rem -ĭocument = ThisComponent. 'Listing 2 OOoBasic and the Dispatcher with Macro Recorder REM ***** BASIC ***** See The recorder and UNO dispatch calls section for a discussion on recording UNO Dispatch commands versus writing API calls.įor instance if you have a Apache OpenOffice Writer document, and you record a macro when inserting text and formatting it, you obtain something like: If you record a macro, you obtain a OOoBasic code which uses the dispatcher instead of direct UNO call. This is a very straightforward way but probably internationalization dependent. The first way we want to examine is the use of the dispatcher before using direct UNO calls in next section. Using the Dispatcher and recording Macros 9.1.2 Path of IDL-tree with a Introspection Tool.9.1.1 Path of IDL-tree with a textual Description.8 Translating Java Code into C++ (inserting an Image).7 Translating Java Code into C++ (Page Properties).3.3 Managing Text with XTextRange Interface.1.2 Dispatcher and Internationalization.1 Using the Dispatcher and recording Macros.You can find more explanations here (if you are not a beginner). I will generally add comments to prevent omissions. Remember each time you query for an interface you have to add code lines (if they don't exist) in the source code and a line in the makefile. .XMultiServiceFactory, .XInterface, .XComponentLoader and .XComponent interfaces.This code is called a bootstrap and uses : Listing 0b Again our starting main Code int main ( ) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |