sw/qa/extras/layout/layout5.cxx     |   28 ++++++++++++++++++++++++++++
 sw/source/uibase/shells/txtattr.cxx |    3 ++-
 2 files changed, 30 insertions(+), 1 deletion(-)

New commits:
commit 13c6bc02d4c60e6aa35ae2145db431cfe8ae6dba
Author:     Jonathan Clark <[email protected]>
AuthorDate: Wed Oct 15 10:28:23 2025 -0600
Commit:     Adolfo Jayme Barrientos <[email protected]>
CommitDate: Mon Oct 20 16:58:47 2025 +0200

    tdf#72341 sw: Make inc/dec font size affect all scripts
    
    This change updates the FN_GROW_FONT_SIZE and FN_SHRINK_FONT_SIZE
    handlers to scale fonts for all script types, even if the
    currently-selected text does not contain a particular type.
    
    This fixes the reported issue that bullets in RTL context are not
    resized if a selected list item does not contain CTL characters. This
    also fixes the broader issue of inserted text not reflecting earlier
    size changes, simply because the script type for that inserted text
    wasn't present at the time.
    
    Change-Id: I881f0b90b5c3aecbbf2e40ee2ad6758de9c5bad3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192459
    Reviewed-by: Jonathan Clark <[email protected]>
    Tested-by: Jenkins
    Signed-off-by: Xisco Fauli <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192725
    Reviewed-by: Adolfo Jayme Barrientos <[email protected]>

diff --git a/sw/qa/extras/layout/layout5.cxx b/sw/qa/extras/layout/layout5.cxx
index 9dbc28722f99..accfdb6d41b2 100644
--- a/sw/qa/extras/layout/layout5.cxx
+++ b/sw/qa/extras/layout/layout5.cxx
@@ -1973,6 +1973,34 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter5, testTdf167540)
     verify_me();
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter5, testTdf72341GrowAllScripts)
+{
+    createSwDoc();
+
+    auto* pWrtShell = getSwDocShell()->GetWrtShell();
+
+    pWrtShell->Insert(u"AAAAאאאא"_ustr);
+    pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect*/ false, 7, 
/*bBasicCall*/ false);
+    pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect*/ true, 2, 
/*bBasicCall*/ false);
+
+    for (size_t i = 0; i < 4; ++i)
+    {
+        dispatchCommand(mxComponent, u".uno:Grow"_ustr, {});
+    }
+
+    pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect*/ false, 1, 
/*bBasicCall*/ false);
+    pWrtShell->Insert(u"אאאא"_ustr);
+
+    auto pXmlDoc = parseLayoutDump();
+
+    auto nWidthAlephResized
+        = getXPath(pXmlDoc, "//SwLineLayout/SwMultiPortion[1]", 
"width").toInt32();
+    auto nWidthAlephInitial
+        = getXPath(pXmlDoc, "//SwLineLayout/SwMultiPortion[2]", 
"width").toInt32();
+
+    CPPUNIT_ASSERT_GREATER(nWidthAlephInitial, nWidthAlephResized);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/shells/txtattr.cxx 
b/sw/source/uibase/shells/txtattr.cxx
index 083cae765969..eee4503fb501 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -261,7 +261,8 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
             rWrtSh.GetCurAttr( aSetItem.GetItemSet() );
             SfxItemSet aAttrSet( rPool, aSetItem.GetItemSet().GetRanges() );
 
-            SvtScriptType nScriptTypes = rWrtSh.GetScriptType();
+            SvtScriptType nScriptTypes
+                = SvtScriptType::LATIN | SvtScriptType::ASIAN | 
SvtScriptType::COMPLEX;
             const SvxFontHeightItem* pSize( static_cast<const 
SvxFontHeightItem*>(
                                         aSetItem.GetItemOfScript( nScriptTypes 
) ) );
             std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> 
>> vItems;

Reply via email to