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

.....

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63351 954022d7-b5bf-4e40-9824-e11837661b57
parent b36de57c
......@@ -35,6 +35,8 @@ border_style::border_style(const border_style & Value)
length_ = Value.get_length();
style_ = Value.get_style();
none_ = Value.is_none();
initialized_ = true;
}
......@@ -49,6 +51,7 @@ border_style::border_style(const std::wstring & Value) : initialized_(false), no
}
else
{
none_ = false;
std::vector< std::wstring > splitted;
boost::algorithm::split(splitted, Value, boost::algorithm::is_any_of(L" \t"), boost::algorithm::token_compress_on);
......@@ -92,6 +95,8 @@ border_style::border_style(const color & color_, const type & style_, const len
if (this->style_ == none)
none_ = true;
else
none_ = false;
initialized_ = true;
}
......
......@@ -106,7 +106,7 @@ bool parse_clipping(std::wstring strClipping,std::wstring fileName, double_4 & c
}
if (Points_pt.size()>3)// ..
{
float dpi_ = getSystemDPI();
float dpi_ = 96.;///getSystemDPI();
clip_rect[0] = dpi_ * Points_pt[3].get_value_unit(length::inch);
clip_rect[1] = dpi_ * Points_pt[0].get_value_unit(length::inch);
clip_rect[2] = dpi_ * Points_pt[1].get_value_unit(length::inch);
......
......@@ -50,20 +50,31 @@ void table_table_row::xlsx_convert(oox::xlsx_conversion_context & Context)
/// -
size_t Default_Cell_style_in_row_ = 0;
const std::wstring styleName = table_table_row_attlist_.table_style_name_.get_value_or( style_ref(L"") ).style_name();
const std::wstring rowStyleName = table_table_row_attlist_.table_style_name_.get_value_or( style_ref(L"") ).style_name();
const std::wstring defaultCellStyleName = table_table_row_attlist_.table_default_cell_style_name_.get_value_or( style_ref(L"") ).style_name();
style_instance * instStyle_CellDefault =
Context.root()->odf_context().styleContainer().style_by_name(defaultCellStyleName, style_family::TableCell,false/*false*/);
style_table_cell_properties * prop_CellDefault = NULL;
if ((instStyle_CellDefault) && (instStyle_CellDefault->content())) prop_CellDefault = instStyle_CellDefault->content()->get_style_table_cell_properties();
if ((instStyle_CellDefault) && (instStyle_CellDefault->content()))
prop_CellDefault = instStyle_CellDefault->content()->get_style_table_cell_properties();
//
if (prop_CellDefault)
// -
if (prop_CellDefault) // -
{
odf_reader::style_table_cell_properties_attlist cellFormatProperties = calc_table_cell_properties(instStyle_CellDefault);
Default_Cell_style_in_row_ = Context.get_style_manager().xfId(NULL,NULL, &cellFormatProperties, NULL, L"",true);
Default_Cell_style_in_row_ = Context.get_style_manager().xfId(NULL,NULL, &cellFormatProperties, NULL, L"", true);
}
else //
{
// cell ( )
int ind_last_cell = content_.size()-1;
table_table_cell *last_cell = NULL;
if (ind_last_cell > 0)
last_cell = dynamic_cast<table_table_cell *>(content_[ind_last_cell].get());
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool skip_next_row = false;
......@@ -75,7 +86,7 @@ void table_table_row::xlsx_convert(oox::xlsx_conversion_context & Context)
do
{
odf_reader::style_instance * rowStyle = odfContext.styleContainer().style_by_name(styleName, odf_types::style_family::TableRow,false/*false*/);
odf_reader::style_instance * rowStyle = odfContext.styleContainer().style_by_name(rowStyleName, odf_types::style_family::TableRow,false/*false*/);
if (!rowStyle)
break;
......@@ -110,7 +121,7 @@ void table_table_row::xlsx_convert(oox::xlsx_conversion_context & Context)
for (unsigned int i = 0; i < table_table_row_attlist_.table_number_rows_repeated_; ++i)
{
Context.start_table_row(styleName, defaultCellStyleName);
Context.start_table_row(rowStyleName, defaultCellStyleName);
if (!skip_next_row)
{
......@@ -148,7 +159,7 @@ void table_table_row::xlsx_convert(oox::xlsx_conversion_context & Context)
CP_XML_ATTR(L"customHeight", L"true");
CP_XML_ATTR(L"ht", ht);
}
if (Default_Cell_style_in_row_>0)
if (Default_Cell_style_in_row_ > 0)
{
CP_XML_ATTR(L"customFormat", 1);
CP_XML_ATTR(L"s", Default_Cell_style_in_row_ );
......@@ -390,8 +401,8 @@ void table_table_column::xlsx_convert(oox::xlsx_conversion_context & Context)
size_t style_ = Context.get_style_manager().xfId(NULL,NULL, &cellFormatProperties, NULL, L"", set_default);
//if (style_>=0)
if (set_default)
if (style_>=0)
//if (set_default)
CP_XML_ATTR(L"style", style_ );
}
}
......@@ -541,7 +552,7 @@ void table_table_cell::xlsx_convert(oox::xlsx_conversion_context & Context)
for (unsigned int r = 0; r < table_table_cell_attlist_.table_number_columns_repeated_; ++r)
{
Context.start_table_cell(formula,
Context.start_table_cell ( formula,
table_table_cell_attlist_extra_.table_number_columns_spanned_ - 1,
table_table_cell_attlist_extra_.table_number_rows_spanned_ - 1
);
......@@ -767,8 +778,8 @@ void table_table_cell::xlsx_convert(oox::xlsx_conversion_context & Context)
else
{
empty_cell++;
if (empty_cell > 4 && table_table_cell_attlist_.table_number_columns_repeated_>100)
{
if ((empty_cell > 4 && table_table_cell_attlist_.table_number_columns_repeated_>299) || (cellStyle == NULL))
{//
skip_next_cell = true;
}
}
......
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