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

убраны излишние строковые преобразования.. приоритет использования строк std вместо CString

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62278 954022d7-b5bf-4e40-9824-e11837661b57
parent b42c696e
This diff is collapsed.
......@@ -17,38 +17,38 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "font_engine", "..\DesktopEd
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCHTMLRenderer", "..\ASCHTMLRenderer\ASCHTMLRendererLib.vcproj", "{DC24710E-8DF2-4A7A-B7C3-2313E294143C}"
ProjectSection(ProjectDependencies) = postProject
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239} = {764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
{818753F2-DBB9-4D3B-898A-A604309BE470} = {818753F2-DBB9-4D3B-898A-A604309BE470}
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239} = {764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\DesktopEditor\graphics\graphics_vs2005.vcproj", "{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}"
ProjectSection(ProjectDependencies) = postProject
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cximage", "..\DesktopEditor\cximage\CxImage\cximage_vs2005.vcproj", "{BC52A07C-A797-423D-8C4F-8678805BBB36}"
ProjectSection(ProjectDependencies) = postProject
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239} = {764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
{818753F2-DBB9-4D3B-898A-A604309BE470} = {818753F2-DBB9-4D3B-898A-A604309BE470}
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239} = {764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jasper", "..\DesktopEditor\cximage\jasper\jasper_vs2005.vcproj", "{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}"
......@@ -77,15 +77,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficeUtilsLib", "..\ASC
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormatTestRead", "..\Test\Applications\DocxFormatTests\DocxFormatTestRead\win32\DocxFormatTestRead.vcproj", "{C774B3D6-5A46-4449-BC2E-9FFA4B21F233}"
ProjectSection(ProjectDependencies) = postProject
{E8EC320B-F0BF-4728-912A-41FAFC89051B} = {E8EC320B-F0BF-4728-912A-41FAFC89051B}
{DC24710E-8DF2-4A7A-B7C3-2313E294143C} = {DC24710E-8DF2-4A7A-B7C3-2313E294143C}
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
{36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302}
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6} = {3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6} = {3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
{36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302}
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PdfWriterLib", "..\ASCOfficePDFWriter\PdfWriterLib\Win32\PdfWriterLib.vcproj", "{E8EC320B-F0BF-4728-912A-41FAFC89051B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
......@@ -358,6 +361,20 @@ Global
{C774B3D6-5A46-4449-BC2E-9FFA4B21F233}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
{C774B3D6-5A46-4449-BC2E-9FFA4B21F233}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32
{C774B3D6-5A46-4449-BC2E-9FFA4B21F233}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32
{E8EC320B-F0BF-4728-912A-41FAFC89051B}.Debug|Win32.ActiveCfg = Debug|Win32
{E8EC320B-F0BF-4728-912A-41FAFC89051B}.Debug|Win32.Build.0 = Debug|Win32
{E8EC320B-F0BF-4728-912A-41FAFC89051B}.Debug|x64.ActiveCfg = Debug|x64
{E8EC320B-F0BF-4728-912A-41FAFC89051B}.Debug|x64.Build.0 = Debug|x64
{E8EC320B-F0BF-4728-912A-41FAFC89051B}.Release|Win32.ActiveCfg = Release|Win32
{E8EC320B-F0BF-4728-912A-41FAFC89051B}.Release|Win32.Build.0 = Release|Win32
{E8EC320B-F0BF-4728-912A-41FAFC89051B}.Release|x64.ActiveCfg = Release|x64
{E8EC320B-F0BF-4728-912A-41FAFC89051B}.Release|x64.Build.0 = Release|x64
{E8EC320B-F0BF-4728-912A-41FAFC89051B}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{E8EC320B-F0BF-4728-912A-41FAFC89051B}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{E8EC320B-F0BF-4728-912A-41FAFC89051B}.ReleaseOpenSource|x64.Build.0 = Release|x64
{E8EC320B-F0BF-4728-912A-41FAFC89051B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|x64
{E8EC320B-F0BF-4728-912A-41FAFC89051B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
{E8EC320B-F0BF-4728-912A-41FAFC89051B}.ReleaseWithoutAsm|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -87,17 +87,17 @@ CPdfWriterLib::~CPdfWriterLib()
RELEASEOBJECT(m_pFontManager);
}
void CPdfWriterLib::SetFontDir(CString& sFontDir)
void CPdfWriterLib::SetFontDir(std::wstring& sFontDir)
{
m_pFontManager = NULL;//освободится ниже
m_oFontsApplication.InitializeFromFolder(std::wstring(sFontDir.GetString()));
m_oFontsApplication.InitializeFromFolder(sFontDir);
m_pFontManager = m_oFontsApplication.GenerateFontManager();
m_bIsFontsInitialize = true;
}
void CPdfWriterLib::SetThemesPlace(const CString& sThemesPlace)
void CPdfWriterLib::SetThemesPlace(const std::wstring & sThemesPlace)
{
m_sThemesPlace = sThemesPlace;
}
......@@ -130,7 +130,7 @@ HRESULT CPdfWriterLib::SetAdditionalParam (CString ParamName, VARIANT ParamValue
if ( _T("TempDirectory") == sParamName && VT_BSTR == ParamValue.vt )
{
m_wsTempDir = CString( ParamValue.bstrVal );
DocSetTempDir( m_pDocument, m_wsTempDir.GetBuffer() );
DocSetTempDir( m_pDocument, (wchar_t*)m_wsTempDir.c_str() );
}
else if ( _T("WhiteBackImage") == sParamName && VT_BOOL == ParamValue.vt )
{
......@@ -3084,8 +3084,8 @@ void CPdfWriterLib::OnlineWordToPdfInternal(BYTE* dstArray, LONG len, const std:
{
if (0 == wsTempString.find(_T("theme")))
{
if (m_sThemesPlace.GetLength())
wsTempString = string2std_string(m_sThemesPlace) + _T("/") + wsTempString;
if (m_sThemesPlace.length() > 0)
wsTempString = m_sThemesPlace + _T("/") + wsTempString;
}
else
{
......@@ -3353,8 +3353,8 @@ void CPdfWriterLib::OnlineWordToPdfInternal(BYTE* dstArray, LONG len, const std:
{
if (0 == wsTempString.find(_T("theme")))
{
if (m_sThemesPlace.GetLength())
wsTempString = string2std_string(m_sThemesPlace) + _T("/") + wsTempString;
if (m_sThemesPlace.length() > 0)
wsTempString = m_sThemesPlace + _T("/") + wsTempString;
}
else
{
......@@ -3636,14 +3636,14 @@ void CPdfWriterLib::OnlineWordToPdfInternal(BYTE* dstArray, LONG len, const std:
}
}
HRESULT CPdfWriterLib::OnlineWordToPdf (CString sPathXml, CString sDstFile, LONG nReg)
HRESULT CPdfWriterLib::OnlineWordToPdf (std::wstring sPathXml, std::wstring sDstFile, LONG nReg)
{
using namespace NOnlineOfficeBinToPdf;
HRESULT hRes = S_OK;
CString sTempLogo;
std::wstring sHtmlPlace = string2std_string(FileSystem::Directory::GetFolderPath(sPathXml));
std::wstring sHtmlPlace = FileSystem::Directory::GetFolderPath(std_string2string(sPathXml));
try
{
......@@ -3660,7 +3660,7 @@ HRESULT CPdfWriterLib::OnlineWordToPdf (CString sPathXml, CString sDstFile, LONG
std::wstring sHypers =_T("<linker>");
// read file
CString sOpenPathName = FileSystem::Directory::GetLongPathName_(sPathXml);
CString sOpenPathName = FileSystem::Directory::GetLongPathName_(std_string2string(sPathXml));
CFile oFile;
......@@ -3732,7 +3732,7 @@ HRESULT CPdfWriterLib::OnlineWordToPdf (CString sPathXml, CString sDstFile, LONG
::CDirectory::DeleteFile(sTempLogo);
}
SaveToFile(sDstFile);
SaveToFile(std_string2string(sDstFile));
}
catch (char *pcError)
{
......
......@@ -42,8 +42,8 @@ public:
CPdfWriterLib();
virtual ~CPdfWriterLib();
void SetFontDir(CString& sFontDir);
void SetThemesPlace(const CString& sThemesPlace);
void SetFontDir(std::wstring & sFontDir);
void SetThemesPlace(const std::wstring & sThemesPlace);
void InitializeFonts(bool bIsUseSystem, std::vector<std::wstring> arAdditionalFolders);
//-----------------------------------------------------------------------------------------------------
//
......@@ -377,7 +377,7 @@ public:
//
//-----------------------------------------------------------------------------------------------------
HRESULT OnlineWordToPdf (CString sPathXml, CString sDstFile, LONG nReg);
HRESULT OnlineWordToPdf (std::wstring sPathXml, std::wstring sDstFile, LONG nReg);
void OnlineWordToPdfInternal (BYTE* dstArray, LONG len, const std::wstring& sHtmlPlace, std::wstring& sHypers, int& nCountPages, CString sTempLogo, LONG nReg);
//IRenderer
......@@ -592,8 +592,8 @@ private:
CFontLoader m_oFontLoader;
CString m_wsTempDir;
CString m_sThemesPlace;
std::wstring m_wsTempDir;
std::wstring m_sThemesPlace;
CFontManager* m_pFontManager;
CApplicationFonts m_oFontsApplication;
......
......@@ -17,7 +17,7 @@ void CPDFWriter::FinalRelease()
}
HRESULT CPDFWriter::OnlineWordToPdf (BSTR sPathXml, BSTR sDstFile, BSTR sHtmlPlace, LONG nReg)
{
return m_oPdfWriter->OnlineWordToPdf( CString(sPathXml), CString(sDstFile), nReg);
return m_oPdfWriter->OnlineWordToPdf( std::wstring(sPathXml), std::wstring(sDstFile), nReg);
}
......@@ -1167,7 +1167,9 @@ HRESULT CPDFWriter::put_ShadowAlpha (LONG lAlpha)
}
HRESULT CPDFWriter::get_ShadowVisible (BOOL *pbVisible)
{
return m_oPdfWriter->get_ShadowVisible (pbVisible) ;
bool res;
return m_oPdfWriter->get_ShadowVisible (&res) ;
*pbVisible = (BOOL)res;
}
HRESULT CPDFWriter::put_ShadowVisible (BOOL bVisible)
{
......
......@@ -229,5 +229,20 @@ namespace FileSystem
}
return strFolderPath.Mid(0,n1);
}
#if defined (_WIN32) || defined(_WIN64)
std::wstring Directory::GetFolderPath(const std::wstring & strFolderPath)
{
int n1 = strFolderPath.rfind('\\');
if (n1 < 0 )
{
n1 = strFolderPath.rfind('/');
if (n1 < 0 )
{
return _T("");
}
return strFolderPath.substr(0,n1);
}
return strFolderPath.substr(0,n1);
}
#endif
}
......@@ -10,6 +10,7 @@
#include <tchar.h>
#include <strsafe.h>
#include <string>
#else
#include "../../Base/ASCString.h"
#endif
......@@ -38,5 +39,8 @@ namespace FileSystem {
static CString GetTempPath();
static CString CreateTempFileWithUniqueName (const CString & strFolderPathRoot,CString Prefix);
static bool PathIsDirectory(const CString& pathName);
};
#if defined (_WIN32) || defined(_WIN64)
static std::wstring GetFolderPath(const std::wstring & strFolderPath);
#endif
};
}
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