mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/476
This commit is contained in:
@ -280,7 +280,9 @@ void pptx_xml_slideMaster::write_to(std::wostream & strm)
|
||||
CP_XML_ATTR(L"xmlns:p14", L"http://schemas.microsoft.com/office/powerpoint/2010/main");
|
||||
CP_XML_ATTR(L"xmlns:p15", L"http://schemas.microsoft.com/office/powerpoint/2012/main");
|
||||
CP_XML_ATTR(L"xmlns:mc", L"http://schemas.openxmlformats.org/markup-compatibility/2006");
|
||||
|
||||
|
||||
CP_XML_ATTR(L"preserve", 1);
|
||||
|
||||
CP_XML_NODE(L"p:cSld")
|
||||
{
|
||||
CP_XML_STREAM() << strmBackground_.str();
|
||||
|
||||
@ -141,9 +141,19 @@ void odp_conversion_context::end_slide()
|
||||
{
|
||||
slide_context_.end_page();
|
||||
}
|
||||
void odp_conversion_context::start_master_slide(std::wstring name)
|
||||
void odp_conversion_context::start_master_slide(std::wstring & name)
|
||||
{
|
||||
slide_context_.set_styles_context(page_layout_context()->get_local_styles_context());
|
||||
|
||||
std::map<std::wstring, int>::iterator pFind = map_masterNames_.find(name);
|
||||
if (map_masterNames_.end() == pFind)
|
||||
{
|
||||
map_masterNames_.insert(std::make_pair(name, 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
name += std::to_wstring(++pFind->second);
|
||||
}
|
||||
|
||||
page_layout_context()->add_master_page(name);
|
||||
slide_context_.start_page(page_layout_context()->last_master()->get_root());
|
||||
|
||||
@ -64,7 +64,7 @@ public:
|
||||
|
||||
size_t get_pages_count();
|
||||
|
||||
void start_master_slide(std::wstring name);
|
||||
void start_master_slide(std::wstring & name);
|
||||
void end_master_slide();
|
||||
|
||||
void start_layout_slide();
|
||||
@ -99,13 +99,15 @@ public:
|
||||
|
||||
std::map<std::wstring, table_style_state> map_table_styles_;
|
||||
|
||||
// NOTE(Kamil Kerimov): Key - PPTX identifier, value - ODP identifier
|
||||
// Key - PPTX identifier, value - ODP identifier
|
||||
using IdentifierMap = std::unordered_map<std::wstring, std::wstring>;
|
||||
std::vector<IdentifierMap> map_identifiers_;
|
||||
|
||||
// NOTE(Kamil Kerimov): Key - slide name in pptx (e.g. slide1.xml), Value - slide name in odp (e.g. "This is a title")
|
||||
// Key - slide name in pptx (e.g. slide1.xml), Value - slide name in odp (e.g. "This is a title")
|
||||
using SlidenameMap = std::map<std::wstring, std::wstring>;
|
||||
SlidenameMap map_slidenames_;
|
||||
|
||||
std::map<std::wstring, int> map_masterNames_;
|
||||
private:
|
||||
odp_slide_context slide_context_;
|
||||
office_presentation* root_presentation_;
|
||||
|
||||
Reference in New Issue
Block a user