Commit 49934d52 authored by ElenaSubbotina's avatar ElenaSubbotina

x2t 2.0.2.395 fix bugs

parent 5c3b05f4
......@@ -752,7 +752,7 @@ void odt_conversion_context::start_note_content()
{
notes_context_.start_note_content();
office_element_ptr & note_content_element = notes_context_.get_note_content();
office_element_ptr note_content_element = notes_context_.get_note_content();
odf_element_state state = {note_content_element, L"", office_element_ptr(), (int)text_context()->current_level_.size()};
text_context()->current_level_.push_back(state);
......
......@@ -74,7 +74,8 @@ public:
{
if (para->m_oParagraphProperty->m_oSectPr.IsInit() )
{
_section section(RtfSectionPtr( new RtfSection() ), last_section_start, i + 1);
RtfSectionPtr s(new RtfSection());
_section section(s, last_section_start, i + 1);
last_section_start = i + 1;
......@@ -96,7 +97,8 @@ public:
if (last_section.end_para < m_ooxDocument->m_arrItems.size())
{
_section section(RtfSectionPtr( new RtfSection() ), last_section.end_para, m_ooxDocument->m_arrItems.size());
RtfSectionPtr s(new RtfSection());
_section section(s, last_section.end_para, m_ooxDocument->m_arrItems.size());
section.props->m_oProperty.SetDefaultOOX();
if (m_ooxDocument->m_oSectPr.IsInit())// свойства последней секции
......@@ -121,4 +123,4 @@ public:
}
return true;
}
};
\ No newline at end of file
};
......@@ -41,7 +41,8 @@
RtfDocument::RtfDocument()
{
_section section(RtfSectionPtr(new RtfSection()), 0, 0);
RtfSectionPtr s(new RtfSection());
_section section(s, 0, 0);
m_aArray.push_back( section );
m_oProperty.SetDefaultOOX();
......@@ -60,4 +61,4 @@ CString RtfDocument::RenderToRtf(RenderParameter oRenderParameter)
CString RtfDocument::RenderToOOX(RenderParameter oRenderParameter)
{
return _T("");
}
\ No newline at end of file
}
......@@ -107,11 +107,27 @@ using namespace ATL;
#ifndef _wtof
#include <string>
#define _wtof std::stod
#define _wtoi std::stoi
//#define _wtoi std::stoi
#define _wtoi64(p) std::wcstoll((p),NULL,10)
static int _wtoi(std::wstring sVal)
{
int iVal = 0;
try
{
iVal = std::stod(sVal.c_str());
}catch(...)
{
try
{
iVal = std::wcstoll(sVal.c_str(), NULL, 10);
}catch(...)
{
}
}
return iVal;
}
#ifdef UNICODE
#define _ttoi _wtoi
#define _tstof _wtof
......
......@@ -119,7 +119,7 @@ namespace XmlUtils
try
{
return _ttoi(string);
return _wtoi(string);
}
catch(...)
{
......@@ -139,7 +139,7 @@ namespace XmlUtils
if (string.GetLength() <1) return 0;
try
{
return (size_t) _ttoi(string);
return (size_t) _wtoi(string);
}
catch(...)
{
......
......@@ -7,7 +7,7 @@
QT -= core
QT -= gui
VERSION = 2.0.2.392
VERSION = 2.0.2.395
DEFINES += INTVER=$$VERSION
TEMPLATE = app
......
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