Commit 512dad1d authored by ElenaSubbotina's avatar ElenaSubbotina

fix double write attribute in background

parent 3d684934
......@@ -4841,6 +4841,8 @@ HRESULT CDrawingConverter::SaveObjectEx(LONG lStart, LONG lLength, const std::ws
}
std::wstring CDrawingConverter::SaveObjectBackground(LONG lStart, LONG lLength)
{
if (lLength < 1) return L"";
m_pReader->Seek(lStart);
++m_nCurrentIndexObject;
......
......@@ -662,9 +662,6 @@ namespace OOX
sResult += CVmlCommonElements::WriteAttributes();
ComplexTypes_WriteAttribute ( _T("o:bwmode=\""), m_oBwMode );
ComplexTypes_WriteAttribute ( _T("o:bwpure=\""), m_oBwPure );
ComplexTypes_WriteAttribute ( _T("o:bwnormal=\""), m_oBwNormal );
ComplexTypes_WriteAttribute ( _T("o:targetscreensize=\""), m_oTargetScreenSize );
sResult += _T(">");
......@@ -684,44 +681,14 @@ namespace OOX
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
{
// Читаем атрибуты
if ( oReader.GetAttributesCount() <= 0 )
return;
if ( !oReader.MoveToFirstAttribute() )
return;
std::wstring wsName = oReader.GetName();
while( !wsName.empty() )
{
wchar_t wsChar = wsName[0];
switch ( wsChar )
{
case 'o':
if ( _T("o:bwmode") == wsName ) m_oBwMode = oReader.GetText();
else if ( _T("o:bwnormal") == wsName ) m_oBwNormal = oReader.GetText();
else if ( _T("o:bwpure") == wsName ) m_oBwPure = oReader.GetText();
break;
case 't':
if ( _T("o:targetscreensize") == wsName ) m_oTargetScreenSize = oReader.GetText();
break;
}
if ( !oReader.MoveToNextAttribute() )
break;
wsName = oReader.GetName();
}
oReader.MoveToElement();
WritingElement_ReadAttributes_Start( oReader )
WritingElement_ReadAttributes_ReadSingle( oReader, _T("o:targetscreensize"), m_oTargetScreenSize)
WritingElement_ReadAttributes_End( oReader )
}
public:
// Attributes
nullable<SimpleTypes::CBWMode<>> m_oBwMode;
nullable<SimpleTypes::CBWMode<>> m_oBwNormal;
nullable<SimpleTypes::CBWMode<>> m_oBwPure;
nullable<SimpleTypes::CScreenSize<>> m_oTargetScreenSize;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment