Lines 227-239
Link Here
|
227 |
SfxPSStringProperty_Impl( UINT32 nIdP, const String& aStr ) : |
227 |
SfxPSStringProperty_Impl( UINT32 nIdP, const String& aStr ) : |
228 |
aString(aStr), SfxPSProperty_Impl( nIdP, VT_LPSTR ), bIsUniCode(FALSE) |
228 |
aString(aStr), SfxPSProperty_Impl( nIdP, VT_LPSTR ), bIsUniCode(FALSE) |
229 |
{ |
229 |
{ |
230 |
nEncoding = RTL_TEXTENCODING_UTF8; |
230 |
nEncoding = RTL_TEXTENCODING_MS_1250; |
231 |
} |
231 |
} |
232 |
|
232 |
|
233 |
SfxPSStringProperty_Impl( UINT32 nIdP ) : |
233 |
SfxPSStringProperty_Impl( UINT32 nIdP ) : |
234 |
SfxPSProperty_Impl( nIdP, VT_LPSTR ), bIsUniCode(FALSE) |
234 |
SfxPSProperty_Impl( nIdP, VT_LPSTR ), bIsUniCode(FALSE) |
235 |
{ |
235 |
{ |
236 |
nEncoding = RTL_TEXTENCODING_UTF8; |
236 |
nEncoding = RTL_TEXTENCODING_MS_1250; |
237 |
} |
237 |
} |
238 |
|
238 |
|
239 |
void SetCodePage( UINT16 nCodePage ); |
239 |
void SetCodePage( UINT16 nCodePage ); |
Lines 313-320
Link Here
|
313 |
// can ensure full unicode compatibility. The code page attribute is |
313 |
// can ensure full unicode compatibility. The code page attribute is |
314 |
// written with UTF8 set! |
314 |
// written with UTF8 set! |
315 |
// Force nEncoding set to UTF8! |
315 |
// Force nEncoding set to UTF8! |
316 |
ByteString aTemp( aString, RTL_TEXTENCODING_UTF8 ); |
316 |
ByteString aTemp( aString, RTL_TEXTENCODING_MS_1250 ); |
317 |
nEncoding = RTL_TEXTENCODING_UTF8; |
317 |
nEncoding = RTL_TEXTENCODING_MS_1250; |
318 |
UINT32 nLen = aTemp.Len(); |
318 |
UINT32 nLen = aTemp.Len(); |
319 |
rStream << (UINT32)( nLen + 1 ); |
319 |
rStream << (UINT32)( nLen + 1 ); |
320 |
rStream.Write( aTemp.GetBuffer(), nLen ); |
320 |
rStream.Write( aTemp.GetBuffer(), nLen ); |
Lines 372-378
Link Here
|
372 |
else |
372 |
else |
373 |
{ |
373 |
{ |
374 |
// Non-unicode strings are always stored with UTF8 encoding |
374 |
// Non-unicode strings are always stored with UTF8 encoding |
375 |
return ByteString( aString, RTL_TEXTENCODING_UTF8 ).Len() + 5; |
375 |
return ByteString( aString, RTL_TEXTENCODING_MS_1250 ).Len() + 5; |
376 |
} |
376 |
} |
377 |
} |
377 |
} |
378 |
|
378 |
|
Lines 1123-1129
Link Here
|
1123 |
pPS->AddProperty( new SfxPSDateTimeProperty_Impl( PID_EDITTIME, aEditTime ) ); |
1123 |
pPS->AddProperty( new SfxPSDateTimeProperty_Impl( PID_EDITTIME, aEditTime ) ); |
1124 |
pPS->AddProperty( new SfxPSStringProperty_Impl( |
1124 |
pPS->AddProperty( new SfxPSStringProperty_Impl( |
1125 |
PID_REVNUMBER, String::CreateFromInt32( GetDocumentNumber() ) ) ); |
1125 |
PID_REVNUMBER, String::CreateFromInt32( GetDocumentNumber() ) ) ); |
1126 |
pPS->AddProperty( new SfxPSCodePageProperty_Impl( RTL_TEXTENCODING_UTF8 )); |
1126 |
pPS->AddProperty( new SfxPSCodePageProperty_Impl( RTL_TEXTENCODING_MS_1250 )); |
1127 |
pPS->Save( *aStrPropSet ); |
1127 |
pPS->Save( *aStrPropSet ); |
1128 |
delete pPS; |
1128 |
delete pPS; |
1129 |
return ( aStrPropSet->GetErrorCode() == 0 ); |
1129 |
return ( aStrPropSet->GetErrorCode() == 0 ); |