mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
PptxFormat - extending reading xml; sppr, txpr in chart without DrawingConverter
This commit is contained in:
@ -85,9 +85,10 @@ void OoxConverter::convert(PPTX::Logic::Shape *oox_shape)
|
||||
|
||||
if (type == SimpleTypes::shapetypeRect && oox_shape->txBody.IsInit()) type = 2000;
|
||||
|
||||
if (type == 2000 && oox_shape->txBody->bodyPr.fromWordArt.get_value_or(false))
|
||||
if (type == 2000 && oox_shape->txBody->bodyPr.IsInit()
|
||||
&& oox_shape->txBody->bodyPr->fromWordArt.get_value_or(false))
|
||||
{
|
||||
int wordart_type = convert(oox_shape->txBody->bodyPr.prstTxWarp.GetPointer());
|
||||
int wordart_type = convert(oox_shape->txBody->bodyPr->prstTxWarp.GetPointer());
|
||||
|
||||
if (wordart_type > 0) type = wordart_type;
|
||||
}
|
||||
@ -111,7 +112,7 @@ void OoxConverter::convert(PPTX::Logic::Shape *oox_shape)
|
||||
odf_context()->drawing_context()->set_text( odf_context()->text_context());
|
||||
|
||||
//наложим внешние настройки для текста
|
||||
convert(&oox_shape->txBody->bodyPr);
|
||||
convert(oox_shape->txBody->bodyPr.GetPointer());
|
||||
|
||||
if (oox_shape->style.IsInit())
|
||||
{
|
||||
@ -281,15 +282,15 @@ void OoxConverter::convert(PPTX::Logic::PathBase *oox_path)
|
||||
}
|
||||
if (cubicBezTo)
|
||||
{
|
||||
std::wstring path_elm = cubicBezTo->x1 + L" " + cubicBezTo->y1 + L" " +
|
||||
cubicBezTo->x2 + L" " + cubicBezTo->y2 + L" " +
|
||||
cubicBezTo->x3 + L" " + cubicBezTo->y3;
|
||||
std::wstring path_elm = cubicBezTo->x[0] + L" " + cubicBezTo->y[0] + L" " +
|
||||
cubicBezTo->x[1] + L" " + cubicBezTo->y[1] + L" " +
|
||||
cubicBezTo->x[2] + L" " + cubicBezTo->y[2];
|
||||
odf_context()->drawing_context()->add_path_element(std::wstring(L"C"), path_elm);
|
||||
}
|
||||
if (quadBezTo)
|
||||
{
|
||||
std::wstring path_elm = quadBezTo->x1 + L" " + quadBezTo->y1 + L" " +
|
||||
quadBezTo->x2 + L" " + quadBezTo->y2;
|
||||
std::wstring path_elm = quadBezTo->x[0] + L" " + quadBezTo->y[0] + L" " +
|
||||
quadBezTo->x[1] + L" " + quadBezTo->y[1];
|
||||
odf_context()->drawing_context()->add_path_element(std::wstring(L"S"), path_elm);
|
||||
}
|
||||
if (arcTo)
|
||||
|
||||
@ -395,7 +395,7 @@ void OoxConverter::convert(OOX::Drawing::CDiagrammParts *oox_diagramm)
|
||||
|
||||
if (oFile.is_init() && OOX::FileTypes::DiagDrawing == oFile->type())
|
||||
{
|
||||
_CP_OPT(double) x, y, width, height, cx = 0, cy = 0;
|
||||
_CP_OPT(double) x, y, width, height, cx, cy;
|
||||
|
||||
odf_context()->drawing_context()->get_size (width, height);
|
||||
odf_context()->drawing_context()->get_position (x, y);
|
||||
|
||||
@ -270,7 +270,6 @@ namespace OOX
|
||||
class CT_Style1;
|
||||
class CT_Style;
|
||||
class CT_TextLanguageID;
|
||||
class CRichText;
|
||||
class CTextProperties;
|
||||
}
|
||||
namespace Vml
|
||||
@ -495,8 +494,8 @@ public:
|
||||
void convert(OOX::Spreadsheet::CT_LineSer *ser);
|
||||
void convert(OOX::Spreadsheet::CT_AxDataSource *cat, int type);
|
||||
void convert(OOX::Spreadsheet::CT_NumDataSource *val);
|
||||
void convert(OOX::Spreadsheet::CRichText *rich);
|
||||
void convert(OOX::Spreadsheet::CTextProperties *txPr);
|
||||
//void convert(OOX::Spreadsheet::CRichText *rich);
|
||||
//void convert(OOX::Spreadsheet::CTextProperties *txPr);
|
||||
void convert(OOX::Spreadsheet::CT_Tx *ct_tx);
|
||||
void convert(OOX::Spreadsheet::CT_Layout *ct_layout);
|
||||
void convert(OOX::Spreadsheet::CT_ManualLayout *ct_layout);
|
||||
|
||||
@ -73,32 +73,32 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_ChartSpace *oox_chart)
|
||||
odf_context()->chart_context()->end_plot_area();
|
||||
}
|
||||
|
||||
void OoxConverter::convert(OOX::Spreadsheet::CRichText* rich)
|
||||
{
|
||||
if (rich == NULL)return;
|
||||
|
||||
odf_context()->chart_context()->start_text();
|
||||
OoxConverter::convert(rich->m_oBodyPr.GetPointer());
|
||||
|
||||
for (size_t i = 0; i < rich->m_arrItems.size();i++)
|
||||
{
|
||||
OoxConverter::convert(rich->m_arrItems[i]);
|
||||
}
|
||||
odf_context()->chart_context()->end_text();
|
||||
}
|
||||
void OoxConverter::convert(OOX::Spreadsheet::CTextProperties* txPr)
|
||||
{
|
||||
if (txPr == NULL)return;
|
||||
|
||||
odf_context()->chart_context()->start_text();
|
||||
OoxConverter::convert(txPr->m_oBodyPr.GetPointer());
|
||||
|
||||
for (size_t i = 0; i < txPr->m_arrItems.size();i++)
|
||||
{
|
||||
OoxConverter::convert(txPr->m_arrItems[i]);
|
||||
}
|
||||
odf_context()->chart_context()->end_text();
|
||||
}
|
||||
//void OoxConverter::convert(OOX::Spreadsheet::CRichText* rich)
|
||||
//{
|
||||
// if (rich == NULL)return;
|
||||
//
|
||||
// odf_context()->chart_context()->start_text();
|
||||
// OoxConverter::convert(rich->m_oBodyPr.GetPointer());
|
||||
//
|
||||
// for (size_t i = 0; i < rich->m_arrItems.size();i++)
|
||||
// {
|
||||
// OoxConverter::convert(rich->m_arrItems[i]);
|
||||
// }
|
||||
// odf_context()->chart_context()->end_text();
|
||||
//}
|
||||
//void OoxConverter::convert(OOX::Spreadsheet::CTextProperties* txPr)
|
||||
//{
|
||||
// if (txPr == NULL)return;
|
||||
//
|
||||
// odf_context()->chart_context()->start_text();
|
||||
// OoxConverter::convert(txPr->m_oBodyPr.GetPointer());
|
||||
//
|
||||
// for (size_t i = 0; i < txPr->m_arrItems.size();i++)
|
||||
// {
|
||||
// OoxConverter::convert(txPr->m_arrItems[i]);
|
||||
// }
|
||||
// odf_context()->chart_context()->end_text();
|
||||
//}
|
||||
void OoxConverter::convert(OOX::Spreadsheet::CT_Tx* ct_tx)
|
||||
{
|
||||
if (ct_tx == NULL)return;
|
||||
|
||||
Reference in New Issue
Block a user