diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2020-12-16 17:34:04 +0100 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2020-12-17 08:56:47 +0100 |
commit | e6915d4be4d576fdfd4d612c7968f493edba62c5 (patch) | |
tree | 9570a04759820be5180df2e57ca4c91ecc83483e /wizards/source/scriptforge | |
parent | 11382ccf2ff58ba470dfa604654685730e0411f8 (diff) |
ScriptForge - (SFDocuments) Introduce form class
New SF_Form class in SFDocuments library
Support for Writer, Calc and Base forms
Skeleton of Form class module
Forms() methods in Calc, Base and Document modules
to create a new instance
New error messages in po file
Change-Id: Id78a4604caf61901d87750026be45cef8f74f110
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107848
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Diffstat (limited to 'wizards/source/scriptforge')
-rw-r--r-- | wizards/source/scriptforge/SF_Exception.xba | 18 | ||||
-rw-r--r-- | wizards/source/scriptforge/SF_Root.xba | 38 | ||||
-rw-r--r-- | wizards/source/scriptforge/SF_Utils.xba | 2 | ||||
-rw-r--r-- | wizards/source/scriptforge/po/ScriptForge.pot | 65 | ||||
-rw-r--r-- | wizards/source/scriptforge/po/en.po | 65 |
5 files changed, 180 insertions, 8 deletions
diff --git a/wizards/source/scriptforge/SF_Exception.xba b/wizards/source/scriptforge/SF_Exception.xba index 5a04fc0bca29..c3f9c96dc93a 100644 --- a/wizards/source/scriptforge/SF_Exception.xba +++ b/wizards/source/scriptforge/SF_Exception.xba @@ -104,6 +104,12 @@ Const CALCADDRESSERROR = "CALCADDRESSERROR" Const DUPLICATESHEETERROR = "DUPLICATESHEETERROR" Const OFFSETADDRESSERROR = "OFFSETADDRESSERROR" +' SF_Form +Const FORMDEADERROR = "FORMDEADERROR" +Const CALCFORMNOTFOUNDERROR = "CALCFORMNOTFOUNDERROR" +Const WRITERFORMNOTFOUNDERROR = "WRITERFORMNOTFOUNDERROR" +Const BASEFORMNOTFOUNDERROR = "BASEFORMNOTFOUNDERROR" + ' SF_Dialog Const DIALOGNOTFOUNDERROR = "DIALOGNOTFOUNDERROR" Const DIALOGDEADERROR = "DIALOGDEADERROR" @@ -824,6 +830,18 @@ Try: sMessage = sLocation _ & "\n" & "\n" & .GetText("OFFSETADDRESS", pvArgs(0), pvArgs(1), pvArgs(2), pvArgs(3), pvArgs(4) _ , pvArgs(5), pvArgs(6), pvArgs(7), pvArgs(8), pvArgs(9), pvArgs(10), pvArgs(11)) + Case FORMDEADERROR ' SF_Form._IsStillAlive(FormName, DocumentName) + sMessage = sLocation _ + & "\n" & "\n" & .GetText("FORMDEAD", pvArgs(0), pvArgs(1)) + Case CALCFORMNOTFOUNDERROR ' SF_Calc.Forms(Index, SheetName, Document) + sMessage = sLocation _ + & "\n" & "\n" & .GetText("CALCFORMNOTFOUND", pvArgs(0), pvArgs(1), pvArgs(2)) + Case WRITERFORMNOTFOUNDERROR ' SF_Document.Forms(Index, Document) + sMessage = sLocation _ + & "\n" & "\n" & .GetText("WRITERFORMNOTFOUND", pvArgs(0), pvArgs(1)) + Case BASEFORMNOTFOUNDERROR ' SF_Base.Forms(Index, FormDocument, BaseDocument) + sMessage = sLocation _ + & "\n" & "\n" & .GetText("BASEFORMNOTFOUND", pvArgs(0), pvArgs(1), pvArgs(2)) Case DIALOGNOTFOUNDERROR ' SF_Dialog._NewDialog(Service, DialogName, WindowName) sMessage = sLocation _ & "\n" & "\n" & .GetText("DIALOGNOTFOUND", pvArgs(0), pvArgs(1), pvArgs(2), pvArgs(3), pvArgs(4) _ diff --git a/wizards/source/scriptforge/SF_Root.xba b/wizards/source/scriptforge/SF_Root.xba index 74154285f551..07ec5acfca8d 100644 --- a/wizards/source/scriptforge/SF_Root.xba +++ b/wizards/source/scriptforge/SF_Root.xba @@ -725,6 +725,44 @@ Try: & "%11: An identifier\n" _ & "%12: A file name" _ ) + ' SF_Form._IsStillAlive + .AddText( Context := "FORMDEAD" _ + , MsgId := "The requested action could not be executed because the form is not open or the document was closed inadvertently.\n\n" _ + & "The concerned form is '%1' in document '%2'." _ + , Comment := "SF_Dialog._IsStillAlive error message\n" _ + & "%1: An identifier" _ + & "%2: A file name" _ + ) + ' SF_Calc.Forms + .AddText( Context := "CALCFORMNOTFOUND" _ + , MsgId := "The requested form could not be found in the Calc sheet. The given index is off-limits.\n\n" _ + & "The concerned Calc document is '%3'.\n\n" _ + & "The name of the sheet = '%2'\n" _ + & "The index = %1" _ + , Comment := "SF_Form determination\n" _ + & "%1: A number\n" _ + & "%2: A sheet name\n" _ + & "%3: A file name" _ + ) + ' SF_Document.Forms + .AddText( Context := "WRITERFORMNOTFOUND" _ + , MsgId := "The requested form could not be found in the Writer document. The given index is off-limits.\n\n" _ + & "The concerned Writer document is '%2'.\n\n" _ + & "The index = %1" _ + , Comment := "SF_Form determination\n" _ + & "%1: A number\n" _ + & "%2: A file name" _ + ) + ' SF_Base.Forms + .AddText( Context := "BASEFORMNOTFOUND" _ + , MsgId := "The requested form could not be found in the form document '%2'. The given index is off-limits.\n\n" _ + & "The concerned Base document is '%3'.\n\n" _ + & "The index = %1" _ + , Comment := "SF_Form determination\n" _ + & "%1: A number\n" _ + & "%2: A string\n" _ + & "%3: A file name" _ + ) ' SF_Dialog._NewDialog .AddText( Context := "DIALOGNOTFOUND" _ , MsgId := "The requested dialog could not be located in the given container or library.\n" _ diff --git a/wizards/source/scriptforge/SF_Utils.xba b/wizards/source/scriptforge/SF_Utils.xba index 80c939b697bd..22ad2dbceaab 100644 --- a/wizards/source/scriptforge/SF_Utils.xba +++ b/wizards/source/scriptforge/SF_Utils.xba @@ -226,6 +226,8 @@ Dim sHeader As String ' The specific header to insert Try: With _SF_ + If Not IsNull(.Interface) Then .Interface.Dispose() + ._LoadLocalizedInterface(psMode := "ADDTEXT") ' Force reload of labels from the code .Interface.ExportToPOTFile(FileName, Header := sHeader) End With diff --git a/wizards/source/scriptforge/po/ScriptForge.pot b/wizards/source/scriptforge/po/ScriptForge.pot index ea7209881cb7..9e39b5da6896 100644 --- a/wizards/source/scriptforge/po/ScriptForge.pot +++ b/wizards/source/scriptforge/po/ScriptForge.pot @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://bugs.libreoffice.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&component=UI\n" -"POT-Creation-Date: 2020-12-06 12:16:30\n" +"POT-Creation-Date: 2020-12-15 15:57:29\n" "PO-Revision-Date: YYYY-MM-DD HH:MM:SS\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <EMAIL@ADDRESS>\n" @@ -465,7 +465,7 @@ msgstr "" #. SF_Session.ExecuteBasicScript error message #. %1: An identifier #. %2: A string -#. %3: A number +#. %3: A (long) string #, kde-format msgctxt "SCRIPTEXEC" msgid "" @@ -726,6 +726,62 @@ msgid "" "« %11 » = %12" msgstr "" +#. SF_Dialog._IsStillAlive error message +#. %1: An identifier%2: A file name +#, kde-format +msgctxt "FORMDEAD" +msgid "" +"The requested action could not be executed because the form is not " +"open or the document was closed inadvertently.\n" +"\n" +"The concerned form is '%1' in document '%2'." +msgstr "" + +#. SF_Form determination +#. %1: A number +#. %2: A sheet name +#. %3: A file name +#, kde-format +msgctxt "CALCFORMNOTFOUND" +msgid "" +"The requested form could not be found in the Calc sheet. The given " +"index is off-limits.\n" +"\n" +"The concerned Calc document is '%3'.\n" +"\n" +"The name of the sheet = '%2'\n" +"The index = %1" +msgstr "" + +#. SF_Form determination +#. %1: A number +#. %2: A file name +#, kde-format +msgctxt "WRITERFORMNOTFOUND" +msgid "" +"The requested form could not be found in the Writer document. The " +"given index is off-limits.\n" +"\n" +"The concerned Writer document is '%2'.\n" +"\n" +"The index = %1" +msgstr "" + +#. SF_Form determination +#. %1: A number +#. %2: A string +#. %3: A file name +#, kde-format +msgctxt "BASEFORMNOTFOUND" +msgid "" +"The requested form could not be found in the form document '%2'. The " +"given index is off-limits.\n" +"\n" +"The concerned Base document is '%3'.\n" +"\n" +"The index = %1" +msgstr "" + #. SF_Dialog creation #. %1: An identifier #. %2: A string @@ -766,7 +822,8 @@ msgstr "" msgctxt "CONTROLTYPE" msgid "" "The control '%1' in dialog '%2' is of type '%3'.\n" -"The property or method '%4' is not applicable on that type of dialog controls." +"The property or method '%4' is not applicable on that type of dialog " +"controls." msgstr "" #. SF_DialogControl add line in textbox @@ -798,4 +855,4 @@ msgid "" "Check its syntax, table and/or field names, ...\n" "\n" "SQL Statement : « %1 »" -msgstr "" +msgstr ""
\ No newline at end of file diff --git a/wizards/source/scriptforge/po/en.po b/wizards/source/scriptforge/po/en.po index ea7209881cb7..9e39b5da6896 100644 --- a/wizards/source/scriptforge/po/en.po +++ b/wizards/source/scriptforge/po/en.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://bugs.libreoffice.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&component=UI\n" -"POT-Creation-Date: 2020-12-06 12:16:30\n" +"POT-Creation-Date: 2020-12-15 15:57:29\n" "PO-Revision-Date: YYYY-MM-DD HH:MM:SS\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <EMAIL@ADDRESS>\n" @@ -465,7 +465,7 @@ msgstr "" #. SF_Session.ExecuteBasicScript error message #. %1: An identifier #. %2: A string -#. %3: A number +#. %3: A (long) string #, kde-format msgctxt "SCRIPTEXEC" msgid "" @@ -726,6 +726,62 @@ msgid "" "« %11 » = %12" msgstr "" +#. SF_Dialog._IsStillAlive error message +#. %1: An identifier%2: A file name +#, kde-format +msgctxt "FORMDEAD" +msgid "" +"The requested action could not be executed because the form is not " +"open or the document was closed inadvertently.\n" +"\n" +"The concerned form is '%1' in document '%2'." +msgstr "" + +#. SF_Form determination +#. %1: A number +#. %2: A sheet name +#. %3: A file name +#, kde-format +msgctxt "CALCFORMNOTFOUND" +msgid "" +"The requested form could not be found in the Calc sheet. The given " +"index is off-limits.\n" +"\n" +"The concerned Calc document is '%3'.\n" +"\n" +"The name of the sheet = '%2'\n" +"The index = %1" +msgstr "" + +#. SF_Form determination +#. %1: A number +#. %2: A file name +#, kde-format +msgctxt "WRITERFORMNOTFOUND" +msgid "" +"The requested form could not be found in the Writer document. The " +"given index is off-limits.\n" +"\n" +"The concerned Writer document is '%2'.\n" +"\n" +"The index = %1" +msgstr "" + +#. SF_Form determination +#. %1: A number +#. %2: A string +#. %3: A file name +#, kde-format +msgctxt "BASEFORMNOTFOUND" +msgid "" +"The requested form could not be found in the form document '%2'. The " +"given index is off-limits.\n" +"\n" +"The concerned Base document is '%3'.\n" +"\n" +"The index = %1" +msgstr "" + #. SF_Dialog creation #. %1: An identifier #. %2: A string @@ -766,7 +822,8 @@ msgstr "" msgctxt "CONTROLTYPE" msgid "" "The control '%1' in dialog '%2' is of type '%3'.\n" -"The property or method '%4' is not applicable on that type of dialog controls." +"The property or method '%4' is not applicable on that type of dialog " +"controls." msgstr "" #. SF_DialogControl add line in textbox @@ -798,4 +855,4 @@ msgid "" "Check its syntax, table and/or field names, ...\n" "\n" "SQL Statement : « %1 »" -msgstr "" +msgstr ""
\ No newline at end of file |