summaryrefslogtreecommitdiff
path: root/sw/source/filter/ascii/ascatr.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2006-07-26 07:53:44 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2006-07-26 07:53:44 +0000
commit4b0c37128a60a247585616823b9b109ce27d0e0b (patch)
tree476309ebfdd4637369a5565d30bd194bc68f22f7 /sw/source/filter/ascii/ascatr.cxx
parent5f7519030e6ccc3ca6117e50c7ddaeecbe204e5a (diff)
INTEGRATION: CWS c07v005_SRC680 (1.6.386); FILE MERGED
2006/06/22 10:36:46 fme 1.6.386.1: #b6440890# Do not export soft hyphens in non-unicode mode
Diffstat (limited to 'sw/source/filter/ascii/ascatr.cxx')
-rw-r--r--sw/source/filter/ascii/ascatr.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index 2873d575cc50..f29b20e72710 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: ascatr.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: rt $ $Date: 2005-09-09 05:33:49 $
+ * last change: $Author: rt $ $Date: 2006-07-26 08:53:44 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -224,6 +224,9 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode )
if( rWrt.bASCII_ParaAsBlanc )
aStr.SearchAndReplaceAll( 0x0A, ' ' );
+ const bool bExportSoftHyphens = RTL_TEXTENCODING_UCS2 == rWrt.GetAsciiOptions().GetCharSet() ||
+ RTL_TEXTENCODING_UTF8 == rWrt.GetAsciiOptions().GetCharSet();
+
do {
xub_StrLen nNextAttr = aAttrIter.WhereNext();
@@ -231,8 +234,13 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode )
nNextAttr = nEnde;
if( !aAttrIter.OutAttr( nStrPos ))
- rWrt.Strm().WriteUnicodeOrByteText(
- aStr.Copy( nStrPos, nNextAttr - nStrPos ));
+ {
+ String aOutStr( aStr.Copy( nStrPos, nNextAttr - nStrPos ) );
+ if ( !bExportSoftHyphens )
+ aOutStr.EraseAllChars( CHAR_SOFTHYPHEN );
+
+ rWrt.Strm().WriteUnicodeOrByteText( aOutStr );
+ }
nStrPos = nNextAttr;
aAttrIter.NextPos();
} while( nStrPos < nEnde );