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

Переделки кода OdfFileReader под компилятор gcc

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62885 954022d7-b5bf-4e40-9824-e11837661b57
parent ec6dc4a0
......@@ -2,17 +2,18 @@
#include <boost/optional.hpp>
namespace cpdoccore {
namespace cpdoccore
{
/// Optional, boost::optional
/// Optional, boost::optional
template <class T>
struct optional
{
typedef T Base;
typedef boost::optional<T> Type;
};
template <class T>
struct optional
{
typedef T Base;
typedef ::boost::optional<T> Type;
};
#define _CP_OPT(T) optional< T >::Type
#define _CP_OPT(V) optional<V>::Type
}
#ifndef _CPDOCCORE_READDOCELEMENT_H_
#define _CPDOCCORE_READDOCELEMENT_H_
#pragma once
#include <string>
......@@ -11,10 +10,9 @@ namespace xml {
class sax;
template <class StringT>
class attributes;
typedef attributes< ::std::wstring > attributes_wc;
typedef attributes attributes_wc;
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
......@@ -45,5 +43,3 @@ inline read_doc_element::~read_doc_element()
}
}
#endif // #ifndef _CPDOCCORE_READDOCELEMENT_H_
......@@ -12,6 +12,7 @@
#include <boost/variant.hpp>
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
namespace cpdoccore
{
......@@ -29,8 +30,10 @@ namespace cpdoccore
};
template <class T>
bool GetProperty(std::vector<_property> Heap,const std::wstring Name, T & Val)
bool GetProperty(std::vector<_property> Heap, const std::wstring Name, T & Val)
{
typedef typename T::value_type T_value_type;
Val.reset();
BOOST_FOREACH(_property const & p, Heap)
{
......@@ -38,7 +41,7 @@ namespace cpdoccore
{
try
{
Val = boost::get<T::value_type>(p.val_);
Val = boost::get<T_value_type>(p.val_);
}
catch(...)
{
......@@ -51,26 +54,24 @@ namespace cpdoccore
}
return false;
}
};
}
namespace xml
{
class sax;
template <class StringT>
class attributes;
template <class StringT>
class attributes
{
public:
typedef typename _CP_OPT(StringT) value_type;
typedef typename ::std::pair< StringT, StringT> key_value;
typedef typename optional<std::wstring>::Type value_type;
typedef typename ::std::pair< std::wstring, std::wstring> key_value;
public:
virtual value_type get(const StringT & QualifiedName) const = 0;
template <class V> typename _CP_OPT(V) get_val(const StringT & QualifiedName);
virtual const key_value & at(size_t _Pos) const = 0;
virtual value_type get(const std::wstring & QualifiedName) const = 0;
template <class V> typename optional<V>::Type get_val(const std::wstring & QualifiedName);
virtual const key_value & at(size_t _Pos) const = 0;
virtual size_t size() const = 0;
size_t length() const ;
bool empty() const;
......@@ -82,18 +83,23 @@ namespace cpdoccore
};
template <class StringT, class V>
template <class V>
class attributes_get_val_impl
{
public:
static typename _CP_OPT(V) get_val(attributes<StringT> & attr, const StringT & QualifiedName)
typedef typename optional<V>::Type optional_V_type;
static typename optional<V>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
{
attributes<StringT>::value_type val = attr.get(QualifiedName);
attributes::value_type val = attr.get(QualifiedName);
if (val)
{
try
{
return optional<V>::Type ( ::boost::lexical_cast<V>( *val ) );
return optional_V_type (::boost::lexical_cast<V>( *val ) );
//return common::read_string<V>( *val );
}
catch(...)
......@@ -104,110 +110,107 @@ namespace cpdoccore
}
}
return _CP_OPT(V)();
return optional_V_type();
}
};
template <class StringT>
class attributes_get_val_impl<StringT, bool>
template<>
class attributes_get_val_impl<bool>
{
public:
static typename _CP_OPT(bool) get_val(attributes<StringT> & attr, const StringT & QualifiedName)
typedef xml::xml_char<wchar_t> xml_char_value_type;
static typename optional<bool>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
{
attributes<StringT>::value_type val = attr.get(QualifiedName);
attributes::value_type val = attr.get(QualifiedName);
if (val)
{
StringT tmp = *val;
::boost::algorithm::to_lower(tmp);
return _CP_OPT(bool)((tmp == xml::xml_char< StringT::value_type >::trueVal));
std::wstring tmp = *val;
::boost::algorithm::to_lower(tmp);
return optional<bool>::Type((tmp == xml_char_value_type::trueVal));
}
else
return _CP_OPT(bool)();
return optional<bool>::Type();
}
};
template <class StringT>
class attributes_get_val_impl<StringT, char>
template<>
class attributes_get_val_impl<char>
{
public:
static typename _CP_OPT(char) get_val(attributes<StringT> & attr, const StringT & QualifiedName)
static typename optional<char>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
{
attributes<StringT>::value_type val = attr.get(QualifiedName);
attributes::value_type val = attr.get(QualifiedName);
if (val)
{
StringT tmp = *val;
return _CP_OPT(char)( (tmp.size() > 0) ? tmp[0] : ' ');
std::wstring tmp = *val;
return optional<char>::Type( (tmp.size() > 0) ? tmp[0] : ' ');
}
else
return _CP_OPT(char)();
return optional<char>::Type();
}
};
template <class StringT>
class attributes_get_val_impl<StringT, wchar_t>
template<>
class attributes_get_val_impl<wchar_t>
{
public:
static typename _CP_OPT(wchar_t) get_val(attributes<StringT> & attr, const StringT & QualifiedName)
static typename optional<wchar_t>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
{
attributes<StringT>::value_type val = attr.get(QualifiedName);
attributes::value_type val = attr.get(QualifiedName);
if (val)
{
StringT tmp = *val;
return _CP_OPT(wchar_t)( (tmp.size() > 0) ? tmp[0] : L' ');
std::wstring tmp = *val;
return optional<wchar_t>::Type( (tmp.size() > 0) ? tmp[0] : L' ');
}
else
return _CP_OPT(wchar_t)();
return optional<wchar_t>::Type();
}
};
template <class StringT>
template <class V>
inline typename _CP_OPT(V) attributes<StringT>::get_val(const StringT & QualifiedName)
inline typename optional<V>::Type attributes::get_val(const std::wstring & QualifiedName)
{
return attributes_get_val_impl<StringT, V>::get_val(*this, QualifiedName);
return attributes_get_val_impl<V>::get_val(*this, QualifiedName);
}
template <class StringT>
inline attributes<StringT>::~attributes()
inline attributes::~attributes()
{}
template <class StringT>
inline size_t attributes<StringT>::length() const
inline size_t attributes::length() const
{
return this->size();
}
template <class StringT>
inline bool attributes<StringT>::empty() const
inline bool attributes::empty() const
{
return (this->size() == 0);
}
template <class T>
struct attributes_ptr
{
typedef typename shared_ptr< attributes<T> >::Type Type;
typedef typename shared_ptr< attributes >::Type Type;
};
typedef attributes< ::std::string > attributes_c;
typedef attributes< ::std::wstring > attributes_wc;
typedef attributes attributes_wc;
typedef shared_ptr< attributes_c >::Type attributes_c_ptr;
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
template <class StringT, class T>
static bool _cp_apply_attribute(xml::attributes_wc_ptr attr, const StringT & QualifiedName, T & Val)
template <class T>
static bool _cp_apply_attribute(xml::attributes_wc_ptr attr, const std::wstring & QualifiedName, T & Val)
{
Val = attr->get_val<typename T::value_type>(QualifiedName);
return (!!Val);
}
template <class StringT, class T>
static bool _cp_apply_attribute(xml::attributes_wc_ptr attr, const StringT & QualifiedName, T & Val, const T & Default)
template <class T>
static bool _cp_apply_attribute(xml::attributes_wc_ptr attr, const std::wstring & QualifiedName, T & Val, const T & Default)
{
_CP_OPT(T) tmp;
typedef typename optional<T>::Type type_opt_t;
type_opt_t tmp;
try
{
tmp = attr->get_val<T>(QualifiedName);
......@@ -218,8 +221,11 @@ namespace cpdoccore
return (!!tmp);
}
#define CP_APPLY_ATTR(NAME, VAL, ...) _cp_apply_attribute(Attributes, (NAME), (VAL), __VA_ARGS__)
#if defined(_WIN32) || defined(_WIN64)
#define CP_APPLY_ATTR(NAME, VAL, ...) _cp_apply_attribute(Attributes, (NAME), (VAL), __VA_ARGS__)
#else
#define CP_APPLY_ATTR(NAME, VAL, ...) _cp_apply_attribute(Attributes, (NAME), (VAL), ##__VA_ARGS__)
#endif
attributes_wc_ptr read_attributes(sax * SaxReader);
}
......
......@@ -65,7 +65,7 @@ namespace writer
static const wchar_t * quote_str() { return L"&quot;"; }
};
template <class T>
template <class V>
class element;
//
......@@ -111,7 +111,8 @@ namespace writer
return *this;
}
template <class T> friend class element;
template <class V>
friend class element;
};
//
......@@ -299,4 +300,4 @@ typedef xml::writer::element<wchar_t> xml_element;
}
#endif
\ No newline at end of file
#endif
......@@ -10,7 +10,6 @@
namespace cpdoccore {
namespace xml {
template <class StringT>
class attributes;
template <class CharT>
......
......@@ -9,7 +9,7 @@ template <class Ostream>
class logging
{
public:
logging(Ostream & Ostream) : ostream_(Ostream)
logging(Ostream &stream) : ostream_(stream)
{}
template <class T>
......
This diff is collapsed.
......@@ -264,9 +264,9 @@ std::wstring docx_conversion_context::dump_settings_document()
CP_XML_ATTR(L"xmlns:sl", L"http://schemas.openxmlformats.org/schemaLibrary/2006/main");
CP_XML_ATTR(L"mc:Ignorable", L"w14");
_CP_OPT(bool) boolVal;
_CP_OPT(std::wstring) strVal;
_CP_OPT(int) intVal;
_CP_OPT(bool) boolVal;
_CP_OPT(std::wstring) strVal;
_CP_OPT(int) intVal;
if (odf::GetProperty(settings_properties_,L"evenAndOddHeaders",boolVal))
{
......@@ -833,7 +833,7 @@ namespace
}
}
void docx_conversion_context::set_settings_property(odf::_property & prop)
void docx_conversion_context::set_settings_property(const odf::_property & prop)
{
settings_properties_.push_back(prop);
}
......
......@@ -322,7 +322,7 @@ public:
std::wstring author;
std::wstring initials;
};
void start_comment(std::wstring & content,std::wstring const & author, std::wstring const & date)
void start_comment(const std::wstring & content, const std::wstring & author, const std::wstring & date)
{
int id = comments_.size()+1;
_comment_desc new_comment={content,id,date,author};
......@@ -404,7 +404,7 @@ public:
void process_headers_footers();
void process_comments();
void set_settings_property(odf::_property & prop);
void set_settings_property(const odf::_property & prop);
std::vector<odf::_property> & get_settings_properties();
void start_process_style_content();
......
......@@ -5,7 +5,7 @@
#include <cpdoccore/CPSharedPtr.h>
#include "oox_chart_shape.h"
namespace cpdoccore {
namespace oox {
......@@ -19,7 +19,7 @@ public:
oox_axis_content(int type/*,std::wstring name*/)
{
id_ = abs((int)(this));
id_ = abs(*((int*)(this)));
type_=type; //dimension
}
~oox_axis_content(){}
......@@ -40,4 +40,4 @@ public:
};
}
}
\ No newline at end of file
}
......@@ -262,7 +262,7 @@ std::vector<odf::_property> & pptx_slide_context::get_properties()
return impl_->object_description_.additional_;
}
void pptx_slide_context::set_clipping(std::wstring & str)
void pptx_slide_context::set_clipping(const std::wstring & str)
{
impl_->object_description_.clipping_string_= str;
}
......
......@@ -38,7 +38,7 @@ public:
void set_anchor(std::wstring anchor, double x_pt, double y_pt);
void set_property(odf::_property p);
std::vector<odf::_property> & get_properties();
void set_clipping(std::wstring & str );
void set_clipping(const std::wstring & str );
void set_fill(_oox_fill & fill);
void set_placeHolder_type(std::wstring typeHolder);
......
......@@ -226,7 +226,7 @@ std::vector<odf::_property> & xlsx_drawing_context::get_properties()
{
return impl_->object_description_.additional_;
}
void xlsx_drawing_context::set_clipping(std::wstring & str)
void xlsx_drawing_context::set_clipping(const std::wstring & str)
{
impl_->object_description_.clipping_string_= str;
}
......
#pragma once
#include <string>
//#include <boost/noncopyable.hpp>
#include <cpdoccore/CPScopedPtr.h>
#include <cpdoccore/CPSharedPtr.h>
......@@ -63,7 +62,7 @@ public:
void set_anchor(std::wstring anchor, double x_pt, double y_pt);
void set_property(odf::_property p);
std::vector<odf::_property> & get_properties();
void set_clipping(std::wstring & str );
void set_clipping(const std::wstring & str );
void set_fill(_oox_fill & fill);
void end_drawing();
......
......@@ -5,7 +5,7 @@
#include "serialize_elements.h"
#include <cpdoccore/odf/odf_document.h>
#include "../formulasconvert/include/cpdoccore/formulasconvert.h"
#include "../formulasconvert/formulasconvert.h"
#include "style_graphic_properties.h"
#include "style_chart_properties.h"
......
......@@ -107,7 +107,7 @@ public:
void add_point(unsigned int rep, std::wstring const & styleName);
void chart_build::calc_cash_series(std::wstring adress, std::vector<std::wstring> & cash);
void calc_cash_series(std::wstring adress, std::vector<std::wstring> & cash);
void xlsx_convert(oox::xlsx_conversion_context & Context);
void docx_convert(oox::docx_conversion_context & Context);
......@@ -300,4 +300,4 @@ private:
}
}
\ No newline at end of file
}
......@@ -9,37 +9,42 @@
namespace cpdoccore {
namespace xml {
template <class StringT, class V>
template <class V>
class attributes_get_val_impl_parse
{
public:
static typename optional<V>::Type get_val(attributes<StringT> & attr, const StringT & QualifiedName)
typedef typename optional<V>::Type optional_v_type;
static optional_v_type get_val(attributes & attr, const std::wstring & QualifiedName)
{
try
{
if (attributes<StringT>::value_type val = attr.get(QualifiedName))
return optional<V>::Type( V::parse(*val) );
if (attributes::value_type val = attr.get(QualifiedName))
{
return optional_v_type( V::parse(*val) );
}
}
catch(odf::errors::invalid_attribute &)
{
attributes<StringT>::value_type val = attr.get(QualifiedName);
attributes::value_type val = attr.get(QualifiedName);
#ifdef _DEBUG
_CP_LOG(error) << L"[warning] : invalud attribute value [" << QualifiedName << L":" << ( (val) ? (*val) : (L"?")) << L"]\n";
#endif
}
return optional<V>::Type();
return optional_v_type();
}
};
#define APPLY_PARSE_XML_ATTRIBUTES(V) \
namespace xml { \
template <class StringT> \
class attributes_get_val_impl<StringT, V >\
template<> \
class attributes_get_val_impl<V >\
{\
public:\
static typename optional< V >::Type get_val(attributes<StringT> & attr, const StringT & QualifiedName)\
typedef typename optional<V>::Type optional_v_type; \
static optional_v_type get_val(attributes & attr, const std::wstring & QualifiedName)\
{\
return attributes_get_val_impl_parse<StringT, V>::get_val(attr, QualifiedName);\
return attributes_get_val_impl_parse<V>::get_val(attr, QualifiedName);\
}\
};\
}
......
......@@ -28,7 +28,7 @@
#endif
namespace _image_file_
{
bool GetResolution(const WCHAR* fileName, int & Width, int &Height)
bool GetResolution(const wchar_t* fileName, int & Width, int &Height)
{
bool result =false;
#if defined(_WIN32) || defined(_WIN64)
......@@ -68,7 +68,8 @@ int get_value_emu(double pt)
}
bool parse_clipping(std::wstring strClipping,std::wstring fileName, double_4 & clip_rect)
{
ZeroMemory(clip_rect,4*sizeof(double));
memset(clip_rect, 0, 4*sizeof(double));
if (strClipping.length() <1 || fileName.length()<1)return false;
int fileWidth=0,fileHeight=0;
......@@ -655,4 +656,4 @@ void pptx_convert_transforms(std::wstring transformStr, oox::pptx_conversion_con
}
}
}
\ No newline at end of file
}
#include "precompiled_cpodf.h"
#include "draw_page.h"
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/serialize.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/utils.h>
#include <cpdoccore/formulasconvert.h>
#include "../formulasconvert/formulasconvert.h"
#include <boost/lexical_cast.hpp>
......@@ -57,4 +55,4 @@ void draw_page::pptx_convert(oox::pptx_conversion_context & Context)
}
}
}
\ No newline at end of file
}
......@@ -28,7 +28,6 @@ namespace odf {
const wchar_t * draw_shape::ns = L"draw";
const wchar_t * draw_shape::name = L"shape";
/////////////////////////////////////////////////////////////////////////////////////////////////////////
......@@ -225,7 +224,7 @@ void draw_path::reset_svg_path()
{
// xml-oox ... drawing .. ..
std::wstringstream output_;
svg_path::oox_serialize(output_, o_Polyline_pt);
svg_path::oox_serialize(output_, o_Polyline_pt);
additional_.push_back(odf::_property(L"custom_path",output_.str()));
}
}
......@@ -277,7 +276,7 @@ void draw_polygon::reset_polygon_path()
{
// xml-oox ... drawing .. ..
std::wstringstream output_;
svg_path::oox_serialize(output_, o_Polyline_pt);
svg_path::oox_serialize(output_, o_Polyline_pt);
additional_.push_back(odf::_property(L"custom_path",output_.str()));
}
}
......@@ -494,7 +493,7 @@ void draw_connector::reset_svg_path()
sub_type_ = 6;
// xml-oox ... drawing .. ..
std::wstringstream output_;
svg_path::oox_serialize(output_, o_Polyline_pt);
svg_path::oox_serialize(output_, o_Polyline_pt);
additional_.push_back(odf::_property(L"custom_path",output_.str()));
}
}
......@@ -502,4 +501,4 @@ void draw_connector::reset_svg_path()
///////////////////////////////////////
}
}
\ No newline at end of file
}
......@@ -39,7 +39,7 @@ public:
office_element_ptr create(const ::std::wstring & ns, const ::std::wstring & name, document_context * Context = NULL, bool isRoot = false) const;
private:
typedef std::map<::std::wstring, CreateFuncImpl> MapType;
typedef std::map<std::wstring, CreateFuncImpl> MapType;
MapType map_;
public:
......@@ -56,17 +56,18 @@ template <class T>
class RegisterElement
{
private:
template <class T>
template <class V>
class CreateImpl_
{
public:
static typename shared_ptr<T>::Type create()
static typename shared_ptr<V>::Type create()
{
//return shared_ptr<T>::Type( new T() );
return boost::make_shared<T>();
return boost::make_shared<V>();
}
};
static int class_registered_;
public:
RegisterElement()
{
......@@ -75,13 +76,11 @@ public:
// Jerry Schwarz counter
office_element_creator::get()->register_element(T::ns, T::name, &CreateImpl_<T>::create);
}
};
}
~RegisterElement()
{
};
private:
static int class_registered_;
}
};
template<class T> int RegisterElement<T>::class_registered_ = 0;
......
#pragma once
#include <ostream>
#include <sstream>
#include <string>
#include <vector>
#include <boost/foreach.hpp>
#include <boost/regex.hpp>
#include <boost/algorithm/string.hpp>
#include <cpdoccore/CPOptional.h>
namespace cpdoccore
{
#include <ostream>
#include <sstream>
#include <string>
#include <vector>
#include <boost/foreach.hpp>
#include <boost/regex.hpp>
#include <boost/algorithm/string.hpp>
#include <cpdoccore/CPOptional.h>
namespace cpdoccore
{
namespace svg_path
{
......@@ -23,15 +23,12 @@ namespace svg_path
_CP_OPT(double) x;
_CP_OPT(double) y;
friend void oox_serialize(std::wostream & _Wostream, _point const & val);
};
struct _polyline
{
std::wstring command;
std::vector<_point> points; //
friend void oox_serialize(std::wostream & _Wostream, _polyline const & val);
friend void oox_serialize(std::wostream & _Wostream, std::vector<svg_path::_polyline> & path);
};
//m - 1 point
//c - 3 point
......@@ -43,6 +40,9 @@ namespace svg_path
//q - 2 point
//t - 1 point
//a - [[[[
void oox_serialize(std::wostream & _Wostream, _point const & val);
void oox_serialize(std::wostream & _Wostream, _polyline const & val);
void oox_serialize(std::wostream & _Wostream, std::vector<svg_path::_polyline> & path);
bool parseSvgD(std::vector<_polyline> & Polyline, const std::wstring & rSvgDStatement, bool bWrongPositionAfterZ);
bool parsePolygon(std::vector<_polyline> & Polyline, const std::wstring & rPolygonStatement, bool bWrongPositionAfterZ);
......
......@@ -15,10 +15,9 @@
namespace cpdoccore {
namespace xml {
template <class StringT>
class attributes;
typedef attributes< ::std::wstring > attributes_wc;
typedef attributes attributes_wc;
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
......
/// \file attributes.cpp
/// \author nikolay.pogorskiy@gmail.com
#include <map>
#include <vector>
#include <string>
......@@ -58,12 +55,11 @@ private:
internal_vector vector_;
};
template <class StringT>
class attributes_impl : public attributes<StringT>
class attributes_impl : public attributes
{
public:
typedef typename attributes<StringT>::value_type value_type;
typedef typename attributes<StringT>::key_value key_value;
typedef typename attributes::value_type value_type;
typedef typename attributes::key_value key_value;
public:
attributes_impl() : check_(true){};
......@@ -74,10 +70,10 @@ public:
}
public:
void add(const StringT & QualifiedName, const StringT & Value);
void add(const std::wstring & QualifiedName, const std::wstring & Value);
public:
virtual value_type get(const StringT & QualifiedName) const ;
virtual value_type get(const std::wstring & QualifiedName) const ;
virtual const key_value & at(size_t _Pos) const;
virtual size_t size() const;
......@@ -113,45 +109,47 @@ private:
typedef std::vector< key_value > VectorVal;
#endif
typedef std::map<StringT, size_t> AttribMap;
typedef std::map<std::wstring, size_t> AttribMap;
AttribMap attrib_;
VectorVal values_;
mutable bool check_;
};
template <class StringT>
void attributes_impl<StringT>::add(const StringT & QualifiedName, const StringT & Value)
void attributes_impl::add(const std::wstring & QualifiedName, const std::wstring & Value)
{
typedef typename AttribMap::value_type attr_map_value_type;
values_.push_back( key_value(QualifiedName, Value) );
attrib_.insert( AttribMap::value_type(QualifiedName, values_.size() - 1) );
attrib_.insert( attr_map_value_type(QualifiedName, values_.size() - 1) );
}
template <class StringT>
typename attributes_impl<StringT>::value_type attributes_impl<StringT>::get(const StringT & QualifiedName) const
typename attributes_impl::value_type attributes_impl::get(const std::wstring & QualifiedName) const
{
AttribMap::const_iterator i = attrib_.find( QualifiedName );
typedef typename AttribMap::const_iterator attr_map_iterator;
typedef typename attributes::value_type attr_str_type;
attr_map_iterator i = attrib_.find( QualifiedName );
if ( i != attrib_.end() )
return attributes<StringT>::value_type( values_[i->second].second );
return attr_str_type( values_[i->second].second );
else
return attributes<StringT>::value_type();
return attr_str_type();
}
template <class StringT>
typename const attributes_impl<StringT>::key_value & attributes_impl<StringT>::at(size_t _Pos) const
const typename attributes_impl::key_value & attributes_impl::at(size_t _Pos) const
{
return values_[_Pos];
}
template <class StringT>
size_t attributes_impl<StringT>::size() const
size_t attributes_impl::size() const
{
return attrib_.size();
}
attributes_wc_ptr read_attributes(sax * SaxReader)
{
typedef attributes_impl< ::std::wstring > attributes_impl_wc;
typedef attributes_impl attributes_impl_wc;
_CP_PTR(attributes_impl_wc) attributes = boost::make_shared<attributes_impl_wc>();
if (SaxReader->attrCount() > 0)
......
......@@ -4,7 +4,7 @@
#include <string>
#include "../../../Common/DocxFormat/Source/Base/Nullable.h"
#include "../../../common/docxformat/source/xml/libxml2/libxml2.h"
#include "../../../Common/DocxFormat/Source/XML/libxml2/libxml2.h"
#include "../../include/cpdoccore/xml/sax.h"
......
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