Commit ee5a5618 authored by ElenaSubbotina's avatar ElenaSubbotina

fix linux build

parent b90e3a3c
......@@ -101,7 +101,6 @@ SOURCES += \
../source/OdfFormat/mediaitems_utils.cpp \
../source/OdfFormat/anim_elements.cpp \
../source/OdfFormat/draw_page.cpp \
../source/OdfFormat/logging.cpp \
../source/OdfFormat/odp_conversion_context.cpp \
../source/OdfFormat/odp_page_state.cpp \
../source/OdfFormat/odp_slide_context.cpp \
......@@ -116,7 +115,9 @@ SOURCES += \
../source/Oox2OdfConverter/DocxConverter.cpp \
../source/Oox2OdfConverter/XlsxConverter.cpp \
../source/Oox2OdfConverter/ConvertDrawing.cpp \
../source/Oox2OdfConverter/PptxConverter.cpp
../source/Oox2OdfConverter/PptxConverter.cpp \
../source/OdfFormat/anim_elements.cpp \
../source/OdfFormat/style_presentation.cpp
HEADERS += \
../source/OdfFormat/abstract_xml.h \
......@@ -207,4 +208,6 @@ HEADERS += \
../source/OdfFormat/odp_slide_context.h \
../source/OdfFormat/office_presentation.h \
../source/OdfFormat/style_presentation.h \
../source/Oox2OdfConverter/PptxConverter.h
../source/Oox2OdfConverter/PptxConverter.h \
../source/OdfFormat/anim_elements.h \
../source/OdfFormat/style_presentation.h
......@@ -69,7 +69,7 @@ void OoxConverter::convert(PPTX::Logic::SpTreeElem *oox_element)
if (!oox_element) return;
if (!oox_element->is_init()) return;
smart_ptr<PPTX::WrapperWritingElement> & elem = oox_element->GetElem();
smart_ptr<PPTX::WrapperWritingElement> elem = oox_element->GetElem();
convert (elem.operator->());
}
......
......@@ -2226,10 +2226,8 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
{
bColors = true;
std::wstring strColors = sColors.get();
std::wstring resToken;
int curPos = 0;
arColors.clear();
arColors.clear();
arPos.clear();
std::vector<std::wstring> arSplit;
......@@ -2239,8 +2237,8 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
{
int p = (int)arSplit[i].find(L" ");
std::wstring strPos = resToken.substr(0, p);
std::wstring strColor = resToken.substr(p + 1);
std::wstring strPos = arSplit[i].substr(0, p);
std::wstring strColor = arSplit[i].substr(p + 1);
double pos;
pos = _wtof(strPos.c_str());
......
......@@ -823,7 +823,7 @@ namespace NSBinPptxRW
filePathRels = filePathRels + FILE_SEPARATOR_STR + _T(".rels");
NSFile::CFileBinary oFile;
oFile.CreateFile(filePathRels.GetPath());
oFile.CreateFileW(filePathRels.GetPath());
oFile.WriteStringUTF8(strRELS);
oFile.CloseFile();
......
......@@ -36,7 +36,7 @@
#include "./../WrapperWritingElement.h"
#include "Hyperlink.h"
#include "extp.h"
#include "ExtP.h"
namespace PPTX
{
......
......@@ -146,7 +146,7 @@ namespace PPTX
{
OOX::CPath oox_file = ole_file->filename();
OOX::CPath oox_unpacked = oox_file.GetDirectory(true) + L"Temp";
NSDirectory::CreateDirectoryW(oox_unpacked.GetPath());
NSDirectory::CreateDirectory(oox_unpacked.GetPath());
COfficeUtils oOfficeUtils(NULL);
oOfficeUtils.ExtractToDirectory(oox_file.GetPath(), oox_unpacked.GetPath(), NULL, 0);
......
......@@ -1558,7 +1558,7 @@ bool OOXShapeGroupReader::Parse( ReaderParameter oParam , RtfShapePtr& pOutput)
RtfShapePtr pNewShape( new RtfShape() );
pNewShape->m_bIsGroup = true;
smart_ptr<PPTX::Logic::SpTree> &e = m_ooxGroup->SpTreeElems[i].GetElem().smart_dynamic_cast<PPTX::Logic::SpTree>();
smart_ptr<PPTX::Logic::SpTree> e = m_ooxGroup->SpTreeElems[i].GetElem().smart_dynamic_cast<PPTX::Logic::SpTree>();
OOXShapeGroupReader oShapeReader(e.operator->());
......@@ -1570,7 +1570,7 @@ bool OOXShapeGroupReader::Parse( ReaderParameter oParam , RtfShapePtr& pOutput)
{
RtfShapePtr pNewShape ( new RtfShape() );
smart_ptr<OOX::WritingElement> &e = m_ooxGroup->SpTreeElems[i].GetElem().smart_dynamic_cast<OOX::WritingElement>();
smart_ptr<OOX::WritingElement> e = m_ooxGroup->SpTreeElems[i].GetElem().smart_dynamic_cast<OOX::WritingElement>();
OOXShapeReader oShapeReader(e.operator->());
pNewShape->m_bInGroup = true;
......
......@@ -2710,7 +2710,8 @@ namespace BinXlsxRW
{
OOX::Image* pImageFile = static_cast<OOX::Image*>(pFile.operator->());
olePic->oleObject->m_OleObjectFile->set_filename_cache(pImageFile->filename());
OOX::CPath pathImage = pImageFile->filename();
olePic->oleObject->m_OleObjectFile->set_filename_cache(pathImage);
olePic->blipFill.blip->oleFilepathImage = pImageFile->filename().GetPath();
}
}
......
......@@ -2696,16 +2696,21 @@ namespace BinXlsxRW {
pOleObject->m_oShapeId = *oPic.oleObject->m_sShapeId;
//add image rels to VmlDrawing
NSCommon::smart_ptr<OOX::Image> pImageFileVml(new OOX::Image(false));
pImageFileVml->set_filename(pOleObject->m_OleObjectFile->filename_cache());
OOX::CPath pathImageCache = pOleObject->m_OleObjectFile->filename_cache();
NSCommon::smart_ptr<OOX::Image> pImageFileVml(new OOX::Image(false));
pImageFileVml->set_filename(pathImageCache);
m_pCurVmlDrawing->Add(*oPic.blipFill.blip->embed, pImageFileVml.smart_dynamic_cast<OOX::File>());
smart_ptr<OOX::File> pFileVml = pImageFileVml.smart_dynamic_cast<OOX::File>();
m_pCurVmlDrawing->Add(*oPic.blipFill.blip->embed, pFileVml);
//add image rels to Worksheet
NSCommon::smart_ptr<OOX::Image> pImageFileWorksheet(new OOX::Image(false));
pImageFileWorksheet->set_filename(pOleObject->m_OleObjectFile->filename_cache());
pImageFileWorksheet->set_filename(pathImageCache);
const OOX::RId oRIdImg = m_pCurWorksheet->Add(pImageFileWorksheet.smart_dynamic_cast<OOX::File>());
smart_ptr<OOX::File> pFileWorksheet = pImageFileWorksheet.smart_dynamic_cast<OOX::File>();
const OOX::RId oRIdImg = m_pCurWorksheet->Add(pFileWorksheet);
//add oleObject rels
if(!m_pCurWorksheet->m_oOleObjects.IsInit())
......@@ -2713,7 +2718,8 @@ namespace BinXlsxRW {
m_pCurWorksheet->m_oOleObjects.Init();
}
const OOX::RId oRIdBin = m_pCurWorksheet->Add(pOleObject->m_OleObjectFile.smart_dynamic_cast<OOX::File>());
smart_ptr<OOX::File> pFileObject = pOleObject->m_OleObjectFile.smart_dynamic_cast<OOX::File>();
const OOX::RId oRIdBin = m_pCurWorksheet->Add(pFileObject);
if(!pOleObject->m_oRid.IsInit())
{
......
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