[Libreoffice-commits] core.git: 2 commits - sd/source writerfilter/qa
Michael Stahl
mstahl at redhat.com
Mon Jul 14 10:04:07 PDT 2014
sd/source/ui/app/res_bmp.src | 2 +-
sd/source/ui/app/strings.src | 2 +-
writerfilter/qa/cppunittests/misc/misc.cxx | 17 ++++++++++++++++-
3 files changed, 18 insertions(+), 3 deletions(-)
New commits:
commit 2e95e551c52ba6054ab52506aa6f19ecf647d624
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jul 14 18:55:24 2014 +0200
writerfilter: add unit test for Fraction initialization
... as used by wrap polygon import, see fdo#41068 fdo#76803.
Change-Id: I4467560c2c3bbdab3fc9f8cd7a0c0b415429186c
diff --git a/writerfilter/qa/cppunittests/misc/misc.cxx b/writerfilter/qa/cppunittests/misc/misc.cxx
index 0bc7da4..0db80cc 100644
--- a/writerfilter/qa/cppunittests/misc/misc.cxx
+++ b/writerfilter/qa/cppunittests/misc/misc.cxx
@@ -22,7 +22,9 @@
#include <rtl/ustring.hxx>
#include <dmapper/ConversionHelper.hxx>
#include <dmapper/DomainMapper_Impl.hxx>
-
+#define private public
+#include <../../../source/resourcemodel/Fraction.cxx>
+#undef private
using namespace std;
@@ -37,10 +39,12 @@ public:
virtual void tearDown() SAL_OVERRIDE;
void testTwipConversions();
+ void testFraction();
void testFieldParameters();
CPPUNIT_TEST_SUITE(WriterfilterMiscTest);
CPPUNIT_TEST(testTwipConversions);
+ CPPUNIT_TEST(testFraction);
CPPUNIT_TEST(testFieldParameters);
CPPUNIT_TEST_SUITE_END();
};
@@ -73,6 +77,17 @@ void WriterfilterMiscTest::testTwipConversions()
CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), convertTwipToMM100Unsigned(40000));
}
+void WriterfilterMiscTest::testFraction()
+{
+ using writerfilter::resourcemodel::Fraction;
+ Fraction f1(-928800, 2717);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-928800), f1.mnNumerator); // became positive
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2717), f1.mnDenominator);
+ Fraction f2(-220869, 1350);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-24541), f2.mnNumerator); // became positive
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(150), f2.mnDenominator);
+}
+
void WriterfilterMiscTest::testFieldParameters()
{
using writerfilter::dmapper::lcl_SplitFieldCommand;
commit b55b96589f7fe0b2f426c2472da7174ab95aab87
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jul 14 18:05:24 2014 +0200
sd: stop calling graphics styles "Image Styles"
(regression from a71a562a9958fc58a5fb914bcf7f8056a353f618)
Change-Id: Ie3a44a80c720f59831bc2b1da91792fb8aa24d62
diff --git a/sd/source/ui/app/res_bmp.src b/sd/source/ui/app/res_bmp.src
index c68e9ad..2074202 100644
--- a/sd/source/ui/app/res_bmp.src
+++ b/sd/source/ui/app/res_bmp.src
@@ -240,7 +240,7 @@ Bitmap BMP_GRAPHIC
};
#define SfxStyleFamiliesRes1\
- Text [ en-US ] = "Image Styles" ;\
+ Text [ en-US ] = "Drawing Object Styles" ;\
#define SfxStyleFamiliesRes2\
Text [ en-US ] = "Presentation Styles" ;\
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index b8b5237..38c3725 100644
--- a/sd/source/ui/app/strings.src
+++ b/sd/source/ui/app/strings.src
@@ -1142,7 +1142,7 @@ String STR_TASKPANEL_LAYOUT_MENU_TITLE
};
String STR_GRAPHICS_STYLE_FAMILY
{
- Text [ en-US ] = "Image Styles";
+ Text [ en-US ] = "Drawing Object Styles";
};
String STR_CELL_STYLE_FAMILY
{
More information about the Libreoffice-commits
mailing list