Skip to content

Commit a47bd4b

Browse files
committed
new version 1.2.0
1 parent e0b4b8b commit a47bd4b

File tree

9 files changed

+72
-18
lines changed

9 files changed

+72
-18
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ ___
158158
Normally, the extension is created with Eclipse for Java and [LOEclipse][41]. To work around Eclipse, I modified LOEclipse to allow the extension to be created with Apache Ant.
159159
To create the HyperSQLOOo extension with the help of Apache Ant, you need to:
160160
- Install the [Java SDK][42] version 8 or higher.
161-
- Install [Apache Ant][43] version 1.9.1 or higher.
161+
- Install [Apache Ant][43] version 1.10.0 or higher.
162162
- Install [LibreOffice and its SDK][44] version 7.x or higher.
163163
- Clone the [HyperSQLOOo][45] repository on GitHub into a folder.
164164
- From this folder, move to the directory: `source/HyperSQLOOo/`

README_fr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ ___
158158
Normalement, l'extension est créée avec Eclipse pour Java et [LOEclipse][41]. Pour contourner Eclipse, j'ai modifié LOEclipse afin de permettre la création de l'extension avec Apache Ant.
159159
Pour créer l'extension HyperSQLOOo avec l'aide d'Apache Ant, vous devez:
160160
- Installer le [SDK Java][42] version 8 ou supérieure.
161-
- Installer [Apache Ant][43] version 1.9.1 ou supérieure.
161+
- Installer [Apache Ant][43] version 1.10.0 ou supérieure.
162162
- Installer [LibreOffice et son SDK][44] version 7.x ou supérieure.
163163
- Cloner le dépôt [HyperSQLOOo][45] sur GitHub dans un dossier.
164164
- Depuis ce dossier, accédez au répertoire: `source/HyperSQLOOo/`

source/HyperSQLOOo/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
/dist/
44
.project
55
.pydevproject
6-
.unoproject

source/HyperSQLOOo/.unoproject

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#UNO project configuration file
2+
#Tue May 20 11:35:27 CEST 2025
3+
project.build=build
4+
project.idl=/idl
5+
project.implementation=HyperSQLOOo
6+
project.language=Python
7+
project.ooo=LibreOffice 7.6
8+
project.prefix=io.github.prrvchr
9+
project.sdk=7.6.7.2
10+
project.srcdir=/service
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#UNO project Ant build configuration file
2-
#Tue Apr 29 00:36:32 CEST 2025
3-
office.install.dir=/lib/libreoffice
4-
sdk.dir=/lib/libreoffice/sdk
2+
#Tue May 20 11:35:27 CEST 2025
3+
office.install.dir=/opt/libreoffice7.6
4+
sdk.dir=/opt/libreoffice7.6/sdk

source/HyperSQLOOo/build.xml

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
************************************************************
99
-->
1010

11-
<fail message="Please build using Ant 1.9.1 or higher.">
11+
<fail message="Please build using Ant 1.10.0 or higher.">
1212
<condition>
1313
<not>
14-
<antversion atleast="1.9.1"/>
14+
<antversion atleast="1.10.0"/>
1515
</not>
1616
</condition>
1717
</fail>
@@ -93,10 +93,21 @@
9393
<mkdir dir="${idl.out.urd}"/>
9494
<mkdir dir="${idl.out.rdb}"/>
9595

96+
<first id="regview">
97+
<fileset dir="${office.libs.path}" includes="**/regview,**/regview.exe"/>
98+
</first>
99+
<property name="sdk.regview" value="${toString:regview}"/>
100+
101+
<first id="idlr">
102+
<fileset dir="${sdk.bin.dir}" includes="unoidl-read,unoidl-read.exe"/>
103+
</first>
104+
<property name="sdk.idlr" value="${toString:idlr}"/>
105+
96106
<first id="idlw">
97-
<fileset dir="${sdk.bin.dir}" includes="unoidl-write,unoidl_write.exe"/>
107+
<fileset dir="${sdk.bin.dir}" includes="unoidl-write,unoidl-write.exe"/>
98108
</first>
99109
<property name="sdk.idlw" value="${toString:idlw}"/>
110+
100111
<condition property="sdk.useidlw">
101112
<available file="${sdk.idlw}" type="file"/>
102113
</condition>
@@ -118,7 +129,7 @@
118129
</target>
119130

120131
<target name="init-java" depends="init-env" if="project.isjava">
121-
<echo message="Project is Java"/>
132+
<echo message="Project is Java using version: ${ant.java.version}"/>
122133

123134
<!-- Setting lib.dir dependencies default directory is /lib or /libs if exist -->
124135
<condition property="lib.dir" value="libs">
@@ -143,7 +154,7 @@
143154
<property name="src.module" value="${toString:module}"/>
144155
<condition property="src.withmodule">
145156
<and>
146-
<javaversion atleast="9"/>
157+
<javaversion atleast="11"/>
147158
<available file="${src.module}" type="file"/>
148159
</and>
149160
</condition>
@@ -163,6 +174,12 @@
163174
</fileset>
164175
</path>
165176

177+
<path id="office.module.path">
178+
<fileset dir="${office.libs.path}${file.separator}classes">
179+
<include name="libreoffice.jar"/>
180+
</fileset>
181+
</path>
182+
166183
<path id="build.lib.path">
167184
<filelist dir="${workspace.path}" files="${uno.java.classpath}"/>
168185
</path>
@@ -232,6 +249,10 @@
232249

233250
<target name="compile-idlwrite" depends="merge-urd" if="sdk.useidlw">
234251
<echo message="Compile tool: ${sdk.idlw}"/>
252+
<echo message="Office unotype: ${office.unotypes.rdb}"/>
253+
<echo message="Office offapi: ${office.offapi.rdb}"/>
254+
<echo message="idl dir: ${idl.dir}"/>
255+
<echo message="rdb dir: ${idl.rdb.fullpath}"/>
235256

236257
<delete file="${idl.rdb.fullpath}"/>
237258
<exec executable="${sdk.idlw}" failonerror="true">
@@ -242,7 +263,23 @@
242263
</exec>
243264
</target>
244265

245-
<target name="types" depends="compile-idlwrite" if="project.isjava">
266+
<target name="show-idlc" depends="compile-idlwrite" if="sdk.useidlc">
267+
<echo message="Tool regview: ${sdk.regview}"/>
268+
<exec executable="${sdk.regview}" failonerror="true">
269+
<arg value="${idl.rdb.fullpath}"/>
270+
</exec>
271+
</target>
272+
273+
<target name="show-idlw" depends="show-idlc" if="sdk.useidlw">
274+
<echo message="Tool unoidl-read: ${sdk.idlr}"/>
275+
<exec executable="${sdk.idlr}" failonerror="true">
276+
<arg value="${office.unotypes.rdb}"/>
277+
<arg value="${office.offapi.rdb}"/>
278+
<arg value="${idl.rdb.fullpath}"/>
279+
</exec>
280+
</target>
281+
282+
<target name="types" depends="show-idlw" if="project.isjava">
246283
<condition property="args.offapi" value=" -X&quot;${office.offapi.rdb}&quot;" else="">
247284
<length string="${office.offapi.rdb}" when="greater" length="0" trim="true"/>
248285
</condition>
@@ -278,13 +315,13 @@
278315
<target name="compile-module" depends="compile-java" if="src.withmodule">
279316
<echo message="Build module path: ${build.classes.dir}"/>
280317
<echo message="Source dir: ${src.dir.absolute}"/>
281-
<javac srcdir="${src.dir.absolute}" source="9" target="9" encoding="UTF-8" includeantruntime="false"
318+
<javac srcdir="${src.dir.absolute}" source="11" target="11" encoding="UTF-8" includeantruntime="false"
282319
destdir="${build.classes.dir}" excludes="**/*Test*">
283320
<modulepath>
284321
<pathelement location="${build.classes.dir}"/>
285322
<path refid="build.class.path"/>
286323
<path refid="build.lib.path"/>
287-
<path refid="office.class.path"/>
324+
<path refid="office.module.path"/>
288325
</modulepath>
289326
</javac>
290327
</target>

source/HyperSQLOOo/registration/TermsOfUse_en.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Terms Of Use
23

34
**Ce [document][1] en français.**

source/HyperSQLOOo/registration/TermsOfUse_fr.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Conditions d'utilisation
23

34
**This [document][1] in English.**

source/HyperSQLOOo/service/OptionsHandler.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,20 @@
2727
╚════════════════════════════════════════════════════════════════════════════════════╝
2828
"""
2929

30-
import uno
3130
import unohelper
3231

32+
from com.sun.star.logging.LogLevel import SEVERE
33+
3334
from com.sun.star.awt import XContainerWindowEventHandler
3435

3536
from com.sun.star.lang import XServiceInfo
3637

3738
from hypersql import OptionsManager
3839

40+
from hypersql import getLogger
41+
42+
from hypersql import g_basename
43+
from hypersql import g_defaultlog
3944
from hypersql import g_identifier
4045

4146
import traceback
@@ -51,14 +56,16 @@ class OptionsHandler(unohelper.Base,
5156
def __init__(self, ctx):
5257
self._ctx = ctx
5358
self._manager = None
59+
self._logger = getLogger(ctx, g_defaultlog, g_basename)
60+
self._url = 'xdbc:hsqldb:mem:dbversion'
5461

5562
# XContainerWindowEventHandler
5663
def callHandlerMethod(self, window, event, method):
5764
try:
5865
handled = False
5966
if method == 'external_event':
6067
if event == 'initialize':
61-
self._manager = OptionsManager(self._ctx, window, 'xdbc:hsqldb:mem:dbversion')
68+
self._manager = OptionsManager(self._ctx, self._logger, window, self._url)
6269
handled = True
6370
elif event == 'ok':
6471
self._manager.saveSetting()
@@ -68,7 +75,7 @@ def callHandlerMethod(self, window, event, method):
6875
handled = True
6976
return handled
7077
except Exception as e:
71-
print("ERROR: %s - %s" % (e, traceback.format_exc()))
78+
self._logger.logprb(SEVERE, 'OptionsHandler', 'callHandlerMethod', 301, e, traceback.format_exc())
7279

7380
def getSupportedMethodNames(self):
7481
return ('external_event', )
@@ -81,7 +88,6 @@ def getImplementationName(self):
8188
def getSupportedServiceNames(self):
8289
return g_ImplementationHelper.getSupportedServiceNames(g_ImplementationName)
8390

84-
8591
g_ImplementationHelper.addImplementation(OptionsHandler, # UNO object class
8692
g_ImplementationName, # Implementation name
8793
g_ServiceNames) # List of implemented services

0 commit comments

Comments
 (0)