diff options
author | Alain Romedenne <alain.romedenne@libreoffice.org> | 2023-12-08 11:10:21 +0100 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2023-12-13 01:33:33 +0100 |
commit | 34d2d83e4d33982fa31a3b6ba0b4f6c51ca9255d (patch) | |
tree | 23e1bc0b5181dd88c6524f37319f622ff3c05cca | |
parent | b34d255751b25b1de5b3c680336bd8e9bac31264 (diff) |
Add Toolbars() method in various SF services + toc
Change-Id: I1109429a42d28f6be2eecabfe727bf146d1cd927
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/160368
Tested-by: Jenkins
Reviewed-by: Alain Romedenne <alain.romedenne@libreoffice.org>
(cherry picked from commit a47d92625a2921bcf56d72593bf33f5a8b87b768)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/160635
Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
-rw-r--r-- | source/text/sbasic/shared/03/sf_datasheet.xhp | 15 | ||||
-rw-r--r-- | source/text/sbasic/shared/03/sf_document.xhp | 33 | ||||
-rw-r--r-- | source/text/sbasic/shared/03/sf_toc.xhp | 3 | ||||
-rw-r--r-- | source/text/sbasic/shared/03/sf_toolbar.xhp | 2 |
4 files changed, 42 insertions, 11 deletions
diff --git a/source/text/sbasic/shared/03/sf_datasheet.xhp b/source/text/sbasic/shared/03/sf_datasheet.xhp index 44acdbed4d..80463a5e2a 100644 --- a/source/text/sbasic/shared/03/sf_datasheet.xhp +++ b/source/text/sbasic/shared/03/sf_datasheet.xhp @@ -294,13 +294,14 @@ <tablecell> <paragraph id="par_id721619034669263" role="tablecontent" localize="false"> <link href="text/sbasic/shared/03/sf_datasheet.xhp#GetText" name="GetText method">GetText</link><br/> - <link href="text/sbasic/shared/03/sf_datasheet.xhp#GetValue" name="GetValue method">GetValue</link><br/><br/> + <link href="text/sbasic/shared/03/sf_datasheet.xhp#GetValue" name="GetValue method">GetValue</link><br/> + <link href="text/sbasic/shared/03/sf_datasheet.xhp#GoToCell" name="GoToCell method">GoToCell</link><br/><br/> </paragraph> </tablecell> <tablecell> <paragraph id="par_id711619034669263" role="tablecontent" localize="false"> - <link href="text/sbasic/shared/03/sf_datasheet.xhp#GoToCell" name="GoToCell method">GoToCell</link><br/> - <link href="text/sbasic/shared/03/sf_datasheet.xhp#RemoveMenu" name="RemoveMenu method">RemoveMenu</link><br/><br/> + <link href="text/sbasic/shared/03/sf_datasheet.xhp#RemoveMenu" name="RemoveMenu method">RemoveMenu</link><br/> + <link href="text/sbasic/shared/03/sf_datasheet.xhp#Toolbars" name="Toolbars method">Toolbars</link><br/><br/><br/> </paragraph> </tablecell> </tablerow> @@ -503,6 +504,14 @@ </pycode> </section> + <section id="Toolbars"> + <comment> Toolbars -------------------------------------------------------------------------------------------------------------------------- </comment> + <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id531595692394747"> + <bookmark_value>Datasheet service;Toolbars</bookmark_value> + </bookmark> + <embed href="text/sbasic/shared/03/sf_document.xhp#SF_Toolbars"/> + </section> + <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#SF_InternalUse"/> <section id="relatedtopics"> <embed href="text/sbasic/shared/03/sf_database.xhp#DatabaseService"/> diff --git a/source/text/sbasic/shared/03/sf_document.xhp b/source/text/sbasic/shared/03/sf_document.xhp index 4c9d927507..eb4893dfc1 100644 --- a/source/text/sbasic/shared/03/sf_document.xhp +++ b/source/text/sbasic/shared/03/sf_document.xhp @@ -421,7 +421,8 @@ </tablecell> </tablerow> </table> - </section> +</section> + <section id="Activate"> <comment> Activate -------------------------------------------------------------------- </comment> <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id92158919969883"> @@ -477,6 +478,7 @@ <paragraph role="pycode" localize="false" id="pyc_id221622827947414"> # ...</paragraph> </pycode> </section> + <section id="CreateMenu"> <comment> CreateMenu --------------------------------------------------------------------------------------------- </comment> <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id721589200120958"> @@ -522,6 +524,7 @@ <tip id="par_id271643139068194">Refer to the <link href="text/sbasic/shared/03/sf_menu.xhp"><input>SFWidgets.Menu</input></link> help page to learn more about how to create/remove menus in %PRODUCTNAME document windows.</tip> </section> </section> + <section id="DeleteStyles"> <comment> DeleteStyles --------------------------------------------------------------------------------------------- </comment> <bookmark localize="false" branch="index" id="bm_id721589200120958"> @@ -553,6 +556,7 @@ <paragraph role="pycode" localize="false" id="pyc_id421709456520393">doc.Styles('ParagraphStyles', a_list)</paragraph> </pycode> </section> + <section id="Echo"> <comment> Echo ------------------------------------------------------------------------------------------------ </comment> <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id721985200199205"> @@ -586,6 +590,7 @@ <paragraph role="pycode" localize="false" id="pyc_id221688837494813">doc.Echo()</paragraph> </pycode> </section> + <section id="ExportAsPDF"> <comment> ExportAsPDF -------------------------------------------------------------------------------------------- </comment> <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id721985200121025"> @@ -632,6 +637,7 @@ <paragraph role="pycode" localize="false" id="pyc_id591638277330780">doc.ExportAsPDF(r"C:\User\Documents\myFile.pdf")</paragraph> </pycode> </section> + <section id="ImportStylesFromFile"> <comment> ImportStylesFromFile ---------------------------------------------------------------- </comment> <bookmark localize="false" branch="index" id="bm_id832985200121350"> @@ -667,6 +673,7 @@ <paragraph role="pycode" localize="false" id="pyc_id731622728946909">doc.ImportStylesFromFile('C:\User\Documents\myFile.ods', ("ParagraphStyles",), False)</paragraph> </pycode> </section> + <section id="PrintOut"> <comment> PrintOut ---------------------------------------------------------------- </comment> <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id721985200121249"> @@ -695,6 +702,7 @@ <paragraph role="pycode" localize="false" id="pyc_id221628227947414"> # ...</paragraph> </pycode> </section> + <section id="RemoveMenu"> <comment> RemoveMenu --------------------------------------------------------------------------------------------- </comment> <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id721589200129148"> @@ -724,6 +732,7 @@ </pycode> <embed href="text/sbasic/shared/03/sf_document.xhp#menu_tip"/> </section> + <section id="RunCommand"> <comment> RunCommand --------------------------------------------------------------- </comment> <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id601589202413561"> @@ -770,6 +779,7 @@ </pycode> <tip id="par_id191611153511038">Each %PRODUCTNAME 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> + <section id="Save"> <comment> Save ------------------------------------------------------------------------ </comment> <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id691589202925124"> @@ -796,6 +806,7 @@ <paragraph role="pycode" localize="false" id="pyc_id781622828542374"> # ...</paragraph> </pycode> </section> + <section id="SaveAs"> <comment> SaveAs --------------------------------------------------------------------------------------- </comment> <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id141589203370367"> @@ -825,6 +836,7 @@ <paragraph role="pycode" localize="false" id="pyc_id801622828865363">doc.SaveAs(r"C:\Documents\NewCopy.odt", overwrite = True)</paragraph> </pycode> </section> + <section id="SaveCopyAs"> <comment> SaveCopyAs ------------------------------------------------------------------- </comment> <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id71158920514765"> @@ -854,6 +866,7 @@ <paragraph role="pycode" localize="false" id="pyc_id941622829095519">doc.SaveCopyAs(r"C:\Documents\Copy2.odt", overwrite = True)</paragraph> </pycode> </section> + <section id="SetPrinter"> <comment> SetPrinter ------------------------------------------------------------------- </comment> <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id71158921504765"> @@ -882,6 +895,7 @@ <paragraph role="pycode" localize="false" id="pyc_id941628229095519">doc.SetPrinter(paperformat='TABLOID')</paragraph> </pycode> </section> + <section id="Styles"> <comment> Styles --------------------------------------------------------------------------------------------- </comment> <bookmark localize="false" branch="index" id="bm_id721589200120958"> @@ -927,20 +941,22 @@ <paragraph role="pycode" xml-lang="en-US" id="pyc_id841701270291654">vStyles = doc.Styles('ParagraphStyles', ParentStyle = 'Standard") # All styles derived from the "Default Paragraph Style"</paragraph> </pycode> </section> + <section id="Toolbars"> <comment> XStyles --------------------------------------------------------------------------------------------- </comment> <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id721580310120958"> <bookmark_value>Document service;Toolbars</bookmark_value> </bookmark> + <section id="SF_Toolbars"> + <comment> Method definition is reused in various SF services -------------------------------------------------- </comment> <h2 id="hd_id261501400121339" localize="false">Toolbars</h2> - <paragraph role="paragraph" id="par_id091612259727155">This method returns either a list of the available toolbar names in the actual document or a Toolbar object instance from the SFWidgets library.</paragraph> + <paragraph role="paragraph" id="par_id091612259727155">This method returns either a list of the available toolbar names in the actual document or an instance <link href="text/sbasic/shared/03/sf_toolbar.xhp"><input>SFWidgets.Toolbar</input></link> service.</paragraph> <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/> <paragraph role="paragraph" localize="false" id="par_id2111634997222964"> - <input>svc.Toolbars(opt ToolbarName: str): uno</input> + <input>svc.Toolbars(opt ToolbarName: str): uno</input><br/> <input>svc.Toolbars(): str[0..]</input> </paragraph> <embed href="text/sbasic/shared/00000003.xhp#functparameters"/> - <embed href="text/sbasic/shared/03/sf_document.xhp#family"/> <paragraph role="paragraph" id="par_id361580321120786"><emph>ToolbarName</emph>: The usual name of one of the available toolbars.</paragraph> <embed href="text/sbasic/shared/00000003.xhp#functexample"/> <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/> @@ -950,9 +966,12 @@ </bascode> <embed href="text/sbasic/shared/00000003.xhp#In_Python"/> <pycode> - <paragraph role="pycode" localize="false" id="pyc_id181702380926212">a_list = doc.Toolbars()</paragraph> + <paragraph role="pycode" localize="false" id="pyc_id181702380926212">a_list = doc.Toolbars()</paragraph> </pycode> -</section><section id="XStyles"> + </section> +</section> + +<section id="XStyles"> <comment> XStyles --------------------------------------------------------------------------------------------- </comment> <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id721589200120958"> <bookmark_value>Document service;XStyles</bookmark_value> @@ -974,7 +993,7 @@ </bascode> <embed href="text/sbasic/shared/00000003.xhp#In_Python"/> <pycode> - <paragraph role="pycode" localize="false" id="pyc_id181701270926212">oStyle = doc.XStyle('ParagraphStyle', 'Heading 2')</paragraph> + <paragraph role="pycode" localize="false" id="pyc_id181701270926212">oStyle = doc.XStyle('ParagraphStyle', 'Heading 2')</paragraph> </pycode> </section> <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#SF_InternalUse"/> diff --git a/source/text/sbasic/shared/03/sf_toc.xhp b/source/text/sbasic/shared/03/sf_toc.xhp index fb158cc0ac..c622700c29 100644 --- a/source/text/sbasic/shared/03/sf_toc.xhp +++ b/source/text/sbasic/shared/03/sf_toc.xhp @@ -1102,6 +1102,9 @@ </table> </section> + <h2 id="hd_id1016711992513650"><literal>ScriptForge</literal>.<literal>Writer</literal> service</h2> + <embed href="text/sbasic/shared/03/sf_writer.xhp#methods_toc"/> + <section id="relatedtopics"> <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#ScriptForge_lib"/> <embed href="text/sbasic/shared/03/sf_intro.xhp#title"/> diff --git a/source/text/sbasic/shared/03/sf_toolbar.xhp b/source/text/sbasic/shared/03/sf_toolbar.xhp index a5e19d6707..dfd2e896a2 100644 --- a/source/text/sbasic/shared/03/sf_toolbar.xhp +++ b/source/text/sbasic/shared/03/sf_toolbar.xhp @@ -42,7 +42,7 @@ <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>Toolbar</literal> service the <literal>ScriptForge</literal> library needs to be loaded or imported:</paragraph> <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#importLibs"/> - <paragraph role="paragraph" id="par_id411700851985942">The <literal>Toolbar</literal> service is invoked using the <literal>Toolbars</literal> method, which is available in the following services: <literal>Calc</literal>, <literal>Datasheet</literal>, <literal>Document</literal>, <literal>FormDocument</literal> and <literal>Writer</literal>.</paragraph> + <paragraph role="paragraph" id="par_id411700851985942">The <literal>Toolbar</literal> service is invoked using the <literal>Toolbars</literal> method, which is available in <link href="text/sbasic/shared/03/sf_document.xhp">SFDocuments.Document</link> service.</paragraph> <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/> <paragraph role="paragraph" id="par_id771700853155061">The example below gets an <literal>Array</literal> with the names of the toolbars available in the current document.</paragraph> <bascode> |