[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - 3 commits - chart2/source sfx2/source sw/qa writerfilter/source

Laurent Balland-Poirier laurent.balland-poirier at laposte.net
Mon Feb 15 07:01:57 UTC 2016


 chart2/source/view/axes/ScaleAutomatism.cxx       |   14 ++++++++++++--
 chart2/source/view/inc/ScaleAutomatism.hxx        |    1 +
 sfx2/source/doc/docfile.cxx                       |    9 +++++----
 sw/qa/extras/ooxmlimport/data/tdf85523.docx       |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx          |    8 ++++++++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    3 ++-
 6 files changed, 28 insertions(+), 7 deletions(-)

New commits:
commit 3c8bef5e6ac97348ab54904ec8442e31b68ddc6e
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date:   Sat Jan 2 15:02:00 2016 +0100

    tdf#96807 Reset min/max of auto scale
    
    Y minimum for auto scale was accidentaly set to 0.
    This avoided correct calculation of Y auto log scale (tdf#96807)
    But also set linear Y auto scale from 0 (tdf#85690)
    
    This fix detects if both min and max are equal to 0, and reset them (+-inf)
    
    Change-Id: Ifaf306831f3b5a18a86483c88e807f478b447c77
    Reviewed-on: https://gerrit.libreoffice.org/21055
    Reviewed-by: jan iversen <jani at documentfoundation.org>
    Tested-by: jan iversen <jani at documentfoundation.org>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit 5553d6a9314fd778b9a124d8a2c7e9dd1d7a58a3)
    Reviewed-on: https://gerrit.libreoffice.org/21278
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    (cherry picked from commit 98982ca06a87e8b63204b0acda2105c66ae57440)
    Reviewed-on: https://gerrit.libreoffice.org/21459
    Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
    (cherry picked from commit 2fa4b37e8d6d516e9ac9190ee45456534611c3e7)

diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx
index f58bde4..61df0af 100644
--- a/chart2/source/view/axes/ScaleAutomatism.cxx
+++ b/chart2/source/view/axes/ScaleAutomatism.cxx
@@ -99,8 +99,7 @@ ScaleAutomatism::ScaleAutomatism( const ScaleData& rSourceScale, const Date& rNu
                     , m_nTimeResolution(::com::sun::star::chart::TimeUnit::DAY)
                     , m_aNullDate(rNullDate)
 {
-    ::rtl::math::setNan( &m_fValueMinimum );
-    ::rtl::math::setNan( &m_fValueMaximum );
+    resetValueRange();
 
     double fExplicitOrigin = 0.0;
     if( m_aSourceScale.Origin >>= fExplicitOrigin )
@@ -110,8 +109,19 @@ ScaleAutomatism::~ScaleAutomatism()
 {
 }
 
+void ScaleAutomatism::resetValueRange( )
+{
+    ::rtl::math::setNan( &m_fValueMinimum );
+    ::rtl::math::setNan( &m_fValueMaximum );
+}
+
 void ScaleAutomatism::expandValueRange( double fMinimum, double fMaximum )
 {
+    // if m_fValueMinimum and m_fValueMaximum == 0, it means that they were not determined.
+    // m_fValueMinimum == 0 makes impossible to determine real minimum,
+    // so they need to be reseted tdf#96807
+    if( (m_fValueMinimum == 0.0) && (m_fValueMaximum == 0.0) )
+        resetValueRange();
     if( (fMinimum < m_fValueMinimum) || ::rtl::math::isNan( m_fValueMinimum ) )
         m_fValueMinimum = fMinimum;
     if( (fMaximum > m_fValueMaximum) || ::rtl::math::isNan( m_fValueMaximum ) )
diff --git a/chart2/source/view/inc/ScaleAutomatism.hxx b/chart2/source/view/inc/ScaleAutomatism.hxx
index 17370fb..513cf7d 100644
--- a/chart2/source/view/inc/ScaleAutomatism.hxx
+++ b/chart2/source/view/inc/ScaleAutomatism.hxx
@@ -53,6 +53,7 @@ public:
      *  undefined (that is empty `uno::Any` objects).
      */
     void                expandValueRange( double fMinimum, double fMaximum );
+    void                resetValueRange();
 
     /** Sets additional auto scaling options.
         @param bExpandBorderToIncrementRhythm  If true, expands automatic
commit f0afa3037c82482db605406b9384ec1b511ae1a3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Jan 19 09:27:19 2016 +0100

    tdf#85523 DOCX import: fix unexpected extra char at comment end
    
    Change-Id: Ic3eb073d11a395a81b90fd1a9292d6ecf2940c09
    (cherry picked from commit 39969defa29948d77565a7cd8a3471baaec8f35d)
    Reviewed-on: https://gerrit.libreoffice.org/22306
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    (cherry picked from commit 10a142356a4cdb487da10d83857e4b50a0452a5b)

diff --git a/sw/qa/extras/ooxmlimport/data/tdf85523.docx b/sw/qa/extras/ooxmlimport/data/tdf85523.docx
new file mode 100644
index 0000000..cd31ae4
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf85523.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index a83d683..424e5f6 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -2114,6 +2114,14 @@ DECLARE_OOXMLIMPORT_TEST(testAnnotationFormatting, "annotation-formatting.docx")
     CPPUNIT_ASSERT_EQUAL(awt::FontUnderline::SINGLE, getProperty<sal_Int16>(getRun(xParagraph, 1), "CharUnderline"));
 }
 
+DECLARE_OOXMLIMPORT_TEST(testTdf85523, "tdf85523.docx")
+{
+    auto xTextField = getProperty< uno::Reference<beans::XPropertySet> >(getRun(getParagraph(1), 6), "TextField");
+    auto xText = getProperty< uno::Reference<text::XText> >(xTextField, "TextRange");
+    // This was "commentX": an unexpected extra char was added at the comment end.
+    getParagraphOfText(1, xText, "comment");
+}
+
 DECLARE_OOXMLIMPORT_TEST(testDMLGroupShapeRunFonts, "dml-groupshape-runfonts.docx")
 {
     // Fonts defined by w:rFonts was not imported and so the font specified by a:fontRef was used.
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 363d300..02a965a 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1139,9 +1139,10 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
                 else
                 {
                     uno::Reference<text::XTextCursor> xCursor;
-                    if (m_bParaHadField)
+                    if (m_bParaHadField && !m_bIsInComments)
                     {
                         // Workaround to make sure char props of the field are not lost.
+                        // Not relevant for editeng-based comments.
                         OUString sMarker("X");
                         xCursor = xTextAppend->getText()->createTextCursor();
                         if (xCursor.is())
commit 5e05953487a9e0804f728c1a3a87b6c07cd59e7e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Feb 11 18:26:24 2016 +0100

    tdf#56544: Support LO's .~lock.*# file locking over smb, too
    
    Change-Id: Ia18c3044aba82f935b13f22ba98aff42e9d5098f
    (cherry picked from commit 763521335b01a37c511ae8069cade9b4b69fef66)
    Reviewed-on: https://gerrit.libreoffice.org/22298
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    (cherry picked from commit 7f93dba17d397c5bf265504e8fbecd6b615e1787)

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index d89235a..fcb7f84 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -925,11 +925,12 @@ namespace
     {
         INetURLObject aUrl( rLogicName );
         INetProtocol eProt = aUrl.GetProtocol();
-#if HAVE_FEATURE_MACOSX_SANDBOX
-        return eProt == INetProtocol::Sftp;
-#else
-        return eProt == INetProtocol::File || eProt == INetProtocol::Sftp;
+#if !HAVE_FEATURE_MACOSX_SANDBOX
+        if (eProt == INetProtocol::File) {
+            return true;
+        }
 #endif
+        return eProt == INetProtocol::Smb || eProt == INetProtocol::Sftp;
     }
 }
 


More information about the Libreoffice-commits mailing list