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

git-svn-id:...

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@55136 954022d7-b5bf-4e40-9824-e11837661b57
parent e730cab5
......@@ -4,7 +4,7 @@
/* File created by MIDL compiler version 7.00.0555 */
/* at Sat Mar 22 13:04:59 2014
/* at Tue Mar 25 14:13:03 2014
*/
/* Compiler settings for .\ASCOfficeOdfFileW.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
......
......@@ -334,6 +334,7 @@ void ods_table_state::set_merge_cells(int start_col, int start_row, int end_col,
// () -
// ,
//todooo
// covered_cell
if (end_col - start_col < 0)return;
if (end_row - start_row < 0)return;
......
......@@ -184,21 +184,78 @@ void XlsxConverter::convert(OOX::Spreadsheet::CCell *oox_cell)
ods_context->start_cell(ref,ifx_style);
int value_type = 0;//general
if (oox_cell->m_oType.IsInit())
ods_context->current_table().set_cell_type(oox_cell->m_oType->GetValue());
{
value_type = oox_cell->m_oType->GetValue();
}
ods_context->current_table().set_cell_type(value_type);
if (oox_cell->m_oValue.IsInit())
switch (value_type)
{
ods_context->current_table().set_cell_value (string2std_string(oox_cell->m_oValue->m_sText));
case SimpleTypes::Spreadsheet::celltypeSharedString:
break;
default :
if (oox_cell->m_oValue.IsInit())//
{
ods_context->current_table().set_cell_value (string2std_string(oox_cell->m_oValue->m_sText));
}
break;
}
if (oox_cell->m_oFormula.IsInit())
{
}
if (oox_cell->m_oRichText.IsInit())
{
convert(oox_cell->m_oRichText.GetPointer());
}
ods_context->end_cell();
}
void XlsxConverter::convert(OOX::Spreadsheet::WritingElement *oox_unknown)
{
if (oox_unknown == NULL)return;
switch(oox_unknown->getType())
{
case OOX::Spreadsheet::et_r:
{
OOX::Spreadsheet::CRun* pRun = static_cast<OOX::Spreadsheet::CRun*>(oox_unknown);
convert(pRun);
}break;
case OOX::Spreadsheet::et_t:
{
OOX::Spreadsheet::CText* pText = static_cast<OOX::Spreadsheet::CText*>(oox_unknown);
convert(pText);
}break;
}
}
void XlsxConverter::convert(OOX::Spreadsheet::CSi *oox_shared_string)
{
if (oox_shared_string == NULL)return;
//ods_context->start_text();
for(int i = 0; i < oox_shared_string->m_arrItems.GetSize(); ++i)
{
convert(oox_shared_string->m_arrItems[i]);
}
//ods_context->end_text();
}
void XlsxConverter::convert(OOX::Spreadsheet::CRun *oox_text_run)
{
if (oox_text_run == NULL)return;
//ods_context->start_run();
//ods_context->end_run();
}
void XlsxConverter::convert(OOX::Spreadsheet::CText *oox_text)
{
if (oox_text == NULL)return;
//ods_context->start_text();
//ods_context->end_text();
}
void XlsxConverter::convert(OOX::Spreadsheet::CCol *oox_column)
{
if (oox_column == NULL)return;
......@@ -598,13 +655,19 @@ void XlsxConverter::convert(OOX::Spreadsheet::CXfs * xfc_style, int oox_id, bool
odf::office_element_ptr & elm_style = ods_context->styles_context().last_state().get_office_element();
if (xlsx_styles->m_oFonts.IsInit() && (id_parent < 0 || xfc_style->m_oApplyFont.IsInit()))
if (xlsx_styles->m_oFonts.IsInit() && font_id >=0 && (id_parent < 0 || xfc_style->m_oApplyFont.IsInit()))
convert(xlsx_styles->m_oFonts->m_arrItems[font_id], elm_style);
if (xlsx_styles->m_oFills.IsInit() && (id_parent < 0 || xfc_style->m_oApplyFill.IsInit()))
if (xlsx_styles->m_oFills.IsInit() && fill_id >=0 && (id_parent < 0 || xfc_style->m_oApplyFill.IsInit()))
convert(xlsx_styles->m_oFills->m_arrItems[fill_id], elm_style);
if (xlsx_styles->m_oNumFmts.IsInit() && (id_parent < 0 || xfc_style->m_oApplyNumberFormat.IsInit()))
convert(xlsx_styles->m_oNumFmts->m_arrItems[numFmt_id], elm_style);
if (xlsx_styles->m_oBorders.IsInit() && (id_parent < 0 || xfc_style->m_oApplyBorder.IsInit()))
if (xlsx_styles->m_oNumFmts.IsInit() && numFmt_id>=0 && (id_parent < 0 || xfc_style->m_oApplyNumberFormat.IsInit()))
{
//if (numFmt_id < xlsx_styles->m_oNumFmts.Count())
//{
// convert(xlsx_styles->m_oNumFmts->m_arrItems[numFmt_id], elm_style);
//}
// .. .. ..
}
if (xlsx_styles->m_oBorders.IsInit() && border_id >=0 && (id_parent < 0 || xfc_style->m_oApplyBorder.IsInit()))
convert(xlsx_styles->m_oBorders->m_arrItems[border_id], elm_style);
ods_context->styles_context().last_state().set_number_format(numFmt_id);
......
......@@ -52,12 +52,18 @@ namespace Oox2Odf
void convert_sheets();
void convert_styles();
void convert(OOX::Spreadsheet::WritingElement *oox_unknown);
void convert(OOX::Spreadsheet::CWorksheet *oox_sheet);
void convert(OOX::Spreadsheet::CCol *oox_column);
void convert(OOX::Spreadsheet::CRow *oox_row);
void convert(OOX::Spreadsheet::CCell *oox_cell);
void convert(OOX::Spreadsheet::CSi *oox_shared_string);
void convert(OOX::Spreadsheet::CRun *oox_text_run);
void convert(OOX::Spreadsheet::CText *oox_text);
void convert(OOX::Spreadsheet::CSheetFormatPr *oox_sheet_format_pr);
void convert(OOX::Spreadsheet::CSheetPr *oox_sheet_pr);
......
......@@ -2,6 +2,6 @@
//1
//0
//2
//23
#define INTVER 1,0,2,23
#define STRVER "1,0,2,23\0"
//24
#define INTVER 1,0,2,24
#define STRVER "1,0,2,24\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