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

git-svn-id:...

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@55666 954022d7-b5bf-4e40-9824-e11837661b57
parent 7de1f7ff
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
Version="8,00" Version="8,00"
Name="ASCOfficeOdfFileW" Name="ASCOfficeOdfFileW"
ProjectGUID="{6258296E-ABCE-4BC6-9F4A-8522CD615603}" ProjectGUID="{6258296E-ABCE-4BC6-9F4A-8522CD615603}"
RootNamespace="ASCOfficeOdfFileW"
Keyword="AtlProj" Keyword="AtlProj"
> >
<Platforms> <Platforms>
...@@ -203,7 +204,7 @@ ...@@ -203,7 +204,7 @@
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;../Redist&quot;" CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;../Redist&quot;&#x0D;&#x0A;"
/> />
</Configuration> </Configuration>
</Configurations> </Configurations>
......
...@@ -1162,6 +1162,10 @@ ...@@ -1162,6 +1162,10 @@
<Filter <Filter
Name="odf_shapes_defines" Name="odf_shapes_defines"
> >
<File
RelativePath=".\OdfFormat\shapes\odf_shape_mapping.h"
>
</File>
<File <File
RelativePath=".\OdfFormat\oox_shape_defines.cpp" RelativePath=".\OdfFormat\oox_shape_defines.cpp"
> >
...@@ -1171,23 +1175,59 @@ ...@@ -1171,23 +1175,59 @@
> >
</File> </File>
<File <File
RelativePath=".\OdfFormat\shapes\oox_shapeMathMultiply.h" RelativePath=".\OdfFormat\shapes\oox_shapeAccentCallouts.h"
> >
</File> </File>
<File <File
RelativePath=".\OdfFormat\shapes\oox_shapeSnipRoundRects.h" RelativePath=".\OdfFormat\shapes\oox_shapeActionButtons.h"
> >
</File> </File>
<File <File
RelativePath=".\OdfFormat\shapes\oox_shapeStars.h" RelativePath=".\OdfFormat\shapes\oox_shapeArrows.h"
>
</File>
<File
RelativePath=".\OdfFormat\shapes\oox_shapeBents.h"
>
</File>
<File
RelativePath=".\OdfFormat\shapes\oox_shapeCallouts.h"
>
</File>
<File
RelativePath=".\OdfFormat\shapes\oox_shapeCharts.h"
>
</File>
<File
RelativePath=".\OdfFormat\shapes\oox_shapeCurvedArrows.h"
> >
</File> </File>
<File <File
RelativePath=".\OdfFormat\shapes\oox_shapeSun.h" RelativePath=".\OdfFormat\shapes\oox_shapeCurvedConnectors.h"
> >
</File> </File>
<File <File
RelativePath=".\Oox2OdfConverter\shape_types_mapping.h" RelativePath=".\OdfFormat\shapes\oox_shapeCustoms.h"
>
</File>
<File
RelativePath=".\OdfFormat\shapes\oox_shapeMaths.h"
>
</File>
<File
RelativePath=".\OdfFormat\shapes\oox_shapePrimitives.h"
>
</File>
<File
RelativePath=".\OdfFormat\shapes\oox_shapeRibbons.h"
>
</File>
<File
RelativePath=".\OdfFormat\shapes\oox_shapeSnipRoundRects.h"
>
</File>
<File
RelativePath=".\OdfFormat\shapes\oox_shapeStars.h"
> >
</File> </File>
</Filter> </Filter>
......
...@@ -14,7 +14,7 @@ static const _sh_typ Shape_Types_Mapping[] = // index === OOX::Drawing::EShapeTy ...@@ -14,7 +14,7 @@ static const _sh_typ Shape_Types_Mapping[] = // index === OOX::Drawing::EShapeTy
{ L"mso-spt44" , 7}, // shapetypeAccentCallout1, { L"mso-spt44" , 7}, // shapetypeAccentCallout1,
{ L"mso-spt45" , 7}, // shapetypeAccentCallout2, { L"mso-spt45" , 7}, // shapetypeAccentCallout2,
{ L"mso-spt46" , 7}, // shapetypeAccentCallout3, { L"mso-spt46" , 7}, // shapetypeAccentCallout3,
{ L"mso-spt194" , 7}, // shapetypeActionButtonBackPrevious, { L"actionButtonBackPrevious" , 7}, // shapetypeActionButtonBackPrevious, //mso-spt194
{ L"mso-spt196" , 7}, // shapetypeActionButtonBeginning, { L"mso-spt196" , 7}, // shapetypeActionButtonBeginning,
{ L"mso-spt189" , 7}, // shapetypeActionButtonBlank, { L"mso-spt189" , 7}, // shapetypeActionButtonBlank,
{ L"mso-spt198" , 7}, // shapetypeActionButtonDocument, { L"mso-spt198" , 7}, // shapetypeActionButtonDocument,
...@@ -52,7 +52,7 @@ static const _sh_typ Shape_Types_Mapping[] = // index === OOX::Drawing::EShapeTy ...@@ -52,7 +52,7 @@ static const _sh_typ Shape_Types_Mapping[] = // index === OOX::Drawing::EShapeTy
{ L"circular-arrow" , 7}, // shapetypeCircularArrow, { L"circular-arrow" , 7}, // shapetypeCircularArrow,
{ L"cloud" , 7}, // shapetypeCloud, { L"cloud" , 7}, // shapetypeCloud,
{ L"cloud-callout" , 7}, // shapetypeCloudCallout, { L"cloud-callout" , 7}, // shapetypeCloudCallout,
{ L"actionButtonBackPrevious" , 7}, // shapetypeCorner, { L"" , 7}, // shapetypeCorner,
{ L"" , 7}, // shapetypeCornerTabs, { L"" , 7}, // shapetypeCornerTabs,
{ L"cube" , 7}, // shapetypeCube, { L"cube" , 7}, // shapetypeCube,
{ L"mso-spt37" , 7}, // shapetypeCurvedConnector2, { L"mso-spt37" , 7}, // shapetypeCurvedConnector2,
...@@ -104,7 +104,7 @@ static const _sh_typ Shape_Types_Mapping[] = // index === OOX::Drawing::EShapeTy ...@@ -104,7 +104,7 @@ static const _sh_typ Shape_Types_Mapping[] = // index === OOX::Drawing::EShapeTy
{ L"flowchart-summing-junction" , 7}, // shapetypeFlowChartSummingJunction, { L"flowchart-summing-junction" , 7}, // shapetypeFlowChartSummingJunction,
{ L"flowchart-terminator" , 7}, // shapetypeFlowChartTerminator, { L"flowchart-terminator" , 7}, // shapetypeFlowChartTerminator,
{ L"paper" , 7}, // shapetypeFoldedCorner, { L"paper" , 7}, // shapetypeFoldedCorner,
{ L"frame" , 1}, // shapetypeFrame, { L"frame" , 7}, // shapetypeFrame,
{ L"" , 7}, // shapetypeFunnel, { L"" , 7}, // shapetypeFunnel,
{ L"" , 7}, // shapetypeGear6, { L"" , 7}, // shapetypeGear6,
{ L"" , 7}, // shapetypeGear9, { L"" , 7}, // shapetypeGear9,
...@@ -114,8 +114,8 @@ static const _sh_typ Shape_Types_Mapping[] = // index === OOX::Drawing::EShapeTy ...@@ -114,8 +114,8 @@ static const _sh_typ Shape_Types_Mapping[] = // index === OOX::Drawing::EShapeTy
{ L"hexagon" , 7}, // shapetypeHexagon, { L"hexagon" , 7}, // shapetypeHexagon,
{ L"pentagon-right" , 7}, // shapetypeHomePlate, { L"pentagon-right" , 7}, // shapetypeHomePlate,
{ L"horizontal-scroll" , 7}, // shapetypeHorizontalScroll, { L"horizontal-scroll" , 7}, // shapetypeHorizontalScroll,
{ L"mso-spt59" , 7}, // shapetypeIrregularSeal1, { L"" , 7}, // shapetypeIrregularSeal1,
{ L"mso-spt60" , 7}, // shapetypeIrregularSeal2, { L"" , 7}, // shapetypeIrregularSeal2,
{ L"left-arrow" , 7}, // shapetypeLeftArrow, { L"left-arrow" , 7}, // shapetypeLeftArrow,
{ L"left-arrow-callout" , 7}, // shapetypeLeftArrowCallout, { L"left-arrow-callout" , 7}, // shapetypeLeftArrowCallout,
{ L"left-brace" , 7}, // shapetypeLeftBrace, { L"left-brace" , 7}, // shapetypeLeftBrace,
...@@ -169,13 +169,13 @@ static const _sh_typ Shape_Types_Mapping[] = // index === OOX::Drawing::EShapeTy ...@@ -169,13 +169,13 @@ static const _sh_typ Shape_Types_Mapping[] = // index === OOX::Drawing::EShapeTy
{ L"" , 7}, // shapetypeSnipRoundRect, { L"" , 7}, // shapetypeSnipRoundRect,
{ L"" , 7}, // shapetypeSquareTabs, { L"" , 7}, // shapetypeSquareTabs,
{ L"" , 7}, // shapetypeStar10, { L"" , 7}, // shapetypeStar10,
{ L"star12" , 7}, // shapetypeStar12, { L"" , 7}, // shapetypeStar12,
{ L"" , 7}, // shapetypeStar16, { L"" , 7}, // shapetypeStar16,
{ L"star24" , 7}, // shapetypeStar24, { L"star24" , 7}, // shapetypeStar24, //mso-spt59
{ L"" , 7}, // shapetypeStar32, { L"mso-spt60" , 7}, // shapetypeStar32,
{ L"star4" , 7}, // shapetypeStar4, { L"star4" , 7}, // shapetypeStar4,
{ L"star5" , 7}, // shapetypeStar5, { L"star5" , 7}, // shapetypeStar5,
{ L"star6" , 7}, // shapetypeStar6, { L"" , 7}, // shapetypeStar6,
{ L"" , 7}, // shapetypeStar7, { L"" , 7}, // shapetypeStar7,
{ L"star8" , 7}, // shapetypeStar8, { L"star8" , 7}, // shapetypeStar8,
{ L"mso-spt32" , 7}, // shapetypeStraightConnector1, { L"mso-spt32" , 7}, // shapetypeStraightConnector1,
......
// shapetypeAccentBorderCallout1,
// shapetypeAccentBorderCallout2,
// shapetypeAccentBorderCallout3,
// shapetypeLeftCircularArrow,
// shapetypeLeftRightCircularArrow,
// shapetypeSwooshArrow,
\ No newline at end of file
// shapetypeChartPlus,
// shapetypeChartStar,
// shapetypeChartX,
\ No newline at end of file
#include "..\oox_shape_defines.h" #include "..\oox_shape_defines.h"
// shapetypeIrregularSeal1,
// shapetypeIrregularSeal2,
// + // shapetypeSun,
// shapetypeWave,
namespace cpdoccore namespace cpdoccore
{ {
class oox_shape_sun : public oox_shape class oox_shape_sun : public oox_shape
...@@ -7,6 +10,8 @@ class oox_shape_sun : public oox_shape ...@@ -7,6 +10,8 @@ class oox_shape_sun : public oox_shape
public: public:
oox_shape_sun() oox_shape_sun()
{ {
odf_type_name =L"ooxml-sun";
modifiers = L"23520"; modifiers = L"23520";
enhanced_path = L"M ?f3 ?f8 L ?f41 ?f57 ?f41 ?f53 Z M ?f31 ?f32 L ?f42 ?f52 ?f43 ?f51 Z M ?f11 ?f4 L ?f44 ?f50 ?f40 ?f50 Z M ?f33 ?f32 L ?f39 ?f51 ?f38 ?f52 Z M ?f2 ?f8 L ?f37 ?f53 ?f37 ?f57 Z M ?f33 ?f34 L ?f38 ?f56 ?f39 ?f55 Z M ?f11 ?f5 L ?f40 ?f54 ?f44 ?f54 Z M ?f31 ?f34 L ?f43 ?f55 ?f42 ?f56 Z M ?f45 ?f8 A ?f97 ?f98 ?f99 ?f100 ?f45 ?f8 ?f94 ?f96 W ?f101 ?f102 ?f103 ?f104 ?f45 ?f8 ?f94 ?f96 Z N"; enhanced_path = L"M ?f3 ?f8 L ?f41 ?f57 ?f41 ?f53 Z M ?f31 ?f32 L ?f42 ?f52 ?f43 ?f51 Z M ?f11 ?f4 L ?f44 ?f50 ?f40 ?f50 Z M ?f33 ?f32 L ?f39 ?f51 ?f38 ?f52 Z M ?f2 ?f8 L ?f37 ?f53 ?f37 ?f57 Z M ?f33 ?f34 L ?f38 ?f56 ?f39 ?f55 Z M ?f11 ?f5 L ?f40 ?f54 ?f44 ?f54 Z M ?f31 ?f34 L ?f43 ?f55 ?f42 ?f56 Z M ?f45 ?f8 A ?f97 ?f98 ?f99 ?f100 ?f45 ?f8 ?f94 ?f96 W ?f101 ?f102 ?f103 ?f104 ?f45 ?f8 ?f94 ?f96 Z N";
text_areas = L"?f36 ?f49 ?f35 ?f48"; text_areas = L"?f36 ?f49 ?f35 ?f48";
......
#include "..\oox_shape_defines.h" #include "..\oox_shape_defines.h"
// shapetypeMathDivide,
// shapetypeMathEqual,
// shapetypeMathMinus,
//+ // shapetypeMathMultiply,
// shapetypeMathNotEqual,
namespace cpdoccore namespace cpdoccore
{ {
class oox_shape_mathMultiply : public oox_shape class oox_shape_mathMultiply : public oox_shape
...@@ -7,6 +11,8 @@ class oox_shape_mathMultiply : public oox_shape ...@@ -7,6 +11,8 @@ class oox_shape_mathMultiply : public oox_shape
public: public:
oox_shape_mathMultiply() oox_shape_mathMultiply()
{ {
odf_type_name =L"ooxml-mathMultiply";
modifiers = L"23520"; modifiers = L"23520";
enhanced_path = L"M ?f40 ?f41 L ?f42 ?f43 ?f11 ?f46 ?f47 ?f43 ?f48 ?f41 ?f51 ?f8 ?f48 ?f53 ?f47 ?f54 ?f11 ?f55 ?f42 ?f54 ?f40 ?f53 ?f52 ?f8 Z N"; enhanced_path = L"M ?f40 ?f41 L ?f42 ?f43 ?f11 ?f46 ?f47 ?f43 ?f48 ?f41 ?f51 ?f8 ?f48 ?f53 ?f47 ?f54 ?f11 ?f55 ?f42 ?f54 ?f40 ?f53 ?f52 ?f8 Z N";
text_areas = L"?f36 ?f49 ?f35 ?f48"; text_areas = L"?f36 ?f49 ?f35 ?f48";
......
// shapetypeArc,
// shapetypeChord,
// shapetypeCorner,
// shapetypeCornerTabs,
// shapetypeDecagon,
// shapetypeDiagStripe,
// shapetypeDodecagon,
// shapetypeDoubleWave,
// shapetypeFunnel,
// shapetypeGear6,
// shapetypeGear9,
// shapetypeHalfFrame,
// shapetypeHeptagon,
// shapetypeNonIsoscelesTrapezoid,
// shapetypePie,
// shapetypePieWedge,
// shapetypePlaque,
// shapetypePlaqueTabs,
// shapetypeSquareTabs,
// shapetypeTeardrop,
//{ L"" , 7}, // shapetypeLeftRightRibbon,
\ No newline at end of file
...@@ -7,6 +7,8 @@ class oox_shape_snip1Rect : public oox_shape ...@@ -7,6 +7,8 @@ class oox_shape_snip1Rect : public oox_shape
public: public:
oox_shape_snip1Rect() oox_shape_snip1Rect()
{ {
odf_type_name =L"ooxml-snip1Rect";
modifiers = L"16667"; modifiers = L"16667";
enhanced_path = L"M ?f0 ?f2 L ?f9 ?f2 ?f1 ?f8 ?f1 ?f3 ?f0 ?f3 Z N"; enhanced_path = L"M ?f0 ?f2 L ?f9 ?f2 ?f1 ?f8 ?f1 ?f3 ?f0 ?f3 Z N";
text_areas = L"?f0 ?f10 ?f11 ?f3"; text_areas = L"?f0 ?f10 ?f11 ?f3";
...@@ -31,6 +33,8 @@ class oox_shape_snip2DiagRect : public oox_shape ...@@ -31,6 +33,8 @@ class oox_shape_snip2DiagRect : public oox_shape
public: public:
oox_shape_snip2DiagRect() oox_shape_snip2DiagRect()
{ {
odf_type_name =L"ooxml-snip2DiagRect";
modifiers = L"0 16667"; modifiers = L"0 16667";
enhanced_path = L"M ?f9 ?f2 L ?f13 ?f2 ?f1 ?f12 ?f1 ?f11 ?f10 ?f3 ?f12 ?f3 ?f0 ?f14 ?f0 ?f9 Z N"; enhanced_path = L"M ?f9 ?f2 L ?f13 ?f2 ?f1 ?f12 ?f1 ?f11 ?f10 ?f3 ?f12 ?f3 ?f0 ?f14 ?f0 ?f9 Z N";
text_areas = L"?f17 ?f17 ?f18 ?f19"; text_areas = L"?f17 ?f17 ?f18 ?f19";
...@@ -63,6 +67,8 @@ class oox_shape_snip2SameRect : public oox_shape ...@@ -63,6 +67,8 @@ class oox_shape_snip2SameRect : public oox_shape
public: public:
oox_shape_snip2SameRect() oox_shape_snip2SameRect()
{ {
odf_type_name =L"ooxml-snip2SameRect";
modifiers = L"16667 0"; modifiers = L"16667 0";
enhanced_path = L"M ?f9 ?f2 L ?f10 ?f2 ?f1 ?f9 ?f1 ?f13 ?f12 ?f3 ?f11 ?f3 ?f0 ?f13 ?f0 ?f9 Z N"; enhanced_path = L"M ?f9 ?f2 L ?f10 ?f2 ?f1 ?f9 ?f1 ?f13 ?f12 ?f3 ?f11 ?f3 ?f0 ?f13 ?f0 ?f9 Z N";
text_areas = L"?f16 ?f18 ?f17 ?f19"; text_areas = L"?f16 ?f18 ?f17 ?f19";
...@@ -95,6 +101,8 @@ class oox_shape_snipRoundRect : public oox_shape ...@@ -95,6 +101,8 @@ class oox_shape_snipRoundRect : public oox_shape
public: public:
oox_shape_snipRoundRect() oox_shape_snipRoundRect()
{ {
odf_type_name =L"ooxml-snipRoundRect";
modifiers = L"16667 16667"; modifiers = L"16667 16667";
enhanced_path = L"M ?f12 ?f4 L ?f14 ?f4 ?f3 ?f13 ?f3 ?f5 ?f2 ?f5 ?f2 ?f12 A ?f56 ?f57 ?f58 ?f59 ?f2 ?f12 ?f53 ?f55 W ?f60 ?f61 ?f62 ?f63 ?f2 ?f12 ?f53 ?f55 Z N"; enhanced_path = L"M ?f12 ?f4 L ?f14 ?f4 ?f3 ?f13 ?f3 ?f5 ?f2 ?f5 ?f2 ?f12 A ?f56 ?f57 ?f58 ?f59 ?f2 ?f12 ?f53 ?f55 W ?f60 ?f61 ?f62 ?f63 ?f2 ?f12 ?f53 ?f55 Z N";
text_areas = L"?f15 ?f15 ?f16 ?f5"; text_areas = L"?f15 ?f15 ?f16 ?f5";
...@@ -171,6 +179,8 @@ class oox_shape_round1Rect : public oox_shape ...@@ -171,6 +179,8 @@ class oox_shape_round1Rect : public oox_shape
public: public:
oox_shape_round1Rect() oox_shape_round1Rect()
{ {
odf_type_name =L"ooxml-round1Rect";
modifiers = L"16667"; modifiers = L"16667";
enhanced_path = L"M ?f3 ?f5 L ?f13 ?f5 A ?f55 ?f56 ?f57 ?f58 ?f13 ?f5 ?f52 ?f54 W ?f59 ?f60 ?f61 ?f62 ?f13 ?f5 ?f52 ?f54 L ?f4 ?f6 ?f3 ?f6 Z N"; enhanced_path = L"M ?f3 ?f5 L ?f13 ?f5 A ?f55 ?f56 ?f57 ?f58 ?f13 ?f5 ?f52 ?f54 W ?f59 ?f60 ?f61 ?f62 ?f13 ?f5 ?f52 ?f54 L ?f4 ?f6 ?f3 ?f6 Z N";
text_areas = L"?f3 ?f5 ?f15 ?f6"; text_areas = L"?f3 ?f5 ?f15 ?f6";
...@@ -246,6 +256,8 @@ class oox_shape_round2DiagRect : public oox_shape ...@@ -246,6 +256,8 @@ class oox_shape_round2DiagRect : public oox_shape
public: public:
oox_shape_round2DiagRect() oox_shape_round2DiagRect()
{ {
odf_type_name =L"ooxml-round2DiagRect";
modifiers = L"16667 0"; modifiers = L"16667 0";
enhanced_path = L"M ?f13 ?f5 L ?f16 ?f5 A ?f62 ?f63 ?f64 ?f65 ?f16 ?f5 ?f59 ?f61 W ?f66 ?f67 ?f68 ?f69 ?f16 ?f5 ?f59 ?f61 L ?f4 ?f14 A ?f105 ?f106 ?f107 ?f108 ?f4 ?f14 ?f102 ?f104 W ?f109 ?f110 ?f111 ?f112 ?f4 ?f14 ?f102 ?f104 L ?f15 ?f6 A ?f148 ?f149 ?f150 ?f151 ?f15 ?f6 ?f145 ?f147 W ?f152 ?f153 ?f154 ?f155 ?f15 ?f6 ?f145 ?f147 L ?f3 ?f13 A ?f191 ?f192 ?f193 ?f194 ?f3 ?f13 ?f188 ?f190 W ?f195 ?f196 ?f197 ?f198 ?f3 ?f13 ?f188 ?f190 Z N"; enhanced_path = L"M ?f13 ?f5 L ?f16 ?f5 A ?f62 ?f63 ?f64 ?f65 ?f16 ?f5 ?f59 ?f61 W ?f66 ?f67 ?f68 ?f69 ?f16 ?f5 ?f59 ?f61 L ?f4 ?f14 A ?f105 ?f106 ?f107 ?f108 ?f4 ?f14 ?f102 ?f104 W ?f109 ?f110 ?f111 ?f112 ?f4 ?f14 ?f102 ?f104 L ?f15 ?f6 A ?f148 ?f149 ?f150 ?f151 ?f15 ?f6 ?f145 ?f147 W ?f152 ?f153 ?f154 ?f155 ?f15 ?f6 ?f145 ?f147 L ?f3 ?f13 A ?f191 ?f192 ?f193 ?f194 ?f3 ?f13 ?f188 ?f190 W ?f195 ?f196 ?f197 ?f198 ?f3 ?f13 ?f188 ?f190 Z N";
text_areas = L"?f20 ?f20 ?f21 ?f22"; text_areas = L"?f20 ?f20 ?f21 ?f22";
...@@ -457,6 +469,8 @@ class oox_shape_round2SameRect : public oox_shape ...@@ -457,6 +469,8 @@ class oox_shape_round2SameRect : public oox_shape
public: public:
oox_shape_round2SameRect() oox_shape_round2SameRect()
{ {
odf_type_name =L"ooxml-round2SameRect";
modifiers = L"16667 0"; modifiers = L"16667 0";
enhanced_path = L"M ?f13 ?f5 L ?f14 ?f5 A ?f62 ?f63 ?f64 ?f65 ?f14 ?f5 ?f59 ?f61 W ?f66 ?f67 ?f68 ?f69 ?f14 ?f5 ?f59 ?f61 L ?f4 ?f16 A ?f105 ?f106 ?f107 ?f108 ?f4 ?f16 ?f102 ?f104 W ?f109 ?f110 ?f111 ?f112 ?f4 ?f16 ?f102 ?f104 L ?f15 ?f6 A ?f148 ?f149 ?f150 ?f151 ?f15 ?f6 ?f145 ?f147 W ?f152 ?f153 ?f154 ?f155 ?f15 ?f6 ?f145 ?f147 L ?f3 ?f13 A ?f191 ?f192 ?f193 ?f194 ?f3 ?f13 ?f188 ?f190 W ?f195 ?f196 ?f197 ?f198 ?f3 ?f13 ?f188 ?f190 Z N"; enhanced_path = L"M ?f13 ?f5 L ?f14 ?f5 A ?f62 ?f63 ?f64 ?f65 ?f14 ?f5 ?f59 ?f61 W ?f66 ?f67 ?f68 ?f69 ?f14 ?f5 ?f59 ?f61 L ?f4 ?f16 A ?f105 ?f106 ?f107 ?f108 ?f4 ?f16 ?f102 ?f104 W ?f109 ?f110 ?f111 ?f112 ?f4 ?f16 ?f102 ?f104 L ?f15 ?f6 A ?f148 ?f149 ?f150 ?f151 ?f15 ?f6 ?f145 ?f147 W ?f152 ?f153 ?f154 ?f155 ?f15 ?f6 ?f145 ?f147 L ?f3 ?f13 A ?f191 ?f192 ?f193 ?f194 ?f3 ?f13 ?f188 ?f190 W ?f195 ?f196 ?f197 ?f198 ?f3 ?f13 ?f188 ?f190 Z N";
text_areas = L"?f20 ?f18 ?f21 ?f22"; text_areas = L"?f20 ?f18 ?f21 ?f22";
......
...@@ -2,11 +2,70 @@ ...@@ -2,11 +2,70 @@
namespace cpdoccore namespace cpdoccore
{ {
class oox_shape_star6 : public oox_shape
{
public:
oox_shape_star6()
{
odf_type_name =L"ooxml-star6";
modifiers = L"28868 0";
enhanced_path = L"M ?f22 ?f8 L ?f29 ?f38 ?f12 ?f4 ?f30 ?f38 ?f23 ?f8 ?f31 ?f9 ?f23 ?f24 ?f30 ?f39 ?f12 ?f5 ?f29 ?f39 ?f22 ?f24 ?f28 ?f9 Z N";
text_areas = L"?f28 ?f38 ?f31 ?f39";
view_box = L"0 0 21600 21600";
glue_points = L"?f23 ?f8 ?f23 ?f24 ?f22 ?f24 ?f22 ?f8";
add(L"f0", L"10800000");
add(L"f1", L"5400000");
add(L"f2", L"left");
add(L"f3", L"right");
add(L"f4", L"top");
add(L"f5", L"bottom");
add(L"f6", L"?f5 - ?f4");
add(L"f7", L"?f6 / 2");
add(L"f8", L"?f6 / 4");
add(L"f9", L"?f4 + ?f7");
add(L"f10", L"?f3 - ?f2");
add(L"f11", L"?f10 / 2");
add(L"f12", L"?f2 + ?f11");
add(L"f13", L"5419351 / 1725033");
add(L"f14", L"$0");
add(L"f15", L"?f11 * ?f40 / 100000");
add(L"f16", L"1800000 + ?f1");
add(L"f17", L"?f16 * ?f13 / ?f0");
add(L"f18", L"0 - ?f17");
add(L"f19", L"sin(?f18)");
add(L"f20", L"0 - ?f19");
add(L"f21", L"?f20 * ?f15");
add(L"f22", L"?f12 - ?f21");
add(L"f23", L"?f12 + ?f21");
add(L"f24", L"?f9 + ?f8");
add(L"f25", L"?f15 * ?f14 / 50000");
add(L"f26", L"?f7 * ?f14 / 50000");
add(L"f27", L"?f25 / 2");
add(L"f28", L"?f12 - ?f25");
add(L"f29", L"?f12 - ?f27");
add(L"f30", L"?f12 + ?f27");
add(L"f31", L"?f12 + ?f25");
add(L"f32", L"3600000 + ?f1");
add(L"f33", L"?f32 * ?f13 / ?f0");
add(L"f34", L"0 - ?f33");
add(L"f35", L"cos(?f34)");
add(L"f36", L"0 - ?f35");
add(L"f37", L"?f36 * ?f26");
add(L"f38", L"?f9 - ?f37");
add(L"f39", L"?f9 + ?f37");
add(L"f40", L"115470");
}
};
class oox_shape_star7 : public oox_shape class oox_shape_star7 : public oox_shape
{ {
public: public:
oox_shape_star7() oox_shape_star7()
{ {
odf_type_name =L"ooxml-star7";
modifiers = L"34601 0 0"; modifiers = L"34601 0 0";
enhanced_path = L"M ?f20 ?f27 L ?f34 ?f44 ?f21 ?f26 ?f36 ?f43 ?f9 ?f2 ?f37 ?f43 ?f24 ?f26 ?f39 ?f44 ?f25 ?f27 ?f38 ?f45 ?f23 ?f28 ?f9 ?f46 ?f22 ?f28 ?f35 ?f45 Z N"; enhanced_path = L"M ?f20 ?f27 L ?f34 ?f44 ?f21 ?f26 ?f36 ?f43 ?f9 ?f2 ?f37 ?f43 ?f24 ?f26 ?f39 ?f44 ?f25 ?f27 ?f38 ?f45 ?f23 ?f28 ?f9 ?f46 ?f22 ?f28 ?f35 ?f45 Z N";
text_areas = L"?f35 ?f43 ?f38 ?f45"; text_areas = L"?f35 ?f43 ?f38 ?f45";
...@@ -70,6 +129,8 @@ class oox_shape_star10 : public oox_shape ...@@ -70,6 +129,8 @@ class oox_shape_star10 : public oox_shape
public: public:
oox_shape_star10() oox_shape_star10()
{ {
odf_type_name =L"ooxml-star10";
modifiers = L"42533 0"; modifiers = L"42533 0";
enhanced_path = L"M ?f14 ?f21 L ?f31 ?f37 ?f15 ?f20 ?f32 ?f36 ?f9 ?f2 ?f33 ?f36 ?f16 ?f20 ?f34 ?f37 ?f17 ?f21 ?f35 ?f6 ?f17 ?f22 ?f34 ?f38 ?f16 ?f23 ?f33 ?f39 ?f9 ?f3 ?f32 ?f39 ?f15 ?f23 ?f31 ?f38 ?f14 ?f22 ?f30 ?f6 Z N"; enhanced_path = L"M ?f14 ?f21 L ?f31 ?f37 ?f15 ?f20 ?f32 ?f36 ?f9 ?f2 ?f33 ?f36 ?f16 ?f20 ?f34 ?f37 ?f17 ?f21 ?f35 ?f6 ?f17 ?f22 ?f34 ?f38 ?f16 ?f23 ?f33 ?f39 ?f9 ?f3 ?f32 ?f39 ?f15 ?f23 ?f31 ?f38 ?f14 ?f22 ?f30 ?f6 Z N";
text_areas = L"?f31 ?f37 ?f34 ?f38"; text_areas = L"?f31 ?f37 ?f34 ?f38";
...@@ -121,11 +182,104 @@ public: ...@@ -121,11 +182,104 @@ public:
} }
}; };
class oox_shape_star12 : public oox_shape
{
public:
oox_shape_star12()
{
odf_type_name =L"ooxml-star12";
modifiers = L"37500";
enhanced_path = L"M ?f2 ?f9 L ?f63 ?f71 ?f28 ?f8 ?f64 ?f70 ?f12 ?f31 ?f65 ?f69 ?f13 ?f4 ?f66 ?f69 ?f29 ?f31 ?f67 ?f70 ?f30 ?f8 ?f68 ?f71 ?f3 ?f9 ?f68 ?f72 ?f30 ?f32 ?f67 ?f73 ?f29 ?f33 ?f66 ?f74 ?f13 ?f5 ?f65 ?f74 ?f12 ?f33 ?f64 ?f73 ?f28 ?f32 ?f63 ?f72 Z N";
text_areas = L"?f64 ?f70 ?f67 ?f73";
view_box = L"0 0 21600 21600";
glue_points = L"?f30 ?f8 ?f30 ?f32 ?f29 ?f33 ?f12 ?f33 ?f28 ?f32 ?f28 ?f8 ?f12 ?f31 ?f29 ?f31";
add(L"f0", L"10800000");
add(L"f1", L"5400000");
add(L"f2", L"left");
add(L"f3", L"right");
add(L"f4", L"top");
add(L"f5", L"bottom");
add(L"f6", L"?f5 - ?f4");
add(L"f7", L"?f6 / 2");
add(L"f8", L"?f6 / 4");
add(L"f9", L"?f4 + ?f7");
add(L"f10", L"?f3 - ?f2");
add(L"f11", L"?f10 / 2");
add(L"f12", L"?f10 / 4");
add(L"f13", L"?f2 + ?f11");
add(L"f14", L"5419351 / 1725033");
add(L"f15", L"$0");
add(L"f16", L"1800000 + ?f1");
add(L"f17", L"?f16 * ?f14 / ?f0");
add(L"f18", L"0 - ?f17");
add(L"f19", L"sin(?f18)");
add(L"f20", L"0 - ?f19");
add(L"f21", L"?f20 * ?f11");
add(L"f22", L"3600000 + ?f1");
add(L"f23", L"?f22 * ?f14 / ?f0");
add(L"f24", L"0 - ?f23");
add(L"f25", L"cos(?f24)");
add(L"f26", L"0 - ?f25");
add(L"f27", L"?f26 * ?f7");
add(L"f28", L"?f13 - ?f21");
add(L"f29", L"?f10 * 3 / 4");
add(L"f30", L"?f13 + ?f21");
add(L"f31", L"?f9 - ?f27");
add(L"f32", L"?f6 * 3 / 4");
add(L"f33", L"?f9 + ?f27");
add(L"f34", L"?f11 * ?f15 / 50000");
add(L"f35", L"?f7 * ?f15 / 50000");
add(L"f36", L"900000 + ?f1");
add(L"f37", L"?f36 * ?f14 / ?f0");
add(L"f38", L"0 - ?f37");
add(L"f39", L"sin(?f38)");
add(L"f40", L"0 - ?f39");
add(L"f41", L"?f40 * ?f34");
add(L"f42", L"2700000 + ?f1");
add(L"f43", L"?f42 * ?f14 / ?f0");
add(L"f44", L"0 - ?f43");
add(L"f45", L"sin(?f44)");
add(L"f46", L"0 - ?f45");
add(L"f47", L"?f46 * ?f34");
add(L"f48", L"4500000 + ?f1");
add(L"f49", L"?f48 * ?f14 / ?f0");
add(L"f50", L"0 - ?f49");
add(L"f51", L"sin(?f50)");
add(L"f52", L"0 - ?f51");
add(L"f53", L"?f52 * ?f34");
add(L"f54", L"cos(?f50)");
add(L"f55", L"0 - ?f54");
add(L"f56", L"?f55 * ?f35");
add(L"f57", L"cos(?f44)");
add(L"f58", L"0 - ?f57");
add(L"f59", L"?f58 * ?f35");
add(L"f60", L"cos(?f38)");
add(L"f61", L"0 - ?f60");
add(L"f62", L"?f61 * ?f35");
add(L"f63", L"?f13 - ?f41");
add(L"f64", L"?f13 - ?f47");
add(L"f65", L"?f13 - ?f53");
add(L"f66", L"?f13 + ?f53");
add(L"f67", L"?f13 + ?f47");
add(L"f68", L"?f13 + ?f41");
add(L"f69", L"?f9 - ?f56");
add(L"f70", L"?f9 - ?f59");
add(L"f71", L"?f9 - ?f62");
add(L"f72", L"?f9 + ?f62");
add(L"f73", L"?f9 + ?f59");
add(L"f74", L"?f9 + ?f56");
}
};
class oox_shape_star16 : public oox_shape class oox_shape_star16 : public oox_shape
{ {
public: public:
oox_shape_star16() oox_shape_star16()
{ {
odf_type_name =L"ooxml-star16";
modifiers = L"37500"; modifiers = L"37500";
enhanced_path = L"M ?f2 ?f8 L ?f42 ?f53 ?f20 ?f28 ?f43 ?f52 ?f21 ?f27 ?f44 ?f51 ?f22 ?f26 ?f45 ?f50 ?f11 ?f4 ?f46 ?f50 ?f23 ?f26 ?f47 ?f51 ?f24 ?f27 ?f48 ?f52 ?f25 ?f28 ?f49 ?f53 ?f3 ?f8 ?f49 ?f54 ?f25 ?f29 ?f48 ?f55 ?f24 ?f30 ?f47 ?f56 ?f23 ?f31 ?f46 ?f57 ?f11 ?f5 ?f45 ?f57 ?f22 ?f31 ?f44 ?f56 ?f21 ?f30 ?f43 ?f55 ?f20 ?f29 ?f42 ?f54 Z N"; enhanced_path = L"M ?f2 ?f8 L ?f42 ?f53 ?f20 ?f28 ?f43 ?f52 ?f21 ?f27 ?f44 ?f51 ?f22 ?f26 ?f45 ?f50 ?f11 ?f4 ?f46 ?f50 ?f23 ?f26 ?f47 ?f51 ?f24 ?f27 ?f48 ?f52 ?f25 ?f28 ?f49 ?f53 ?f3 ?f8 ?f49 ?f54 ?f25 ?f29 ?f48 ?f55 ?f24 ?f30 ?f47 ?f56 ?f23 ?f31 ?f46 ?f57 ?f11 ?f5 ?f45 ?f57 ?f22 ?f31 ?f44 ?f56 ?f21 ?f30 ?f43 ?f55 ?f20 ?f29 ?f42 ?f54 Z N";
text_areas = L"?f67 ?f68 ?f69 ?f70"; text_areas = L"?f67 ?f68 ?f69 ?f70";
...@@ -211,6 +365,8 @@ class oox_shape_star32 : public oox_shape ...@@ -211,6 +365,8 @@ class oox_shape_star32 : public oox_shape
public: public:
oox_shape_star32() oox_shape_star32()
{ {
odf_type_name =L"ooxml-star32";
modifiers = L"37500"; modifiers = L"37500";
enhanced_path = L"M ?f2 ?f8 L ?f81 ?f104 ?f35 ?f55 ?f82 ?f103 ?f36 ?f54 ?f83 ?f102 ?f37 ?f53 ?f84 ?f101 ?f38 ?f52 ?f85 ?f100 ?f39 ?f51 ?f86 ?f99 ?f40 ?f50 ?f87 ?f98 ?f41 ?f49 ?f88 ?f97 ?f11 ?f4 ?f89 ?f97 ?f42 ?f49 ?f90 ?f98 ?f43 ?f50 ?f91 ?f99 ?f44 ?f51 ?f92 ?f100 ?f45 ?f52 ?f93 ?f101 ?f46 ?f53 ?f94 ?f102 ?f47 ?f54 ?f95 ?f103 ?f48 ?f55 ?f96 ?f104 ?f3 ?f8 ?f96 ?f105 ?f48 ?f56 ?f95 ?f106 ?f47 ?f57 ?f94 ?f107 ?f46 ?f58 ?f93 ?f108 ?f45 ?f59 ?f92 ?f109 ?f44 ?f60 ?f91 ?f110 ?f43 ?f61 ?f90 ?f111 ?f42 ?f62 ?f89 ?f112 ?f11 ?f5 ?f88 ?f112 ?f41 ?f62 ?f87 ?f111 ?f40 ?f61 ?f86 ?f110 ?f39 ?f60 ?f85 ?f109 ?f38 ?f59 ?f84 ?f108 ?f37 ?f58 ?f83 ?f107 ?f36 ?f57 ?f82 ?f106 ?f35 ?f56 ?f81 ?f105 Z N"; enhanced_path = L"M ?f2 ?f8 L ?f81 ?f104 ?f35 ?f55 ?f82 ?f103 ?f36 ?f54 ?f83 ?f102 ?f37 ?f53 ?f84 ?f101 ?f38 ?f52 ?f85 ?f100 ?f39 ?f51 ?f86 ?f99 ?f40 ?f50 ?f87 ?f98 ?f41 ?f49 ?f88 ?f97 ?f11 ?f4 ?f89 ?f97 ?f42 ?f49 ?f90 ?f98 ?f43 ?f50 ?f91 ?f99 ?f44 ?f51 ?f92 ?f100 ?f45 ?f52 ?f93 ?f101 ?f46 ?f53 ?f94 ?f102 ?f47 ?f54 ?f95 ?f103 ?f48 ?f55 ?f96 ?f104 ?f3 ?f8 ?f96 ?f105 ?f48 ?f56 ?f95 ?f106 ?f47 ?f57 ?f94 ?f107 ?f46 ?f58 ?f93 ?f108 ?f45 ?f59 ?f92 ?f109 ?f44 ?f60 ?f91 ?f110 ?f43 ?f61 ?f90 ?f111 ?f42 ?f62 ?f89 ?f112 ?f11 ?f5 ?f88 ?f112 ?f41 ?f62 ?f87 ?f111 ?f40 ?f61 ?f86 ?f110 ?f39 ?f60 ?f85 ?f109 ?f38 ?f59 ?f84 ?f108 ?f37 ?f58 ?f83 ?f107 ?f36 ?f57 ?f82 ?f106 ?f35 ?f56 ?f81 ?f105 Z N";
text_areas = L"?f115 ?f116 ?f117 ?f118"; text_areas = L"?f115 ?f116 ?f117 ?f118";
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "draw_shapes.h" #include "draw_shapes.h"
#include "oox_shape_defines.h" #include "oox_shape_defines.h"
#include "shape_types_mapping.h" #include "Shapes\odf_shape_mapping.h"
#include "styles.h" #include "styles.h"
...@@ -38,7 +38,13 @@ struct odf_element_state ...@@ -38,7 +38,13 @@ struct odf_element_state
int level; int level;
}; };
enum _drawing_part
{
Unknown=0,
Area,
Line,
Shadow
};
struct odf_drawing_state struct odf_drawing_state
{ {
void clear() void clear()
...@@ -63,10 +69,19 @@ struct odf_drawing_state ...@@ -63,10 +69,19 @@ struct odf_drawing_state
path_last_command_ = L""; path_last_command_ = L"";
modifiers_ = L""; modifiers_ = L"";
fill_ = true; // .. area_type_fill_ = 0;
area_fill_ = L"";
area_opacity = boost::none;
oox_shape_preset = -1; line_type_fill_ = 0;
line_fill_ = L"";
line_opacity = boost::none;
shadow_type_fill_ = 0;
shadow_fill_ = L"";
shadow_opacity = boost::none;
oox_shape_preset = -1;
} }
std::vector<odf_element_state> elements_; std::vector<odf_element_state> elements_;
...@@ -88,7 +103,20 @@ struct odf_drawing_state ...@@ -88,7 +103,20 @@ struct odf_drawing_state
std::wstring path_last_command_; std::wstring path_last_command_;
std::wstring modifiers_; std::wstring modifiers_;
bool fill_; // ...
std::wstring area_fill_;
int area_type_fill_;
_CP_OPT(double) area_opacity;
std::wstring line_fill_;
int line_type_fill_;
_CP_OPT(double) line_opacity;
std::wstring shadow_fill_;
int shadow_type_fill_;
_CP_OPT(double) shadow_opacity;
///////////////////////
int oox_shape_preset; int oox_shape_preset;
}; };
...@@ -104,6 +132,7 @@ public: ...@@ -104,6 +132,7 @@ public:
std::vector<odf_drawing_state> drawing_list_;// .. "" std::vector<odf_drawing_state> drawing_list_;// .. ""
odf_drawing_state current_drawing_state_; odf_drawing_state current_drawing_state_;
_drawing_part current_drawing_part_;
std::vector<office_element_ptr> current_level_;// std::vector<office_element_ptr> current_level_;//
...@@ -186,13 +215,29 @@ void odf_drawing_context::end_drawing() ...@@ -186,13 +215,29 @@ void odf_drawing_context::end_drawing()
if (impl_->current_drawing_state_.flipV) if (impl_->current_drawing_state_.flipV)
gr_properties->content().style_mirror_ = std::wstring(L"vertical"); gr_properties->content().style_mirror_ = std::wstring(L"vertical");
if (impl_->current_drawing_state_.fill_ == false)
gr_properties->content().common_draw_fill_attlist_.draw_fill_ = draw_fill::none;
gr_properties->content().draw_fit_to_size_ = false; switch(impl_->current_drawing_state_.area_type_fill_)
//draw:fit-to-size="false" {
//fo:clip case 0:
//draw:image-opacity gr_properties->content().common_draw_fill_attlist_.draw_fill_ = draw_fill::none;
break;
case 1:
gr_properties->content().common_draw_fill_attlist_.draw_fill_ = draw_fill::solid;
gr_properties->content().common_draw_fill_attlist_.draw_fill_color_ = color(std::wstring(L"#") + impl_->current_drawing_state_.area_fill_);
break;
}
switch(impl_->current_drawing_state_.line_type_fill_)
{
case 0:
break;
case 1:
gr_properties->content().svg_stroke_color_ = color(std::wstring(L"#") + impl_->current_drawing_state_.line_fill_);
break;
case 2:
case 3:
// !!!!
break;
}
} }
} }
...@@ -345,6 +390,12 @@ void odf_drawing_context::end_shape() ...@@ -345,6 +390,12 @@ void odf_drawing_context::end_shape()
if (sub_type.length()>1) if (sub_type.length()>1)
{ {
enhanced->draw_enhanced_geometry_attlist_.draw_type_ = sub_type; enhanced->draw_enhanced_geometry_attlist_.draw_type_ = sub_type;
int res=0;
if ((res = sub_type.find(L"ooxml")) >= 0 && impl_->current_drawing_state_.modifiers_.length()>1)
{
enhanced->draw_enhanced_geometry_attlist_.draw_modifiers_ = impl_->current_drawing_state_.modifiers_;
}
} }
else else
{ {
...@@ -352,8 +403,8 @@ void odf_drawing_context::end_shape() ...@@ -352,8 +403,8 @@ void odf_drawing_context::end_shape()
if (shape_define) if (shape_define)
{ {
enhanced->draw_enhanced_geometry_attlist_.draw_type_ = L"non-primitive";
enhanced->svg_viewbox_ = shape_define->view_box; enhanced->svg_viewbox_ = shape_define->view_box;
enhanced->draw_enhanced_geometry_attlist_.draw_type_ = shape_define->odf_type_name;
enhanced->draw_enhanced_geometry_attlist_.draw_text_areas_ = shape_define->text_areas; enhanced->draw_enhanced_geometry_attlist_.draw_text_areas_ = shape_define->text_areas;
if (shape_define->glue_points) if (shape_define->glue_points)
{ {
...@@ -435,13 +486,61 @@ void odf_drawing_context::end_element() ...@@ -435,13 +486,61 @@ void odf_drawing_context::end_element()
impl_->current_level_.pop_back(); impl_->current_level_.pop_back();
} }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void odf_drawing_context::start_area_properies()
{
impl_->current_drawing_part_ = Area;
}
void odf_drawing_context::end_area_properies()
{
impl_->current_drawing_part_ = Unknown;
}
void odf_drawing_context::start_line_properies()
{
impl_->current_drawing_part_ = Line;
}
void odf_drawing_context::end_line_properies()
{
impl_->current_drawing_part_ = Unknown;
}
void odf_drawing_context::start_shadow_properies()
{
impl_->current_drawing_part_ = Shadow;
}
void odf_drawing_context::end_shadow_properies()
{
impl_->current_drawing_part_ = Unknown;
}
////////////////////////////////////////////////////////////////////
void odf_drawing_context::set_name(std::wstring name) void odf_drawing_context::set_name(std::wstring name)
{ {
impl_->current_drawing_state_.name_ = name; impl_->current_drawing_state_.name_ = name;
} }
void odf_drawing_context::set_no_fill() void odf_drawing_context::set_no_fill()
{ {
impl_->current_drawing_state_.fill_ = false; switch(impl_->current_drawing_part_)
{
case Area:
impl_->current_drawing_state_.area_type_fill_ = 0;
break;
case Line:
impl_->current_drawing_state_.line_type_fill_ = 0;
break;
}
}
void odf_drawing_context::set_solid_fill(std::wstring hexColor)
{
switch(impl_->current_drawing_part_)
{
case Area:
impl_->current_drawing_state_.area_type_fill_ = 1;
impl_->current_drawing_state_.area_fill_ = hexColor;
break;
case Line:
impl_->current_drawing_state_.line_type_fill_ = 1;
impl_->current_drawing_state_.line_fill_ = hexColor;
break;
}
} }
void odf_drawing_context::set_z_order(int id) void odf_drawing_context::set_z_order(int id)
{ {
......
...@@ -68,6 +68,16 @@ public: ...@@ -68,6 +68,16 @@ public:
void set_rotate(int iVal); void set_rotate(int iVal);
void set_no_fill(); void set_no_fill();
void set_solid_fill(std::wstring hexColor);
//////////////////////////////////////////////////////////////
void start_area_properies();
void end_area_properies();
void start_line_properies();
void end_line_properies();
void start_shadow_properies();
void end_shadow_properies();
private: private:
......
#include "precompiled_cpodf.h" #include "precompiled_cpodf.h"
#include "Shapes\oox_shapeMathMultiply.h" #include "Shapes\oox_shapeMaths.h"
#include "Shapes\oox_shapeSnipRoundRects.h" #include "Shapes\oox_shapeSnipRoundRects.h"
#include "Shapes\oox_shapeSun.h" #include "Shapes\oox_shapeCustoms.h"
#include "Shapes\oox_shapeStars.h" #include "Shapes\oox_shapeStars.h"
#include "Shapes\oox_shapeAccentCallouts.h"
#include "Shapes\oox_shapeArrows.h"
#include "Shapes\oox_shapeCharts.h"
#include "Shapes\oox_shapePrimitives.h"
#include "Shapes\oox_shapeRibbons.h"
#include "..\..\..\Common\DocxFormat\Source\Common\SimpleTypes_Drawing.h" #include "..\..\..\Common\DocxFormat\Source\Common\SimpleTypes_Drawing.h"
namespace cpdoccore namespace cpdoccore
...@@ -23,8 +29,10 @@ oox_shape_ptr oox_shape::create(int ooxPrstGeomType) ...@@ -23,8 +29,10 @@ oox_shape_ptr oox_shape::create(int ooxPrstGeomType)
case SimpleTypes::shapetypeSnip2DiagRect: return boost::make_shared<oox_shape_snip2DiagRect>(); case SimpleTypes::shapetypeSnip2DiagRect: return boost::make_shared<oox_shape_snip2DiagRect>();
case SimpleTypes::shapetypeSnip2SameRect: return boost::make_shared<oox_shape_snip2SameRect>(); case SimpleTypes::shapetypeSnip2SameRect: return boost::make_shared<oox_shape_snip2SameRect>();
case SimpleTypes::shapetypeSnipRoundRect: return boost::make_shared<oox_shape_snipRoundRect>(); case SimpleTypes::shapetypeSnipRoundRect: return boost::make_shared<oox_shape_snipRoundRect>();
case SimpleTypes::shapetypeStar6: return boost::make_shared<oox_shape_star6>();
case SimpleTypes::shapetypeStar7: return boost::make_shared<oox_shape_star7>(); case SimpleTypes::shapetypeStar7: return boost::make_shared<oox_shape_star7>();
case SimpleTypes::shapetypeStar10: return boost::make_shared<oox_shape_star10>(); case SimpleTypes::shapetypeStar10: return boost::make_shared<oox_shape_star10>();
case SimpleTypes::shapetypeStar12: return boost::make_shared<oox_shape_star12>();
case SimpleTypes::shapetypeStar16: return boost::make_shared<oox_shape_star16>(); case SimpleTypes::shapetypeStar16: return boost::make_shared<oox_shape_star16>();
case SimpleTypes::shapetypeStar32: return boost::make_shared<oox_shape_star32>(); case SimpleTypes::shapetypeStar32: return boost::make_shared<oox_shape_star32>();
......
...@@ -47,6 +47,8 @@ namespace cpdoccore ...@@ -47,6 +47,8 @@ namespace cpdoccore
std::wstring text_areas; std::wstring text_areas;
std::wstring view_box; std::wstring view_box;
std::wstring odf_type_name;
_CP_OPT(std::wstring) glue_points; _CP_OPT(std::wstring) glue_points;
}; };
}; };
\ No newline at end of file
//todoooo
#pragma once #pragma once
#include "stdAfx.h" #include "stdAfx.h"
...@@ -99,35 +101,6 @@ void OoxConverter::convert_SpPr(OOX::Drawing::CShapeProperties * oox_spPr) ...@@ -99,35 +101,6 @@ void OoxConverter::convert_SpPr(OOX::Drawing::CShapeProperties * oox_spPr)
{ {
if (!oox_spPr) return; if (!oox_spPr) return;
if (oox_spPr->m_oXfrm.IsInit())//CTransform2D
{
//
if (oox_spPr->m_oXfrm->m_oFlipH.GetValue() == SimpleTypes::onoffTrue)
odf_context()->drawing_context().set_flip_H(true);
if (oox_spPr->m_oXfrm->m_oFlipV.GetValue() == SimpleTypes::onoffTrue)
odf_context()->drawing_context().set_flip_V(true);
if (oox_spPr->m_oXfrm->m_oRot.GetValue() > 0)
odf_context()->drawing_context().set_rotate(oox_spPr->m_oXfrm->m_oRot.GetValue());
}
switch (oox_spPr->m_eFillType)
{
case OOX::Drawing::filltypeBlip:
if(oox_spPr->m_oBlipFill.IsInit())convert(oox_spPr->m_oBlipFill.GetPointer());break;
case OOX::Drawing::filltypeGradient:
if(oox_spPr->m_oGradFill.IsInit())convert(oox_spPr->m_oGradFill.GetPointer());break;
case OOX::Drawing::filltypePattern:
if(oox_spPr->m_oPattFill.IsInit())convert(oox_spPr->m_oPattFill.GetPointer());break;
case OOX::Drawing::filltypeSolid:
if(oox_spPr->m_oSolidFill.IsInit())convert(oox_spPr->m_oSolidFill.GetPointer());break;
case OOX::Drawing::filltypeGroup:
case OOX::Drawing::filltypeNo:
odf_context()->drawing_context().set_no_fill();
break;
case OOX::Drawing::filltypeUnknown:
default: break;
}
switch(oox_spPr->m_eGeomType) switch(oox_spPr->m_eGeomType)
{ {
case OOX::Drawing::geomtypeCustom : case OOX::Drawing::geomtypeCustom :
...@@ -138,11 +111,45 @@ void OoxConverter::convert_SpPr(OOX::Drawing::CShapeProperties * oox_spPr) ...@@ -138,11 +111,45 @@ void OoxConverter::convert_SpPr(OOX::Drawing::CShapeProperties * oox_spPr)
default: default:
break; break;
} }
//EEffectType m_eEffectType; // odf_context()->drawing_context().start_area_properies();
{
switch (oox_spPr->m_eFillType)
{
case OOX::Drawing::filltypeBlip: convert(oox_spPr->m_oBlipFill.GetPointer());break;
case OOX::Drawing::filltypeGradient: convert(oox_spPr->m_oGradFill.GetPointer());break;
case OOX::Drawing::filltypePattern: convert(oox_spPr->m_oPattFill.GetPointer());break;
case OOX::Drawing::filltypeSolid: convert(oox_spPr->m_oSolidFill.GetPointer());break;
case OOX::Drawing::filltypeGroup:
case OOX::Drawing::filltypeNo: odf_context()->drawing_context().set_no_fill();
break;
}
//....
}
odf_context()->drawing_context().end_area_properies();
odf_context()->drawing_context().start_line_properies();
{
convert(oox_spPr->m_oLn.GetPointer()); //CLineProperties
}
odf_context()->drawing_context().end_line_properies();
////////
//shadow
///////////
if (oox_spPr->m_oXfrm.IsInit()) //CTransform2D
{
if (oox_spPr->m_oXfrm->m_oFlipH.GetValue() == SimpleTypes::onoffTrue)
odf_context()->drawing_context().set_flip_H(true);
if (oox_spPr->m_oXfrm->m_oFlipV.GetValue() == SimpleTypes::onoffTrue)
odf_context()->drawing_context().set_flip_V(true);
if (oox_spPr->m_oXfrm->m_oRot.GetValue() > 0)
odf_context()->drawing_context().set_rotate(oox_spPr->m_oXfrm->m_oRot.GetValue());
}
//nullable<OOX::Drawing::CEffectContainer> m_oEffectDag; //nullable<OOX::Drawing::CEffectContainer> m_oEffectDag;
//nullable<OOX::Drawing::CEffectList> m_oEffectList; //nullable<OOX::Drawing::CEffectList> m_oEffectList;
//nullable<OOX::Drawing::CLineProperties> m_oLn;
//nullable<OOX::Drawing::COfficeArtExtensionList> m_oExtLst; //nullable<OOX::Drawing::COfficeArtExtensionList> m_oExtLst;
//nullable<OOX::Drawing::CScene3D> m_oScene3D; //nullable<OOX::Drawing::CScene3D> m_oScene3D;
//nullable<OOX::Drawing::CShape3D> m_oSp3D; //nullable<OOX::Drawing::CShape3D> m_oSp3D;
...@@ -167,7 +174,7 @@ void OoxConverter::convert_CNvPr(OOX::Drawing::CNonVisualDrawingProps * oox_cnvP ...@@ -167,7 +174,7 @@ void OoxConverter::convert_CNvPr(OOX::Drawing::CNonVisualDrawingProps * oox_cnvP
//nullable<CString> m_sTitle; //nullable<CString> m_sTitle;
} }
void OoxConverter::convert/*_CustGeom*/(OOX::Drawing::CCustomGeometry2D *oox_cust_geom) void OoxConverter::convert(OOX::Drawing::CCustomGeometry2D *oox_cust_geom)
{ {
if (!oox_cust_geom)return; if (!oox_cust_geom)return;
...@@ -176,8 +183,22 @@ void OoxConverter::convert/*_CustGeom*/(OOX::Drawing::CCustomGeometry2D *oox_cus ...@@ -176,8 +183,22 @@ void OoxConverter::convert/*_CustGeom*/(OOX::Drawing::CCustomGeometry2D *oox_cus
convert(&oox_cust_geom->m_oPthLst.m_arrPath[i]); convert(&oox_cust_geom->m_oPthLst.m_arrPath[i]);
} }
} }
void OoxConverter::convert(OOX::Drawing::CLineProperties *oox_line_prop)
{
if (!oox_line_prop)return;
switch (oox_line_prop->m_eFillType)
{
case OOX::Drawing::filltypeGradient: convert(oox_line_prop->m_oGradFill.GetPointer());break;
case OOX::Drawing::filltypePattern: convert(oox_line_prop->m_oPattFill.GetPointer());break;
case OOX::Drawing::filltypeSolid: convert(oox_line_prop->m_oSolidFill.GetPointer());break;
case OOX::Drawing::filltypeGroup:
case OOX::Drawing::filltypeNo: odf_context()->drawing_context().set_no_fill();
break;
}
}
void OoxConverter::convert/*_PrstGeom*/(OOX::Drawing::CPresetGeometry2D *oox_prst_geom) void OoxConverter::convert(OOX::Drawing::CPresetGeometry2D *oox_prst_geom)
{ {
if (!oox_prst_geom)return; if (!oox_prst_geom)return;
...@@ -204,20 +225,129 @@ void OoxConverter::convert(OOX::Drawing::CPath2D *oox_geom_path) ...@@ -204,20 +225,129 @@ void OoxConverter::convert(OOX::Drawing::CPath2D *oox_geom_path)
void OoxConverter::convert(OOX::Drawing::CBlipFillProperties *oox_bitmap_fill) void OoxConverter::convert(OOX::Drawing::CBlipFillProperties *oox_bitmap_fill)
{ {
if (!oox_bitmap_fill)return; if (!oox_bitmap_fill)return;
//odf_context()->drawing_context().start_bitmap_fill();
//odf_context()->drawing_context().end_bitmap_fill();
} }
void OoxConverter::convert(OOX::Drawing::CGradientFillProperties *oox_grad_fill) void OoxConverter::convert(OOX::Drawing::CGradientFillProperties *oox_grad_fill)
{ {
if (!oox_grad_fill)return; if (!oox_grad_fill)return;
// , !!! - ...
//odf_context()->drawing_context().start_gradient_fill();
//odf::office_element_ptr gradient_element;
//odf::create_element(L"draw",L"gradient",gradient_element,odf_context());
//odf_context()->styles_context().add_style(gradient_element,false,true);
//odf_context()->drawing_context().end_gradient_fill();
} }
void OoxConverter::convert(OOX::Drawing::CPatternFillProperties *oox_pattern_fill) void OoxConverter::convert(OOX::Drawing::CPatternFillProperties *oox_pattern_fill)
{ {
if (!oox_pattern_fill)return; if (!oox_pattern_fill)return;
//odf_context()->drawing_context().start_pattern_fill();
//odf_context()->drawing_context().end_pattern_fill();
} }
void OoxConverter::convert(OOX::Drawing::CSolidColorFillProperties *oox_solid_fill) void OoxConverter::convert(OOX::Drawing::CSolidColorFillProperties *oox_solid_fill)
{ {
if (!oox_solid_fill)return; if (!oox_solid_fill)return;
std::wstring hexColor;//rgb
BYTE uA=0, uG=0, uB=0, uR =0;
if (oox_solid_fill->tryGetRgb(uR,uG,uB,uA))
{
SimpleTypes::CHexColor<SimpleTypes::hexcolorRGB> *oRgbColor = new SimpleTypes::CHexColor<SimpleTypes::hexcolorRGB>(uR,uG,uB);
if (oRgbColor)
{
hexColor = string2std_string(oRgbColor->ToString().Right(6));
delete oRgbColor;
}
}
else
{
switch( oox_solid_fill->m_eType )
{
case OOX::Drawing::colorHsl: convert(&oox_solid_fill->m_oHslClr, hexColor); break;
case OOX::Drawing::colorPrst: convert(&oox_solid_fill->m_oPrstClr, hexColor); break;
case OOX::Drawing::colorSheme: convert(&oox_solid_fill->m_oShemeClr,hexColor); break;
case OOX::Drawing::colorScRgb: convert(&oox_solid_fill->m_oScrgbClr,hexColor); break;
}
}
odf_context()->drawing_context().set_solid_fill(hexColor);
}
void OoxConverter::convert(OOX::Drawing::CHslColor *oox_HslClr, std::wstring & hexString)
{
if (!oox_HslClr)return;
} }
void OoxConverter::convert(OOX::Drawing::CPresetColor *oox_PrstClr, std::wstring & hexString)
{
if (!oox_PrstClr)return;
}
void OoxConverter::convert(OOX::Drawing::CSchemeColor *oox_ShemeClr, std::wstring & hexString)
{
OOX::CTheme * theme= oox_theme();
if (!oox_ShemeClr || !theme)return;
int theme_ind = oox_ShemeClr->m_oVal.GetValue();
BYTE ucA=0, ucG=0, ucB=0, ucR =0;
bool result = false;
switch(theme_ind)
{
case SimpleTypes::shemecolorvalLt1:
result = theme->m_oThemeElements.m_oClrScheme.m_oLt1.tryGetRgb(ucR, ucG, ucB, ucA); break;
case SimpleTypes::shemecolorvalLt2:
result = theme->m_oThemeElements.m_oClrScheme.m_oLt2.tryGetRgb(ucR, ucG, ucB, ucA); break;
case SimpleTypes::shemecolorvalDk1:
result = theme->m_oThemeElements.m_oClrScheme.m_oDk1.tryGetRgb(ucR, ucG, ucB, ucA); break;
case SimpleTypes::shemecolorvalDk2:
result = theme->m_oThemeElements.m_oClrScheme.m_oDk2.tryGetRgb(ucR, ucG, ucB, ucA); break;
case SimpleTypes::shemecolorvalAccent1:
result = theme->m_oThemeElements.m_oClrScheme.m_oAccent1.tryGetRgb(ucR, ucG, ucB, ucA); break;
case SimpleTypes::shemecolorvalAccent2:
result = theme->m_oThemeElements.m_oClrScheme.m_oAccent2.tryGetRgb(ucR, ucG, ucB, ucA); break;
case SimpleTypes::shemecolorvalAccent3:
result = theme->m_oThemeElements.m_oClrScheme.m_oAccent3.tryGetRgb(ucR, ucG, ucB, ucA); break;
case SimpleTypes::shemecolorvalAccent4:
result = theme->m_oThemeElements.m_oClrScheme.m_oAccent4.tryGetRgb(ucR, ucG, ucB, ucA); break;
case SimpleTypes::shemecolorvalAccent5:
result = theme->m_oThemeElements.m_oClrScheme.m_oAccent5.tryGetRgb(ucR, ucG, ucB, ucA); break;
case SimpleTypes::shemecolorvalAccent6:
result = theme->m_oThemeElements.m_oClrScheme.m_oAccent6.tryGetRgb(ucR, ucG, ucB, ucA); break;
case SimpleTypes::shemecolorvalFolHlink:
result = theme->m_oThemeElements.m_oClrScheme.m_oFolHlink.tryGetRgb(ucR, ucG, ucB, ucA); break;
case SimpleTypes::shemecolorvalHlink:
result = theme->m_oThemeElements.m_oClrScheme.m_oHlink.tryGetRgb(ucR, ucG, ucB, ucA); break;
}
if (result == true)
{
oox_ShemeClr->SetRGBA(ucR,ucG,ucB);
oox_ShemeClr->ApplyTransform();
oox_ShemeClr->GetRGBA(ucR,ucG,ucB,ucA);
SimpleTypes::CHexColor<SimpleTypes::hexcolorRGB> *oRgbColor = new SimpleTypes::CHexColor<SimpleTypes::hexcolorRGB>(ucR,ucG,ucB);
if (oRgbColor)
{
hexString = string2std_string(oRgbColor->ToString().Right(6));
delete oRgbColor;
}
}
}
void OoxConverter::convert(OOX::Drawing::CScRgbColor *oox_ScrgbClr, std::wstring & hexString)
{
if (!oox_ScrgbClr)return;
}
void OoxConverter::convert(OOX::Drawing::CPath2DLineTo *oox_geom_path) void OoxConverter::convert(OOX::Drawing::CPath2DLineTo *oox_geom_path)
{ {
if (!oox_geom_path) return; if (!oox_geom_path) return;
......
...@@ -17,6 +17,7 @@ namespace cpdoccore ...@@ -17,6 +17,7 @@ namespace cpdoccore
namespace OOX namespace OOX
{ {
class WritingElement; class WritingElement;
class CTheme;
namespace Drawing namespace Drawing
{ {
...@@ -35,6 +36,14 @@ namespace OOX ...@@ -35,6 +36,14 @@ namespace OOX
class CPath2DQuadBezierTo; class CPath2DQuadBezierTo;
class CPath2DCubicBezierTo; class CPath2DCubicBezierTo;
class CPath2DClose; class CPath2DClose;
class CHslColor;
class CSchemeColor;
class CScRgbColor;
class CSRgbColor;
class CSystemColor;
class CPresetColor;
class CLineProperties;
//class ;
} }
} }
...@@ -50,19 +59,23 @@ public: ...@@ -50,19 +59,23 @@ public:
OoxConverter(){} OoxConverter(){}
virtual cpdoccore::odf::odf_conversion_context* odf_context() = 0; virtual cpdoccore::odf::odf_conversion_context* odf_context() = 0;
virtual OOX::CTheme* oox_theme() = 0;
void convert(OOX::WritingElement *oox_unknown); void convert(OOX::WritingElement *oox_unknown);
void convert_CNvPr(OOX::Drawing::CNonVisualDrawingProps * oox_cnvPr); void convert_CNvPr(OOX::Drawing::CNonVisualDrawingProps * oox_cnvPr);
void convert_SpPr(OOX::Drawing::CShapeProperties * oox_spPr); void convert_SpPr(OOX::Drawing::CShapeProperties * oox_spPr);
void convert/*_CustGeom*/(OOX::Drawing::CCustomGeometry2D *oox_cust_geom); void convert(OOX::Drawing::CCustomGeometry2D *oox_cust_geom);
void convert/*_PrstGeom*/(OOX::Drawing::CPresetGeometry2D *oox_prst_geom); void convert(OOX::Drawing::CPresetGeometry2D *oox_prst_geom);
void convert(OOX::Drawing::CLineProperties *oox_line_prop);
void convert(OOX::Drawing::CBlipFillProperties *oox_bitmap_fill); void convert(OOX::Drawing::CBlipFillProperties *oox_bitmap_fill);
void convert(OOX::Drawing::CGradientFillProperties *oox_grad_fill); void convert(OOX::Drawing::CGradientFillProperties *oox_grad_fill);
void convert(OOX::Drawing::CPatternFillProperties *oox_pattern_fill); void convert(OOX::Drawing::CPatternFillProperties *oox_pattern_fill);
void convert(OOX::Drawing::CSolidColorFillProperties *oox_solid_fill); void convert(OOX::Drawing::CSolidColorFillProperties *oox_solid_fill);
//////////////////////////////////////////////
void convert(OOX::Drawing::CPath2D *oox_geom_path); void convert(OOX::Drawing::CPath2D *oox_geom_path);
void convert(OOX::Drawing::CPath2DLineTo *oox_geom_path); void convert(OOX::Drawing::CPath2DLineTo *oox_geom_path);
void convert(OOX::Drawing::CPath2DMoveTo *oox_geom_path); void convert(OOX::Drawing::CPath2DMoveTo *oox_geom_path);
...@@ -70,6 +83,11 @@ public: ...@@ -70,6 +83,11 @@ public:
void convert(OOX::Drawing::CPath2DQuadBezierTo *oox_geom_path); void convert(OOX::Drawing::CPath2DQuadBezierTo *oox_geom_path);
void convert(OOX::Drawing::CPath2DCubicBezierTo *oox_geom_path); void convert(OOX::Drawing::CPath2DCubicBezierTo *oox_geom_path);
void convert(OOX::Drawing::CPath2DClose *oox_geom_path); void convert(OOX::Drawing::CPath2DClose *oox_geom_path);
/////////////////////////////////////////
void convert(OOX::Drawing::CHslColor *oox_HslClr, std::wstring & hexString);
void convert(OOX::Drawing::CPresetColor *oox_PrstClr, std::wstring & hexString);
void convert(OOX::Drawing::CSchemeColor *oox_ShemeClr, std::wstring & hexString);
void convert(OOX::Drawing::CScRgbColor *oox_ScrgbClr, std::wstring & hexString);
}; };
......
...@@ -33,6 +33,10 @@ odf::odf_conversion_context* DocxConverter::odf_context() ...@@ -33,6 +33,10 @@ odf::odf_conversion_context* DocxConverter::odf_context()
{ {
return NULL;//odt_context; return NULL;//odt_context;
} }
OOX::CTheme* DocxConverter::oox_theme()
{
return NULL;
}
void DocxConverter::convertDocument() void DocxConverter::convertDocument()
{ {
if (!docx_document)return; if (!docx_document)return;
......
...@@ -31,6 +31,7 @@ namespace Oox2Odf ...@@ -31,6 +31,7 @@ namespace Oox2Odf
virtual void write(const std::wstring & path); virtual void write(const std::wstring & path);
virtual odf::odf_conversion_context* odf_context(); virtual odf::odf_conversion_context* odf_context();
virtual OOX::CTheme* oox_theme();
private: private:
OOX::CDocx *docx_document; OOX::CDocx *docx_document;
......
...@@ -40,7 +40,13 @@ odf::odf_conversion_context* XlsxConverter::odf_context() ...@@ -40,7 +40,13 @@ odf::odf_conversion_context* XlsxConverter::odf_context()
{ {
return ods_context; return ods_context;
} }
OOX::CTheme* XlsxConverter::oox_theme()
{
if (xlsx_document)
return xlsx_document->GetTheme();
else
return NULL;
}
void XlsxConverter::convertDocument() void XlsxConverter::convertDocument()
{ {
if (!xlsx_document)return; if (!xlsx_document)return;
......
...@@ -58,6 +58,7 @@ namespace Oox2Odf ...@@ -58,6 +58,7 @@ namespace Oox2Odf
virtual void write(const std::wstring & path); virtual void write(const std::wstring & path);
virtual odf::odf_conversion_context* odf_context(); virtual odf::odf_conversion_context* odf_context();
virtual OOX::CTheme* oox_theme();
private: private:
OOX::Spreadsheet::CXlsx *xlsx_document; OOX::Spreadsheet::CXlsx *xlsx_document;
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//1 //1
//2 //2
//0 //0
//16 //17
#define INTVER 1,2,0,16 #define INTVER 1,2,0,17
#define STRVER "1,2,0,16\0" #define STRVER "1,2,0,17\0"
...@@ -2576,7 +2576,23 @@ namespace SimpleTypes ...@@ -2576,7 +2576,23 @@ namespace SimpleTypes
switch(m_eValue) switch(m_eValue)
{ {
case hexcolorAuto : return _T("auto"); case hexcolorAuto : return _T("auto");
case hexcolorRGB : return m_sValue; case hexcolorRGB :
{
CString sResult =_T("00");//alfa
if(m_unR > 0x0f)
sResult.AppendFormat(_T("%X"), m_unR);
else
sResult.AppendFormat(_T("0%X"), m_unR);
if(m_unG > 0x0f)
sResult.AppendFormat(_T("%X"), m_unG);
else
sResult.AppendFormat(_T("0%X"), m_unG);
if(m_unB > 0x0f)
sResult.AppendFormat(_T("%X"), m_unB);
else
sResult.AppendFormat(_T("0%X"), m_unB);
return sResult;
}
default : return _T("auto"); default : return _T("auto");
} }
} }
......
...@@ -1615,8 +1615,6 @@ namespace OOX ...@@ -1615,8 +1615,6 @@ namespace OOX
RGB2HSL( m_unRawR, m_unRawG, m_unRawB, dH, dS, dL ); RGB2HSL( m_unRawR, m_unRawG, m_unRawB, dH, dS, dL );
} }
private:
void ApplyTransform() void ApplyTransform()
{ {
m_unRawR = m_unR; m_unRawR = m_unR;
...@@ -1956,6 +1954,7 @@ namespace OOX ...@@ -1956,6 +1954,7 @@ namespace OOX
} }
} }
} }
private:
inline void RGB2HSL(unsigned char unR, unsigned char unG, unsigned char unB, double& dH, double& dS, double& dL) inline void RGB2HSL(unsigned char unR, unsigned char unG, unsigned char unB, double& dH, double& dS, double& dL)
{ {
int nMin = min( unR, min( unG, unB ) ); int nMin = min( unR, min( unG, unB ) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment