Commit 351570b8 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

OdfFile заменитель математических формул (картинка)

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63336 954022d7-b5bf-4e40-9824-e11837661b57
parent 7068e50d
......@@ -319,11 +319,15 @@ void pptx_slide_context::start_table()
impl_->object_description_.type_ = 0; //frame
}
void pptx_slide_context::start_object_ole()
void pptx_slide_context::set_use_image_replacement()
{
impl_->object_description_.use_image_replace_ = true;
}
void pptx_slide_context::start_object_ole()
{
}
void pptx_slide_context::start_chart(std::wstring const & path)
{
impl_->object_description_.xlink_href_ = path;
......
......@@ -61,6 +61,8 @@ public:
void start_object_ole();
void end_object_ole();
void set_use_image_replacement();
bool empty() const;
//////////////////////////////////////////////////////////////////////////////////////////////
void serialize_objects(std::wostream & strm);
......
......@@ -255,6 +255,10 @@ void xlsx_drawing_context::start_shape(int type)
}
void xlsx_drawing_context::start_object_ole()
{
}
void xlsx_drawing_context::set_use_image_replacement()
{
impl_->object_description_.use_image_replace_ = true;
}
......
......@@ -82,6 +82,8 @@ public:
void start_object_ole();
void end_object_ole();
void set_use_image_replacement();
bool empty() const;
......
......@@ -11,6 +11,7 @@
#include "paragraph_elements.h"
#include "office_binary_data.h"
#include "math_elements.h"
#include "text_elements.h"
#include "list.h"
#include "style_text_properties.h"
......
......@@ -133,30 +133,63 @@ void chart_build::add_point(unsigned int rep, std::wstring const & styleName)
void chart_build::xlsx_convert(oox::xlsx_conversion_context & Context)
{
Context.start_chart(L"");
oox::oox_chart_context & chart = Context.current_chart();
oox_convert(chart);
if (object_type_ == 1)
{
Context.start_chart(L"");
oox::oox_chart_context & chart = Context.current_chart();
oox_convert(chart);
Context.end_chart();
Context.end_chart();
}
else if (object_type_ == 2 && office_text_)
{
office_text_->xlsx_convert(Context);
}
else if (object_type_ == 3 && math_math_)
{
math_math_->xlsx_convert(Context);
}
}
void chart_build::docx_convert(oox::docx_conversion_context & Context)
{
Context.start_chart(L"");
oox::oox_chart_context & chart = Context.current_chart();
if (object_type_ == 1)
{
Context.start_chart(L"");
oox::oox_chart_context & chart = Context.current_chart();
oox_convert(chart);
oox_convert(chart);
Context.end_chart();
Context.end_chart();
}
else if (object_type_ == 2 && office_text_)
{
office_text_->docx_convert(Context);
}
else if (object_type_ == 3 && math_math_)
{
math_math_->docx_convert(Context);
}
}
void chart_build::pptx_convert(oox::pptx_conversion_context & Context)
{
Context.start_chart(L"");
oox::oox_chart_context & chart = Context.current_chart();
oox_convert(chart);
if (object_type_ == 1)
{
Context.start_chart(L"");
oox::oox_chart_context & chart = Context.current_chart();
oox_convert(chart);
Context.end_chart();
Context.end_chart();
}
else if (object_type_ == 2 && office_text_)
{
office_text_->pptx_convert(Context);
}
else if (object_type_ == 3 && math_math_)
{
math_math_->pptx_convert(Context);
}
}
void chart_build::calc_cash_series(std::wstring adress, std::vector<std::wstring> & cash)
{
......@@ -392,6 +425,11 @@ void process_build_chart::visit(office_text& val)
chart_build_.object_type_ = 2;
chart_build_.office_text_ = &val;//
}
void process_build_chart::visit(const math_math& val)
{
chart_build_.object_type_ = 3;
//chart_build_.math_semantics_ = &val.semantics_;//
}
void process_build_chart::visit(const chart_chart& val)
{
chart_build_.object_type_ = 1;
......
......@@ -21,6 +21,7 @@
#include "office_body.h"
#include "office_chart.h"
#include "office_text.h"
#include "math_elements.h"
#include "table.h"
namespace cpdoccore {
......@@ -37,17 +38,17 @@ struct class_type_pair
static const class_type_pair class_type_str[] =
{
{chart::chart_line, L"chart:line"},
{chart::chart_area, L"chart:area"},
{chart::chart_circle, L"chart:circle"},
{chart::chart_ring, L"chart:ring"},
{chart::chart_scatter, L"chart:scatter"},
{chart::chart_radar, L"chart:radar"},
{chart::chart_bar, L"chart:bar"},
{chart::chart_stock, L"chart:stock"},
{chart::chart_bubble, L"chart:bubble"},
{chart::chart_surface, L"chart:surface"},
{chart::chart_gantt, L"chart:gantt"},
{chart::chart_line , L"chart:line"},
{chart::chart_area , L"chart:area"},
{chart::chart_circle , L"chart:circle"},
{chart::chart_ring , L"chart:ring"},
{chart::chart_scatter , L"chart:scatter"},
{chart::chart_radar , L"chart:radar"},
{chart::chart_bar , L"chart:bar"},
{chart::chart_stock , L"chart:stock"},
{chart::chart_bubble , L"chart:bubble"},
{chart::chart_surface , L"chart:surface"},
{chart::chart_gantt , L"chart:gantt"},
{chart::chart_filled_radar, L"chart:filled-radar"}
};
......@@ -80,7 +81,8 @@ public:
//target_table_(0/*targetTable*/),
columns_count_(0),
object_type_(0),
office_text_(NULL)
office_text_(NULL),
math_math_(NULL)
{
}
......@@ -117,9 +119,10 @@ public:
double width_pt_;
double height_pt_;
int object_type_;
int object_type_;
office_text *office_text_;
math_math *math_math_;
std::wstring str_class_;
chart::class_type class_;
std::wstring style_name_;
......@@ -176,7 +179,9 @@ class process_build_chart : public base_visitor,
public visitor<office_chart>,
public visitor<office_text>,
public const_visitor<math_math>,
public const_visitor<chart_chart>,
public const_visitor<chart_title>,
......@@ -246,6 +251,7 @@ public:
virtual void visit(office_body& val);
virtual void visit(office_chart& val);
virtual void visit(office_text& val);
virtual void visit(const math_math& val);
virtual void visit(const chart_chart& val);
virtual void visit(const chart_title& val);
virtual void visit(const chart_subtitle& val);
......
......@@ -1210,48 +1210,55 @@ void draw_object::docx_convert(oox::docx_conversion_context & Context)
if (!contentSubDoc)
return;
chart_build chartBuild;
process_build_chart process_build_chart_(chartBuild,objectSubDoc.odf_context().styleContainer(),objectSubDoc.odf_context().drawStyles());
contentSubDoc->accept(process_build_chart_);
chart_build objectBuild;
process_build_chart process_build_object_(objectBuild, objectSubDoc.odf_context().styleContainer(), objectSubDoc.odf_context().drawStyles());
contentSubDoc->accept(process_build_object_);
if (chartBuild.object_type_ != 1)return;
//
chartBuild.docx_convert(Context);
objectBuild.docx_convert(Context);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
const draw_frame * frame = Context.get_drawing_context().get_current_frame();//owner
if (!frame)
return;
oox::_docx_drawing drawing = oox::_docx_drawing();
drawing.type = oox::mediaitems::typeChart;
drawing.id = Context.get_drawing_context().get_current_frame_id();
drawing.name = Context.get_drawing_context().get_current_object_name();
bool isMediaInternal = true;
drawing.chartId = Context.add_mediaitem(href, oox::mediaitems::typeChart, isMediaInternal, href);
if (objectBuild.object_type_ == 1) //
{
//
const draw_frame * frame = Context.get_drawing_context().get_current_frame();//owner
if (!frame)
return;
oox::_docx_drawing drawing = oox::_docx_drawing();
drawing.type = oox::mediaitems::typeChart;
drawing.id = Context.get_drawing_context().get_current_frame_id();
drawing.name = Context.get_drawing_context().get_current_object_name();
bool isMediaInternal = true;
drawing.chartId = Context.add_mediaitem(href, oox::mediaitems::typeChart, isMediaInternal, href);
common_draw_docx_convert(Context, frame->common_draw_attlists_, drawing);
bool runState = Context.get_run_state();
bool pState = Context.get_paragraph_state();
Context.set_run_state(false);
Context.set_paragraph_state(false);
std::wostream & strm = Context.output_stream();
Context.add_new_run(_T(""));
docx_serialize(strm, drawing);
Context.finish_run();
Context.set_run_state(runState);
Context.set_paragraph_state(pState);
common_draw_docx_convert(Context, frame->common_draw_attlists_, drawing);
bool runState = Context.get_run_state();
bool pState = Context.get_paragraph_state();
Context.set_run_state(false);
Context.set_paragraph_state(false);
std::wostream & strm = Context.output_stream();
Context.add_new_run(_T(""));
docx_serialize(strm, drawing);
Context.finish_run();
Context.set_run_state(runState);
Context.set_paragraph_state(pState);
}
else if (objectBuild.object_type_ == 0 || objectBuild.object_type_ == 3)
{
// - ( )
bool & use_image_replace = Context.get_drawing_context().get_use_image_replace();
use_image_replace = true;
}
}
catch(...)
{
......
......@@ -259,23 +259,23 @@ void draw_object::pptx_convert(oox::pptx_conversion_context & Context)
}
chart_build chartBuild;
chart_build objectBuild;
process_build_chart process_build_chart_(chartBuild,objectSubDoc.odf_context().styleContainer(),objectSubDoc.odf_context().drawStyles());
contentSubDoc->accept(process_build_chart_);
process_build_chart process_build_object_(objectBuild, objectSubDoc.odf_context().styleContainer(), objectSubDoc.odf_context().drawStyles());
contentSubDoc->accept(process_build_object_);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
if (chartBuild.object_type_ == 1)//
if (objectBuild.object_type_ == 1)//
{
const std::wstring href_draw = common_xlink_attlist_.href_.get_value_or(L"");
chartBuild.pptx_convert(Context);
objectBuild.pptx_convert(Context);
Context.get_slide_context().start_chart(href_draw); // , ...
Context.get_slide_context().end_chart();
}
if (chartBuild.object_type_ == 2)//
else if (objectBuild.object_type_ == 2)//odt
{
Context.get_slide_context().start_shape(2);
Context.get_text_context().start_object();
......@@ -283,7 +283,7 @@ void draw_object::pptx_convert(oox::pptx_conversion_context & Context)
// ... !!
Context.get_text_context().set_local_styles_container(&objectSubDoc.odf_context().styleContainer());
chartBuild.office_text_->pptx_convert(Context);
objectBuild.pptx_convert(Context);
std::wstring text_content_ = Context.get_text_context().end_object();
Context.get_text_context().set_local_styles_container(NULL);// ...
......@@ -297,7 +297,7 @@ void draw_object::pptx_convert(oox::pptx_conversion_context & Context)
else
{
// - ( )
Context.get_slide_context().start_object_ole();
Context.get_slide_context().set_use_image_replacement();
}
}
......@@ -310,11 +310,13 @@ void draw_object::pptx_convert(oox::pptx_conversion_context & Context)
void draw_object_ole::pptx_convert(oox::pptx_conversion_context & Context)
{
// embeddings
//Context.get_slide_context().start_object_ole();
// guid???
// - ( )
Context.get_slide_context().start_object_ole();
Context.get_slide_context().set_use_image_replacement();
//Context.get_slide_context().end_object_ole();
}
}
......
......@@ -229,23 +229,23 @@ void draw_object::xlsx_convert(oox::xlsx_conversion_context & Context)
const office_element *contentSubDoc = objectSubDoc.get_impl()->get_content();
if (!contentSubDoc)return;
chart_build chartBuild;
chart_build objectBuild;
process_build_chart process_build_chart_(chartBuild,objectSubDoc.odf_context().styleContainer(),objectSubDoc.odf_context().drawStyles() );
contentSubDoc->accept(process_build_chart_);
process_build_chart process_build_object_(objectBuild,objectSubDoc.odf_context().styleContainer(),objectSubDoc.odf_context().drawStyles() );
contentSubDoc->accept(process_build_object_);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
if (chartBuild.object_type_ == 1)//
if (objectBuild.object_type_ == 1)//
{
const std::wstring href_draw = common_xlink_attlist_.href_.get_value_or(L"");
chartBuild.xlsx_convert(Context);
objectBuild.xlsx_convert(Context);
Context.get_drawing_context().start_chart(href_draw); // , ...
Context.get_drawing_context().end_chart();
}
if (chartBuild.object_type_ == 2)//
else if (objectBuild.object_type_ == 2)// (odt text)
{
Context.get_drawing_context().start_shape(2);
Context.get_text_context().start_drawing_content();
......@@ -253,7 +253,7 @@ void draw_object::xlsx_convert(oox::xlsx_conversion_context & Context)
// ... !!
Context.get_text_context().set_local_styles_container(&objectSubDoc.odf_context().styleContainer());
chartBuild.office_text_->xlsx_convert(Context);
objectBuild.xlsx_convert(Context);
std::wstring text_content_ = Context.get_text_context().end_drawing_content();
Context.get_text_context().set_local_styles_container(NULL);// ...
......@@ -264,6 +264,11 @@ void draw_object::xlsx_convert(oox::xlsx_conversion_context & Context)
}
Context.get_drawing_context().end_shape();
}
else
{
// - ( )
Context.get_drawing_context().set_use_image_replacement();
}
}
catch(...)
......@@ -274,7 +279,11 @@ void draw_object::xlsx_convert(oox::xlsx_conversion_context & Context)
void draw_object_ole::xlsx_convert(oox::xlsx_conversion_context & Context)
{
// - ( )
Context.get_drawing_context().start_object_ole();
//Context.get_drawing_context().start_object_ole();
Context.get_drawing_context().set_use_image_replacement();
//Context.get_drawing_context().end_object_ole();
}
}
}
......
#include "math_elements.h"
#include <boost/foreach.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
namespace cpdoccore {
using namespace odf_types;
namespace odf_reader {
// math:math
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * math_math::ns = L"math";
const wchar_t * math_math::name = L"math";
void math_math::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void math_math::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
void math_math::docx_convert(oox::docx_conversion_context & Context)
{
}
void math_math::xlsx_convert(oox::xlsx_conversion_context & Context)
{
}
void math_math::pptx_convert(oox::pptx_conversion_context & Context)
{
}
}
}
#pragma once
#include <iosfwd>
#include <cpdoccore/CPOptional.h>
#include <cpdoccore/xml/xmlelement.h>
#include <cpdoccore/xml/nodetype.h>
#include "office_elements_create.h"
namespace cpdoccore {
namespace odf_reader {
class math_math : public office_element_impl<math_math>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMathMath;
//virtual std::wostream & text_to_stream(::std::wostream & _Wostream) const;
CPDOCCORE_DEFINE_VISITABLE();
virtual void docx_convert(oox::docx_conversion_context & Context);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
virtual void pptx_convert(oox::pptx_conversion_context & Context);
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
//virtual void add_text(const std::wstring & Text);
};
CP_REGISTER_OFFICE_ELEMENT2(math_math);
}
}
......@@ -49,6 +49,10 @@ void content_xml_t::add_child_element( xml::sax * Reader, const ::std::wstring &
{
create_element_and_read(Reader, Ns, Name, xml_content_, getContext(), true);
}
else if CP_CHECK_NAME(L"math", L"math")
{
create_element_and_read(Reader, Ns, Name, xml_content_, getContext(), true);
}
}
void content_xml_t::add_text(const std::wstring & Text)
......
......@@ -32,6 +32,7 @@
#include "templates.h"
#include "math_elements.h"
#include "paragraph_elements.h"
#include "text_elements.h"
......
......@@ -5,7 +5,7 @@
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
#include "serialize_elements.h"
#include "../docx/docx_conversion_context.h"
......
#ifndef _CPDOCCORE_ODF_OFFICE_DOCUMENT_H_
#define _CPDOCCORE_ODF_OFFICE_DOCUMENT_H_
#pragma once
#include <iosfwd>
#include <cpdoccore/CPOptional.h>
#include <cpdoccore/xml/xmlelement.h>
#include <cpdoccore/xml/nodetype.h>
#include "office_elements.h"
#include "office_elements_create.h"
#include "office_body.h"
......@@ -16,15 +14,15 @@ namespace odf_reader {
class office_document_base : public office_element
{
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(::std::wostream & _Wostream) const;
CPDOCCORE_DEFINE_VISITABLE();
public:
virtual void docx_convert(oox::docx_conversion_context & Context);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
virtual void pptx_convert(oox::pptx_conversion_context & Context);
public:
office_document_base();
private:
......@@ -33,19 +31,20 @@ private:
virtual void add_text(const std::wstring & Text);
private:
std::wstring office_mimetype_;
std::wstring office_version_;
// office-document-attrs
std::wstring office_mimetype_;
std::wstring office_version_;
// office-document-attrs
// office-document-common-attrs
office_element_ptr office_meta_; // office-meta
office_element_ptr office_settings_;// office-settings
office_element_ptr office_scripts_;
office_element_ptr office_font_face_decls_;// office-font-face-decls
office_element_ptr office_meta_; // office-meta
office_element_ptr office_settings_; // office-settings
office_element_ptr office_scripts_;
office_element_ptr office_font_face_decls_; // office-font-face-decls
office_element_ptr office_styles_; // office-styles
office_element_ptr office_automatic_styles_; // office-automatic-styles
office_element_ptr office_master_styles_; // office-master-styles
office_element_ptr_array manifests_; // manifests
office_element_ptr office_styles_; // office-styles
office_element_ptr office_automatic_styles_; // office-automatic-styles
office_element_ptr office_master_styles_; // office-master-styles
office_element_ptr_array manifests_; // manifests
public:
......@@ -57,7 +56,6 @@ public:
/// \class office_document
/// \brief office:document
class office_document : public office_document_base
{
public:
......@@ -75,7 +73,6 @@ public:
CP_REGISTER_OFFICE_ELEMENT2(office_document);
/// \class office_document_content
/// \brief office:document-content
class office_document_content : public office_document_base
{
public:
......@@ -92,7 +89,6 @@ public:
CP_REGISTER_OFFICE_ELEMENT2(office_document_content);
/// \class office_document_styles
/// \brief office:document-styles
class office_document_styles : public office_document_base
{
public:
......@@ -112,7 +108,6 @@ private:
CP_REGISTER_OFFICE_ELEMENT2(office_document_styles);
/// \class office_document_meta
/// \brief office:document-meta
class office_document_meta : public office_document_base
{
public:
......@@ -129,7 +124,6 @@ public:
CP_REGISTER_OFFICE_ELEMENT2(office_document_meta);
/// \class office_document_settings
/// \brief office:document-settings
class office_document_settings : public office_document_base
{
public:
......@@ -146,7 +140,7 @@ public:
CP_REGISTER_OFFICE_ELEMENT2(office_document_settings);
/// \brief manifest:manifest
/// \class manifest:manifest
class manifest_manifest : public office_document_base
{
public:
......@@ -162,7 +156,7 @@ public:
CP_REGISTER_OFFICE_ELEMENT2(manifest_manifest);
/// \brief manifest:file-entry
/// \class manifest:file-entry
class manifest_entry : public office_element
{
public:
......@@ -188,7 +182,7 @@ public:
CP_REGISTER_OFFICE_ELEMENT2(manifest_entry);
/// \brief manifest:encryption-data
/// \class manifest:encryption-data
class manifest_encryption_data : public office_element
{
public:
......@@ -217,5 +211,3 @@ CP_REGISTER_OFFICE_ELEMENT2(manifest_encryption_data);
}
}
#endif
......@@ -160,6 +160,8 @@ enum ElementType
typeOfficeDocumentMeta,
typeOfficeDocumentSettings,
typeMathMath,
typeManifest,
typeManifestEntry,
typeManifestEncryptionData,
......
......@@ -1231,6 +1231,14 @@
RelativePath="..\src\odf\list.h"
>
</File>
<File
RelativePath="..\src\odf\math_elements.cpp"
>
</File>
<File
RelativePath="..\src\odf\math_elements.h"
>
</File>
<File
RelativePath="..\src\odf\note.cpp"
>
......@@ -1260,7 +1268,7 @@
>
</File>
<File
RelativePath=".\include\cpdoccore\odf\odf_document.h"
RelativePath="..\include\cpdoccore\odf\odf_document.h"
>
</File>
<File
......
......@@ -116,20 +116,20 @@ void CSvmFile::PlayMetaFile()
switch (actionType)
{
case META_RECT_ACTION: Read_META_RECTANGLE(); break;
case META_POLYLINE_ACTION: Read_META_POLYLINE(); break;
case META_POLYGON_ACTION: Read_META_POLYGON(); break;
case META_POLYPOLYGON_ACTION: Read_META_POLYPOLYGON(); break;
case META_LINE_ACTION: Read_META_LINE(); break;
case META_RECT_ACTION: Read_META_RECTANGLE(); break;
case META_POLYLINE_ACTION: Read_META_POLYLINE(); break;
case META_POLYGON_ACTION: Read_META_POLYGON(); break;
case META_POLYPOLYGON_ACTION: Read_META_POLYPOLYGON(); break;
case META_LINE_ACTION: Read_META_LINE(); break;
case META_TEXT_ACTION: Read_META_TEXT(); break;
case META_TEXTARRAY_ACTION: Read_META_ARRAYTEXT(); break;
case META_TEXTALIGN_ACTION: Read_META_TEXTALIGN(); break;
case META_TEXTRECT_ACTION: Read_META_TEXTRECT(); break;
case META_TEXT_ACTION: Read_META_TEXT(); break;
case META_TEXTARRAY_ACTION: Read_META_ARRAYTEXT(); break;
case META_TEXTALIGN_ACTION: Read_META_TEXTALIGN(); break;
case META_TEXTRECT_ACTION: Read_META_TEXTRECT(); break;
case META_TEXTFILLCOLOR_ACTION: Read_META_SETTEXTFILLCOLOR(); break;
case META_TEXTCOLOR_ACTION: Read_META_SETTEXTCOLOR(); break;
case META_STRETCHTEXT_ACTION: Read_META_STRETCHTEXT(); break;
case META_TEXTLANGUAGE_ACTION:
case META_STRETCHTEXT_ACTION:
case META_TEXTLINECOLOR_ACTION:
case META_TEXTLINE_ACTION:
break;
......@@ -152,6 +152,9 @@ void CSvmFile::PlayMetaFile()
case META_TRANSPARENT_ACTION: Read_META_TRANSPARENT(); break;
case META_FLOATTRANSPARENT_ACTION: Read_META_FLOATTRANSPARENT(); break;
case META_ISECTRECTCLIPREGION_ACTION: Read_META_SECTRECTCLIPREGION(); break;
case META_ISECTREGIONCLIPREGION_ACTION: Read_META_SECTREGIONCLIPREGION(); break;
case META_ROUNDRECT_ACTION:
case META_ELLIPSE_ACTION:
case META_ARC_ACTION:
......@@ -169,8 +172,6 @@ void CSvmFile::PlayMetaFile()
case META_MASKSCALEPART_ACTION:
case META_WALLPAPER_ACTION:
case META_CLIPREGION_ACTION:
case META_ISECTRECTCLIPREGION_ACTION:
case META_ISECTREGIONCLIPREGION_ACTION:
case META_MOVECLIPREGION_ACTION:
case META_EPS_ACTION:
case META_REFPOINT_ACTION:
......@@ -417,6 +418,42 @@ void CSvmFile::Read_META_SETMAPMODE()
UpdateOutputDC();
}
void CSvmFile::Read_META_STRETCHTEXT()
{
std::wstring sText;
TSvmPoint startPoint;
m_oStream >> startPoint;
parseString(m_oStream, sText, m_currentActionVersion, m_currentCharset);
unsigned short Index;
unsigned short Len;
unsigned int Width;
m_oStream >> Width;
m_oStream >> Index;
m_oStream >> Len;
if (m_currentActionVersion > 1)
{
unsigned short nLen;
m_oStream >> nLen;
std::wstring buf;
unsigned short nTemp;
while ( nLen-- )
{
m_oStream >> nTemp;
buf += (wchar_t)nTemp;
}
sText = buf;
}
DrawText(sText, sText.length(), startPoint.x, startPoint.y);
}
void CSvmFile::Read_META_TEXT()
{
std::wstring sText;
......@@ -812,6 +849,16 @@ void CSvmFile::Read_META_RASTEROP()
void CSvmFile::Read_META_BMP()
{
}
void CSvmFile::Read_META_SECTRECTCLIPREGION()
{
TSvmRect rect;
m_oStream >> rect;
}
void CSvmFile::Read_META_SECTREGIONCLIPREGION()
{
}
void CSvmFile::Read_META_BMPSCALE()
{
......
......@@ -196,6 +196,11 @@ class CSvmFile : virtual public IMetaFileBase
void Read_META_TRANSPARENT();
void Read_META_FLOATTRANSPARENT();
void Read_META_SECTRECTCLIPREGION();
void Read_META_SECTREGIONCLIPREGION();
void Read_META_STRETCHTEXT();
void Read_META_POLYPOLYGON(std::vector<TSvmPolygon> & polygons, std::vector<TSvmPolygon> & complexPolygons);
......
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