Commit 087da9d2 authored by ElenaSubbotina's avatar ElenaSubbotina

.

parent c505aced
......@@ -1357,7 +1357,6 @@ void OoxConverter::convert(PPTX::Logic::Paragraph *oox_paragraph, PPTX::Logic::T
if (odf_context()->drawing_context()->is_wordart())
odf_context()->drawing_context()->set_paragraph_properties(paragraph_properties);
}
//list_level++;
if (oox_paragraph->RunElems.empty() && list_present) list_present = false; // ms не обозначает присутствие списка, libra - показывает значек
......@@ -1374,21 +1373,16 @@ void OoxConverter::convert(PPTX::Logic::Paragraph *oox_paragraph, PPTX::Logic::T
odf_context()->text_context()->list_state_.style_name = L"";
}
if (odf_context()->text_context()->list_state_.started_list == false)
if (list_local)
{
if (list_local)
{
_CP_OPT(bool) inStyles = odf_context()->drawing_context()->get_presentation();
_CP_OPT(bool) inStyles = odf_context()->drawing_context()->get_presentation();
odf_context()->styles_context()->lists_styles().start_style(inStyles && *inStyles);
convert_list_level(oox_paragraph->pPr.GetPointer(), list_level /*- 1*/);
odf_context()->styles_context()->lists_styles().end_style();
}
list_style_name = odf_context()->styles_context()->lists_styles().get_style_name(); //last added
//odf_context()->text_context()->start_list(list_style_name);
}
odf_context()->styles_context()->lists_styles().start_style(inStyles && *inStyles);
convert_list_level(oox_paragraph->pPr.GetPointer(), list_level /*- 1*/);
odf_context()->styles_context()->lists_styles().end_style();
}
list_style_name = odf_context()->styles_context()->lists_styles().get_style_name(); //last added
list_level++;
......
......@@ -955,53 +955,66 @@ void PptxConverter::convert_slide(PPTX::Logic::CSld *oox_slide, PPTX::Logic::TxS
smart_ptr<PPTX::WrapperWritingElement> pElem = oox_slide->spTree.SpTreeElems[i].GetElem();
smart_ptr<PPTX::Logic::Shape> pShape = pElem.smart_dynamic_cast<PPTX::Logic::Shape>();
if (pShape.IsInit() && pShape->nvSpPr.nvPr.ph.is_init())
if (pShape.IsInit())
{
pShape->FillLevelUp();
if (pShape->nvSpPr.nvPr.ph->type.IsInit())
odf_context()->drawing_context()->set_placeholder_type(pShape->nvSpPr.nvPr.ph->type->GetBYTECode());
else
odf_context()->drawing_context()->set_placeholder_type(0);
if (pShape->nvSpPr.nvPr.ph.is_init())
{
pShape->FillLevelUp();
if (pShape->nvSpPr.nvPr.ph->type.IsInit())
odf_context()->drawing_context()->set_placeholder_type(pShape->nvSpPr.nvPr.ph->type->GetBYTECode());
else
odf_context()->drawing_context()->set_placeholder_type(0);
if (pShape->nvSpPr.nvPr.ph->idx.IsInit())
odf_context()->drawing_context()->set_placeholder_id(pShape->nvSpPr.nvPr.ph->idx.get());
if (pShape->nvSpPr.nvPr.ph->idx.IsInit())
odf_context()->drawing_context()->set_placeholder_id(pShape->nvSpPr.nvPr.ph->idx.get());
if (!bPlaceholders)
continue;
if (!bPlaceholders)
continue;
PPTX::Logic::TextListStyle * listMasterStyle = NULL;
if (txStyles)
{
std::wstring type = pShape->nvSpPr.nvPr.ph->type.get_value_or(_T("body"));
if ((type == L"title") || (type == L"ctrTitle"))
listMasterStyle = txStyles->titleStyle.GetPointer();
else if ((type == L"body") || (type == L"subTitle") || (type == L"obj"))
listMasterStyle = txStyles->bodyStyle.GetPointer();
else if (type != L"")
listMasterStyle = txStyles->otherStyle.GetPointer();
}
PPTX::Logic::Shape update_shape;
if (listMasterStyle)
{
update_shape.txBody = new PPTX::Logic::TxBody();
PPTX::Logic::TextListStyle * listMasterStyle = NULL;
PPTX::Logic::TextListStyle *newListStyle = new PPTX::Logic::TextListStyle();
for (int i = 0; i < 10; i++)
if (txStyles)
{
if(listMasterStyle->levels[i].is_init())
listMasterStyle->levels[i]->Merge(newListStyle->levels[i]);
std::wstring type = pShape->nvSpPr.nvPr.ph->type.get_value_or(_T("body"));
if ((type == L"title") || (type == L"ctrTitle"))
listMasterStyle = txStyles->titleStyle.GetPointer();
else if ((type == L"body") || (type == L"subTitle") || (type == L"obj"))
listMasterStyle = txStyles->bodyStyle.GetPointer();
else if (type != L"")
listMasterStyle = txStyles->otherStyle.GetPointer();
}
update_shape.txBody->lstStyle.reset(newListStyle);
PPTX::Logic::Shape update_shape;
if (listMasterStyle)
{
update_shape.txBody = new PPTX::Logic::TxBody();
PPTX::Logic::TextListStyle *newListStyle = new PPTX::Logic::TextListStyle();
for (int i = 0; i < 10; i++)
{
if(listMasterStyle->levels[i].is_init())
listMasterStyle->levels[i]->Merge(newListStyle->levels[i]);
}
update_shape.txBody->lstStyle.reset(newListStyle);
}
pShape->Merge(update_shape);
OoxConverter::convert(&update_shape);
}
pShape->Merge(update_shape);
OoxConverter::convert(&update_shape);
else if (pShape->txBody.IsInit() && presentation->defaultTextStyle.IsInit())
{//default text style with master clrScheme
PPTX::Logic::Shape update_shape;
update_shape.txBody = new PPTX::Logic::TxBody();
//OoxConverter::convert(pShape.operator->());
presentation->defaultTextStyle->Merge(update_shape.txBody->lstStyle);
pShape->Merge(update_shape);
OoxConverter::convert(&update_shape);
}
else
OoxConverter::convert(pShape.operator->());
}
else
{
......
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