[Libreoffice-commits] core.git: cui/source cui/uiconfig cui/UIConfig_cui.mk extras/source include/svx svx/source

Olivier Hallot olivier.hallot at edx.srv.br
Mon Jul 29 02:29:36 PDT 2013


 cui/UIConfig_cui.mk                            |    1 
 cui/source/inc/cuitabarea.hxx                  |   34 +-
 cui/source/inc/helpid.hrc                      |    1 
 cui/source/tabpages/tabarea.src                |  149 ----------
 cui/source/tabpages/tpbitmap.cxx               |  351 +++++++++++--------------
 cui/uiconfig/ui/bitmaptabpage.ui               |  321 ++++++++++++++++++++++
 extras/source/glade/libreoffice-catalog.xml.in |    3 
 include/svx/dlgctrl.hxx                        |    7 
 svx/source/dialog/dlgctrl.cxx                  |   21 +
 9 files changed, 534 insertions(+), 354 deletions(-)

New commits:
commit 876fdf014124543d242ea415698c5f0a5a002b98
Author: Olivier Hallot <olivier.hallot at edx.srv.br>
Date:   Fri Jul 26 16:06:53 2013 -0300

    Convert bitmap tab page to widget UI
    
    Change-Id: I5633a5e96582f94b9619152805cfa13daeb3fe53
    Reviewed-on: https://gerrit.libreoffice.org/5162
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 0db14ff..00212d6 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/asiantypography \
 	cui/uiconfig/ui/autocorrectdialog \
 	cui/uiconfig/ui/backgroundpage \
+	cui/uiconfig/ui/bitmaptabpage \
 	cui/uiconfig/ui/borderpage \
 	cui/uiconfig/ui/cellalignment \
 	cui/uiconfig/ui/charnamepage \
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 402ddb0..44a05d9 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -522,24 +522,21 @@ class SvxBitmapTabPage : public SvxTabPage
     using TabPage::DeactivatePage;
 
 private:
-    SvxPixelCtl         aCtlPixel;
-    FixedText           aFtPixelEdit;
-    FixedText           aFtColor;
-    ColorLB             aLbColor;
-    FixedText           aFtBackgroundColor;
-    ColorLB             aLbBackgroundColor;
-    FixedText           aLbBitmapsHidden;
-    BitmapLB            aLbBitmaps;
-    FixedLine           aFlProp;
-    SvxXRectPreview     aCtlPreview;
-    PushButton          aBtnAdd;
-    PushButton          aBtnModify;
-    PushButton          aBtnImport;
-    PushButton          aBtnDelete;
-    ImageButton         aBtnLoad;
-    ImageButton         aBtnSave;
-
-    SvxBitmapCtl        aBitmapCtl;
+    VclBox*             m_pBxPixelEditor;
+    SvxPixelCtl*        m_pCtlPixel;
+    ColorLB*            m_pLbColor;
+    ColorLB*            m_pLbBackgroundColor;
+    FixedText*          m_pLbBitmapsHidden;
+    BitmapLB*           m_pLbBitmaps;
+    SvxXRectPreview*    m_pCtlPreview;
+    PushButton*         m_pBtnAdd;
+    PushButton*         m_pBtnModify;
+    PushButton*         m_pBtnImport;
+    PushButton*         m_pBtnDelete;
+    PushButton*         m_pBtnLoad;
+    PushButton*         m_pBtnSave;
+
+    SvxBitmapCtl*       m_pBitmapCtl;
 
     const SfxItemSet&   rOutAttrs;
 
@@ -575,6 +572,7 @@ private:
 
 public:
     SvxBitmapTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
+    ~SvxBitmapTabPage();
 
     void    Construct();
 
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index e6e3b5a..9e1b026 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -246,7 +246,6 @@
 #define HID_MEASURE_CTL_PREVIEW "CUI_HID_MEASURE_CTL_PREVIEW"
 #define HID_SVXPAGE_SWPOSSIZE "CUI_HID_SVXPAGE_SWPOSSIZE"
 
-#define HID_AREA_BITMAP "CUI_HID_AREA_BITMAP"
 #define HID_TPSHADOW_CTRL "CUI_HID_TPSHADOW_CTRL"
 #define HID_LINE_ENDDEF "CUI_HID_LINE_ENDDEF"
 #define HID_LINE_LINE "CUI_HID_LINE_LINE"
diff --git a/cui/source/tabpages/tabarea.src b/cui/source/tabpages/tabarea.src
index f789b47..703af0e 100644
--- a/cui/source/tabpages/tabarea.src
+++ b/cui/source/tabpages/tabarea.src
@@ -29,155 +29,6 @@
 #define TRANS_GRAD_OFFSET_Y             64
 
 // ------------------------------------------------------
-TabPage RID_SVXPAGE_BITMAP
-{
-    HelpID = HID_AREA_BITMAP ;
-    Hide = TRUE ;
-    Text [ en-US ] = "Bitmap Patterns" ;
-    Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-    FixedLine FL_PROP
-    {
-        Pos = MAP_APPFONT ( 6 , 3  ) ;
-        Size = MAP_APPFONT ( 248, 8 ) ;
-        Text [ en-US ] = "Properties";
-    };
-    FixedText FT_PIXEL_EDIT
-    {
-        Pos = MAP_APPFONT ( 12 , 14  ) ;
-        Size = MAP_APPFONT ( 85 , 8 ) ;
-        Text [ en-US ] = "Pattern Editor";
-    };
-    Control CTL_PIXEL
-    {
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 25  ) ;
-        Size = MAP_APPFONT ( 72 , 72 ) ;
-        TabStop = TRUE ;
-    };
-    FixedText FT_COLOR
-    {
-        Pos = MAP_APPFONT ( 12 , 104 ) ;
-        Size = MAP_APPFONT ( 85 , 8 ) ;
-        Text [ en-US ] = "~Foreground color";
-    };
-    ListBox LB_COLOR
-    {
-        HelpID = "cui:ListBox:RID_SVXPAGE_BITMAP:LB_COLOR";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 115  ) ;
-        Size = MAP_APPFONT ( 62 , 100 ) ;
-        TabStop = TRUE ;
-        DropDown = TRUE ;
-        DDExtraWidth = TRUE ;
-    };
-    FixedText FT_BACKGROUND_COLOR
-    {
-        Pos = MAP_APPFONT ( 12 , 131 ) ;
-        Size = MAP_APPFONT ( 85 , 8 ) ;
-        Text [ en-US ] = "~Background color";
-    };
-    ListBox LB_BACKGROUND_COLOR
-    {
-        HelpID = "cui:ListBox:RID_SVXPAGE_BITMAP:LB_BACKGROUND_COLOR";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 142  ) ;
-        Size = MAP_APPFONT ( 62 , 100 ) ;
-        TabStop = TRUE ;
-        DropDown = TRUE ;
-        DDExtraWidth = TRUE ;
-    };
-    FixedText FT_BITMAPS_HIDDEN
-    {
-        // Hidden label that provides the name for the bitmaps list box.
-        Text [ en-US ] = "Bitmap";
-    };
-    ListBox LB_BITMAPS
-    {
-        HelpID = "cui:ListBox:RID_SVXPAGE_BITMAP:LB_BITMAPS";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 103 , 14  ) ;
-        Size = MAP_APPFONT ( 88 , 110 ) ;
-        TabStop = TRUE ;
-    };
-    Control CTL_PREVIEW
-    {
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 103 , 131  ) ;
-        Size = MAP_APPFONT ( 88 , 42 ) ;
-    };
-    PushButton BTN_ADD
-    {
-        HelpID = "cui:PushButton:RID_SVXPAGE_BITMAP:BTN_ADD";
-        Pos = MAP_APPFONT ( 197 , 14 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        Text [ en-US ] = "~Add..." ;
-        TabStop = TRUE ;
-    };
-    PushButton BTN_MODIFY
-    {
-        HelpID = "cui:PushButton:RID_SVXPAGE_BITMAP:BTN_MODIFY";
-        Pos = MAP_APPFONT ( 197 , 32  ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        Text [ en-US ] = "~Modify..." ;
-        TabStop = TRUE ;
-    };
-    PushButton BTN_IMPORT
-    {
-        HelpID = "cui:PushButton:RID_SVXPAGE_BITMAP:BTN_IMPORT";
-        Pos = MAP_APPFONT ( 197 , 50  ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        Text [ en-US ] = "~Import..." ;
-        TabStop = TRUE ;
-    };
-    PushButton BTN_DELETE
-    {
-        HelpID = "cui:PushButton:RID_SVXPAGE_BITMAP:BTN_DELETE";
-        Pos = MAP_APPFONT ( 197 , 68 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        Text [ en-US ] = "~Delete..." ;
-        TabStop = TRUE ;
-    };
-
-    ImageButton BTN_LOAD
-    {
-	HelpID = "cui:ImageButton:RID_SVXPAGE_BITMAP:BTN_LOAD";
-        Pos = MAP_APPFONT ( 197 , 104  ) ;
-        Size = MAP_APPFONT ( 16 , 16 ) ;
-        TabStop = TRUE ;
-        QuickHelpText [ en-US ] = "Load Bitmap List";
-        ButtonImage = Image
-        {
-            ImageBitmap = Bitmap
-            {
-                File = "sc05501.bmp" ;
-            };
-        };
-    };
-    ImageButton BTN_SAVE
-    {
-	HelpID = "cui:ImageButton:RID_SVXPAGE_BITMAP:BTN_SAVE";
-        Pos = MAP_APPFONT ( 217 , 104  ) ;
-        Size = MAP_APPFONT ( 16 , 16 ) ;
-        TabStop = TRUE ;
-        QuickHelpText [ en-US ] = "Save Bitmap List";
-        ButtonImage = Image
-        {
-            ImageBitmap = Bitmap
-            {
-                File = "sc05502.bmp" ;
-            };
-        };
-    };
-    CheckBox BTN_EMBED
-    {
-	HelpID = "cui:ImageButton:RID_SVXPAGE_BITMAP:BTN_EMBED";
-        Pos = MAP_APPFONT ( 197 , 124 ) ;
-        Size = MAP_APPFONT ( 122 , 10 ) ;
-        Text [ en-US ] =  "Embed";
-    };
-};
-
-// ------------------------------------------------------
 TabDialog RID_SVXDLG_AREA
 {
     OutputSize = TRUE ;
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 1d516c4..eb3ed56 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -47,34 +47,12 @@
 #include "sfx2/opengrf.hxx"
 #include "paragrph.hrc"
 
-SvxBitmapTabPage::SvxBitmapTabPage
-(
-    Window* pParent,
-    const SfxItemSet& rInAttrs
-) :
-
-    SvxTabPage          ( pParent, CUI_RES( RID_SVXPAGE_BITMAP ), rInAttrs ),
-
-    aCtlPixel           ( this, CUI_RES( CTL_PIXEL ) ),
-    aFtPixelEdit        ( this, CUI_RES( FT_PIXEL_EDIT ) ),
-    aFtColor            ( this, CUI_RES( FT_COLOR ) ),
-    aLbColor            ( this, CUI_RES( LB_COLOR ) ),
-    aFtBackgroundColor  ( this, CUI_RES( FT_BACKGROUND_COLOR ) ),
-    aLbBackgroundColor  ( this, CUI_RES( LB_BACKGROUND_COLOR ) ),
-    // This fix text is used only to provide the name for the following
-    // bitmap list box.  The fixed text is not displayed.
-    aLbBitmapsHidden    ( this, CUI_RES( FT_BITMAPS_HIDDEN ) ),
-    aLbBitmaps          ( this, CUI_RES( LB_BITMAPS ) ),
-    aFlProp             ( this, CUI_RES( FL_PROP ) ),
-    aCtlPreview         ( this, CUI_RES( CTL_PREVIEW ) ),
-    aBtnAdd             ( this, CUI_RES( BTN_ADD ) ),
-    aBtnModify          ( this, CUI_RES( BTN_MODIFY ) ),
-    aBtnImport          ( this, CUI_RES( BTN_IMPORT ) ),
-    aBtnDelete          ( this, CUI_RES( BTN_DELETE ) ),
-    aBtnLoad            ( this, CUI_RES( BTN_LOAD ) ),
-    aBtnSave            ( this, CUI_RES( BTN_SAVE ) ),
-
-    aBitmapCtl          ( this, aCtlPreview.GetSizePixel() ),
+SvxBitmapTabPage::SvxBitmapTabPage(  Window* pParent, const SfxItemSet& rInAttrs) :
+
+    SvxTabPage          ( pParent,
+                          "BitmapTabPage",
+                          "cui/ui/bitmaptabpage.ui",
+                          rInAttrs ),
     rOutAttrs           ( rInAttrs ),
 
     pnBitmapListState   ( 0 ),
@@ -91,7 +69,36 @@ SvxBitmapTabPage::SvxBitmapTabPage
     aXFillAttr          ( pXPool ),
     rXFSet              ( aXFillAttr.GetItemSet() )
 {
-    FreeResource();
+    get(m_pBxPixelEditor,"boxEDITOR");
+    get(m_pCtlPixel,"CTL_PIXEL");
+    get(m_pLbColor,"LB_COLOR");
+    get(m_pLbBackgroundColor,"LB_BACKGROUND_COLOR");
+    get(m_pCtlPreview,"CTL_PREVIEW");
+    get(m_pLbBitmaps,"LB_BITMAPS");
+    get(m_pLbBitmapsHidden,"FT_BITMAPS_HIDDEN");
+    get(m_pBtnAdd,"BTN_ADD");
+    get(m_pBtnModify,"BTN_MODIFY");
+    get(m_pBtnImport,"BTN_IMPORT");
+    get(m_pBtnDelete,"BTN_DELETE");
+    get(m_pBtnLoad,"BTN_LOAD");
+    get(m_pBtnSave,"BTN_SAVE");
+
+    // size of the bitmap listbox
+    Size aSize = LogicToPixel(Size(88, 110), MAP_APPFONT);
+    m_pLbBitmaps->set_width_request(aSize.Width());
+    m_pLbBitmaps->set_height_request(aSize.Height());
+
+    // size of the bitmap editor
+    Size aSize2 = LogicToPixel(Size(72, 72), MAP_APPFONT);
+    m_pCtlPixel->set_width_request(aSize2.Width());
+    m_pCtlPixel->set_height_request(aSize2.Height());
+
+    // size of the bitmap display
+    Size aSize3 = LogicToPixel(Size(88, 42), MAP_APPFONT);
+    m_pCtlPreview->set_width_request(aSize3.Width());
+    m_pCtlPreview->set_height_request(aSize3.Height());
+
+    m_pBitmapCtl = new SvxBitmapCtl(this, m_pCtlPreview->GetSizePixel());
 
     // this page needs ExchangeSupport
     SetExchangeSupport();
@@ -100,43 +107,32 @@ SvxBitmapTabPage::SvxBitmapTabPage
     rXFSet.Put( aXFStyleItem );
     rXFSet.Put( aXBitmapItem );
 
-    aBtnAdd.SetClickHdl( LINK( this, SvxBitmapTabPage, ClickAddHdl_Impl ) );
-    aBtnImport.SetClickHdl(
-        LINK( this, SvxBitmapTabPage, ClickImportHdl_Impl ) );
-    aBtnModify.SetClickHdl(
-        LINK( this, SvxBitmapTabPage, ClickModifyHdl_Impl ) );
-    aBtnDelete.SetClickHdl(
-        LINK( this, SvxBitmapTabPage, ClickDeleteHdl_Impl ) );
-    aBtnLoad.SetClickHdl( LINK( this, SvxBitmapTabPage, ClickLoadHdl_Impl ) );
-    aBtnSave.SetClickHdl( LINK( this, SvxBitmapTabPage, ClickSaveHdl_Impl ) );
-
-    aLbBitmaps.SetSelectHdl(
-        LINK( this, SvxBitmapTabPage, ChangeBitmapHdl_Impl ) );
-    aLbColor.SetSelectHdl(
-        LINK( this, SvxBitmapTabPage, ChangePixelColorHdl_Impl ) );
-    aLbBackgroundColor.SetSelectHdl(
-        LINK( this, SvxBitmapTabPage, ChangeBackgrndColorHdl_Impl ) );
-
-    String accName = String(CUI_RES(STR_EXAMPLE));
-    aCtlPreview.SetAccessibleName(accName);
-    aCtlPixel.SetAccessibleRelationMemberOf( &aFlProp );
-    aCtlPixel.SetAccessibleRelationLabeledBy( &aFtPixelEdit );
-    aLbBitmaps.SetAccessibleRelationLabeledBy(&aLbBitmaps);
-    aBtnAdd.SetAccessibleRelationMemberOf( &aFlProp );
-    aBtnModify.SetAccessibleRelationMemberOf( &aFlProp );
-    aBtnImport.SetAccessibleRelationMemberOf( &aFlProp );
-    aBtnDelete.SetAccessibleRelationMemberOf( &aFlProp );
+    m_pBtnAdd->SetClickHdl( LINK( this, SvxBitmapTabPage, ClickAddHdl_Impl ) );
+    m_pBtnImport->SetClickHdl( LINK( this, SvxBitmapTabPage, ClickImportHdl_Impl ) );
+    m_pBtnModify->SetClickHdl( LINK( this, SvxBitmapTabPage, ClickModifyHdl_Impl ) );
+    m_pBtnDelete->SetClickHdl( LINK( this, SvxBitmapTabPage, ClickDeleteHdl_Impl ) );
+    m_pBtnLoad->SetClickHdl( LINK( this, SvxBitmapTabPage, ClickLoadHdl_Impl ) );
+    m_pBtnSave->SetClickHdl( LINK( this, SvxBitmapTabPage, ClickSaveHdl_Impl ) );
+
+    m_pLbBitmaps->SetSelectHdl( LINK( this, SvxBitmapTabPage, ChangeBitmapHdl_Impl ) );
+    m_pLbColor->SetSelectHdl( LINK( this, SvxBitmapTabPage, ChangePixelColorHdl_Impl ) );
+    m_pLbBackgroundColor->SetSelectHdl( LINK( this, SvxBitmapTabPage, ChangeBackgrndColorHdl_Impl ) );
+
+}
 
+SvxBitmapTabPage::~SvxBitmapTabPage()
+{
+    delete m_pBitmapCtl;
 }
 
 // -----------------------------------------------------------------------
 
 void SvxBitmapTabPage::Construct()
 {
-    aLbColor.Fill( pColorList );
-    aLbBackgroundColor.CopyEntries( aLbColor );
+    m_pLbColor->Fill( pColorList );
+    m_pLbBackgroundColor->CopyEntries( *m_pLbColor );
 
-    aLbBitmaps.Fill( pBitmapList );
+    m_pLbBitmaps->Fill( pBitmapList );
 }
 
 // -----------------------------------------------------------------------
@@ -160,28 +156,28 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet&  )
                     pColorList = ( (SvxAreaTabDialog*) GetParentDialog() )->GetNewColorList();
 
                 // LbColor
-                nPos = aLbColor.GetSelectEntryPos();
-                aLbColor.Clear();
-                aLbColor.Fill( pColorList );
-                nCount = aLbColor.GetEntryCount();
+                nPos = m_pLbColor->GetSelectEntryPos();
+                m_pLbColor->Clear();
+                m_pLbColor->Fill( pColorList );
+                nCount = m_pLbColor->GetEntryCount();
                 if( nCount == 0 )
                     ; // this case should not occur
                 else if( nCount <= nPos )
-                    aLbColor.SelectEntryPos( 0 );
+                    m_pLbColor->SelectEntryPos( 0 );
                 else
-                    aLbColor.SelectEntryPos( nPos );
+                    m_pLbColor->SelectEntryPos( nPos );
 
                 // LbColorBackground
-                nPos = aLbBackgroundColor.GetSelectEntryPos();
-                aLbBackgroundColor.Clear();
-                aLbBackgroundColor.CopyEntries( aLbColor );
-                nCount = aLbBackgroundColor.GetEntryCount();
+                nPos = m_pLbBackgroundColor->GetSelectEntryPos();
+                m_pLbBackgroundColor->Clear();
+                m_pLbBackgroundColor->CopyEntries( *m_pLbColor );
+                nCount = m_pLbBackgroundColor->GetEntryCount();
                 if( nCount == 0 )
                     ; // this case should not occur
                 else if( nCount <= nPos )
-                    aLbBackgroundColor.SelectEntryPos( 0 );
+                    m_pLbBackgroundColor->SelectEntryPos( 0 );
                 else
-                    aLbBackgroundColor.SelectEntryPos( nPos );
+                    m_pLbBackgroundColor->SelectEntryPos( nPos );
 
                 ChangePixelColorHdl_Impl( this );
                 ChangeBackgrndColorHdl_Impl( this );
@@ -206,7 +202,7 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet&  )
 
             if( *pPageType == PT_BITMAP && *pPos != LISTBOX_ENTRY_NOTFOUND )
             {
-                aLbBitmaps.SelectEntryPos( *pPos );
+                m_pLbBitmaps->SelectEntryPos( *pPos );
             }
             // colors could have been deleted
             ChangeBitmapHdl_Impl( this );
@@ -239,17 +235,17 @@ sal_Bool SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs )
         if(PT_BITMAP == *pPageType)
         {
             _rOutAttrs.Put(XFillStyleItem(XFILL_BITMAP));
-            sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos();
+            sal_uInt16 nPos = m_pLbBitmaps->GetSelectEntryPos();
             if(LISTBOX_ENTRY_NOTFOUND != nPos)
             {
                 const XBitmapEntry* pXBitmapEntry = pBitmapList->GetBitmap(nPos);
-                const String aString(aLbBitmaps.GetSelectEntry());
+                const String aString(m_pLbBitmaps->GetSelectEntry());
 
                 _rOutAttrs.Put(XFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()));
             }
             else
             {
-                const BitmapEx aBitmapEx(aBitmapCtl.GetBitmapEx());
+                const BitmapEx aBitmapEx(m_pBitmapCtl->GetBitmapEx());
 
                 _rOutAttrs.Put(XFillBitmapItem(String(), Graphic(aBitmapEx)));
             }
@@ -265,32 +261,32 @@ void SvxBitmapTabPage::Reset( const SfxItemSet&  )
 {
     // aLbBitmaps.SelectEntryPos( 0 );
 
-    aBitmapCtl.SetLines( aCtlPixel.GetLineCount() );
-    aBitmapCtl.SetPixelColor( aLbColor.GetSelectEntryColor() );
-    aBitmapCtl.SetBackgroundColor( aLbBackgroundColor.GetSelectEntryColor() );
-    aBitmapCtl.SetBmpArray( aCtlPixel.GetBitmapPixelPtr() );
+    m_pBitmapCtl->SetLines( m_pCtlPixel->GetLineCount() );
+    m_pBitmapCtl->SetPixelColor( m_pLbColor->GetSelectEntryColor() );
+    m_pBitmapCtl->SetBackgroundColor( m_pLbBackgroundColor->GetSelectEntryColor() );
+    m_pBitmapCtl->SetBmpArray( m_pCtlPixel->GetBitmapPixelPtr() );
 
     // get bitmap and display it
-    const XFillBitmapItem aBmpItem(OUString(), Graphic(aBitmapCtl.GetBitmapEx()));
+    const XFillBitmapItem aBmpItem(OUString(), Graphic(m_pBitmapCtl->GetBitmapEx()));
     rXFSet.Put( aBmpItem );
-    aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() );
-    aCtlPreview.Invalidate();
+    m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() );
+    m_pCtlPreview->Invalidate();
 
     ChangeBitmapHdl_Impl( this );
 
     // determine button state
     if( pBitmapList->Count() )
     {
-        aBtnAdd.Enable();
-        aBtnModify.Enable();
-        aBtnDelete.Enable();
-        aBtnSave.Enable();
+        m_pBtnAdd->Enable();
+        m_pBtnModify->Enable();
+        m_pBtnDelete->Enable();
+        m_pBtnSave->Enable();
     }
     else
     {
-        aBtnModify.Disable();
-        aBtnDelete.Disable();
-        aBtnSave.Disable();
+        m_pBtnModify->Disable();
+        m_pBtnDelete->Disable();
+        m_pBtnSave->Disable();
     }
 }
 
@@ -307,7 +303,7 @@ SfxTabPage* SvxBitmapTabPage::Create( Window* pWindow,
 IMPL_LINK_NOARG(SvxBitmapTabPage, ChangeBitmapHdl_Impl)
 {
     GraphicObject* pGraphicObject = 0;
-    int nPos(aLbBitmaps.GetSelectEntryPos());
+    int nPos(m_pLbBitmaps->GetSelectEntryPos());
 
     if(LISTBOX_ENTRY_NOTFOUND != nPos)
     {
@@ -329,8 +325,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ChangeBitmapHdl_Impl)
 
         if(!pGraphicObject)
         {
-            aLbBitmaps.SelectEntryPos(0);
-            nPos = aLbBitmaps.GetSelectEntryPos();
+            m_pLbBitmaps->SelectEntryPos(0);
+            nPos = m_pLbBitmaps->GetSelectEntryPos();
 
             if(LISTBOX_ENTRY_NOTFOUND != nPos)
             {
@@ -345,73 +341,64 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ChangeBitmapHdl_Impl)
         BitmapColor aFront;
         bool bIs8x8(isHistorical8x8(pGraphicObject->GetGraphic().GetBitmap(), aBack, aFront));
 
-        aLbColor.SetNoSelection();
-        aLbBackgroundColor.SetNoSelection();
+        m_pLbColor->SetNoSelection();
+        m_pLbBackgroundColor->SetNoSelection();
 
         if(bIs8x8)
         {
-            aCtlPixel.SetPaintable( sal_True );
-            aCtlPixel.Enable();
-            aFtPixelEdit.Enable();
-            aFtColor.Enable();
-            aLbColor.Enable();
-            aFtBackgroundColor.Enable();
-            aLbBackgroundColor.Enable();
-            aBtnModify.Enable();
-            aBtnAdd.Enable();
+            m_pCtlPixel->SetPaintable( sal_True );
+            m_pBxPixelEditor->Enable();
+            m_pBtnModify->Enable();
+            m_pBtnAdd->Enable();
 
             // setting the pixel control
-            aCtlPixel.SetXBitmap(pGraphicObject->GetGraphic().GetBitmapEx());
+
+            m_pCtlPixel->SetXBitmap(pGraphicObject->GetGraphic().GetBitmapEx());
 
             Color aPixelColor = aFront;
             Color aBackColor = aBack;
 
-            aBitmapCtl.SetPixelColor( aPixelColor );
-            aBitmapCtl.SetBackgroundColor( aBackColor );
+            m_pBitmapCtl->SetPixelColor( aPixelColor );
+            m_pBitmapCtl->SetBackgroundColor( aBackColor );
 
             // if the entry is not in the listbox,
             // the color is added temporarily
-            if( 0 == aLbBitmaps.GetSelectEntryPos() )
+            if( 0 == m_pLbBitmaps->GetSelectEntryPos() )
             {
-                aLbColor.SelectEntry( Color( COL_BLACK ) );
+                m_pLbColor->SelectEntry( Color( COL_BLACK ) );
                 ChangePixelColorHdl_Impl( this );
             }
             else
-                aLbColor.SelectEntry( aPixelColor );
-            if( aLbColor.GetSelectEntryCount() == 0 )
+                m_pLbColor->SelectEntry( aPixelColor );
+            if( m_pLbColor->GetSelectEntryCount() == 0 )
             {
-                aLbColor.InsertEntry( aPixelColor, String() );
-                aLbColor.SelectEntry( aPixelColor );
+                m_pLbColor->InsertEntry( aPixelColor, String() );
+                m_pLbColor->SelectEntry( aPixelColor );
             }
-            aLbBackgroundColor.SelectEntry( aBackColor );
-            if( aLbBackgroundColor.GetSelectEntryCount() == 0 )
+            m_pLbBackgroundColor->SelectEntry( aBackColor );
+            if( m_pLbBackgroundColor->GetSelectEntryCount() == 0 )
             {
-                aLbBackgroundColor.InsertEntry( aBackColor, String() );
-                aLbBackgroundColor.SelectEntry( aBackColor );
+                m_pLbBackgroundColor->InsertEntry( aBackColor, String() );
+                m_pLbBackgroundColor->SelectEntry( aBackColor );
             }
         }
         else
         {
-            aCtlPixel.Reset();
-            aCtlPixel.SetPaintable( sal_False );
-            aCtlPixel.Disable();
-            aFtPixelEdit.Disable();
-            aFtColor.Disable();
-            aLbColor.Disable();
-            aFtBackgroundColor.Disable();
-            aLbBackgroundColor.Disable();
-            aBtnModify.Disable();
-            aBtnAdd.Disable();
+            m_pCtlPixel->Reset();
+            m_pCtlPixel->SetPaintable( sal_False );
+            m_pBxPixelEditor->Disable();
+            m_pBtnModify->Disable();
+            m_pBtnAdd->Disable();
         }
 
-        aCtlPixel.Invalidate();
+        m_pCtlPixel->Invalidate();
 
         // display bitmap
         const XFillBitmapItem aXBmpItem(String(), *pGraphicObject);
         rXFSet.Put( aXBmpItem );
 
-        aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() );
-        aCtlPreview.Invalidate();
+        m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() );
+        m_pCtlPreview->Invalidate();
 
         bBmpChanged = sal_False;
         delete pGraphicObject;
@@ -424,7 +411,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ChangeBitmapHdl_Impl)
 
 long SvxBitmapTabPage::CheckChanges_Impl()
 {
-    sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos();
+    sal_uInt16 nPos = m_pLbBitmaps->GetSelectEntryPos();
     if( nPos != LISTBOX_ENTRY_NOTFOUND )
     {
         if( bBmpChanged )
@@ -436,10 +423,8 @@ long SvxBitmapTabPage::CheckChanges_Impl()
                                                         String( CUI_RES( RID_SVXSTR_ASK_CHANGE_BITMAP ) ),
                                                         &aWarningBoxImage  );
             DBG_ASSERT(aMessDlg, "Dialogdiet fail!");
-            aMessDlg->SetButtonText( MESS_BTN_1,
-                                    String( ResId( RID_SVXSTR_CHANGE, rMgr ) ) );
-            aMessDlg->SetButtonText( MESS_BTN_2,
-                                    String( ResId( RID_SVXSTR_ADD, rMgr ) ) );
+            aMessDlg->SetButtonText( MESS_BTN_1, String( ResId( RID_SVXSTR_CHANGE, rMgr ) ) );
+            aMessDlg->SetButtonText( MESS_BTN_2, String( ResId( RID_SVXSTR_ADD, rMgr ) ) );
 
             short nRet = aMessDlg->Execute();
 
@@ -454,7 +439,7 @@ long SvxBitmapTabPage::CheckChanges_Impl()
                 case RET_BTN_2:
                 {
                     ClickAddHdl_Impl( this );
-                    nPos = aLbBitmaps.GetSelectEntryPos();
+                    nPos = m_pLbBitmaps->GetSelectEntryPos();
                 }
                 break;
 
@@ -464,7 +449,7 @@ long SvxBitmapTabPage::CheckChanges_Impl()
             delete aMessDlg;
         }
     }
-    nPos = aLbBitmaps.GetSelectEntryPos();
+    nPos = m_pLbBitmaps->GetSelectEntryPos();
     if( nPos != LISTBOX_ENTRY_NOTFOUND )
         *pPos = nPos;
     return 0L;
@@ -535,9 +520,9 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickAddHdl_Impl)
     if( !nError )
     {
         XBitmapEntry* pEntry = 0;
-        if( aCtlPixel.IsEnabled() )
+        if( m_pCtlPixel->IsEnabled() )
         {
-            const BitmapEx aBitmapEx(aBitmapCtl.GetBitmapEx());
+            const BitmapEx aBitmapEx(m_pBitmapCtl->GetBitmapEx());
 
             pEntry = new XBitmapEntry(Graphic(aBitmapEx), aName);
         }
@@ -557,8 +542,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickAddHdl_Impl)
         {
             pBitmapList->Insert( pEntry );
             const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
-            aLbBitmaps.Append(rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry );
-            aLbBitmaps.SelectEntryPos( aLbBitmaps.GetEntryCount() - 1 );
+            m_pLbBitmaps->Append(rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry );
+            m_pLbBitmaps->SelectEntryPos( m_pLbBitmaps->GetEntryCount() - 1 );
 
             *pnBitmapListState |= CT_MODIFIED;
 
@@ -569,9 +554,9 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickAddHdl_Impl)
     // determine button state
     if( pBitmapList->Count() )
     {
-        aBtnModify.Enable();
-        aBtnDelete.Enable();
-        aBtnSave.Enable();
+        m_pBtnModify->Enable();
+        m_pBtnDelete->Enable();
+        m_pBtnSave->Enable();
     }
     return 0L;
 }
@@ -650,8 +635,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl)
                 pBitmapList->Insert( pEntry );
 
                 const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
-                aLbBitmaps.Append(rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry );
-                aLbBitmaps.SelectEntryPos( aLbBitmaps.GetEntryCount() - 1 );
+                m_pLbBitmaps->Append(rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry );
+                m_pLbBitmaps->SelectEntryPos( m_pLbBitmaps->GetEntryCount() - 1 );
 
                 *pnBitmapListState |= CT_MODIFIED;
 
@@ -672,7 +657,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl)
 
 IMPL_LINK_NOARG(SvxBitmapTabPage, ClickModifyHdl_Impl)
 {
-    sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos();
+    sal_uInt16 nPos = m_pLbBitmaps->GetSelectEntryPos();
 
     if ( nPos != LISTBOX_ENTRY_NOTFOUND )
     {
@@ -707,11 +692,11 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickModifyHdl_Impl)
             {
                 bLoop = sal_False;
 
-                const BitmapEx aBitmapEx(aBitmapCtl.GetBitmapEx());
+                const BitmapEx aBitmapEx(m_pBitmapCtl->GetBitmapEx());
                 const XBitmapEntry aEntry(Graphic(aBitmapEx), aName);
 
-                aLbBitmaps.Modify( rStyleSettings.GetListBoxPreviewDefaultPixelSize(), aEntry, nPos );
-                aLbBitmaps.SelectEntryPos( nPos );
+                m_pLbBitmaps->Modify( rStyleSettings.GetListBoxPreviewDefaultPixelSize(), aEntry, nPos );
+                m_pLbBitmaps->SelectEntryPos( nPos );
 
                 *pnBitmapListState |= CT_MODIFIED;
 
@@ -733,7 +718,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickModifyHdl_Impl)
 
 IMPL_LINK_NOARG(SvxBitmapTabPage, ClickDeleteHdl_Impl)
 {
-    sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos();
+    sal_uInt16 nPos = m_pLbBitmaps->GetSelectEntryPos();
 
     if( nPos != LISTBOX_ENTRY_NOTFOUND )
     {
@@ -743,11 +728,11 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickDeleteHdl_Impl)
         if( aQueryBox.Execute() == RET_YES )
         {
             delete pBitmapList->Remove( nPos );
-            aLbBitmaps.RemoveEntry( nPos );
-            aLbBitmaps.SelectEntryPos( 0 );
+            m_pLbBitmaps->RemoveEntry( nPos );
+            m_pLbBitmaps->SelectEntryPos( 0 );
 
-            aCtlPreview.Invalidate();
-            aCtlPixel.Invalidate();
+            m_pCtlPreview->Invalidate();
+            m_pCtlPixel->Invalidate();
 
             ChangeBitmapHdl_Impl( this );
 
@@ -757,9 +742,9 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickDeleteHdl_Impl)
     // determine button state
     if( !pBitmapList->Count() )
     {
-        aBtnModify.Disable();
-        aBtnDelete.Disable();
-        aBtnSave.Disable();
+        m_pBtnModify->Disable();
+        m_pBtnDelete->Disable();
+        m_pBtnSave->Disable();
     }
     return 0L;
 }
@@ -808,8 +793,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickLoadHdl_Impl)
                 pBitmapList = pBmpList;
                 ( (SvxAreaTabDialog*) GetParentDialog() )->SetNewBitmapList( pBitmapList );
 
-                aLbBitmaps.Clear();
-                aLbBitmaps.Fill( pBitmapList );
+                m_pLbBitmaps->Clear();
+                m_pLbBitmaps->Fill( pBitmapList );
                 Reset( rOutAttrs );
 
                 pBitmapList->SetName( aURL.getName() );
@@ -843,15 +828,15 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickLoadHdl_Impl)
     // determine button state
     if( pBitmapList->Count() )
     {
-        aBtnModify.Enable();
-        aBtnDelete.Enable();
-        aBtnSave.Enable();
+        m_pBtnModify->Enable();
+        m_pBtnDelete->Enable();
+        m_pBtnSave->Enable();
     }
     else
     {
-        aBtnModify.Disable();
-        aBtnDelete.Disable();
-        aBtnSave.Disable();
+        m_pBtnModify->Disable();
+        m_pBtnDelete->Disable();
+        m_pBtnSave->Disable();
     }
     return 0L;
 }
@@ -920,15 +905,15 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickSaveHdl_Impl)
 
 IMPL_LINK_NOARG(SvxBitmapTabPage, ChangePixelColorHdl_Impl)
 {
-    aCtlPixel.SetPixelColor( aLbColor.GetSelectEntryColor() );
-    aCtlPixel.Invalidate();
+    m_pCtlPixel->SetPixelColor( m_pLbColor->GetSelectEntryColor() );
+    m_pCtlPixel->Invalidate();
 
-    aBitmapCtl.SetPixelColor( aLbColor.GetSelectEntryColor() );
+    m_pBitmapCtl->SetPixelColor( m_pLbColor->GetSelectEntryColor() );
 
     // get bitmap and display it
-    rXFSet.Put(XFillBitmapItem(String(), Graphic(aBitmapCtl.GetBitmapEx())));
-    aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() );
-    aCtlPreview.Invalidate();
+    rXFSet.Put(XFillBitmapItem(String(), Graphic(m_pBitmapCtl->GetBitmapEx())));
+    m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() );
+    m_pCtlPreview->Invalidate();
 
     bBmpChanged = sal_True;
 
@@ -939,15 +924,15 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ChangePixelColorHdl_Impl)
 
 IMPL_LINK_NOARG(SvxBitmapTabPage, ChangeBackgrndColorHdl_Impl)
 {
-    aCtlPixel.SetBackgroundColor( aLbBackgroundColor.GetSelectEntryColor() );
-    aCtlPixel.Invalidate();
+    m_pCtlPixel->SetBackgroundColor( m_pLbBackgroundColor->GetSelectEntryColor() );
+    m_pCtlPixel->Invalidate();
 
-    aBitmapCtl.SetBackgroundColor( aLbBackgroundColor.GetSelectEntryColor() );
+    m_pBitmapCtl->SetBackgroundColor( m_pLbBackgroundColor->GetSelectEntryColor() );
 
     // get bitmap and display it
-    rXFSet.Put(XFillBitmapItem(String(), Graphic(aBitmapCtl.GetBitmapEx())));
-    aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() );
-    aCtlPreview.Invalidate();
+    rXFSet.Put(XFillBitmapItem(String(), Graphic(m_pBitmapCtl->GetBitmapEx())));
+    m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() );
+    m_pCtlPreview->Invalidate();
 
     bBmpChanged = sal_True;
 
@@ -958,14 +943,14 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ChangeBackgrndColorHdl_Impl)
 
 void SvxBitmapTabPage::PointChanged( Window* pWindow, RECT_POINT )
 {
-    if( pWindow == &aCtlPixel )
+    if( pWindow == m_pCtlPixel )
     {
-        aBitmapCtl.SetBmpArray( aCtlPixel.GetBitmapPixelPtr() );
+        m_pBitmapCtl->SetBmpArray( m_pCtlPixel->GetBitmapPixelPtr() );
 
         // get bitmap and display it
-        rXFSet.Put(XFillBitmapItem(String(), Graphic(aBitmapCtl.GetBitmapEx())));
-        aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() );
-        aCtlPreview.Invalidate();
+        rXFSet.Put(XFillBitmapItem(String(), Graphic(m_pBitmapCtl->GetBitmapEx())));
+        m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() );
+        m_pCtlPreview->Invalidate();
 
         bBmpChanged = sal_True;
     }
@@ -976,8 +961,8 @@ void SvxBitmapTabPage::PointChanged( Window* pWindow, RECT_POINT )
 
 Window* SvxBitmapTabPage::GetParentLabeledBy( const Window* pLabeled ) const
 {
-    if (pLabeled == &aLbBitmaps)
-        return const_cast<FixedText*>(&aLbBitmapsHidden);
+    if (pLabeled == m_pLbBitmaps)
+        return const_cast<FixedText*>(m_pLbBitmapsHidden);
     else
         return SvxTabPage::GetParentLabeledBy (pLabeled);
 }
diff --git a/cui/uiconfig/ui/bitmaptabpage.ui b/cui/uiconfig/ui/bitmaptabpage.ui
new file mode 100644
index 0000000..2a0f604
--- /dev/null
+++ b/cui/uiconfig/ui/bitmaptabpage.ui
@@ -0,0 +1,321 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <!-- interface-requires LibreOffice 1.0 -->
+  <object class="GtkFrame" id="BitmapTabPage">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="margin_left">6</property>
+    <property name="margin_top">6</property>
+    <property name="label_xalign">0</property>
+    <property name="shadow_type">none</property>
+    <child>
+      <object class="GtkAlignment" id="alignment1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="top_padding">6</property>
+        <property name="left_padding">12</property>
+        <child>
+          <object class="GtkBox" id="box1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="margin_right">6</property>
+            <property name="spacing">12</property>
+            <child>
+              <object class="GtkBox" id="boxEDITOR">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkLabel" id="FT_PIXEL_EDIT">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Pattern Editor:</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="svxlo-SvxPixelCtl" id="CTL_PIXEL">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="valign">start</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="FT_COLOR">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Foreground color:</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="svxlo-ColorLB" id="LB_COLOR">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="FT_BACKGROUND_COLOR">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Background color:</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="svxlo-ColorLB" id="LB_BACKGROUND_COLOR">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">5</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="box3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">center</property>
+                <property name="valign">start</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="svxlo-BitmapLB" id="LB_BITMAPS:border">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="vexpand">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="svxlo-SvxXRectPreview" id="CTL_PREVIEW">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="CTL_PREVIEW-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Example</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButtonBox" id="buttonbox1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">6</property>
+                <property name="layout_style">start</property>
+                <child>
+                  <object class="GtkButton" id="BTN_ADD">
+                    <property name="label">gtk-add</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="BTN_MODIFY">
+                    <property name="label" translatable="yes">_Modify...</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="BTN_IMPORT">
+                    <property name="label" translatable="yes">_Import...</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="BTN_DELETE">
+                    <property name="label">gtk-delete</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkGrid" id="grid4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="row_spacing">6</property>
+                    <property name="column_spacing">6</property>
+                    <child>
+                      <object class="GtkButton" id="BTN_LOAD">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="has_tooltip">True</property>
+                        <property name="tooltip_markup" translatable="yes">Load Bitmap List</property>
+                        <property name="tooltip_text" translatable="yes">Load Bitmap List</property>
+                        <property name="halign">center</property>
+                        <property name="hexpand">True</property>
+                        <property name="image">image1</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>
+                      <object class="GtkButton" id="BTN_SAVE">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="has_tooltip">True</property>
+                        <property name="tooltip_markup" translatable="yes">Save Bitmap List</property>
+                        <property name="tooltip_text" translatable="yes">Save Bitmap List</property>
+                        <property name="halign">center</property>
+                        <property name="hexpand">True</property>
+                        <property name="image">image2</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>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="FT_BITMAPS_HIDDEN">
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Bitmap</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">1</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">5</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+    <child type="label">
+      <object class="GtkLabel" id="label1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Properties</property>
+        <attributes>
+          <attribute name="weight" value="bold"/>
+        </attributes>
+      </object>
+    </child>
+  </object>
+  <object class="GtkImage" id="image1">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="pixbuf">res/sc05501.png</property>
+  </object>
+  <object class="GtkImage" id="image2">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="pixbuf">res/sc05502.png</property>
+  </object>
+</interface>
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 3066768..bf617a2 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -221,6 +221,9 @@
     <glade-widget-class title="Shadow Preview" name="svxlo-SvxXShadowPreview"
                         generic-name="Shadow Preview Window" parent="GtkDrawingArea"
                             icon-name="widget-gtk-drawingarea"/>
+    <glade-widget-class title="Bitmap Pixel Editor" name="svxlo-SvxPixelCtl"
+                        generic-name="Bitmap Pixel Editor" parent="GtkDrawingArea"
+                        icon-name="widget-gtk-drawingarea"/>
     <glade-widget-class title="Frame Selector" name="svxlo-SvxFrameSelector"
                         generic-name="Frame Border Preview Window" parent="GtkDrawingArea"
                         icon-name="widget-gtk-drawingarea"/>
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 210a0e4..9107b68 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -140,7 +140,7 @@ class SVX_DLLPUBLIC SvxBitmapCtl
 {
 protected:
     Size            aSize;
-    sal_uInt16          nLines;
+    sal_uInt16      nLines;
     Color           aPixelColor, aBackgroundColor;
     const sal_uInt16*   pBmpArray;
 
@@ -177,8 +177,9 @@ protected:
     void    ChangePixel( sal_uInt16 nPixel );
 
 public:
-            SvxPixelCtl( Window* pParent, const ResId& rResId,
-                        sal_uInt16 nNumber = 8 );
+            SvxPixelCtl( Window* pParent, const ResId& rResId,  sal_uInt16 nNumber = 8 );
+            SvxPixelCtl( Window* pParent, sal_uInt16 nNumber = 8 );
+
             ~SvxPixelCtl();
 
     virtual void Paint( const Rectangle& rRect );
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 1b0b126..2259090 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -766,6 +766,27 @@ SvxPixelCtl::SvxPixelCtl( Window* pParent, const ResId& rResId, sal_uInt16 nNumb
     memset(pPixel, 0, nSquares * sizeof(sal_uInt16));
 }
 
+SvxPixelCtl::SvxPixelCtl( Window* pParent, sal_uInt16 nNumber ) :
+Control     ( pParent, WB_BORDER ),
+nLines      ( nNumber ),
+bPaintable  ( sal_True )
+{
+    //aRectSize = GetOutputSize();
+    aRectSize = LogicToPixel(Size(72, 72), MAP_APPFONT);
+
+    SetPixelColor( Color( COL_BLACK ) );
+    SetBackgroundColor( Color( COL_WHITE ) );
+    SetLineColor( Application::GetSettings().GetStyleSettings().GetShadowColor() );
+
+    nSquares = nLines * nLines;
+    pPixel = new sal_uInt16[ nSquares ];
+    memset(pPixel, 0, nSquares * sizeof(sal_uInt16));
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxPixelCtl(Window *pParent, sal_uInt16 nNumber)
+{
+    return new SvxPixelCtl(pParent, 8 ); //nNumber);
+}
 // Destructor dealocating the dynamic array
 
 SvxPixelCtl::~SvxPixelCtl( )


More information about the Libreoffice-commits mailing list