diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index 8ab678c83f6f..9d634d879ca2 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -266,6 +266,8 @@ private: std::unique_ptr m_xExtHyphenAfterBox; std::unique_ptr m_xCompoundBeforeText; std::unique_ptr m_xExtCompoundHyphenBeforeBox; + std::unique_ptr m_xCompoundAfterText; + std::unique_ptr m_xExtCompoundHyphenAfterBox; std::unique_ptr m_xMaxHyphenLabel; std::unique_ptr m_xMaxHyphenEdit; std::unique_ptr m_xMinWordLabel; diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 3ed39ff47ac6..7133dd5017ad 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1868,6 +1868,7 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) m_xExtHyphenBeforeBox->get_value_changed_from_saved() || m_xExtHyphenAfterBox->get_value_changed_from_saved() || m_xExtCompoundHyphenBeforeBox->get_value_changed_from_saved() || + m_xExtCompoundHyphenAfterBox->get_value_changed_from_saved() || m_xMaxHyphenEdit->get_value_changed_from_saved() || m_xMinWordLength->get_value_changed_from_saved() || m_aHyphenZone.get_value_changed_from_saved() || @@ -1892,6 +1893,7 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) aHyphen.GetMinLead() = static_cast(m_xExtHyphenBeforeBox->get_value()); aHyphen.GetMinTrail() = static_cast(m_xExtHyphenAfterBox->get_value()); aHyphen.GetCompoundMinLead() = static_cast(m_xExtCompoundHyphenBeforeBox->get_value()); + aHyphen.GetCompoundMinTrail() = static_cast(m_xExtCompoundHyphenAfterBox->get_value()); aHyphen.GetMinWordLength() = static_cast(m_xMinWordLength->get_value()); } aHyphen.GetMaxHyphens() = static_cast(m_xMaxHyphenEdit->get_value()); @@ -2152,6 +2154,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) m_xExtHyphenBeforeBox->set_value(rHyphen.GetMinLead()); m_xExtHyphenAfterBox->set_value(rHyphen.GetMinTrail()); m_xExtCompoundHyphenBeforeBox->set_value(rHyphen.GetCompoundMinLead()); + m_xExtCompoundHyphenAfterBox->set_value(rHyphen.GetCompoundMinTrail()); m_xMaxHyphenEdit->set_value(rHyphen.GetMaxHyphens()); m_xMinWordLength->set_value(rHyphen.GetMinWordLength()); m_aHyphenZone.SetFieldUnit(eFUnit); @@ -2200,9 +2203,11 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) m_xExtHyphenBeforeBox->set_sensitive(bEnable); m_xExtHyphenAfterBox->set_sensitive(bEnable); m_xExtCompoundHyphenBeforeBox->set_sensitive(bEnable); + m_xExtCompoundHyphenAfterBox->set_sensitive(bEnable); m_xBeforeText->set_sensitive(bEnable); m_xAfterText->set_sensitive(bEnable); m_xCompoundBeforeText->set_sensitive(bEnable); + m_xCompoundAfterText->set_sensitive(bEnable); m_xMaxHyphenLabel->set_sensitive(bEnable); m_xMaxHyphenEdit->set_sensitive(bEnable); m_xMinWordLabel->set_sensitive(bEnable); @@ -2499,6 +2504,7 @@ void SvxExtParagraphTabPage::ChangesApplied() m_xExtHyphenBeforeBox->save_value(); m_xExtHyphenAfterBox->save_value(); m_xExtCompoundHyphenBeforeBox->save_value(); + m_xExtCompoundHyphenAfterBox->save_value(); m_xMaxHyphenEdit->save_value(); m_xMinWordLength->save_value(); m_aHyphenZone.save_value(); @@ -2560,6 +2566,8 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage(weld::Container* pPage, weld::Dia , m_xExtHyphenAfterBox(m_xBuilder->weld_spin_button(u"spinLineBegin"_ustr)) , m_xCompoundBeforeText(m_xBuilder->weld_label(u"labelCompoundLineEnd"_ustr)) , m_xExtCompoundHyphenBeforeBox(m_xBuilder->weld_spin_button(u"spinCompoundLineEnd"_ustr)) + , m_xCompoundAfterText(m_xBuilder->weld_label(u"labelCompoundLineBegin"_ustr)) + , m_xExtCompoundHyphenAfterBox(m_xBuilder->weld_spin_button(u"spinCompoundLineBegin"_ustr)) , m_xMaxHyphenLabel(m_xBuilder->weld_label(u"labelMaxNum"_ustr)) , m_xMaxHyphenEdit(m_xBuilder->weld_spin_button(u"spinMaxNum"_ustr)) , m_xMinWordLabel(m_xBuilder->weld_label(u"labelMinLen"_ustr)) @@ -2652,7 +2660,9 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage(weld::Container* pPage, weld::Dia m_xAfterText->set_sensitive(false); m_xExtHyphenAfterBox->set_sensitive(false); m_xCompoundBeforeText->set_sensitive(false); + m_xCompoundAfterText->set_sensitive(false); m_xExtCompoundHyphenBeforeBox->set_sensitive(false); + m_xExtCompoundHyphenAfterBox->set_sensitive(false); m_xMaxHyphenLabel->set_sensitive(false); m_xMaxHyphenEdit->set_sensitive(false); m_xMinWordLabel->set_sensitive(false); @@ -2804,7 +2814,9 @@ void SvxExtParagraphTabPage::HyphenClickHdl() m_xAfterText->set_sensitive(bEnable); m_xExtHyphenAfterBox->set_sensitive(bEnable); m_xCompoundBeforeText->set_sensitive(bEnable); + m_xCompoundAfterText->set_sensitive(bEnable); m_xExtCompoundHyphenBeforeBox->set_sensitive(bEnable); + m_xExtCompoundHyphenAfterBox->set_sensitive(bEnable); m_xMaxHyphenLabel->set_sensitive(bEnable); m_xMaxHyphenEdit->set_sensitive(bEnable); m_xMinWordLabel->set_sensitive(bEnable); diff --git a/cui/uiconfig/ui/textflowpage.ui b/cui/uiconfig/ui/textflowpage.ui index 99dd498d15d3..c61e3b96871d 100644 --- a/cui/uiconfig/ui/textflowpage.ui +++ b/cui/uiconfig/ui/textflowpage.ui @@ -54,8 +54,8 @@ 10 - 2 - 9 + 0 + 99 2 1 10 @@ -80,6 +80,13 @@ 1 10 + + 0 + 99 + 2 + 1 + 10 + True @@ -141,7 +148,7 @@ 0 - 5 + 6 @@ -161,7 +168,7 @@ 0 - 4 + 5 @@ -175,7 +182,7 @@ True - Enter the minimum number of characters of a compound word to leave at the end of the line before a hyphen is inserted. + Enter the minimum number of characters of a compound word constituent to leave at the end of the line before a hyphen is inserted. @@ -184,6 +191,26 @@ 3 + + + True + True + start + 25 + True + adjustment14 + True + + + Enter the minimum number of characters of a compound word constituent that must appear at the beginning of the line after the hyphen. + + + + + 0 + 4 + + True @@ -266,6 +293,20 @@ 3 + + + True + False + start + C_ompound characters at line begin + True + spinCompoundLineBegin + + + 1 + 4 + + True @@ -277,7 +318,7 @@ 1 - 4 + 5 @@ -291,7 +332,7 @@ 1 - 5 + 6 diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 885ad3c9172f..fccc0aa00fcf 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -630,7 +630,8 @@ SvxHyphenZoneItem::SvxHyphenZoneItem( const bool bHyph, const sal_uInt16 nId ) : nTextHyphenZoneSpread(0), nKeepType(css::text::ParagraphHyphenationKeepType::COLUMN), bKeepLine(false), - nCompoundMinLead(0) + nCompoundMinLead(2), + nCompoundMinTrail(2) { } @@ -688,6 +689,9 @@ bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) con case MID_HYPHEN_COMPOUND_MIN_LEAD: rVal <<= static_cast(nCompoundMinLead); break; + case MID_HYPHEN_COMPOUND_MIN_TRAIL: + rVal <<= static_cast(nCompoundMinTrail); + break; } return true; } @@ -755,6 +759,9 @@ bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) case MID_HYPHEN_COMPOUND_MIN_LEAD: nCompoundMinLead = static_cast(nNewVal); break; + case MID_HYPHEN_COMPOUND_MIN_TRAIL: + nCompoundMinTrail = static_cast(nNewVal); + break; } return true; } @@ -772,6 +779,7 @@ bool SvxHyphenZoneItem::operator==( const SfxPoolItem& rAttr ) const && rItem.nMinLead == nMinLead && rItem.nMinTrail == nMinTrail && rItem.nCompoundMinLead == nCompoundMinLead + && rItem.nCompoundMinTrail == nCompoundMinTrail && rItem.nMaxHyphens == nMaxHyphens && rItem.nMinWordLength == nMinWordLength && rItem.nTextHyphenZone == nTextHyphenZone @@ -808,6 +816,7 @@ bool SvxHyphenZoneItem::GetPresentation OUString::number( nMinLead ) + cpDelimTmp + OUString::number( nMinTrail ) + cpDelimTmp + OUString::number( nCompoundMinLead ) + cpDelimTmp + + OUString::number( nCompoundMinTrail ) + cpDelimTmp + OUString::number( nMaxHyphens ) + cpDelimTmp + OUString::number( nMinWordLength ) + cpDelimTmp + GetMetricText( nTextHyphenZone, eCoreUnit, ePresUnit, &rIntl ) + @@ -856,6 +865,8 @@ bool SvxHyphenZoneItem::GetPresentation cpDelimTmp + EditResId(RID_SVXITEMS_HYPHEN_COMPOUND_MINLEAD).replaceAll("%1", OUString::number(nCompoundMinLead)) + cpDelimTmp + + EditResId(RID_SVXITEMS_HYPHEN_COMPOUND_MINTRAIL).replaceAll("%1", OUString::number(nCompoundMinTrail)) + + cpDelimTmp + EditResId(RID_SVXITEMS_HYPHEN_MAX).replaceAll("%1", OUString::number(nMaxHyphens)) + cpDelimTmp + EditResId(RID_SVXITEMS_HYPHEN_MINWORDLEN).replaceAll("%1", OUString::number(nMinWordLength)); diff --git a/include/editeng/editrids.hrc b/include/editeng/editrids.hrc index 83713f7d15cd..7990ae9a1e10 100644 --- a/include/editeng/editrids.hrc +++ b/include/editeng/editrids.hrc @@ -242,6 +242,7 @@ #define RID_SVXITEMS_HYPHEN_MINLEAD NC_("RID_SVXITEMS_HYPHEN_MINLEAD", "%1 characters at end of line") #define RID_SVXITEMS_HYPHEN_MINTRAIL NC_("RID_SVXITEMS_HYPHEN_MINTRAIL", "%1 characters at beginning of line") #define RID_SVXITEMS_HYPHEN_COMPOUND_MINLEAD NC_("RID_SVXITEMS_HYPHEN_COMPOUND_MINLEAD", "%1 compound word characters at end of line") +#define RID_SVXITEMS_HYPHEN_COMPOUND_MINTRAIL NC_("RID_SVXITEMS_HYPHEN_COMPOUND_MINTRAIL", "%1 compound word characters at beginning of line") #define RID_SVXITEMS_HYPHEN_MAX NC_("RID_SVXITEMS_HYPHEN_MAX", "%1 hyphens") #define RID_SVXITEMS_HYPHEN_NO_CAPS_TRUE NC_("RID_SVXITEMS_HYPHEN_NO_CAPS_TRUE", "Not hyphenated CAPS") #define RID_SVXITEMS_HYPHEN_LAST_WORD_TRUE NC_("RID_SVXITEMS_HYPHEN_NO_CAPS_FALSE", "Not hyphenated last word") diff --git a/include/editeng/hyphenzoneitem.hxx b/include/editeng/hyphenzoneitem.hxx index 84f4ac333ecc..5e57f73ee156 100644 --- a/include/editeng/hyphenzoneitem.hxx +++ b/include/editeng/hyphenzoneitem.hxx @@ -47,7 +47,8 @@ class EDITENG_DLLPUBLIC SvxHyphenZoneItem final : public SfxPoolItem sal_uInt16 nTextHyphenZoneSpread; // don't force hyphenation at spread end, allow this extra white space sal_uInt8 nKeepType; // avoid hyphenation across page etc., see ParagraphHyphenationKeep bool bKeepLine : 1; // if bKeep, shift the hyphenated word (true), or the full line - sal_uInt8 nCompoundMinLead; // min. characters between compound word boundary and hyphenation + sal_uInt8 nCompoundMinLead; // min. characters between left compound word boundary and hyphenation + sal_uInt8 nCompoundMinTrail; // min. characters between hyphenation and right compound word boundary public: static SfxPoolItem* CreateDefault(); @@ -88,6 +89,9 @@ public: sal_uInt8 &GetCompoundMinLead() { return nCompoundMinLead; } sal_uInt8 GetCompoundMinLead() const { return nCompoundMinLead; } + sal_uInt8 &GetCompoundMinTrail() { return nCompoundMinTrail; } + sal_uInt8 GetCompoundMinTrail() const { return nCompoundMinTrail; } + sal_uInt8 &GetMaxHyphens() { return nMaxHyphens; } sal_uInt8 GetMaxHyphens() const { return nMaxHyphens; } diff --git a/include/editeng/memberids.h b/include/editeng/memberids.h index 944664bc0ecf..3fc273b9fc9b 100644 --- a/include/editeng/memberids.h +++ b/include/editeng/memberids.h @@ -58,7 +58,8 @@ #define MID_HYPHEN_KEEP 12 #define MID_HYPHEN_KEEP_TYPE 13 #define MID_HYPHEN_COMPOUND_MIN_LEAD 14 -#define MID_HYPHEN_KEEP_LINE 15 +#define MID_HYPHEN_COMPOUND_MIN_TRAIL 15 +#define MID_HYPHEN_KEEP_LINE 16 // SvxBoxInfoItem #define MID_HORIZONTAL 1 diff --git a/include/linguistic/lngprophelp.hxx b/include/linguistic/lngprophelp.hxx index 19bef926c243..e28897e09e63 100644 --- a/include/linguistic/lngprophelp.hxx +++ b/include/linguistic/lngprophelp.hxx @@ -239,6 +239,7 @@ class PropertyHelper_Hyphen final : sal_Int16 nHyphMinLeading, nHyphMinTrailing, nHyphCompoundMinLeading, + nHyphCompoundMinTrailing, nHyphMinWordLength, nHyphTextHyphenZone; bool bNoHyphenateCaps; @@ -247,6 +248,7 @@ class PropertyHelper_Hyphen final : sal_Int16 nResHyphMinLeading, nResHyphMinTrailing, nResHyphCompoundMinLeading, + nResHyphCompoundMinTrailing, nResHyphMinWordLength, nResHyphTextHyphenZone; bool bResNoHyphenateCaps; @@ -275,6 +277,7 @@ public: sal_Int16 GetMinLeading() const { return nResHyphMinLeading; } sal_Int16 GetMinTrailing() const { return nResHyphMinTrailing; } sal_Int16 GetCompoundMinLeading() const { return nResHyphCompoundMinLeading; } + sal_Int16 GetCompoundMinTrailing() const { return nResHyphCompoundMinTrailing; } sal_Int16 GetMinWordLength() const { return nResHyphMinWordLength; } bool IsNoHyphenateCaps() const { return bResNoHyphenateCaps; } }; @@ -299,6 +302,7 @@ public: sal_Int16 GetMinLeading() const; sal_Int16 GetMinTrailing() const; sal_Int16 GetCompoundMinLeading() const; + sal_Int16 GetCompoundMinTrailing() const; sal_Int16 GetMinWordLength() const; bool IsNoHyphenateCaps() const; /// @throws css::uno::RuntimeException diff --git a/include/sfx2/msg.hxx b/include/sfx2/msg.hxx index 21e108a4b2e3..7d6a39ef88e6 100644 --- a/include/sfx2/msg.hxx +++ b/include/sfx2/msg.hxx @@ -138,12 +138,12 @@ SFX_DECL_TYPE(5); SFX_DECL_TYPE(6); SFX_DECL_TYPE(7); SFX_DECL_TYPE(8); -SFX_DECL_TYPE(9); // for SvxHyphenZoneItem SFX_DECL_TYPE(10); // for SfxDocInfoItem SFX_DECL_TYPE(11); SFX_DECL_TYPE(13); // for SwAddPrinterItem, Sd... SFX_DECL_TYPE(14); +SFX_DECL_TYPE(15); // for SvxHyphenZoneItem SFX_DECL_TYPE(16); // for SwDocDisplayItem SFX_DECL_TYPE(17); // for SvxAddressItem SFX_DECL_TYPE(23); // for SvxSearchItem diff --git a/include/unotools/linguprops.hxx b/include/unotools/linguprops.hxx index dd57dc089d05..3130157a5a3b 100644 --- a/include/unotools/linguprops.hxx +++ b/include/unotools/linguprops.hxx @@ -38,6 +38,7 @@ inline constexpr OUString UPN_IS_SPELL_WITH_DIGITS = u"IsSpellWithDig inline constexpr OUString UPN_HYPH_MIN_LEADING = u"HyphMinLeading"_ustr; inline constexpr OUString UPN_HYPH_MIN_TRAILING = u"HyphMinTrailing"_ustr; inline constexpr OUString UPN_HYPH_COMPOUND_MIN_LEADING = u"HyphCompoundMinLeading"_ustr; +inline constexpr OUString UPN_HYPH_COMPOUND_MIN_TRAILING = u"HyphCompoundMinTrailing"_ustr; inline constexpr OUString UPN_HYPH_MIN_WORD_LENGTH = u"HyphMinWordLength"_ustr; inline constexpr OUString UPN_HYPH_NO_CAPS = u"HyphNoCaps"_ustr; inline constexpr OUString UPN_HYPH_NO_LAST_WORD = u"HyphNoLastWord"_ustr; @@ -122,7 +123,8 @@ inline constexpr OUString UPN_IS_GRAMMAR_INTERACTIVE = u"IsInteractiveG #define UPH_HYPH_KEEP 38 #define UPH_HYPH_KEEP_TYPE 39 #define UPH_HYPH_COMPOUND_MIN_LEADING 40 -#define UPH_HYPH_KEEP_LINE 41 +#define UPH_HYPH_COMPOUND_MIN_TRAILING 41 +#define UPH_HYPH_KEEP_LINE 42 #ifdef __GNUC__ #pragma GCC diagnostic pop diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index 1a1e23730e8f..18d855cb5a6d 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -1075,6 +1075,7 @@ namespace xmloff::token { XML_HYPHENATION_ZONE_PAGE, XML_HYPHENATION_ZONE_SPREAD, XML_HYPHENATION_COMPOUND_REMAIN_CHAR_COUNT, + XML_HYPHENATION_COMPOUND_PUSH_CHAR_COUNT, XML_I, XML_ICON, XML_ICON_SET, diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx index c447451bc981..4d6d4b1e6719 100644 --- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx @@ -346,6 +346,7 @@ hyphenation_result getHyphens(std::u16string_view word, const HDInfo& hdInfo, sa HyphenDict* dict = hdInfo.aPtr; const bool failed = 0 != hnj_hyphen_hyphenate3( dict, encWord.getStr(), n, hyphens.get(), nullptr, &rep, &pos, &cut, minLead, minTrail, + // TODO add "no-limit"/0 clh/crh support to libhyphen, also add minCompoundLead/Trail support std::max(dict->clhmin, 2) + std::max(0, minLead - std::max(dict->lhmin, 2)), std::max(dict->crhmin, 2) + std::max(0, minTrail - std::max(dict->rhmin, 2)) ); return { n, failed, rep, pos, cut, std::move(hyphens) }; // buffers will free in dtor @@ -390,6 +391,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo sal_Int16 minTrail = rHelper.GetMinTrailing(); sal_Int16 minLead = rHelper.GetMinLeading(); sal_Int16 minCompoundLead = rHelper.GetCompoundMinLeading(); + sal_Int16 minCompoundTrail = rHelper.GetCompoundMinTrailing(); sal_Int16 minLen = rHelper.GetMinWordLength(); bool bNoHyphenateCaps = rHelper.IsNoHyphenateCaps(); @@ -399,6 +401,10 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo int nHyphenationPos = -1; int nHyphenationPosAlt = -1; int nHyphenationPosAltHyph = -1; + int nPrevHyphenationPos = -1; + int nPrevHyphenationPosAlt = -1; + int nPrevHyphenationPosAltHyph = -1; + int nCompoundHyphenationPos = -1; // hyphenate the word with that dictionary rtl_TextEncoding eEnc = pHDInfo->eEnc; @@ -432,6 +438,8 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo { int leftrep = 0; bool hit = (result.n >= minLen); + bool compoundhit = (result.n >= 1) && (result.hyphens[i] & 1);; + bool bPrevCompound = false; if (!result.rep || !result.rep[i]) { hit = hit && (result.hyphens[i] & 1) && (i < Leading); @@ -455,11 +463,22 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo hit = hit && ((i + leftrep - result.pos[i]) >= (minLead-1) ); hit = hit && ((result.n - i - 1 + sal::static_int_cast< sal_sSize >(strlen(result.rep[i])) - leftrep - 1) >= minTrail); } - if (hit) + if (hit || compoundhit) { - // skip hyphenation right after stem boundaries in compound words + // skip hyphenation inside compound constituents right after constituent boundaries in compound words // if minCompoundLead > 2 (default value: less than n=minCompoundLead character distance) - if ( bCompoundHyphenation && minCompoundLead > 2 && nHyphenationPos > -1 && i - nHyphenationPos < minCompoundLead ) + // or always skip hyphenation inside compound constituents, if minCompoundLead == 0, + // also skip hyphenation inside compound constituents right before constituent boundaries in compound words + // or always skip hyphenation inside compound consituents, if minCompoundTrail == 0 + // if both minCompoundLead and minCompoundTrail == 0, don't hyphenate inside suffixes, too + if ( bCompoundHyphenation && (nCompoundHyphenationPos > -1 || minCompoundLead == 0 || minCompoundTrail > 2 || minCompoundTrail == 0 ) && + // check minimal distance from the left constituent boundary + ( ( minCompoundLead > 2 && i - nCompoundHyphenationPos < minCompoundLead ) || + // check minimal distance from the right constituent boundary + ( minCompoundTrail > 2 && i - nCompoundHyphenationPos < minCompoundTrail ) || + // special value: zero compound limit means forbidden hyphenation + // inside (stems of) compound constituents + minCompoundLead == 0 || minCompoundTrail == 0 ) ) { uno::Reference< XLinguServiceManager2 > xLngSvcMgr( GetLngSvcMgr_Impl() ); uno::Reference< XSpellChecker1 > xSpell; @@ -575,6 +594,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo { sal_Int32 nLetters = 0; // count not separator characters sal_Int32 nSepPos = -1; // position of last character | used for stem boundaries + sal_Int32 nSepLetterPos = -1; // letter position of the character associated to nSepPos bool bWeightedSep = false; // double separator || = weighted stem boundary sal_Int32 j = 0; for (; j < sStems.getLength() && nLetters <= i; j++) @@ -583,26 +603,55 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo { bWeightedSep = nSepPos > -1 && (j - 1 == nSepPos); nSepPos = j; + nSepLetterPos = nLetters; } else if ( sStems[j] != '-' && sStems[j] != '=' && sStems[j] != '*' ) ++nLetters; } - // skip break points near stem boundaries - if ( + // skip break points near after the stem boundaries + if ( hit && + // too close to the left break point or special case? + ( i - nCompoundHyphenationPos < minCompoundLead || minCompoundLead == 0 ) && // there is a stem boundary before the actual break point nSepPos > -1 && // and the break point is within a stem, i.e. not in the - // suffix of the last stem - i < aWord.getLength() - nSuffixLen - 1 && + // suffix of the last stem or both minCompoundLead and + // minCompoundTrail == 0, i.e. hyphenation is allowed only + // at compound constituent boundaries + ( i < aWord.getLength() - nSuffixLen - 1 || + ( minCompoundLead == 0 && minCompoundTrail == 0) ) && // and it is not another stem boundary j + 1 < sStems.getLength() && - ( sStems[j + 1] != u'|' || + ( sStems[j] != u'|' || // except if it's only the previous was a weighted one - ( bWeightedSep && ( j + 2 == sStems.getLength() || - sStems[j + 2] != u'|' ) ) ) ) + ( bWeightedSep && ( j + 1 == sStems.getLength() || + sStems[j + 1] != u'|' ) ) ) ) { continue; } + // skip break points near before the stem boundaries + // (hit is not mandatory, only compondhit, because the + // compound boundary can be after the lead limit) + if (!hit && + // too close to the right break point? + ( i - nCompoundHyphenationPos < minCompoundTrail || minCompoundTrail == 0 ) && + // and the break point is within a stem, i.e. not in the + // suffix of the last stem suffix or both minCompoundLead and + // minCompoundTrail == 0, i.e. hyphenation is allowed only + // at compound constituent boundaries + ( i < aWord.getLength() - nSuffixLen - 1 || + ( minCompoundLead == 0 && minCompoundTrail == 0) ) && + // and it is a stem boundary + j + 1 < sStems.getLength() && sStems[j+1] == u'|' && + // the previous break point is not a boundary + (nSepPos == -1 || nCompoundHyphenationPos != nSepLetterPos - 1 ) ) + { + nHyphenationPos = nPrevHyphenationPos; + nHyphenationPosAlt = nPrevHyphenationPosAlt; + nHyphenationPosAltHyph = nPrevHyphenationPosAltHyph; + continue; + } + bPrevCompound = nSepPos == j || nSepPos == j - 1; } else // not a compound word @@ -613,9 +662,20 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo bCompoundHyphenation = false; } - nHyphenationPos = i; + nCompoundHyphenationPos = i; + if (hit) + { + if ( bPrevCompound ) + nPrevHyphenationPos = nHyphenationPos; + nHyphenationPos = i; + } if (result.rep && result.rep[i]) { + if ( bPrevCompound ) + { + nPrevHyphenationPosAlt = nHyphenationPosAlt; + nPrevHyphenationPosAltHyph = nHyphenationPosAltHyph; + } nHyphenationPosAlt = i - result.pos[i]; nHyphenationPosAltHyph = i + leftrep - result.pos[i]; } diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx index 6cd56c11f5d7..833edabcc96c 100644 --- a/linguistic/source/lngprophelp.cxx +++ b/linguistic/source/lngprophelp.cxx @@ -492,6 +492,7 @@ void PropertyHelper_Hyphen::SetDefaultValues() nResHyphMinLeading = nHyphMinLeading = 2; nResHyphMinTrailing = nHyphMinTrailing = 2; nResHyphCompoundMinLeading = nHyphCompoundMinLeading = 2; + nResHyphCompoundMinTrailing = nHyphCompoundMinTrailing = 2; nResHyphMinWordLength = nHyphMinWordLength = 0; nResHyphTextHyphenZone = nHyphTextHyphenZone = 0; bResNoHyphenateCaps = bNoHyphenateCaps = false; @@ -528,6 +529,11 @@ void PropertyHelper_Hyphen::GetCurrentValues() pnVal = &nHyphCompoundMinLeading; pnResVal = &nResHyphCompoundMinLeading; } + if ( rPropName == UPN_HYPH_COMPOUND_MIN_TRAILING ) + { + pnVal = &nHyphCompoundMinTrailing; + pnResVal = &nResHyphCompoundMinTrailing; + } else if ( rPropName == UPN_HYPH_MIN_WORD_LENGTH ) { pnVal = &nHyphMinWordLength; @@ -571,6 +577,7 @@ bool PropertyHelper_Hyphen::propertyChange_Impl( const PropertyChangeEvent& rEvt case UPH_HYPH_MIN_LEADING : pnVal = &nHyphMinLeading; break; case UPH_HYPH_MIN_TRAILING : pnVal = &nHyphMinTrailing; break; case UPH_HYPH_COMPOUND_MIN_LEADING : pnVal = &nHyphCompoundMinLeading; break; + case UPH_HYPH_COMPOUND_MIN_TRAILING : pnVal = &nHyphCompoundMinTrailing; break; case UPH_HYPH_MIN_WORD_LENGTH : pnVal = &nHyphMinWordLength; break; case UPH_HYPH_ZONE : pnVal = &nHyphTextHyphenZone; break; case UPH_HYPH_NO_CAPS : pbVal = &bNoHyphenateCaps; break; @@ -626,6 +633,8 @@ void PropertyHelper_Hyphen::SetTmpPropVals( const PropertyValues &rPropVals ) pnResVal = &nResHyphMinTrailing; if ( rVal.Name == UPN_HYPH_COMPOUND_MIN_LEADING ) pnResVal = &nResHyphCompoundMinLeading; + if ( rVal.Name == UPN_HYPH_COMPOUND_MIN_TRAILING ) + pnResVal = &nResHyphCompoundMinTrailing; else if ( rVal.Name == UPN_HYPH_MIN_WORD_LENGTH ) pnResVal = &nResHyphMinWordLength; else if ( rVal.Name == UPN_HYPH_ZONE ) @@ -718,6 +727,11 @@ sal_Int16 PropertyHelper_Hyphenation::GetCompoundMinLeading() const return mxPropHelper->GetCompoundMinLeading(); } +sal_Int16 PropertyHelper_Hyphenation::GetCompoundMinTrailing() const +{ + return mxPropHelper->GetCompoundMinTrailing(); +} + sal_Int16 PropertyHelper_Hyphenation::GetMinWordLength() const { return mxPropHelper->GetMinWordLength(); diff --git a/offapi/com/sun/star/style/ParagraphProperties.idl b/offapi/com/sun/star/style/ParagraphProperties.idl index c18217a1bf79..6e391ee56096 100644 --- a/offapi/com/sun/star/style/ParagraphProperties.idl +++ b/offapi/com/sun/star/style/ParagraphProperties.idl @@ -563,7 +563,7 @@ published service ParagraphProperties @see ParaLetterSpacingMaximum - @since LibreOffice 26.3 + @since LibreOffice 26.2 */ [optional, property] long ParaLetterSpacingMinimum; @@ -577,7 +577,7 @@ published service ParagraphProperties @see ParaLetterSpacingMininum - @since LibreOffice 26.3 + @since LibreOffice 26.2 */ [optional, property] long ParaLetterSpacingMaximum; @@ -591,7 +591,7 @@ published service ParagraphProperties @see ParaScaleWidthMaximum - @since LibreOffice 26.3 + @since LibreOffice 26.2 */ [optional, property] long ParaScaleWidthMinimum; @@ -605,9 +605,17 @@ published service ParagraphProperties @see ParaScaleWidthMininum - @since LibreOffice 26.3 + @since LibreOffice 26.2 */ [optional, property] long ParaScaleWidthMaximum; + + /** specifies the minimum number of characters of the compound word part + that must appear at the beginning of the line after the hyphen character + (when hyphenation is applied). + + @since LibreOffice 26.8 + */ + [optional, property] short ParaHyphenationCompoundMinTrailingChars; }; diff --git a/schema/libreoffice/OpenDocument-v1.4+libreoffice-schema.rng b/schema/libreoffice/OpenDocument-v1.4+libreoffice-schema.rng index 0721512cbf7b..a3c7eb909c84 100644 --- a/schema/libreoffice/OpenDocument-v1.4+libreoffice-schema.rng +++ b/schema/libreoffice/OpenDocument-v1.4+libreoffice-schema.rng @@ -3087,7 +3087,22 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1. - + + no-limit + + + + + + + + + + + + no-limit + + diff --git a/svx/sdi/svxitems.sdi b/svx/sdi/svxitems.sdi index fca1b739b832..c8f298648760 100644 --- a/svx/sdi/svxitems.sdi +++ b/svx/sdi/svxitems.sdi @@ -290,6 +290,7 @@ struct SvxHyphenZone INT16 HyphenKeepType MID_HYPHEN_KEEP_TYPE; BOOL HyphenKeepLine MID_HYPHEN_KEEP_LINE; INT16 MinLead MID_HYPHEN_COMPOUND_MIN_LEAD; + INT16 MinTrail MID_HYPHEN_COMPOUND_MIN_TRAIL; }; item SvxHyphenZone SvxHyphenZoneItem; diff --git a/sw/inc/inspectorproperties.hrc b/sw/inc/inspectorproperties.hrc index f4b42273de8e..8fc10dc5071b 100644 --- a/sw/inc/inspectorproperties.hrc +++ b/sw/inc/inspectorproperties.hrc @@ -207,6 +207,7 @@ #define RID_PARA_HYPHENATION_MAX_LEADING_CHARS NC_("RID_ATTRIBUTE_NAMES_MAP", "Para Hyphenation Min Leading Chars") #define RID_PARA_HYPHENATION_MAX_TRAILING_CHARS NC_("RID_ATTRIBUTE_NAMES_MAP", "Para Hyphenation Min Trailing Chars") #define RID_PARA_HYPHENATION_COMPOUND_MIN_LEADING_CHARS NC_("RID_ATTRIBUTE_NAMES_MAP", "Para Hyphenation Compound Min Leading Chars") +#define RID_PARA_HYPHENATION_COMPOUND_MIN_TRAILING_CHARS NC_("RID_ATTRIBUTE_NAMES_MAP", "Para Hyphenation Compound Min Trailing Chars") #define RID_PARA_HYPHENATION_NO_CAPS NC_("RID_ATTRIBUTE_NAMES_MAP", "Para Hyphenation No Caps") #define RID_PARA_HYPHENATION_NO_LAST_WORD NC_("RID_ATTRIBUTE_NAMES_MAP", "Para Hyphenation No Last Word") #define RID_PARA_HYPHENATION_MIN_WORD_LENGTH NC_("RID_ATTRIBUTE_NAMES_MAP", "Para Hyphenation Min Word Length") diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx index 27981e05db01..08b08cc85307 100644 --- a/sw/inc/unoprnms.hxx +++ b/sw/inc/unoprnms.hxx @@ -74,6 +74,8 @@ inline constexpr OUString UNO_NAME_PARA_HYPHENATION_MAX_TRAILING_CHARS = u"ParaHyphenationMaxTrailingChars"_ustr; inline constexpr OUString UNO_NAME_PARA_HYPHENATION_COMPOUND_MIN_LEADING_CHARS = u"ParaHyphenationCompoundMinLeadingChars"_ustr; +inline constexpr OUString UNO_NAME_PARA_HYPHENATION_COMPOUND_MIN_TRAILING_CHARS + = u"ParaHyphenationCompoundMinTrailingChars"_ustr; inline constexpr OUString UNO_NAME_PARA_HYPHENATION_MAX_HYPHENS = u"ParaHyphenationMaxHyphens"_ustr; inline constexpr OUString UNO_NAME_PARA_HYPHENATION_MIN_WORD_LENGTH = u"ParaHyphenationMinWordLength"_ustr; diff --git a/sw/qa/extras/layout/data/tdf158885_compound-remain.fodt b/sw/qa/extras/layout/data/tdf158885_compound-remain.fodt index 7fbf782319dc..6c0366fab902 100644 --- a/sw/qa/extras/layout/data/tdf158885_compound-remain.fodt +++ b/sw/qa/extras/layout/data/tdf158885_compound-remain.fodt @@ -190,6 +190,7 @@ emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes + kovakőbányászat kovakőbányászat kovakőbányászat kovakőbányászat kovakőbányászat,,, kovakőbányászat kovakőbányászat kovakőbányászat kovakőbányászat diff --git a/sw/qa/extras/layout/data/tdf158885_not_compound-remain.fodt b/sw/qa/extras/layout/data/tdf158885_not_compound-remain.fodt index bd53db4e9ee6..6ba2c290e395 100644 --- a/sw/qa/extras/layout/data/tdf158885_not_compound-remain.fodt +++ b/sw/qa/extras/layout/data/tdf158885_not_compound-remain.fodt @@ -190,6 +190,7 @@ emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes + kovakőbányászat kovakőbányászat kovakőbányászat kovakőbányászat kovakőbányászat,,, kovakőbányászat kovakőbányászat kovakőbányászat kovakőbányászat diff --git a/sw/qa/extras/layout/data/tdf170177_compound-push.fodt b/sw/qa/extras/layout/data/tdf170177_compound-push.fodt new file mode 100644 index 000000000000..ccebc5b14f5c --- /dev/null +++ b/sw/qa/extras/layout/data/tdf170177_compound-push.fodt @@ -0,0 +1,206 @@ + + + + 2024-03-18T08:37:10.0329193142024-03-18T12:28:13.103241731PT9M33S6LibreOfficeDev/24.2.0.0.alpha0$Linux_X86_64 LibreOffice_project/1650efbb077010d595860a707cf5bfb7df50f8f4 + + + 0 + 0 + 40748 + 13866 + true + false + + + true + false + true + false + true + false + false + 0 + true + true + false + true + false + false + false + false + true + false + false + + false + false + true + false + false + true + true + false + false + false + false + false + false + true + false + false + false + 1001492 + false + + true + false + false + 1360405 + true + false + false + false + 1 + true + true + false + false + true + false + false + true + true + true + false + true + 0 + + false + true + true + true + + 0 + true + false + false + false + high-resolution + true + true + false + false + true + false + false + false + false + false + + true + false + true + false + + false + false + false + true + false + false + false + false + false + false + false + false + false + false + 0 + true + false + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ,,,,emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes + vasemberellenes vasemberellenes vasemberellenes vasemberellenes vasemberellenes vasemberellenes + ,,,,,,,,,vizsgálattal balalajkavizsgálattal balalajkavizsgálattal balalajkavizsgálattal balalajkavizsgálattal + ,,,,,,,,,vizsgálattal balalajkavizsgálattal balalajkavizsgálattal balalajkavizsgálattal balalajkavizsgálattal + + + diff --git a/sw/qa/extras/layout/data/tdf170177_not_compound-push.fodt b/sw/qa/extras/layout/data/tdf170177_not_compound-push.fodt new file mode 100644 index 000000000000..ec9d2a8afdcc --- /dev/null +++ b/sw/qa/extras/layout/data/tdf170177_not_compound-push.fodt @@ -0,0 +1,196 @@ + + + + 2024-03-18T08:37:10.0329193142024-03-18T12:28:13.103241731PT9M33S6LibreOfficeDev/24.2.0.0.alpha0$Linux_X86_64 LibreOffice_project/1650efbb077010d595860a707cf5bfb7df50f8f4 + + + 0 + 0 + 40748 + 13866 + true + false + + + true + false + true + false + true + false + false + 0 + true + true + false + true + false + false + false + false + true + false + false + + false + false + true + false + false + true + true + false + false + false + false + false + false + true + false + false + false + 1001492 + false + + true + false + false + 1360405 + true + false + false + false + 1 + true + true + false + false + true + false + false + true + true + true + false + true + 0 + + false + true + true + true + + 0 + true + false + false + false + high-resolution + true + true + false + false + true + false + false + false + false + false + + true + false + true + false + + false + false + false + true + false + false + false + false + false + false + false + false + false + false + 0 + true + false + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ,,,,emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes emberellenes + vasemberellenes vasemberellenes vasemberellenes vasemberellenes vasemberellenes vasemberellenes + + + diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index 5a7cbd6873a7..1c7eecdffb36 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -1250,6 +1250,15 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf158885_compound_remain) u"emberellenes emberellenes emberellenes emberellenes emberellenes ember"); assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[2]", "portion", u"ellenes emberellenes emberellenes emberellenes emberellenes emberellenes "); + + // tdf#170177 fix hyphenation at the end of the middle constituent + // shorter than the minCompoundLead + // This was "kova=kőbányászat" (now "kovakő=bányászat) + // (allowed hyphenations: ko=va=kő=bányá=szat) + assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/SwParaPortion/SwLineLayout[1]", "portion", + u"kovakőbányászat kovakőbányászat kovakőbányászat kovakőbányászat kovakő"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/SwParaPortion/SwLineLayout[2]", "portion", + u"bányászat,,, kovakőbányászat kovakőbányászat kovakőbányászat kovakő"); } CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf158885_not_compound_remain) @@ -1273,6 +1282,83 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf158885_not_compound_remain) u"emberellenes emberellenes emberellenes emberellenes emberellenes emberel"); assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[2]", "portion", u"lenes emberellenes emberellenes emberellenes emberellenes emberellenes "); + + // tdf#170177 fix hyphenation at the end of the middle constituent + // shorter than the minCompoundLead + // These are "kovakő=bányászat" and "kovakőbá=nyászat + // (all hyphenations are allowed: ko=va=kő=bá=nyá=szat) + assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/SwParaPortion/SwLineLayout[1]", "portion", + u"kovakőbányászat kovakőbányászat kovakőbányászat kovakőbányászat kovakő"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/SwParaPortion/SwLineLayout[2]", "portion", + u"bányászat,,, kovakőbányászat kovakőbányászat kovakőbányászat kovakőbá"); +} + +CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf170177_compound_push) +{ + uno::Reference xHyphenator = LinguMgr::GetHyphenator(); + if (!xHyphenator->hasLocale(lang::Locale(u"hu"_ustr, u"HU"_ustr, OUString()))) + return; + + uno::Reference xSpell = LinguMgr::GetSpellChecker(); + LanguageType eLang + = LanguageTag::convertToLanguageType(lang::Locale(u"hu"_ustr, u"HU"_ustr, OUString())); + if (!xSpell.is() || !xSpell->hasLanguage(static_cast(eLang))) + return; + + createSwDoc("tdf170177_compound-push.fodt"); + xmlDocUniquePtr pXmlDoc = parseLayoutDump(); + // hyphenate compound word with 3- or more character distance from the stem boundary + // This was "em=berellenes" (now "emberellenes", i.e. no hyphenation) + assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[1]", "portion", + u",,,,emberellenes emberellenes emberellenes emberellenes emberellenes "); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[2]", "portion", + u"emberellenes emberellenes emberellenes emberellenes emberellenes ember"); + + // This was "vasem=berellenes" (now "vas=emberellenes") + assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/SwParaPortion/SwLineLayout[1]", "portion", + u"vasemberellenes vasemberellenes vasemberellenes vasemberellenes vas"); + + // special value: no-limit, if both -remain and -push values are not limited, there + // is hyphenation only at compound constituent boundaries (not in the suffixes, and + // not inside the first constituent + // balalajka=vizsgálattal, not balalajkavizsgálat=tal + assertXPath(pXmlDoc, "/root/page[1]/body/txt[3]/SwParaPortion/SwLineLayout[1]", "portion", + u",,,,,,,,,vizsgálattal balalajkavizsgálattal balalajkavizsgálattal balalajka"); + + // no-limit -push value, while -remain = 99 (~no-limit, but hyphenation before and + // in the suffix is allowed) + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[4]/SwParaPortion/SwLineLayout[1]", "portion", + u",,,,,,,,,vizsgálattal balalajkavizsgálattal balalajkavizsgálattal balalajkavizsgálat"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[4]/SwParaPortion/SwLineLayout[2]", "portion", + u"tal balalajkavizsgálattal"); +} + +CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf170177_not_compound_push) +{ + uno::Reference xHyphenator = LinguMgr::GetHyphenator(); + if (!xHyphenator->hasLocale(lang::Locale(u"hu"_ustr, u"HU"_ustr, OUString()))) + return; + + uno::Reference xSpell = LinguMgr::GetSpellChecker(); + LanguageType eLang + = LanguageTag::convertToLanguageType(lang::Locale(u"hu"_ustr, u"HU"_ustr, OUString())); + if (!xSpell.is() || !xSpell->hasLanguage(static_cast(eLang))) + return; + + createSwDoc("tdf170177_not_compound-push.fodt"); + xmlDocUniquePtr pXmlDoc = parseLayoutDump(); + // hyphenate compound word with 3-character distance from the stem boundary, + // resulting less readable hyphenation "em=berellenes" (instead of + // "emberellenes" or "ember=ellenes") + assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[1]", "portion", + u",,,,emberellenes emberellenes emberellenes emberellenes emberellenes em"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[2]", "portion", + u"berellenes emberellenes emberellenes emberellenes emberellenes emberelle"); + + // (all hyphenations are allowed: vas=em=ber=elle=nes) + assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/SwParaPortion/SwLineLayout[1]", "portion", + u"vasemberellenes vasemberellenes vasemberellenes vasemberellenes vasem"); } // TODO: move this test to the lingucomponent project diff --git a/sw/qa/uitest/styleInspector/styleInspector.py b/sw/qa/uitest/styleInspector/styleInspector.py index 1f044dfc4dec..70554e5307c1 100644 --- a/sw/qa/uitest/styleInspector/styleInspector.py +++ b/sw/qa/uitest/styleInspector/styleInspector.py @@ -26,7 +26,7 @@ class styleNavigator(UITestCase): # The cursor is on text without formatting and default style self.assertEqual(1, len(xListBox.getChild('0').getChildren())) self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text']) - self.assertEqual(156, len(xListBox.getChild('0').getChild('0').getChildren())) + self.assertEqual(157, len(xListBox.getChild('0').getChild('0').getChildren())) self.assertEqual(0, len(xListBox.getChild('1').getChildren())) self.assertEqual(0, len(xListBox.getChild('2').getChildren())) self.assertEqual(0, len(xListBox.getChild('3').getChildren())) @@ -36,7 +36,7 @@ class styleNavigator(UITestCase): # The cursor is on text with direct formatting self.assertEqual(1, len(xListBox.getChild('0').getChildren())) self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text']) - self.assertEqual(156, len(xListBox.getChild('0').getChild('0').getChildren())) + self.assertEqual(157, len(xListBox.getChild('0').getChild('0').getChildren())) self.assertEqual(0, len(xListBox.getChild('1').getChildren())) self.assertEqual(0, len(xListBox.getChild('2').getChildren())) @@ -54,7 +54,7 @@ class styleNavigator(UITestCase): # The cursor is on text with paragraph direct formatting self.assertEqual(1, len(xListBox.getChild('0').getChildren())) self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text']) - self.assertEqual(156, len(xListBox.getChild('0').getChild('0').getChildren())) + self.assertEqual(157, len(xListBox.getChild('0').getChild('0').getChildren())) xParDirFormatting = xListBox.getChild('1') self.assertEqual(7, len(xParDirFormatting.getChildren())) @@ -75,7 +75,7 @@ class styleNavigator(UITestCase): xParStyle = xListBox.getChild('0') self.assertEqual(3, len(xParStyle.getChildren())) self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xParStyle.getChild('0'))['Text']) - self.assertEqual(156, len(xParStyle.getChild('0').getChildren())) + self.assertEqual(157, len(xParStyle.getChild('0').getChildren())) self.assertEqual("Heading\t", get_state_as_dict(xParStyle.getChild('1'))['Text']) self.assertEqual(28, len(xParStyle.getChild('1').getChildren())) @@ -116,7 +116,7 @@ class styleNavigator(UITestCase): xParStyle = xListBox.getChild('0') self.assertEqual(3, len(xParStyle.getChildren())) self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xParStyle.getChild('0'))['Text']) - self.assertEqual(156, len(xParStyle.getChild('0').getChildren())) + self.assertEqual(157, len(xParStyle.getChild('0').getChildren())) self.assertEqual("Body Text\t", get_state_as_dict(xParStyle.getChild('1'))['Text']) self.assertEqual(6, len(xParStyle.getChild('1').getChildren())) @@ -151,7 +151,7 @@ class styleNavigator(UITestCase): # The cursor is on text without metadata self.assertEqual(1, len(xListBox.getChild('0').getChildren())) self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text']) - self.assertEqual(156, len(xListBox.getChild('0').getChild('0').getChildren())) + self.assertEqual(157, len(xListBox.getChild('0').getChild('0').getChildren())) self.assertEqual(0, len(xListBox.getChild('1').getChildren())) self.assertEqual(0, len(xListBox.getChild('2').getChildren())) self.assertEqual(0, len(xListBox.getChild('3').getChildren())) @@ -161,7 +161,7 @@ class styleNavigator(UITestCase): # The cursor is on text with paragraph metadata showed under direct paragraph formatting self.assertEqual(1, len(xListBox.getChild('0').getChildren())) self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text']) - self.assertEqual(156, len(xListBox.getChild('0').getChild('0').getChildren())) + self.assertEqual(157, len(xListBox.getChild('0').getChild('0').getChildren())) xParDirFormatting = xListBox.getChild('1') self.assertEqual(1, len(xParDirFormatting.getChildren())) @@ -214,7 +214,7 @@ class styleNavigator(UITestCase): # The cursor is on text without metadata self.assertEqual(1, len(xListBox.getChild('0').getChildren())) self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text']) - self.assertEqual(156, len(xListBox.getChild('0').getChild('0').getChildren())) + self.assertEqual(157, len(xListBox.getChild('0').getChild('0').getChildren())) self.assertEqual(0, len(xListBox.getChild('1').getChildren())) self.assertEqual(0, len(xListBox.getChild('2').getChildren())) self.assertEqual(0, len(xListBox.getChild('3').getChildren())) @@ -224,7 +224,7 @@ class styleNavigator(UITestCase): # The cursor is on text with paragraph metadata showed under direct paragraph formatting self.assertEqual(1, len(xListBox.getChild('1').getChildren())) self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('1').getChild('0'))['Text']) - self.assertEqual(156, len(xListBox.getChild('1').getChild('0').getChildren())) + self.assertEqual(157, len(xListBox.getChild('1').getChild('0').getChildren())) # Outer bookmark xBookmarkFormatting = xListBox.getChild('0') @@ -271,7 +271,7 @@ class styleNavigator(UITestCase): # The cursor is on text without metadata self.assertEqual(1, len(xListBox.getChild('0').getChildren())) self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text']) - self.assertEqual(156, len(xListBox.getChild('0').getChild('0').getChildren())) + self.assertEqual(157, len(xListBox.getChild('0').getChild('0').getChildren())) self.assertEqual(0, len(xListBox.getChild('1').getChildren())) self.assertEqual(0, len(xListBox.getChild('2').getChildren())) diff --git a/sw/qa/uitest/styleInspector/tdf137513.py b/sw/qa/uitest/styleInspector/tdf137513.py index 34f055541e62..de29a3be0588 100644 --- a/sw/qa/uitest/styleInspector/tdf137513.py +++ b/sw/qa/uitest/styleInspector/tdf137513.py @@ -35,7 +35,7 @@ class tdf137513(UITestCase): self.assertEqual(2, len(xListBox.getChild('0').getChildren())) self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text']) self.assertEqual("Table Contents\t", get_state_as_dict(xListBox.getChild('0').getChild('1'))['Text']) - self.assertEqual(156, len(xListBox.getChild('0').getChild('0').getChildren())) + self.assertEqual(157, len(xListBox.getChild('0').getChild('0').getChildren())) xTableContent = xListBox.getChild('0').getChild('1') self.assertEqual(5, len(xTableContent.getChildren())) diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index a7db9c2c13bb..79aa520a99bb 100644 --- a/sw/source/core/text/guess.cxx +++ b/sw/source/core/text/guess.cxx @@ -323,7 +323,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, sal_Int32 nHyphZone = -1; sal_Int32 nParaZone = -1; const css::beans::PropertyValues & rHyphValues = rInf.GetHyphValues(); - assert( rHyphValues.getLength() > 10 && rHyphValues[5].Name == UPN_HYPH_ZONE && rHyphValues[10].Name == UPN_HYPH_ZONE_ALWAYS ); + assert( rHyphValues.getLength() > 11 && rHyphValues[5].Name == UPN_HYPH_ZONE && rHyphValues[11].Name == UPN_HYPH_ZONE_ALWAYS ); // hyphenation zone (distance from the line end in twips) sal_Int16 nTextHyphenZone = 0; sal_Int16 nTextHyphenZoneAlways = 0; @@ -437,7 +437,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, bool bHyphenationNoLastWord = false; // do not hyphenate the last word of the paragraph assert( rHyphValues.getLength() > 3 && rHyphValues[3].Name == UPN_HYPH_NO_LAST_WORD ); assert( rHyphValues.getLength() > 6 && rHyphValues[6].Name == UPN_HYPH_KEEP_TYPE ); - assert( rHyphValues.getLength() > 8 && rHyphValues[8].Name == UPN_HYPH_KEEP ); + assert( rHyphValues.getLength() > 9 && rHyphValues[9].Name == UPN_HYPH_KEEP ); rHyphValues[3].Value >>= bHyphenationNoLastWord; rHyphValues[8].Value >>= bDoNotHyphenateLastLine; if ( bDoNotHyphenateLastLine ) diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 2904c2135f51..6e0720a76be9 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1617,13 +1617,14 @@ static void lcl_InitHyphValues( PropertyValues &rVals, sal_Int16 nMinLeading, sal_Int16 nMinTrailing, bool bNoCapsHyphenation, bool bNoLastWordHyphenation, sal_Int16 nMinWordLength, sal_Int16 nTextHyphZone, bool bKeep, sal_Int16 nKeepType, - bool bKeepLine, sal_Int16 nCompoundMinLeading, sal_Int16 nTextHyphZoneAlways ) + bool bKeepLine, sal_Int16 nCompoundMinLeading, + sal_Int16 nCompoundMinTrailing, sal_Int16 nTextHyphZoneAlways ) { sal_Int32 nLen = rVals.getLength(); if (0 == nLen) // yet to be initialized? { - rVals.realloc( 11 ); + rVals.realloc( 12 ); PropertyValue *pVal = rVals.getArray(); pVal[0].Name = UPN_HYPH_MIN_LEADING; @@ -1658,19 +1659,23 @@ static void lcl_InitHyphValues( PropertyValues &rVals, pVal[7].Handle = UPH_HYPH_COMPOUND_MIN_LEADING; pVal[7].Value <<= nCompoundMinLeading; - pVal[8].Name = UPN_HYPH_KEEP; - pVal[8].Handle = UPH_HYPH_KEEP; - pVal[8].Value <<= bKeep; + pVal[8].Name = UPN_HYPH_COMPOUND_MIN_TRAILING; + pVal[8].Handle = UPH_HYPH_COMPOUND_MIN_TRAILING; + pVal[8].Value <<= nCompoundMinTrailing; - pVal[9].Name = UPN_HYPH_KEEP_LINE; - pVal[9].Handle = UPH_HYPH_KEEP_LINE; - pVal[9].Value <<= bKeepLine; + pVal[9].Name = UPN_HYPH_KEEP; + pVal[9].Handle = UPH_HYPH_KEEP; + pVal[9].Value <<= bKeep; - pVal[10].Name = UPN_HYPH_ZONE_ALWAYS; - pVal[10].Handle = UPH_HYPH_ZONE_ALWAYS; - pVal[10].Value <<= nTextHyphZoneAlways; + pVal[10].Name = UPN_HYPH_KEEP_LINE; + pVal[10].Handle = UPH_HYPH_KEEP_LINE; + pVal[10].Value <<= bKeepLine; + + pVal[11].Name = UPN_HYPH_ZONE_ALWAYS; + pVal[11].Handle = UPH_HYPH_ZONE_ALWAYS; + pVal[11].Value <<= nTextHyphZoneAlways; } - else if (11 == nLen) // already initialized once? + else if (12 == nLen) // already initialized once? { PropertyValue *pVal = rVals.getArray(); pVal[0].Value <<= nMinLeading; @@ -1681,9 +1686,10 @@ static void lcl_InitHyphValues( PropertyValues &rVals, pVal[5].Value <<= nTextHyphZone; pVal[6].Value <<= nKeepType; pVal[7].Value <<= nCompoundMinLeading; - pVal[8].Value <<= bKeep; - pVal[9].Value <<= bKeepLine; - pVal[10].Value <<= nTextHyphZoneAlways; + pVal[8].Value <<= nCompoundMinTrailing; + pVal[9].Value <<= bKeep; + pVal[10].Value <<= bKeepLine; + pVal[11].Value <<= nTextHyphZoneAlways; } else { OSL_FAIL( "unexpected size of sequence" ); @@ -1692,7 +1698,7 @@ static void lcl_InitHyphValues( PropertyValues &rVals, const PropertyValues & SwTextFormatInfo::GetHyphValues() const { - OSL_ENSURE( 11 == m_aHyphVals.getLength(), + OSL_ENSURE( 12 == m_aHyphVals.getLength(), "hyphenation values not yet initialized" ); return m_aHyphVals; } @@ -1718,11 +1724,13 @@ bool SwTextFormatInfo::InitHyph( const bool bAutoHyphen ) const bool bKeep = rAttr.IsKeep(); const sal_Int16 nKeepType = rAttr.GetKeepType(); const bool bKeepLine = rAttr.IsKeepLine(); - const sal_Int16 nCompoundMinimalLeading = std::max(rAttr.GetCompoundMinLead(), sal_uInt8(2)); + const sal_Int16 nCompoundMinimalLeading = rAttr.GetCompoundMinLead(); + const sal_Int16 nCompoundMinimalTrailing = rAttr.GetCompoundMinTrail(); lcl_InitHyphValues( m_aHyphVals, nMinimalLeading, nMinimalTrailing, bNoCapsHyphenation, bNoLastWordHyphenation, nMinimalWordLength, nTextHyphZone, bKeep, nKeepType, - bKeepLine, nCompoundMinimalLeading, nTextHyphZoneAlways ); + bKeepLine, nCompoundMinimalLeading, + nCompoundMinimalTrailing, nTextHyphZoneAlways ); } return bAuto; } diff --git a/sw/source/core/unocore/unomapproperties.hxx b/sw/source/core/unocore/unomapproperties.hxx index e2dfba35bf15..62fa63945d35 100644 --- a/sw/source/core/unocore/unomapproperties.hxx +++ b/sw/source/core/unocore/unomapproperties.hxx @@ -118,6 +118,7 @@ { UNO_NAME_PARA_HYPHENATION_MAX_LEADING_CHARS, RES_PARATR_HYPHENZONE, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, MID_HYPHEN_MIN_LEAD }, \ { UNO_NAME_PARA_HYPHENATION_MAX_TRAILING_CHARS, RES_PARATR_HYPHENZONE, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, MID_HYPHEN_MIN_TRAIL }, \ { UNO_NAME_PARA_HYPHENATION_COMPOUND_MIN_LEADING_CHARS, RES_PARATR_HYPHENZONE, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, MID_HYPHEN_COMPOUND_MIN_LEAD }, \ + { UNO_NAME_PARA_HYPHENATION_COMPOUND_MIN_TRAILING_CHARS, RES_PARATR_HYPHENZONE, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, MID_HYPHEN_COMPOUND_MIN_TRAIL }, \ { UNO_NAME_PARA_HYPHENATION_MAX_HYPHENS, RES_PARATR_HYPHENZONE, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, MID_HYPHEN_MAX_HYPHENS }, \ { UNO_NAME_PARA_HYPHENATION_MIN_WORD_LENGTH, RES_PARATR_HYPHENZONE, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, MID_HYPHEN_MIN_WORD_LENGTH }, \ { UNO_NAME_PARA_HYPHENATION_ZONE, RES_PARATR_HYPHENZONE, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, MID_HYPHEN_ZONE}, \ @@ -509,6 +510,7 @@ { UNO_NAME_PARA_HYPHENATION_MAX_LEADING_CHARS, RES_PARATR_HYPHENZONE, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, MID_HYPHEN_MIN_LEAD },\ { UNO_NAME_PARA_HYPHENATION_MAX_TRAILING_CHARS, RES_PARATR_HYPHENZONE, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, MID_HYPHEN_MIN_TRAIL },\ { UNO_NAME_PARA_HYPHENATION_COMPOUND_MIN_LEADING_CHARS, RES_PARATR_HYPHENZONE, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, MID_HYPHEN_COMPOUND_MIN_LEAD },\ + { UNO_NAME_PARA_HYPHENATION_COMPOUND_MIN_TRAILING_CHARS, RES_PARATR_HYPHENZONE, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, MID_HYPHEN_COMPOUND_MIN_TRAIL },\ { UNO_NAME_PARA_HYPHENATION_MAX_HYPHENS, RES_PARATR_HYPHENZONE, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, MID_HYPHEN_MAX_HYPHENS},\ { UNO_NAME_PARA_HYPHENATION_MIN_WORD_LENGTH, RES_PARATR_HYPHENZONE, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, MID_HYPHEN_MIN_WORD_LENGTH},\ { UNO_NAME_PARA_HYPHENATION_ZONE, RES_PARATR_HYPHENZONE, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, MID_HYPHEN_ZONE},\ diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx index 45cb68790b87..d097c06c1965 100644 --- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx +++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx @@ -276,6 +276,8 @@ static OUString PropertyNametoRID(const OUString& rName) { "ParaHyphenationMaxTrailingChars", RID_PARA_HYPHENATION_MAX_TRAILING_CHARS }, { "ParaHyphenationCompoundMinLeadingChars", RID_PARA_HYPHENATION_COMPOUND_MIN_LEADING_CHARS }, + { "ParaHyphenationCompoundMinTrailingChars", + RID_PARA_HYPHENATION_COMPOUND_MIN_TRAILING_CHARS }, { "ParaHyphenationNoCaps", RID_PARA_HYPHENATION_NO_CAPS }, { "ParaHyphenationNoLastWord", RID_PARA_HYPHENATION_NO_LAST_WORD }, { "ParaHyphenationMinWordLength", RID_PARA_HYPHENATION_MIN_WORD_LENGTH }, diff --git a/xmloff/inc/xmlprop.hxx b/xmloff/inc/xmlprop.hxx index 689220a4819e..307a366f12c8 100644 --- a/xmloff/inc/xmlprop.hxx +++ b/xmloff/inc/xmlprop.hxx @@ -498,6 +498,8 @@ inline constexpr OUString PROP_ParaHyphenationMaxTrailingChars = u"ParaHyphenationMaxTrailingChars"_ustr; inline constexpr OUString PROP_ParaHyphenationCompoundMinLeadingChars = u"ParaHyphenationCompoundMinLeadingChars"_ustr; +inline constexpr OUString PROP_ParaHyphenationCompoundMinTrailingChars + = u"ParaHyphenationCompoundMinTrailingChars"_ustr; inline constexpr OUString PROP_ParaHyphenationMinWordLength = u"ParaHyphenationMinWordLength"_ustr; inline constexpr OUString PROP_ParaHyphenationNoCaps = u"ParaHyphenationNoCaps"_ustr; inline constexpr OUString PROP_ParaHyphenationNoLastWord = u"ParaHyphenationNoLastWord"_ustr; diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 4da955e16d30..a6b9c680eb3a 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -1088,6 +1088,7 @@ namespace xmloff::token { TOKEN( "hyphenation-zone-page", XML_HYPHENATION_ZONE_PAGE ), TOKEN( "hyphenation-zone-spread", XML_HYPHENATION_ZONE_SPREAD ), TOKEN( "hyphenation-compound-remain-char-count", XML_HYPHENATION_COMPOUND_REMAIN_CHAR_COUNT ), + TOKEN( "hyphenation-compound-push-char-count", XML_HYPHENATION_COMPOUND_PUSH_CHAR_COUNT ), TOKEN( "i", XML_I ), TOKEN( "icon", XML_ICON ), TOKEN( "icon-set", XML_ICON_SET ), diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx index f239a75b32a1..bf90abaa7400 100644 --- a/xmloff/source/text/txtprmap.cxx +++ b/xmloff/source/text/txtprmap.cxx @@ -349,7 +349,8 @@ XMLPropertyMapEntry constexpr aXMLParaPropMap[] = MAP_EXT( PROP_ParaHyphenationZoneColumn, XML_NAMESPACE_LO_EXT, XML_HYPHENATION_ZONE_COLUMN, XML_TYPE_NUMBER16_NONE|XML_TYPE_PROP_TEXT, 0 ), MAP_EXT( PROP_ParaHyphenationZonePage, XML_NAMESPACE_LO_EXT, XML_HYPHENATION_ZONE_PAGE, XML_TYPE_NUMBER16_NONE|XML_TYPE_PROP_TEXT, 0 ), MAP_EXT( PROP_ParaHyphenationZoneSpread, XML_NAMESPACE_LO_EXT, XML_HYPHENATION_ZONE_SPREAD, XML_TYPE_NUMBER16_NONE|XML_TYPE_PROP_TEXT, 0 ), - MAP_EXT( PROP_ParaHyphenationCompoundMinLeadingChars, XML_NAMESPACE_LO_EXT, XML_HYPHENATION_COMPOUND_REMAIN_CHAR_COUNT, XML_TYPE_NUMBER16_NO_ZERO|XML_TYPE_PROP_TEXT, 0 ), + MAP_EXT( PROP_ParaHyphenationCompoundMinLeadingChars, XML_NAMESPACE_LO_EXT, XML_HYPHENATION_COMPOUND_REMAIN_CHAR_COUNT, XML_TYPE_NUMBER16_NONE|XML_TYPE_PROP_TEXT, 0 ), + MAP_EXT( PROP_ParaHyphenationCompoundMinTrailingChars, XML_NAMESPACE_LO_EXT, XML_HYPHENATION_COMPOUND_PUSH_CHAR_COUNT, XML_TYPE_NUMBER16_NONE|XML_TYPE_PROP_TEXT, 0 ), MP_E( PROP_ParaHyphenationKeep, XML_NAMESPACE_FO, XML_HYPHENATION_KEEP, XML_TYPE_HYPHENATION_KEEP, 0 ), MAP_EXT( PROP_ParaHyphenationKeepType, XML_NAMESPACE_LO_EXT, XML_HYPHENATION_KEEP_TYPE, XML_TYPE_HYPHENATION_KEEP_TYPE|XML_TYPE_PROP_PARAGRAPH, 0 ), MAP_EXT( PROP_ParaHyphenationKeepLine, XML_NAMESPACE_LO_EXT, XML_HYPHENATION_KEEP_LINE, XML_TYPE_BOOL|XML_TYPE_PROP_PARAGRAPH, 0 ), diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt index f8e41ff95794..f268760695f5 100644 --- a/xmloff/source/token/tokens.txt +++ b/xmloff/source/token/tokens.txt @@ -988,6 +988,7 @@ hyphenation-zone-column hyphenation-zone-page hyphenation-zone-spread hyphenation-compound-remain-char-count +hyphenation-compound-push-char-count i icon icon-set