Commit 6fc4c6a2 authored by ElenaSubbotina's avatar ElenaSubbotina

OdfFormatWriter - fix chart data

parent 4e58b2ce
......@@ -128,7 +128,15 @@ public:
{
styles_context_ = NULL;
current_series_count_= 0;
local_table_enabled_ = true;// false; - пока тока КЭШ .. demo.docx
if (odf_context->type == SpreadsheetDocument)
{
local_table_enabled_ = false;
}
else
{
local_table_enabled_ = true;
}
}
......@@ -1441,8 +1449,6 @@ void odf_chart_context::set_cash(std::wstring format, std::vector<std::wstring>
void odf_chart_context::set_local_table (bool Val)
{
if (Val == false) return;
impl_->local_table_enabled_ = Val;
}
......
......@@ -55,10 +55,10 @@ namespace odf_writer {
//////////////////////////////////////////////////////////////////////////////////////////////////
odf_conversion_context::odf_conversion_context(package::odf_document * outputDocument) : chart_context_ (this), page_layout_context_(this)
odf_conversion_context::odf_conversion_context(_office_type_document type_, package::odf_document * outputDocument)
: type (type_), chart_context_ (this), page_layout_context_(this)
{
output_document_ = outputDocument;
current_object_ =0;
applicationFonts_ = new CApplicationFonts();
......
......@@ -52,7 +52,12 @@ class office_element;
typedef shared_ptr<office_element>::Type office_element_ptr;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
enum _office_type_document
{
TextDocument,
SpreadsheetDocument,
PresentationDocument
};
class odf_conversion_context : boost::noncopyable
{
struct _object
......@@ -70,7 +75,9 @@ class odf_conversion_context : boost::noncopyable
};
public:
odf_conversion_context(package::odf_document * outputDocument);
const _office_type_document type;
odf_conversion_context(_office_type_document type, package::odf_document * outputDocument);
virtual ~odf_conversion_context();
void set_fonts_directory(std::wstring pathFonts);
......
......@@ -74,7 +74,8 @@ void calculate_size_font_symbols(_font_metrix & metrix, CApplicationFonts *appFo
}
}
ods_conversion_context::ods_conversion_context(package::odf_document * outputDocument)
: odf_conversion_context(outputDocument), table_context_(*this), current_text_context_(NULL)
: odf_conversion_context (SpreadsheetDocument, outputDocument),
table_context_(*this), current_text_context_(NULL)
{
font_metrix_ = _font_metrix();
}
......
......@@ -60,7 +60,7 @@ int ods_table_state::current_table_row_ = 0;
int ods_table_state::tmp_column_ =0;
int ods_table_state::tmp_row_ =0;
namespace utils//////////////////////////////////////////// ОБўАя хрень .. вытащить что ли в utils ???
namespace utils//////////////////////////////////////////// ОБЩАЯ хрень .. вытащить что ли в utils ???
{
std::wstring convert_date(const std::wstring & oox_date)
......@@ -74,7 +74,7 @@ std::wstring convert_date(const std::wstring & oox_date)
{
return oox_date;
}
//todoooo ПЕРЕПИСАTЬ !!!!
//todoooo ПЕРЕПИСАТЬ !!!!
//boost::gregorian::date date_ = boost::gregorian::date(1900, 1, 1) + boost::gregorian::date_duration(iDate-2);
......@@ -103,7 +103,7 @@ std::wstring convert_time(const std::wstring & oox_time)
int hours=0, minutes=0;
double sec=0;
//todooo ПЕРЕПИСАTЬ !!!
//todooo ПЕРЕПИСАТЬ !!!
//boost::posix_time::time_duration day(24, 0, 0);
//
//double millisec = day.total_milliseconds() * dTime;
......
......@@ -72,7 +72,8 @@ double calculate_size_font_symbols(std::wstring str_test, std::wstring font_name
}
}
odt_conversion_context::odt_conversion_context(package::odf_document * outputDocument)
: odf_conversion_context(outputDocument),comment_context_(this), main_text_context_(NULL),table_context_(this)
: odf_conversion_context (TextDocument, outputDocument),
comment_context_(this), main_text_context_(NULL),table_context_(this)
{
current_field_.enabled = false;
current_field_.started = false;
......
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