<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi.<div class=""><br class=""></div><div class="">You have given yourself a nice task which is not even an EASYHACK. hope you succeed.</div><div class=""><br class=""></div><div class="">In order to have your patch reviewed you need to submit it to our gerrit system, see</div><div class=""><a href="https://wiki.documentfoundation.org/Development/GetInvolved#Prepare_to_submit_patches" class="">https://wiki.documentfoundation.org/Development/GetInvolved#Prepare_to_submit_patches</a></div><div class=""><br class=""></div><div class="">Rgds</div><div class="">jan I.</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 6 Nov 2016, at 11:32, Korrawit Pruegsanusak <<a href="mailto:detective.conan.1412@gmail.com" class="">detective.conan.1412@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hello everyone,<br class=""><br class="">I just have some times to look at tdf#41253.<br class="">(<a href="https://bugs.documentfoundation.org/41253" class="">https://bugs.documentfoundation.org/41253</a>) But I don't promise I<br class="">could finish it, so I still didn't assign myself into a bug. Anyway,<br class="">let me explain (and ask) about it:<br class=""><br class="">The bug is about importing pptx file which has shadowed text (one of<br class="">the text effects apart from bold, italic, underlined), but LibO can't<br class="">import "shadowing text".<br class=""><br class="">The problem is, in OOXML structure, shadowing is declared in<br class=""><a:outerShdw> element, which is a child of <a:effectLst>. For more<br class="">info, please see <a href="http://www.datypic.com/sc/ooxml/e-a_effectLst-1.html" class="">http://www.datypic.com/sc/ooxml/e-a_effectLst-1.html</a><br class=""><br class="">This is the OOXML sample comparing shadowed and non-shadowed text<br class="">(cropped from slide1.xml of an extracted pptx file):<br class="">---cut---<br class=""><a:p><br class="">    <a:r><br class="">        <a:rPr lang="en-US" dirty="0" smtClean="0"><br class="">            <a:effectLst><br class="">                <a:outerShdw blurRad="38100" dist="38100"<br class="">dir="2700000" algn="tl"><a:srgbClr val="000000"><a:alpha val="43137"/><br class="">                    </a:srgbClr><br class="">                </a:outerShdw><br class="">            </a:effectLst><br class="">        </a:rPr><br class="">        <a:t>Text with shadow</a:t><br class="">    </a:r><br class=""></a:p><br class=""><a:p><br class="">    <a:r><br class="">        <a:rPr lang="en-US" dirty="0" smtClean="0"/><br class="">         <a:t>Text without shadow</a:t><br class="">    </a:r><br class="">    <a:endParaRPr lang="th-TH" dirty="0"/><br class=""></a:p><br class="">---cut---<br class=""><br class="">And the code parsing <a:effectLst> is still unsupported, see:<br class=""><a href="http://opengrok.libreoffice.org/xref/core/oox/source/drawingml/textcharacterpropertiescontext.cxx#101" class="">http://opengrok.libreoffice.org/xref/core/oox/source/drawingml/textcharacterpropertiescontext.cxx#101</a><br class=""><br class="">This is my patch (also attached to this email). It compiled<br class="">successfully, but the shadowing still didn't work:<br class=""><br class="">---cut---<br class="">diff --git a/oox/inc/drawingml/textcharacterproperties.hxx<br class="">b/oox/inc/drawingml/textcharacterproperties.hxx<br class="">index 055e58f..2dca075 100644<br class="">--- a/oox/inc/drawingml/textcharacterproperties.hxx<br class="">+++ b/oox/inc/drawingml/textcharacterproperties.hxx<br class="">@@ -56,6 +56,7 @@ struct TextCharacterProperties<br class="">     OptValue< bool >    moUnderlineLineFollowText;<br class="">     OptValue< bool >    moUnderlineFillFollowText;<br class="">     FillProperties      maFillProperties;<br class="">+    OptValue< bool >    moCharShadowed;<br class=""><br class="">     std::vector<css::beans::PropertyValue> maTextEffectsProperties;<br class=""><br class="">diff --git a/oox/source/drawingml/textcharacterproperties.cxx<br class="">b/oox/source/drawingml/textcharacterproperties.cxx<br class="">index 48803de..c5e1253 100644<br class="">--- a/oox/source/drawingml/textcharacterproperties.cxx<br class="">+++ b/oox/source/drawingml/textcharacterproperties.cxx<br class="">@@ -151,6 +151,10 @@ void TextCharacterProperties::pushToPropMap(<br class="">PropertyMap& rPropMap, const XmlFil<br class="">         rPropMap.setProperty( PROP_CharUnderlineHasColor, true);<br class="">         rPropMap.setProperty( PROP_CharUnderlineColor,<br class="">maUnderlineColor.getColor( rFilter.getGraphicHelper() ));<br class="">     }<br class="">+<br class="">+    bool bCharShadowed = moCharShadowed.get(false);<br class="">+    SAL_DEBUG(bCharShadowed);<br class="">+    rPropMap.setProperty( PROP_CharShadowed, /*true */bCharShadowed);<br class=""> }<br class=""><br class=""> void pushToGrabBag( PropertySet& rPropSet, const<br class="">std::vector<PropertyValue>& aVectorOfProperyValues )<br class="">---cut---<br class=""><br class="">In textcharacterproperties.cxx, it is where the shadowing process<br class="">done. If I change the argument to "true", like this:<br class="">    rPropMap.setProperty( PROP_CharShadowed, true);<br class="">Then all texts will got shadowed. The problem is, bCharShadowed is<br class="">never "true" in current patch, and I couldn't get it to be "true".<br class=""><br class="">---cut---<br class="">diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx<br class="">b/oox/source/drawingml/textcharacterpropertiescontext.cxx<br class="">index 1c62c1d..ef24ab1 100644<br class="">--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx<br class="">+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx<br class="">@@ -217,6 +223,10 @@ ContextHandlerRef<br class="">TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl<br class="">                 return new TextEffectsContext( *this, aElementToken,<br class="">mrTextCharacterProperties.maTextEffectsProperties );<br class="">             }<br class="">             break;<br class="">+        case A_TOKEN(outerShdw):<br class="">+            SAL_DEBUG("A_TOKEN now True");<br class="">+            mrTextCharacterProperties.moCharShadowed = true;<br class="">+            break;<br class="">         default:<br class="">             SAL_WARN("oox",<br class="">"TextCharacterPropertiesContext::onCreateContext: unhandled element: "<br class=""><< getBaseToken(aElementToken));<br class="">             break;<br class="">---cut---<br class=""><br class="">I don't know why bCharShadowed is never "true". But I think this<br class="">approach is likely inappropriate because we already have these:<br class=""><br class="">---cut---<br class="">        // EG_EffectProperties<br class="">        case A_TOKEN( effectDag ):  // CT_EffectContainer 5.1.10.25<br class="">        case A_TOKEN( effectLst ):  // CT_EffectList 5.1.10.26<br class="">        break;<br class="">---cut---<br class=""><br class="">in textcharacterpropertiescontext.cxx line 99-102, which I think it's<br class="">more correct to start from these codes.<br class=""><br class="">So, should I start over from the line:<br class="">        case A_TOKEN( effectLst ):  // CT_EffectList 5.1.10.26<br class="">or any advise about my patch would be much appreciated.<br class=""><br class=""><br class="">Thank you very much.<br class="">Best Regards,<br class="">-- <br class="">Korrawit Pruegsanusak<br class=""><span id="cid:832962A3-8248-4BA8-91BA-19D5A3D8B9CF"><tdf41253_WIP.diff></span>_______________________________________________<br class="">LibreOffice mailing list<br class="">LibreOffice@lists.freedesktop.org<br class="">https://lists.freedesktop.org/mailman/listinfo/libreoffice<br class=""></div></div></blockquote></div><br class=""></div></body></html>