Commits

Anonymous committed 3f99c4e

CWS-TOOLING: integrate CWS tl73
2009-07-31 15:29:33 +0200 tl r274535 : #i64400# dash/hyphen should not break words

Comments (0)

Files changed (16)

i18npool/inc/breakiterator_ctl.hxx

 	sal_Int32* nextCellIndex;
 	sal_Int32* previousCellIndex;
 	sal_Int32 cellIndexSize;
-	virtual void SAL_CALL makeIndex(const rtl::OUString& text, sal_Int32 pos) throw(com::sun::star::uno::RuntimeException);
+    
+    virtual void SAL_CALL makeIndex(const rtl::OUString& text, sal_Int32 pos) throw(com::sun::star::uno::RuntimeException);
 };
 
 } } } } 

i18npool/inc/breakiterator_unicode.hxx

 	const sal_Char *cBreakIterator, *wordRule, *lineRule;
 	Boundary result; // for word break iterator
 
-    struct {
+    struct BI_Data {
         UnicodeString aICUText;
         icu::BreakIterator *aBreakIterator;
+        
+        BI_Data() : aICUText(), aBreakIterator(NULL) {}
     } character, word, sentence, line, *icuBI; 
+
     com::sun::star::lang::Locale aLocale;
     sal_Int16 aBreakType, aWordType;
+
     void SAL_CALL loadICUBreakIterator(const com::sun::star::lang::Locale& rLocale, 
         sal_Int16 rBreakType, sal_Int16 rWordType, const sal_Char* name, const rtl::OUString& rText) throw(com::sun::star::uno::RuntimeException);
 };

i18npool/inc/xdictionary.hxx

 
 // cache structure.
 struct WordBreakCache {
-	sal_Bool equals(const sal_Unicode *str, Boundary& boundary);	// checking cached string
 	sal_Int32 length;		// contents length saved here.
 	sal_Unicode *contents;		// seperated segment contents.
 	sal_Int32* wordboundary;     	// word boundaries in segments.
 	sal_Int32 size;			// size of wordboundary
+
+    WordBreakCache();
+    sal_Bool equals(const sal_Unicode *str, Boundary& boundary);    // checking cached string
 };
 
 class xdictionary

i18npool/source/breakiterator/breakiterator_cjk.cxx

 //      class BreakIterator_CJK
 //      ----------------------------------------------------;
 
-BreakIterator_CJK::BreakIterator_CJK() : dict(NULL)
+BreakIterator_CJK::BreakIterator_CJK() : 
+    dict( NULL ),
+    hangingCharacters()
 {
         cBreakIterator = "com.sun.star.i18n.BreakIterator_CJK";
 }

i18npool/source/breakiterator/breakiterator_ctl.cxx

 /**
  * Constructor.
  */
-BreakIterator_CTL::BreakIterator_CTL()
+BreakIterator_CTL::BreakIterator_CTL() :
+    cachedText(),
+    nextCellIndex( NULL ),
+    previousCellIndex( NULL ),
+    cellIndexSize( 512 )
 {
 	cBreakIterator = "com.sun.star.i18n.BreakIterator_CTL";
 	// to improve performance, alloc big enough memory in construct.
-	cellIndexSize = 512;
 	nextCellIndex = (sal_Int32*) calloc(cellIndexSize, sizeof(sal_Int32));
 	previousCellIndex = (sal_Int32*) calloc(cellIndexSize, sizeof(sal_Int32));
 	memset(nextCellIndex, 0, cellIndexSize * sizeof(sal_Int32));

i18npool/source/breakiterator/breakiterator_unicode.cxx

 
 #define ERROR ::com::sun::star::uno::RuntimeException()
 
-#define ImplementName "com.sun.star.i18n.BreakIterator_Unicode";
+//#define ImplementName "com.sun.star.i18n.BreakIterator_Unicode";
 
 
-BreakIterator_Unicode::BreakIterator_Unicode()
+BreakIterator_Unicode::BreakIterator_Unicode() :
+    cBreakIterator( "com.sun.star.i18n.BreakIterator_Unicode" ),    // implementation name
+    wordRule( "word" ),
+    lineRule( "line" ),
+    result(),
+    character(),
+    word(),
+    sentence(),
+    line(),
+    icuBI( NULL ),
+    aLocale(),
+    aBreakType(),
+    aWordType()
 {
-        wordRule="word";
-        lineRule="line";
-        character.aBreakIterator=word.aBreakIterator=sentence.aBreakIterator=line.aBreakIterator=NULL;
-        character.aICUText=UnicodeString();
-        word.aICUText=UnicodeString();
-        sentence.aICUText=UnicodeString();
-        line.aICUText=UnicodeString();
-        cBreakIterator = ImplementName;
-        icuBI=NULL;
 }
 
 

i18npool/source/breakiterator/data/dict_word.txt

                            
 $MidLetter = [[:name = APOSTROPHE:] [:name = GRAVE ACCENT:] \u0084 [:name = SOFT HYPHEN:] [:name = MIDDLE DOT:] [:name = GREEK TONOS:] [:name= FULL STOP:] 
               [:name = HEBREW PUNCTUATION GERSHAYIM:] [:name = DOUBLE VERTICAL LINE:] [:name = LEFT SINGLE QUOTATION MARK:]
-              [:name = RIGHT SINGLE QUOTATION MARK:] [:name = HYPHENATION POINT:] [:name = PRIME:] ];  
+              [:name = RIGHT SINGLE QUOTATION MARK:] [:name = HYPHENATION POINT:] [:name = PRIME:] 
+              [:name = HYPHEN-MINUS:] [:name = EN DASH:] [:name = EM DASH:] ];
 
 $SufixLetter = [:name= FULL STOP:];
               

i18npool/source/breakiterator/data/dict_word_dash.txt

-#
-#   Copyright (C) 2002-2003, International Business Machines Corporation and others.
-#       All Rights Reserved.
-#
-#   file:  dict_word.txt   
-#
-#   ICU Word Break Rules
-#      See Unicode Standard Annex #29.
-#      These rules are based on Version 4.0.0, dated 2003-04-17
-#
-
-
-
-####################################################################################
-#
-#  Character class definitions from TR 29
-#
-####################################################################################
-$Katakana  = [[:Script = KATAKANA:] [:name = KATAKANA-HIRAGANA PROLONGED SOUND MARK:] 
-                                   [:name = HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK:]
-                                   [:name = HALFWIDTH KATAKANA VOICED SOUND MARK:]
-                                   [:name = HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK:]];
-
-$Ideographic = [:Ideographic:];
-$Hangul = [:Script = HANGUL:];
-
-$ALetter   = [\u0002 [:Alphabetic:] [:name= COMMERCIAL AT:] [:name= HEBREW PUNCTUATION GERESH:]
-                           - $Ideographic
-                           - $Katakana
-                           - $Hangul
-                           - [:Script = Thai:]
-                           - [:Script = Lao:]
-                           - [:Script = Hiragana:]];
-                           
-$MidLetter = [[:name = APOSTROPHE:] [:name = GRAVE ACCENT:] \u0084 [:name = SOFT HYPHEN:] [:name = MIDDLE DOT:] [:name = GREEK TONOS:] [:name= FULL STOP:] 
-              [:name = HEBREW PUNCTUATION GERSHAYIM:] [:name = DOUBLE VERTICAL LINE:] [:name = LEFT SINGLE QUOTATION MARK:]
-              [:name = RIGHT SINGLE QUOTATION MARK:] [:name = HYPHENATION POINT:] [:name = PRIME:] 
-              [:name = HYPHEN-MINUS:] [:name = EN DASH:] ];
-
-$SufixLetter = [:name= FULL STOP:];
-              
-
-$MidNum    = [[:LineBreak = Infix_Numeric:] [:name= COMMERCIAL AT:] \u0084 [:name = GREEK TONOS:] [:name = ARABIC DECIMAL SEPARATOR:]
-             [:name = LEFT SINGLE QUOTATION MARK:] [:name = RIGHT SINGLE QUOTATION MARK:] [:name = SINGLE HIGH-REVERSED-9 QUOTATION MARK:]
-             [:name = PRIME:]];
-$Numeric   = [:LineBreak = Numeric:];
-
-
-$TheZWSP = \u200b;
-
-#
-#  Character Class Definitions.
-#    The names are those from TR29.
-#
-$CR         = \u000d;
-$LF         = \u000a;
-$Control    = [[[:Zl:] [:Zp:] [:Cc:] [:Cf:]] - $TheZWSP];
-$Extend     = [[:Grapheme_Extend = TRUE:]]; 
-
-
-
-
-####################################################################################
-#
-#  Word Break Rules.    Definitions and Rules specific to word break begin Here. 
-#
-####################################################################################
-
-$Format    = [[:Cf:] - $TheZWSP];
-
-
-
-# Rule 3:  Treat a grapheme cluster as if it were a single character.
-#          Hangul Syllables are easier to deal with here than they are in Grapheme Clusters
-#          because we don't need to find the boundaries between adjacent syllables -
-#          they won't be word boundaries.
-#
-
-
-#
-#  "Extended"  definitions.  Grapheme Cluster + Format Chars, treated like the base char.
-#
-$ALetterEx    = $ALetter   $Extend*; 
-$NumericEx    = $Numeric   $Extend*;
-$MidNumEx     = $MidNum    $Extend*;
-$MidLetterEx  = $MidLetter $Extend*;
-$SufixLetterEx= $SufixLetter $Extend*;
-$KatakanaEx   = $Katakana  $Extend*;
-$IdeographicEx= $Ideographic  $Extend*;
-$HangulEx = $Hangul  $Extend*;
-$FormatEx     = $Format    $Extend*;
-
-
-#
-#  Numbers.  Rules 8, 11, 12 form the TR.
-#
-$NumberSequence = $NumericEx ($FormatEx* $MidNumEx? $FormatEx* $NumericEx)*;
-$NumberSequence {100};
-
-#
-#  Words.  Alpha-numerics.  Rule 5, 6, 7, 9, 10
-#     - must include at least one letter. 
-#     - may include both letters and numbers.
-#     - may include  MideLetter, MidNumber punctuation.
-#
-$LetterSequence = $ALetterEx ($FormatEx* $MidLetterEx? $FormatEx* $ALetterEx)*;     # rules #6, #7
-($NumberSequence $FormatEx*)? $LetterSequence ($FormatEx* ($NumberSequence | $LetterSequence))* $SufixLetterEx? {200};
-
-[[:P:][:S:]]*;
-
-#
-#  Do not break between Katakana.   Rule #13.
-#
-$KatakanaEx ($FormatEx* $KatakanaEx)* {300};
-[:Hiragana:] $Extend* {300};
-
-#
-#  Ideographic Characters.  Stand by themselves as words.
-#                           Separated from the "Everything Else" rule, below, only so that they
-#                           can be tagged with a return value.   TODO:  is this what we want?
-#
-$IdeographicEx ($FormatEx* $IdeographicEx)* {400};
-$HangulEx ($FormatEx* $HangulEx)* {400};
-
-#
-#  Everything Else, with no tag.
-#                   Non-Control chars combine with $Extend (combining) chars.
-#                   Controls are do not.
-#
-[^$Control [:Ideographic:]] $Extend*;
-$CR $LF;
-
-#
-#  Reverse Rules.   Back up over any of the chars that can group together.
-#                   (Reverse rules do not need to be exact; they can back up  too far,
-#                   but must back up at least enough, and must stop on a boundary.)
-#
-
-# NonStarters are the set of all characters that can appear at the 2nd - nth position of
-#    a word.   (They may also be the first.)   The reverse rule skips over these, until it
-#    reaches something that can only be the start (and probably only) char in a "word".
-#    A space or punctuation meets the test.
-#
-$NonStarters = [$Numeric $ALetter $Katakana $Ideographic $Hangul [:P:] [:S:] $MidLetter $MidNum $SufixLetter $Extend $Format];
-
-#!.*;
-! ($NonStarters* | \n \r) .;
-

i18npool/source/breakiterator/data/dict_word_nodash.txt

+#
+#   Copyright (C) 2002-2003, International Business Machines Corporation and others.
+#       All Rights Reserved.
+#
+#   file:  dict_word.txt   
+#
+#   ICU Word Break Rules
+#      See Unicode Standard Annex #29.
+#      These rules are based on Version 4.0.0, dated 2003-04-17
+#
+
+
+
+####################################################################################
+#
+#  Character class definitions from TR 29
+#
+####################################################################################
+$Katakana  = [[:Script = KATAKANA:] [:name = KATAKANA-HIRAGANA PROLONGED SOUND MARK:] 
+                                   [:name = HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK:]
+                                   [:name = HALFWIDTH KATAKANA VOICED SOUND MARK:]
+                                   [:name = HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK:]];
+
+$Ideographic = [:Ideographic:];
+$Hangul = [:Script = HANGUL:];
+
+$ALetter   = [\u0002 [:Alphabetic:] [:name= COMMERCIAL AT:] [:name= HEBREW PUNCTUATION GERESH:]
+                           - $Ideographic
+                           - $Katakana
+                           - $Hangul
+                           - [:Script = Thai:]
+                           - [:Script = Lao:]
+                           - [:Script = Hiragana:]];
+                           
+$MidLetter = [[:name = APOSTROPHE:] [:name = GRAVE ACCENT:] \u0084 [:name = SOFT HYPHEN:] [:name = MIDDLE DOT:] [:name = GREEK TONOS:] [:name= FULL STOP:] 
+              [:name = HEBREW PUNCTUATION GERSHAYIM:] [:name = DOUBLE VERTICAL LINE:] [:name = LEFT SINGLE QUOTATION MARK:]
+              [:name = RIGHT SINGLE QUOTATION MARK:] [:name = HYPHENATION POINT:] [:name = PRIME:] ];  
+
+$SufixLetter = [:name= FULL STOP:];
+              
+
+$MidNum    = [[:LineBreak = Infix_Numeric:] [:name= COMMERCIAL AT:] \u0084 [:name = GREEK TONOS:] [:name = ARABIC DECIMAL SEPARATOR:]
+             [:name = LEFT SINGLE QUOTATION MARK:] [:name = RIGHT SINGLE QUOTATION MARK:] [:name = SINGLE HIGH-REVERSED-9 QUOTATION MARK:]
+             [:name = PRIME:]];
+$Numeric   = [:LineBreak = Numeric:];
+
+
+$TheZWSP = \u200b;
+
+#
+#  Character Class Definitions.
+#    The names are those from TR29.
+#
+$CR         = \u000d;
+$LF         = \u000a;
+$Control    = [[[:Zl:] [:Zp:] [:Cc:] [:Cf:]] - $TheZWSP];
+$Extend     = [[:Grapheme_Extend = TRUE:]]; 
+
+
+
+
+####################################################################################
+#
+#  Word Break Rules.    Definitions and Rules specific to word break begin Here. 
+#
+####################################################################################
+
+$Format    = [[:Cf:] - $TheZWSP];
+
+
+
+# Rule 3:  Treat a grapheme cluster as if it were a single character.
+#          Hangul Syllables are easier to deal with here than they are in Grapheme Clusters
+#          because we don't need to find the boundaries between adjacent syllables -
+#          they won't be word boundaries.
+#
+
+
+#
+#  "Extended"  definitions.  Grapheme Cluster + Format Chars, treated like the base char.
+#
+$ALetterEx    = $ALetter   $Extend*; 
+$NumericEx    = $Numeric   $Extend*;
+$MidNumEx     = $MidNum    $Extend*;
+$MidLetterEx  = $MidLetter $Extend*;
+$SufixLetterEx= $SufixLetter $Extend*;
+$KatakanaEx   = $Katakana  $Extend*;
+$IdeographicEx= $Ideographic  $Extend*;
+$HangulEx = $Hangul  $Extend*;
+$FormatEx     = $Format    $Extend*;
+
+
+#
+#  Numbers.  Rules 8, 11, 12 form the TR.
+#
+$NumberSequence = $NumericEx ($FormatEx* $MidNumEx? $FormatEx* $NumericEx)*;
+$NumberSequence {100};
+
+#
+#  Words.  Alpha-numerics.  Rule 5, 6, 7, 9, 10
+#     - must include at least one letter. 
+#     - may include both letters and numbers.
+#     - may include  MideLetter, MidNumber punctuation.
+#
+$LetterSequence = $ALetterEx ($FormatEx* $MidLetterEx? $FormatEx* $ALetterEx)*;     # rules #6, #7
+($NumberSequence $FormatEx*)? $LetterSequence ($FormatEx* ($NumberSequence | $LetterSequence))* $SufixLetterEx? {200};
+
+[[:P:][:S:]]*;
+
+#
+#  Do not break between Katakana.   Rule #13.
+#
+$KatakanaEx ($FormatEx* $KatakanaEx)* {300};
+[:Hiragana:] $Extend* {300};
+
+#
+#  Ideographic Characters.  Stand by themselves as words.
+#                           Separated from the "Everything Else" rule, below, only so that they
+#                           can be tagged with a return value.   TODO:  is this what we want?
+#
+$IdeographicEx ($FormatEx* $IdeographicEx)* {400};
+$HangulEx ($FormatEx* $HangulEx)* {400};
+
+#
+#  Everything Else, with no tag.
+#                   Non-Control chars combine with $Extend (combining) chars.
+#                   Controls are do not.
+#
+[^$Control [:Ideographic:]] $Extend*;
+$CR $LF;
+
+#
+#  Reverse Rules.   Back up over any of the chars that can group together.
+#                   (Reverse rules do not need to be exact; they can back up  too far,
+#                   but must back up at least enough, and must stop on a boundary.)
+#
+
+# NonStarters are the set of all characters that can appear at the 2nd - nth position of
+#    a word.   (They may also be the first.)   The reverse rule skips over these, until it
+#    reaches something that can only be the start (and probably only) char in a "word".
+#    A space or punctuation meets the test.
+#
+$NonStarters = [$Numeric $ALetter $Katakana $Ideographic $Hangul [:P:] [:S:] $MidLetter $MidNum $SufixLetter $Extend $Format];
+
+#!.*;
+! ($NonStarters* | \n \r) .;
+

i18npool/source/breakiterator/data/dict_word_prepostdash.txt

+#
+#   Copyright (C) 2002-2003, International Business Machines Corporation and others.
+#       All Rights Reserved.
+#
+#   file:  dict_word.txt   
+#
+#   ICU Word Break Rules
+#      See Unicode Standard Annex #29.
+#      These rules are based on Version 4.0.0, dated 2003-04-17
+#
+
+
+
+####################################################################################
+#
+#  Character class definitions from TR 29
+#
+####################################################################################
+$Katakana  = [[:Script = KATAKANA:] [:name = KATAKANA-HIRAGANA PROLONGED SOUND MARK:] 
+                                   [:name = HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK:]
+                                   [:name = HALFWIDTH KATAKANA VOICED SOUND MARK:]
+                                   [:name = HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK:]];
+
+$Ideographic = [:Ideographic:];
+$Hangul = [:Script = HANGUL:];
+
+# list of dashes or hyphens that should be accepted as part of the word if a single one of these
+# pre- or postfixes a word. E.g. in German: "Arbeits-" or "-nehmer" where that hyphen needs to
+# be part of the word in order to have it properly spell checked etc.
+$PrePostDashHyphen = [ [:name = HYPHEN-MINUS:] [:name = EN DASH:] [:name = EM DASH:] ];
+
+
+$ALetter   = [\u0002 [:Alphabetic:] [:name= COMMERCIAL AT:] [:name= HEBREW PUNCTUATION GERESH:]
+                           - $Ideographic
+                           - $Katakana
+                           - $Hangul
+                           - [:Script = Thai:]
+                           - [:Script = Lao:]
+                           - [:Script = Hiragana:]];
+                           
+$MidLetter = [[:name = APOSTROPHE:] [:name = GRAVE ACCENT:] \u0084 [:name = SOFT HYPHEN:] [:name = MIDDLE DOT:] [:name = GREEK TONOS:] [:name= FULL STOP:] 
+              [:name = HEBREW PUNCTUATION GERSHAYIM:] [:name = DOUBLE VERTICAL LINE:] [:name = LEFT SINGLE QUOTATION MARK:]
+              [:name = RIGHT SINGLE QUOTATION MARK:] [:name = HYPHENATION POINT:] [:name = PRIME:] 
+              [:name = HYPHEN-MINUS:] [:name = EN DASH:] [:name = EM DASH:] ];
+
+$SufixLetter = [:name= FULL STOP:];
+              
+
+$MidNum    = [[:LineBreak = Infix_Numeric:] [:name= COMMERCIAL AT:] \u0084 [:name = GREEK TONOS:] [:name = ARABIC DECIMAL SEPARATOR:]
+             [:name = LEFT SINGLE QUOTATION MARK:] [:name = RIGHT SINGLE QUOTATION MARK:] [:name = SINGLE HIGH-REVERSED-9 QUOTATION MARK:]
+             [:name = PRIME:]];
+$Numeric   = [:LineBreak = Numeric:];
+
+
+$TheZWSP = \u200b;
+
+#
+#  Character Class Definitions.
+#    The names are those from TR29.
+#
+$CR         = \u000d;
+$LF         = \u000a;
+$Control    = [[[:Zl:] [:Zp:] [:Cc:] [:Cf:]] - $TheZWSP];
+$Extend     = [[:Grapheme_Extend = TRUE:]]; 
+
+
+
+
+####################################################################################
+#
+#  Word Break Rules.    Definitions and Rules specific to word break begin Here. 
+#
+####################################################################################
+
+$Format    = [[:Cf:] - $TheZWSP];
+
+
+
+# Rule 3:  Treat a grapheme cluster as if it were a single character.
+#          Hangul Syllables are easier to deal with here than they are in Grapheme Clusters
+#          because we don't need to find the boundaries between adjacent syllables -
+#          they won't be word boundaries.
+#
+
+
+#
+#  "Extended"  definitions.  Grapheme Cluster + Format Chars, treated like the base char.
+#
+$ALetterEx    = $ALetter   $Extend*; 
+$NumericEx    = $Numeric   $Extend*;
+$MidNumEx     = $MidNum    $Extend*;
+$MidLetterEx  = $MidLetter $Extend*;
+$SufixLetterEx= $SufixLetter $Extend*;
+$KatakanaEx   = $Katakana  $Extend*;
+$IdeographicEx= $Ideographic  $Extend*;
+$HangulEx = $Hangul  $Extend*;
+$FormatEx     = $Format    $Extend*;
+
+
+#
+#  Numbers.  Rules 8, 11, 12 form the TR.
+#
+$NumberSequence = $NumericEx ($FormatEx* $MidNumEx? $FormatEx* $NumericEx)*;
+$NumberSequence {100};
+
+#
+#  Words.  Alpha-numerics.  Rule 5, 6, 7, 9, 10
+#     - must include at least one letter. 
+#     - may include both letters and numbers.
+#     - may include  MideLetter, MidNumber punctuation.
+#
+# At most one leading or trailing dash/hyphen should be accepted as well.
+# E.g. in German: "Arbeits-" or "-nehmer" where that hyphen needs to
+# be part of the word in order to have it properly spell checked etc.
+$LetterSequence = $PrePostDashHyphen? $ALetterEx ($FormatEx* $MidLetterEx? $FormatEx* $ALetterEx)* $PrePostDashHyphen?;     # rules #6, #7
+($NumberSequence $FormatEx*)? $LetterSequence ($FormatEx* ($NumberSequence | $LetterSequence))* $SufixLetterEx? {200};
+
+[[:P:][:S:]]*;
+
+#
+#  Do not break between Katakana.   Rule #13.
+#
+$KatakanaEx ($FormatEx* $KatakanaEx)* {300};
+[:Hiragana:] $Extend* {300};
+
+#
+#  Ideographic Characters.  Stand by themselves as words.
+#                           Separated from the "Everything Else" rule, below, only so that they
+#                           can be tagged with a return value.   TODO:  is this what we want?
+#
+$IdeographicEx ($FormatEx* $IdeographicEx)* {400};
+$HangulEx ($FormatEx* $HangulEx)* {400};
+
+#
+#  Everything Else, with no tag.
+#                   Non-Control chars combine with $Extend (combining) chars.
+#                   Controls are do not.
+#
+[^$Control [:Ideographic:]] $Extend*;
+$CR $LF;
+
+#
+#  Reverse Rules.   Back up over any of the chars that can group together.
+#                   (Reverse rules do not need to be exact; they can back up  too far,
+#                   but must back up at least enough, and must stop on a boundary.)
+#
+
+# NonStarters are the set of all characters that can appear at the 2nd - nth position of
+#    a word.   (They may also be the first.)   The reverse rule skips over these, until it
+#    reaches something that can only be the start (and probably only) char in a "word".
+#    A space or punctuation meets the test.
+#
+$NonStarters = [$Numeric $ALetter $Katakana $Ideographic $Hangul [:P:] [:S:] $MidLetter $MidNum $SufixLetter $Extend $Format];
+
+#!.*;
+! ($NonStarters* | \n \r) .;
+

i18npool/source/breakiterator/makefile.mk

 # The output of gencmn generates warnings under Windows. We want to minimize the patches to external tools,
 # so the output (OpenOffice_icu_dat.c) is changed here to include a pragma to disable the warnings.
 # Output of gencmn is redirected to OpenOffice_icu_tmp.c with the -t switch.
-$(MISC)$/OpenOffice_%.c : 
+$(MISC)$/OpenOffice_%.c : $(MY_BRK_BRKFILES:s/.brk/_brk.c/)
     $(WRAPCMD) $(GENCMN) -n OpenOffice -t tmp -S -d $(MISC) O $(mktmp $(subst,$(MISC)$/, $(MY_BRK_BRKFILES:t"\n")))
     echo $(USQ)#ifdef _MSC_VER$(USQ) > $@
     echo $(USQ)#pragma warning( disable : 4229 4668 )$(USQ) >> $@

i18npool/source/breakiterator/xdictionary.cxx

 
 extern "C" { static void SAL_CALL thisModule() {} }
 
-xdictionary::xdictionary(const sal_Char *lang)
+xdictionary::xdictionary(const sal_Char *lang) :
+    existMark( NULL ),
+    index1( NULL ),
+    index2( NULL ),
+    lenArray( NULL ),
+    dataArea( NULL ),
+    hModule( NULL ),
+    boundary(),
+    japaneseWordBreak( sal_False )
+#if USE_CELL_BOUNDARY_CODE
+    // For CTL breakiterator, where the word boundary should not be inside cell.
+    ,
+    useCellBoundary( sal_False ),
+    cellBoundary( NULL )
+#endif
 {
 	index1 = 0;
 #ifdef SAL_DLLPREFIX
 
 #if USE_CELL_BOUNDARY_CODE
         useCellBoundary = sal_False;
+        cellBoundary = NULL;
 #endif
         japaneseWordBreak = sal_False;
 }
         return 0;
 }
 
+
+/*
+ * c-tor
+ */
+
+WordBreakCache::WordBreakCache() :
+    length( 0 ),
+    contents( NULL ),
+    wordboundary( NULL ),
+    size( 0 )
+{
+}    
+
 /*
  * Compare two unicode string,
  */

i18npool/source/localedata/data/de_DE.xml

   </LC_CURRENCY>
   <LC_TRANSLITERATION ref="en_US"/>
   <LC_MISC>
-    <ReservedWords>
+      <BreakIteratorRules>
+          <EditMode/>
+          <DictionaryMode>dict_word_prepostdash</DictionaryMode>
+          <WordCountMode/>
+          <CharacterMode/>
+          <LineMode/>
+      </BreakIteratorRules>
+      <ReservedWords>
       <trueWord>wahr</trueWord>
       <falseWord>falsch</falseWord>
       <quarter1Word>1. Quartal</quarter1Word>

i18npool/source/localedata/data/nl_NL.xml

 </LC_CURRENCY>
 <LC_TRANSLITERATION ref="en_US"/>
 <LC_MISC>
-<ReservedWords>
-<trueWord>waar</trueWord>
-<falseWord>onwaar</falseWord>
-<quarter1Word>1ste kwartaal</quarter1Word>
-<quarter2Word>2de kwartaal</quarter2Word>
-<quarter3Word>3de kwartaal</quarter3Word>
-<quarter4Word>4de kwartaal</quarter4Word>
-<aboveWord>boven</aboveWord>
-<belowWord>onder</belowWord>
-<quarter1Abbreviation>K1</quarter1Abbreviation>
-<quarter2Abbreviation>K2</quarter2Abbreviation>
-<quarter3Abbreviation>K3</quarter3Abbreviation>
-<quarter4Abbreviation>K4</quarter4Abbreviation>
-</ReservedWords>
+  <BreakIteratorRules>
+    <EditMode/>
+    <DictionaryMode>dict_word_prepostdash</DictionaryMode>
+    <WordCountMode/>
+    <CharacterMode/>
+    <LineMode/>
+  </BreakIteratorRules>
+  <ReservedWords>
+    <trueWord>waar</trueWord>
+    <falseWord>onwaar</falseWord>
+    <quarter1Word>1ste kwartaal</quarter1Word>
+    <quarter2Word>2de kwartaal</quarter2Word>
+    <quarter3Word>3de kwartaal</quarter3Word>
+    <quarter4Word>4de kwartaal</quarter4Word>
+    <aboveWord>boven</aboveWord>
+    <belowWord>onder</belowWord>
+    <quarter1Abbreviation>K1</quarter1Abbreviation>
+    <quarter2Abbreviation>K2</quarter2Abbreviation>
+    <quarter3Abbreviation>K3</quarter3Abbreviation>
+    <quarter4Abbreviation>K4</quarter4Abbreviation>
+  </ReservedWords>
 </LC_MISC>
 <LC_NumberingLevel ref="en_US"/>
 <LC_OutLineNumberingLevel ref="en_US"/>

i18npool/source/localedata/data/pl_PL.xml

   </LC_CURRENCY>
   <LC_TRANSLITERATION ref="en_US"/>
   <LC_MISC>
-    <BreakIteratorRules>
-      <EditMode/>
-      <DictionaryMode>dict_word_dash</DictionaryMode>
-      <WordCountMode/>
-      <CharacterMode/>
-      <LineMode/>
-    </BreakIteratorRules>
     <ReservedWords>
       <trueWord>prawda</trueWord>
       <falseWord>fałsz</falseWord>

i18npool/source/localedata/data/sv_SE.xml

   </LC_CURRENCY>
   <LC_TRANSLITERATION ref="en_US"/>
   <LC_MISC>
+    <BreakIteratorRules>
+      <EditMode/>
+      <DictionaryMode>dict_word_prepostdash</DictionaryMode>
+      <WordCountMode/>
+      <CharacterMode/>
+      <LineMode/>
+    </BreakIteratorRules>
     <ReservedWords>
       <trueWord>sant</trueWord>
       <falseWord>falskt</falseWord>