Commit 541469d8 authored by konovalovsergey's avatar konovalovsergey

fix Bug 32706 - Замена темы одной из таблиц и повреждение книги, по мнению MS...

fix Bug 32706 - Замена темы одной из таблиц и повреждение книги, по мнению MS Excel, при экспорте в XLSX сразу же после открытия
parent 57534244
...@@ -60,7 +60,7 @@ namespace PPTX ...@@ -60,7 +60,7 @@ namespace PPTX
{ {
int cred = node.GetAttributeInt(CString(L"r"), 0); int cred = node.GetAttributeInt(CString(L"r"), 0);
int cgreen = node.GetAttributeInt(CString(L"g"), 0); int cgreen = node.GetAttributeInt(CString(L"g"), 0);
int cblue = node.GetAttributeInt(CString(L"g"), 0); int cblue = node.GetAttributeInt(CString(L"b"), 0);
red = (unsigned char)(255 * scRGB_to_sRGB(cred / 100000.0)); red = (unsigned char)(255 * scRGB_to_sRGB(cred / 100000.0));
green = (unsigned char)(255 * scRGB_to_sRGB(cgreen / 100000.0)); green = (unsigned char)(255 * scRGB_to_sRGB(cgreen / 100000.0));
......
...@@ -70,19 +70,19 @@ namespace PPTX ...@@ -70,19 +70,19 @@ namespace PPTX
{ {
CString name = XmlUtils::GetNameNoNS(node.GetName()); CString name = XmlUtils::GetNameNoNS(node.GetName());
if (name == _T("a:srgbClr")) if (name == _T("srgbClr"))
Color.reset(new Logic::SrgbClr(node)); Color.reset(new Logic::SrgbClr(node));
else if (name == _T("a:scrgbClr")) else if (name == _T("scrgbClr"))
{ {
Logic::SrgbClr* pSrgbClr = new Logic::SrgbClr(node); Logic::SrgbClr* pSrgbClr = new Logic::SrgbClr(node);
pSrgbClr->fromXMLScRgb(node); pSrgbClr->fromXMLScRgb(node);
Color.reset(pSrgbClr); Color.reset(pSrgbClr);
} }
else if (name == _T("a:prstClr")) else if (name == _T("prstClr"))
Color.reset(new Logic::PrstClr(node)); Color.reset(new Logic::PrstClr(node));
else if (name == _T("a:schemeClr")) else if (name == _T("schemeClr"))
Color.reset(new Logic::SchemeClr(node)); Color.reset(new Logic::SchemeClr(node));
else if (name == _T("a:sysClr")) else if (name == _T("sysClr"))
Color.reset(new Logic::SysClr(node)); Color.reset(new Logic::SysClr(node));
else Color.reset(); else Color.reset();
} }
...@@ -236,7 +236,17 @@ namespace PPTX ...@@ -236,7 +236,17 @@ namespace PPTX
if (oNode.IsValid()) if (oNode.IsValid())
Color.reset(new Logic::SysClr(oNode)); Color.reset(new Logic::SysClr(oNode));
else else
Color.reset(); {
oNode = element.ReadNodeNoNS(_T("scrgbClr"));
if (oNode.IsValid())
{
Logic::SrgbClr* pSrgbClr = new Logic::SrgbClr(oNode);
pSrgbClr->fromXMLScRgb(oNode);
Color.reset(pSrgbClr);
}
else
Color.reset();
}
} }
} }
} }
......
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