Commit 80b1e5e8 authored by ElenaSubbotina's avatar ElenaSubbotina

.

parent d1a7800f
......@@ -913,20 +913,29 @@ HRESULT CDrawingConverter::SetMainDocument(BinDocxRW::CDocxSerializer* pDocument
return S_OK;
}
HRESULT CDrawingConverter::SetMediaDstPath(const std::wstring& bsMediaPath)
void CDrawingConverter::SetSrcPath(const std::wstring& sPath, int nDocType)
{
m_pBinaryWriter->m_pCommon->m_pImageManager->m_strDstMedia = (std::wstring)bsMediaPath;
m_pImageManager->SetDstMedia(m_pBinaryWriter->m_pCommon->m_pImageManager->m_strDstMedia);
m_pReader->m_pRels->m_pManager = m_pImageManager;
m_pReader->m_strFolder = sPath;
NSDirectory::CreateDirectory(bsMediaPath);
return S_OK;
m_pImageManager->m_nDocumentType = nDocType;
}
void CDrawingConverter::SetDstPath(const std::wstring& sPath)
{
m_pImageManager->SetDstFolder(sPath);
}
HRESULT CDrawingConverter::SetEmbedDstPath(const std::wstring& bsEmbedPath)
void CDrawingConverter::SetMediaDstPath(const std::wstring& sPath)
{
m_pImageManager->SetDstEmbed(bsEmbedPath);
m_pBinaryWriter->m_pCommon->m_pImageManager->m_strDstMedia = sPath;
m_pImageManager->SetDstMedia(sPath);
NSDirectory::CreateDirectory(bsEmbedPath);
return S_OK;
NSDirectory::CreateDirectory(sPath);
}
void CDrawingConverter::SetEmbedDstPath(const std::wstring& sPath)
{
m_pImageManager->SetDstEmbed(sPath);
NSDirectory::CreateDirectory(sPath);
}
HRESULT CDrawingConverter::AddShapeType(const std::wstring& bsXml)
{
......@@ -5274,14 +5283,6 @@ OOX::CContentTypes* CDrawingConverter::GetContentTypes()
//return m_pReader->mm_strContentTypes;
}
void CDrawingConverter::SetSourceFileDir(std::wstring path, int nDocType)
{
m_pReader->m_pRels->m_pManager = m_pImageManager;
m_pReader->m_strFolder = path;
m_pImageManager->m_nDocumentType = nDocType;
}
void CDrawingConverter::Clear()
{
for (std::map<std::wstring, CShape*>::iterator pPair = m_mapShapeTypes.begin(); pPair != m_mapShapeTypes.end(); ++pPair)
......
......@@ -215,8 +215,12 @@ namespace NSBinPptxRW
smart_ptr<OOX::IFileContainer> GetRels();
HRESULT SetMainDocument (BinDocxRW::CDocxSerializer* pDocument);
HRESULT SetMediaDstPath (const std::wstring& sMediaPath);
HRESULT SetEmbedDstPath (const std::wstring& sEmbedPath);
void SetSrcPath (const std::wstring& sPath, int nDocType = 1/*XMLWRITER_DOC_TYPE_DOCX*/);
void SetDstPath (const std::wstring& sPath);
void SetMediaDstPath (const std::wstring& sMediaPath);
void SetEmbedDstPath (const std::wstring& sEmbedPath);
HRESULT AddShapeType (const std::wstring& sXml);
HRESULT AddObject (const std::wstring& sXml, std::wstring** pMainProps);
......@@ -255,8 +259,6 @@ namespace NSBinPptxRW
void SetDocumentChartsCount (int val);
int GetDocumentChartsCount ();
void SetSourceFileDir (std::wstring path, int nDocType = 1/*XMLWRITER_DOC_TYPE_DOCX*/);
OOX::CContentTypes* GetContentTypes();
protected:
nullable<PPTX::Logic::Xfrm> m_oxfrm_override;
......
......@@ -134,7 +134,7 @@ namespace PPTX
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_XLSX) namespace_ = L"xdr";
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_DOCX)
{
namespaceLock_ = L"wp";
namespaceLock_ = L"a";
namespace_ = L"wp";
}
......
......@@ -346,8 +346,11 @@ namespace PPTX
pReader->m_pRels = new NSBinPptxRW::CRelsGenerator();
oDrawingConverter.SetMainDocument(&oDocxSerializer);
oDrawingConverter.SetSourceFileDir(pReader->m_strFolder, 1);
oDrawingConverter.SetMediaDstPath(sMediaPath);
oDrawingConverter.SetDstPath(sDstEmbeddedTemp + FILE_SEPARATOR_STR + L"word");
oDrawingConverter.SetSrcPath(pReader->m_strFolder, 1);
oDrawingConverter.SetMediaDstPath(sMediaPath);
oDrawingConverter.SetEmbedDstPath(sEmbedPath);
std::wstring sDocxFilename = L"Microsoft_Word_Document" + std::to_wstring( id ) + L".docx";
......@@ -434,8 +437,10 @@ namespace PPTX
oDrawingConverter.m_pReader = pReader;
pReader->m_pRels = new NSBinPptxRW::CRelsGenerator();
oDrawingConverter.SetSourceFileDir(pReader->m_strFolder, 2);
oDrawingConverter.SetMediaDstPath(sMediaPath);
oDrawingConverter.SetDstPath(sDstEmbeddedTemp + FILE_SEPARATOR_STR + L"xl");
oDrawingConverter.SetSrcPath(pReader->m_strFolder, 2);
oDrawingConverter.SetMediaDstPath(sMediaPath);
oDrawingConverter.SetEmbedDstPath(sEmbedPath);
std::wstring sXlsxFilename = L"Microsoft_Excel_Worksheet" + std::to_wstring( id ) + L".xlsx";
......
......@@ -469,8 +469,8 @@ namespace PPTX
bool m_bMacroEnabled;
smart_ptr<OOX::VbaProject> m_pVbaProject;
void SetClrMap(Logic::ClrMap map) {m_clrMap = map;};
void SetClrScheme(nsTheme::ClrScheme scheme) {m_clrScheme = scheme;};
void SetClrMap(Logic::ClrMap map) {m_clrMap = map;}
void SetClrScheme(nsTheme::ClrScheme scheme) {m_clrScheme = scheme;}
DWORD GetRGBAFromMap(const std::wstring& str)const
{
......
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