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

XlsFile2

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@64026 954022d7-b5bf-4e40-9824-e11837661b57
parent a2321bce
...@@ -95,14 +95,15 @@ int MulBlank::serialize(std::wostream & stream) ...@@ -95,14 +95,15 @@ int MulBlank::serialize(std::wostream & stream)
{ {
CP_XML_ATTR(L"r", ref); CP_XML_ATTR(L"r", ref);
if ((rgixfe.common_ixfe > 0) && (rgixfe.common_ixfe > cellStyleXfs_count)) if(( (i-colFirst) < rgixfe.rgixfe.size()) && (rgixfe.rgixfe[i-colFirst] > cellStyleXfs_count))
{ {
CP_XML_ATTR(L"s", rgixfe.common_ixfe - cellStyleXfs_count); CP_XML_ATTR(L"s", rgixfe.rgixfe[i-colFirst] - cellStyleXfs_count);
} }
else if(( i < rgixfe.rgixfe.size()) && (rgixfe.rgixfe[i] > cellStyleXfs_count)) else if ((rgixfe.common_ixfe > 0) && (rgixfe.common_ixfe > cellStyleXfs_count))
{ {
CP_XML_ATTR(L"s", rgixfe.rgixfe[i] - cellStyleXfs_count); CP_XML_ATTR(L"s", rgixfe.common_ixfe - cellStyleXfs_count);
} }
} }
} }
} }
......
...@@ -702,21 +702,16 @@ void XlsConverter::convert_geometry(std::vector<ODRAW::OfficeArtFOPTEPtr> & prop ...@@ -702,21 +702,16 @@ void XlsConverter::convert_geometry(std::vector<ODRAW::OfficeArtFOPTEPtr> & prop
else else
{ {
int ind_point = 0; int ind_point = 0;
std::wstring comm[] = std::wstring comm[] = { L"a:lnTo", L"a:cubicBezTo", L"a:moveTo", L"a:close" };
{ int count_point[] = { 1, 3, 1, 0};
L"a:lnTo", L"a:cubicBezTo", L"a:moveTo", L"a:close"
};
for (int i = 0 ; i < command.size(); i++) for (int i = 0 ; i < command.size(); i++)
{ {
if (command[i].typeSegment == ODRAW::msopathEnd) break; if (command[i].typeSegment == ODRAW::msopathEnd) break;
if (command[i].typeSegment > 4) continue; if (command[i].typeSegment > 4) continue;
if (command[i].typeSegment < 3 && command[i+1].Segments < 1)
continue;
CP_XML_NODE(comm[command[i].typeSegment]) CP_XML_NODE(comm[command[i].typeSegment])
{ {
for (int j=0 ; j < command[i+1].Segments; j ++) for (int j=0 ; j < count_point[command[i].typeSegment]; j ++)
{ {
if (ind_point > points.size()) if (ind_point > points.size())
break; break;
...@@ -794,7 +789,10 @@ void XlsConverter::convert_transform(std::vector<ODRAW::OfficeArtFOPTEPtr> & pro ...@@ -794,7 +789,10 @@ void XlsConverter::convert_transform(std::vector<ODRAW::OfficeArtFOPTEPtr> & pro
{ {
case 0x0004: case 0x0004:
{ {
xlsx_context->get_drawing_context().set_rotation(props[i]->op); double d = props[i]->op / 65536.;
d *= 60000; //60 000 per 1 gr - 19.5.5 oox
xlsx_context->get_drawing_context().set_rotation((int)d);
}break; }break;
} }
} }
...@@ -805,7 +803,7 @@ void XlsConverter::convert(ODRAW::OfficeArtFOPT * fort) ...@@ -805,7 +803,7 @@ void XlsConverter::convert(ODRAW::OfficeArtFOPT * fort)
convert_shape (fort->fopt.Shape_props); convert_shape (fort->fopt.Shape_props);
convert_group_shape (fort->fopt.GroupShape_props); convert_group_shape (fort->fopt.GroupShape_props);
convert_transform (fort->fopt.Shape_props); convert_transform (fort->fopt.Transform_props);
convert_blip (fort->fopt.Blip_props); convert_blip (fort->fopt.Blip_props);
convert_geometry (fort->fopt.Geometry_props); convert_geometry (fort->fopt.Geometry_props);
convert_fill_style (fort->fopt.FillStyle_props); convert_fill_style (fort->fopt.FillStyle_props);
......
...@@ -550,7 +550,7 @@ void xlsx_drawing_context::set_crop_right (long val) ...@@ -550,7 +550,7 @@ void xlsx_drawing_context::set_crop_right (long val)
} }
void xlsx_drawing_context::set_rotation (long val) void xlsx_drawing_context::set_rotation (long val)
{ {
if (drawing_state.size() < 1 )return; if (drawing_state.size() < 1 )return;//in degrees
drawing_state.back().rotation = val; drawing_state.back().rotation = val;
} }
void xlsx_drawing_context::set_line_color (std::wstring color) void xlsx_drawing_context::set_line_color (std::wstring color)
......
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