Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
1602843a
Commit
1602843a
authored
Apr 26, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix color alpha
parent
cdb7fb8e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
+1
-1
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/ColorModifier.h
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/ColorModifier.h
+13
-5
No files found.
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
View file @
1602843a
...
@@ -918,7 +918,7 @@ void OoxConverter::convert(PPTX::Logic::UniColor * color, std::wstring & hexStri
...
@@ -918,7 +918,7 @@ void OoxConverter::convert(PPTX::Logic::UniColor * color, std::wstring & hexStri
if
((
nARGB
>>
24
)
!=
0xff
)
if
((
nARGB
>>
24
)
!=
0xff
)
{
{
opacity
=
((
nARGB
>>
24
)
/
255.
)
*
100.
;
opacity
=
100
-
((
nARGB
>>
24
)
/
255.
)
*
100.
;
}
}
}
}
else
else
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/ColorModifier.h
View file @
1602843a
...
@@ -53,12 +53,14 @@ namespace PPTX
...
@@ -53,12 +53,14 @@ namespace PPTX
{
{
name
=
oReader
.
GetName
();
name
=
oReader
.
GetName
();
ReadAttributes
(
oReader
);
if
(
XmlUtils
::
GetNameNoNS
(
name
)
==
_T
(
"alpha"
))
if
(
XmlUtils
::
GetNameNoNS
(
name
)
==
_T
(
"alpha"
))
{
{
ReadAttributes2
(
oReader
);
ReadAttributes2
(
oReader
);
}
}
else
{
ReadAttributes
(
oReader
);
}
}
}
void
ReadAttributes2
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
void
ReadAttributes2
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
{
...
@@ -67,9 +69,15 @@ namespace PPTX
...
@@ -67,9 +69,15 @@ namespace PPTX
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"val"
),
sTmp
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"val"
),
sTmp
)
WritingElement_ReadAttributes_End
(
oReader
)
WritingElement_ReadAttributes_End
(
oReader
)
if
(
val
.
is_init
()
&&
sTmp
.
is_init
()
&&
sTmp
->
find
(
wchar_t
(
'%'
))
!=
-
1
)
if
(
sTmp
.
is_init
())
{
val
=
sTmp
.
get
();
if
(
val
.
is_init
()
&&
std
::
wstring
::
npos
!=
sTmp
->
find
(
L"%"
))
{
*
val
=
(
*
val
)
*
1000
;
*
val
=
(
*
val
)
*
1000
;
}
}
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
{
WritingElement_ReadAttributes_Start_No_NS
(
oReader
)
WritingElement_ReadAttributes_Start_No_NS
(
oReader
)
...
@@ -86,7 +94,7 @@ namespace PPTX
...
@@ -86,7 +94,7 @@ namespace PPTX
nullable_string
sTmp
;
nullable_string
sTmp
;
node
.
ReadAttributeBase
(
L"val"
,
sTmp
);
node
.
ReadAttributeBase
(
L"val"
,
sTmp
);
if
(
val
.
is_init
()
&&
sTmp
.
is_init
()
&&
s
Tmp
->
find
(
wchar_t
(
'%'
))
!=
-
1
)
if
(
val
.
is_init
()
&&
sTmp
.
is_init
()
&&
s
td
::
wstring
::
npos
!=
sTmp
->
find
(
L"%"
)
)
*
val
=
(
*
val
)
*
1000
;
*
val
=
(
*
val
)
*
1000
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment