Commit 83b25664 authored by ElenaSubbotina's avatar ElenaSubbotina Committed by Alexander Trofimov

no message

parent af81688a
...@@ -198,8 +198,8 @@ void core_file::write(const std::wstring & RootPath) ...@@ -198,8 +198,8 @@ void core_file::write(const std::wstring & RootPath)
L"xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcmitype=\"http://purl.org/dc/dcmitype/\" " L"xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcmitype=\"http://purl.org/dc/dcmitype/\" "
L"xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" >"; L"xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" >";
resStream << L"<dc:creator>ONLYOFFICE Online Editor</dc:creator>"; //resStream << L"<dc:creator>ONLYOFFICE Online Editor</dc:creator>";
resStream << L"<cp:lastModifiedBy>ONLYOFFICE Online Editor</cp:lastModifiedBy>"; //resStream << L"<cp:lastModifiedBy>ONLYOFFICE Online Editor</cp:lastModifiedBy>";
resStream << L"<cp:revision>1</cp:revision>"; resStream << L"<cp:revision>1</cp:revision>";
resStream << L"</cp:coreProperties>"; resStream << L"</cp:coreProperties>";
...@@ -214,7 +214,7 @@ void app_file::write(const std::wstring & RootPath) ...@@ -214,7 +214,7 @@ void app_file::write(const std::wstring & RootPath)
resStream << L"<Properties xmlns=\"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\" " resStream << L"<Properties xmlns=\"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\" "
L"xmlns:vt=\"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\" >"; L"xmlns:vt=\"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\" >";
resStream << L"<Application>ONLYOFFICE Online Editor</Application>"; resStream << L"<Application>OnlyOffice</Application>";
resStream << L"</Properties>"; resStream << L"</Properties>";
simple_element elm(L"app.xml", resStream.str()); simple_element elm(L"app.xml", resStream.str());
......
...@@ -1298,31 +1298,19 @@ void draw_object::docx_convert(oox::docx_conversion_context & Context) ...@@ -1298,31 +1298,19 @@ void draw_object::docx_convert(oox::docx_conversion_context & Context)
drawing.name = Context.get_drawing_context().get_current_object_name(); drawing.name = Context.get_drawing_context().get_current_object_name();
common_draw_docx_convert(Context, frame->common_draw_attlists_, drawing); common_draw_docx_convert(Context, frame->common_draw_attlists_, drawing);
const std::wstring & content = Context.get_drawing_context().get_text_stream_frame(); const std::wstring & content = Context.get_drawing_context().get_text_stream_frame();
bool in_frame = !drawing.isInline;
bool runState = Context.get_run_state(); bool runState = Context.get_run_state();
bool pState = Context.get_paragraph_state(); bool pState = Context.get_paragraph_state();
if (drawing.isInline) if (drawing.fill.type > 0)
in_frame = true;
if (in_frame)
{ {
if (runState) Context.finish_run(); drawing.additional.push_back(_property(L"text-content", std::wstring(L"<w:p><m:oMathPara><m:oMathParaPr/>") +
if (pState == false) content + std::wstring(L"</m:oMathPara></w:p>")));
{
Context.output_stream() << L"<m:oMathPara>";
Context.output_stream() << L"<m:oMathParaPr/>";
}
Context.output_stream() << content;
if (pState == false)
{
Context.output_stream() << L"</m:oMathPara>";
}
if (runState) Context.add_new_run(_T(""));
}
else
{//in frame
drawing.additional.push_back(_property(L"text-content",std::wstring(L"<w:p>") + content + L"</w:p>"));
Context.set_run_state(false); Context.set_run_state(false);
Context.set_paragraph_state(false); Context.set_paragraph_state(false);
...@@ -1335,6 +1323,22 @@ void draw_object::docx_convert(oox::docx_conversion_context & Context) ...@@ -1335,6 +1323,22 @@ void draw_object::docx_convert(oox::docx_conversion_context & Context)
Context.set_run_state(runState); Context.set_run_state(runState);
Context.set_paragraph_state(pState); Context.set_paragraph_state(pState);
} }
else
{//in text
if (runState) Context.finish_run();
//if (pState == false)
{
Context.output_stream() << L"<m:oMathPara>";
Context.output_stream() << L"<m:oMathParaPr/>";
}
Context.output_stream() << content;
//if (pState == false)
{
Context.output_stream() << L"</m:oMathPara>";
}
if (runState) Context.add_new_run(_T(""));
}
Context.get_drawing_context().clear_stream_frame(); Context.get_drawing_context().clear_stream_frame();
} }
else if (objectBuild.object_type_ == 0) else if (objectBuild.object_type_ == 0)
......
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