diff --git a/sw/qa/extras/layout/layout5.cxx b/sw/qa/extras/layout/layout5.cxx index 8ea10d69accd..15563999ed79 100644 --- a/sw/qa/extras/layout/layout5.cxx +++ b/sw/qa/extras/layout/layout5.cxx @@ -2087,6 +2087,34 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter5, testTdf168116) assertXPath(pXmlDoc, "//body/txt[1]/SwParaPortion/SwLineLayout", 1); } +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( aSetItem.GetItemOfScript( nScriptTypes ) ) ); std::vector >> vItems;