[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 8 commits - cui/source sc/source sfx2/source sfx2/uiconfig sw/source vcl/opengl vcl/source vcl/unx

Olivier Hallot ohallot at collabora.co.uk
Mon Jun 13 20:23:54 UTC 2016


 cui/source/tabpages/textattr.cxx                        |    6 +--
 sc/source/core/tool/interpr2.cxx                        |    6 +++
 sfx2/source/appl/shutdownicon.cxx                       |   11 +----
 sfx2/uiconfig/ui/inputdialog.ui                         |   30 ++++++----------
 sw/source/core/doc/DocumentContentOperationsManager.cxx |    9 +++-
 vcl/opengl/gdiimpl.cxx                                  |   19 ++++++++--
 vcl/source/control/combobox.cxx                         |    6 +++
 vcl/unx/generic/gdi/x11cairotextrender.cxx              |   18 +++++++++
 8 files changed, 70 insertions(+), 35 deletions(-)

New commits:
commit cb1d5b5419132d01a11b50eb98e86e98f8c8127c
Author: Olivier Hallot <ohallot at collabora.co.uk>
Date:   Fri Apr 1 16:36:45 2016 -0300

    Place help button on the left in dialog
    
    The New folder dialog, that is opened by the Template Manager dialog
    has now the help button on the left.
    
    Change-Id: Iabc55a031247e1ea33887dffc929dde17549f8fb
    Reviewed-on: https://gerrit.libreoffice.org/23740
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    (cherry picked from commit 82d14b4f9c086c48214445b8e49fdd748e13c05f)
    
    The label of this dialog can grow very long…
    
    … so place it above its associated entry.
    
    Change-Id: I8fce05bef2cb6ea4589caed60f9384fb42170234
    (cherry picked from commit 72cbcf97fadd46a6895797beb37aaa379e015855)
    Reviewed-on: https://gerrit.libreoffice.org/26212
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    (cherry picked from commit 36af72c6f6343f630c54f3e41b467d6bd312214d)

diff --git a/sfx2/uiconfig/ui/inputdialog.ui b/sfx2/uiconfig/ui/inputdialog.ui
index cacab36..df0055e 100644
--- a/sfx2/uiconfig/ui/inputdialog.ui
+++ b/sfx2/uiconfig/ui/inputdialog.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
+<!-- Generated with glade 3.19.0 -->
 <interface>
   <requires lib="gtk+" version="3.0"/>
   <object class="GtkDialog" id="InputDialog">
@@ -16,12 +16,10 @@
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="ok">
-                <property name="label">gtk-ok</property>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_stock">True</property>
               </object>
@@ -29,13 +27,16 @@
                 <property name="expand">False</property>
                 <property name="fill">True</property>
                 <property name="position">0</property>
+                <property name="secondary">True</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="cancel">
-                <property name="label">gtk-cancel</property>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_stock">True</property>
               </object>
@@ -46,8 +47,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="help">
-                <property name="label">gtk-help</property>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -75,21 +76,18 @@
             <property name="hexpand">True</property>
             <property name="vexpand">True</property>
             <property name="row_spacing">6</property>
-            <property name="column_spacing">12</property>
             <child>
               <object class="GtkLabel" id="label">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
                 <property name="label" translatable="yes">Height:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">entry</property>
+                <property name="xalign">0</property>
               </object>
               <packing>
                 <property name="left_attach">0</property>
                 <property name="top_attach">0</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -100,10 +98,8 @@
                 <property name="invisible_char">•</property>
               </object>
               <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">0</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
               </packing>
             </child>
           </object>
commit 3fb4ff8dbe4ee2695ef47818f167be693badbad8
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Thu Jun 9 14:58:42 2016 +0900

    tdf#99795 drawAlphaBitmap should scale the bitmap if necessary
    
    drawAlphaBitmap didn't use a high quality scaler for scaling
    the texture but used the default scaling method in OpenGL (either
    GL_NEAREST or GL_LINEAR, whichever is defined when texture
    is created) which are low quality scalers - especially when
    downscaling textures.
    
    Change-Id: I6236b2ee92b9e5044b176a40a444027072b09b58
    (cherry picked from commit 19baa61e1d7b140b9e24717f7080617ab3d324d4)
    Reviewed-on: https://gerrit.libreoffice.org/26100
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    (cherry picked from commit 86fef4ea205f3001305a6122bfa127b196e2d345)

diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 39ae806..188db65 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -2144,12 +2144,25 @@ bool OpenGLSalGraphicsImpl::drawAlphaBitmap(
 
     const OpenGLSalBitmap& rBitmap = static_cast<const OpenGLSalBitmap&>(rSalBitmap);
     const OpenGLSalBitmap& rAlpha = static_cast<const OpenGLSalBitmap&>(rAlphaBitmap);
-    OpenGLTexture& rTexture( rBitmap.GetTexture() );
-    OpenGLTexture& rAlphaTex( rAlpha.GetTexture() );
+    OpenGLTexture& rTexture(rBitmap.GetTexture());
+    OpenGLTexture& rAlphaTexture(rAlpha.GetTexture());
 
     VCL_GL_INFO( "::drawAlphaBitmap" );
     PreDraw();
-    DrawTextureWithMask( rTexture, rAlphaTex, rPosAry );
+
+    if (rPosAry.mnSrcWidth  != rPosAry.mnDestWidth ||
+        rPosAry.mnSrcHeight != rPosAry.mnDestHeight)
+    {
+        basegfx::B2DPoint aNull(rPosAry.mnDestX,rPosAry.mnDestY);
+        basegfx::B2DPoint aX(rPosAry.mnDestX + rPosAry.mnDestWidth, rPosAry.mnDestY);
+        basegfx::B2DPoint aY(rPosAry.mnDestX, rPosAry.mnDestY + rPosAry.mnDestHeight);
+        DrawTransformedTexture(rTexture, rAlphaTexture, aNull, aX, aY);
+    }
+    else
+    {
+        DrawTextureWithMask( rTexture, rAlphaTexture, rPosAry );
+    }
+
     PostDraw();
     return true;
 }
commit cd624e04bd4a8432517fec696c037ffc36534e88
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Dec 15 12:35:05 2015 +0000

    Related: tdf#99446 cairo text + xrender bodge
    
    (cherry picked from commit 1d18db339242a535d956b7e944ad1488fd2b4fd8)
    
    Change-Id: I926881bcfa4911f3d7f4899711be44a2f6d82026
    Reviewed-on: https://gerrit.libreoffice.org/26087
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit c55d703ea00de67793765f8da7ca17dfb54281fc)

diff --git a/vcl/unx/generic/gdi/x11cairotextrender.cxx b/vcl/unx/generic/gdi/x11cairotextrender.cxx
index 8734526..17cb462 100644
--- a/vcl/unx/generic/gdi/x11cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/x11cairotextrender.cxx
@@ -42,6 +42,10 @@ struct _XRegion
     BOX extents;
 };
 
+#if CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 10, 0)
+#    define CAIRO_OPERATOR_DIFFERENCE (static_cast<cairo_operator_t>(23))
+#endif
+
 X11CairoTextRender::X11CairoTextRender(X11SalGraphics& rParent)
     : mrParent(rParent)
 {
@@ -78,6 +82,20 @@ cairo_t* X11CairoTextRender::getCairoContext()
 
     cairo_t *cr = cairo_create(surface);
     cairo_surface_destroy(surface);
+
+    //rhbz#1283420 bodge to draw and undraw something which has the side effect
+    //of making the mysterious xrender related problem go away
+    if (cairo_version() >= CAIRO_VERSION_ENCODE(1, 10, 0))
+    {
+        cairo_save(cr);
+        cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
+        cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE);
+        cairo_rectangle(cr, 0, 0, 1, 1);
+        cairo_fill_preserve(cr);
+        cairo_fill(cr);
+        cairo_restore(cr);
+    }
+
     return cr;
 }
 
commit f7a8e465aa73a842702ab09db9af9bd8f4a26450
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 9 09:08:08 2016 +0100

    Resolves: tdf#93135 can't resize shape with "resize shape to fit text"
    
    These are regressions from...
    
    commit 4a847bb4a2002d7f8f5854b7276ac67d369bdd3b
    Date:   Sun Aug 2 21:20:48 2015 +0200
    
        tdf#93079:  "resize shape to fit text" state can't be disabled
    
        Wrong copy-paste
    
    and
    
    commit b2bae9b940fc34d2eecd7839e3cba1f41d111e87
    Date:   Thu Apr 9 23:38:47 2015 +0200
    
        Related tdf#34467: Fit to Frame for text boxes is broken
    
        Wrong Copy-paste
    
    Its turns out that there is *no* SDRATTR_TEXT_AUTOGROWSIZE property.
    Only a SDRATTR_TEXT_AUTOGROWHEIGHT property
    
    e.g. see CustomShapeProperties::UpdateTextFrameStatus of
    svx/source/sdr/properties/customshapeproperties.cxx
    
    "change TextFrame flag when bResizeShapeToFitText changes (which is mapped on
    the item SDRATTR_TEXT_AUTOGROWHEIGHT for custom shapes, argh)"
    
    So the inconsistency between
    
    getting the itemstate of SDRATTR_TEXT_AUTOGROWSIZE
    and then
    setting/getting SDRATTR_TEXT_AUTOGROWHEIGHT
    is better resolved by getting the itemstate of SDRATTR_TEXT_AUTOGROWHEIGHT
    
    will have a follow up patch to remove SDRATTR_TEXT_AUTOGROWSIZE to show
    its not used by anything
    
    Change-Id: I8b8abde17c15761c621815ed2be62d6a8a5cd69a
    (cherry picked from commit d1df071c3fc452817746a8daa13000d2df667aba)
    (cherry picked from commit 65d1e5294c9f0d9300dbb92f6670cdcafa8a1ac2)
    Reviewed-on: https://gerrit.libreoffice.org/26089
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit 3a5ce16bc2a0f766a442cebc49d4c361f95cf91b)

diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 50cbcb5..a0ba1bb 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -204,9 +204,9 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
     m_pTsbAutoGrowWidth->SaveValue();
 
     // autogrowsize
-    if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWSIZE ) != SfxItemState::DONTCARE )
+    if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != SfxItemState::DONTCARE )
     {
-        m_pTsbAutoGrowSize->SetState( static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_TEXT_AUTOGROWSIZE ) ).
+        m_pTsbAutoGrowSize->SetState( static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ).
                         GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
         m_pTsbAutoGrowSize->EnableTriState( false );
     }
@@ -384,7 +384,7 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
     eState = m_pTsbAutoGrowSize->GetState();
     if( m_pTsbAutoGrowSize->IsValueChangedFromSaved() )
     {
-        rAttrs->Put( makeSdrTextAutoGrowSizeItem ( TRISTATE_TRUE == eState ) );
+        rAttrs->Put( makeSdrTextAutoGrowHeightItem( TRISTATE_TRUE == eState ) );
     }
 
     eState = m_pTsbWordWrapText->GetState();
commit 392bba2ea763ccfabf119f4d0ba2a26aee06a268
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jun 8 11:35:15 2016 +0100

    Resolves: rhbz#1343766 a11y queries during dispose trigger combobox crashes
    
    Change-Id: I29863ca95e64ccd31795f78c29c89ff35009d718
    (cherry picked from commit f120abb446bf3f5230ed06a3b148654dde36bb94)
    (cherry picked from commit f7b0cbf1df98a1c42fe25cfdbd9977fba78347c8)
    Reviewed-on: https://gerrit.libreoffice.org/26057
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit 62a30dd22805eab1785703114ebf060a00cf9170)

diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 94dc649..8abef91 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -1029,11 +1029,15 @@ OUString ComboBox::GetEntry( sal_Int32 nPos ) const
 
 sal_Int32 ComboBox::GetEntryCount() const
 {
+    if (!m_pImpl->m_pImplLB)
+        return 0;
     return m_pImpl->m_pImplLB->GetEntryList()->GetEntryCount() - m_pImpl->m_pImplLB->GetEntryList()->GetMRUCount();
 }
 
 bool ComboBox::IsTravelSelect() const
 {
+    if (!m_pImpl->m_pImplLB)
+        return false;
     return m_pImpl->m_pImplLB->IsTravelSelect();
 }
 
@@ -1052,6 +1056,8 @@ void ComboBox::EnableMultiSelection( bool bMulti )
 
 bool ComboBox::IsMultiSelectionEnabled() const
 {
+    if (!m_pImpl->m_pImplLB)
+        return false;
     return m_pImpl->m_pImplLB->IsMultiSelectionEnabled();
 }
 
commit 7b3c124d371d00e2d071c5312df226943abc5934
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Jun 9 14:43:44 2016 +0200

    Resolves: tdf#100285 EASTERSUNDAY() check valid year between 1583 and 9956
    
    Change-Id: I4b25f1eb8e3cf0236b69607bb9ab9b4c57ae918a
    (cherry picked from commit 2c08ec226e771de10c8863b7f1cda016fea442d2)
    Reviewed-on: https://gerrit.libreoffice.org/26109
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit 8118a7c30e02b96a9dde9da590892c498681227f)

diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index ef2277a..2a35f83 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -282,6 +282,12 @@ void ScInterpreter::ScEasterSunday()
         nYear = (sal_Int16) ::rtl::math::approxFloor( GetDouble() );
         if ( nYear < 100 )
             nYear = pFormatter->ExpandTwoDigitYear( nYear );
+        if (nYear < 1583 || nYear > 9956)
+        {
+            // Valid Gregorian and maximum year constraints not met.
+            PushIllegalArgument();
+            return;
+        }
         // don't worry, be happy :)
         int B,C,D,E,F,G,H,I,K,L,M,N,O;
         N = nYear % 19;
commit f863042c6d4908efedb3e9e774f4dce8bd4cbfc2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 9 21:25:12 2016 +0100

    Resolves: tdf#100181 quickstart crashes immediately without Quickstarter
    
    Change-Id: I0257651b3841dea596077cfacbf7d69a20b04252
    Reviewed-on: https://gerrit.libreoffice.org/26134
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit dfb2a8deab1324047a4ed81a131a1ef3552c3e8e)
    (cherry picked from commit dd02cca2e64b061ddd5003ad0485dcbfae7f5ddf)
    Reviewed-on: https://gerrit.libreoffice.org/26149
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit 63a54519f6cd3e0c22a1a24015002d07407ac37e)

diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 13e11cb..1802938 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -122,19 +122,16 @@ css::uno::Sequence<OUString> SAL_CALL ShutdownIcon::getSupportedServiceNames()
 bool ShutdownIcon::bModalMode = false;
 ShutdownIcon* ShutdownIcon::pShutdownIcon = nullptr;
 
-#if !defined( ENABLE_QUICKSTART_APPLET )
-// To remove conditionals
 extern "C" {
     static void disabled_initSystray() { }
     static void disabled_deInitSystray() { }
 }
-#endif
 
 namespace {
 
 boost::logic::tribool loaded(boost::logic::indeterminate);
-oslGenericFunction pInitSystray(nullptr);
-oslGenericFunction pDeInitSystray(nullptr);
+oslGenericFunction pInitSystray = disabled_initSystray;
+oslGenericFunction pDeInitSystray = disabled_deInitSystray;
 
 bool LoadModule()
 {
@@ -170,10 +167,6 @@ bool LoadModule()
             loaded = true;
         }
 #  endif // UNX
-#else
-        pInitSystray = disabled_initSystray;
-        pDeInitSystray = disabled_deInitSystray;
-        loaded = false;
 #endif // ENABLE_QUICKSTART_APPLET
     }
     assert(!boost::logic::indeterminate(loaded));
commit 2baef344bdfba30a59ff1fde6e6c2c3bf5150e42
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 10 14:56:54 2016 +0100

    Resolves: tdf#100275 makeMark may return null under some circumstances
    
    Change-Id: If3b83413c028c6cd1c055e632b6f050ec7f2475d
    (cherry picked from commit 5c1a1d1c66aff497702abc20df5832fa348f1008)
    (cherry picked from commit 61a98b7bb14986f6c7c218effacabbe4b925f6b6)
    Reviewed-on: https://gerrit.libreoffice.org/26166
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit 63c693a09f9fc816c8d392d82855fab6f561392c)

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 2138bf3e6..7894515 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -253,9 +253,12 @@ namespace
                 aTmpPam,
                 pMark->GetName(),
                 IDocumentMarkAccess::GetType(*pMark));
-            // Explicitly try to get exactly the same name as in the source
-            // because NavigatorReminders, DdeBookmarks etc. ignore the proposed name
-            pDestDoc->getIDocumentMarkAccess()->renameMark(pNewMark, pMark->GetName());
+            if (pNewMark)
+            {
+                // Explicitly try to get exactly the same name as in the source
+                // because NavigatorReminders, DdeBookmarks etc. ignore the proposed name
+                pDestDoc->getIDocumentMarkAccess()->renameMark(pNewMark, pMark->GetName());
+            }
 
             // copying additional attributes for bookmarks or fieldmarks
             ::sw::mark::IBookmark* const pNewBookmark =


More information about the Libreoffice-commits mailing list