Commit a6a3734f authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander Trofimov

x2t linux 64 build (libUnicodeConverter.so пересобран потому что в Revision:...

x2t linux 64 build (libUnicodeConverter.so пересобран потому что в Revision: 65221 зависимости от ucnv_open_52)


git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@65240 954022d7-b5bf-4e40-9824-e11837661b57
parent 15399c64
......@@ -20,7 +20,7 @@
#include "../../../../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTShape/ElementSettings.h"
#include "../../../../DesktopEditor/raster/BgraFrame.h"
#include "../../../../Common/DocxFormat/source/Base/Types_32.h"
#include "../../../../Common/DocxFormat/Source/Base/Types_32.h"
const double EMU_MM = 36000;
......@@ -76,10 +76,10 @@ public:
CShape* pShape = &pElement->m_oShape;
CColor color;
unsigned short nParameter = (unsigned short)(( nColorCode >> 16 ) & 0x00ff); // the HiByte of nParameter is not zero, an exclusive AND is helping :o
unsigned short nFunctionBits = (unsigned short)(( nColorCode & 0x00000f00 ) >> 8 );
unsigned short nAdditionalFlags = (unsigned short)(( nColorCode & 0x0000f000) >> 8 );
unsigned short nColorIndex = (unsigned short) ( nColorCode & 0x00ff);
unsigned short nParameter = (unsigned short)(( nColorCode >> 16 ) & 0x00ff); // the HiByte of nParameter is not zero, an exclusive AND is helping :o
unsigned short nFunctionBits = (unsigned short)(( nColorCode & 0x00000f00 ) >> 8 );
unsigned short nAdditionalFlags = (unsigned short)(( nColorCode & 0x0000f000) >> 8 );
unsigned short nColorIndex = (unsigned short) ( nColorCode & 0x00ff);
unsigned short nPropColor = 0;
switch (nColorIndex)
......@@ -110,79 +110,79 @@ public:
color = pTheme->m_arColorScheme[color.m_lSchemeIndex];
}
//if ( nCProp && ( nPropColor & 0x10000000 ) == 0 ) // beware of looping recursive
// color = CorrectSysColor( nPropColor, pShape);
if( nAdditionalFlags & 0x80 ) // make color gray
{
BYTE nZwi = 0x7f;//= aColor.GetLuminance();
color.SetRGB(nZwi, nZwi, nZwi);
}
switch( nFunctionBits )
{
case 0x01 : // darken color by parameter
{
color.SetR ( static_cast<BYTE> ( ( nParameter * color.GetR() ) >> 8 ) );
color.SetG ( static_cast<BYTE> ( ( nParameter * color.GetG() ) >> 8 ) );
color.SetB ( static_cast<BYTE> ( ( nParameter * color.GetB() ) >> 8 ) );
}
break;
case 0x02 : // lighten color by parameter
{
unsigned short nInvParameter = ( 0x00ff - nParameter ) * 0xff;
color.SetR( static_cast<BYTE>( ( nInvParameter + ( nParameter * color.GetR() ) ) >> 8 ) );
color.SetG( static_cast<BYTE>( ( nInvParameter + ( nParameter * color.GetG() ) ) >> 8 ) );
color.SetB( static_cast<BYTE>( ( nInvParameter + ( nParameter * color.GetB() ) ) >> 8 ) );
}
break;
case 0x03 : // add grey level RGB(p,p,p)
{
short nR = (short)color.GetR() + (short)nParameter;
short nG = (short)color.GetG() + (short)nParameter;
short nB = (short)color.GetB() + (short)nParameter;
if ( nR > 0x00ff ) nR = 0x00ff;
if ( nG > 0x00ff ) nG = 0x00ff;
if ( nB > 0x00ff ) nB = 0x00ff;
color.SetRGB( (BYTE)nR, (BYTE)nG, (BYTE)nB );
}
break;
case 0x04 : // substract grey level RGB(p,p,p)
{
short nR = (short)color.GetR() - (short)nParameter;
short nG = (short)color.GetG() - (short)nParameter;
short nB = (short)color.GetB() - (short)nParameter;
if ( nR < 0 ) nR = 0;
if ( nG < 0 ) nG = 0;
if ( nB < 0 ) nB = 0;
color.SetRGB( (BYTE)nR, (BYTE)nG, (BYTE)nB );
}
break;
case 0x05 : // substract from gray level RGB(p,p,p)
{
short nR = (short)nParameter - (short)color.GetR();
short nG = (short)nParameter - (short)color.GetG();
short nB = (short)nParameter - (short)color.GetB();
if ( nR < 0 ) nR = 0;
if ( nG < 0 ) nG = 0;
if ( nB < 0 ) nB = 0;
color.SetRGB( (BYTE)nR, (BYTE)nG, (BYTE)nB );
}
break;
case 0x06 : // per component: black if < p, white if >= p
{
color.SetR( color.GetR() < nParameter ? 0x00 : 0xff );
color.SetG( color.GetG() < nParameter ? 0x00 : 0xff );
color.SetB( color.GetB() < nParameter ? 0x00 : 0xff );
}
break;
}
if ( nAdditionalFlags & 0x40 ) // top-bit invert
color.SetRGB( color.GetR() ^ 0x80, color.GetG() ^ 0x80, color.GetB() ^ 0x80 );
if ( nAdditionalFlags & 0x20 ) // invert color
color.SetRGB(0xff - color.GetR(), 0xff - color.GetG(), 0xff - color.GetB());
//if ( nCProp && ( nPropColor & 0x10000000 ) == 0 ) // beware of looping recursive
// color = CorrectSysColor( nPropColor, pShape);
if( nAdditionalFlags & 0x80 ) // make color gray
{
BYTE nZwi = 0x7f;//= aColor.GetLuminance();
color.SetRGB(nZwi, nZwi, nZwi);
}
switch( nFunctionBits )
{
case 0x01 : // darken color by parameter
{
color.SetR ( static_cast<BYTE> ( ( nParameter * color.GetR() ) >> 8 ) );
color.SetG ( static_cast<BYTE> ( ( nParameter * color.GetG() ) >> 8 ) );
color.SetB ( static_cast<BYTE> ( ( nParameter * color.GetB() ) >> 8 ) );
}
break;
case 0x02 : // lighten color by parameter
{
unsigned short nInvParameter = ( 0x00ff - nParameter ) * 0xff;
color.SetR( static_cast<BYTE>( ( nInvParameter + ( nParameter * color.GetR() ) ) >> 8 ) );
color.SetG( static_cast<BYTE>( ( nInvParameter + ( nParameter * color.GetG() ) ) >> 8 ) );
color.SetB( static_cast<BYTE>( ( nInvParameter + ( nParameter * color.GetB() ) ) >> 8 ) );
}
break;
case 0x03 : // add grey level RGB(p,p,p)
{
short nR = (short)color.GetR() + (short)nParameter;
short nG = (short)color.GetG() + (short)nParameter;
short nB = (short)color.GetB() + (short)nParameter;
if ( nR > 0x00ff ) nR = 0x00ff;
if ( nG > 0x00ff ) nG = 0x00ff;
if ( nB > 0x00ff ) nB = 0x00ff;
color.SetRGB( (BYTE)nR, (BYTE)nG, (BYTE)nB );
}
break;
case 0x04 : // substract grey level RGB(p,p,p)
{
short nR = (short)color.GetR() - (short)nParameter;
short nG = (short)color.GetG() - (short)nParameter;
short nB = (short)color.GetB() - (short)nParameter;
if ( nR < 0 ) nR = 0;
if ( nG < 0 ) nG = 0;
if ( nB < 0 ) nB = 0;
color.SetRGB( (BYTE)nR, (BYTE)nG, (BYTE)nB );
}
break;
case 0x05 : // substract from gray level RGB(p,p,p)
{
short nR = (short)nParameter - (short)color.GetR();
short nG = (short)nParameter - (short)color.GetG();
short nB = (short)nParameter - (short)color.GetB();
if ( nR < 0 ) nR = 0;
if ( nG < 0 ) nG = 0;
if ( nB < 0 ) nB = 0;
color.SetRGB( (BYTE)nR, (BYTE)nG, (BYTE)nB );
}
break;
case 0x06 : // per component: black if < p, white if >= p
{
color.SetR( color.GetR() < nParameter ? 0x00 : 0xff );
color.SetG( color.GetG() < nParameter ? 0x00 : 0xff );
color.SetB( color.GetB() < nParameter ? 0x00 : 0xff );
}
break;
}
if ( nAdditionalFlags & 0x40 ) // top-bit invert
color.SetRGB( color.GetR() ^ 0x80, color.GetG() ^ 0x80, color.GetB() ^ 0x80 );
if ( nAdditionalFlags & 0x20 ) // invert color
color.SetRGB(0xff - color.GetR(), 0xff - color.GetG(), 0xff - color.GetB());
return color;
}
......@@ -757,12 +757,12 @@ public:
unsigned short nElems;
nElems = pProperty->m_lValue;
_INT32* compl = (_INT32*)pProperty->m_pOptions;
_INT32* pCompl = (_INT32*)pProperty->m_pOptions;
while(nElems--)
{
_a a1;
a1.color = *compl; compl++;
a1.position = *compl; compl++;
a1.color = *pCompl; pCompl++;
a1.position = *pCompl; pCompl++;
colors.push_back(a1);
}
......
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