mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-20 03:08:28 +08:00
OdfFormatReader - fix bug #45530
This commit is contained in:
@ -260,6 +260,9 @@ enum ElementType
|
||||
typeStyleFooterLeft,
|
||||
typeStyleFootnoteSep,
|
||||
|
||||
typeLoextHeaderFirst,
|
||||
typeLoextFooterFirst,
|
||||
|
||||
typeStyleSectionProperties,
|
||||
typeStyleHeaderStyle,
|
||||
typeStyleFooterStyle,
|
||||
|
||||
@ -1501,24 +1501,19 @@ void style_master_page::add_attributes( const xml::attributes_wc_ptr & Attribute
|
||||
|
||||
void style_master_page::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
|
||||
{
|
||||
if (L"style" == Ns && L"header" == Name)
|
||||
CP_CREATE_ELEMENT(style_header_);
|
||||
else if (L"style" == Ns && L"header-first" == Name)
|
||||
CP_CREATE_ELEMENT(style_header_first_);
|
||||
else if (L"style" == Ns && L"header-left" == Name)
|
||||
CP_CREATE_ELEMENT(style_header_left_);
|
||||
|
||||
else if (L"style" == Ns && L"footer" == Name)
|
||||
CP_CREATE_ELEMENT(style_footer_);
|
||||
else if (L"style" == Ns && L"footer-first" == Name)
|
||||
CP_CREATE_ELEMENT(style_footer_first_);
|
||||
else if (L"style" == Ns && L"footer-left" == Name)
|
||||
CP_CREATE_ELEMENT(style_footer_left_);
|
||||
|
||||
else if (L"office" == Ns && L"forms" == Name)
|
||||
CP_CREATE_ELEMENT(office_forms_);
|
||||
else if (L"style" == Ns && L"style" == Name)
|
||||
CP_CREATE_ELEMENT(style_style_);
|
||||
if (L"style" == Ns || L"loext" == Ns)
|
||||
{
|
||||
if (L"header" == Name) CP_CREATE_ELEMENT(style_header_);
|
||||
else if (L"header-first" == Name) CP_CREATE_ELEMENT(style_header_first_);
|
||||
else if (L"header-left" == Name) CP_CREATE_ELEMENT(style_header_left_);
|
||||
else if (L"footer" == Name) CP_CREATE_ELEMENT(style_footer_);
|
||||
else if (L"footer-first" == Name) CP_CREATE_ELEMENT(style_footer_first_);
|
||||
else if (L"footer-left" == Name) CP_CREATE_ELEMENT(style_footer_left_);
|
||||
}
|
||||
else if (L"style" == Ns && L"style" == Name)
|
||||
CP_CREATE_ELEMENT(style_style_);
|
||||
else if (L"office" == Ns && L"forms" == Name)
|
||||
CP_CREATE_ELEMENT(office_forms_);
|
||||
else if (L"presentation" == Ns && L"notes" == Name)
|
||||
CP_CREATE_ELEMENT(presentation_notes_);
|
||||
else
|
||||
@ -1686,6 +1681,9 @@ void style_footer::xlsx_serialize(std::wostream & strm, oox::xlsx_conversion_con
|
||||
const wchar_t * style_header_first::ns = L"style";
|
||||
const wchar_t * style_header_first::name = L"header-first";
|
||||
|
||||
const wchar_t * loext_header_first::ns = L"loext";
|
||||
const wchar_t * loext_header_first::name = L"header-first";
|
||||
|
||||
void style_header_first::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
std::wostream & strm = Context.output_stream();
|
||||
@ -1710,6 +1708,9 @@ void style_header_first::xlsx_serialize(std::wostream & strm, oox::xlsx_conversi
|
||||
const wchar_t * style_footer_first::ns = L"style";
|
||||
const wchar_t * style_footer_first::name = L"footer-first";
|
||||
|
||||
const wchar_t * loext_footer_first::ns = L"loext";
|
||||
const wchar_t * loext_footer_first::name = L"footer-first";
|
||||
|
||||
void style_footer_first::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
std::wostream & strm = Context.output_stream();
|
||||
|
||||
@ -649,6 +649,17 @@ public:
|
||||
|
||||
CP_REGISTER_OFFICE_ELEMENT2(style_header_first);
|
||||
|
||||
// loext:header-first
|
||||
class loext_header_first : public style_header_first
|
||||
{
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
static const ElementType type = typeLoextHeaderFirst;
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(loext_header_first);
|
||||
|
||||
// style:footer_first
|
||||
class style_footer_first : public header_footer_impl
|
||||
{
|
||||
@ -663,6 +674,17 @@ public:
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(style_footer_first);
|
||||
|
||||
// loext:footer_first
|
||||
class loext_footer_first : public style_footer_first
|
||||
{
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
static const ElementType type = typeLoextFooterFirst;
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(loext_footer_first);
|
||||
|
||||
// style:header-left
|
||||
class style_header_left : public header_footer_impl
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user