<The previous article in this series | The table of contents of this series | The next article in this series>
To Know How to Handle (Read or Write) LibreOffice or Apache OpenOffice Writer or Calc Documents via Extensions from Java or Macro Programs
As the environment for developing UNO extensions has been built in the previous articles, we can create Ant build files or Gradle build scripts and source files for a UNO extension, and build the UNO extension.
Um.
In fact, I have already created them, and they are here.
That sounds like a cooking TV program . . .
After we expand the zip file in an arbitrary directory (here, ~/my-documents/development/java, on Linux and E:\Home\my-documents\development\java, on Windows), keeping the directories structure, these must be directories and files expanded.
commonBuild.properties
commonBuild01.xml
commonBuild02.xml
commonBuild01.gradle
commonBuild02.gradle
/unoUtilitiesToDisclose
build.xml
build.gradle
/source
/java
/thebiasplanet
/unoutilities
/serviceshandling
GlobalUnoServicesProviderUtility.java
/resource
MANIFEST.MF.addition
/hiUnoExtensionsUnoExtension
build.xml
build.gradle
/source
/java
/thebiasplanet
/uno
/hiunoextensionsunoextension
HiUnoExtensionsImplementation.java
HiUnoExtensionsUnoExtensionGlobalServicesProvider.java
/resource
MANIFEST.MF.addition
manifest.xml
thebiasplanet.hiunoextensionsunoextension.uno.components
/unoIdl
/thebiasplanet
/uno
/hiunoextensionsunoextension
XHiUnoExtensions.idl
HiUnoExtensions.idl
Hmm, . . . what are they?
Well, I wonder how I should explain: there are files I can easily explain and files I can't easily explain. As understandings are intertwined, to explain one thing enough, I have to explain some basic concepts first, which can become lengthy. As I haven't explained basic concepts of UNO, it's difficult to explain what some files are.
That would be so. . . . Maybe you can't help but explain things using some terms as black boxes.
Black boxes?
For example, "there is a concept called XXX, which we can't explain enough here, but . . ."
Ah-ha.
Note, we don't want to say inaccurate things to smooth things over for the moment. That's a temptation, but causes confusions. Our explanations can be not-detailed if inevitable, but can not be incorrect, ever.
Ah, we shouldn't say inaccurate things to make listeners feel understanding something, erroneously, for the moment.
That's right.
Note that although my explanations here aren't enough, we will delve into those artifacts after we have learned basic concepts of UNO.
All right.
Well, 'commonBuild.properties', 'commonBuild01.xml', and 'commonBuild02.xml' in the root directory of the expansion are common Ant build files. By 'common', I mean, being used by all the projects.
Do you mean there are multiple projects?
Yes, there are two projects in the zip file, and common files are meant to be also used by future projects.
I see.
The files, 'commonBuild01.gradle' and 'commonBuild02.gradle', in the root directory of the expansion are common Gradle build scripts. By 'common', I mean the same.
All right.
The 'unoUtilitiesToDisclose' directory contains the UNO utilities project that makes the UNO utilities Jar file. The UNO utilities Jar file is used by projects that use UNO. That is, things commonly used by projects that use UNO are separated as an individual project, as including same source files in multiple projects is unwise.
Certainly.
The file, 'build.xml', in the project directory is the project-specific Ant build file, which uses the common Ant build files. The file, 'build.gradle', in the project directory is the project-specific Gradle build script, which uses the common Gradle build scripts.
Ah-ha.
The 'source' directory in the project directory is the root directory of all kinds of source files including Java source files, resource files like setting files, and UNO-specific source files.
UNO-specific source files?
I will explain about them later because this project doesn't have UNO-specific source files.
OK.
The 'java' directory in the 'source' directory is the root directory of Java source files.
'GlobalUnoServicesProviderUtility.java' is a UNO utility class. I will mention what that class is about, later.
The 'resource' directory in the 'source' directory is the root directory of resource files.
'MANIFEST.MF.addition' is a file that contains contents to be added to the Jar manifest file.
I see.
<The previous article in this series | The table of contents of this series | The next article in this series>