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

OdfFileReader

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62936 954022d7-b5bf-4e40-9824-e11837661b57
parent 38d21f3f
......@@ -24,6 +24,9 @@ INCLUDEPATH += /usr/include/libxml2
INCLUDEPATH += ../include
INCLUDEPATH += ../../../ServerComponents/DesktopEditor/freetype-2.5.2/include
CONFIG(debug, debug|release){
DEFINES += _DEBUG
}
SOURCES += \
../formulasconvert/formulasconvert_odf.cpp \
../formulasconvert/formulasconvert_oox.cpp \
......
......@@ -88,7 +88,7 @@ std::wstring mediaitems::add_or_find(const std::wstring & href, Type type, bool
}
else if ( type == typeImage)
{
int n_svm = inputPath.rfind (L".svm");
int n_svm = outputPath.rfind (L".svm");
if ( n_svm >= 0 )
{
outputPath = outputPath.substr(0, n_svm) + L".png";
......
......@@ -8,7 +8,7 @@
#include "mediaitems.h"
#include "../../DesktopEditor/common/File.h"
#include "../../DesktopEditor/raster/MetaFile/MetaFile.h"
#include "../../DesktopEditor/raster/Metafile/MetaFile.h"
namespace cpdoccore {
namespace oox {
......
......@@ -25,8 +25,8 @@ namespace FileSystem {
static bool CreateDirectory(LPCTSTR path);
static bool CreateDirectory(const String& path);
static bool CreateDirectory(String strFolderPathRoot, String strFolderName);
static CString CreateDirectoryWithUniqueName (CString & strFolderPathRoot);
static bool CreateDirectories(LPCTSTR path);
static CString CreateDirectoryWithUniqueName (CString & strFolderPathRoot);
static bool CreateDirectories(LPCTSTR path);
static void DeleteDirectory(const CString& path, bool deleteRoot = true);
......@@ -43,9 +43,9 @@ namespace FileSystem {
#if defined (_WIN32) || defined(_WIN64)
static std::wstring GetFolderPath(const std::wstring & strFolderPath);
static std::wstring CreateDirectoryWithUniqueName (std::wstring & strFolderPathRoot);
static void DeleteDirectory(std::wstring& path, bool deleteRoot = true);
static void DeleteDirectory(std::wstring& path, bool deleteRoot = true);
#endif
static std::wstring CreateDirectoryWithUniqueName (const std::wstring & strFolderPathRoot);
static bool IsExist(const std::wstring& strFileName);
};
......
......@@ -137,7 +137,16 @@ namespace FileSystem {
std::string sRes = pcRes;
return stringUtf8ToWString (sRes);
}
std::wstring Directory::CreateDirectoryWithUniqueName (const std::wstring & strFolderPathRoot)
{
std::string pcTemplate = stringWstingToUtf8String (strFolderPathRoot) + "/ascXXXXXX";
char *pcRes = mkdtemp(const_cast <char *> (pcTemplate.c_str()));
if (NULL == pcRes)
return _T("");
std::string sRes = pcRes;
return stringUtf8ToWString (sRes);
}
bool Directory::CreateDirectories(LPCTSTR path)
{
std::wstring pathWstring;
......
......@@ -3,6 +3,8 @@
#include "../../graphics/GraphicsRenderer.h"
#include "../../raster/BgraFrame.h"
#include "../../../Common/DocxFormat/Source/Base/Types_32.h"
#include "Common/MetaFileRenderer.h"
namespace MetaFile
......@@ -193,12 +195,12 @@ namespace MetaFile
if (!pBgraData)
return;
DWORD alfa = 0xffffff;
_UINT32 alfa = 0xffffff;
// ,
//memset(pBgraData, 0xff, nWidth * nHeight * 4);
for (int i = 0; i < nWidth * nHeight; i++)
{
((DWORD*)pBgraData)[i] = alfa;
((_UINT32*)pBgraData)[i] = alfa;
}
CBgraFrame oFrame;
oFrame.put_Data(pBgraData);
......
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