Commit bc4abd5b authored by ElenaSubbotina's avatar ElenaSubbotina

fix errors

parent 7c8602d9
......@@ -48,6 +48,8 @@
#include "style_paragraph_properties.h"
#include "style_graphic_properties.h"
#include <boost/date_time.hpp>
namespace cpdoccore {
using namespace odf_types;
......@@ -74,16 +76,14 @@ std::wstring convert_date(const std::wstring & oox_date)
{
return oox_date;
}
//todoooo ПЕРЕПИСАТЬ !!!!
//boost::gregorian::date date_ = boost::gregorian::date(1900, 1, 1) + boost::gregorian::date_duration(iDate-2);
boost::gregorian::date date_ = boost::gregorian::date(1900, 1, 1) + boost::gregorian::date_duration(iDate-2);
////to for example, "1899-12-31T05:37:46.66569
std::wstring date_str = L"";//boost::lexical_cast<std::wstring>(date_.year())
// + L"-" +
// (date_.month() < 10 ? L"0": L"") + boost::lexical_cast<std::wstring>(date_.month())
// + L"-" +
// (date_.day() < 10 ? L"0": L"") + boost::lexical_cast<std::wstring>(date_.day());
std::wstring date_str = boost::lexical_cast<std::wstring>(date_.year())
+ L"-" +
(date_.month() < 10 ? L"0": L"") + boost::lexical_cast<std::wstring>(date_.month().as_number())
+ L"-" +
(date_.day() < 10 ? L"0": L"") + boost::lexical_cast<std::wstring>(date_.day());
return date_str;
}
......
......@@ -135,9 +135,11 @@ namespace PPTX
for (ULONG i = 0; i < _c; ++i)
{
pReader->Skip(1); // type (0)
LONG pos = pReader->GetPos();
LONG nElemLength = pReader->GetLong(); // len
if(nElemLength > 0)
{
pReader->Seek(pos);
Logic::UniColor elm;
ClrMru.push_back(elm);
ClrMru.back().fromPPTY(pReader);
......
......@@ -314,14 +314,15 @@ const bool GlobalsSubstream::loadContent(BinProcessor& proc)
{
if (proc.mandatory<FORMATTING>())
{
if (!m_Formating )
if (!m_Formating )//todooo concatinate?
{
m_Formating = elements_.back();
elements_.pop_back();
FORMATTING* fmts = dynamic_cast<FORMATTING*>(m_Formating.get());
if (fmts)
{
proc.getGlobalWorkbookInfo()->m_arFonts = &fmts->m_arFonts;
proc.getGlobalWorkbookInfo()->cellStyleDxfs_count = fmts->m_arDXF.size(); // + будут юзерские
proc.getGlobalWorkbookInfo()->m_arFonts = &fmts->m_arFonts;
}
}
}
......
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