[Libreoffice-commits] core.git: cui/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Jun 20 06:32:57 UTC 2018


 cui/source/options/personalization.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit ece3faf9a02fc2449150b066214eb84a87bd2aa8
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Jun 15 10:35:25 2018 +0200

    personalization: disable "own theme" button if we don't have any
    
    Change-Id: I3a5bfb757361208ce4ec193698a6e87b66285906
    Reviewed-on: https://gerrit.libreoffice.org/55846
    Reviewed-by: Heiko Tietze <tietze.heiko at gmail.com>
    Tested-by: Jenkins

diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index 0eb20534931a..eac843b3bd77 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -420,6 +420,7 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
     GraphicFilter aFilter;
     Graphic aGraphic;
     sal_Int32 nIndex = 0;
+    bool foundOne = false;
 
     while( aStream.IsOpen() && !aStream.eof() )
     {
@@ -439,7 +440,10 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
         BitmapEx aBmp = aGraphic.GetBitmapEx();
         m_vDefaultPersonaImages[nIndex]->Show();
         m_vDefaultPersonaImages[nIndex++]->SetModeImage( Image( aBmp ) );
+        foundOne = true;
     }
+
+    m_pDefaultPersona->Enable(foundOne);
 }
 
 void SvxPersonalizationTabPage::LoadExtensionThemes()


More information about the Libreoffice-commits mailing list