[ooo-build-commit] Branch 'ooo/master' - 2 commits - i18npool/inc i18npool/source svtools/source

Jan Holesovsky kendy at kemper.freedesktop.org
Thu Aug 6 18:29:27 PDT 2009


 i18npool/inc/breakiterator_ctl.hxx                           |    1 
 i18npool/inc/breakiterator_unicode.hxx                       |    6 
 i18npool/inc/xdictionary.hxx                                 |    4 
 i18npool/source/breakiterator/breakiterator_cjk.cxx          |    4 
 i18npool/source/breakiterator/breakiterator_ctl.cxx          |    7 
 i18npool/source/breakiterator/breakiterator_unicode.cxx      |   29 +-
 i18npool/source/breakiterator/data/dict_word.txt             |    3 
 i18npool/source/breakiterator/data/dict_word_dash.txt        |  148 ----------
 i18npool/source/breakiterator/data/dict_word_nodash.txt      |  147 ++++++++++
 i18npool/source/breakiterator/data/dict_word_prepostdash.txt |  157 +++++++++++
 i18npool/source/breakiterator/makefile.mk                    |    2 
 i18npool/source/breakiterator/xdictionary.cxx                |   30 ++
 i18npool/source/localedata/data/de_DE.xml                    |    9 
 i18npool/source/localedata/data/nl_NL.xml                    |   35 +-
 i18npool/source/localedata/data/pl_PL.xml                    |    7 
 i18npool/source/localedata/data/sv_SE.xml                    |    7 
 svtools/source/config/useroptions.cxx                        |  107 +++++--
 17 files changed, 478 insertions(+), 225 deletions(-)

New commits:
commit f7144b16bc066c6fbff3a5a883f0c76cf977f9f6
Author: Release Engineers <releng at openoffice.org>
Date:   Thu Aug 6 18:13:57 2009 +0000

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

diff --git a/i18npool/inc/breakiterator_ctl.hxx b/i18npool/inc/breakiterator_ctl.hxx
index 089cbaa..161c1a5 100644
--- a/i18npool/inc/breakiterator_ctl.hxx
+++ b/i18npool/inc/breakiterator_ctl.hxx
@@ -58,6 +58,7 @@ protected:
     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);
 };
 
diff --git a/i18npool/inc/breakiterator_unicode.hxx b/i18npool/inc/breakiterator_unicode.hxx
index b0414ef..4708d09 100644
--- a/i18npool/inc/breakiterator_unicode.hxx
+++ b/i18npool/inc/breakiterator_unicode.hxx
@@ -86,12 +86,16 @@ protected:
     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);
 };
diff --git a/i18npool/inc/xdictionary.hxx b/i18npool/inc/xdictionary.hxx
index 1e18e17..a338973 100644
--- a/i18npool/inc/xdictionary.hxx
+++ b/i18npool/inc/xdictionary.hxx
@@ -45,11 +45,13 @@ namespace com { namespace sun { namespace star { namespace i18n {
 
 // 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
diff --git a/i18npool/source/breakiterator/breakiterator_cjk.cxx b/i18npool/source/breakiterator/breakiterator_cjk.cxx
index 554b68b..78c3e25 100644
--- a/i18npool/source/breakiterator/breakiterator_cjk.cxx
+++ b/i18npool/source/breakiterator/breakiterator_cjk.cxx
@@ -46,7 +46,9 @@ namespace com { namespace sun { namespace star { namespace i18n {
 //      class BreakIterator_CJK
 //      ----------------------------------------------------;
 
-BreakIterator_CJK::BreakIterator_CJK() : dict(NULL)
+BreakIterator_CJK::BreakIterator_CJK() : 
+    dict( NULL ),
+    hangingCharacters()
 {
         cBreakIterator = "com.sun.star.i18n.BreakIterator_CJK";
 }
diff --git a/i18npool/source/breakiterator/breakiterator_ctl.cxx b/i18npool/source/breakiterator/breakiterator_ctl.cxx
index 551781e..16743cd 100644
--- a/i18npool/source/breakiterator/breakiterator_ctl.cxx
+++ b/i18npool/source/breakiterator/breakiterator_ctl.cxx
@@ -45,11 +45,14 @@ namespace com { namespace sun { namespace star { namespace i18n {
 /**
  * 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));
diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx
index ad1ef28..5a6e1ab 100644
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
+++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx
@@ -51,20 +51,23 @@ namespace com { namespace sun { namespace star { namespace i18n {
 
 #define ERROR ::com::sun::star::uno::RuntimeException()
 
-#define ImplementName "com.sun.star.i18n.BreakIterator_Unicode";
-
-
-BreakIterator_Unicode::BreakIterator_Unicode()
+//#define ImplementName "com.sun.star.i18n.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;
 }
 
 
diff --git a/i18npool/source/breakiterator/data/dict_word.txt b/i18npool/source/breakiterator/data/dict_word.txt
index 4c5c808..367a82d 100644
--- a/i18npool/source/breakiterator/data/dict_word.txt
+++ b/i18npool/source/breakiterator/data/dict_word.txt
@@ -34,7 +34,8 @@ $ALetter   = [\u0002 [:Alphabetic:] [:name= COMMERCIAL AT:] [:name= HEBREW PUNCT
                            
 $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:];
               
diff --git a/i18npool/source/breakiterator/data/dict_word_dash.txt b/i18npool/source/breakiterator/data/dict_word_dash.txt
deleted file mode 100644
index 7f861c7..0000000
--- a/i18npool/source/breakiterator/data/dict_word_dash.txt
+++ /dev/null
@@ -1,148 +0,0 @@
-#
-#   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) .;
-
diff --git a/i18npool/source/breakiterator/data/dict_word_nodash.txt b/i18npool/source/breakiterator/data/dict_word_nodash.txt
new file mode 100644
index 0000000..4c5c808
--- /dev/null
+++ b/i18npool/source/breakiterator/data/dict_word_nodash.txt
@@ -0,0 +1,147 @@
+#
+#   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) .;
+
diff --git a/i18npool/source/breakiterator/data/dict_word_prepostdash.txt b/i18npool/source/breakiterator/data/dict_word_prepostdash.txt
new file mode 100644
index 0000000..1bf9445
--- /dev/null
+++ b/i18npool/source/breakiterator/data/dict_word_prepostdash.txt
@@ -0,0 +1,157 @@
+#
+#   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) .;
+
diff --git a/i18npool/source/breakiterator/makefile.mk b/i18npool/source/breakiterator/makefile.mk
index 7ba9cd3..50e437e 100644
--- a/i18npool/source/breakiterator/makefile.mk
+++ b/i18npool/source/breakiterator/makefile.mk
@@ -93,7 +93,7 @@ $(MISC)$/%_brk.c : $(MISC)$/%.brk
 # 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) >> $@
diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx
index 43fad2b..cd35372 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -54,7 +54,21 @@ namespace com { namespace sun { namespace star { namespace i18n {
 
 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
@@ -92,6 +106,7 @@ xdictionary::xdictionary(const sal_Char *lang)
 
 #if USE_CELL_BOUNDARY_CODE
         useCellBoundary = sal_False;
+        cellBoundary = NULL;
 #endif
         japaneseWordBreak = sal_False;
 }
@@ -149,6 +164,19 @@ sal_Int32 xdictionary::getLongestMatch(const sal_Unicode* str, sal_Int32 sLen) {
         return 0;
 }
 
+
+/*
+ * c-tor
+ */
+
+WordBreakCache::WordBreakCache() :
+    length( 0 ),
+    contents( NULL ),
+    wordboundary( NULL ),
+    size( 0 )
+{
+}    
+
 /*
  * Compare two unicode string,
  */
diff --git a/i18npool/source/localedata/data/de_DE.xml b/i18npool/source/localedata/data/de_DE.xml
index 295b826..a83b3db 100644
--- a/i18npool/source/localedata/data/de_DE.xml
+++ b/i18npool/source/localedata/data/de_DE.xml
@@ -328,7 +328,14 @@
   </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>
diff --git a/i18npool/source/localedata/data/nl_NL.xml b/i18npool/source/localedata/data/nl_NL.xml
index eedfdc1..5a91c9c 100644
--- a/i18npool/source/localedata/data/nl_NL.xml
+++ b/i18npool/source/localedata/data/nl_NL.xml
@@ -360,20 +360,27 @@
 </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"/>
diff --git a/i18npool/source/localedata/data/pl_PL.xml b/i18npool/source/localedata/data/pl_PL.xml
index 4119060..1956896 100644
--- a/i18npool/source/localedata/data/pl_PL.xml
+++ b/i18npool/source/localedata/data/pl_PL.xml
@@ -326,13 +326,6 @@
   </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>
diff --git a/i18npool/source/localedata/data/sv_SE.xml b/i18npool/source/localedata/data/sv_SE.xml
index 333690a..211f95c 100644
--- a/i18npool/source/localedata/data/sv_SE.xml
+++ b/i18npool/source/localedata/data/sv_SE.xml
@@ -315,6 +315,13 @@
   </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>
commit 065bb6217363a28638e7c31036abcc1dec4f7b1c
Author: Release Engineers <releng at openoffice.org>
Date:   Thu Aug 6 12:44:16 2009 +0000

    CWS-TOOLING: integrate CWS os132
    2009-07-21 15:24:18 +0200 os  r274201 : #i103696# SwXTextPortion/SwXParagraph excluded
    2009-07-15 13:19:17 +0200 os  r274007 : #i103564# typo
    2009-07-15 13:09:30 +0200 os  r274005 : #i103564# SwFrames::hasElements
    2009-07-15 13:02:16 +0200 os  r274003 : #i103564# SwXBookmark::getPropertySetInfo fixed
    2009-06-26 10:11:00 +0200 os  r273395 : CWS-TOOLING: rebase CWS os132 to trunk at 272827 (milestone: DEV300:m50)
    2009-06-23 08:52:24 +0200 os  r273256 : #i102764# patch: attribute ListBoxes correctly handled in ::Reset()
    2009-06-23 08:51:31 +0200 os  r273255 : #i102764# ResetColor() added to remove background color
    2009-06-22 14:57:38 +0200 os  r273233 : #i102619# prevent access to already destroyed shell
    2009-06-18 13:26:51 +0200 os  r273112 : #i99508# ::insertTextContent: re-route to ::attach()
    2009-06-18 10:59:53 +0200 os  r273107 : #i85405# patch to enable 'Print grid' CheckBox correctly
    2009-06-18 10:54:02 +0200 os  r273106 : #i85133# dispose connection in GetColumnFmt to prevent connection locking
    2009-06-18 10:24:31 +0200 os  r273104 : #99535# ExportGraphic changed
    2009-06-18 10:24:03 +0200 os  r273103 : #99535# ExportGraphic changed
    2009-06-18 10:23:11 +0200 os  r273102 : #i102841# redlining mode switches to insert mode (cmc)
    2009-06-17 14:05:42 +0200 os  r273070 : #i102111# do not save already saved HTML documents before switching to source veiw
    2009-06-17 13:18:20 +0200 os  r273063 : #i101825# set rembered start position at the real start not at the initial start
    2009-06-17 08:24:10 +0200 os  r273048 : #99535# no dierect access to the file picker interface
    2009-06-16 15:00:12 +0200 os  r273020 : #i99937# notification of user options changes re-introduced
    2009-06-15 14:36:03 +0200 os  r272987 : #i98032# unreplaced text in protected areas must not be attributed either
    2009-06-15 14:20:26 +0200 os  r272985 : #i98032# replace list has to be initialised
    2009-06-04 13:29:02 +0200 os  r272624 : #i97810# set focus into column page
    2009-06-04 11:01:14 +0200 os  r272617 : #i98164# dialog resize to ease localisation
    2009-06-04 10:59:44 +0200 os  r272616 : #i98164# dialog resize to ease localisation
    2009-05-28 16:05:03 +0200 os  r272413 : #i98172# ConvertFieldsToText: take care of tabs with attributes
    2009-05-28 11:12:45 +0200 os  r272385 : #i59361# dialog controls resized
    2009-05-28 11:03:14 +0200 os  r272383 : #i59174# dialog controls moved

diff --git a/svtools/source/config/useroptions.cxx b/svtools/source/config/useroptions.cxx
index 9f2f87d..64273c9 100644
--- a/svtools/source/config/useroptions.cxx
+++ b/svtools/source/config/useroptions.cxx
@@ -49,51 +49,45 @@
 #include <rtl/logfile.hxx>
 #include "itemholder2.hxx"
 
-#ifndef _COM_SUN_STAR_BEANS_PROPERTY_HPP_ 
 #include <com/sun/star/beans/Property.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ 
 #include <com/sun/star/beans/XPropertySet.hpp> 
-#endif
-
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
 #include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ 
 #include <com/sun/star/container/XNameAccess.hpp> 
-#endif
-
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_ 
 #include <com/sun/star/container/XNameContainer.hpp> 
-#endif
-
-#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_ 
 #include <com/sun/star/lang/XSingleServiceFactory.hpp> 
-#endif
-
-#ifndef _COMPHELPER_CONFIGURATIONHELPER_HXX_ 
+#include <com/sun/star/util/XChangesListener.hpp>
+#include <com/sun/star/util/XChangesNotifier.hpp>
+#include <com/sun/star/util/ChangesEvent.hpp>
 #include <comphelper/configurationhelper.hxx> 
-#endif
-
-#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_ 
 #include <unotools/processfactory.hxx> 
-#endif
-
-#ifndef _SVT_LOGHELPER_HXX 
-#include "loghelper.hxx" 
-#endif
+#include <loghelper.hxx>
 
 using namespace utl;
 using namespace rtl;
+using namespace com::sun::star;
 using namespace com::sun::star::uno;
 
 namespace css = ::com::sun::star;
 
 // class SvtUserOptions_Impl ---------------------------------------------
+class SvtUserOptions_Impl;
+class SvtUserConfigChangeListener_Impl : public cppu::WeakImplHelper1
+<
+    com::sun::star::util::XChangesListener
+>
+{
+        SvtUserOptions_Impl&    m_rParent;
+    public:
+        SvtUserConfigChangeListener_Impl(SvtUserOptions_Impl& rParent);
+        ~SvtUserConfigChangeListener_Impl();
+
+    //XChangesListener
+    virtual void SAL_CALL changesOccurred( const util::ChangesEvent& Event ) throw(RuntimeException);
+    //XEventListener
+    virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw(RuntimeException);
+};
 
-class SvtUserOptions_Impl
+class SvtUserOptions_Impl : public SfxBroadcaster
 {
 public:
     SvtUserOptions_Impl();
@@ -144,8 +138,10 @@ public:
 
     sal_Bool 		  IsTokenReadonly( USHORT nToken ) const;
     ::rtl::OUString   GetToken(USHORT nToken) const;
+    void              Notify();
 
 private:
+    uno::Reference< util::XChangesListener >           m_xChangeListener;
     css::uno::Reference< css::container::XNameAccess > m_xCfg;
     css::uno::Reference< css::beans::XPropertySet >    m_xData;
     ::rtl::OUString m_aLocale;
@@ -158,18 +154,47 @@ static sal_Int32			nRefCount = 0;
 
 #define READONLY_DEFAULT	sal_False
 
-// functions -------------------------------------------------------------
+/*-- 16.06.2009 14:22:56---------------------------------------------------
+
+  -----------------------------------------------------------------------*/
+SvtUserConfigChangeListener_Impl::SvtUserConfigChangeListener_Impl(SvtUserOptions_Impl& rParent) :
+    m_rParent( rParent )
+{
+}    
+/*-- 16.06.2009 14:22:56---------------------------------------------------
 
-namespace
+  -----------------------------------------------------------------------*/
+SvtUserConfigChangeListener_Impl::~SvtUserConfigChangeListener_Impl()
 {
-    struct PropertyNames
-        : public rtl::Static< Sequence< rtl::OUString >, PropertyNames> {};
+}
+/*-- 16.06.2009 14:22:56---------------------------------------------------
+
+  -----------------------------------------------------------------------*/
+void SvtUserConfigChangeListener_Impl::changesOccurred( const util::ChangesEvent& rEvent ) throw(RuntimeException)
+{
+    if(rEvent.Changes.getLength())
+        m_rParent.Notify();
+}
+/*-- 16.06.2009 14:22:56---------------------------------------------------
+
+  -----------------------------------------------------------------------*/
+void SvtUserConfigChangeListener_Impl::disposing( const lang::EventObject& rSource ) throw(RuntimeException)
+{
+    try
+    {
+        uno::Reference< util::XChangesNotifier > xChgNot( rSource.Source, UNO_QUERY_THROW);
+        xChgNot->removeChangesListener(this);
+    }
+    catch(Exception& )
+    {
+    }
 }
 
 // class SvtUserOptions_Impl ---------------------------------------------
 
 // -----------------------------------------------------------------------
-SvtUserOptions_Impl::SvtUserOptions_Impl()
+SvtUserOptions_Impl::SvtUserOptions_Impl() :
+    m_xChangeListener( new SvtUserConfigChangeListener_Impl(*this) )
 {
     try
     {
@@ -181,6 +206,14 @@ SvtUserOptions_Impl::SvtUserOptions_Impl()
             css::uno::UNO_QUERY ); 
 
         m_xData = css::uno::Reference< css::beans::XPropertySet >(m_xCfg, css::uno::UNO_QUERY);
+        uno::Reference< util::XChangesNotifier > xChgNot( m_xCfg, UNO_QUERY);
+        try
+        {
+            xChgNot->addChangesListener( m_xChangeListener );
+        }
+        catch(RuntimeException& )
+        {
+        }
     }
     catch(const css::uno::Exception& ex) 
     { 
@@ -743,6 +776,12 @@ void SvtUserOptions_Impl::SetApartment( const ::rtl::OUString& sApartment )
 
 // -----------------------------------------------------------------------
 
+void SvtUserOptions_Impl::Notify()
+{
+    Broadcast( SfxSimpleHint( SFX_HINT_USER_OPTIONS_CHANGED ) );
+}
+// -----------------------------------------------------------------------
+
 sal_Bool SvtUserOptions_Impl::IsTokenReadonly( USHORT nToken ) const
 {
     css::uno::Reference< css::beans::XPropertySet >     xData(m_xCfg, css::uno::UNO_QUERY);
@@ -906,7 +945,7 @@ SvtUserOptions::SvtUserOptions()
     }
     ++nRefCount;
     pImp = pOptions;
-    //StartListening( *pImp);
+    StartListening( *pImp);
 }
 
 // -----------------------------------------------------------------------


More information about the ooo-build-commit mailing list