[Libreoffice-commits] .: sw/source
Fridrich Strba
fridrich at kemper.freedesktop.org
Mon May 9 05:58:59 PDT 2011
sw/source/core/doc/doc.cxx | 2 +-
sw/source/filter/xml/xmlmeta.cxx | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
New commits:
commit eccf996307d618b62f98f0d39cb20cc9cbe6678c
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date: Sun May 8 15:14:57 2011 +0200
Resolving fdo#36931 : Load non blank chars from XML and check it's value.
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index e5d8fd0..6bd08fd 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 6b046a9..ca9e473 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 );
More information about the Libreoffice-commits
mailing list