Commit 2b8bb48c authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

необходимо...

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58696 954022d7-b5bf-4e40-9824-e11837661b57
parent 70994c02
......@@ -996,6 +996,10 @@
RelativePath="..\Source\Common\SimpleTypes_Vml.h"
>
</File>
<File
RelativePath="..\Source\Common\SimpleTypes_Word.cpp"
>
</File>
<File
RelativePath="..\Source\Common\SimpleTypes_Word.h"
>
......
#include "SimpleTypes_Word.h"
namespace SimpleTypes
{
template<>
EHexColor CHexColor<EHexColor::hexcolorAuto>::FromString (CString &sValue)
{
if ( _T("auto") == sValue || _T("none") == sValue )
this->m_eValue = hexcolorAuto;
else
{
// , , word .
//CHighlightColor<highlightcolorNone> oHighlightColor(sValue);
CHighlightColor<> oHighlightColor(sValue);
if(SimpleTypes::highlightcolorNone != oHighlightColor.GetValue())
{
this->m_eValue = hexcolorRGB;
m_unR = oHighlightColor.Get_R();
m_unG = oHighlightColor.Get_G();
m_unB = oHighlightColor.Get_B();
}
else if ( 6 <= sValue.GetLength() )
{
this->m_eValue = hexcolorRGB;
m_sValue = sValue.Mid( 0, 6 );
Parse();
}
else if ( 3 == sValue.GetLength() )// a la #339 (Compo 3AP.docx)
{
this->m_eValue = hexcolorRGB;
m_sValue = sValue;
Parse3();
}
else this->m_eValue = EHexColor::hexcolorAuto;//eDefValue;
}
return this->m_eValue;
}
template<>
EHexColor CHexColor<EHexColor::hexcolorRGB>::FromString (CString &sValue)
{
if ( _T("auto") == sValue || _T("none") == sValue )
this->m_eValue = hexcolorAuto;
else
{
// , , word .
//CHighlightColor<highlightcolorNone> oHighlightColor(sValue);
CHighlightColor<> oHighlightColor(sValue);
if(SimpleTypes::highlightcolorNone != oHighlightColor.GetValue())
{
this->m_eValue = hexcolorRGB;
m_unR = oHighlightColor.Get_R();
m_unG = oHighlightColor.Get_G();
m_unB = oHighlightColor.Get_B();
}
else if ( 6 <= sValue.GetLength() )
{
this->m_eValue = hexcolorRGB;
m_sValue = sValue.Mid( 0, 6 );
Parse();
}
else if ( 3 == sValue.GetLength() )// a la #339 (Compo 3AP.docx)
{
this->m_eValue = hexcolorRGB;
m_sValue = sValue;
Parse3();
}
else this->m_eValue = EHexColor::hexcolorAuto;//eDefValue;
}
return this->m_eValue;
}
} // SimpleTypes
......@@ -2571,41 +2571,7 @@ namespace SimpleTypes
void SetColorByString ();
virtual EHexColor FromString(CString &sValue)
{
if ( _T("auto") == sValue || _T("none") == sValue )
this->m_eValue = hexcolorAuto;
else
{
// , , word .
//CHighlightColor<highlightcolorNone> oHighlightColor(sValue);
CHighlightColor<> oHighlightColor(sValue);
if(SimpleTypes::highlightcolorNone != oHighlightColor.GetValue())
{
this->m_eValue = hexcolorRGB;
m_unR = oHighlightColor.Get_R();
m_unG = oHighlightColor.Get_G();
m_unB = oHighlightColor.Get_B();
}
else if ( 6 <= sValue.GetLength() )
{
this->m_eValue = hexcolorRGB;
m_sValue = sValue.Mid( 0, 6 );
Parse();
}
else if ( 3 == sValue.GetLength() )// a la #339 (Compo 3AP.docx)
{
this->m_eValue = hexcolorRGB;
m_sValue = sValue;
Parse3();
}
else this->m_eValue = hexcolorAuto;//eDefValue;
}
return this->m_eValue;
}
virtual EHexColor FromString(CString &sValue);
virtual CString ToString () 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