Commit 10aac610 authored by ElenaSubbotina's avatar ElenaSubbotina

Docx2Doct - ole without image replacement

parent b5489282
...@@ -83,7 +83,8 @@ static void GetColorWithEffect(const std::wstring& sColor, const int& R, const i ...@@ -83,7 +83,8 @@ static void GetColorWithEffect(const std::wstring& sColor, const int& R, const i
if (pos2 < (pos1 + 2)) if (pos2 < (pos1 + 2))
return; return;
param = std::stod(sColor.substr(pos1 + 1, pos2 - pos1 - 1)); std::wstring s = sColor.substr(pos1 + 1, pos2 - pos1 - 1);
param = _wtoi(s.c_str());
bool isEffect = false; bool isEffect = false;
if (0 == sColor.find(L"darken")) if (0 == sColor.find(L"darken"))
...@@ -1355,7 +1356,17 @@ rIns=\"91440\" bIns=\"45720\" numCol=\"1\" spcCol=\"0\" rtlCol=\"0\" fromWordArt ...@@ -1355,7 +1356,17 @@ rIns=\"91440\" bIns=\"45720\" numCol=\"1\" spcCol=\"0\" rtlCol=\"0\" fromWordArt
PPTX::Logic::Shape* pShape = dynamic_cast<PPTX::Logic::Shape*>(pElem->GetElem().operator ->()); PPTX::Logic::Shape* pShape = dynamic_cast<PPTX::Logic::Shape*>(pElem->GetElem().operator ->());
if(NULL != pShape && pShape->spPr.Fill.Fill.IsInit()) if(NULL != pShape && pShape->spPr.Fill.Fill.IsInit())
{ {
const PPTX::Logic::BlipFill& oBlipFill = pShape->spPr.Fill.Fill.as<PPTX::Logic::BlipFill>(); bool bImageOle = false;
if (pShape->spPr.Fill.m_type == PPTX::Logic::UniFill::blipFill) bImageOle = true;
PPTX::Logic::BlipFill oBlipFillNew;
if (!bImageOle)
oBlipFillNew.blip = new PPTX::Logic::Blip();
const PPTX::Logic::BlipFill& oBlipFill = bImageOle ? pShape->spPr.Fill.Fill.as<PPTX::Logic::BlipFill>() :
oBlipFillNew;
if(oBlipFill.blip.IsInit()) if(oBlipFill.blip.IsInit())
{ {
if (pOle->m_sFilepathBin.IsInit()) if (pOle->m_sFilepathBin.IsInit())
......
...@@ -42,6 +42,7 @@ namespace PPTX ...@@ -42,6 +42,7 @@ namespace PPTX
SpPr::SpPr() SpPr::SpPr()
{ {
Fill.m_type = UniFill::notInit;
} }
......
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