wizards/source/scriptforge/python/scriptforge.py  |   18 +++----
 wizards/source/scriptforge/python/scriptforge.pyi |    5 +
 wizards/source/sfdatabases/SF_Datasheet.xba       |   52 ++++++++++++++------
 wizards/source/sfdatabases/script.xlb             |    8 +--
 wizards/source/sfdocuments/SF_Base.xba            |    6 ++
 wizards/source/sfdocuments/SF_Calc.xba            |    6 ++
 wizards/source/sfdocuments/SF_Document.xba        |   56 +++++++++++++++-------
 wizards/source/sfdocuments/SF_FormDocument.xba    |    6 ++
 wizards/source/sfdocuments/SF_Writer.xba          |    6 ++
 wizards/source/sfdocuments/script.xlb             |   20 +++----
 10 files changed, 127 insertions(+), 56 deletions(-)

New commits:
commit 970ad633e4fc374798d4f2591b73098d44c0986b
Author:     Jean-Pierre Ledure <j...@ledure.be>
AuthorDate: Mon Feb 3 16:44:35 2025 +0100
Commit:     Jean-Pierre Ledure <j...@ledure.be>
CommitDate: Tue Feb 4 10:16:01 2025 +0100

    ScriptForge (SFDocuments) new MenuHeaders property
    
    The %enuHeaders property returns,
    as an array/tuple of strings the list
    of the menus present in the menubar.
    
    This is a helper for the CreateMenu()
    method:
    - check if the menu exists already to
      avoid duplicates
    - ease the choice of the Before argument
    
    The property is applicable to next classes:
    - Document, and its subclasses
      Base, Calc, Writer, FormDocument
    - Datasheet
    
    The property is made available to Basic
    and Python user scripts.
    
    This new property will require an update
    of the user documentation/help
    
    Change-Id: Ia14daf6c58973e06d576b350e416eb178f70feb3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181065
    Reviewed-by: Jean-Pierre Ledure <j...@ledure.be>
    Tested-by: Jenkins

diff --git a/wizards/source/scriptforge/python/scriptforge.py 
b/wizards/source/scriptforge/python/scriptforge.py
index 3e3e91cfcde2..9cf19e4d85f5 100644
--- a/wizards/source/scriptforge/python/scriptforge.py
+++ b/wizards/source/scriptforge/python/scriptforge.py
@@ -1969,8 +1969,8 @@ class SFDatabases:
         servicename = 'SFDatabases.Datasheet'
         servicesynonyms = ('datasheet', 'sfdatabases.datasheet')
         serviceproperties = dict(ColumnHeaders = 0, CurrentColumn = 1, 
CurrentRow = 1,
-                                 DatabaseFileName = 0, Filter = 2, IsAlive = 
1, LastRow = 0, OrderBy = 2,
-                                 ParentDatabase = 0, Source = 0, SourceType = 
0, XComponent = 0,
+                                 DatabaseFileName = 0, Filter = 2, IsAlive = 
1, LastRow = 0, MenuHeaders = 1,
+                                 OrderBy = 2, ParentDatabase = 0, Source = 0, 
SourceType = 0, XComponent = 0,
                                  XControlModel = 0, XTabControllerModel = 0)
 
         def Activate(self):
@@ -2296,8 +2296,8 @@ class SFDocuments:
         serviceproperties = dict(CustomProperties = 3, Description = 3, 
DocumentProperties = 1,
                                  DocumentType = 0, ExportFilters = 0, 
FileSystem = 0, ImportFilters = 0,
                                  IsAlive = 1, IsBase = 0, IsCalc = 0, IsDraw = 
0, IsFormDocument = 0,
-                                 IsImpress = 0, IsMath = 0, IsWriter = 0, 
Keywords = 3, Readonly = 1,
-                                 StyleFamilies = 1, Subject = 3, Title = 3, 
XComponent = 0,
+                                 IsImpress = 0, IsMath = 0, IsWriter = 0, 
Keywords = 3, MenuHeaders = 1,
+                                 Readonly = 1, StyleFamilies = 1, Subject = 3, 
Title = 3, XComponent = 0,
                                  XDocumentSettings = 0)
 
         @classmethod
@@ -2392,7 +2392,7 @@ class SFDocuments:
         servicesynonyms = ('base', 'scriptforge.base')
         serviceproperties = dict(DocumentType = 0, FileSystem = 0, IsAlive = 
1, IsBase = 0, IsCalc = 0,
                                  IsDraw = 0, IsFormDocument = 0, IsImpress = 
0, IsMath = 0,
-                                 IsWriter = 0, XComponent = 0)
+                                 IsWriter = 0, MenuHeaders = 1, XComponent = 0)
 
         @classmethod
         def ReviewServiceArgs(cls, windowname = ''):
@@ -2451,7 +2451,7 @@ class SFDocuments:
                                  DocumentProperties = 1, DocumentType = 0, 
ExportFilters = 0,
                                  FileSystem = 0, ImportFilters = 0, IsAlive = 
1, IsBase = 0, IsCalc = 0,
                                  IsDraw = 0, IsFormDocument = 0, IsImpress = 
0, IsMath = 0,
-                                 IsWriter = 0, Keywords = 3, Readonly = 1, 
Sheets = 1,
+                                 IsWriter = 0, Keywords = 3, MenuHeaders = 1, 
Readonly = 1, Sheets = 1,
                                  StyleFamilies = 0, Subject = 3, Title = 3, 
XComponent = 0,
                                  XDocumentSettings = 0)
 
@@ -2815,7 +2815,7 @@ class SFDocuments:
         servicesynonyms = ('formdocument', 'sfdocuments.formdocument')
         serviceproperties = dict(DocumentType = 0, FileSystem = 0, IsAlive = 
1, IsBase = 0, IsCalc = 0,
                                  IsDraw = 0, IsFormDocument = 0, IsImpress = 
0, IsMath = 0,
-                                 IsWriter = 0, Readonly = 0, StyleFamilies = 
0, XComponent = 0,
+                                 IsWriter = 0, MenuHeaders = 1, Readonly = 0, 
StyleFamilies = 0, XComponent = 0,
                                  XDocumentSettings = 0)
 
         @classmethod
@@ -2854,8 +2854,8 @@ class SFDocuments:
         serviceproperties = dict(CustomProperties = 3, Description = 3, 
DocumentProperties = 1,
                                  DocumentType = 0, ExportFilters = 0, 
FileSystem = 0, ImportFilters = 0,
                                  IsAlive = 1, IsBase = 0, IsCalc = 0, IsDraw = 
0, IsFormDocument = 0,
-                                 IsImpress = 0, IsMath = 0, IsWriter = 0, 
Keywords = 3, Readonly = 1,
-                                 StyleFamilies = 1, Subject = 3, Title = 3, 
XComponent = 0,
+                                 IsImpress = 0, IsMath = 0, IsWriter = 0, 
Keywords = 3, MenuHeaders = 1,
+                                 Readonly = 1, StyleFamilies = 1, Subject = 3, 
Title = 3, XComponent = 0,
                                  XDocumentSettings = 0)
 
         @classmethod
diff --git a/wizards/source/scriptforge/python/scriptforge.pyi 
b/wizards/source/scriptforge/python/scriptforge.pyi
index b04fa691b6ac..2d34c0f32e31 100644
--- a/wizards/source/scriptforge/python/scriptforge.pyi
+++ b/wizards/source/scriptforge/python/scriptforge.pyi
@@ -3129,6 +3129,8 @@ class SFDatabases:
         """ Returns True when the datasheet component has not been closed by 
the user.  """
         LastRow: int
         """ Returns the number of rows in the datasheet.    """
+        MenuHeaders: Tuple[str, ...]
+        """ Returns the list, as a tuple of strings, of the menus present in 
the menubar.   """
         OrderBy: str
         """ Specifies the order in which records are shown expressed as the 
``ORDER BY`` clause of a ``SQL`` query
         without the ``ORDER BY`` keyword. If an empty string is specified then 
the active ``OrderBy`` is removed.   """
@@ -4466,6 +4468,8 @@ class SFDocuments:
         Keywords: str
         """ Get/set the ``Keywords`` property of the document as a 
comma-separated list of keywords.
         This property is not applicable to ``Base`` documents. """
+        MenuHeaders: Tuple[str, ...]
+        """ Returns the list, as a tuple of strings, of the menus present in 
the menubar.   """
         Readonly: bool
         """ ``True`` if the document is actually in read-only mode.
         This property is not applicable to ``Base`` documents. """
@@ -4933,7 +4937,6 @@ class SFDocuments:
                 """
             ...
 
-        # pylint: disable=arguments-renamed
         def PrintOut(self, formdocument: str, pages: str = ..., copies: int = 
...) -> bool:
             """
                 Send the content of the form document to the printer.
diff --git a/wizards/source/sfdatabases/SF_Datasheet.xba 
b/wizards/source/sfdatabases/SF_Datasheet.xba
index c505dd45f104..ce7a38fab7c0 100644
--- a/wizards/source/sfdatabases/SF_Datasheet.xba
+++ b/wizards/source/sfdatabases/SF_Datasheet.xba
@@ -159,6 +159,12 @@ Property Get LastRow() As Long
        LastRow = _PropertyGet(&quot;LastRow&quot;)
 End Property   &apos;  SFDatabases.SF_Datasheet.LastRow
 
+REM 
-----------------------------------------------------------------------------
+Property Get MenuHeaders() As Variant
+&apos;&apos;&apos;     Returns the list, as an array of strings, of the menu 
headers present in the menubar
+       MenuHeaders = _PropertyGet(&quot;MenuHeaders&quot;)
+End Property   &apos;  SFDocuments.SF_Datasheet.MenuHeaders
+
 REM 
-----------------------------------------------------------------------------
 Property Get OrderBy() As Variant
 &apos;&apos;&apos;     The Order is a SQL ORDER BY clause without the ORDER BY 
keywords
@@ -586,6 +592,7 @@ Public Function Properties() As Variant
                                        , &quot;Filter&quot; _
                                        , &quot;IsAlive&quot; _
                                        , &quot;LastRow&quot; _
+                                       , &quot;MenuHeaders&quot; _
                                        , &quot;OrderBy&quot; _
                                        , &quot;ParentDatabase&quot; _
                                        , &quot;Source&quot; _
@@ -834,6 +841,9 @@ Private Function _PropertyGet(Optional ByVal psProperty As 
String) As Variant
 &apos;&apos;&apos;             psProperty: the name of the property
 
 Dim lRow As Long                               &apos;  Actual row number
+Dim oMenuBar As Object                         &apos;  
com.sun.star.awt.XMenuBar
+Dim sMenus As String                           &apos;  List of menus in the 
menubar
+Dim i As Long, j As Long
 Dim cstThisSub As String
 Const cstSubArgs = &quot;&quot;
 
@@ -845,20 +855,20 @@ Const cstSubArgs = &quot;&quot;
                If Not _IsStillAlive() Then GoTo Finally
        End If
 
-       Select Case psProperty
-               Case &quot;ColumnHeaders&quot;
+       Select Case UCase(psProperty)
+               Case UCase(&quot;ColumnHeaders&quot;)
                        _PropertyGet = _ColumnHeaders
-               Case &quot;CurrentColumn&quot;
+               Case UCase(&quot;CurrentColumn&quot;)
                        _PropertyGet = 
_ColumnHeaders(_ControlView.getCurrentColumnPosition())
-               Case &quot;CurrentRow&quot;
+               Case UCase(&quot;CurrentRow&quot;)
                        _PropertyGet = _TabControllerModel.Row
-               Case &quot;DatabaseFileName&quot;
+               Case UCase(&quot;DatabaseFileName&quot;)
                        _PropertyGet = 
ScriptForge.SF_FileSystem._ConvertFromUrl(_BaseFileName)
-               Case &quot;Filter&quot;
+               Case UCase(&quot;Filter&quot;)
                        _PropertyGet = _TabControllerModel.Filter
-               Case &quot;IsAlive&quot;
+               Case UCase(&quot;IsAlive&quot;)
                        _PropertyGet = _IsStillAlive(False)
-               Case &quot;LastRow&quot;
+               Case UCase(&quot;LastRow&quot;)
                        With _TabControllerModel
                                If .IsRowCountFinal Then
                                        _PropertyGet = .RowCount
@@ -873,19 +883,31 @@ Const cstSubArgs = &quot;&quot;
                                        End If
                                End If
                        End With
-               Case &quot;OrderBy&quot;
+               Case UCase(&quot;MenuHeaders&quot;)
+                       Set oMenuBar = 
_Component.Frame.LayoutManager.getElement(&quot;private:resource/menubar/menubar&quot;).XMenuBar
+                       &apos;  Join all menu headers, then split the whole 
string
+                       sMenus = &quot;&quot;
+                       With oMenuBar
+                               For i = 0 To .ItemCount - 1
+                                       j = .getItemId(i)
+                                       sMenus = sMenus &amp; .getItemText(j) 
&amp; &quot;,&quot;
+                               Next i
+                       End With
+                       If Len(sMenus) &gt; 0 Then sMenus = Left(sMenus, 
Len(sMenus) - 1)               &apos;  Suppress final comma
+                       _PropertyGet = Split(Replace(sMenus, &quot;~&quot;, 
&quot;&quot;), &quot;,&quot;)
+               Case UCase(&quot;OrderBy&quot;)
                        _PropertyGet = _TabControllerModel.Order
-               Case &quot;ParentDatabase&quot;
+               Case UCase(&quot;ParentDatabase&quot;)
                        Set _PropertyGet = _ParentDatabase
-               Case &quot;Source&quot;
+               Case UCase(&quot;Source&quot;)
                        _PropertyGet = _Command
-               Case &quot;SourceType&quot;
+               Case UCase(&quot;SourceType&quot;)
                        _PropertyGet = _SheetType
-               Case &quot;XComponent&quot;
+               Case UCase(&quot;XComponent&quot;)
                        Set _PropertyGet = _Component
-               Case &quot;XControlModel&quot;
+               Case UCase(&quot;XControlModel&quot;)
                        Set _PropertyGet = _ControlModel
-               Case &quot;XTabControllerModel&quot;
+               Case UCase(&quot;XTabControllerModel&quot;)
                        Set _PropertyGet = _TabControllerModel
                Case Else
                        _PropertyGet = Null
diff --git a/wizards/source/sfdatabases/script.xlb 
b/wizards/source/sfdatabases/script.xlb
index 8e12f56515d5..38571cfa0512 100644
--- a/wizards/source/sfdatabases/script.xlb
+++ b/wizards/source/sfdatabases/script.xlb
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 
1.0//EN" "library.dtd">
 <library:library xmlns:library="http://openoffice.org/2000/library"; 
library:name="SFDatabases" library:readonly="false" 
library:passwordprotected="false">
- <library:element library:name="SF_Register"/>
- <library:element library:name="__License"/>
- <library:element library:name="SF_Database"/>
- <library:element library:name="SF_Datasheet"/>
  <library:element library:name="SF_Dataset"/>
+ <library:element library:name="SF_Datasheet"/>
+ <library:element library:name="SF_Database"/>
+ <library:element library:name="__License"/>
+ <library:element library:name="SF_Register"/>
 </library:library>
\ No newline at end of file
diff --git a/wizards/source/sfdocuments/SF_Base.xba 
b/wizards/source/sfdocuments/SF_Base.xba
index 5c0feaec5c63..f4f58cd17029 100644
--- a/wizards/source/sfdocuments/SF_Base.xba
+++ b/wizards/source/sfdocuments/SF_Base.xba
@@ -695,6 +695,7 @@ Public Function Properties() As Variant
                                        , &quot;IsImpress&quot; _
                                        , &quot;IsMath&quot; _
                                        , &quot;IsWriter&quot; _
+                                       , &quot;MenuHeaders&quot; _
                                        , &quot;XComponent&quot; _
                                        )
 
@@ -881,6 +882,11 @@ REM 
----------------------------------------------------------------------------
 &apos; [_Super].Keywords = pvKeywords
 &apos;End Property     &apos;  SFDocuments.SF_Base.Keywords
 
+REM 
-----------------------------------------------------------------------------
+Property Get MenuHeaders() As Variant
+       MenuHeaders = [_Super].GetProperty(&quot;MenuHeaders&quot;)
+End Property   &apos;  SFDocuments.SF_Base.MenuHeaders
+
 REM 
-----------------------------------------------------------------------------
 &apos;Property Get Readonly() As Variant
 &apos; Readonly = [_Super].GetProperty(&quot;Readonly&quot;)
diff --git a/wizards/source/sfdocuments/SF_Calc.xba 
b/wizards/source/sfdocuments/SF_Calc.xba
index 7bd5e4e8d251..2aef72167281 100644
--- a/wizards/source/sfdocuments/SF_Calc.xba
+++ b/wizards/source/sfdocuments/SF_Calc.xba
@@ -2648,6 +2648,7 @@ Public Function Properties() As Variant
                                        , &quot;LastCell&quot; _
                                        , &quot;LastColumn&quot; _
                                        , &quot;LastRow&quot; _
+                                       , &quot;MenuHeaders&quot; _
                                        , &quot;Range&quot; _
                                        , &quot;Readonly&quot; _
                                        , &quot;Region&quot; _
@@ -3762,6 +3763,11 @@ Property Let Keywords(Optional ByVal pvKeywords As 
Variant)
        [_Super].Keywords = pvKeywords
 End Property   &apos;  SFDocuments.SF_Calc.Keywords
 
+REM 
-----------------------------------------------------------------------------
+Property Get MenuHeaders() As Variant
+       MenuHeaders = [_Super].GetProperty(&quot;MenuHeaders&quot;)
+End Property   &apos;  SFDocuments.SF_Calc.MenuHeaders
+
 REM 
-----------------------------------------------------------------------------
 Property Get Readonly() As Variant
        Readonly = [_Super].GetProperty(&quot;Readonly&quot;)
diff --git a/wizards/source/sfdocuments/SF_Document.xba 
b/wizards/source/sfdocuments/SF_Document.xba
index 0ad019315a5f..4f69c9cb3986 100644
--- a/wizards/source/sfdocuments/SF_Document.xba
+++ b/wizards/source/sfdocuments/SF_Document.xba
@@ -364,6 +364,12 @@ Finally:
        Exit Property
 End Property   &apos;  SFDocuments.SF_Document.Keywords
 
+REM 
-----------------------------------------------------------------------------
+Property Get MenuHeaders() As Variant
+&apos;&apos;&apos;     Returns the list, as an array of strings, of the menu 
headers present in the menubar
+       MenuHeaders = _PropertyGet(&quot;MenuHeaders&quot;)
+End Property   &apos;  SFDocuments.SF_Document.MenuHeaders
+
 REM 
-----------------------------------------------------------------------------
 Property Get Readonly() As Boolean
 &apos;&apos;&apos;     Returns True if the document must not be modified
@@ -1011,6 +1017,7 @@ Public Function Properties() As Variant
                                        , &quot;IsMath&quot; _
                                        , &quot;IsWriter&quot; _
                                        , &quot;Keywords&quot; _
+                                       , &quot;MenuHeaders&quot; _
                                        , &quot;Readonly&quot; _
                                        , &quot;StyleFamilies&quot; _
                                        , &quot;Subject&quot; _
@@ -2152,6 +2159,9 @@ Private Function _PropertyGet(Optional ByVal psProperty 
As String) As Variant
 Dim oProperties As Object                      &apos;  Document or Custom 
properties
 Dim oTransient As Object                       &apos;  
com.sun.star.frame.TransientDocumentsDocumentContentFactory
 Dim oContent As Object                         &apos;  
com.sun.star.comp.ucb.TransientDocumentsContent
+Dim oMenuBar As Object                         &apos;  
com.sun.star.awt.XMenuBar
+Dim sMenus As String                           &apos;  List of menus in the 
menubar
+Dim i As Long, j As Long
 Dim cstThisSub As String
 Const cstSubArgs = &quot;&quot;
 
@@ -2167,48 +2177,60 @@ Const cstSubArgs = &quot;&quot;
                If Not _IsStillAlive() Then GoTo Finally
        End If
 
-       Select Case psProperty
-               Case &quot;CustomProperties&quot;
+       Select Case UCase(psProperty)
+               Case UCase(&quot;CustomProperties&quot;)
                        _CustomProperties = 
CreateScriptService(&quot;Dictionary&quot;, True)   &apos;  Always reload as 
updates could have been done manually by user
                                                                                
                                                                &apos;  (with 
case-sensitive comparison of keys)
                        
_CustomProperties.ImportFromPropertyValues(_Component.getDocumentProperties().UserDefinedProperties.getPropertyValues)
                        _PropertyGet = _CustomProperties
-               Case &quot;Description&quot;
+               Case UCase(&quot;Description&quot;)
                        _PropertyGet = _Component.DocumentProperties.Description
-               Case &quot;DocumentProperties&quot;
+               Case UCase(&quot;DocumentProperties&quot;)
                        _LoadDocumentProperties()       &apos;  Always reload 
as updates could have been done manually by user
                        Set _PropertyGet = _DocumentProperties
-               Case &quot;DocumentType&quot;
+               Case UCase(&quot;DocumentType&quot;)
                        _PropertyGet = _DocumentType
-               Case &quot;ExportFilters&quot;
+               Case UCase(&quot;ExportFilters&quot;)
                        _PropertyGet = _GetFilterNames(True)
-               Case &quot;FileSystem&quot;
+               Case UCase(&quot;FileSystem&quot;)
                        &apos;  Natural choice would have been to use the 
component.RunTimeUID property
                        &apos;  However it is optional in the OfficeDocument 
service and not available for Base documents
                        &apos;  Below a more generic alternative derived from 
the get_document_uri() method found in apso.py
                        Set oTransient = 
ScriptForge.SF_Utils._GetUnoService(&quot;TransientDocumentFactory&quot;)
                        Set oContent = 
oTransient.createDocumentContent(_Component)
                        _PropertyGet = 
oContent.getIdentifier().ContentIdentifier &amp; &quot;/&quot;
-               Case &quot;ImportFilters&quot;
+               Case UCase(&quot;ImportFilters&quot;)
                        _PropertyGet = _GetFilterNames(False)
-               Case &quot;IsAlive&quot;
+               Case UCase(&quot;IsAlive&quot;)
                        _PropertyGet = _IsStillAlive(False, False)
-               Case &quot;IsBase&quot;, &quot;IsCalc&quot;, 
&quot;IsDraw&quot;, &quot;IsFormDocument&quot;, &quot;IsImpress&quot;, 
&quot;IsMath&quot;, &quot;IsWriter&quot;
+               Case UCase(&quot;IsBase&quot;), UCase(&quot;IsCalc&quot;), 
UCase(&quot;IsDraw&quot;), UCase(&quot;IsFormDocument&quot;), 
UCase(&quot;IsImpress&quot;), UCase(&quot;IsMath&quot;), 
UCase(&quot;IsWriter&quot;)
                        _PropertyGet = ( Mid(psProperty, 3) = _DocumentType )
-               Case &quot;Keywords&quot;
+               Case UCase(&quot;Keywords&quot;)
                        _PropertyGet = 
Join(_Component.DocumentProperties.Keywords, &quot;, &quot;)
-               Case &quot;Readonly&quot;
+               Case UCase(&quot;MenuHeaders&quot;)
+                       Set oMenuBar = 
_Component.CurrentController.Frame.LayoutManager.getElement(&quot;private:resource/menubar/menubar&quot;).XMenuBar
+                       &apos;  Join all menu headers, then split the whole 
string
+                       sMenus = &quot;&quot;
+                       With oMenuBar
+                               For i = 0 To .ItemCount - 1
+                                       j = .getItemId(i)
+                                       sMenus = sMenus &amp; .getItemText(j) 
&amp; &quot;,&quot;
+                               Next i
+                       End With
+                       If Len(sMenus) &gt; 0 Then sMenus = Left(sMenus, 
Len(sMenus) - 1)               &apos;  Suppress final comma
+                       _PropertyGet = Split(Replace(sMenus, &quot;~&quot;, 
&quot;&quot;), &quot;,&quot;)
+               Case UCase(&quot;Readonly&quot;)
                        _PropertyGet = _Component.isReadonly()
-               Case &quot;StyleFamilies&quot;
+               Case UCase(&quot;StyleFamilies&quot;)
                        If UBound(_StyleFamilies) &lt; 0 Then _StyleFamilies = 
_Component.getStyleFamilies().getElementNames()
                        _PropertyGet = _StyleFamilies
-               Case &quot;Subject&quot;
+               Case UCase(&quot;Subject&quot;)
                        _PropertyGet = _Component.DocumentProperties.Subject
-               Case &quot;Title&quot;
+               Case UCase(&quot;Title&quot;)
                        _PropertyGet = _Component.DocumentProperties.Title
-               Case &quot;XComponent&quot;
+               Case UCase(&quot;XComponent&quot;)
                        Set _PropertyGet = _Component
-               Case &quot;XDocumentSettings&quot;
+               Case UCase(&quot;XDocumentSettings&quot;)
                        With _Component
                                If IsNull(_DocumentSettings) Then
                                        Select Case _DocumentType
diff --git a/wizards/source/sfdocuments/SF_FormDocument.xba 
b/wizards/source/sfdocuments/SF_FormDocument.xba
index 6f055ff359ef..3c05c5fd8d57 100644
--- a/wizards/source/sfdocuments/SF_FormDocument.xba
+++ b/wizards/source/sfdocuments/SF_FormDocument.xba
@@ -430,6 +430,7 @@ Public Function Properties() As Variant
                                        , &quot;IsFormDocument&quot; _
                                        , &quot;IsImpress&quot; _
                                        , &quot;IsMath&quot; _
+                                       , &quot;MenuHeaders&quot; _
                                        , &quot;Readonly&quot; _
                                        , &quot;StyleFamilies&quot; _
                                        , &quot;XComponent&quot; _
@@ -480,6 +481,11 @@ Property Get IsMath() As Boolean
        IsMath = [_Super].GetProperty(&quot;IsMath&quot;)
 End Property   &apos;  SFDocuments.SF_FormDocument.IsMath
 
+REM 
-----------------------------------------------------------------------------
+Property Get MenuHeaders() As Variant
+       MenuHeaders = [_Super].GetProperty(&quot;MenuHeaders&quot;)
+End Property   &apos;  SFDocuments.SF_FormDocument.MenuHeaders
+
 REM 
-----------------------------------------------------------------------------
 Property Get Readonly() As Variant
        Readonly = [_Super].GetProperty(&quot;Readonly&quot;)
diff --git a/wizards/source/sfdocuments/SF_Writer.xba 
b/wizards/source/sfdocuments/SF_Writer.xba
index 38767666300e..307f9f6682c4 100644
--- a/wizards/source/sfdocuments/SF_Writer.xba
+++ b/wizards/source/sfdocuments/SF_Writer.xba
@@ -453,6 +453,7 @@ Public Function Properties() As Variant
                                        , &quot;IsMath&quot; _
                                        , &quot;IsWriter&quot; _
                                        , &quot;Keywords&quot; _
+                                       , &quot;MenuHeaders&quot; _
                                        , &quot;Readonly&quot; _
                                        , &quot;StyleFamilies&quot; _
                                        , &quot;Subject&quot; _
@@ -608,6 +609,11 @@ Property Let Keywords(Optional ByVal pvKeywords As Variant)
        [_Super].Keywords = pvKeywords
 End Property   &apos;  SFDocuments.SF_Writer.Keywords
 
+REM 
-----------------------------------------------------------------------------
+Property Get MenuHeaders() As Variant
+       MenuHeaders = [_Super].GetProperty(&quot;MenuHeaders&quot;)
+End Property   &apos;  SFDocuments.SF_Writer.MenuHeaders
+
 REM 
-----------------------------------------------------------------------------
 Property Get Readonly() As Variant
        Readonly = [_Super].GetProperty(&quot;Readonly&quot;)
diff --git a/wizards/source/sfdocuments/script.xlb 
b/wizards/source/sfdocuments/script.xlb
index 8188fd53bb1f..3d2264bd3f6d 100644
--- a/wizards/source/sfdocuments/script.xlb
+++ b/wizards/source/sfdocuments/script.xlb
@@ -1,15 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 
1.0//EN" "library.dtd">
 <library:library xmlns:library="http://openoffice.org/2000/library"; 
library:name="SFDocuments" library:readonly="false" 
library:passwordprotected="false">
- <library:element library:name="SF_Chart"/>
- <library:element library:name="SF_FormDocument"/>
- <library:element library:name="SF_FormControl"/>
- <library:element library:name="SF_Base"/>
- <library:element library:name="SF_Register"/>
- <library:element library:name="SF_Writer"/>
- <library:element library:name="SF_Calc"/>
- <library:element library:name="SF_Document"/>
- <library:element library:name="SF_DocumentListener"/>
- <library:element library:name="SF_Form"/>
  <library:element library:name="__License"/>
+ <library:element library:name="SF_Form"/>
+ <library:element library:name="SF_DocumentListener"/>
+ <library:element library:name="SF_Document"/>
+ <library:element library:name="SF_Calc"/>
+ <library:element library:name="SF_Writer"/>
+ <library:element library:name="SF_Register"/>
+ <library:element library:name="SF_Base"/>
+ <library:element library:name="SF_FormControl"/>
+ <library:element library:name="SF_FormDocument"/>
+ <library:element library:name="SF_Chart"/>
 </library:library>
\ No newline at end of file

Reply via email to