Commit 11b67304 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

(1.2.0.116): ASCOfficeOdfFileW


git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@57622 954022d7-b5bf-4e40-9824-e11837661b57
parent f8be09df
......@@ -204,7 +204,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;../Redist&quot;&#x0D;&#x0A;"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;../../Redist&quot;"
/>
</Configuration>
</Configurations>
......
......@@ -875,20 +875,30 @@ void odf_drawing_context::set_rotate(int iVal)
double dRotate = (360 - iVal/60000.)/180. * 3.14159265358979323846;
impl_->current_drawing_state_.rotateAngle = dRotate;
}
void odf_drawing_context::set_drawings_rect(double x_pt, double y_pt, double width_pt, double height_pt)// "- 1"
void odf_drawing_context::set_drawings_rect(_CP_OPT(double) x_pt, _CP_OPT(double) y_pt, _CP_OPT(double) width_pt, _CP_OPT(double) height_pt)// "- 1"
{
// ( )
if (x_pt >= 0) impl_->anchor_settings_.svg_x_ = length(length(x_pt,length::pt).get_value_unit(length::cm),length::cm);
if (y_pt >= 0) impl_->anchor_settings_.svg_y_ = length(length(y_pt,length::pt).get_value_unit(length::cm),length::cm);
impl_->x = x_pt >=0 ? x_pt :0 ;
impl_->y = y_pt >=0 ? y_pt :0;
impl_->width = width_pt;
impl_->height = height_pt;
if (x_pt)
{
impl_->x = *x_pt;
impl_->anchor_settings_.svg_x_ = length(length(*x_pt,length::pt).get_value_unit(length::cm),length::cm);
}
if (y_pt)
{
impl_->y = *y_pt;
impl_->anchor_settings_.svg_y_ = length(length(*y_pt,length::pt).get_value_unit(length::cm),length::cm);
}
if (height_pt >= 0) impl_->anchor_settings_.svg_height_ = length(length(height_pt,length::pt).get_value_unit(length::cm),length::cm);
if (width_pt >= 0) impl_->anchor_settings_.svg_width_ = length(length(width_pt,length::pt).get_value_unit(length::cm),length::cm);
if (height_pt)
{
impl_->height = *height_pt;
impl_->anchor_settings_.svg_height_ = length(length(*height_pt,length::pt).get_value_unit(length::cm),length::cm);
}
if (width_pt)
{
impl_->width = *width_pt;
impl_->anchor_settings_.svg_width_ = length(length(*width_pt,length::pt).get_value_unit(length::cm),length::cm);
}
}
void odf_drawing_context::set_margin_left (double valPt)
{
......
......@@ -25,7 +25,7 @@ public:
odf_drawing_context(odf_conversion_context *odf_context);
~odf_drawing_context();
void set_drawings_rect(double x_pt, double y_pt, double width_pt, double height_pt);
void set_drawings_rect(_CP_OPT(double) x_pt, _CP_OPT(double) y_pt, _CP_OPT(double) width_pt, _CP_OPT(double) height_pt);
void clear();
void set_styles_context(odf_style_context* styles_context);// embedded
......
......@@ -73,8 +73,7 @@ void OoxConverter::convert(SimpleTypes::Vml::CCssStyle *vml_style)
{
if (vml_style == NULL) return;
double width_pt = -1, height_pt = -1;
_CP_OPT(double) width_pt, height_pt, x, y;
for (long i=0; i < vml_style->m_arrProperties.GetSize(); i++)
{
......@@ -100,8 +99,7 @@ void OoxConverter::convert(SimpleTypes::Vml::CCssStyle *vml_style)
break;
}
}
if (height_pt == 0) height_pt = -1;
odf_context()->drawing_context()->set_drawings_rect(-1, -1, width_pt, height_pt);
odf_context()->drawing_context()->set_drawings_rect(x, y, width_pt, height_pt);
}
void OoxConverter::convert(OOX::Vml::CShape *vml_shape)
{
......
......@@ -1490,8 +1490,9 @@ void DocxConverter::convert(OOX::Drawing::CAnchor *oox_anchor)
{
if (oox_anchor == NULL)return;
double width =0, height=0;
double x =0, y=0;
_CP_OPT(double) width, height;
_CP_OPT(double) x, y;
if (oox_anchor->m_oExtent.IsInit()) //size
{
width = oox_anchor->m_oExtent->m_oCx.ToPoints();
......@@ -1502,7 +1503,7 @@ void DocxConverter::convert(OOX::Drawing::CAnchor *oox_anchor)
if (oox_anchor->m_oDistR.IsInit())odt_context->drawing_context()->set_margin_right(oox_anchor->m_oDistR->ToPoints());
if (oox_anchor->m_oDistB.IsInit())odt_context->drawing_context()->set_margin_bottom(oox_anchor->m_oDistB->ToPoints());
odt_context->drawing_context()->set_drawings_rect(-1, -1, width, height);
odt_context->drawing_context()->set_drawings_rect(x, y, width, height);
if (oox_anchor->m_oPositionV.IsInit() && oox_anchor->m_oPositionV->m_oRelativeFrom.IsInit())
{
......@@ -1557,14 +1558,16 @@ void DocxConverter::convert(OOX::Drawing::CInline *oox_inline)
{
if (oox_inline == NULL)return;
double width =0, height=0;
_CP_OPT(double) width, height;
_CP_OPT(double) x = 0., y = 0.;
if (oox_inline->m_oExtent.IsInit()) //size
{
width = oox_inline->m_oExtent->m_oCx.ToPoints();
height = oox_inline->m_oExtent->m_oCy.ToPoints();
}
odt_context->drawing_context()->set_drawings_rect(0, 0, width, height);
odt_context->drawing_context()->set_drawings_rect(x, y, width, height);
odt_context->drawing_context()->set_anchor(odf::anchor_type::AsChar);
......@@ -2210,8 +2213,12 @@ void DocxConverter::convert(OOX::Logic::CTbl *oox_table)
odt_context->start_paragraph();
odt_context->start_drawings();
odt_context->drawing_context()->set_anchor(odf::anchor_type::Paragraph);
odt_context->drawing_context()->set_drawings_rect(oox_table->m_oTableProperties->m_oTblpPr->m_oTblpX->ToPoints(),
oox_table->m_oTableProperties->m_oTblpPr->m_oTblpY->ToPoints(), -1, -1);
_CP_OPT(double) width, height, x, y ;
x = oox_table->m_oTableProperties->m_oTblpPr->m_oTblpX->ToPoints();
y = oox_table->m_oTableProperties->m_oTblpPr->m_oTblpY->ToPoints();
odt_context->drawing_context()->set_drawings_rect(x, y, width, height);
odt_context->drawing_context()->start_drawing();
......
......@@ -2,6 +2,6 @@
//1
//2
//0
//115
#define INTVER 1,2,0,115
#define STRVER "1,2,0,115\0"
//116
#define INTVER 1,2,0,116
#define STRVER "1,2,0,116\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