Commit 79f8054e authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

.....

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63006 954022d7-b5bf-4e40-9824-e11837661b57
parent 7b3c3dbf
...@@ -11,11 +11,18 @@ ...@@ -11,11 +11,18 @@
namespace cpdoccore { namespace cpdoccore {
namespace oox { namespace oox {
_CP_PTR(oox_axis_content) oox_axis_content::create(int type) _CP_PTR(oox_axis_content) oox_axis_content::create(int type)
{ {
return boost::make_shared<oox_axis_content>(type); return boost::make_shared<oox_axis_content>(type);
} }
oox_axis_content::oox_axis_content(int type/*,std::wstring name*/)
{
//id_ = abs((int)*((_UINT32*)this));
id_ = abs((int)this);
type_=type; //dimension
}
void oox_axis_content::oox_serialize(std::wostream & _Wostream) void oox_axis_content::oox_serialize(std::wostream & _Wostream)
{ {
if (id_ <0 )return;//not activate if (id_ <0 )return;//not activate
......
...@@ -19,11 +19,7 @@ class oox_axis_content ...@@ -19,11 +19,7 @@ class oox_axis_content
public: public:
odf_reader::chart::oox_typeconvert oox_typeconvert_; odf_reader::chart::oox_typeconvert oox_typeconvert_;
oox_axis_content(int type/*,std::wstring name*/) oox_axis_content(int type/*,std::wstring name*/);
{
id_ = abs((int)*((_UINT32*)this));
type_=type; //dimension
}
~oox_axis_content(){} ~oox_axis_content(){}
static oox_axis_content_ptr create(int type/*,std::wstring name*/); static oox_axis_content_ptr create(int type/*,std::wstring name*/);
......
...@@ -206,7 +206,12 @@ void office_font_face_decls::docx_convert(oox::docx_conversion_context & Context ...@@ -206,7 +206,12 @@ void office_font_face_decls::docx_convert(oox::docx_conversion_context & Context
{ {
std::wostream & strm = Context.output_stream(); std::wostream & strm = Context.output_stream();
strm << L"<w:fonts xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\">"; strm << L"<w:fonts \
xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \
xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" \
xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" \
xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\" \
mc:Ignorable=\"w14\">";
BOOST_FOREACH(office_element_ptr elm, style_font_face_) BOOST_FOREACH(office_element_ptr elm, style_font_face_)
{ {
......
...@@ -286,14 +286,12 @@ namespace FileSystem ...@@ -286,14 +286,12 @@ namespace FileSystem
#endif #endif
bool Directory::IsExist(const std::wstring& strFileName) bool Directory::IsExist(const std::wstring& strFileName)
{ {
FILE* pFile = _wfopen(strFileName.c_str(), L"rb"); DWORD ftyp = GetFileAttributesW(strFileName.c_str());
if (ftyp == INVALID_FILE_ATTRIBUTES) return false;
if (ftyp & FILE_ATTRIBUTE_DIRECTORY) return true;
if (ftyp & FILE_ATTRIBUTE_NORMAL) return true;
if (NULL != pFile)
{
fclose(pFile);
return true;
}
else
return false; return false;
} }
} }
...@@ -266,19 +266,13 @@ namespace FileSystem { ...@@ -266,19 +266,13 @@ namespace FileSystem {
} }
bool Directory::IsExist(const std::wstring& strFileName) bool Directory::IsExist(const std::wstring& strFileName)
{ {
struct stat sb;
BYTE* pUtf8 = NULL; if (stat(strFileName, &sb) == 0)
LONG lLen = 0;
NSFile::CUtf8Converter::GetUtf8StringFromUnicode(strFileName.c_str(), strFileName.length(), pUtf8, lLen, false);
FILE* pFile = fopen((char*)pUtf8, "rb");
delete [] pUtf8;
if (NULL != pFile)
{ {
fclose(pFile); if (S_ISDIR(sb.st_mode)) return true;
return true; if (S_ISREG(sb.st_mode)) return true;
} }
else
return false; return false;
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment