mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 10:59:17 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62097 954022d7-b5bf-4e40-9824-e11837661b57
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
#pragma once
|
|
#include "OOXStyleReader.h"
|
|
#include "OOXDocDefaultsReader.h"
|
|
|
|
#include "../../../../Common/DocxFormat/Source/DocxFormat/Styles.h"
|
|
|
|
class OOXStyleTableReader
|
|
{
|
|
private:
|
|
OOX::CStyles* m_ooxStyles;
|
|
|
|
public:
|
|
OOXStyleTableReader(OOX::CStyles* ooxStyles)
|
|
{
|
|
m_ooxStyles = ooxStyles;
|
|
}
|
|
|
|
bool Parse( ReaderParameter oParam )
|
|
{
|
|
if (m_ooxStyles == NULL) return false;
|
|
|
|
if (m_ooxStyles->m_oDocDefaults.IsInit())
|
|
{
|
|
OOXDocDefaultsReader oDocDefaultsReader(m_ooxStyles->m_oDocDefaults.GetPointer());
|
|
oDocDefaultsReader.Parse( oParam );
|
|
}
|
|
|
|
for (long i=0; i< m_ooxStyles->m_arrStyle.size(); i++)
|
|
{
|
|
RtfStylePtr oNewStyle;
|
|
OOXStyleReader oStyleReader(m_ooxStyles->m_arrStyle[i]);
|
|
|
|
oStyleReader.ParseStyle( oParam, oNewStyle);
|
|
|
|
if( NULL != oNewStyle )
|
|
oParam.oRtf->m_oStyleTable.AddItem( oNewStyle );
|
|
}
|
|
//только чтобы добавить связи между стилями
|
|
|
|
for (long i=0; i< m_ooxStyles->m_arrStyle.size(); i++)
|
|
{
|
|
OOXStyleReader oStyleReader(m_ooxStyles->m_arrStyle[i]);
|
|
oStyleReader.ParseRelations( oParam );
|
|
}
|
|
return true;
|
|
}
|
|
};
|