https://bugs.documentfoundation.org/show_bug.cgi?id=173624

            Bug ID: 173624
           Summary: Transliteration service TITLE_CASE only capitalizes
                    first letter of first word
           Product: LibreOffice
           Version: 26.8.0.3 release
          Hardware: Other
                OS: macOS (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Attempting to capitalize each word in a multi-word text string using the
com.sun.star.i18n.Transliteration service, only the very first letter of the
string is capitalized (as in SENTENCE_CASE).

This is possibly related to or a regression of bug 152520.

Steps to Reproduce:
1. The below Basic Sub will demonstrate the problem.

Sub ReproduceTitleCaseBug()
    Dim oLoc as New com.sun.star.lang.Locale
    Dim oTrans as Object
    Dim sampleText As String
    Dim resultText As String

    ' Set up standard locale configuration
    oLoc.Language = "en"
    oLoc.Country = "US"

    ' 1. Initialize the Transliteration service
    oTrans = CreateUnoService("com.sun.star.i18n.Transliteration")

    ' 2. Attempt to load the TITLE_CASE module
    oTrans.loadModuleByImplName("TITLE_CASE", oLoc)

    ' 3. Define a plain string with multiple words
    sampleText = "listening analysis"

    ' 4. Execute transliteration (Start offset 0, spanning the full text
length)
    resultText = oTrans.transliterate(sampleText, 0, Len(sampleText), array())

    ' ===== EXPECTED RESULT =====
    ' The macro should display: "Listening Analysis"
    '
    ' ===== ACTUAL RESULT =====
    ' The macro outputs: "Listening analysis" 
    ' (Only the first word is capitalized; word boundary boundaries fail to
map)
    MsgBox "Original: " & sampleText & Chr(13) & _
        "Result: " & resultText & Chr(13) & _
        "Expected: " & "Listening Analysis"
End Sub


Actual Results:
Only first letter of first word is capitalized.

Expected Results:
All words should be capitalized.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
MacBook Air
Apple M1
macOS Tahoe 26.3.1 (a)

Version: 26.8.0.3 (AARCH64)
Build ID: bce0998afefdbc355585ca324285661a2170ba77
CPU threads: 8; OS: macOS 26.3.1; UI render: Skia/Raster; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to