[Libreoffice-commits] core.git: svx/inc svx/source

Caolán McNamara caolanm at redhat.com
Sat Dec 27 03:00:33 PST 2014


 svx/inc/galbrws2.hxx                    |    4 +--
 svx/inc/gallery.hrc                     |    8 ------
 svx/source/gallery2/GalleryControl.cxx  |    9 ++-----
 svx/source/gallery2/GallerySplitter.cxx |   12 ++--------
 svx/source/gallery2/GallerySplitter.hxx |    5 +---
 svx/source/gallery2/galbrws1.cxx        |    3 --
 svx/source/gallery2/galbrws1.hxx        |    1 
 svx/source/gallery2/galbrws2.cxx        |    4 +--
 svx/source/gallery2/gallery.src         |   38 --------------------------------
 9 files changed, 13 insertions(+), 71 deletions(-)

New commits:
commit 03c95abe6b748d1155a62a9febcec96219bc3818
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Dec 26 10:05:05 2014 +0000

    de-resource RID_SVXDLG_GALLERYBROWSER
    
    Change-Id: I33df0c65d230ed13a5121555c8cf26a7bd27969a

diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
index e431fd2..4a77603 100644
--- a/svx/inc/galbrws2.hxx
+++ b/svx/inc/galbrws2.hxx
@@ -152,8 +152,8 @@ public:
 
 public:
 
-                        GalleryBrowser2( vcl::Window* pParent, const ResId& rResId, Gallery* pGallery );
-                        virtual ~GalleryBrowser2();
+    GalleryBrowser2(vcl::Window* pParent, Gallery* pGallery);
+    virtual ~GalleryBrowser2();
 
     void                SelectTheme( const OUString& rThemeName );
 
diff --git a/svx/inc/gallery.hrc b/svx/inc/gallery.hrc
index 47cd183..a9f2484 100644
--- a/svx/inc/gallery.hrc
+++ b/svx/inc/gallery.hrc
@@ -23,9 +23,6 @@
 #include <svx/dialogs.hrc>
 #include "galtheme.hrc"
 
-// Dialoge
-#define RID_SVXDLG_GALLERYBROWSER               (RID_SVX_GALLERY_START + 5)
-
 // Gallery-Strings
 #define RID_SVXSTR_EXTFORMAT1_SYS               (RID_SVX_GALLERY_START + 15)
 #define RID_SVXSTR_EXTFORMAT1_UI                (RID_SVX_GALLERY_START + 16)
@@ -88,11 +85,6 @@
 #define MN_PROPERTIES 23
 #define MN_ASSIGN_ID 24
 
-// Gallery Browser
-#define GALLERY_BROWSER1    1
-#define GALLERY_BROWSER2    2
-#define GALLERY_SPLITTER    1
-
 #endif // _SVX_GALLERY_HRC
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/gallery2/GalleryControl.cxx b/svx/source/gallery2/GalleryControl.cxx
index 1498a79..5c3679e 100644
--- a/svx/source/gallery2/GalleryControl.cxx
+++ b/svx/source/gallery2/GalleryControl.cxx
@@ -38,24 +38,21 @@ static const sal_Int32 gnInitialVerticalSplitPosition (150);
 GalleryControl::GalleryControl (
     SfxBindings* /*pBindings*/,
     vcl::Window* pParentWindow)
-    : Window(pParentWindow, GAL_RES(RID_SVXDLG_GALLERYBROWSER)),
+    : Window(pParentWindow, WB_SIZEABLE|WB_MOVEABLE|WB_CLOSEABLE|WB_HIDE),
       mpGallery (Gallery::GetGalleryInstance()),
       mpSplitter(new GallerySplitter(
               this,
-              GAL_RES(GALLERY_SPLITTER),
+              WB_HSCROLL,
               ::boost::bind(&GalleryControl::InitSettings, this))),
       mpBrowser1(new GalleryBrowser1(
               this,
-              GAL_RES(GALLERY_BROWSER1),
               mpGallery,
               ::boost::bind(&GalleryControl::GalleryKeyInput,this,_1,_2),
               ::boost::bind(&GalleryControl::ThemeSelectionHasChanged, this))),
-      mpBrowser2(new GalleryBrowser2(this, GAL_RES(GALLERY_BROWSER2), mpGallery)),
+      mpBrowser2(new GalleryBrowser2(this, mpGallery)),
       maLastSize(GetOutputSizePixel()),
       mbIsInitialResize(true)
 {
-    FreeResource();
-
     mpBrowser1->SelectTheme(0);
     mpBrowser1->Show(true);
 
diff --git a/svx/source/gallery2/GallerySplitter.cxx b/svx/source/gallery2/GallerySplitter.cxx
index 44b3c5e..cd8121a 100644
--- a/svx/source/gallery2/GallerySplitter.cxx
+++ b/svx/source/gallery2/GallerySplitter.cxx
@@ -19,18 +19,12 @@
 
 #include "GallerySplitter.hxx"
 
-
-
 GallerySplitter::GallerySplitter(
     vcl::Window* pParent,
-    const ResId& rResId,
+    WinBits nStyle,
     const ::boost::function<void(void)>& rDataChangeFunctor)
-    : Splitter( pParent, rResId ),
-      maDataChangeFunctor(rDataChangeFunctor)
-{
-}
-
-GallerySplitter::~GallerySplitter()
+    : Splitter(pParent, nStyle)
+    , maDataChangeFunctor(rDataChangeFunctor)
 {
 }
 
diff --git a/svx/source/gallery2/GallerySplitter.hxx b/svx/source/gallery2/GallerySplitter.hxx
index 1097b3b..f5c787d 100644
--- a/svx/source/gallery2/GallerySplitter.hxx
+++ b/svx/source/gallery2/GallerySplitter.hxx
@@ -25,11 +25,10 @@
 class GallerySplitter : public Splitter
 {
 public:
-    GallerySplitter (
+    GallerySplitter(
         vcl::Window* pParent,
-        const ResId& rResId,
+        WinBits nStyle,
         const ::boost::function<void(void)>& rDataChangeFunctor);
-    virtual ~GallerySplitter (void);
 
 protected:
     virtual void    DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index 86f5f07..183480d 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -114,12 +114,11 @@ bool GalleryThemeListBox::PreNotify( NotifyEvent& rNEvt )
 
 GalleryBrowser1::GalleryBrowser1(
     vcl::Window* pParent,
-    const ResId& rResId,
     Gallery* pGallery,
     const ::boost::function<sal_Bool(const KeyEvent&,Window*)>& rKeyInputHandler,
     const ::boost::function<void(void)>& rThemeSlectionHandler)
     :
-    Control               ( pParent, rResId ),
+    Control               ( pParent, WB_TABSTOP ),
     maNewTheme            ( this, WB_3DLOOK ),
     mpThemes              ( new GalleryThemeListBox( this, WB_TABSTOP | WB_3DLOOK | WB_BORDER | WB_HSCROLL | WB_VSCROLL | WB_AUTOHSCROLL | WB_SORT ) ),
     mpGallery             ( pGallery ),
diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx
index 94a8d3e..1751586 100644
--- a/svx/source/gallery2/galbrws1.hxx
+++ b/svx/source/gallery2/galbrws1.hxx
@@ -123,7 +123,6 @@ public:
 
                             GalleryBrowser1(
                                 vcl::Window* pParent,
-                                const ResId& rResId,
                                 Gallery* pGallery,
                                 const ::boost::function<sal_Bool(const KeyEvent&,Window*)>& rKeyInputHandler,
                                 const ::boost::function<void(void)>& rThemeSlectionHandler);
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index c00671e..8415967 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -414,8 +414,8 @@ void GalleryToolBox::KeyInput( const KeyEvent& rKEvt )
 }
 
 
-GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, const ResId& rResId, Gallery* pGallery ) :
-    Control             ( pParent, rResId ),
+GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, Gallery* pGallery ) :
+    Control             ( pParent, WB_TABSTOP ),
     mpGallery           ( pGallery ),
     mpCurTheme          ( NULL ),
     mpIconView          ( new GalleryIconView( this, NULL ) ),
diff --git a/svx/source/gallery2/gallery.src b/svx/source/gallery2/gallery.src
index bd3a976..b3ef1d2 100644
--- a/svx/source/gallery2/gallery.src
+++ b/svx/source/gallery2/gallery.src
@@ -23,44 +23,6 @@
 
 #define MASKCOLOR MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
 
-DockingWindow RID_SVXDLG_GALLERYBROWSER
-{
-    HelpId = "SVX_HID_GALLERY_BROWSER" ;
-    OutputSize = TRUE ;
-    Hide = TRUE ;
-    SVLook = TRUE ;
-    Pos = MAP_APPFONT ( 0 , 0 ) ;
-    Size = MAP_APPFONT ( 211, 100 ) ;
-    Text [ en-US ] = "Gallery";
-    Sizeable = TRUE;
-    Moveable = TRUE ;
-    Closeable = TRUE ;
-    Zoomable = TRUE ;
-    Dockable = TRUE ;
-    EnableResizing = TRUE ;
-
-    Control GALLERY_BROWSER1
-    {
-        Pos = MAP_APPFONT ( 0 , 0 ) ;
-        Size = MAP_APPFONT ( 69, 150 ) ;
-        Border = FALSE;
-    };
-
-    Splitter GALLERY_SPLITTER
-    {
-        Pos = MAP_APPFONT ( 70 , 0 ) ;
-        Size = MAP_APPFONT ( 3, 150 ) ;
-        HScroll = TRUE;
-    };
-
-    Control GALLERY_BROWSER2
-    {
-        Pos = MAP_APPFONT ( 73, 0 ) ;
-        Size = MAP_APPFONT ( 138, 150 ) ;
-        Border = FALSE;
-    };
-};
-
 String RID_SVXSTR_GALLERY_ACTUALIZE_PROGRESS
 {
     Text [ en-US ] = "Update";


More information about the Libreoffice-commits mailing list