Commit cbdb1cd5 authored by Ivan.Shulga's avatar Ivan.Shulga Committed by Alexander Trofimov

linux build

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58910 954022d7-b5bf-4e40-9824-e11837661b57
parent 72ffaa41
...@@ -23,7 +23,8 @@ namespace PPTX ...@@ -23,7 +23,8 @@ namespace PPTX
node.ReadAttributeBase(L"fov", fov); node.ReadAttributeBase(L"fov", fov);
node.ReadAttributeBase(L"zoom", zoom); node.ReadAttributeBase(L"zoom", zoom);
rot = node.ReadNode(_T("a:rot")); CString sRotNodeName = _T("a:rot");
rot = node.ReadNode(sRotNodeName);
FillParentPointersForChilds(); FillParentPointersForChilds();
} }
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "ColorBase.h" #include "ColorBase.h"
#include "./../../Limit/SysClrVal.h" #include "./../../Limit/SysClrVal.h"
#include "../../../DocxFormat/Source/Base/ASCWinAPI.h" // GetSysColor
namespace PPTX namespace PPTX
{ {
......
...@@ -21,7 +21,8 @@ namespace PPTX ...@@ -21,7 +21,8 @@ namespace PPTX
{ {
m_name = XmlUtils::GetNameNoNS(node.GetName()); m_name = XmlUtils::GetNameNoNS(node.GetName());
snd = node.ReadNodeNoNS(_T("snd")); CString sSndNodeName = _T("snd");
snd = node.ReadNodeNoNS(sSndNodeName);
node.ReadAttributeBase(L"r:id", id); node.ReadAttributeBase(L"r:id", id);
node.ReadAttributeBase(L"invalidUrl", invalidUrl); node.ReadAttributeBase(L"invalidUrl", invalidUrl);
......
...@@ -23,7 +23,8 @@ namespace PPTX ...@@ -23,7 +23,8 @@ namespace PPTX
dir = node.GetAttribute(_T("dir")); dir = node.GetAttribute(_T("dir"));
rig = node.GetAttribute(_T("rig")); rig = node.GetAttribute(_T("rig"));
rot = node.ReadNode(_T("a:rot")); CString sRotNodeName = _T("a:rot");
rot = node.ReadNode(sRotNodeName);
FillParentPointersForChilds(); FillParentPointersForChilds();
} }
virtual CString toXML() const virtual CString toXML() const
......
...@@ -20,9 +20,12 @@ namespace PPTX ...@@ -20,9 +20,12 @@ namespace PPTX
public: public:
virtual void fromXML(XmlUtils::CXmlNode& node) virtual void fromXML(XmlUtils::CXmlNode& node)
{ {
camera = node.ReadNode(_T("a:camera")); CString sCameraNodeName = _T("a:camera");
lightRig = node.ReadNode(_T("a:lightRig")); CString sLightRigNodeName = _T("a:lightRig");
backdrop = node.ReadNode(_T("a:backdrop")); CString sBackdropNodeName = _T("a:backdrop");
camera = node.ReadNode(sCameraNodeName);
lightRig = node.ReadNode(sLightRigNodeName);
backdrop = node.ReadNode(sBackdropNodeName);
FillParentPointersForChilds(); FillParentPointersForChilds();
} }
......
...@@ -80,20 +80,20 @@ namespace PPTX ...@@ -80,20 +80,20 @@ namespace PPTX
void FillFontRef(const FontRef& Src, const bool& bIsSlideProperty); void FillFontRef(const FontRef& Src, const bool& bIsSlideProperty);
void FillMasterFontSize(int size); void FillMasterFontSize(int size);
__forceinline void SetMajorLatin(const TextFont& mjltFont){MajorLatin = mjltFont;}; AVSINLINE void SetMajorLatin(const TextFont& mjltFont){MajorLatin = mjltFont;};
__forceinline void SetMinorLatin(const TextFont& mnltFont){MinorLatin = mnltFont;}; AVSINLINE void SetMinorLatin(const TextFont& mnltFont){MinorLatin = mnltFont;};
__forceinline void SetMasterStyles(std::vector<nullable<TextParagraphPr>*>* pStyles) { m_masters = pStyles; } AVSINLINE void SetMasterStyles(std::vector<nullable<TextParagraphPr>*>* pStyles) { m_masters = pStyles; }
__forceinline nullable<TextParagraphPr>* GetLevels() AVSINLINE nullable<TextParagraphPr>* GetLevels()
{ {
if (!m_bIsSlideShape) if (!m_bIsSlideShape)
return NULL; return NULL;
return m_levels; return m_levels;
} }
__forceinline nullable<TextParagraphPr>* GetLevelsBody() { return m_body; } AVSINLINE nullable<TextParagraphPr>* GetLevelsBody() { return m_body; }
__forceinline LONG GetTextType() { return m_lTextType; } AVSINLINE LONG GetTextType() { return m_lTextType; }
__forceinline LONG GetFontRef(bool& bIsSlideSetUp) AVSINLINE LONG GetFontRef(bool& bIsSlideSetUp)
{ {
bIsSlideSetUp = m_bIsFontRefFromSlide; bIsSlideSetUp = m_bIsFontRefFromSlide;
......
...@@ -1735,11 +1735,13 @@ namespace NSStrings ...@@ -1735,11 +1735,13 @@ namespace NSStrings
{ {
WriteString(oTemp.m_pData, oTemp.m_lSizeCur); WriteString(oTemp.m_pData, oTemp.m_lSizeCur);
} }
#ifdef _WIN32
AVSINLINE void operator+=(_bstr_t& oTemp) AVSINLINE void operator+=(_bstr_t& oTemp)
{ {
size_t nLen = oTemp.length(); size_t nLen = oTemp.length();
WriteString(oTemp.GetBSTR(), nLen); WriteString(oTemp.GetBSTR(), nLen);
} }
#endif
AVSINLINE void operator+=(CString& oTemp) AVSINLINE void operator+=(CString& oTemp)
{ {
size_t nLen = (size_t)oTemp.GetLength(); size_t nLen = (size_t)oTemp.GetLength();
......
...@@ -108,9 +108,9 @@ namespace NSPresentationEditor ...@@ -108,9 +108,9 @@ namespace NSPresentationEditor
strText.Replace(_T("\""), _T("&quot;")); strText.Replace(_T("\""), _T("&quot;"));
// //
BSTR bsText = strText.AllocSysString(); //BSTR bsText = strText.AllocSysString();
strText = (CString)bsText; //strText = (CString)bsText;
SysFreeString(bsText); //SysFreeString(bsText);
} }
void RecalcParagraphs(CTheme* pTheme = NULL); void RecalcParagraphs(CTheme* pTheme = NULL);
......
...@@ -1563,7 +1563,7 @@ namespace NSPresentationEditor ...@@ -1563,7 +1563,7 @@ namespace NSPresentationEditor
{ {
if (IsEmpty()) if (IsEmpty())
{ {
m_oPFRun.hasBullet = FALSE; m_oPFRun.hasBullet = false;
} }
size_t nCountS = m_arSpans.size(); size_t nCountS = m_arSpans.size();
for (size_t i = 0; i < nCountS; ++i) for (size_t i = 0; i < nCountS; ++i)
......
...@@ -279,27 +279,27 @@ public: ...@@ -279,27 +279,27 @@ public:
if (m_mapSettings.end() != pPair) if (m_mapSettings.end() != pPair)
{ {
if (_T("bold") == pPair->second) if (_T("bold") == pPair->second)
oLevel.m_oCFRun.FontBold = TRUE; oLevel.m_oCFRun.FontBold = true;
else else
oLevel.m_oCFRun.FontBold = FALSE; oLevel.m_oCFRun.FontBold = false;
} }
pPair = m_mapSettings.find(_T("font-style")); pPair = m_mapSettings.find(_T("font-style"));
if (m_mapSettings.end() != pPair) if (m_mapSettings.end() != pPair)
{ {
if (_T("italic") == pPair->second) if (_T("italic") == pPair->second)
oLevel.m_oCFRun.FontItalic = TRUE; oLevel.m_oCFRun.FontItalic = true;
else else
oLevel.m_oCFRun.FontItalic = FALSE; oLevel.m_oCFRun.FontItalic = false;
} }
pPair = m_mapSettings.find(_T("text-decoration")); pPair = m_mapSettings.find(_T("text-decoration"));
if (m_mapSettings.end() != pPair) if (m_mapSettings.end() != pPair)
{ {
if (_T("underline") == pPair->second) if (_T("underline") == pPair->second)
oLevel.m_oCFRun.FontUnderline = TRUE; oLevel.m_oCFRun.FontUnderline = true;
else else
oLevel.m_oCFRun.FontUnderline = FALSE; oLevel.m_oCFRun.FontUnderline = false;
} }
pPair = m_mapSettings.find(_T("font-size")); pPair = m_mapSettings.find(_T("font-size"));
...@@ -596,7 +596,8 @@ public: ...@@ -596,7 +596,8 @@ public:
CCSS oStylePar; CCSS oStylePar;
oStylePar.LoadFromString2(oNodePar.GetAttribute(_T("style"))); CString sAttribute = oNodePar.GetAttribute(_T("style"));
oStylePar.LoadFromString2(sAttribute);
oStylePar.LoadStylePF(pParagraph->m_oPFRun, oMetric); oStylePar.LoadStylePF(pParagraph->m_oPFRun, oMetric);
...@@ -615,7 +616,8 @@ public: ...@@ -615,7 +616,8 @@ public:
oSpan.m_strText = oNodeSpan.GetTextExt(); oSpan.m_strText = oNodeSpan.GetTextExt();
CCSS oStyleSpan; CCSS oStyleSpan;
oStyleSpan.LoadFromString2(oNodeSpan.GetAttribute(_T("style"))); CString sAttribute = oNodeSpan.GetAttribute(_T("style"));
oStyleSpan.LoadFromString2(sAttribute);
oStyleSpan.LoadStyleCF(oSpan.m_oRun, oMetric); oStyleSpan.LoadStyleCF(oSpan.m_oRun, oMetric);
pParagraph->m_arSpans.push_back(oSpan); pParagraph->m_arSpans.push_back(oSpan);
...@@ -653,7 +655,8 @@ public: ...@@ -653,7 +655,8 @@ public:
if (oNodePar.GetNode(_T("li"), oNodeLi)) if (oNodePar.GetNode(_T("li"), oNodeLi))
{ {
CCSS oStylePar; CCSS oStylePar;
oStylePar.LoadFromString2(oNodeLi.GetAttribute(_T("style"))); CString sAttribute = oNodeLi.GetAttribute(_T("style"));
oStylePar.LoadFromString2(sAttribute);
oStylePar.LoadStylePF(pParagraph->m_oPFRun, oMetric); oStylePar.LoadStylePF(pParagraph->m_oPFRun, oMetric);
XmlUtils::CXmlNodes oSpans; XmlUtils::CXmlNodes oSpans;
...@@ -671,7 +674,8 @@ public: ...@@ -671,7 +674,8 @@ public:
oSpan.m_strText = oNodeSpan.GetTextExt(); oSpan.m_strText = oNodeSpan.GetTextExt();
CCSS oStyleSpan; CCSS oStyleSpan;
oStyleSpan.LoadFromString2(oNodeSpan.GetAttribute(_T("style"))); CString sAttribute = oNodeSpan.GetAttribute(_T("style"));
oStyleSpan.LoadFromString2(sAttribute);
oStyleSpan.LoadStyleCF(oSpan.m_oRun, oMetric); oStyleSpan.LoadStyleCF(oSpan.m_oRun, oMetric);
pParagraph->m_arSpans.push_back(oSpan); pParagraph->m_arSpans.push_back(oSpan);
...@@ -801,7 +805,8 @@ public: ...@@ -801,7 +805,8 @@ public:
static void ConvertParagraph(XmlUtils::CXmlNode& oNode, CParagraph* pParagraph, CMetricInfo oMetric) static void ConvertParagraph(XmlUtils::CXmlNode& oNode, CParagraph* pParagraph, CMetricInfo oMetric)
{ {
CCSS oStylePar; CCSS oStylePar;
oStylePar.LoadFromString2(oNode.GetAttribute(_T("style"))); CString sAttribute = oNode.GetAttribute(_T("style"));
oStylePar.LoadFromString2(sAttribute);
oStylePar.LoadStylePF(pParagraph->m_oPFRun, oMetric); oStylePar.LoadStylePF(pParagraph->m_oPFRun, oMetric);
XmlUtils::CXmlNodes oNodes; XmlUtils::CXmlNodes oNodes;
...@@ -827,7 +832,8 @@ public: ...@@ -827,7 +832,8 @@ public:
CSpan oSpan; CSpan oSpan;
CTextCFRun oRunBR; CTextCFRun oRunBR;
CCSS _oStyleCF; CCSS _oStyleCF;
_oStyleCF.LoadFromString2(oNodeS.GetAttribute(_T("style"))); CString sAttribute = oNodeS.GetAttribute(_T("style"));
_oStyleCF.LoadFromString2(sAttribute);
_oStyleCF.LoadStyleCF(oRunBR, oMetric); _oStyleCF.LoadStyleCF(oRunBR, oMetric);
oSpan.m_oRun = oRunBR; oSpan.m_oRun = oRunBR;
...@@ -847,7 +853,8 @@ public: ...@@ -847,7 +853,8 @@ public:
CTextCFRun oRun; CTextCFRun oRun;
CCSS oStyleCF; CCSS oStyleCF;
oStyleCF.LoadFromString2(oNode.GetAttribute(_T("style"))); CString sAttribute = oNode.GetAttribute(_T("style"));
oStyleCF.LoadFromString2(sAttribute);
oStyleCF.LoadStyleCF(oRun, oMetric); oStyleCF.LoadStyleCF(oRun, oMetric);
if (NULL != pCFRun) if (NULL != pCFRun)
...@@ -879,7 +886,8 @@ public: ...@@ -879,7 +886,8 @@ public:
{ {
CTextCFRun oRunBR; CTextCFRun oRunBR;
CCSS _oStyleCF; CCSS _oStyleCF;
_oStyleCF.LoadFromString2(oNodeS.GetAttribute(_T("style"))); CString sAttribute = oNodeS.GetAttribute(_T("style"));
_oStyleCF.LoadFromString2(sAttribute);
_oStyleCF.LoadStyleCF(oRunBR, oMetric); _oStyleCF.LoadStyleCF(oRunBR, oMetric);
oRunBR.ApplyBefore(oRun); oRunBR.ApplyBefore(oRun);
......
#ifndef _ASC_WIN_API
#define _ASC_WIN_API
#ifndef _WIN32
// from winuser.h ( http://msdn.microsoft.com/en-us/library/windows/desktop/ms724371(v=vs.85).aspx )
#ifndef COLOR_3DDKSHADOW
#define COLOR_3DDKSHADOW 21
#endif
#ifndef COLOR_3DFACE
#define COLOR_3DFACE 15
#endif
#ifndef COLOR_3DHIGHLIGHT
#define COLOR_3DHIGHLIGHT 20
#endif
#ifndef COLOR_3DHILIGHT
#define COLOR_3DHILIGHT 20
#endif
#ifndef COLOR_3DLIGHT
#define COLOR_3DLIGHT 22
#endif
#ifndef COLOR_3DSHADOW
#define COLOR_3DSHADOW 16
#endif
#ifndef COLOR_ACTIVEBORDER
#define COLOR_ACTIVEBORDER 10
#endif
#ifndef COLOR_ACTIVECAPTION
#define COLOR_ACTIVECAPTION 2
#endif
#ifndef COLOR_APPWORKSPACE
#define COLOR_APPWORKSPACE 12
#endif
#ifndef COLOR_BACKGROUND
#define COLOR_BACKGROUND 1
#endif
#ifndef COLOR_BTNFACE
#define COLOR_BTNFACE 15
#endif
#ifndef COLOR_BTNHIGHLIGHT
#define COLOR_BTNHIGHLIGHT 20
#endif
#ifndef COLOR_BTNHILIGHT
#define COLOR_BTNHILIGHT 20
#endif
#ifndef COLOR_BTNSHADOW
#define COLOR_BTNSHADOW 16
#endif
#ifndef COLOR_BTNTEXT
#define COLOR_BTNTEXT 18
#endif
#ifndef COLOR_CAPTIONTEXT
#define COLOR_CAPTIONTEXT 9
#endif
#ifndef COLOR_DESKTOP
#define COLOR_DESKTOP 1
#endif
#ifndef COLOR_GRAYTEXT
#define COLOR_GRAYTEXT 17
#endif
#ifndef COLOR_HIGHLIGHT
#define COLOR_HIGHLIGHT 13
#endif
#ifndef COLOR_HIGHLIGHTTEXT
#define COLOR_HIGHLIGHTTEXT 14
#endif
#ifndef COLOR_HOTLIGHT
#define COLOR_HOTLIGHT 26
#endif
#ifndef COLOR_INACTIVEBORDER
#define COLOR_INACTIVEBORDER 11
#endif
#ifndef COLOR_INACTIVECAPTION
#define COLOR_INACTIVECAPTION 3
#endif
#ifndef COLOR_INACTIVECAPTIONTEXT
#define COLOR_INACTIVECAPTIONTEXT 19
#endif
#ifndef COLOR_INFOBK
#define COLOR_INFOBK 24
#endif
#ifndef COLOR_INFOTEXT
#define COLOR_INFOTEXT 23
#endif
#ifndef COLOR_MENU
#define COLOR_MENU 4
#endif
#ifndef COLOR_GRADIENTACTIVECAPTION
#define COLOR_GRADIENTACTIVECAPTION 27
#endif
#ifndef COLOR_GRADIENTINACTIVECAPTION
#define COLOR_GRADIENTINACTIVECAPTION 28
#endif
#ifndef COLOR_MENUHILIGHT
#define COLOR_MENUHILIGHT 29
#endif
#ifndef COLOR_MENUBAR
#define COLOR_MENUBAR 30
#endif
#ifndef COLOR_MENUTEXT
#define COLOR_MENUTEXT 7
#endif
#ifndef COLOR_SCROLLBAR
#define COLOR_SCROLLBAR 0
#endif
#ifndef COLOR_WINDOW
#define COLOR_WINDOW 5
#endif
#ifndef COLOR_WINDOWFRAME
#define COLOR_WINDOWFRAME 6
#endif
#ifndef COLOR_WINDOWTEXT
#define COLOR_WINDOWTEXT 8
#endif
static DWORD GetSysColor(const int nIndex)
{
// get color values from any windows theme
// http://msdn.microsoft.com/en-us/library/windows/desktop/ms724371(v=vs.85).aspx
// generated by test from: \TeamlabOffice\trunk\ServerComponents\Test\Applications\Tokenize_Test
//***************** GetSysColor values begin (Win7 x64) *****************
DWORD nValue = 0x0;
//***************** GetSysColor values begin (Win7 x64) *****************
switch (nIndex) {
case COLOR_3DDKSHADOW: nValue = 0x696969; break;
case COLOR_3DFACE: nValue = 0xf0f0f0; break;
case COLOR_3DHIGHLIGHT: nValue = 0xffffff; break;
// case COLOR_3DHILIGHT: nValue = 0xffffff; break; // is COLOR_3DHIGHLIGHT
case COLOR_3DLIGHT: nValue = 0xe3e3e3; break;
case COLOR_3DSHADOW: nValue = 0xa0a0a0; break;
case COLOR_ACTIVEBORDER: nValue = 0xb4b4b4; break;
case COLOR_ACTIVECAPTION: nValue = 0xd1b499; break;
case COLOR_APPWORKSPACE: nValue = 0xababab; break;
case COLOR_BACKGROUND: nValue = 0x0; break;
// case COLOR_BTNFACE: nValue = 0xf0f0f0; break; // is COLOR_3DFACE
// case COLOR_BTNHIGHLIGHT: nValue = 0xffffff; break; // is COLOR_3DHIGHLIGHT
// case COLOR_BTNHILIGHT: nValue = 0xffffff; break; // is COLOR_3DHIGHLIGHT
// case COLOR_BTNSHADOW: nValue = 0xa0a0a0; break; // is COLOR_3DSHADOW
case COLOR_BTNTEXT: nValue = 0x0; break;
case COLOR_CAPTIONTEXT: nValue = 0x0; break;
// case COLOR_DESKTOP: nValue = 0x0; break; // is COLOR_BACKGROUND
case COLOR_GRADIENTACTIVECAPTION: nValue = 0xead1b9; break;
case COLOR_GRADIENTINACTIVECAPTION: nValue = 0xf2e4d7; break;
case COLOR_GRAYTEXT: nValue = 0x6d6d6d; break;
case COLOR_HIGHLIGHT: nValue = 0xff9933; break;
case COLOR_HIGHLIGHTTEXT: nValue = 0xffffff; break;
case COLOR_HOTLIGHT: nValue = 0xcc6600; break;
case COLOR_INACTIVEBORDER: nValue = 0xfcf7f4; break;
case COLOR_INACTIVECAPTION: nValue = 0xdbcdbf; break;
case COLOR_INACTIVECAPTIONTEXT: nValue = 0x544e43; break;
case COLOR_INFOBK: nValue = 0xe1ffff; break;
case COLOR_INFOTEXT: nValue = 0x0; break;
case COLOR_MENU: nValue = 0xf0f0f0; break;
case COLOR_MENUHILIGHT: nValue = 0xff9933; break;
case COLOR_MENUBAR: nValue = 0xf0f0f0; break;
case COLOR_MENUTEXT: nValue = 0x0; break;
case COLOR_SCROLLBAR: nValue = 0xc8c8c8; break;
case COLOR_WINDOW: nValue = 0xffffff; break;
case COLOR_WINDOWFRAME: nValue = 0x646464; break;
case COLOR_WINDOWTEXT: nValue = 0x0; break;
default: nValue = 0x0; break;
} // switch (nIndex)
//***************** GetSysColor values end *****************
return nValue;
}
#endif //#ifndef _WIN32
#endif // #ifndef _ASC_WIN_API
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include "SimpleTypes_Base.h" #include "SimpleTypes_Base.h"
#include <stdlib.h> #include <stdlib.h>
#include "../Base/ASCWinAPI.h" // GetSysColor
// Drawing-Main Office Open Xml (20.1.10) // Drawing-Main Office Open Xml (20.1.10)
namespace SimpleTypes namespace SimpleTypes
{ {
...@@ -4530,155 +4531,9 @@ namespace SimpleTypes ...@@ -4530,155 +4531,9 @@ namespace SimpleTypes
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// SystemColorVal 20.1.10.58 (Part 1) // SystemColorVal 20.1.10.58 (Part 1) (included from ASCWinAPI.h)
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// from winuser.h ( http://msdn.microsoft.com/en-us/library/windows/desktop/ms724371(v=vs.85).aspx )
#ifndef COLOR_3DDKSHADOW
#define COLOR_3DDKSHADOW 21
#endif
#ifndef COLOR_3DFACE
#define COLOR_3DFACE 15
#endif
#ifndef COLOR_3DHIGHLIGHT
#define COLOR_3DHIGHLIGHT 20
#endif
#ifndef COLOR_3DHILIGHT
#define COLOR_3DHILIGHT 20
#endif
#ifndef COLOR_3DLIGHT
#define COLOR_3DLIGHT 22
#endif
#ifndef COLOR_3DSHADOW
#define COLOR_3DSHADOW 16
#endif
#ifndef COLOR_ACTIVEBORDER
#define COLOR_ACTIVEBORDER 10
#endif
#ifndef COLOR_ACTIVECAPTION
#define COLOR_ACTIVECAPTION 2
#endif
#ifndef COLOR_APPWORKSPACE
#define COLOR_APPWORKSPACE 12
#endif
#ifndef COLOR_BACKGROUND
#define COLOR_BACKGROUND 1
#endif
#ifndef COLOR_BTNFACE
#define COLOR_BTNFACE 15
#endif
#ifndef COLOR_BTNHIGHLIGHT
#define COLOR_BTNHIGHLIGHT 20
#endif
#ifndef COLOR_BTNHILIGHT
#define COLOR_BTNHILIGHT 20
#endif
#ifndef COLOR_BTNSHADOW
#define COLOR_BTNSHADOW 16
#endif
#ifndef COLOR_BTNTEXT
#define COLOR_BTNTEXT 18
#endif
#ifndef COLOR_CAPTIONTEXT
#define COLOR_CAPTIONTEXT 9
#endif
#ifndef COLOR_DESKTOP
#define COLOR_DESKTOP 1
#endif
#ifndef COLOR_GRAYTEXT
#define COLOR_GRAYTEXT 17
#endif
#ifndef COLOR_HIGHLIGHT
#define COLOR_HIGHLIGHT 13
#endif
#ifndef COLOR_HIGHLIGHTTEXT
#define COLOR_HIGHLIGHTTEXT 14
#endif
#ifndef COLOR_HOTLIGHT
#define COLOR_HOTLIGHT 26
#endif
#ifndef COLOR_INACTIVEBORDER
#define COLOR_INACTIVEBORDER 11
#endif
#ifndef COLOR_INACTIVECAPTION
#define COLOR_INACTIVECAPTION 3
#endif
#ifndef COLOR_INACTIVECAPTIONTEXT
#define COLOR_INACTIVECAPTIONTEXT 19
#endif
#ifndef COLOR_INFOBK
#define COLOR_INFOBK 24
#endif
#ifndef COLOR_INFOTEXT
#define COLOR_INFOTEXT 23
#endif
#ifndef COLOR_MENU
#define COLOR_MENU 4
#endif
#ifndef COLOR_GRADIENTACTIVECAPTION
#define COLOR_GRADIENTACTIVECAPTION 27
#endif
#ifndef COLOR_GRADIENTINACTIVECAPTION
#define COLOR_GRADIENTINACTIVECAPTION 28
#endif
#ifndef COLOR_MENUHILIGHT
#define COLOR_MENUHILIGHT 29
#endif
#ifndef COLOR_MENUBAR
#define COLOR_MENUBAR 30
#endif
#ifndef COLOR_MENUTEXT
#define COLOR_MENUTEXT 7
#endif
#ifndef COLOR_SCROLLBAR
#define COLOR_SCROLLBAR 0
#endif
#ifndef COLOR_WINDOW
#define COLOR_WINDOW 5
#endif
#ifndef COLOR_WINDOWFRAME
#define COLOR_WINDOWFRAME 6
#endif
#ifndef COLOR_WINDOWTEXT
#define COLOR_WINDOWTEXT 8
#endif
enum ESystemColorVal enum ESystemColorVal
...@@ -4846,60 +4701,6 @@ namespace SimpleTypes ...@@ -4846,60 +4701,6 @@ namespace SimpleTypes
return m_unA; return m_unA;
} }
#ifndef _WIN32
static DWORD GetSysColor(const int nIndex)
{
// get color values from any windows theme
// http://msdn.microsoft.com/en-us/library/windows/desktop/ms724371(v=vs.85).aspx
// generated by test from: \TeamlabOffice\trunk\ServerComponents\Test\Applications\Tokenize_Test
//***************** GetSysColor values begin (Win7 x64) *****************
DWORD nValue = 0x0;
//***************** GetSysColor values begin (Win7 x64) *****************
switch (nIndex) {
case COLOR_3DDKSHADOW: nValue = 0x696969; break;
case COLOR_3DFACE: nValue = 0xf0f0f0; break;
case COLOR_3DHIGHLIGHT: nValue = 0xffffff; break;
// case COLOR_3DHILIGHT: nValue = 0xffffff; break; // is COLOR_3DHIGHLIGHT
case COLOR_3DLIGHT: nValue = 0xe3e3e3; break;
case COLOR_3DSHADOW: nValue = 0xa0a0a0; break;
case COLOR_ACTIVEBORDER: nValue = 0xb4b4b4; break;
case COLOR_ACTIVECAPTION: nValue = 0xd1b499; break;
case COLOR_APPWORKSPACE: nValue = 0xababab; break;
case COLOR_BACKGROUND: nValue = 0x0; break;
// case COLOR_BTNFACE: nValue = 0xf0f0f0; break; // is COLOR_3DFACE
// case COLOR_BTNHIGHLIGHT: nValue = 0xffffff; break; // is COLOR_3DHIGHLIGHT
// case COLOR_BTNHILIGHT: nValue = 0xffffff; break; // is COLOR_3DHIGHLIGHT
// case COLOR_BTNSHADOW: nValue = 0xa0a0a0; break; // is COLOR_3DSHADOW
case COLOR_BTNTEXT: nValue = 0x0; break;
case COLOR_CAPTIONTEXT: nValue = 0x0; break;
// case COLOR_DESKTOP: nValue = 0x0; break; // is COLOR_BACKGROUND
case COLOR_GRADIENTACTIVECAPTION: nValue = 0xead1b9; break;
case COLOR_GRADIENTINACTIVECAPTION: nValue = 0xf2e4d7; break;
case COLOR_GRAYTEXT: nValue = 0x6d6d6d; break;
case COLOR_HIGHLIGHT: nValue = 0xff9933; break;
case COLOR_HIGHLIGHTTEXT: nValue = 0xffffff; break;
case COLOR_HOTLIGHT: nValue = 0xcc6600; break;
case COLOR_INACTIVEBORDER: nValue = 0xfcf7f4; break;
case COLOR_INACTIVECAPTION: nValue = 0xdbcdbf; break;
case COLOR_INACTIVECAPTIONTEXT: nValue = 0x544e43; break;
case COLOR_INFOBK: nValue = 0xe1ffff; break;
case COLOR_INFOTEXT: nValue = 0x0; break;
case COLOR_MENU: nValue = 0xf0f0f0; break;
case COLOR_MENUHILIGHT: nValue = 0xff9933; break;
case COLOR_MENUBAR: nValue = 0xf0f0f0; break;
case COLOR_MENUTEXT: nValue = 0x0; break;
case COLOR_SCROLLBAR: nValue = 0xc8c8c8; break;
case COLOR_WINDOW: nValue = 0xffffff; break;
case COLOR_WINDOWFRAME: nValue = 0x646464; break;
case COLOR_WINDOWTEXT: nValue = 0x0; break;
default: nValue = 0x0; break;
} // switch (nIndex)
//***************** GetSysColor values end *****************
return nValue;
}
#endif
void SetRGBASys(int nIndex) void SetRGBASys(int nIndex)
{ {
DWORD dwRGB = GetSysColor(nIndex); DWORD dwRGB = GetSysColor(nIndex);
......
...@@ -691,6 +691,12 @@ namespace CDirectory ...@@ -691,6 +691,12 @@ namespace CDirectory
fwrite (aContentUtf8.c_str() , sizeof(char), aContentUtf8.size(), pFile); fwrite (aContentUtf8.c_str() , sizeof(char), aContentUtf8.size(), pFile);
fclose (pFile); fclose (pFile);
} }
static CString ToString(DWORD val)
{
CString str = _T("");
str.Format(_T("%d"), (LONG)val);
return str;
}
} }
#endif #endif
...@@ -521,6 +521,13 @@ namespace XmlUtils ...@@ -521,6 +521,13 @@ namespace XmlUtils
return nRes; return nRes;
} }
CXmlNode CXmlNode::ReadNode(const TCHAR* strNodeName)
{
CXmlNode oNode;
CString sNodeName = strNodeName;
GetNode(sNodeName, oNode);
return oNode;
}
CXmlNode CXmlNode::ReadNode(const CString& strNodeName) CXmlNode CXmlNode::ReadNode(const CString& strNodeName)
{ {
CXmlNode oNode; CXmlNode oNode;
......
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