Hi, I add some changes in the code and now line breaking cut the word (character by character) in the different script depending on the available space in the line. I attached the patch so please review and give me your comments and ideas to solve the issue. regards, Nusaiba On Mon, Feb 1, 2016 at 9:42 AM, Mark Hung <marklh9@gmail.com> wrote:
Hi Nusaiba, You might have to understand how layout is done. FYR: https://wiki.openoffice.org/wiki/Writer/Core_And_Layout https://wiki.openoffice.org/wiki/Writer/Text_Formatting Multiportion can contain multiple lines in one single portion. For example, SwRubyPortion is used by CJK script for asian phonetic guide, where phonetic guide ( aka ruby text ) are placed above the base text. SwDoublePortion can contain two lines in one portion. Best Regards 2016-02-01 13:10 GMT+08:00 noseeba Al kindi <noseeba1@gmail.com>:Dear, I am interested in solving this bug [56408]: https://bugs.documentfoundation.org/show_bug.cgi?id=56408 when i go through the classes there was part talking about single and multi portion that I didn't understand it, so if anyone could explain what is a portion exactly? and what is the the different between single and multi portion? BTW, I welcome any suggestion that could help in solving this issue. regards Nusaiba _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-- Mark Hung
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 577506e..2ccddcd 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -381,6 +381,14 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf,
! rInf.IsFootnoteInside() )
nBreakPos = rInf.GetLineStart();
+ const CharClass& rCC = GetAppCharClass();
+ if(!rCC.isLetterNumeric(rInf.GetText(), nBreakPos -1) &&
+ (rSI.ScriptType(nBreakPos) != rSI.ScriptType( nBreakPos -1 )))
+ {
+ nBreakPos = nBreakPos-1;
+// nCutPos = nBreakPos;
+ }
+
nBreakStart = nBreakPos;
bHyph = BreakType::HYPHENATION == aResult.breakType;
Attachment:
After modification.png
Description: PNG image
Attachment:
Before modification.png
Description: PNG image