init repo
This commit is contained in:
452
ActiveX/Common/OfficeDrawing/AnimationTypes.cpp
Normal file
452
ActiveX/Common/OfficeDrawing/AnimationTypes.cpp
Normal file
@@ -0,0 +1,452 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "AnimationTypes.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#pragma region _MACROSES_
|
||||
|
||||
#define GET_ENUM_STRING(NAME,VALUE) \
|
||||
case TL_##NAME##VALUE: \
|
||||
return CString(_T("TL_")) + CString(_T(#NAME)) + CString(#VALUE); \
|
||||
break;
|
||||
|
||||
#define GET_EFFECT_NAME_BY_ID(VALUE,DESCRIPTION) \
|
||||
case (##VALUE) : return CString(_T(#DESCRIPTION)); break;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
namespace Animations
|
||||
{
|
||||
CString ODHelpers::GetTimePropertyID4TimeNode ( TimePropertyID4TimeNode Value )
|
||||
{
|
||||
switch ( Value )
|
||||
{
|
||||
GET_ENUM_STRING ( TPID_, Display );
|
||||
GET_ENUM_STRING ( TPID_, MasterPos );
|
||||
GET_ENUM_STRING ( TPID_, SlaveType );
|
||||
GET_ENUM_STRING ( TPID_, EffectID );
|
||||
GET_ENUM_STRING ( TPID_, EffectDir );
|
||||
GET_ENUM_STRING ( TPID_, AfterEffect );
|
||||
GET_ENUM_STRING ( TPID_, SlideCount );
|
||||
GET_ENUM_STRING ( TPID_, TimeFilter );
|
||||
GET_ENUM_STRING ( TPID_, EventFilter );
|
||||
GET_ENUM_STRING ( TPID_, HideWhenStopped );
|
||||
GET_ENUM_STRING ( TPID_, GroupID );
|
||||
GET_ENUM_STRING ( TPID_, EffectNodeType );
|
||||
GET_ENUM_STRING ( TPID_, PlaceholderNode );
|
||||
GET_ENUM_STRING ( TPID_, MediaVolume );
|
||||
GET_ENUM_STRING ( TPID_, MediaMute );
|
||||
GET_ENUM_STRING ( TPID_, ZoomToFullScreen );
|
||||
|
||||
default:
|
||||
return CString ( _T("TimePropertyID4TimeNode : Unknown Enum") );
|
||||
}
|
||||
};
|
||||
|
||||
CString ODHelpers::GetTimeVariantTypeEnum ( TimeVariantTypeEnum Value )
|
||||
{
|
||||
switch ( Value )
|
||||
{
|
||||
GET_ENUM_STRING ( TVT_, Bool );
|
||||
GET_ENUM_STRING ( TVT_, Int );
|
||||
GET_ENUM_STRING ( TVT_, Float );
|
||||
GET_ENUM_STRING ( TVT_, String );
|
||||
|
||||
default:
|
||||
return CString ( _T("TimeVariantTypeEnum : Unknown Enum") );
|
||||
}
|
||||
};
|
||||
|
||||
CString ODHelpers::GetTimeNodeTypeEnum ( TimeNodeTypeEnum Value )
|
||||
{
|
||||
switch ( Value )
|
||||
{
|
||||
GET_ENUM_STRING ( TNT_, Parallel );
|
||||
GET_ENUM_STRING ( TNT_, Sequential );
|
||||
GET_ENUM_STRING ( TNT_, Behavior );
|
||||
GET_ENUM_STRING ( TNT_, Media );
|
||||
|
||||
default:
|
||||
return CString ( _T("TimeNodeTypeEnum : Unknown Enum") );
|
||||
}
|
||||
};
|
||||
|
||||
CString ODHelpers::GetTriggerObjectEnum ( TriggerObjectEnum Value )
|
||||
{
|
||||
switch ( Value )
|
||||
{
|
||||
GET_ENUM_STRING ( TOT_, None );
|
||||
GET_ENUM_STRING ( TOT_, VisualElement );
|
||||
GET_ENUM_STRING ( TOT_, TimeNode );
|
||||
GET_ENUM_STRING ( TOT_, RuntimeNodeRef );
|
||||
|
||||
default:
|
||||
return CString ( _T("TriggerObjectEnum : Unknown Enum") );
|
||||
}
|
||||
}
|
||||
|
||||
CString ODHelpers::GetTimeVisualElementEnum ( TimeVisualElementEnum Value )
|
||||
{
|
||||
switch ( Value )
|
||||
{
|
||||
GET_ENUM_STRING ( TVET_, Shape );
|
||||
GET_ENUM_STRING ( TVET_, Page );
|
||||
GET_ENUM_STRING ( TVET_, TextRange );
|
||||
GET_ENUM_STRING ( TVET_, Audio );
|
||||
GET_ENUM_STRING ( TVET_, Video );
|
||||
GET_ENUM_STRING ( TVET_, ChartElement );
|
||||
GET_ENUM_STRING ( TVET_, ShapeOnly );
|
||||
GET_ENUM_STRING ( TVET_, AllTextRange );
|
||||
|
||||
default:
|
||||
return CString ( _T("TimeVisualElementEnum : Unknown Enum") );
|
||||
}
|
||||
}
|
||||
|
||||
CString ODHelpers::GetElementTypeEnum ( ElementTypeEnum Value )
|
||||
{
|
||||
switch ( Value )
|
||||
{
|
||||
GET_ENUM_STRING ( ET_, ShapeType );
|
||||
GET_ENUM_STRING ( ET_, SoundType );
|
||||
|
||||
default:
|
||||
return CString ( _T("ElementTypeEnum : Unknown Enum") );
|
||||
}
|
||||
}
|
||||
|
||||
CString ODHelpers::GetTimeAnimateBehaviorValueTypeEnum ( TimeAnimateBehaviorValueTypeEnum Value )
|
||||
{
|
||||
switch ( Value )
|
||||
{
|
||||
GET_ENUM_STRING ( TABVT_, String );
|
||||
GET_ENUM_STRING ( TABVT_, Number );
|
||||
GET_ENUM_STRING ( TABVT_, Color );
|
||||
|
||||
default:
|
||||
return CString ( _T("TimeAnimateBehaviorValueTypeEnum : Unknown Enum") );
|
||||
}
|
||||
}
|
||||
|
||||
CString ODHelpers::IntToHexString ( DWORD Value )
|
||||
{
|
||||
TCHAR buffer [ 16 ];
|
||||
_stprintf ( buffer, _T("0x%.8x"), Value );
|
||||
return CString ( buffer );
|
||||
}
|
||||
|
||||
CString ODHelpers::DoubleToString ( double Value )
|
||||
{
|
||||
TCHAR buffer [ 16 ];
|
||||
_stprintf ( buffer, _T("%f"), Value );
|
||||
return CString ( buffer );
|
||||
}
|
||||
CString ODHelpers::IntToString ( int Value )
|
||||
{
|
||||
TCHAR buffer [ 16 ];
|
||||
_stprintf ( buffer, _T("%d"), Value );
|
||||
return CString ( buffer );
|
||||
}
|
||||
CString ODHelpers::GetAnimationClassName ( AnimationsClassType Value )
|
||||
{
|
||||
switch ( Value )
|
||||
{
|
||||
case Animations::RT_TimeNode:
|
||||
return CString (_T("TimeNodeAtom") );
|
||||
|
||||
case Animations::RT_TimePropertyList:
|
||||
return CString (_T("TimePropertyList4TimeNodeContainer"));
|
||||
|
||||
case Animations::RT_TimeExtTimeNodeContainer:
|
||||
return CString (_T("ExtTimeNodeContainer"));
|
||||
|
||||
case Animations::RT_SlideTime10Atom :
|
||||
return CString (_T("SlideTime10Atom"));
|
||||
|
||||
case Animations::RT_SlideFlags10Atom:
|
||||
return CString (_T("SlideFlags10Atom"));
|
||||
|
||||
case Animations::RT_HashCodeAtom:
|
||||
return CString (_T("HashCode10Atom"));
|
||||
|
||||
case Animations::RT_TimeSequenceData:
|
||||
return CString (_T("TimeSequenceDataAtom"));
|
||||
|
||||
case Animations::RT_TimeConditionContainer:
|
||||
return CString (_T("TimeConditionContainer"));
|
||||
|
||||
case Animations::RT_TimeCondition:
|
||||
return CString (_T("TimeConditionAtom"));
|
||||
}
|
||||
|
||||
return CString (_T(""));
|
||||
}
|
||||
|
||||
CString ODHelpers::GetEffectTypeOfGroup ( DWORD Value )
|
||||
{
|
||||
if ( 0x00000001 == Value )
|
||||
return CString ( _T("Entrance") );
|
||||
if ( 0x00000002 == Value )
|
||||
return CString ( _T("Exit") );
|
||||
if ( 0x00000003 == Value )
|
||||
return CString ( _T("Emphasis") );
|
||||
if ( 0x00000004 == Value )
|
||||
return CString ( _T("MotionPath") );
|
||||
if ( 0x00000005 == Value )
|
||||
return CString ( _T("ActionVerb") );
|
||||
if ( 0x00000006 == Value )
|
||||
return CString ( _T("MediaCommand") );
|
||||
|
||||
return CString ( _T("") );
|
||||
}
|
||||
|
||||
CString ODHelpers::GetEffectEntranceOrExitNameByID ( DWORD EffectID )
|
||||
{
|
||||
switch ( EffectID )
|
||||
{
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000000, Custom );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000001, Appear );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000002, FlyIn );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000003, Blinds );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000004, Box );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000005, CheckBoard );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000006, Circle );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000007, Crawl );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000008, Diamond );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000009, Dissolve );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000000A, Fade );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000000B, FlashOnce );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000000C, Peek );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000000D, Plus );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000000E, RandomBars );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000000F, Spiral );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000010, Split );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000011, Stretch );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000012, Strips );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000013, Swivel );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000014, Wedge );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000015, Wheel );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000016, Wipe );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000017, Zoom );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000018, RandomEffects );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000019, Boomerang );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001A, Bounce );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001B, ColorReveal );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001C, Credits );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001D, EaseIn );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001E, Float );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001F, GrowAndTurn );
|
||||
|
||||
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000022, LightSpeed );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000023, PinWheel );
|
||||
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000025, RiseUp );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000026, Swish );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000027, ThinLine );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000028, Unfold );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000029, Whip );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000002A, Ascend );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000002B, CenterRevolve );
|
||||
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000002D, FadedSwivel );
|
||||
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000002F, Descend );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000030, Sling );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000031, Spinner );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000032, Compress );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000033, Zip );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000034, ArcUp );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000035, FadedZoom );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000036, Glide );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000037, Expand );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000038, Flip );
|
||||
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000003A, Fold );
|
||||
default :
|
||||
break;
|
||||
}
|
||||
return CString(_T("Unknown EffectID"));
|
||||
}
|
||||
|
||||
|
||||
CString ODHelpers::GetEffectEmphasisNameByID ( DWORD EffectID )
|
||||
{
|
||||
switch ( EffectID )
|
||||
{
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000001, ChangeFillColor );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000002, ChangeFont );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000003, ChangeFillColor );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000004, ChangeFontSize );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000005, ChangeFontStyle );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000006, GrowAndShrink );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000007, ChangeFillColor );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000008, Spin );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000009, Transparency );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000000A, BoldFlash );
|
||||
|
||||
|
||||
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000000E, Blast );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000000F, BoldReveal );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000010, BrushOnColor );
|
||||
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000012, BrushOnUnderline );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000013, ColorBlend );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000014, ColorWave );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000015, ComplementaryColor );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000016, ComplementaryColor2 );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000017, ContrastingColor );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000018, Darken );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000019, Desaturate );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001A, FlashBulb );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001B, Flicker );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001C, GrowWithColor );
|
||||
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001E, Lighten );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001F, StyleEmphasis );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000020, Teeter );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000021, VerticalGrow );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000022, Wave );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000023, Blink );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000024, Shimmer );
|
||||
default :
|
||||
break;
|
||||
}
|
||||
return CString(_T("Unknown EffectID"));
|
||||
}
|
||||
|
||||
CString ODHelpers::GetEffectMotionPathNameByID ( DWORD EffectID )
|
||||
{
|
||||
switch ( EffectID )
|
||||
{
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000000, Custom );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000001, Circle );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000002, RightTriangle );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000003, Diamond );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000004, Hexagon );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000005, FivePointStar );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000006, CrescentMoon );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000007, Square );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000008, Trapezoid );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000009, Heart );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000000A, Octagon );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000000B, SixPointStar );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000000C, Football );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000000D, EqualTriangle );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000000E, Parallelogram );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000000F, Pentagon );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000010, FourPointStar );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000011, EightPointStar );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000012, Teardrop );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000013, PointyStar );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000014, CurvedSquare );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000015, CurvedX );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000016, VerticalFigure8 );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000017, CurvyStar );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000018, LoopDeLoop );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000019, BuzzSaw );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001A, HorizontalFigure8 );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001B, Peanut );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001C, Figure8four );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001D, Neutron );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001E, Swoosh );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000001F, Bean );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000020, Plus );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000021, InvertedTriangle );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000022, InvertedSquare );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000023, Left );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000024, TurnRight );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000025, ArcDown );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000026, Zigzag );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000027, SCurve2 );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000028, SineWave );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000029, BounceLeft );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000002A, Down );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000002B, TurnUp );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000002C, ArcUp );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000002D, HeartBeat );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000002E, SpiralRight );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000002F, Wave );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000030, CurvyLeft );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000031, DiagonalDownRight );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000032, TurnDown );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000033, ArcLeft );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000034, Funnel );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000035, Spring );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000036, BounceRight );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000037, SpiralLeft );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000038, DiagonalUpRight );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000039, TurnUpRight );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000003A, ArcRight );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000003B, Scurve1 );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000003C, DecayingWave );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000003D, CurvyRight );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000003E, StairsDown );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x0000003F, Right );
|
||||
GET_EFFECT_NAME_BY_ID ( 0x00000040, Up );
|
||||
default :
|
||||
break;
|
||||
}
|
||||
return CString(_T("Unknown EffectID"));
|
||||
}
|
||||
|
||||
CString ODHelpers::GetEffectNameByID ( DWORD EffectType, DWORD EffectID )
|
||||
{
|
||||
switch ( EffectType )
|
||||
{
|
||||
case 0x00000001:
|
||||
case 0x00000002:
|
||||
return Animations::ODHelpers::GetEffectEntranceOrExitNameByID ( EffectID );
|
||||
break;
|
||||
case 0x00000003:
|
||||
return Animations::ODHelpers::GetEffectEmphasisNameByID ( EffectID );
|
||||
break;
|
||||
case 0x00000004:
|
||||
return Animations::ODHelpers::GetEffectMotionPathNameByID ( EffectID );
|
||||
break;
|
||||
case 0x00000005:
|
||||
case 0x00000006:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return CString ( _T("") );
|
||||
}
|
||||
}
|
||||
1457
ActiveX/Common/OfficeDrawing/AnimationTypes.h
Normal file
1457
ActiveX/Common/OfficeDrawing/AnimationTypes.h
Normal file
File diff suppressed because it is too large
Load Diff
879
ActiveX/Common/OfficeDrawing/Attributes.h
Normal file
879
ActiveX/Common/OfficeDrawing/Attributes.h
Normal file
@@ -0,0 +1,879 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "Enums.h"
|
||||
#include "File.h"
|
||||
|
||||
#include "gdiplus.h"
|
||||
#include "CommonZLib.h"
|
||||
using namespace Gdiplus;
|
||||
|
||||
class CExFilesInfo
|
||||
{
|
||||
public:
|
||||
enum ExFilesType
|
||||
{
|
||||
eftNone = 0,
|
||||
eftVideo = 1,
|
||||
eftAudio = 2
|
||||
};
|
||||
|
||||
public:
|
||||
ExFilesType m_eType;
|
||||
CString m_strFilePath;
|
||||
CString m_strPresentationDirectory;
|
||||
|
||||
|
||||
double m_dStartTime;
|
||||
double m_dEndTime;
|
||||
|
||||
|
||||
bool m_bLoop;
|
||||
|
||||
public:
|
||||
CExFilesInfo()
|
||||
{
|
||||
m_eType = eftNone;
|
||||
m_strFilePath = _T("");
|
||||
m_strPresentationDirectory = _T("");
|
||||
|
||||
m_dStartTime = 0.0;
|
||||
m_dEndTime = -1.0;
|
||||
|
||||
m_bLoop = false;
|
||||
}
|
||||
CExFilesInfo(const CExFilesInfo& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
CExFilesInfo& operator=(const CExFilesInfo& oSrc)
|
||||
{
|
||||
m_eType = oSrc.m_eType;
|
||||
m_strFilePath = oSrc.m_strFilePath;
|
||||
|
||||
m_strPresentationDirectory = oSrc.m_strPresentationDirectory;
|
||||
|
||||
m_dStartTime = oSrc.m_dStartTime;
|
||||
m_dEndTime = oSrc.m_dEndTime;
|
||||
|
||||
m_bLoop = oSrc.m_bLoop;
|
||||
|
||||
return *this;
|
||||
}
|
||||
CExFilesInfo& operator=(const int& oSrc)
|
||||
{
|
||||
m_eType = eftNone;
|
||||
m_strFilePath = _T("");
|
||||
m_strPresentationDirectory = _T("");
|
||||
|
||||
m_dStartTime = 0.0;
|
||||
m_dEndTime = -1.0;
|
||||
|
||||
m_bLoop = false;
|
||||
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
namespace NSAttributes
|
||||
{
|
||||
|
||||
static void CorrectXmlString(CString& strText)
|
||||
{
|
||||
strText.Replace(L"&", L"&");
|
||||
strText.Replace(L"/", L"\\");
|
||||
strText.Replace(L"%20", L" ");
|
||||
strText.Replace(L"'", L"'");
|
||||
strText.Replace(L"<", L"<");
|
||||
strText.Replace(L">", L">");
|
||||
strText.Replace(L"\"", L""");
|
||||
}
|
||||
static CString AddEffect(CString strName, CString strParams)
|
||||
{
|
||||
CString strXml = _T("");
|
||||
|
||||
strXml += _T("<transforms>\r\n");
|
||||
strXml += _T(" <") + strName + _T(" ") + strParams + _T(">\r\n");
|
||||
strXml += _T(" </") + strName + _T(">\r\n");
|
||||
strXml += _T("</transforms>\r\n");
|
||||
|
||||
return strXml;
|
||||
}
|
||||
|
||||
static CString AddEffectForGroup(CString strName, CString strParams, CString strChilds = _T(""))
|
||||
{
|
||||
CString strXml = _T("");
|
||||
strXml += _T(" <") + strName + _T(" ") + strParams + _T(">\r\n");
|
||||
strXml += strChilds;
|
||||
strXml += _T(" </") + strName + _T(">\r\n");
|
||||
return strXml;
|
||||
}
|
||||
|
||||
static CString BoolToString(bool bValue)
|
||||
{
|
||||
if (bValue)
|
||||
return _T("1");
|
||||
return _T("0");
|
||||
}
|
||||
|
||||
static CString ToString(int val)
|
||||
{
|
||||
CString str = _T("");
|
||||
str.Format(_T("%d"), val);
|
||||
return str;
|
||||
}
|
||||
static CString ToString(double val)
|
||||
{
|
||||
CString str = _T("");
|
||||
str.Format(_T("%lf"), val);
|
||||
return str;
|
||||
}
|
||||
|
||||
enum BrushType
|
||||
{
|
||||
BrushTypeSolid = 1000,
|
||||
BrushTypeHorizontal = 2001,
|
||||
BrushTypeVertical = 2002,
|
||||
BrushTypeDiagonal1 = 2003,
|
||||
BrushTypeDiagonal2 = 2004,
|
||||
BrushTypeCenter = 2005,
|
||||
BrushTypePathGradient1 = 2006,
|
||||
BrushTypePathGradient2 = 2007,
|
||||
BrushTypeCylinderHor = 2008,
|
||||
BrushTypeCylinderVer = 2009,
|
||||
BrushTypeTexture = 3008,
|
||||
BrushTypePattern = 3009,
|
||||
BrushTypeHatch1 = 4009,
|
||||
BrushTypeHatch53 = 4061
|
||||
};
|
||||
|
||||
enum BrushTextureMode
|
||||
{
|
||||
BrushTextureModeStretch = 0,
|
||||
BrushTextureModeTile = 1,
|
||||
BrushTextureModeTileCenter = 2
|
||||
};
|
||||
|
||||
class CColor_
|
||||
{
|
||||
public:
|
||||
BYTE R;
|
||||
BYTE G;
|
||||
BYTE B;
|
||||
BYTE A;
|
||||
|
||||
public:
|
||||
CColor_()
|
||||
{
|
||||
R = 0;
|
||||
G = 0;
|
||||
B = 0;
|
||||
A = 0;
|
||||
}
|
||||
CColor_& operator =(const CColor_& oSrc)
|
||||
{
|
||||
R = oSrc.R;
|
||||
G = oSrc.G;
|
||||
B = oSrc.B;
|
||||
A = oSrc.A;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
CColor_& operator =(const DWORD& oSrc)
|
||||
{
|
||||
R = (BYTE)(oSrc >> 8);
|
||||
G = (BYTE)(oSrc >> 16);
|
||||
B = (BYTE)(oSrc >> 24);
|
||||
A = (BYTE)oSrc;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
int GetRGB() const
|
||||
{
|
||||
return (DWORD)R | ((DWORD)G << 8) | ((DWORD)B << 16);
|
||||
}
|
||||
|
||||
CString ToString() const
|
||||
{
|
||||
return NSAttributes::ToString(GetRGB());
|
||||
}
|
||||
|
||||
void FromString(CString str)
|
||||
{
|
||||
int lColor;
|
||||
if (str.Find(_T("#"), str[0]))
|
||||
{
|
||||
lColor = XmlUtils::GetColor(str.Mid(1, 6));
|
||||
R = (BYTE)(lColor);
|
||||
G = (BYTE)(lColor >> 8);
|
||||
B = (BYTE)(lColor >> 16);
|
||||
A = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
lColor = XmlUtils::GetColor(str);
|
||||
*this = (DWORD)lColor;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class CFont_
|
||||
{
|
||||
public:
|
||||
CString m_strFontName;
|
||||
int m_nSize;
|
||||
|
||||
bool m_bBold;
|
||||
bool m_bItalic;
|
||||
bool m_bUnderline;
|
||||
bool m_bStrikeout;
|
||||
|
||||
CString m_strPitchFamily;
|
||||
BYTE m_lCharset;
|
||||
|
||||
public:
|
||||
CFont_()
|
||||
{
|
||||
m_strFontName = _T("Arial");
|
||||
m_nSize = 16;
|
||||
|
||||
m_bBold = false;
|
||||
m_bItalic = false;
|
||||
m_bUnderline = false;
|
||||
m_bStrikeout = false;
|
||||
|
||||
m_strPitchFamily = _T("");
|
||||
m_lCharset = 0x01;
|
||||
}
|
||||
CFont_& operator =(const CFont_& oSrc)
|
||||
{
|
||||
m_strFontName = oSrc.m_strFontName;
|
||||
m_nSize = oSrc.m_nSize;
|
||||
|
||||
m_bBold = oSrc.m_bBold;
|
||||
m_bItalic = oSrc.m_bItalic;
|
||||
m_bUnderline = oSrc.m_bUnderline;
|
||||
m_bStrikeout = oSrc.m_bStrikeout;
|
||||
|
||||
m_strPitchFamily= oSrc.m_strPitchFamily;
|
||||
m_lCharset = oSrc.m_lCharset;
|
||||
|
||||
return (*this);
|
||||
}
|
||||
CString ToString()
|
||||
{
|
||||
CString strFont = _T("");
|
||||
|
||||
strFont.Format(_T("font-name='%s' font-size='%d' font-bold='%s' font-italic='%s' font-underline='%s' font-strikeout='%s' "),
|
||||
m_strFontName, m_nSize, NSAttributes::BoolToString(m_bBold), NSAttributes::BoolToString(m_bItalic),
|
||||
NSAttributes::BoolToString(m_bUnderline), NSAttributes::BoolToString(m_bStrikeout));
|
||||
|
||||
return strFont;
|
||||
}
|
||||
};
|
||||
|
||||
class CPen_
|
||||
{
|
||||
public:
|
||||
CColor_ m_oColor;
|
||||
BYTE m_nAlpha;
|
||||
double Size;
|
||||
|
||||
byte DashStyle;
|
||||
byte LineStartCap;
|
||||
byte LineEndCap;
|
||||
byte LineJoin;
|
||||
|
||||
public:
|
||||
CPen_() : m_oColor()
|
||||
{
|
||||
m_oColor = 0;
|
||||
m_nAlpha = 255;
|
||||
Size = 0.26458;
|
||||
DashStyle = 0;
|
||||
LineStartCap = 0;
|
||||
LineEndCap = 0;
|
||||
LineJoin = 0;
|
||||
}
|
||||
~CPen_()
|
||||
{
|
||||
}
|
||||
|
||||
CString ToString()
|
||||
{
|
||||
CString str = _T("");
|
||||
str.Format(_T("<pen pen-color='%s' pen-alpha='%d' pen-size='%.6f'></pen>"), m_oColor.ToString(), m_nAlpha, Size);
|
||||
return str;
|
||||
|
||||
|
||||
|
||||
}
|
||||
CString ToString2()
|
||||
{
|
||||
CString str = _T("");
|
||||
str.Format(_T("<pen pen-color='%s' pen-alpha='%d' pen-size='%.6f' pen-style='%d' pen-line-start-cap='%d' pen-line-end-cap='%d' penline-join='%d'></pen>"),
|
||||
m_oColor.ToString(), m_nAlpha, Size, DashStyle, LineStartCap, LineEndCap, LineJoin);
|
||||
return str;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
CString ToString3()
|
||||
{
|
||||
CString str = _T("");
|
||||
str.Format(_T("<pen color='%s' alpha='%d' size='%.6f' style='%d' line-start-cap='%d' line-end-cap='%d' line-join='%d' />"),
|
||||
m_oColor.ToString(), m_nAlpha, Size, DashStyle, LineStartCap, LineEndCap, LineJoin);
|
||||
return str;
|
||||
}
|
||||
CPen_& operator =(const CPen_& oSrc)
|
||||
{
|
||||
m_oColor = oSrc.m_oColor;
|
||||
m_nAlpha = oSrc.m_nAlpha;
|
||||
Size = oSrc.Size;
|
||||
DashStyle = oSrc.DashStyle;
|
||||
LineStartCap = oSrc.LineStartCap;
|
||||
LineEndCap = oSrc.LineEndCap;
|
||||
LineJoin = oSrc.LineJoin;
|
||||
return (*this);
|
||||
}
|
||||
};
|
||||
|
||||
class CTextShadow
|
||||
{
|
||||
public:
|
||||
bool m_bVisible;
|
||||
double m_nDistanceX;
|
||||
double m_nDistanceY;
|
||||
int m_nBlurSize;
|
||||
CColor_ m_oColor;
|
||||
BYTE m_nAlpha;
|
||||
|
||||
public:
|
||||
CTextShadow()
|
||||
{
|
||||
m_bVisible = false;
|
||||
m_nDistanceX = 0.5;
|
||||
m_nDistanceY = 0.5;
|
||||
m_nBlurSize = 2;
|
||||
m_oColor = 0;
|
||||
m_nAlpha = 255;
|
||||
}
|
||||
~CTextShadow()
|
||||
{
|
||||
}
|
||||
|
||||
CTextShadow& operator =(const CTextShadow& oSrc)
|
||||
{
|
||||
m_bVisible = oSrc.m_bVisible;
|
||||
m_nDistanceX = oSrc.m_nDistanceX;
|
||||
m_nDistanceY = oSrc.m_nDistanceY;
|
||||
m_nBlurSize = oSrc.m_nBlurSize;
|
||||
m_oColor = oSrc.m_oColor;
|
||||
m_nAlpha = oSrc.m_nAlpha;
|
||||
return (*this);
|
||||
}
|
||||
CString ToString()
|
||||
{
|
||||
CString strShadow = _T("");
|
||||
strShadow += (_T("shadow-visible=\"") + NSAttributes::BoolToString(m_bVisible) + _T("\" "));
|
||||
strShadow += (_T("shadow-distancex=\"") + NSAttributes::ToString(m_nDistanceX) + _T("\" "));
|
||||
strShadow += (_T("shadow-distancey=\"") + NSAttributes::ToString(m_nDistanceY) + _T("\" "));
|
||||
strShadow += (_T("shadow-blursize=\"") + NSAttributes::ToString(m_nBlurSize) + _T("\" "));
|
||||
strShadow += (_T("shadow-color=\"") + m_oColor.ToString() + _T("\" "));
|
||||
strShadow += (_T("shadow-alpha=\"") + NSAttributes::ToString((int)m_nAlpha) + _T("\" "));
|
||||
return strShadow;
|
||||
}
|
||||
};
|
||||
|
||||
class CTextEdge
|
||||
{
|
||||
public:
|
||||
int m_nVisible;
|
||||
int m_nDistance;
|
||||
CColor_ m_oColor;
|
||||
BYTE m_nAlpha;
|
||||
|
||||
public:
|
||||
CTextEdge()
|
||||
{
|
||||
m_nVisible = 0;
|
||||
m_nDistance = 1;
|
||||
m_oColor = 0;
|
||||
m_nAlpha = 255;
|
||||
}
|
||||
|
||||
~CTextEdge()
|
||||
{
|
||||
}
|
||||
|
||||
CTextEdge& operator =(const CTextEdge& oSrc)
|
||||
{
|
||||
m_nVisible = oSrc.m_nVisible;
|
||||
m_nDistance = oSrc.m_nDistance;
|
||||
m_oColor = oSrc.m_oColor;
|
||||
m_nAlpha = oSrc.m_nAlpha;
|
||||
return (*this);
|
||||
}
|
||||
CString ToString()
|
||||
{
|
||||
CString strEdge = _T("");
|
||||
strEdge += (_T("edge-visible='") + NSAttributes::ToString(m_nVisible) + _T("' "));
|
||||
strEdge += (_T("edge-dist='") + NSAttributes::ToString(m_nDistance) + _T("' "));
|
||||
strEdge += (_T("edge-color='") + m_oColor.ToString() + _T("' "));
|
||||
strEdge += (_T("edge-alpha='") + NSAttributes::ToString((int)m_nAlpha) + _T("' "));
|
||||
return strEdge;
|
||||
}
|
||||
};
|
||||
|
||||
class CBrush_
|
||||
{
|
||||
public:
|
||||
struct TSubColor
|
||||
{
|
||||
CColor_ color;
|
||||
long position;
|
||||
};
|
||||
|
||||
public:
|
||||
int m_nBrushType;
|
||||
CColor_ m_oColor1;
|
||||
CColor_ m_oColor2;
|
||||
BYTE m_Alpha1;
|
||||
BYTE m_Alpha2;
|
||||
CStringW m_sTexturePath;
|
||||
int m_nTextureMode;
|
||||
int m_nRectable;
|
||||
BYTE m_nTextureAlpha;
|
||||
bool m_bApplyBounds;
|
||||
RECT m_rcBounds;
|
||||
float m_fAngle;
|
||||
CString m_strEffects;
|
||||
|
||||
ATL::CSimpleArray<TSubColor> m_arrSubColors;
|
||||
|
||||
public:
|
||||
CBrush_()
|
||||
{
|
||||
m_nBrushType = (int)BrushTypeSolid;
|
||||
m_oColor1 = 0xFFFFFFFF;
|
||||
m_oColor2 = 0xFFFFFFFF;
|
||||
m_Alpha1 = 255;
|
||||
m_Alpha2 = 255;
|
||||
m_sTexturePath = "";
|
||||
m_nTextureMode = 0;
|
||||
m_nRectable = 0;
|
||||
m_nTextureAlpha = 255;
|
||||
m_bApplyBounds = false;
|
||||
m_rcBounds.left = 0;
|
||||
m_rcBounds.top = 0;
|
||||
m_rcBounds.right = 0;
|
||||
m_rcBounds.bottom = 0;
|
||||
m_strEffects = _T("");
|
||||
}
|
||||
|
||||
CBrush_& operator =(const CBrush_& oSrc)
|
||||
{
|
||||
m_nBrushType = oSrc.m_nBrushType;
|
||||
m_oColor1 = oSrc.m_oColor1;
|
||||
m_oColor2 = oSrc.m_oColor2;
|
||||
m_Alpha1 = oSrc.m_Alpha1;
|
||||
m_Alpha2 = oSrc.m_Alpha2;
|
||||
m_sTexturePath = oSrc.m_sTexturePath;
|
||||
m_nTextureMode = oSrc.m_nTextureMode;
|
||||
m_nRectable = oSrc.m_nRectable;
|
||||
m_nTextureAlpha = oSrc.m_nTextureAlpha;
|
||||
m_bApplyBounds = oSrc.m_bApplyBounds;
|
||||
m_rcBounds.left = oSrc.m_rcBounds.left;
|
||||
m_rcBounds.top = oSrc.m_rcBounds.top;
|
||||
m_rcBounds.right = oSrc.m_rcBounds.right;
|
||||
m_rcBounds.bottom = oSrc.m_rcBounds.bottom;
|
||||
m_fAngle = oSrc.m_fAngle;
|
||||
m_strEffects = oSrc.m_strEffects;
|
||||
m_arrSubColors = oSrc.m_arrSubColors;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
CString SubColorsToString() const
|
||||
{
|
||||
CString str;
|
||||
|
||||
int count = m_arrSubColors.GetSize();
|
||||
for( int i = 0; i < count; i++ )
|
||||
{
|
||||
str.AppendFormat( CString("%d, %d; "), m_arrSubColors[i].color.GetRGB(), m_arrSubColors[i].position );
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
CString ToString()
|
||||
{
|
||||
CString strTexture = StreamUtils::ConvertCStringWToCString(m_sTexturePath);
|
||||
CorrectXmlString(strTexture);
|
||||
|
||||
return AddEffectForGroup(_T("ImagePaint-SetBrush"),
|
||||
_T("type='") + NSAttributes::ToString(m_nBrushType)
|
||||
+ _T("' color1='") + m_oColor1.ToString() + _T("' color2='") + m_oColor2.ToString()
|
||||
+ _T("' alpha1='") + NSAttributes::ToString(m_Alpha1) + _T("' alpha2='") + NSAttributes::ToString(m_Alpha2)
|
||||
+ _T("' texturepath='") + strTexture + _T("' texturealpha='") + NSAttributes::ToString(m_nTextureAlpha)
|
||||
+ _T("' texturemode='") + NSAttributes::ToString(m_nTextureMode)
|
||||
|
||||
|
||||
|
||||
+ _T("' linearangle='") + NSAttributes::ToString(m_fAngle)
|
||||
+ _T("' subcolors='") + SubColorsToString()
|
||||
+ _T("'"), m_strEffects);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
CString ToString2()
|
||||
{
|
||||
CString strTexture = StreamUtils::ConvertCStringWToCString(m_sTexturePath);
|
||||
CorrectXmlString(strTexture);
|
||||
|
||||
return AddEffectForGroup(_T("brush"),
|
||||
_T("brush-type='") + NSAttributes::ToString(m_nBrushType)
|
||||
+ _T("' brush-color1='") + m_oColor1.ToString() + _T("' brush-color2='") + m_oColor2.ToString()
|
||||
+ _T("' brush-alpha1='") + NSAttributes::ToString(m_Alpha1) + _T("' brush-alpha2='") + NSAttributes::ToString(m_Alpha2)
|
||||
+ _T("' brush-texturepath='") + strTexture + _T("' brush-texturealpha='") + NSAttributes::ToString(m_nTextureAlpha)
|
||||
+ _T("' brush-texturemode='") + NSAttributes::ToString(m_nTextureMode)
|
||||
|
||||
|
||||
|
||||
+ _T("' linearangle='") + NSAttributes::ToString(m_fAngle)
|
||||
+ _T("' subcolors='") + SubColorsToString()
|
||||
+ _T("'"), m_strEffects);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
class CTextAttributes
|
||||
{
|
||||
public:
|
||||
CFont_ m_oFont;
|
||||
CBrush_ m_oTextBrush;
|
||||
CTextShadow m_oTextShadow;
|
||||
CTextEdge m_oTextEdge;
|
||||
|
||||
int m_nTextAlignHorizontal;
|
||||
int m_nTextAlignVertical;
|
||||
double m_dTextRotate;
|
||||
|
||||
public:
|
||||
CTextAttributes() : m_oFont(), m_oTextBrush(), m_oTextShadow(), m_oTextEdge()
|
||||
{
|
||||
m_oFont.m_nSize = 36;
|
||||
m_oTextBrush.m_oColor1 = 0xFF;
|
||||
|
||||
m_nTextAlignHorizontal = 0;
|
||||
m_nTextAlignVertical = 0;
|
||||
m_dTextRotate = 0;
|
||||
}
|
||||
CTextAttributes& operator =(const CTextAttributes& oSrc)
|
||||
{
|
||||
m_oFont = oSrc.m_oFont;
|
||||
m_oTextBrush = oSrc.m_oTextBrush;
|
||||
m_oTextShadow = oSrc.m_oTextShadow;
|
||||
m_oTextEdge = oSrc.m_oTextEdge;
|
||||
|
||||
m_nTextAlignHorizontal = oSrc.m_nTextAlignHorizontal;
|
||||
m_nTextAlignVertical = oSrc.m_nTextAlignVertical;
|
||||
m_dTextRotate = oSrc.m_dTextRotate;
|
||||
|
||||
return (*this);
|
||||
}
|
||||
CString ToString()
|
||||
{
|
||||
CString strText = _T("<Attributes ");
|
||||
|
||||
|
||||
strText += (_T("brush-type='") + NSAttributes::ToString(m_oTextBrush.m_nBrushType) + _T("' "));
|
||||
strText += (_T("brush-color1='") + m_oTextBrush.m_oColor1.ToString() + _T("' "));
|
||||
strText += (_T("brush-color2='") + m_oTextBrush.m_oColor2.ToString() + _T("' "));
|
||||
strText += (_T("brush-alpha1='") + NSAttributes::ToString(m_oTextBrush.m_Alpha1) + _T("' "));
|
||||
strText += (_T("brush-alpha2='") + NSAttributes::ToString(m_oTextBrush.m_Alpha2) + _T("' "));
|
||||
strText += (_T("brush-texturepath='") + (CString)(m_oTextBrush.m_sTexturePath) + _T("' "));
|
||||
strText += (_T("brush-texturealpha='") + NSAttributes::ToString(m_oTextBrush.m_nTextureAlpha) + _T("' "));
|
||||
strText += (_T("brush-texturemode='") + NSAttributes::ToString(m_oTextBrush.m_nTextureMode) + _T("' "));
|
||||
strText += (_T("brush-rectable='0' "));
|
||||
|
||||
|
||||
strText += m_oFont.ToString();
|
||||
|
||||
|
||||
strText += _T("font-antialiastext='1' ");
|
||||
strText += (_T("font-stringalignmentvertical='") + NSAttributes::ToString(m_nTextAlignVertical) + _T("' "));
|
||||
strText += (_T("font-stringalignmenthorizontal='") + NSAttributes::ToString(m_nTextAlignHorizontal) + _T("' "));
|
||||
strText += (_T("font-angle='") + NSAttributes::ToString((int)m_dTextRotate) + _T("' "));
|
||||
|
||||
|
||||
if (m_oTextShadow.m_bVisible)
|
||||
strText += m_oTextShadow.ToString();
|
||||
|
||||
|
||||
if (m_oTextEdge.m_nVisible > 0)
|
||||
strText += m_oTextEdge.ToString();
|
||||
|
||||
strText += _T("/>");
|
||||
|
||||
return strText;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
class CMetaHeader
|
||||
{
|
||||
public:
|
||||
DWORD cbSize;
|
||||
RECT rcBounds;
|
||||
POINT ptSize;
|
||||
DWORD cbSave;
|
||||
BYTE compression;
|
||||
BYTE filter;
|
||||
|
||||
public:
|
||||
CMetaHeader()
|
||||
{
|
||||
}
|
||||
void FromStream(IStream* pStream)
|
||||
{
|
||||
cbSize = StreamUtils::ReadDWORD(pStream);
|
||||
|
||||
rcBounds.left = StreamUtils::ReadLONG(pStream);
|
||||
rcBounds.top = StreamUtils::ReadLONG(pStream);
|
||||
rcBounds.right = StreamUtils::ReadLONG(pStream);
|
||||
rcBounds.bottom = StreamUtils::ReadLONG(pStream);
|
||||
|
||||
ptSize.x = StreamUtils::ReadLONG(pStream);
|
||||
ptSize.y = StreamUtils::ReadLONG(pStream);
|
||||
|
||||
cbSave = StreamUtils::ReadDWORD(pStream);
|
||||
|
||||
compression = StreamUtils::ReadBYTE(pStream);
|
||||
filter = StreamUtils::ReadBYTE(pStream);
|
||||
}
|
||||
|
||||
void ToEMFHeader(ENHMETAHEADER3* pHeader)
|
||||
{
|
||||
if (NULL == pHeader)
|
||||
return;
|
||||
|
||||
pHeader->iType = 0x00000001;
|
||||
pHeader->nSize = 88;
|
||||
|
||||
pHeader->rclBounds.left = rcBounds.left;
|
||||
pHeader->rclBounds.top = rcBounds.top;
|
||||
pHeader->rclBounds.right = rcBounds.right;
|
||||
pHeader->rclBounds.bottom = rcBounds.bottom;
|
||||
|
||||
|
||||
pHeader->rclFrame.left = rcBounds.left;
|
||||
pHeader->rclFrame.top = rcBounds.top;
|
||||
pHeader->rclFrame.right = rcBounds.right;
|
||||
pHeader->rclFrame.bottom = rcBounds.bottom;
|
||||
|
||||
pHeader->dSignature = 0x464D4520;
|
||||
pHeader->nVersion = 0x00010000;
|
||||
pHeader->nBytes = cbSize;
|
||||
|
||||
pHeader->nRecords = 1;
|
||||
pHeader->nHandles = 0;
|
||||
|
||||
pHeader->sReserved = 0;
|
||||
|
||||
pHeader->nDescription = 0;
|
||||
pHeader->offDescription = 0;
|
||||
|
||||
pHeader->nPalEntries = 0;
|
||||
|
||||
pHeader->szlDevice.cx = 200;
|
||||
pHeader->szlDevice.cy = 200;
|
||||
|
||||
|
||||
pHeader->szlMillimeters.cx = 100;
|
||||
pHeader->szlMillimeters.cy = 100;
|
||||
}
|
||||
|
||||
void ToWMFHeader(WmfPlaceableFileHeader* pHeader)
|
||||
{
|
||||
if (NULL == pHeader)
|
||||
return;
|
||||
|
||||
pHeader->Key = 0x9AC6CDD7;
|
||||
pHeader->Hmf = 0;
|
||||
|
||||
pHeader->BoundingBox.Left = (short)rcBounds.left;
|
||||
pHeader->BoundingBox.Top = (short)rcBounds.top;
|
||||
pHeader->BoundingBox.Right = (short)rcBounds.right;
|
||||
pHeader->BoundingBox.Bottom = (short)rcBounds.bottom;
|
||||
|
||||
pHeader->Inch = 1440;
|
||||
pHeader->Reserved = 0;
|
||||
|
||||
pHeader->Checksum = 0;
|
||||
pHeader->Checksum ^= (pHeader->Key & 0x0000FFFFL);
|
||||
pHeader->Checksum ^= ((pHeader->Key & 0xFFFF0000L) >> 16);
|
||||
|
||||
pHeader->Checksum ^= pHeader->Hmf;
|
||||
|
||||
pHeader->Checksum ^= pHeader->BoundingBox.Left;
|
||||
pHeader->Checksum ^= pHeader->BoundingBox.Top;
|
||||
pHeader->Checksum ^= pHeader->BoundingBox.Right;
|
||||
pHeader->Checksum ^= pHeader->BoundingBox.Bottom;
|
||||
|
||||
pHeader->Checksum ^= pHeader->Inch;
|
||||
pHeader->Checksum ^= (pHeader->Reserved & 0x0000FFFFL);
|
||||
pHeader->Checksum ^= ((pHeader->Reserved & 0xFFFF0000L) >> 16);
|
||||
}
|
||||
|
||||
static void DecompressDeflate(BYTE* pSrc, LONG lSrcSize, BYTE** ppDst, LONG& lDstSize)
|
||||
{
|
||||
CComPtr<IEncodingFilterFactory> pEFF;
|
||||
HRESULT hr = pEFF.CoCreateInstance(CLSID_StdEncodingFilterFac);
|
||||
CComPtr<IDataFilter> pDF;
|
||||
|
||||
if (!pEFF || FAILED(pEFF->GetDefaultFilter( L"deflate", L"text", &pDF)))
|
||||
return;
|
||||
|
||||
|
||||
BYTE* outBuff = new BYTE[200000];
|
||||
DWORD dwOutBuffSize = sizeof(outBuff);
|
||||
|
||||
long dwRead = 0, dwWritten = 0;
|
||||
|
||||
|
||||
hr = pDF->DoDecode(0, lSrcSize, pSrc, dwOutBuffSize, outBuff, lSrcSize, &dwRead, &dwWritten, 0);
|
||||
}
|
||||
};
|
||||
|
||||
class CMetaFileBuffer
|
||||
{
|
||||
public:
|
||||
BOOL m_bIsValid;
|
||||
|
||||
private:
|
||||
BYTE* m_pMetaHeader;
|
||||
BYTE* m_pMetaFile;
|
||||
|
||||
LONG m_lMetaHeaderSize;
|
||||
LONG m_lMetaFileSize;
|
||||
|
||||
public:
|
||||
CMetaFileBuffer()
|
||||
{
|
||||
m_bIsValid = FALSE;
|
||||
|
||||
m_pMetaHeader = NULL;
|
||||
m_pMetaFile = NULL;
|
||||
|
||||
m_lMetaHeaderSize = 0;
|
||||
m_lMetaFileSize = 0;
|
||||
}
|
||||
~CMetaFileBuffer()
|
||||
{
|
||||
RELEASEARRAYOBJECTS(m_pMetaHeader);
|
||||
RELEASEARRAYOBJECTS(m_pMetaFile);
|
||||
}
|
||||
|
||||
void SetHeader(BYTE* pHeader, LONG lSize)
|
||||
{
|
||||
m_pMetaHeader = pHeader;
|
||||
m_lMetaHeaderSize = lSize;
|
||||
}
|
||||
|
||||
void SetData(BYTE* pCompress, LONG lCompressSize, LONG lUncompressSize, BOOL bIsCompressed)
|
||||
{
|
||||
if (!bIsCompressed)
|
||||
{
|
||||
m_pMetaFile = pCompress;
|
||||
m_lMetaFileSize = lUncompressSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
ULONG lSize = lUncompressSize;
|
||||
m_pMetaFile = new BYTE[lUncompressSize];
|
||||
BOOL bRes = NSZLib::Decompress(pCompress, (ULONG)lCompressSize, m_pMetaFile, lSize);
|
||||
if (bRes)
|
||||
{
|
||||
m_lMetaFileSize = (LONG)lSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
RELEASEARRAYOBJECTS(m_pMetaFile);
|
||||
m_lMetaFileSize = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ToFile(CFile* pFile)
|
||||
{
|
||||
if (NULL != m_pMetaHeader)
|
||||
{
|
||||
pFile->WriteFile((void*)m_pMetaHeader, m_lMetaHeaderSize);
|
||||
}
|
||||
if (NULL != m_pMetaFile)
|
||||
{
|
||||
pFile->WriteFile((void*)m_pMetaFile, m_lMetaFileSize);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static void ParseString(CString strDelimeters, CString strSource,
|
||||
CAtlArray<CString>* pArrayResults, bool bIsCleared = true)
|
||||
{
|
||||
if (NULL == pArrayResults)
|
||||
return;
|
||||
|
||||
if (bIsCleared)
|
||||
pArrayResults->RemoveAll();
|
||||
|
||||
CString resToken;
|
||||
int curPos= 0;
|
||||
|
||||
resToken = strSource.Tokenize(strDelimeters, curPos);
|
||||
while (resToken != _T(""))
|
||||
{
|
||||
pArrayResults->Add(resToken);
|
||||
resToken = strSource.Tokenize(strDelimeters, curPos);
|
||||
};
|
||||
}
|
||||
112
ActiveX/Common/OfficeDrawing/BinaryReader.h
Normal file
112
ActiveX/Common/OfficeDrawing/BinaryReader.h
Normal file
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace NSOfficeDrawing
|
||||
{
|
||||
#define BINARY_READER_CHECK_OUT_RANGE(index, count) \
|
||||
if (index > count) \
|
||||
{ \
|
||||
index = count; \
|
||||
return 0; \
|
||||
}
|
||||
|
||||
class CBinaryReader
|
||||
{
|
||||
private:
|
||||
BYTE* m_pBuffer;
|
||||
DWORD m_lCount;
|
||||
|
||||
DWORD m_lOrigin;
|
||||
|
||||
public:
|
||||
CBinaryReader(BYTE* pBuffer, DWORD lCount)
|
||||
{
|
||||
m_pBuffer = pBuffer;
|
||||
m_lCount = lCount;
|
||||
|
||||
m_lOrigin = 0;
|
||||
}
|
||||
~CBinaryReader()
|
||||
{
|
||||
m_pBuffer = NULL;
|
||||
m_lCount = 0;
|
||||
}
|
||||
|
||||
public:
|
||||
LONG ReadLONG()
|
||||
{
|
||||
DWORD lOldOrigin = m_lOrigin;
|
||||
m_lOrigin += 4;
|
||||
|
||||
BINARY_READER_CHECK_OUT_RANGE(m_lOrigin, m_lCount)
|
||||
|
||||
return *(LONG*)(m_pBuffer + lOldOrigin);
|
||||
}
|
||||
DWORD ReadDWORD()
|
||||
{
|
||||
DWORD lOldOrigin = m_lOrigin;
|
||||
m_lOrigin += 4;
|
||||
|
||||
BINARY_READER_CHECK_OUT_RANGE(m_lOrigin, m_lCount)
|
||||
|
||||
return *(DWORD*)(m_pBuffer + lOldOrigin);
|
||||
}
|
||||
WORD ReadWORD()
|
||||
{
|
||||
DWORD lOldOrigin = m_lOrigin;
|
||||
m_lOrigin += 2;
|
||||
|
||||
BINARY_READER_CHECK_OUT_RANGE(m_lOrigin, m_lCount)
|
||||
|
||||
return *(WORD*)(m_pBuffer + lOldOrigin);
|
||||
}
|
||||
SHORT ReadSHORT()
|
||||
{
|
||||
DWORD lOldOrigin = m_lOrigin;
|
||||
m_lOrigin += 2;
|
||||
|
||||
BINARY_READER_CHECK_OUT_RANGE(m_lOrigin, m_lCount)
|
||||
|
||||
return *(SHORT*)(m_pBuffer + lOldOrigin);
|
||||
}
|
||||
double ReadDOUBLE()
|
||||
{
|
||||
DWORD lOldOrigin = m_lOrigin;
|
||||
m_lOrigin += sizeof(double);
|
||||
|
||||
BINARY_READER_CHECK_OUT_RANGE(m_lOrigin, m_lCount)
|
||||
|
||||
return *(SHORT*)(m_pBuffer + lOldOrigin);
|
||||
}
|
||||
};
|
||||
}
|
||||
57
ActiveX/Common/OfficeDrawing/CommonZLib.h
Normal file
57
ActiveX/Common/OfficeDrawing/CommonZLib.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
#include "zlib.h"
|
||||
|
||||
#pragma comment(lib, "zlib.lib")
|
||||
|
||||
namespace NSZLib
|
||||
{
|
||||
static BOOL Decompress(const BYTE* pSrcBuffer, const ULONG& lSrcBufferLen,
|
||||
BYTE* pDstBuffer, ULONG& lDstBufferLen)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Z_OK == uncompress(pDstBuffer, &lDstBufferLen, pSrcBuffer, lSrcBufferLen))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
629
ActiveX/Common/OfficeDrawing/Document.cpp
Normal file
629
ActiveX/Common/OfficeDrawing/Document.cpp
Normal file
@@ -0,0 +1,629 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#include "stdafx.h"
|
||||
#include "Document.h"
|
||||
|
||||
void CDrawingDocument::ToXmlSource3()
|
||||
{
|
||||
m_strXmlVideoSource = _T("");
|
||||
m_strXmlTransforms = _T("");
|
||||
m_strXmlOverlays = _T("");
|
||||
CString strVideoOverlay = _T("");
|
||||
CString strAudioOverlay = _T("");
|
||||
|
||||
if ( m_arPages.GetCount () > 0 )
|
||||
{
|
||||
|
||||
|
||||
double dDuration = 0.0;
|
||||
for (size_t nIndex = 0; nIndex < m_arPages.GetCount(); ++nIndex)
|
||||
{
|
||||
dDuration += m_arPages[nIndex]->m_dDuration;
|
||||
}
|
||||
|
||||
|
||||
|
||||
m_nWriteSlideTimeOffset = 0.0;
|
||||
m_nWriteSlideTime = 0.0;
|
||||
|
||||
CString XmlSlideSource = _T("");
|
||||
|
||||
for ( size_t nIndex = 0; nIndex < m_arPages.GetCount(); ++nIndex )
|
||||
{
|
||||
CString XmlCompose = _T("");
|
||||
|
||||
bool bInsertCutBlack = false;
|
||||
bool bInsertCutNone = false;
|
||||
|
||||
int KeyIndex = m_mapTransitions.FindKey ( (DWORD)nIndex );
|
||||
if ( -1 != KeyIndex )
|
||||
{
|
||||
ODCSlideShowSlideInfoAtom InfoAtom = m_mapTransitions.GetValueAt ( KeyIndex );
|
||||
|
||||
|
||||
|
||||
XmlCompose = GetXmlSlideTransition ( InfoAtom );
|
||||
}
|
||||
|
||||
XmlSlideSource.Format ( _T("<ColorSource Color=\"16777215\" Duration=\"%lf\" widthmetric=\"%lf\" heightmetric=\"%lf\">"),
|
||||
m_arPages [ nIndex ]->m_dDuration, (double)m_arPages[nIndex]->m_lWidth, (double)m_arPages[nIndex]->m_lHeight );
|
||||
|
||||
m_strXmlTransforms = _T("");
|
||||
|
||||
|
||||
|
||||
m_nWriteSlideTime = m_arPages [ nIndex ]->m_dDuration;
|
||||
|
||||
double dScaleHor = (double)(m_arPages[nIndex]->m_lWidth) / m_arPages[nIndex]->m_lOriginalWidth;
|
||||
double dScaleVer = (double)(m_arPages[nIndex]->m_lHeight) / m_arPages[nIndex]->m_lOriginalHeight;
|
||||
|
||||
|
||||
Animations::ODCSlideTimeLine* pTimeLine = m_mapAnimations.Lookup ( (DWORD)nIndex );
|
||||
|
||||
if ( NULL != pTimeLine )
|
||||
{
|
||||
WriteAnimationXml ( pTimeLine, m_arPages[nIndex], dScaleHor, dScaleVer );
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( int nElem = 0; nElem < m_arPages[nIndex]->m_arElements.GetSize(); ++nElem )
|
||||
{
|
||||
CString strParam = m_arPages[nIndex]->m_arElements[nElem]->ToXml();
|
||||
|
||||
if (etVideo == m_arPages[nIndex]->m_arElements[nElem]->m_etType)
|
||||
{
|
||||
strVideoOverlay += strParam;
|
||||
}
|
||||
else if (etAudio == m_arPages[nIndex]->m_arElements[nElem]->m_etType)
|
||||
{
|
||||
strAudioOverlay += strParam;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_strXmlTransforms += strParam;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if ( -1 != KeyIndex && 0 == nIndex && XmlCompose.GetLength () > 1 )
|
||||
{
|
||||
CString strMem = _T("");
|
||||
strMem.Format(_T("<ColorSource Color=\"0\" Duration=\"1000\" widthmetric=\"%lf\" heightmetric=\"%lf\" />"),
|
||||
(double)m_arPages[nIndex]->m_lWidth, (double)m_arPages[nIndex]->m_lHeight );
|
||||
|
||||
m_strXmlVideoSource += strMem;
|
||||
}
|
||||
|
||||
m_strXmlVideoSource += XmlCompose;
|
||||
|
||||
XmlSlideSource += _T("<VideoTransforms>") + m_strXmlTransforms + _T("</VideoTransforms>");
|
||||
|
||||
|
||||
|
||||
XmlSlideSource += _T("</ColorSource>");
|
||||
|
||||
m_strXmlVideoSource += XmlSlideSource;
|
||||
}
|
||||
|
||||
m_strXmlVideoSource = _T("<VideoSources>") + m_strXmlVideoSource + _T("</VideoSources>");
|
||||
}
|
||||
|
||||
m_strXmlTransforms = _T("");
|
||||
|
||||
|
||||
m_strXmlOverlays = _T("<VideoOverlays>") + strVideoOverlay + _T("</VideoOverlays>") + _T("<AudioOverlays>") +
|
||||
_T("<AudioSources>") + strAudioOverlay + _T("</AudioSources>") +
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
_T("</AudioOverlays>");
|
||||
|
||||
m_strXmlVideoSource = _T("<SingleSource>") + m_strXmlVideoSource + _T("</SingleSource>");
|
||||
m_strXmlVideoSource = _T("<MultiSource>") + m_strXmlVideoSource + m_strXmlOverlays + _T("</MultiSource>");
|
||||
}
|
||||
|
||||
void CDrawingDocument::WriteAnimationXml ( Animations::ODCSlideTimeLine* pTimeLine, CElementsContainer* pSlide, double nScaleW, double nScaleH )
|
||||
{
|
||||
if (NULL == pSlide)
|
||||
return;
|
||||
|
||||
for ( int nElemInd = 0; nElemInd < pSlide->m_arElements.GetSize(); ++nElemInd )
|
||||
{
|
||||
IElement* pSlideElement = pSlide->m_arElements [ nElemInd ];
|
||||
if ( NULL != pSlideElement )
|
||||
{
|
||||
|
||||
if ( 0 == pSlideElement->m_etType )
|
||||
{
|
||||
|
||||
m_strXmlOverlays += pSlideElement->ToXml ();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if ( 2 == pSlideElement->m_etType )
|
||||
{
|
||||
CImageElement* pImage = static_cast<CImageElement*> ( pSlideElement );
|
||||
if ( NULL != pImage )
|
||||
{
|
||||
AnimationsArray* pSources = pTimeLine->GetAnimation().Lookup ( pSlideElement->m_lID );
|
||||
if ( pSources )
|
||||
{
|
||||
m_strXmlTransforms += GetAnimationImageXml ( static_cast<double> ( pSlide->m_lWidth ), static_cast<double> ( pSlide->m_lHeight ), pImage, pSources );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( 3 == pSlideElement->m_etType )
|
||||
{
|
||||
CShapeElement* pShape = static_cast<CShapeElement*> ( pSlideElement );
|
||||
if ( NULL != pShape )
|
||||
{
|
||||
AnimationsArray* pSources = pTimeLine->GetAnimation().Lookup ( pSlideElement->m_lID );
|
||||
if ( pSources )
|
||||
{
|
||||
m_strXmlTransforms += GetAnimationShapeXml ( static_cast<double> ( pSlide->m_lWidth ), static_cast<double> ( pSlide->m_lHeight ), pShape, pSources );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_strXmlTransforms += pSlideElement->ToXml ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CString CDrawingDocument::GetAnimationImageXml ( double fX, double fY, CImageElement* pImage, AnimationsArray* pSource )
|
||||
{
|
||||
CString Source = CString ( _T("") );
|
||||
Source.Format (
|
||||
_T("<ImagePaint-DrawImageFromFileAnimate ")
|
||||
_T("%s")
|
||||
_T(" >")
|
||||
_T("%s")
|
||||
_T("<timeline type = \"1\" begin=\"%f\" end=\"%f\" fadein=\"0\" fadeout=\"0\" completeness=\"1.0\"/> ")
|
||||
_T("</ImagePaint-DrawImageFromFileAnimate>"),
|
||||
GetXmlImageSource ( pImage ),
|
||||
GetXmlAnimationSource ( fX, fY, pSource ),
|
||||
m_nWriteSlideTimeOffset, m_nWriteSlideTimeOffset + m_nWriteSlideTime );
|
||||
|
||||
return Source;
|
||||
}
|
||||
|
||||
CString CDrawingDocument::GetAnimationShapeXml ( double fX, double fY, CShapeElement* pShape, AnimationsArray* pSource )
|
||||
{
|
||||
CGeomShapeInfo infGeomShape;
|
||||
|
||||
infGeomShape.m_dLeft = pShape->m_rcBounds.left;
|
||||
infGeomShape.m_dTop = pShape->m_rcBounds.top;
|
||||
infGeomShape.m_dWidth = pShape->m_rcBounds.right - pShape->m_rcBounds.left;
|
||||
infGeomShape.m_dHeight = pShape->m_rcBounds.bottom - pShape->m_rcBounds.top;
|
||||
|
||||
infGeomShape.m_dLimoX = pShape->m_oShape.m_lLimoX;
|
||||
infGeomShape.m_dLimoY = pShape->m_oShape.m_lLimoY;
|
||||
|
||||
CString Source = CString ( _T("") );
|
||||
|
||||
for ( int i = 0; i < pShape->m_oShape.m_pShape->m_oPath.m_arParts.GetSize(); ++i )
|
||||
{
|
||||
Source += CString ( _T("<ImagePaint-DrawGraphicPathAnimate>") );
|
||||
|
||||
CString FillFormat;
|
||||
FillFormat.Format ( _T("<stroke>%s</stroke><fill>%s</fill><widthmm>%d</widthmm><heightmm>%d</heightmm>"),
|
||||
NSAttributes::BoolToString ( pShape->m_oShape.m_pShape->m_oPath.m_arParts[i].m_bStroke ),
|
||||
NSAttributes::BoolToString ( pShape->m_oShape.m_pShape->m_oPath.m_arParts[i].m_bFill ),
|
||||
pShape->m_oMetric.m_lMillimetresHor,
|
||||
pShape->m_oMetric.m_lMillimetresVer );
|
||||
|
||||
Source += FillFormat;
|
||||
|
||||
if ( pShape->m_oShape.m_pShape->m_oPath.m_arParts[i].m_bFill )
|
||||
{
|
||||
Source += pShape->m_oShape.m_oBrush.ToString2();
|
||||
}
|
||||
|
||||
Source += pShape->m_oShape.m_oPen.ToString2 ();
|
||||
|
||||
for ( int nIndex = 0; nIndex < pShape->m_oShape.m_pShape->m_oPath.m_arParts[i].m_arSlices.GetSize(); ++nIndex )
|
||||
{
|
||||
#if defined(PPTX_DEF)
|
||||
Source += pShape->m_oShape.m_pShape->m_oPath.m_arParts[i].m_arSlices [ nIndex ].ToXml ( infGeomShape, pShape->m_oShape.m_pShape->m_oPath.m_arParts[i].width,
|
||||
pShape->m_oShape.m_pShape->m_oPath.m_arParts[i].height, NSBaseShape::pptx);
|
||||
#endif
|
||||
#if defined(PPT_DEF)
|
||||
Source += pShape->m_oShape.m_pShape->m_oPath.m_arParts[i].m_arSlices [ nIndex ].ToXml ( infGeomShape, pShape->m_oShape.m_pShape->m_oPath.m_arParts[i].width,
|
||||
pShape->m_oShape.m_pShape->m_oPath.m_arParts[i].height, NSBaseShape::ppt);
|
||||
#endif
|
||||
#if defined(ODP_DEF)
|
||||
Source += pShape->m_oShape.m_pShape->m_oPath.m_arParts[i].m_arSlices [ nIndex ].ToXml ( infGeomShape, pShape->m_oShape.m_pShape->m_oPath.m_arParts[i].width,
|
||||
pShape->m_oShape.m_pShape->m_oPath.m_arParts[i].height, NSBaseShape::odp);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
CString TimeLine;
|
||||
TimeLine.Format ( _T("<timeline type = \"1\" begin=\"%f\" end=\"%f\" fadein=\"0\" fadeout=\"0\" completeness=\"1.0\"/> "),
|
||||
m_nWriteSlideTimeOffset, m_nWriteSlideTimeOffset + m_nWriteSlideTime );
|
||||
|
||||
Source += GetXmlAnimationSource ( fX, fY, pSource );
|
||||
Source += TimeLine;
|
||||
Source += CString ( _T("</ImagePaint-DrawGraphicPathAnimate>") );
|
||||
}
|
||||
|
||||
return Source;
|
||||
}
|
||||
|
||||
CString CDrawingDocument::GetXmlImageSource ( CImageElement* pImage )
|
||||
{
|
||||
CString Source;
|
||||
Source.Format (
|
||||
_T("left=\"%d\" top=\"%d\" right=\"%d\" bottom=\"%d\" filepath=\"%s\" ")
|
||||
_T("metric=\"0\" backcolor=\"-1\" scaletype=\"-1\" scalecolor=\"255\" "),
|
||||
pImage->m_rcBounds.left, pImage->m_rcBounds.top, pImage->m_rcBounds.right, pImage->m_rcBounds.bottom, CString ( CW2A ( pImage->m_strFileName ) ) );
|
||||
|
||||
return Source;
|
||||
}
|
||||
|
||||
CString CDrawingDocument::GetXmlAnimationSource ( double fX, double fY, AnimationsArray* pSource )
|
||||
{
|
||||
CString XmlAnimationSource;
|
||||
|
||||
|
||||
for ( UINT i = 0; i < pSource->GetCount(); ++i )
|
||||
{
|
||||
CString XmlEffect;
|
||||
|
||||
Animations::ODTimeLineElement& pESource = pSource->GetAt(i);
|
||||
|
||||
|
||||
if ( 0x00000004 == pESource.m_nEffectType )
|
||||
{
|
||||
Animations::ODMotionPath path;
|
||||
if ( path.Create ( pESource.m_MotionPath ) )
|
||||
{
|
||||
XmlEffect.Format ( _T("<animation_effect>")
|
||||
_T("<effect_id>%d</effect_id>")
|
||||
_T("<effect_type>%d</effect_type>")
|
||||
_T("%s")
|
||||
_T("<time_delay>%f</time_delay>")
|
||||
_T("<time_duration>%f</time_duration>")
|
||||
_T("<plale_width>%f</plale_width>")
|
||||
_T("<plane_height>%f</plane_height>")
|
||||
_T("</animation_effect>"),
|
||||
|
||||
pESource.m_nEffectID,
|
||||
pESource.m_nEffectType,
|
||||
Animations::Serialize::CreateMotionPath ( path, fX, fY ),
|
||||
m_nWriteSlideTimeOffset + pESource.m_nTimeDelay,
|
||||
pESource.m_nDuration,
|
||||
fX,
|
||||
fY );
|
||||
|
||||
XmlAnimationSource += XmlEffect;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( 0x00000001 == pESource.m_nEffectType || 0x00000002 == pESource.m_nEffectType )
|
||||
{
|
||||
XmlEffect.Format ( _T("<animation_effect>")
|
||||
_T("<effect_id>%d</effect_id>")
|
||||
_T("<effect_type>%d</effect_type>")
|
||||
_T("<effect_dir>%d</effect_dir>")
|
||||
_T("<time_delay>%f</time_delay>")
|
||||
_T("<time_duration>%f</time_duration>")
|
||||
_T("<plale_width>%f</plale_width>")
|
||||
_T("<plane_height>%f</plane_height>")
|
||||
_T("</animation_effect>"),
|
||||
|
||||
pESource.m_nEffectID,
|
||||
pESource.m_nEffectType,
|
||||
pESource.m_nEffectDir,
|
||||
m_nWriteSlideTimeOffset + pESource.m_nTimeDelay,
|
||||
pESource.m_nDuration,
|
||||
fX,
|
||||
fY );
|
||||
|
||||
XmlAnimationSource += XmlEffect;
|
||||
}
|
||||
}
|
||||
|
||||
return XmlAnimationSource;
|
||||
}
|
||||
|
||||
CString CDrawingDocument::GetXmlSlideTransition ( ODCSlideShowSlideInfoAtom InfoAtom )
|
||||
{
|
||||
CString Source = CString ( _T("") );
|
||||
|
||||
int EffectID = 1;
|
||||
|
||||
switch ( InfoAtom.m_nEffectType )
|
||||
{
|
||||
case 0 :
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
case 1 :
|
||||
{
|
||||
|
||||
EffectID = 1;
|
||||
}
|
||||
break;
|
||||
case 2 :
|
||||
{
|
||||
if ( 0x00 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 1003;
|
||||
if ( 0x01 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 1001;
|
||||
}
|
||||
break;
|
||||
case 3 :
|
||||
{
|
||||
if ( 0x00 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 2901;
|
||||
if ( 0x01 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 2903;
|
||||
}
|
||||
break;
|
||||
case 4 :
|
||||
{
|
||||
|
||||
#pragma message ("TODO : Cover - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ImageStudio")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case 5 :
|
||||
{
|
||||
#pragma message ("TODO : Dissolve - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ImageStudio")
|
||||
|
||||
EffectID = 1;
|
||||
}
|
||||
break;
|
||||
case 6 :
|
||||
{
|
||||
EffectID = 4904;
|
||||
}
|
||||
break;
|
||||
case 7 :
|
||||
{
|
||||
#pragma message ("TODO : Uncover - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ImageStudio")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case 8 :
|
||||
{
|
||||
if ( 0x00 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 5331;
|
||||
if ( 0x01 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 5332;
|
||||
}
|
||||
break;
|
||||
case 9 :
|
||||
{
|
||||
if ( 0x04 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 110;
|
||||
if ( 0x05 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 111;
|
||||
if ( 0x06 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 109;
|
||||
if ( 0x07 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 108;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
{
|
||||
if ( 0x00 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 5322;
|
||||
if ( 0x01 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 5323;
|
||||
if ( 0x02 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 5321;
|
||||
if ( 0x03 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 5320;
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
{
|
||||
if ( 0x00 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 702;
|
||||
if ( 0x01 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 701;
|
||||
}
|
||||
break;
|
||||
case 13 :
|
||||
{
|
||||
if ( 0x00 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 5324;
|
||||
#pragma message ("TODO : Split Horizontal In - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ImageStudio")
|
||||
if ( 0x01 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 5324;
|
||||
if ( 0x02 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 5325;
|
||||
#pragma message ("TODO : Split Vertical In - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ImageStudio")
|
||||
if ( 0x03 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 5325;
|
||||
}
|
||||
break;
|
||||
case 17 :
|
||||
{
|
||||
EffectID = 704;
|
||||
}
|
||||
break;
|
||||
case 18 :
|
||||
{
|
||||
EffectID = 708;
|
||||
}
|
||||
break;
|
||||
case 19 :
|
||||
{
|
||||
EffectID = 3006;
|
||||
}
|
||||
break;
|
||||
case 20 :
|
||||
{
|
||||
if ( 0x00 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 1402;
|
||||
if ( 0x01 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 1404;
|
||||
if ( 0x02 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 1401;
|
||||
if ( 0x03 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 1403;
|
||||
}
|
||||
break;
|
||||
case 21 :
|
||||
{
|
||||
if ( 0x00 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 103;
|
||||
#pragma message ("TODO : MosaicStrips Vertical - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ImageStudio")
|
||||
if ( 0x01 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 103;
|
||||
}
|
||||
break;
|
||||
case 22 :
|
||||
{
|
||||
EffectID = 313;
|
||||
}
|
||||
break;
|
||||
case 23 :
|
||||
{
|
||||
EffectID = 1;
|
||||
}
|
||||
break;
|
||||
case 26 :
|
||||
{
|
||||
if ( 0x01 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 3004;
|
||||
if ( 0x02 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 3013;
|
||||
if ( 0x03 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 3017;
|
||||
if ( 0x04 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 3019;
|
||||
if ( 0x08 == InfoAtom.m_nEffectDirection )
|
||||
EffectID = 3021;
|
||||
}
|
||||
break;
|
||||
case 27 :
|
||||
{
|
||||
EffectID = 706;
|
||||
}
|
||||
break;
|
||||
default :
|
||||
{
|
||||
return Source;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Source.Format ( _T("<VideoCompose Time = \"%d\" effectid=\"%d\" />"), InfoAtom.m_nTime, EffectID );
|
||||
|
||||
return Source;
|
||||
}
|
||||
|
||||
void CDrawingDocument::NormalizeTransitionTime()
|
||||
{
|
||||
int Transition1 = 0;
|
||||
int Duration = 0;
|
||||
int Transition2 = 0;
|
||||
|
||||
for(int i = 0; i < m_arPages.GetCount(); i++)
|
||||
{
|
||||
int index = m_mapTransitions.FindKey(i);
|
||||
if(index >= 0)
|
||||
Transition1 = m_mapTransitions.GetValueAt(index).m_nTime;
|
||||
else
|
||||
Transition1 = 0;
|
||||
|
||||
Duration = m_arPages[i]->m_dDuration;
|
||||
|
||||
index = m_mapTransitions.FindKey(i+1);
|
||||
if(index >= 0)
|
||||
Transition2 = m_mapTransitions.GetValueAt(index).m_nTime;
|
||||
else
|
||||
Transition2 = 0;
|
||||
|
||||
if(i == 0)
|
||||
{
|
||||
if(Transition1 == 0)
|
||||
m_arPages[i]->m_dStartTime = 0;
|
||||
else
|
||||
m_arPages[i]->m_dStartTime = 1000;
|
||||
}
|
||||
else
|
||||
m_arPages[i]->m_dStartTime = m_arPages[i-1]->m_dStartTime + m_arPages[i-1]->m_dDuration;
|
||||
m_arPages[i]->m_dDuration = Transition1 + Duration + Transition2;
|
||||
m_arPages[i]->m_dEndTime = m_arPages[i]->m_dStartTime + m_arPages[i]->m_dDuration;
|
||||
|
||||
for(int j = 0; j < m_arPages[i]->m_arElements.GetSize(); j++)
|
||||
{
|
||||
if(m_arPages[i]->m_arElements[j]->m_etType == etAudio)
|
||||
{
|
||||
if(((CAudioElement*)(m_arPages[i]->m_arElements[j]))->m_bWithVideo == false)
|
||||
continue;
|
||||
}
|
||||
if((m_arPages[i]->m_arElements[j]->m_etType == etVideo) || (m_arPages[i]->m_arElements[j]->m_etType == etAudio))
|
||||
{
|
||||
double VideoDuration = m_arPages[i]->m_arElements[j]->m_dEndTime - m_arPages[i]->m_arElements[j]->m_dStartTime;
|
||||
m_arPages[i]->m_arElements[j]->m_dStartTime = m_arPages[i]->m_dStartTime + Transition1;
|
||||
m_arPages[i]->m_arElements[j]->m_dEndTime = min(m_arPages[i]->m_dEndTime - Transition2, m_arPages[i]->m_dStartTime + Transition1 + VideoDuration);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
m_arPages[i]->m_arElements[j]->m_dEndTime = m_arPages[i]->m_dDuration;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
192
ActiveX/Common/OfficeDrawing/Document.h
Normal file
192
ActiveX/Common/OfficeDrawing/Document.h
Normal file
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "ElementsContainer.h"
|
||||
#include "AnimationTypes.h"
|
||||
|
||||
typedef Animations::ODCSlideTimeLine::ODAnimationList AnimationsArray;
|
||||
class CDrawingDocument
|
||||
{
|
||||
public:
|
||||
CAtlArray<CElementsContainer*> m_arPages;
|
||||
|
||||
CString m_strXmlVideoSource;
|
||||
CString m_strXmlTransforms;
|
||||
CString m_strXmlOverlays;
|
||||
|
||||
|
||||
|
||||
|
||||
CSimpleMap <DWORD, ODCSlideShowSlideInfoAtom> m_mapTransitions;
|
||||
|
||||
CSimpleMap <DWORD, Animations::ODCSlideTimeLine*> m_mapAnimations;
|
||||
|
||||
double m_nWriteSlideTimeOffset;
|
||||
double m_nWriteSlideTime;
|
||||
public:
|
||||
|
||||
CDrawingDocument() : m_arPages()
|
||||
{
|
||||
}
|
||||
|
||||
~CDrawingDocument()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
m_arPages.RemoveAll();
|
||||
}
|
||||
|
||||
void ToXMLSource()
|
||||
{
|
||||
m_strXmlVideoSource = _T("");
|
||||
m_strXmlTransforms = _T("");
|
||||
m_strXmlOverlays = _T("");
|
||||
|
||||
if (0 != m_arPages.GetCount())
|
||||
{
|
||||
CString strXmlVideoSource = _T("");
|
||||
|
||||
double dDuration = 0.0;
|
||||
for (size_t nIndex = 0; nIndex < m_arPages.GetCount(); ++nIndex)
|
||||
{
|
||||
dDuration += m_arPages[nIndex]->m_dDuration;
|
||||
}
|
||||
|
||||
strXmlVideoSource.Format(_T("<VideoSources><ColorSource Color='16777215' Duration='%lf'/></VideoSources>"),
|
||||
dDuration);
|
||||
|
||||
for (size_t nIndex = 0; nIndex < m_arPages.GetCount(); ++nIndex)
|
||||
{
|
||||
double dScaleHor = (double)(m_arPages[nIndex]->m_lWidth) / m_arPages[nIndex]->m_lOriginalWidth;
|
||||
double dScaleVer = (double)(m_arPages[nIndex]->m_lHeight) / m_arPages[nIndex]->m_lOriginalHeight;
|
||||
|
||||
for (int nElem = 0; nElem < m_arPages[nIndex]->m_arElements.GetSize(); ++nElem)
|
||||
{
|
||||
CString strParam = m_arPages[nIndex]->m_arElements[nElem]->ToXml();
|
||||
|
||||
if (etVideo == m_arPages[nIndex]->m_arElements[nElem]->m_etType)
|
||||
{
|
||||
m_strXmlOverlays += strParam;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_strXmlTransforms += strParam;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_T("") != m_strXmlTransforms)
|
||||
{
|
||||
m_strXmlTransforms = _T("<VideoTransforms>") + m_strXmlTransforms + _T("</VideoTransforms>");
|
||||
}
|
||||
if (_T("") != m_strXmlOverlays)
|
||||
{
|
||||
m_strXmlOverlays = _T("<VideoOverlays>") + m_strXmlOverlays + _T("</VideoOverlays>");
|
||||
}
|
||||
|
||||
m_strXmlVideoSource = strXmlVideoSource;
|
||||
}
|
||||
}
|
||||
|
||||
void ToXmlSource2()
|
||||
{
|
||||
m_strXmlVideoSource = _T("");
|
||||
m_strXmlTransforms = _T("");
|
||||
m_strXmlOverlays = _T("");
|
||||
|
||||
if ( m_arPages.GetCount () > 0 )
|
||||
{
|
||||
|
||||
|
||||
double dDuration = 0.0;
|
||||
for (size_t nIndex = 0; nIndex < m_arPages.GetCount(); ++nIndex)
|
||||
{
|
||||
dDuration += m_arPages[nIndex]->m_dDuration;
|
||||
}
|
||||
|
||||
|
||||
|
||||
CString XmlSlideSource = _T("");
|
||||
|
||||
for ( size_t nIndex = 0; nIndex < m_arPages.GetCount(); ++nIndex )
|
||||
{
|
||||
XmlSlideSource.Format ( _T("<ColorSource Color=\"16777215\" Duration=\"%lf\" widthmetric=\"%lf\" heightmetric=\"%lf\">"),
|
||||
m_arPages [ nIndex ]->m_dDuration, (double)m_arPages[nIndex]->m_lWidth, (double)m_arPages[nIndex]->m_lHeight );
|
||||
|
||||
m_strXmlTransforms = _T("");
|
||||
m_strXmlOverlays = _T("");
|
||||
|
||||
for ( int nElem = 0; nElem < m_arPages[nIndex]->m_arElements.GetSize(); ++nElem )
|
||||
{
|
||||
CString strParam = m_arPages[nIndex]->m_arElements[nElem]->ToXml();
|
||||
|
||||
if (etVideo == m_arPages[nIndex]->m_arElements[nElem]->m_etType)
|
||||
{
|
||||
m_strXmlOverlays += strParam;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_strXmlTransforms += strParam;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
XmlSlideSource += _T("<VideoTransforms>") + m_strXmlTransforms + _T("</VideoTransforms>");
|
||||
XmlSlideSource += _T("<VideoOverlays>") + m_strXmlOverlays + _T("</VideoOverlays>");
|
||||
XmlSlideSource += _T("</ColorSource>");
|
||||
|
||||
m_strXmlVideoSource += XmlSlideSource;
|
||||
}
|
||||
|
||||
m_strXmlVideoSource = _T("<VideoSources>") + m_strXmlVideoSource + _T("</VideoSources>");
|
||||
}
|
||||
|
||||
m_strXmlTransforms = _T("");
|
||||
m_strXmlOverlays = _T("");
|
||||
|
||||
m_strXmlVideoSource = _T("<MultiSource><SingleSource>") + m_strXmlVideoSource + _T("</SingleSource></MultiSource>");
|
||||
}
|
||||
|
||||
|
||||
void ToXmlSource3();
|
||||
void WriteAnimationXml ( Animations::ODCSlideTimeLine* pTimeLine, CElementsContainer* pSlide, double nScaleW, double nScaleH );
|
||||
CString GetAnimationImageXml ( double fX, double fY, CImageElement* pImage, AnimationsArray* pSource );
|
||||
CString GetAnimationShapeXml ( double fX, double fY, CShapeElement* pShape, AnimationsArray* pSource );
|
||||
CString GetXmlImageSource ( CImageElement* pImage );
|
||||
CString GetXmlAnimationSource ( double fX, double fY, AnimationsArray* pSource );
|
||||
CString GetXmlSlideTransition ( ODCSlideShowSlideInfoAtom InfoAtom );
|
||||
void NormalizeTransitionTime();
|
||||
};
|
||||
281
ActiveX/Common/OfficeDrawing/ElementSettings.h
Normal file
281
ActiveX/Common/OfficeDrawing/ElementSettings.h
Normal file
@@ -0,0 +1,281 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "File.h"
|
||||
#include "Enums.h"
|
||||
|
||||
using namespace NSAttributes;
|
||||
|
||||
enum ElementType
|
||||
{
|
||||
etVideo = 0,
|
||||
etAudio = 1,
|
||||
etPicture = 2,
|
||||
etShape = 3,
|
||||
etText = 4
|
||||
};
|
||||
|
||||
|
||||
|
||||
class CProperty
|
||||
{
|
||||
public:
|
||||
NSOfficeDrawing::PropertyId m_ePID;
|
||||
bool m_bIsBlip;
|
||||
bool m_bComplex;
|
||||
|
||||
|
||||
DWORD m_lValue;
|
||||
|
||||
|
||||
BYTE* m_pOptions;
|
||||
|
||||
BOOL m_bIsTruncated;
|
||||
|
||||
public:
|
||||
CProperty()
|
||||
{
|
||||
m_ePID = NSOfficeDrawing::left;
|
||||
m_bIsBlip = false;
|
||||
m_bComplex = false;
|
||||
m_lValue = 0;
|
||||
m_pOptions = NULL;
|
||||
|
||||
m_bIsTruncated = FALSE;
|
||||
}
|
||||
~CProperty()
|
||||
{
|
||||
RELEASEARRAYOBJECTS(m_pOptions);
|
||||
}
|
||||
|
||||
void FromStream(IStream* pStream)
|
||||
{
|
||||
|
||||
|
||||
|
||||
USHORT lMem = StreamUtils::ReadWORD(pStream);
|
||||
m_ePID = (NSOfficeDrawing::PropertyId)(lMem & 0x3FFF);
|
||||
|
||||
m_bIsBlip = ((lMem & 0x4000) == 0x4000);
|
||||
m_bComplex = ((lMem & 0x8000) == 0x8000);
|
||||
|
||||
m_lValue = StreamUtils::ReadDWORD(pStream);
|
||||
}
|
||||
|
||||
void ComplexFromStream(IStream* pStream)
|
||||
{
|
||||
if (m_bComplex && 0 != m_lValue)
|
||||
{
|
||||
if (NSOfficeDrawing::dgmConstrainBounds == m_ePID ||
|
||||
NSOfficeDrawing::fillShadeColors == m_ePID ||
|
||||
NSOfficeDrawing::lineDashStyle == m_ePID ||
|
||||
NSOfficeDrawing::pAdjustHandles == m_ePID ||
|
||||
NSOfficeDrawing::pConnectionSites == m_ePID ||
|
||||
NSOfficeDrawing::pConnectionSitesDir == m_ePID ||
|
||||
NSOfficeDrawing::pInscribe == m_ePID ||
|
||||
NSOfficeDrawing::pSegmentInfo == m_ePID ||
|
||||
NSOfficeDrawing::pVertices == m_ePID ||
|
||||
NSOfficeDrawing::pGuides == m_ePID ||
|
||||
NSOfficeDrawing::pWrapPolygonVertices == m_ePID ||
|
||||
NSOfficeDrawing::pRelationTbl == m_ePID ||
|
||||
NSOfficeDrawing::tableRowProperties == m_ePID ||
|
||||
NSOfficeDrawing::lineLeftDashStyle == m_ePID ||
|
||||
NSOfficeDrawing::lineTopDashStyle == m_ePID ||
|
||||
NSOfficeDrawing::lineRightDashStyle == m_ePID ||
|
||||
NSOfficeDrawing::lineBottomDashStyle == m_ePID)
|
||||
{
|
||||
WORD nElems = StreamUtils::ReadWORD(pStream);
|
||||
WORD nElemsAlloc = StreamUtils::ReadWORD(pStream);
|
||||
WORD nElemSize = StreamUtils::ReadWORD(pStream);
|
||||
|
||||
if (0xFFF0 == nElemSize)
|
||||
{
|
||||
nElemSize = 4;
|
||||
m_bIsTruncated = TRUE;
|
||||
}
|
||||
|
||||
LONG dwSize = nElems * nElemSize;
|
||||
|
||||
if (m_lValue != (dwSize + 6))
|
||||
{
|
||||
BOOL b = FALSE;
|
||||
}
|
||||
|
||||
m_lValue = dwSize;
|
||||
}
|
||||
|
||||
if (0 == m_lValue)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
RELEASEARRAYOBJECTS(m_pOptions);
|
||||
m_pOptions = new BYTE[m_lValue];
|
||||
|
||||
ULONG lReadBytes = 0;
|
||||
pStream->Read(m_pOptions, m_lValue, &lReadBytes);
|
||||
if (lReadBytes != m_lValue)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CString ToString()
|
||||
{
|
||||
CString str = _T("");
|
||||
str.Format(_T("%d,%d,%d,%d"), (long)m_ePID, (long)m_bIsBlip, (long)m_bComplex, (long)m_lValue);
|
||||
|
||||
|
||||
return _T("<Property command='") + str + _T("'/>");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class CProperties
|
||||
{
|
||||
public:
|
||||
CAtlArray<CProperty> m_arProperties;
|
||||
|
||||
|
||||
long m_lCount;
|
||||
|
||||
public:
|
||||
CProperties() : m_arProperties()
|
||||
{
|
||||
}
|
||||
~CProperties()
|
||||
{
|
||||
m_lCount = 0;
|
||||
m_arProperties.RemoveAll();
|
||||
}
|
||||
|
||||
void FromStream(IStream* pStream, long lCount)
|
||||
{
|
||||
m_lCount = lCount;
|
||||
for (long lIndex = 0; lIndex < m_lCount; ++lIndex)
|
||||
{
|
||||
m_arProperties.Add();
|
||||
m_arProperties[lIndex].FromStream(pStream);
|
||||
}
|
||||
|
||||
|
||||
for (long lIndex = 0; lIndex < m_lCount; ++lIndex)
|
||||
{
|
||||
m_arProperties[lIndex].ComplexFromStream(pStream);
|
||||
}
|
||||
}
|
||||
|
||||
CString ToString()
|
||||
{
|
||||
CString str = _T("");
|
||||
for (size_t nIndex = 0; nIndex < m_arProperties.GetCount(); ++nIndex)
|
||||
{
|
||||
str += m_arProperties[nIndex].ToString();
|
||||
}
|
||||
return _T("<Properties>") + str + _T("</Properties>");
|
||||
}
|
||||
|
||||
DWORD GetLen()
|
||||
{
|
||||
DWORD dwLen = 6 * m_lCount;
|
||||
for (long nIndex = 0; nIndex < m_lCount; ++nIndex)
|
||||
{
|
||||
if (m_arProperties[nIndex].m_bComplex)
|
||||
{
|
||||
dwLen += m_arProperties[nIndex].m_lValue;
|
||||
}
|
||||
}
|
||||
return dwLen;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class CInteractiveInfo
|
||||
{
|
||||
public:
|
||||
class CTextRange
|
||||
{
|
||||
public:
|
||||
LONG m_lStart;
|
||||
LONG m_lEnd;
|
||||
|
||||
public:
|
||||
CTextRange()
|
||||
{
|
||||
m_lStart = 0;
|
||||
m_lEnd = 0;
|
||||
}
|
||||
CTextRange(const CTextRange& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
CTextRange& operator=(const CTextRange& oSrc)
|
||||
{
|
||||
m_lStart = oSrc.m_lStart;
|
||||
m_lEnd = oSrc.m_lEnd;
|
||||
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
private:
|
||||
long m_lType;
|
||||
|
||||
public:
|
||||
bool m_bPresent;
|
||||
|
||||
CAtlArray<CTextRange> m_arRanges;
|
||||
|
||||
public:
|
||||
CInteractiveInfo()
|
||||
{
|
||||
m_bPresent = false;
|
||||
}
|
||||
~CInteractiveInfo()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class CAnimationInfo
|
||||
{
|
||||
private:
|
||||
long m_lType;
|
||||
|
||||
public:
|
||||
CAnimationInfo()
|
||||
{
|
||||
}
|
||||
~CAnimationInfo()
|
||||
{
|
||||
}
|
||||
};
|
||||
93
ActiveX/Common/OfficeDrawing/Elements.cpp
Normal file
93
ActiveX/Common/OfficeDrawing/Elements.cpp
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "ElementsContainer.h"
|
||||
|
||||
void IElement::SetUpProperties(CProperties *pProps, CElementsContainer *pSlide)
|
||||
{
|
||||
if (NULL == pProps)
|
||||
return;
|
||||
|
||||
for (long nIndex = 0; nIndex < pProps->m_lCount; ++nIndex)
|
||||
{
|
||||
SetUpProperty(&pProps->m_arProperties[nIndex], pSlide);
|
||||
}
|
||||
}
|
||||
|
||||
void IElement::SetUpProperty(CProperty *pProp, CElementsContainer *pSlide)
|
||||
{
|
||||
if (hspMaster == pProp->m_ePID)
|
||||
{
|
||||
m_lMasterID = (LONG)pProp->m_lValue;
|
||||
}
|
||||
|
||||
if (rotation == pProp->m_ePID)
|
||||
{
|
||||
m_dRotate = (double)((LONG)pProp->m_lValue) / 0x00010000;
|
||||
}
|
||||
if (fFlipH == pProp->m_ePID)
|
||||
{
|
||||
BYTE flag1 = (BYTE)pProp->m_lValue;
|
||||
BYTE flag3 = (BYTE)(pProp->m_lValue >> 16);
|
||||
|
||||
bool bFlipH = (0x01 == (0x01 & flag1));
|
||||
bool bFlipV = (0x02 == (0x02 & flag1));
|
||||
|
||||
bool bUseFlipH = (0x01 == (0x01 & flag3));
|
||||
bool bUseFlipV = (0x02 == (0x02 & flag3));
|
||||
|
||||
if (bUseFlipH)
|
||||
m_bFlipH = bFlipH;
|
||||
|
||||
if (bUseFlipV)
|
||||
m_bFlipV = bFlipV;
|
||||
}
|
||||
}
|
||||
|
||||
void CImageElement::SetUpProperty(CProperty* pProp, CElementsContainer* pSlide)
|
||||
{
|
||||
IElement::SetUpProperty(pProp, pSlide);
|
||||
if (Pib == pProp->m_ePID)
|
||||
{
|
||||
DWORD dwIndex = pSlide->GetIndexPicture(pProp->m_lValue);
|
||||
|
||||
CStringW strVal = (CStringW)CDirectory::ToString(dwIndex);
|
||||
m_strFileName = m_strFileName + strVal + L".jpg";
|
||||
}
|
||||
}
|
||||
|
||||
void CShapeElement::SetUpProperties(CProperties *pProps, CElementsContainer* pSlide)
|
||||
{
|
||||
IElement::SetUpProperties(pProps, pSlide);
|
||||
m_oShape.SetProperties(pProps, pSlide);
|
||||
}
|
||||
600
ActiveX/Common/OfficeDrawing/Elements.h
Normal file
600
ActiveX/Common/OfficeDrawing/Elements.h
Normal file
@@ -0,0 +1,600 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "Shapes\Shape.h"
|
||||
#include "ElementSettings.h"
|
||||
|
||||
using namespace NSOfficeDrawing;
|
||||
|
||||
class CElementsContainer;
|
||||
|
||||
|
||||
class IElement
|
||||
{
|
||||
public:
|
||||
BOOL m_bIsBackground;
|
||||
|
||||
ElementType m_etType;
|
||||
CDoubleRect m_rcBounds;
|
||||
RECT m_rcBoundsOriginal;
|
||||
|
||||
double m_dStartTime;
|
||||
double m_dEndTime;
|
||||
|
||||
CInteractiveInfo m_oActions;
|
||||
CAnimationInfo m_oAnimations;
|
||||
|
||||
LONG m_lID;
|
||||
LONG m_lMasterID;
|
||||
|
||||
|
||||
LONG m_lPlaceholderID;
|
||||
LONG m_lPlaceholderPosition;
|
||||
|
||||
LONG m_lPersistIndex;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
IStream* m_pStream;
|
||||
LONG m_lOffsetTextStyle;
|
||||
LONG m_lOffsetTextProp;
|
||||
|
||||
|
||||
CMetricInfo m_oMetric;
|
||||
|
||||
double m_dRotate;
|
||||
bool m_bFlipH;
|
||||
bool m_bFlipV;
|
||||
public:
|
||||
IElement()
|
||||
{
|
||||
m_dRotate = 0.0;
|
||||
m_bFlipH = false;
|
||||
m_bFlipV = false;
|
||||
}
|
||||
virtual ~IElement()
|
||||
{
|
||||
m_pStream = NULL;
|
||||
m_lOffsetTextStyle = -1;
|
||||
m_lOffsetTextProp = -1;
|
||||
}
|
||||
|
||||
virtual CString ToXml() = 0;
|
||||
virtual void NormalizeCoords(double dScaleX, double dScaleY)
|
||||
{
|
||||
m_rcBounds.left = dScaleX * m_rcBoundsOriginal.left;
|
||||
m_rcBounds.right = dScaleX * m_rcBoundsOriginal.right;
|
||||
m_rcBounds.top = dScaleY * m_rcBoundsOriginal.top;
|
||||
m_rcBounds.bottom = dScaleY * m_rcBoundsOriginal.bottom;
|
||||
|
||||
|
||||
}
|
||||
|
||||
virtual void SetUpProperties(CProperties* pProps, CElementsContainer* pSlide);
|
||||
virtual IElement* CreateDublicate() = 0;
|
||||
|
||||
protected:
|
||||
virtual void SetUpProperty(CProperty* pProp, CElementsContainer* pSlide);
|
||||
|
||||
protected:
|
||||
virtual void SetProperiesToDublicate(IElement* pDublicate)
|
||||
{
|
||||
if (NULL == pDublicate)
|
||||
return;
|
||||
|
||||
pDublicate->m_bIsBackground = m_bIsBackground;
|
||||
|
||||
pDublicate->m_etType = m_etType;
|
||||
pDublicate->m_rcBounds = m_rcBounds;
|
||||
|
||||
pDublicate->m_rcBoundsOriginal.left = m_rcBoundsOriginal.left;
|
||||
pDublicate->m_rcBoundsOriginal.top = m_rcBoundsOriginal.top;
|
||||
pDublicate->m_rcBoundsOriginal.right = m_rcBoundsOriginal.right;
|
||||
pDublicate->m_rcBoundsOriginal.bottom = m_rcBoundsOriginal.bottom;
|
||||
|
||||
pDublicate->m_dStartTime = m_dStartTime;
|
||||
pDublicate->m_dEndTime = m_dEndTime;
|
||||
|
||||
pDublicate->m_lID = m_lID;
|
||||
pDublicate->m_lMasterID = m_lMasterID;
|
||||
|
||||
pDublicate->m_lPlaceholderID = m_lPlaceholderID;
|
||||
pDublicate->m_lPlaceholderPosition = m_lPlaceholderPosition;
|
||||
|
||||
pDublicate->m_lPersistIndex = m_lPersistIndex;
|
||||
|
||||
pDublicate->m_pStream = m_pStream;
|
||||
pDublicate->m_lOffsetTextStyle = m_lOffsetTextStyle;
|
||||
pDublicate->m_lOffsetTextProp = m_lOffsetTextProp;
|
||||
|
||||
pDublicate->m_oMetric = m_oMetric;
|
||||
|
||||
pDublicate->m_dRotate = m_dRotate;
|
||||
pDublicate->m_bFlipH = m_bFlipH;
|
||||
pDublicate->m_bFlipV = m_bFlipV;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
class CVideoElement : public IElement
|
||||
{
|
||||
public:
|
||||
CStringW m_strFileName;
|
||||
|
||||
double m_dVideoDuration;
|
||||
|
||||
BYTE m_nAlpha;
|
||||
LONG m_lAngle;
|
||||
|
||||
public:
|
||||
CVideoElement():IElement()
|
||||
{
|
||||
m_bIsBackground = FALSE;
|
||||
|
||||
m_pStream = NULL;
|
||||
m_lOffsetTextStyle = -1;
|
||||
m_lOffsetTextProp = -1;
|
||||
|
||||
m_lID = -1;
|
||||
m_lMasterID = -1;
|
||||
|
||||
m_lPlaceholderID = -1;
|
||||
m_lPlaceholderPosition = -1;
|
||||
|
||||
m_lPersistIndex = -1;
|
||||
|
||||
m_etType = etVideo;
|
||||
|
||||
m_rcBounds.left = 0; m_rcBounds.top = 0;
|
||||
m_rcBounds.right = 1; m_rcBounds.bottom = 1;
|
||||
|
||||
m_rcBoundsOriginal.left = 0; m_rcBoundsOriginal.top = 0;
|
||||
m_rcBoundsOriginal.right = 1; m_rcBoundsOriginal.bottom = 1;
|
||||
|
||||
m_strFileName = _T("");
|
||||
|
||||
m_dStartTime = 0.0;
|
||||
m_dEndTime = 30.0;
|
||||
|
||||
m_dVideoDuration = 0.0;
|
||||
|
||||
m_nAlpha = 0xFF;
|
||||
}
|
||||
|
||||
virtual ~CVideoElement()
|
||||
{
|
||||
}
|
||||
|
||||
virtual CString ToXml()
|
||||
{
|
||||
|
||||
|
||||
|
||||
double dCentreX = 100.0 * ((double)(m_rcBounds.right + m_rcBounds.left) / 2) / (double)m_oMetric.m_lMillimetresHor;
|
||||
double dCentreY = 100.0 * ((double)(m_rcBounds.top + m_rcBounds.bottom) / 2) / (double)m_oMetric.m_lMillimetresVer;
|
||||
|
||||
double dWidth = 100.0 * ((double)(m_rcBounds.right - m_rcBounds.left)) / (double)m_oMetric.m_lMillimetresHor;
|
||||
double dHeight = 100.0 * ((double)(m_rcBounds.bottom - m_rcBounds.top)) / (double)m_oMetric.m_lMillimetresVer;
|
||||
|
||||
CString strOverlay = _T("");
|
||||
strOverlay.Format(_T("<OverlaySetting StartTime='%lf' EndTime='%lf'><AlphaTransparency>%d</AlphaTransparency><centerx>%lf</centerx><centery>%lf</centery><widthpercent>%lf</widthpercent><heightpercent>%lf</heightpercent><Rotate Angle='%d'/></OverlaySetting>"),
|
||||
m_dStartTime, m_dEndTime, (int)m_nAlpha,
|
||||
dCentreX, dCentreY, dWidth, dHeight,
|
||||
(LONG)m_dRotate);
|
||||
|
||||
int lIndex = m_strFileName.Find(L"file:///");
|
||||
if (0 == lIndex)
|
||||
{
|
||||
m_strFileName = m_strFileName.Mid(8);
|
||||
m_strFileName.Replace('/', '\\');
|
||||
}
|
||||
|
||||
|
||||
CString strFileName = StreamUtils::ConvertCStringWToCString(m_strFileName);
|
||||
NSAttributes::CorrectXmlString(strFileName);
|
||||
|
||||
CString strSingleSource = _T("");
|
||||
strSingleSource.Format(_T("<SingleSource><VideoSources><VideoSource FilePath='%s' AudioTrack='0' StartTime='0' EndTime='-1' VideoTrack='0' SPTrack='-1' CropScale='0' ResizeType='1'/></VideoSources></SingleSource>"),
|
||||
strFileName);
|
||||
|
||||
|
||||
|
||||
return _T("<VideoOverlay>") + strOverlay + strSingleSource + _T("</VideoOverlay>");
|
||||
}
|
||||
|
||||
virtual IElement* CreateDublicate()
|
||||
{
|
||||
CVideoElement* pVideoElement = new CVideoElement();
|
||||
|
||||
SetProperiesToDublicate((IElement*)pVideoElement);
|
||||
|
||||
pVideoElement->m_strFileName = m_strFileName;
|
||||
pVideoElement->m_nAlpha = m_nAlpha;
|
||||
|
||||
pVideoElement->m_dVideoDuration = m_dVideoDuration;
|
||||
|
||||
return (IElement*)pVideoElement;
|
||||
}
|
||||
};
|
||||
|
||||
class CImageElement : public IElement
|
||||
{
|
||||
public:
|
||||
CStringW m_strFileName;
|
||||
|
||||
BYTE m_nAlpha;
|
||||
bool m_bApplyBounds;
|
||||
CDoubleRect m_rcImageBounds;
|
||||
CString m_strEffects;
|
||||
|
||||
|
||||
public:
|
||||
CImageElement():IElement()
|
||||
{
|
||||
m_bIsBackground = FALSE;
|
||||
|
||||
m_pStream = NULL;
|
||||
m_lOffsetTextStyle = -1;
|
||||
m_lOffsetTextProp = -1;
|
||||
|
||||
m_lID = -1;
|
||||
m_lMasterID = -1;
|
||||
|
||||
m_lPlaceholderID = -1;
|
||||
m_lPlaceholderPosition = -1;
|
||||
|
||||
m_lPersistIndex = -1;
|
||||
|
||||
m_etType = etPicture;
|
||||
|
||||
m_rcBounds.left = 0; m_rcBounds.top = 0;
|
||||
m_rcBounds.right = 1; m_rcBounds.bottom = 1;
|
||||
|
||||
m_rcBoundsOriginal.left = 0; m_rcBoundsOriginal.top = 0;
|
||||
m_rcBoundsOriginal.right = 1; m_rcBoundsOriginal.bottom = 1;
|
||||
|
||||
m_strFileName = _T("");
|
||||
|
||||
m_dStartTime = 0.0;
|
||||
m_dEndTime = 30.0;
|
||||
|
||||
m_nAlpha = 0xFF;
|
||||
|
||||
m_bApplyBounds = false;
|
||||
m_rcImageBounds.top = 0.0;
|
||||
m_rcImageBounds.left = 0.0;
|
||||
m_rcImageBounds.right = 0.0;
|
||||
m_rcImageBounds.bottom = 0.0;
|
||||
m_strEffects = _T("");
|
||||
}
|
||||
|
||||
virtual ~CImageElement()
|
||||
{
|
||||
}
|
||||
|
||||
virtual CString ToXml()
|
||||
{
|
||||
LONG lFlags = 0;
|
||||
if (m_bFlipH)
|
||||
lFlags |= 0x0001;
|
||||
if (m_bFlipV)
|
||||
lFlags |= 0x0002;
|
||||
|
||||
CString strFileName = StreamUtils::ConvertCStringWToCString(m_strFileName);
|
||||
NSAttributes::CorrectXmlString(strFileName);
|
||||
|
||||
|
||||
|
||||
CString strEffect = _T("");
|
||||
strEffect.Format(_T("<ImagePaint-DrawImageFromFile left='%d' top='%d' right='%d' bottom='%d' angle='%lf' flags='%d' filepath='%s' metric='0' backcolor='-1' scaletype='-1' scalecolor='255' widthmetric='%d' heightmetric='%d'>\
|
||||
<timeline type='1' begin='%lf' end='%lf' fadein='0' fadeout='0' completeness='1.0' /></ImagePaint-DrawImageFromFile>"),
|
||||
(LONG)m_rcBounds.left, (LONG)m_rcBounds.top, (LONG)m_rcBounds.right, (LONG)m_rcBounds.bottom,
|
||||
m_dRotate, lFlags, StreamUtils::ConvertCStringWToCString(m_strFileName),
|
||||
m_oMetric.m_lMillimetresHor, m_oMetric.m_lMillimetresVer,
|
||||
m_dStartTime, m_dEndTime);
|
||||
|
||||
return strEffect;
|
||||
}
|
||||
|
||||
virtual void SetUpProperty(CProperty* pProp, CElementsContainer* pSlide);
|
||||
|
||||
virtual IElement* CreateDublicate()
|
||||
{
|
||||
CImageElement* pImageElement = new CImageElement();
|
||||
|
||||
SetProperiesToDublicate((IElement*)pImageElement);
|
||||
|
||||
pImageElement->m_strFileName = m_strFileName;
|
||||
pImageElement->m_nAlpha = m_nAlpha;
|
||||
|
||||
pImageElement->m_bApplyBounds = m_bApplyBounds;
|
||||
pImageElement->m_rcImageBounds.top = m_rcImageBounds.top;
|
||||
pImageElement->m_rcImageBounds.left = m_rcImageBounds.left;
|
||||
pImageElement->m_rcImageBounds.right = m_rcImageBounds.right;
|
||||
pImageElement->m_rcImageBounds.bottom = m_rcImageBounds.bottom;
|
||||
pImageElement->m_strEffects = m_strEffects;
|
||||
|
||||
|
||||
return (IElement*)pImageElement;
|
||||
}
|
||||
};
|
||||
|
||||
class CTextElement : public IElement
|
||||
{
|
||||
public:
|
||||
CTextAttributesEx m_oSettings;
|
||||
|
||||
public:
|
||||
|
||||
CTextElement():IElement()
|
||||
{
|
||||
m_bIsBackground = FALSE;
|
||||
|
||||
m_pStream = NULL;
|
||||
m_lOffsetTextStyle = -1;
|
||||
m_lOffsetTextProp = -1;
|
||||
|
||||
m_lID = -1;
|
||||
m_lMasterID = -1;
|
||||
|
||||
m_lPlaceholderID = -1;
|
||||
m_lPlaceholderPosition = -1;
|
||||
|
||||
m_lPersistIndex = -1;
|
||||
|
||||
m_etType = etText;
|
||||
}
|
||||
|
||||
virtual ~CTextElement()
|
||||
{
|
||||
}
|
||||
|
||||
virtual CString ToXml()
|
||||
{
|
||||
CGeomShapeInfo oInfo;
|
||||
oInfo.SetBounds(m_rcBounds);
|
||||
|
||||
oInfo.m_dRotate = m_dRotate;
|
||||
oInfo.m_bFlipH = m_bFlipH;
|
||||
oInfo.m_bFlipV = m_bFlipV;
|
||||
|
||||
CString strXml = m_oSettings.ToString(oInfo, m_oMetric, m_dStartTime, m_dEndTime);
|
||||
return strXml;
|
||||
}
|
||||
|
||||
|
||||
virtual IElement* CreateDublicate()
|
||||
{
|
||||
CTextElement* pTextElement = new CTextElement();
|
||||
|
||||
SetProperiesToDublicate((IElement*)pTextElement);
|
||||
|
||||
pTextElement->m_oSettings = m_oSettings;
|
||||
|
||||
return (IElement*)pTextElement;
|
||||
}
|
||||
};
|
||||
|
||||
class CShapeElement : public IElement
|
||||
{
|
||||
private:
|
||||
NSBaseShape::ClassType m_ClassType;
|
||||
public:
|
||||
int m_lShapeType;
|
||||
CString m_strXmlTransform;
|
||||
|
||||
|
||||
CShape m_oShape;
|
||||
|
||||
|
||||
public:
|
||||
CShapeElement(NSBaseShape::ClassType ClassType, int eType) :IElement(), m_strXmlTransform(_T("")), m_lShapeType(eType), m_oShape(ClassType, eType)
|
||||
{
|
||||
m_bIsBackground = FALSE;
|
||||
m_ClassType = ClassType;
|
||||
|
||||
m_pStream = NULL;
|
||||
m_lOffsetTextStyle = -1;
|
||||
m_lOffsetTextProp = -1;
|
||||
|
||||
m_lID = -1;
|
||||
m_lMasterID = -1;
|
||||
|
||||
m_lPlaceholderID = -1;
|
||||
m_lPlaceholderPosition = -1;
|
||||
|
||||
m_lPersistIndex = -1;
|
||||
|
||||
m_etType = etShape;
|
||||
|
||||
|
||||
|
||||
m_oShape.m_rcBounds = m_rcBounds;
|
||||
|
||||
m_oShape.m_dStartTime = m_dStartTime;
|
||||
m_oShape.m_dStartTime = m_dEndTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
CShapeElement(const CString& str):IElement(), m_oShape(NSBaseShape::unknown, 0x1000)
|
||||
{
|
||||
m_lShapeType = 0x1000;
|
||||
m_oShape.LoadFromXML(str);
|
||||
m_ClassType = m_oShape.m_pShape->GetClassType();
|
||||
}
|
||||
|
||||
virtual ~CShapeElement()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
virtual CString ToXml()
|
||||
{
|
||||
m_strXmlTransform = _T("");
|
||||
|
||||
CGeomShapeInfo oInfo;
|
||||
oInfo.SetBounds(m_rcBounds);
|
||||
|
||||
oInfo.m_dRotate = m_dRotate;
|
||||
oInfo.m_bFlipH = m_bFlipH;
|
||||
oInfo.m_bFlipV = m_bFlipV;
|
||||
|
||||
m_strXmlTransform = m_oShape.ToXml(oInfo, m_oMetric, m_dStartTime, m_dEndTime);
|
||||
|
||||
return m_strXmlTransform;
|
||||
}
|
||||
|
||||
virtual void SetUpProperties(CProperties* pProps, CElementsContainer* pSlide);
|
||||
|
||||
virtual IElement* CreateDublicate()
|
||||
{
|
||||
CShapeElement* pShapeElement = new CShapeElement(m_ClassType, m_lShapeType);
|
||||
|
||||
SetProperiesToDublicate((IElement*)pShapeElement);
|
||||
|
||||
m_oShape.SetToDublicate(&pShapeElement->m_oShape);
|
||||
|
||||
pShapeElement->m_strXmlTransform = m_strXmlTransform;
|
||||
|
||||
return (IElement*)pShapeElement;
|
||||
}
|
||||
};
|
||||
|
||||
class CAudioElement : public IElement
|
||||
{
|
||||
public:
|
||||
CStringW m_strFileName;
|
||||
|
||||
BYTE m_nAmplify;
|
||||
bool m_bWithVideo;
|
||||
double m_dAudioDuration;
|
||||
bool m_bLoop;
|
||||
|
||||
double m_dClipStartTime;
|
||||
double m_dClipEndTime;
|
||||
|
||||
public:
|
||||
CAudioElement():IElement()
|
||||
{
|
||||
m_bIsBackground = FALSE;
|
||||
|
||||
m_pStream = NULL;
|
||||
m_lOffsetTextStyle = -1;
|
||||
m_lOffsetTextProp = -1;
|
||||
|
||||
m_lID = -1;
|
||||
m_lMasterID = -1;
|
||||
|
||||
m_lPlaceholderID = -1;
|
||||
m_lPlaceholderPosition = -1;
|
||||
|
||||
m_lPersistIndex = -1;
|
||||
|
||||
m_etType = etAudio;
|
||||
|
||||
m_rcBounds.left = 0; m_rcBounds.top = 0;
|
||||
m_rcBounds.right = 1; m_rcBounds.bottom = 1;
|
||||
|
||||
m_rcBoundsOriginal.left = 0; m_rcBoundsOriginal.top = 0;
|
||||
m_rcBoundsOriginal.right = 1; m_rcBoundsOriginal.bottom = 1;
|
||||
|
||||
m_strFileName = _T("");
|
||||
|
||||
m_dStartTime = 0.0;
|
||||
m_dEndTime = 30.0;
|
||||
|
||||
m_nAmplify = 100;
|
||||
m_bWithVideo = false;
|
||||
|
||||
m_dAudioDuration = 0.0;
|
||||
m_bLoop = false;
|
||||
|
||||
m_dClipStartTime = 0.0;
|
||||
m_dClipEndTime = -1.0;
|
||||
}
|
||||
|
||||
virtual ~CAudioElement()
|
||||
{
|
||||
}
|
||||
|
||||
virtual CString ToXml()
|
||||
{
|
||||
|
||||
CString strOverlay1 = _T("");
|
||||
CString strOverlay2 = _T("");
|
||||
strOverlay1.Format(_T("<AudioSource StartTime='%lf' Duration='%lf' Amplify='%lf'>"), m_dStartTime, m_dEndTime-m_dStartTime, (double)m_nAmplify);
|
||||
|
||||
int lIndex = m_strFileName.Find(L"file:///");
|
||||
if (0 == lIndex)
|
||||
{
|
||||
m_strFileName = m_strFileName.Mid(8);
|
||||
m_strFileName.Replace('/', '\\');
|
||||
m_strFileName.Replace(L"%20", L" ");
|
||||
}
|
||||
|
||||
CString strFileName = StreamUtils::ConvertCStringWToCString(m_strFileName);
|
||||
NSAttributes::CorrectXmlString(strFileName);
|
||||
|
||||
strOverlay2.Format(_T("<Source StartTime='%lf' EndTime='%lf' FilePath='%s'/></AudioSource>"), m_dClipStartTime, m_dClipEndTime, strFileName);
|
||||
|
||||
|
||||
strOverlay1 += strOverlay2;
|
||||
|
||||
return strOverlay1;
|
||||
}
|
||||
|
||||
virtual IElement* CreateDublicate()
|
||||
{
|
||||
CAudioElement* pAudioElement = new CAudioElement();
|
||||
|
||||
SetProperiesToDublicate((IElement*)pAudioElement);
|
||||
|
||||
pAudioElement->m_strFileName = m_strFileName;
|
||||
pAudioElement->m_nAmplify = m_nAmplify;
|
||||
pAudioElement->m_bWithVideo = m_bWithVideo;
|
||||
|
||||
pAudioElement->m_dAudioDuration = m_dAudioDuration;
|
||||
pAudioElement->m_bLoop = m_bLoop;
|
||||
|
||||
pAudioElement->m_dClipStartTime = m_dClipStartTime;
|
||||
pAudioElement->m_dClipEndTime = m_dClipEndTime;
|
||||
|
||||
return (IElement*)pAudioElement;
|
||||
}
|
||||
};
|
||||
146
ActiveX/Common/OfficeDrawing/ElementsContainer.h
Normal file
146
ActiveX/Common/OfficeDrawing/ElementsContainer.h
Normal file
@@ -0,0 +1,146 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "Elements.h"
|
||||
|
||||
|
||||
|
||||
class CElementsContainer
|
||||
{
|
||||
public:
|
||||
|
||||
long m_lWidth;
|
||||
long m_lHeight;
|
||||
|
||||
|
||||
long m_lOriginalWidth;
|
||||
long m_lOriginalHeight;
|
||||
|
||||
double m_dDuration;
|
||||
double m_dCurrentTime;
|
||||
bool m_bDefaultDuration;
|
||||
|
||||
double m_dStartTime;
|
||||
double m_dEndTime;
|
||||
|
||||
CSimpleArray<IElement*> m_arElements;
|
||||
|
||||
CSimpleArray<SColorAtom> m_arColorScheme;
|
||||
CSimpleArray<CFont_>* m_pFonts;
|
||||
|
||||
|
||||
|
||||
CAtlArray<BOOL>* m_parEmptyPictures;
|
||||
|
||||
public:
|
||||
|
||||
CElementsContainer() : m_arElements(), m_arColorScheme(), m_pFonts(NULL)
|
||||
{
|
||||
m_lWidth = 210;
|
||||
m_lHeight = 190;
|
||||
|
||||
m_lOriginalWidth = 0;
|
||||
m_lOriginalHeight = 0;
|
||||
|
||||
m_dCurrentTime = 0.0;
|
||||
m_dDuration = 30000.0;
|
||||
|
||||
m_dStartTime = 0.0;
|
||||
m_dEndTime = m_dDuration;
|
||||
m_bDefaultDuration = true;
|
||||
|
||||
m_parEmptyPictures = NULL;
|
||||
}
|
||||
|
||||
~CElementsContainer()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
int nCount = m_arElements.GetSize();
|
||||
for (int nIndex = nCount - 1; nIndex >= 0; --nIndex)
|
||||
{
|
||||
IElement* pElem = m_arElements[nIndex];
|
||||
m_arElements.RemoveAt(nIndex);
|
||||
RELEASEOBJECT(pElem);
|
||||
}
|
||||
}
|
||||
|
||||
void NormalizeCoordinates()
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
double dScaleX = (double)m_lWidth / m_lOriginalWidth;
|
||||
double dScaleY = (double)m_lHeight / m_lOriginalHeight;
|
||||
|
||||
for (int nIndex = 0; nIndex < m_arElements.GetSize(); ++nIndex)
|
||||
{
|
||||
m_arElements[nIndex]->NormalizeCoords(dScaleX, dScaleY);
|
||||
|
||||
CShapeElement* pElem = dynamic_cast<CShapeElement*>(m_arElements[nIndex]);
|
||||
if (NULL != pElem)
|
||||
{
|
||||
pElem->SetUpProperties(NULL, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CString ToXml()
|
||||
{
|
||||
CString str = _T("");
|
||||
str.Format(_T("<ColorSource Color='65535' Duration='%lf'/>"), m_dDuration);
|
||||
return str;
|
||||
}
|
||||
|
||||
DWORD GetIndexPicture(DWORD lIndex)
|
||||
{
|
||||
if (NULL == m_parEmptyPictures)
|
||||
return lIndex;
|
||||
|
||||
LONG lResult = 0;
|
||||
size_t nCount = m_parEmptyPictures->GetCount();
|
||||
|
||||
if (lIndex > nCount)
|
||||
return 0;
|
||||
|
||||
for (size_t nIndex = 0; nIndex < lIndex; ++nIndex)
|
||||
{
|
||||
if ((*m_parEmptyPictures)[nIndex])
|
||||
++lResult;
|
||||
}
|
||||
return lIndex - lResult;
|
||||
}
|
||||
};
|
||||
1826
ActiveX/Common/OfficeDrawing/Enums.h
Normal file
1826
ActiveX/Common/OfficeDrawing/Enums.h
Normal file
File diff suppressed because it is too large
Load Diff
666
ActiveX/Common/OfficeDrawing/File.h
Normal file
666
ActiveX/Common/OfficeDrawing/File.h
Normal file
@@ -0,0 +1,666 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../XmlUtils.h"
|
||||
#include "../ASCUtils.h"
|
||||
#include "windows.h"
|
||||
|
||||
#ifndef pow2_16
|
||||
#define pow2_16 65536
|
||||
#endif
|
||||
|
||||
class CFile
|
||||
{
|
||||
public:
|
||||
CFile()
|
||||
{
|
||||
m_hFileHandle = NULL;
|
||||
m_lFileSize = 0;
|
||||
m_lFilePosition = 0;
|
||||
}
|
||||
|
||||
virtual ~CFile()
|
||||
{
|
||||
CloseFile();
|
||||
}
|
||||
|
||||
virtual HRESULT OpenFile(CString FileName)
|
||||
{
|
||||
CloseFile();
|
||||
|
||||
HRESULT hRes = S_OK;
|
||||
DWORD AccessMode = GENERIC_READ;
|
||||
DWORD ShareMode = FILE_SHARE_READ;
|
||||
DWORD Disposition = OPEN_EXISTING;
|
||||
m_hFileHandle = ::CreateFile(FileName, AccessMode, ShareMode, NULL, Disposition, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
||||
if (NULL == m_hFileHandle || INVALID_HANDLE_VALUE == m_hFileHandle)
|
||||
hRes = S_FALSE;
|
||||
else
|
||||
{
|
||||
ULARGE_INTEGER nTempSize;
|
||||
nTempSize.LowPart = ::GetFileSize(m_hFileHandle, &nTempSize.HighPart);
|
||||
m_lFileSize = nTempSize.QuadPart;
|
||||
|
||||
SetPosition(0);
|
||||
}
|
||||
|
||||
return hRes;
|
||||
}
|
||||
|
||||
virtual HRESULT OpenFileRW(CString FileName)
|
||||
{
|
||||
CloseFile();
|
||||
|
||||
HRESULT hRes = S_OK;
|
||||
DWORD AccessMode = GENERIC_READ | GENERIC_WRITE;
|
||||
DWORD ShareMode = FILE_SHARE_READ;
|
||||
DWORD Disposition = OPEN_EXISTING;
|
||||
m_hFileHandle = ::CreateFile(FileName, AccessMode, ShareMode, NULL, Disposition, 0, 0);
|
||||
|
||||
if (NULL == m_hFileHandle || INVALID_HANDLE_VALUE == m_hFileHandle)
|
||||
{
|
||||
hRes = S_FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
ULARGE_INTEGER nTempSize;
|
||||
nTempSize.LowPart = ::GetFileSize(m_hFileHandle, &nTempSize.HighPart);
|
||||
m_lFileSize = nTempSize.QuadPart;
|
||||
|
||||
SetPosition(0);
|
||||
}
|
||||
|
||||
return hRes;
|
||||
}
|
||||
|
||||
HRESULT ReadFile(BYTE* pData, DWORD nBytesToRead)
|
||||
{
|
||||
DWORD nBytesRead = 0;
|
||||
if(NULL == pData)
|
||||
return S_FALSE;
|
||||
|
||||
if(m_hFileHandle && (pData))
|
||||
{
|
||||
SetPosition(m_lFilePosition);
|
||||
::ReadFile(m_hFileHandle, pData, nBytesToRead, &nBytesRead, NULL);
|
||||
m_lFilePosition += nBytesRead;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT ReadFile2(BYTE* pData, DWORD nBytesToRead)
|
||||
{
|
||||
DWORD nBytesRead = 0;
|
||||
if(NULL == pData)
|
||||
return S_FALSE;
|
||||
|
||||
if(m_hFileHandle && (pData))
|
||||
{
|
||||
SetPosition(m_lFilePosition);
|
||||
::ReadFile(m_hFileHandle, pData, nBytesToRead, &nBytesRead, NULL);
|
||||
m_lFilePosition += nBytesRead;
|
||||
|
||||
for (size_t index = 0; index < nBytesToRead / 2; ++index)
|
||||
{
|
||||
BYTE temp = pData[index];
|
||||
pData[index] = pData[nBytesToRead - index - 1];
|
||||
pData[nBytesToRead - index - 1] = temp;
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT ReadFile3(void* pData, DWORD nBytesToRead)
|
||||
{
|
||||
DWORD nBytesRead = 0;
|
||||
if(NULL == pData)
|
||||
return S_FALSE;
|
||||
|
||||
if(m_hFileHandle && (pData))
|
||||
{
|
||||
SetPosition(m_lFilePosition);
|
||||
::ReadFile(m_hFileHandle, pData, nBytesToRead, &nBytesRead, NULL);
|
||||
m_lFilePosition += nBytesRead;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WriteFile(void* pData, DWORD nBytesToWrite)
|
||||
{
|
||||
if(m_hFileHandle)
|
||||
{
|
||||
DWORD dwWritten = 0;
|
||||
::WriteFile(m_hFileHandle, pData, nBytesToWrite, &dwWritten, NULL);
|
||||
m_lFilePosition += nBytesToWrite;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WriteFile2(void* pData, DWORD nBytesToWrite)
|
||||
{
|
||||
if(m_hFileHandle)
|
||||
{
|
||||
BYTE* mem = new BYTE[nBytesToWrite];
|
||||
memcpy(mem, pData, nBytesToWrite);
|
||||
|
||||
for (size_t index = 0; index < nBytesToWrite / 2; ++index)
|
||||
{
|
||||
BYTE temp = mem[index];
|
||||
mem[index] = mem[nBytesToWrite - index - 1];
|
||||
mem[nBytesToWrite - index - 1] = temp;
|
||||
}
|
||||
|
||||
DWORD dwWritten = 0;
|
||||
::WriteFile(m_hFileHandle, (void*)mem, nBytesToWrite, &dwWritten, NULL);
|
||||
m_lFilePosition += nBytesToWrite;
|
||||
RELEASEARRAYOBJECTS(mem);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CreateFile(CString strFileName)
|
||||
{
|
||||
CloseFile();
|
||||
DWORD AccessMode = GENERIC_WRITE;
|
||||
DWORD ShareMode = FILE_SHARE_WRITE;
|
||||
DWORD Disposition = CREATE_ALWAYS;
|
||||
m_hFileHandle = ::CreateFile(strFileName, AccessMode, ShareMode, NULL, Disposition, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
return SetPosition(0);
|
||||
}
|
||||
HRESULT SetPosition( ULONG64 nPos )
|
||||
{
|
||||
if (m_hFileHandle && nPos < (ULONG)m_lFileSize)
|
||||
{
|
||||
LARGE_INTEGER nTempPos;
|
||||
nTempPos.QuadPart = nPos;
|
||||
::SetFilePointer(m_hFileHandle, nTempPos.LowPart, &nTempPos.HighPart, FILE_BEGIN);
|
||||
m_lFilePosition = nPos;
|
||||
return S_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (INVALID_HANDLE_VALUE == m_hFileHandle) ? S_FALSE : S_OK;
|
||||
}
|
||||
}
|
||||
LONG64 GetPosition()
|
||||
{
|
||||
return m_lFilePosition;
|
||||
}
|
||||
HRESULT SkipBytes(ULONG64 nCount)
|
||||
{
|
||||
return SetPosition(m_lFilePosition + nCount);
|
||||
}
|
||||
|
||||
HRESULT CloseFile()
|
||||
{
|
||||
m_lFileSize = 0;
|
||||
m_lFilePosition = 0;
|
||||
RELEASEHANDLE(m_hFileHandle);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ULONG64 GetFileSize()
|
||||
{
|
||||
return m_lFileSize;
|
||||
}
|
||||
|
||||
HRESULT WriteReserved(DWORD dwCount)
|
||||
{
|
||||
BYTE* buf = new BYTE[dwCount];
|
||||
memset(buf, 0, (size_t)dwCount);
|
||||
HRESULT hr = WriteFile(buf, dwCount);
|
||||
RELEASEARRAYOBJECTS(buf);
|
||||
return hr;
|
||||
}
|
||||
HRESULT WriteReserved2(DWORD dwCount)
|
||||
{
|
||||
BYTE* buf = new BYTE[dwCount];
|
||||
memset(buf, 0xFF, (size_t)dwCount);
|
||||
HRESULT hr = WriteFile(buf, dwCount);
|
||||
RELEASEARRAYOBJECTS(buf);
|
||||
return hr;
|
||||
}
|
||||
HRESULT WriteReservedTo(DWORD dwPoint)
|
||||
{
|
||||
if (m_lFilePosition >= dwPoint)
|
||||
return S_OK;
|
||||
|
||||
DWORD dwCount = dwPoint - (DWORD)m_lFilePosition;
|
||||
BYTE* buf = new BYTE[dwCount];
|
||||
memset(buf, 0, (size_t)dwCount);
|
||||
HRESULT hr = WriteFile(buf, dwCount);
|
||||
RELEASEARRAYOBJECTS(buf);
|
||||
return hr;
|
||||
}
|
||||
HRESULT SkipReservedTo(DWORD dwPoint)
|
||||
{
|
||||
if (m_lFilePosition >= dwPoint)
|
||||
return S_OK;
|
||||
|
||||
DWORD dwCount = dwPoint - (DWORD)m_lFilePosition;
|
||||
return SkipBytes(dwCount);
|
||||
}
|
||||
|
||||
void WriteStringUTF8(CString& strXml)
|
||||
{
|
||||
int nLength = strXml.GetLength();
|
||||
|
||||
CStringA saStr;
|
||||
|
||||
#ifdef UNICODE
|
||||
|
||||
WideCharToMultiByte(CP_UTF8, 0, strXml.GetBuffer(), nLength + 1, saStr.GetBuffer(nLength*3 + 1), nLength*3, NULL, NULL);
|
||||
saStr.ReleaseBuffer();
|
||||
#else
|
||||
wchar_t* pWStr = new wchar_t[nLength + 1];
|
||||
if (!pWStr)
|
||||
return;
|
||||
|
||||
|
||||
pWStr[nLength] = 0;
|
||||
|
||||
|
||||
MultiByteToWideChar(CP_ACP, 0, strXml, nLength, pWStr, nLength);
|
||||
|
||||
int nLengthW = (int)wcslen(pWStr);
|
||||
|
||||
|
||||
WideCharToMultiByte(CP_UTF8, 0, pWStr, nLengthW + 1, saStr.GetBuffer(nLengthW*3 + 1), nLengthW*3, NULL, NULL);
|
||||
saStr.ReleaseBuffer();
|
||||
|
||||
delete[] pWStr;
|
||||
#endif
|
||||
|
||||
WriteFile((void*)saStr.GetBuffer(), saStr.GetLength());
|
||||
}
|
||||
|
||||
LONG GetProgress()
|
||||
{
|
||||
if (0 >= m_lFileSize)
|
||||
return -1;
|
||||
|
||||
double dVal = (double)(100 * m_lFilePosition);
|
||||
LONG lProgress = (LONG)(dVal / m_lFileSize);
|
||||
return lProgress;
|
||||
}
|
||||
|
||||
protected:
|
||||
HANDLE m_hFileHandle;
|
||||
LONG64 m_lFileSize;
|
||||
LONG64 m_lFilePosition;
|
||||
};
|
||||
|
||||
namespace CDirectory
|
||||
{
|
||||
static CString GetFolderName(CString strFolderPath)
|
||||
{
|
||||
int n1 = strFolderPath.ReverseFind('\\');
|
||||
if (-1 == n1)
|
||||
return _T("");
|
||||
|
||||
return strFolderPath.Mid(n1 + 1);
|
||||
}
|
||||
static BOOL OpenFile(CString strFolderPath, CString strFileName, CFile* pFile)
|
||||
{
|
||||
CString strFile = strFolderPath + '\\' + strFileName;
|
||||
return (S_OK == pFile->OpenFile(strFile));
|
||||
}
|
||||
static BOOL CreateFile(CString strFolderPath, CString strFileName, CFile* pFile)
|
||||
{
|
||||
CString strFile = strFolderPath + '\\' + strFileName;
|
||||
return (S_OK == pFile->CreateFile(strFile));
|
||||
}
|
||||
static BOOL CreateDirectory(CString strFolderPathRoot, CString strFolderName)
|
||||
{
|
||||
CString strFolder = strFolderPathRoot + '\\' + strFolderName;
|
||||
return ::CreateDirectory(strFolder, NULL);
|
||||
}
|
||||
static BOOL CreateDirectory(CString strFolderPath)
|
||||
{
|
||||
return ::CreateDirectory(strFolderPath, NULL);
|
||||
}
|
||||
|
||||
static BOOL MoveFile(CString strExists, CString strNew, LPPROGRESS_ROUTINE lpFunc, LPVOID lpData)
|
||||
{
|
||||
#if (_WIN32_WINNT >= 0x0500)
|
||||
return ::MoveFileWithProgress(strExists, strNew, lpFunc, lpData, MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH);
|
||||
#else
|
||||
return ::MoveFileEx(strExists, strNew, MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH);
|
||||
#endif
|
||||
}
|
||||
|
||||
static BOOL CopyFile(CString strExists, CString strNew, LPPROGRESS_ROUTINE lpFunc, LPVOID lpData)
|
||||
{
|
||||
DeleteFile(strNew);
|
||||
return ::CopyFileEx(strExists, strNew, lpFunc, lpData, FALSE, 0);
|
||||
}
|
||||
|
||||
static CString GetUnder(CString strFolderPathRoot, CString strFolderName)
|
||||
{
|
||||
CString strFolder = strFolderPathRoot + '\\' + strFolderName;
|
||||
return strFolder;
|
||||
}
|
||||
|
||||
static CString GetFileName(CString strFullName)
|
||||
{
|
||||
int nStart = strFullName.ReverseFind('\\');
|
||||
CString strName = strFullName.Mid(nStart + 1);
|
||||
return strName;
|
||||
}
|
||||
|
||||
static CString BYTEArrayToString(BYTE* arr, size_t nCount)
|
||||
{
|
||||
CString str;
|
||||
for (size_t index = 0; index < nCount; ++index)
|
||||
{
|
||||
if ('\0' != (char)(arr[index]))
|
||||
str += (char)(arr[index]);
|
||||
}
|
||||
if (str.GetLength() == 0)
|
||||
str = _T("0");
|
||||
return str;
|
||||
}
|
||||
|
||||
static CStringW BYTEArrayToStringW(BYTE* arr, size_t nCount)
|
||||
{
|
||||
CStringW str;
|
||||
wchar_t* pArr = (wchar_t*)arr;
|
||||
size_t nCountNew = nCount / 2;
|
||||
for (size_t index = 0; index < nCountNew; ++index)
|
||||
{
|
||||
str += pArr[index];
|
||||
}
|
||||
if (str.GetLength() == 0)
|
||||
str = _T("0");
|
||||
return str;
|
||||
}
|
||||
|
||||
static CString BYTEArrayToString2(USHORT* arr, size_t nCount)
|
||||
{
|
||||
CString str;
|
||||
for (size_t index = 0; index < nCount; ++index)
|
||||
{
|
||||
if ('\0' != (char)(arr[index]))
|
||||
str += (char)(arr[index]);
|
||||
}
|
||||
if (str.GetLength() == 0)
|
||||
str = _T("0");
|
||||
return str;
|
||||
}
|
||||
|
||||
static CString ToString(DWORD val)
|
||||
{
|
||||
CString str = _T("");
|
||||
str.Format(_T("%d"), (LONG)val);
|
||||
return str;
|
||||
}
|
||||
|
||||
static CString ToString(UINT64 val, bool bInit)
|
||||
{
|
||||
CString strCoarse = ToString((DWORD)(val >> 32));
|
||||
if (_T("0") != strCoarse)
|
||||
{
|
||||
return strCoarse + ToString((DWORD)val);
|
||||
}
|
||||
|
||||
return ToString((DWORD)val);
|
||||
}
|
||||
|
||||
static UINT64 GetUINT64(CString strVal)
|
||||
{
|
||||
UINT64 nRet = 0;
|
||||
int nLen = strVal.GetLength();
|
||||
while (nLen > 0)
|
||||
{
|
||||
int nDig = XmlUtils::GetDigit(strVal[0]);
|
||||
nRet *= 10;
|
||||
nRet += nDig;
|
||||
strVal.Delete(0);
|
||||
--nLen;
|
||||
}
|
||||
return nRet;
|
||||
}
|
||||
static UINT GetUINT(CString strVal)
|
||||
{
|
||||
return (UINT)GetUINT64(strVal);
|
||||
}
|
||||
|
||||
static void WriteValueToNode(CString strName, DWORD value, XmlUtils::CXmlWriter* pWriter)
|
||||
{
|
||||
pWriter->WriteNodeBegin(strName);
|
||||
pWriter->WriteString(CDirectory::ToString(value));
|
||||
pWriter->WriteNodeEnd(strName);
|
||||
}
|
||||
static void WriteValueToNode(CString strName, LONG value, XmlUtils::CXmlWriter* pWriter)
|
||||
{
|
||||
pWriter->WriteNodeBegin(strName);
|
||||
CString strLONG = _T("");
|
||||
strLONG.Format(_T("%d"), value);
|
||||
pWriter->WriteString(strLONG);
|
||||
pWriter->WriteNodeEnd(strName);
|
||||
}
|
||||
static void WriteValueToNode(CString strName, CString value, XmlUtils::CXmlWriter* pWriter)
|
||||
{
|
||||
pWriter->WriteNodeBegin(strName);
|
||||
pWriter->WriteString(value);
|
||||
pWriter->WriteNodeEnd(strName);
|
||||
}
|
||||
static void WriteValueToNode(CString strName, WCHAR value, XmlUtils::CXmlWriter* pWriter)
|
||||
{
|
||||
CString str(value);
|
||||
|
||||
pWriter->WriteNodeBegin(strName);
|
||||
pWriter->WriteString(str);
|
||||
pWriter->WriteNodeEnd(strName);
|
||||
}
|
||||
static void WriteValueToNode(CString strName, bool value, XmlUtils::CXmlWriter* pWriter)
|
||||
{
|
||||
pWriter->WriteNodeBegin(strName);
|
||||
CString str = (true == value) ? _T("1") : _T("0");
|
||||
pWriter->WriteString(str);
|
||||
pWriter->WriteNodeEnd(strName);
|
||||
}
|
||||
static double FixedPointToDouble(DWORD point)
|
||||
{
|
||||
double dVal = (double)(point % pow2_16) / pow2_16;
|
||||
dVal += (point / pow2_16);
|
||||
return dVal;
|
||||
}
|
||||
static LONG NormFixedPoint(DWORD point, LONG base)
|
||||
{
|
||||
return (LONG)(FixedPointToDouble(point) * base);
|
||||
}
|
||||
static void SaveToFile(CString strFileName, CString strXml)
|
||||
{
|
||||
int nLength = strXml.GetLength();
|
||||
|
||||
CStringA saStr;
|
||||
|
||||
#ifdef UNICODE
|
||||
|
||||
WideCharToMultiByte(CP_UTF8, 0, strXml.GetBuffer(), nLength + 1, saStr.GetBuffer(nLength*3 + 1), nLength*3, NULL, NULL);
|
||||
saStr.ReleaseBuffer();
|
||||
#else
|
||||
wchar_t* pWStr = new wchar_t[nLength + 1];
|
||||
if (!pWStr)
|
||||
return;
|
||||
|
||||
|
||||
pWStr[nLength] = 0;
|
||||
|
||||
|
||||
MultiByteToWideChar(CP_ACP, 0, strXml, nLength, pWStr, nLength);
|
||||
|
||||
int nLengthW = (int)wcslen(pWStr);
|
||||
|
||||
|
||||
WideCharToMultiByte(CP_UTF8, 0, pWStr, nLengthW + 1, saStr.GetBuffer(nLengthW*3 + 1), nLengthW*3, NULL, NULL);
|
||||
saStr.ReleaseBuffer();
|
||||
|
||||
delete[] pWStr;
|
||||
#endif
|
||||
|
||||
CFile oFile;
|
||||
oFile.CreateFile(strFileName);
|
||||
oFile.WriteFile((void*)saStr.GetBuffer(), saStr.GetLength());
|
||||
oFile.CloseFile();
|
||||
}
|
||||
}
|
||||
|
||||
namespace StreamUtils
|
||||
{
|
||||
static BYTE ReadBYTE(IStream* pStream)
|
||||
{
|
||||
BYTE lMem = 0;
|
||||
ULONG lReadByte = 0;
|
||||
pStream->Read(&lMem, 1, &lReadByte);
|
||||
if (lReadByte < 1)
|
||||
{
|
||||
lMem = 0;
|
||||
}
|
||||
return lMem;
|
||||
}
|
||||
static WORD ReadWORD(IStream* pStream)
|
||||
{
|
||||
WORD lWord = 0;
|
||||
BYTE pMem[2];
|
||||
ULONG lReadByte = 0;
|
||||
pStream->Read(pMem, 2, &lReadByte);
|
||||
if (lReadByte == 2)
|
||||
{
|
||||
lWord = ((pMem[1] << 8) | pMem[0]);
|
||||
}
|
||||
return lWord;
|
||||
}
|
||||
static DWORD ReadDWORD(IStream* pStream)
|
||||
{
|
||||
DWORD lDWord = 0;
|
||||
BYTE pMem[4];
|
||||
ULONG lReadByte = 0;
|
||||
pStream->Read(pMem, 4, &lReadByte);
|
||||
|
||||
#ifdef _DEBUG
|
||||
ATLASSERT(4 == lReadByte);
|
||||
#endif
|
||||
|
||||
if (lReadByte == 4)
|
||||
{
|
||||
lDWord = ((pMem[3] << 24) | (pMem[2] << 16) | (pMem[1] << 8) | pMem[0]);
|
||||
}
|
||||
return lDWord;
|
||||
}
|
||||
static SHORT ReadSHORT(IStream* pStream)
|
||||
{
|
||||
return (SHORT)ReadWORD(pStream);
|
||||
}
|
||||
static LONG ReadLONG(IStream* pStream)
|
||||
{
|
||||
return (LONG)ReadDWORD(pStream);
|
||||
}
|
||||
|
||||
static FLOAT ReadFLOAT ( IStream* pStream )
|
||||
{
|
||||
FLOAT Value = 0.0f;
|
||||
pStream->Read ( &Value, sizeof (FLOAT), NULL );
|
||||
return Value;
|
||||
}
|
||||
|
||||
static CString ReadCString(IStream* pStream, LONG lLen)
|
||||
{
|
||||
char* pData = new char[lLen + 1];
|
||||
ULONG lReadByte = 0;
|
||||
pStream->Read(pData, lLen, &lReadByte);
|
||||
|
||||
pData[lLen] = 0;
|
||||
|
||||
CString str(pData);
|
||||
|
||||
delete[] pData;
|
||||
return str;
|
||||
}
|
||||
static CStringW ReadCStringW(IStream* pStream, LONG lLen)
|
||||
{
|
||||
wchar_t* pData = new wchar_t[lLen + 1];
|
||||
ULONG lReadByte = 0;
|
||||
pStream->Read(pData, 2 * lLen, &lReadByte);
|
||||
|
||||
pData[lLen] = 0;
|
||||
|
||||
CStringW str(pData);
|
||||
delete[] pData;
|
||||
return str;
|
||||
}
|
||||
static CString ConvertCStringWToCString(CStringW& strW)
|
||||
{
|
||||
|
||||
|
||||
|
||||
BSTR bstr = strW.AllocSysString();
|
||||
CString str(bstr);
|
||||
SysFreeString(bstr);
|
||||
|
||||
return str;
|
||||
}
|
||||
static void StreamSeek(long lOffset, IStream* pStream)
|
||||
{
|
||||
LARGE_INTEGER li;
|
||||
li.LowPart = lOffset;
|
||||
li.HighPart = 0;
|
||||
pStream->Seek(li, STREAM_SEEK_SET, NULL);
|
||||
}
|
||||
static void StreamPosition(long& lPosition, IStream* pStream)
|
||||
{
|
||||
ULARGE_INTEGER uli;
|
||||
LARGE_INTEGER li;
|
||||
li.LowPart = 0;
|
||||
li.HighPart = 0;
|
||||
pStream->Seek(li, STREAM_SEEK_CUR, &uli);
|
||||
lPosition = (LONG)uli.LowPart;
|
||||
}
|
||||
static void StreamSkip(long lCount, IStream* pStream)
|
||||
{
|
||||
LARGE_INTEGER li;
|
||||
li.LowPart = lCount;
|
||||
li.HighPart = 0;
|
||||
pStream->Seek(li, STREAM_SEEK_CUR, NULL);
|
||||
}
|
||||
static void StreamSkipBack(long lCount, IStream* pStream)
|
||||
{
|
||||
ULARGE_INTEGER ulPos;
|
||||
LARGE_INTEGER li;
|
||||
li.LowPart = 0;
|
||||
li.HighPart = 0;
|
||||
pStream->Seek(li, STREAM_SEEK_CUR, &ulPos);
|
||||
|
||||
StreamSeek((long)(ulPos.LowPart - lCount), pStream);
|
||||
}
|
||||
}
|
||||
977
ActiveX/Common/OfficeDrawing/PropertyParcer.h
Normal file
977
ActiveX/Common/OfficeDrawing/PropertyParcer.h
Normal file
@@ -0,0 +1,977 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "Enums.h"
|
||||
#include "Structures.h"
|
||||
|
||||
using namespace NSOfficeDrawing;
|
||||
using namespace NSOfficePPT;
|
||||
|
||||
class CTypeTransform
|
||||
{
|
||||
RECT m_oRect;
|
||||
LONG m_nAngle;
|
||||
|
||||
bool m_bIsFlipV;
|
||||
bool m_bIsFlipH;
|
||||
|
||||
bool m_bIsFlipVUse;
|
||||
bool m_bIsFlipHUse;
|
||||
|
||||
public:
|
||||
CTypeTransform()
|
||||
{
|
||||
m_oRect.left = 0; m_oRect.top = 0;
|
||||
m_oRect.right = 1; m_oRect.bottom = 1;
|
||||
|
||||
m_nAngle = 0;
|
||||
|
||||
m_bIsFlipH = false;
|
||||
m_bIsFlipV = false;
|
||||
|
||||
m_bIsFlipHUse = false;
|
||||
m_bIsFlipVUse = false;
|
||||
}
|
||||
};
|
||||
|
||||
class CTypeProtection
|
||||
{
|
||||
bool m_bLockAgainstUngrouping;
|
||||
bool m_bLockRotation;
|
||||
bool m_bLockAspectRatio;
|
||||
bool m_bLockPosition;
|
||||
bool m_bLockAgainstSelect;
|
||||
bool m_bLockCropping;
|
||||
bool m_bLockVertices;
|
||||
bool m_bLockText;
|
||||
bool m_bLockAdjustHandles;
|
||||
bool m_bLockAgainstGrouping;
|
||||
|
||||
public:
|
||||
CTypeProtection()
|
||||
{
|
||||
m_bLockAgainstUngrouping = false;
|
||||
m_bLockRotation = false;
|
||||
m_bLockAspectRatio = false;
|
||||
m_bLockPosition = false;
|
||||
m_bLockAgainstSelect = false;
|
||||
m_bLockCropping = false;
|
||||
m_bLockVertices = false;
|
||||
m_bLockText = false;
|
||||
m_bLockAdjustHandles = false;
|
||||
m_bLockAgainstGrouping = false;
|
||||
}
|
||||
};
|
||||
|
||||
class CTypeText
|
||||
{
|
||||
LONG m_lTextID;
|
||||
RECT m_oBounds;
|
||||
|
||||
NSOfficeDrawing::WrapMode m_WrapMode;
|
||||
LONG m_lScale;
|
||||
|
||||
AnchorMode m_AnchorMode;
|
||||
|
||||
TxflMode m_FlMode;
|
||||
|
||||
CdirMode m_FontRotation;
|
||||
|
||||
DWORD m_lNextID;
|
||||
|
||||
TxDirMode m_DirMode;
|
||||
|
||||
LONG m_lColomnsCount;
|
||||
LONG m_lMarginColomn;
|
||||
|
||||
bool m_bSelectText;
|
||||
bool m_bAutoTextMargin;
|
||||
bool m_bRotateText;
|
||||
bool m_bFitShapeToText;
|
||||
bool m_bFitTextToShape;
|
||||
|
||||
public:
|
||||
CTypeText()
|
||||
{
|
||||
m_lTextID = 0;
|
||||
|
||||
m_oBounds.left = 0x00016530;
|
||||
m_oBounds.top = 0x0000B298;
|
||||
m_oBounds.right = 0x00016530;
|
||||
m_oBounds.bottom = 0x0000B298;
|
||||
|
||||
m_WrapMode = wrapSquare;
|
||||
|
||||
m_lScale = 0;
|
||||
|
||||
m_AnchorMode = anchorTop;
|
||||
|
||||
m_FlMode = txflHorzN;
|
||||
|
||||
m_FontRotation = cdir0;
|
||||
|
||||
m_DirMode = txdirLTR;
|
||||
|
||||
m_lNextID = 0;
|
||||
|
||||
LONG m_lColomnsCount = 1;
|
||||
LONG m_lMarginColomn = 91440;
|
||||
|
||||
bool m_bSelectText = true;
|
||||
bool m_bAutoTextMargin = false;
|
||||
bool m_bRotateText = false;
|
||||
bool m_bFitShapeToText = false;
|
||||
bool m_bFitTextToShape = false;
|
||||
}
|
||||
};
|
||||
|
||||
class CTypeGeoText
|
||||
{
|
||||
CStringW m_strText;
|
||||
GeoTextAlign m_Align;
|
||||
|
||||
DWORD m_nSize;
|
||||
DWORD m_nTextSpacing;
|
||||
|
||||
CStringW m_strFontFamily;
|
||||
CStringW m_strFontCSS;
|
||||
|
||||
bool m_bReverseRows;
|
||||
bool m_bEffect;
|
||||
bool m_bVertical;
|
||||
bool m_bKern;
|
||||
|
||||
bool m_bTight;
|
||||
bool m_bStretch;
|
||||
bool m_bShrinkFit;
|
||||
bool m_bBestFit;
|
||||
bool m_bNormalize;
|
||||
bool m_bDxMeasure;
|
||||
bool m_bBold;
|
||||
bool m_bItalic;
|
||||
bool m_bUnderline;
|
||||
bool m_bShadow;
|
||||
bool m_bSmallcaps;
|
||||
bool m_bStrikethrough;
|
||||
|
||||
public:
|
||||
CTypeGeoText()
|
||||
{
|
||||
m_strText = _T("");
|
||||
m_Align = alignTextCenter;
|
||||
|
||||
m_nSize = 0x00240000;
|
||||
m_nTextSpacing = 0x00010000;
|
||||
|
||||
m_strFontFamily = _T("");
|
||||
m_strFontCSS = _T("");
|
||||
|
||||
m_bReverseRows = false;
|
||||
m_bEffect = false;
|
||||
m_bVertical = false;
|
||||
m_bKern = false;
|
||||
|
||||
m_bTight = false;
|
||||
m_bStretch = false;
|
||||
m_bShrinkFit = false;
|
||||
m_bBestFit = false;
|
||||
m_bNormalize = false;
|
||||
m_bDxMeasure = false;
|
||||
m_bBold = false;
|
||||
m_bItalic = false;
|
||||
m_bUnderline = false;
|
||||
m_bShadow = false;
|
||||
m_bSmallcaps = false;
|
||||
m_bStrikethrough = false;
|
||||
}
|
||||
};
|
||||
|
||||
class CTypeBlip
|
||||
{
|
||||
RECT m_oCropRect;
|
||||
|
||||
DWORD m_nImageNumber;
|
||||
|
||||
|
||||
CStringW m_strFileName;
|
||||
BlipFlags m_Flag;
|
||||
|
||||
SColorAtom m_oTransparentColor;
|
||||
|
||||
LONG m_nContrast;
|
||||
LONG m_nBrightness;
|
||||
LONG m_nGamma;
|
||||
LONG m_nPictureID;
|
||||
|
||||
bool m_bPicturePreserveGrays;
|
||||
bool m_bRewind;
|
||||
bool m_bLooping;
|
||||
bool m_bPictureGray;
|
||||
bool m_bPictureBiLevel;
|
||||
bool m_bPictureActive;
|
||||
|
||||
public:
|
||||
CTypeBlip()
|
||||
{
|
||||
m_oCropRect.top = 0; m_oCropRect.left = 0;
|
||||
m_oCropRect.right = 0; m_oCropRect.bottom = 0;
|
||||
|
||||
m_strFileName = _T("");
|
||||
m_Flag = blipflagComment;
|
||||
|
||||
m_oTransparentColor.R = 0xFF;
|
||||
m_oTransparentColor.G = 0xFF;
|
||||
m_oTransparentColor.B = 0xFF;
|
||||
m_oTransparentColor.Index = 0xFF;
|
||||
|
||||
m_nContrast = 0x0001FFFF;
|
||||
m_nBrightness = 0;
|
||||
m_nGamma = 0;
|
||||
m_nPictureID = 0;
|
||||
|
||||
m_bPicturePreserveGrays = false;
|
||||
m_bRewind = false;
|
||||
m_bLooping = false;
|
||||
m_bPictureGray = false;
|
||||
m_bPictureBiLevel = false;
|
||||
m_bPictureActive = false;
|
||||
}
|
||||
};
|
||||
|
||||
class CTypeGeometry
|
||||
{
|
||||
RECT m_oGeoRect;
|
||||
|
||||
ShapePath m_Path;
|
||||
|
||||
CString m_strVertices;
|
||||
CString m_strSegmentInfo;
|
||||
|
||||
LONG m_lAdjustValue1;
|
||||
LONG m_lAdjustValue2;
|
||||
LONG m_lAdjustValue3;
|
||||
LONG m_lAdjustValue4;
|
||||
LONG m_lAdjustValue5;
|
||||
LONG m_lAdjustValue6;
|
||||
LONG m_lAdjustValue7;
|
||||
LONG m_lAdjustValue8;
|
||||
LONG m_lAdjustValue9;
|
||||
LONG m_lAdjustValue10;
|
||||
|
||||
CString m_strConnectionsSites;
|
||||
CString m_strConnectionsSitesDir;
|
||||
|
||||
LONG m_nLimoX;
|
||||
LONG m_nLimoY;
|
||||
|
||||
CString m_strAdjustHandles;
|
||||
CString m_strGuides;
|
||||
CString m_strInscribe;
|
||||
|
||||
bool m_bColumnLine;
|
||||
bool m_bShadowOK;
|
||||
bool m_b3DOK;
|
||||
bool m_bLineOK;
|
||||
bool m_bGtextOK;
|
||||
bool m_bFillShadeShapeOK;
|
||||
bool m_bFillOK;
|
||||
|
||||
public:
|
||||
CTypeGeometry()
|
||||
{
|
||||
m_oGeoRect.left = 0; m_oGeoRect.top = 0;
|
||||
m_oGeoRect.right = 21600; m_oGeoRect.bottom = 21600;
|
||||
|
||||
m_Path = shapeLinesClosed;
|
||||
|
||||
m_strVertices = _T("");
|
||||
m_strSegmentInfo = _T("");
|
||||
|
||||
m_lAdjustValue1 = 0;
|
||||
m_lAdjustValue2 = 0;
|
||||
m_lAdjustValue3 = 0;
|
||||
m_lAdjustValue4 = 0;
|
||||
m_lAdjustValue5 = 0;
|
||||
m_lAdjustValue6 = 0;
|
||||
m_lAdjustValue7 = 0;
|
||||
m_lAdjustValue8 = 0;
|
||||
m_lAdjustValue9 = 0;
|
||||
m_lAdjustValue10 = 0;
|
||||
|
||||
m_strConnectionsSites = _T("");
|
||||
m_strConnectionsSitesDir = _T("");
|
||||
|
||||
m_nLimoX = 0x80000000;
|
||||
m_nLimoY = 0x80000000;
|
||||
|
||||
m_strAdjustHandles = _T("");
|
||||
m_strGuides = _T("");
|
||||
m_strInscribe = _T("");
|
||||
|
||||
m_bColumnLine = false;
|
||||
m_bShadowOK = true;
|
||||
m_b3DOK = true;
|
||||
m_bLineOK = true;
|
||||
m_bGtextOK = false;
|
||||
m_bFillShadeShapeOK = false;
|
||||
m_bFillOK = true;
|
||||
}
|
||||
};
|
||||
|
||||
class CTypeFillStyle
|
||||
{
|
||||
FillType m_FillType;
|
||||
SColorAtom m_oColor;
|
||||
|
||||
LONG m_nFillOpacity;
|
||||
SColorAtom m_oFillBackColor;
|
||||
|
||||
LONG m_nFillBackOpacity;
|
||||
|
||||
DWORD m_nImageNumber;
|
||||
|
||||
|
||||
|
||||
CStringW m_strFillBlipName;
|
||||
BlipFlags m_FillBlipFlags;
|
||||
|
||||
LONG m_lFillWidth;
|
||||
LONG m_lFillHeight;
|
||||
LONG m_lFillAngle;
|
||||
LONG m_lFillFocus;
|
||||
|
||||
RECT m_oFillToRect;
|
||||
RECT m_oFillRect;
|
||||
|
||||
DzType m_FillDztype;
|
||||
|
||||
CSimpleArray<SColorAtom> m_arFillShadeColors;
|
||||
|
||||
LONG m_arFillShadePreset;
|
||||
|
||||
LONG m_nFillOriginX;
|
||||
LONG m_nFillOriginY;
|
||||
LONG m_nFillShapeOriginX;
|
||||
LONG m_nFillShapeOriginY;
|
||||
|
||||
ShadeType m_FillShadeType;
|
||||
|
||||
bool m_bRecolorFillAsPicture;
|
||||
bool m_bUseShapeAnchor;
|
||||
bool m_bFilled;
|
||||
bool m_bHitTestFill;
|
||||
bool m_billShape;
|
||||
bool m_billUseRect;
|
||||
bool m_bNoFillHitTest;
|
||||
|
||||
public:
|
||||
CTypeFillStyle() : m_arFillShadeColors()
|
||||
{
|
||||
m_FillType = fillSolid;
|
||||
|
||||
m_oColor.FromValue(0xFF, 0xFF, 0xFF);
|
||||
|
||||
m_nFillOpacity = 0x00010000;
|
||||
m_oFillBackColor.FromValue(0xFF, 0xFF, 0xFF);
|
||||
|
||||
m_nFillBackOpacity = 0x00010000;
|
||||
|
||||
m_nImageNumber = 0;
|
||||
|
||||
m_strFillBlipName = _T("");
|
||||
m_FillBlipFlags = blipflagComment;
|
||||
|
||||
m_lFillWidth = 0;
|
||||
m_lFillHeight = 0;
|
||||
m_lFillAngle = 0;
|
||||
m_lFillFocus = 0;
|
||||
|
||||
m_oFillToRect.left = 0; m_oFillToRect.top = 0;
|
||||
m_oFillToRect.right = 0; m_oFillToRect.bottom = 0;
|
||||
|
||||
m_oFillRect.left = 0; m_oFillRect.top = 0;
|
||||
m_oFillRect.right = 0; m_oFillRect.bottom = 0;
|
||||
|
||||
m_FillDztype = dztypeDefault;
|
||||
|
||||
m_arFillShadePreset = 0;
|
||||
|
||||
m_nFillOriginX = 0;
|
||||
m_nFillOriginY = 0;
|
||||
m_nFillShapeOriginX = 0;
|
||||
m_nFillShapeOriginY = 0;
|
||||
|
||||
m_FillShadeType = shadeDefault;
|
||||
|
||||
m_bRecolorFillAsPicture = false;
|
||||
m_bUseShapeAnchor = true;
|
||||
m_bFilled = true;
|
||||
m_bHitTestFill = true;
|
||||
m_billShape = true;
|
||||
m_billUseRect = false;
|
||||
m_bNoFillHitTest = false;
|
||||
}
|
||||
};
|
||||
|
||||
class CTypeLineStyle
|
||||
{
|
||||
SColorAtom m_oColor;
|
||||
LONG m_nOpacity;
|
||||
|
||||
SColorAtom m_oBackColor;
|
||||
SColorAtom m_oCrMod;
|
||||
|
||||
LineType m_Type;
|
||||
|
||||
DWORD m_nImageNumber;
|
||||
|
||||
|
||||
CStringW m_strFileName;
|
||||
BlipFlags m_Flag;
|
||||
|
||||
LONG m_nFillWidth;
|
||||
LONG m_nFillHeight;
|
||||
|
||||
DzType m_FillDztype;
|
||||
|
||||
LONG m_nWidth;
|
||||
LONG m_nMiterLimit;
|
||||
|
||||
LinesStyle m_Style;
|
||||
LineDashing m_Dashing;
|
||||
|
||||
BYTE* m_pDashStyle;
|
||||
|
||||
LineEnd m_StartArrowhead;
|
||||
LineEnd m_Arrowhead;
|
||||
|
||||
LineEndWidth m_StartArrowWidth;
|
||||
LineEndLength m_StartArrowLength;
|
||||
|
||||
LineEndWidth m_EndArrowWidth;
|
||||
LineEndLength m_EndArrowLength;
|
||||
|
||||
_LineJoin m_JoinStyle;
|
||||
_LineCap m_EndCapStyle;
|
||||
|
||||
bool m_bInsetPen;
|
||||
bool m_bInsetPenOK;
|
||||
bool m_bArrowheadsOK;
|
||||
bool m_bLine;
|
||||
bool m_bHitTestLine;
|
||||
bool m_bFillShape;
|
||||
bool m_bNoLineDrawDash;
|
||||
|
||||
public:
|
||||
CTypeLineStyle()
|
||||
{
|
||||
m_oColor.FromValue(00, 00, 00);
|
||||
m_nOpacity = 0x00010000;
|
||||
|
||||
m_oBackColor.FromValue(0xFF, 0xFF, 0xFF);
|
||||
m_oCrMod.FromValue(0xFF, 0xFF, 0xFF);
|
||||
|
||||
m_Type = lineSolidType;
|
||||
|
||||
m_nImageNumber = 0;
|
||||
m_strFileName = _T("");
|
||||
|
||||
m_Flag = blipflagComment;
|
||||
|
||||
m_nFillWidth = 0;
|
||||
m_nFillHeight = 0;
|
||||
|
||||
m_FillDztype = dztypeDefault;
|
||||
|
||||
m_nWidth = 9525;
|
||||
m_nMiterLimit = 0x00080000;
|
||||
|
||||
m_Style = lineSimple;
|
||||
m_Dashing = lineSolid;
|
||||
|
||||
m_pDashStyle = NULL;
|
||||
|
||||
m_StartArrowhead = lineNoEnd;
|
||||
m_Arrowhead = lineNoEnd;
|
||||
|
||||
m_StartArrowWidth = lineMediumWidthArrow;
|
||||
m_StartArrowLength = lineMediumLenArrow;
|
||||
|
||||
m_EndArrowWidth = lineMediumWidthArrow;
|
||||
m_EndArrowLength = lineMediumLenArrow;
|
||||
|
||||
m_JoinStyle = lineJoinRound;
|
||||
m_EndCapStyle = lineEndCapFlat;
|
||||
|
||||
m_bInsetPen = false;
|
||||
m_bInsetPenOK = true;
|
||||
m_bArrowheadsOK = false;
|
||||
m_bLine = true;
|
||||
m_bHitTestLine = true;
|
||||
m_bFillShape = true;
|
||||
m_bNoLineDrawDash = false;
|
||||
}
|
||||
};
|
||||
|
||||
class CTypeShadowStyle
|
||||
{
|
||||
ShadowType m_Type;
|
||||
|
||||
SColorAtom m_oColor;
|
||||
SColorAtom m_Highlight;
|
||||
|
||||
LONG m_nOpacity;
|
||||
|
||||
LONG m_nOffsetX;
|
||||
LONG m_nOffsetY;
|
||||
|
||||
LONG m_nSecondOffsetX;
|
||||
LONG m_nSecondOffsetY;
|
||||
|
||||
LONG m_nScaleXToX;
|
||||
LONG m_nScaleYToX;
|
||||
LONG m_nScaleXToY;
|
||||
LONG m_nScaleYToY;
|
||||
|
||||
LONG m_nPerspectiveX;
|
||||
LONG m_nPerspectiveY;
|
||||
|
||||
LONG m_nWeight;
|
||||
|
||||
LONG m_nOriginX;
|
||||
LONG m_nOriginY;
|
||||
|
||||
bool m_bShadow;
|
||||
bool m_bShadowObscured;
|
||||
|
||||
public:
|
||||
CTypeShadowStyle()
|
||||
{
|
||||
m_Type = shadowOffset;
|
||||
|
||||
m_oColor.FromValue(0x80, 0x80, 0x80);
|
||||
m_Highlight.FromValue(0xCB, 0xCB, 0xCB);
|
||||
|
||||
m_nOpacity = 0x00010000;
|
||||
|
||||
m_nOffsetX = 25400;
|
||||
m_nOffsetY = 25400;
|
||||
|
||||
m_nSecondOffsetX = 0;
|
||||
m_nSecondOffsetY = 0;
|
||||
|
||||
m_nScaleXToX = 0x00010000;
|
||||
m_nScaleYToX = 0;
|
||||
m_nScaleXToY = 0;
|
||||
m_nScaleYToY = 0x00010000;
|
||||
|
||||
m_nPerspectiveX = 0;
|
||||
m_nPerspectiveY = 0;
|
||||
|
||||
m_nWeight = 0x00000100;
|
||||
|
||||
m_nOriginX = 0;
|
||||
m_nOriginY = 0;
|
||||
|
||||
m_bShadow = false;
|
||||
m_bShadowObscured = false;
|
||||
}
|
||||
};
|
||||
|
||||
class CTypePerspectiveStyle
|
||||
{
|
||||
XFormType m_Type;
|
||||
LONG m_nOffsetX;
|
||||
LONG m_nOffsetY;
|
||||
|
||||
LONG m_nScaleXToX;
|
||||
LONG m_nScaleYToX;
|
||||
LONG m_nScaleXToY;
|
||||
LONG m_nScaleYToY;
|
||||
|
||||
LONG m_nPerspectiveX;
|
||||
LONG m_nPerspectiveY;
|
||||
|
||||
LONG m_nWeight;
|
||||
|
||||
LONG m_nOriginX;
|
||||
LONG m_nOriginY;
|
||||
|
||||
bool m_bPerspective;
|
||||
|
||||
public:
|
||||
CTypePerspectiveStyle()
|
||||
{
|
||||
m_Type = xformShape;
|
||||
m_nOffsetX = 0;
|
||||
m_nOffsetY = 0;
|
||||
|
||||
m_nScaleXToX = 0x00010000;
|
||||
m_nScaleYToX = 0;
|
||||
m_nScaleXToY = 0;
|
||||
m_nScaleYToY = 0x00010000;
|
||||
|
||||
m_nPerspectiveX = 0;
|
||||
m_nPerspectiveY = 0;
|
||||
|
||||
m_nWeight = 0x00000100;
|
||||
|
||||
m_nOriginX = 0x00008000;
|
||||
m_nOriginY = 0x00008000;
|
||||
|
||||
m_bPerspective = false;
|
||||
}
|
||||
};
|
||||
|
||||
class CType3DObject
|
||||
{
|
||||
LONG m_c3DSpecularAmt;
|
||||
LONG m_c3DDiffuseAmt;
|
||||
LONG m_c3DShininess;
|
||||
LONG m_c3DEdgeThickness;
|
||||
LONG m_c3DExtrudeForward;
|
||||
LONG m_c3DExtrudeBackward;
|
||||
LONG m_c3DExtrudePlane;
|
||||
|
||||
SColorAtom m_c3DExtrusionColor;
|
||||
SColorAtom c3DCrMod;
|
||||
|
||||
bool m_b3D;
|
||||
bool m_bc3DMetallic;
|
||||
bool m_bc3DUseExtrusionColor;
|
||||
bool m_bc3DLightFace;
|
||||
|
||||
public:
|
||||
CType3DObject()
|
||||
{
|
||||
m_c3DSpecularAmt = 0;
|
||||
m_c3DDiffuseAmt = 0x00010000;
|
||||
m_c3DShininess = 5;
|
||||
m_c3DEdgeThickness = 12700;
|
||||
m_c3DExtrudeForward = 0;
|
||||
m_c3DExtrudeBackward = 457200;
|
||||
m_c3DExtrudePlane = 0;
|
||||
|
||||
m_c3DExtrusionColor.FromValue(0xFF, 0xFF, 0xFF);
|
||||
c3DCrMod.FromValue(0xFF, 0xFF, 0xFF);
|
||||
|
||||
m_b3D = false;
|
||||
m_bc3DMetallic = false;
|
||||
m_bc3DUseExtrusionColor = false;
|
||||
m_bc3DLightFace = true;
|
||||
}
|
||||
};
|
||||
|
||||
class CType3DStyle
|
||||
{
|
||||
LONG m_c3DYRotationAngle;
|
||||
LONG m_c3DXRotationAngle;
|
||||
|
||||
LONG m_c3DRotationAxisX;
|
||||
LONG m_c3DRotationAxisY;
|
||||
LONG m_c3DRotationAxisZ;
|
||||
|
||||
LONG m_c3DRotationAngle;
|
||||
|
||||
LONG m_c3DRotationCenterX;
|
||||
LONG m_c3DRotationCenterY;
|
||||
LONG m_c3DRotationCenterZ;
|
||||
|
||||
e3DRenderMode c3DRenderMode;
|
||||
|
||||
LONG m_c3DTolerance;
|
||||
|
||||
LONG m_c3DXViewpoint;
|
||||
LONG m_c3DYViewpoint;
|
||||
LONG m_c3DZViewpoint;
|
||||
|
||||
LONG m_c3DOriginX;
|
||||
LONG m_c3DOriginY;
|
||||
|
||||
LONG m_c3DSkewAngle;
|
||||
LONG m_c3DSkewAmount;
|
||||
LONG m_c3DAmbientIntensity;
|
||||
|
||||
LONG m_c3DKeyX;
|
||||
LONG m_c3DKeyY;
|
||||
LONG m_c3DKeyZ;
|
||||
|
||||
LONG m_c3DKeyIntensity;
|
||||
|
||||
LONG m_c3DFillX;
|
||||
LONG m_c3DFillY;
|
||||
LONG m_c3DFillZ;
|
||||
LONG m_c3DFillIntensity;
|
||||
|
||||
bool m_bc3DConstrainRotation;
|
||||
bool m_bc3DRotationCenterAuto;
|
||||
bool m_bc3DParallel;
|
||||
bool m_bc3DKeyHarsh;
|
||||
bool m_bc3DFillHarsh;
|
||||
|
||||
public:
|
||||
CType3DStyle()
|
||||
{
|
||||
m_c3DYRotationAngle = 0;
|
||||
m_c3DXRotationAngle = 0;
|
||||
|
||||
m_c3DRotationAxisX = 100;
|
||||
m_c3DRotationAxisY = 0;
|
||||
m_c3DRotationAxisZ = 0;
|
||||
|
||||
m_c3DRotationAngle = 0;
|
||||
|
||||
m_c3DRotationCenterX = 0;
|
||||
m_c3DRotationCenterY = 0;
|
||||
m_c3DRotationCenterZ = 0;
|
||||
|
||||
c3DRenderMode = FullRender;
|
||||
|
||||
m_c3DTolerance = 30000;
|
||||
|
||||
m_c3DXViewpoint = 1250000;
|
||||
m_c3DYViewpoint = -1250000;
|
||||
m_c3DZViewpoint = 9000000;
|
||||
|
||||
m_c3DOriginX = 32768;
|
||||
m_c3DOriginY = -32768;
|
||||
|
||||
m_c3DSkewAngle = -8847360;
|
||||
m_c3DSkewAmount = 50;
|
||||
m_c3DAmbientIntensity = 20000;
|
||||
|
||||
m_c3DKeyX = 50000;
|
||||
m_c3DKeyY = 0;
|
||||
m_c3DKeyZ = 10000;
|
||||
|
||||
m_c3DKeyIntensity = 38000;
|
||||
|
||||
m_c3DFillX = -50000;
|
||||
m_c3DFillY = 0;
|
||||
m_c3DFillZ = 10000;
|
||||
m_c3DFillIntensity = 38000;
|
||||
|
||||
m_bc3DConstrainRotation = true;
|
||||
m_bc3DRotationCenterAuto = false;
|
||||
m_bc3DParallel = true;
|
||||
m_bc3DKeyHarsh = true;
|
||||
m_bc3DFillHarsh = false;
|
||||
}
|
||||
};
|
||||
|
||||
class CTypeShape
|
||||
{
|
||||
DWORD m_MasterID;
|
||||
|
||||
CxStyle m_cxstyle;
|
||||
|
||||
BwMode m_bWMode;
|
||||
BwMode m_bWModePureBW;
|
||||
BwMode m_bWModeBW;
|
||||
|
||||
LONG m_nIdDiscussAnchor;
|
||||
|
||||
DGMLO m_dgmLayout;
|
||||
DGMNK m_dgmNodeKind;
|
||||
DGMLO m_dgmLayoutMRU;
|
||||
|
||||
CString m_strEquationXML;
|
||||
|
||||
bool m_bPolicyLabel;
|
||||
bool m_bPolicyBarcode;
|
||||
bool m_bFlipHQFE5152;
|
||||
bool m_bFlipVQFE5152;
|
||||
|
||||
bool m_bPreferRelativeResize;
|
||||
bool m_bLockShapeType;
|
||||
bool m_bInitiator;
|
||||
bool m_bDeleteAttachedObject;
|
||||
bool m_bBackground;
|
||||
|
||||
public:
|
||||
CTypeShape()
|
||||
{
|
||||
m_MasterID = 0;
|
||||
|
||||
m_cxstyle = cxstyleNone;
|
||||
|
||||
m_bWMode = bwAutomatic;
|
||||
m_bWModePureBW = bwAutomatic;
|
||||
m_bWModeBW = bwAutomatic;
|
||||
|
||||
m_nIdDiscussAnchor = 0;
|
||||
|
||||
m_dgmLayout = dgmloNil;
|
||||
m_dgmNodeKind = dgmnkNil;
|
||||
m_dgmLayoutMRU = dgmloNil;
|
||||
|
||||
m_strEquationXML = _T("");
|
||||
|
||||
m_bPolicyLabel = false;
|
||||
m_bPolicyBarcode = false;
|
||||
m_bFlipHQFE5152 = false;
|
||||
m_bFlipVQFE5152 = false;
|
||||
|
||||
m_bPreferRelativeResize = false;
|
||||
m_bLockShapeType = false;
|
||||
m_bInitiator = false;
|
||||
m_bDeleteAttachedObject = false;
|
||||
m_bBackground = false;
|
||||
}
|
||||
};
|
||||
|
||||
class CTypeGroupShape
|
||||
{
|
||||
CStringW m_strName;
|
||||
CStringW m_strDescription;
|
||||
|
||||
CStringW m_strHyperlink;
|
||||
|
||||
BYTE* m_pWrapPolygonVertices;
|
||||
|
||||
RECT m_DxRectWrapDist;
|
||||
|
||||
LONG m_nRegroupID;
|
||||
|
||||
RECT m_RectGroup;
|
||||
|
||||
CStringW m_strTooltip;
|
||||
CStringW m_strScript;
|
||||
|
||||
LONG m_nPercentHR;
|
||||
LONG m_AlignHR;
|
||||
|
||||
LONG m_nDxHeightHR;
|
||||
LONG m_nDxWidthHR;
|
||||
|
||||
CStringW m_strScriptExtAttr;
|
||||
|
||||
LONG m_nScriptLang;
|
||||
|
||||
CStringW m_strScriptIdAttr;
|
||||
CStringW m_strScriptLangAttr;
|
||||
|
||||
SColorAtom m_oBorderTopColor;
|
||||
SColorAtom m_oBorderLeftColor;
|
||||
SColorAtom m_oBorderBottomColor;
|
||||
SColorAtom m_oBorderRightColor;
|
||||
|
||||
LONG m_nTableProperties;
|
||||
BYTE* m_pTableRowProperties;
|
||||
LONG m_nScriptHtmlLocation;
|
||||
|
||||
CStringW m_strApplet;
|
||||
|
||||
CStringW m_strFrameTrgtUnused;
|
||||
CStringW m_strWebBot;
|
||||
CStringW m_strAppletArg;
|
||||
CStringW m_strAccessBlob;
|
||||
|
||||
BYTE* m_pMetroBlob;
|
||||
|
||||
LONG m_dhgt;
|
||||
|
||||
bool m_bLayoutInCell;
|
||||
bool m_bIsBullet;
|
||||
bool m_bStandardHR;
|
||||
bool m_bNoshadeHR;
|
||||
bool m_bHorizRule;
|
||||
bool m_bUserDrawn;
|
||||
bool m_bAllowOverlap;
|
||||
bool m_bReallyHidden;
|
||||
bool m_bScriptAnchor;
|
||||
|
||||
public:
|
||||
CTypeGroupShape()
|
||||
{
|
||||
m_strName = _T("");
|
||||
m_strDescription = _T("");
|
||||
|
||||
m_strHyperlink = _T("");
|
||||
|
||||
m_pWrapPolygonVertices = NULL;
|
||||
|
||||
m_DxRectWrapDist.left = 0x0001BE7C; m_DxRectWrapDist.top = 0;
|
||||
m_DxRectWrapDist.right = 0x0001BE7C; m_DxRectWrapDist.bottom = 0;
|
||||
|
||||
LONG m_nRegroupID = 0;
|
||||
|
||||
m_RectGroup.left = 0; m_RectGroup.top = 0;
|
||||
m_RectGroup.right = 20000; m_RectGroup.bottom = 20000;
|
||||
|
||||
m_strTooltip = _T("");
|
||||
m_strScript = _T("STD");
|
||||
|
||||
m_nPercentHR = 1000;
|
||||
m_AlignHR = 0;
|
||||
|
||||
m_nDxHeightHR = 0;
|
||||
m_nDxWidthHR = 0;
|
||||
|
||||
m_strScriptExtAttr = _T("STD");
|
||||
m_nScriptLang = 1;
|
||||
|
||||
m_strScriptIdAttr = _T("STD");
|
||||
m_strScriptLangAttr = _T("STD");
|
||||
|
||||
m_oBorderTopColor.FromValue(0xFF, 0xFF, 0xFF);
|
||||
m_oBorderLeftColor.FromValue(0xFF, 0xFF, 0xFF);
|
||||
m_oBorderBottomColor.FromValue(0xFF, 0xFF, 0xFF);
|
||||
m_oBorderRightColor.FromValue(0xFF, 0xFF, 0xFF);
|
||||
|
||||
m_nTableProperties = 0;
|
||||
m_pTableRowProperties = NULL;
|
||||
m_nScriptHtmlLocation = 2;
|
||||
|
||||
m_strApplet = _T("");
|
||||
|
||||
m_strFrameTrgtUnused = _T("");
|
||||
m_strWebBot = _T("STD");
|
||||
m_strAppletArg = _T("");
|
||||
m_strAccessBlob = _T("");
|
||||
|
||||
m_pMetroBlob = NULL;
|
||||
|
||||
m_dhgt = 0;
|
||||
|
||||
m_bLayoutInCell = true;
|
||||
m_bIsBullet = false;
|
||||
m_bStandardHR = false;
|
||||
m_bNoshadeHR = false;
|
||||
m_bHorizRule = false;
|
||||
m_bUserDrawn = false;
|
||||
m_bAllowOverlap = true;
|
||||
m_bReallyHidden = false;
|
||||
m_bScriptAnchor = false;
|
||||
}
|
||||
};
|
||||
|
||||
96
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/BaseShape.cpp
Normal file
96
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/BaseShape.cpp
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseShape.h"
|
||||
|
||||
#if defined(PPTX_DEF)
|
||||
#include "PPTXShape/PPTXShape.h"
|
||||
#endif
|
||||
|
||||
#if defined(PPT_DEF)
|
||||
#include "PPTShape/PPTShape.h"
|
||||
#endif
|
||||
|
||||
#if defined(ODP_DEF)
|
||||
#include "OdpShape/OdpShape.h"
|
||||
#endif
|
||||
|
||||
CBaseShape* CBaseShape::CreateByType(NSBaseShape::ClassType ClassType, int ShapeType)
|
||||
{
|
||||
#if defined(PPTX_DEF)
|
||||
if(ClassType == pptx)
|
||||
{
|
||||
return CPPTXShape::CreateByType((OOXMLShapes::ShapeType)ShapeType);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PPT_DEF)
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(ODP_DEF)
|
||||
if(ClassType == NSBaseShape::odp)
|
||||
{
|
||||
return COdpShape::CreateByType((OdpShapes::ShapeType)ShapeType);
|
||||
}
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool CBaseShape::SetType(NSBaseShape::ClassType ClassType, int ShapeType)
|
||||
{
|
||||
if(ClassType != GetClassType())
|
||||
return false;
|
||||
#if defined(PPTX_DEF)
|
||||
if(ClassType == pptx)
|
||||
{
|
||||
return ((CPPTXShape*)this)->SetShapeType((OOXMLShapes::ShapeType)ShapeType);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PPT_DEF)
|
||||
if(ClassType == ppt)
|
||||
{
|
||||
return ((CPPTShape*)this)->SetShapeType((PPTShapes::ShapeType)ShapeType);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(ODP_DEF)
|
||||
if(ClassType == NSBaseShape::odp)
|
||||
{
|
||||
return ((COdpShape*)this)->SetShapeType((OdpShapes::ShapeType)ShapeType);
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
192
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/BaseShape.h
Normal file
192
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/BaseShape.h
Normal file
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "Path.h"
|
||||
#include "Common.h"
|
||||
|
||||
using namespace NSBaseShape;
|
||||
class CHandle_
|
||||
{
|
||||
public:
|
||||
CString position;
|
||||
CString xrange;
|
||||
CString yrange;
|
||||
CString switchHandle;
|
||||
CString polar;
|
||||
CString radiusrange;
|
||||
|
||||
public:
|
||||
CHandle_()
|
||||
{
|
||||
position = _T("");
|
||||
xrange = _T("");
|
||||
yrange = _T("");
|
||||
switchHandle = _T("");
|
||||
polar = _T("");
|
||||
radiusrange = _T("");
|
||||
}
|
||||
CHandle_& operator =(const CHandle_& oSrc)
|
||||
{
|
||||
position = oSrc.position;
|
||||
xrange = oSrc.xrange;
|
||||
yrange = oSrc.yrange;
|
||||
switchHandle = oSrc.switchHandle;
|
||||
polar = oSrc.polar;
|
||||
radiusrange = oSrc.radiusrange;
|
||||
return (*this);
|
||||
}
|
||||
};
|
||||
|
||||
class CBaseShape
|
||||
{
|
||||
|
||||
|
||||
public:
|
||||
CSimpleArray<long> m_arAdjustments;
|
||||
CSimpleArray<double> Guides;
|
||||
public:
|
||||
NSOfficeDrawing::_LineJoin m_eJoin;
|
||||
bool m_bConcentricFill;
|
||||
|
||||
CSimpleArray<CPoint> m_arConnectors;
|
||||
CSimpleArray<LONG> m_arConnectorAngles;
|
||||
|
||||
CSimpleArray<RECT> m_arTextRects;
|
||||
|
||||
CSimpleArray<CHandle_> m_arHandles;
|
||||
|
||||
CString m_strTransformXml;
|
||||
|
||||
CString m_strPath;
|
||||
CString m_strRect;
|
||||
|
||||
LONG m_lLimoX;
|
||||
LONG m_lLimoY;
|
||||
|
||||
NSShapes::CPath m_oPath;
|
||||
public:
|
||||
CBaseShape()
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool LoadFromXML(const CString& xml) = 0;
|
||||
virtual bool LoadFromXML(XmlUtils::CXmlNode& xmlNode) = 0;
|
||||
virtual bool LoadAdjustValuesList(const CString& xml) = 0;
|
||||
virtual bool LoadGuidesList(const CString& xml) = 0;
|
||||
virtual bool LoadAdjustHandlesList(const CString& xml) = 0;
|
||||
virtual bool LoadConnectorsList(const CString& xml) = 0;
|
||||
virtual bool LoadTextRect(const CString& xml) = 0;
|
||||
virtual bool LoadPathList(const CString& xml) = 0;
|
||||
virtual bool SetAdjustment(long index, long value) = 0;
|
||||
virtual CString ToXML(CGeomShapeInfo& GeomInfo, CMetricInfo& MetricInfo, double StartTime, double EndTime, CBrush_& Brush, CPen_& Pen) = 0;
|
||||
virtual void ReCalculate() = 0;
|
||||
|
||||
virtual void AddGuide(const CString& strGuide) {}
|
||||
|
||||
static CBaseShape* CreateByType(ClassType ClassType, int ShapeType);
|
||||
virtual const ClassType GetClassType()const=0;
|
||||
bool SetType(ClassType ClassType, int ShapeType);
|
||||
|
||||
virtual bool SetProperties(CBaseShape* Shape)
|
||||
{
|
||||
if( Shape == NULL)
|
||||
return false;
|
||||
|
||||
m_oPath = Shape->m_oPath;
|
||||
m_strPath = Shape->m_strPath;
|
||||
m_strRect = Shape->m_strRect;
|
||||
|
||||
m_arAdjustments.RemoveAll();
|
||||
for(int i = 0; i < Shape->m_arAdjustments.GetSize(); i++)
|
||||
m_arAdjustments.Add(Shape->m_arAdjustments[i]);
|
||||
|
||||
Guides.RemoveAll();
|
||||
for(int i = 0; i < Shape->Guides.GetSize(); i++)
|
||||
Guides.Add(Shape->Guides[i]);
|
||||
|
||||
m_eJoin = Shape->m_eJoin;
|
||||
m_bConcentricFill = Shape->m_bConcentricFill;
|
||||
|
||||
m_arConnectors.RemoveAll();
|
||||
for(int i = 0; i < Shape->m_arConnectors.GetSize(); i++)
|
||||
m_arConnectors.Add(Shape->m_arConnectors[i]);
|
||||
|
||||
m_arConnectorAngles.RemoveAll();
|
||||
for(int i = 0; i < Shape->m_arConnectorAngles.GetSize(); i++)
|
||||
m_arConnectorAngles.Add(Shape->m_arConnectorAngles[i]);
|
||||
|
||||
m_arTextRects.RemoveAll();
|
||||
for(int i = 0; i < Shape->m_arTextRects.GetSize(); i++)
|
||||
m_arTextRects.Add(Shape->m_arTextRects[i]);
|
||||
|
||||
m_strRect = Shape->m_strRect;
|
||||
m_strTransformXml = Shape->m_strTransformXml;
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool SetToDublicate(CBaseShape* Shape)
|
||||
{
|
||||
if( Shape == NULL)
|
||||
return false;
|
||||
|
||||
Shape->m_oPath = m_oPath;
|
||||
Shape->m_strPath = m_strPath;
|
||||
Shape->m_strRect = m_strRect;
|
||||
|
||||
Shape->m_arAdjustments.RemoveAll();
|
||||
for(int i = 0; i < m_arAdjustments.GetSize(); i++)
|
||||
Shape->m_arAdjustments.Add(m_arAdjustments[i]);
|
||||
|
||||
Shape->Guides.RemoveAll();
|
||||
for(int i = 0; i < Guides.GetSize(); i++)
|
||||
Shape->Guides.Add(Guides[i]);
|
||||
|
||||
Shape->m_eJoin = m_eJoin;
|
||||
Shape->m_bConcentricFill = m_bConcentricFill;
|
||||
|
||||
Shape->m_arConnectors.RemoveAll();
|
||||
for(int i = 0; i < m_arConnectors.GetSize(); i++)
|
||||
Shape->m_arConnectors.Add(m_arConnectors[i]);
|
||||
|
||||
Shape->m_arConnectorAngles.RemoveAll();
|
||||
for(int i = 0; i < m_arConnectorAngles.GetSize(); i++)
|
||||
Shape->m_arConnectorAngles.Add(m_arConnectorAngles[i]);
|
||||
|
||||
Shape->m_arTextRects.RemoveAll();
|
||||
for(int i = 0; i < m_arTextRects.GetSize(); i++)
|
||||
Shape->m_arTextRects.Add(m_arTextRects[i]);
|
||||
Shape->m_strRect = m_strRect;
|
||||
|
||||
Shape->m_strTransformXml = m_strTransformXml;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
362
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/Common.h
Normal file
362
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/Common.h
Normal file
@@ -0,0 +1,362 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#ifndef _USE_MATH_DEFINES
|
||||
#define _USE_MATH_DEFINES
|
||||
#endif
|
||||
|
||||
#include "math.h"
|
||||
|
||||
const double ShapeSize = 43200.0;
|
||||
const LONG ShapeSizeVML = 21600;
|
||||
const double RadKoef = M_PI/10800000.0;
|
||||
|
||||
#ifndef pow2_16
|
||||
#define pow2_16 65536
|
||||
#endif
|
||||
|
||||
namespace NSMath
|
||||
{
|
||||
inline LONG round(double dVal)
|
||||
{
|
||||
return (LONG)(2 * dVal) - (LONG)(dVal);
|
||||
}
|
||||
}
|
||||
|
||||
namespace NSStringUtils
|
||||
{
|
||||
static bool IsDigit(const TCHAR& c)
|
||||
{
|
||||
return (((c >= '0') && (c <= '9')) || (c == '-'));
|
||||
}
|
||||
static bool IsAlpha(const TCHAR& c)
|
||||
{
|
||||
return (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')));
|
||||
}
|
||||
static bool IsNumber(CString str)
|
||||
{
|
||||
for (int nIndex = 0; nIndex < str.GetLength(); ++nIndex)
|
||||
{
|
||||
if (!IsDigit(str[nIndex]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static CString ToString(LONG val)
|
||||
{
|
||||
CString str = _T("");
|
||||
str.Format(_T("%d"), val);
|
||||
return str;
|
||||
}
|
||||
|
||||
static void ParseString(CString strDelimeters, CString strSource,
|
||||
CSimpleArray<CString>* pArrayResults, bool bIsCleared = true)
|
||||
{
|
||||
if (NULL == pArrayResults)
|
||||
return;
|
||||
|
||||
if (bIsCleared)
|
||||
pArrayResults->RemoveAll();
|
||||
|
||||
CString resToken;
|
||||
int curPos= 0;
|
||||
|
||||
resToken = strSource.Tokenize(strDelimeters, curPos);
|
||||
while (resToken != _T(""))
|
||||
{
|
||||
pArrayResults->Add(resToken);
|
||||
resToken = strSource.Tokenize(strDelimeters, curPos);
|
||||
};
|
||||
|
||||
}
|
||||
static void ParseString(CSimpleArray<char>* pArrayDelimeters, CString strSource,
|
||||
CSimpleArray<CString>* pArrayResults, bool bIsCleared = true)
|
||||
{
|
||||
if (NULL == pArrayDelimeters)
|
||||
return;
|
||||
|
||||
CString strDelimeters = _T("");
|
||||
for (int nIndex = 0; nIndex < pArrayDelimeters->GetSize(); ++nIndex)
|
||||
strDelimeters += (*pArrayDelimeters)[nIndex];
|
||||
|
||||
return ParseString(strDelimeters, strSource, pArrayResults, bIsCleared);
|
||||
}
|
||||
static void ParsePath(CString strSource, CSimpleArray<CString>* pArrayResults, bool bIsCleared = true)
|
||||
{
|
||||
if (NULL == pArrayResults)
|
||||
return;
|
||||
|
||||
CString strPath = strSource;
|
||||
|
||||
for (int nIndex = 0; nIndex < strPath.GetLength(); ++nIndex)
|
||||
{
|
||||
if (nIndex == (strPath.GetLength() - 1))
|
||||
continue;
|
||||
|
||||
if (IsAlpha(strPath[nIndex]) && (',' == strPath[nIndex + 1]))
|
||||
{
|
||||
strPath.Insert(nIndex + 1, ',');
|
||||
++nIndex;
|
||||
strPath.Insert(nIndex + 1, '0');
|
||||
++nIndex;
|
||||
}
|
||||
else if ((',' == strPath[nIndex]) && (',' == strPath[nIndex + 1]))
|
||||
{
|
||||
strPath.Insert(nIndex + 1, '0');
|
||||
++nIndex;
|
||||
}
|
||||
else if ((',' == strPath[nIndex]) && IsAlpha(strPath[nIndex + 1]))
|
||||
{
|
||||
strPath.Insert(nIndex + 1, '0');
|
||||
++nIndex;
|
||||
strPath.Insert(nIndex + 1, ',');
|
||||
++nIndex;
|
||||
}
|
||||
else if (IsAlpha(strPath[nIndex]) && IsDigit(strPath[nIndex + 1]))
|
||||
{
|
||||
strPath.Insert(nIndex + 1, ',');
|
||||
++nIndex;
|
||||
}
|
||||
else if (IsDigit(strPath[nIndex]) && IsAlpha(strPath[nIndex + 1]))
|
||||
{
|
||||
strPath.Insert(nIndex + 1, ',');
|
||||
++nIndex;
|
||||
}
|
||||
else if (IsDigit(strPath[nIndex]) && ('@' == strPath[nIndex + 1]))
|
||||
{
|
||||
strPath.Insert(nIndex + 1, ',');
|
||||
++nIndex;
|
||||
}
|
||||
else if (IsDigit(strPath[nIndex]) && ('#' == strPath[nIndex + 1]))
|
||||
{
|
||||
strPath.Insert(nIndex + 1, ',');
|
||||
++nIndex;
|
||||
}
|
||||
else if (IsAlpha(strPath[nIndex]) && ('@' == strPath[nIndex + 1]))
|
||||
{
|
||||
strPath.Insert(nIndex + 1, ',');
|
||||
++nIndex;
|
||||
}
|
||||
else if (IsAlpha(strPath[nIndex]) && ('#' == strPath[nIndex + 1]))
|
||||
{
|
||||
strPath.Insert(nIndex + 1, ',');
|
||||
++nIndex;
|
||||
}
|
||||
else if (IsDigit(strPath[nIndex]) && ('$' == strPath[nIndex + 1]))
|
||||
{
|
||||
strPath.Insert(nIndex + 1, ',');
|
||||
++nIndex;
|
||||
}
|
||||
else if (IsDigit(strPath[nIndex]) && ('?' == strPath[nIndex + 1]))
|
||||
{
|
||||
strPath.Insert(nIndex + 1, ',');
|
||||
++nIndex;
|
||||
}
|
||||
else if (IsAlpha(strPath[nIndex]) && ('$' == strPath[nIndex + 1]))
|
||||
{
|
||||
strPath.Insert(nIndex + 1, ',');
|
||||
++nIndex;
|
||||
}
|
||||
else if (IsAlpha(strPath[nIndex]) && ('?' == strPath[nIndex + 1]))
|
||||
{
|
||||
strPath.Insert(nIndex + 1, ',');
|
||||
++nIndex;
|
||||
}
|
||||
else if ((IsAlpha(strPath[nIndex]) && IsAlpha(strPath[nIndex + 1])) && ('x' == strPath[nIndex]))
|
||||
{
|
||||
strPath.Insert(nIndex + 1, ',');
|
||||
++nIndex;
|
||||
}
|
||||
}
|
||||
|
||||
ParseString(_T(","), strPath, pArrayResults, bIsCleared);
|
||||
return;
|
||||
}
|
||||
|
||||
static void ParsePath2(CString strSource, CSimpleArray<CString>* pArrayResults, bool bIsCleared = true)
|
||||
{
|
||||
if (NULL == pArrayResults)
|
||||
return;
|
||||
|
||||
CString strPath = strSource;
|
||||
|
||||
|
||||
int nIndexOld = 0;
|
||||
|
||||
int nLength = strPath.GetLength();
|
||||
for (int nIndex = 0; nIndex < nLength; ++nIndex)
|
||||
{
|
||||
if (nIndex == (nLength - 1))
|
||||
{
|
||||
pArrayResults->Add(strPath.Mid(nIndexOld));
|
||||
|
||||
}
|
||||
|
||||
if (IsAlpha(strPath[nIndex]) && (',' == strPath[nIndex + 1]))
|
||||
{
|
||||
|
||||
pArrayResults->Add(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1));
|
||||
pArrayResults->Add(_T("0"));
|
||||
}
|
||||
else if (IsDigit(strPath[nIndex]) && (',' == strPath[nIndex + 1]))
|
||||
{
|
||||
|
||||
pArrayResults->Add(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1));
|
||||
}
|
||||
else if ((',' == strPath[nIndex]) && (',' == strPath[nIndex + 1]))
|
||||
{
|
||||
|
||||
|
||||
pArrayResults->Add(_T("0"));
|
||||
}
|
||||
else if ((',' == strPath[nIndex]) && IsAlpha(strPath[nIndex + 1]))
|
||||
{
|
||||
|
||||
pArrayResults->Add(_T("0"));
|
||||
nIndexOld = nIndex + 1;
|
||||
}
|
||||
else if ((',' == strPath[nIndex]) && IsDigit(strPath[nIndex + 1]))
|
||||
{
|
||||
|
||||
nIndexOld = nIndex + 1;
|
||||
}
|
||||
else if (IsAlpha(strPath[nIndex]) && IsDigit(strPath[nIndex + 1]))
|
||||
{
|
||||
|
||||
pArrayResults->Add(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1));
|
||||
nIndexOld = nIndex + 1;
|
||||
}
|
||||
else if (IsDigit(strPath[nIndex]) && IsAlpha(strPath[nIndex + 1]))
|
||||
{
|
||||
|
||||
pArrayResults->Add(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1));
|
||||
nIndexOld = nIndex + 1;
|
||||
}
|
||||
else if (IsDigit(strPath[nIndex]) && ('@' == strPath[nIndex + 1]))
|
||||
{
|
||||
|
||||
|
||||
pArrayResults->Add(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1));
|
||||
|
||||
++nIndex;
|
||||
nIndexOld = nIndex;
|
||||
}
|
||||
else if (IsDigit(strPath[nIndex]) && ('#' == strPath[nIndex + 1]))
|
||||
{
|
||||
|
||||
|
||||
pArrayResults->Add(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1));
|
||||
|
||||
++nIndex;
|
||||
nIndexOld = nIndex;
|
||||
}
|
||||
else if (IsAlpha(strPath[nIndex]) && ('@' == strPath[nIndex + 1]))
|
||||
{
|
||||
|
||||
pArrayResults->Add(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1));
|
||||
|
||||
++nIndex;
|
||||
nIndexOld = nIndex;
|
||||
}
|
||||
else if (IsAlpha(strPath[nIndex]) && ('#' == strPath[nIndex + 1]))
|
||||
{
|
||||
|
||||
pArrayResults->Add(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1));
|
||||
|
||||
++nIndex;
|
||||
nIndexOld = nIndex;
|
||||
}
|
||||
else if (('x' == strPath[nIndex]) && IsAlpha(strPath[nIndex + 1]))
|
||||
{
|
||||
|
||||
|
||||
pArrayResults->Add(_T("x"));
|
||||
nIndexOld = nIndex + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void CheckPathOn_Fill_Stroke(CString& strPath, bool& bFill, bool& bStroke)
|
||||
{
|
||||
bFill = true;
|
||||
bStroke = true;
|
||||
int nIndex = strPath.Find(_T("nf"));
|
||||
if (-1 != nIndex)
|
||||
{
|
||||
bFill = false;
|
||||
while (-1 != nIndex)
|
||||
{
|
||||
strPath.Delete(nIndex, 2);
|
||||
nIndex = strPath.Find(_T("nf"));
|
||||
}
|
||||
}
|
||||
nIndex = strPath.Find(_T("ns"));
|
||||
if (-1 != nIndex)
|
||||
{
|
||||
bStroke = false;
|
||||
while (-1 != nIndex)
|
||||
{
|
||||
strPath.Delete(nIndex, 2);
|
||||
nIndex = strPath.Find(_T("ns"));
|
||||
}
|
||||
}
|
||||
|
||||
nIndex = strPath.Find(_T("F"));
|
||||
if (-1 != nIndex)
|
||||
{
|
||||
bFill = false;
|
||||
while (-1 != nIndex)
|
||||
{
|
||||
strPath.Delete(nIndex, 2);
|
||||
nIndex = strPath.Find(_T("F"));
|
||||
}
|
||||
}
|
||||
|
||||
nIndex = strPath.Find(_T("S"));
|
||||
if (-1 != nIndex)
|
||||
{
|
||||
bStroke = false;
|
||||
while (-1 != nIndex)
|
||||
{
|
||||
strPath.Delete(nIndex, 2);
|
||||
nIndex = strPath.Find(_T("S"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
224
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/Draw.h
Normal file
224
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/Draw.h
Normal file
@@ -0,0 +1,224 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
using namespace NSOfficeDrawing;
|
||||
|
||||
enum BrushType
|
||||
{
|
||||
BrushTypeSolid = 1000,
|
||||
BrushTypeHorizontal = 2001,
|
||||
BrushTypeVertical = 2002,
|
||||
BrushTypeDiagonal1 = 2003,
|
||||
BrushTypeDiagonal2 = 2004,
|
||||
BrushTypeCenter = 2005,
|
||||
BrushTypePathGradient1 = 2006,
|
||||
BrushTypePathGradient2 = 2007,
|
||||
BrushTypeCylinderHor = 2008,
|
||||
BrushTypeCylinderVer = 2009,
|
||||
BrushTypeTexture = 3008,
|
||||
BrushTypeHatch1 = 4009,
|
||||
BrushTypeHatch53 = 4061
|
||||
};
|
||||
|
||||
enum BrushTextureMode
|
||||
{
|
||||
BrushTextureModeStretch = 0,
|
||||
BrushTextureModeTile = 1,
|
||||
BrushTextureModeTileCenter = 2
|
||||
};
|
||||
|
||||
class CColor_
|
||||
{
|
||||
public:
|
||||
BYTE R;
|
||||
BYTE G;
|
||||
BYTE B;
|
||||
BYTE A;
|
||||
|
||||
public:
|
||||
CColor_()
|
||||
{
|
||||
R = 0;
|
||||
G = 0;
|
||||
B = 0;
|
||||
A = 0;
|
||||
}
|
||||
|
||||
CColor_& operator =(const CColor_& oSrc)
|
||||
{
|
||||
R = oSrc.R;
|
||||
G = oSrc.G;
|
||||
B = oSrc.B;
|
||||
A = oSrc.A;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
CColor_& operator =(const DWORD& oSrc)
|
||||
{
|
||||
R = (BYTE)(oSrc >> 8);
|
||||
G = (BYTE)(oSrc >> 16);
|
||||
B = (BYTE)(oSrc >> 24);
|
||||
A = (BYTE)oSrc;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
CString ToString()
|
||||
{
|
||||
DWORD dwColor = 0;
|
||||
|
||||
dwColor |= R;
|
||||
dwColor |= (G << 8);
|
||||
dwColor |= (B << 16);
|
||||
return NSAttributes::ToString((int)dwColor);
|
||||
}
|
||||
};
|
||||
|
||||
class CPen_
|
||||
{
|
||||
public:
|
||||
CColor_ m_oColor;
|
||||
int m_nWidth;
|
||||
BYTE m_nAlpha;
|
||||
|
||||
public:
|
||||
CPen_() : m_oColor()
|
||||
{
|
||||
m_oColor = 0;
|
||||
m_nWidth = 1;
|
||||
m_nAlpha = 255;
|
||||
}
|
||||
|
||||
~CPen_()
|
||||
{
|
||||
}
|
||||
|
||||
CString ToString()
|
||||
{
|
||||
return AddEffectForGroup(_T("ImagePaint-SetPen"), _T("color='")
|
||||
+ m_oColor.ToString() + _T("' alpha='") + NSAttributes::ToString((int)m_nAlpha)
|
||||
+ _T("' size='") + NSAttributes::ToString(m_nWidth) + _T("'"));
|
||||
}
|
||||
|
||||
CString ToString2()
|
||||
{
|
||||
return AddEffectForGroup(_T("pen"), _T("pen-color='")
|
||||
+ m_oColor.ToString() + _T("' pen-alpha='") + NSAttributes::ToString((int)m_nAlpha)
|
||||
+ _T("' pen-size='") + NSAttributes::ToString(m_nWidth) + _T("'"));
|
||||
}
|
||||
|
||||
CPen_& operator =(const CPen_& oSrc)
|
||||
{
|
||||
m_oColor = oSrc.m_oColor;
|
||||
m_nWidth = oSrc.m_nWidth;
|
||||
m_nAlpha = oSrc.m_nAlpha;
|
||||
return (*this);
|
||||
}
|
||||
};
|
||||
|
||||
class CBrush_
|
||||
{
|
||||
public:
|
||||
int m_nBrushType;
|
||||
CColor_ m_oColor1;
|
||||
CColor_ m_oColor2;
|
||||
BYTE m_Alpha1;
|
||||
BYTE m_Alpha2;
|
||||
CStringW m_sTexturePath;
|
||||
int m_nTextureMode;
|
||||
int m_nRectable;
|
||||
BYTE m_nTextureAlpha;
|
||||
RECT m_rcBounds;
|
||||
|
||||
public:
|
||||
CBrush_()
|
||||
{
|
||||
m_nBrushType = (int)BrushTypeSolid;
|
||||
m_oColor1 = 0xFFFFFFFF;
|
||||
m_oColor2 = 0xFFFFFFFF;
|
||||
m_Alpha1 = 255;
|
||||
m_Alpha2 = 255;
|
||||
m_sTexturePath = "";
|
||||
m_nTextureMode = 0;
|
||||
m_nRectable = 0;
|
||||
m_nTextureAlpha = 255;
|
||||
m_rcBounds.left = 0;
|
||||
m_rcBounds.top = 0;
|
||||
m_rcBounds.right = 0;
|
||||
m_rcBounds.bottom = 0;
|
||||
}
|
||||
|
||||
CBrush_& operator =(const CBrush_& oSrc)
|
||||
{
|
||||
m_nBrushType = oSrc.m_nBrushType;
|
||||
m_oColor1 = oSrc.m_oColor1;
|
||||
m_oColor2 = oSrc.m_oColor2;
|
||||
m_Alpha1 = oSrc.m_Alpha1;
|
||||
m_Alpha2 = oSrc.m_Alpha2;
|
||||
m_sTexturePath = oSrc.m_sTexturePath;
|
||||
m_nTextureMode = oSrc.m_nTextureMode;
|
||||
m_nRectable = oSrc.m_nRectable;
|
||||
m_nTextureAlpha = oSrc.m_nTextureAlpha;
|
||||
m_rcBounds.left = oSrc.m_rcBounds.left;
|
||||
m_rcBounds.top = oSrc.m_rcBounds.top;
|
||||
m_rcBounds.right = oSrc.m_rcBounds.right;
|
||||
m_rcBounds.bottom = oSrc.m_rcBounds.bottom;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
CString ToString()
|
||||
{
|
||||
return AddEffectForGroup(_T("ImagePaint-SetBrush"),
|
||||
_T("type='") + NSAttributes::ToString(m_nBrushType)
|
||||
+ _T("' color1='") + m_oColor1.ToString() + _T("' color2='") + m_oColor2.ToString()
|
||||
+ _T("' alpha1='") + NSAttributes::ToString(m_Alpha1) + _T("' alpha2='") + NSAttributes::ToString(m_Alpha2)
|
||||
+ _T("' texturepath='") + (CString)m_sTexturePath + _T("' texturealpha='") + NSAttributes::ToString(m_nTextureAlpha)
|
||||
+ "' texturemode='" + NSAttributes::ToString(m_nTextureMode) + _T("'"));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
CString ToString2()
|
||||
{
|
||||
return AddEffectForGroup(_T("brush"),
|
||||
_T("brush-type='") + NSAttributes::ToString(m_nBrushType)
|
||||
+ _T("' brush-color1='") + m_oColor1.ToString() + _T("' brush-color2='") + m_oColor2.ToString()
|
||||
+ _T("' brush-alpha1='") + NSAttributes::ToString(m_Alpha1) + _T("' brush-alpha2='") + NSAttributes::ToString(m_Alpha2)
|
||||
+ _T("' brush-texturepath='") + (CString)m_sTexturePath + _T("' brush-texturealpha='") + NSAttributes::ToString(m_nTextureAlpha)
|
||||
+ "' brush-texturemode='" + NSAttributes::ToString(m_nTextureMode) + _T("'"));
|
||||
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
221
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/Metric.h
Normal file
221
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/Metric.h
Normal file
@@ -0,0 +1,221 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
const double c_dMasterUnitsToInchKoef = 1.0 / 576;
|
||||
const double c_dInchToMillimetreKoef = 25.4;
|
||||
const double c_dMasterUnitsToMillimetreKoef = c_dMasterUnitsToInchKoef * c_dInchToMillimetreKoef;
|
||||
|
||||
class CMetricInfo
|
||||
{
|
||||
public:
|
||||
DWORD m_lUnitsHor;
|
||||
DWORD m_lUnitsVer;
|
||||
|
||||
DWORD m_lMillimetresHor;
|
||||
DWORD m_lMillimetresVer;
|
||||
|
||||
public:
|
||||
CMetricInfo()
|
||||
{
|
||||
m_lUnitsHor = 5000;
|
||||
m_lUnitsVer = 5000;
|
||||
|
||||
m_lMillimetresHor = 5000;
|
||||
m_lMillimetresVer = 5000;
|
||||
}
|
||||
|
||||
CMetricInfo& operator =(const CMetricInfo& oSrc)
|
||||
{
|
||||
m_lUnitsHor = oSrc.m_lUnitsHor;
|
||||
m_lUnitsVer = oSrc.m_lUnitsVer;
|
||||
m_lMillimetresHor = oSrc.m_lMillimetresHor;
|
||||
m_lMillimetresVer = oSrc.m_lMillimetresVer;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void SetUnitsContainerSize(DWORD lSizeX, DWORD lSizeY)
|
||||
{
|
||||
m_lUnitsHor = lSizeX;
|
||||
m_lUnitsVer = lSizeY;
|
||||
|
||||
m_lMillimetresHor = (DWORD)(m_lUnitsHor * c_dMasterUnitsToMillimetreKoef);
|
||||
m_lMillimetresVer = (DWORD)(m_lUnitsVer * c_dMasterUnitsToMillimetreKoef);
|
||||
}
|
||||
};
|
||||
|
||||
class CDoubleRect
|
||||
{
|
||||
public:
|
||||
double left;
|
||||
double top;
|
||||
double right;
|
||||
double bottom;
|
||||
|
||||
public:
|
||||
CDoubleRect()
|
||||
{
|
||||
left = 0;
|
||||
top = 0;
|
||||
right = 0;
|
||||
bottom = 0;
|
||||
}
|
||||
CDoubleRect& operator=(const CDoubleRect& oSrc)
|
||||
{
|
||||
left = oSrc.left;
|
||||
top = oSrc.top;
|
||||
right = oSrc.right;
|
||||
bottom = oSrc.bottom;
|
||||
|
||||
return *this;
|
||||
}
|
||||
CDoubleRect(const CDoubleRect& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
|
||||
inline double GetWidth() const
|
||||
{
|
||||
return right - left;
|
||||
}
|
||||
inline double GetHeight() const
|
||||
{
|
||||
return bottom - top;
|
||||
}
|
||||
};
|
||||
|
||||
class CGeomShapeInfo
|
||||
{
|
||||
public:
|
||||
class CPointD
|
||||
{
|
||||
public:
|
||||
double dX;
|
||||
double dY;
|
||||
public:
|
||||
CPointD()
|
||||
{
|
||||
dX = 0;
|
||||
dY = 0;
|
||||
}
|
||||
|
||||
CPointD& operator= (const CPointD& oSrc)
|
||||
{
|
||||
dX = oSrc.dX;
|
||||
dY = oSrc.dY;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
CPointD(const CPointD& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
double m_dLeft;
|
||||
double m_dTop;
|
||||
double m_dWidth;
|
||||
double m_dHeight;
|
||||
|
||||
double m_dLimoX;
|
||||
double m_dLimoY;
|
||||
|
||||
|
||||
CPointD m_oCurPoint;
|
||||
|
||||
double m_dRotate;
|
||||
bool m_bFlipH;
|
||||
bool m_bFlipV;
|
||||
|
||||
public:
|
||||
CGeomShapeInfo()
|
||||
{
|
||||
m_dLeft = 0;
|
||||
m_dTop = 0;
|
||||
m_dWidth = 720;
|
||||
m_dHeight = 576;
|
||||
|
||||
m_dLimoX = 0;
|
||||
m_dLimoY = 0;
|
||||
|
||||
m_oCurPoint.dX = 0;
|
||||
m_oCurPoint.dY = 0;
|
||||
|
||||
m_dRotate = 0.0;
|
||||
m_bFlipH = false;
|
||||
m_bFlipV = false;
|
||||
}
|
||||
~CGeomShapeInfo()
|
||||
{
|
||||
}
|
||||
|
||||
CGeomShapeInfo& operator =(const CGeomShapeInfo& oSrc)
|
||||
{
|
||||
m_dLeft = oSrc.m_dLeft;
|
||||
m_dTop = oSrc.m_dTop;
|
||||
m_dWidth = oSrc.m_dWidth;
|
||||
m_dHeight = oSrc.m_dHeight;
|
||||
|
||||
m_dLimoX = oSrc.m_dLimoX;
|
||||
m_dLimoY = oSrc.m_dLimoY;
|
||||
|
||||
m_oCurPoint = oSrc.m_oCurPoint;
|
||||
|
||||
m_dRotate = oSrc.m_dRotate;
|
||||
m_bFlipH = oSrc.m_bFlipH;
|
||||
m_bFlipV = oSrc.m_bFlipV;
|
||||
|
||||
return (*this);
|
||||
}
|
||||
|
||||
inline void SetBounds(const CDoubleRect& oRect)
|
||||
{
|
||||
m_dLeft = oRect.left;
|
||||
m_dTop = oRect.top;
|
||||
m_dWidth = oRect.GetWidth();
|
||||
m_dHeight = oRect.GetHeight();
|
||||
}
|
||||
|
||||
inline LONG GetFlags()
|
||||
{
|
||||
LONG lFlags = 0;
|
||||
if (m_bFlipH)
|
||||
lFlags |= 0x0001;
|
||||
if (m_bFlipV)
|
||||
lFlags |= 0x0002;
|
||||
|
||||
return lFlags;
|
||||
}
|
||||
};
|
||||
177
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/OdpShape/Formula.h
Normal file
177
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/OdpShape/Formula.h
Normal file
@@ -0,0 +1,177 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#ifndef _USE_MATH_DEFINES
|
||||
#define _USE_MATH_DEFINES
|
||||
#endif
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <math.h>
|
||||
#include "./../Common.h"
|
||||
#include "./../../../../../../Common/XmlUtils.h"
|
||||
#include "Parser.h"
|
||||
|
||||
namespace NSGuidesOdp
|
||||
{
|
||||
const double dNonDefResult = 27273042316900;
|
||||
const long NonDefResult = 0xFFFFFF;
|
||||
const double RadKoef = M_PI/10800000.0;
|
||||
|
||||
class CFormulaManager
|
||||
{
|
||||
private:
|
||||
CSimpleMap<CString, long> mapAdjustments;
|
||||
CSimpleMap<CString, long> mapGuides;
|
||||
CSimpleArray<CString> strGuides;
|
||||
|
||||
private:
|
||||
CSimpleArray<long>* Adjustments;
|
||||
CSimpleArray<double>* Guides;
|
||||
|
||||
public:
|
||||
CFormulaManager(CSimpleArray<long>& a, CSimpleArray<double>& g)
|
||||
{
|
||||
Adjustments = &a;
|
||||
Guides = &g;
|
||||
|
||||
AddGuide(_T("left"), _T("0"));
|
||||
AddGuide(_T("top"), _T("0"));
|
||||
AddGuide(_T("right"), _T("21600"));
|
||||
AddGuide(_T("bottom"), _T("21600"));
|
||||
AddGuide(_T("width"), _T("right - left"));
|
||||
AddGuide(_T("height"), _T("bottom - top"));
|
||||
}
|
||||
|
||||
~CFormulaManager()
|
||||
{
|
||||
mapAdjustments.RemoveAll();
|
||||
mapGuides.RemoveAll();
|
||||
strGuides.RemoveAll();
|
||||
Adjustments->RemoveAll();
|
||||
Guides->RemoveAll();
|
||||
}
|
||||
|
||||
CFormulaManager& operator =(const CFormulaManager& manager)
|
||||
{
|
||||
mapAdjustments.RemoveAll();
|
||||
for(int i = 0; i < manager.mapAdjustments.GetSize(); i++)
|
||||
mapAdjustments.Add(manager.mapAdjustments.GetKeyAt(i), manager.mapAdjustments.GetValueAt(i));
|
||||
mapGuides.RemoveAll();
|
||||
for(int i = 0; i < manager.mapGuides.GetSize(); i++)
|
||||
mapGuides.Add(manager.mapGuides.GetKeyAt(i), manager.mapGuides.GetValueAt(i));
|
||||
|
||||
strGuides.RemoveAll();
|
||||
for(int i = 0; i < manager.strGuides.GetSize(); i++)
|
||||
strGuides.Add(manager.strGuides[i]);
|
||||
|
||||
Adjustments->RemoveAll();
|
||||
for(int i = 0; i < manager.Adjustments->GetSize(); i++)
|
||||
Adjustments->Add((*manager.Adjustments)[i]);
|
||||
Guides->RemoveAll();
|
||||
for(int i = 0; i < manager.Guides->GetSize(); i++)
|
||||
Guides->Add((*manager.Guides)[i]);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void AddAdjustment(const CString& name, const long value)
|
||||
{
|
||||
long num = mapAdjustments.FindKey(name);
|
||||
if(num >= 0)
|
||||
{
|
||||
(*Adjustments)[mapAdjustments.GetValueAt(num)] = value;
|
||||
return;
|
||||
}
|
||||
Adjustments->Add(value);
|
||||
mapAdjustments.Add(name, Adjustments->GetSize() - 1);
|
||||
}
|
||||
|
||||
void AddGuide(const CString& name, const CString& fmla)
|
||||
{
|
||||
long num = mapGuides.FindKey(name);
|
||||
if(num >= 0)
|
||||
{
|
||||
strGuides[mapGuides.GetValueAt(num)] = fmla;
|
||||
(*Guides)[mapGuides.GetValueAt(num)] = dNonDefResult;
|
||||
return;
|
||||
}
|
||||
strGuides.Add(fmla);
|
||||
Guides->Add(dNonDefResult);
|
||||
mapGuides.Add(name, strGuides.GetSize() - 1);
|
||||
}
|
||||
|
||||
double GetValue(CString str)
|
||||
{
|
||||
long numGuide = mapGuides.FindKey(str);
|
||||
long numAdj = mapAdjustments.FindKey(str);
|
||||
if(numGuide >= 0)
|
||||
{
|
||||
double res = (*Guides)[mapGuides.GetValueAt(numGuide)];
|
||||
if(res < dNonDefResult)
|
||||
return res;
|
||||
TParser parser;
|
||||
parser.Compile(strGuides[mapGuides.GetValueAt(numGuide)], *this);
|
||||
parser.Evaluate();
|
||||
parser.Decompile();
|
||||
(*Guides)[mapGuides.GetValueAt(numGuide)] = parser.GetResult();
|
||||
return parser.GetResult();
|
||||
}
|
||||
if(numAdj >= 0)
|
||||
{
|
||||
return (*Adjustments)[mapAdjustments.GetValueAt(numAdj)];
|
||||
}
|
||||
return XmlUtils::GetInteger(CString(str));
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
|
||||
|
||||
for(long i = 0; i < Guides->GetSize(); i++)
|
||||
(*Guides)[i] = dNonDefResult;
|
||||
}
|
||||
|
||||
void ReCalculateGuides()
|
||||
{
|
||||
Clear();
|
||||
for(long i = 0; i < strGuides.GetSize(); i++)
|
||||
{
|
||||
TParser parser;
|
||||
parser.Compile(strGuides[i], *this);
|
||||
parser.Evaluate();
|
||||
parser.Decompile();
|
||||
(*Guides)[i] = parser.GetResult();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "OdpShape.h"
|
||||
#include "PresetShapesHeader.h"
|
||||
|
||||
COdpShape* COdpShape::CreateByType(OdpShapes::ShapeType type)
|
||||
{
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case OdpShapes::sptCRect: return new OdpShapes::CRect();
|
||||
case OdpShapes::sptCLine: return new OdpShapes::CLine();
|
||||
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -0,0 +1,349 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "Formula.h"
|
||||
#include <string>
|
||||
#include "./../BaseShape.h"
|
||||
#include "./../../../../../../Common/XmlUtils.h"
|
||||
|
||||
using namespace NSOfficeDrawing;
|
||||
|
||||
namespace OdpShapes
|
||||
{
|
||||
enum ShapeType : unsigned short
|
||||
{
|
||||
sptMin = 0,
|
||||
sptNotPrimitive = sptMin,
|
||||
sptCRect = 1,
|
||||
sptCLine = 2,
|
||||
|
||||
sptMax,
|
||||
sptNil = 0x0FFF,
|
||||
sptCustom = 0x1000
|
||||
};
|
||||
}
|
||||
|
||||
class COdpShape : public CBaseShape
|
||||
{
|
||||
public:
|
||||
OdpShapes::ShapeType m_eType;
|
||||
|
||||
NSGuidesOdp::CFormulaManager FManager;
|
||||
public:
|
||||
COdpShape() : CBaseShape(), FManager(m_arAdjustments, Guides)
|
||||
{
|
||||
m_eType = OdpShapes::sptMin;
|
||||
}
|
||||
|
||||
~COdpShape()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
virtual bool LoadFromXML(const CString& xml)
|
||||
{
|
||||
XmlUtils::CXmlNode oNodePict;
|
||||
if (oNodePict.FromXmlString(xml))
|
||||
{
|
||||
return LoadFromXML(oNodePict);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
virtual bool LoadFromXML(XmlUtils::CXmlNode& root)
|
||||
{
|
||||
bool res = true;
|
||||
res &= LoadAdjustValuesList(root.GetAttributeOrValue(_T("draw:modifiers")));
|
||||
|
||||
XmlUtils::CXmlNodes gdLst;
|
||||
if(root.GetNodes(_T("draw:equation"), gdLst))
|
||||
{
|
||||
for(long i = 0; i < gdLst.GetCount(); i++)
|
||||
{
|
||||
XmlUtils::CXmlNode gd;
|
||||
gdLst.GetAt(i, gd);
|
||||
FManager.AddGuide(_T("?") + gd.GetAttribute(_T("draw:name")), gd.GetAttribute(_T("draw:formula")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
m_strRect = root.GetAttributeOrValue(_T("draw:text-areas"));
|
||||
res &= LoadTextRect(m_strRect);
|
||||
|
||||
m_strPath = root.GetAttributeOrValue(_T("draw:enhanced-path"));
|
||||
res &= LoadPathList(m_strPath);
|
||||
|
||||
CString viewBox = root.GetAttributeOrValue(_T("svg:viewBox"));
|
||||
|
||||
if(viewBox != _T(""))
|
||||
{
|
||||
CSimpleArray<CString> borders;
|
||||
|
||||
NSStringUtils::ParseString(_T(" "), viewBox, &borders);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
FManager.AddGuide(_T("left"), borders[0]);
|
||||
FManager.AddGuide(_T("top"), borders[1]);
|
||||
FManager.AddGuide(_T("right"), borders[2]);
|
||||
FManager.AddGuide(_T("bottom"), borders[3]);
|
||||
|
||||
FManager.Clear();
|
||||
for(int i = 0; i < m_oPath.m_arParts.GetSize(); i++)
|
||||
{
|
||||
m_oPath.m_arParts[i].height = (long)FManager.GetValue(_T("height"));
|
||||
m_oPath.m_arParts[i].width = (long)FManager.GetValue(_T("width"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
virtual bool LoadAdjustValuesList(const CString& xml)
|
||||
{
|
||||
if(xml != _T(""))
|
||||
{
|
||||
CSimpleArray<CString> adjusts;
|
||||
NSStringUtils::ParseString(_T(" "), xml, &adjusts);
|
||||
m_arAdjustments.RemoveAll();
|
||||
CString buffer;
|
||||
for(int i = 0; i < adjusts.GetSize(); i++)
|
||||
{
|
||||
buffer.Format(_T("%i"), i);
|
||||
FManager.AddAdjustment(CString(_T("$")) + buffer, XmlUtils::GetInteger(adjusts[i]));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool LoadGuidesList(const CString& xml)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool LoadAdjustHandlesList(const CString& xml)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool LoadConnectorsList(const CString& xml)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool LoadTextRect(const CString& xml)
|
||||
{
|
||||
if(xml != _T(""))
|
||||
{
|
||||
CSimpleArray<CString> borders;
|
||||
NSStringUtils::ParseString(_T(" "), xml, &borders);
|
||||
|
||||
RECT TextRect;
|
||||
TextRect.left = (long)FManager.GetValue(borders[0]);
|
||||
TextRect.top = (long)FManager.GetValue(borders[1]);
|
||||
TextRect.right = (long)FManager.GetValue(borders[2]);
|
||||
TextRect.bottom = (long)FManager.GetValue(borders[3]);
|
||||
if(m_arTextRects.GetSize() > 0)
|
||||
m_arTextRects[0] = TextRect;
|
||||
else m_arTextRects.Add(TextRect);
|
||||
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool LoadPathList(const CString& xml)
|
||||
{
|
||||
if(xml != _T(""))
|
||||
{
|
||||
m_oPath.FromXML(xml, FManager);
|
||||
|
||||
for(int i = 0; i < m_oPath.m_arParts.GetSize(); i++)
|
||||
{
|
||||
m_oPath.m_arParts[i].height = (long)FManager.GetValue(_T("height"));
|
||||
m_oPath.m_arParts[i].width = (long)FManager.GetValue(_T("width"));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool SetAdjustment(long index, long value)
|
||||
{
|
||||
FManager.Clear();
|
||||
|
||||
CString buffer;
|
||||
buffer.Format(_T("%i"), index);
|
||||
FManager.AddAdjustment(_T("$") + buffer, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual CString ToXML(CGeomShapeInfo& GeomInfo, CMetricInfo& MetricInfo, double StartTime, double EndTime, CBrush_& Brush, CPen_& Pen)
|
||||
{
|
||||
|
||||
ReCalculate();
|
||||
|
||||
return m_oPath.ToXml(GeomInfo, StartTime, EndTime, Pen, Brush, MetricInfo, NSBaseShape::odp);
|
||||
}
|
||||
|
||||
virtual void ReCalculate()
|
||||
{
|
||||
FManager.ReCalculateGuides();
|
||||
LoadTextRect(m_strRect);
|
||||
LoadPathList(m_strPath);
|
||||
}
|
||||
|
||||
static COdpShape* CreateByType(OdpShapes::ShapeType type);
|
||||
virtual const ClassType GetClassType()const
|
||||
{
|
||||
return NSBaseShape::odp;
|
||||
}
|
||||
|
||||
virtual bool SetProperties(CBaseShape* Shape)
|
||||
{
|
||||
if(Shape == NULL)
|
||||
return false;
|
||||
|
||||
if(Shape->GetClassType() != NSBaseShape::odp)
|
||||
return false;
|
||||
|
||||
FManager = ((COdpShape*)Shape)->FManager;
|
||||
return CBaseShape::SetProperties(Shape);
|
||||
}
|
||||
|
||||
virtual bool SetToDublicate(CBaseShape* Shape)
|
||||
{
|
||||
if(Shape == NULL)
|
||||
return false;
|
||||
|
||||
if(Shape->GetClassType() != NSBaseShape::odp)
|
||||
return false;
|
||||
|
||||
((COdpShape*)Shape)->FManager = FManager;
|
||||
return CBaseShape::SetToDublicate(Shape);
|
||||
}
|
||||
|
||||
bool SetShapeType(OdpShapes::ShapeType type)
|
||||
{
|
||||
COdpShape* l_pShape = CreateByType(type);
|
||||
if(l_pShape != NULL)
|
||||
{
|
||||
m_eType = type;
|
||||
|
||||
SetProperties(l_pShape);
|
||||
delete l_pShape;
|
||||
return true;
|
||||
}
|
||||
|
||||
m_eType = OdpShapes::sptCustom;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../OdpShape.h"
|
||||
|
||||
namespace OdpShapes
|
||||
{
|
||||
class CLine : public COdpShape
|
||||
{
|
||||
public:
|
||||
CLine()
|
||||
{
|
||||
LoadFromXML(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
_T("<draw:enhanced-geometry xmlns:draw=\"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\" xmlns:svg=\"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\" svg:viewBox=\"0 0 21600 21600\" draw:type=\"non-primitive-line\" draw:modifiers=\"0 0 21600 21600 21600 21600\" draw:enhanced-path=\"M ?f0 ?f1 L ?f4 ?f5 Z N\">")
|
||||
_T("<draw:equation draw:name=\"f0\" draw:formula=\"$0*21600/$4\" />")
|
||||
_T("<draw:equation draw:name=\"f1\" draw:formula=\"$1*21600/$5\" />")
|
||||
_T("<draw:equation draw:name=\"f2\" draw:formula=\"$2*21600/$4\" />")
|
||||
_T("<draw:equation draw:name=\"f3\" draw:formula=\"$3*21600/$5\" />")
|
||||
_T("<draw:equation draw:name=\"f4\" draw:formula=\"?f0 + ?f2\" />")
|
||||
_T("<draw:equation draw:name=\"f5\" draw:formula=\"?f1 + ?f3\" />")
|
||||
_T("</draw:enhanced-geometry>")
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../OdpShape.h"
|
||||
|
||||
namespace OdpShapes
|
||||
{
|
||||
class CRect : public COdpShape
|
||||
{
|
||||
public:
|
||||
CRect()
|
||||
{
|
||||
LoadFromXML(
|
||||
_T("<draw:enhanced-geometry xmlns:draw=\"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\" xmlns:svg=\"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\" svg:viewBox=\"0 0 21600 21600\" draw:type=\"rectangle\" draw:enhanced-path=\"M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N\" />")
|
||||
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "OdpShapes/CRect.h"
|
||||
#include "OdpShapes/CLine.h"
|
||||
@@ -0,0 +1,573 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <math.h>
|
||||
#include "parser.h"
|
||||
#include "Formula.h"
|
||||
|
||||
|
||||
|
||||
#define OP_PLUS 0
|
||||
#define OP_MINUS 1
|
||||
#define OP_MULTIPLY 2
|
||||
#define OP_DIVIDE 3
|
||||
#define OP_PERCENT 4
|
||||
#define OP_POWER 5
|
||||
#define OP_UMINUS 6
|
||||
#define OP_COMMA 7
|
||||
|
||||
#define OP_SIN 10
|
||||
#define OP_COS 11
|
||||
#define OP_TG 12
|
||||
#define OP_CTG 13
|
||||
#define OP_ARCSIN 14
|
||||
#define OP_ARCCOS 15
|
||||
#define OP_ARCTG 16
|
||||
#define OP_ARCCTG 17
|
||||
#define OP_SH 18
|
||||
#define OP_CH 19
|
||||
#define OP_TH 20
|
||||
#define OP_CTH 21
|
||||
#define OP_EXP 22
|
||||
#define OP_LG 23
|
||||
#define OP_LN 24
|
||||
#define OP_SQRT 25
|
||||
#define OP_ABS 26
|
||||
#define OP_MIN 30
|
||||
#define OP_MAX 31
|
||||
#define OP_ATAN2 32
|
||||
#define OP_IF 40
|
||||
|
||||
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.1415926535897932384626433832795
|
||||
#endif
|
||||
|
||||
|
||||
TParserNode *TParser::CreateNode(double _value, TParserNode *_left, TParserNode *_right, TParserNode *_third)
|
||||
{
|
||||
TParserNode *pNode = new TParserNode(_value, _left, _right, _third);
|
||||
history.push_back(pNode);
|
||||
return pNode;
|
||||
}
|
||||
|
||||
void TParser::SendError(int errNum)
|
||||
{
|
||||
static CString errs[7] = { _T(""),
|
||||
_T(""),
|
||||
_T("Unexpected end of expression"),
|
||||
_T("End of expression expected"),
|
||||
_T("'(' or '[' expected"),
|
||||
_T("')' or ']' expected"),
|
||||
_T("")
|
||||
};
|
||||
CString buffer;
|
||||
|
||||
int len = curToken.GetLength();
|
||||
|
||||
if(curToken == _T(""))
|
||||
curToken = _T("EOL");
|
||||
|
||||
switch(errNum)
|
||||
{
|
||||
case 0:
|
||||
buffer.Format(_T("Unknown keyword: '%s'"), curToken);
|
||||
errs[0] = buffer;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
buffer.Format(_T("Unknown symbol: '%s'"), curToken);
|
||||
errs[1] = buffer;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
buffer.Format(_T("Unexpected '%s'"), curToken);
|
||||
errs[6] = buffer;
|
||||
break;
|
||||
}
|
||||
|
||||
TError error(errs[errNum], pos-len);
|
||||
|
||||
for(unsigned int i=0; i<history.size(); i++)
|
||||
delete history[i];
|
||||
history.clear();
|
||||
|
||||
root = NULL;
|
||||
|
||||
throw error;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool TParser::GetToken()
|
||||
{
|
||||
curToken = _T("");
|
||||
|
||||
if(pos >= expr.GetLength())
|
||||
{
|
||||
curToken = _T("");
|
||||
typToken = PARSER_END;
|
||||
return true;
|
||||
}
|
||||
|
||||
while(IsSpace()) pos++;
|
||||
|
||||
if(IsDelim())
|
||||
{
|
||||
curToken = expr[pos++];
|
||||
switch(curToken[0])
|
||||
{
|
||||
case _T('+'): typToken = PARSER_PLUS; return true;
|
||||
case _T('-'): typToken = PARSER_MINUS; return true;
|
||||
case _T('*'): typToken = PARSER_MULTIPLY; return true;
|
||||
case _T('/'): typToken = PARSER_DIVIDE; return true;
|
||||
case _T('%'): typToken = PARSER_PERCENT; return true;
|
||||
case _T('^'): typToken = PARSER_POWER; return true;
|
||||
case _T('['):
|
||||
case _T('('): typToken = PARSER_L_BRACKET; return true;
|
||||
case _T(']'):
|
||||
case _T(')'): typToken = PARSER_R_BRACKET; return true;
|
||||
}
|
||||
}
|
||||
else if(IsComma())
|
||||
{
|
||||
curToken = expr[pos++];
|
||||
typToken = PARSER_COMMA;
|
||||
return true;
|
||||
}
|
||||
else if(IsLetter())
|
||||
{
|
||||
int i=0;
|
||||
curToken = _T("");
|
||||
while(IsLetter() || IsDigit()) curToken += expr[pos++];
|
||||
|
||||
curToken.MakeLower();
|
||||
|
||||
if(curToken == _T("pi")) { typToken = PARSER_PI; return true; }
|
||||
else if(curToken == _T("e")) { typToken = PARSER_E; return true; }
|
||||
else if(curToken == _T("sin")) { typToken = PARSER_SIN; return true; }
|
||||
else if(curToken == _T("cos")) { typToken = PARSER_COS; return true; }
|
||||
else if(curToken == _T("tg")) { typToken = PARSER_TG; return true; }
|
||||
else if(curToken == _T("ctg")) { typToken = PARSER_CTG; return true; }
|
||||
else if(curToken == _T("arcsin")) { typToken = PARSER_ARCSIN; return true; }
|
||||
else if(curToken == _T("arccos")) { typToken = PARSER_ARCCOS; return true; }
|
||||
else if(curToken == _T("arctg")) { typToken = PARSER_ARCTG; return true; }
|
||||
else if(curToken == _T("arcctg")) { typToken = PARSER_ARCCTG; return true; }
|
||||
else if(curToken == _T("sh")) { typToken = PARSER_SH; return true; }
|
||||
else if(curToken == _T("ch")) { typToken = PARSER_CH; return true; }
|
||||
else if(curToken == _T("th")) { typToken = PARSER_TH; return true; }
|
||||
else if(curToken == _T("cth")) { typToken = PARSER_CTH; return true; }
|
||||
else if(curToken == _T("exp")) { typToken = PARSER_EXP; return true; }
|
||||
else if(curToken == _T("lg")) { typToken = PARSER_LG; return true; }
|
||||
else if(curToken == _T("ln")) { typToken = PARSER_LN; return true; }
|
||||
else if(curToken == _T("sqrt")) { typToken = PARSER_SQRT; return true; }
|
||||
else if(curToken == _T("abs")) { typToken = PARSER_ABS; return true; }
|
||||
|
||||
else if(curToken == _T("min")) { typToken = PARSER_MIN; return true; }
|
||||
else if(curToken == _T("max")) { typToken = PARSER_MAX; return true; }
|
||||
else if(curToken == _T("atan2")) { typToken = PARSER_ATAN2; return true; }
|
||||
|
||||
else if(curToken == _T("if")) { typToken = PARSER_IF; return true; }
|
||||
|
||||
else if(curToken == _T("left")) { typToken = PARSER_GUIDE; return true; }
|
||||
else if(curToken == _T("right")) { typToken = PARSER_GUIDE; return true; }
|
||||
else if(curToken == _T("top")) { typToken = PARSER_GUIDE; return true; }
|
||||
else if(curToken == _T("bottom")) { typToken = PARSER_GUIDE; return true; }
|
||||
else if(curToken == _T("width")) { typToken = PARSER_GUIDE; return true; }
|
||||
else if(curToken == _T("height")) { typToken = PARSER_GUIDE; return true; }
|
||||
else SendError(0);
|
||||
}
|
||||
else if(IsAdjust())
|
||||
{
|
||||
int i=0;
|
||||
curToken = _T("");
|
||||
while((!IsSpace())&&(!IsDelim())) curToken += expr[pos++];
|
||||
|
||||
typToken = PARSER_ADJUST;
|
||||
return true;
|
||||
}
|
||||
else if(IsGuide())
|
||||
{
|
||||
int i=0;
|
||||
curToken = _T("");
|
||||
while((!IsSpace())&&(!IsDelim())) curToken += expr[pos++];
|
||||
|
||||
typToken = PARSER_GUIDE;
|
||||
return true;
|
||||
}
|
||||
else if(IsDigit() || IsPoint())
|
||||
{
|
||||
int i=0;
|
||||
curToken = _T("");
|
||||
while(IsDigit()) curToken += expr[pos++];
|
||||
if(IsPoint())
|
||||
{
|
||||
curToken += expr[pos++];
|
||||
while(IsDigit()) curToken += expr[pos++];
|
||||
}
|
||||
typToken = PARSER_NUMBER;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
curToken = expr[pos++];
|
||||
SendError(1);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool TParser::Compile(CString _expr, NSGuidesOdp::CFormulaManager& pFManager)
|
||||
{
|
||||
pos = 0;
|
||||
expr = _expr;
|
||||
curToken = _T("");
|
||||
if(root!=NULL)
|
||||
{
|
||||
DelTree(root);
|
||||
root = NULL;
|
||||
}
|
||||
|
||||
history.clear();
|
||||
CString strTempString(_T("+-*/%^,"));
|
||||
while(strTempString.Find(expr[0]) >= 0) expr.Delete(0);
|
||||
|
||||
GetToken();
|
||||
if(typToken==PARSER_END) SendError(2);
|
||||
root = Expr(pFManager);
|
||||
if(typToken!=PARSER_END) SendError(3);
|
||||
|
||||
history.clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
TParserNode *TParser::Expr(NSGuidesOdp::CFormulaManager& pFManager)
|
||||
{
|
||||
TParserNode *temp = Expr1(pFManager);
|
||||
|
||||
while(1)
|
||||
{
|
||||
if(typToken==PARSER_PLUS)
|
||||
{
|
||||
GetToken();
|
||||
temp = CreateNode(OP_PLUS, temp, Expr1(pFManager));
|
||||
}
|
||||
else if(typToken==PARSER_MINUS)
|
||||
{
|
||||
GetToken();
|
||||
temp = CreateNode(OP_MINUS, temp, Expr1(pFManager));
|
||||
}
|
||||
else break;
|
||||
}
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
TParserNode *TParser::Expr1(NSGuidesOdp::CFormulaManager& pFManager)
|
||||
{
|
||||
TParserNode *temp = Expr2(pFManager);
|
||||
|
||||
while(1)
|
||||
{
|
||||
if(typToken==PARSER_MULTIPLY)
|
||||
{
|
||||
GetToken();
|
||||
temp = CreateNode(OP_MULTIPLY, temp, Expr2(pFManager));
|
||||
}
|
||||
else if(typToken==PARSER_DIVIDE)
|
||||
{
|
||||
GetToken();
|
||||
temp = CreateNode(OP_DIVIDE, temp, Expr2(pFManager));
|
||||
}
|
||||
else if(typToken==PARSER_PERCENT)
|
||||
{
|
||||
GetToken();
|
||||
temp = CreateNode(OP_PERCENT, temp, Expr2(pFManager));
|
||||
}
|
||||
else break;
|
||||
}
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
TParserNode *TParser::Expr2(NSGuidesOdp::CFormulaManager& pFManager)
|
||||
{
|
||||
TParserNode *temp = Expr3(pFManager);
|
||||
|
||||
while(1)
|
||||
{
|
||||
if(typToken==PARSER_POWER)
|
||||
{
|
||||
GetToken();
|
||||
temp = CreateNode(OP_POWER, temp, Expr2(pFManager));
|
||||
}
|
||||
else break;
|
||||
}
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
TParserNode *TParser::Expr3(NSGuidesOdp::CFormulaManager& pFManager)
|
||||
{
|
||||
TParserNode *temp;
|
||||
|
||||
if(typToken==PARSER_PLUS)
|
||||
{
|
||||
GetToken();
|
||||
temp = Expr4(pFManager);
|
||||
}
|
||||
else if(typToken==PARSER_MINUS)
|
||||
{
|
||||
GetToken();
|
||||
temp = CreateNode(OP_UMINUS, Expr4(pFManager));
|
||||
}
|
||||
else
|
||||
temp = Expr4(pFManager);
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
TParserNode *TParser::Expr4(NSGuidesOdp::CFormulaManager& pFManager)
|
||||
{
|
||||
TParserNode *temp;
|
||||
|
||||
if(typToken>=PARSER_SIN && typToken<=PARSER_ABS)
|
||||
{
|
||||
temp = CreateNode(OP_SIN-PARSER_SIN+typToken);
|
||||
GetToken();
|
||||
if(typToken!=PARSER_L_BRACKET) SendError(4);
|
||||
GetToken();
|
||||
temp->left = Expr(pFManager);
|
||||
if(typToken!=PARSER_R_BRACKET) SendError(5);
|
||||
GetToken();
|
||||
}
|
||||
else if((typToken >= PARSER_MIN) && (typToken <= PARSER_ATAN2))
|
||||
{
|
||||
temp = CreateNode(OP_MIN-PARSER_MIN+typToken);
|
||||
GetToken();
|
||||
if(typToken!=PARSER_L_BRACKET) SendError(4);
|
||||
GetToken();
|
||||
temp->left = Expr(pFManager);
|
||||
if(typToken != PARSER_COMMA) SendError(6);
|
||||
GetToken();
|
||||
temp->right = Expr(pFManager);
|
||||
if(typToken!=PARSER_R_BRACKET) SendError(5);
|
||||
GetToken();
|
||||
}
|
||||
else if(typToken == PARSER_IF)
|
||||
{
|
||||
temp = CreateNode(OP_IF);
|
||||
GetToken();
|
||||
if(typToken!=PARSER_L_BRACKET) SendError(4);
|
||||
GetToken();
|
||||
temp->left = Expr(pFManager);
|
||||
if(typToken != PARSER_COMMA) SendError(6);
|
||||
GetToken();
|
||||
temp->right = Expr(pFManager);
|
||||
if(typToken != PARSER_COMMA) SendError(6);
|
||||
GetToken();
|
||||
temp->third = Expr(pFManager);
|
||||
if(typToken!=PARSER_R_BRACKET) SendError(5);
|
||||
GetToken();
|
||||
}
|
||||
else
|
||||
temp = Expr5(pFManager);
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
TParserNode *TParser::Expr5(NSGuidesOdp::CFormulaManager& pFManager)
|
||||
{
|
||||
TParserNode *temp;
|
||||
|
||||
switch(typToken)
|
||||
{
|
||||
case PARSER_ADJUST:
|
||||
temp = CreateNode(pFManager.GetValue(curToken));
|
||||
GetToken();
|
||||
break;
|
||||
|
||||
case PARSER_GUIDE:
|
||||
temp = CreateNode(pFManager.GetValue(curToken));
|
||||
GetToken();
|
||||
break;
|
||||
|
||||
case PARSER_NUMBER:
|
||||
temp = CreateNode(XmlUtils::GetDouble(curToken));
|
||||
GetToken();
|
||||
break;
|
||||
|
||||
case PARSER_PI:
|
||||
temp = CreateNode((double)M_PI);
|
||||
GetToken();
|
||||
break;
|
||||
|
||||
case PARSER_E:
|
||||
temp = CreateNode(exp((double)1.0));
|
||||
GetToken();
|
||||
break;
|
||||
|
||||
case PARSER_L_BRACKET:
|
||||
GetToken();
|
||||
temp = Expr(pFManager);
|
||||
if(typToken!=PARSER_R_BRACKET) SendError(5);
|
||||
GetToken();
|
||||
break;
|
||||
|
||||
default:
|
||||
SendError(6);
|
||||
}
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
double TParser::Evaluate(void)
|
||||
{
|
||||
result = CalcTree(root);
|
||||
return result;
|
||||
}
|
||||
|
||||
double TParser::CalcTree(TParserNode *tree)
|
||||
{
|
||||
static double temp;
|
||||
|
||||
if(tree->left==NULL && tree->right==NULL)
|
||||
return tree->value;
|
||||
else
|
||||
switch((int)tree->value)
|
||||
{
|
||||
case OP_PLUS:
|
||||
return CalcTree(tree->left)+CalcTree(tree->right);
|
||||
|
||||
case OP_MINUS:
|
||||
return CalcTree(tree->left)-CalcTree(tree->right);
|
||||
|
||||
case OP_MULTIPLY:
|
||||
return CalcTree(tree->left)*CalcTree(tree->right);
|
||||
|
||||
case OP_DIVIDE:
|
||||
return CalcTree(tree->left)/CalcTree(tree->right);
|
||||
|
||||
case OP_PERCENT:
|
||||
return (int)CalcTree(tree->left)%(int)CalcTree(tree->right);
|
||||
|
||||
case OP_POWER:
|
||||
return (double)pow(CalcTree(tree->left),CalcTree(tree->right));
|
||||
|
||||
case OP_UMINUS:
|
||||
return -CalcTree(tree->left);
|
||||
|
||||
case OP_SIN:
|
||||
return sin(CalcTree(tree->left));
|
||||
|
||||
case OP_COS:
|
||||
return cos(CalcTree(tree->left));
|
||||
|
||||
case OP_TG:
|
||||
return tan(CalcTree(tree->left));
|
||||
|
||||
case OP_CTG:
|
||||
return 1.0/tan(CalcTree(tree->left));
|
||||
|
||||
case OP_ARCSIN:
|
||||
return asin(CalcTree(tree->left));
|
||||
|
||||
case OP_ARCCOS:
|
||||
return acos(CalcTree(tree->left));
|
||||
|
||||
case OP_ARCTG:
|
||||
return atan(CalcTree(tree->left));
|
||||
|
||||
case OP_ARCCTG:
|
||||
return M_PI/2.0-atan(CalcTree(tree->left));
|
||||
|
||||
case OP_SH:
|
||||
temp = CalcTree(tree->left);
|
||||
return (exp(temp)-exp(-temp))/2.0;
|
||||
|
||||
case OP_CH:
|
||||
temp = CalcTree(tree->left);
|
||||
return (exp(temp)+exp(-temp))/2.0;
|
||||
|
||||
case OP_TH:
|
||||
temp = CalcTree(tree->left);
|
||||
return (exp(temp)-exp(-temp))/(exp(temp)+exp(-temp));
|
||||
|
||||
case OP_CTH:
|
||||
temp = CalcTree(tree->left);
|
||||
return (exp(temp)+exp(-temp))/(exp(temp)-exp(-temp));
|
||||
|
||||
case OP_EXP:
|
||||
return exp(CalcTree(tree->left));
|
||||
|
||||
case OP_LG:
|
||||
return log10(CalcTree(tree->left));
|
||||
|
||||
case OP_LN:
|
||||
return log(CalcTree(tree->left));
|
||||
|
||||
case OP_SQRT:
|
||||
return sqrt(CalcTree(tree->left));
|
||||
|
||||
case OP_ABS:
|
||||
return abs(CalcTree(tree->left));
|
||||
|
||||
case OP_MIN:
|
||||
return min(CalcTree(tree->left), CalcTree(tree->right));
|
||||
|
||||
case OP_MAX:
|
||||
return max(CalcTree(tree->left), CalcTree(tree->right));
|
||||
|
||||
case OP_ATAN2:
|
||||
return atan2(CalcTree(tree->left), CalcTree(tree->right));
|
||||
|
||||
case OP_IF:
|
||||
return ((CalcTree(tree->left) > 0) ? CalcTree(tree->right) : CalcTree(tree->third));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void TParser::DelTree(TParserNode *tree)
|
||||
{
|
||||
if(tree==NULL) return;
|
||||
|
||||
DelTree(tree->left);
|
||||
DelTree(tree->right);
|
||||
|
||||
delete tree;
|
||||
|
||||
return;
|
||||
}
|
||||
124
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/OdpShape/parser.h
Normal file
124
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/OdpShape/parser.h
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#if !defined(__SOLVER_H)
|
||||
#define __SOLVER_H
|
||||
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
namespace NSGuidesOdp
|
||||
{
|
||||
class CFormulaManager;
|
||||
}
|
||||
|
||||
struct TParserNode
|
||||
{
|
||||
double value;
|
||||
TParserNode *left;
|
||||
TParserNode *right;
|
||||
TParserNode *third;
|
||||
|
||||
TParserNode(double _value=0.0, TParserNode *_left=NULL, TParserNode *_right=NULL, TParserNode *_third=NULL)
|
||||
{ value = _value; left = _left; right = _right; third = _third; }
|
||||
};
|
||||
|
||||
struct TError
|
||||
{
|
||||
CString error;
|
||||
int pos;
|
||||
|
||||
TError() {};
|
||||
TError(CString _error, int _pos) { error=_error; pos=_pos; }
|
||||
};
|
||||
|
||||
class TParser
|
||||
{
|
||||
private:
|
||||
TParserNode *root;
|
||||
CString expr;
|
||||
CString curToken;
|
||||
enum { PARSER_PLUS, PARSER_MINUS, PARSER_MULTIPLY, PARSER_DIVIDE, PARSER_PERCENT, PARSER_POWER, PARSER_COMMA,
|
||||
PARSER_SIN, PARSER_COS, PARSER_TG, PARSER_CTG, PARSER_ARCSIN, PARSER_ARCCOS, PARSER_ARCTG, PARSER_ARCCTG, PARSER_SH, PARSER_CH, PARSER_TH, PARSER_CTH,
|
||||
PARSER_EXP, PARSER_LG, PARSER_LN, PARSER_SQRT, PARSER_ABS,
|
||||
PARSER_MIN, PARSER_MAX, PARSER_ATAN2,
|
||||
PARSER_IF,
|
||||
PARSER_GUIDE, PARSER_ADJUST, PARSER_L_BRACKET, PARSER_R_BRACKET, PARSER_E, PARSER_PI, PARSER_NUMBER, PARSER_END } typToken;
|
||||
int pos;
|
||||
|
||||
double result;
|
||||
|
||||
vector<TParserNode *> history;
|
||||
|
||||
private:
|
||||
TParserNode *CreateNode(double _value=0.0, TParserNode *_left=NULL, TParserNode *_right=NULL, TParserNode *_third=NULL);
|
||||
|
||||
TParserNode *Expr(NSGuidesOdp::CFormulaManager& pFManager);
|
||||
TParserNode *Expr1(NSGuidesOdp::CFormulaManager& pFManager);
|
||||
TParserNode *Expr2(NSGuidesOdp::CFormulaManager& pFManager);
|
||||
TParserNode *Expr3(NSGuidesOdp::CFormulaManager& pFManager);
|
||||
TParserNode *Expr4(NSGuidesOdp::CFormulaManager& pFManager);
|
||||
TParserNode *Expr5(NSGuidesOdp::CFormulaManager& pFManager);
|
||||
|
||||
bool GetToken();
|
||||
bool IsSpace(void) {CString string(_T(" ")); return (string.Find(expr[pos]) >= 0);}
|
||||
bool IsDelim(void) {CString string(_T("+-*/%^()[]")); return (string.Find(expr[pos]) >= 0);}
|
||||
bool IsAdjust(void) {CString string(_T("$")); return (string.Find(expr[pos]) >= 0);}
|
||||
bool IsGuide(void) {CString string(_T("?")); return (string.Find(expr[pos]) >= 0);}
|
||||
bool IsComma(void) {CString string(_T(",")); return (string.Find(expr[pos]) >= 0);}
|
||||
|
||||
bool IsLetter(void) { return ((expr[pos]>=_T('a') && expr[pos]<=_T('z')) ||
|
||||
(expr[pos]>=_T('A') && expr[pos]<=_T('Z'))); }
|
||||
bool IsDigit(void) { return (expr[pos]>=_T('0') && expr[pos]<=_T('9')); }
|
||||
bool IsPoint(void) { return (expr[pos]==_T('.')); }
|
||||
|
||||
double CalcTree(TParserNode *tree);
|
||||
void DelTree(TParserNode *tree);
|
||||
|
||||
void SendError(int errNum);
|
||||
|
||||
public:
|
||||
TParser() { result = 0.0; root = NULL; }
|
||||
~TParser() { DelTree(root); root=NULL; }
|
||||
|
||||
bool Compile(CString _expr, NSGuidesOdp::CFormulaManager& pFManager);
|
||||
void Decompile() { DelTree(root); root=NULL; }
|
||||
|
||||
double Evaluate(void);
|
||||
|
||||
double GetResult(void) { return result; }
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "Formula.h"
|
||||
|
||||
LONG NSGuidesVML::CFormula::Calculate(NSGuidesVML::CFormulasManager* pManager)
|
||||
{
|
||||
if ((0 > m_lIndex) || (m_lIndex >= pManager->m_arResults.GetSize()))
|
||||
return 0;
|
||||
if (0xFFFFFFFF != pManager->m_arResults[m_lIndex])
|
||||
{
|
||||
return pManager->m_arResults[m_lIndex];
|
||||
}
|
||||
|
||||
LONG lResult = 0;
|
||||
|
||||
LONG lGuidesCount = pManager->m_arFormulas.GetSize();
|
||||
LONG lAdjCount = pManager->m_pAdjustments->GetSize();
|
||||
|
||||
LONG a1 = m_lParam1;
|
||||
if (ptFormula == m_eType1)
|
||||
{
|
||||
a1 = (m_lParam1 >= lGuidesCount) ? 0 : pManager->m_arFormulas[m_lParam1].Calculate(pManager);
|
||||
}
|
||||
else if (ptAdjust == m_eType1)
|
||||
{
|
||||
a1 = (m_lParam1 >= lAdjCount) ? 0 : (*(pManager->m_pAdjustments))[m_lParam1];
|
||||
}
|
||||
|
||||
LONG b1 = m_lParam2;
|
||||
if (ptFormula == m_eType2)
|
||||
{
|
||||
b1 = (m_lParam2 >= lGuidesCount) ? 0 : pManager->m_arFormulas[m_lParam2].Calculate(pManager);
|
||||
}
|
||||
else if (ptAdjust == m_eType2)
|
||||
{
|
||||
b1 = (m_lParam2 >= lAdjCount) ? 0 : (*(pManager->m_pAdjustments))[m_lParam2];
|
||||
}
|
||||
|
||||
LONG c1 = m_lParam3;
|
||||
if (ptFormula == m_eType3)
|
||||
{
|
||||
c1 = (m_lParam3 >= lGuidesCount) ? 0 : pManager->m_arFormulas[m_lParam3].Calculate(pManager);
|
||||
}
|
||||
else if (ptAdjust == m_eType3)
|
||||
{
|
||||
c1 = (m_lParam3 >= lAdjCount) ? 0 : (*(pManager->m_pAdjustments))[m_lParam3];
|
||||
}
|
||||
|
||||
double a = (double)a1;
|
||||
double b = (double)b1;
|
||||
double c = (double)c1;
|
||||
|
||||
double dRes = 0.0;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
switch (m_eFormulaType)
|
||||
{
|
||||
case ftSum: { dRes = a + b - c; break; }
|
||||
case ftProduct: {
|
||||
if (0 == c)
|
||||
c = 1;
|
||||
|
||||
dRes = a * b / c;
|
||||
break;
|
||||
}
|
||||
case ftMid: { dRes = (a + b) / 2.0; break; }
|
||||
case ftAbsolute: { dRes = abs(a); break; }
|
||||
|
||||
case ftMin: { dRes = min(a, b); break; }
|
||||
case ftMax: { dRes = max(a, b); break; }
|
||||
case ftIf: { dRes = (a > 0) ? b : c; break; }
|
||||
case ftSqrt: { dRes = sqrt(a); break; }
|
||||
case ftMod: { dRes = sqrt(a*a + b*b + c*c); break; }
|
||||
|
||||
case ftSin: {
|
||||
|
||||
|
||||
dRes = a * sin(M_PI * b / (pow2_16 * 180));
|
||||
break;
|
||||
}
|
||||
case ftCos: {
|
||||
|
||||
|
||||
dRes = a * cos(M_PI * b / (pow2_16 * 180));
|
||||
break;
|
||||
}
|
||||
case ftTan: {
|
||||
|
||||
dRes = a * tan(M_PI * b / (pow2_16 * 180));
|
||||
break;
|
||||
}
|
||||
case ftAtan2: {
|
||||
dRes = 180 * pow2_16 * atan2(b,a) / M_PI;
|
||||
break;
|
||||
}
|
||||
|
||||
case ftSinatan2: { dRes = a * sin(atan2(c,b)); break; }
|
||||
case ftCosatan2: { dRes = a * cos(atan2(c,b)); break; }
|
||||
|
||||
case ftSumangle: {
|
||||
|
||||
dRes = a + b * pow2_16 - c * pow2_16;
|
||||
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
case ftEllipse: {
|
||||
if (0 == b)
|
||||
b = 1;
|
||||
dRes = c * sqrt(1-(a*a/(b*b)));
|
||||
break;
|
||||
}
|
||||
case ftVal: { dRes = a; break; }
|
||||
default: break;
|
||||
};
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
dRes = 0;
|
||||
}
|
||||
|
||||
lResult = (LONG)dRes;
|
||||
pManager->m_arResults[m_lIndex] = lResult;
|
||||
return lResult;
|
||||
}
|
||||
316
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/PPTShape/Formula.h
Normal file
316
ActiveX/Common/OfficeDrawing/Shapes/BaseShape/PPTShape/Formula.h
Normal file
@@ -0,0 +1,316 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#ifndef _USE_MATH_DEFINES
|
||||
#define _USE_MATH_DEFINES
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
#include "./../Common.h"
|
||||
|
||||
#include "../../../../XmlUtils.h"
|
||||
|
||||
namespace NSGuidesVML
|
||||
{
|
||||
enum FormulaType
|
||||
{
|
||||
|
||||
ftSum = 0,
|
||||
ftProduct = 1,
|
||||
ftMid = 2,
|
||||
ftAbsolute = 3,
|
||||
ftMin = 4,
|
||||
ftMax = 5,
|
||||
ftIf = 6,
|
||||
ftMod = 7,
|
||||
ftAtan2 = 8,
|
||||
ftSin = 9,
|
||||
ftCos = 10,
|
||||
ftCosatan2 = 11,
|
||||
ftSinatan2 = 12,
|
||||
ftSqrt = 13,
|
||||
ftSumangle = 14,
|
||||
ftEllipse = 15,
|
||||
ftTan = 16,
|
||||
ftVal = 17
|
||||
};
|
||||
|
||||
enum ParamType
|
||||
{
|
||||
ptFormula = 0,
|
||||
ptAdjust = 1,
|
||||
ptValue = 2
|
||||
};
|
||||
|
||||
static LONG GetValue(CString strParam, ParamType& ptType, bool& bRes,
|
||||
long lShapeWidth = ShapeSizeVML, long lShapeHeight = ShapeSizeVML)
|
||||
{
|
||||
ptType = ptValue;
|
||||
bRes = true;
|
||||
if ('#' == strParam[0])
|
||||
{
|
||||
ptType = ptAdjust;
|
||||
return (LONG)XmlUtils::GetInteger(strParam.Mid(1));
|
||||
}
|
||||
else if ('@' == strParam[0])
|
||||
{
|
||||
ptType = ptFormula;
|
||||
return (LONG)XmlUtils::GetInteger(strParam.Mid(1));
|
||||
}
|
||||
else if (!NSStringUtils::IsNumber(strParam))
|
||||
{
|
||||
if (_T("width") == strParam)
|
||||
{
|
||||
return lShapeWidth;
|
||||
}
|
||||
else if (_T("height") == strParam)
|
||||
{
|
||||
return lShapeHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
bRes = false;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ptType = ptValue;
|
||||
return (LONG)XmlUtils::GetInteger(strParam);
|
||||
}
|
||||
}
|
||||
|
||||
static FormulaType GetFormula(CString strName, bool& bRes)
|
||||
{
|
||||
bRes = true;
|
||||
if (_T("sum") == strName) return ftSum;
|
||||
else if ((_T("prod") == strName) || (_T("product") == strName)) return ftProduct;
|
||||
else if (_T("mid") == strName) return ftMid;
|
||||
else if ((_T("absolute") == strName) || (_T("abs") == strName)) return ftAbsolute;
|
||||
else if (_T("min") == strName) return ftMin;
|
||||
else if (_T("max") == strName) return ftMax;
|
||||
else if (_T("if") == strName) return ftIf;
|
||||
else if (_T("sqrt") == strName) return ftSqrt;
|
||||
else if (_T("mod") == strName) return ftMod;
|
||||
else if (_T("sin") == strName) return ftSin;
|
||||
else if (_T("cos") == strName) return ftCos;
|
||||
else if (_T("tan") == strName) return ftTan;
|
||||
else if (_T("atan2") == strName) return ftAtan2;
|
||||
else if (_T("sinatan2") == strName) return ftSinatan2;
|
||||
else if (_T("cosatan2") == strName) return ftCosatan2;
|
||||
else if (_T("sumangle") == strName) return ftSumangle;
|
||||
else if (_T("ellipse") == strName) return ftEllipse;
|
||||
else if (_T("val") == strName) return ftVal;
|
||||
else bRes = false;
|
||||
|
||||
return ftVal;
|
||||
}
|
||||
}
|
||||
|
||||
namespace NSGuidesVML
|
||||
{
|
||||
class CFormulasManager;
|
||||
class CFormula
|
||||
{
|
||||
public:
|
||||
FormulaType m_eFormulaType;
|
||||
int m_lIndex;
|
||||
|
||||
LONG m_lParam1;
|
||||
ParamType m_eType1;
|
||||
|
||||
LONG m_lParam2;
|
||||
ParamType m_eType2;
|
||||
|
||||
LONG m_lParam3;
|
||||
ParamType m_eType3;
|
||||
|
||||
private:
|
||||
long m_lCountRecurs;
|
||||
|
||||
public:
|
||||
CFormula()
|
||||
{
|
||||
m_eFormulaType = ftSum;
|
||||
m_lIndex = 0;
|
||||
m_lParam1 = 0; m_eType1 = ptValue;
|
||||
m_lParam2 = 0; m_eType2 = ptValue;
|
||||
m_lParam3 = 0; m_eType3 = ptValue;
|
||||
|
||||
m_lCountRecurs = 0;
|
||||
}
|
||||
|
||||
CFormula(int nIndex)
|
||||
{
|
||||
m_eFormulaType = ftSum;
|
||||
m_lIndex = nIndex;
|
||||
m_lParam1 = 0; m_eType1 = ptValue;
|
||||
m_lParam2 = 0; m_eType2 = ptValue;
|
||||
m_lParam3 = 0; m_eType3 = ptValue;
|
||||
|
||||
m_lCountRecurs = 0;
|
||||
}
|
||||
|
||||
CFormula& operator =(const CFormula& oSrc)
|
||||
{
|
||||
m_eFormulaType = oSrc.m_eFormulaType;
|
||||
m_lIndex = oSrc.m_lIndex;
|
||||
|
||||
m_lParam1 = oSrc.m_lParam1;
|
||||
m_eType1 = oSrc.m_eType1;
|
||||
|
||||
m_lParam2 = oSrc.m_lParam2;
|
||||
m_eType2 = oSrc.m_eType2;
|
||||
|
||||
m_lParam3 = oSrc.m_lParam3;
|
||||
m_eType3 = oSrc.m_eType3;
|
||||
|
||||
m_lCountRecurs = 0;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
void FromString(CString strFormula, long lShapeWidth = ShapeSizeVML, long lShapeHeight = ShapeSizeVML)
|
||||
{
|
||||
CSimpleArray<CString> oArrayParams;
|
||||
NSStringUtils::ParseString(_T(" "), strFormula, &oArrayParams);
|
||||
int nCount = oArrayParams.GetSize();
|
||||
if (0 >= nCount)
|
||||
return;
|
||||
|
||||
bool bRes = true;
|
||||
m_eFormulaType = GetFormula(oArrayParams[0], bRes);
|
||||
|
||||
ParamType ptType = ptValue;
|
||||
if (1 < nCount)
|
||||
{
|
||||
m_lParam1 = GetValue(oArrayParams[1], ptType, bRes, lShapeWidth, lShapeHeight);
|
||||
m_eType1 = ptType;
|
||||
}
|
||||
if (2 < nCount)
|
||||
{
|
||||
m_lParam2 = GetValue(oArrayParams[2], ptType, bRes, lShapeWidth, lShapeHeight);
|
||||
m_eType2 = ptType;
|
||||
}
|
||||
if (3 < nCount)
|
||||
{
|
||||
m_lParam3 = GetValue(oArrayParams[3], ptType, bRes, lShapeWidth, lShapeHeight);
|
||||
m_eType3 = ptType;
|
||||
}
|
||||
}
|
||||
LONG Calculate(CFormulasManager* pManager);
|
||||
};
|
||||
|
||||
class CFormulasManager
|
||||
{
|
||||
public:
|
||||
CSimpleArray<LONG>* m_pAdjustments;
|
||||
CSimpleArray<LONG> m_arResults;
|
||||
|
||||
CSimpleArray<CFormula> m_arFormulas;
|
||||
|
||||
long m_lShapeWidth;
|
||||
long m_lShapeHeight;
|
||||
|
||||
public:
|
||||
CFormulasManager() : m_arFormulas(), m_arResults()
|
||||
{
|
||||
m_pAdjustments = NULL;
|
||||
m_lShapeWidth = ShapeSizeVML;
|
||||
m_lShapeHeight = ShapeSizeVML;
|
||||
}
|
||||
CFormulasManager& operator =(const CFormulasManager& oSrc)
|
||||
{
|
||||
m_pAdjustments = oSrc.m_pAdjustments;
|
||||
m_lShapeWidth = oSrc.m_lShapeWidth;
|
||||
m_lShapeHeight = oSrc.m_lShapeHeight;
|
||||
|
||||
m_arResults.RemoveAll();
|
||||
for (int nIndex = 0; nIndex < oSrc.m_arResults.GetSize(); ++nIndex)
|
||||
{
|
||||
m_arResults.Add(oSrc.m_arResults[nIndex]);
|
||||
}
|
||||
m_arFormulas.RemoveAll();
|
||||
for (int nIndex = 0; nIndex < oSrc.m_arFormulas.GetSize(); ++nIndex)
|
||||
{
|
||||
m_arFormulas.Add(oSrc.m_arFormulas[nIndex]);
|
||||
}
|
||||
|
||||
return (*this);
|
||||
}
|
||||
|
||||
void RemoveAll()
|
||||
{
|
||||
m_pAdjustments = NULL;
|
||||
m_lShapeWidth = ShapeSizeVML;
|
||||
m_lShapeHeight = ShapeSizeVML;
|
||||
|
||||
m_arFormulas.RemoveAll();
|
||||
m_arResults.RemoveAll();
|
||||
}
|
||||
|
||||
void Clear(CSimpleArray<LONG>* pAdjusts)
|
||||
{
|
||||
m_pAdjustments = pAdjusts;
|
||||
|
||||
|
||||
|
||||
for (int nIndex = 0; nIndex < m_arResults.GetSize(); ++nIndex)
|
||||
{
|
||||
m_arResults[nIndex] = 0xFFFFFFFF;
|
||||
}
|
||||
}
|
||||
void AddFormula(CString strFormula)
|
||||
{
|
||||
CFormula oFormula(m_arFormulas.GetSize());
|
||||
oFormula.FromString(strFormula, m_lShapeWidth, m_lShapeHeight);
|
||||
m_arFormulas.Add(oFormula);
|
||||
m_arResults.Add(0xFFFFFFFF);
|
||||
}
|
||||
void AddFormula(CFormula oFormula)
|
||||
{
|
||||
oFormula.m_lIndex = m_arFormulas.GetSize();
|
||||
m_arFormulas.Add(oFormula);
|
||||
m_arResults.Add(0xFFFFFFFF);
|
||||
}
|
||||
void CalculateResults()
|
||||
{
|
||||
for (int index = 0; index < m_arFormulas.GetSize(); ++index)
|
||||
{
|
||||
LONG lResult = m_arFormulas[index].Calculate(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CAccentBorderCallout2Type : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CAccentBorderCallout2Type()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("m@0@1l@2@3@4@5nfem@4,l@4,21600nfem,l21600,r,21600l,21600xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val #3"));
|
||||
AddGuide(_T("val #4"));
|
||||
AddGuide(_T("val #5"));
|
||||
|
||||
m_arAdjustments.Add(-10080);
|
||||
m_arAdjustments.Add(24300);
|
||||
m_arAdjustments.Add(-3600);
|
||||
m_arAdjustments.Add(4050);
|
||||
m_arAdjustments.Add(-1800);
|
||||
m_arAdjustments.Add(4050);
|
||||
|
||||
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,#1");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#2,#3");
|
||||
m_arHandles.Add(oHandle2);
|
||||
|
||||
CHandle_ oHandle3;
|
||||
oHandle3.position = _T("#4,#5");
|
||||
m_arHandles.Add(oHandle3);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CAccentCallout1Type : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CAccentCallout1Type()
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("m@0@1l@2@3nfem@2,l@2,21600nfem,l21600,r,21600l,21600nsxe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val #3"));
|
||||
|
||||
m_arAdjustments.Add(-8280);
|
||||
m_arAdjustments.Add(24300);
|
||||
m_arAdjustments.Add(-1800);
|
||||
m_arAdjustments.Add(4050);
|
||||
|
||||
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,#1");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#2,#3");
|
||||
m_arHandles.Add(oHandle2);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CAccentCallout2Type : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CAccentCallout2Type()
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("m@0@1l@2@3@4@5nfem@4,l@4,21600nfem,l21600,r,21600l,21600nsxe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val #3"));
|
||||
AddGuide(_T("val #4"));
|
||||
AddGuide(_T("val #5"));
|
||||
|
||||
m_arAdjustments.Add(-10080);
|
||||
m_arAdjustments.Add(24300);
|
||||
m_arAdjustments.Add(-3600);
|
||||
m_arAdjustments.Add(4050);
|
||||
m_arAdjustments.Add(-1800);
|
||||
m_arAdjustments.Add(4050);
|
||||
|
||||
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,#1");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#2,#3");
|
||||
m_arHandles.Add(oHandle2);
|
||||
|
||||
CHandle_ oHandle3;
|
||||
oHandle3.position = _T("#4,#5");
|
||||
m_arHandles.Add(oHandle3);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CAccentCallout3Type : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CAccentCallout3Type()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("m@0@1l@2@3@4@5@6@7nfem@6,l@6,21600nfem,l21600,r,21600l,21600nsxe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val #3"));
|
||||
AddGuide(_T("val #4"));
|
||||
AddGuide(_T("val #5"));
|
||||
AddGuide(_T("val #6"));
|
||||
AddGuide(_T("val #7"));
|
||||
|
||||
m_arAdjustments.Add(23400);
|
||||
m_arAdjustments.Add(24400);
|
||||
m_arAdjustments.Add(25200);
|
||||
m_arAdjustments.Add(21600);
|
||||
m_arAdjustments.Add(25200);
|
||||
m_arAdjustments.Add(4050);
|
||||
m_arAdjustments.Add(23400);
|
||||
m_arAdjustments.Add(4050);
|
||||
|
||||
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,#1");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#2,#3");
|
||||
m_arHandles.Add(oHandle2);
|
||||
|
||||
CHandle_ oHandle3;
|
||||
oHandle3.position = _T("#4,#5");
|
||||
m_arHandles.Add(oHandle3);
|
||||
|
||||
CHandle_ oHandle4;
|
||||
oHandle4.position = _T("#6,#7");
|
||||
m_arHandles.Add(oHandle4);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CAccentCallout90Type : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CAccentCallout90Type()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("m@0@1l@2@3nfem,l21600,r,21600l,21600nsxe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val #3"));
|
||||
|
||||
m_arAdjustments.Add(-1800);
|
||||
m_arAdjustments.Add(24300);
|
||||
m_arAdjustments.Add(-1800);
|
||||
m_arAdjustments.Add(4050);
|
||||
|
||||
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,#1");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#2,#3");
|
||||
m_arHandles.Add(oHandle2);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CActionButtonBackType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CActionButtonBackType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@12@9nfl@11@4@12@10xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("prod #0 3 2"));
|
||||
AddGuide(_T("sum @1 @5 0"));
|
||||
AddGuide(_T("sum @2 @5 0"));
|
||||
AddGuide(_T("sum @0 @4 8100"));
|
||||
AddGuide(_T("sum @2 8100 @4"));
|
||||
AddGuide(_T("sum @0 @3 8100"));
|
||||
AddGuide(_T("sum @1 8100 @3"));
|
||||
AddGuide(_T("sum @4 @5 0"));
|
||||
AddGuide(_T("sum @9 @5 0"));
|
||||
AddGuide(_T("sum @10 @5 0"));
|
||||
AddGuide(_T("sum @11 @5 0"));
|
||||
AddGuide(_T("sum @12 @5 0"));
|
||||
|
||||
m_arAdjustments.Add(1350);
|
||||
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
|
||||
LoadTextRect(_T("@0,@0,@1,@2"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.xrange = _T("0,5400");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CActionButtonBeginType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CActionButtonBeginType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@12@9l@17@4@12@10xem@11@9l@16@9@16@10@11@10xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("prod #0 3 2"));
|
||||
AddGuide(_T("sum @1 @5 0"));
|
||||
AddGuide(_T("sum @2 @5 0"));
|
||||
AddGuide(_T("sum @0 @4 8100"));
|
||||
AddGuide(_T("sum @2 8100 @4"));
|
||||
AddGuide(_T("sum @0 @3 8100"));
|
||||
AddGuide(_T("sum @1 8100 @3"));
|
||||
AddGuide(_T("sum @10 0 @9"));
|
||||
AddGuide(_T("prod @13 1 8"));
|
||||
AddGuide(_T("prod @13 1 4"));
|
||||
AddGuide(_T("sum @11 @14 0"));
|
||||
AddGuide(_T("sum @11 @15 0"));
|
||||
AddGuide(_T("sum @4 @5 0"));
|
||||
AddGuide(_T("sum @9 @5 0"));
|
||||
AddGuide(_T("sum @10 @5 0"));
|
||||
AddGuide(_T("sum @11 @5 0"));
|
||||
AddGuide(_T("sum @12 @5 0"));
|
||||
AddGuide(_T("sum @16 @5 0"));
|
||||
AddGuide(_T("sum @17 @5 0"));
|
||||
|
||||
m_arAdjustments.Add(1350);
|
||||
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
|
||||
LoadTextRect(_T("@0,@0,@1,@2"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.xrange = _T("0,5400");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CActionButtonBlankType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CActionButtonBlankType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0e");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("prod #0 3 2"));
|
||||
AddGuide(_T("sum @1 @5 0"));
|
||||
AddGuide(_T("sum @2 @5 0"));
|
||||
|
||||
m_arAdjustments.Add(1350);
|
||||
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
|
||||
LoadTextRect(_T("@0,@0,@1,@2"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.xrange = _T("0,5400");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CActionButtonDocType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CActionButtonDocType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@12@9nfl@12@10@13@10@13@14@15@9xem@15@9nfl@15@14@13@14e");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("prod #0 3 2"));
|
||||
AddGuide(_T("sum @1 @5 0"));
|
||||
AddGuide(_T("sum @2 @5 0"));
|
||||
AddGuide(_T("sum @0 @4 8100"));
|
||||
AddGuide(_T("sum @2 8100 @4"));
|
||||
AddGuide(_T("prod #0 3 4"));
|
||||
AddGuide(_T("sum @3 @11 6075"));
|
||||
AddGuide(_T("sum @3 6075 @11"));
|
||||
AddGuide(_T("sum @4 @5 4050"));
|
||||
AddGuide(_T("sum @13 @5 4050"));
|
||||
AddGuide(_T("sum @9 @5 0"));
|
||||
AddGuide(_T("sum @10 @5 0"));
|
||||
AddGuide(_T("sum @12 @5 0"));
|
||||
AddGuide(_T("sum @13 @5 0"));
|
||||
AddGuide(_T("sum @14 @5 0"));
|
||||
AddGuide(_T("sum @15 @5 0"));
|
||||
|
||||
m_arAdjustments.Add(1350);
|
||||
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
|
||||
LoadTextRect(_T("@0,@0,@1,@2"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.xrange = _T("0,5400");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CActionButtonEndType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CActionButtonEndType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@11@9l@16@4@11@10xem@17@9l@12@9@12@10@17@10xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("prod #0 3 2"));
|
||||
AddGuide(_T("sum @1 @5 0"));
|
||||
AddGuide(_T("sum @2 @5 0"));
|
||||
AddGuide(_T("sum @0 @4 8100"));
|
||||
AddGuide(_T("sum @2 8100 @4"));
|
||||
AddGuide(_T("sum @0 @3 8100"));
|
||||
AddGuide(_T("sum @1 8100 @3"));
|
||||
AddGuide(_T("sum @10 0 @9"));
|
||||
AddGuide(_T("prod @13 3 4"));
|
||||
AddGuide(_T("prod @13 7 8"));
|
||||
AddGuide(_T("sum @11 @14 0"));
|
||||
AddGuide(_T("sum @11 @15 0"));
|
||||
AddGuide(_T("sum @4 @5 0"));
|
||||
AddGuide(_T("sum @9 @5 0"));
|
||||
AddGuide(_T("sum @10 @5 0"));
|
||||
AddGuide(_T("sum @11 @5 0"));
|
||||
AddGuide(_T("sum @12 @5 0"));
|
||||
AddGuide(_T("sum @16 @5 0"));
|
||||
AddGuide(_T("sum @17 @5 0"));
|
||||
|
||||
m_arAdjustments.Add(1350);
|
||||
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
|
||||
LoadTextRect(_T("@0,@0,@1,@2"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.xrange = _T("0,5400");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CActionButtonHelpType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CActionButtonHelpType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@33@27nfqy@3@9@40@27@39@4@37@29l@37@30@36@30@36@29qy@37@28@39@27@3@26@34@27xem@3@31nfqx@35@32@3@10@38@32@3@31xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("prod #0 3 2"));
|
||||
AddGuide(_T("sum @1 @5 0"));
|
||||
AddGuide(_T("sum @2 @5 0"));
|
||||
AddGuide(_T("sum @0 @4 8100"));
|
||||
AddGuide(_T("sum @2 8100 @4"));
|
||||
AddGuide(_T("sum @0 @3 8100"));
|
||||
AddGuide(_T("sum @1 8100 @3"));
|
||||
AddGuide(_T("sum @10 0 @9"));
|
||||
AddGuide(_T("prod @13 1 7"));
|
||||
AddGuide(_T("prod @13 3 14"));
|
||||
AddGuide(_T("prod @13 2 7"));
|
||||
AddGuide(_T("prod @13 5 14"));
|
||||
AddGuide(_T("prod @13 11 28"));
|
||||
AddGuide(_T("prod @13 3 7"));
|
||||
AddGuide(_T("prod @13 4 7"));
|
||||
AddGuide(_T("prod @13 17 28"));
|
||||
AddGuide(_T("prod @13 9 14"));
|
||||
AddGuide(_T("prod @13 21 28"));
|
||||
AddGuide(_T("prod @13 11 14"));
|
||||
AddGuide(_T("prod @13 25 28"));
|
||||
AddGuide(_T("sum @9 @14 0"));
|
||||
AddGuide(_T("sum @9 @16 0"));
|
||||
AddGuide(_T("sum @9 @18 0"));
|
||||
AddGuide(_T("sum @9 @21 0"));
|
||||
AddGuide(_T("sum @9 @23 0"));
|
||||
AddGuide(_T("sum @9 @24 0"));
|
||||
AddGuide(_T("sum @9 @25 0"));
|
||||
AddGuide(_T("sum @11 @15 0"));
|
||||
AddGuide(_T("sum @11 @17 0"));
|
||||
AddGuide(_T("sum @11 @18 0"));
|
||||
AddGuide(_T("sum @11 @19 0"));
|
||||
AddGuide(_T("sum @11 @20 0"));
|
||||
AddGuide(_T("sum @11 @21 0"));
|
||||
AddGuide(_T("sum @11 @22 0"));
|
||||
AddGuide(_T("sum @11 @24 0"));
|
||||
AddGuide(_T("sum @3 @5 0"));
|
||||
AddGuide(_T("sum @4 @5 0"));
|
||||
AddGuide(_T("sum @9 @5 0"));
|
||||
AddGuide(_T("sum @10 @5 0"));
|
||||
AddGuide(_T("sum @11 @5 0"));
|
||||
AddGuide(_T("sum @12 @5 0"));
|
||||
AddGuide(_T("sum @26 @5 0"));
|
||||
AddGuide(_T("sum @27 @5 0"));
|
||||
AddGuide(_T("sum @28 @5 0"));
|
||||
AddGuide(_T("sum @29 @5 0"));
|
||||
AddGuide(_T("sum @30 @5 0"));
|
||||
AddGuide(_T("sum @31 @5 0"));
|
||||
AddGuide(_T("sum @32 @5 0"));
|
||||
AddGuide(_T("sum @33 @5 0"));
|
||||
AddGuide(_T("sum @34 @5 0"));
|
||||
AddGuide(_T("sum @35 @5 0"));
|
||||
AddGuide(_T("sum @36 @5 0"));
|
||||
AddGuide(_T("sum @37 @5 0"));
|
||||
AddGuide(_T("sum @38 @5 0"));
|
||||
AddGuide(_T("sum @39 @5 0"));
|
||||
AddGuide(_T("sum @40 @5 0"));
|
||||
|
||||
m_arAdjustments.Add(1350);
|
||||
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
|
||||
LoadTextRect(_T("@0,@0,@1,@2"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.xrange = _T("0,5400");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CActionButtonHomeType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CActionButtonHomeType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@3@9nfl@11@4@28@4@28@10@33@10@33@4@12@4@32@26@32@24@31@24@31@25xem@31@25nfl@32@26em@28@4nfl@33@4em@29@10nfl@29@27@30@27@30@10e");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("prod #0 3 2"));
|
||||
AddGuide(_T("sum @1 @5 0"));
|
||||
AddGuide(_T("sum @2 @5 0"));
|
||||
AddGuide(_T("sum @0 @4 8100"));
|
||||
AddGuide(_T("sum @2 8100 @4"));
|
||||
AddGuide(_T("sum @0 @3 8100"));
|
||||
AddGuide(_T("sum @1 8100 @3"));
|
||||
AddGuide(_T("sum @10 0 @9"));
|
||||
AddGuide(_T("prod @13 1 16"));
|
||||
AddGuide(_T("prod @13 1 8"));
|
||||
AddGuide(_T("prod @13 3 16"));
|
||||
AddGuide(_T("prod @13 5 16"));
|
||||
AddGuide(_T("prod @13 7 16"));
|
||||
AddGuide(_T("prod @13 9 16"));
|
||||
AddGuide(_T("prod @13 11 16"));
|
||||
AddGuide(_T("prod @13 3 4"));
|
||||
AddGuide(_T("prod @13 13 16"));
|
||||
AddGuide(_T("prod @13 7 8"));
|
||||
AddGuide(_T("sum @9 @14 0"));
|
||||
AddGuide(_T("sum @9 @16 0"));
|
||||
AddGuide(_T("sum @9 @17 0"));
|
||||
AddGuide(_T("sum @9 @21 0"));
|
||||
AddGuide(_T("sum @11 @15 0"));
|
||||
AddGuide(_T("sum @11 @18 0"));
|
||||
AddGuide(_T("sum @11 @19 0"));
|
||||
AddGuide(_T("sum @11 @20 0"));
|
||||
AddGuide(_T("sum @11 @22 0"));
|
||||
AddGuide(_T("sum @11 @23 0"));
|
||||
AddGuide(_T("sum @3 @5 0"));
|
||||
AddGuide(_T("sum @4 @5 0"));
|
||||
AddGuide(_T("sum @9 @5 0"));
|
||||
AddGuide(_T("sum @10 @5 0"));
|
||||
AddGuide(_T("sum @11 @5 0"));
|
||||
AddGuide(_T("sum @12 @5 0"));
|
||||
AddGuide(_T("sum @24 @5 0"));
|
||||
AddGuide(_T("sum @25 @5 0"));
|
||||
AddGuide(_T("sum @26 @5 0"));
|
||||
AddGuide(_T("sum @27 @5 0"));
|
||||
AddGuide(_T("sum @28 @5 0"));
|
||||
AddGuide(_T("sum @29 @5 0"));
|
||||
AddGuide(_T("sum @30 @5 0"));
|
||||
AddGuide(_T("sum @31 @5 0"));
|
||||
AddGuide(_T("sum @32 @5 0"));
|
||||
AddGuide(_T("sum @33 @5 0"));
|
||||
|
||||
m_arAdjustments.Add(1350);
|
||||
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
|
||||
LoadTextRect(_T("@0,@0,@1,@2"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.xrange = _T("0,5400");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CActionButtonInfoType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CActionButtonInfoType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@3@9nfqx@11@4@3@10@12@4@3@9xem@3@25nfqx@33@26@3@27@36@26@3@25xem@32@28nfl@32@29@34@29@34@30@32@30@32@31@37@31@37@30@35@30@35@28xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("prod #0 3 2"));
|
||||
AddGuide(_T("sum @1 @5 0"));
|
||||
AddGuide(_T("sum @2 @5 0"));
|
||||
AddGuide(_T("sum @0 @4 8100"));
|
||||
AddGuide(_T("sum @2 8100 @4"));
|
||||
AddGuide(_T("sum @0 @3 8100"));
|
||||
AddGuide(_T("sum @1 8100 @3"));
|
||||
AddGuide(_T("sum @10 0 @9"));
|
||||
AddGuide(_T("prod @13 1 32"));
|
||||
AddGuide(_T("prod @13 5 32"));
|
||||
AddGuide(_T("prod @13 9 32"));
|
||||
AddGuide(_T("prod @13 5 16"));
|
||||
AddGuide(_T("prod @13 3 8"));
|
||||
AddGuide(_T("prod @13 13 32"));
|
||||
AddGuide(_T("prod @13 19 32"));
|
||||
AddGuide(_T("prod @13 5 8"));
|
||||
AddGuide(_T("prod @13 11 16"));
|
||||
AddGuide(_T("prod @13 13 16"));
|
||||
AddGuide(_T("prod @13 7 8"));
|
||||
AddGuide(_T("sum @9 @14 0"));
|
||||
AddGuide(_T("sum @9 @15 0"));
|
||||
AddGuide(_T("sum @9 @16 0"));
|
||||
AddGuide(_T("sum @9 @17 0"));
|
||||
AddGuide(_T("sum @9 @18 0"));
|
||||
AddGuide(_T("sum @9 @23 0"));
|
||||
AddGuide(_T("sum @9 @24 0"));
|
||||
AddGuide(_T("sum @11 @17 0"));
|
||||
AddGuide(_T("sum @11 @18 0"));
|
||||
AddGuide(_T("sum @11 @19 0"));
|
||||
AddGuide(_T("sum @11 @20 0"));
|
||||
AddGuide(_T("sum @11 @21 0"));
|
||||
AddGuide(_T("sum @11 @22 0"));
|
||||
AddGuide(_T("sum @3 @5 0"));
|
||||
AddGuide(_T("sum @4 @5 0"));
|
||||
AddGuide(_T("sum @9 @5 0"));
|
||||
AddGuide(_T("sum @10 @5 0"));
|
||||
AddGuide(_T("sum @11 @5 0"));
|
||||
AddGuide(_T("sum @12 @5 0"));
|
||||
AddGuide(_T("sum @25 @5 0"));
|
||||
AddGuide(_T("sum @26 @5 0"));
|
||||
AddGuide(_T("sum @27 @5 0"));
|
||||
AddGuide(_T("sum @28 @5 0"));
|
||||
AddGuide(_T("sum @29 @5 0"));
|
||||
AddGuide(_T("sum @30 @5 0"));
|
||||
AddGuide(_T("sum @31 @5 0"));
|
||||
AddGuide(_T("sum @32 @5 0"));
|
||||
AddGuide(_T("sum @33 @5 0"));
|
||||
AddGuide(_T("sum @34 @5 0"));
|
||||
AddGuide(_T("sum @35 @5 0"));
|
||||
AddGuide(_T("sum @36 @5 0"));
|
||||
AddGuide(_T("sum @37 @5 0"));
|
||||
|
||||
m_arAdjustments.Add(1350);
|
||||
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
|
||||
LoadTextRect(_T("@0,@0,@1,@2"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.xrange = _T("0,5400");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CActionButtonMovieType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CActionButtonMovieType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@11@39nfl@11@44@31@44@32@43@33@43@33@47@35@47@35@45@36@45@38@46@12@46@12@41@38@41@37@42@35@42@35@41@34@40@32@40@31@39xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("prod #0 3 2"));
|
||||
AddGuide(_T("sum @1 @5 0"));
|
||||
AddGuide(_T("sum @2 @5 0"));
|
||||
AddGuide(_T("sum @0 @4 8100"));
|
||||
AddGuide(_T("sum @2 8100 @4"));
|
||||
AddGuide(_T("sum @0 @3 8100"));
|
||||
AddGuide(_T("sum @1 8100 @3"));
|
||||
AddGuide(_T("sum @10 0 @9"));
|
||||
AddGuide(_T("prod @13 1455 21600"));
|
||||
AddGuide(_T("prod @13 1905 21600"));
|
||||
AddGuide(_T("prod @13 2325 21600"));
|
||||
AddGuide(_T("prod @13 16155 21600"));
|
||||
AddGuide(_T("prod @13 17010 21600"));
|
||||
AddGuide(_T("prod @13 19335 21600"));
|
||||
AddGuide(_T("prod @13 19725 21600"));
|
||||
AddGuide(_T("prod @13 20595 21600"));
|
||||
AddGuide(_T("prod @13 5280 21600"));
|
||||
AddGuide(_T("prod @13 5730 21600"));
|
||||
AddGuide(_T("prod @13 6630 21600"));
|
||||
AddGuide(_T("prod @13 7492 21600"));
|
||||
AddGuide(_T("prod @13 9067 21600"));
|
||||
AddGuide(_T("prod @13 9555 21600"));
|
||||
AddGuide(_T("prod @13 13342 21600"));
|
||||
AddGuide(_T("prod @13 14580 21600"));
|
||||
AddGuide(_T("prod @13 15592 21600"));
|
||||
AddGuide(_T("sum @11 @14 0"));
|
||||
AddGuide(_T("sum @11 @15 0"));
|
||||
AddGuide(_T("sum @11 @16 0"));
|
||||
AddGuide(_T("sum @11 @17 0"));
|
||||
AddGuide(_T("sum @11 @18 0"));
|
||||
AddGuide(_T("sum @11 @19 0"));
|
||||
AddGuide(_T("sum @11 @20 0"));
|
||||
AddGuide(_T("sum @11 @21 0"));
|
||||
AddGuide(_T("sum @9 @22 0"));
|
||||
AddGuide(_T("sum @9 @23 0"));
|
||||
AddGuide(_T("sum @9 @24 0"));
|
||||
AddGuide(_T("sum @9 @25 0"));
|
||||
AddGuide(_T("sum @9 @26 0"));
|
||||
AddGuide(_T("sum @9 @27 0"));
|
||||
AddGuide(_T("sum @9 @28 0"));
|
||||
AddGuide(_T("sum @9 @29 0"));
|
||||
AddGuide(_T("sum @9 @30 0"));
|
||||
AddGuide(_T("sum @9 @31 0"));
|
||||
AddGuide(_T("sum @4 @5 0"));
|
||||
AddGuide(_T("sum @9 @5 0"));
|
||||
AddGuide(_T("sum @10 @5 0"));
|
||||
AddGuide(_T("sum @11 @5 0"));
|
||||
AddGuide(_T("sum @12 @5 0"));
|
||||
AddGuide(_T("sum @31 @5 0"));
|
||||
AddGuide(_T("sum @32 @5 0"));
|
||||
AddGuide(_T("sum @33 @5 0"));
|
||||
AddGuide(_T("sum @34 @5 0"));
|
||||
AddGuide(_T("sum @35 @5 0"));
|
||||
AddGuide(_T("sum @36 @5 0"));
|
||||
AddGuide(_T("sum @37 @5 0"));
|
||||
AddGuide(_T("sum @38 @5 0"));
|
||||
AddGuide(_T("sum @39 @5 0"));
|
||||
AddGuide(_T("sum @40 @5 0"));
|
||||
AddGuide(_T("sum @41 @5 0"));
|
||||
AddGuide(_T("sum @42 @5 0"));
|
||||
AddGuide(_T("sum @43 @5 0"));
|
||||
AddGuide(_T("sum @44 @5 0"));
|
||||
AddGuide(_T("sum @45 @5 0"));
|
||||
AddGuide(_T("sum @46 @5 0"));
|
||||
AddGuide(_T("sum @47 @5 0"));
|
||||
|
||||
m_arAdjustments.Add(1350);
|
||||
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
|
||||
LoadTextRect(_T("@0,@0,@1,@2"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.xrange = _T("0,5400");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CActionButtonNextType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CActionButtonNextType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@11@9nfl@12@4@11@10xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("prod #0 3 2"));
|
||||
AddGuide(_T("sum @1 @5 0"));
|
||||
AddGuide(_T("sum @2 @5 0"));
|
||||
AddGuide(_T("sum @0 @4 8100"));
|
||||
AddGuide(_T("sum @2 8100 @4"));
|
||||
AddGuide(_T("sum @0 @3 8100"));
|
||||
AddGuide(_T("sum @1 8100 @3"));
|
||||
AddGuide(_T("sum @4 @5 0"));
|
||||
AddGuide(_T("sum @9 @5 0"));
|
||||
AddGuide(_T("sum @10 @5 0"));
|
||||
AddGuide(_T("sum @11 @5 0"));
|
||||
AddGuide(_T("sum @12 @5 0"));
|
||||
|
||||
m_arAdjustments.Add(1350);
|
||||
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
|
||||
LoadTextRect(_T("@0,@0,@1,@2"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.xrange = _T("0,5400");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CActionButtonReturnType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CActionButtonReturnType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@12@21nfl@23@9@3@21@24@21@24@20qy@3@19l@25@19qx@26@20l@26@21@11@21@11@20qy@25@10l@3@10qx@22@20l@22@21xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("prod #0 3 2"));
|
||||
AddGuide(_T("sum @1 @5 0"));
|
||||
AddGuide(_T("sum @2 @5 0"));
|
||||
AddGuide(_T("sum @0 @4 8100"));
|
||||
AddGuide(_T("sum @2 8100 @4"));
|
||||
AddGuide(_T("sum @0 @3 8100"));
|
||||
AddGuide(_T("sum @1 8100 @3"));
|
||||
AddGuide(_T("sum @10 0 @9"));
|
||||
AddGuide(_T("prod @13 7 8"));
|
||||
AddGuide(_T("prod @13 3 4"));
|
||||
AddGuide(_T("prod @13 5 8"));
|
||||
AddGuide(_T("prod @13 3 8"));
|
||||
AddGuide(_T("prod @13 1 4"));
|
||||
AddGuide(_T("sum @9 @15 0"));
|
||||
AddGuide(_T("sum @9 @16 0"));
|
||||
AddGuide(_T("sum @9 @18 0"));
|
||||
AddGuide(_T("sum @11 @14 0"));
|
||||
AddGuide(_T("sum @11 @15 0"));
|
||||
AddGuide(_T("sum @11 @16 0"));
|
||||
AddGuide(_T("sum @11 @17 0"));
|
||||
AddGuide(_T("sum @11 @18 0"));
|
||||
AddGuide(_T("sum @3 @5 0"));
|
||||
AddGuide(_T("sum @9 @5 0"));
|
||||
AddGuide(_T("sum @10 @5 0"));
|
||||
AddGuide(_T("sum @11 @5 0"));
|
||||
AddGuide(_T("sum @12 @5 0"));
|
||||
AddGuide(_T("sum @19 @5 0"));
|
||||
AddGuide(_T("sum @20 @5 0"));
|
||||
AddGuide(_T("sum @21 @5 0"));
|
||||
AddGuide(_T("sum @22 @5 0"));
|
||||
AddGuide(_T("sum @23 @5 0"));
|
||||
AddGuide(_T("sum @24 @5 0"));
|
||||
AddGuide(_T("sum @25 @5 0"));
|
||||
AddGuide(_T("sum @26 @5 0"));
|
||||
|
||||
m_arAdjustments.Add(1350);
|
||||
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
|
||||
LoadTextRect(_T("@0,@0,@1,@2"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.xrange = _T("0,5400");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CActionButtonSoundType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CActionButtonSoundType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@11@21nfl@11@22@24@22@25@10@25@9@24@21xem@26@21nfl@12@20em@26@4nfl@12@4em@26@22nfl@12@23e");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("prod #0 3 2"));
|
||||
AddGuide(_T("sum @1 @5 0"));
|
||||
AddGuide(_T("sum @2 @5 0"));
|
||||
AddGuide(_T("sum @0 @4 8100"));
|
||||
AddGuide(_T("sum @2 8100 @4"));
|
||||
AddGuide(_T("sum @0 @3 8100"));
|
||||
AddGuide(_T("sum @1 8100 @3"));
|
||||
AddGuide(_T("sum @10 0 @9"));
|
||||
AddGuide(_T("prod @13 1 8"));
|
||||
AddGuide(_T("prod @13 5 16"));
|
||||
AddGuide(_T("prod @13 5 8"));
|
||||
AddGuide(_T("prod @13 11 16"));
|
||||
AddGuide(_T("prod @13 3 4"));
|
||||
AddGuide(_T("prod @13 7 8"));
|
||||
AddGuide(_T("sum @9 @14 0"));
|
||||
AddGuide(_T("sum @9 @15 0"));
|
||||
AddGuide(_T("sum @9 @17 0"));
|
||||
AddGuide(_T("sum @9 @19 0"));
|
||||
AddGuide(_T("sum @11 @15 0"));
|
||||
AddGuide(_T("sum @11 @16 0"));
|
||||
AddGuide(_T("sum @11 @18 0"));
|
||||
AddGuide(_T("sum @4 @5 0"));
|
||||
AddGuide(_T("sum @9 @5 0"));
|
||||
AddGuide(_T("sum @10 @5 0"));
|
||||
AddGuide(_T("sum @11 @5 0"));
|
||||
AddGuide(_T("sum @12 @5 0"));
|
||||
AddGuide(_T("sum @20 @5 0"));
|
||||
AddGuide(_T("sum @21 @5 0"));
|
||||
AddGuide(_T("sum @22 @5 0"));
|
||||
AddGuide(_T("sum @23 @5 0"));
|
||||
AddGuide(_T("sum @24 @5 0"));
|
||||
AddGuide(_T("sum @25 @5 0"));
|
||||
AddGuide(_T("sum @26 @5 0"));
|
||||
|
||||
m_arAdjustments.Add(1350);
|
||||
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
|
||||
LoadTextRect(_T("@0,@0,@1,@2"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.xrange = _T("0,5400");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CBentArrowType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CBentArrowType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m21600,6079l@0,0@0@1,12427@1qx,12158l,21600@4,21600@4,12158qy12427@2l@0@2@0,12158xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("sum 12158 0 #1"));
|
||||
AddGuide(_T("sum @2 0 #1"));
|
||||
AddGuide(_T("prod @3 32768 32059"));
|
||||
AddGuide(_T("prod @4 1 2"));
|
||||
AddGuide(_T("sum 21600 0 #0"));
|
||||
AddGuide(_T("prod @6 #1 6079"));
|
||||
AddGuide(_T("sum @7 #0 0"));
|
||||
|
||||
m_arAdjustments.Add(18000);
|
||||
m_arAdjustments.Add(3000);
|
||||
|
||||
LoadConnectorsList(_T("@0,0;@0,12158;@5,21600;21600,6079"));
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
LoadTextRect(_T("12427,@1,@8,@2;0,12158,@4,21600"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,#1");
|
||||
oHandle1.xrange = _T("12427,21600");
|
||||
oHandle1.yrange = _T("0,6079");
|
||||
m_arHandles.Add(oHandle1);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CBentConnectorType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CBentConnectorType()
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinRound;
|
||||
|
||||
m_strPathLimoX = _T("m0,0l@0,0r0,21600l21600,21600nfe");
|
||||
m_strPathLimoY = _T("m0,0l,@0r21600,0l21600,21600nfe");
|
||||
|
||||
m_strPath = m_strPathLimoX;
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
m_arAdjustments.Add(10800);
|
||||
|
||||
LoadConnectorsList(_T("0,0;21600,21600"));
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CBentUpArrowType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CBentUpArrowType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m@4,l@0@2@5@2@5@12,0@12,,21600@1,21600@1@2,21600@2xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("sum @3 10800 0"));
|
||||
AddGuide(_T("sum 21600 #0 #1"));
|
||||
AddGuide(_T("sum #1 #2 0"));
|
||||
AddGuide(_T("prod @6 1 2"));
|
||||
AddGuide(_T("prod #1 2 1"));
|
||||
AddGuide(_T("sum @8 0 21600"));
|
||||
AddGuide(_T("prod 21600 @0 @1"));
|
||||
AddGuide(_T("prod 21600 @4 @1"));
|
||||
AddGuide(_T("prod 21600 @5 @1"));
|
||||
AddGuide(_T("prod 21600 @7 @1"));
|
||||
AddGuide(_T("prod #1 1 2"));
|
||||
AddGuide(_T("sum @5 0 @4"));
|
||||
AddGuide(_T("sum @0 0 @4"));
|
||||
AddGuide(_T("prod @2 @15 @16"));
|
||||
|
||||
m_arAdjustments.Add(9257);
|
||||
m_arAdjustments.Add(18514);
|
||||
m_arAdjustments.Add(7200);
|
||||
|
||||
LoadConnectorsList(_T("@4,0;@0,@2;0,@11;@14,21600;@1,@13;21600,@2"));
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(180);
|
||||
m_arConnectorAngles.Add(180);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
LoadTextRect(_T("0,@12,@1,21600;@5,@17,@1,21600"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.xrange = _T("@2,@9");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#1,#2");
|
||||
oHandle2.xrange = _T("@4,21600");
|
||||
oHandle2.yrange = _T("0,@0");
|
||||
m_arHandles.Add(oHandle2);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CBevelType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CBevelType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0e");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("prod #0 3 2"));
|
||||
AddGuide(_T("sum @1 @5 0"));
|
||||
AddGuide(_T("sum @2 @5 0"));
|
||||
|
||||
m_arAdjustments.Add(2700);
|
||||
|
||||
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
LoadTextRect(_T("@0,@0,@1,@2"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.xrange = _T("0,10800");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CBlockArcType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CBlockArcType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("al10800,10800@0@0@2@14,10800,10800,10800,10800@3@15xe");
|
||||
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum 0 0 #0"));
|
||||
AddGuide(_T("sumangle #0 0 180"));
|
||||
AddGuide(_T("sumangle #0 0 90"));
|
||||
AddGuide(_T("prod @4 2 1"));
|
||||
AddGuide(_T("sumangle #0 90 0"));
|
||||
AddGuide(_T("prod @6 2 1"));
|
||||
AddGuide(_T("abs #0"));
|
||||
AddGuide(_T("sumangle @8 0 90"));
|
||||
AddGuide(_T("if @9 @7 @5"));
|
||||
AddGuide(_T("sumangle @10 0 360"));
|
||||
AddGuide(_T("if @10 @11 @10"));
|
||||
AddGuide(_T("sumangle @12 0 360"));
|
||||
AddGuide(_T("if @12 @13 @12"));
|
||||
AddGuide(_T("sum 0 0 @14"));
|
||||
AddGuide(_T("val 10800"));
|
||||
AddGuide(_T("sum 10800 0 #1"));
|
||||
AddGuide(_T("prod #1 1 2"));
|
||||
AddGuide(_T("sum @18 5400 0"));
|
||||
AddGuide(_T("cos @19 #0"));
|
||||
AddGuide(_T("sin @19 #0"));
|
||||
AddGuide(_T("sum @20 10800 0"));
|
||||
AddGuide(_T("sum @21 10800 0"));
|
||||
AddGuide(_T("sum 10800 0 @20"));
|
||||
AddGuide(_T("sum #1 10800 0"));
|
||||
AddGuide(_T("if @9 @17 @25"));
|
||||
AddGuide(_T("if @9 0 21600"));
|
||||
AddGuide(_T("cos 10800 #0"));
|
||||
AddGuide(_T("sin 10800 #0"));
|
||||
AddGuide(_T("sin #1 #0"));
|
||||
AddGuide(_T("sum @28 10800 0"));
|
||||
AddGuide(_T("sum @29 10800 0"));
|
||||
AddGuide(_T("sum @30 10800 0"));
|
||||
AddGuide(_T("if @4 0 @31"));
|
||||
AddGuide(_T("if #0 @34 0"));
|
||||
AddGuide(_T("if @6 @35 @31"));
|
||||
AddGuide(_T("sum 21600 0 @36"));
|
||||
AddGuide(_T("if @4 0 @33"));
|
||||
AddGuide(_T("if #0 @38 @32"));
|
||||
AddGuide(_T("if @6 @39 0"));
|
||||
AddGuide(_T("if @4 @32 21600"));
|
||||
AddGuide(_T("if @6 @41 @33"));
|
||||
|
||||
m_arAdjustments.Add(11796480);
|
||||
m_arAdjustments.Add(5400);
|
||||
|
||||
LoadConnectorsList(_T("10800,@27;@22,@23;10800,@26;@24,@23"));
|
||||
|
||||
LoadTextRect(_T("@36,@40,@37,@42"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#1,#0");
|
||||
oHandle1.polar = _T("10800,10800");
|
||||
oHandle1.radiusrange = _T("0,10800");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.xrange = _T("0,10800");
|
||||
m_arHandles.Add(oHandle1);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CBorderCallout1Type : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CBorderCallout1Type()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("m@0@1l@2@3nfem,l21600,r,21600l,21600xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val #3"));
|
||||
|
||||
m_arAdjustments.Add(-8280);
|
||||
m_arAdjustments.Add(24300);
|
||||
m_arAdjustments.Add(-1800);
|
||||
m_arAdjustments.Add(4050);
|
||||
|
||||
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,#1");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#2,#3");
|
||||
m_arHandles.Add(oHandle2);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CBorderCallout2Type : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CBorderCallout2Type()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("m@0@1l@2@3@4@5nfem,l21600,r,21600l,21600xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val #3"));
|
||||
AddGuide(_T("val #4"));
|
||||
AddGuide(_T("val #5"));
|
||||
|
||||
m_arAdjustments.Add(-10080);
|
||||
m_arAdjustments.Add(24300);
|
||||
m_arAdjustments.Add(-3600);
|
||||
m_arAdjustments.Add(4050);
|
||||
m_arAdjustments.Add(-1800);
|
||||
m_arAdjustments.Add(4050);
|
||||
|
||||
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,#1");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#2,#3");
|
||||
m_arHandles.Add(oHandle2);
|
||||
|
||||
CHandle_ oHandle3;
|
||||
oHandle3.position = _T("#4,#5");
|
||||
m_arHandles.Add(oHandle3);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CBorderCallout3Type : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CBorderCallout3Type()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("m@0@1l@2@3@4@5@6@7nfem,l21600,r,21600l,21600xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val #3"));
|
||||
AddGuide(_T("val #4"));
|
||||
AddGuide(_T("val #5"));
|
||||
AddGuide(_T("val #6"));
|
||||
AddGuide(_T("val #7"));
|
||||
|
||||
m_arAdjustments.Add(23400);
|
||||
m_arAdjustments.Add(24400);
|
||||
m_arAdjustments.Add(25200);
|
||||
m_arAdjustments.Add(21600);
|
||||
m_arAdjustments.Add(25200);
|
||||
m_arAdjustments.Add(4050);
|
||||
m_arAdjustments.Add(23400);
|
||||
m_arAdjustments.Add(4050);
|
||||
|
||||
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,#1");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#2,#3");
|
||||
m_arHandles.Add(oHandle2);
|
||||
|
||||
CHandle_ oHandle3;
|
||||
oHandle3.position = _T("#4,#5");
|
||||
m_arHandles.Add(oHandle3);
|
||||
|
||||
CHandle_ oHandle4;
|
||||
oHandle4.position = _T("#6,#7");
|
||||
m_arHandles.Add(oHandle4);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CBorderCallout90Type : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CBorderCallout90Type()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("m@0@1l@2@3nfem,l21600,r,21600l,21600xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val #3"));
|
||||
|
||||
m_arAdjustments.Add(-1800);
|
||||
m_arAdjustments.Add(24300);
|
||||
m_arAdjustments.Add(-1800);
|
||||
m_arAdjustments.Add(4050);
|
||||
|
||||
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,#1");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#2,#3");
|
||||
m_arHandles.Add(oHandle2);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CBracePairType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CBracePairType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("m@9,nfqx@0@0l@0@7qy0@4@0@8l@0@6qy@9,21600em@10,nfqx@5@0l@5@7qy21600@4@5@8l@5@6qy@10,21600em@9,nsqx@0@0l@0@7qy0@4@0@8l@0@6qy@9,21600l@10,21600qx@5@6l@5@8qy21600@4@5@7l@5@0qy@10,xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val width"));
|
||||
AddGuide(_T("val height"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("sum @4 0 #0"));
|
||||
AddGuide(_T("sum @4 #0 0"));
|
||||
AddGuide(_T("prod #0 2 1"));
|
||||
AddGuide(_T("sum width 0 @9"));
|
||||
AddGuide(_T("prod #0 9598 32768"));
|
||||
AddGuide(_T("sum height 0 @11"));
|
||||
AddGuide(_T("sum @11 #0 0"));
|
||||
AddGuide(_T("sum width 0 @13"));
|
||||
|
||||
m_arAdjustments.Add(1800);
|
||||
|
||||
LoadConnectorsList(_T("@3,0;0,@4;@3,@2;@1,@4"));
|
||||
LoadTextRect(_T("@13,@11,@14,@12"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("topLeft,#0");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.yrange = _T("0,5400");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CBracketPairType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CBracketPairType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinRound;
|
||||
|
||||
|
||||
m_strPath = _T("m@0,nfqx0@0l0@2qy@0,21600em@1,nfqx21600@0l21600@2qy@1,21600em@0,nsqx0@0l0@2qy@0,21600l@1,21600qx21600@2l21600@0qy@1,xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod @0 2929 10000"));
|
||||
AddGuide(_T("sum width 0 @3"));
|
||||
AddGuide(_T("sum height 0 @3"));
|
||||
AddGuide(_T("val width"));
|
||||
AddGuide(_T("val height"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
|
||||
m_arAdjustments.Add(3600);
|
||||
|
||||
LoadConnectorsList(_T("@8,0;0,@9;@8,@7;@6,@9"));
|
||||
LoadTextRect(_T("@3,@3,@4,@5"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.xrange = _T("0,10800");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CCallout1Type : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CCallout1Type()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("m@0@1l@2@3nfem,l21600,r,21600l,21600nsxe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val #3"));
|
||||
|
||||
m_arAdjustments.Add(8280);
|
||||
m_arAdjustments.Add(24300);
|
||||
m_arAdjustments.Add(-1800);
|
||||
m_arAdjustments.Add(4050);
|
||||
|
||||
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,#1");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#2,#3");
|
||||
m_arHandles.Add(oHandle2);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CCallout2Type : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CCallout2Type()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("m@0@1l@2@3@4@5nfem,l21600,r,21600l,21600nsxe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val #3"));
|
||||
AddGuide(_T("val #4"));
|
||||
AddGuide(_T("val #5"));
|
||||
|
||||
m_arAdjustments.Add(-10080);
|
||||
m_arAdjustments.Add(24300);
|
||||
m_arAdjustments.Add(-3600);
|
||||
m_arAdjustments.Add(4050);
|
||||
m_arAdjustments.Add(-1800);
|
||||
m_arAdjustments.Add(4050);
|
||||
|
||||
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,#1");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#2,#3");
|
||||
m_arHandles.Add(oHandle2);
|
||||
|
||||
CHandle_ oHandle3;
|
||||
oHandle3.position = _T("#4,#5");
|
||||
m_arHandles.Add(oHandle3);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CCallout3Type : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CCallout3Type()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("m@0@1l@2@3@4@5@6@7nfem,l21600,r,21600l,21600nsxe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val #3"));
|
||||
AddGuide(_T("val #4"));
|
||||
AddGuide(_T("val #5"));
|
||||
AddGuide(_T("val #6"));
|
||||
AddGuide(_T("val #7"));
|
||||
|
||||
m_arAdjustments.Add(23400);
|
||||
m_arAdjustments.Add(24400);
|
||||
m_arAdjustments.Add(25200);
|
||||
m_arAdjustments.Add(21600);
|
||||
m_arAdjustments.Add(25200);
|
||||
m_arAdjustments.Add(4050);
|
||||
m_arAdjustments.Add(23400);
|
||||
m_arAdjustments.Add(4050);
|
||||
|
||||
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,#1");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#2,#3");
|
||||
m_arHandles.Add(oHandle2);
|
||||
|
||||
CHandle_ oHandle3;
|
||||
oHandle3.position = _T("#4,#5");
|
||||
m_arHandles.Add(oHandle3);
|
||||
|
||||
CHandle_ oHandle4;
|
||||
oHandle4.position = _T("#6,#7");
|
||||
m_arHandles.Add(oHandle4);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CCallout90Type : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CCallout90Type()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("m@0@1l@2@3nfem,l21600,r,21600l,21600nsxe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val #3"));
|
||||
|
||||
m_arAdjustments.Add(-1800);
|
||||
m_arAdjustments.Add(24300);
|
||||
m_arAdjustments.Add(-1800);
|
||||
m_arAdjustments.Add(4050);
|
||||
|
||||
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,#1");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#2,#3");
|
||||
m_arHandles.Add(oHandle2);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CCanType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CCanType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinRound;
|
||||
m_strPath = _T("m10800,qx0@1l0@2qy10800,21600,21600@2l21600@1qy10800,xem0@1qy10800@0,21600@1nfe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("sum height 0 @1"));
|
||||
|
||||
m_arAdjustments.Add(5400);
|
||||
|
||||
LoadConnectorsList(_T("10800,@0;10800,0;0,10800;10800,21600;21600,10800"));
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(180);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
LoadTextRect(_T("0,@0,21600,@2"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("center,#0");
|
||||
oHandle1.yrange = _T("0,10800");
|
||||
m_arHandles.Add(oHandle1);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CChevronType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CChevronType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m@0,l,0@1,10800,,21600@0,21600,21600,10800xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum 21600 0 @0"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
|
||||
m_arAdjustments.Add(16200);
|
||||
LoadConnectorsList(_T("@2,0;@1,10800;@2,21600;21600,10800"));
|
||||
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(180);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
LoadTextRect(_T("0,0,10800,21600;0,0,16200,21600;0,0,21600,21600"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.xrange = _T("0,21600");
|
||||
m_arHandles.Add(oHandle1);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CCircularArrowType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CCircularArrowType()
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("al10800,10800@8@8@4@6,10800,10800,10800,10800@9@7l@30@31@17@18@24@25@15@16@32@33xe");
|
||||
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum #1 0 #0"));
|
||||
AddGuide(_T("val 10800"));
|
||||
AddGuide(_T("sum 0 0 #1"));
|
||||
AddGuide(_T("sumangle @2 360 0"));
|
||||
AddGuide(_T("if @2 @2 @5"));
|
||||
AddGuide(_T("sum 0 0 @6"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("sum 0 0 #0"));
|
||||
AddGuide(_T("sum #2 0 2700"));
|
||||
AddGuide(_T("cos @10 #1"));
|
||||
AddGuide(_T("sin @10 #1"));
|
||||
AddGuide(_T("cos 13500 #1"));
|
||||
AddGuide(_T("sin 13500 #1"));
|
||||
AddGuide(_T("sum @11 10800 0"));
|
||||
AddGuide(_T("sum @12 10800 0"));
|
||||
AddGuide(_T("sum @13 10800 0"));
|
||||
AddGuide(_T("sum @14 10800 0"));
|
||||
AddGuide(_T("prod #2 1 2 "));
|
||||
AddGuide(_T("sum @19 5400 0"));
|
||||
AddGuide(_T("cos @20 #1"));
|
||||
AddGuide(_T("sin @20 #1"));
|
||||
AddGuide(_T("sum @21 10800 0"));
|
||||
AddGuide(_T("sum @12 @23 @22"));
|
||||
AddGuide(_T("sum @22 @23 @11"));
|
||||
AddGuide(_T("cos 10800 #1"));
|
||||
AddGuide(_T("sin 10800 #1"));
|
||||
AddGuide(_T("cos #2 #1"));
|
||||
AddGuide(_T("sin #2 #1"));
|
||||
AddGuide(_T("sum @26 10800 0"));
|
||||
AddGuide(_T("sum @27 10800 0"));
|
||||
AddGuide(_T("sum @28 10800 0"));
|
||||
AddGuide(_T("sum @29 10800 0"));
|
||||
AddGuide(_T("sum @19 5400 0 "));
|
||||
AddGuide(_T("cos @34 #0"));
|
||||
AddGuide(_T("sin @34 #0"));
|
||||
AddGuide(_T("mid #0 #1"));
|
||||
AddGuide(_T("sumangle @37 180 0"));
|
||||
AddGuide(_T("if @2 @37 @38"));
|
||||
AddGuide(_T("cos 10800 @39"));
|
||||
AddGuide(_T("sin 10800 @39"));
|
||||
AddGuide(_T("cos #2 @39"));
|
||||
AddGuide(_T("sin #2 @39"));
|
||||
AddGuide(_T("sum @40 10800 0"));
|
||||
AddGuide(_T("sum @41 10800 0"));
|
||||
AddGuide(_T("sum @42 10800 0"));
|
||||
AddGuide(_T("sum @43 10800 0"));
|
||||
AddGuide(_T("sum @35 10800 0"));
|
||||
AddGuide(_T("sum @36 10800 0"));
|
||||
|
||||
m_arAdjustments.Add(-11796480);
|
||||
m_arAdjustments.Add(0);
|
||||
m_arAdjustments.Add(5400);
|
||||
|
||||
LoadConnectorsList(_T("@44,@45;@48,@49;@46,@47;@17,@18;@24,@25;@15,@16"));
|
||||
LoadTextRect(_T("3163,3163,18437,18437"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("@3,#0");
|
||||
oHandle1.polar = _T("10800,10800");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#2,#1");
|
||||
oHandle2.polar = _T("10800,10800");
|
||||
oHandle2.radiusrange = _T("0,10800");
|
||||
m_arHandles.Add(oHandle2);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CCloudCalloutType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CCloudCalloutType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinRound;
|
||||
|
||||
m_strPath = _T("ar,7165,4345,13110,1950,7185,1080,12690,475,11732,4835,17650,1080,12690,2910,17640,2387,9757,10107,20300,2910,17640,8235,19545,7660,12382,14412,21597,8235,19545,14280,18330,12910,11080,18695,18947,14280,18330,18690,15045,14822,5862,21597,15082,18690,15045,20895,7665,15772,2592,21105,9865,20895,7665,19140,2715,14330,,19187,6595,19140,2715,14910,1170,10992,,15357,5945,14910,1170,11250,1665,6692,650,12025,7917,11250,1665,7005,2580,1912,1972,8665,11162,7005,2580,1950,7185xear,7165,4345,13110,1080,12690,2340,13080nfear475,11732,4835,17650,2910,17640,3465,17445nfear7660,12382,14412,21597,7905,18675,8235,19545nfear7660,12382,14412,21597,14280,18330,14400,17370nfear12910,11080,18695,18947,18690,15045,17070,11475nfear15772,2592,21105,9865,20175,9015,20895,7665nfear14330,,19187,6595,19200,3345,19140,2715nfear14330,,19187,6595,14910,1170,14550,1980nfear10992,,15357,5945,11250,1665,11040,2340nfear1912,1972,8665,11162,7650,3270,7005,2580nfear1912,1972,8665,11162,1950,7185,2070,7890nfem@23@37qx@35@24@23@36@34@24@23@37xem@16@33qx@31@17@16@32@30@17@16@33xem@38@29qx@27@39@38@28@26@39@38@29xe");
|
||||
|
||||
AddGuide(_T("sum #0 0 10800"));
|
||||
AddGuide(_T("sum #1 0 10800"));
|
||||
AddGuide(_T("cosatan2 10800 @0 @1"));
|
||||
AddGuide(_T("sinatan2 10800 @0 @1"));
|
||||
AddGuide(_T("sum @2 10800 0"));
|
||||
AddGuide(_T("sum @3 10800 0"));
|
||||
AddGuide(_T("sum @4 0 #0"));
|
||||
AddGuide(_T("sum @5 0 #1"));
|
||||
AddGuide(_T("mod @6 @7 0"));
|
||||
AddGuide(_T("prod 600 11 1"));
|
||||
AddGuide(_T("sum @8 0 @9"));
|
||||
AddGuide(_T("prod @10 1 3"));
|
||||
AddGuide(_T("prod 600 3 1"));
|
||||
AddGuide(_T("sum @11 @12 0"));
|
||||
AddGuide(_T("prod @13 @6 @8"));
|
||||
AddGuide(_T("prod @13 @7 @8"));
|
||||
AddGuide(_T("sum @14 #0 0"));
|
||||
AddGuide(_T("sum @15 #1 0"));
|
||||
AddGuide(_T("prod 600 8 1"));
|
||||
AddGuide(_T("prod @11 2 1"));
|
||||
AddGuide(_T("sum @18 @19 0"));
|
||||
AddGuide(_T("prod @20 @6 @8"));
|
||||
AddGuide(_T("prod @20 @7 @8"));
|
||||
AddGuide(_T("sum @21 #0 0"));
|
||||
AddGuide(_T("sum @22 #1 0"));
|
||||
AddGuide(_T("prod 600 2 1"));
|
||||
AddGuide(_T("sum #0 600 0"));
|
||||
AddGuide(_T("sum #0 0 600"));
|
||||
AddGuide(_T("sum #1 600 0"));
|
||||
AddGuide(_T("sum #1 0 600"));
|
||||
AddGuide(_T("sum @16 @25 0"));
|
||||
AddGuide(_T("sum @16 0 @25"));
|
||||
AddGuide(_T("sum @17 @25 0"));
|
||||
AddGuide(_T("sum @17 0 @25"));
|
||||
AddGuide(_T("sum @23 @12 0"));
|
||||
AddGuide(_T("sum @23 0 @12"));
|
||||
AddGuide(_T("sum @24 @12 0"));
|
||||
AddGuide(_T("sum @24 0 @12"));
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
|
||||
m_arAdjustments.Add(1350);
|
||||
m_arAdjustments.Add(25920);
|
||||
|
||||
LoadConnectorsList(_T("67,10800;10800,21577;21582,10800;10800,1235;@38,@39"));
|
||||
LoadTextRect(_T("2977,3262,17087,17337"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,#1");
|
||||
m_arHandles.Add(oHandle1);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CCubeType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CCubeType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m@0,l0@0,,21600@1,21600,21600@2,21600,xem0@0nfl@1@0,21600,em@1@0nfl@1,21600e");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("mid height #0"));
|
||||
AddGuide(_T("prod @1 1 2"));
|
||||
AddGuide(_T("prod @2 1 2"));
|
||||
AddGuide(_T("mid width #0"));
|
||||
|
||||
m_arAdjustments.Add(5400);
|
||||
|
||||
LoadConnectorsList(_T("@6,0;@4,@0;0,@3;@4,21600;@1,@3;21600,@5"));
|
||||
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(180);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
LoadTextRect(_T("0,@0,@1,21600"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("topLeft,#0");
|
||||
oHandle1.switchHandle = _T("true");
|
||||
oHandle1.yrange = _T("0,21600");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CCurvedConnectorType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CCurvedConnectorType()
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinRound;
|
||||
|
||||
m_strPathLimoX = _T("m0,0qx@0,10800qy21600,21600nfe");
|
||||
m_strPathLimoY = _T("m0,0qy@0,10800qx21600,21600nfe");
|
||||
|
||||
m_strPath = m_strPathLimoX;
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
m_arAdjustments.Add(10800);
|
||||
|
||||
LoadConnectorsList(_T("0,0;21600,21600"));
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CCurvedDownArrowType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CCurvedDownArrowType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("wr,0@3@23,0@22@4,0@15,0@1@23@7,0@13@2l@14@2@8@22@12@2at,0@3@23@11@2@17@26@15,0@1@23@17@26@15@22xewr,0@3@23@4,0@17@26nfe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("sum #0 width #1"));
|
||||
AddGuide(_T("prod @3 1 2"));
|
||||
AddGuide(_T("sum #1 #1 width"));
|
||||
AddGuide(_T("sum @5 #1 #0"));
|
||||
AddGuide(_T("prod @6 1 2"));
|
||||
AddGuide(_T("mid width #0"));
|
||||
AddGuide(_T("sum height 0 #2"));
|
||||
AddGuide(_T("ellipse @9 height @4"));
|
||||
AddGuide(_T("sum @4 @10 0"));
|
||||
AddGuide(_T("sum @11 #1 width"));
|
||||
AddGuide(_T("sum @7 @10 0"));
|
||||
AddGuide(_T("sum @12 width #0 "));
|
||||
AddGuide(_T("sum @5 0 #0"));
|
||||
AddGuide(_T("prod @15 1 2"));
|
||||
AddGuide(_T("mid @4 @7"));
|
||||
AddGuide(_T("sum #0 #1 width"));
|
||||
AddGuide(_T("prod @18 1 2"));
|
||||
AddGuide(_T("sum @17 0 @19"));
|
||||
AddGuide(_T("val width"));
|
||||
AddGuide(_T("val height"));
|
||||
AddGuide(_T("prod height 2 1"));
|
||||
AddGuide(_T("sum @17 0 @4 "));
|
||||
AddGuide(_T("ellipse @24 @4 height"));
|
||||
AddGuide(_T("sum height 0 @25"));
|
||||
AddGuide(_T("sum @8 128 0"));
|
||||
AddGuide(_T("prod @5 1 2"));
|
||||
AddGuide(_T("sum @5 0 128"));
|
||||
AddGuide(_T("sum #0 @17 @12"));
|
||||
AddGuide(_T("ellipse @20 @4 height"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("prod @32 1 2"));
|
||||
AddGuide(_T("prod height height 1"));
|
||||
AddGuide(_T("prod @9 @9 1"));
|
||||
AddGuide(_T("sum @34 0 @35"));
|
||||
AddGuide(_T("sqrt @36"));
|
||||
AddGuide(_T("sum @37 height 0"));
|
||||
AddGuide(_T("prod width height @38"));
|
||||
AddGuide(_T("sum @39 64 0"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("ellipse @33 @41 height"));
|
||||
AddGuide(_T("sum height 0 @42"));
|
||||
AddGuide(_T("sum @43 64 0"));
|
||||
AddGuide(_T("prod @4 1 2"));
|
||||
AddGuide(_T("sum #1 0 @45"));
|
||||
AddGuide(_T("prod height 4390 32768"));
|
||||
AddGuide(_T("prod height 28378 32768"));
|
||||
|
||||
m_arAdjustments.Add(12960);
|
||||
m_arAdjustments.Add(19440);
|
||||
m_arAdjustments.Add(14400);
|
||||
|
||||
LoadConnectorsList(_T("@17,0;@16,@22;@12,@2;@8,@22;@14,@2"));
|
||||
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
LoadTextRect(_T("@45,@47,@46,@48"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,bottomRight");
|
||||
oHandle1.xrange = _T("@40,@29");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle1.position = _T("#1,bottomRight");
|
||||
oHandle1.xrange = _T("@27,@21");
|
||||
m_arHandles.Add(oHandle2);
|
||||
|
||||
CHandle_ oHandle3;
|
||||
oHandle3.position = _T("bottomRight,#2");
|
||||
oHandle3.yrange = _T("@44,@22");
|
||||
m_arHandles.Add(oHandle3);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CCurvedLeftArrowType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CCurvedLeftArrowType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("wr@22,0@21@3,,0@21@4@22@14@21@1@21@7@2@12l@2@13,0@8@2@11at@22,0@21@3@2@10@24@16@22@14@21@1@24@16,0@14xear@22@14@21@1@21@7@24@16nfe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("sum #0 width #1"));
|
||||
AddGuide(_T("prod @3 1 2"));
|
||||
AddGuide(_T("sum #1 #1 width"));
|
||||
AddGuide(_T("sum @5 #1 #0"));
|
||||
AddGuide(_T("prod @6 1 2"));
|
||||
AddGuide(_T("mid width #0"));
|
||||
AddGuide(_T("ellipse #2 height @4"));
|
||||
AddGuide(_T("sum @4 @9 0"));
|
||||
AddGuide(_T("sum @10 #1 width"));
|
||||
AddGuide(_T("sum @7 @9 0"));
|
||||
AddGuide(_T("sum @11 width #0"));
|
||||
AddGuide(_T("sum @5 0 #0"));
|
||||
AddGuide(_T("prod @14 1 2"));
|
||||
AddGuide(_T("mid @4 @7"));
|
||||
AddGuide(_T("sum #0 #1 width"));
|
||||
AddGuide(_T("prod @17 1 2"));
|
||||
AddGuide(_T("sum @16 0 @18"));
|
||||
AddGuide(_T("val width"));
|
||||
AddGuide(_T("val height"));
|
||||
AddGuide(_T("sum 0 0 height"));
|
||||
AddGuide(_T("sum @16 0 @4"));
|
||||
AddGuide(_T("ellipse @23 @4 height"));
|
||||
AddGuide(_T("sum @8 128 0"));
|
||||
AddGuide(_T("prod @5 1 2"));
|
||||
AddGuide(_T("sum @5 0 128"));
|
||||
AddGuide(_T("sum #0 @16 @11"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("prod @29 1 2"));
|
||||
AddGuide(_T("prod height height 1"));
|
||||
AddGuide(_T("prod #2 #2 1"));
|
||||
AddGuide(_T("sum @31 0 @32"));
|
||||
AddGuide(_T("sqrt @33"));
|
||||
AddGuide(_T("sum @34 height 0"));
|
||||
AddGuide(_T("prod width height @35"));
|
||||
AddGuide(_T("sum @36 64 0"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("ellipse @30 @38 height"));
|
||||
AddGuide(_T("sum @39 0 64"));
|
||||
AddGuide(_T("prod @4 1 2"));
|
||||
AddGuide(_T("sum #1 0 @41"));
|
||||
AddGuide(_T("prod height 4390 32768"));
|
||||
AddGuide(_T("prod height 28378 32768"));
|
||||
|
||||
m_arAdjustments.Add(12960);
|
||||
m_arAdjustments.Add(19440);
|
||||
m_arAdjustments.Add(7200);
|
||||
|
||||
LoadConnectorsList(_T("0,@15;@2,@11;0,@8;@2,@13;@21,@16"));
|
||||
|
||||
m_arConnectorAngles.Add(180);
|
||||
m_arConnectorAngles.Add(180);
|
||||
m_arConnectorAngles.Add(180);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
LoadTextRect(_T("@43,@41,@44,@42"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("topLeft,#0");
|
||||
oHandle1.yrange = _T("@37,@27");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle1.position = _T("topLeft,#1");
|
||||
oHandle1.yrange = _T("@25,@20");
|
||||
m_arHandles.Add(oHandle2);
|
||||
|
||||
CHandle_ oHandle3;
|
||||
oHandle3.position = _T("#2,bottomRight");
|
||||
oHandle3.xrange = _T("0,@40");
|
||||
m_arHandles.Add(oHandle3);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CCurvedRightArrowType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CCurvedRightArrowType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("ar,0@23@3@22,,0@4,0@15@23@1,0@7@2@13l@2@14@22@8@2@12wa,0@23@3@2@11@26@17,0@15@23@1@26@17@22@15xear,0@23@3,0@4@26@17nfe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("sum #0 width #1"));
|
||||
AddGuide(_T("prod @3 1 2"));
|
||||
AddGuide(_T("sum #1 #1 width"));
|
||||
AddGuide(_T("sum @5 #1 #0"));
|
||||
AddGuide(_T("prod @6 1 2"));
|
||||
AddGuide(_T("mid width #0"));
|
||||
AddGuide(_T("sum height 0 #2"));
|
||||
AddGuide(_T("ellipse @9 height @4"));
|
||||
AddGuide(_T("sum @4 @10 0"));
|
||||
AddGuide(_T("sum @11 #1 width"));
|
||||
AddGuide(_T("sum @7 @10 0"));
|
||||
AddGuide(_T("sum @12 width #0"));
|
||||
AddGuide(_T("sum @5 0 #0"));
|
||||
AddGuide(_T("prod @15 1 2"));
|
||||
AddGuide(_T("mid @4 @7"));
|
||||
AddGuide(_T("sum #0 #1 width"));
|
||||
AddGuide(_T("prod @18 1 2"));
|
||||
AddGuide(_T("sum @17 0 @19"));
|
||||
AddGuide(_T("val width"));
|
||||
AddGuide(_T("val height"));
|
||||
AddGuide(_T("prod height 2 1"));
|
||||
AddGuide(_T("sum @17 0 @4"));
|
||||
AddGuide(_T("ellipse @24 @4 height"));
|
||||
AddGuide(_T("sum height 0 @25"));
|
||||
AddGuide(_T("sum @8 128 0"));
|
||||
AddGuide(_T("prod @5 1 2"));
|
||||
AddGuide(_T("sum @5 0 128"));
|
||||
AddGuide(_T("sum #0 @17 @12"));
|
||||
AddGuide(_T("ellipse @20 @4 height"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("prod @32 1 2"));
|
||||
AddGuide(_T("prod height height 1"));
|
||||
AddGuide(_T("prod @9 @9 1"));
|
||||
AddGuide(_T("sum @34 0 @35"));
|
||||
AddGuide(_T("sqrt @36"));
|
||||
AddGuide(_T("sum @37 height 0"));
|
||||
AddGuide(_T("prod width height @38"));
|
||||
AddGuide(_T("sum @39 64 0"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
AddGuide(_T("ellipse @33 @41 height"));
|
||||
AddGuide(_T("sum height 0 @42"));
|
||||
AddGuide(_T("sum @43 64 0"));
|
||||
AddGuide(_T("prod @4 1 2"));
|
||||
AddGuide(_T("sum #1 0 @45"));
|
||||
AddGuide(_T("prod height 4390 32768"));
|
||||
AddGuide(_T("prod height 28378 32768"));
|
||||
|
||||
m_arAdjustments.Add(12960);
|
||||
m_arAdjustments.Add(19440);
|
||||
m_arAdjustments.Add(14400);
|
||||
|
||||
LoadConnectorsList(_T("0,@17;@2,@14;@22,@8;@2,@12;@22,@16"));
|
||||
|
||||
m_arConnectorAngles.Add(180);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
m_arConnectorAngles.Add(0);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
LoadTextRect(_T("@47,@45,@48,@46"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("bottomRight,#0");
|
||||
oHandle1.yrange = _T("@40,@29");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle1.position = _T("bottomRight,#1");
|
||||
oHandle1.yrange = _T("@27,@21");
|
||||
m_arHandles.Add(oHandle2);
|
||||
|
||||
CHandle_ oHandle3;
|
||||
oHandle3.position = _T("#2,bottomRight");
|
||||
oHandle3.xrange = _T("@44,@22");
|
||||
m_arHandles.Add(oHandle3);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CCurvedUpArrowType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CCurvedUpArrowType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("ar0@22@3@21,,0@4@21@14@22@1@21@7@21@12@2l@13@2@8,0@11@2wa0@22@3@21@10@2@16@24@14@22@1@21@16@24@14,xewr@14@22@1@21@7@21@16@24nfe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("sum #0 width #1"));
|
||||
AddGuide(_T("prod @3 1 2"));
|
||||
AddGuide(_T("sum #1 #1 width "));
|
||||
AddGuide(_T("sum @5 #1 #0"));
|
||||
AddGuide(_T("prod @6 1 2"));
|
||||
AddGuide(_T("mid width #0"));
|
||||
AddGuide(_T("ellipse #2 height @4"));
|
||||
AddGuide(_T("sum @4 @9 0 "));
|
||||
AddGuide(_T("sum @10 #1 width"));
|
||||
AddGuide(_T("sum @7 @9 0 "));
|
||||
AddGuide(_T("sum @11 width #0 "));
|
||||
AddGuide(_T("sum @5 0 #0 "));
|
||||
AddGuide(_T("prod @14 1 2 "));
|
||||
AddGuide(_T("mid @4 @7 "));
|
||||
AddGuide(_T("sum #0 #1 width "));
|
||||
AddGuide(_T("prod @17 1 2 "));
|
||||
AddGuide(_T("sum @16 0 @18 "));
|
||||
AddGuide(_T("val width "));
|
||||
AddGuide(_T("val height "));
|
||||
AddGuide(_T("sum 0 0 height"));
|
||||
AddGuide(_T("sum @16 0 @4 "));
|
||||
AddGuide(_T("ellipse @23 @4 height "));
|
||||
AddGuide(_T("sum @8 128 0 "));
|
||||
AddGuide(_T("prod @5 1 2 "));
|
||||
AddGuide(_T("sum @5 0 128 "));
|
||||
AddGuide(_T("sum #0 @16 @11 "));
|
||||
AddGuide(_T("sum width 0 #0 "));
|
||||
AddGuide(_T("prod @29 1 2 "));
|
||||
AddGuide(_T("prod height height 1 "));
|
||||
AddGuide(_T("prod #2 #2 1 "));
|
||||
AddGuide(_T("sum @31 0 @32 "));
|
||||
AddGuide(_T("sqrt @33 "));
|
||||
AddGuide(_T("sum @34 height 0 "));
|
||||
AddGuide(_T("prod width height @35"));
|
||||
AddGuide(_T("sum @36 64 0 "));
|
||||
AddGuide(_T("prod #0 1 2 "));
|
||||
AddGuide(_T("ellipse @30 @38 height "));
|
||||
AddGuide(_T("sum @39 0 64 "));
|
||||
AddGuide(_T("prod @4 1 2"));
|
||||
AddGuide(_T("sum #1 0 @41 "));
|
||||
AddGuide(_T("prod height 4390 32768"));
|
||||
AddGuide(_T("prod height 28378 32768"));
|
||||
|
||||
m_arAdjustments.Add(12960);
|
||||
m_arAdjustments.Add(19440);
|
||||
m_arAdjustments.Add(7200);
|
||||
|
||||
LoadConnectorsList(_T("@8,0;@11,@2;@15,0;@16,@21;@13,@2"));
|
||||
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
LoadTextRect(_T("@41,@43,@42,@44"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,topLeft");
|
||||
oHandle1.xrange = _T("@37,@27");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle1.position = _T("#1,topLeft");
|
||||
oHandle1.xrange = _T("@25,@20");
|
||||
m_arHandles.Add(oHandle2);
|
||||
|
||||
CHandle_ oHandle3;
|
||||
oHandle3.position = _T("bottomRight,#2");
|
||||
oHandle3.yrange = _T("0,@40");
|
||||
m_arHandles.Add(oHandle3);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CDiamondType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CDiamondType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m10800,l,10800,10800,21600,21600,10800xe");
|
||||
|
||||
LoadConnectorsList(_T("Rectangle"));
|
||||
LoadTextRect(_T("5400,5400,16200,16200"));
|
||||
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CDonutType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CDonutType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinRound;
|
||||
m_strPath = _T("m,10800qy10800,,21600,10800,10800,21600,,10800xm@0,10800qy10800@2@1,10800,10800@0@0,10800xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod @0 2929 10000"));
|
||||
AddGuide(_T("sum width 0 @3"));
|
||||
AddGuide(_T("sum height 0 @3"));
|
||||
|
||||
m_arAdjustments.Add(5400);
|
||||
LoadConnectorsList(_T("10800,0;3163,3163;0,10800;3163,18437;10800,21600;18437,18437;21600,10800;18437,3163"));
|
||||
LoadTextRect(_T("3163,3163,18437,18437"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#0,center");
|
||||
oHandle1.xrange = _T("0,10800");
|
||||
m_arHandles.Add(oHandle1);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CDownArrowCalloutType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CDownArrowCalloutType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m,l21600,,21600@0@5@0@5@2@4@2,10800,21600@1@2@3@2@3@0,0@0xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val #3"));
|
||||
AddGuide(_T("sum 21600 0 #1"));
|
||||
AddGuide(_T("sum 21600 0 #3"));
|
||||
AddGuide(_T("prod #0 1 2"));
|
||||
|
||||
m_arAdjustments.Add(14400);
|
||||
m_arAdjustments.Add(5400);
|
||||
m_arAdjustments.Add(18000);
|
||||
m_arAdjustments.Add(8100);
|
||||
|
||||
LoadConnectorsList(_T("10800,0;0,@6;10800,21600;21600,@6"));
|
||||
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(180);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
LoadTextRect(_T("0,0,21600,@0"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("topLeft,#0");
|
||||
oHandle1.yrange = _T("0,@2");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("#1,bottomRight");
|
||||
oHandle2.xrange = _T("0,@3");
|
||||
m_arHandles.Add(oHandle2);
|
||||
|
||||
CHandle_ oHandle3;
|
||||
oHandle3.position = _T("#3,#2");
|
||||
oHandle3.xrange = _T("@1,10800");
|
||||
oHandle3.yrange = _T("@0,21600");
|
||||
m_arHandles.Add(oHandle3);
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CDownArrowType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CDownArrowType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m0@0l@1@0@1,0@2,0@2@0,21600@0,10800,21600xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("sum height 0 #1"));
|
||||
AddGuide(_T("sum 10800 0 #1"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("prod @4 @3 10800"));
|
||||
AddGuide(_T("sum width 0 @5"));
|
||||
|
||||
m_arAdjustments.Add(16200);
|
||||
m_arAdjustments.Add(5400);
|
||||
|
||||
LoadConnectorsList(_T("10800,0;0,@0;10800,21600;21600,@0"));
|
||||
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(180);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
LoadTextRect(_T("@1,0,@2,@6"));
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("#1,#0");
|
||||
oHandle1.xrange = _T("0,10800");
|
||||
oHandle1.yrange = _T("0,21600");
|
||||
m_arHandles.Add(oHandle1);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CEllipceRibbon2Type : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CEllipceRibbon2Type()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("wr@9@34@8@35,0@24@0@23@9,0@8@11@0@22@19@22@9@34@8@35@19@23@3@24l@7@36@3@4at@9@31@8@32@3@4@18@30@9@1@8@33@18@28@17@28@9@31@8@32@17@30,0@4l@5@36xear@9@1@8@33@17@28@0@29nfl@17@30ewr@9@1@8@33@18@28@19@29nfl@18@30em@0@23nfl@0@29em@19@23nfl@19@29e");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val width"));
|
||||
AddGuide(_T("val height"));
|
||||
AddGuide(_T("prod width 1 8"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod width 7 8"));
|
||||
AddGuide(_T("prod width 3 2"));
|
||||
AddGuide(_T("sum 0 0 @6"));
|
||||
AddGuide(_T("prod #2 30573 4096"));
|
||||
AddGuide(_T("prod @10 2 1"));
|
||||
AddGuide(_T("sum @10 height #2"));
|
||||
AddGuide(_T("sum @10 #1 0"));
|
||||
AddGuide(_T("prod #1 1 2"));
|
||||
AddGuide(_T("sum @10 @14 0"));
|
||||
AddGuide(_T("sum @12 0 #1"));
|
||||
AddGuide(_T("sum #0 @5 0"));
|
||||
AddGuide(_T("sum width 0 @17"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum @6 0 #0"));
|
||||
AddGuide(_T("ellipse @20 width @10"));
|
||||
AddGuide(_T("sum @10 0 @21"));
|
||||
AddGuide(_T("sum @22 @16 @10"));
|
||||
AddGuide(_T("sum #2 @16 @10"));
|
||||
AddGuide(_T("prod @10 2391 32768"));
|
||||
AddGuide(_T("sum @6 0 @17"));
|
||||
AddGuide(_T("ellipse @26 width @10"));
|
||||
AddGuide(_T("sum @10 #1 @27"));
|
||||
AddGuide(_T("sum @22 #1 0"));
|
||||
AddGuide(_T("sum @12 0 @27"));
|
||||
AddGuide(_T("sum height 0 #2"));
|
||||
AddGuide(_T("sum @10 @12 0"));
|
||||
AddGuide(_T("sum @32 @10 @16"));
|
||||
AddGuide(_T("sum @31 @10 @13"));
|
||||
AddGuide(_T("sum @32 @10 @13"));
|
||||
AddGuide(_T("sum @25 @12 @15"));
|
||||
AddGuide(_T("sum @16 0 @15"));
|
||||
AddGuide(_T("prod @37 2 3"));
|
||||
AddGuide(_T("sum @1 @38 0"));
|
||||
AddGuide(_T("sum #2 @38 0"));
|
||||
AddGuide(_T("max @40 675"));
|
||||
AddGuide(_T("prod width 3 8"));
|
||||
AddGuide(_T("sum @42 0 4"));
|
||||
|
||||
m_arAdjustments.Add(5400);
|
||||
m_arAdjustments.Add(16200);
|
||||
m_arAdjustments.Add(2700);
|
||||
|
||||
LoadConnectorsList(_T("@6,0;@5,@36;@6,@1;@7,@36"));
|
||||
LoadTextRect(_T("@0,@22,@19,@1"));
|
||||
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(180);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("topLeft,#0");
|
||||
oHandle1.xrange = _T("@5,@43");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("center,#1");
|
||||
oHandle2.yrange = _T("@39,@31");
|
||||
m_arHandles.Add(oHandle2);
|
||||
|
||||
CHandle_ oHandle3;
|
||||
oHandle3.position = _T("topLeft,#2");
|
||||
oHandle3.yrange = _T("@41,@24 ");
|
||||
m_arHandles.Add(oHandle3);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CEllipceRibbonType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CEllipceRibbonType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
|
||||
m_strPath = _T("ar@9@38@8@37,0@27@0@26@9@13@8@4@0@25@22@25@9@38@8@37@22@26@3@27l@7@40@3,wa@9@35@8@10@3,0@21@33@9@36@8@1@21@31@20@31@9@35@8@10@20@33,,l@5@40xewr@9@36@8@1@20@31@0@32nfl@20@33ear@9@36@8@1@21@31@22@32nfl@21@33em@0@26nfl@0@32em@22@26nfl@22@32e");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("val #1"));
|
||||
AddGuide(_T("val #2"));
|
||||
AddGuide(_T("val width"));
|
||||
AddGuide(_T("val height"));
|
||||
AddGuide(_T("prod width 1 8"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod width 7 8"));
|
||||
AddGuide(_T("prod width 3 2"));
|
||||
AddGuide(_T("sum 0 0 @6"));
|
||||
AddGuide(_T("sum height 0 #2"));
|
||||
AddGuide(_T("prod @10 30573 4096"));
|
||||
AddGuide(_T("prod @11 2 1"));
|
||||
AddGuide(_T("sum height 0 @12"));
|
||||
AddGuide(_T("sum @11 #2 0"));
|
||||
AddGuide(_T("sum @11 height #1"));
|
||||
AddGuide(_T("sum height 0 #1"));
|
||||
AddGuide(_T("prod @16 1 2"));
|
||||
AddGuide(_T("sum @11 @17 0"));
|
||||
AddGuide(_T("sum @14 #1 height"));
|
||||
AddGuide(_T("sum #0 @5 0"));
|
||||
AddGuide(_T("sum width 0 @20"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum @6 0 #0"));
|
||||
AddGuide(_T("ellipse @23 width @11"));
|
||||
AddGuide(_T("sum @24 height @11"));
|
||||
AddGuide(_T("sum @25 @11 @19"));
|
||||
AddGuide(_T("sum #2 @11 @19"));
|
||||
AddGuide(_T("prod @11 2391 32768"));
|
||||
AddGuide(_T("sum @6 0 @20"));
|
||||
AddGuide(_T("ellipse @29 width @11"));
|
||||
AddGuide(_T("sum #1 @30 @11"));
|
||||
AddGuide(_T("sum @25 #1 height"));
|
||||
AddGuide(_T("sum height @30 @14"));
|
||||
AddGuide(_T("sum @11 @14 0"));
|
||||
AddGuide(_T("sum height 0 @34"));
|
||||
AddGuide(_T("sum @35 @19 @11"));
|
||||
AddGuide(_T("sum @10 @15 @11"));
|
||||
AddGuide(_T("sum @35 @15 @11"));
|
||||
AddGuide(_T("sum @28 @14 @18"));
|
||||
AddGuide(_T("sum height 0 @39"));
|
||||
AddGuide(_T("sum @19 0 @18"));
|
||||
AddGuide(_T("prod @41 2 3"));
|
||||
AddGuide(_T("sum #1 0 @42"));
|
||||
AddGuide(_T("sum #2 0 @42"));
|
||||
AddGuide(_T("min @44 20925"));
|
||||
AddGuide(_T("prod width 3 8"));
|
||||
AddGuide(_T("sum @46 0 4"));
|
||||
|
||||
m_arAdjustments.Add(5400);
|
||||
m_arAdjustments.Add(5400);
|
||||
m_arAdjustments.Add(18900);
|
||||
|
||||
LoadConnectorsList(_T("@6,0;@5,@36;@6,@1;@7,@36"));
|
||||
LoadTextRect(_T("@0,@22,@19,@1"));
|
||||
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(180);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
CHandle_ oHandle1;
|
||||
oHandle1.position = _T("topLeft,#0");
|
||||
oHandle1.xrange = _T("@5,@43");
|
||||
m_arHandles.Add(oHandle1);
|
||||
|
||||
CHandle_ oHandle2;
|
||||
oHandle2.position = _T("center,#1");
|
||||
oHandle2.yrange = _T("@39,@31");
|
||||
m_arHandles.Add(oHandle2);
|
||||
|
||||
CHandle_ oHandle3;
|
||||
oHandle3.position = _T("topLeft,#2");
|
||||
oHandle3.yrange = _T("@41,@24 ");
|
||||
m_arHandles.Add(oHandle3);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CEllipseType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CEllipseType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m,10800qy10800,,21600,10800,10800,21600,,10800xe");
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartAlternateProcessType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartAlternateProcessType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m@0,qx0@0l0@2qy@0,21600l@1,21600qx21600@2l21600@0qy@1,xe");
|
||||
|
||||
AddGuide(_T("val #0"));
|
||||
AddGuide(_T("sum width 0 #0"));
|
||||
AddGuide(_T("sum height 0 #0"));
|
||||
AddGuide(_T("prod @0 2929 10000"));
|
||||
AddGuide(_T("sum width 0 @3"));
|
||||
AddGuide(_T("sum height 0 @3"));
|
||||
AddGuide(_T("val width"));
|
||||
AddGuide(_T("val height"));
|
||||
AddGuide(_T("prod width 1 2"));
|
||||
AddGuide(_T("prod height 1 2"));
|
||||
|
||||
m_arAdjustments.Add(2700);
|
||||
|
||||
LoadConnectorsList(_T("@8,0;0,@9;@8,@7;@6,@9"));
|
||||
LoadTextRect(_T("@3,@3,@4,@5"));
|
||||
|
||||
m_lLimoX = 10800;
|
||||
m_lLimoY = 10800;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartCollateType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartCollateType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m21600,21600l,21600,21600,,,xe");
|
||||
LoadConnectorsList(_T("10800,0;10800,10800;10800,21600"));
|
||||
LoadTextRect(_T("5400,5400,16200,16200"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartConnectorType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartConnectorType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
|
||||
m_eJoin = NSOfficeDrawing::lineJoinRound;
|
||||
|
||||
m_strPath = _T("m10800,qx,10800,10800,21600,21600,10800,10800,xe");
|
||||
|
||||
LoadConnectorsList(_T("10800,0;3163,3163;0,10800;3163,18437;10800,21600;18437,18437;21600,10800;18437,3163"));
|
||||
LoadTextRect(_T("3163,3163,18437,18437"));
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartDecisionType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartDecisionType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m10800,l,10800,10800,21600,21600,10800xe");
|
||||
|
||||
LoadConnectorsList(_T("Rectangle"));
|
||||
LoadTextRect(_T("5400,5400,16200,16200"));
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartDelayType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartDelayType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m10800,qx21600,10800,10800,21600l,21600,,xe");
|
||||
LoadConnectorsList(_T("Rectangle"));
|
||||
LoadTextRect(_T("0,3163,18437,18437"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartDisplayType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartDisplayType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m17955,v862,282,1877,1410,2477,3045c21035,5357,21372,7895,21597,10827v-225,2763,-562,5300,-1165,7613c19832,20132,18817,21260,17955,21597r-14388,l,10827,3567,xe");
|
||||
LoadConnectorsList(_T("Rectangle"));
|
||||
LoadTextRect(_T("3567,0,17955,21600"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartDocumentType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartDocumentType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,20172v945,400,1887,628,2795,913c3587,21312,4342,21370,5060,21597v2037,,2567,-227,3095,-285c8722,21197,9325,20970,9855,20800v490,-228,945,-400,1472,-740c11817,19887,12347,19660,12875,19375v567,-228,1095,-513,1700,-740c15177,18462,15782,18122,16537,17950v718,-113,1398,-398,2228,-513c19635,17437,20577,17322,21597,17322l21597,,,xe");
|
||||
|
||||
LoadConnectorsList(_T("10800,0;0,10800;10800,20400;21600,10800"));
|
||||
LoadTextRect(_T("0,0,21600,17322"));
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartExtractType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartExtractType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m10800,l21600,21600,,21600xe");
|
||||
LoadConnectorsList(_T("10800,0;5400,10800;10800,21600;16200,10800"));
|
||||
LoadTextRect(_T("5400,10800,16200,21600"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartInputOutputType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartInputOutputType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m4321,l21600,,17204,21600,,21600xe");
|
||||
|
||||
LoadConnectorsList(_T("2961,0;10800,0;2161,10800;8602,21600;10800,21600;19402,10800"));
|
||||
LoadTextRect(_T("4321,0,17204,21600"));
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartInternalStorageType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartInternalStorageType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,l,21600r21600,l21600,xem4236,nfl4236,21600em,4236nfl21600,4236e");
|
||||
|
||||
LoadConnectorsList(_T("Rectangle"));
|
||||
LoadTextRect(_T("4236,4236,21600,21600"));
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartMagneticDiskType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartMagneticDiskType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m10800,qx,3391l,18209qy10800,21600,21600,18209l21600,3391qy10800,xem,3391nfqy10800,6782,21600,3391e");
|
||||
LoadConnectorsList(_T("10800,6782;10800,0;0,10800;10800,21600;21600,10800"));
|
||||
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(180);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
LoadTextRect(_T("0,6782,21600,18209"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartMagneticDrumType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartMagneticDrumType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m21600,10800qy18019,21600l3581,21600qx,10800,3581,l18019,qx21600,10800xem18019,21600nfqx14438,10800,18019,e");
|
||||
LoadConnectorsList(_T("10800,0;0,10800;10800,21600;14438,10800;21600,10800"));
|
||||
|
||||
m_arConnectorAngles.Add(270);
|
||||
m_arConnectorAngles.Add(180);
|
||||
m_arConnectorAngles.Add(90);
|
||||
m_arConnectorAngles.Add(0);
|
||||
m_arConnectorAngles.Add(0);
|
||||
|
||||
LoadTextRect(_T("3581,0,14438,21600"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartMagneticTapeType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartMagneticTapeType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("ar,,21600,21600,18685,18165,10677,21597l20990,21597r,-3432xe");
|
||||
LoadConnectorsList(_T("Rectangle"));
|
||||
LoadTextRect(_T("3163,3163,18437,18437"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartManualInputType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartManualInputType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,4292l21600,r,21600l,21600xe");
|
||||
|
||||
LoadConnectorsList(_T("10800,2146;0,10800;10800,21600;21600,10800"));
|
||||
LoadTextRect(_T("0,4291,21600,21600"));
|
||||
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartManualOperationType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartManualOperationType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,l21600,,17240,21600r-12880,xe");
|
||||
|
||||
LoadConnectorsList(_T("10800,0;2180,10800;10800,21600;19420,10800"));
|
||||
LoadTextRect(_T("4321,0,17204,21600"));
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartMergeType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartMergeType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m,l21600,,10800,21600xe");
|
||||
LoadConnectorsList(_T("10800,0;5400,10800;10800,21600;16200,10800"));
|
||||
LoadTextRect(_T("5400,0,16200,10800"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartMultidocumentType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartMultidocumentType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = false;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,20465v810,317,1620,452,2397,725c3077,21325,3790,21417,4405,21597v1620,,2202,-180,2657,-272c7580,21280,8002,21010,8455,20917v422,-135,810,-405,1327,-542c10205,20150,10657,19967,11080,19742v517,-182,970,-407,1425,-590c13087,19017,13605,18745,14255,18610v615,-180,1262,-318,1942,-408c16975,18202,17785,18022,18595,18022r,-1670l19192,16252r808,l20000,14467r722,-75l21597,14392,21597,,2972,r,1815l1532,1815r,1860l,3675,,20465xem1532,3675nfl18595,3675r,12677em2972,1815nfl20000,1815r,12652e");
|
||||
|
||||
LoadConnectorsList(_T("10800,0;0,10800;10800,19890;21600,10800"));
|
||||
LoadTextRect(_T("0,3675,18595,18022"));
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartOffpageConnectorType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartOffpageConnectorType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m,l21600,r,17255l10800,21600,,17255xe");
|
||||
LoadConnectorsList(_T("Rectangle"));
|
||||
LoadTextRect(_T("0,0,21600,17255"));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartOnlineStorageType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartOnlineStorageType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m3600,21597c2662,21202,1837,20075,1087,18440,487,16240,75,13590,,10770,75,8007,487,5412,1087,3045,1837,1465,2662,337,3600,l21597,v-937,337,-1687,1465,-2512,3045c18485,5412,18072,8007,17997,10770v75,2820,488,5470,1088,7670c19910,20075,20660,21202,21597,21597xe");
|
||||
LoadConnectorsList(_T("10800,0;0,10800;10800,21600;17997,10800"));
|
||||
LoadTextRect(_T("3600,0,17997,21600"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartOrType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartOrType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
m_strPath = _T("m10800,qx,10800,10800,21600,21600,10800,10800,xem,10800nfl21600,10800em10800,nfl10800,21600e");
|
||||
LoadConnectorsList(_T("10800,0;3163,3163;0,10800;3163,18437;10800,21600;18437,18437;21600,10800;18437,3163"));
|
||||
LoadTextRect(_T("3163,3163,18437,18437"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartPredefinedProcessType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartPredefinedProcessType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m,l,21600r21600,l21600,xem2610,nfl2610,21600em18990,nfl18990,21600e");
|
||||
|
||||
LoadConnectorsList(_T("Rectangle"));
|
||||
LoadTextRect(_T("2610,0,18990,21600"));
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "../PPTShape.h"
|
||||
|
||||
|
||||
class CFlowChartPreparationType : public CPPTShape
|
||||
{
|
||||
public:
|
||||
CFlowChartPreparationType()
|
||||
|
||||
{
|
||||
m_bConcentricFill = true;
|
||||
m_eJoin = NSOfficeDrawing::lineJoinMiter;
|
||||
|
||||
m_strPath = _T("m4353,l17214,r4386,10800l17214,21600r-12861,l,10800xe");
|
||||
|
||||
LoadConnectorsList(_T("Rectangle"));
|
||||
LoadTextRect(_T("4353,0,17214,21600"));
|
||||
}
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user