diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2011-05-08 15:14:57 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-05-09 14:59:33 +0200 |
commit | 70218ae8ef57b96f8064780adebcee3245757b58 (patch) | |
tree | 11a51a634d51833cd7a8e2379e94a5f82f04f9f6 | |
parent | 18f45f7735f4a8922583e60dbe73e6e08a5ebaa4 (diff) |
Resolving fdo#36931 : Load non blank chars from XML and check it's value.
Signed-off-by: Fridrich Štrba <fridrich.strba@bluewin.ch>
-rw-r--r-- | sw/source/core/doc/doc.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlmeta.cxx | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index a031aa86098f..7c4e1984b819 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1947,7 +1947,7 @@ void SwDoc::ResetModified() mbModified = sal_False; // If there is already a document statistic, we assume that // it is correct. In this case we reset the modified flag. - if ( 0 != pDocStat->nChar ) + if ( 0 != pDocStat->nCharExcludingSpaces ) pDocStat->bModified = sal_False; GetIDocumentUndoRedo().SetUndoNoModifiedPosition(); if( nCall && aOle2Link.IsSet() ) diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx index 92c743518cb6..be0e7d42d286 100644 --- a/sw/source/filter/xml/xmlmeta.cxx +++ b/sw/source/filter/xml/xmlmeta.cxx @@ -94,6 +94,7 @@ enum SvXMLTokenMapAttrs XML_TOK_META_STAT_PARA = 16, XML_TOK_META_STAT_WORD = 32, XML_TOK_META_STAT_CHAR = 64, + XML_TOK_META_STAT_NON_WHITE_SPACE_CHAR = 128, XML_TOK_META_STAT_END=XML_TOK_UNKNOWN }; @@ -112,6 +113,7 @@ static const struct statistic s_stats [] = { { XML_TOK_META_STAT_PARA, "ParagraphCount", 0, &SwDocStat::nPara }, { XML_TOK_META_STAT_WORD, "WordCount", 0, &SwDocStat::nWord }, { XML_TOK_META_STAT_CHAR, "CharacterCount", 0, &SwDocStat::nChar }, + { XML_TOK_META_STAT_NON_WHITE_SPACE_CHAR, "NonWhitespaceCharacterCount", 0, &SwDocStat::nCharExcludingSpaces }, { XML_TOK_META_STAT_END, 0, 0, 0 } }; @@ -149,7 +151,7 @@ void SwXMLImport::SetStatistics( } } - if( 127 == nTokens ) + if( 255 == nTokens ) aDocStat.bModified = sal_False; if( nTokens ) pDoc->SetDocStat( aDocStat ); |