From 267c6f2ac71f92999e969232431ba04678e7437e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 07:54:39 +0200 Subject: Adding upstream version 4:24.2.0. Signed-off-by: Daniel Baumann --- odk/examples/DevelopersGuide/examples.html | 2879 ++++++++++++++++++++++++++++ 1 file changed, 2879 insertions(+) create mode 100644 odk/examples/DevelopersGuide/examples.html (limited to 'odk/examples/DevelopersGuide/examples.html') diff --git a/odk/examples/DevelopersGuide/examples.html b/odk/examples/DevelopersGuide/examples.html new file mode 100644 index 0000000000..7112439f4f --- /dev/null +++ b/odk/examples/DevelopersGuide/examples.html @@ -0,0 +1,2879 @@ + + + + + LibreOffice %PRODUCT_RELEASE% SDK - Developer's Guide Examples + + + + + +
+
+
+ +

+ Software Development Kit %PRODUCT_RELEASE% +

+
+
+
+
+
+

+ Developer's Guide Examples +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ + + + + + + + + +
+

The Developer's Guide +comes with a wide range of examples from all application areas which +shows the use of the API in the context of the different functional +areas. Furthermore the examples can be used as a first starting point +to modify an existing example to their own needs.

+

Some of the examples need a running office +instance listening on a port. If this is necessary you will get further +information in the makefiles.

+

All examples marked with a are executable and be started +using a run target in the makefile. The name of the binary (C++) can +differ compared to the source file, please see the run target in the +appropriate makefile. Some of the examples which create a component +have no run target. In these cases a document is provided which +instantiates and runs the component (see the makefile output). Also the +Basic examples provide documents which use and shows the implemented +functionality. The database and forms examples need a running database, +please see the description below. But note that is not described in +detail how to create a working data source (see the office help).

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
First StepsProfessional UNOWriting UNO components
Office DevelopmentText +DocumentsSpreadsheet Documents
Drawing and +Presentation DocumentsChartsLibreOffice %PRODUCT_RELEASE% Basic and +Dialogs
Database AccessFormsUniversal +Content Broker (UCB)
Configuration ManagementOffice Bean
Scripting FrameworkGraphical User Interfaces
+
+
+ + + + + + + + + +
+ + + + + + + +
FirstSteps +examples
+
+ + + + + + + + + + + + + + + + + + + +
Text Document ExamplesDescription
FirstUnoContactShows how to initialize UNO and +get a remote office service manager from a running LibreOffice %PRODUCT_RELEASE% in a +different process space.
FirstLoadComponentDemonstrates how to load a +component into LibreOffice %PRODUCT_RELEASE% by a Java application.
HelloTextTableShapePerforms some generic text and +shape operations on a text document, a spreadsheet document and a +drawing document.
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Professional UNO examples1
+
+ + + + + + + + + + + + + + + +
Lifetime ExamplesDescription
MyUnoObjectShows that it depends on the +implementation of the Java VM whether finalize() will be called or not.
object_lifetime.cxx +(ProfUnoLifetime)Shows the UNO reference counting +mechanism in C++.
+
+ + + + + + + + + + + + + + + +
Interprocess Connection ExampleDescription
ConnectionAwareClientImplements a client which is aware +of losing connection to LibreOffice %PRODUCT_RELEASE%.
UrlResolverBuilds a connection to +LibreOffice %PRODUCT_RELEASE% using the URL given on the command line. This example +shows the usage of XUnoUrlResolver.
+
+ + + + + + + + + + + + + + + +
C++ Binding ExamplesDescription
office_connect.cxxBuilds a connection to +LibreOffice %PRODUCT_RELEASE% using C++.
string_samples.cxxDemonstrates usage of RTL string +classes OString, + OUString +and OUStringBuffer.
+
+ + + + + + + + + + + + + + + +
SimpleBootstrap Java ExampleDescription
SimpleBootstrap_java.javaShows the transparent use of +office UNO components from Java. The remote office component context is +obtained by using the com.sun.star.comp.helper.Bootstrap.bootstrap() +method, which bootstraps the component context from a UNO installation.
manifest.mfContains the additional manifest +file entries.
+
+ + + + + + + + + + + +
SimpleBootstrap C++ ExampleDescription
SimpleBootstrap_cpp.cxxShows the transparent use of +office UNO components from C++. The remote office component context is +obtained by using the ::cppu::bootstrap() function, which +bootstraps the component context from a UNO installation.
+
+ + + + + + + + + + + +
Deployment FeaturesDescription
description.xmlDemonstrates how license files can be embedded, so that they are shown to the user during installation.
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Writing +UNO components examples
+
+ + + + + + + + + + + + + + + + + + + +
Jobs Addon ExampleDescription
AsyncJobAn java example showing how a job +can analyze the given arguments and how the environment can be +detected, in which the job is executed.
Jobs.xcuContains the example job +configuration.
Addons.xcuContains the configuration entries +for the Jobs addon where different entries are configured.
+
+ + + + + + + + + + + + + + + + + + + +
ProtocolHandler Addon JavaDescription
ProtocolHandlerAddonImplements a ProtocolHandler addon +component in Java.
ProtocolHandler.xcuContains the ProtocolHandler +configuration.
Addons.xcuContains the configuration entries +for the ProtocolHandler addon where different entries are configured.
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
ProtocolHandler Addon C++Description
addon.cxxImplements a ProtocolHandler addon +component in C++.
addon.hxxContains the class definition of +the c++ ProtocolHandler example.
component.cxxImplements the administrative +component functions (component_writeInfo, component_getFactory, component_getImplementationEnvironment).
ProtocolHandler.xcuContains the ProtocolHandler +configuration.
Addons.xcuContains the configuration entries +for the ProtocolHandler addon where different entries are configured.
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Java Component ExampleDescription
TestJavaComponentDemonstrates how to extend the +service provider with a new factory and instantiates the example +components.
TestComponentAShows a simple demo component +which implements XTypeProvider, + + XServiceInfo and an own interface XSomethingA.
TestComponentBShows a simple demo component +which implements + XTypeProvider, XServiceInfo +and an own interface XSomethingB.
TestServiceProviderImplements a factory (service +provider) which can create the two test components.
+
+ + + + + + + + + + + + + + + + + + + +
C++ Component ExampleDescription
TestCppComponent.cxxShows how to create new instances +of the demo services and calls some methods of the demo interface.
service1_impl.cxxImplements a simple UNO service +with an own interface in C++.
service2_impl.cxxImplements another simple UNO +service in C++.
+
+ + + + + + + + + + + + + + + +
Thumbs ExampleDescription
ImageShrinkContains a framework for a +component which scales images in a directory and stores them to another +directory. This code does not really do anything, it just contains the +framework.
ThumbsThis example registers a factory +for the image shrink component and instantiates it.
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Dialog Component ExampleDescription
DialogComponent.javaImplements a component accessing a dialog created + with the LibreOffice %PRODUCT_RELEASE% Basic IDE. The component provides methods that + can be bound to dialog respectively control events .
XTestDialogHandler.idlInterface implementing a createDialog method showing the + dialog and some methods to be used as event handler for the dialog. +
TestDialogHandler.idl + Service definition for the component implementing + its own interface XTestDialogHandler. +
DialogComponent.odtDocument containing Basic code to + instantiate the Dialog Components and a Dialog containing + controls with events bound to methods supported by the + Dialog Component.
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Office Development examples
+
+ + + + + + + + + + + + + + + + + + + +
Ascii Filter ExampleDescription
AsciiReplaceFilterImplements an example for an +import/export filter service.
FilterOptionsOffers some helper methods to +analyze and prepare the arguments of the filter method.
TypeDetection.xcuContains the necessary +configuration items for the AsciiReplaceFilter.
+
+ + + + + + + + + + + + + + + +
FlatXmlFilter C++ ExampleDescription
FlatXml.cxxImplements an import/export filter +storing the data in one xml stream instead of the normal three streams +in for example an .odt file. The example is implemented in C++.
FlatXmlFilter_cpp.xcuContains the necessary +configuration items for the C++ flat xml filter.
+
+ + + + + + + + + + + + + + + +
FlatXmlFilter Java ExampleDescription
FlatXmlImplements an import/export filter +storing the data in one xml stream instead of the normal three streams +in for example an .odt file. The example is implemented in Java.
FlatXmlFilter_java.xcuContains the necessary +configuration items for the Java flat xml filter.
+
+ + + + + + + + + + + + + + + + + + + + + + + +
FlatXml FilterDetection ExampleDescription
filterdetect.cxxImplements an example filter +detection for the flat xml filter. The example is implemented in C++.
filterdetect.hxxContains the class definition of +the filter detection example.
fdcomp.cxxImplements the administrative +component functions (component_writeInfo, component_getFactory, component_getImplementationEnvironment).
FlatXmlTypeDetection.xcuContains the necessary +configuration items for the C++ flat xml type detection.
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Desktop Environment ExampleDescription
CustomizeViewOffers a view which allows hiding +and showing of the menubar, toolbar and objectbar of the related +document component.
DeskThis is the main part of a demo +application based on the framework APIs. It mainly shows the mechanisms +to load, store and convert documents, as well as dispatch and dispatch +interception. It integrates windows from LibreOffice %PRODUCT_RELEASE% via system +window handle. This is the same mechanism as used by the OOoBean, but +the OOoBean itself is not used here, just the JNI window handle access.
DocumentViewDeals with the application window +and it's actions.
FunctionHelperThis helper comprises all +LibreOffice %PRODUCT_RELEASE% API calls. Thus it is possible to learn about these +aspects separately from the rest of the application example.
IOnewayLinkThis is an interface to receive +asynchronous events from UNO oneway calls.
IShutdownListenerThis is a listener interface to +clean up on shutdown of LibreOffice %PRODUCT_RELEASE%.
InterceptorThis implements a dispatch +interceptor for a specific URL.
JavaWindowPeerFakeFakes an XWindowPeer +for the Java native window handle to create a child window for the +office frame.
NativeViewImplements native JNI methods to +get the window handle of the Java window.
OfficeConnectBuilds the remote bridge to +LibreOffice %PRODUCT_RELEASE% and exports its UNO service manager for the Java side of +the application.
OnewayExecutorImplements IOnewayLink +to decouple asynchronous oneway calls in the Java process.
StatusListenerImplements a listener for a + FeatureStateEvent.
StatusViewShows the current status for which +the application is registered as an event listener.
ViewContainerPerforms a clean up on the Java +side on LibreOffice %PRODUCT_RELEASE% shutdown.
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Office Development ExamplesDescription
OfficeConnectBuilds the remote bridge to +LibreOffice %PRODUCT_RELEASE% and exports its UNO service manager to the Java side.
ContextMenuInterceptorThis example shows a context menu +interceptor that creates a new menu entry that has a sub menu. This sub +menu is in inserted into the context menu on the topmost position. It +provides some helper functions to the user that are reachable through +the menu Help.
MenuElementA helper class for the context +menu interceptor example. It determines the menu element type.
Number_FormatsDemonstrates the use of number +formats in a spreadsheet document.
+
+ + + + + + + + + + + + + + + +
Termination Test ExampleDescription
TerminationTestThis example uses the +TerminateListener and shows the use of them in a running program.
TerminateListenerAn example implementation of + XTerminateListener. It is called +when LibreOffice %PRODUCT_RELEASE% terminates.
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Clipboard ExampleDescription
ClipboardDemonstrates the usage of the +clipboard service by registering a clipboard listener, getting a list +of formats from the current clipboard content and copying some data to +the clipboard.
ClipboardListenerImplements a clipboard listener +for the Clipboard example. In such a class, actions can be implemented +which happen whenever the clipboard content changes.
ClipboardOwnerImplements a clipboard owner for +the Clipboard example. This class is notified when it loses ownership +of the clipboard.
TextTransferableImplements a data object for the +Clipboard example. Such classes supply clients with data in a variety +of formats.
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Linguistic ExampleDescription
LinguisticExamplesA short example that uses most of +the functionality from the LibreOffice %PRODUCT_RELEASE% linguistic API.
OneInstanceFactoryThis class is used to provide a +service factory for the linguistic services. It enforces that the +actual implementations are only instantiated once.
PropChgHelperThe base class for several +property change helpers which are used to keep track of the changes of +the service relevant linguistic properties. It is also used by the +thesaurus directly.
PropChgHelper_HyphThe property change helper that is +tracking the hyphenation relevant properties.
PropChgHelper_SpellThe property change helper that is +tracking the spell checking relevant properties.
SampleHyphenatorA simple implementation for a Hyphenator +service.
SampleSpellCheckerA simple implementation for a SpellChecker +service.
SampleThesaurusA simple implementation for a Thesaurus +service.
XHyphenatedWord_implAn object implementing the XHyphenatedWord +interface. An instance of this type may be returned by the hyphenator.
XMeaning_implAn object implementing the XMeaning +interface. An instance of this type may be returned by the thesaurus.
XPossibleHyphens_implAn object implementing the + XPossibleHyphens interface. An +instance of this type may be returned by the hyphenator.
XSpellAlternatives_implAn object implementing the + XSpellAlternatives interface. An +instance of this type may be returned by the spell checker.
+
+ + + + + + + + + + + +
Path Settings ExampleDescription
PathsettingsTestThis code example creates the +service + com.sun.star.util.PathSettings and +retrieves all path properties from it. It shows how a developer can +change the path properties using the XPropertySet +interface.
+
+ + + + + + + + + + + +
Path Substitution ExampleDescription
PathSubstitutionTestThis code example creates the path +substitution service + com.sun.star.util.PathSubstitution +and retrieves the pre-defined Office path variables. It shows the +variable values on the screen. The reSubstiuteVariables function is +used to show how the service exchanges parts of a path with a path +variable supporting platform independent path usage.
+
+ + + + + + + + + + + +
Disable Commands ExampleDescription
DisableCommandsTestImplements an example showing how +a developer can use the configuration API to disable/enable commands at +runtime.
+
+
+ + + + + + + + + +
+ + + + + + + +
Text +Documents examples
+
+ + + + + + + + + + + +
ExampleDescription
TextDocuments +

Demonstrates a wide variety of API functions in +text documents and text document views.

+
    +
  • use of templates
  • +
  • using the view cursor, including visible text +selections
  • +
  • changing the paragraph style
  • +
  • using various editing facilities like text +insertion
  • +
  • using various cursor interfaces
  • +
  • creating text contents, like tables, sections +and frames, well as text fields and columns
  • +
  • using stylesheets
  • +
  • applying numbering styles
  • +
  • using references, indexes, footnotes and +autotext
  • +
  • loading, storing and printing a text document
  • +
+

Adjust the strings at the beginning of the class +definition to match your installation!

+
+
+
+ + + + + + + + + +
+ + + + + + + +
Spreadsheet +Documents examples
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ExampleDescription
ExampleAddInImplements a simple add-in +component for spreadsheet documents. This component needs to be +deployed before it can be used.
ExampleDataPilotSourceShows usage of a wide variety of +spreadsheet interfaces like + XCellRangeData, XCellSeries, + XArrayFormulaRange +and XMultipleOperations +as well as named ranges, label ranges and data pilot.
GeneralTableSampleExecutes some examples working on +generic tables.
SpreadsheetDocHelperDefines a helper class for the +other examples to access spreadsheet documents, sheets and cells.
SpreadsheetSampleExecutes some examples working on +a spreadsheet document.
ViewSampleShows how to manipulate view +settings like splitting sheeting sheets and selecting cells.
+
+
+ + + + + + + + + +
+ + + + + + + +
Drawing +and Presentation Documents examples
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ExampleDescription
ChangeOrderDemoShows how to change the painting +order of shapes.
ControlAndSelectDemoDemonstrates the creation of a +control shape and selects it in the current view.
CustomShowDemoCreates two custom shows and +selects one of these.
DrawViewDemoPrints the view data properties +and the controller properties of a drawing view and shows an example of +setting such a property.
DrawingDemoCreates several shapes on several +slides. Nice pattern included!
FillAndLineStyleDemoDemonstrates usage of area fill +and line style properties.
GluePointDemoCreates two shapes with glue +points and connects them with two connectors.
GraphicExportDemoLoads a drawing document and +exports it to a GIF file. Run this program with source URL, target URL +and page index on the command line, where the URLs are fully qualified +URLs.
HelperContains a helper class for the +other examples to connect to LibreOffice %PRODUCT_RELEASE% and open or create a drawing +document.
LayerDemoCreates shapes in different layers +to show how to protect shapes from modifications.
ObjectTransformationDemoShows geometric transformations on +a shape using a homogeneous matrix.
OrganigramDemonstrates the creation of an +organigram consisting of shapes and connectors.
PageHelperContains a helper class for +accessing several kinds of draw pages in a presentation or drawing +document.
PresentationDemoCreates a presentation and runs it +with some user interaction.
ShapeHelperContains a helper class for +accessing and creating shapes for the other examples.
StyleDemoCreates a shape and applies a +predefined shape stylesheet.
TextDemoDemonstrates usage of text and +text styles in shapes.
+
+
+ + + + + + + + + +
+ + + + + + + +
Charts +examples
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ExampleDescription
CalcHelperContains some helper methods for +charts in spreadsheet documents, like accessing sheets by name, +inserting a chart into a sheet, filling cell ranges with random numbers +etc.
ChartHelperContains some helper methods for +charts, like creating a chart as an embedded object.
ChartInCalcDemonstrates how to create an +embedded chart object with a random scatter chart within a spreadsheet.
ChartInDrawInserts a 3D-bar chart into a +drawing document.
ChartInWriterInserts an embedded chart object +with a random bar chart in a text document. This example does not +really work, because the API for embedding objects into text documents +is not implemented. To be more precise.
HelperShows how to connect to +LibreOffice %PRODUCT_RELEASE% and create text, drawing or spreadsheet document. This +class is used as a helper class for the other examples.
JavaSampleChartAddInGives an example of how to +implement chart add-ins to create new or specialized diagram types. The +resulting component has to be deployed before it can be used.
ListenAtCalcRangeInDrawThis helper class is used to build +connection between an embedded chart object in a drawing document and a +data range in a spreadsheet document.
SelectionChangeListenerShows how to register a handler +which is called when the selection within an embedded chart object +changes.
+
+
+ + + + + + + + + +
+ + + + + + + +
LibreOffice %PRODUCT_RELEASE% Basic and Dialogs examples
+
+ + + + + + + + + + + + + + + + + + + + + + + +
ExampleDescription
FirstStepsBasic.odtThis StarBasic example shows how to +create an own dialog which inserts a graphics object into a text +document.
SampleDialogThis example builds a Java +component which creates a simple dialog.
CreatingDialogs.odtThis document contains a simple +Basic macro which loads the SampleDialog component. The macro will be +executed by pressing a Push button.
ToolkitControlsIn this directory you find a Basic +library which implements several examples using toolkit controls. You +can easy pack this Basic library as a UNO package and can install it +using the package manager (see the makefile output).
+After the installation you will find a new library "ToolkitControls" in +the Basic IDE containing 4 modules and the necessary dialogs.
+

Select one of the following modules and press the +Run button:

+
    +
  • FileDialog = simple dialog which ask for a +filename (nothing else)
  • +
  • MultiPage = a more complex dialog with several +tab pages
  • +
  • ProgressBar = a dialog which shows a progress +bar
  • +
  • ScrollBar = a dialog which shows a scroll bar
  • +
+
+
+
+ + + + + + + + + + + + +
+ + + + + + + + + + +
Database +Access examples
The Database examples use a SQL +database named "MYDB0" with write access. Make sure that you have a +data source operating on such a database in your office before you run +the example.
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Database ExamplesDescription
CodeSamplesCreates the connection to +LibreOffice %PRODUCT_RELEASE% and executes the code SalesMan samples for database API.
OpenQueryDemonstrates the use of XResultSetUpdate +and + XRowUpdate.
RowSetDemonstrates the usage of a row +set.
RowSetEventListenerDemonstrates how to define +listener for the row set example.
SalesCreates a simple database table.
SalesManCreates a simple database table.
sdbcxDemonstrates the usage of the +SDBCX layer services.
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Driver Skeleton ExampleDescription
OSubComponent.hxxHelper class to delegate special +dispose handling.
OTypeInfo.hxxContains the database types from +the DatabaseMetaData getTypes call.
SConnection.hxxThis file contains the declaration +of a class implementing the service com.sun.star.sdbc.Connection.
SConnection.cxxThis file contains the +implementation of the class declared in SConnection.hxx.
SDatabaseMetaData.hxxThis file contains the declaration +of a class implementing the interface com.sun.star.sdbc.XDatabaseMetaData.
SDatabaseMetaData.cxxThis file contains the +implementation of the class declared in SDatabaseMetaData.hxx.
SDriver.hxxThis file contains the declaration +of a class implementing the service com.sun.star.sdbc.Driver.
SDriver.cxxThis file contains the +implementation of the class declared in SDriver.hxx.
SPreparedStatement.hxxThis file contains the declaration +of a class implementing the service com.sun.star.sdbc.PreparedStatement. +
SPreparedStatement.cxxThis file contains the +implementation of the class declared in SPreparedStatement.hxx.
SResultSet.hxxThis file contains the declaration +of a class implementing the service com.sun.star.sdbc.ResultSet.
SResultSet.cxxThis file contains the +implementation of the class declared in SResultSet.hxx.
SResultSetMetaData.hxxThis file contains the declaration +of a class implementing the interface com.sun.star.sdbc.XResultSetMetaData.
SResultSetMetaData.cxxThis file contains the +implementation of the class declared in SResultSetMetaData.hxx.
SServices.cxxThis file contains a class +implementing the service needed to register the driver.
SStatement.hxxThis file contains the declaration +of a class implementing the service com.sun.star.sdbc.Statement.
SStatement.cxxThis file contains the +implementation of the class declared in SStatement.hxx.
propertyids.hxxDefines some common used strings +and declare a helper class for properties.
propertyids.cxxImplements the property helper +class.
+
+
+ + + + + + + + + +
+ + + + + + + +
Forms +examples
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ExampleDescription
BooleanValidatorThe class BooleanOperator +implements an validator +for a form control, which can veto certain radio button or check box +states.
ButtonOperatorThe form created by the sample +program contains various buttons which are tied to certain +functionality. The class ButtonOperator, well, operates these buttons.
ComponentTreeTraversalHelper classes for traveling +through a tree of + FormComponent's.
ControlLockHelper class for implementing the +locking of control depending on the state of the underlying RowSet.
ControlValidationThis is the main class for the +control validation example. It creates a sample document, fills it with +controls, and attaches several validators to those controls
ControlValidatorBase class implementing the common +denominator for components validating +form controls.
DataAwarenessThis class implements the basic +example for a form working on a database. Two tables will be created +and a form (writer document) with a business example will fill its +fields from these tables.
DateValidatorThe class DateValidator +implements an validator +for a form control, which can check the content of a form date field.
DocumentBasedExampleThis class collects common +functionality of examples which require a document.
DocumentHelperHelper class for encapsulating +working with a document.
DocumentTypeA simple enumeration class for +classifying a document.
DocumentViewHelperHelper class for encapsulating +working with a view for a document.
FLToolsVarious small tools for the form +layer sample program.
FormLayerHelper class for accessing and +manipulating the form layer of a document.
GridFieldValidatorGridFieldValidator is +responsible for validating the input in a specific grid control column. +This is not to be mixed up with the control-based validation as +described in the validation +module. Instead, a GridFieldValidator assembles and uses +various other concepts.
InteractionRequestA simple implementation of a XInteractionRequest. +Not tied to the form layer example, but a general helper.
KeyGeneratorHelper class which is able to +generate (unique) keys for a (RowSet + ) column. An instance of this class can be tied +to a specific row set column. It then monitors the state of the +underlying row set, and upon inserting a new record into it (two +operation modi are possible here), it automatically inserts a newly +created (two modi, too) key into the column.
ListSelectionValidatorThe class ListSelectionValidator +implements an validator +for a form control, which can veto certain selections in a list box +control.
NumericValidatorThe class NumericValidator +implements an validator +for a form control, which can veto certain values in every control +which allows exchanging numerical values.
SingleControlValidationThough form documents feature +inbuilt mechanisms for visually indicating invalid control content (see + com.sun.star.form.validation + for discussions about validity), the ControlValidation +example extends this. The validity state of every control in this +example, as well as possible explanations for invalidity, are displayed +in dedicated texts. The SingleControlValidation class +ties together a validatable control and those status texts.
SpreadsheetDocumentA specialized DocumentHelper +which represents a spreadsheet document, and offers some form related +functionality. For instance, this class allows the creation of + CellValueBinding instances, which +can be used to couple the content of a form control with the content of +a spreadsheet cell.
SpreadsheetValueBindingThis example demonstrates how to +bind form controls to spreadsheet cells.
SpreadsheetViewA specialized DocumentViewHelper +which represents a view to a spreadsheet document.
TableCellTextBindingThis class allows binding the +control of a form control with a table cell in a text document. For +this, it uses the mechanisms of the + com.sun.star.form.binding module.
TextValidatorThe class TextValidator +implements an validator +for a form control, which can monitor a form text field.
TimeValidatorThe class TimeValidator +implements an validator +for a form control, which can monitor the content of a form time field. +
UNOA small UNO-syntax related helper +class.
ValueBindingAn example how to bind the content +of a form control to a table cell in a text document.
WaitForInputA pretty small helper for the +interactive examples, which notifies another instance when the user +pressed key on the console.
+
+
+ + + + + + + + + +
+ + + + + + + +
Universal Content Broker (UCB) +examples
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ExampleDescription
ChildrenRetrieverShows child entries of a given +folder. Try -help or -? on the command line to view optional parameters.
DataStreamComposerDemonstrates usage of the data +stream by copying the data from one UCB node to another.
DataStreamRetrieverShows how to obtain the data +stream from a document resource.
HelperSome helper methods to access the +UCB which are used by the other examples.
MyActiveDataSinkA helper class for the DataStreamRetriever +example which implements a data sink.
PropertiesComposerShows how to set property values +of a UCB resource.
PropertiesRetrieverShows how to access property +values of a UCB resource.
ResourceCreatorCreates a new file in an existing +file system folder.
ResourceManagerDemonstrates how to copy and move +UCB resources.
ResourceRemoverDemonstrates how to remove UCB +resources.
+
+
+ + + + + + + + + +
+ + + + + + + +
Configuration +Management examples
+
+ + + + + + + + + + + +
ExampleDescription
ConfigExamplesThis example connects to a +LibreOffice %PRODUCT_RELEASE%, gets the configuration manager and accesses the +configuration in various ways.
+
+
+ + + + + + + + + +
+ + + + + + + +
Office +Bean example
+
+ + + + + + + + + + + +
ExampleDescription
OOoBeanViewerShows how to use the OOoBean +embedded in a Java AWT component. It shows how to load and store +documents as well as how to control toolbar visibility.
+
+
+ + + + + + + + + +
+ + + + + + + +
Scripting Framework Examples
+
+ + + + + + + + + + + + + + + +
ExampleDescription
SayHelloA Scripting Framework Java macro +that opens a new Writer document and inserts the word Hello in it.
ScriptSelectorA Scripting Framework Java macro +that opens a Java Swing dialog with a tree view of the macro hierarchy +for the Office application.
+
+
+ + + + + + + + + +
+ + + + + + + +
Graphical User Interfaces
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ExampleDescription
+DialogDocumentA sample showing how to display an office document in a dialog window.
+MessageBoxA sample showing how to display a simple message box.
+UnoDialogSampleA sample showing how to create various controls in a dialog (fixed text field, currency field, progress bar, fixed line, group box, edit field, time field, date field, pattern field, numeric field, progressbar, check box, radio button, list box, combo box, formatted field, file control, button control, roadmap control)
+UnoDialogSample2A dialog sample showing how to use a roadmap control.
+UnoMenuA sample showing a top window with some menus.
+UnoMenu2A dialog sample showing how to use or work with a context menu.
+ImageControlSample2Dialog sample showing how to use an image control.
+
+
+
+ +
+
+
+ + -- cgit v1.2.3