https://bz.apache.org/ooo/show_bug.cgi?id=80216

Regina Henschel <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Issue Type|DEFECT                      |PATCH

--- Comment #5 from Regina Henschel <[email protected]> ---
My solution for LibreOffice is in
https://gerrit.libreoffice.org/c/core/+/133132.
You can use it under Apache License, Version 2.0.

I have no AOO build to test it and create a direct patch. But for AOO I think
it should be:
In method EnhancedCustomShape2d::AdaptObjColor() in
svx/source/customshapes/EnhancedCustomShape2d.cxx

Instead (currently lines 2012, 2013):

    const XFillStyle eFillStyle = ((const
XFillStyleItem&)rObj.GetMergedItem(XATTR_FILLSTYLE)).GetValue();
    switch( eFillStyle )
    {
        and so on

use:

    const XFillStyle eFillStyle = ((const
XFillStyleItem&)rObj.GetMergedItem(XATTR_FILLSTYLE)).GetValue();
    if (eFillStyle == XFill_NONE)
        return;
    switch( eFillStyle )
    {
        and so on


The fix for bug 102797 has introduced a second bug, which is addressed in my
patch too. The colors in "Octagon Bevel" and "Diamond Bevel" are too dark. With
bug 102797 the method to calculate the shading has been changed. The values for
 the shapes of kind mso_spt* were changed accordingly at that time (around
http://opengrok.openoffice.org/xref/trunk/main/svx/source/customshapes/EnhancedCustomShape2d.cxx?r=e5cfc9ca#756).
But similar change for "Octagon Bevel" and "Diamond Bevel" was not done. The
changes made at that time are in file "the intrusive fixes" in bug 102797.

My patch sets new values for these shapes. In my patch I use only four grades
of shade for the "Octagon Bevel" because the plan in LO is, to export the
shading to OOXML. Because AOO has no export to OOXML, you might want to use
five grades to be nearer to the original rendering in version 2.1.
In that case you need to use for the "Octagon Bevel" (around line 778)

nColorData = 0x60edc240;

instead of 

nColorData = 0x60ecc240;

-- 
You are receiving this mail because:
You are on the CC list for the issue.
You are the assignee for the issue.

Reply via email to