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

Caolán McNamara caolanm at redhat.com
Wed Jan 18 21:22:40 UTC 2017


 sfx2/source/appl/app.hrc     |   44 +++++++++++-----------
 sfx2/source/appl/newhelp.cxx |   44 +++++++++++-----------
 sfx2/source/appl/newhelp.src |   84 +++++++++++++++++++++----------------------
 3 files changed, 86 insertions(+), 86 deletions(-)

New commits:
commit 86255f68719dce3f2ff07c54270d3e08fbd852c9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jan 18 21:21:39 2017 +0000

    sfx2: load BitmapEx resources instead of Image ones
    
    Change-Id: I0ec89e022cac47b4a761da1715b39a7fb86ffdb0

diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc
index abd8ab2..2510c46 100644
--- a/sfx2/source/appl/app.hrc
+++ b/sfx2/source/appl/app.hrc
@@ -41,19 +41,19 @@
 #define STR_INFO_NOSEARCHRESULTS                (RID_SFX_APP_START+106)
 #define STR_INFO_NOSEARCHTEXTFOUND              (RID_SFX_APP_START+107)
 
-#define IMG_HELP_TOOLBOX_INDEX_ON               (RID_SFX_APP_START+110)
-#define IMG_HELP_TOOLBOX_INDEX_OFF              (RID_SFX_APP_START+111)
-#define IMG_HELP_TOOLBOX_START                  (RID_SFX_APP_START+112)
-#define IMG_HELP_TOOLBOX_PREV                   (RID_SFX_APP_START+113)
-#define IMG_HELP_TOOLBOX_NEXT                   (RID_SFX_APP_START+114)
-#define IMG_HELP_TOOLBOX_PRINT                  (RID_SFX_APP_START+115)
-#define IMG_HELP_TOOLBOX_BOOKMARKS              (RID_SFX_APP_START+116)
-#define IMG_HELP_TOOLBOX_SEARCHDIALOG           (RID_SFX_APP_START+117)
-#define IMG_HELP_TOOLBOX_COPY                   (RID_SFX_APP_START+118)
-
-#define IMG_HELP_CONTENT_BOOK_OPEN              (RID_SFX_APP_START+120)
-#define IMG_HELP_CONTENT_BOOK_CLOSED            (RID_SFX_APP_START+122)
-#define IMG_HELP_CONTENT_DOC                    (RID_SFX_APP_START+124)
+#define BMP_HELP_TOOLBOX_INDEX_ON               (RID_SFX_APP_START+110)
+#define BMP_HELP_TOOLBOX_INDEX_OFF              (RID_SFX_APP_START+111)
+#define BMP_HELP_TOOLBOX_START                  (RID_SFX_APP_START+112)
+#define BMP_HELP_TOOLBOX_PREV                   (RID_SFX_APP_START+113)
+#define BMP_HELP_TOOLBOX_NEXT                   (RID_SFX_APP_START+114)
+#define BMP_HELP_TOOLBOX_PRINT                  (RID_SFX_APP_START+115)
+#define BMP_HELP_TOOLBOX_BOOKMARKS              (RID_SFX_APP_START+116)
+#define BMP_HELP_TOOLBOX_SEARCHDIALOG           (RID_SFX_APP_START+117)
+#define BMP_HELP_TOOLBOX_COPY                   (RID_SFX_APP_START+118)
+
+#define BMP_HELP_CONTENT_BOOK_OPEN              (RID_SFX_APP_START+120)
+#define BMP_HELP_CONTENT_BOOK_CLOSED            (RID_SFX_APP_START+122)
+#define BMP_HELP_CONTENT_DOC                    (RID_SFX_APP_START+124)
 
 #define STR_HELP_WINDOW_TITLE                   (RID_SFX_APP_START+125) // string
 
@@ -84,15 +84,15 @@
 
 #define RID_HELP_ONSTARTUP_TEXT                 (RID_SFX_APP_START+145)
 
-#define IMG_HELP_TOOLBOX_L_INDEX_ON             (RID_SFX_APP_START+160)
-#define IMG_HELP_TOOLBOX_L_INDEX_OFF            (RID_SFX_APP_START+161)
-#define IMG_HELP_TOOLBOX_L_START                (RID_SFX_APP_START+162)
-#define IMG_HELP_TOOLBOX_L_PREV                 (RID_SFX_APP_START+163)
-#define IMG_HELP_TOOLBOX_L_NEXT                 (RID_SFX_APP_START+164)
-#define IMG_HELP_TOOLBOX_L_PRINT                (RID_SFX_APP_START+165)
-#define IMG_HELP_TOOLBOX_L_BOOKMARKS            (RID_SFX_APP_START+166)
-#define IMG_HELP_TOOLBOX_L_SEARCHDIALOG         (RID_SFX_APP_START+167)
-#define IMG_HELP_TOOLBOX_L_COPY                 (RID_SFX_APP_START+168)
+#define BMP_HELP_TOOLBOX_L_INDEX_ON             (RID_SFX_APP_START+160)
+#define BMP_HELP_TOOLBOX_L_INDEX_OFF            (RID_SFX_APP_START+161)
+#define BMP_HELP_TOOLBOX_L_START                (RID_SFX_APP_START+162)
+#define BMP_HELP_TOOLBOX_L_PREV                 (RID_SFX_APP_START+163)
+#define BMP_HELP_TOOLBOX_L_NEXT                 (RID_SFX_APP_START+164)
+#define BMP_HELP_TOOLBOX_L_PRINT                (RID_SFX_APP_START+165)
+#define BMP_HELP_TOOLBOX_L_BOOKMARKS            (RID_SFX_APP_START+166)
+#define BMP_HELP_TOOLBOX_L_SEARCHDIALOG         (RID_SFX_APP_START+167)
+#define BMP_HELP_TOOLBOX_L_COPY                 (RID_SFX_APP_START+168)
 
 #define RID_SECURITY_WARNING_TITLE              (RID_SFX_APP_START + 181)
 
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 46eb4ab..cb46469 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -267,9 +267,9 @@ struct ContentEntry_Impl
 
 ContentListBox_Impl::ContentListBox_Impl(vcl::Window* pParent, WinBits nStyle)
     : SvTreeListBox(pParent, nStyle)
-    , aOpenBookImage(SfxResId(IMG_HELP_CONTENT_BOOK_OPEN))
-    , aClosedBookImage(SfxResId(IMG_HELP_CONTENT_BOOK_CLOSED))
-    , aDocumentImage(SfxResId(IMG_HELP_CONTENT_DOC))
+    , aOpenBookImage(SfxResId(BMP_HELP_CONTENT_BOOK_OPEN))
+    , aClosedBookImage(SfxResId(BMP_HELP_CONTENT_BOOK_CLOSED))
+    , aDocumentImage(SfxResId(BMP_HELP_CONTENT_DOC))
 
 {
     SetStyle( GetStyle() | WB_HIDESELECTION | WB_HSCROLL );
@@ -1854,8 +1854,8 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) :
     aToolBox            ( VclPtr<ToolBox>::Create(this, 0) ),
     aOnStartupCB        ( VclPtr<CheckBox>::Create(this, WB_HIDE | WB_TABSTOP) ),
     aSelectIdle         ( "sfx2 appl SfxHelpTextWindow_Impl Select" ),
-    aIndexOnImage       ( SfxResId( IMG_HELP_TOOLBOX_INDEX_ON ) ),
-    aIndexOffImage      ( SfxResId( IMG_HELP_TOOLBOX_INDEX_OFF ) ),
+    aIndexOnImage       (BitmapEx(SfxResId(BMP_HELP_TOOLBOX_INDEX_ON))),
+    aIndexOffImage      (BitmapEx(SfxResId(BMP_HELP_TOOLBOX_INDEX_OFF))),
     aIndexOnText        ( SfxResId( STR_HELP_BUTTON_INDEX_ON ).toString() ),
     aIndexOffText       ( SfxResId( STR_HELP_BUTTON_INDEX_OFF ).toString() ),
     aOnStartupText      ( SfxResId( RID_HELP_ONSTARTUP_TEXT ).toString() ),
@@ -1951,33 +1951,33 @@ void SfxHelpTextWindow_Impl::InitToolBoxImages()
 {
     bool bLarge = SvtMiscOptions().AreCurrentSymbolsLarge();
 
-    aIndexOnImage  = Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_INDEX_ON  : IMG_HELP_TOOLBOX_INDEX_ON  ) );
-    aIndexOffImage = Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_INDEX_OFF : IMG_HELP_TOOLBOX_INDEX_OFF ) );
+    aIndexOnImage  = Image(BitmapEx(SfxResId(bLarge ? BMP_HELP_TOOLBOX_L_INDEX_ON : BMP_HELP_TOOLBOX_INDEX_ON)));
+    aIndexOffImage = Image(BitmapEx(SfxResId(bLarge ? BMP_HELP_TOOLBOX_L_INDEX_OFF : BMP_HELP_TOOLBOX_INDEX_OFF)));
 
     aToolBox->SetItemImage( TBI_INDEX, bIsIndexOn ? aIndexOffImage : aIndexOnImage );
 
     aToolBox->SetItemImage( TBI_BACKWARD,
-                           Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_PREV : IMG_HELP_TOOLBOX_PREV ) )
+                           Image(BitmapEx(SfxResId(bLarge ? BMP_HELP_TOOLBOX_L_PREV : BMP_HELP_TOOLBOX_PREV)))
     );
 
     aToolBox->SetItemImage( TBI_FORWARD,
-                           Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_NEXT : IMG_HELP_TOOLBOX_NEXT ) )
+                           Image(BitmapEx(SfxResId(bLarge ? BMP_HELP_TOOLBOX_L_NEXT : BMP_HELP_TOOLBOX_NEXT)))
     );
 
     aToolBox->SetItemImage( TBI_START,
-                           Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_START : IMG_HELP_TOOLBOX_START ) )
+                           Image(BitmapEx(SfxResId(bLarge ? BMP_HELP_TOOLBOX_L_START : BMP_HELP_TOOLBOX_START)))
     );
 
     aToolBox->SetItemImage( TBI_PRINT,
-                           Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_PRINT : IMG_HELP_TOOLBOX_PRINT ) )
+                           Image(BitmapEx(SfxResId(bLarge ? BMP_HELP_TOOLBOX_L_PRINT : BMP_HELP_TOOLBOX_PRINT)))
     );
 
     aToolBox->SetItemImage( TBI_BOOKMARKS,
-                           Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_BOOKMARKS : IMG_HELP_TOOLBOX_BOOKMARKS ) )
+                           Image(BitmapEx(SfxResId(bLarge ? BMP_HELP_TOOLBOX_L_BOOKMARKS : BMP_HELP_TOOLBOX_BOOKMARKS)))
     );
 
     aToolBox->SetItemImage( TBI_SEARCHDIALOG,
-                           Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_SEARCHDIALOG : IMG_HELP_TOOLBOX_SEARCHDIALOG ) )
+                           Image(BitmapEx(SfxResId(bLarge ? BMP_HELP_TOOLBOX_L_SEARCHDIALOG : BMP_HELP_TOOLBOX_SEARCHDIALOG)))
     );
 
     Size aSize = aToolBox->CalcWindowSizePixel();
@@ -2336,43 +2336,43 @@ bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
             aPos.Y() += pTextWin->GetPosPixel().Y();
             ScopedVclPtrInstance<PopupMenu> aMenu;
             if ( bIsIndexOn )
-                aMenu->InsertItem( TBI_INDEX, aIndexOffText, Image( SfxResId( IMG_HELP_TOOLBOX_INDEX_OFF ) ) );
+                aMenu->InsertItem(TBI_INDEX, aIndexOffText, Image(BitmapEx(SfxResId(BMP_HELP_TOOLBOX_INDEX_OFF))));
             else
-                aMenu->InsertItem( TBI_INDEX, aIndexOnText,  Image( SfxResId( IMG_HELP_TOOLBOX_INDEX_ON  ) ) );
+                aMenu->InsertItem(TBI_INDEX, aIndexOnText, Image(BitmapEx(SfxResId(BMP_HELP_TOOLBOX_INDEX_ON))));
 
             aMenu->SetHelpId( TBI_INDEX, HID_HELP_TOOLBOXITEM_INDEX );
             aMenu->InsertSeparator();
             aMenu->InsertItem( TBI_BACKWARD,
                               SfxResId( STR_HELP_BUTTON_PREV  ).toString(),
-                              Image(  SfxResId( IMG_HELP_TOOLBOX_PREV ) )
+                              Image(BitmapEx(SfxResId(BMP_HELP_TOOLBOX_PREV)))
             );
             aMenu->SetHelpId( TBI_BACKWARD, HID_HELP_TOOLBOXITEM_BACKWARD );
             aMenu->EnableItem( TBI_BACKWARD, pHelpWin->HasHistoryPredecessor() );
             aMenu->InsertItem( TBI_FORWARD,
                               SfxResId( STR_HELP_BUTTON_NEXT ).toString(),
-                              Image(  SfxResId( IMG_HELP_TOOLBOX_NEXT ) )
+                              Image(BitmapEx(SfxResId(BMP_HELP_TOOLBOX_NEXT)))
             );
             aMenu->SetHelpId( TBI_FORWARD, HID_HELP_TOOLBOXITEM_FORWARD );
             aMenu->EnableItem( TBI_FORWARD, pHelpWin->HasHistorySuccessor() );
             aMenu->InsertItem( TBI_START,
                               SfxResId( STR_HELP_BUTTON_START ).toString(),
-                              Image(  SfxResId( IMG_HELP_TOOLBOX_START ) )
+                              Image(BitmapEx(SfxResId(BMP_HELP_TOOLBOX_START)))
             );
             aMenu->SetHelpId( TBI_START, HID_HELP_TOOLBOXITEM_START );
             aMenu->InsertSeparator();
             aMenu->InsertItem( TBI_PRINT,
                               SfxResId( STR_HELP_BUTTON_PRINT ).toString(),
-                              Image(  SfxResId( IMG_HELP_TOOLBOX_PRINT ) )
+                              Image(BitmapEx(SfxResId(BMP_HELP_TOOLBOX_PRINT)))
             );
             aMenu->SetHelpId( TBI_PRINT, HID_HELP_TOOLBOXITEM_PRINT );
             aMenu->InsertItem( TBI_BOOKMARKS,
                               SfxResId( STR_HELP_BUTTON_ADDBOOKMARK ).toString(),
-                              Image(  SfxResId( IMG_HELP_TOOLBOX_BOOKMARKS  ) )
+                              Image(BitmapEx(SfxResId(BMP_HELP_TOOLBOX_BOOKMARKS)))
              );
             aMenu->SetHelpId( TBI_BOOKMARKS, HID_HELP_TOOLBOXITEM_BOOKMARKS );
             aMenu->InsertItem( TBI_SEARCHDIALOG,
                               SfxResId( STR_HELP_BUTTON_SEARCHDIALOG ).toString(),
-                              Image(  SfxResId( IMG_HELP_TOOLBOX_SEARCHDIALOG ) )
+                              Image(BitmapEx(SfxResId(BMP_HELP_TOOLBOX_SEARCHDIALOG)))
             );
             aMenu->SetHelpId( TBI_SEARCHDIALOG, HID_HELP_TOOLBOXITEM_SEARCHDIALOG );
             aMenu->InsertSeparator();
@@ -2396,7 +2396,7 @@ bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
             aMenu->InsertSeparator();
             aMenu->InsertItem( TBI_COPY,
                               SfxResId(STR_HELP_MENU_TEXT_COPY).toString(),
-                              Image(  SfxResId( IMG_HELP_TOOLBOX_COPY   ) )
+                              Image(BitmapEx(SfxResId(BMP_HELP_TOOLBOX_COPY)))
                 );
             aMenu->SetHelpId( TBI_COPY, ".uno:Copy" );
             aMenu->EnableItem( TBI_COPY, HasSelection() );
diff --git a/sfx2/source/appl/newhelp.src b/sfx2/source/appl/newhelp.src
index bbe6353..cf29f33 100644
--- a/sfx2/source/appl/newhelp.src
+++ b/sfx2/source/appl/newhelp.src
@@ -21,64 +21,64 @@
 #include "newhelp.hrc"
 #include "helpid.hrc"
 
-Image IMG_HELP_TOOLBOX_INDEX_ON
+Bitmap BMP_HELP_TOOLBOX_INDEX_ON
 {
-    ImageBitmap = Bitmap { File = "indexon_small.png" ; };
+    File = "indexon_small.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_INDEX_OFF
+Bitmap BMP_HELP_TOOLBOX_INDEX_OFF
 {
-    ImageBitmap = Bitmap { File = "indexoff_small.png" ; };
+    File = "indexoff_small.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_START
+Bitmap BMP_HELP_TOOLBOX_START
 {
-    ImageBitmap = Bitmap { File = "sc06303.png" ; };
+    File = "sc06303.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_PREV
+Bitmap BMP_HELP_TOOLBOX_PREV
 {
-    ImageBitmap = Bitmap { File = "sc06301.png" ; };
+    File = "sc06301.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_NEXT
+Bitmap BMP_HELP_TOOLBOX_NEXT
 {
-    ImageBitmap = Bitmap { File = "sc06300.png" ; };
+    File = "sc06300.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_PRINT
+Bitmap BMP_HELP_TOOLBOX_PRINT
 {
-    ImageBitmap = Bitmap { File = "sc05504.png" ; };
+    File = "sc05504.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_BOOKMARKS
+Bitmap BMP_HELP_TOOLBOX_BOOKMARKS
 {
-    ImageBitmap = Bitmap { File = "favourite.png" ; };
+    File = "favourite.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_SEARCHDIALOG
+Bitmap BMP_HELP_TOOLBOX_SEARCHDIALOG
 {
-    ImageBitmap = Bitmap { File = "sc05961.png" ; };
+    File = "sc05961.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_COPY
+Bitmap BMP_HELP_TOOLBOX_COPY
 {
-    ImageBitmap = Bitmap { File = "sc05711.png" ; };
+    File = "sc05711.png" ;
 };
 
-Image IMG_HELP_CONTENT_BOOK_OPEN
+Bitmap BMP_HELP_CONTENT_BOOK_OPEN
 {
-    ImageBitmap = Bitmap { File = "hlpbookopen.png" ; };
+    File = "hlpbookopen.png" ;
 };
 
-Image IMG_HELP_CONTENT_BOOK_CLOSED
+Bitmap BMP_HELP_CONTENT_BOOK_CLOSED
 {
-    ImageBitmap = Bitmap { File = "hlpbookclosed.png" ; };
+    File = "hlpbookclosed.png" ;
 };
 
-Image IMG_HELP_CONTENT_DOC
+Bitmap BMP_HELP_CONTENT_DOC
 {
-    ImageBitmap = Bitmap { File = "hlpdoc.png" ; };
+    File = "hlpdoc.png" ;
 };
 
 String STR_HELP_WINDOW_TITLE
@@ -190,49 +190,49 @@ String STR_INFO_NOSEARCHTEXTFOUND
     Text [ en-US ] = "The text you entered was not found.";
 };
 
-Image IMG_HELP_TOOLBOX_L_INDEX_ON
+Bitmap BMP_HELP_TOOLBOX_L_INDEX_ON
 {
-    ImageBitmap = Bitmap { File = "indexon_big.png" ; };
+    File = "indexon_big.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_L_INDEX_OFF
+Bitmap BMP_HELP_TOOLBOX_L_INDEX_OFF
 {
-    ImageBitmap = Bitmap { File = "indexoff_big.png" ; };
+    File = "indexoff_big.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_L_START
+Bitmap BMP_HELP_TOOLBOX_L_START
 {
-    ImageBitmap = Bitmap { File = "lc06303.png" ; };
+    File = "lc06303.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_L_PREV
+Bitmap BMP_HELP_TOOLBOX_L_PREV
 {
-    ImageBitmap = Bitmap { File = "lc06301.png" ; };
+    File = "lc06301.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_L_NEXT
+Bitmap BMP_HELP_TOOLBOX_L_NEXT
 {
-    ImageBitmap = Bitmap { File = "lc06300.png" ; };
+    File = "lc06300.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_L_PRINT
+Bitmap BMP_HELP_TOOLBOX_L_PRINT
 {
-    ImageBitmap = Bitmap { File = "lc05504.png" ; };
+    File = "lc05504.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_L_BOOKMARKS
+Bitmap BMP_HELP_TOOLBOX_L_BOOKMARKS
 {
-    ImageBitmap = Bitmap { File = "favourite_big.png" ; };
+    File = "favourite_big.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_L_SEARCHDIALOG
+Bitmap BMP_HELP_TOOLBOX_L_SEARCHDIALOG
 {
-    ImageBitmap = Bitmap { File = "lc05961.png" ; };
+    File = "lc05961.png" ;
 };
 
-Image IMG_HELP_TOOLBOX_L_COPY
+Bitmap BMP_HELP_TOOLBOX_L_COPY
 {
-    ImageBitmap = Bitmap { File = "lc05711.png" ; };
+    File = "lc05711.png" ;
 };
 
 String RID_HELP_ONSTARTUP_TEXT


More information about the Libreoffice-commits mailing list