coverity#1371287 don't need to copy and then overwrite
Change-Id: Ica30e4bed463e8e42cbf54f4b81491149a8de8ab
This commit is contained in:
@@ -1121,9 +1121,6 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
|
|||||||
{
|
{
|
||||||
const ContentInfo& rC = *aContents[nPara].get();
|
const ContentInfo& rC = *aContents[nPara].get();
|
||||||
|
|
||||||
// Text...
|
|
||||||
OStringBuffer aBuffer(OUStringToOString(rC.GetText(), eEncoding));
|
|
||||||
|
|
||||||
// Symbols?
|
// Symbols?
|
||||||
bool bSymbolPara = false;
|
bool bSymbolPara = false;
|
||||||
if (rC.GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SfxItemState::SET)
|
if (rC.GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SfxItemState::SET)
|
||||||
@@ -1131,10 +1128,13 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
|
|||||||
const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>(rC.GetParaAttribs().Get(EE_CHAR_FONTINFO));
|
const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>(rC.GetParaAttribs().Get(EE_CHAR_FONTINFO));
|
||||||
if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
|
if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
|
||||||
{
|
{
|
||||||
aBuffer = OStringBuffer(OUStringToOString(rC.GetText(), RTL_TEXTENCODING_SYMBOL));
|
|
||||||
bSymbolPara = true;
|
bSymbolPara = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eEncoding for Text, RTL_TEXTENCODING_SYMBOL for Symbols
|
||||||
|
OStringBuffer aBuffer(OUStringToOString(rC.GetText(), bSymbolPara ? RTL_TEXTENCODING_SYMBOL : eEncoding));
|
||||||
|
|
||||||
for (size_t nA = 0; nA < rC.maCharAttribs.size(); ++nA)
|
for (size_t nA = 0; nA < rC.maCharAttribs.size(); ++nA)
|
||||||
{
|
{
|
||||||
const XEditAttribute& rAttr = *rC.maCharAttribs[nA].get();
|
const XEditAttribute& rAttr = *rC.maCharAttribs[nA].get();
|
||||||
|
Reference in New Issue
Block a user