tdf#37636: pass bNormalText to cppcanvas::internal::TextRenderer.

so that we know whether we are rendering a normal text or othewise
(like shadow, etc.) because it is not necessary to use the textline
color or overline color when rendering the shadow.

Change-Id: I51c21bbb4e3cec226320b46e2cdba4cd5e8792d6
Reviewed-on: https://gerrit.libreoffice.org/62831
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9@gmail.com>
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index 3784d43..b43f691 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -476,7 +476,7 @@
                virtual ~TextRenderer() {}

                /// Render text with given RenderState
                virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor ) const = 0;
                virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor, bool bNormalText ) const = 0;
            };

            /** Render effect text.
@@ -514,7 +514,7 @@
                        vcl::unotools::colorToDoubleSequence( rShadowColor,
                                                                xColorSpace );

                    rRenderer( aShadowState, rTextFillColor );
                    rRenderer( aShadowState, rTextFillColor, false );
                }

                // draw relief text, if enabled
@@ -532,11 +532,11 @@
                        vcl::unotools::colorToDoubleSequence( rReliefColor,
                                                                xColorSpace );

                    rRenderer( aReliefState, rTextFillColor );
                    rRenderer( aReliefState, rTextFillColor, false );
                }

                // draw normal text
                rRenderer( rRenderState, rTextFillColor );
                rRenderer( rRenderState, rTextFillColor, true );

                return true;
            }
@@ -789,7 +789,7 @@

            private:
                /// Interface TextRenderer
                virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor ) const override;
                virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor, bool bNormalText ) const override;

                geometry::RealRectangle2D queryTextBounds() const;
                css::uno::Reference<css::rendering::XPolyPolygon2D> queryTextBounds(const uno::Reference<rendering::XCanvas>& rCanvas) const;
@@ -895,7 +895,7 @@
                                  "::cppcanvas::internal::EffectTextAction(): Invalid font or lines" );
            }

            bool EffectTextAction::operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor ) const
            bool EffectTextAction::operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor, bool /*bNormalText*/ ) const
            {
                const rendering::ViewState& rViewState( mpCanvas->getViewState() );
                const uno::Reference< rendering::XCanvas >& rCanvas( mpCanvas->getUNOCanvas() );
@@ -1246,7 +1246,7 @@

            private:
                // TextRenderer interface
                virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor ) const override;
                virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor, bool bNormalText ) const override;

                css::uno::Reference<css::rendering::XPolyPolygon2D> queryTextBounds(const uno::Reference<rendering::XCanvas>& rCanvas) const;

@@ -1369,7 +1369,7 @@
                return ::basegfx::unotools::xPolyPolygonFromB2DPolygon(rCanvas->getDevice(), aTextBoundsPoly);
            }

            bool EffectTextArrayAction::operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor ) const
            bool EffectTextArrayAction::operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor, bool /*bNormalText*/ ) const
            {
                const rendering::ViewState& rViewState( mpCanvas->getViewState() );
                const uno::Reference< rendering::XCanvas >& rCanvas( mpCanvas->getUNOCanvas() );
@@ -1429,7 +1429,7 @@
                }

                // TextRenderer interface
                virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor ) const override
                virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor,bool /*bNormalText*/ ) const override
                {
                    mrCanvas->fillPolyPolygon( mrLinePolygon,
                                               mrViewState,
@@ -1635,7 +1635,7 @@

            private:
                // TextRenderer interface
                virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor ) const override;
                virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor, bool bNormalText ) const override;

                // TODO(P2): This is potentially a real mass object
                // (every character might be a separate TextAction),
@@ -1765,7 +1765,7 @@
                      rTextTransform );
            }

            bool OutlineAction::operator()( const rendering::RenderState& rRenderState, const ::Color& /*rTextFillColor*/ ) const
            bool OutlineAction::operator()( const rendering::RenderState& rRenderState, const ::Color& /*rTextFillColor*/, bool /*bNormalText*/ ) const
            {
                const rendering::ViewState&                 rViewState( mpCanvas->getViewState() );
                const uno::Reference< rendering::XCanvas >& rCanvas( mpCanvas->getUNOCanvas() );