summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2011-05-08 15:14:57 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2011-05-09 14:57:24 +0200
commiteccf996307d618b62f98f0d39cb20cc9cbe6678c (patch)
tree8270aef3fcccb57ec129b1754c1bf623ce24f465
parentc8b607d5b811f8f7b689808ef0f104cca704696f (diff)
Resolving fdo#36931 : Load non blank chars from XML and check it's value.
-rw-r--r--sw/source/core/doc/doc.cxx2
-rw-r--r--sw/source/filter/xml/xmlmeta.cxx4
2 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index e5d8fd0f93..6bd08fd160 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 6b046a93a7..ca9e473975 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 );