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 ...@@ -4841,6 +4841,8 @@ HRESULT CDrawingConverter::SaveObjectEx(LONG lStart, LONG lLength, const std::ws
} }
std::wstring CDrawingConverter::SaveObjectBackground(LONG lStart, LONG lLength) std::wstring CDrawingConverter::SaveObjectBackground(LONG lStart, LONG lLength)
{ {
if (lLength < 1) return L"";
m_pReader->Seek(lStart); m_pReader->Seek(lStart);
++m_nCurrentIndexObject; ++m_nCurrentIndexObject;
......
...@@ -662,9 +662,6 @@ namespace OOX ...@@ -662,9 +662,6 @@ namespace OOX
sResult += CVmlCommonElements::WriteAttributes(); 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 ); ComplexTypes_WriteAttribute ( _T("o:targetscreensize=\""), m_oTargetScreenSize );
sResult += _T(">"); sResult += _T(">");
...@@ -684,45 +681,15 @@ namespace OOX ...@@ -684,45 +681,15 @@ namespace OOX
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader) void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
{ {
// Читаем атрибуты WritingElement_ReadAttributes_Start( oReader )
if ( oReader.GetAttributesCount() <= 0 ) WritingElement_ReadAttributes_ReadSingle( oReader, _T("o:targetscreensize"), m_oTargetScreenSize)
return; WritingElement_ReadAttributes_End( oReader )
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();
} }
public: public:
// Attributes // Attributes
nullable<SimpleTypes::CBWMode<>> m_oBwMode; nullable<SimpleTypes::CScreenSize<>> m_oTargetScreenSize;
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