diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2009-03-16 19:01:31 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2009-03-16 19:01:31 +0000 |
commit | e7665daf750dbf1e8057f220b0f1b5a6868974c8 (patch) | |
tree | 57cc6c7e9224ed461cf73b0c6c5aafc9dc42b28b /automation/source | |
parent | 648c5cf65bdfa75f3c695cedb4e0ff7899507b69 (diff) |
CWS-TOOLING: integrate CWS ooo31gsl4_DEV300
2009-03-11 16:07:53 +0100 gh r269340 : missed compile on bigendian system (OSL_BIGENDIAN defined)
2009-03-11 10:22:27 +0100 pl r269300 : #i100057# one more case
2009-03-10 15:10:01 +0100 pl r269274 : #i100057# filter formatting marks in vcl i18n helper
2009-03-10 13:31:01 +0100 gh r269269 : #i100044#remove BiDi markers before sending to VCLTestTool
2009-03-10 10:16:05 +0100 hdu r269248 : #i100057# fix casefolding::getNextChar() end-of-string behaviour
2009-03-10 09:51:36 +0100 hdu r269245 : #i100044# add TransliterationModules_IGNORE_FORMATTING option
2009-03-09 14:30:00 +0100 pl r269176 : #i99360# workaround XIfEvent never returning
Diffstat (limited to 'automation/source')
-rw-r--r-- | automation/source/server/cmdbasestream.cxx | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/automation/source/server/cmdbasestream.cxx b/automation/source/server/cmdbasestream.cxx index 1c209053bfb8..48a982d78d31 100644 --- a/automation/source/server/cmdbasestream.cxx +++ b/automation/source/server/cmdbasestream.cxx @@ -234,19 +234,44 @@ void CmdBaseStream::Write( comm_ULONG nNr ) void CmdBaseStream::Write( const comm_UniChar* aString, comm_USHORT nLenInChars ) { *pCommStream << comm_USHORT(BinString); - *pCommStream << nLenInChars; + + comm_USHORT n; + + // remove BiDi and zero-width-markers 0x200B - 0x200F + // remove BiDi and paragraph-markers 0x2028 - 0x202E + + comm_UniChar* aNoBiDiString; + aNoBiDiString = new comm_UniChar [nLenInChars]; + comm_USHORT nNewLenInChars = 0; + for ( n = 0 ; n < nLenInChars ; n++ ) + { + comm_UniChar c = aString[ n ]; + if ( ((c >= 0x200B) && (c <= 0x200F)) + ||((c >= 0x2028) && (c <= 0x202E)) ) + { //Ignore character + } + else + { + aNoBiDiString[ nNewLenInChars ] = c; + nNewLenInChars++; + } + } + + *pCommStream << nNewLenInChars; + #ifdef OSL_BIGENDIAN // we have to change the byteorder comm_UniChar* aNewString; - aNewString = new comm_UniChar [nLenInChars]; - comm_USHORT n; - for ( n = 0 ; n < nLenInChars ; n++ ) - aNewString[ n ] = aString[ n ] >> 8 | aString[ n ] << 8; - pCommStream->Write( aNewString, ((comm_ULONG)nLenInChars) * sizeof( comm_UniChar ) ); + aNewString = new comm_UniChar [nNewLenInChars]; + for ( n = 0 ; n < nNewLenInChars ; n++ ) + aNewString[ n ] = aNoBiDiString[ n ] >> 8 | aNoBiDiString[ n ] << 8; + pCommStream->Write( aNewString, ((comm_ULONG)nNewLenInChars) * sizeof( comm_UniChar ) ); delete [] aNewString; #else - pCommStream->Write( aString, ((comm_ULONG)nLenInChars) * sizeof( comm_UniChar ) ); + pCommStream->Write( aNoBiDiString, ((comm_ULONG)nNewLenInChars) * sizeof( comm_UniChar ) ); #endif + + delete [] aNoBiDiString; } void CmdBaseStream::Write( comm_BOOL bBool ) |