[Libreoffice-commits] core.git: Branch 'feature/fixes11' - 2 commits - sfx2/source vcl/source

Tomaž Vajngerl tomaz.vajngerl at collabora.com
Fri Oct 16 03:59:23 PDT 2015


 sfx2/source/appl/sfxpicklist.cxx |    6 +++---
 sfx2/source/inc/sfxpicklist.hxx  |    2 +-
 vcl/source/gdi/impimage.cxx      |   23 +++--------------------
 3 files changed, 7 insertions(+), 24 deletions(-)

New commits:
commit a078c99cc554d15b1601dd0fdd8d8ffc6fd38434
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Mon Oct 12 10:49:26 2015 +0200

    tdf#94384 fix black icons with OpenGL enabled on Windows
    
    Looks like the Windows specific code in ImplUpdateDisplayBmp is
    not needed anymore and causes problems with OpenGL. The icons after
    the change still seem to be drawn correctly with OpenGL enabled
    or disabled.
    
    Change-Id: I3ae1a0ceb947254aaadbc3d772f0d662b291b594
    (cherry picked from commit c97ca26f2d5790d46b712813c15bb6731f0232b0)
    Reviewed-on: https://gerrit.libreoffice.org/19346
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx
index 8ea787e..ce6323f 100644
--- a/vcl/source/gdi/impimage.cxx
+++ b/vcl/source/gdi/impimage.cxx
@@ -327,28 +327,11 @@ void ImplImageBmp::Draw( sal_uInt16 nPos, OutputDevice* pOutDev,
     }
 }
 
-void ImplImageBmp::ImplUpdateDisplayBmp( OutputDevice*
-#if defined WNT
-pOutDev
-#endif
-)
+void ImplImageBmp::ImplUpdateDisplayBmp(OutputDevice*)
 {
-    if( !mpDisplayBmp && !maBmpEx.IsEmpty() )
+    if (!mpDisplayBmp && !maBmpEx.IsEmpty())
     {
-#if defined WNT
-        if( !maBmpEx.IsAlpha() )
-        {
-            // FIXME: this looks like rather an obsolete code-path to me.
-            const Bitmap aBmp( maBmpEx.GetBitmap().CreateDisplayBitmap( pOutDev ) );
-
-            if( maBmpEx.IsTransparent() )
-                mpDisplayBmp = new BitmapEx( aBmp, maBmpEx.GetMask().CreateDisplayBitmap( pOutDev ) );
-            else
-                mpDisplayBmp = new BitmapEx( aBmp );
-        }
-        else
-#endif
-            mpDisplayBmp = new BitmapEx( maBmpEx );
+        mpDisplayBmp = new BitmapEx(maBmpEx);
     }
 }
 
commit 49c661b5d6ea44b8002c57f8520b454986135cd1
Author: László Németh <laszlo.nemeth at collabora.com>
Date:   Fri Oct 16 12:57:43 2015 +0200

    Revert "tdf#95095: Don't create thumbnails on load."
    
    This reverts commit 333f65988811d1eccf2a5c31d812d7483ef347d9.

diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 5f401fd..0f3196d 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -159,7 +159,7 @@ SfxPickList::PickListEntry* SfxPickList::GetPickListEntry( sal_uInt32 nIndex )
         return 0;
 }
 
-void SfxPickList::AddDocumentToPickList(SfxObjectShell* pDocSh, bool bAvoidThumbnail)
+void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh )
 {
     SfxMedium *pMed = pDocSh->GetMedium();
     if( !pMed )
@@ -197,7 +197,7 @@ void SfxPickList::AddDocumentToPickList(SfxObjectShell* pDocSh, bool bAvoidThumb
     boost::optional<OUString> aThumbnail;
     // don't generate thumbnail when in headless mode, or on non-desktop (?)
 #if HAVE_FEATURE_DESKTOP
-    if (!bAvoidThumbnail && !pDocSh->IsModified() && !Application::IsHeadlessModeEnabled())
+    if (!pDocSh->IsModified() && !Application::IsHeadlessModeEnabled())
     {
         // not modified => the document matches what is in the shell
         SFX_ITEMSET_ARG( pMed->GetItemSet(), pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, false );
@@ -412,7 +412,7 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint )
 
             case SFX_EVENT_OPENDOC:
             {
-                AddDocumentToPickList(pDocSh, /* bAvoidThumbnail = */ true);
+                AddDocumentToPickList(pDocSh);
             }
             break;
 
diff --git a/sfx2/source/inc/sfxpicklist.hxx b/sfx2/source/inc/sfxpicklist.hxx
index 69e9d57..502492c 100644
--- a/sfx2/source/inc/sfxpicklist.hxx
+++ b/sfx2/source/inc/sfxpicklist.hxx
@@ -58,7 +58,7 @@ class SfxPickList : public SfxListener
        certain requirements, e.g. being writable. Check implementation for requirement
        details.
      */
-    static void             AddDocumentToPickList(SfxObjectShell* pDocShell, bool bAvoidThumbnail = false);
+    static void             AddDocumentToPickList( SfxObjectShell* pDocShell );
 
     public:
         static SfxPickList& Get();


More information about the Libreoffice-commits mailing list