[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 6 commits - configmgr/source drawinglayer/inc drawinglayer/source sal/inc svgio/inc svgio/source sw/source

Armin Le Grand alg at apache.org
Wed May 15 03:07:17 PDT 2013


 configmgr/source/partial.cxx                                         |    2 
 configmgr/source/partial.hxx                                         |    8 
 drawinglayer/inc/drawinglayer/primitive2d/svggradientprimitive2d.hxx |    7 
 drawinglayer/source/primitive2d/svggradientprimitive2d.cxx           |   50 +-
 sal/inc/rtl/string.hxx                                               |    2 
 svgio/inc/svgio/svgreader/svgnode.hxx                                |    5 
 svgio/source/svgreader/svggnode.cxx                                  |    2 
 svgio/source/svgreader/svgnode.cxx                                   |  193 +++++-----
 svgio/source/svgreader/svgstyleattributes.cxx                        |   19 
 sw/source/core/edit/eddel.cxx                                        |    5 
 sw/source/filter/html/htmlatr.cxx                                    |    4 
 11 files changed, 182 insertions(+), 115 deletions(-)

New commits:
commit f03ec4812cfe71f582c5290869f22eadd661b48a
Author: Armin Le Grand <alg at apache.org>
Date:   Wed May 15 09:51:21 2013 +0000

    i121801 Corrected objectBoundingBox case for GradientTransform

diff --git a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
index 3d64e57..3a51096 100644
--- a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
@@ -413,15 +413,19 @@ namespace drawinglayer
                     // gradient vector defined by Start,End
                     const basegfx::B2DVector aVector(getEnd() - getStart());
                     const double fVectorLength(aVector.getLength());
-                    basegfx::B2DHomMatrix aUnitGradientToGradient;
 
-                    aUnitGradientToGradient.scale(fVectorLength, 1.0);
-                    aUnitGradientToGradient.rotate(atan2(aVector.getY(), aVector.getX()));
-                    aUnitGradientToGradient.translate(getStart().getX(), getStart().getY());
+                    aUnitGradientToObject.scale(fVectorLength, 1.0);
+                    aUnitGradientToObject.rotate(atan2(aVector.getY(), aVector.getX()));
+                    aUnitGradientToObject.translate(getStart().getX(), getStart().getY());
+
+                    if(!getGradientTransform().isIdentity())
+                    {
+                        aUnitGradientToObject = getGradientTransform() * aUnitGradientToObject;
+                    }
 
                     // create full transform from unit gradient coordinates to object coordinates
                     // including the SvgGradient transformation
-                    aUnitGradientToObject = aObjectTransform * aUnitGradientToGradient;
+                    aUnitGradientToObject = aObjectTransform * aUnitGradientToObject;
                 }
                 else
                 {
@@ -433,11 +437,11 @@ namespace drawinglayer
                     aUnitGradientToObject.scale(aVector.getLength(), 1.0);
                     aUnitGradientToObject.rotate(atan2(aVector.getY(), aVector.getX()));
                     aUnitGradientToObject.translate(aStart.getX(), aStart.getY());
-                }
 
-                if(!getGradientTransform().isIdentity())
-                {
-                    aUnitGradientToObject = getGradientTransform() * aUnitGradientToObject;
+                    if(!getGradientTransform().isIdentity())
+                    {
+                        aUnitGradientToObject = getGradientTransform() * aUnitGradientToObject;
+                    }
                 }
 
                 // create inverse from it
@@ -750,14 +754,17 @@ namespace drawinglayer
                 {
                     // interpret in unit coordinate system -> object aspect ratio will scale result
                     // create unit transform from unit vector to given linear gradient vector
-                    basegfx::B2DHomMatrix aUnitGradientToGradient;
+                    aUnitGradientToObject.scale(getRadius(), getRadius());
+                    aUnitGradientToObject.translate(getStart().getX(), getStart().getY());
 
-                    aUnitGradientToGradient.scale(getRadius(), getRadius());
-                    aUnitGradientToGradient.translate(getStart().getX(), getStart().getY());
+                    if(!getGradientTransform().isIdentity())
+                    {
+                        aUnitGradientToObject = getGradientTransform() * aUnitGradientToObject;
+                    }
 
                     // create full transform from unit gradient coordinates to object coordinates
                     // including the SvgGradient transformation
-                    aUnitGradientToObject = aObjectTransform * aUnitGradientToGradient;
+                    aUnitGradientToObject = aObjectTransform * aUnitGradientToObject;
                 }
                 else
                 {
@@ -769,11 +776,11 @@ namespace drawinglayer
 
                     aUnitGradientToObject.scale(fRadius, fRadius);
                     aUnitGradientToObject.translate(aStart.getX(), aStart.getY());
-                }
 
-                if(!getGradientTransform().isIdentity())
-                {
-                    aUnitGradientToObject = getGradientTransform() * aUnitGradientToObject;
+                    if(!getGradientTransform().isIdentity())
+                    {
+                        aUnitGradientToObject = getGradientTransform() * aUnitGradientToObject;
+                    }
                 }
 
                 // create inverse from it
commit 77b19e35890c81ad128db8b4362cee9ccf63e6bd
Author: Herbert Dürr <hdu at apache.org>
Date:   Wed May 15 09:22:51 2013 +0000

    #i122208# avoid signedness warnings in signed-char build environments

diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index 95e8ab3..951fa78 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -947,7 +947,7 @@ struct CStringHash
     size_t operator()( const char* p) const {
         size_t n = 0;
         while( *p)
-            n += 4*n + *(p++);
+            n += 4*n + *static_cast<unsigned char*>(p++);
         return n;
     }
 };
commit 4f49f1d95e8d0be7df259ad1458441fd858be735
Author: Armin Le Grand <alg at apache.org>
Date:   Wed May 15 08:47:52 2013 +0000

    i121801 Corrected handling of gradient transformations

diff --git a/drawinglayer/inc/drawinglayer/primitive2d/svggradientprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/svggradientprimitive2d.hxx
index dd0eff5..5737d51 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/svggradientprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/svggradientprimitive2d.hxx
@@ -95,6 +95,9 @@ namespace drawinglayer
         class SvgGradientHelper
         {
         private:
+            /// the extra gradient transform
+            basegfx::B2DHomMatrix       maGradientTransform;
+
             /// geometric definition, the geometry to be filled
             basegfx::B2DPolyPolygon     maPolyPolygon;
 
@@ -149,6 +152,7 @@ namespace drawinglayer
         public:
             /// constructor
             SvgGradientHelper(
+                const basegfx::B2DHomMatrix& rGradientTransform,
                 const basegfx::B2DPolyPolygon& rPolyPolygon,
                 const SvgGradientEntryVector& rGradientEntries,
                 const basegfx::B2DPoint& rStart,
@@ -156,6 +160,7 @@ namespace drawinglayer
                 SpreadMethod aSpreadMethod = Spread_pad);
 
             /// data read access
+            const basegfx::B2DHomMatrix& getGradientTransform() const { return maGradientTransform; }
             const basegfx::B2DPolyPolygon& getPolyPolygon() const { return maPolyPolygon; }
             const SvgGradientEntryVector& getGradientEntries() const { return maGradientEntries; }
             const basegfx::B2DPoint& getStart() const { return maStart; }
@@ -198,6 +203,7 @@ namespace drawinglayer
         public:
             /// constructor
             SvgLinearGradientPrimitive2D(
+                const basegfx::B2DHomMatrix& rGradientTransform,
                 const basegfx::B2DPolyPolygon& rPolyPolygon,
                 const SvgGradientEntryVector& rGradientEntries,
                 const basegfx::B2DPoint& rStart,
@@ -266,6 +272,7 @@ namespace drawinglayer
         public:
             /// constructor
             SvgRadialGradientPrimitive2D(
+                const basegfx::B2DHomMatrix& rGradientTransform,
                 const basegfx::B2DPolyPolygon& rPolyPolygon,
                 const SvgGradientEntryVector& rGradientEntries,
                 const basegfx::B2DPoint& rStart,
diff --git a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
index db8a9d1..3d64e57 100644
--- a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
@@ -285,12 +285,14 @@ namespace drawinglayer
         }
 
         SvgGradientHelper::SvgGradientHelper(
+            const basegfx::B2DHomMatrix& rGradientTransform,
             const basegfx::B2DPolyPolygon& rPolyPolygon,
             const SvgGradientEntryVector& rGradientEntries,
             const basegfx::B2DPoint& rStart,
             bool bUseUnitCoordinates,
             SpreadMethod aSpreadMethod)
-        :   maPolyPolygon(rPolyPolygon),
+        :   maGradientTransform(rGradientTransform),
+            maPolyPolygon(rPolyPolygon),
             maGradientEntries(rGradientEntries),
             maStart(rStart),
             maSpreadMethod(aSpreadMethod),
@@ -306,7 +308,8 @@ namespace drawinglayer
         {
             const SvgGradientHelper& rCompare = static_cast< const SvgGradientHelper& >(rSvgGradientHelper);
 
-            return (getPolyPolygon() == rCompare.getPolyPolygon()
+            return (getGradientTransform() == rCompare.getGradientTransform()
+                && getPolyPolygon() == rCompare.getPolyPolygon()
                 && getGradientEntries() == rCompare.getGradientEntries()
                 && getStart() == rCompare.getStart()
                 && getUseUnitCoordinates() == rCompare.getUseUnitCoordinates()
@@ -432,6 +435,11 @@ namespace drawinglayer
                     aUnitGradientToObject.translate(aStart.getX(), aStart.getY());
                 }
 
+                if(!getGradientTransform().isIdentity())
+                {
+                    aUnitGradientToObject = getGradientTransform() * aUnitGradientToObject;
+                }
+
                 // create inverse from it
                 basegfx::B2DHomMatrix aObjectToUnitGradient(aUnitGradientToObject);
                 aObjectToUnitGradient.invert();
@@ -550,6 +558,7 @@ namespace drawinglayer
         }
 
         SvgLinearGradientPrimitive2D::SvgLinearGradientPrimitive2D(
+            const basegfx::B2DHomMatrix& rGradientTransform,
             const basegfx::B2DPolyPolygon& rPolyPolygon,
             const SvgGradientEntryVector& rGradientEntries,
             const basegfx::B2DPoint& rStart,
@@ -557,7 +566,7 @@ namespace drawinglayer
             bool bUseUnitCoordinates,
             SpreadMethod aSpreadMethod)
         :   BufferedDecompositionPrimitive2D(),
-            SvgGradientHelper(rPolyPolygon, rGradientEntries, rStart, bUseUnitCoordinates, aSpreadMethod),
+            SvgGradientHelper(rGradientTransform, rPolyPolygon, rGradientEntries, rStart, bUseUnitCoordinates, aSpreadMethod),
             maEnd(rEnd)
         {
         }
@@ -753,6 +762,8 @@ namespace drawinglayer
                 else
                 {
                     // interpret in object coordinate system -> object aspect ratio will not scale result
+                    // use X-Axis with radius, it was already made relative to object width when coming from
+                    // SVG import
                     const double fRadius((aObjectTransform * basegfx::B2DVector(getRadius(), 0.0)).getLength());
                     const basegfx::B2DPoint aStart(aObjectTransform * getStart());
 
@@ -760,6 +771,11 @@ namespace drawinglayer
                     aUnitGradientToObject.translate(aStart.getX(), aStart.getY());
                 }
 
+                if(!getGradientTransform().isIdentity())
+                {
+                    aUnitGradientToObject = getGradientTransform() * aUnitGradientToObject;
+                }
+
                 // create inverse from it
                 basegfx::B2DHomMatrix aObjectToUnitGradient(aUnitGradientToObject);
                 aObjectToUnitGradient.invert();
@@ -827,6 +843,7 @@ namespace drawinglayer
         }
 
         SvgRadialGradientPrimitive2D::SvgRadialGradientPrimitive2D(
+            const basegfx::B2DHomMatrix& rGradientTransform,
             const basegfx::B2DPolyPolygon& rPolyPolygon,
             const SvgGradientEntryVector& rGradientEntries,
             const basegfx::B2DPoint& rStart,
@@ -835,7 +852,7 @@ namespace drawinglayer
             SpreadMethod aSpreadMethod,
             const basegfx::B2DPoint* pFocal)
         :   BufferedDecompositionPrimitive2D(),
-            SvgGradientHelper(rPolyPolygon, rGradientEntries, rStart, bUseUnitCoordinates, aSpreadMethod),
+            SvgGradientHelper(rGradientTransform, rPolyPolygon, rGradientEntries, rStart, bUseUnitCoordinates, aSpreadMethod),
             mfRadius(fRadius),
             maFocal(rStart),
             maFocalVector(0.0, 0.0),
diff --git a/svgio/inc/svgio/svgreader/svgnode.hxx b/svgio/inc/svgio/svgreader/svgnode.hxx
index f031a2e..2711405 100644
--- a/svgio/inc/svgio/svgreader/svgnode.hxx
+++ b/svgio/inc/svgio/svgreader/svgnode.hxx
@@ -82,6 +82,11 @@ namespace svgio
             Display_inherit
         };
 
+        // helper to convert a string associated with a token of type SVGTokenDisplay
+        // to the enum Display. Empty trings return the default 'Display_inline' with
+        // which members should be initialized
+        Display getDisplayFromContent(const rtl::OUString& aContent);
+
         class SvgNode : private boost::noncopyable, public InfoProvider
         {
         private:
diff --git a/svgio/source/svgreader/svggnode.cxx b/svgio/source/svgreader/svggnode.cxx
index 6d37dbf..9498a88 100644
--- a/svgio/source/svgreader/svggnode.cxx
+++ b/svgio/source/svgreader/svggnode.cxx
@@ -96,7 +96,7 @@ namespace svgio
             {
                 const double fOpacity(pStyle->getOpacity().getNumber());
 
-                if(fOpacity > 0.0)
+                if(fOpacity > 0.0 && Display_none != getDisplay())
                 {
                     drawinglayer::primitive2d::Primitive2DSequence aContent;
 
diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx
index 50b51b8..4a6f266 100644
--- a/svgio/source/svgreader/svgnode.cxx
+++ b/svgio/source/svgreader/svgnode.cxx
@@ -194,6 +194,107 @@ namespace svgio
             }
         }
 
+        Display getDisplayFromContent(const rtl::OUString& aContent)
+        {
+            if(aContent.getLength())
+            {
+                static rtl::OUString aStrInline(rtl::OUString::createFromAscii("inline"));
+                static rtl::OUString aStrBlock(rtl::OUString::createFromAscii("block"));
+                static rtl::OUString aStrList_item(rtl::OUString::createFromAscii("list-item"));
+                static rtl::OUString aStrRun_in(rtl::OUString::createFromAscii("run-in"));
+                static rtl::OUString aStrCompact(rtl::OUString::createFromAscii("compact"));
+                static rtl::OUString aStrMarker(rtl::OUString::createFromAscii("marker"));
+                static rtl::OUString aStrTable(rtl::OUString::createFromAscii("table"));
+                static rtl::OUString aStrInline_table(rtl::OUString::createFromAscii("inline-table"));
+                static rtl::OUString aStrTable_row_group(rtl::OUString::createFromAscii("table-row-group"));
+                static rtl::OUString aStrTable_header_group(rtl::OUString::createFromAscii("table-header-group"));
+                static rtl::OUString aStrTable_footer_group(rtl::OUString::createFromAscii("table-footer-group"));
+                static rtl::OUString aStrTable_row(rtl::OUString::createFromAscii("table-row"));
+                static rtl::OUString aStrTable_column_group(rtl::OUString::createFromAscii("table-column-group"));
+                static rtl::OUString aStrTable_column(rtl::OUString::createFromAscii("table-column"));
+                static rtl::OUString aStrTable_cell(rtl::OUString::createFromAscii("table-cell"));
+                static rtl::OUString aStrTable_caption(rtl::OUString::createFromAscii("table-caption"));
+                static rtl::OUString aStrNone(rtl::OUString::createFromAscii("none"));
+                static rtl::OUString aStrInherit(rtl::OUString::createFromAscii("inherit"));
+
+                if(aContent.match(aStrInline))
+                {
+                    return Display_inline;
+                }
+                else if(aContent.match(aStrNone))
+                {
+                    return Display_none;
+                }
+                else if(aContent.match(aStrInherit))
+                {
+                    return Display_inherit;
+                }
+                else if(aContent.match(aStrBlock))
+                {
+                    return Display_block;
+                }
+                else if(aContent.match(aStrList_item))
+                {
+                    return Display_list_item;
+                }
+                else if(aContent.match(aStrRun_in))
+                {
+                    return Display_run_in;
+                }
+                else if(aContent.match(aStrCompact))
+                {
+                    return Display_compact;
+                }
+                else if(aContent.match(aStrMarker))
+                {
+                    return Display_marker;
+                }
+                else if(aContent.match(aStrTable))
+                {
+                    return Display_table;
+                }
+                else if(aContent.match(aStrInline_table))
+                {
+                    return Display_inline_table;
+                }
+                else if(aContent.match(aStrTable_row_group))
+                {
+                    return Display_table_row_group;
+                }
+                else if(aContent.match(aStrTable_header_group))
+                {
+                    return Display_table_header_group;
+                }
+                else if(aContent.match(aStrTable_footer_group))
+                {
+                    return Display_table_footer_group;
+                }
+                else if(aContent.match(aStrTable_row))
+                {
+                    return Display_table_row;
+                }
+                else if(aContent.match(aStrTable_column_group))
+                {
+                    return Display_table_column_group;
+                }
+                else if(aContent.match(aStrTable_column))
+                {
+                    return Display_table_column;
+                }
+                else if(aContent.match(aStrTable_cell))
+                {
+                    return Display_table_cell;
+                }
+                else if(aContent.match(aStrTable_caption))
+                {
+                    return Display_table_caption;
+                }
+            }
+
+            // return the default
+            return Display_inline;
+        }
+
         void SvgNode::parseAttribute(const rtl::OUString& /*rTokenName*/, SVGToken aSVGToken, const rtl::OUString& aContent)
         {
             switch(aSVGToken)
@@ -236,97 +337,7 @@ namespace svgio
                 {
                     if(aContent.getLength())
                     {
-                        static rtl::OUString aStrInline(rtl::OUString::createFromAscii("inline"));
-                        static rtl::OUString aStrBlock(rtl::OUString::createFromAscii("block"));
-                        static rtl::OUString aStrList_item(rtl::OUString::createFromAscii("list-item"));
-                        static rtl::OUString aStrRun_in(rtl::OUString::createFromAscii("run-in"));
-                        static rtl::OUString aStrCompact(rtl::OUString::createFromAscii("compact"));
-                        static rtl::OUString aStrMarker(rtl::OUString::createFromAscii("marker"));
-                        static rtl::OUString aStrTable(rtl::OUString::createFromAscii("table"));
-                        static rtl::OUString aStrInline_table(rtl::OUString::createFromAscii("inline-table"));
-                        static rtl::OUString aStrTable_row_group(rtl::OUString::createFromAscii("table-row-group"));
-                        static rtl::OUString aStrTable_header_group(rtl::OUString::createFromAscii("table-header-group"));
-                        static rtl::OUString aStrTable_footer_group(rtl::OUString::createFromAscii("table-footer-group"));
-                        static rtl::OUString aStrTable_row(rtl::OUString::createFromAscii("table-row"));
-                        static rtl::OUString aStrTable_column_group(rtl::OUString::createFromAscii("table-column-group"));
-                        static rtl::OUString aStrTable_column(rtl::OUString::createFromAscii("table-column"));
-                        static rtl::OUString aStrTable_cell(rtl::OUString::createFromAscii("table-cell"));
-                        static rtl::OUString aStrTable_caption(rtl::OUString::createFromAscii("table-caption"));
-                        static rtl::OUString aStrNone(rtl::OUString::createFromAscii("none"));
-                        static rtl::OUString aStrInherit(rtl::OUString::createFromAscii("inherit"));
-
-                        if(aContent.match(aStrInline))
-                        {
-                            setDisplay(Display_inline);
-                        }
-                        else if(aContent.match(aStrNone))
-                        {
-                            setDisplay(Display_none);
-                        }
-                        else if(aContent.match(aStrInherit))
-                        {
-                            setDisplay(Display_inherit);
-                        }
-                        else if(aContent.match(aStrBlock))
-                        {
-                            setDisplay(Display_block);
-                        }
-                        else if(aContent.match(aStrList_item))
-                        {
-                            setDisplay(Display_list_item);
-                        }
-                        else if(aContent.match(aStrRun_in))
-                        {
-                            setDisplay(Display_run_in);
-                        }
-                        else if(aContent.match(aStrCompact))
-                        {
-                            setDisplay(Display_compact);
-                        }
-                        else if(aContent.match(aStrMarker))
-                        {
-                            setDisplay(Display_marker);
-                        }
-                        else if(aContent.match(aStrTable))
-                        {
-                            setDisplay(Display_table);
-                        }
-                        else if(aContent.match(aStrInline_table))
-                        {
-                            setDisplay(Display_inline_table);
-                        }
-                        else if(aContent.match(aStrTable_row_group))
-                        {
-                            setDisplay(Display_table_row_group);
-                        }
-                        else if(aContent.match(aStrTable_header_group))
-                        {
-                            setDisplay(Display_table_header_group);
-                        }
-                        else if(aContent.match(aStrTable_footer_group))
-                        {
-                            setDisplay(Display_table_footer_group);
-                        }
-                        else if(aContent.match(aStrTable_row))
-                        {
-                            setDisplay(Display_table_row);
-                        }
-                        else if(aContent.match(aStrTable_column_group))
-                        {
-                            setDisplay(Display_table_column_group);
-                        }
-                        else if(aContent.match(aStrTable_column))
-                        {
-                            setDisplay(Display_table_column);
-                        }
-                        else if(aContent.match(aStrTable_cell))
-                        {
-                            setDisplay(Display_table_cell);
-                        }
-                        else if(aContent.match(aStrTable_caption))
-                        {
-                            setDisplay(Display_table_caption);
-                        }
+                        setDisplay(getDisplayFromContent(aContent));
                     }
                     break;
                 }
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 94d4324..c9d181d 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -318,10 +318,11 @@ namespace svgio
             if(!aSvgGradientEntryVector.empty())
             {
                 basegfx::B2DHomMatrix aGeoToUnit;
+                basegfx::B2DHomMatrix aGradientTransform;
 
                 if(rFillGradient.getGradientTransform())
                 {
-                    aGeoToUnit = *rFillGradient.getGradientTransform();
+                    aGradientTransform = *rFillGradient.getGradientTransform();
                 }
 
                 if(userSpaceOnUse == rFillGradient.getGradientUnits())
@@ -366,6 +367,7 @@ namespace svgio
                     drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(
                         rTarget,
                         new drawinglayer::primitive2d::SvgLinearGradientPrimitive2D(
+                            aGradientTransform,
                             rPath,
                             aSvgGradientEntryVector,
                             aStart,
@@ -427,6 +429,7 @@ namespace svgio
                     drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(
                         rTarget,
                         new drawinglayer::primitive2d::SvgRadialGradientPrimitive2D(
+                            aGradientTransform,
                             rPath,
                             aSvgGradientEntryVector,
                             aStart,
@@ -1184,7 +1187,7 @@ namespace svgio
         {
         }
 
-        void SvgStyleAttributes::parseStyleAttribute(const rtl::OUString& /*rTokenName*/, SVGToken aSVGToken, const rtl::OUString& aContent)
+        void SvgStyleAttributes::parseStyleAttribute(const rtl::OUString& rTokenName, SVGToken aSVGToken, const rtl::OUString& aContent)
         {
             switch(aSVGToken)
             {
@@ -1788,6 +1791,18 @@ namespace svgio
                     readLocalUrl(aContent, maMarkerEndXLink);
                     break;
                 }
+                case SVGTokenDisplay:
+                {
+                    // There may be display:none statements inside of style defines, e.g. the following line:
+                    // style="display:none"
+                    // taken from a svg example; this needs to be parsed and set at the owning node. Do not call
+                    // mrOwner.parseAttribute(...) here, this would lead to a recursion
+                    if(aContent.getLength())
+                    {
+                        mrOwner.setDisplay(getDisplayFromContent(aContent));
+                    }
+                    break;
+                }
                 default:
                 {
                     break;
commit 58d204292c12eb5237106d223251d8855aca3ca2
Author: Herbert Dürr <hdu at apache.org>
Date:   Wed May 15 08:24:08 2013 +0000

    #i122208# avoid default assignment operator of recursive STL containers
    
    support for recursive STL containers is not required by the standard.
    Boost TR1 containers allow them explicitly though but for some compiler/stl
    combinations there are constness issues that prevent the default
    assignment operator to work. Adding a small helper function solves
    this problem in a clean way.

diff --git a/configmgr/source/partial.cxx b/configmgr/source/partial.cxx
index d60fb74..c436902 100644
--- a/configmgr/source/partial.cxx
+++ b/configmgr/source/partial.cxx
@@ -98,7 +98,7 @@ Partial::Partial(
             rtl::OUString seg;
             bool end = parseSegment(*i, &n, &seg);
             if (end) {
-                p->children[seg] = Node();
+                p->children[seg].clear();
                 break;
             }
             Node::Children::iterator j(p->children.find(seg));
diff --git a/configmgr/source/partial.hxx b/configmgr/source/partial.hxx
index 56788c8..6cdb517 100644
--- a/configmgr/source/partial.hxx
+++ b/configmgr/source/partial.hxx
@@ -26,14 +26,13 @@
 
 #include "sal/config.h"
 
-#include <map>
+#include <boost/unordered_map.hpp> // using the boost container because it explicitly allows recursive types
 #include <set>
 
 #include "boost/noncopyable.hpp"
 
 #include "path.hxx"
-
-namespace rtl { class OUString; }
+#include "rtl/ustring.hxx"
 
 namespace configmgr {
 
@@ -51,9 +50,10 @@ public:
 
 private:
     struct Node {
-        typedef std::map< rtl::OUString, Node > Children;
+        typedef boost::unordered_map< rtl::OUString, Node > Children;
 
         Node(): startInclude(false) {}
+        void clear() { startInclude=false; children.clear(); }
 
         Children children;
         bool startInclude;
commit 919e99308395c572a7298e6db2b96df8bf7ec3fd
Author: Zheng Fan <zhengfan at apache.org>
Date:   Wed May 15 08:22:15 2013 +0000

    i120935, Insert blank entry for RES_CHRATR_BIDITRL and RES_CHRATR_IDCTHINT, for keep the identical res order

diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 9353fe9..f73c10c 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -3401,7 +3401,9 @@ SwAttrFnTab aHTMLAttrFnTab = {
 /* RES_CHRATR_OVERLINE */           OutHTML_CSS1Attr,
 /* RES_CHRATR_DUMMY1 */             0,
 /* RES_CHRATR_DUMMY2 */             0,
-
+//For i120935, Insert blank entry for RES_CHRATR_BIDITRL and RES_CHRATR_IDCTHINT, for keep the identical res order
+/*RES_CHRATR_BIDIRTL*/          0,
+/*RES_CHRATR_IDCTHINT*/     0,
 /* RES_TXTATR_REFMARK */            0,
 /* RES_TXTATR_TOXMARK */            0,
 /* RES_TXTATR_META */               0,
commit 5e4c3d0ead04a9fd49cd1f0b7e35764fdd498b39
Author: Zheng Fan <zhengfan at apache.org>
Date:   Wed May 15 08:14:07 2013 +0000

    i117395, for avoiding the cases of hidden or invisible node, which lead no frame of node exist

diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index 8a17b66..3527ec4 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -92,8 +92,11 @@ void SwEditShell::DeleteSel( SwPaM& rPam, sal_Bool* pUndo )
                 aDelPam.Move( fnMoveBackward, fnGoCntnt );
             }
                 // geschuetze Boxen ueberspringen !
+            //For i117395, in some situation, the node would be hidden or invisible, which makes the frame of it unavailable
+            //So verify it before use it.
+            SwCntntFrm* pFrm = NULL;
             if( !pNd->IsCntntNode() ||
-                !((SwCntntNode*)pNd)->getLayoutFrm( GetLayout() )->IsProtected() )
+                !((pFrm=((SwCntntNode*)pNd)->getLayoutFrm( GetLayout() ))!=NULL && pFrm->IsProtected()) )
             {
                 // alles loeschen
                 GetDoc()->DeleteAndJoin( aDelPam );


More information about the Libreoffice-commits mailing list