[Libreoffice-commits] core.git: sw/qa writerfilter/source

Mike Kaganski mike.kaganski at collabora.com
Tue Jun 6 15:04:09 UTC 2017


 sw/qa/extras/ooxmlimport/ooxmlimport.cxx     |    5 ++---
 writerfilter/source/dmapper/DomainMapper.cxx |    8 ++++----
 2 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit dd1ba90f6069b41e3f2c301809afefc6f63da710
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Tue Jun 6 16:19:31 2017 +0200

    tdf#104450: Use Calibri; let LO to fallback to Carlito
    
    Using Calibri will allow to keep originally intended font
    on round-trip. If Calibri is absent on a system, LO will
    fallback to Carlito for rendering, but keep original font
    intact.
    
    Change-Id: I8f29bed29bc7f48912b2637053ff128ea904c7a1
    Reviewed-on: https://gerrit.libreoffice.org/38456
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    Tested-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 60d74ea7572a..08d292b05196 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1289,11 +1289,10 @@ DECLARE_OOXMLIMPORT_TEST(testTdf76446, "tdf76446.docx")
 
 DECLARE_OOXMLIMPORT_TEST(testTdf108350, "tdf108350.docx")
 {
-    // For OOXML without explicit font information, font needs to be Carlito 11 pt,
-    // our bundled metrically compatible substitute for Calibri.
+    // For OOXML without explicit font information, font needs to be Calibri 11 pt
     uno::Reference<text::XTextRange> xPara(getParagraph(1));
     uno::Reference<beans::XPropertySet> xRun(getRun(xPara, 1), uno::UNO_QUERY);
-    CPPUNIT_ASSERT_EQUAL(OUString("Carlito"), getProperty<OUString>(xRun, "CharFontName"));
+    CPPUNIT_ASSERT_EQUAL(OUString("Calibri"), getProperty<OUString>(xRun, "CharFontName"));
     CPPUNIT_ASSERT_EQUAL(double(11), getProperty<double>(xRun, "CharHeight"));
 }
 
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 3abdb8d2b6f9..4ef535bc20e1 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -136,14 +136,14 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon
 
     if (eDocumentType == SourceDocumentType::OOXML) {
         // tdf#108350
-        // In OOXML (i.e. Word since 2007), the default document font is Calibri 11 pt.
-        // If a document doesn't contain font information, we should assume our
-        // metric-compatible equivalent Carlito to provide best layout match.
+        // In Word since version 2007, the default document font is Calibri 11 pt.
+        // If a DOCX document doesn't contain font information, we should assume
+        // the intended font to provide best layout match.
         try
         {
             uno::Reference< beans::XPropertySet > xDefProps(GetTextFactory()->createInstance("com.sun.star.text.Defaults"),
                 uno::UNO_QUERY_THROW);
-            xDefProps->setPropertyValue(getPropertyName(PROP_CHAR_FONT_NAME), css::uno::Any(OUString("Carlito")));
+            xDefProps->setPropertyValue(getPropertyName(PROP_CHAR_FONT_NAME), css::uno::Any(OUString("Calibri")));
             xDefProps->setPropertyValue(getPropertyName(PROP_CHAR_HEIGHT), css::uno::Any(double(11)));
         }
         catch (const uno::Exception& rException)


More information about the Libreoffice-commits mailing list