30 Commits

Author SHA1 Message Date
85fc209ef1 Branch libreoffice-7-3-6
This is 'libreoffice-7-3-6' - the stable branch for the 7.3.6 release.
Only very safe changes, reviewed by three people are allowed.

If you want to commit more complicated fix for the next 7.3.x release,
please use the 'libreoffice-7-3' branch.

If you want to build something cool, unstable, and risky, use master.

Change-Id: If6bc7fccbe8cf6e52d50a3e926c91189d3e94d46
2022-08-18 19:35:24 +02:00
634364782f tdf#150162 Add missing sample file for FOURIER
Change-Id: Iad5fcedf6f2351abc904f0e5cbdc63c0f47fc7e7
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/137724
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-08-04 15:03:33 +02:00
fa41fa0230 make generated help files deterministic/reproducible
generate-id() is only stable within a single invocation, the results
vary from run to run, causing two builds of the same codebase result in
different output.
Due to help including snippets from different files, a simple count
won't be unique enough, but combining it with the sourcefile's topic-ID
does the trick.

Change-Id: I2ab8988bc34c9136fcd99d074cf0b189a8f40eb7
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136197
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
(cherry picked from commit b48ace599e8c109c4090c178823c6718f78103da)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136171
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-22 20:42:12 +02:00
0f12f8a4dc tdf#123318 Use SHARED as the default module instead of WRITER
Change-Id: I78c3f71a862ad0896cc13b105cac46dca99b4195
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/130079
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
(cherry picked from commit 3e86799f1b1e957e442a23022bc12cc25bb0c8a6)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/130103
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-02-21 03:32:32 +01:00
4f095575f5 Add 7.3 New features video to online Help
Change-Id: I7249a32716c51fa07d63285037d35a3a563eba29
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/129255
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-02-01 19:22:30 +01:00
3b4862b4c8 These don’t need to be translatable
Change-Id: I58aaae67b6c4e138ff7b7d7a655bdc3a71761bb7
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/127886
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
(cherry picked from commit 66835d0b781676751880a47989a5464b9dd1590f)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/127772
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-01-03 12:11:22 +01:00
71a6d6a1f2 tdf#146336 Fix missing default in Help page
Logic was designed for moduls with page formatting.

MATH, BASE and unknown module were not handled. Default is
for Writer.

Change-Id: I4d92a37110a342274a3d131f025213716134dd60
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/127191
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
(cherry picked from commit a35f8b648fd4bac70bbde0554a2d4051c7633cde)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/127175
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-21 05:05:30 +01:00
87e56bf536 This string actually refers to the Eurozone, not the bigger European Union
Change-Id: I495fa0ff13479f34ee84e02fb5122f733f981492
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/127099
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
(cherry picked from commit 06aefeb52aef710b60138fd6a71a849367341b5f)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/127059
2021-12-19 19:14:51 +01:00
94884d2107 tdf#146299: MsgBox can have the parameter MB_ABORTRETRYIGNORE
not MB_ABORTRETRYCANCEL

Change-Id: I79867d5320c8e39fb717ac92f03875744a264a99
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/127048
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 84b6347bd05d0a7e5a7ea5075702f5f2892b5c1f)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/127057
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-18 22:43:38 +01:00
03ff163478 Related tdf#145350 improve subscript/superscript help about sidebar
Change-Id: I4336688ee1c2c9cbb09d0ff06db75579656311cc
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126938
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
(cherry picked from commit af5933948773b624c5802148c33094691cd5e196)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/127056
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-18 22:32:00 +01:00
4ec7e03a4c tdf#145983 Fix CTL information in Hyphenation help page
Change-Id: I0863327574e671443255b49e86a1a13896c2d8bb
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126937
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
(cherry picked from commit 02ad9fafa8ed2e393f118fe42c838d674ea9dda2)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/127055
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-18 22:30:36 +01:00
35a43adc47 Consistent ScriptForge Examples Variable Names
- ui for UI service
 - bas for Basic service

Change-Id: I0eb4fbdd021db1149985bb37ba8b29a57297a6eb
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126092
Tested-by: Jenkins
Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
(cherry picked from commit 4156bb3b6cfcecb9ccce1ef5c7656d67df93b5c9)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126934
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-12-16 14:43:43 +01:00
764b7d243a Remove avail_release <notes> from SF documentation
Change-Id: Iab4c6ecba7f4db57bed82a29c5c4b9434b4efbb4
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126295
Tested-by: Jenkins
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
(cherry picked from commit 43abde3c6b788ec7ac5384e7a6601bfac1cfc744)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126935
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-12-16 14:42:33 +01:00
26b5b4754f Document new TableControl methods and properties
Change-Id: I8623a11f5fb710332765b8db3914a36b51285b7a
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126294
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
(cherry picked from commit 73228ff72af0e4f8ca7e29b4dca388741804cb06)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126936
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-12-16 14:41:46 +01:00
96d7d76149 Document new methods in SFL10N and SF_Dialog
Change-Id: I02fa64860982969b5d7580d11781906ec354502d
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/125829
Tested-by: Jenkins
Reviewed-by: Alain Romedenne <alain.romedenne@libreoffice.org>
(cherry picked from commit 053d65c6f001c97da41cc8fc43f9e55915c9c3ca)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126930
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-12-16 13:48:16 +01:00
cc436650ab Document ExportAsPDF method from SF Document service
Change-Id: I00421d36f7315ec7ec62eac39c44ea4433078685
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126091
Tested-by: Jenkins
Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
(cherry picked from commit 51f94e35a9b401f2cbc59e57221ce1a4f2edc639)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126931
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-12-16 13:45:56 +01:00
cb17cdf146 Document new SF_Calc methods
This patch documents the following new methods:
- OpenRangeSelector, Printf, ShiftDown, ShiftLeft, ShiftRight, ShiftUp

The following new properties were added:
- FirstCell, FirstColumn, FirstRow

Change-Id: I9803252ec0594bd202fc689dd16ca57541e94e62
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/125890
Tested-by: Jenkins
Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
(cherry picked from commit b838d04091f125a13302519807040ce43652d5ba)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126932
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-12-16 13:44:50 +01:00
93c1560a8c Document new methods in SF Session service
Change-Id: Idd2d0674aea815d7fb6743a92e348b58865ab09c
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126145
Tested-by: Jenkins
Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
(cherry picked from commit 7566aae37b2c20ef155ac0fec53eac393fc288c4)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126933
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-12-16 13:43:11 +01:00
1053d9d25f Fix minor typos and L10N in ScriptForge help pages
Change-Id: Ie5c236da58f1a13e9aa022549aef65e661fbfd9b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126673
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
(cherry picked from commit f3ee28f154cea6cc94999015364e0a2965ee41c7)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126818
2021-12-14 19:16:38 +01:00
495103834a Mute l10n for BASIC variable types
Change-Id: I096e41267dfbfa167409b91657c8b2ea015bab1e
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126701
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
(cherry picked from commit d0774bb418359c1135dab327cbc21b32d9513d02)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126679
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-13 03:22:48 +01:00
3cff9e221a Silence strings for l10n in sbasic/shared (Part 2)
Change-Id: Ia14a0773d1dc13eaf8737eca3f68594eb1bb8054
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126670
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
(cherry picked from commit fa7fd622849d9e31d3f27e3762b0a0e578838cc0)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126671
2021-12-11 15:53:48 +01:00
ca76e7f693 Silence strings for l10n in sbasic/shared (Part 1)
These strings are appearing for translation in Weblate
but they're pure Basic code/syntax that does not need translation.

Change-Id: I8a3f16fcb23f18a2b2b46eb7eaf8bbf74023dd84
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126606
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
(cherry picked from commit bba53dc2eb06941ab4e9b9c22722b22c19cd3698)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126667
Tested-by: Jenkins
2021-12-11 01:58:38 +01:00
7121676863 Fix a "D'oh you found a bug"...
Change-Id: I7261546457c0d128bef55cb8be7737cb6b70d22a
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126417
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
(cherry picked from commit b7bdb8a47c81ed94509777b12d2706a36ad18add)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126427
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-07 17:22:30 +01:00
5268bd87fb localize proper strings and fix example result for StrConv function
Change-Id: I6bd2b9fda9217c589f6e53b0341d8028a6ca44c8
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126348
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
(cherry picked from commit 32b4e8c9931810bf55bacc2c029e711d82b8c42f)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126303
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-06 04:41:14 +01:00
0e111bb23b use proper angle units in Cos and Sin description
Change-Id: I318e1a20ee220fc306f2f4af2e61cc5c1b7237b0
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126205
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
(cherry picked from commit 676c20ccd9f5cb6e3fd9d882e39a02028c1f0340)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126302
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-06 04:41:00 +01:00
18df2a92e4 tdf#145617 break dense paragraph in bullets for CInt
+ refactor headings

Change-Id: I4c01861f41fd545f63b12e50a9829f97fc9ff4cf
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126199
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
(cherry picked from commit b127658216cdbac1becdba794ea97f8f8b219e15)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126232
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-03 19:29:21 +01:00
c0c813639a tdf#117868 Help contents for sep= in CSV files
Change-Id: I6ac919fd95b9c30be3f1f2aa7bc18efd40b6d2d7
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126188
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 4973d1a792d20d77e7401c1d2b1fe9821695297d)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126231
2021-12-02 15:16:19 +01:00
aab06144bd Related: tdf#145728 Update help strings for QR and Barcode dialog
Also, I removed the Wikipedia link. Besides having grammatical problems,
I don’t think these links are a fit for our documentation.
We would do a bigger service for our readers having all the needed
information right into our pages, where we can control it better.

Change-Id: Iaf96727ae5127ad622a2887aeea4c81b262d4ede
(cherry picked from commit fe3d13ce1750ba2cd5bc64ff76d20a11e93e446e)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126222
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-02 12:12:57 +01:00
5cee59d11c Fix typo
Change-Id: Ibebb1d297c72c1a48191b5c875c9e9c9dd465054
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/125854
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
(cherry picked from commit 4de0e64acce71f06fe07dbe989f77a2aedb4e7d6)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/125833
2021-11-26 03:48:24 +01:00
dd60d3ce1b Branch libreoffice-7-3
This is 'libreoffice-7-3' - the stable branch for the 7.3.x releases.
The commit rules are different according to the development phase:

A. 7.3.0 beta phase:

   A. any bug fixes are allowed without review
   B. late features need approval by 3 people with different affiliation

B. 7.3.0 rc phase and later:

   A. fixes need approval by one reviewer
   B. late features need approval by 3 more people with different affiliation

IMPORTANT: Every developer is responsible for pushing the fixes into all
          appropriate branches. Note that we do not plan any merge
          from this branch to master or vice versa.

Please, help use to make stable and usable release. If you want to build
something cool, unstable, and risky, use master.

Change-Id: I1cb4dd2ef9d5379aec6476257f633b714acc91a4
2021-11-25 20:05:41 +01:00
82 changed files with 1053 additions and 405 deletions

View File

@ -16,6 +16,7 @@ $(eval $(call gb_Package_Package,helpcontent2_html_media,$(SRCDIR)/helpcontent2/
$(eval $(call gb_Package_add_files_with_dir,helpcontent2_html_media,$(LIBO_SHARE_HELP_FOLDER)$(if $(HELP_ONLINE),/$(PRODUCTVERSION))/media, \
files/scalc/imtrigon.ods \
files/scalc/function_fourier.ods \
files/scalc/pivot.ods \
files/scalc/trigon.ods \
files/scalc/functions_ifs.ods \

View File

@ -115,7 +115,7 @@ function fixURL(module, system) {
if ((DisplayArea = document.getElementById("DisplayArea")) === null) return;
var itemlink = DisplayArea.getElementsByTagName("a");
var pSystem = (system === null) ? getSystem() : system;
var pAppl = (module === null) ? "WRITER" : module;
var pAppl = (module === null) ? "SHARED" : module;
var n = itemlink.length;
for (var i = 0; i < n; i++) {
if (itemlink[i].getAttribute("class") != "objectfiles") {

View File

@ -38,7 +38,7 @@
case "smath": {defaultFile='text/smath/main0000.html';module="MATH";break;}
case "sdatabase": {defaultFile='text/sdatabase/main.html';module="BASE";break;}
case "sbasic": {defaultFile='text/sbasic/shared/main0601.html';module="BASIC";break;}
default: {defaultFile='text/shared/05/new_help.html';module="WRITER";break;}
default: {defaultFile='text/shared/05/new_help.html';module="SHARED";break;}
}
//Special case of application F1 or menu Help -> LibreOffice Help
if (target.indexOf('.uno:HelpIndex') != -1) {
@ -66,7 +66,7 @@
var system = 'WIN';
if (navigator.userAgent.indexOf("Mac") != -1) system = 'MAC';
if (navigator.userAgent.indexOf("Linux") != -1) system = 'UNIX';
window.location.replace(existingLang(navigator.language) + '/text/shared/05/new_help.html?&DbPAR=WRITER&System=' + system);
window.location.replace(existingLang(navigator.language) + '/text/shared/05/new_help.html?&DbPAR=SHARED&System=' + system);
}
});
</script>

View File

@ -658,16 +658,17 @@
<!-- SWITCH -->
<xsl:template match="switch">
<xsl:variable name="idsw">
<xsl:value-of select="//meta/topic/@id" /><xsl:number level="any" count="switch|switchinline" format="_1"/>
</xsl:variable>
<xsl:choose>
<xsl:when test ="@select = 'sys'">
<xsl:variable name="idsw" select="concat('swlnsys',generate-id())"/>
<span id="{$idsw}" class="switch">
<span id="swlnsys{$idsw}" class="switch">
<xsl:apply-templates />
</span>
</xsl:when>
<xsl:when test ="@select = 'appl'">
<xsl:variable name="idsw" select="concat('swlnappl',generate-id())"/>
<span id="{$idsw}" class="switch">
<span id="swlnappl{$idsw}" class="switch">
<xsl:apply-templates />
</span>
</xsl:when>
@ -677,16 +678,17 @@
</xsl:choose>
</xsl:template>
<xsl:template match="switch" mode="embedded">
<xsl:variable name="idsw">
<xsl:value-of select="//meta/topic/@id" /><xsl:number level="any" count="switch|switchinline" format="_1"/>
</xsl:variable>
<xsl:choose>
<xsl:when test ="@select = 'sys'">
<xsl:variable name="idsw" select="concat('swlnsys',generate-id())"/>
<span id="{$idsw}" class="switch">
<span id="swlnsys{$idsw}" class="switch">
<xsl:apply-templates mode="embedded"/>
</span>
</xsl:when>
<xsl:when test ="@select = 'appl'">
<xsl:variable name="idsw" select="concat('swlnappl',generate-id())"/>
<span id="{$idsw}" class="switch">
<span id="swlnappl{$idsw}" class="switch">
<xsl:apply-templates mode="embedded"/>
</span>
</xsl:when>
@ -698,16 +700,17 @@
<!-- SWITCHINLINE -->
<xsl:template match="switchinline">
<xsl:variable name="idsw">
<xsl:value-of select="//meta/topic/@id" /><xsl:number level="any" count="switch|switchinline" format="_1"/>
</xsl:variable>
<xsl:choose>
<xsl:when test ="@select = 'sys'">
<xsl:variable name="idsw" select="concat('swlnsys',generate-id())"/>
<span id="{$idsw}" class="switchinline">
<span id="swlnsys{$idsw}" class="switchinline">
<xsl:apply-templates />
</span>
</xsl:when>
<xsl:when test ="@select = 'appl'">
<xsl:variable name="idsw" select="concat('swlnappl',generate-id())"/>
<span id="{$idsw}" class="switchinline">
<span id="swlnappl{$idsw}" class="switchinline">
<xsl:apply-templates />
</span>
</xsl:when>
@ -717,16 +720,17 @@
</xsl:choose>
</xsl:template>
<xsl:template match="switchinline" mode="embedded">
<xsl:variable name="idsw">
<xsl:value-of select="//meta/topic/@id" /><xsl:number level="any" count="switch|switchinline" format="_1"/>
</xsl:variable>
<xsl:choose>
<xsl:when test ="@select = 'sys'">
<xsl:variable name="idsw" select="concat('swlnsys',generate-id())"/>
<span id="{$idsw}" class="switchinline">
<span id="swlnsys{$idsw}" class="switchinline">
<xsl:apply-templates mode="embedded"/>
</span>
</xsl:when>
<xsl:when test ="@select = 'appl'">
<xsl:variable name="idsw" select="concat('swlnappl',generate-id())"/>
<span id="{$idsw}" class="switchinline">
<span id="swln{@select}_{$idsw}" class="switchinline">
<xsl:apply-templates mode="embedded"/>
</span>
</xsl:when>
@ -1093,13 +1097,15 @@
<!-- Evaluate a case or caseinline switch -->
<xsl:template name="insertcase">
<xsl:param name="embedded" />
<xsl:variable name="auxID" select="concat(@select,generate-id())"/>
<xsl:variable name="auxID">
<xsl:value-of select="//meta/topic/@id" /><xsl:number level="any" count="switch|switchinline" format="_1"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$embedded = 'yes'">
<span hidden="true" id="{$auxID}" class="{@select}"><xsl:apply-templates mode="embedded"/></span>
<span hidden="true" id="{@select}{$auxID}" class="{@select}"><xsl:apply-templates mode="embedded"/></span>
</xsl:when>
<xsl:otherwise>
<span hidden="true" id="{$auxID}" class="{@select}"><xsl:apply-templates/></span>
<span hidden="true" id="{@select}{$auxID}" class="{@select}"><xsl:apply-templates/></span>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
@ -1107,26 +1113,27 @@
<!-- Evaluate a default or defaultinline switch -->
<xsl:template name="insertdefault">
<xsl:param name="embedded" />
<xsl:variable name="auxID">
<xsl:value-of select="//meta/topic/@id" /><xsl:number level="any" count="switch|switchinline" format="_1"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="parent::switch[@select='sys'] or parent::switchinline[@select='sys']">
<xsl:variable name="auxID" select="concat('default',generate-id())"/>
<xsl:choose>
<xsl:when test="$embedded = 'yes'">
<span hidden="true" id="{$auxID}"><xsl:apply-templates mode="embedded"/></span>
<span hidden="true" id="default{$auxID}"><xsl:apply-templates mode="embedded"/></span>
</xsl:when>
<xsl:otherwise>
<span hidden="true" id="{$auxID}"><xsl:apply-templates /></span>
<span hidden="true" id="default{$auxID}"><xsl:apply-templates /></span>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="parent::switch[@select='appl'] or parent::switchinline[@select='appl']">
<xsl:variable name="auxID" select="concat('default',generate-id())"/>
<xsl:choose>
<xsl:when test="$embedded = 'yes'">
<span hidden="true" id="{$auxID}"><xsl:apply-templates mode="embedded"/></span>
<span hidden="true" id="default{$auxID}"><xsl:apply-templates mode="embedded"/></span>
</xsl:when>
<xsl:otherwise>
<span hidden="true" id="{$auxID}"><xsl:apply-templates /></span>
<span hidden="true" id="default{$auxID}"><xsl:apply-templates /></span>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
@ -1262,6 +1269,9 @@
<!-- Insert an object -->
<xsl:template name="insertobject">
<xsl:variable name="auxID">
<xsl:value-of select="//meta/topic/@id" /><xsl:number level="any" count="object" format="_1"/>
</xsl:variable>
<xsl:variable name="tmp_href"><xsl:value-of select="concat($urlpre,'text/shared/00/00000004.xhp')"/></xsl:variable>
<xsl:variable name="tmp_doc" select="document($tmp_href)"/>
<xsl:variable name="data">
@ -1274,7 +1284,6 @@
<xsl:variable name="height">
<xsl:call-template name="convert2px"><xsl:with-param name="value" select="@height"/></xsl:call-template>
</xsl:variable>
<xsl:variable name="auxID" select="concat('obj',generate-id())"/>
<xsl:choose>
<xsl:when test="starts-with(@type,'video/youtube')">
<div id="mediadiv">
@ -1297,7 +1306,7 @@
<xsl:with-param name="string" select="@data"/>
</xsl:call-template>
</xsl:variable>
<div class="samplefilesection" id="{$auxID}">
<div class="samplefilesection" id="obj{$auxID}">
<h3><xsl:apply-templates select="$tmp_doc//variable[@id='samplefile']"/></h3>
<a class="objectfiles" href="{$src}"><img src="media/navigation/libo-calc.svg" width="25px" height="30px"></img></a>
</div>
@ -1308,7 +1317,7 @@
<xsl:with-param name="string" select="@data"/>
</xsl:call-template>
</xsl:variable>
<div class="samplefilesection" id="{$auxID}">
<div class="samplefilesection" id="obj{$auxID}">
<h3><xsl:apply-templates select="$tmp_doc//variable[@id='samplefile']"/></h3>
<a class="objectfiles" href="{$src}"><img src="media/navigation/libo-writer.svg" width="25px" height="30px"></img></a>
</div>
@ -1319,7 +1328,7 @@
<xsl:with-param name="string" select="@data"/>
</xsl:call-template>
</xsl:variable>
<div class="samplefilesection" id="{$auxID}">
<div class="samplefilesection" id="obj{$auxID}">
<h3><xsl:apply-templates select="$tmp_doc//variable[@id='samplefile']"/></h3>
<a class="objectfiles" href="{$src}"><img src="media/navigation/libo-impress.svg" width="25px" height="30px"></img></a>
</div>
@ -1330,7 +1339,7 @@
<xsl:with-param name="string" select="@data"/>
</xsl:call-template>
</xsl:variable>
<div class="samplefilesection" id="{$auxID}">
<div class="samplefilesection" id="obj{$auxID}">
<h3><xsl:apply-templates select="$tmp_doc//variable[@id='samplefile']"/></h3>
<a class="objectfiles" href="{$src}"><img src="media/navigation/libo-draw.svg" width="25px" height="30px"></img></a>
</div>
@ -1341,7 +1350,7 @@
<xsl:with-param name="string" select="@data"/>
</xsl:call-template>
</xsl:variable>
<div class="samplefilesection" id="{$auxID}">
<div class="samplefilesection" id="obj{$auxID}">
<h3><xsl:apply-templates select="$tmp_doc//variable[@id='samplefile']"/></h3>
<a class="objectfiles" href="{$src}"><img src="media/navigation/libo-math.svg" width="25px" height="30px"></img></a>
</div>
@ -1352,7 +1361,7 @@
<xsl:with-param name="string" select="@data"/>
</xsl:call-template>
</xsl:variable>
<div class="samplefilesection" id="{$auxID}">
<div class="samplefilesection" id="obj{$auxID}">
<h3><xsl:apply-templates select="$tmp_doc//variable[@id='samplefile']"/></h3>
<a class="objectfiles" href="{$src}"><img src="media/navigation/libo-base.svg" width="25px" height="30px"></img></a>
</div>

View File

@ -77,9 +77,9 @@
</list>
</section>
<h3 id="N0368">Python Syntax</h3>
<paragraph role="paragraph" id="N0369"><literal>results = script.invoke((prompt,buttons,title), (), ())</literal></paragraph>
<paragraph role="paragraph" id="N0370"><literal>script.invoke((message,), tuple, ())</literal></paragraph>
<paragraph role="paragraph" id="N0371"><literal>script.invoke((args), (), results)</literal></paragraph>
<paragraph role="paragraph" localize="false" id="N0369"><input>results = script.invoke((prompt,buttons,title), (), ())</input></paragraph>
<paragraph role="paragraph" localize="false" id="N0370"><input>script.invoke((message,), tuple, ())</input></paragraph>
<paragraph role="paragraph" localize="false" id="N0371"><input>script.invoke((args), (), results)</input></paragraph>
<h3 id="N0372">Examples of Personal or Shared Scripts</h3>
<paragraph role="paragraph" id="N0373">Examples in <link href="text/sbasic/python/python_screen.xhp" name ="Input/Output to Screen">Input/Output to Screen</link> detail Python to Basic invocation calls. <link href="text/sbasic/python/python_document_events.xhp" name ="Monitoring Document Events">Monitoring Document Events</link> illustrates the usage of *args Python idiom to print a variable number of parameters to <literal>Access2Base</literal> logging console dialog.</paragraph>
<tip id="N0374">At time of development you can interrupt Python script execution using <link href="https://berma.pagesperso-orange.fr/index2.html" name ="Xray extension">Xray extension</link> in order to inspect properties and methods of UNO objects. The APSO extension debugger allows object introspection using either Xray either MRI extensions.</tip>

View File

@ -64,7 +64,7 @@
<paragraph role="pycode" localize="false" id="N0540"> XDocumentEventListener as AdapterPattern</paragraph>
<paragraph role="pycode" localize="false" id="N0541">from com.sun.star.lang import EventObject</paragraph>
<paragraph role="pycode" localize="false" id="N0542"> </paragraph>
<paragraph role="pycode" xml-lang="en-US" id="N0543">class UiDocument(unohelper.Base, AdapterPattern):</paragraph>
<paragraph role="pycode" localize="false" id="N0543">class UiDocument(unohelper.Base, AdapterPattern):</paragraph>
<paragraph role="pycode" xml-lang="en-US" id="N0544"> &quot;&quot;&quot; Monitor document events &quot;&quot;&quot;</paragraph>
<paragraph role="pycode" localize="false" id="N0545"> &apos;&apos;&apos;</paragraph>
<paragraph role="pycode" xml-lang="en-US" id="N0546"> adapted from &apos;Python script to monitor OnSave event&apos; at</paragraph>

View File

@ -234,7 +234,6 @@
</bookmark>
<h2 id="hd_id991627154151529" localize="false">Copy</h2>
<paragraph role="paragraph" id="par_id571627154604275">Creates a copy of a 1D or 2D array.</paragraph>
<embed href="text/sbasic/shared/03/avail_release.xhp#7.2.method"/>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id901627155659667">
<input>svc.Copy(array_nd: any[0..*]): any[0..*]</input>

View File

@ -110,7 +110,6 @@
</bookmark>
<h2 id="hd_id61161309632927" localize="false">CloseFormDocument</h2>
<paragraph role="paragraph" id="par_id801916099743199">Closes the given form document. Returns <literal>True</literal> if closure is successful.</paragraph>
<embed href="text/sbasic/shared/03/avail_release.xhp#7.3.method"/>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id71613205516650">
<input>svc.CloseFormDocument(formdocument: str): bool</input>
@ -317,7 +316,7 @@
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id368519200121646"><emph>formdocument</emph>: A valid document form name as a case-sensitive string. The form document must be open. It is activated by the method.</paragraph>
<paragraph role="paragraph" id="par_id211635436910093"><emph>pages</emph>: The pages to print as a string, like in the user interface. Example: &quot;1-4;10;15-18&quot;. Default is all pages.</paragraph>
<paragraph role="paragraph" id="par_id141635436912146"><emph>copies</emph><emph></emph>: The number of copies. Default is 1.</paragraph>
<paragraph role="paragraph" id="par_id141635436912146"><emph>copies</emph>: The number of copies. Default is 1.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>

View File

@ -24,18 +24,17 @@
<h1 id="hd_id731582733781114" xml-lang="en-US"><variable id="BasicService"><link href="text/sbasic/shared/03/sf_basic.xhp" name="Basic service"><literal>ScriptForge</literal>.<literal>Basic</literal> service</link></variable></h1>
<paragraph role="paragraph" id="par_id381589189355849" xml-lang="en-US">The <literal>ScriptForge.Basic</literal> service proposes a collection of %PRODUCTNAME Basic methods to be executed in a Python context. <literal>Basic</literal> service methods reproduce the exact syntax and behaviour of Basic builtin functions.
</paragraph>
<embed href="text/sbasic/shared/03/avail_release.xhp#7.2.service"/>
</section>
<paragraph role="paragraph" id="par_id591589189364267" xml-lang="en-US">Typical example:</paragraph>
<pycode>
<paragraph role="pycode" xml-lang="en-US" id="pyc_id971618493778666">svc.MsgBox('This has to be displayed in a message box')</paragraph>
<paragraph role="pycode" id="pyc_id971618493778666">bas.MsgBox('Display this text in a message box from a Python script')</paragraph>
</pycode>
<warning id="par_id151618849022977"><literal>ScriptForge</literal>.<literal>Basic</literal> service is limited to Python scripts.</warning>
<h2 id="hd_id581582885621841" xml-lang="en-US">Service invocation</h2>
<paragraph role="paragraph" id="par_id141610734722352">Before using the <literal>Basic</literal> service, import the <literal>CreateScriptService()</literal> method from the <literal>scriptforge</literal> module:</paragraph>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id551610734764343">from scriptforge import CreateScriptService</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id121618496552817">svc = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id121618496552817">bas = CreateScriptService("Basic")</paragraph>
</pycode>
<h2 id="hd_id201618922972557">Properties</h2>
<table id="tab_id991618922991909">
@ -177,9 +176,9 @@
<embed href="text/sbasic/shared/03100300.xhp#CDate_str_date"/>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id761621898860952">d = svc.CDate(1000.25)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id861621898933001">svc.MsgBox(str(d)) # 1902-09-26 06:00:00</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id871621898933281">svc.MsgBox(d.year) # 1902</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id761621898860952">d = bas.CDate(1000.25)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id861621898933001">bas.MsgBox(str(d)) # 1902-09-26 06:00:00</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id871621898933281">bas.MsgBox(d.year) # 1902</paragraph>
</pycode>
</section>
@ -204,8 +203,8 @@
<paragraph role="pycode" localize="false" id="pyc_id711621951947956">uno_date.Year = 1983</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id1001621951948124">uno_date.Month = 2</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id201621951948284">uno_date.Day = 23</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id911621952103058">new_date = svc.CDateFromUnoDateTime(uno_date)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id951621952103813">svc.MsgBox(str(new_date)) # 1983-02-23 00:00:00</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id911621952103058">new_date = bas.CDateFromUnoDateTime(uno_date)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id951621952103813">bas.MsgBox(str(new_date)) # 1983-02-23 00:00:00</paragraph>
</pycode>
</section>
@ -226,8 +225,8 @@
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id131621952700723">from datetime import datetime</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id391621952700963">current_datetime = datetime.now()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id941621952701150">uno_date = svc.CDateToUnoDateTime(current_datetime)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id191621952701458">svc.MsgBox(str(uno_date.Year) + "-" + str(uno_date.Month) + "-" + str(uno_date.Day))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id941621952701150">uno_date = bas.CDateToUnoDateTime(current_datetime)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id191621952701458">bas.MsgBox(str(uno_date.Year) + "-" + str(uno_date.Month) + "-" + str(uno_date.Day))</paragraph>
</pycode>
</section>
@ -246,8 +245,8 @@
<paragraph role="paragraph" id="par_id81618502493505">A system path file name.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id41158919969836">filename = svc.ConvertFromUrl( "file:///C:/Program%20Files%20(x86)/LibreOffice/News.txt")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id881611147617212">svc.MsgBox(filename)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id41158919969836">filename = bas.ConvertFromUrl( "file:///C:/Program%20Files%20(x86)/LibreOffice/News.txt")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id881611147617212">bas.MsgBox(filename)</paragraph>
</pycode>
</section>
@ -266,8 +265,8 @@
<paragraph role="paragraph" id="par_id61658101307414">A <literal>file:</literal> URL as a string.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id891985200121516">url = svc.ConvertToUrl( 'C:\Program Files(x86)\LibreOffice\News.txt')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id51589200605125">svc.MsgBox(url)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id891985200121516">url = bas.ConvertToUrl( 'C:\Program Files(x86)\LibreOffice\News.txt')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id51589200605125">bas.MsgBox(url)</paragraph>
</pycode>
</section>
@ -284,7 +283,7 @@
<paragraph role="paragraph" id="par_id361589200121646"><emph>servicename</emph>: A fully qualified service name such as <literal>com.sun.star.ui.dialogs.FilePicker</literal> or <literal>com.sun.star.sheet.FunctionAccess</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="bascode" localize="false" id="pyc_id891589200121516">dsk = svc.CreateUnoService('com.sun.star.frame.Desktop')</paragraph>
<paragraph role="bascode" localize="false" id="pyc_id891589200121516">dsk = bas.CreateUnoService('com.sun.star.frame.Desktop')</paragraph>
</pycode>
</section>
@ -307,7 +306,7 @@
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id961618558341526">dt = datetime.datetime(2004, 1, 31)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id891599410846998">dt = svc.DateAdd("m", 1, dt)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id891599410846998">dt = bas.DateAdd("m", 1, dt)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id621599410266932">print(dt)</paragraph>
</pycode>
</section>
@ -331,7 +330,7 @@
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id401611153339973">date1 = datetime.datetime(2005,1, 1)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id121589202413630">date2 = datetime.datetime(2005,12,31)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id641618564383315">diffDays = svc.DateDiff('d', date1, date2)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id641618564383315">diffDays = bas.DateDiff('d', date1, date2)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id151618564392035">print(diffDays)</paragraph>
</pycode>
</section>
@ -353,8 +352,8 @@
<paragraph role="paragraph" id="par_id791618672371743">The extracted part for the given date/time.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="bascode" localize="false" id="pyc_id31589202925376">print(svc.DatePart("ww", datetime.datetime(2005,12,31)</paragraph>
<paragraph role="bascode" localize="false" id="pyc_id821589203188905">print(svc.DatePart('q', datetime.datetime(1999,12,30)</paragraph>
<paragraph role="bascode" localize="false" id="pyc_id31589202925376">print(bas.DatePart("ww", datetime.datetime(2005,12,31)</paragraph>
<paragraph role="bascode" localize="false" id="pyc_id821589203188905">print(bas.DatePart('q', datetime.datetime(1999,12,30)</paragraph>
</pycode>
</section>
@ -373,7 +372,7 @@
<paragraph role="paragraph" id="par_id441618674018955">The computed date.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id81589203370943">dt = svc.DateValue("23-02-2011")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id81589203370943">dt = bas.DateValue("23-02-2011")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id931618674563379">print(dt)</paragraph>
</pycode>
</section>
@ -395,7 +394,7 @@
<embed href="text/sbasic/shared/00000003.xhp#languageformat"/>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id431589205147164">txt = svc.Format(6328.2, '##.##0.00')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id431589205147164">txt = bas.Format(6328.2, '##.##0.00')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id231618679147769">print(txt)</paragraph>
</pycode>
</section>
@ -414,7 +413,7 @@
<paragraph role="paragraph" id="par_id381618831451271">The default component context is used, when instantiating services via <literal>XMultiServiceFactory</literal>. See the <literal>Professional UNO</literal> chapter in the Developer's Guide on <link href="https://api.libreoffice.org/" name="API Developer's Guide">api.libreoffice.org</link> for more information.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id451389205147164">ctx = svc.GetDefaultContext()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id451389205147164">ctx = bas.GetDefaultContext()</paragraph>
</pycode>
</section>
@ -430,7 +429,7 @@
<paragraph role="paragraph" id="par_id109668178405855" localize="false"><input>svc.GetGuiType(): int</input></paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id154389205147164">n = svc.GetGuiType()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id154389205147164">n = bas.GetGuiType()</paragraph>
</pycode>
</section>
@ -444,12 +443,9 @@
<paragraph role="paragraph" id="par_id341618848562340">Use <literal>os.pathsep</literal> from <literal>os</literal> Python module to <link href="text/sbasic/python/python_platform.xhp" name="path delimiter">identify the path separator</link>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" id="par_id901668178405558" localize="false"><input>svc.GetPathSeparator(): str</input></paragraph>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id53158950247542">svc.GetPathSeparator(): str</paragraph>
</pycode>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id451389205147461">sep = svc.GetPathSeparator()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id451389205147461">sep = bas.GetPathSeparator()</paragraph>
</pycode>
</section>
@ -464,10 +460,10 @@
<paragraph role="paragraph" id="par_id901667188405855" localize="false"><input>svc.GetSystemTicks(): int</input></paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id251619448108905">ticks_ini = svc.GetSystemTicks()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id251619448108905">ticks_ini = bas.GetSystemTicks()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id181619448111210">time.sleep(1)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id301619448111744">ticks_end = svc.GetSystemTicks()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id651619448112320">svc.MsgBox("{} - {} = {}".format(ticks_end, ticks_ini,ticks_end - ticks_ini))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id301619448111744">ticks_end = bas.GetSystemTicks()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id651619448112320">bas.MsgBox("{} - {} = {}".format(ticks_end, ticks_ini,ticks_end - ticks_ini))</paragraph>
</pycode>
</section>
@ -488,7 +484,7 @@
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<paragraph role="paragraph" id="par_id281622398076950">The following example loads the Gimmicks Basic library if it has not been loaded yet.</paragraph>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id301622397623041">libs = svc.GlobalScope.BasicLibraries()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id301622397623041">libs = bas.GlobalScope.BasicLibraries()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id841622397623202">if not libs.isLibraryLoaded("Gimmicks"):</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id621622397623352"> libs.loadLibrary("Gimmicks")</paragraph>
</pycode>
@ -511,9 +507,9 @@
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<paragraph role="paragraph" id="par_id811622398234384">The following example shows a message box with the names of all available dialog libraries.</paragraph>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id561622398178727">dlg_libs = svc.GlobalScope.DialogLibraries()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id561622398178727">dlg_libs = bas.GlobalScope.DialogLibraries()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id181622398179079">lib_names = dlg_libs.getElementNames()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id461622398179232">svc.MsgBox("\n".join(lib_names))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id461622398179232">bas.MsgBox("\n".join(lib_names))</paragraph>
</pycode>
</section>
@ -547,7 +543,7 @@
<h2 id="hd_id181618br/905397758" localize="false">MsgBox</h2>
<paragraph role="paragraph" id="par_id231618922407948">Displays a dialog box containing a message and returns an optional value.<br/>MB_xx constants help specify the dialog type, the number and type of buttons to display, plus the icon type. By adding their respective values they form bit patterns, that define the <literal>MsgBox</literal> dialog appearance.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" id="par_id71618922431508" localize="false"><input>svc.MsgBox(prompt: str, [buttons: int], [title: str])[: int]</input></paragraph>
<paragraph role="paragraph" id="par_id71618922431508" localize="false"><input>bas.MsgBox(prompt: str, [buttons: int], [title: str])[: int]</input></paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<embed href="text/sbasic/shared/03010101.xhp#parameters"/>
<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
@ -567,7 +563,7 @@
<paragraph role="paragraph" id="par_id631619084685488" localize="false"><input>svc.Now(): datetime</input></paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id411619084749448">svc.MsgBox(svc.Now(), svc.MB_OK, "Now")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id411619084749448">bas.MsgBox(bas.Now(), bas.MB_OK, "Now")</paragraph>
</pycode>
</section>
@ -586,7 +582,7 @@
<paragraph role="paragraph" localize="false" id="par_id381619096830033">Integer</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id321619096903721">YELLOW = svc.RGB(255,255,0)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id321619096903721">YELLOW = bas.RGB(255,255,0)</paragraph>
</pycode>
</section>
@ -604,8 +600,8 @@
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id21622841338969">comp = svc.ThisComponent</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id781622841643538">svc.MsgBox("\n".join(comp.getSupportedServiceNames()))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id21622841338969">comp = bas.ThisComponent</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id781622841643538">bas.MsgBox("\n".join(comp.getSupportedServiceNames()))</paragraph>
</pycode>
</section>
@ -623,7 +619,7 @@
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id761622913418091">db_doc = svc.ThisDatabaseDocument</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id761622913418091">db_doc = bas.ThisDatabaseDocument</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id201622913418646">table_names = db_doc.DataSource.getTables().getElementNames()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id711622913418917">bas.MsgBox("\n".join(table_names))</paragraph>
</pycode>
@ -643,7 +639,7 @@
<paragraph role="paragraph" id="par_id21619094660345"><emph>obj</emph>: A variable or UNO object.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id751619095024401">svc.Xray(svc.StarDesktop)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id751619095024401">bas.Xray(bas.StarDesktop)</paragraph>
</pycode>
</section>

View File

@ -26,8 +26,8 @@
<section id="abstract">
<h1 id="hd_id731582733781114" xml-lang="en-US"><variable id="CalcService"><link href="text/sbasic/shared/03/sf_calc.xhp" name="Calc service"><literal>SFDocuments</literal>.<literal>Calc</literal> service</link></variable></h1>
<paragraph role="paragraph" id="par_id381589189355849" xml-lang="en-US">The <literal>SFDocuments</literal> shared library provides a number of methods and properties to facilitate the management and handling of %PRODUCTNAME documents.</paragraph>
<paragraph role="paragraph" id="par_id351591014177269" xml-lang="en-US">Some methods are generic for all types of documents and are inherited from the <literal>SF_Document</literal> module, whereas other methods that are specific for Calc documents are defined in the <literal>SF_Calc</literal> module.</paragraph>
<paragraph role="paragraph" id="par_id591589189364267" xml-lang="en-US">The <literal>SF_Calc</literal> module is focused on:</paragraph>
<paragraph role="paragraph" id="par_id351591014177269" xml-lang="en-US">The <literal>SFDocuments.Calc</literal> service is a subclass of the <link href="text/sbasic/shared/03/sf_document.xhp" name="SF_Document_link"><literal>SFDocuments.Document</literal></link> service. All methods and properties defined for the <literal>Document</literal> service can also be accessed using a <literal>Calc</literal> service instance.</paragraph>
<paragraph role="paragraph" id="par_id591589189364267" xml-lang="en-US">The <literal>Calc</literal> service is focused on:</paragraph>
<list type="unordered">
<listitem>
<paragraph id="par_id891589189452545" role="listitem" xml-lang="en-US">Handling sheets within a Calc document (copy, insert, move, etc)</paragraph>
@ -40,6 +40,7 @@
</listitem>
</list>
</section>
<note id="par_id851638217526844">This help page describes methods and properties that are applicable only to Calc documents.</note>
<h2 id="hd_id581582885621841" xml-lang="en-US">Service invocation</h2>
<paragraph role="paragraph" id="par_id591589191059889" xml-lang="en-US">The <literal>Calc</literal> service is closely related to the <literal>UI</literal> service of the <literal>ScriptForge</literal> library. Below are a few examples of how the <literal>Calc</literal> service can be invoked.</paragraph>
@ -74,11 +75,11 @@
<paragraph role="pycode" localize="false" id="pyc_id911621624242302">myDoc = CreateScriptService("Calc")</paragraph>
</pycode>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id201621531742824">svcUI = CreateScriptService("UI")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id661621531772444">myDoc = svcUI.CreateDocument("Calc")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id201621531742824">ui = CreateScriptService("UI")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id661621531772444">myDoc = ui.CreateDocument("Calc")</paragraph>
</pycode>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id401621531828705">myDoc = svcUI.OpenDocument(r"C:\Documents\MyFile.ods")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id401621531828705">myDoc = ui.OpenDocument(r"C:\Documents\MyFile.ods")</paragraph>
</pycode>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id701621532481401">myDoc = CreateScriptService("SFDocuments.Calc", "MyFile.ods")</paragraph>
@ -108,8 +109,8 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id561621533543160">docA = svcUI.OpenDocument(r"C:\Documents\FileA.ods", hidden = True, readonly = True)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id61621533637980">docB = svcUI.OpenDocument(r"C:\Documents\FileB.ods")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id561621533543160">docA = ui.OpenDocument(r"C:\Documents\FileA.ods", hidden = True, readonly = True)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id61621533637980">docB = ui.OpenDocument(r"C:\Documents\FileB.ods")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id941621533638353">docB.CopyToRange(docA.Range("SheetX.D4:F8"), "D2:F6")</paragraph>
</pycode>
@ -209,7 +210,7 @@
<paragraph id="par_id221591018408168" role="tablehead" xml-lang="en-US">Argument</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id31582885195238" role="tablehead" xml-lang="en-US">Type</paragraph>
<paragraph id="par_id31582885195238" role="tablehead" xml-lang="en-US">Return type</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id931582885195131" role="tablehead" xml-lang="en-US">Description</paragraph>
@ -229,7 +230,58 @@
<paragraph id="par_id59159240716522" role="tablecontent" xml-lang="en-US">String or array of strings</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id85159240716560" role="tablecontent" xml-lang="en-US">The single selected range as a string or the list of selected ranges as an array</paragraph>
<paragraph id="par_id85159240716560" role="tablecontent" xml-lang="en-US">The single selected range as a string or the list of selected ranges as an array.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id681592407165201" localize="false" role="tablecontent">FirstCell</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id301592407165606" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id81592407165545" role="tablecontent">SheetName or RangeName as String</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id59159240716378" localize="false" role="tablecontent">String</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id85159240716828" role="tablecontent">Returns the first used cell in a given range or sheet.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id681592407166918" localize="false" role="tablecontent">FirstColumn</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id301592407166642" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id81592407165145" role="tablecontent">SheetName or RangeName as String</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id59159240716125" localize="false" role="tablecontent">Long</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id85159240716225" role="tablecontent">Returns the leftmost column number in a given range or sheet.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id681592407169888" localize="false" role="tablecontent">FirstRow</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id301592407167972" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id81592407165695" role="tablecontent">SheetName or RangeName as String</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id59159240716663" localize="false" role="tablecontent">Long</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id85159240716128" role="tablecontent">Returns the topmost row number in a given range or sheet.</paragraph>
</tablecell>
</tablerow>
<tablerow>
@ -246,58 +298,58 @@
<paragraph id="par_id581593094953195" role="tablecontent" xml-lang="en-US" localize="false">Long</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id311593094953330" role="tablecontent" xml-lang="en-US">The number of rows (>= 1) in the given range</paragraph>
<paragraph id="par_id311593094953330" role="tablecontent" xml-lang="en-US">The number of rows (>= 1) in the given range.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id97158288519551" role="tablecontent" xml-lang="en-US" localize="false">LastCell</paragraph>
<paragraph id="par_id97158288519551" localize="false" role="tablecontent">LastCell</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id221582885195686" role="tablecontent" xml-lang="en-US">Yes</paragraph>
<paragraph id="par_id221582885195686" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id501591018870619" role="tablecontent" xml-lang="en-US">SheetName As String</paragraph>
<paragraph id="par_id501591018870619" role="tablecontent">SheetName or RangeName as String</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id371582885195525" role="tablecontent" xml-lang="en-US" localize="false">String</paragraph>
<paragraph id="par_id371582885195525" localize="false" role="tablecontent">String</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id881582885195976" role="tablecontent" xml-lang="en-US">The last used cell in 'A1' format in the given sheet</paragraph>
<paragraph id="par_id881582885195976" role="tablecontent">Returns the last used cell in a given range or sheet.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id261592315106411" role="tablecontent" xml-lang="en-US" localize="false">LastColumn</paragraph>
<paragraph id="par_id261592315106411" localize="false" role="tablecontent">LastColumn</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id601592315106598" role="tablecontent" xml-lang="en-US">Yes</paragraph>
<paragraph id="par_id601592315106598" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id831592315106202" role="tablecontent" xml-lang="en-US">SheetName As String</paragraph>
<paragraph id="par_id831592315106202" role="tablecontent">SheetName or RangeName as String</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id591592315106615" role="tablecontent" xml-lang="en-US" localize="false">Long</paragraph>
<paragraph id="par_id591592315106615" localize="false" role="tablecontent">Long</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id791592315106790" role="tablecontent" xml-lang="en-US">The last used column in the given sheet</paragraph>
<paragraph id="par_id791592315106790" role="tablecontent">The last used column in a given range or sheet.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id801591025591570" role="tablecontent" xml-lang="en-US" localize="false">LastRow</paragraph>
<paragraph id="par_id801591025591570" localize="false" role="tablecontent">LastRow</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id981591025591597" role="tablecontent" xml-lang="en-US">Yes</paragraph>
<paragraph id="par_id981591025591597" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id81591025591696" role="tablecontent" xml-lang="en-US">SheetName As String</paragraph>
<paragraph id="par_id81591025591696" role="tablecontent">SheetName or RangeName as String</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id61591025591572" role="tablecontent" xml-lang="en-US" localize="false">Long</paragraph>
<paragraph id="par_id61591025591572" localize="false" role="tablecontent">Long</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id421591025591509" role="tablecontent" xml-lang="en-US">The last used row in the given sheet</paragraph>
<paragraph id="par_id421591025591509" role="tablecontent">The last used row in a given range or sheet.</paragraph>
</tablecell>
</tablerow>
<tablerow>
@ -314,7 +366,7 @@
<paragraph id="par_id311591025591598" role="tablecontent" xml-lang="en-US" localize="false">Object</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id571591025591367" role="tablecontent" xml-lang="en-US">A range reference that can be used as argument of methods like <literal>CopyToRange</literal></paragraph>
<paragraph id="par_id571591025591367" role="tablecontent" xml-lang="en-US">A range reference that can be used as argument of methods like <literal>CopyToRange</literal>.</paragraph>
</tablecell>
</tablerow>
<tablerow>
@ -331,7 +383,7 @@
<paragraph id="par_id311591025591078" role="tablecontent" xml-lang="en-US" localize="false">String</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id571591025599937" role="tablecontent" xml-lang="en-US">Returns the address of the smallest area that contains the specified range so that the area is surrounded by empty cells or sheet edges. This is equivalent to applying the <keycode>Ctrl + *</keycode> shortcut to the given range.</paragraph>
<paragraph id="par_id571591025599937" role="tablecontent" xml-lang="en-US">Returns the address of the smallest area that contains the specified range so that the area is surrounded by empty cells or sheet edges. This is equivalent to applying the <switchinline select="sys"><caseinline select="MAC"><keycode>Command + *</keycode></caseinline><defaultinline><keycode>Ctrl + *</keycode></defaultinline></switchinline> shortcut to the given range.</paragraph>
</tablecell>
</tablerow>
<tablerow>
@ -348,7 +400,7 @@
<paragraph id="par_id101591025591982" role="tablecontent" xml-lang="en-US" localize="false">Object</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id731591025591753" role="tablecontent" xml-lang="en-US">A sheet reference that can be used as argument of methods like <literal>CopySheet</literal></paragraph>
<paragraph id="par_id731591025591753" role="tablecontent" xml-lang="en-US">A sheet reference that can be used as argument of methods like <literal>CopySheet</literal>.</paragraph>
</tablecell>
</tablerow>
<tablerow>
@ -365,7 +417,7 @@
<paragraph id="par_id861591025591250" role="tablecontent" xml-lang="en-US">Array of strings</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id491591025591370" role="tablecontent" xml-lang="en-US">The list with the names of all existing sheets</paragraph>
<paragraph id="par_id491591025591370" role="tablecontent" xml-lang="en-US">The list with the names of all existing sheets.</paragraph>
</tablecell>
</tablerow>
<tablerow>
@ -382,7 +434,7 @@
<paragraph id="par_id761593095062827" role="tablecontent" xml-lang="en-US" localize="false">Long</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id681593095062358" role="tablecontent" xml-lang="en-US">The number of columns (>= 1) in the given range</paragraph>
<paragraph id="par_id681593095062358" role="tablecontent" xml-lang="en-US">The number of columns (>= 1) in the given range.</paragraph>
</tablecell>
</tablerow>
<tablerow>
@ -399,12 +451,12 @@
<paragraph id="par_id7715923154041" role="tablecontent" xml-lang="en-US" localize="false">Object</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id321592315404430" role="tablecontent" xml-lang="en-US">A <literal>com.sun.star.Table.XCellRange</literal> UNO object</paragraph>
<paragraph id="par_id321592315404430" role="tablecontent" xml-lang="en-US">A <literal>com.sun.star.Table.XCellRange</literal> UNO object.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id961592315565332" role="tablecontent">XSheetCellCursor</paragraph>
<paragraph id="par_id961592315565332" role="tablecontent" localize="false">XSheetCellCursor</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id501592315567199" role="tablecontent">Yes</paragraph>
@ -433,12 +485,12 @@
<paragraph id="par_id521592315565269" role="tablecontent" xml-lang="en-US" localize="false">Object</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id41592315560095" role="tablecontent" xml-lang="en-US">A <literal>com.sun.star.sheet.XSpreadsheet</literal> UNO object</paragraph>
<paragraph id="par_id41592315560095" role="tablecontent" xml-lang="en-US">A <literal>com.sun.star.sheet.XSpreadsheet</literal> UNO object.</paragraph>
</tablecell>
</tablerow>
</table>
<tip id="par_id321611613059105">Visit LibreOffice API Documentation's website to learn more about <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1table_1_1XCellRange.html" name="XCellRange API">XCellRange</link>, <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1sheet_1_1XSheetCellCursor.html" name="XSheetCellCursor API">XSheetCellCursor</link> and <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1sheet_1_1XSpreadsheet.html" name="XSpreadsheet API">XSpreadsheet</link> UNO objects.</tip>
<tip id="par_id321611613059105">Visit %PRODUCTNAME API Documentation's website to learn more about <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1table_1_1XCellRange.html" name="XCellRange API">XCellRange</link>, <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1sheet_1_1XSheetCellCursor.html" name="XSheetCellCursor API">XSheetCellCursor</link> and <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1sheet_1_1XSpreadsheet.html" name="XSpreadsheet API">XSpreadsheet</link> UNO objects.</tip>
<h2 id="hd_id501582887473754" xml-lang="en-US">Methods</h2>
<table id="tab_id501611613601554">
@ -459,13 +511,13 @@
<link href="text/sbasic/shared/03/sf_calc.xhp#CopyToCell" name="CopyToCell method">CopyToCell</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#CopyToRange" name="CopyToRange method">CopyToRange</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#CreateChart" name="CreateChart method">CreateChart</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#DAvg" name="DAvg method">DAvg</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#DAvg" name="DCount method">DCount</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#DAvg" name="DMax method">DMax</link><br/>
</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id541611613601554" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_calc.xhp#DAvg" name="DAvg method">DAvg</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#DAvg" name="DCount method">DCount</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#DAvg" name="DMax method">DMax</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#DAvg" name="DMin method">DMin</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#DAvg" name="DSum method">DSum</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#Forms" name="Forms method">Forms</link><br/>
@ -474,22 +526,28 @@
<link href="text/sbasic/shared/03/sf_calc.xhp#GetValue" name="GetValue method">GetValue</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#ImportFromCSVFile" name="ImportFromCSVFile method">ImportFromCSVFile</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#ImportFromDatabase" name="ImportFromDatabase method">ImportFromDatabase</link><br/>
</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id701611613601554" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_calc.xhp#InsertSheet" name="InsertSheet method">InsertSheet</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#MoveRange" name="MoveRange method">MoveRange</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#MoveSheet" name="MoveSheet method">MoveSheet</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#Offset" name="Offset method">Offset</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#OpenRangeSelector" name="OpenRangeSelector method">OpenRangeSelector</link><br/><br/>
</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id701611613601554" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_calc.xhp#PrintOut" name="PrintOut method">PrintOut</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#Printf" name="Printf method">Printf</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#RemoveSheet" name="RemoveSheet method">RemoveSheet</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#RenameSheet" name="RenameSheet method">RenameSheet</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#SetArray" name="SetArray method">SetArray</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#SetValue" name="SetValue method">SetValue</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#SetCellStyle" name="SetCellStyle method">SetCellStyle</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#SetFormula" name="SetFormula method">SetFormula</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#SortRange" name="SortRange method">SortRange</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#ShiftDown" name="ShiftDown method">ShiftDown</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#ShiftLeft" name="ShiftLeft method">ShiftLeft</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#ShiftRight" name="ShiftRight method">ShiftRight</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#ShiftUp" name="ShiftUp method">ShiftUp</link><br/>
<link href="text/sbasic/shared/03/sf_calc.xhp#SortRange" name="SortRange method">SortRange</link><br/><br/>
</paragraph>
</tablecell>
</tablerow>
@ -558,8 +616,8 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id321621534175071">svcUI = CreateScriptService("UI")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id971621534192346">myDoc = svcUI.GetDocument(svcUI.ActiveWindow)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id321621534175071">ui = CreateScriptService("UI")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id971621534192346">myDoc = ui.GetDocument(ui.ActiveWindow)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id21621534237588">myDoc.Activate("Sheet4")</paragraph>
</pycode>
<tip id="par_id501611617808220">Activating a sheet makes sense only if it is performed on a Calc document. To make sure you have a Calc document at hand you can use the <literal>isCalc</literal> property of the document object, which returns <literal>True</literal> if it is a Calc document and <literal>False</literal> otherwise.</tip>
@ -571,7 +629,7 @@
<bookmark_value>Calc service;Charts</bookmark_value>
</bookmark>
<h2 id="hd_id201589199698104" localize="false">Charts</h2>
<paragraph role="paragraph" id="par_id93158919969856">Returns either the list with the names of all chart objects in a given sheet or a single chart service instance.</paragraph>
<paragraph role="paragraph" id="par_id93158919969856">Returns either the list with the names of all chart objects in a given sheet or a single <literal>Chart</literal> service instance.</paragraph>
<list type="unordered">
<listitem>
<paragraph id="par_id371635438503202" role="listitem">If only <literal>sheetname</literal> is specified, an zero-based array of strings containing the names of all charts is returned.</paragraph>
@ -587,7 +645,7 @@
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id821591631205026"><emph>sheetname</emph>: The name of the sheet from which the list of charts is to be retrieved or where the specified chart is located.</paragraph>
<paragraph role="paragraph" id="par_id821591631203566"><emph>chartname</emph>: The user-defined name of the chart object to be returned. If the chart does not have a user-defined name, then the internal object name can be used. If this argument is absent, then the list of chart names in the specified sheet is returned.</paragraph>
<tip id="par_id431635438771588">Use the <menuitem>Navigator</menuitem> sidebar to check the names assigned to charts under the <menuitem>OLE objects</menuitem> category.</tip>
<tip id="par_id431635438771588">Use the <menuitem>Navigator</menuitem> sidebar to check the names assigned to charts under the <menuitem>OLE objects</menuitem> category.</tip>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<paragraph role="paragraph" id="par_id41635439328174">The example below shows the number of chart objects in "Sheet1".</paragraph>
@ -721,8 +779,8 @@
<paragraph role="pycode" localize="false" id="pyc_id741621537296168">myDoc.CopySheet("SheetX", "SheetY")</paragraph>
</pycode>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id761621537335378">docA = svcUI.OpenDocument(r"C:\Documents\FileA.ods", hidden = True, readonly = True)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id801621537405452">docB = svcUI.OpenDocument(r"C:\Documents\FileB.ods")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id761621537335378">docA = ui.OpenDocument(r"C:\Documents\FileA.ods", hidden = True, readonly = True)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id801621537405452">docB = ui.OpenDocument(r"C:\Documents\FileB.ods")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id361621537425882">docB.CopySheet(docA.Sheet("SheetX"), "SheetY")</paragraph>
</pycode>
<tip id="par_id801595695285478" xml-lang="en-US">To copy sheets between <emph>open</emph> documents, use <literal>CopySheet</literal>. To copy sheets from documents that are <emph>closed</emph>, use <literal>CopySheetFromFile</literal>.</tip>
@ -792,7 +850,7 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id531621538188012">docSource = svcUI.OpenDocument(r"C:\Documents\SourceFile.ods", hidden = True, readonly = True)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id531621538188012">docSource = ui.OpenDocument(r"C:\Documents\SourceFile.ods", hidden = True, readonly = True)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id741621538288187">docDestination = CreateScriptService("Calc")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id691621538280854">docDestination.CopyToCell(docSource.Range("Sheet1.C2:C4"), "SheetT.A5")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id361621538357798">docSource.CloseDocument()</paragraph>
@ -842,8 +900,8 @@
<paragraph role="pycode" localize="false" id="pyc_id761621538667290">doc.CopyToRange("SheetX.A1:F10", "SheetY.C5:J5")</paragraph>
</pycode>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id531621538188957">docA = svcUI.OpenDocument(r"C:\Documents\FileA.ods", hidden = True, readonly = True)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id741621538288785">docB = svcUI.OpenDocument(r"C:\Documents\FileB.ods")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id531621538188957">docA = ui.OpenDocument(r"C:\Documents\FileA.ods", hidden = True, readonly = True)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id741621538288785">docB = ui.OpenDocument(r"C:\Documents\FileB.ods")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id691621538288954">docB.CopyToRange(docA.Range("SheetX.A1:F10"), "SheetY.C5:J5")</paragraph>
</pycode>
</section>
@ -985,8 +1043,8 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id661621539873908">sBasic = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id901621540022229">sBasic.MsgBox(myDoc.GetColumnName(3))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id661621539873908">bas = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id901621540022229">bas.MsgBox(myDoc.GetColumnName(3))</paragraph>
</pycode>
<note id="par_id451611753568778">The maximum number of columns allowed on a Calc sheet is 1024.</note>
</section>
@ -1205,7 +1263,7 @@
</section>
<section id="Offset">
<comment> Offset -------------------------------------------------------------------------------------------------------------------------- </comment>
<comment> Offset ------------------------------------------------------------------------------------------------ </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id29159223350681">
<bookmark_value>Calc service;Offset</bookmark_value>
</bookmark>
@ -1239,13 +1297,116 @@
</pycode>
</section>
<section id="OpenRangeSelector">
<comment> OpenRangeSelector ------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id29159223350681">
<bookmark_value>Calc service;OpenRangeSelector</bookmark_value>
</bookmark>
<h2 id="hd_id61592233506804" localize="false">OpenRangeSelector</h2>
<paragraph role="paragraph" id="par_id51592233506021">Opens a non-modal dialog that can be used to select a range in the document and returns a string containing the selected range.</paragraph>
<note id="par_id301637936295380">This method opens the same dialog that is used by %PRODUCTNAME when the Shrink button is pressed. For example, the <menuitem>Tools - Goal Seek</menuitem> dialog has a Shrink button to the right of the <menuitem>Formula cell</menuitem> field.</note>
<paragraph role="paragraph" id="par_id551637936545121">This method does not change the current selection.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id301621620394202">
<input>svc.OpenRangeSelector(opt title: str, opt selection: str, singlecell: bool = False, closeafterselect: bool = True): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id901592233506001"><emph>title</emph>: The title of the dialog, as a string.</paragraph>
<paragraph role="paragraph" id="par_id781592234124502"><emph>selection</emph>: An optional range that is initially selected when the dialog is displayed.</paragraph>
<paragraph role="paragraph" id="par_id971592234138989"><emph>singlecell</emph>: When <literal>True</literal> (default) only single-cell selection is allowed. When <literal>False</literal> range selection is allowed.</paragraph>
<paragraph role="paragraph" id="par_id321592234150345"><emph>closeafterselect</emph>: When <literal>True</literal> (default) the dialog is closed immediately after the selection is made. When <literal>False</literal> the user can change the selection as many times as needed and then manually close the dialog.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id131637937486802">Dim sRange as String</paragraph>
<paragraph role="bascode" localize="false" id="bas_id331637937487031">sRange = oDoc.OpenRangeSelector(Title := "Select a range")</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id181621620341364">sRange = myDoc.OpenRangeSelector(title = "Select a range")</paragraph>
</pycode>
</section>
<section id="Printf">
<comment> Printf ------------------------------------------------------------------------------------------------ </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id29159223356581">
<bookmark_value>Calc service;Printf</bookmark_value>
</bookmark>
<h2 id="hd_id61592233503364" localize="false">Printf</h2>
<paragraph role="paragraph" id="par_id51592233503441">Returns the input string after substituting its token characters by their values in a given range.</paragraph>
<paragraph role="paragraph" id="par_id551637936596521">This method does not change the current selection.</paragraph>
<tip id="par_id171637938442558">This method can be used to quickly extract specific parts of a range name, such as the sheet name or first cell column and row, and use them to compose a new range address.</tip>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id301621620394154">
<input>svc.Printf(inputstr: str, range: str, tokencharacter: str = "%"): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id901592233506232"><emph>inputstr</emph>: The string containing the tokens that will be replaced by the corresponding values in <literal>range</literal>.</paragraph>
<paragraph role="paragraph" id="par_id781592234161102"><emph>range</emph>: A <literal>RangeName</literal> from which values will be extracted. If it contains a sheet name, the sheet must exist.</paragraph>
<paragraph role="paragraph" id="par_id971592234102889"><emph>tokencharacter</emph>: Character used to identify tokens. By default "%" is the token character. The following tokens are accepted:</paragraph>
<list type="unordered">
<listitem>
<paragraph id="par_id261637943912156" role="listitem"><emph>%S</emph> - The sheet name containing the range, including single quotes when necessary.</paragraph>
</listitem>
<listitem>
<paragraph id="par_id441637943912380" role="listitem"><emph>%R1</emph> - The row number of the top left cell of the range.</paragraph>
</listitem>
<listitem>
<paragraph id="par_id521637943912620" role="listitem"><emph>%C1</emph> - The column letter of the top left cell of the range.</paragraph>
</listitem>
<listitem>
<paragraph id="par_id371637943912860" role="listitem"><emph>%R2</emph> - The row number of the bottom right cell of the range.</paragraph>
</listitem>
<listitem>
<paragraph id="par_id291637943913116" role="listitem"><emph>%C2</emph> - The column letter of the bottom right cell of the range.</paragraph>
</listitem>
</list>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<paragraph role="paragraph" id="par_id941637943467476">The example below extracts each element of the <literal>RangeName</literal> defined in <literal>sRange</literal> and uses them to compose a message.</paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id491637943243426">Dim sRange as String, sInputStr as String</paragraph>
<paragraph role="bascode" localize="false" id="bas_id921637943243610">sRange = "Sheet1.A1:E10"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id991637943243818">sInputStr = "Sheet name: %S" &amp; Chr(10) &amp; _</paragraph>
<paragraph role="bascode" localize="false" id="bas_id516379432447042"> "First row: %R1" &amp; Chr(10) &amp; _</paragraph>
<paragraph role="bascode" localize="false" id="bas_id851637943244258"> "First column %C1" &amp; Chr(10) &amp; _</paragraph>
<paragraph role="bascode" localize="false" id="bas_id911637943244486"> "Last row %R2" &amp; Chr(10) &amp; _</paragraph>
<paragraph role="bascode" localize="false" id="bas_id121637943244706"> "Last column %C2"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id821637943244894">MsgBox oDoc.Printf(sInputStr, sRange)</paragraph>
</bascode>
<paragraph role="paragraph" id="par_id241637944350648">The <literal>Printf</literal> method can be combined with <literal>SetFormula</literal> to create formulas over multiple cells. For instance, consider a table with numeric values in the range "A1:E10" from which formulas are to be created to sum the values in each row and place the results in the range "F1:F10":</paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id631637944876589">Dim sFormula as String, sRange as String</paragraph>
<paragraph role="bascode" localize="false" id="bas_id281637944876820">sRange = "A1:E10"</paragraph>
<paragraph role="bascode" id="bas_id371637944971921">' Note the use of the "$" character</paragraph>
<paragraph role="bascode" localize="false" id="bas_id711637944876998">sFormula = "=SUM($%C1%R1:$%C2%R1)"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id931637944877188">oDoc.SetFormula("F1:F10", oDoc.Printf(sFormula, sRange))</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id161637943523364">sRange = "Sheet1.A1:E10"</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id951637943523582">sInputStr = "Sheet name: %S\n" \</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id301637943523764"> "First row: %R1\n" \</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id631637943523987"> "First column %C1\n" \</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id731637943524196"> "Last row %R2\n" \</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id516379435243888"> "Last column %C2"</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id511637943524613">bas = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id216379435248836">bas.MsgBox(myDoc.Printf(sInputStr, sRange))</paragraph>
</pycode>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id681637944943446">sRange = "A1:E10</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id851637944943797">sFormula = "=SUM($%C1%R1:$%C2%R1)"</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id911637944944046">myDoc.SetFormula("F1:F10", myDoc.Printf(sFormula, sRange))</paragraph>
</pycode>
</section>
<section id="PrintOut">
<comment> PrintOut ---------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id721985200121249">
<bookmark_value>Calc service;PrintOut</bookmark_value>
</bookmark>
<h2 id="hd_id261589202101415" localize="false">PrintOut</h2>
<paragraph role="paragraph" id="par_id156589200121138">This method sends the content of the given sheet to a default printer or a printer defined by the <literal>SetPrinter()</literal> method of the <literal>Document</literal> Service.</paragraph>
<paragraph role="paragraph" id="par_id156589200121138">This method sends the contents of the given sheet to the default printer or to the printer defined by the <literal>SetPrinter</literal> method of the <literal>Document</literal> service.</paragraph>
<paragraph role="paragraph" id="par_id981611169416934">Returns <literal>True</literal> if the sheet was successfully printed.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id1001622827822169">
@ -1254,7 +1415,7 @@
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id368519200121646"><emph>sheetname</emph>: The sheet to print, default is the active sheet.</paragraph>
<paragraph role="paragraph" id="par_id211635436910093"><emph>pages</emph>: The pages to print as a string, like in the user interface. Example: &quot;1-4;10;15-18&quot;. Default is all pages.</paragraph>
<paragraph role="paragraph" id="par_id141635436912146"><emph>copies</emph><emph></emph>: The number of copies. Default is 1.</paragraph>
<paragraph role="paragraph" id="par_id141635436912146"><emph>copies</emph>: The number of copies. Default is 1.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
@ -1472,6 +1633,155 @@
</pycode>
</section>
<section id="ShiftDown">
<comment> ShiftDown --------------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id231593880376104">
<bookmark_value>Calc service;ShiftDown</bookmark_value>
</bookmark>
<h2 id="hd_id191593880376667" localize="false">ShiftDown</h2>
<paragraph role="paragraph" id="par_id481593880373070">Moves a given range of cells downwards by inserting empty rows. The current selection is not affected.</paragraph>
<paragraph role="paragraph" id="par_id801637929435655">Depending on the value of the <literal>wholerows</literal> argument the inserted rows can either span the width of the specified range or span all columns in the row.</paragraph>
<paragraph role="paragraph" id="par_id711593880370247" xml-lang="en-US">This method returns a string representing the new location of the initial range.</paragraph>
<note id="par_id811637929284110">If the shifted range exceeds the sheet edges, then nothing happens.</note>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id701621623022250">
<input>svc.ShiftDown(range: str, wholerow: bool = False, opt rows: int): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id891593880376123"><emph>range</emph>: The range above which rows will be inserted, as a string.</paragraph>
<paragraph role="paragraph" id="par_id941593880376566"><emph>wholerow</emph>: If set to <literal>False</literal> (default), then the width of the inserted rows will be the same as the width of the specified <literal>range</literal>. Otherwise, the inserted row will span all columns in the sheet.</paragraph>
<paragraph role="paragraph" id="par_id551593880373045"><emph>rows</emph>: The number of rows to be inserted. The default value is the height of the original <literal>range</literal>. The number of rows must be a positive number.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" id="bas_id881637931053547">' Moves the range "A3:D3" down by one row; affects only columns A to D</paragraph>
<paragraph role="bascode" localize="false" id="bas_id791637931053747">oDoc.ShiftDown("A3:D3")</paragraph>
<paragraph role="bascode" id="bas_id661637931232893">' The inserted row spans all columns in the sheet</paragraph>
<paragraph role="bascode" localize="false" id="bas_id741637931233093">oDoc.ShiftDown("A3:D3", WholeRow := True)</paragraph>
<paragraph role="bascode" id="bas_id291637931053897">' Moves the range "A3:D3" down by five rows</paragraph>
<paragraph role="bascode" localize="false" id="bas_id91637931054041">oDoc.ShiftDown("A3:D3", Rows := 5)</paragraph>
<paragraph role="bascode" id="bas_id501638218784265">' Moves the range "A3:D10" down by two rows and shows the new location of the original range</paragraph>
<paragraph role="bascode" localize="false" id="bas_id391638218784528">Dim sNewRange as String</paragraph>
<paragraph role="bascode" localize="false" id="bas_id761638218784697">sNewRange = oDoc.ShiftDown("A3:D10", Rows := 2)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id291638218784864">MsgBox sNewRange ' $Sheet1.$A$5:$D$12</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id941621623159122">myDoc.ShiftDown("A3:D3")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id651621623174886">myDoc.ShiftDown("A3:D3", wholerow = True)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id151621623174257">myDoc.ShiftDown("A3:D3", rows = 5)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id651621623174060">sNewRange = myDoc.ShiftDown("A3:D10", rows = 2)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id621638218996706">bas = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id151638218996938">bas.MsgBox(sNewRange)</paragraph>
</pycode>
</section>
<section id="ShiftLeft">
<comment> ShiftLeft --------------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id231593880376547">
<bookmark_value>Calc service;ShiftLeft</bookmark_value>
</bookmark>
<h2 id="hd_id191593880373026" localize="false">ShiftLeft</h2>
<paragraph role="paragraph" id="par_id481593880376255">Deletes the leftmost columns of a given range and moves to the left all cells to the right of the affected range. The current selection is not affected.</paragraph>
<paragraph role="paragraph" id="par_id801637929460261">Depending on the value of the <literal>wholecolumns</literal> argument the deleted columns can either span the height of the specified range or span all rows in the column.</paragraph>
<paragraph role="paragraph" id="par_id711593880371259" xml-lang="en-US">This method returns a string representing the location of the remaining portion of the initial range. If all cells in the original range have been deleted, then an empty string is returned.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id701621623026330">
<input>svc.ShiftLeft(range: str, wholecolumn: bool = False, opt columns: int): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id891593880376205"><emph>range</emph>: The range from which cells will be deleted, as a string.</paragraph>
<paragraph role="paragraph" id="par_id941593880356026"><emph>wholecolumn</emph>: If set to <literal>False</literal> (default), then the height of the deleted columns will be the same as the height of the specified <literal>range</literal>. Otherwise, the deleted columns will span all rows in the sheet.</paragraph>
<paragraph role="paragraph" id="par_id551593880373306"><emph>columns</emph>: The number of columns to be deleted from the specified <literal>range</literal>. The default value is the width of the original <literal>range</literal>, which is also the maximum value of this argument.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" id="bas_id881637931064919">' Deletes the range "B3:B6"; moves left all cells to the right</paragraph>
<paragraph role="bascode" localize="false" id="bas_id791637931033877">oDoc.ShiftLeft("B3:B6")</paragraph>
<paragraph role="bascode" id="bas_id291637931056991">' Deletes the first column in the range "A3:D6"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id916379310515507">oDoc.ShiftLeft("A3:D6", Columns := 1)</paragraph>
<paragraph role="bascode" id="bas_id661637931232569">' The deleted columns (A to D) spans all rows in the sheet</paragraph>
<paragraph role="bascode" localize="false" id="bas_id741637931230274">oDoc.ShiftLeft("A3:D6", WholeColumn := True)</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id941621623156582">myDoc.ShiftLeft("B3:B6")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id151621623155447">myDoc.ShiftLeft("A3:D6", Columns = 1)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id651621623172116">myDoc.ShiftLeft("A3:D6", WholeColumn = True)</paragraph>
</pycode>
</section>
<section id="ShiftUp">
<comment> ShiftUp ----------------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id231593880376104">
<bookmark_value>Calc service;ShiftUp</bookmark_value>
</bookmark>
<h2 id="hd_id191593880370547" localize="false">ShiftUp</h2>
<paragraph role="paragraph" id="par_id481593880373529">Deletes the topmost rows of a given range and moves upwards all cells below the affected range. The current selection is not affected.</paragraph>
<paragraph role="paragraph" id="par_id801637929435361">Depending on the value of the <literal>wholerows</literal> argument the deleted rows can either span the width of the specified range or span all columns in the row.</paragraph>
<paragraph role="paragraph" id="par_id711593880370299" xml-lang="en-US">This method returns a string representing the location of the remaining portion of the initial range. If all cells in the original range have been deleted, then an empty string is returned.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id701621623026380">
<input>svc.ShiftUp(range: str, wholerow: bool = False, opt rows: int): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id891593880376583"><emph>range</emph>: The range from which cells will be deleted, as a string.</paragraph>
<paragraph role="paragraph" id="par_id941593880300966"><emph>wholerow</emph>: If set to <literal>False</literal> (default), then the width of the deleted rows will be the same as the width of the specified <literal>range</literal>. Otherwise, the deleted row will span all columns in the sheet.</paragraph>
<paragraph role="paragraph" id="par_id551593880373265"><emph>rows</emph>: The number of rows to be deleted from the specified <literal>range</literal>. The default value is the height of the original <literal>range</literal>, which is also the maximum value of this argument.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" id="bas_id881637931064667">' Deletes the range "A3:D3"; moves all cells below it by one row up</paragraph>
<paragraph role="bascode" localize="false" id="bas_id791637931056477">oDoc.ShiftUp("A3:D3")</paragraph>
<paragraph role="bascode" id="bas_id291637931056647">' Deletes the first row in the range "A3:D6"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id91637931054337">oDoc.ShiftUp("A3:D6", Rows := 1)</paragraph>
<paragraph role="bascode" id="bas_id661637931232493">' The deleted rows spans all columns in the sheet</paragraph>
<paragraph role="bascode" localize="false" id="bas_id741637931233634">oDoc.ShiftUp("A3:D6", WholeRow := True)</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id941621623150252">myDoc.ShiftUp("A3:D3")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id151621623176647">myDoc.ShiftUp("A3:D6", rows = 1)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id651621623174036">myDoc.ShiftUp("A3:D6", wholerow = True)</paragraph>
</pycode>
</section>
<section id="ShiftRight">
<comment> ShiftRight --------------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id231593880376025">
<bookmark_value>Calc service;ShiftRight</bookmark_value>
</bookmark>
<h2 id="hd_id191593880376547" localize="false">ShiftRight</h2>
<paragraph role="paragraph" id="par_id481593880372568">Moves a given range of cells to the right by inserting empty columns. The current selection is not affected.</paragraph>
<paragraph role="paragraph" id="par_id801637929335255">Depending on the value of the <literal>wholecolumns</literal> argument the inserted columns can either span the height of the specified range or span all rows in the column.</paragraph>
<paragraph role="paragraph" id="par_id711593880372560" xml-lang="en-US">This method returns a string representing the new location of the initial range.</paragraph>
<note id="par_id811637929283210">If the shifted range exceeds the sheet edges, then nothing happens.</note>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id701621623022269">
<input>svc.ShiftRight(range: str, wholecolumn: bool = False, opt columns: int): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id891593880370543"><emph>range</emph>: The range which will have empty columns inserted to its left, as a string.</paragraph>
<paragraph role="paragraph" id="par_id941593880373316"><emph>wholecolumn</emph>: If set to <literal>False</literal> (default), then the height of the inserted columns will be the same as the height of the specified <literal>range</literal>. Otherwise, the inserted columns will span all rows in the sheet.</paragraph>
<paragraph role="paragraph" id="par_id5515938803791960"><emph>columns</emph>: The number of columns to be inserted. The default value is the width of the original <literal>range</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" id="bas_id881637931052587">' Moves the range "A3:A6" right by one column; affects only rows 3 to 6</paragraph>
<paragraph role="bascode" localize="false" id="bas_id791637931053646">oDoc.ShiftRight("A3:A6")</paragraph>
<paragraph role="bascode" id="bas_id291637931053225">' Moves the range "A3:A6" right by five columns</paragraph>
<paragraph role="bascode" localize="false" id="bas_id916379310503221">oDoc.ShiftRight("A3:A6", Columns := 5)</paragraph>
<paragraph role="bascode" id="bas_id661637931232548">' The inserted column spans all rows in the sheet</paragraph>
<paragraph role="bascode" localize="false" id="bas_id741637931330323">oDoc.ShiftRight("A3:A6", WholeColumn := True)</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id941621623155669">myDoc.ShiftRight("A3:A6")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id151621623174603">myDoc.ShiftRight("A3:A6", columns = 5)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id651621623174751">myDoc.ShiftRight("A3:A6", wholecolumn = True)</paragraph>
</pycode>
</section>
<section id="SortRange">
<comment> SortRange -------------------------------------------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id531595692394747">

View File

@ -152,7 +152,7 @@
</tablecell>
<tablecell>
<paragraph id="par_id541600788076645" role="tablecontent">Specifies if the chart is displayed with 3D elements. If the value is a string, it must be either "Bar", "Cylinder", "Cone" or "Pyramid".</paragraph>
<paragraph id="par_id541600788076141" role="tablecontent">If the boolean <literal>True</literal> value is specified, than the chart is displayed using 3D bars.</paragraph>
<paragraph id="par_id541600788076141" role="tablecontent">If the boolean <literal>True</literal> value is specified, then the chart is displayed using 3D bars.</paragraph>
</tablecell>
</tablerow>
<tablerow>
@ -177,7 +177,7 @@
<paragraph id="par_id561633021747903" role="tablecontent">No</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id201633021748455" role="tablecontent">Boolean</paragraph>
<paragraph id="par_id201633021748455" localize="false" role="tablecontent">Boolean</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id831633021749007" role="tablecontent">When <literal>True</literal>, specifies a filled net chart. Applicable to net charts only.</paragraph>

View File

@ -287,12 +287,12 @@
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id641625700473857">myDB = CreateScriptService("Database", "/home/user/Databases/Employees.odb")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id611625700474124">svc = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id991625700474287">svc.MsgBox(myDB.DCount("[ID]", "EmployeeData"))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id321625700474470">svc.MsgBox(myDB.DSum("[Salary]", "EmployeeData"))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id811625700474663">svc.MsgBox(myDB.DCount("[ID]", "EmployeeData", "[Position] = 'Manager'"))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id421625700474895">svc.MsgBox(myDB.DCount("[ID]", "EmployeeData", "[Position] = 'Sales' AND [City] = 'Chicago'"))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id441625700475239">svc.MsgBox(myDB.DCount("[ID]", "EmployeeData", "[FirstName] LIKE 'Paul%'"))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id611625700474124">bas = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id991625700474287">bas.MsgBox(myDB.DCount("[ID]", "EmployeeData"))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id321625700474470">bas.MsgBox(myDB.DSum("[Salary]", "EmployeeData"))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id811625700474663">bas.MsgBox(myDB.DCount("[ID]", "EmployeeData", "[Position] = 'Manager'"))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id421625700474895">bas.MsgBox(myDB.DCount("[ID]", "EmployeeData", "[Position] = 'Sales' AND [City] = 'Chicago'"))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id441625700475239">bas.MsgBox(myDB.DCount("[ID]", "EmployeeData", "[FirstName] LIKE 'Paul%'"))</paragraph>
</pycode>
</section>
@ -322,10 +322,10 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id151625701420880">svc = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id181625701421328">svc.MsgBox(myDB.DLookup("[FirstName]", "EmployeeData", criteria = "[LastName] LIKE 'Smith'", orderclause = "[FirstName] DESC"))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id801625701421784">svc.MsgBox(myDB.DLookup("[Salary]", "EmployeeData", criteria = "[ID] = '3'"))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id551625701422176">svc.MsgBox(myDB.DLookup("[Quantity] * [Value]", "Sales", criteria = "[SaleID] = '5014'"))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id151625701420880">bas = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id181625701421328">bas.MsgBox(myDB.DLookup("[FirstName]", "EmployeeData", criteria = "[LastName] LIKE 'Smith'", orderclause = "[FirstName] DESC"))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id801625701421784">bas.MsgBox(myDB.DLookup("[Salary]", "EmployeeData", criteria = "[ID] = '3'"))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id551625701422176">bas.MsgBox(myDB.DLookup("[Quantity] * [Value]", "Sales", criteria = "[SaleID] = '5014'"))</paragraph>
</pycode>
</section>

View File

@ -251,7 +251,6 @@
</tablerow>
</table>
<h2 id="hd_id421612628828054" xml-lang="en-US">Event properties</h2>
<embed href="text/sbasic/shared/03/avail_release.xhp#7.2.events"/>
<paragraph role="paragraph" id="par_id41612629140856" xml-lang="en-US">Returns a URI string with the reference to the script triggered by the event. Read its specification in the <link href="https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Scripting_Framework_URI_Specification" name="URI specification">scripting framework URI specification</link>.</paragraph>
<table id="tab_id951612628879819">
<tablerow>
@ -392,11 +391,13 @@
<link href="text/sbasic/shared/03/sf_dialog.xhp#Execute" name="Execute method">Execute</link><br/>
</paragraph></tablecell>
<tablecell><paragraph id="par_id161606472825856" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_dialog.xhp#Terminate" name="Terminate method">Terminate</link><br/>
<link href="text/sbasic/shared/03/sf_dialog.xhp#GetTextsFromL10N" name="GetTextsFromL10N method">GetTextsFromL10N</link><br/>
<link href="text/sbasic/shared/03/sf_dialog.xhp#Terminate" name="Terminate method">Terminate</link><br/>
</paragraph></tablecell>
</tablerow>
</table>
<section id="Activate">
<section id="Activate">
<comment> Activate -------------------------------------------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id721583933076548">
<bookmark_value>Dialog service;Activate</bookmark_value>
@ -404,9 +405,9 @@
<h2 id="hd_id681583933076692" localize="false">Activate</h2>
<paragraph role="paragraph" id="par_id871583933076448">Set the focus on the current <literal>Dialog</literal> instance. Return <literal>True</literal> if focusing was successful.</paragraph>
<paragraph role="paragraph" id="par_id151598178880227" xml-lang="en-US">This method is called from a dialog or control event, or when a dialog is displayed in non-modal mode.</paragraph>
<h3 id="hd_id61583933076171" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id581619625572111"><input>svc.Activate(): bool</input></paragraph>
<h3 id="hd_id26158393307687" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id221598179105596">Dim oDlg As Object</paragraph>
<paragraph role="bascode" localize="false" id="bas_id171598179111121">Set oDlg = CreateScriptService(,, "myDialog")</paragraph>
@ -421,9 +422,10 @@
<paragraph role="pycode" localize="false" id="pyc_id781620108954143"># ...</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id391619626869458">dlg.Activate()</paragraph>
</pycode>
</section>
<section id="Controls">
<comment> Controls -------------------------------------------------------------------------------------------------------------------------- </comment>
</section>
<section id="Controls">
<comment> Controls -------------------------------------------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id41584541257826">
<bookmark_value>Dialog service;Controls</bookmark_value>
</bookmark>
@ -437,12 +439,12 @@
<paragraph id="par_id81598185229301" role="listitem" xml-lang="en-US">a <literal>DialogControl</literal> class instance based on its name</paragraph>
</listitem>
</list>
<h3 id="hd_id601584541257443" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id81619625753895"><input>svc.Controls(): str[0..*]</input></paragraph>
<paragraph role="paragraph" localize="false" id="par_id61819625753598"><input>svc.Controls(controlname: str): svc</input></paragraph>
<h3 id="hd_id291584541257237" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id1001584541257789"><emph>ControlName</emph> : A valid control name as a case-sensitive string. If absent, the list of control names is returned as a zero-based array.</paragraph>
<h3 id="hd_id32158454125769" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id151598185478904">Dim myDialog As Object, myList As Variant, myControl As Object</paragraph>
<paragraph role="bascode" localize="false" id="bas_id21598185484092">Set myDialog = CreateScriptService("SFDialogs.Dialog", , "Standard", "Dialog1")</paragraph>
@ -454,20 +456,21 @@
<paragraph role="pycode" localize="false" id="pyc_id431619627576082">ctrls = dlg.Controls()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id131619627576307">ctrl = dlg.Controls('myTextBox')</paragraph>
</pycode>
</section>
<section id="EndExecute">
<comment> EndExecute -------------------------------------------------------------------------------------------------------------------------- </comment>
</section>
<section id="EndExecute">
<comment> EndExecute -------------------------------------------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id171598185776261">
<bookmark_value>Dialog service;EndExecute</bookmark_value>
</bookmark>
<h2 id="hd_id491598185776436" localize="false">EndExecute</h2>
<paragraph role="paragraph" id="par_id381598185776500">Ends the display of a modal dialog and gives back the argument as return value for the current <literal>Execute()</literal> running action.</paragraph>
<paragraph role="paragraph" id="par_id551598185953362"><literal>EndExecute()</literal> is usually contained in the processing of a macro triggered by a dialog or control event.</paragraph>
<h3 id="hd_id16159818577649" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id451619627879243"><input>svc.EndExecute(returnvalue: int)</input></paragraph>
<h3 id="hd_id721598185776413" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id451598185776957"><emph>returnvalue</emph>: The value passed to the running <literal>Execute()</literal> method.</paragraph>
<h3 id="hd_id771598185776435" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<paragraph role="paragraph" id="par_id411620110780170">Using %PRODUCTNAME Basic:</paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id521598186134426">Sub OnEvent(poEvent As com.sun.star.lang.EventObject)</paragraph>
@ -484,9 +487,10 @@
<paragraph role="pycode" localize="false" id="pyc_id191619627976590"> dlg.EndExecute(25)</paragraph>
</pycode>
<tip id="par_id81620201915101">Above <link href="https://api.libreoffice.org/docs/idl/ref/structcom_1_1sun_1_1star_1_1lang_1_1EventObject.html" name="com.sun.star.lang.EventObject">com.sun.star.lang.EventObject</link> mentions are optional. Such annotations help identify %PRODUCTNAME Application Programming Interface (API).</tip>
</section>
<section id="Execute">
<comment> Execute -------------------------------------------------------------------------------------------------------------------------- </comment>
</section>
<section id="Execute">
<comment> Execute -------------------------------------------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id351598186461621">
<bookmark_value>Dialog service;Execute</bookmark_value></bookmark>
<h2 id="hd_id531598186461915" localize="false">Execute</h2>
@ -503,11 +507,11 @@
</listitem>
</list>
<paragraph role="paragraph" id="par_id741598187335869" xml-lang="en-US">For non-modal dialog boxes the method always returns 0 and the execution of the macro continues.</paragraph>
<h3 id="hd_id491598186461869" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id291619628195418"><input>svc.Execute(modal: bool = True): int</input></paragraph>
<h3 id="hd_id331598186461152" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id11598186461227"><emph>modal</emph>: <literal>False</literal> when non-modal dialog. Default = <literal>True</literal>.</paragraph>
<h3 id="hd_id28159818646198" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<paragraph role="paragraph" id="par_id231620110023843">In this Basic example <literal>myDialog</literal> dialog is stored in current document's <literal>Standard</literal> library.</paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id591598186461923">Dim oDlg As Object, lReturn As Long</paragraph>
@ -524,17 +528,53 @@
<paragraph role="pycode" localize="false" id="pyc_id211620109965604">if rc == dlg.CANCELBUTTON:</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id61620109984292"> # ...</paragraph>
</pycode>
</section>
<section id="Terminate">
<comment> Terminate -------------------------------------------------------------------------------------------------------------------------- </comment>
</section>
<section id="GetTextsFromL10N">
<comment> GetTextsFromL10N -------------------------------------------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id141598187953209">
<bookmark_value>Dialog service;GetTextsFromL10N</bookmark_value>
</bookmark>
<h2 id="hd_id101598187950391" localize="false">GetTextsFromL10N</h2>
<paragraph role="paragraph" id="par_id21598187900349">Replaces all fixed text strings in a dialog by their translated versions based on a <literal>L10N</literal> service instance. This method translates the following strings:</paragraph>
<embed href="text/sbasic/shared/03/sf_l10n.xhp#L10NDlgControls"/>
<paragraph role="paragraph" id="par_id641625855723650">The method returns <literal>True</literal> if successful.</paragraph>
<paragraph role="paragraph" id="par_id61637871260604">To create a list of translatable strings in a dialog use the <link href="text/sbasic/shared/03/sf_l10n.xhp#AddTextsFromDialog" name="AddTextsFromDialog">AddTextsFromDialog</link> method from the L10N service.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id171619628383909">
<input>svc.GetTextsFromL10N(l10n: svc): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id451598185776205"><emph>l10n</emph>: A <literal>L10N</literal> service instance from which translated strings will be retrieved.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<paragraph role="paragraph" id="par_id951620300689850">The following example loads translated strings and applies them to the dialog "MyDialog".</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id971620301083254">oDlg = CreateScriptService("Dialog", "GlobalScope", "Standard", "MyDialog")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id981620301085205">myPO = CreateScriptService("L10N", "/home/user/po_files/")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id916203010852399">oDlg.GetTextsFromL10N(myPO)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id121598187953341">oDlg.Execute()</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id491620303073122">dlg = CreateScriptService("Dialog", "GlobalScope", "Standard", "MyDialog")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id841620302327011">myPO = CreateScriptService("L10N", "/home/user/po_files/")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id381620302328388">dlg.GetTextsFromL10N(myPO)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id251620302328896">dlg.Execute()</paragraph>
</pycode>
<tip id="par_id901637872163895">Read the <link href="text/sbasic/shared/03/sf_l10n.xhp" name="L10N">L10N service</link> help page to learn more about how PO and POT files are handled.</tip>
</section>
<section id="Terminate">
<comment> Terminate -------------------------------------------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id141598187953729">
<bookmark_value>Dialog service;Terminate</bookmark_value>
</bookmark>
<h2 id="hd_id101598187953201" localize="false">Terminate</h2>
<paragraph role="paragraph" id="par_id21598187953679">Terminate the <literal>Dialog</literal> service for the current instance. Return <literal>True</literal> if the termination was successful.</paragraph>
<h3 id="hd_id221598187953425" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id171619628389339"><input>svc.Terminate(): bool</input></paragraph>
<h3 id="hd_id361598187953840" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<paragraph role="paragraph" id="par_id951620300687150">Below Basic and Python examples open <literal>DlgConsole</literal> and <literal>dlgTrace</literal> non-modal dialogs. They are respectively stored in <literal>ScriptForge</literal> and <literal>Access2Base</literal> shared libraries. Dialog close buttons are disabled and explicit termination is performed at the end of a running process.</paragraph>
<paragraph role="paragraph" id="par_id301620302137482">In this example a button in <literal>DlgConsole</literal> is substituting inhibited window closing:</paragraph>
<bascode>
@ -551,11 +591,12 @@
<paragraph role="pycode" localize="false" id="pyc_id251620302328330">sleep 5</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id101620302328498">dlg.Terminate()</paragraph>
</pycode>
</section>
</section>
<embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#SF_InternalUse"/>
<section id="relatedtopics">
<embed href="text/sbasic/shared/03/sf_dialogcontrol.xhp#ctrls_h1"/>
<embed href="text/sbasic/shared/03/sf_ui.xhp#UIService"/>
</section>
</body>
</helpdocument>
</helpdocument>

View File

@ -118,6 +118,9 @@
<listitem>
<paragraph id="par_id91598456007438" localize="false" role="listitem">ScrollBar</paragraph>
</listitem>
<listitem>
<paragraph id="par_id171612698897041" localize="false" role="listitem">TableControl</paragraph>
</listitem>
<listitem>
<paragraph id="par_id271598456011504" localize="false" role="listitem">TextField</paragraph>
</listitem>
@ -126,7 +129,6 @@
</listitem>
<listitem>
<paragraph id="par_id171612698897514" localize="false" role="listitem">TreeControl</paragraph>
<embed href="text/sbasic/shared/03/avail_release.xhp#7.2.control"/>
</listitem>
</list>
<h2 id="hd_id651583668365757" xml-lang="en-US">Properties</h2>
@ -214,7 +216,6 @@
</tablecell>
<tablecell>
<paragraph id="par_id1001612705482919" role="tablecontent" xml-lang="en-US">The currently upmost node selected in the tree control. Refer to <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1awt_1_1tree_1_1XMutableTreeNode.html" name="awt.tree.XMutableTreeNode">XmutableTreeNode</link> in Application Programming Interface (API) documentation for detailed information.</paragraph>
<embed href="text/sbasic/shared/03/avail_release.xhp#7.2.property"/>
</tablecell>
</tablerow>
<tablerow>
@ -282,10 +283,10 @@
<paragraph id="par_id411583774433779" role="tablecontent" localize="false">Long</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id531598539561342" role="tablecontent" localize="false">ComboBox, ListBox</paragraph>
<paragraph id="par_id531598539561342" role="tablecontent" localize="false">ComboBox, ListBox, TableControl</paragraph>
</tablecell>
<tablecell>
<paragraph role="paragraph" id="par_id151598177605296" xml-lang="en-US">Specifies the number of rows in a list box or a combo box.</paragraph>
<paragraph role="paragraph" id="par_id151598177605296" xml-lang="en-US">Specifies the number of rows in a ListBox, a ComboBox or a TableControl.</paragraph>
</tablecell>
</tablerow>
<tablerow>
@ -299,10 +300,10 @@
<paragraph id="par_id991588334016273" role="tablecontent" localize="false">Long</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id451598539598242" role="tablecontent" localize="false">ComboBox, ListBox</paragraph>
<paragraph id="par_id451598539598242" role="tablecontent" localize="false">ComboBox, ListBox, TableControl</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id251588334016874" role="tablecontent" xml-lang="en-US">Specifies which item is selected in a list box or combo box.</paragraph>
<paragraph id="par_id251588334016874" role="tablecontent" xml-lang="en-US">Specifies which item is selected in a ListBox, a ComboBox or a TableControl.</paragraph>
</tablecell>
</tablerow>
<tablerow>
@ -423,7 +424,6 @@
</tablecell>
<tablecell>
<paragraph id="par_id11612700624514" role="tablecontent" xml-lang="en-US">An object representing the lowest root node (usually there is only one such root node). Refer to <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1awt_1_1tree_1_1XMutableTreeNode.html" name="awt.tree.XMutableTreeNode">XmutableTreeNode</link> in Application Programming Interface (API) documentation for detailed information.</paragraph>
<embed href="text/sbasic/shared/03/avail_release.xhp#7.2.property"/>
</tablecell>
</tablerow>
<tablerow>
@ -575,7 +575,6 @@
</tablecell>
<tablecell>
<paragraph id="par_id691612699446892" role="tablecontent" xml-lang="en-US">The UNO object representing the tree control data model. Refer to <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1awt_1_1tree_1_1XMutableTreeDataModel.html" name="awt.tree.XMutableTreeDataModel">XMutableTreeDataModel</link> in Application Programming Interface (API) documentation for detailed information.</paragraph>
<embed href="text/sbasic/shared/03/avail_release.xhp#7.2.property"/>
</tablecell>
</tablerow>
</table>
@ -731,6 +730,17 @@
<paragraph id="par_id21598543254994" role="tablecontent" xml-lang="en-US">Must be within the predefined bounds</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id811598543254007" role="tablecontent" localize="false">TableControl</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id751598543254805" role="tablecontent" localize="false">Array</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id441598543254951" role="tablecontent" xml-lang="en-US">One-dimensional array with the data of the currently selected row.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id811598543254140" role="tablecontent" localize="false">TextField</paragraph>
@ -755,7 +765,6 @@
</table>
<h2 id="hd_id421612628828054" xml-lang="en-US">Event properties</h2>
<paragraph role="paragraph" id="par_id41612629140856" xml-lang="en-US">Returns a URI string with the reference to the script triggered by the event. Read its specification in the <link href="https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Scripting_Framework_URI_Specification" name="URI specification">scripting framework URI specification</link>.</paragraph>
<embed href="text/sbasic/shared/03/avail_release.xhp#7.2.events"/>
<table id="tab_id951612628879819">
<tablerow>
<tablecell>
@ -954,23 +963,23 @@
</tablerow>
<tablerow>
<tablecell><paragraph id="par_id751612709117248" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_dialogcontrol.xhp#AddSubNode" name="AddSubNode method">AddSubNode</link><br/>
<link href="text/sbasic/shared/03/sf_dialogcontrol.xhp#AddSubTree" name="AddSubTree method">AddSubTree</link>
<link href="text/sbasic/shared/03/sf_dialogcontrol.xhp#AddSubNode" name="AddSubNode method">AddSubNode</link><br/>
<link href="text/sbasic/shared/03/sf_dialogcontrol.xhp#AddSubTree" name="AddSubTree method">AddSubTree</link><br/>
<link href="text/sbasic/shared/03/sf_dialogcontrol.xhp#CreateRoot" name="CreateRoot method">CreateRoot</link><br/>
</paragraph></tablecell>
<tablecell><paragraph id="par_id63161270911712" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_dialogcontrol.xhp#CreateRoot" name="CreateRoot method">CreateRoot</link><br/>
<link href="text/sbasic/shared/03/sf_dialogcontrol.xhp#FindNode" name="FindNode method">FindNode</link>
<link href="text/sbasic/shared/03/sf_dialogcontrol.xhp#FindNode" name="FindNode method">FindNode</link><br/>
<link href="text/sbasic/shared/03/sf_dialogcontrol.xhp#SetFocus" name="SetFocus method">SetFocus</link><br/><br/>
</paragraph></tablecell>
<tablecell><paragraph id="par_id651612709117457" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_dialogcontrol.xhp#SetFocus" name="SetFocus method">SetFocus</link><br/>
<link href="text/sbasic/shared/03/sf_dialogcontrol.xhp#WriteLine" name="WriteLine method">WriteLine</link>
<link href="text/sbasic/shared/03/sf_dialogcontrol.xhp#SetTableData" name="SetTableData method">SetTableData</link><br/>
<link href="text/sbasic/shared/03/sf_dialogcontrol.xhp#WriteLine" name="WriteLine method">WriteLine</link><br/><br/>
</paragraph></tablecell>
</tablerow>
</table>
<embed href="text/sbasic/shared/03/avail_release.xhp#7.2.methods"/>
<section id="AddSubNode">
<comment> AddSubNode -------------------------------------------------------------------------------------------------------------------------- </comment>
<section id="AddSubNode">
<comment> AddSubNode -------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id1516127118236">
<bookmark_value>DialogControl service;AddSubNode</bookmark_value>
</bookmark>
@ -979,16 +988,19 @@
<section id="OnNodeExpanded">
<paragraph role="paragraph" id="par_id741612711823706" xml-lang="en-US">This method may be called before displaying the dialog box to build the initial tree. It may also be called from a dialog or control event - using the <literal>OnNodeExpanded</literal> event - to complete the tree dynamically.</paragraph>
</section>
<h3 id="hd_id841612711823995" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
<paragraph role="paragraph" localize="false" id="par_id781620224364283"><input>svc.AddSubNode(parentnode: uno, displayvalue: str, opt datavalue: any): uno</input></paragraph>
<h3 id="hd_id261612711823446" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id781620224364283">
<input>svc.AddSubNode(parentnode: uno, displayvalue: str, opt datavalue: any): uno</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id761612711823834"><emph>parentnode</emph>: A node UNO object, of type <literal>com.sun.star.awt.tree.XMutableTreeNode</literal>.</paragraph>
<paragraph role="paragraph" id="par_id791612711823819"><emph>displayvalue</emph>: The text appearing in the tree control box.</paragraph>
<section id="datavalue">
<paragraph role="paragraph" id="par_id911612711823382"><emph>datavalue</emph>: Any value associated with the new node. <literal>datavalue</literal> may be a string, a number or a date. Omit the argument when not applicable.</paragraph>
</section>
<h3 id="hd_id931612711823178" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<paragraph role="paragraph" id="par_id901620317110685">%PRODUCTNAME Basic and Python examples pick up current document's <literal>myDialog</literal> dialog from <literal>Standard</literal> library.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id781612711823502">Dim oDlg As Object, myTree As Object, myNode As Object, theRoot As Object</paragraph>
<paragraph role="bascode" localize="false" id="bas_id811612711823106">Set oDlg = CreateScriptService("Dialog",,, "myDialog")</paragraph>
@ -996,25 +1008,28 @@
<paragraph role="bascode" localize="false" id="bas_id31612711823423">Set theRoot = myTree.CreateRoot("Tree top")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id211612712366538">Set myNode = myTree.AddSubNode(theRoot, "A branch ...")</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id771620316787550">dlg = CreateScriptService('SFDialogs.Dialog', None, None, 'myDialog')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id511620316787792">tree = dlg.Controls('myTreeControl')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id291620316787950">root = tree.CreateRoot('Tree top')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id201620316788142">node = tree.AddSubNode(root, 'A branch ...')</paragraph>
</pycode>
</section>
</section>
<section id="AddSubTree">
<comment> AddSubTree -------------------------------------------------------------------------------------------------------------------------- </comment>
<section id="AddSubTree">
<comment> AddSubTree -------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id481612713087784">
<bookmark_value>DialogControl service;AddSubTree</bookmark_value>
</bookmark>
<h2 id="hd_id81161271308746" localize="false">AddSubTree</h2>
<paragraph role="paragraph" id="par_id221612713087885">Return <literal>True</literal> when a subtree, subordinate to a parent node, could be inserted successfully in a tree control. If the parent node had already child nodes before calling this method, the child nodes are erased.</paragraph>
<embed href="text/sbasic/shared/03/sf_dialogcontrol.xhp#OnNodeExpanded"/>
<h3 id="hd_id781612713087790" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
<paragraph role="paragraph" localize="false" id="par_id731620308640671"><input>svc.AddSubTree(parentnode: uno, flattree: any, opt withdatavalue: bool): bool</input></paragraph>
<h3 id="hd_id791612713087478" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id731620308640671">
<input>svc.AddSubTree(parentnode: uno, flattree: any, opt withdatavalue: bool): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id781612713087722"><emph>parentnode</emph>: A node UNO object, of type <literal>com.sun.star.awt.tree.XMutableTreeNode</literal>.</paragraph>
<paragraph role="paragraph" id="par_id36161271308759"><emph>flattree</emph>: a two dimension array sorted on the columns containing the display values. Such an array can be issued by the <literal>GetRows</literal> method applied on the <literal>SFDatabases.Database</literal> service. When an array item containing the text to be displayed is <literal>Empty</literal> or <literal>Null</literal>, no new subnode is created and the remainder of the row is skipped.</paragraph>
<bascode>
@ -1034,7 +1049,8 @@
<paragraph role="bascode" localize="false" id="bas_id212612716132791"> |__ C6</paragraph>
</bascode>
<paragraph role="paragraph" id="par_id51612713087915"><emph>withdatavalue</emph>: When <literal>False</literal> default value is used, every column of <literal>flattree</literal> contains the text to be displayed in the tree control. When <literal>True</literal>, the texts to be displayed (<literal>displayvalue</literal>) are in columns 0, 2, 4, ... while the data values (<literal>datavalue</literal>) are in columns 1, 3, 5, ...</paragraph>
<h3 id="hd_id781612713087851" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id531612713087285">Dim myTree As Object, theRoot As Object, oDb As Object, vData As Variant</paragraph>
<paragraph role="bascode" localize="false" id="bas_id991612713087724">Set myTree = myDialog.Controls("myTreeControl")</paragraph>
@ -1045,6 +1061,7 @@
<paragraph role="bascode" localize="false" id="bas_id551612714139429"> &amp; "ORDER BY [Category].[Name], [Product].[Name]")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id361612714193588">myTree.AddSubTree(theRoot, vData, WithDataValue := True)</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id671620317364456">SQL_STMT = "SELECT [Category].[Name], [Category].[ID], [Product].[Name], [Product].[ID] \</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id51620317364911"> FROM [Category], [Product] WHERE [Product].[CategoryID] = [Category].[ID] \</paragraph>
@ -1055,35 +1072,39 @@
<paragraph role="pycode" localize="false" id="pyc_id911620317364071">sub_tree = db.GetRows(SQL_STMT)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id221620317364271">tree.AddSubTree(root, sub_tree, withdatavalue=True)</paragraph>
</pycode>
</section>
</section>
<section id="CreateRoot">
<comment> CreateRoot -------------------------------------------------------------------------------------------------------------------------- </comment>
<section id="CreateRoot">
<comment> CreateRoot ------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id791612780723864">
<bookmark_value>DialogControl service;CreateRoot</bookmark_value>
</bookmark>
<h2 id="hd_id291612780723671" localize="false">CreateRoot</h2>
<paragraph role="paragraph" id="par_id151612780723320">Returns a new root node of the tree control, as a node UNO object of type <literal>com.sun.star.awt.tree.XMutableTreeNode</literal>. The new tree root is inserted below pre-existing root nodes. <embedvar href="text/sbasic/shared/03/sf_dialogcontrol.xhp#XMutableTreeNode"/></paragraph>
<paragraph role="paragraph" id="par_id821612780723965" xml-lang="en-US">This method may be called before displaying the dialog box to build the initial tree. It may also be called from a dialog or control event to complete the tree dynamically.</paragraph>
<h3 id="hd_id211612780723578" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
<paragraph role="paragraph" localize="false" id="par_id991620309297239"><input>svc.CreateRoot(displayvalue: str, opt datavalue: any): uno</input></paragraph>
<h3 id="hd_id871612780723668" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id991620309297239">
<input>svc.CreateRoot(displayvalue: str, opt datavalue: any): uno</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id791612117823819"><emph>displayvalue</emph>: The text appearing in the tree control box.</paragraph>
<embed href="text/sbasic/shared/03/sf_dialogcontrol.xhp#datavalue"/>
<h3 id="hd_id241612780723961" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id491612780723925">Dim myTree As Object, myNode As Object</paragraph>
<paragraph role="bascode" localize="false" id="bas_id241612780723722">Set myTree = myDialog.Controls("myTreeControl")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id441612780723817">Set myNode = myTree.CreateRoot("Tree starts here ...")</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id441620318437138">tree = dlg.Controls('myTreeControl')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id301620318437324">node = tree.CreateRoot('Tree starts here ...')</paragraph>
</pycode>
</section>
</section>
<section id="FindNode">
<comment> FindNode -------------------------------------------------------------------------------------------------------------------------- </comment>
<section id="FindNode">
<comment> FindNode ---------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id741612781589926">
<bookmark_value>DialogControl service;FindNode</bookmark_value>
</bookmark>
@ -1091,82 +1112,159 @@
<paragraph role="paragraph" id="par_id171612781589503">Traverses the tree and finds recursively, starting from the root, a node meeting some criteria. Either - 1 match is enough - having its display value matching <literal>displayvalue</literal> pattern or having its data value equal to <literal>datavalue</literal>. The comparisons may be or not case-sensitive. The first matching occurrence is returned as a node UNO object of type <literal>com.sun.star.awt.tree.XMutableTreeNode</literal>. <embedvar href="text/sbasic/shared/03/sf_dialogcontrol.xhp#XMutableTreeNode"/></paragraph>
<paragraph role="paragraph" id="par_id741612782475457" xml-lang="en-US">When not found, the method returns <literal>Nothing</literal>, to be tested with the <literal>IsNull()</literal> builtin function.</paragraph>
<paragraph role="paragraph" id="par_id41612781589363" xml-lang="en-US">This method may be called before displaying the dialog box to build the initial tree. It may also be called from a dialog or control event.</paragraph>
<h3 id="hd_id60161278158981" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
<paragraph role="paragraph" localize="false" id="par_id61620309668544"><input>svc.FindNode(displayvalue: str = '', opt datavalue: any, casesensitive = False): uno</input></paragraph>
<h3 id="hd_id771612781589667" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id61620309668544">
<input>svc.FindNode(displayvalue: str = '', opt datavalue: any, casesensitive = False): uno</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id541613670199211">One argument out of <literal>displayvalue</literal> or <literal>datavalue</literal> must be specified. If both present, one match is sufficient to select the node.</paragraph>
<paragraph role="paragraph" id="par_id591612781589560"><emph>displayvalue</emph>: The pattern to be matched. Refer to <link href="text/sbasic/shared/03/sf_string.xhp#IsLike" name="String service IsLike() method"><literal>SF_String.IsLike()</literal></link> method for the list of possible wildcards. When equal to the zero-length string (default), this display value is not searched for.</paragraph>
<embed href="text/sbasic/shared/03/sf_dialogcontrol.xhp#datavalue"/>
<paragraph role="paragraph" id="par_id141582384726168"><emph>casesensitive</emph>: Default value is <literal>False</literal></paragraph>
<h3 id="hd_id41612781589546" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id61612781589464">Dim myTree As Object, myNode As Object</paragraph>
<paragraph role="bascode" localize="false" id="bas_id991612781589903">Set myTree = myDialog.Controls("myTreeControl")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id461612781589942">Set myNode = myTree.FindNode("*Sophie*", CaseSensitive := True)</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id191620318816450">tree = dlg.Controls('myTreeControl')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id281620318817089">node = FindNode('*Sophie*', casesensitive=True)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id861620319785763">if node is None:</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id471620319809524"> # ...</paragraph>
</pycode>
</section>
<section id="SetFocus">
<comment> SetFocus -------------------------------------------------------------------------------------------------------------------------- </comment>
</section>
<section id="SetFocus">
<comment> SetFocus ---------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id721583933076548">
<bookmark_value>DialogControl service;SetFocus</bookmark_value>
</bookmark>
<h2 id="hd_id681583933076692" localize="false">SetFocus</h2>
<paragraph role="paragraph" id="par_id871583933076448">Set the focus on the control. Return <literal>True</literal> if focusing was successful.</paragraph>
<paragraph role="paragraph" id="par_id151598178880227" xml-lang="en-US">This method is often called from a dialog or control event.</paragraph>
<h3 id="hd_id61583933076171" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
<paragraph role="paragraph" localize="false" id="par_id11620310325234"><input>svc.SetFocus(): bool</input></paragraph>
<h3 id="hd_id26158393307687" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id11620310325234">
<input>svc.SetFocus(): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id221598179105596">Dim oControl As Object</paragraph>
<paragraph role="bascode" localize="false" id="bas_id171598179111121">Set oDlg = CreateScriptService("SFDialogs.Dialog",,, "myDialog")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id681598179123436">Set oControl = oDlg.Controls("thisControl")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id361598179135096">oControl.SetFocus()</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id591620319169802">dlg = CreateScriptService('Dialog', None, None, 'myDialog')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id201620319170298">ctrl = dlg.Controls('thisControl')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id821620319170682">ctrl.SetFocus()</paragraph>
</pycode>
</section>
<section id="WriteLine">
<comment> WriteLine -------------------------------------------------------------------------------------------------------------------------- </comment>
</section>
<section id="SetTableData">
<comment> SetTableData ------------------------------------------------------------------------------------------ </comment>
<bookmark localize="false" branch="index" id="bm_id761598619892024">
<bookmark_value>DialogControl service;SetTableData</bookmark_value>
</bookmark>
<h2 id="hd_id961598619890364" localize="false">SetTableData</h2>
<paragraph role="paragraph" id="par_id541638553960464">Fills a <literal>TableControl</literal> with the given data. All preexisting data is cleared before inserting the new data passed as argument.</paragraph>
<paragraph role="paragraph" id="par_id551638554058131">When the <literal>TableControl</literal> is added to the dialog, it is possible to use the Basic IDE to define whether column and row headers will be shown in the table. If the <literal>TableControl</literal> has column and/or row headers, the first column and/or row in the provided data array are used as labels for the table headers.</paragraph>
<paragraph role="paragraph" id="par_id411638569396108">This method returns <literal>True</literal> when successful.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id841620310380255">
<input>svc.SetTableData(dataarray: any[0..*, 0..*], widths: int[0..*], alignments: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id1001584541257133"><emph>dataarray</emph>: Data to be entered into the table represented as an Array of Arrays in Basic or a tuple of tuples in Python. The data must include column and row headers if they are to be displayed by the <literal>TableControl</literal>.</paragraph>
<paragraph role="paragraph" id="par_id1001584541257025"><emph>widths</emph>: Array containing the relative widths of each column. In other words, <literal>widths = Array(1, 2)</literal> means that the second column is twice as wide as the first one. If the number of values in the array is smaller than the number of columns in the table, then the last value in the array is used to define the width of the remaining columns.</paragraph>
<paragraph role="paragraph" id="par_id1001584541257007"><emph>alignments</emph>: Defines the alignment in each column as a string in which each character can be "L" (Left), "C" (Center), "R" (Right) or " " (whitespace, default, meaning left for strings and right for numeric values). If the length of the string is shorter than the number of columns in the table, then the last character in the string is used to define the alignment of the remaining columns.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<paragraph role="paragraph" id="par_id381638569172413">The following example assumes that the dialog <literal>myDialog</literal> has a <literal>TableControl</literal> named <literal>Grid1</literal> with "Show header row" and "Show column row" properties set to "Yes".</paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id901638569052132">Dim myDialog As Object, oTable As Object, tableData As Variant</paragraph>
<paragraph role="bascode" localize="false" id="bas_id781638569039123">myDialog = CreateScriptService("Dialog", "GlobalScope", "Standard", "myDialog")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id281638569051918">oTable = myDialog.Controls("Grid1")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id361638569052324">tableData = Array("Column A", "Column B", "Column C")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id291638569052525">tableData = SF_Array.AppendRow(tableData, Array("Row 1", 1, 2))</paragraph>
<paragraph role="bascode" localize="false" id="bas_id631638569052740">tableData = SF_Array.AppendRow(tableData, Array("Row 2", 3, 4))</paragraph>
<paragraph role="bascode" localize="false" id="bas_id371638569052941">tableData = SF_Array.AppendRow(tableData, Array("Row 3", 5, 6))</paragraph>
<paragraph role="bascode" localize="false" id="bas_id781638569053179">vAlignments = "LCC"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id181638569053413">vWidths = Array(2, 1, 1)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id191638569053613">oTable.SetTableData(tableData, vWidths, vAlignments)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id981638569053837">myDialog.Execute()</paragraph>
</bascode>
<paragraph role="paragraph" id="par_id171638650502346">The <literal>Value</literal> property returns the selected row in the table. If no row is selected, an empty Array object is returned. The following code snippet shows how to test if any row is selected in the table.</paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id891638651540245">rowValues = oTable.Value</paragraph>
<paragraph role="bascode" localize="false" id="bas_id431638651540427">If UBound(rowValues) &lt; 0 Then</paragraph>
<paragraph role="bascode" id="bas_id361638651540588"> MsgBox "No row selected."</paragraph>
<paragraph role="bascode" localize="false" id="bas_id121638651540820">Else</paragraph>
<paragraph role="bascode" id="bas_id781638651541028"> MsgBox "Row " &amp; oTable.ListIndex &amp; " is selected."</paragraph>
<paragraph role="bascode" localize="false" id="bas_id601638651541333">End If</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" id="pyc_id111638569958471">dlg = CreateScriptService("Dialog", "GlobalScope", "Standard", "myDialog")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id871638569958742">table_control = dlg.Controls("Grid1")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id141638569958918">table_data = (("Column A", "Column B", "Column C"),</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id616385699590945"> ("Row 1", 1, 2),</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id991638569959270"> ("Row 2", 3, 4),</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id381638569959454"> ("Row 3", 5, 6))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id251638569959654">alignments = "LCC"</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id971638569959870">widths = (100, 50, 50)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id571638569960094">table_control.SetTableData(table_data, widths, alignments)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id601638569960326">dlg.Execute()</paragraph>
</pycode>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id311638651802570">bas = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id121638651802186">row_values = table_control.Value</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id216386518024106">if len(row_values) == 0:</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id941638651802762"> bas.MsgBox("No row selected.")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id491638651803057">else:</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id261638651804210"> bas.MsgBox(f"Row {table_control.ListIndex} is selected.")</paragraph>
</pycode>
</section>
<section id="WriteLine">
<comment> WriteLine -------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id761598619892798">
<bookmark_value>DialogControl service;WriteLine</bookmark_value>
</bookmark>
<h2 id="hd_id961598619892816" localize="false">WriteLine</h2>
<paragraph role="paragraph" id="par_id671598619892378">Add a new line at the end of a multiline text field. A newline character will be inserted when appropriate. The method returns <literal>True</literal> when successful.</paragraph>
<paragraph role="paragraph" id="par_id941598619892915" xml-lang="en-US">An error is raised if the actual control is not of the type <literal>TextField</literal> or is not multiline.</paragraph>
<h3 id="hd_id761598619892682" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
<paragraph role="paragraph" localize="false" id="par_id841620310387185"><input>svc.WriteLine(opt line: str): bool</input></paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id821598619892939">oControl.WriteLine([Line As String]) As Boolean</paragraph>
</bascode>
<h3 id="hd_id291584541257237" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id841620310387185">
<input>svc.WriteLine(opt line: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id1001584541257789"><emph>Line</emph>: The string to insert. Default is an empty line.</paragraph>
<h3 id="hd_id391598619892559" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id681598619892624">Dim oDlg As Object, oControl As Object</paragraph>
<paragraph role="bascode" localize="false" id="bas_id521598619892148">Set oDlg = CreateScriptService("SFDialogs.Dialog",,, "myDialog")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id391598619892465">Set oControl = oDlg.Controls("thisControl")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id281598619892850">oControl.WriteLine("a new line")</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id61620319410491">dlg = CreateScriptService('SFDialogs.Dialog', None, None, 'myDialog')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id701620319411995">ctrl = dlg.Controls('thisControl')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id591620319412507">ctr.WriteLine("a new line")</paragraph>
</pycode>
</section>
<embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#SF_InternalUse"/>
<section id="relatedtopics">
<embed href="text/sbasic/shared/03/sf_dialog.xhp#dlg_h1"/>
<embed href="text/sbasic/shared/03/sf_string.xhp#StringService"/>
<embed href="text/sbasic/shared/03/sf_ui.xhp#UIService"/>
</section>
</section>
<embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#SF_InternalUse"/>
<section id="relatedtopics">
<embed href="text/sbasic/shared/03/sf_dialog.xhp#dlg_h1"/>
<embed href="text/sbasic/shared/03/sf_string.xhp#StringService"/>
<embed href="text/sbasic/shared/03/sf_ui.xhp#UIService"/>
</section>
</body>
</helpdocument>
</helpdocument>

View File

@ -294,20 +294,21 @@
<paragraph id="par_id761611086279902" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_document.xhp#Activate" name="Activate method">Activate</link><br/>
<link href="text/sbasic/shared/03/sf_document.xhp#CloseDocument" name="CloseDocument method">CloseDocument</link><br/>
<link href="text/sbasic/shared/03/sf_document.xhp#PrintOut" name="PrintOut method">PrintOut</link><br/>
<link href="text/sbasic/shared/03/sf_document.xhp#ExportAsPDF" name="ExportAsPDF method">ExportAsPDF</link><br/>
</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id141611086279902" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_document.xhp#PrintOut" name="PrintOut method">PrintOut</link><br/>
<link href="text/sbasic/shared/03/sf_document.xhp#RunCommand" name="RunCommand method">RunCommand</link><br/>
<link href="text/sbasic/shared/03/sf_document.xhp#Save" name="Save method">Save</link><br/>
<link href="text/sbasic/shared/03/sf_document.xhp#SaveAs" name="SaveAs method">SaveAs</link><br/>
</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id761611086279903" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_document.xhp#SaveAs" name="SaveAs method">SaveAs</link><br/>
<link href="text/sbasic/shared/03/sf_document.xhp#SaveCopyAs" name="SaveCopyAs method">SaveCopyAs</link><br/>
<link href="text/sbasic/shared/03/sf_document.xhp#SetPrinter" name="SetPrinter method">SetPrinter</link><br/><br/>
<link href="text/sbasic/shared/03/sf_document.xhp#SetPrinter" name="SetPrinter method">SetPrinter</link><br/>
</paragraph>
</tablecell>
</tablerow>
@ -370,13 +371,60 @@
</pycode>
</section>
<section id="ExportAsPDF">
<comment> ExportAsPDF -------------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id721985200121025">
<bookmark_value>Document service;ExportAsPDF</bookmark_value>
</bookmark>
<h2 id="hd_id261589202100695" localize="false">ExportAsPDF</h2>
<paragraph role="paragraph" id="par_id156589200123048">Exports the document directly as a PDF file to the specified location. Returns <literal>True</literal> if the PDF file was successfully created.</paragraph>
<paragraph role="paragraph" id="par_id811638276067119">The export options can be set either manually using the <menuitem>File - Export As - Export as PDF</menuitem> dialog or by calling the methods <literal>GetPDFExportOptions</literal> and <literal>SetPDFExportOptions</literal> from the <link href="text/sbasic/shared/03/sf_session.xhp" name="SFSession">Session</link> service.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id1001622827826679">
<input>svc.ExportAsPDF(filename: str, overwrite: bool = False, opt pages: str, opt password: str, opt watermark: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id211635436910641"><emph>filename</emph>: The full path and file name of the PDF to be created. It must follow the <literal>SF_FileSystem.FileNaming</literal> notation.</paragraph>
<paragraph role="paragraph" id="par_id141635436912005"><emph>overwrite</emph>: Specifies if the destination file can be overwritten (Default = <literal>False</literal>). An error will occur if <literal>overwrite</literal> is set to <literal>False</literal> and the destination file already exists.</paragraph>
<paragraph role="paragraph" id="par_id141635436913587"><emph>pages</emph><emph></emph>: String specifying which pages will be exported. This argument uses the same notation as in the dialog <menuitem>File - Export As - Export as PDF</menuitem>.</paragraph>
<paragraph role="paragraph" id="par_id141635436919655"><emph>password</emph><emph></emph>: Specifies a password to open the PDF file.</paragraph>
<paragraph role="paragraph" id="par_id141635436913365"><emph>watermark</emph>: Text to be used as watermark in the PDF file, which will be drawn in every page of the resulting PDF.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<paragraph role="paragraph" id="par_id301638234284727">The following example exports the current document as a PDF file, defines a password and overwrites the destination file if it already exists.</paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id891589200127786">oDoc.ExportAsPDF("C:\User\Documents\myFile.pdf", Password := "1234", Overwrite := True)</paragraph>
</bascode>
<paragraph role="paragraph" id="par_id311638276257020">The code snippet below gets the current PDF export options and uses them to create the PDF file.</paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id791638277305385">Dim exportSettings as Object, oSession as Object</paragraph>
<paragraph role="bascode" localize="false" id="bas_id51638277174044">oSession = CreateScriptService("Session")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id291638277174233">exportSettings = oSession.GetPDFExportOptions()</paragraph>
<paragraph role="bascode" id="bas_id851638277174798">' Sets to True the option to export comments as PDF notes</paragraph>
<paragraph role="bascode" localize="false" id="bas_id71638277174405">exportSettings.ReplaceItem("ExportNotes", True)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id611638277174622">oSession.SetPDFExportOptions(exportSettings)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id461638277174958">oDoc.ExportAsPDF("C:\User\Documents\myFile.pdf")</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id731622728946003">doc.ExportAsPDF(r"C:\User\Documents\myFile.pdf", password = "1234", overwrite = True)</paragraph>
</pycode>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id481638277330132">session = CreateScriptService("Session")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id881638277330334">exportSettings = oSession.GetPDFExportOptions()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id121638277330485">exportSettings.ReplaceItem("ExportNotes", True)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id401638277330637">session.SetPDFExportOptions(exportSettings)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id591638277330780">doc.ExportAsPDF(r"C:\User\Documents\myFile.pdf")</paragraph>
</pycode>
</section>
<section id="PrintOut">
<comment> PrintOut ---------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id721985200121249">
<bookmark_value>Document service;PrintOut</bookmark_value>
</bookmark>
<h2 id="hd_id261589202101415" localize="false">PrintOut</h2>
<paragraph role="paragraph" id="par_id156589200121138">This method sends the content of the document to a default printer or a printer defined by the <literal>SetPrinter</literal> method.</paragraph>
<paragraph role="paragraph" id="par_id156589200121138">This method sends the contents of the document to the default printer or to the printer defined by the <literal>SetPrinter</literal> method.</paragraph>
<paragraph role="paragraph" id="par_id981611169416934">Returns <literal>True</literal> if the document was successfully printed.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id1001622827822169">
@ -384,7 +432,7 @@
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id211635436910093"><emph>pages</emph>: The pages to print as a string, like in the user interface. Example: &quot;1-4;10;15-18&quot;. Default is all pages.</paragraph>
<paragraph role="paragraph" id="par_id141635436912146"><emph>copies</emph><emph></emph>: The number of copies. Default is 1.</paragraph>
<paragraph role="paragraph" id="par_id141635436912146"><emph>copies</emph>: The number of copies. Default is 1.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
@ -426,7 +474,7 @@
<paragraph role="pycode" localize="false" id="pyc_id821622828361025">doc = CreateScriptService("Document", "MyFile.ods")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id211622828361293">doc.RunCommand("SelectData")</paragraph>
</pycode>
<paragraph role="paragraph" id="par_id751611153375195">The example above actually runs the UNO command <literal>uno:SelectData</literal>. Hence, to use the <literal>RunCommand</literal> method it is necessary to remove the "uno:" substring.</paragraph>
<paragraph role="paragraph" id="par_id751611153375195">The example above actually runs the UNO command <literal>.uno:SelectData</literal>. Hence, to use the <literal>RunCommand</literal> method it is necessary to remove the ".uno:" substring.</paragraph>
<tip id="par_id191611153511038">Each LibreOffice component has its own set of commands available. One easy way to learn commands is going to <emph>Tools > Customize > Keyboard</emph>. When you position your mouse over a function in the <emph>Function</emph> list, a tooltip will appear with the corresponding UNO command.</tip>
</section>
@ -533,7 +581,7 @@
<section id="setPrinterArgs">
<paragraph role="paragraph" id="par_id301589205741697"><emph>printer</emph>: The name of the printer queue where to print to. When absent, the default printer is set.</paragraph>
<paragraph role="paragraph" id="par_id851985205147348"><emph>orientation</emph>: Either <literal>PORTRAIT</literal> or <literal>LANDSCAPE</literal>. When absent, left unchanged with respect to the printer settings.</paragraph>
<paragraph role="paragraph" id="par_id821985205147330"><emph>paperformat</emph>: One of the following string values <literal>A3</literal>, <literal>A4</literal>, <literal>A5</literal>, <literal>LETTER</literal>, <literal>LEGAL</literal>, <literal>TABLOID</literal>. Left unchanged when absent.</paragraph>
<paragraph role="paragraph" id="par_id821985205147330"><emph>paperformat</emph>: Specifies the paper format as a string value that can be either <literal>A3</literal>, <literal>A4</literal>, <literal>A5</literal>, <literal>LETTER</literal>, <literal>LEGAL</literal> or <literal>TABLOID</literal>. Left unchanged when absent.</paragraph>
</section>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>

View File

@ -322,7 +322,6 @@
<paragraph role="paragraph" id="par_id111621624672183">Displays the list of arguments in a readable form in the Python shell (APSO) console. Arguments are separated by a TAB character (simulated by spaces).</paragraph>
<paragraph role="paragraph" id="par_id841621426229467">The same string is added to the ScriptForge debug console.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#Basic_Only"/>
<embed href="text/sbasic/shared/03/avail_release.xhp#7.3.method"/>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id81630591881423">exc.PythonPrint(arg0: any, [arg1: any, ...])</paragraph>

View File

@ -73,8 +73,8 @@
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id241622014444493">from scriptforge import CreateScriptService</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id391622014212514">svc = CreateScriptService('UI') </paragraph>
<paragraph role="pycode" localize="false" id="pyc_id891622014222625">doc = svc.OpenDocument('/home/user/Documents/MyForm.odt')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id391622014212514">ui = CreateScriptService('UI') </paragraph>
<paragraph role="pycode" localize="false" id="pyc_id891622014222625">doc = ui.OpenDocument('/home/user/Documents/MyForm.odt')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id931622014224129">my_form = doc.Forms('Form1')</paragraph>
</pycode>
<paragraph role="paragraph" id="par_id531618179517628">Forms can be accessed by their names or by their indices, as shown below:</paragraph>
@ -96,8 +96,8 @@
</bascode>
<paragraph role="paragraph" id="par_id51622028165429">This is achieved identically using Python:</paragraph>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id871622021672708">svc = CreateScriptService('UI')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id671622021672931">doc = svc.OpenDocument('/home/user/Documents/MyForms.ods')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id871622021672708">ui = CreateScriptService('UI')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id671622021672931">doc = ui.OpenDocument('/home/user/Documents/MyForms.ods')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id301622021673180">my_form = doc.Forms('Sheet1', 'Form1')</paragraph>
</pycode>
<h3 id="hd_id201618180055756">In Base documents</h3>
@ -784,7 +784,7 @@
<h2 id="hd_id551616864216705" localize="false">Requery</h2>
<paragraph role="paragraph" id="par_id811616864216529" xml-lang="en-US">Reloads the current data from the database and refreshes the form. The cursor is positioned on the first record. Returns <literal>True</literal> if successful.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id731622550132517">svc.Requery(): bool</paragraph>
<paragraph role="paragraph" localize="false" id="par_id731622550132517"><input>svc.Requery(): bool</input></paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id211616864216116">myForm.Requery() ' Basic</paragraph>

View File

@ -41,7 +41,6 @@
<paragraph role="paragraph" id="par_id81618774023346">All controls have a <literal>Value</literal> property. However, its contents will vary according to the control type. For more information, read <link href="text/sbasic/shared/03/sf_formcontrol.xhp#hd_id81598540704978" name="Value property">The <literal>Value</literal> Property</link> below.</paragraph>
<paragraph role="paragraph" id="par_id881618771651907">It is also possible to format the controls via the <literal>XControlModel</literal> and <literal>XControlView</literal> properties.</paragraph>
<tip id="par_id891598188164936" xml-lang="en-US">The <literal>SFDocuments.FormControl</literal> service is closely related to the <link href="text/sbasic/shared/03/sf_form.xhp" name="Form service"><literal>SFDocuments.Form</literal></link> service.</tip>
<embed href="text/sbasic/shared/03/avail_release.xhp#7.2.service"/>
<bookmark xml-lang="en-US" branch="index" id="bm_id331612167249331" localize="false">
<bookmark_value>API;awt.XControl</bookmark_value>
<bookmark_value>API;awt.XControlModel</bookmark_value>
@ -1054,7 +1053,7 @@
</paragraph></tablecell>
</tablerow>
</table>
<embed href="text/sbasic/shared/03/avail_release.xhp#7.2.methods"/>
<section id="Controls">
<comment> Controls -------------------------------------------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id41584541257826">
@ -1105,8 +1104,8 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id51623154762285">ui = CreateScriptService('ScriptForge.Basic')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id571622559687626">doc = CreateScriptService('SFDocuments.Document', ui.ThisComponent)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id51623154762285">bas = CreateScriptService('ScriptForge.Basic')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id571622559687626">doc = CreateScriptService('SFDocuments.Document', bas.ThisComponent)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id231622559687813">form = doc.Forms(0)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id891622559687994">control = form.Controls('thisControl') # SFDocuments.FormControl</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id801622560297771">control.SetFocus()</paragraph>
@ -1126,8 +1125,8 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" id="pyc_id991622562833004">ui = CreateScriptService('ScriptForge.Basic') # Basic-like methods</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id321622561047923">doc = CreateScriptService('SFDocuments.Document', ui.ThisDatabaseDocument)</paragraph>
<paragraph role="pycode" id="pyc_id991622562833004">bas = CreateScriptService('ScriptForge.Basic') # Basic-like methods</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id321622561047923">doc = CreateScriptService('SFDocuments.Document', bas.ThisDatabaseDocument)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id321622561048131">form = doc.Forms('formDocumentName', 'formName')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id1001622561048346">lbl_city = form.Controls('labelCity')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id151622561048563">combo_city = form.Controls('comboboxCity')</paragraph>
@ -1150,14 +1149,14 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" id="pyc_id991622562822004">ui = CreateScriptService('ScriptForge.Basic') # Basic-like methods</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id681622562079356">doc = CreateScriptService('SFDocuments.Document', ui.ThisDatabaseDocument)</paragraph>
<paragraph role="pycode" id="pyc_id991622562822004">bas = CreateScriptService('ScriptForge.Basic') # Basic-like methods</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id681622562079356">doc = CreateScriptService('SFDocuments.Document', bas.ThisDatabaseDocument)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id941622562079539">form = doc.Forms('formDocumentName', 'formName')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id741622562079722">radio_buttons = ['optA', 'optB', 'optC']</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id901622562079883">for name in radio_buttons:</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id51622562080068"> control = form.controls(name)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id361622562080243"> if control.Value == True:</paragraph>
<paragraph role="pycode" id="pyc_id441622562080419"> ui.MsgBox('Selected option: ' + control.Caption)</paragraph>
<paragraph role="pycode" id="pyc_id441622562080419"> bas.MsgBox('Selected option: ' + control.Caption)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id61622563076603"> break</paragraph>
</pycode>
<embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#SF_InternalUse"/>

View File

@ -38,12 +38,15 @@
<note id="par_id971614966420419">The acronym <literal>L10N</literal> stands for Localization and refers to a set of procedures for translating software to a specific country or region.</note>
<paragraph role="paragraph" id="par_id291585843652438" xml-lang="en-US">PO files have long been promoted in the free software community as a means to providing multilingual user interfaces. This is accomplished through the use of human-readable text files with a well defined structure that specifies, for any given language, the source language string and the localized string.</paragraph>
<paragraph role="paragraph" id="par_id181585843652814" xml-lang="en-US">The main advantage of the PO format is dissociation of the programmer and the translator. PO files are independent text files, so the programmer can send POT template files to translators, who will then translate their contents and return the translated PO files for each supported language.</paragraph>
<tip id="par_id811614352321187">The <literal>L10N</literal> service is based on the GNU implementation of PO (portable object) files. To learn more about this file format, visit <link href="https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html" name="GetText">GNU gettext Utilities: PO Files</link>.</tip>
<paragraph role="paragraph" id="par_id91585843652832" xml-lang="en-US">This service implements the three methods listed below:</paragraph>
<tip id="par_id811614352321187">The <literal>L10N</literal> service is based on the GNU implementation of PO (portable object) files. To learn more about this file format, visit <link href="https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html" name="GetText">GNU gettext Utilities: PO Files</link>.</tip>
<paragraph role="paragraph" id="par_id91585843652832" xml-lang="en-US">This service implements the methods listed below:</paragraph>
<list type="unordered">
<listitem>
<paragraph id="par_id1158584365237" role="listitem" xml-lang="en-US"><emph>AddText</emph>: Used by the programmer to build a set of strings that will be translated later.</paragraph>
</listitem>
<listitem>
<paragraph id="par_id81637866601151" role="listitem"><emph>AddTextsFromDialog</emph>: Extracts all strings from a <literal>Dialog</literal> service instance.</paragraph>
</listitem>
<listitem>
<paragraph id="par_id681585843652331" role="listitem" xml-lang="en-US"><emph>ExportToPOTFile</emph>: Exports the strings added by the <literal>AddText</literal> method to a POT file.</paragraph>
</listitem>
@ -172,17 +175,18 @@
<tablerow>
<tablecell>
<paragraph id="par_id611614360519255" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_l10n.xhp#AddText" name="AddText">AddText</link>
<link href="text/sbasic/shared/03/sf_l10n.xhp#AddText" name="AddText">AddText</link><br/>
<link href="text/sbasic/shared/03/sf_l10n.xhp#AddTextsFromDialog" name="AddTextsFromDialog">AddTextsFromDialog</link>
</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id611614360519104" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_l10n.xhp#ExportToPOTFile" name="ExportToPOTFile">ExportToPOTFile</link>
<link href="text/sbasic/shared/03/sf_l10n.xhp#ExportToPOTFile" name="ExportToPOTFile">ExportToPOTFile</link><br/><br/>
</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id611614360518452" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_l10n.xhp#GetText" name="GetText">GetText</link>
<link href="text/sbasic/shared/03/sf_l10n.xhp#GetText" name="GetText">GetText</link><br/><br/>
</paragraph>
</tablecell>
</tablerow>
@ -216,9 +220,59 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id821625856085583">myPO.AddText(msgid = 'This is a string to be included in a POT file')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id821625856440596">myPO.AddText('CTX1', 'A string with a context')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id521625856443065">myPO.AddText(msgid = 'Provide a String value', comment = 'Do not translate the word String')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id821625856085258">myPO.AddText(msgid = 'This is a string to be included in a POT file')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id821625856440025">myPO.AddText('CTX1', 'A string with a context')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id521625856443322">myPO.AddText(msgid = 'Provide a String value', comment = 'Do not translate the word String')</paragraph>
</pycode>
</section>
<section id="AddTextsFromDialog">
<comment> AddTextsFromDialog ------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id951585843650024">
<bookmark_value>L10N service;AddTextsFromDialog</bookmark_value>
</bookmark>
<h2 id="hd_id191585843652058" localize="false">AddTextsFromDialog</h2>
<paragraph role="paragraph" id="par_id1001585843659821">Automatically extracts strings from a dialog and adds them to the list of localizable text strings. The following strings are extracted:</paragraph>
<section id="L10NDlgControls">
<list type="unordered">
<listitem>
<paragraph id="par_id621637863440015" role="listitem">The title of the dialog.</paragraph>
</listitem>
<listitem>
<paragraph id="par_id61637863440399" role="listitem">The caption of the following control types: Button, CheckBox, FixedLine, FixedText, GroupBox and RadioButton.</paragraph>
</listitem>
<listitem>
<paragraph id="par_id251637863440626" role="listitem">Static strings in ListBoxes and ComboBoxes.</paragraph>
</listitem>
<listitem>
<paragraph id="par_id811637863596791" role="listitem">The tooltip or help text displayed when the mouse hovers over the control.</paragraph>
</listitem>
</list>
</section>
<paragraph role="paragraph" id="par_id641625855723650">The method returns <literal>True</literal> if successful.</paragraph>
<note id="par_id731637863894577">The dialog from which strings will be extracted must not be open when the method is called.</note>
<paragraph role="paragraph" id="par_id911637864050221">When a <literal>L10N</literal> service instance is created from an existing PO file, use the <link href="text/sbasic/shared/03/sf_dialog.xhp#GetTextsFromL10N" name="GetTextsFromL10N">GetTextsFromL10N</link> method from the <literal>Dialog</literal> service to automatically load all translated strings into the dialog.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id241625855910158">
<input>svc.AddTextsFromDialog(dialog: svc): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id391585843652113"><emph>dialog</emph>: a Dialog service instance corresponding to the dialog from which strings will be extracted.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<paragraph role="paragraph" id="par_id461614364298983">The following example extracts all strings from the dialog "MyDialog" stored in the "Standard" library and exports them to a POT file:</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id61585843652225">oDlg = CreateScriptService("Dialog", "GlobalScope", "Standard", "MyDialog")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id61585843652012">myPO = CreateScriptService("L10N")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id61585843653117">myPO.AddTextsFromDialog(oDlg)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id68163786595435">myPO.ExportToPOTFile("en-US.pot")</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id821625856085583">dlg = CreateScriptService("Dialog", "GlobalScope", "Standard", "Dialog1")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id821625856440596">myPO = CreateScriptService("L10N")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id521625856443065">myPO.AddTextsFromDialog(dlg)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id401637866328706">myPO.ExportToPOTFile("en-US.pot")</paragraph>
</pycode>
</section>

View File

@ -178,7 +178,7 @@
<paragraph role="paragraph" id="par_id201636724575911">This folder contains a series of ZIP files containing the image files of each available icon set. The images inside these ZIP files are organized into folders. To use an icon, specify the icon file with the path to its location inside the ZIP file.</paragraph>
<paragraph role="paragraph" id="par_id641636724972071">The example below uses the icon "sc_newdoc.svg" that is located inside the "cmd" folder. The forward slash "/" character is used as the path separator regardless of the operating system.</paragraph>
<bascode>
<paragraph role="bascode" id="bas_id121636725026678">myPopup.AddItem("Item A", Icon := "cmd/sc_newdoc.svg")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id121636725026678">myPopup.AddItem("Item A", Icon := "cmd/sc_newdoc.svg")</paragraph>
</bascode>
<note id="par_id691636725233961">All icon sets have the same internal structure. The actual icon displayed depends on the icon set currently in use.</note>

View File

@ -176,7 +176,8 @@
<link href="text/sbasic/shared/03/sf_session.xhp#ExecuteBasicScript" name="ExecuteBasicScript method">ExecuteBasicScript</link><br/>
<link href="text/sbasic/shared/03/sf_session.xhp#ExecuteCalcFunction" name="ExecuteCalcFunction method">ExecuteCalcFunction</link><br/>
<link href="text/sbasic/shared/03/sf_session.xhp#ExecutePythonScript" name="ExecutePythonScript method">ExecutePythonScript</link><br/>
<link href="text/sbasic/shared/03/sf_session.xhp#HasUnoMethod" name="HasUnoMethod method">HasUnoMethod</link>
<link href="text/sbasic/shared/03/sf_session.xhp#GetPDFExportOptions" name="GetPDFExportOptions method">GetPDFExportOptions</link><br/>
<link href="text/sbasic/shared/03/sf_session.xhp#HasUnoMethod" name="HasUnoMethod method">HasUnoMethod</link><br/>
</paragraph>
</tablecell>
<tablecell>
@ -184,7 +185,8 @@
<link href="text/sbasic/shared/03/sf_session.xhp#HasUnoProperty" name="HasUnoProperty method">HasUnoProperty</link><br/>
<link href="text/sbasic/shared/03/sf_session.xhp#OpenURLInBrowser" name="OpenURLInBrowser method">OpenURLInBrowser</link><br/>
<link href="text/sbasic/shared/03/sf_session.xhp#RunApplication" name="RunApplication method">RunApplication</link><br/>
<link href="text/sbasic/shared/03/sf_session.xhp#SendMail" name="SendMail method">SendMail</link>
<link href="text/sbasic/shared/03/sf_session.xhp#SendMail" name="SendMail method">SendMail</link><br/>
<link href="text/sbasic/shared/03/sf_session.xhp#SetPDFExportOptions" name="SetPDFExportOptions method">SetPDFExportOptions</link><br/>
</paragraph>
</tablecell>
<tablecell>
@ -192,7 +194,7 @@
<link href="text/sbasic/shared/03/sf_session.xhp#UnoMethods" name="UnoMethods method">UnoMethods</link><br/>
<link href="text/sbasic/shared/03/sf_session.xhp#UnoProperties" name="UnoProperties method">UnoProperties</link><br/>
<link href="text/sbasic/shared/03/sf_session.xhp#UnoObjectType" name="UnoObjectType method">UnoObjectType</link><br/>
<link href="text/sbasic/shared/03/sf_session.xhp#WebService" name="WebService method">WebService</link>
<link href="text/sbasic/shared/03/sf_session.xhp#WebService" name="WebService method">WebService</link><br/><br/>
</paragraph>
</tablecell>
</tablerow>
@ -342,6 +344,38 @@
</pycode>
</section>
<section id="GetPDFExportOptions">
<comment> GetPDFExportOptions ------------------------------------------------------------------------------------ </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id571582816536250">
<bookmark_value>Session service;GetPDFExportOptions</bookmark_value>
</bookmark>
<h2 id="hd_id551582816589871" localize="false">GetPDFExportOptions</h2>
<paragraph role="paragraph" id="par_id111582816585087">Returns the current PDF export settings defined in the <menuitem>PDF Options</menuitem> dialog, which can be accessed by choosing <menuitem>File - Export as - Export as PDF</menuitem>.</paragraph>
<paragraph role="paragraph" id="par_id931638383270026">Export options set with the <menuitem>PDF Options</menuitem> dialog are kept for future use. Hence <literal>GetPDFExportOptions</literal> returns the settings currently defined. In addition, use <literal>SetPDFExportOptions</literal> to change current PDF export options.</paragraph>
<paragraph role="paragraph" id="par_id801638383659558">This method returns a <literal>Dictionary</literal> object wherein each key represent export options and the corresponding values are the current PDF export settings.</paragraph>
<tip id="par_id751638383457198">Read the <link href="https://wiki.openoffice.org/wiki/API/Tutorials/PDF_export" name="PDFExport_Wiki">PDF Export wiki page</link> to learn more about all available options.</tip>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id701626811351883">
<input>session.GetPDFExportOptions(): obj</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id361638384343807">Dim expSettings As Object, msg As String, key As String, optLabels As Variant</paragraph>
<paragraph role="bascode" localize="false" id="bas_id721638384344196">expSettings = session.GetPDFExportOptions()</paragraph>
<paragraph role="bascode" localize="false" id="bas_id181638384344396">optLabels = expSettings.Keys</paragraph>
<paragraph role="bascode" localize="false" id="bas_id271638384344575">For Each key in optLabels</paragraph>
<paragraph role="bascode" localize="false" id="bas_id711638384344810"> msg = msg + key &amp; ": " &amp; expSettings.Item(key) &amp; Chr(10)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id651638384345031">Next key</paragraph>
<paragraph role="bascode" localize="false" id="bas_id101638384345303">MsgBox msg</paragraph>
<paragraph role="bascode" localize="false" id="bas_id431638384345510">' Zoom: 100</paragraph>
<paragraph role="bascode" localize="false" id="bas_id1001638384345677">' Changes: 4</paragraph>
<paragraph role="bascode" localize="false" id="bas_id11638384345891">' Quality: 90</paragraph>
<paragraph role="bascode" localize="false" id="bas_id471638384346131">' ...</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#Basic_Only"/>
</section>
<section id="HasUnoMethod">
<comment> HasUnoMethod ------------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id901587477335292">
@ -489,6 +523,37 @@
</pycode>
</section>
<section id="SetPDFExportOptions">
<comment> SetPDFExportOptions ------------------------------------------------------------------------------------ </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id571582816563070">
<bookmark_value>Session service;SetPDFExportOptions</bookmark_value>
</bookmark>
<h2 id="hd_id551582816583371" localize="false">SetPDFExportOptions</h2>
<paragraph role="paragraph" id="par_id111582816583005">Modifies the PDF export settings defined in the <menuitem>PDF Options</menuitem> dialog, which can be accessed by choosing <menuitem>File - Export as - Export as PDF</menuitem>.</paragraph>
<paragraph role="paragraph" id="par_id181638385131806">Calling this method changes the actual values set in the <menuitem>PDF Options</menuitem> dialog, which are used by the <literal>ExportAsPDF</literal> method from the <literal>Document</literal> service.</paragraph>
<paragraph role="paragraph" id="par_id391638385313847">This method returns <literal>True</literal> when successful.</paragraph>
<tip id="par_id751638383457321">Read the <link href="https://wiki.openoffice.org/wiki/API/Tutorials/PDF_export" name="PDFExport_Wiki">PDF Export wiki page</link> to learn more about all available options.</tip>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id701626811351011">
<input>session.SetPDFExportOptions(pdfoptions: obj): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id771582816585233"><emph>pdfoptions</emph>: <literal>Dictionary</literal> object that defines the PDF export settings to be changed. Each key-value pair represents an export option and the value that will be set in the dialog.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<paragraph role="paragraph" id="par_id141638386087986">The following example changes the maximum image resolution to 150 dpi and exports the current document as a PDF file.</paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id501638385904841">Dim newSettings As Object, oDoc As Object</paragraph>
<paragraph role="bascode" localize="false" id="bas_id681638465060402">Set oDoc = CreateScriptService("Document")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id411638385905025">Set newSettings = CreateScriptService("Dictionary")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id421638386212072">newSettings.Add("ReduceImageResolution", True)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id801638385905201">newSettings.Add("MaxImageResolution", 150)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id141638385905345">session.SetPDFExportOptions(newSettings)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id381638465110336">oDoc.ExportAsPDF("C:\Documents\myFile.pdf", Overwrite := True)</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#Basic_Only"/>
</section>
<section id="UnoMethods">
<comment> UnoMethods --------------------------------------------------------------------------------------------- </comment>
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id701587478024358">

View File

@ -768,7 +768,6 @@
</bookmark>
<h2 id="hd_id431580840408317" localize="false">IsIBAN</h2>
<paragraph role="paragraph" id="par_id791584008420941">Returns <literal>True</literal> if the string is a valid International Bank Account Number (IBAN). The comparison is not case-sensitive.</paragraph>
<embed href="text/sbasic/shared/03/avail_release.xhp#7.2.method"/>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id291627161741207">
<input>svc.IsIBAN(inputstr: str): bool</input>

View File

@ -87,7 +87,7 @@
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id61620310677393">from scriptforge import CreateScriptService</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id601620310674922">svcUI = CreateScriptService("UI")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id601620310674922">ui = CreateScriptService("UI")</paragraph>
</pycode>
<h2 id="hd_id841587913266618" xml-lang="en-US">Properties</h2>
@ -200,11 +200,11 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id21620312350189">svcUI = CreateScriptService("UI")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id631620312351013">sBasic = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id141620312351286">openDocs = svcUI.Documents()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id21620312350189">ui = CreateScriptService("UI")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id631620312351013">bas = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id141620312351286">openDocs = ui.Documents()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id661620312351500">strDocs = "\n".join(openDocs)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id801620312351676">sBasic.MsgBox(strDocs)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id801620312351676">bas.MsgBox(strDocs)</paragraph>
</pycode>
<table id="tab_id891606472825856">
@ -254,7 +254,7 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id941620322846267">svcUI.Activate(r"C:\Documents\My file.odt")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id941620322846267">ui.Activate(r"C:\Documents\My file.odt")</paragraph>
</pycode>
</section>
@ -284,8 +284,8 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id361620323808010">myBase = svcUI.CreateBaseDocument(r"C:\Databases\MyBaseFile.odb", "FIREBIRD")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id251629365641121">myCalcBase = svcUI.CreateBaseDocument(r"C:\Databases\MyCalcBaseFile.odb", \</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id361620323808010">myBase = ui.CreateBaseDocument(r"C:\Databases\MyBaseFile.odb", "FIREBIRD")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id251629365641121">myCalcBase = ui.CreateBaseDocument(r"C:\Databases\MyCalcBaseFile.odb", \</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id431629366045258"> "CALC", calcfilename = r"C:\Databases\MyCalcFile.ods")</paragraph>
</pycode>
</section>
@ -316,9 +316,9 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id901620324433095">myDoc1 = svcUI.CreateDocument("Calc")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id901620324433095">myDoc1 = ui.CreateDocument("Calc")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id361620324544381">FSO = CreateScriptService("FileSystem")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id161620324434583">myDoc2 = svcUI.CreateDocument(templatefile = FSO.BuildPath(FSO.TemplatesFolder, "personal/CV.ott"))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id161620324434583">myDoc2 = ui.CreateDocument(templatefile = FSO.BuildPath(FSO.TemplatesFolder, "personal/CV.ott"))</paragraph>
</pycode>
</section>
@ -344,10 +344,10 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id831620330074037">myDoc = svcUI.GetDocument(r"C:\Documents\My file.odt")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id831620330074037">myDoc = ui.GetDocument(r"C:\Documents\My file.odt")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id931624025986035">from scriptforge import CreateScriptService</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id641624026031595">bridge = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id601624025839840">myDoc = svcui.GetDocument(bridge.ThisComponent)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id601624025839840">myDoc = ui.GetDocument(bridge.ThisComponent)</paragraph>
</pycode>
<tip id="par_id521620330287071">To access the name of the currently active window, refer to the <literal>ActiveWindow</literal> property.</tip>
</section>
@ -372,7 +372,7 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id181620330373220">svcUI.Maximize("Untitled 1")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id181620330373220">ui.Maximize("Untitled 1")</paragraph>
</pycode>
</section>
@ -396,7 +396,7 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id481620330501644">svcUI.Minimize()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id481620330501644">ui.Minimize()</paragraph>
</pycode>
</section>
@ -423,7 +423,7 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id431620331254271">svcUI.OpenBaseDocument(r"C:\Documents\myDB.odb", macroexecution = svcUI.MACROEXECALWAYS)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id431620331254271">ui.OpenBaseDocument(r"C:\Documents\myDB.odb", macroexecution = ui.MACROEXECALWAYS)</paragraph>
</pycode>
<tip id="par_id941620762989833">To improve code readability you can use <link href="text/sbasic/shared/03/sf_ui.xhp#Constants" name="CHANGE ME">predefined constants</link> for the <literal>macroexecution</literal> argument, as in the examples above.</tip>
</section>
@ -455,7 +455,7 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id891620331804571">svcUI.OpenDocument(r"C:\Documents\myFile.odt", readonly = True)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id891620331804571">ui.OpenDocument(r"C:\Documents\myFile.odt", readonly = True)</paragraph>
</pycode>
</section>
@ -481,7 +481,7 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id971620331945744">svcUI.Resize(width = 500, height = 500)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id971620331945744">ui.Resize(width = 500, height = 500)</paragraph>
</pycode>
<tip id="par_id21620332301809">To resize a window that is not active, first activate it using the <literal>Activate</literal> method.</tip>
</section>
@ -515,9 +515,9 @@
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id631620332653004">from time import sleep</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id351620332422330">for i in range(101):</paragraph>
<paragraph role="pycode" localize="false" id="bas_id261620332627647"> svcUI.SetStatusbar("Test:", i)</paragraph>
<paragraph role="pycode" localize="false" id="bas_id261620332627647"> ui.SetStatusbar("Test:", i)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id181620332715974"> sleep(0.05)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id381620332733373">svcUI.SetStatusbar()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id381620332733373">ui.SetStatusbar()</paragraph>
</pycode>
</section>
@ -551,10 +551,10 @@
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id821620333264948">from time import sleep</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id611620333268146">for i in range(101):</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id331620333268525"> svcUI.ShowProgressBar("Window Title", "Progress ... " + str(i) + "/100", i)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id331620333268525"> ui.ShowProgressBar("Window Title", "Progress ... " + str(i) + "/100", i)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id451620333268900"> sleep(0.05)</paragraph>
<paragraph role="pycode" id="pyc_id761620333269236"># Closes the Progress Bar window</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id81620333269484">svcUI.ShowProgressBar()</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id81620333269484">ui.ShowProgressBar()</paragraph>
</pycode>
</section>
@ -579,7 +579,7 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id441620333481074">if svcUI.WindowExists(r"C:\Document\My file.odt"):</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id441620333481074">if ui.WindowExists(r"C:\Document\My file.odt"):</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id801620333495532"> # ...</paragraph>
</pycode>
</section>

View File

@ -67,11 +67,11 @@
<paragraph role="pycode" localize="false" id="pyc_id911621624242302">myDoc = CreateScriptService("Writer") &apos; Default = ActiveWindow</paragraph>
</pycode>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id201621531742824">svcUI = CreateScriptService("UI")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id661621531772444">myDoc = svcUI.CreateDocument("Writer")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id201621531742824">ui = CreateScriptService("UI")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id661621531772444">myDoc = ui.CreateDocument("Writer")</paragraph>
</pycode>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id401621531828705">myDoc = svcUI.OpenDocument(r"C:\Documents\MyFile.odt")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id401621531828705">myDoc = ui.OpenDocument(r"C:\Documents\MyFile.odt")</paragraph>
</pycode>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id701621532481401">myDoc = CreateScriptService("SFDocuments.Writer", "MyFile.odt")</paragraph>
@ -156,7 +156,7 @@
<bookmark_value>Writer service;PrintOut</bookmark_value>
</bookmark>
<h2 id="hd_id921592919577158" localize="false">PrintOut</h2>
<paragraph role="paragraph" id="par_id31592919577984">Send the content of the document to the printer. The printer might be defined previously by default, by the user or by the <link href="text/sbasic/03/sf_document.xhp#SetPrinter" name="SetPrinter method"><literal>SetPrinter()</literal></link> method of the <link href="text/sbasic/03/sf_document.xhp" name="Document service">Document</link> service. Returns <literal>True</literal> when successful.</paragraph>
<paragraph role="paragraph" id="par_id31592919577984">Send the contents of the document to the printer. The printer may be previously defined by default, by the user or by the <link href="text/sbasic/03/sf_document.xhp#SetPrinter" name="SetPrinter method"><literal>SetPrinter</literal></link> method of the <link href="text/sbasic/03/sf_document.xhp" name="Document service">Document</link> service. Returns <literal>True</literal> when successful.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id441621534763020">
<input>svc.PrintOut(opt pages: str = "", opt copies: num = 1, opt printbackground: bool = True, opt printblankpages: bool = False, opt printevenpages: bool = True, opt printoddpages: bool = True, opt printimages: bool = True): bool</input>

View File

@ -86,7 +86,7 @@
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id051220170241591470" role="tablecontent" localize="false" xml-lang="en-US">MB_ABORTRETRYCANCEL</paragraph>
<paragraph id="par_id051220170241591470" role="tablecontent" localize="false" xml-lang="en-US">MB_ABORTRETRYIGNORE</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id051220170241592832" role="tablecontent" localize="false" xml-lang="en-US">2</paragraph>

View File

@ -148,7 +148,7 @@
<paragraph id="par_id3151278" role="bascode" xml-lang="en-US"> sVar = MsgBox("Las Vegas")</paragraph>
<paragraph id="par_id3149034" role="bascode" xml-lang="en-US"> sVar = MsgBox("Las Vegas",1)</paragraph>
<paragraph id="par_id3166424" role="bascode" xml-lang="en-US"> sVar = MsgBox( "Las Vegas",256 + 16 + 2,"Dialog title")</paragraph>
<paragraph id="par_id051220170242005479" role="bascode" xml-lang="en-US"> sVar = MsgBox("Las Vegas", MB_DEFBUTTON2 + MB_ICONSTOP + MB_ABORTRETRYCANCEL, "Dialog title")</paragraph>
<paragraph id="par_id051220170242005479" role="bascode" xml-lang="en-US"> sVar = MsgBox("Las Vegas", MB_DEFBUTTON2 + MB_ICONSTOP + MB_ABORTRETRYIGNORE, "Dialog title")</paragraph>
<paragraph id="par_idm1340829728" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
</bascode>
</body>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3149670" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3149457" role="bascode" xml-lang="en-US">Blue (Color As Long)</paragraph>
<paragraph id="par_id3149457" localize="false" role="bascode" xml-lang="en-US">Blue (Color As Long)</paragraph>
</bascode>
<paragraph id="hd_id3149656" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3154140" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3153969" role="bascode" xml-lang="en-US">Green (Color As Long)</paragraph>
<paragraph id="par_id3153969" localize="false" role="bascode" xml-lang="en-US">Green (Color As Long)</paragraph>
</bascode>
<paragraph id="hd_id3154124" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3148799" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3150448" role="bascode" xml-lang="en-US">Red (ColorNumber As Long)</paragraph>
<paragraph id="par_id3150448" localize="false" role="bascode" xml-lang="en-US">Red (ColorNumber As Long)</paragraph>
</bascode>
<paragraph id="hd_id3151042" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>

View File

@ -37,10 +37,10 @@
</section>
<paragraph id="hd_id3154140" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<paragraph id="par_id3151042" role="code" xml-lang="en-US">QBColor (ColorNumber As Integer)</paragraph>
<paragraph id="par_id3151042" localize="false" role="code" xml-lang="en-US">QBColor (ColorNumber As Integer)</paragraph>
<paragraph id="hd_id3145172" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>
<paragraph id="par_id3154685" role="paragraph" xml-lang="en-US">Long</paragraph>
<paragraph id="par_id3154685" localize="false" role="paragraph" xml-lang="en-US">Long</paragraph>
<paragraph id="hd_id3156560" role="heading" level="2" xml-lang="en-US">Parameter:</paragraph>
<paragraph id="par_id3161832" role="paragraph" xml-lang="en-US"> <emph>ColorNumber</emph>: Any integer expression that specifies the color value of the color passed from an older MS-DOS based programming system.</paragraph>

View File

@ -39,11 +39,11 @@
<paragraph id="hd_id3147229" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3155132" role="bascode" xml-lang="en-US">RGB (Red, Green, Blue)</paragraph>
<paragraph id="par_id3155132" localize="false" role="bascode" xml-lang="en-US">RGB (Red, Green, Blue)</paragraph>
</bascode>
<paragraph id="hd_id3156442" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>
<paragraph id="par_id3159153" role="paragraph" xml-lang="en-US">Long</paragraph>
<paragraph id="par_id3159153" localize="false" role="paragraph" xml-lang="en-US">Long</paragraph>
<paragraph id="hd_id3154013" role="heading" level="2" xml-lang="en-US">Parameter:</paragraph>
<section id="parameters">

View File

@ -43,7 +43,7 @@
<image src="media/helpimg/sbasic/Close_statement.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">Close Statement diagram</alt></image>
</paragraph>
<bascode>
<paragraph id="par_id3147265" role="bascode" xml-lang="en-US">Close [[#]fileNum [, [#]fileNum2 [,...]]]</paragraph>
<paragraph id="par_id3147265" localize="false" role="bascode" xml-lang="en-US">Close [[#]fileNum [, [#]fileNum2 [,...]]]</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>

View File

@ -42,7 +42,7 @@
<image src="media/helpimg/sbasic/Get_statement.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">Get Statement diagram</alt></image>
</paragraph>
<bascode>
<paragraph id="par_id3150792" role="bascode" xml-lang="en-US">Get [#]fileNum, [recordNum|filePos], variable</paragraph>
<paragraph id="par_id3150792" localize="false" role="bascode" xml-lang="en-US">Get [#]fileNum, [recordNum|filePos], variable</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>

View File

@ -42,7 +42,7 @@
<image src="media/helpimg/sbasic/Put_statement.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">Put Statement diagram</alt></image>
</paragraph>
<bascode>
<paragraph id="par_id3155132" role="bascode" xml-lang="en-US">Put [#]fileNum, [recordNum|filePos], variable</paragraph>
<paragraph id="par_id3155132" localize="false" role="bascode" xml-lang="en-US">Put [#]fileNum, [recordNum|filePos], variable</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>

View File

@ -40,7 +40,7 @@
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<bascode>
<paragraph id="par_id3147399" role="bascode" xml-lang="en-US">Eof (intexpression As Integer)</paragraph>
<paragraph id="par_id3147399" localize="false" role="bascode" xml-lang="en-US">Eof (intexpression As Integer)</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>

View File

@ -38,10 +38,10 @@
</section>
<paragraph role="heading" id="hd_id3156422" xml-lang="en-US" level="2">Syntax:</paragraph>
<bascode>
<paragraph role="bascode" id="par_id3150768" xml-lang="en-US">Loc(FileNumber)</paragraph>
<paragraph role="bascode" localize="false" id="par_id3150768" xml-lang="en-US">Loc(FileNumber)</paragraph>
</bascode>
<paragraph role="heading" id="hd_id3150440" xml-lang="en-US" level="2">Return value:</paragraph>
<paragraph role="paragraph" id="par_id3152578" xml-lang="en-US">Long</paragraph>
<paragraph role="paragraph" localize="false" id="par_id3152578" xml-lang="en-US">Long</paragraph>
<paragraph role="heading" id="hd_id3152462" xml-lang="en-US" level="2">Parameters:</paragraph>
<paragraph role="paragraph" id="par_id3153363" xml-lang="en-US">
<emph>FileNumber:</emph> Any numeric expression that contains the file number that is set by the Open statement for the respective file.</paragraph>

View File

@ -38,10 +38,10 @@
</section>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<bascode>
<paragraph role="bascode" id="par_id3150359" xml-lang="en-US">Lof (FileNumber)</paragraph>
<paragraph role="bascode" localize="false" id="par_id3150359" xml-lang="en-US">Lof (FileNumber)</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
<paragraph role="paragraph" id="par_id3147230" xml-lang="en-US">Long</paragraph>
<paragraph role="paragraph" localize="false" id="par_id3147230" xml-lang="en-US">Long</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id3150869" xml-lang="en-US">
<emph>FileNumber:</emph> Any numeric expression that contains the file number that is specified in the Open statement.</paragraph>

View File

@ -41,10 +41,10 @@
<paragraph role="paragraph" id="par_id3155854" xml-lang="en-US">See also: <link href="text/sbasic/shared/03020103.xhp" name="Open">Open</link>, <link href="text/sbasic/shared/03020305.xhp" name="Seek">Seek</link>.</paragraph>
<paragraph role="heading" id="hd_id3152460" xml-lang="en-US" level="2">Syntax:</paragraph>
<bascode>
<paragraph role="bascode" id="par_id3145365" xml-lang="en-US">Seek (FileNumber)</paragraph>
<paragraph role="bascode" localize="false" id="par_id3145365" xml-lang="en-US">Seek (FileNumber)</paragraph>
</bascode>
<paragraph role="heading" id="hd_id3148575" xml-lang="en-US" level="2">Return value:</paragraph>
<paragraph role="paragraph" id="par_id3159156" xml-lang="en-US">Long</paragraph>
<paragraph role="paragraph" localize="false" id="par_id3159156" xml-lang="en-US">Long</paragraph>
<paragraph role="heading" id="hd_id3149665" xml-lang="en-US" level="2">Parameters:</paragraph>
<paragraph role="paragraph" id="par_id3148645" xml-lang="en-US">
<emph>FileNumber:</emph> The data channel number used in the Open statement.</paragraph>

View File

@ -40,7 +40,7 @@
<image src="media/helpimg/sbasic/Seek_statement.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">Seek Statement diagram</alt></image>
</paragraph>
<bascode>
<paragraph role="bascode" id="par_id3145273" xml-lang="en-US">Seek [#]filePos, {filePos|recordNum}</paragraph>
<paragraph role="bascode" localize="false" id="par_id3145273" xml-lang="en-US">Seek [#]filePos, {filePos|recordNum}</paragraph>
</bascode>
<paragraph id="hd_id3153379" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3147443" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3146957" role="bascode" xml-lang="en-US">FileCopy TextFrom As String, TextTo As String</paragraph>
<paragraph id="par_id3146957" localize="false" role="bascode" xml-lang="en-US">FileCopy TextFrom As String, TextTo As String</paragraph>
</bascode>
<paragraph id="hd_id3153825" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3154685" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3154124" role="bascode" xml-lang="en-US">FileDateTime (Text As String)</paragraph>
<paragraph id="par_id3154124" localize="false" role="bascode" xml-lang="en-US">FileDateTime (Text As String)</paragraph>
</bascode>
<paragraph id="hd_id3150448" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>

View File

@ -40,11 +40,11 @@
<paragraph id="hd_id3159414" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3149656" role="bascode" xml-lang="en-US">FileLen (Text As String)</paragraph>
<paragraph id="par_id3149656" localize="false" role="bascode" xml-lang="en-US">FileLen (Text As String)</paragraph>
</bascode>
<paragraph id="hd_id3148798" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>
<paragraph id="par_id3156282" role="paragraph" xml-lang="en-US">Long</paragraph>
<paragraph id="par_id3156282" localize="false" role="paragraph" xml-lang="en-US">Long</paragraph>
<paragraph id="hd_id3150768" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>
<paragraph id="par_id3153193" role="paragraph" xml-lang="en-US"> <emph>Text:</emph> Any string expression that contains an unambiguous file specification. You can also use <link href="text/sbasic/shared/00000002.xhp" name="URL notation">URL notation</link>.</paragraph>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3149457" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3150359" role="bascode" xml-lang="en-US">GetAttr (Text As String)</paragraph>
<paragraph id="par_id3150359" localize="false" role="bascode" xml-lang="en-US">GetAttr (Text As String)</paragraph>
</bascode>
<paragraph id="hd_id3151211" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3156344" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3153381" role="bascode" xml-lang="en-US">Name OldName As String As NewName As String</paragraph>
<paragraph id="par_id3153381" localize="false" role="bascode">Name OldName As String As NewName As String</paragraph>
</bascode>
<paragraph id="hd_id3153362" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>

View File

@ -41,7 +41,7 @@
<image src="media/helpimg/sbasic/RmDir_statement.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">RmDir Statement diagram</alt></image>
</paragraph>
<bascode>
<paragraph id="par_id3154367" role="bascode" xml-lang="en-US">RmDir Text As String</paragraph>
<paragraph id="par_id3154367" localize="false" role="bascode">RmDir Text As String</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3150359" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3154365" role="bascode" xml-lang="en-US">SetAttr FileName As String, Attribute As Integer</paragraph>
<paragraph id="par_id3154365" localize="false" role="bascode">SetAttr FileName As String, Attribute As Integer</paragraph>
</bascode>
<paragraph id="hd_id3125863" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3150447" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3154685" role="bascode" xml-lang="en-US">FileExists(FileName As String | DirectoryName As String)</paragraph>
<paragraph id="par_id3154685" localize="false" role="bascode">FileExists(FileName As String | DirectoryName As String)</paragraph>
</bascode>
<paragraph id="hd_id3154126" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>

View File

@ -37,7 +37,7 @@
</section>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<bascode>
<paragraph role="bascode" id="par_id3149670" xml-lang="en-US">DateSerial (year, month, day)</paragraph>
<paragraph role="bascode" localize="false" id="par_id3149670">DateSerial (Year, Month, Day)</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
<paragraph role="paragraph" id="par_id3150398" xml-lang="en-US">Date</paragraph>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3159224" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3149497" role="bascode" xml-lang="en-US">CDateToUnoDate(aDate)</paragraph>
<paragraph id="par_id3149497" localize="false" role="bascode">CDateToUnoDate(aDate)</paragraph>
</bascode>
<paragraph id="hd_id3152347" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3159224" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3149497" role="bascode" xml-lang="en-US">CDateFromUnoDate(aDate)</paragraph>
<paragraph id="par_id3149497" localize="false" role="bascode">CDateFromUnoDate(aDate)</paragraph>
</bascode>
<paragraph id="hd_id3152347" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3159224" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3149497" role="bascode" xml-lang="en-US">CDateToUnoTime(aDate)</paragraph>
<paragraph id="par_id3149497" localize="false" role="bascode">CDateToUnoTime(aDate)</paragraph>
</bascode>
<paragraph id="hd_id3152347" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3159224" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3149497" role="bascode" xml-lang="en-US">CDateFromUnoTime(aTime)</paragraph>
<paragraph id="par_id3149497" localize="false" role="bascode">CDateFromUnoTime(aTime)</paragraph>
</bascode>
<paragraph id="hd_id3152347" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3159224" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3149497" role="bascode" xml-lang="en-US">CDateToUnoDateTime(aDate)</paragraph>
<paragraph id="par_id3149497" localize="false" role="bascode">CDateToUnoDateTime(aDate)</paragraph>
</bascode>
<paragraph id="hd_id3152347" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3159224" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3149497" role="bascode" xml-lang="en-US">CDateFromUnoDateTime(aDateTime)</paragraph>
<paragraph id="par_id3149497" localize="false" role="bascode">CDateFromUnoDateTime(aDateTime)</paragraph>
</bascode>
<paragraph id="hd_id3152347" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>

View File

@ -38,7 +38,7 @@
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<bascode>
<paragraph id="par_idN10648" role="bascode" xml-lang="en-US">DateDiff (interval As String, date1 As Date, date2 As Date [, firstDayOfWeek As Integer [, firstWeekOfYear As Integer]]) As Double</paragraph>
<paragraph id="par_idN10648" localize="false" role="bascode">DateDiff (interval As String, date1 As Date, date2 As Date [, firstDayOfWeek As Integer [, firstWeekOfYear As Integer]]) As Double</paragraph>
</bascode>
<paragraph id="par_idN1064B" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>

View File

@ -39,7 +39,7 @@
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<bascode>
<paragraph id="par_idN105E8" role="bascode" xml-lang="en-US">DatePart (interval As String, date As Date [, firstDayOfWeek As Integer [, firstWeekOfYear As Integer]]) As Long</paragraph>
<paragraph id="par_idN105E8" localize="false" role="bascode">DatePart (interval As String, date As Date [, firstDayOfWeek As Integer [, firstWeekOfYear As Integer]]) As Long</paragraph>
</bascode>
<paragraph id="par_idN105EB" role="heading" level="3" xml-lang="en-US">Return value:</paragraph>

View File

@ -42,15 +42,15 @@
<paragraph xml-lang="en-US" id="par_id3154366" role="paragraph">
<emph>Number:</emph> Numeric expression that contains the serial time value that is used to return the hour value.</paragraph>
<paragraph xml-lang="en-US" id="par_id3154909" role="paragraph">This function is the opposite of the <emph>TimeSerial</emph> function. It returns an integer value that represents the hour from a time value that is generated by the <emph>TimeSerial</emph> or the <emph>TimeValue </emph>function. For example, the expression</paragraph>
<paragraph xml-lang="en-US" id="par_id3163798" role="paragraph">Print Hour(TimeSerial(12,30,41))</paragraph>
<paragraph id="par_id3163798" localize="false" role="paragraph">Print Hour(TimeSerial(12,30,41))</paragraph>
<paragraph xml-lang="en-US" id="par_id3155132" role="paragraph">returns the value 12.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
<paragraph xml-lang="en-US" id="hd_id3147348" role="heading" level="2">Example:</paragraph>
<bascode>
<paragraph xml-lang="en-US" id="par_id3146985" role="bascode">Sub ExampleHour</paragraph>
<paragraph id="par_id3146985" localize="false" role="bascode">Sub ExampleHour</paragraph>
<paragraph xml-lang="en-US" id="par_id3156441" role="bascode">Print "The current hour is " &amp; Hour( Now )</paragraph>
<paragraph xml-lang="en-US" id="par_id3153145" role="bascode" localize="false">End Sub</paragraph>
<paragraph id="par_id3153145" localize="false" role="bascode">End Sub</paragraph>
</bascode>
</body>
</helpdocument>

View File

@ -42,15 +42,15 @@
<paragraph xml-lang="en-US" id="par_id3153969" role="paragraph">
<emph>Number:</emph> Numeric expression that contains the serial time value that is used to return the minute value.</paragraph>
<paragraph xml-lang="en-US" id="par_id3150869" role="paragraph">This function is the opposite of the <emph>TimeSerial </emph>function. It returns the minute of the serial time value that is generated by the <emph>TimeSerial</emph> or the <emph>TimeValue </emph>function. For example, the expression:</paragraph>
<paragraph xml-lang="en-US" id="par_id3149262" role="paragraph">Print Minute(TimeSerial(12,30,41))</paragraph>
<paragraph id="par_id3149262" localize="false" role="paragraph">Print Minute(TimeSerial(12,30,41))</paragraph>
<paragraph xml-lang="en-US" id="par_id3148576" role="paragraph">returns the value 30.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
<paragraph xml-lang="en-US" id="hd_id3150010" role="heading" level="2">Example:</paragraph>
<bascode>
<paragraph xml-lang="en-US" id="par_id3159154" role="bascode">Sub ExampleMinute</paragraph>
<paragraph id="par_id3159154" localize="false" role="bascode">Sub ExampleMinute</paragraph>
<paragraph xml-lang="en-US" id="par_id3146119" role="bascode">MsgBox "The current minute is "&amp; Minute(Now)&amp; "."</paragraph>
<paragraph xml-lang="en-US" id="par_id3153726" role="bascode" localize="false">End Sub</paragraph>
<paragraph id="par_id3153726" localize="false" role="bascode">End Sub</paragraph>
</bascode>
</body>
</helpdocument>

View File

@ -49,7 +49,7 @@
<paragraph id="hd_id3156280" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>
<paragraph id="par_id3154124" role="paragraph" xml-lang="en-US"> <emph>Number:</emph> Numeric expression that contains the serial time number that is used to calculate the number of seconds.</paragraph>
<paragraph id="par_id3125864" role="paragraph" xml-lang="en-US">This function is the opposite of the <emph>TimeSerial </emph>function. It returns the seconds of a serial time value that is generated by the <emph>TimeSerial</emph> or <emph>TimeValue </emph>functions. For example, the expression:</paragraph>
<paragraph id="par_id3153951" role="paragraph" xml-lang="en-US">Print Second(TimeSerial(12,30,41))</paragraph>
<paragraph id="par_id3153951" localize="false" role="paragraph">Print Second(TimeSerial(12,30,41))</paragraph>
<paragraph id="par_id3151117" role="paragraph" xml-lang="en-US">returns the value 41.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3146794" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3150792" role="bascode" xml-lang="en-US">TimeSerial (hour, minute, second)</paragraph>
<paragraph id="par_id3150792" localize="false" role="bascode">TimeSerial (Hour, Minute, Second)</paragraph>
</bascode>
<paragraph id="hd_id3148797" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3154138" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3156282" role="bascode" xml-lang="en-US">TimeValue (Text As String)</paragraph>
<paragraph id="par_id3156282" localize="false" role="bascode">TimeValue (Text As String)</paragraph>
</bascode>
<paragraph id="hd_id3153969" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>

View File

@ -40,7 +40,7 @@
<image src="media/helpimg/sbasic/On-Error_statement.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">On Error Statement diagram</alt></image>
</paragraph>
<bascode>
<paragraph id="par_id3145173" role="bascode" xml-lang="en-US">On [Local] Error {GoTo Labelname | GoTo 0 | Resume Next}</paragraph>
<paragraph id="par_id3145173" localize="false" role="bascode">On [Local] Error {GoTo Labelname | GoTo 0 | Resume Next}</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3147574" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3156344" role="bascode" xml-lang="en-US">Result = Expression1 And Expression2</paragraph>
<paragraph id="par_id3156344" localize="false" role="bascode">Result = Expression1 And Expression2</paragraph>
</bascode>
<paragraph id="hd_id3148946" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>

View File

@ -40,7 +40,7 @@
<paragraph id="hd_id3154367" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<bascode>
<paragraph id="par_id3154910" role="bascode" xml-lang="en-US">Result = Expression1 Eqv Expression2</paragraph>
<paragraph id="par_id3154910" localize="false" role="bascode">Result = Expression1 Eqv Expression2</paragraph>
</bascode>
<paragraph id="hd_id3151043" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>

View File

@ -51,8 +51,8 @@
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph id="par_id3145786" role="paragraph" xml-lang="en-US"> <emph>Number:</emph> Numeric expression that defines the angle in radians that you want to calculate the sine for.</paragraph>
<paragraph id="par_id3155413" role="paragraph" xml-lang="en-US">To convert degrees to radians, multiply degrees by <literal>Pi</literal>/180, and to convert radians to degrees, multiply radians by 180/<literal>Pi</literal>.</paragraph>
<paragraph id="par_id3149664" role="paragraph" xml-lang="en-US">grad=(radiant*180)/<literal>Pi</literal></paragraph>
<paragraph id="par_id3153143" role="paragraph" xml-lang="en-US">radiant=(grad*<literal>Pi</literal>)/180</paragraph>
<paragraph id="par_id3149664" role="paragraph" xml-lang="en-US">degrees=(radians*180)/<literal>Pi</literal></paragraph>
<paragraph id="par_id3153143" role="paragraph" xml-lang="en-US">radians=(degrees*<literal>Pi</literal>)/180</paragraph>
<paragraph id="par_id3151112" role="paragraph" xml-lang="en-US"><literal>Pi</literal> is approximately 3.141593.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>

View File

@ -51,8 +51,8 @@
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph id="par_id3145786" role="paragraph" xml-lang="en-US"> <emph>Number:</emph> Any numeric expression that you want to calculate the tangent for (in radians).</paragraph>
<paragraph id="par_id3153728" role="paragraph" xml-lang="en-US">To convert degrees to radians, multiply by <literal>Pi</literal>/180. To convert radians to degrees, multiply by 180/<literal>Pi</literal>.</paragraph>
<paragraph id="par_id3155414" role="paragraph" xml-lang="en-US">degrees=(radiant*180)/<literal>Pi</literal></paragraph>
<paragraph id="par_id3146975" role="paragraph" xml-lang="en-US">radiant=(degrees*<literal>Pi</literal>)/180</paragraph>
<paragraph id="par_id3155414" role="paragraph" xml-lang="en-US">degrees=(radians*180)/<literal>Pi</literal></paragraph>
<paragraph id="par_id3146975" role="paragraph" xml-lang="en-US">radians=(degrees*<literal>Pi</literal>)/180</paragraph>
<paragraph id="par_id3147434" role="paragraph" xml-lang="en-US"><literal>Pi</literal> is approximately 3.141593.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>

View File

@ -32,29 +32,39 @@
<bookmark_value>CInt function</bookmark_value>
</bookmark>
<paragraph id="hd_id3149346" role="heading" level="1" xml-lang="en-US"><link href="text/sbasic/shared/03100500.xhp" name="CInt Function">CInt Function</link></paragraph>
<h1 id="hd_id3149346"><link href="text/sbasic/shared/03100500.xhp" name="CInt Function">CInt Function</link></h1>
<paragraph id="par_id3155419" role="paragraph" xml-lang="en-US">Converts any string or numeric expression to an integer.</paragraph>
</section>
<paragraph id="hd_id3147573" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<h2 id="hd_id3147573">Syntax:</h2>
<bascode>
<paragraph id="par_id3154142" role="bascode" xml-lang="en-US">CInt (Expression)</paragraph>
</bascode>
<paragraph id="hd_id3147531" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>
<h2 id="hd_id3147531">Return value:</h2>
<paragraph id="par_id3147560" role="paragraph" xml-lang="en-US">Integer</paragraph>
<paragraph id="hd_id3145069" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>
<h2 id="hd_id3145069">Parameters:</h2>
<paragraph id="par_id3159414" role="paragraph" xml-lang="en-US"> <emph>Expression:</emph> Any expression that you want to convert.</paragraph>
<paragraph id="par_id3159415" role="paragraph" xml-lang="en-US">If the argument is a number, it is used as numeric value of the expression.</paragraph>
<paragraph id="par_id3159416" role="paragraph" xml-lang="en-US">If the argument is string, the function trims the leading whitespace; then it tries to recognize a number in following characters. These syntaxes are recognized: decimal numbers (with optional leading sign) using decimal and group separators of locale configured in $[officename] (group separators are accepted in any position), with optional exponential notation like &quot;-12e+1&quot; (where an optionally signed whole decimal number after e or E or d or D defines power of 10); octal numbers like &quot;&amp;Onnn...&quot;, where &quot;nnn...&quot; after &quot;&amp;O&quot; or &quot;&amp;o&quot; is sequence of characters up to the next non-alphanumeric character, and must be no longer than 11 digits from 0 to 7; hexadecimal numbers like &quot;&amp;Hnnn...&quot;, where &quot;nnn...&quot; after &quot;&amp;H&quot; or &quot;&amp;h&quot; is sequence of characters up to the next non-alphanumeric character, and must be no longer than 8 digits from 0 to 9, A to F, or a to f. The rest of the string is ignored. If the string is not recognized, e.g. when after trimming leading whitespace it doesn't start with plus, minus, a decimal digit, or &quot;&amp;&quot;, or when the sequence after &quot;&amp;O&quot; is longer than 11 characters or contains an alphabetic character, the numeric value of expression is 0.</paragraph>
<paragraph id="par_id3159416" role="paragraph" xml-lang="en-US">If the argument is string, the function trims the leading white space; then it tries to recognize a number in following characters. The syntax below are recognized:</paragraph>
<list type="unordered">
<listitem>
<paragraph id="par_id811638383475418" role="listitem">Decimal numbers (with optional leading sign) using decimal and group separators of locale configured in $[officename] (group separators are accepted in any position), with optional exponential notation like "-12e+1" (where an optionally signed whole decimal number after e or E or d or D defines power of 10);</paragraph>
</listitem>
<listitem>
<paragraph id="par_id361638383494362" role="listitem">Octal numbers like "&amp;Onnn...", where "nnn..." after "&amp;O" or "&amp;o" is sequence no longer than 11 digits, from 0 to 7, up to the next non-alphanumeric character;</paragraph>
</listitem>
<listitem>
<paragraph id="par_id91638383518862" role="listitem">Hexadecimal numbers like "&amp;Hnnn...", where "nnn..." after "&amp;H" or "&amp;h" is sequence of characters up to the next non-alphanumeric character, and must be no longer than 8 digits, from 0 to 9, A to F, or a to f. </paragraph>
</listitem>
</list>
<paragraph role="paragraph" id="par_id61638383582794">The rest of the string is ignored. If the string is not recognized, e.g. when after trimming leading whitespace it doesn't start with plus, minus, a decimal digit, or "&amp;", or when the sequence after "&amp;O" is longer than 11 characters or contains an alphabetic character, the numeric value of expression is 0.</paragraph>
<paragraph id="par_id3159417" role="paragraph" xml-lang="en-US">If the argument is an error, the error number is used as numeric value of the expression.</paragraph>
<paragraph id="par_id3159418" role="paragraph" xml-lang="en-US">If the argument is a date, number of days since 1899-12-30 (serial date) is used as numeric value of the expression. Time is represented as fraction of a day.</paragraph>
<paragraph id="par_id3150358" role="paragraph" xml-lang="en-US">After calculating the numeric value of the expression, it is rounded to the nearest integer (if needed), and if the result is not between -32768 and 32767, $[officename] Basic reports an overflow error. Otherwise, the result is returned.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
<embed href="text/sbasic/shared/03100400.xhp#examplecountryconvert"/>
</body>
</helpdocument>

View File

@ -43,7 +43,7 @@
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
<paragraph id="par_id3150669" role="paragraph" xml-lang="en-US">Long</paragraph>
<paragraph id="par_id3150669" role="paragraph" localize="false" xml-lang="en-US">Long</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph id="par_id3149415" role="paragraph" xml-lang="en-US"><emph>string</emph>: Any valid string expression. Only the first character in the string is relevant.</paragraph>
@ -67,4 +67,4 @@
</section>
</body>
</helpdocument>
</helpdocument>

View File

@ -38,7 +38,7 @@
<paragraph id="par_id3150669" role="code" xml-lang="en-US">Chr[$](expression As Integer) As String</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
<paragraph id="par_id3153824" role="paragraph" xml-lang="en-US">String</paragraph>
<paragraph id="par_id3153824" role="paragraph" localize="false" xml-lang="en-US">String</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph id="par_id3149295" role="paragraph" xml-lang="en-US"><emph>Expression:</emph> a numeric expression that represents a valid 8-bit ASCII value (0-255) or a 16-bit Unicode value. (To support expressions with a nominally negative argument like <emph>Chr(&amp;H8000)</emph> in a backwards-compatible way, values in the range −32768 to −1 are internally mapped to the range 32768 to 65535.)</paragraph>

View File

@ -43,7 +43,7 @@
<paragraph id="par_id3143267" role="bascode" localize="false" xml-lang="en-US">AscW (string) As Long</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
<paragraph id="par_id3150669" role="paragraph" xml-lang="en-US">Long</paragraph>
<paragraph id="par_id3150669" role="paragraph" localize="false" xml-lang="en-US">Long</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph id="par_id3149415" role="paragraph" xml-lang="en-US"> <emph>string</emph>: Any valid string expression. Only the first character in the string is relevant.</paragraph>
<paragraph id="par_id3145609" role="paragraph" xml-lang="en-US">Use the AscW function to replace keys with Unicode values. If the AscW function encounters a blank string, %PRODUCTNAME Basic reports a run-time error. Returned values are between 0 and 65535.</paragraph>

View File

@ -133,10 +133,10 @@
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id901622764984846" role="tablecontent" xml-lang="en-US" >vbFromUnicode</paragraph>
<paragraph id="par_id901622764984846" role="tablecontent" localize="false">vbFromUnicode</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id281622764984846" role="tablecontent" xml-lang="en-US" >128</paragraph>
<paragraph id="par_id281622764984846" role="tablecontent" localize="false">128</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id221622764991492" role="tablecontent" xml-lang="en-US" >Converts <emph>Text</emph> characters from Unicode to the default code page of the system.</paragraph>
@ -152,7 +152,7 @@
<paragraph role="bascode" id="par_id181548420522842" xml-lang="en-US" localize="false">Sub Test_StrConv</paragraph>
<paragraph role="bascode" id="par_id251622770431375" xml-lang="en-US" localize="false">Print StrConv("abc EFG hij", vbUpperCase) '= "ABC EFG HIJ"</paragraph>
<paragraph role="bascode" id="par_id321622770438020" xml-lang="en-US" localize="false">Print StrConv("abc EFG hij", vbLowerCase) ' = "abc efg hij"</paragraph>
<paragraph role="bascode" id="par_id271622770442247" xml-lang="en-US" localize="false">Print StrConv("abc EFG hij", vbProperCase) ' = "Abc Efg Hij" vbProperCase)")</paragraph>
<paragraph role="bascode" id="par_id271622770442247" xml-lang="en-US" localize="false">Print StrConv("abc EFG hij", vbProperCase) ' = "Abc Efg Hij"</paragraph>
<paragraph role="bascode" id="par_id311622770486052" xml-lang="en-US">REM Converts narrow (single-byte) characters in string to wide</paragraph>
<paragraph role="bascode" id="par_id31622770457020" xml-lang="en-US" localize="false">Print StrConv("ABCDEVB¥ì¥¹¥­¥å©", vbWide) ' = "ABCDEVB¥ì¥¹¥­¥å©"</paragraph>
@ -166,10 +166,10 @@
<paragraph role="bascode" id="par_id351622770504087" xml-lang="en-US">REM Converts Katakana characters in string to Hiragana characters</paragraph>
<paragraph role="bascode" id="par_id601622770474346" xml-lang="en-US" localize="false">Print StrConv("カタカナ", vbHiragana) '= "かたかな"</paragraph>
<paragraph role="bascode" id="par_id861622770508875" xml-lang="en-US" localize="false">REM Assumes CP-1252 encoding associated with en-US locale used in unit tests.</paragraph>
<paragraph role="bascode" id="par_id861622770508875" xml-lang="en-US">REM Assumes CP-1252 encoding associated with en-US locale used in unit tests.</paragraph>
<paragraph role="bascode" id="par_id481622770521394" xml-lang="en-US" localize="false">Dim x() As Byte</paragraph>
<paragraph role="bascode" id="par_id691622770750591" xml-lang="en-US" localize="false">x = StrConv("ÉϺ£ÊÐABC", vbFromUnicode)</paragraph>
<paragraph role="bascode" id="par_id841622770962002" xml-lang="en-US" localize="false">Print UBound(x) ' 8 characters</paragraph>
<paragraph role="bascode" id="par_id841622770962002" xml-lang="en-US">Print UBound(x) ' 8 characters</paragraph>
<paragraph role="bascode" id="par_id931622770966903" xml-lang="en-US" localize="false">Print x(2) ' = 186</paragraph>
<paragraph role="bascode" id="par_id91622770974484" xml-lang="en-US" localize="false">Print StrConv(x, vbUnicode)' = "ÉϺ£ÊÐABC"</paragraph>
<paragraph role="bascode" id="par_id121622772546703" xml-lang="en-US" localize="false">End Sub</paragraph>

View File

@ -1372,7 +1372,7 @@
<bookmark xml-lang="en-US" branch="hid/SC_HID_FUNC_UMRECHNEN" id="bm_id0908200902093111" localize="false"/>
<h2 id="hd_id0908200902074836">CONVERT_OOO</h2>
<paragraph id="par_id0908200902131122" role="paragraph" xml-lang="en-US"><ahelp hid=".">Converts to euros a currency value expressed in one of the legacy currencies of 19 member states of the European Union, and vice versa.</ahelp> The conversion uses the fixed exchange rates at which the legacy currencies entered the euro.</paragraph>
<paragraph id="par_id0908200902131122" role="paragraph" xml-lang="en-US"><ahelp hid=".">Converts to euros a currency value expressed in one of the legacy currencies of 19 member states of the Eurozone, and vice versa.</ahelp> The conversion uses the fixed exchange rates at which the legacy currencies entered the euro.</paragraph>
<tip id="par_id581631900947319">We recommend using the more flexible EUROCONVERT function for converting between these currencies. CONVERT_OOO is not a standardized function and is not portable.</tip>

View File

@ -189,6 +189,9 @@
<paragraph id="par_id31543624680" role="paragraph">Choose <menuitem>View - Styles</menuitem> <switchinline select="sys"><caseinline select="MAC"><keycode>(Command+T)</keycode></caseinline>
<defaultinline><keycode>(F11)</keycode></defaultinline></switchinline> - open context menu of a page style entry and choose <emph>Modify/New - Page</emph> tab.</paragraph>
</case>
<default>
<paragraph id="par_id3133357" role="paragraph">Choose <menuitem>Format - Page Style - Page</menuitem> tab (Writer).</paragraph>
</default>
</switch>
</section>
<section id="header">

View File

@ -73,13 +73,13 @@
<paragraph role="heading" id="hd_id3144760" xml-lang="en-US" level="3">None</paragraph>
<paragraph role="paragraph" id="par_id3143231" xml-lang="en-US"><ahelp hid="cui/ui/paratabspage/radiobuttonBTN_FILLCHAR_NO">Inserts no fill characters, or removes existing fill characters to the left of the tab stop.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/cui/ui/paratabspage/radiobuttonBTN_FILLCHAR_POINTS" id="bm_id3150742" localize="false"/>
<paragraph role="heading" id="hd_id3152933" xml-lang="en-US" level="3">.......</paragraph>
<paragraph role="heading" id="hd_id3152933" localize="false" level="3">.......</paragraph>
<paragraph role="paragraph" id="par_id3153192" xml-lang="en-US"><ahelp hid="cui/ui/paratabspage/radiobuttonBTN_FILLCHAR_POINTS">Fills the empty space to the left of the tab stop with dots.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/cui/ui/paratabspage/radiobuttonBTN_FILLCHAR_DASHLINE" id="bm_id3156424" localize="false"/>
<paragraph role="heading" id="hd_id3156280" xml-lang="en-US" level="3">------</paragraph>
<paragraph role="heading" id="hd_id3156280" localize="false" level="3">------</paragraph>
<paragraph role="paragraph" id="par_id3156212" xml-lang="en-US"><ahelp hid="cui/ui/paratabspage/radiobuttonBTN_FILLCHAR_DASHLINE">Fills the empty space to the left of the tab stop with dashes.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/cui/ui/paratabspage/radiobuttonBTN_FILLCHAR_UNDERSCORE" id="bm_id3150767" localize="false"/>
<paragraph role="heading" id="hd_id3157960" xml-lang="en-US" level="3">______</paragraph>
<paragraph role="heading" id="hd_id3157960" localize="false" level="3">______</paragraph>
<paragraph role="paragraph" id="par_id3151043" xml-lang="en-US"><ahelp hid="cui/ui/paratabspage/radiobuttonBTN_FILLCHAR_UNDERSCORE">Draws a line to fill the empty space to the left of the tab stop.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/cui/ui/paratabspage/radiobuttonBTN_FILLCHAR_OTHER" id="bm_id3153057" localize="false"/>
<bookmark xml-lang="en-US" branch="hid/cui/ui/paratabspage/entryED_FILLCHAR_OTHER" id="bm_id3151116" localize="false"/>

View File

@ -35,6 +35,7 @@
<bookmark xml-lang="en-US" branch="hid/.uno:MergeCells" id="bm_id1766491" localize="false"/>
<h1 id="hd_id451632377983974"><variable id="mergecells"><link href="text/shared/01/05100100.xhp" name="Merging Cells without centering">Merge Cells</link></variable></h1>
<paragraph role="paragraph" id="par_id3147406" xml-lang="en-US"><variable id="verbindentext"><ahelp hid=".">Combines the contents of the selected cells into a single cell, retaining the formatting of the first cell in the selection.</ahelp></variable><comment>moved from swriter/01/05100100.xhp, see i86644</comment></paragraph>
</section>
<embed href="text/scalc/01/05060000.xhp#mergecells_warning"/>
<switch select="appl">
<case select="CALC">
@ -60,7 +61,6 @@
</section>
</default>
</switch>
</section>
<section id="relatedtopics">
<switch select="appl">
<case select="CALC">

View File

@ -17,7 +17,7 @@
</meta>
<body>
<section id="whatisit">
<paragraph role="paragraph" id="par_ytvideosample" localize="false" xml-lang="en-US"><object data="https://www.youtube-nocookie.com/embed/cWmURg_rM2o" id="vid_id61521568603544" type="video/youtube" width="700" height="394"/></paragraph>
<paragraph role="paragraph" id="par_ytvideosample" localize="false" xml-lang="en-US"><object data="https://www.youtube-nocookie.com/embed/Raw0LIxyoRU" id="vid_id61521568603544" type="video/youtube" width="700" height="394"/></paragraph>
</section>
</body>
</helpdocument>

View File

@ -18,6 +18,7 @@
<body>
<bookmark xml-lang="en-US" branch="index" id="bm_id181634740978601">
<bookmark_value>CSV;filter options</bookmark_value>
<bookmark_value>CSV;separator specification line</bookmark_value>
<bookmark_value>CSV;import options</bookmark_value>
<bookmark_value>CSV;export options</bookmark_value>
<bookmark_value>CSV;command line filter options</bookmark_value>
@ -201,6 +202,26 @@
</tablecell>
</tablerow>
</table>
<h2 id="hd_id591638374883162">Special case of CSV files with separator defined in the first line</h2>
<paragraph role="paragraph" id="par_id781638374952502">CSV import and export support a <literal>sep=</literal> and <literal>"sep="</literal> field separator setting. When reading a CSV document, the separator is taken from the initial <literal>sep=</literal> or <literal>"sep="</literal> single field, if that is the only line content. </paragraph>
<paragraph role="paragraph" id="par_id561638377619263">When reading a CSV file, the quoted form is preserved as (unquoted) cell content. You see <literal>sep=|</literal> when | is the separator in the first line. In the unquoted form, the separator is discarded because it is a real field separator in the context. You see <literal>sep=</literal> in the first line.</paragraph>
<paragraph role="paragraph" id="par_id761638377626465">When writing a CSV file, the existing single top left cell's content such as <literal>sep=|</literal> is adapted to the current separator with the quoted form of <literal>"sep=|"</literal> (if quotes / text delimiters aren't set empty and | is the separator) and always uses the ASCII " double quote character.</paragraph>
<paragraph role="paragraph" id="par_id61638377631743">If the line containing the <literal>sep=|</literal> is not to be imported as data, remember to set the <emph>From row</emph> number in the dialog to 2. Note that this line will not be preserved when re-saving.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" id="par_id371638374806568" xml-lang="en-US" localize="false">sep=|</paragraph>
<paragraph role="bascode" id="par_id731638374814029" xml-lang="en-US">"LETTER"|"ANIMAL"</paragraph>
<paragraph role="bascode" id="par_id801638374818291" xml-lang="en-US">"a"|"aardvark"</paragraph>
<paragraph role="bascode" id="par_id621638374822275" xml-lang="en-US">"b"|"bear"</paragraph>
<paragraph role="bascode" id="par_id851638374831208" xml-lang="en-US">"c"|"cow"</paragraph>
</bascode>
<h2 id="hd_id181634739011588">Formatting Codes for Token 5</h2>
<table id="tab_id491634738948892">
<tablerow>

View File

@ -11,27 +11,27 @@
<meta>
<topic id="qrcodetopic" indexer="include" status="PUBLISH">
<title id="tit" xml-lang="en-US">QR Code</title>
<title id="tit" xml-lang="en-US">QR and Barcode</title>
<filename>/text/shared/guide/qrcode.xhp</filename>
</topic>
</meta>
<body>
<bookmark xml-lang="en-US" branch="index" id="bm_id901566317201860">
<bookmark_value>QR Code</bookmark_value>
<bookmark_value>QR code;barcode</bookmark_value>
</bookmark>
<section id="qrcodeh1">
<h1 id="hd_id461566315781439"><link href="text/shared/guide/qrcode.xhp" name="QR Code">QR Code</link></h1>
<h1 id="hd_id461566315781439"><link href="text/shared/guide/qrcode.xhp" name="QR and Barcode">QR and Barcode</link></h1>
<bookmark id="bm_id971566315781438" xml-lang="en-US" branch="hid/cui/ui/qrcodegen/QrCodeGenDialog" localize="false"/>
<bookmark id="bm_id971566315781436" xml-lang="en-US" branch="hid/cui/ui/qrcodegen/@@nowidget@@" localize="false"/>
<paragraph id="par_id381566315781439" role="paragraph" xml-lang="en-US">Generate QR Code for any text or URL.</paragraph>
<paragraph id="par_id381566315781439" role="paragraph" xml-lang="en-US">Generate linear and matrix codes for any text or URL.</paragraph>
</section>
<paragraph role="paragraph" id="par_id411566316109551">The QR Code Generation feature helps to create QR codes for any text or URL. The QR code is produced as an image or shape and has all the properties associated with an image.</paragraph>
<paragraph role="paragraph" id="par_id411566316109551">The QR and Barcode generation feature allows you to encode any text string or URL as a barcode or a QR code and insert it as a graphical object in a document for scanning.</paragraph>
<section id="howtoget">
<paragraph role="paragraph" id="par_id761566316165430">Choose <menuitem>Insert - Object - QR Code</menuitem>.</paragraph>
<paragraph role="paragraph" id="par_id761566316165430">Choose <menuitem>Insert - Object - QR and Barcode</menuitem>.</paragraph>
</section>
<h2 id="hd_id611566316506278">URL or Text</h2>
<h2 id="hd_id611566316506278">URL or text</h2>
<bookmark id="bm_id97156631571" xml-lang="en-US" branch="hid/cui/ui/qrcodegen/edit_text" localize="false"/>
<paragraph role="paragraph" id="par_id251566316519649">The text from which to generate the QR code.</paragraph>
<paragraph role="paragraph" id="par_id251566316519649">The text from which to generate the code.</paragraph>
<h2 id="hd_id701566317347416">Error correction</h2>
<paragraph role="paragraph" id="par_id281566317365617">The error correction value for the QR Code that is to be created. The error correction of a QR code is a measure that helps a QR code to recover if it is damaged.</paragraph>
<paragraph role="paragraph" id="par_id781566317374864">There are four standard error correction values.</paragraph>
@ -55,14 +55,11 @@
</list>
<h2 id="hd_id701566316879046">Margin</h2>
<bookmark id="bm_id97156631572" xml-lang="en-US" branch="hid/cui/ui/qrcodegen/edit_margin" localize="false"/>
<paragraph role="paragraph" id="par_id981566316947064">The width of the margin surrounding the QR code.</paragraph>
<paragraph role="paragraph" id="par_id981566316947064">The width of the margin surrounding the code.</paragraph>
<h2 id="hd_id761566322212787">Example</h2>
<paragraph role="paragraph" id="par_id401566321281041">The QR code below was generated for the text <literal>www.libreoffice.org</literal>:</paragraph>
<paragraph role="paragraph" id="par_id561566321218295" xml-lang="en-US">
<image src="media/helpimg/qrcode_example.svg" id="img_id991566321218295" width="4cm" height="4cm"><alt xml-lang="en-US" id="alt_id401566321218295">QR code example</alt></image>
</paragraph>
<section id="relatedtopics">
<paragraph role="paragraph" id="par_id441566317415844">QR code in the <link href="https://en.wikipedia.org/wiki/QR_code" name="wikipedia">Wikipedia</link></paragraph>
</section>
</body>
</helpdocument>

View File

@ -18,7 +18,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<helpdocument version="1.0">
<meta>
<topic id="textswriter0105100000xml" indexer="include" status="PUBLISH">
@ -37,7 +37,7 @@
<section id="howtoget">
<embed href="text/swriter/00/00000405.xhp#zelle"/>
</section>
<embed href="text/shared/01/05100100.xhp#merge"/>
<embed href="text/shared/01/05100100.xhp#merge_cells"/>
<embed href="text/shared/01/05100500.xhp#top"/>
<embed href="text/shared/01/05100600.xhp#center_vertical"/>
<embed href="text/shared/01/05100700.xhp#bottom"/>

View File

@ -50,15 +50,12 @@
<tip xml-lang="en-US" id="par_id3147036">To quickly exclude a word from hyphenation, select the word, choose <emph>Format - Character</emph>, click the <emph>Font </emph>tab, and select "None" in the <emph>Language </emph>box.</tip>
<paragraph xml-lang="en-US" id="par_id0302200910262761" role="paragraph">Some words contain special characters that %PRODUCTNAME treats as a hyphen. If you do not want such words to be hyphenated, you can insert a special code that prevents hyphenation at the position where the special code is inserted. Proceed as follows:</paragraph>
<list type="ordered">
<listitem>
<paragraph xml-lang="en-US" id="par_id0302200910262850" role="listitem">Enable the special features of complex text layout (CTL) languages: Choose <switchinline select="sys"><caseinline select="MAC"><item type="menuitem">%PRODUCTNAME - Preferences</item></caseinline><defaultinline><item type="menuitem">Tools - Options</item></defaultinline></switchinline><item type="menuitem"> - Language Settings - Languages</item> and check <emph>Enabled for complex text layout (CTL)</emph>. Click OK.</paragraph>
</listitem>
<listitem>
<paragraph xml-lang="en-US" id="par_id0302200910262837" role="listitem">Position the cursor at the place where no hyphenation should occur.</paragraph>
</listitem>
<listitem>
<paragraph xml-lang="en-US" id="par_id0302200910262867" role="listitem">Choose <menuitem>Insert - Formatting Mark - Word Joiner</menuitem>.</paragraph>
<paragraph xml-lang="en-US" id="par_id0302200910572128" role="listitem">Once the special character is inserted, you might disable CTL again. Support of CTL was only necessary to insert the special character.</paragraph>
<paragraph role="paragraph" id="par_id501639661322712">The inserted formatting mark will be shown in gray. To remove it, simply place the cursor over the formatting mark and press the <keycode>Del</keycode> key.</paragraph>
</listitem>
</list>
<section id="relatedtopics">

View File

@ -51,10 +51,13 @@
<listitem>
<paragraph role="listitem" id="par_id3156111" xml-lang="en-US">Press <switchinline select="sys"><caseinline select="MAC">Command</caseinline><defaultinline>Ctrl</defaultinline></switchinline>+Shift+P to make the text superscript, and <switchinline select="sys"><caseinline select="MAC">Command</caseinline><defaultinline>Ctrl</defaultinline></switchinline>+Shift+B to make the text subscript.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3149205" xml-lang="en-US">In the <menuitem>Properties</menuitem> deck of the sidebar, go to the <menuitem>Character</menuitem> area and click the <menuitem>Superscript</menuitem> or <menuitem>Subscript</menuitem> buttons.</paragraph>
</listitem>
</list>
<embed href="text/shared/00/00000004.xhp#related"/>
<paragraph xml-lang="en-US" id="par_id3153416" role="paragraph"><link href="text/shared/01/05020500.xhp" name="Format - Character - Position">Format - Character - Position</link></paragraph>
<paragraph xml-lang="en-US" id="par_id3154705" role="paragraph"><link href="text/shared/01/06040200.xhp" name="Tools - AutoCorrect - Replace">Tools - AutoCorrect - Replace</link></paragraph>
</body>
</helpdocument>
</helpdocument>

View File

@ -39,7 +39,7 @@
<list type="ordered">
<listitem>
<paragraph xml-lang="en-US" id="par_idN106A3" role="listitem">On the <menuitem>Tools</menuitem> bar, click the <menuitem>Direct Cursor</menuitem> icon
<image id="img_id3149846" src="cmd/sc_shadowcursor.png" width="1cm" height="1cm"><alt xml-lang="en-US" id="alt_id3149846">Icon</alt></image>. Alternativelly, enable <emph>Direct Cursor</emph> by going to <menuitem>Edit - Direct Cursor Mode</menuitem>.</paragraph>
<image id="img_id3149846" src="cmd/sc_shadowcursor.png" width="1cm" height="1cm"><alt xml-lang="en-US" id="alt_id3149846">Icon</alt></image>. Alternatively, enable <emph>Direct Cursor</emph> by going to <menuitem>Edit - Direct Cursor Mode</menuitem>.</paragraph>
</listitem>
<listitem>
<paragraph xml-lang="en-US" id="par_idN106C5" role="listitem">Click in a free space in the text document. The mouse pointer changes to reflect the alignment that will be applied to the text that you type:</paragraph>
@ -90,4 +90,4 @@
<embed href="text/shared/guide/standard_template.xhp#standard_template"/>
</section>
</body>
</helpdocument>
</helpdocument>