Commit 84e94315 authored by ElenaSubbotina's avatar ElenaSubbotina

OdfFormatReader - review

XlsFormatReader - style row fix
parent fdbd735e
......@@ -31,10 +31,6 @@
*/
// OdfFileTest.cpp
#include <boost/timer.hpp>
#include <iostream>
#include "../../../OfficeUtils/src/OfficeUtils.h"
#include "../../../Common/DocxFormat/Source/SystemUtility/FileSystem/Directory.h"
......@@ -44,7 +40,6 @@
int _tmain(int argc, _TCHAR* argv[])
{
HRESULT hr = S_OK;
boost::timer t1;
//////////////////////////////////////////////////////////////////////////
std::wstring srcFileName = argv[1];
std::wstring dstPath = argv[2];
......@@ -70,6 +65,5 @@ int _tmain(int argc, _TCHAR* argv[])
FileSystem::Directory::DeleteDirectory(dstTempPath);
////////////////////////////////////////////////////////////////////////
std::cout << "\n\nTime : " << t1.elapsed() << "\n";
return 0;
}
......@@ -435,7 +435,7 @@ namespace formulasconvert {
BOOST_FOREACH(std::wstring &c,range)
{
const ::std::string::size_type colon = c.find('.');
const std::string::size_type colon = c.find('.');
cells.push_back(c.substr(colon+1));
if (sheet.size()<1)
sheet=c.substr(0, colon);
......
......@@ -61,10 +61,10 @@ public:
bool read_sax( xml::sax * Reader);
virtual ~read_doc_element() = 0;
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name) = 0;
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name) = 0;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes ) = 0;
virtual void add_text(const std::wstring & Text) = 0;
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes ) = 0;
virtual void add_text (const std::wstring & Text) = 0;
};
......
......@@ -41,7 +41,7 @@ class sax;
template <class StringT>
class attributes;
typedef attributes< ::std::wstring > attributes_wc;
typedef attributes< std::wstring > attributes_wc;
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
}
......@@ -50,7 +50,7 @@ namespace common {
class write_doc_element {
public:
virtual ::std::wostream & write_stream( ::std::wostream & _Wostream ) = 0;
virtual std::wostream & write_stream( std::wostream & _Wostream ) = 0;
virtual ~write_doc_element() = 0;
};
......
......@@ -49,7 +49,7 @@ class sax
{
public:
struct error : virtual public ::std::exception
struct error : virtual public std::exception
{
public:
enum Code {
......
......@@ -50,19 +50,19 @@ public:
virtual const CharT * get_name() const = 0;
virtual NodeType get_xml_type() const = 0;
virtual ::std::basic_ostream<CharT> & text_to_stream(::std::basic_ostream<CharT> & _Wostream) const
virtual std::basic_ostream<CharT> & text_to_stream(std::basic_ostream<CharT> & _Wostream) const
{
return _Wostream;
}
virtual ::std::basic_ostream<CharT> & xml_to_stream(::std::basic_ostream<CharT> & _Wostream) const = 0;
virtual std::basic_ostream<CharT> & xml_to_stream(std::basic_ostream<CharT> & _Wostream) const = 0;
std::basic_string<CharT> text_to_string() const;
std::basic_string<CharT> xml_to_string() const;
virtual ~element() = 0;
// virtual const attributes< ::std::basic_string<CharT> > * get_attributes() const = 0;
// virtual const attributes< std::basic_string<CharT> > * get_attributes() const = 0;
};
template <class CharT>
......@@ -79,13 +79,13 @@ public:
virtual const CharT * get_ns() const { return Element::ns; }
virtual const CharT * get_name() const { return Element::name; }
virtual NodeType get_xml_type() const { return Element::xml_type; };
// virtual const attributes< ::std::basic_string<CharT> > * get_attributes() const = 0;
// virtual const attributes< std::basic_string<CharT> > * get_attributes() const = 0;
};
template <class CharT>
inline std::basic_string<CharT> element<CharT>::text_to_string() const
{
::std::basic_stringstream<CharT> strm;
std::basic_stringstream<CharT> strm;
text_to_stream(strm);
return strm.str();
}
......@@ -93,7 +93,7 @@ inline std::basic_string<CharT> element<CharT>::text_to_string() const
template <class CharT>
inline std::basic_string<CharT> element<CharT>::xml_to_string() const
{
::std::basic_stringstream<CharT> strm;
std::basic_stringstream<CharT> strm;
xml_to_stream(strm);
return strm.str();
}
......
......@@ -45,7 +45,7 @@ namespace oox {
const wchar_t * default_content_type::ns = L"";
const wchar_t * default_content_type::name = L"Default";
::std::wostream & default_content_type::xml_to_stream(::std::wostream & _Wostream) const
std::wostream & default_content_type::xml_to_stream(std::wostream & _Wostream) const
{
CP_XML_WRITER(_Wostream)
{
......@@ -61,7 +61,7 @@ const wchar_t * default_content_type::name = L"Default";
const wchar_t * override_content_type::ns = L"";
const wchar_t * override_content_type::name = L"Override";
::std::wostream & override_content_type::xml_to_stream(::std::wostream & _Wostream) const
std::wostream & override_content_type::xml_to_stream(std::wostream & _Wostream) const
{
CP_XML_WRITER(_Wostream)
{
......@@ -77,7 +77,7 @@ const wchar_t * override_content_type::name = L"Override";
const wchar_t * content_type_content::ns = L"";
const wchar_t * content_type_content::name = L"Types";
::std::wostream & content_type_content::xml_to_stream(::std::wostream & _Wostream) const
std::wostream & content_type_content::xml_to_stream(std::wostream & _Wostream) const
{
CP_XML_WRITER(_Wostream)
{
......
......@@ -51,7 +51,7 @@ public:
default_content_type(const std::wstring & Extension, const std::wstring & contentType) : extension_(Extension),
content_type_(contentType)
{}
::std::wostream & xml_to_stream(::std::wostream & _Wostream) const;
std::wostream & xml_to_stream(std::wostream & _Wostream) const;
const std::wstring & extension() const { return extension_; }
const std::wstring & content_type() const { return content_type_; }
......@@ -74,7 +74,7 @@ public:
override_content_type(const std::wstring & PartName, const std::wstring & contentType) : part_name_(PartName),
content_type_(contentType)
{}
::std::wostream & xml_to_stream(::std::wostream & _Wostream) const;
std::wostream & xml_to_stream(std::wostream & _Wostream) const;
const std::wstring & part_name() const { return part_name_; }
const std::wstring & content_type() const { return content_type_; }
......@@ -94,7 +94,7 @@ public:
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
::std::wostream & xml_to_stream(::std::wostream & _Wostream) const;
std::wostream & xml_to_stream(std::wostream & _Wostream) const;
void add_default(default_content_type const & _Ct)
{
......
......@@ -52,26 +52,94 @@
#include "../../DesktopEditor/fontengine/ApplicationFonts.h"
static int current_id_changes = 0;
namespace cpdoccore {
namespace oox {
text_tracked_context::text_tracked_context(docx_conversion_context & context) :
docx_context_(context)
{
current_state_.clear();
}
void text_tracked_context::start_changes_content()
{
docx_stream_ = docx_context_.get_stream_man();
changes_stream_.str((std::wstring(L"")));
docx_context_.set_stream_man( StreamsManPtr( new oox::streams_man(changes_stream_)));
bParaStateDocx_ = docx_context_.get_paragraph_state();
bRunStateDocx_ = docx_context_.get_run_state();
docx_context_.set_paragraph_state (false);
docx_context_.set_run_state (false);
docx_context_.set_delete_text_state (true);
}
void text_tracked_context::end_changes_content()
{
docx_context_.set_paragraph_state (bParaStateDocx_);
docx_context_.set_run_state (bRunStateDocx_);
docx_context_.set_delete_text_state (false);
current_state_.content = changes_stream_.str();
docx_context_.set_stream_man(docx_stream_);
}
void text_tracked_context::start_change (std::wstring id)
{
current_state_.clear();
current_state_.id = id;
}
void text_tracked_context::end_change ()
{
mapChanges_.insert( std::pair<std::wstring, _state>(current_state_.id, current_state_));
current_state_.clear();
}
void text_tracked_context::set_type(int type)
{
current_state_.type = type;
}
void text_tracked_context::set_user_info (std::wstring &author, std::wstring &date)
{
current_state_.author = author;
current_state_.date = date;
}
text_tracked_context::_state & text_tracked_context::get_tracked_change(std::wstring id)
{
std::map<std::wstring, _state>::iterator it = mapChanges_.find(id);
if (it != mapChanges_.end())
{
return it->second;
}
else
return current_state_; //empty
}
//----------------------------------------------------------------------------------------------------------------
docx_conversion_context::docx_conversion_context(odf_reader::odf_document * OdfDocument) :
mediaitems_ (OdfDocument->get_folder() ),
current_run_ (false),
next_dump_page_properties_(false),
page_break_after_ (false),
page_break_before_ (false),
next_dump_page_properties_(false),
in_run_ (false),
in_automatic_style_ (false),
in_paragraph_ (false),
in_header_ (false),
in_drawing_content_ (false),
text_tracked_context_ (*this),
table_context_ (*this),
output_document_ (NULL),
section_properties_in_table_(NULL),
process_note_ (noNote),
new_list_style_number_ (0),
rtl_ (false),
new_list_style_number_ (0),
is_rtl_ (false),
is_paragraph_keep_ (false),
is_delete_text_ (false),
delayed_converting_ (false),
process_headers_footers_(false),
process_comment_ (false),
......@@ -121,9 +189,9 @@ std::wstring styles_map::name(const std::wstring & Name, odf_types::style_family
}
void docx_conversion_context::add_element_to_run(std::wstring parenStyleId)
{
if (!current_run_)
if (!in_run_)
{
current_run_ = true;
in_run_ = true;
output_stream() << L"<w:r>";
if (!text_properties_stack_.empty() || parenStyleId.length() > 0)
......@@ -150,30 +218,35 @@ void docx_conversion_context::start_paragraph(bool is_header)
finish_paragraph();
output_stream() << L"<w:p>";
in_header_ = is_header;
in_paragraph_ = true;
rtl_ = false;
is_rtl_ = false;
start_changes();
}
void docx_conversion_context::finish_paragraph()
{
if (in_paragraph_)
{
end_changes();
output_stream() << L"</w:p>";
}
in_paragraph_ = false;
in_header_ = false;
in_paragraph_ = false;
in_header_ = false;
is_paragraph_keep_ = false;
}
void docx_conversion_context::finish_run()
{
if (current_run_)
if (in_run_)
{
output_stream() << L"</w:r>";
current_run_ = false;
in_run_ = false;
if (get_comments_context().state()==2)
{
output_stream()<< L"<w:commentRangeEnd w:id=\"" << get_comments_context().current_id() << L"\" />";
......@@ -1169,7 +1242,7 @@ void notes_context::dump_rels(rels & Rels) const
}
}
void docx_conversion_context::add_note_reference()
void docx_conversion_context::add_note_reference ()
{
if (process_note_ == footNote || process_note_ == endNote)
{
......@@ -1180,5 +1253,85 @@ void docx_conversion_context::add_note_reference()
}
}
typedef std::map<std::wstring, text_tracked_context::_state>::iterator map_changes_iterator;
void docx_conversion_context::start_text_changes (std::wstring id)
{
text_tracked_context::_state &state = text_tracked_context_.get_tracked_change(id);
if (state.id != id) return;
map_current_changes_.insert(std::pair<std::wstring, text_tracked_context::_state> (id, state));
if (in_paragraph_ && (state.type == 1 || state.type == 2))
{
finish_run();
if (state.type == 1) output_stream() << L"<w:ins";
if (state.type == 2) output_stream() << L"<w:del";
output_stream() << L" w:date=\"" << state.date << "\"";
output_stream() << L" w:author=\"" << state.author << "\"";
output_stream() << L" w:id=\"" << std::to_wstring(current_id_changes++) << "\"";
output_stream() << L">";
}
}
void docx_conversion_context::start_changes()
{
if (map_current_changes_.empty()) return;
for (map_changes_iterator it = map_current_changes_.begin(); it != map_current_changes_.end(); it++)
{
text_tracked_context::_state &state = it->second;
if (state.type == 3) continue; //format change ... todooo
if (state.type == 0) continue; //unknown change ... todooo
if (state.type == 1) output_stream() << L"<w:ins";
if (state.type == 2) output_stream() << L"<w:del";
output_stream() << L" w:date=\"" << state.date << "\"";
output_stream() << L" w:author=\"" << state.author << "\"";
output_stream() << L" w:id=\"" << std::to_wstring(current_id_changes++) << "\"";
output_stream() << L">";
if (state.type == 2) output_stream() << state.content;
}
}
void docx_conversion_context::end_changes()
{
for (map_changes_iterator it = map_current_changes_.begin(); it != map_current_changes_.end(); it++)
{
text_tracked_context::_state &state = it->second;
if (state.type == 3) continue; //format change ... todooo
if (state.type == 0) continue; //unknown change ... todooo
if (state.type == 1) output_stream() << L"</w:ins>";
if (state.type == 2) output_stream() << L"</w:del>";
}
}
void docx_conversion_context::end_text_changes (std::wstring id)
{
if (map_current_changes_.empty()) return;
map_changes_iterator it = map_current_changes_.find(id);
if (it == map_current_changes_.end()) return;
if (in_paragraph_)
{
finish_run();
text_tracked_context::_state &state = it->second;
if (state.type == 1) output_stream() << L"</w:ins>";
if (state.type == 2) output_stream() << L"</w:del>";
}
map_current_changes_.erase(it);
}
}
}
/*
* (c) Copyright Ascensio System SIA 2010-2016
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#ifndef _CPDOCCORE_DOCX_CONVERSIONSTATE_H_
#define _CPDOCCORE_DOCX_CONVERSIONSTATE_H_
namespace cpdoccore {
namespace oox {
struct conversion_state
{
const odf_reader::style_instance * current_processed_style_;
std::list< const odf_reader::style_text_properties * > text_properties_stack_;
bool page_break_after_;
bool in_automatic_style_;
std::wstring current_page_properties_;
bool next_dump_page_properties_;
std::wstring text_list_style_name_;
std::list<std::wstring> list_style_stack_;
bool first_element_list_item_;
bool in_paragraph_;
std::list<odf_reader::office_element *> delayed_elements_;
odf_reader::office_element * section_properties_in_table_;
std::wstring current_master_page_name_;
bool rtl_; // right-to-left
};
}
}
#endif
......@@ -294,10 +294,11 @@ void oox_serialize_bodyPr(std::wostream & strm, _oox_drawing & val, const std::w
}
else if ((bFitToSize) && (*bFitToSize))
{
CP_XML_NODE(L"a:spAutoFit")
{
CP_XML_ATTR(L"lnSpcReduction", 10000);
}
CP_XML_NODE(L"a:noAutofit");
//CP_XML_NODE(L"a:spAutoFit")
//{
// CP_XML_ATTR(L"lnSpcReduction", 10000);
//}
}
//else CP_XML_ATTR(L"anchor", L"dist");break;
if (bWordArt)
......
......@@ -42,7 +42,7 @@ namespace oox {
const wchar_t * relationship::ns = L"";
const wchar_t * relationship::name = L"Relationship";
::std::wostream & relationship::xml_to_stream(::std::wostream & _Wostream) const
std::wostream & relationship::xml_to_stream(std::wostream & _Wostream) const
{
CP_XML_WRITER(_Wostream)
{
......@@ -74,7 +74,7 @@ const wchar_t * relationship::name = L"Relationship";
const wchar_t * rels::ns = L"";
const wchar_t * rels::name = L"Relationships";
::std::wostream & rels::xml_to_stream(::std::wostream & _Wostream) const
std::wostream & rels::xml_to_stream(std::wostream & _Wostream) const
{
CP_XML_WRITER(_Wostream)
{
......
......@@ -72,7 +72,7 @@ public:
const std::wstring & TargetMode = L"") : id_(Id), type_(Type), target_(Target), target_mode_(TargetMode)
{}
virtual ::std::wostream & xml_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & xml_to_stream(std::wostream & _Wostream) const;
const std::wstring & id() const { return id_; }
const std::wstring & type() const { return type_; }
......@@ -98,7 +98,7 @@ public:
static const xml::NodeType xml_type = xml::typeElement;
public:
virtual ::std::wostream & xml_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & xml_to_stream(std::wostream & _Wostream) const;
std::vector<relationship> & relationships() { return relationship_; }
void add(relationship const & r);
bool empty() { return relationship_.empty(); }
......
......@@ -60,36 +60,36 @@ public:
void add_text(const std::wstring & text);
void start_paragraph(const std::wstring & styleName);
void end_paragraph();
void end_paragraph ();
void start_span(const std::wstring & styleName);
void end_span();
std::wstring end_span2();
void start_span (const std::wstring & styleName);
void end_span ();
std::wstring end_span2 ();
void start_object();
std::wstring end_object();
void start_object();
std::wstring end_object ();
void start_base_style(const std::wstring baseStyleName, const odf_types::style_family::type baseStyleType);
void end_base_style();
void ApplyTextProperties(std::wstring style,odf_reader::text_format_properties_content & propertiesOut, odf_types::style_family::type Type);
void ApplyParagraphProperties(std::wstring style,odf_reader::paragraph_format_properties & propertiesOut, odf_types::style_family::type Type);
void ApplyListProperties(odf_reader::paragraph_format_properties & propertiesOut, int Level);
void ApplyTextProperties (std::wstring style,odf_reader::text_format_properties_content & propertiesOut, odf_types::style_family::type Type);
void ApplyParagraphProperties (std::wstring style,odf_reader::paragraph_format_properties & propertiesOut, odf_types::style_family::type Type);
void ApplyListProperties (odf_reader::paragraph_format_properties & propertiesOut, int Level);
void set_local_styles_container(odf_reader::styles_container* local_styles_);//это если стили объектов содержатся в другом документе
void end_hyperlink(std::wstring hId);
void end_hyperlink (std::wstring hId);
void start_hyperlink();
void start_list(const std::wstring & StyleName, bool Continue = false);
void end_list();
void start_list (const std::wstring & StyleName, bool Continue = false);
void end_list ();
void start_list_item(bool restart = false);
void end_list_item();
void end_list_item ();
void start_field(field_type type, const std::wstring & styleName);
void end_field();
void start_field (field_type type, const std::wstring & styleName);
void end_field ();
void start_comment();
void start_comment ();
std::wstring end_comment();
bool in_list_;
......@@ -131,7 +131,7 @@ private:
std::list<std::wstring> list_style_stack_;
bool first_element_list_item_;
// счетчик для нумерации имен созданных в процессе конвертации стилей
size_t new_list_style_number_;
int new_list_style_number_;
// цепочки переименований нумераций
boost::unordered_map<std::wstring, std::wstring> list_style_renames_;
......
......@@ -72,72 +72,72 @@ namespace package
class xlsx_conversion_context : boost::noncopyable
{
public:
xlsx_conversion_context(cpdoccore::odf_reader::odf_document * odfDocument);
xlsx_conversion_context (cpdoccore::odf_reader::odf_document * odfDocument);
~xlsx_conversion_context();
void set_output_document(package::xlsx_document * document);
void set_font_directory (std::wstring pathFonts);
void start_document();
void end_document();
void start_document ();
void end_document ();
void start_chart(std::wstring name);
void end_chart();
void end_chart ();
void start_body();
void end_body();
void start_body ();
void end_body ();
void start_office_spreadsheet(const odf_reader::office_element * elm);
void end_office_spreadsheet();
void start_office_spreadsheet (const odf_reader::office_element * elm);
void end_office_spreadsheet ();
const odf_reader::office_element * get_spreadsheet();
void start_paragraph(const std::wstring & styleName);
void end_paragraph();
void end_paragraph ();
void start_span(const std::wstring & styleName);
void end_span();
void start_span (const std::wstring & styleName);
void end_span ();
bool start_table(std::wstring tableName,std::wstring tableStyleName);
void end_table();
bool start_table (std::wstring tableName, std::wstring tableStyleName);
void end_table ();
void start_table_column(unsigned int repeated, const std::wstring & defaultCellStyleName, int & cMin, int & cMax);
void table_column_last_width(double w);
double table_column_last_width();
void end_table_column();
void start_table_column (unsigned int repeated, const std::wstring & defaultCellStyleName, int & cMin, int & cMax);
void table_column_last_width (double w);
double table_column_last_width ();
void end_table_column ();
void set_table_row_group(int count, bool collapsed, int level);
void start_table_row(const std::wstring & styleName, const std::wstring & defaultCellStyleName);
void non_empty_row();
void end_table_row();
bool is_empty_row();
void set_current_row_height(size_t height_pt);
void set_table_row_group (int count, bool collapsed, int level);
void start_table_row (const std::wstring & styleName, const std::wstring & defaultCellStyleName);
void non_empty_row ();
void end_table_row ();
bool is_empty_row ();
void set_current_row_height (size_t height_pt);
bool in_table_cell();
bool in_table_cell ();
void start_table_cell(const std::wstring & formula, size_t columnsSpanned, size_t rowsSpanned);
void end_table_cell();
void start_table_cell (const std::wstring & formula, size_t columnsSpanned, size_t rowsSpanned);
void end_table_cell ();
void set_current_cell_style_id(unsigned int xfId);
int get_current_cell_style_id();
void set_current_cell_style_id (unsigned int xfId);
int get_current_cell_style_id ();
void start_table_covered_cell();
void end_table_covered_cell();
void start_table_covered_cell ();
void end_table_covered_cell ();
int current_table_column();
int current_table_row();
void start_hyperlink(const std::wstring & styleName);
void end_hyperlink(std::wstring const & href);
int current_table_column ();
int current_table_row ();
std::wstring current_cell_address();
void start_hyperlink (const std::wstring & styleName);
void end_hyperlink (std::wstring const & href);
//------------------------------------------------------------------------------------
void start_conditional_format (std::wstring ref);
void end_conditional_format (){}
void start_conditional_format_rule (int type);
void end_conditional_format_rule (){}
void end_conditional_format_rule () {}
void set_conditional_format_formula (std::wstring f);
void set_conditional_format_dxf (int dxfId);
......
......@@ -44,7 +44,7 @@ namespace odf_reader {
const wchar_t * abstract_xml::ns = L"";
const wchar_t * abstract_xml::name = L"abstract-xml";
::std::wostream & abstract_xml::text_to_stream(::std::wostream & _Wostream) const
std::wostream & abstract_xml::text_to_stream(std::wostream & _Wostream) const
{
BOOST_FOREACH(const office_element_ptr & element, xml_content_)
{
......@@ -53,7 +53,7 @@ const wchar_t * abstract_xml::name = L"abstract-xml";
return _Wostream;
}
::std::wostream & abstract_xml::xml_to_stream(::std::wostream & _Wostream) const
std::wostream & abstract_xml::xml_to_stream(std::wostream & _Wostream) const
{
BOOST_FOREACH(const office_element_ptr & element, xml_content_)
{
......@@ -66,7 +66,7 @@ void abstract_xml::add_attributes( const xml::attributes_wc_ptr & )
{
}
void abstract_xml::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void abstract_xml::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(xml_content_);
}
......
......@@ -47,15 +47,15 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual ::std::wostream & xml_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
virtual std::wostream & xml_to_stream(std::wostream & _Wostream) const;
public:
abstract_xml() {};
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
private:
......
......@@ -86,7 +86,7 @@ void anim_par::pptx_convert(oox::pptx_conversion_context & Context)
elm->pptx_convert(Context);
}
}
void anim_par::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void anim_par::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"anim", L"par")
CP_CREATE_ELEMENT(anim_par_);
......@@ -111,7 +111,7 @@ void anim_seq::pptx_convert(oox::pptx_conversion_context & Context)
elm->pptx_convert(Context);
}
}
void anim_seq::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void anim_seq::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"anim", L"par")
CP_CREATE_ELEMENT(anim_par_array_);
......
......@@ -64,7 +64,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
};
CP_REGISTER_OFFICE_ELEMENT2(anim_par);
......@@ -85,7 +85,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
};
......@@ -128,7 +128,7 @@ public:
private:
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name){}
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
......
......@@ -86,7 +86,7 @@ const wchar_t * calcext_conditional_formats::name = L"conditional-formats";
void calcext_conditional_formats::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void calcext_conditional_formats::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void calcext_conditional_formats::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -107,7 +107,7 @@ void calcext_conditional_format::add_attributes( const xml::attributes_wc_ptr &
{
CP_APPLY_ATTR(L"calcext:target-range-address", calcext_target_range_address_);
}
void calcext_conditional_format::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void calcext_conditional_format::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -135,7 +135,7 @@ void calcext_data_bar::add_attributes( const xml::attributes_wc_ptr & Attributes
calcext_data_bar_attr_.add_attributes(Attributes);
}
void calcext_data_bar::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void calcext_data_bar::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -164,7 +164,7 @@ const wchar_t * calcext_color_scale::name = L"color-scale";
void calcext_color_scale::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void calcext_color_scale::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void calcext_color_scale::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -187,7 +187,7 @@ void calcext_icon_set::add_attributes( const xml::attributes_wc_ptr & Attributes
CP_APPLY_ATTR(L"calcext:show-value", calcext_show_value_);
calcext_icon_set_attr_.add_attributes(Attributes);
}
void calcext_icon_set::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void calcext_icon_set::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -214,7 +214,7 @@ void calcext_formatting_entry::add_attributes( const xml::attributes_wc_ptr & At
CP_APPLY_ATTR(L"calcext:value", calcext_value_);
CP_APPLY_ATTR(L"calcext:type", calcext_type_);
}
void calcext_formatting_entry::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void calcext_formatting_entry::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -232,7 +232,7 @@ const wchar_t * calcext_color_scale_entry::name = L"color_scale_entry";
void calcext_color_scale_entry::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void calcext_color_scale_entry::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void calcext_color_scale_entry::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -255,7 +255,7 @@ void calcext_condition::add_attributes( const xml::attributes_wc_ptr & Attribute
{
calcext_condition_attr_.add_attributes(Attributes);
}
void calcext_condition::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void calcext_condition::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -293,7 +293,7 @@ void calcext_date_is::add_attributes( const xml::attributes_wc_ptr & Attributes
{
calcext_date_is_attr_.add_attributes(Attributes);
}
void calcext_date_is::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void calcext_date_is::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......
......@@ -103,7 +103,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE()
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
......@@ -125,7 +125,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE()
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
......@@ -146,7 +146,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE()
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
......@@ -168,7 +168,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE()
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
......@@ -189,7 +189,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE()
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
......@@ -208,7 +208,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE()
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
......@@ -227,7 +227,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE()
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
......@@ -246,7 +246,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE()
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
......@@ -268,7 +268,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE()
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
......
......@@ -203,16 +203,16 @@ void object_odf_context::docx_convert(oox::docx_conversion_context & Context)
}
else if (object_type_ == 3 && office_math_)
{
oox::docx_conversion_context::StreamsManPtr prev = Context.get_stream_man();
oox::StreamsManPtr prev = Context.get_stream_man();
std::wstringstream temp_stream(Context.get_drawing_context().get_text_stream_frame());
Context.set_stream_man( boost::shared_ptr<oox::streams_man>( new oox::streams_man(temp_stream) ));
bool runState = Context.get_run_state();
Context.set_run_state(false);
bool pState = Context.get_paragraph_state ();
bool runState = Context.get_run_state ();
bool pState = Context.get_paragraph_state();
Context.set_paragraph_state(false);
Context.set_paragraph_state (false);
Context.set_run_state (false);
Context.start_math_formula();
Context.get_math_context().base_font_size_ = baseFontHeight_;
......
......@@ -42,8 +42,8 @@ namespace odf_reader {
class document_context;
bool create_element_and_read(xml::sax * Reader,
const ::std::wstring & Ns,
const ::std::wstring & Name,
const std::wstring & Ns,
const std::wstring & Name,
office_element_ptr & _Element,
document_context * Context,
bool isRoot)
......@@ -71,8 +71,8 @@ bool create_element_and_read(xml::sax * Reader,
}
bool create_element_and_read(xml::sax * Reader,
const ::std::wstring & Ns,
const ::std::wstring & Name,
const std::wstring & Ns,
const std::wstring & Name,
office_element_ptr_array & _Elements,
document_context * Context,
bool isRoot)
......
......@@ -44,7 +44,7 @@ public:
{
}
style_ref(const ::std::wstring & StyleName) : style_name_(StyleName)
style_ref(const std::wstring & StyleName) : style_name_(StyleName)
{
}
......@@ -53,24 +53,24 @@ public:
return style_name_.empty();
}
const ::std::wstring & style_name() const
const std::wstring & style_name() const
{
return style_name_;
}
::std::wstring & style_name()
std::wstring & style_name()
{
return style_name_;
}
private:
::std::wstring style_name_;
std::wstring style_name_;
};
std::wostream & operator << (std::wostream & _Wostream, const style_ref & _styleReft);
typedef ::std::vector<style_ref> style_ref_array;
typedef std::vector<style_ref> style_ref_array;
inline std::wistream & operator >> (std::wistream & _Istream, style_ref & _styleRef)
{
......
......@@ -29,12 +29,8 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#ifndef _CPDOCCORE_ODF_TARGETFRAMENAME_H_
#define _CPDOCCORE_ODF_TARGETFRAMENAME_H_
#ifdef _MSC_VER
#pragma once
#endif
#include <iosfwd>
#include <string>
......@@ -68,7 +64,7 @@ public:
target_frame_name(const std::wstring & _Name) : type_(String), name_(_Name)
{}
const ::std::wstring & get_name() const
const std::wstring & get_name() const
{
return name_;
}
......@@ -82,7 +78,7 @@ public:
private:
type type_;
::std::wstring name_;
std::wstring name_;
};
std::wostream & operator << (std::wostream & _Wostream, const target_frame_name & _Val);
......@@ -94,4 +90,3 @@ APPLY_PARSE_XML_ATTRIBUTES(odf_types::target_frame_name);
}
#endif
......@@ -511,7 +511,7 @@ const wchar_t * draw_a::ns = L"draw";
const wchar_t * draw_a::name = L"a";
/////////////////////////////////////////////////////////////////////////////////////////////////////////
/// draw-a-attlist
void draw_a::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void draw_a::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......
......@@ -89,7 +89,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void docx_convert(oox::docx_conversion_context & Context);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
......
......@@ -85,7 +85,7 @@ void draw_chart_attlist::add_attributes( const xml::attributes_wc_ptr & Attribut
const wchar_t * draw_image::ns = L"draw";
const wchar_t * draw_image::name = L"image";
::std::wostream & draw_image::text_to_stream(::std::wostream & _Wostream) const
std::wostream & draw_image::text_to_stream(std::wostream & _Wostream) const
{
return _Wostream;
}
......@@ -96,7 +96,7 @@ void draw_image::add_attributes( const xml::attributes_wc_ptr & Attributes )
common_xlink_attlist_.add_attributes(Attributes);
}
void draw_image::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void draw_image::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"office", L"binary-data")
{
......@@ -114,7 +114,7 @@ void draw_image::add_child_element( xml::sax * Reader, const ::std::wstring & Ns
const wchar_t * draw_chart::ns = L"draw";
const wchar_t * draw_chart::name = L"chart";
::std::wostream & draw_chart::text_to_stream(::std::wostream & _Wostream) const
std::wostream & draw_chart::text_to_stream(std::wostream & _Wostream) const
{
return _Wostream;
}
......@@ -125,7 +125,7 @@ void draw_chart::add_attributes( const xml::attributes_wc_ptr & Attributes )
common_xlink_attlist_.add_attributes(Attributes);
}
void draw_chart::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void draw_chart::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
//if CP_CHECK_NAME(L"office", L"title")
//{
......@@ -150,7 +150,7 @@ void draw_g::add_attributes( const xml::attributes_wc_ptr & Attributes )
draw_g_attlist_.add_attributes(Attributes);
}
void draw_g::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void draw_g::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -159,7 +159,7 @@ void draw_g::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, co
const wchar_t * draw_frame::ns = L"draw";
const wchar_t * draw_frame::name = L"frame";
::std::wostream & draw_frame::text_to_stream(::std::wostream & _Wostream) const
std::wostream & draw_frame::text_to_stream(std::wostream & _Wostream) const
{
CP_SERIALIZE_TEXT(content_);
return _Wostream;
......@@ -180,7 +180,7 @@ void draw_frame::add_attributes( const xml::attributes_wc_ptr & Attributes )
draw_frame_attlist_.add_attributes(Attributes);
}
void draw_frame::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void draw_frame::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (CP_CHECK_NAME(L"draw", L"text-box") ||
CP_CHECK_NAME(L"draw", L"image") ||//копия объекта в виде картинки ну.. или просто картинка
......@@ -235,7 +235,7 @@ void draw_text_box_attlist::add_attributes( const xml::attributes_wc_ptr & Attri
const wchar_t * draw_text_box::ns = L"draw";
const wchar_t * draw_text_box::name = L"text-box";
::std::wostream & draw_text_box::text_to_stream(::std::wostream & _Wostream) const
std::wostream & draw_text_box::text_to_stream(std::wostream & _Wostream) const
{
CP_SERIALIZE_TEXT(content_);
return _Wostream;
......@@ -246,7 +246,7 @@ void draw_text_box::add_attributes( const xml::attributes_wc_ptr & Attributes )
draw_text_box_attlist_.add_attributes(Attributes);
}
void draw_text_box::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void draw_text_box::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -266,7 +266,7 @@ void draw_object::add_attributes( const xml::attributes_wc_ptr & Attributes )
common_xlink_attlist_.add_attributes(Attributes);
}
void draw_object::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void draw_object::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM(); // TODO
}
......@@ -283,7 +283,7 @@ void draw_object_ole::add_attributes( const xml::attributes_wc_ptr & Attributes
common_xlink_attlist_.add_attributes(Attributes);
}
void draw_object_ole::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void draw_object_ole::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......
......@@ -69,10 +69,10 @@ public:
virtual void pptx_convert(oox::pptx_conversion_context & Context);
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
private:
draw_image_attlist draw_image_attlist_;
......@@ -111,10 +111,10 @@ public:
virtual void pptx_convert(oox::pptx_conversion_context & Context);
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
private:
draw_chart_attlist draw_chart_attlist_;
......@@ -156,11 +156,11 @@ public:
virtual void pptx_convert_placeHolder(oox::pptx_conversion_context & Context);
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
int idx_in_owner ;
......@@ -214,7 +214,7 @@ public:
public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
odf_types::union_common_draw_attlists common_draw_attlists_;
......@@ -254,10 +254,10 @@ public:
virtual void pptx_convert(oox::pptx_conversion_context & Context);
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
public:
......@@ -295,7 +295,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
draw_object_attlist draw_object_attlist_;
......@@ -320,7 +320,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
odf_types::common_xlink_attlist common_xlink_attlist_;
......
......@@ -74,7 +74,7 @@ void draw_page_attr::add_attributes( const xml::attributes_wc_ptr & Attributes )
const wchar_t * draw_page::ns = L"draw";
const wchar_t * draw_page::name = L"page";
void draw_page::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void draw_page::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"anim", L"par")
CP_CREATE_ELEMENT(animation_);
......
......@@ -77,7 +77,7 @@ private:
void pptx_convert_placeHolder(oox::pptx_conversion_context & Context, std::wstring styleName, odf_types::presentation_class::type PresentationClass);
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
private:
office_element_ptr_array content_;
......@@ -106,7 +106,7 @@ public:
private:
virtual void add_text(const std::wstring & Text);
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name){}
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
};
......@@ -133,7 +133,7 @@ public:
private:
virtual void add_text(const std::wstring & Text);
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name){}
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
};
......
......@@ -68,7 +68,7 @@ void draw_shape_attlist::add_attributes( const xml::attributes_wc_ptr & Attribut
{
}
void draw_shape::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void draw_shape::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -449,7 +449,7 @@ void draw_enhanced_geometry::add_attributes( const xml::attributes_wc_ptr & Attr
typedef shared_ptr<draw_handle> draw_handle_ptr;
void draw_enhanced_geometry::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void draw_enhanced_geometry::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"draw", L"handle")
{
......
......@@ -76,7 +76,7 @@ void draw_shape::common_docx_convert(oox::docx_conversion_context & Context)
//////////////////////////////на другом контексте
//тут может быть не только текст , но и таблицы, другие объекты ...
oox::docx_conversion_context::StreamsManPtr prev = Context.get_stream_man();
oox::StreamsManPtr prev = Context.get_stream_man();
std::wstringstream temp_stream(Context.get_drawing_context().get_text_stream_shape());
Context.set_stream_man( boost::shared_ptr<oox::streams_man>( new oox::streams_man(temp_stream) ));
......@@ -93,9 +93,9 @@ void draw_shape::common_docx_convert(oox::docx_conversion_context & Context)
}
bool pParaState = Context.get_paragraph_state();
bool pRunState = Context.get_run_state();
Context.set_paragraph_state(false);
Context.set_run_state(false);
bool pRunState = Context.get_run_state();
Context.set_paragraph_state (false);
Context.set_run_state (false);
BOOST_FOREACH(const office_element_ptr & elm, content_)
{
......
......@@ -47,7 +47,7 @@ namespace odf_reader {
const wchar_t * svg_font_face_uri::ns = L"svg";
const wchar_t * svg_font_face_uri::name = L"font-face-uri";
::std::wostream & svg_font_face_uri::text_to_stream(::std::wostream & _Wostream) const
std::wostream & svg_font_face_uri::text_to_stream(std::wostream & _Wostream) const
{
return _Wostream;
}
......@@ -57,7 +57,7 @@ void svg_font_face_uri::add_attributes( const xml::attributes_wc_ptr & Attribute
common_svg_font_face_xlink_attlist_.add_attributes(Attributes);
}
void svg_font_face_uri::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void svg_font_face_uri::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (L"svg" == Ns && L"font-face-format" == Name)
{
......@@ -75,7 +75,7 @@ void svg_font_face_uri::add_text(const std::wstring & Text)
const wchar_t * svg_font_face_format::ns = L"svg";
const wchar_t * svg_font_face_format::name = L"font-face-format";
::std::wostream & svg_font_face_format::text_to_stream(::std::wostream & _Wostream) const
std::wostream & svg_font_face_format::text_to_stream(std::wostream & _Wostream) const
{
return _Wostream;
}
......@@ -85,7 +85,7 @@ void svg_font_face_format::add_attributes( const xml::attributes_wc_ptr & Attrib
CP_APPLY_ATTR(L"svg:string", svg_string_);
}
void svg_font_face_format::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void svg_font_face_format::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -98,7 +98,7 @@ void svg_font_face_format::add_text(const std::wstring & Text)
const wchar_t * svg_font_face_name::ns = L"svg";
const wchar_t * svg_font_face_name::name = L"font-face-name";
::std::wostream & svg_font_face_name::text_to_stream(::std::wostream & _Wostream) const
std::wostream & svg_font_face_name::text_to_stream(std::wostream & _Wostream) const
{
return _Wostream;
}
......@@ -108,7 +108,7 @@ void svg_font_face_name::add_attributes( const xml::attributes_wc_ptr & Attribut
CP_APPLY_ATTR(L"name", name_);
}
void svg_font_face_name::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void svg_font_face_name::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -134,7 +134,7 @@ void svg_definition_src::add_attributes( const xml::attributes_wc_ptr & Attribut
common_svg_font_face_xlink_attlist_.add_attributes(Attributes);
}
void svg_definition_src::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void svg_definition_src::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -188,7 +188,7 @@ void style_font_face::add_attributes( const xml::attributes_wc_ptr & Attributes
}
void style_font_face::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_font_face::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (L"svg" == Ns && L"font-face-uri" == Name)
CP_CREATE_ELEMENT(svg_font_face_uri_);
......@@ -223,7 +223,7 @@ const wchar_t * office_font_face_decls::name = L"font-face-decls";
void office_font_face_decls::add_attributes( const xml::attributes_wc_ptr & Attributes )
{}
void office_font_face_decls::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void office_font_face_decls::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (L"style" == Ns && L"font-face" == Name)
{
......
......@@ -70,14 +70,14 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
common_svg_font_face_xlink_attlist common_svg_font_face_xlink_attlist_;
office_element_ptr_array svg_font_face_format_;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
};
......@@ -91,13 +91,13 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
optional<std::wstring>::Type svg_string_;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
};
......@@ -114,12 +114,12 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
optional<std::wstring>::Type name_;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
};
......@@ -140,7 +140,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
};
CP_REGISTER_OFFICE_ELEMENT2(svg_definition_src);
......@@ -161,7 +161,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
......@@ -233,7 +233,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
};
CP_REGISTER_OFFICE_ELEMENT2(office_font_face_decls);
......
......@@ -67,7 +67,7 @@ void style_header_footer_properties::add_attributes( const xml::attributes_wc_pt
style_header_footer_properties_attlist_.add_attributes(Attributes);
}
void style_header_footer_properties::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_header_footer_properties::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (L"style" == Ns && L"background-image" == Name)
{
......@@ -87,15 +87,20 @@ void common_style_header_footer_attlist::add_attributes( const xml::attributes_w
}
// header-footer-content
::std::wostream & header_footer_content::text_to_stream(::std::wostream & _Wostream) const
std::wostream & header_footer_content::text_to_stream(std::wostream & _Wostream) const
{
serialize_elements_text(_Wostream, content_);
return _Wostream;
}
void header_footer_content::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name, document_context * Context)
void header_footer_content::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context)
{
CP_CREATE_ELEMENT_SIMPLE(content_);
if CP_CHECK_NAME(L"text", L"tracked-changes")
{
CP_CREATE_ELEMENT_SIMPLE(tracked_changes_);
}
else
CP_CREATE_ELEMENT_SIMPLE(content_);
}
}
......
......@@ -64,7 +64,7 @@ public:
};
// style:header-footer-properties
// style:header-footer-properties
class style_header_footer_properties : public office_element_impl<style_header_footer_properties>
{
public:
......@@ -77,7 +77,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
style_header_footer_properties_attlist style_header_footer_properties_attlist_;
office_element_ptr style_background_image_;
......@@ -100,11 +100,11 @@ private:
class header_footer_content
{
public:
::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name, document_context * Context);
std::wostream & text_to_stream(std::wostream & _Wostream) const;
void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context);
public:
office_element_ptr_array content_;
office_element_ptr tracked_changes_;
office_element_ptr_array content_;
};
......
......@@ -50,7 +50,7 @@ namespace text {
const wchar_t * number::ns = L"text";
const wchar_t * number::name = L"number";
::std::wostream & number::text_to_stream(::std::wostream & _Wostream) const
std::wostream & number::text_to_stream(std::wostream & _Wostream) const
{
_Wostream << xml::utils::replace_xml_to_text( string_ );
return _Wostream;
......@@ -66,7 +66,7 @@ void number::add_text(const std::wstring & Text)
const wchar_t * list_item::ns = L"text";
const wchar_t * list_item::name = L"list-item";
::std::wostream & list_item::text_to_stream(::std::wostream & _Wostream) const
std::wostream & list_item::text_to_stream(std::wostream & _Wostream) const
{
// TODO!!!!
BOOST_FOREACH(const office_element_ptr & parElement, content_)
......@@ -81,7 +81,7 @@ void list_item::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"text:start-value", text_start_value_);
}
void list_item::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void list_item::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"text", L"number")
{
......@@ -164,7 +164,7 @@ void list_header::pptx_convert(oox::pptx_conversion_context & Context)
}
::std::wostream & list_header::text_to_stream(::std::wostream & _Wostream) const
std::wostream & list_header::text_to_stream(std::wostream & _Wostream) const
{
// TODO!!!!
BOOST_FOREACH(const office_element_ptr & parElement, content_)
......@@ -179,7 +179,7 @@ void list_header::add_attributes( const xml::attributes_wc_ptr & Attributes )
}
void list_header::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void list_header::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"text", L"number")
{
......
......@@ -52,18 +52,18 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
public:
number() {}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes ) {};
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name) {} ;
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name) {} ;
virtual void add_text(const std::wstring & Text);
private:
::std::wstring string_;
std::wstring string_;
};
......@@ -75,7 +75,7 @@ CP_REGISTER_OFFICE_ELEMENT2(number);
class list_item;
typedef shared_ptr<list_item>::Type list_item_ptr;
typedef ::std::vector<list_item_ptr> list_item_ptr_array;
typedef std::vector<list_item_ptr> list_item_ptr_array;
class list_item : public office_element_impl<list_item>
{
......@@ -90,13 +90,13 @@ public:
void pptx_convert(oox::pptx_conversion_context & Context);
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
public:
list_item() {}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text) {} ;
private:
......@@ -128,14 +128,14 @@ public:
void pptx_convert(oox::pptx_conversion_context & Context);
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
public:
list_header() {}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text) {} ;
private:
......
......@@ -50,7 +50,7 @@ namespace text {
const wchar_t * note_citation::ns = L"text";
const wchar_t * note_citation::name = L"note-citation";
::std::wostream & note_citation::text_to_stream(::std::wostream & _Wostream) const
std::wostream & note_citation::text_to_stream(std::wostream & _Wostream) const
{
if (!text_label_.empty())
_Wostream << text_label_;
......@@ -67,7 +67,7 @@ void note_citation::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"text:label", text_label_, std::wstring(L""));
}
void note_citation::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void note_citation::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -91,7 +91,7 @@ void note_citation::docx_convert(oox::docx_conversion_context & Context)
const wchar_t * note_body::ns = L"text";
const wchar_t * note_body::name = L"note-body";
::std::wostream & note_body::text_to_stream(::std::wostream & _Wostream) const
std::wostream & note_body::text_to_stream(std::wostream & _Wostream) const
{
BOOST_FOREACH(const office_element_ptr & element, content_)
{
......@@ -104,7 +104,7 @@ void note_body::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void note_body::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void note_body::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -117,24 +117,25 @@ void note_body::add_text(const std::wstring & Text)
void note_body::docx_convert(oox::docx_conversion_context & Context)
{
oox::docx_conversion_context::StreamsManPtr prev = Context.get_stream_man();
oox::StreamsManPtr prev = Context.get_stream_man();
boost::shared_ptr<std::wstringstream> newXml( new std::wstringstream() );
Context.set_stream_man( boost::shared_ptr<oox::streams_man>( new oox::streams_man(*newXml) ) );
Context.set_process_headers_footers(true);
bool runState = Context.get_run_state();
Context.set_run_state(false);
bool pState = Context.get_paragraph_state ();
bool runState = Context.get_run_state ();
bool pState = Context.get_paragraph_state();
Context.set_paragraph_state(false);
Context.set_paragraph_state (false);
Context.set_run_state (false);
BOOST_FOREACH(const office_element_ptr & elm, content_)
{
elm->docx_convert(Context);
}
Context.set_process_headers_footers(false);
Context.set_run_state(runState);
Context.set_paragraph_state(pState);
Context.set_process_headers_footers (false);
Context.set_run_state (runState);
Context.set_paragraph_state (pState);
const std::wstring & dbgStr = newXml->str();
Context.get_notes_context().add(dbgStr, Context.get_notes_context().next_id() );
......
......@@ -53,18 +53,18 @@ public:
virtual void docx_convert(oox::docx_conversion_context & Context) ;
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
public:
note_citation() {}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
private:
::std::wstring text_label_;
std::wstring text_label_;
office_element_ptr_array content_;
};
......@@ -84,13 +84,13 @@ public:
virtual void docx_convert(oox::docx_conversion_context & Context) ;
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
public:
note_body() {}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
private:
......
......@@ -176,7 +176,7 @@ void number_time_style::add_attributes( const xml::attributes_wc_ptr & Attribute
number_style_base::add_attributes(Attributes);
}
void number_style_base::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_style_base::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"style", L"text-properties")
{
......@@ -208,7 +208,7 @@ void number_text::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void number_text::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_text::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -229,7 +229,7 @@ void number_embedded_text::add_attributes( const xml::attributes_wc_ptr & Attrib
CP_APPLY_ATTR(L"number:position", number_position_);
}
void number_embedded_text::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_embedded_text::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -258,7 +258,7 @@ void number_number::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"number:grouping", number_grouping_);
}
void number_number::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_number::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"number", L"embedded-text")
{
......@@ -286,7 +286,7 @@ void number_scientific_number::add_attributes( const xml::attributes_wc_ptr & At
CP_APPLY_ATTR(L"number:grouping", number_grouping_);
}
void number_scientific_number::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_scientific_number::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -302,7 +302,7 @@ void number_currency_symbol::add_attributes( const xml::attributes_wc_ptr & Attr
CP_APPLY_ATTR(L"number:country", number_country_);
}
void number_currency_symbol::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_currency_symbol::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -338,7 +338,7 @@ void number_text_content::add_attributes( const xml::attributes_wc_ptr & Attribu
{
}
void number_text_content::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_text_content::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -434,7 +434,7 @@ void number_day::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"number:calendar", number_calendar_);
}
void number_day::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_day::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -466,7 +466,7 @@ void number_day_of_week::add_attributes( const xml::attributes_wc_ptr & Attribut
CP_APPLY_ATTR(L"number:calendar", number_calendar_);
}
void number_day_of_week::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_day_of_week::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -498,7 +498,7 @@ void number_quarter::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"number:calendar", number_calendar_);
}
void number_quarter::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_quarter::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -535,7 +535,7 @@ void number_month::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"number:calendar", number_calendar_);
}
void number_month::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_month::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -580,7 +580,7 @@ void number_year::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"number:calendar", number_calendar_);
}
void number_year::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_year::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -621,7 +621,7 @@ void number_hours::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"number:calendar", number_calendar_);
}
void number_hours::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_hours::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -654,7 +654,7 @@ void number_minutes::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"number:calendar", number_calendar_);
}
void number_minutes::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_minutes::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -687,7 +687,7 @@ void number_seconds::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"number:calendar", number_calendar_);
}
void number_seconds::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_seconds::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -723,7 +723,7 @@ void number_am_pm::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void number_am_pm::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_am_pm::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -751,7 +751,7 @@ void number_fraction::add_attributes( const xml::attributes_wc_ptr & Attributes
CP_APPLY_ATTR(L"number:min-denominator-digits", number_min_denominator_digits_);
}
void number_fraction::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void number_fraction::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......
......@@ -59,7 +59,7 @@ public:
private:
virtual void add_text(const std::wstring &);
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
odf_types::common_data_style_attlist common_data_style_attlist_;
......@@ -187,7 +187,7 @@ public:
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes ) = 0;
virtual void add_text (const std::wstring &) = 0;
virtual void add_child_element ( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name) = 0;
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name) = 0;
};
......@@ -208,7 +208,7 @@ public:
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text (const std::wstring & Text);
office_element_ptr_array text_;
......@@ -233,7 +233,7 @@ public:
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text (const std::wstring & Text);
// number-number-attlist
......@@ -270,7 +270,7 @@ public:
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text (const std::wstring & Text);
_CP_OPT(int) number_position_;
......@@ -296,7 +296,7 @@ public:
virtual void oox_convert(oox::num_format_context & Context);
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text (const std::wstring & Text);
private:
......@@ -331,7 +331,7 @@ public:
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text (const std::wstring & Text);
_CP_OPT(std::wstring) number_language_;
......@@ -360,7 +360,7 @@ public:
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text (const std::wstring & Text);
office_element_ptr_array text_;
......@@ -386,7 +386,7 @@ public:
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text (const std::wstring & Text);
_CP_OPT(std::wstring) number_style_;
......@@ -413,7 +413,7 @@ public:
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text (const std::wstring & Text);
_CP_OPT(std::wstring) number_style_;
......@@ -440,7 +440,7 @@ public:
virtual void oox_convert(oox::num_format_context & Context);
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
_CP_OPT(std::wstring) number_style_;
......@@ -466,7 +466,7 @@ public:
virtual void oox_convert(oox::num_format_context & Context);
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text (const std::wstring & Text);
_CP_OPT(bool) number_textual_;
......@@ -495,7 +495,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
_CP_OPT(std::wstring) number_style_;
......@@ -520,7 +520,7 @@ public:
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text (const std::wstring & Text);
public:
......@@ -550,7 +550,7 @@ public:
virtual void oox_convert(oox::num_format_context & Context);
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text (const std::wstring & Text);
_CP_OPT(std::wstring) number_style_;
......@@ -577,7 +577,7 @@ public:
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text (const std::wstring & Text);
_CP_OPT(std::wstring) number_style_;
......@@ -605,7 +605,7 @@ public:
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text (const std::wstring & Text);
};
......@@ -628,7 +628,7 @@ public:
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text (const std::wstring & Text);
_CP_OPT(int) number_min_integer_digits_;
......
......@@ -62,7 +62,7 @@ void content_xml_t::pptx_convert(oox::pptx_conversion_context & Context)
void content_xml_t::add_attributes( const xml::attributes_wc_ptr & Attributes )
{}
void content_xml_t::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void content_xml_t::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"office", L"document-content")
{
......
......@@ -60,7 +60,7 @@ public:
void xlsx_convert(oox::xlsx_conversion_context & Context);
void pptx_convert(oox::pptx_conversion_context & Context);
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_text(const std::wstring & Text);
......
......@@ -94,7 +94,7 @@ void office_annotation_attr::add_attributes( const xml::attributes_wc_ptr & Attr
const wchar_t * office_annotation::ns = L"office";
const wchar_t * office_annotation::name = L"annotation";
void office_annotation::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void office_annotation::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (Ns==L"dc" && Name == L"date")
{
......@@ -130,7 +130,7 @@ void office_annotation::docx_convert(oox::docx_conversion_context & Context)
////////////////////////////////////////
Context.start_comment();
oox::docx_conversion_context::StreamsManPtr prev = Context.get_stream_man();
oox::StreamsManPtr prev = Context.get_stream_man();
std::wstringstream temp_stream(Context.get_drawing_context().get_text_stream_frame());
Context.set_stream_man( boost::shared_ptr<oox::streams_man>( new oox::streams_man(temp_stream) ));
......@@ -225,7 +225,7 @@ void office_annotation::xlsx_convert(oox::xlsx_conversion_context & Context)
const wchar_t * officeooo_annotation::ns = L"officeooo";
const wchar_t * officeooo_annotation::name = L"annotation";
void officeooo_annotation::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void officeooo_annotation::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (Ns==L"dc" && Name == L"date")
{
......
......@@ -80,7 +80,7 @@ public:
std::wstring content_;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes ){}
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name){}
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
};
CP_REGISTER_OFFICE_ELEMENT2(dc_date);
......@@ -103,7 +103,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes ){}
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name){}
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
};
CP_REGISTER_OFFICE_ELEMENT2(dc_creator);
......@@ -123,7 +123,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
private:
office_element_ptr_array content_;
......@@ -150,7 +150,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
private:
office_element_ptr_array content_;
......
......@@ -48,7 +48,7 @@ namespace odf_reader {
const wchar_t * office_binary_data::ns = L"office";
const wchar_t * office_binary_data::name = L"binary-data";
::std::wostream & office_binary_data::text_to_stream(::std::wostream & _Wostream) const
std::wostream & office_binary_data::text_to_stream(std::wostream & _Wostream) const
{
return _Wostream;
}
......@@ -57,7 +57,7 @@ void office_binary_data::add_attributes( const xml::attributes_wc_ptr & Attribut
{
}
void office_binary_data::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void office_binary_data::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
}
......
......@@ -54,11 +54,11 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
private:
......
......@@ -56,7 +56,7 @@ namespace odf_reader {
const wchar_t * office_body::ns = L"office";
const wchar_t * office_body::name = L"body";
::std::wostream & office_body::text_to_stream(::std::wostream & _Wostream) const
std::wostream & office_body::text_to_stream(std::wostream & _Wostream) const
{
if (content_)
content_->text_to_stream(_Wostream);
......@@ -71,7 +71,7 @@ void office_body::add_attributes( const xml::attributes_wc_ptr & Attributes )
}
void office_body::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void office_body::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......
......@@ -62,14 +62,14 @@ public:
virtual void pptx_convert(oox::pptx_conversion_context & Context);
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
public:
office_body();
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
public:
......
......@@ -48,7 +48,7 @@ namespace odf_reader {
const wchar_t * office_chart::ns = L"office";
const wchar_t * office_chart::name = L"chart";
void office_chart::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void office_chart::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -80,7 +80,7 @@ void chart_chart::add_attributes( const xml::attributes_wc_ptr & Attributes )
chart_chart_attlist_.add_attributes(Attributes);
}
void chart_chart::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_chart::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -102,7 +102,7 @@ void chart_title::add_attributes( const xml::attributes_wc_ptr & Attributes )
chart_title_attlist_.add_attributes(Attributes);
}
void chart_title::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_title::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"text", L"p")
{
......@@ -122,7 +122,7 @@ void chart_subtitle::add_attributes( const xml::attributes_wc_ptr & Attributes )
chart_title_attlist_.add_attributes(Attributes);
}
void chart_subtitle::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_subtitle::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"text", L"p")
{
......@@ -142,7 +142,7 @@ void chart_footer::add_attributes( const xml::attributes_wc_ptr & Attributes )
common_attlist_.add_attributes(Attributes);
}
void chart_footer::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_footer::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"text", L"p")
{
......@@ -162,7 +162,7 @@ void chart_legend::add_attributes( const xml::attributes_wc_ptr & Attributes )
chart_legend_attlist_.add_attributes(Attributes);
}
void chart_legend::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_legend::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -199,7 +199,7 @@ void chart_plot_area::add_attributes( const xml::attributes_wc_ptr & Attributes
chart_plot_area_attlist_.add_attributes(Attributes);
}
void chart_plot_area::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_plot_area::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -222,7 +222,7 @@ void chart_wall::add_attributes( const xml::attributes_wc_ptr & Attributes )
chart_wall_attlist_.add_attributes(Attributes);
}
void chart_wall::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_wall::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -237,7 +237,7 @@ void chart_floor::add_attributes( const xml::attributes_wc_ptr & Attributes )
common_attlist_.add_attributes(Attributes);
}
void chart_floor::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_floor::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -261,7 +261,7 @@ void chart_axis::add_attributes( const xml::attributes_wc_ptr & Attributes )
chart_axis_attlist_.add_attributes(Attributes);
}
void chart_axis::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_axis::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -284,7 +284,7 @@ void chart_grid::add_attributes( const xml::attributes_wc_ptr & Attributes )
chart_grid_attlist_.add_attributes(Attributes);
}
void chart_grid::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_grid::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -299,7 +299,7 @@ void chart_categories::add_attributes( const xml::attributes_wc_ptr & Attributes
CP_APPLY_ATTR(L"table:cell-range-address", table_cell_range_address_);
}
void chart_categories::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_categories::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -325,7 +325,7 @@ void chart_series::add_attributes( const xml::attributes_wc_ptr & Attributes )
chart_series_attlist_.add_attributes(Attributes);
}
void chart_series::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_series::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -340,7 +340,7 @@ void chart_domain::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"table:cell-range-address", table_cell_range_address_);
}
void chart_domain::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_domain::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -363,7 +363,7 @@ void chart_data_point::add_attributes( const xml::attributes_wc_ptr & Attributes
chart_data_point_attlist_.add_attributes(Attributes);
}
void chart_data_point::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_data_point::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -379,7 +379,7 @@ void chart_mean_value::add_attributes( const xml::attributes_wc_ptr & Attributes
common_attlist_.add_attributes(Attributes);
}
void chart_mean_value::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_mean_value::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -394,7 +394,7 @@ void chart_error_indicator::add_attributes( const xml::attributes_wc_ptr & Attri
common_attlist_.add_attributes(Attributes);
}
void chart_error_indicator::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_error_indicator::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -409,7 +409,7 @@ void chart_regression_curve::add_attributes( const xml::attributes_wc_ptr & Attr
common_attlist_.add_attributes(Attributes);
}
void chart_regression_curve::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_regression_curve::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"chart", L"equation")
{
......@@ -427,7 +427,7 @@ void chart_equation::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"chart:display-r-square", display_r_square_);
}
void chart_equation::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_equation::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -443,7 +443,7 @@ void chart_stock_gain_marker::add_attributes( const xml::attributes_wc_ptr & Att
common_attlist_.add_attributes(Attributes);
}
void chart_stock_gain_marker::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_stock_gain_marker::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -458,7 +458,7 @@ void chart_stock_loss_marker::add_attributes( const xml::attributes_wc_ptr & Att
common_attlist_.add_attributes(Attributes);
}
void chart_stock_loss_marker::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_stock_loss_marker::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -473,7 +473,7 @@ void chart_stock_range_line::add_attributes( const xml::attributes_wc_ptr & Attr
common_attlist_.add_attributes(Attributes);
}
void chart_stock_range_line::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void chart_stock_range_line::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......
......@@ -57,7 +57,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
office_element_ptr_array content_;
......@@ -102,7 +102,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_chart_attlist chart_chart_attlist_;
......@@ -136,7 +136,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_title_attlist chart_title_attlist_;
......@@ -157,7 +157,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_title_attlist chart_title_attlist_;
......@@ -179,7 +179,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
common_chart_attlist common_attlist_;
......@@ -216,7 +216,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_legend_attlist chart_legend_attlist_;
......@@ -254,7 +254,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_plot_area_attlist chart_plot_area_attlist_;
......@@ -286,7 +286,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_wall_attlist chart_wall_attlist_;
......@@ -307,7 +307,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
common_chart_attlist common_attlist_;
......@@ -339,7 +339,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_axis_attlist chart_axis_attlist_;
......@@ -373,7 +373,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_grid_attlist chart_grid_attlist_;
......@@ -394,7 +394,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
_CP_OPT(std::wstring) table_cell_range_address_;
......@@ -429,7 +429,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_series_attlist chart_series_attlist_;
......@@ -452,7 +452,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
_CP_OPT(std::wstring) table_cell_range_address_;
......@@ -483,7 +483,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_data_point_attlist chart_data_point_attlist_;
......@@ -504,7 +504,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
common_chart_attlist common_attlist_;
......@@ -526,7 +526,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
common_chart_attlist common_attlist_;
......@@ -547,7 +547,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
common_chart_attlist common_attlist_;
......@@ -570,7 +570,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
common_chart_attlist common_attlist_;
......@@ -593,7 +593,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
common_chart_attlist common_attlist_;
......@@ -615,7 +615,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
common_chart_attlist common_attlist_;
......@@ -636,7 +636,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
common_chart_attlist common_attlist_;
......
......@@ -45,7 +45,7 @@ namespace odf_reader {
std::wostream & office_document_base::text_to_stream(::std::wostream & _Wostream) const
std::wostream & office_document_base::text_to_stream(std::wostream & _Wostream) const
{
office_body_->text_to_stream(_Wostream);
return _Wostream;
......@@ -60,7 +60,7 @@ void office_document_base::add_attributes( const xml::attributes_wc_ptr & Attrib
CP_APPLY_ATTR(L"office:version", office_version_, std::wstring(L""));
}
void office_document_base::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void office_document_base::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"office", L"body")
CP_CREATE_ELEMENT(office_body_);
......
......@@ -45,7 +45,7 @@ namespace odf_reader {
class office_document_base : public office_element
{
public:
virtual std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
CPDOCCORE_DEFINE_VISITABLE();
......@@ -58,7 +58,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
public:
......@@ -192,7 +192,7 @@ class manifest_entry : public office_element
{
public:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text){}
static const wchar_t * ns;
......@@ -218,7 +218,7 @@ class manifest_encryption_data : public office_element
{
public:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name){}
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
virtual void add_text(const std::wstring & Text){}
static const wchar_t * ns;
......
......@@ -47,7 +47,7 @@ office_element_creator::office_element_creator()
{
}
office_element_ptr office_element_creator::create(const ::std::wstring & ns, const ::std::wstring & name, document_context * Context, bool isRoot) const
office_element_ptr office_element_creator::create(const std::wstring & ns, const std::wstring & name, document_context * Context, bool isRoot) const
{
const std::wstring fullName = ns + (ns.size() > 0 ? L":" : L"") + name;
......
......@@ -102,7 +102,20 @@ enum ElementType
typeTextUserIndex,
typeTextAlphabeticalIndex,
typeTextBibliography,
typeShape,
typeTextTrackedChanges,
typeTextChangedRegion,
typeTextChangeStart,
typeTextChangeEnd,
typeTextChange,
typeOfficeChangeInfo,
typeTextUnknownChange,
typeTextDeletion,
typeTextFormatChange,
typeTextInsertion,
typeShape,
typeChangeMarks,
typeOfficeAutomaticStyles,
......
......@@ -54,7 +54,7 @@ void office_event_listeners::add_attributes( const xml::attributes_wc_ptr & Attr
{
}
void office_event_listeners::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void office_event_listeners::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"presentation", L"event-listener")
CP_CREATE_ELEMENT(presentation_event_listeners_);
......@@ -92,7 +92,7 @@ void presentation_event_listener::add_attributes( const xml::attributes_wc_ptr &
presentation_event_listener_attlist_.add_attributes(Attributes);
}
void presentation_event_listener::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void presentation_event_listener::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"presentation", L"sound")
CP_CREATE_ELEMENT(presentation_sound_);
......@@ -118,7 +118,7 @@ void script_event_listener::add_attributes( const xml::attributes_wc_ptr & Attri
{
}
void script_event_listener::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void script_event_listener::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......
......@@ -57,7 +57,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
private:
office_element_ptr_array presentation_event_listeners_;
......@@ -101,7 +101,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
private:
//office_element_ptr_array content_;
......@@ -126,7 +126,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
private:
office_element_ptr_array content_;
......
......@@ -53,7 +53,7 @@ namespace odf_reader {
const wchar_t * office_presentation::ns = L"office";
const wchar_t * office_presentation::name = L"presentation";
void office_presentation::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void office_presentation::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"draw", L"page")
CP_CREATE_ELEMENT(pages_);
......
......@@ -57,7 +57,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
public:
......
......@@ -52,7 +52,7 @@ void office_scripts::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void office_scripts::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void office_scripts::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"office", L"script")
CP_CREATE_ELEMENT(office_script_);
......@@ -74,7 +74,7 @@ void office_script::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"script:language", script_language_, std::wstring(L""));
}
void office_script::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void office_script::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......
......@@ -54,7 +54,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
private:
......@@ -78,7 +78,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
private:
......
......@@ -52,7 +52,7 @@ void office_settings::add_attributes( const xml::attributes_wc_ptr & Attributes
{
}
void office_settings::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void office_settings::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -67,7 +67,7 @@ void settings_config_item_set::add_attributes( const xml::attributes_wc_ptr & At
CP_APPLY_ATTR(L"config:name", config_name_, std::wstring(L""));
}
void settings_config_item_set::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void settings_config_item_set::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -82,7 +82,7 @@ void settings_config_item::add_attributes( const xml::attributes_wc_ptr & Attrib
CP_APPLY_ATTR(L"config:type", config_type_, std::wstring(L""));
}
void settings_config_item::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void settings_config_item::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
//CP_CREATE_ELEMENT(content_);
}
......@@ -95,7 +95,7 @@ void settings_config_item_map_indexed::add_attributes( const xml::attributes_wc_
{
}
void settings_config_item_map_indexed::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void settings_config_item_map_indexed::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -108,7 +108,7 @@ void settings_config_item_map_named::add_attributes( const xml::attributes_wc_pt
{
}
void settings_config_item_map_named::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void settings_config_item_map_named::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -121,7 +121,7 @@ void settings_config_item_map_entry::add_attributes( const xml::attributes_wc_pt
{
}
void settings_config_item_map_entry::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void settings_config_item_map_entry::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......
......@@ -55,7 +55,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text){}
};
......@@ -76,7 +76,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text){}
};
......@@ -97,7 +97,7 @@ public:
std::wstring content_;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text){ content_ = Text; }
};
CP_REGISTER_OFFICE_ELEMENT2(settings_config_item);
......@@ -114,7 +114,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text){}
private:
......@@ -136,7 +136,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text){}
private:
......@@ -158,7 +158,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text){}
private:
......
......@@ -48,7 +48,7 @@ namespace odf_reader {
const wchar_t * office_spreadsheet::ns = L"office";
const wchar_t * office_spreadsheet::name = L"spreadsheet";
void office_spreadsheet::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void office_spreadsheet::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"table", L"database-ranges")
{
......
......@@ -56,19 +56,19 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
public:
// TODO: office-text-content-prelude:
// TODO: office-forms
// TODO: text-tracked-changes
// TODO: text-decls
// TODO: table-decls
office_element_ptr_array table_database_ranges_;
office_element_ptr_array table_database_ranges_;
office_element_ptr_array content_;
office_element_ptr tracked_changes_;//??
office_element_ptr_array content_;
// TODO: text-page-sequence
// TODO: office-text-content-epilogue:
// TODO: table-functions
......
......@@ -31,12 +31,13 @@
*/
#include "office_text.h"
#include "office_annotation.h"
#include <boost/foreach.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/utils.h>
#include "serialize_elements.h"
......@@ -47,14 +48,9 @@ namespace odf_reader {
// office:text
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * office_text::ns = L"office";
const wchar_t * office_text::name = L"text";
const wchar_t * office_text::ns = L"office";
const wchar_t * office_text::name = L"text";
::std::wostream & office_text::text_to_stream(::std::wostream & _Wostream) const
{
CP_SERIALIZE_TEXT(text_content_);
return _Wostream;
}
office_text::office_text()
{}
......@@ -63,8 +59,7 @@ void office_text::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"text:global", text_global_, false);
}
namespace {
bool is_text_content(const std::wstring & ns, const std::wstring & name)
{
if (ns == L"text")
......@@ -83,7 +78,6 @@ bool is_text_content(const std::wstring & ns, const std::wstring & name)
name == L"alphabetical-index" ||
name == L"bibliography" ||
// change-marks
name == L"change" ||
name == L"change-start" ||
name == L"change-end"
......@@ -102,47 +96,86 @@ bool is_text_content(const std::wstring & ns, const std::wstring & name)
return false;
}
}
void office_text::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void office_text::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (is_text_content(Ns, Name))
if CP_CHECK_NAME(L"text", L"tracked-changes")
{
CP_CREATE_ELEMENT(tracked_changes_);
}
else if (is_text_content(Ns, Name))
{
CP_CREATE_ELEMENT(text_content_);
CP_CREATE_ELEMENT(content_);
}
else
CP_NOT_APPLICABLE_ELM();
}
void office_text::add_text(const std::wstring & Text)
{
// TODO : error
}
void office_text::docx_convert(oox::docx_conversion_context & Context)
{
if (tracked_changes_)
tracked_changes_->docx_convert(Context);
Context.start_office_text();
BOOST_FOREACH(const office_element_ptr & elm, text_content_)
BOOST_FOREACH(const office_element_ptr & elm, content_)
{
elm->docx_convert(Context);
}
Context.end_office_text();
}
void office_text::xlsx_convert(oox::xlsx_conversion_context & Context)
{
//Context.start_office_text();
BOOST_FOREACH(const office_element_ptr & elm, text_content_)
BOOST_FOREACH(const office_element_ptr & elm, content_)
{
elm->xlsx_convert(Context);
}
//Context.end_office_text();
}
void office_text::pptx_convert(oox::pptx_conversion_context & Context)
{
BOOST_FOREACH(const office_element_ptr & elm, text_content_)
BOOST_FOREACH(const office_element_ptr & elm, content_)
{
elm->pptx_convert(Context);
}
}
// office:change-info
//-------------------------------------------------------------------------------------------------------------------
const wchar_t * office_change_info::ns = L"office";
const wchar_t * office_change_info::name = L"change-info";
void office_change_info::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"dc", L"date")
{
CP_CREATE_ELEMENT(dc_date_);
}
else if CP_CHECK_NAME(L"dc", L"creator")
{
CP_CREATE_ELEMENT(dc_creator_);
}
else
CP_NOT_APPLICABLE_ELM();
}
void office_change_info::docx_convert(oox::docx_conversion_context & Context)
{
std::wstring date;
std::wstring author;
if (dc_date_)
{
date = xml::utils::replace_text_to_xml(dynamic_cast<dc_date * >(dc_date_.get())->content_);
}
if (dc_creator_)
{
author = xml::utils::replace_text_to_xml(dynamic_cast<dc_creator * >(dc_creator_.get())->content_);
}
Context.get_text_tracked_context().set_user_info(author, date);
}
}
}
......@@ -41,48 +41,62 @@
namespace cpdoccore {
namespace odf_reader {
// office_text
// office:text
class office_text : public office_element_impl<office_text>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeText;
static const ElementType type = typeOfficeText;
CPDOCCORE_DEFINE_VISITABLE();
virtual void docx_convert(oox::docx_conversion_context & Context) ;
virtual void xlsx_convert(oox::xlsx_conversion_context & Context) ;
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
public:
office_text();
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_text(const std::wstring & Text);
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
private:
bool text_global_;
// TODO: office-text-content-prelude:
// TODO: office-forms
// TODO: text-tracked-changes
// TODO: text-decls
// TODO: table-decls
office_element_ptr_array text_content_;
office_element_ptr tracked_changes_;
office_element_ptr_array content_;
// TODO: text-page-sequence
// TODO: office-text-content-epilogue:
// TODO: table-functions
// TODO: table-functions
};
CP_REGISTER_OFFICE_ELEMENT2(office_text);
//----------------------------------------------------------------------------------------------------
class office_change_info : public office_element_impl<office_change_info>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeChangeInfo;
CPDOCCORE_DEFINE_VISITABLE()
virtual void docx_convert(oox::docx_conversion_context & Context) ;
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes ){}
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
office_element_ptr dc_date_;
office_element_ptr dc_creator_;
};
CP_REGISTER_OFFICE_ELEMENT2(office_change_info)
}
}
......
......@@ -53,7 +53,7 @@ namespace text {
const wchar_t * ruby_base::ns = L"text";
const wchar_t * ruby_base::name = L"ruby-base";
::std::wostream & ruby_base::text_to_stream(::std::wostream & _Wostream) const
std::wostream & ruby_base::text_to_stream(std::wostream & _Wostream) const
{
serialize_elements_text(_Wostream, paragraph_content_);
return _Wostream;
......@@ -63,7 +63,7 @@ void ruby_base::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void ruby_base::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void ruby_base::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(paragraph_content_);
}
......@@ -79,7 +79,7 @@ void ruby_base::add_text(const std::wstring & Text)
const wchar_t * ruby_text::ns = L"text";
const wchar_t * ruby_text::name = L"ruby-text";
::std::wostream & ruby_text::text_to_stream(::std::wostream & _Wostream) const
std::wostream & ruby_text::text_to_stream(std::wostream & _Wostream) const
{
CP_SERIALIZE_TEXT(content_);
return _Wostream;
......@@ -87,10 +87,10 @@ const wchar_t * ruby_text::name = L"ruby-text";
void ruby_text::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
text_style_name_ = odf_types::style_ref( Attributes->get_val< ::std::wstring >(L"text:style-name").get_value_or(L"") );
text_style_name_ = odf_types::style_ref( Attributes->get_val< std::wstring >(L"text:style-name").get_value_or(L"") );
}
void ruby_text::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void ruby_text::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......
......@@ -54,13 +54,13 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
public:
ruby_base() {}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
private:
......@@ -83,14 +83,14 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
public:
ruby_text() {}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
private:
......
......@@ -37,14 +37,14 @@
namespace cpdoccore {
namespace odf_reader {
inline ::std::wostream & serialize_elements(::std::wostream & _Wostream, const office_element_ptr & elm)
inline std::wostream & serialize_elements(std::wostream & _Wostream, const office_element_ptr & elm)
{
if (elm)
elm->xml_to_stream(_Wostream);
return _Wostream;
}
inline ::std::wostream & serialize_elements(::std::wostream & _Wostream, const office_element_ptr_array & elms)
inline std::wostream & serialize_elements(std::wostream & _Wostream, const office_element_ptr_array & elms)
{
BOOST_FOREACH(const office_element_ptr & elm, elms)
{
......@@ -53,14 +53,14 @@ inline ::std::wostream & serialize_elements(::std::wostream & _Wostream, const o
return _Wostream;
}
inline ::std::wostream & serialize_elements_text(::std::wostream & _Wostream, const office_element_ptr & elm)
inline std::wostream & serialize_elements_text(std::wostream & _Wostream, const office_element_ptr & elm)
{
if (elm)
elm->text_to_stream(_Wostream);
return _Wostream;
}
inline ::std::wostream & serialize_elements_text(::std::wostream & _Wostream, const office_element_ptr_array & elms)
inline std::wostream & serialize_elements_text(std::wostream & _Wostream, const office_element_ptr_array & elms)
{
BOOST_FOREACH(const office_element_ptr & elm, elms)
{
......
......@@ -48,7 +48,7 @@ void _skip_element::add_attributes( const xml::attributes_wc_ptr & Attributes )
return;
}
void _skip_element::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void _skip_element::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
_CP_LOG << L"[error] : skip element " << Ns << L":" << Name << "\n";
......
......@@ -53,7 +53,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
public:
......
......@@ -210,7 +210,7 @@ void style_chart_properties::add_attributes( const xml::attributes_wc_ptr & Attr
//common_rotation_angle_attlist_.add_attributes(Attributes);
}
void style_chart_properties::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_chart_properties::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......
......@@ -67,7 +67,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
std::vector<_property> content_;
......
......@@ -131,15 +131,16 @@ void graphic_format_properties::apply_to(std::vector<_property> & properties)
}else
{
if (common_padding_attlist_.fo_padding_left_)
properties.push_back(_property(L"text-padding-left", common_padding_attlist_.fo_padding_left_->get_value_unit(length::emu)));
properties.push_back(_property(L"text-padding-left", common_padding_attlist_.fo_padding_left_->get_value_unit(length::emu)));
if (common_padding_attlist_.fo_padding_right_)
properties.push_back(_property(L"text-padding-right", common_padding_attlist_.fo_padding_right_->get_value_unit(length::emu)));
properties.push_back(_property(L"text-padding-right", common_padding_attlist_.fo_padding_right_->get_value_unit(length::emu)));
if (common_padding_attlist_.fo_padding_top_)
properties.push_back(_property(L"text-padding-top", common_padding_attlist_.fo_padding_top_->get_value_unit(length::emu)));
properties.push_back(_property(L"text-padding-top", common_padding_attlist_.fo_padding_top_->get_value_unit(length::emu)));
if (common_padding_attlist_.fo_padding_bottom_)
properties.push_back(_property(L"text-padding-bottom", common_padding_attlist_.fo_padding_bottom_->get_value_unit(length::emu)));
properties.push_back(_property(L"text-padding-bottom", common_padding_attlist_.fo_padding_bottom_->get_value_unit(length::emu)));
}
if (fo_wrap_option_) properties.push_back(_property(L"text-wrap", (int)fo_wrap_option_->get_type()));
if (fo_wrap_option_)
properties.push_back(_property(L"text-wrap", (int)fo_wrap_option_->get_type()));
}
void graphic_format_properties::apply_from(const graphic_format_properties & Other)
{
......@@ -210,7 +211,7 @@ void style_graphic_properties::add_attributes( const xml::attributes_wc_ptr & At
graphic_format_properties_.add_attributes(Attributes);
}
void style_graphic_properties::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_graphic_properties::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (L"style" == Ns && L"background-image" == Name)
{
......
......@@ -154,7 +154,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
private:
graphic_format_properties graphic_format_properties_;
......
......@@ -58,7 +58,7 @@ void style_map::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"style:apply-style-name", style_apply_style_name_, style_ref(L""));
}
void style_map::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_map::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......
......@@ -56,7 +56,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
std::wstring style_condition_;
......
......@@ -55,7 +55,7 @@ namespace odf_reader {
const wchar_t * style_tab_stop::ns = L"style";
const wchar_t * style_tab_stop::name = L"tab-stop";
::std::wostream & style_tab_stop::text_to_stream(::std::wostream & _Wostream) const
std::wostream & style_tab_stop::text_to_stream(std::wostream & _Wostream) const
{
return _Wostream;
}
......@@ -75,7 +75,7 @@ void style_tab_stop::add_attributes( const xml::attributes_wc_ptr & Attributes )
}
void style_tab_stop::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_tab_stop::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{}
void style_tab_stop::add_text(const std::wstring & Text)
......@@ -86,7 +86,7 @@ void style_tab_stop::add_text(const std::wstring & Text)
const wchar_t * style_tab_stops::ns = L"style";
const wchar_t * style_tab_stops::name = L"tab-stops";
::std::wostream & style_tab_stops::text_to_stream(::std::wostream & _Wostream) const
std::wostream & style_tab_stops::text_to_stream(std::wostream & _Wostream) const
{
return _Wostream;
}
......@@ -94,7 +94,7 @@ const wchar_t * style_tab_stops::name = L"tab-stops";
void style_tab_stops::add_attributes( const xml::attributes_wc_ptr & Attributes )
{}
void style_tab_stops::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_tab_stops::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (L"style" == Ns && L"tab-stop" == Name)
CP_CREATE_ELEMENT(style_tab_stops_);
......@@ -112,7 +112,7 @@ void style_tab_stops::add_text(const std::wstring & Text)
const wchar_t * style_drop_cap::ns = L"style";
const wchar_t * style_drop_cap::name = L"drop-cap";
::std::wostream & style_drop_cap::text_to_stream(::std::wostream & _Wostream) const
std::wostream & style_drop_cap::text_to_stream(std::wostream & _Wostream) const
{
return _Wostream;
}
......@@ -125,7 +125,7 @@ void style_drop_cap::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"style:style-name", style_style_name_);
}
void style_drop_cap::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_drop_cap::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{}
void style_drop_cap::add_text(const std::wstring & Text)
......@@ -137,7 +137,7 @@ void style_drop_cap::add_text(const std::wstring & Text)
const wchar_t * style_background_image::ns = L"style";
const wchar_t * style_background_image::name = L"background-image";
::std::wostream & style_background_image::text_to_stream(::std::wostream & _Wostream) const
std::wostream & style_background_image::text_to_stream(std::wostream & _Wostream) const
{
return _Wostream;
}
......@@ -156,7 +156,7 @@ void style_background_image::add_attributes( const xml::attributes_wc_ptr & Attr
}
}
void style_background_image::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_background_image::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (L"office" == Ns && L"binary-data" == Name)
CP_CREATE_ELEMENT(office_binary_data_);
......@@ -345,7 +345,7 @@ void paragraph_format_properties::add_attributes( const xml::attributes_wc_ptr &
CP_APPLY_ATTR(L"style:join_border", style_join_border_);
}
bool paragraph_format_properties::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name, document_context * Context)
bool paragraph_format_properties::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context)
{
if (L"style" == Ns)
{
......@@ -377,7 +377,7 @@ bool paragraph_format_properties::add_child_element( xml::sax * Reader, const ::
const wchar_t * style_paragraph_properties::ns = L"style";
const wchar_t * style_paragraph_properties::name = L"paragraph-properties";
::std::wostream & style_paragraph_properties::text_to_stream(::std::wostream & _Wostream) const
std::wostream & style_paragraph_properties::text_to_stream(std::wostream & _Wostream) const
{
return _Wostream;
}
......@@ -387,7 +387,7 @@ void style_paragraph_properties::add_attributes( const xml::attributes_wc_ptr &
style_paragraph_properties_content_.add_attributes(Attributes);
}
void style_paragraph_properties::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_paragraph_properties::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (!style_paragraph_properties_content_.add_child_element(Reader, Ns, Name, getContext()))
CP_NOT_APPLICABLE_ELM();
......
......@@ -91,10 +91,10 @@ public:
void docx_convert(oox::docx_conversion_context & Context);
void pptx_convert(oox::pptx_conversion_context & Context);
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
private:
......@@ -130,11 +130,11 @@ public:
void docx_convert(oox::docx_conversion_context & Context);
void pptx_convert(oox::pptx_conversion_context & Context);
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
private:
......@@ -155,7 +155,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
odf_types::drop_cap_length style_length_;
unsigned int style_lines_;
......@@ -163,7 +163,7 @@ public:
_CP_OPT(odf_types::style_ref) style_style_name_;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
_CP_OPT(odf_types::common_xlink_attlist) common_xlink_attlist_;
......@@ -183,10 +183,10 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
_CP_OPT(odf_types::style_repeat) style_repeat_;
......@@ -206,7 +206,7 @@ class paragraph_format_properties : public oox::conversion_element
{
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
bool add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name, document_context * Context);
bool add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context);
void apply_from(const paragraph_format_properties & Other);
......@@ -352,11 +352,11 @@ public:
const paragraph_format_properties & content() const { return style_paragraph_properties_content_; }
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
......
......@@ -156,7 +156,7 @@ void paragraph_format_properties::docx_convert(oox::docx_conversion_context & Co
Context.set_rtl(false);
}
}
if (Context.rtl()) //может быть он установился от стиля родителя !!
if (Context.get_rtl()) //может быть он установился от стиля родителя !!
{
_pPr << L"<w:bidi/>";
}
......@@ -170,8 +170,8 @@ void paragraph_format_properties::docx_convert(oox::docx_conversion_context & Co
case text_align::Right: jc = L"right"; break;
case text_align::Center: jc = L"center"; break;
case text_align::Justify: jc = L"both"; break;
case text_align::Start: jc = Context.rtl() ? L"end": L"start"; break;
case text_align::End: jc = Context.rtl() ? L"start": L"end"; break;
case text_align::Start: jc = Context.get_rtl() ? L"end": L"start"; break;
case text_align::End: jc = Context.get_rtl() ? L"start": L"end"; break;
}
if (!jc.empty()) CP_XML_NODE(L"w:jc"){CP_XML_ATTR(L"w:val", jc );}
......
......@@ -60,7 +60,7 @@ void presentation_placeholder::add_attributes( const xml::attributes_wc_ptr & At
}
void presentation_placeholder::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void presentation_placeholder::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -97,7 +97,7 @@ void style_drawing_page_properties::add_attributes( const xml::attributes_wc_ptr
{
drawing_page_properties_.add_attributes(Attributes);
}
void style_drawing_page_properties::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_drawing_page_properties::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......
......@@ -62,7 +62,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void pptx_convert(oox::pptx_conversion_context & Context);
public:
......@@ -125,7 +125,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
//virtual void pptx_convert(oox::pptx_conversion_context & Context);
drawing_page_properties drawing_page_properties_;
......
......@@ -69,7 +69,7 @@ void style_region_left::add_attributes( const xml::attributes_wc_ptr & Attribute
{
}
void style_region_left::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_region_left::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -103,7 +103,7 @@ void style_region_right::add_attributes( const xml::attributes_wc_ptr & Attribut
{
}
void style_region_right::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_region_right::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......@@ -137,7 +137,7 @@ void style_region_center::add_attributes( const xml::attributes_wc_ptr & Attribu
{
}
void style_region_center::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_region_center::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(content_);
}
......
......@@ -55,7 +55,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
private:
......@@ -80,7 +80,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
private:
......@@ -106,7 +106,7 @@ public:
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
private:
......
......@@ -73,7 +73,7 @@ void table_format_properties::add_attributes( const xml::attributes_wc_ptr & Att
CP_APPLY_ATTR(L"tableooo:tab-color", tableooo_tab_color_);
}
bool table_format_properties::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name, document_context * Context)
bool table_format_properties::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context)
{
if (L"style" == Ns && L"background-image" == Name)
{
......@@ -182,7 +182,7 @@ void style_table_properties::add_attributes( const xml::attributes_wc_ptr & Attr
table_format_properties_.add_attributes(Attributes);
}
void style_table_properties::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_table_properties::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
table_format_properties_.add_child_element(Reader, Ns, Name, getContext());
}
......@@ -213,7 +213,7 @@ void style_table_column_properties::add_attributes( const xml::attributes_wc_ptr
style_table_column_properties_attlist_.add_attributes(Attributes);
}
void style_table_column_properties::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_table_column_properties::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......@@ -316,7 +316,7 @@ void style_table_cell_properties::add_attributes( const xml::attributes_wc_ptr &
style_table_cell_properties_attlist_.add_attributes(Attributes);
}
void style_table_cell_properties::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_table_cell_properties::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (L"style" == Ns && L"background-image" == Name)
{
......@@ -378,7 +378,7 @@ void style_table_row_properties::add_attributes( const xml::attributes_wc_ptr &
style_table_row_properties_attlist_.add_attributes(Attributes);
}
void style_table_row_properties::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_table_row_properties::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (L"style" == Ns && L"background-image" == Name)
{
......
......@@ -511,7 +511,7 @@ void text_format_properties_content::docx_convert(oox::docx_conversion_context &
std::wostream & _rPr = Context.get_styles_context().text_style();
if (Context.rtl())
if (Context.get_rtl())
{
_rPr << L"<w:rtl/>";/* w:val=\"true\" */
}
......@@ -1563,7 +1563,7 @@ void style_text_properties::add_attributes( const xml::attributes_wc_ptr & Attri
text_format_properties_content_.add_attributes(Attributes);
}
void style_text_properties::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
void style_text_properties::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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