[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sd/qa svtools/qa vcl/source
Zolnai Tamás
zolnaitamas2000 at gmail.com
Mon Feb 9 02:51:35 PST 2015
sd/qa/unit/data/xml/fdo64586_0.xml | 4 ++--
sd/qa/unit/data/xml/n758621_0.xml | 4 ++--
sd/qa/unit/data/xml/n758621_1.xml | 4 ++--
sd/qa/unit/data/xml/n819614_0.xml | 2 +-
svtools/qa/unit/GraphicObjectTest.cxx | 11 +++++++++++
vcl/source/gdi/impgraph.cxx | 4 ++--
6 files changed, 20 insertions(+), 9 deletions(-)
New commits:
commit 3c1c50281acce8a7471ba456d514e2584e6d22d1
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Sat Feb 7 11:44:20 2015 +0100
tdf#88836: UI: in-form navigation bar icons gone
Regression from:
6419c745e5e9802da264250d5e131fb9a3b6e4de
Revert it and use IsEmpty() instead of operator!().
(cherry picked from commit 905d4db48a0b98f540c8abc3e12fb80be4826029)
Conflicts:
vcl/source/gdi/impgraph.cxx
Change-Id: Icc4f5dbba848a1d4ef807e598f0aa3b940459c82
Reviewed-on: https://gerrit.libreoffice.org/14357
Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
diff --git a/sd/qa/unit/data/xml/fdo64586_0.xml b/sd/qa/unit/data/xml/fdo64586_0.xml
index 7bbf719..a248783 100644
--- a/sd/qa/unit/data/xml/fdo64586_0.xml
+++ b/sd/qa/unit/data/xml/fdo64586_0.xml
@@ -4,7 +4,7 @@
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
- <FillBitmap width="0" height="0"/>
+ <FillBitmap/>
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
@@ -18,7 +18,7 @@
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
- <FillBitmap width="0" height="0"/>
+ <FillBitmap/>
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
diff --git a/sd/qa/unit/data/xml/n758621_0.xml b/sd/qa/unit/data/xml/n758621_0.xml
index 288bf98..754be1d 100644
--- a/sd/qa/unit/data/xml/n758621_0.xml
+++ b/sd/qa/unit/data/xml/n758621_0.xml
@@ -4,7 +4,7 @@
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
- <FillBitmap width="0" height="0"/>
+ <FillBitmap/>
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
@@ -18,7 +18,7 @@
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
- <FillBitmap width="0" height="0"/>
+ <FillBitmap/>
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
diff --git a/sd/qa/unit/data/xml/n758621_1.xml b/sd/qa/unit/data/xml/n758621_1.xml
index a124211..0f71931 100644
--- a/sd/qa/unit/data/xml/n758621_1.xml
+++ b/sd/qa/unit/data/xml/n758621_1.xml
@@ -4,7 +4,7 @@
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
- <FillBitmap width="0" height="0"/>
+ <FillBitmap/>
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
@@ -18,7 +18,7 @@
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
- <FillBitmap width="0" height="0"/>
+ <FillBitmap/>
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
diff --git a/sd/qa/unit/data/xml/n819614_0.xml b/sd/qa/unit/data/xml/n819614_0.xml
index b7005be..aff9c32 100644
--- a/sd/qa/unit/data/xml/n819614_0.xml
+++ b/sd/qa/unit/data/xml/n819614_0.xml
@@ -4,7 +4,7 @@
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
- <FillBitmap width="0" height="0"/>
+ <FillBitmap/>
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
diff --git a/svtools/qa/unit/GraphicObjectTest.cxx b/svtools/qa/unit/GraphicObjectTest.cxx
index 0c96f15..c004604 100644
--- a/svtools/qa/unit/GraphicObjectTest.cxx
+++ b/svtools/qa/unit/GraphicObjectTest.cxx
@@ -40,6 +40,7 @@ class GraphicObjectTest: public test::BootstrapFixture, public unotest::MacrosTe
public:
void testSwap();
void testSizeBasedAutoSwap();
+ void testTdf88836();
virtual void setUp() SAL_OVERRIDE
@@ -56,6 +57,7 @@ private:
CPPUNIT_TEST_SUITE(GraphicObjectTest);
CPPUNIT_TEST(testSwap);
CPPUNIT_TEST(testSizeBasedAutoSwap);
+ CPPUNIT_TEST(testTdf88836);
CPPUNIT_TEST_SUITE_END();
};
@@ -227,6 +229,15 @@ void GraphicObjectTest::testSizeBasedAutoSwap()
xComponent->dispose();
}
+void GraphicObjectTest::testTdf88836()
+{
+ // Construction with empty bitmap -> type should be GRAPHIC_NONE
+ Graphic aGraphic = Bitmap();
+ CPPUNIT_ASSERT_EQUAL(GRAPHIC_NONE, aGraphic.GetType());
+ aGraphic = Graphic(BitmapEx());
+ CPPUNIT_ASSERT_EQUAL(GRAPHIC_NONE, aGraphic.GetType());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(GraphicObjectTest);
}
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 27bd0b9..f24dca1 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -141,7 +141,7 @@ ImpGraphic::ImpGraphic( const Bitmap& rBitmap ) :
mpContext ( NULL ),
mpSwapFile ( NULL ),
mpGfxLink ( NULL ),
- meType ( GRAPHIC_BITMAP ),
+ meType ( !rBitmap.IsEmpty() ? GRAPHIC_BITMAP : GRAPHIC_NONE ),
mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
@@ -156,7 +156,7 @@ ImpGraphic::ImpGraphic( const BitmapEx& rBitmapEx ) :
mpContext ( NULL ),
mpSwapFile ( NULL ),
mpGfxLink ( NULL ),
- meType ( GRAPHIC_BITMAP ),
+ meType ( !rBitmapEx.IsEmpty() ? GRAPHIC_BITMAP : GRAPHIC_NONE ),
mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
More information about the Libreoffice-commits
mailing list