Commit a57f423c authored by ElenaSubbotina's avatar ElenaSubbotina Committed by Alexander Trofimov

RtfFormatReader - конвертация embedd объектов - Test_Объекты.rtf

parent d3f5dd3d
......@@ -228,6 +228,7 @@ bool OleReader::ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader,CStrin
{
if( _T("object") == sCommand )
return true;
COMMAND_RTF_INT( _T("objw"), m_oOle.m_nWidth, sCommand, hasParameter, parameter )
COMMAND_RTF_INT( _T("objh"), m_oOle.m_nHeight, sCommand, hasParameter, parameter )
COMMAND_RTF_INT( _T("objemb"), m_oOle.m_eOleType, sCommand, true, RtfOle::ot_emb )
......@@ -261,13 +262,18 @@ bool OleReader::ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader,CStrin
CString sOleStorageName = Utils::CreateTempFile( oReader.m_sTempFolder );
NSFile::CFileBinary file;
file.CreateFileW(sOleStorageName.GetBuffer());
file.WriteFile(pData, nSize);
file.CloseFile();
POLE::Storage * piRootStorage = new POLE::Storage(string2std_string(sOleStorageName).c_str());
if( piRootStorage)
{
//hRes = OleConvertOLESTREAMToIStorage( &oStream, piRootStorage, NULL );
//m_oOle.SetFilename( sOleStorageName );
//m_oOle.SetOle( piRootStorage );
RELEASEOBJECT( piRootStorage );
m_oOle.SetFilename( sOleStorageName );
m_oOle.SetOle( piRootStorage );
//RELEASEOBJECT( piRootStorage );
hRes = S_OK;
}
......
......@@ -351,7 +351,9 @@ bool OOXRunReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagrap
{
CString sValue;
if ((ooxText->m_oSpace.IsInit()) && (ooxText->m_oSpace->GetValue() == SimpleTypes::xmlspacePreserve))
{
sValue = RtfUtility::Preserve(ooxText->m_sText);
}
else
sValue = ooxText->m_sText;
......
......@@ -57,7 +57,7 @@ public:
//изменяем scale в соответсявии с выходным размером
if( PROP_DEF != nWidth && PROP_DEF != oOutput.m_oPicture->m_nWidthGoal )
{
double dNewScale = 100 * ( 1.0 * nWidth / oOutput.m_oPicture->m_nWidthGoal );
double dNewScale = 100 * ( 1.0 * nWidth / oOutput.m_oPicture->m_nWidthGoal ) ;
oOutput.m_oPicture->m_dScaleX = dNewScale;
}
if( PROP_DEF != nHeight && PROP_DEF != oOutput.m_oPicture->m_nHeightGoal )
......
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