Skip to content

Commit b14a62d

Browse files
committed
new version 1.5.1
1 parent 8959669 commit b14a62d

File tree

9 files changed

+18
-14
lines changed

9 files changed

+18
-14
lines changed

source/OAuth2OOo/OAuth2OOo/ChatGPTRequest.xba

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Sub Main
4040
sQuery = "How to make HTTP requests in Basic in LibreOffice?"
4141

4242
Rem First we need to create the OAuth2Service
43-
oRequest = CreateUnoService("io.github.prrvchr.OAuth2OOo.OAuth2Service")
43+
oRequest = createUnoService("io.github.prrvchr.OAuth2OOo.OAuth2Service")
4444

4545
Rem To execute an HTTP request we first need a HTTP Request parameter
4646
oParameter = oRequest.getRequestParameter("ChatGPT")

source/OAuth2OOo/OAuth2OOo/GithubDownloadRequest.xba

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,23 @@ Sub Main
3535
exit sub
3636
endif
3737

38-
Rem Ask the user where to upload the file
39-
oFp = CreateUnoService("com.sun.star.ui.dialogs.OfficeFolderPicker")
38+
Rem Ask the user where to download the file
39+
sTarget = ""
40+
oFp = createUnoService("com.sun.star.ui.dialogs.OfficeFolderPicker")
4041
oFp.Title = "Choose the download directory"
4142
if oFp.execute() = com.sun.star.ui.dialogs.ExecutableDialogResults.OK Then
42-
sTarget = oFP.Directory
43-
else
43+
sTarget = oFp.Directory
44+
endif
45+
oFp.dispose()
46+
Rem User clicked Cancel
47+
if sTarget = "" then
4448
exit sub
4549
endif
4650

4751
oUrl = getUrl(sSource)
4852

4953
Rem First we need to create the UNO OAuth2Service without OAuth2
50-
oRequest = CreateUnoService("io.github.prrvchr.OAuth2OOo.OAuth2Service")
54+
oRequest = createUnoService("io.github.prrvchr.OAuth2OOo.OAuth2Service")
5155

5256
Rem We need a first request to initialize HTTP cookies and allow the download
5357
oParameter = oRequest.getRequestParameter("github-cookies")
@@ -71,7 +75,7 @@ Sub Main
7175
if oResponse.Ok then
7276
oSf = createUNOService("com.sun.star.ucb.SimpleFileAccess")
7377
oSf.writeFile(sTarget + "/" + oUrl.Name, oResponse.getInputStream(65536, false))
74-
sText = "File: " + oUrl.Name + " donwloaded..."
78+
sText = "File: " + oUrl.Name + " downloaded..."
7579
else
7680
sText = oResponse.Text
7781
endif

source/OAuth2OOo/OAuth2OOo/GoogleAPIRequest.xba

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Sub Main
4949

5050
Rem First we need to create the UNO OAuth2Service with the OAuth2 protocol support
5151
Rem (ie: with an Url and a User email address)
52-
oRequest = CreateUnoServiceWithArguments("io.github.prrvchr.OAuth2OOo.OAuth2Service", Array(sUrl, sUser))
52+
oRequest = createUnoServiceWithArguments("io.github.prrvchr.OAuth2OOo.OAuth2Service", Array(sUrl, sUser))
5353
Rem User canceled OAuth2 Wizard.
5454
if isNull(oRequest) then
5555
exit sub

source/OAuth2OOo/OAuth2OOo/GraphAPIRequest.xba

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Sub Main
4949

5050
Rem First we need to create the UNO OAuth2Service with the OAuth2 protocol support
5151
Rem (ie: with an Url and a User email address)
52-
oRequest = CreateUnoServiceWithArguments("io.github.prrvchr.OAuth2OOo.OAuth2Service", Array(sUrl, sUser))
52+
oRequest = createUnoServiceWithArguments("io.github.prrvchr.OAuth2OOo.OAuth2Service", Array(sUrl, sUser))
5353
Rem User canceled OAuth2 Wizard.
5454
if isNull(oRequest) then
5555
exit sub

source/OAuth2OOo/OAuth2OOo/HTTPGetRequest.xba

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Rem ╚════════════════════════
2828
Sub Main
2929

3030
Rem First we need to create the UNO OAuth2Service without OAuth2
31-
oRequest = CreateUnoService("io.github.prrvchr.OAuth2OOo.OAuth2Service")
31+
oRequest = createUnoService("io.github.prrvchr.OAuth2OOo.OAuth2Service")
3232

3333
Rem To execute an HTTP request we first need a HTTP Request parameter
3434
oParameter = oRequest.getRequestParameter("httpbin")

source/OAuth2OOo/OAuth2OOo/HTTPPostRequest.xba

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Sub Main
3838
sKey = "Key1"
3939

4040
Rem First we need to create the UNO OAuth2Service without OAuth2
41-
oRequest = CreateUnoService("io.github.prrvchr.OAuth2OOo.OAuth2Service")
41+
oRequest = createUnoService("io.github.prrvchr.OAuth2OOo.OAuth2Service")
4242

4343
Rem To execute an HTTP request we first need a HTTP Request parameter
4444
oParameter = oRequest.getRequestParameter("httpbin")

source/OAuth2OOo/OAuth2OOo/OAuth2Wizard.xba

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Rem ╚════════════════════════
2727

2828

2929
Sub OAuth2Wizard
30-
Set oDispatch = CreateUnoService("com.sun.star.frame.DispatchHelper")
30+
Set oDispatch = createUnoService("com.sun.star.frame.DispatchHelper")
3131
Dim args(0) As New com.sun.star.beans.PropertyValue
3232
args(0).Name = "Close"
3333
args(0).Value = false

source/OAuth2OOo/dialogs/OptionsDialog.xdl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@
3939
<dlg:fixedline dlg:style-id="0" dlg:id="FixedLine2" dlg:tab-index="7" dlg:left="6" dlg:top="143" dlg:width="244" dlg:height="15" dlg:help-text="&amp;OptionsDialog.FixedLine2.HelpText" dlg:value="&amp;OptionsDialog.FixedLine2.Label"/>
4040
<dlg:text dlg:id="Label4" dlg:tab-index="8" dlg:left="10" dlg:top="160" dlg:width="10" dlg:height="15" dlg:help-text="&amp;OptionsDialog.Label4.HelpText" dlg:value="&amp;OptionsDialog.Label4.Label" dlg:valign="center" dlg:tabstop="false"/>
4141
<dlg:combobox dlg:id="ComboBox1" dlg:tab-index="9" dlg:left="25" dlg:top="160" dlg:width="60" dlg:height="15" dlg:help-text="&amp;OptionsDialog.ComboBox1.HelpText" dlg:value="&amp;OptionsDialog.ComboBox1.Text" dlg:spin="true"/>
42-
<dlg:button dlg:id="CommandButton1" dlg:tab-index="10" dlg:disabled="false" dlg:left="95" dlg:top="160" dlg:width="60" dlg:height="15" dlg:help-text="&amp;OptionsDialog.CommandButton1.HelpText" dlg:value="&amp;OptionsDialog.CommandButton1.Label">
42+
<dlg:button dlg:id="CommandButton1" dlg:tab-index="10" dlg:disabled="false" dlg:left="105" dlg:top="160" dlg:width="60" dlg:height="15" dlg:help-text="&amp;OptionsDialog.CommandButton1.HelpText" dlg:value="&amp;OptionsDialog.CommandButton1.Label">
4343
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.UNO:Connect" script:language="UNO"/>
4444
</dlg:button>
45-
<dlg:checkbox dlg:id="CheckBox1" dlg:tab-index="11" dlg:left="165" dlg:top="160" dlg:width="85" dlg:height="15" dlg:help-text="&amp;OptionsDialog.CheckBox1.HelpText" dlg:value="&amp;OptionsDialog.CheckBox1.Label" dlg:valign="center" dlg:checked="false"/>
45+
<dlg:checkbox dlg:id="CheckBox1" dlg:tab-index="11" dlg:left="190" dlg:top="160" dlg:width="60" dlg:height="15" dlg:help-text="&amp;OptionsDialog.CheckBox1.HelpText" dlg:value="&amp;OptionsDialog.CheckBox1.Label" dlg:valign="center" dlg:checked="false"/>
4646
<dlg:text dlg:style-id="0" dlg:id="Label5" dlg:tab-index="12" dlg:left="10" dlg:top="185" dlg:width="240" dlg:height="15" dlg:help-text="&amp;OptionsDialog.Label5.HelpText" dlg:value="&amp;OptionsDialog.Label5.Label" dlg:align="center" dlg:valign="center"/>
4747
</dlg:bulletinboard>
4848
</dlg:window>
-1 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)