[PATCH] Convert Calc page header/footer content to Widget UI

Olivier Hallot (via Code Review) gerrit at gerrit.libreoffice.org
Thu May 2 02:31:05 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3737

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/37/3737/1

Convert Calc page header/footer content to Widget UI

Change-Id: I26465f69a7fa50fa58643c00225376a82ba8a7fc
---
M extras/source/glade/libreoffice-catalog.xml.in
M sc/UIConfig_scalc.mk
M sc/inc/globstr.hrc
M sc/source/ui/inc/hfedtdlg.hxx
M sc/source/ui/inc/popmenu.hxx
M sc/source/ui/inc/scuitphfedit.hxx
M sc/source/ui/inc/tphfedit.hxx
M sc/source/ui/pagedlg/hfedtdlg.cxx
M sc/source/ui/pagedlg/hfedtdlg.hrc
M sc/source/ui/pagedlg/hfedtdlg.src
M sc/source/ui/pagedlg/scuitphfedit.cxx
M sc/source/ui/pagedlg/tphfedit.cxx
M sc/source/ui/src/globstr.src
A sc/uiconfig/scalc/ui/headerfootercontent.ui
14 files changed, 911 insertions(+), 519 deletions(-)



diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index ca81047..d613b3d 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -205,6 +205,14 @@
                         generic-name="Cursor Reference Edit" parent="foruilo-RefEdit"
                         icon-name="widget-gtk-textentry"/>
 
+    <glade-widget-class title="Text View" name="sclo-ScEditWindow"
+                        generic-name="Text View" parent="GtkTextView"
+                        icon-name="widget-gtk-textentry"/>
+
+    <glade-widget-class title="Combo Image Button" name="sclo-ScExtIButton"
+                        generic-name="Combo Image Button" parent="GtkButton"
+                        icon-name="widget-gtk-button"/>
+
     <glade-widget-class title="Open Document ListBox" name="dbulo-OpenDocumentListBox"
                         generic-name="Open Document ListBox" parent="GtkComboBox"
                         icon-name="widget-gtk-combobox"/>
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 48a8da0..b9ecfbb 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -68,11 +68,12 @@
 	sc/uiconfig/scalc/ui/externaldata \
 	sc/uiconfig/scalc/ui/formatcellsdialog \
 	sc/uiconfig/scalc/ui/goalseekdlg \
+	sc/uiconfig/scalc/ui/headerfootercontent \
 	sc/uiconfig/scalc/ui/insertname \
 	sc/uiconfig/scalc/ui/insertsheet \
 	sc/uiconfig/scalc/ui/managenamesdialog \
 	sc/uiconfig/scalc/ui/printeroptions \
-	sc/uiconfig/scalc/ui/protectsheetdlg \
+        sc/uiconfig/scalc/ui/protectsheetdlg \
 	sc/uiconfig/scalc/ui/sheetprintpage \
 	sc/uiconfig/scalc/ui/selectrange \
 	sc/uiconfig/scalc/ui/selectsource \
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 24727b7..ae9629f 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -509,13 +509,13 @@
 #define STR_CHANGED_MOVE_REJECTION_WARNING      402
 #define STR_CHANGED_DELETE_REJECTION_WARNING    403
 
-#define STR_HF_NONE_IN_BRACKETS     404
-#define STR_HF_OF                   405
-#define STR_HF_OF_QUESTION          406
-#define STR_HF_CREATED_BY           407
-#define STR_HF_CONFIDENTIAL         408
-#define STR_HF_CUSTOMIZED           409
-#define STR_HF_CUSTOM_FOOTER        410
+// #define STR_HF_NONE_IN_BRACKETS     404
+// #define STR_HF_OF                   405
+// #define STR_HF_OF_QUESTION          406
+// #define STR_HF_CREATED_BY           407
+// #define STR_HF_CONFIDENTIAL         408
+// #define STR_HF_CUSTOMIZED           409
+//#define STR_HF_CUSTOM_FOOTER        410
 
 #define STR_ERR_DATAPILOT_INPUT     411
 
diff --git a/sc/source/ui/inc/hfedtdlg.hxx b/sc/source/ui/inc/hfedtdlg.hxx
index 9674118..56a50a9 100644
--- a/sc/source/ui/inc/hfedtdlg.hxx
+++ b/sc/source/ui/inc/hfedtdlg.hxx
@@ -37,7 +37,7 @@
                          Window*            pParent,
                          const SfxItemSet&  rCoreSet,
                          const String&      rPageStyle,
-                         sal_uInt16             nResId = RID_SCDLG_HFEDIT );
+                         sal_uInt16         nResId = RID_SCDLG_HFEDIT );
 
             ~ScHFEditDlg();
 
diff --git a/sc/source/ui/inc/popmenu.hxx b/sc/source/ui/inc/popmenu.hxx
index e3c10b3..70bfeed 100644
--- a/sc/source/ui/inc/popmenu.hxx
+++ b/sc/source/ui/inc/popmenu.hxx
@@ -32,7 +32,9 @@
     virtual void Select();
 public:
     ScPopupMenu() : nSel(0),bHit(false) {}
+
     ScPopupMenu(const ResId& rRes) : PopupMenu(rRes),nSel(0),bHit(false) {}
+
     sal_uInt16  GetSelected() const { return nSel; }
     sal_Bool    WasHit() const      { return bHit; }
 };
diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx
index b95a3a0..74d9ced 100644
--- a/sc/source/ui/inc/scuitphfedit.hxx
+++ b/sc/source/ui/inc/scuitphfedit.hxx
@@ -21,6 +21,7 @@
 #define SCUI_TPHFEDIT_HXX
 
 #include "tphfedit.hxx"
+//#include <boost/graph/graph_concepts.hpp>
 
 //===================================================================
 enum ScHFEntryId
@@ -47,41 +48,48 @@
 {
 public:
     virtual sal_Bool    FillItemSet ( SfxItemSet& rCoreSet );
-    virtual void    Reset       ( const SfxItemSet& rCoreSet );
+    virtual void        Reset       ( const SfxItemSet& rCoreSet );
 
     void            SetNumType(SvxNumType eNumType);
     void            ClearTextAreas();
 
 protected:
                 ScHFEditPage( Window*           pParent,
-                              sal_uInt16            nResId,
+                              sal_uInt16        nResId,
                               const SfxItemSet& rCoreSet,
-                              sal_uInt16            nWhich, bool bHeader );
+                              sal_uInt16        nWhich,
+                              bool              bHeader );
     virtual     ~ScHFEditPage();
 
 private:
-    FixedText       aFtLeft;
-    ScEditWindow    aWndLeft;
-    FixedText       aFtCenter;
-    ScEditWindow    aWndCenter;
-    FixedText       aFtRight;
-    ScEditWindow    aWndRight;
-    FixedText       maFtDefinedHF;
-        ListBox                 maLbDefined;
-    FixedText       maFtCustomHF;
-    ImageButton     aBtnText;
-    ScExtIButton    aBtnFile;
-    ImageButton     aBtnTable;
-    ImageButton     aBtnPage;
-    ImageButton     aBtnLastPage;
-    ImageButton     aBtnDate;
-    ImageButton     aBtnTime;
-    FixedLine       aFlInfo;
-    FixedInfo       aFtInfo;
-    ScPopupMenu     aPopUpFile;
+    //FixedText       aFtLeft;
+    ScEditWindow*    m_pWndLeft;
+    //FixedText       aFtCenter;
+    ScEditWindow*    m_pWndCenter;
+    //FixedText       aFtRight;
+    ScEditWindow*    m_pWndRight;
+    FixedText*       m_pFtDefinedHF;
+    ListBox*         m_pLbDefined;
+    FixedText*       m_pFtCustomHF;
+    PushButton*      m_pBtnText;
+    ScExtIButton*    m_pBtnFile;
+    PushButton*      m_pBtnTable;
+    PushButton*      m_pBtnPage;
+    PushButton*      m_pBtnLastPage;
+    PushButton*      m_pBtnDate;
+    PushButton*      m_pBtnTime;
+    ScPopupMenu      aPopUpFile;
 
-    sal_uInt16          nWhich;
-    String          aCmdArr[6];
+    FixedText*       m_pFtConfidential;
+    FixedText*       m_pFtPage;
+    FixedText*       m_pFtOfQuestion;
+    FixedText*       m_pFtOf;
+    FixedText*       m_pFtNone;
+    FixedText*       m_pFtCreatedBy;
+    FixedText*       m_pFtCustomized;
+
+    sal_uInt16       nWhich;
+    OUString         aCmdArr[6];
 
 private:
 #ifdef _TPHFEDIT_CXX
@@ -95,7 +103,7 @@
     bool IsDateEntry(EditTextObject* pTextObj);
     bool IsExtFileNameEntry(EditTextObject* pTextObj);
     DECL_LINK( ListHdl_Impl, ListBox* );
-    DECL_LINK( ClickHdl, ImageButton* );
+    DECL_LINK( ClickHdl,  PushButton* );
     DECL_LINK( MenuHdl, ScExtIButton* );
 #endif
 };
diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx
index 79a38c5..1cac2cf 100644
--- a/sc/source/ui/inc/tphfedit.hxx
+++ b/sc/source/ui/inc/tphfedit.hxx
@@ -56,6 +56,7 @@
 {
 public:
             ScEditWindow( Window* pParent, const ResId& rResId, ScEditWindowLocation eLoc );
+            ScEditWindow( Window* pParent,  WinBits nBits , ScEditWindowLocation eLoc );
             ~ScEditWindow();
 
     using Control::SetFont;
@@ -100,7 +101,7 @@
     Timer           aTimer;
     ScPopupMenu*    pPopupMenu;
     Link            aMLink;
-    sal_uInt16          nSelected;
+    sal_uInt16      nSelected;
 
     SC_DLLPRIVATE  DECL_LINK( TimerHdl, void*);
 
@@ -115,10 +116,11 @@
 public:
 
     ScExtIButton(Window* pParent, const ResId& rResId );
+    ScExtIButton(Window* pParent, WinBits nBits );
 
     void            SetPopupMenu(ScPopupMenu* pPopUp);
 
-    sal_uInt16          GetSelected();
+    sal_uInt16      GetSelected();
 
     void            SetMenuHdl( const Link& rLink ) { aMLink = rLink; }
     const Link&     GetMenuHdl() const { return aMLink; }
diff --git a/sc/source/ui/pagedlg/hfedtdlg.cxx b/sc/source/ui/pagedlg/hfedtdlg.cxx
index 61096a6..a74e267 100644
--- a/sc/source/ui/pagedlg/hfedtdlg.cxx
+++ b/sc/source/ui/pagedlg/hfedtdlg.cxx
@@ -54,7 +54,7 @@
                           Window*           pParent,
                           const SfxItemSet& rCoreSet,
                           const String&     rPageStyle,
-                          sal_uInt16            nResIdP )
+                          sal_uInt16        nResIdP )
     :   SfxTabDialog( pFrameP, pParent, ScResId( nResIdP ), &rCoreSet )
 {
     eNumType = ((const SvxPageItem&)rCoreSet.Get(ATTR_PAGE)).GetNumType();
diff --git a/sc/source/ui/pagedlg/hfedtdlg.hrc b/sc/source/ui/pagedlg/hfedtdlg.hrc
index 0193049..4281aa7 100644
--- a/sc/source/ui/pagedlg/hfedtdlg.hrc
+++ b/sc/source/ui/pagedlg/hfedtdlg.hrc
@@ -19,20 +19,9 @@
 
 #include "sc.hrc"
 
-#define FT_LEFT 1
-#define FT_CENTER 2
-#define FT_RIGHT 3
-#define FT_INFO 4
 #define WND_LEFT 1
 #define WND_CENTER 2
 #define WND_RIGHT 3
-#define BTN_TEXT 1
-#define BTN_PAGE 2
-#define BTN_PAGES 3
-#define BTN_DATE 4
-#define BTN_TIME 5
-#define BTN_FILE 6
-#define BTN_TABLE 7
 
 #define RID_POPUP_FCOMMAND      10
 #define FILE_COMMAND_TITEL      11
diff --git a/sc/source/ui/pagedlg/hfedtdlg.src b/sc/source/ui/pagedlg/hfedtdlg.src
index ef84d42..59aff1b 100644
--- a/sc/source/ui/pagedlg/hfedtdlg.src
+++ b/sc/source/ui/pagedlg/hfedtdlg.src
@@ -434,70 +434,6 @@
  //------------------------------------------------------------------------
 TabPage RID_HFBASE
 {
-    Hide = TRUE ;
-    HelpId = HID_SCPAGE_HFEDIT ;
-    Pos = MAP_APPFONT ( 0 , 0 ) ;
-    Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-    FixedText FT_LEFT
-    {
-        Pos = MAP_APPFONT ( 6 , 6 ) ;
-        Size = MAP_APPFONT ( 75 , 10 ) ;
-        Text [ en-US ] = "~Left area" ;
-    };
-    FixedText FT_CENTER
-    {
-        Pos = MAP_APPFONT ( 90 , 6 ) ;
-        Size = MAP_APPFONT ( 75 , 10 ) ;
-        Text [ en-US ] = "~Center area" ;
-    };
-    FixedText FT_RIGHT
-    {
-        Pos = MAP_APPFONT ( 174 , 6 ) ;
-        Size = MAP_APPFONT ( 75 , 10 ) ;
-        Text [ en-US ] = "R~ight area" ;
-    };
-    FixedText FT_HF_DEFINED
-    {
-        Pos = MAP_APPFONT ( 12 , 102 ) ;
-        Size = MAP_APPFONT ( 76 , 10 ) ;
-        Text [ en-US ] = "Hea~der" ;
-    };
-
-    FixedText FT_HF_CUSTOM
-    {
-        Pos = MAP_APPFONT ( 12 , 124 ) ;
-        Size = MAP_APPFONT ( 76 , 10 ) ;
-        Text [ en-US ] = "Custom header" ;
-    };
-
-    ImageButton BTN_TEXT
-    {
-        HelpId = HID_SC_HF_TEXT ;
-        Pos = MAP_APPFONT ( 90 , 122 ) ;
-        Size = MAP_APPFONT ( 15 , 15 ) ;
-        TabStop = TRUE ;
-        QuickHelpText [ en-US ] = "Text Attributes" ;
-        ButtonImage = Image
-        {
-            ImageBitmap = Bitmap { File = "text.png" ; };
-            MaskColor = STD_MASKCOLOR ;
-        };
-    };
-
-    ImageButton BTN_FILE
-    {
-        HelpId = HID_SC_HF_FILE ;
-        Pos = MAP_APPFONT ( 113 , 122 ) ;
-        Size = MAP_APPFONT ( 15 , 15 ) ;
-        TabStop = TRUE ;
-        QuickHelpText [ en-US ] = "Title" ;
-        ButtonImage = Image
-        {
-            ImageBitmap = Bitmap { File = "file.png" ; };
-            MaskColor = STD_MASKCOLOR ;
-        };
-    };
-
     Menu RID_POPUP_FCOMMAND
     {
         ItemList =
@@ -523,90 +459,6 @@
                 Text [ en-US ] = "Path/File Name";
             };
         };
-    };
-
-    ImageButton BTN_TABLE
-    {
-        HelpId = HID_SC_HF_TABLE ;
-        Pos = MAP_APPFONT ( 130 , 122 ) ;
-        Size = MAP_APPFONT ( 15 , 15 ) ;
-        TabStop = TRUE ;
-        QuickHelpText [ en-US ] = "Sheet Name" ;
-        ButtonImage = Image
-        {
-            ImageBitmap = Bitmap { File = "table.png" ; };
-            MaskColor = STD_MASKCOLOR;
-        };
-    };
-
-    ImageButton BTN_PAGE
-    {
-        HelpId = HID_SC_HF_PAGE ;
-        Pos = MAP_APPFONT ( 150 , 122 ) ;
-        Size = MAP_APPFONT ( 15 , 15 ) ;
-        TabStop = TRUE ;
-        QuickHelpText [ en-US ] = "Page" ;
-        ButtonImage = Image
-        {
-            ImageBitmap = Bitmap { File = "page.png" ; };
-            MaskColor = STD_MASKCOLOR ;
-        };
-    };
-
-    ImageButton BTN_PAGES
-    {
-        HelpId = HID_SC_HF_PAGES ;
-        Pos = MAP_APPFONT ( 167 , 122 ) ;
-        Size = MAP_APPFONT ( 15 , 15 ) ;
-        TabStop = TRUE ;
-        QuickHelpText [ en-US ] = "Pages" ;
-        ButtonImage = Image
-        {
-            ImageBitmap = Bitmap { File = "pages.png" ; };
-            MaskColor = STD_MASKCOLOR ;
-        };
-    };
-
-    ImageButton BTN_DATE
-    {
-        HelpId = HID_SC_HF_DATE ;
-        Pos = MAP_APPFONT ( 187 , 122 ) ;
-        Size = MAP_APPFONT ( 15 , 15 ) ;
-        TabStop = TRUE ;
-        QuickHelpText [ en-US ] = "Date" ;
-        ButtonImage = Image
-        {
-            ImageBitmap = Bitmap { File = "date.png" ; };
-            MaskColor = STD_MASKCOLOR ;
-        };
-    };
-
-    ImageButton BTN_TIME
-    {
-        HelpId = HID_SC_HF_TIME ;
-        Pos = MAP_APPFONT ( 204 , 122 ) ;
-        Size = MAP_APPFONT ( 15 , 15 ) ;
-        TabStop = TRUE ;
-        QuickHelpText [ en-US ] = "Time" ;
-        ButtonImage = Image
-        {
-            ImageBitmap = Bitmap { File = "time.png" ; };
-            MaskColor = STD_MASKCOLOR ;
-        };
-    };
-
-    FixedText FT_INFO
-    {
-        Pos = MAP_APPFONT ( 12 , 155 ) ;
-        Size = MAP_APPFONT ( 240 , 24 ) ;
-        WordBreak = TRUE ;
-        Text [ en-US ] = "Use the buttons to change the font or insert field commands such as date, time, etc." ;
-    };
-    FixedLine FL_INFO
-    {
-        Pos = MAP_APPFONT ( 6 , 144 ) ;
-        Size = MAP_APPFONT ( 248 , 8 ) ;
-        Text [ en-US ] = "Note" ;
     };
 };
 
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 5a084d3..e0276bd 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -54,6 +54,10 @@
 #include "scuitphfedit.hxx"
 #include <memory> // header file for auto_ptr
 
+#define FILE_COMMAND_TITEL      11
+#define FILE_COMMAND_FILENAME   12
+#define FILE_COMMAND_PATH       13
+
 // STATIC DATA -----------------------------------------------------------
 
 static ScEditWindow* pActiveEdWnd = NULL;
@@ -63,80 +67,90 @@
 //
 
 ScHFEditPage::ScHFEditPage( Window*             pParent,
-                            sal_uInt16              nResId,
+                            sal_uInt16          nResId,
                             const SfxItemSet&   rCoreAttrs,
-                            sal_uInt16              nWhichId,
-                            bool bHeader  )
+                            sal_uInt16          nWhichId,
+                            bool                bHeader  )
 
-    :   SfxTabPage      ( pParent, ScResId( nResId ), rCoreAttrs ),
+    :   SfxTabPage      ( pParent, "HeaderFooterContent", "modules/scalc/ui/headerfootercontent.ui", rCoreAttrs ),
 
-        aFtLeft         ( this, ScResId( FT_LEFT ) ),
-        aWndLeft        ( this, ScResId( WND_LEFT ), Left ),
-        aFtCenter       ( this, ScResId( FT_CENTER ) ),
-        aWndCenter      ( this, ScResId( WND_CENTER ), Center ),
-        aFtRight        ( this, ScResId( FT_RIGHT ) ),
-        aWndRight       ( this, ScResId( WND_RIGHT ), Right ),
-        maFtDefinedHF       ( this, ScResId( FT_HF_DEFINED ) ),
-        maLbDefined     ( this, ScResId( LB_DEFINED ) ),
-        maFtCustomHF        ( this, ScResId( FT_HF_CUSTOM ) ),
-        aBtnText        ( this, ScResId( BTN_TEXT ) ),
-        aBtnFile        ( this, ScResId( BTN_FILE ) ),
-        aBtnTable       ( this, ScResId( BTN_TABLE ) ),
-        aBtnPage        ( this, ScResId( BTN_PAGE ) ),
-        aBtnLastPage    ( this, ScResId( BTN_PAGES ) ),
-        aBtnDate        ( this, ScResId( BTN_DATE ) ),
-        aBtnTime        ( this, ScResId( BTN_TIME ) ),
-        aFlInfo         ( this, ScResId( FL_INFO ) ),
-        aFtInfo         ( this, ScResId( FT_INFO ) ),
+        //aFtLeft         ( this, ScResId( FT_LEFT ) ),
+
+        //aFtCenter       ( this, ScResId( FT_CENTER ) ),
+
+        //aFtRight        ( this, ScResId( FT_RIGHT ) ),
         aPopUpFile      ( ScResId( RID_POPUP_FCOMMAND) ),
         nWhich          ( nWhichId )
 {
+    get(m_pWndLeft,"textviewWND_LEFT");
+    get(m_pWndCenter,"textviewWND_CENTER");
+    get(m_pWndRight,"textviewWND_RIGHT");
+
+    get(m_pLbDefined,"comboLB_DEFINED");
+
+    get(m_pBtnText,"buttonBTN_TEXT");
+    get(m_pBtnTable,"buttonBTN_TABLE");
+    get(m_pBtnPage,"buttonBTN_PAGE");
+    get(m_pBtnLastPage,"buttonBTN_PAGES");
+    get(m_pBtnDate,"buttonBTN_DATE");
+    get(m_pBtnTime,"buttonBTN_TIME");
+
+    get(m_pBtnFile,"buttonBTN_FILE");
+
+    get(m_pFtConfidential,"labelSTR_HF_CONFIDENTIAL");
+    get(m_pFtPage,"labelSTR_PAGE");
+    get(m_pFtOfQuestion,"labelSTR_HF_OF_QUESTION");
+    get(m_pFtOf,"labelSTR_HF_OF");
+    get(m_pFtNone,"labelSTR_HF_NONE_IN_BRACKETS");
+    get(m_pFtCreatedBy,"labelSTR_HF_CREATED_BY");
+    get(m_pFtCustomized,"labelSTR_HF_CUSTOMIZED");
+
+
     //! use default style from current document?
     //! if font color is used, header/footer background color must be set
 
     ScPatternAttr   aPatAttr( rCoreAttrs.GetPool() );
 
+    m_pBtnFile->SetPopupMenu(&aPopUpFile);
 
-    aBtnFile.SetPopupMenu(&aPopUpFile);
+    m_pLbDefined->SetSelectHdl( LINK( this, ScHFEditPage, ListHdl_Impl ) );
+    m_pBtnFile->SetMenuHdl( LINK( this, ScHFEditPage, MenuHdl ) );
+    m_pBtnText->SetClickHdl( LINK( this, ScHFEditPage, ClickHdl ) );
+    m_pBtnPage->SetClickHdl( LINK( this, ScHFEditPage, ClickHdl ) );
+    m_pBtnLastPage->SetClickHdl( LINK( this, ScHFEditPage, ClickHdl ) );
+    m_pBtnDate->SetClickHdl( LINK( this, ScHFEditPage, ClickHdl ) );
+    m_pBtnTime->SetClickHdl( LINK( this, ScHFEditPage, ClickHdl ) );
+    m_pBtnFile->SetClickHdl( LINK( this, ScHFEditPage, ClickHdl ) );
+    m_pBtnTable->SetClickHdl( LINK( this, ScHFEditPage, ClickHdl ) );
 
-    maLbDefined.SetSelectHdl( LINK( this, ScHFEditPage, ListHdl_Impl ) );
-    aBtnFile.SetMenuHdl( LINK( this, ScHFEditPage, MenuHdl ) );
-    aBtnText    .SetClickHdl( LINK( this, ScHFEditPage, ClickHdl ) );
-    aBtnPage    .SetClickHdl( LINK( this, ScHFEditPage, ClickHdl ) );
-    aBtnLastPage.SetClickHdl( LINK( this, ScHFEditPage, ClickHdl ) );
-    aBtnDate    .SetClickHdl( LINK( this, ScHFEditPage, ClickHdl ) );
-    aBtnTime    .SetClickHdl( LINK( this, ScHFEditPage, ClickHdl ) );
-    aBtnFile    .SetClickHdl( LINK( this, ScHFEditPage, ClickHdl ) );
-    aBtnTable   .SetClickHdl( LINK( this, ScHFEditPage, ClickHdl ) );
+    get(m_pFtDefinedHF,!bHeader ? "labelFT_F_DEFINED" : "labelFT_H_DEFINED");
+    get(m_pFtCustomHF, !bHeader ? "labelFT_F_CUSTOM" : "labelFT_H_CUSTOM");
 
-    if(!bHeader)
-    {
-        maFtDefinedHF.SetText(ScGlobal::GetRscString( STR_FOOTER ));
-        maFtCustomHF.SetText(ScGlobal::GetRscString( STR_HF_CUSTOM_FOOTER ));
-    }
-    if( Application::GetSettings().GetLayoutRTL() )
-    {
-        Point pt1 = aWndLeft.GetPosPixel();
-        Point pt2 = aWndRight.GetPosPixel();
-        aWndLeft.SetPosPixel(pt2);
-        aWndRight.SetPosPixel(pt1);
+    m_pFtDefinedHF->Show();
+    m_pFtCustomHF->Show();
 
-        pt1 = aFtLeft.GetPosPixel();
-        pt2 = aFtRight.GetPosPixel();
-        aFtLeft.SetPosPixel(pt2);
-        aFtRight.SetPosPixel(pt1);
-    }
-    aWndLeft.   SetFont( aPatAttr );
-    aWndCenter. SetFont( aPatAttr );
-    aWndRight.  SetFont( aPatAttr );
+//     if( Application::GetSettings().GetLayoutRTL() )
+//     {
+//         Point pt1 = m_pWndLeft->GetPosPixel();
+//         Point pt2 = m_pWndRight->GetPosPixel();
+//         m_pWndLeft->SetPosPixel(pt2);
+//         m_pWndRight->SetPosPixel(pt1);
+//
+//         pt1 = aFtLeft.GetPosPixel();
+//         pt2 = aFtRight.GetPosPixel();
+//         aFtLeft.SetPosPixel(pt2);
+//         aFtRight.SetPosPixel(pt1);
+//    }
+    m_pWndLeft->SetFont( aPatAttr );
+    m_pWndCenter->SetFont( aPatAttr );
+    m_pWndRight->SetFont( aPatAttr );
 
     FillCmdArr();
 
-    aWndLeft.GrabFocus();
+    m_pWndLeft->GrabFocus();
 
     InitPreDefinedList();
 
-    FreeResource();
 }
 
 // -----------------------------------------------------------------------
@@ -147,9 +161,9 @@
 
 void ScHFEditPage::SetNumType(SvxNumType eNumType)
 {
-    aWndLeft.SetNumType(eNumType);
-    aWndCenter.SetNumType(eNumType);
-    aWndRight.SetNumType(eNumType);
+    m_pWndLeft->SetNumType(eNumType);
+    m_pWndCenter->SetNumType(eNumType);
+    m_pWndRight->SetNumType(eNumType);
 }
 
 void ScHFEditPage::Reset( const SfxItemSet& rCoreSet )
@@ -160,11 +174,11 @@
         const ScPageHFItem& rItem = static_cast<const ScPageHFItem&>(*pItem);
 
         if( const EditTextObject* pLeft = rItem.GetLeftArea() )
-            aWndLeft.SetText( *pLeft );
+            m_pWndLeft->SetText( *pLeft );
         if( const EditTextObject* pCenter = rItem.GetCenterArea() )
-            aWndCenter.SetText( *pCenter );
+            m_pWndCenter->SetText( *pCenter );
         if( const EditTextObject* pRight = rItem.GetRightArea() )
-            aWndRight.SetText( *pRight );
+            m_pWndRight->SetText( *pRight );
 
         SetSelectDefinedList();
     }
@@ -173,9 +187,9 @@
 sal_Bool ScHFEditPage::FillItemSet( SfxItemSet& rCoreSet )
 {
     ScPageHFItem    aItem( nWhich );
-    EditTextObject* pLeft   = aWndLeft  .CreateTextObject();
-    EditTextObject* pCenter = aWndCenter.CreateTextObject();
-    EditTextObject* pRight  = aWndRight .CreateTextObject();
+    EditTextObject* pLeft   = m_pWndLeft->CreateTextObject();
+    EditTextObject* pCenter = m_pWndCenter->CreateTextObject();
+    EditTextObject* pRight  = m_pWndRight->CreateTextObject();
 
     aItem.SetLeftArea  ( *pLeft );
     aItem.SetCenterArea( *pCenter );
@@ -201,8 +215,8 @@
 
 void ScHFEditPage::FillCmdArr()
 {
-    String aDel( ScGlobal::GetRscString( STR_HFCMD_DELIMITER ) );
-    String aCmd;
+    OUString aDel( ScGlobal::GetRscString( STR_HFCMD_DELIMITER ) );
+    OUString aCmd;
 
     SET_CMD( 0, STR_HFCMD_PAGE )
     SET_CMD( 1, STR_HFCMD_PAGES )
@@ -222,96 +236,64 @@
     Color* pFldColour = NULL;
 
     // Get the all field values at the outset.
-    String aPageFieldValue(aWndLeft.GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
-    String aSheetFieldValue(aWndLeft.GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
-    String aFileFieldValue(aWndLeft.GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxFileField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
-    String aExtFileFieldValue(aWndLeft.GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxExtFileField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
-    String aDateFieldValue(aWndLeft.GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxDateField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
+    OUString aPageFieldValue(m_pWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
+    OUString aSheetFieldValue(m_pWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
+    OUString aFileFieldValue(m_pWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxFileField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
+    OUString aExtFileFieldValue(m_pWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxExtFileField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
+    OUString aDateFieldValue(m_pWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxDateField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
 
-    maLbDefined.Clear();
+    m_pLbDefined->Clear();
 
-    maLbDefined.InsertEntry( ScGlobal::GetRscString( STR_HF_NONE_IN_BRACKETS ));
+    m_pLbDefined->InsertEntry(m_pFtNone->GetText());
 
-    String aPageEntry(ScGlobal::GetRscString( STR_PAGE ) );
-    aPageEntry += ' ';
-    aPageEntry += aPageFieldValue;
-    maLbDefined.InsertEntry(aPageEntry);
+    OUString aPageEntry(m_pFtPage->GetText() + " " + aPageFieldValue);
+    m_pLbDefined->InsertEntry(aPageEntry);
 
-    String aPageOfEntry(aPageEntry);
-    aPageOfEntry += ' ';
-    aPageOfEntry += ScGlobal::GetRscString( STR_HF_OF_QUESTION );
-    maLbDefined.InsertEntry( aPageOfEntry);
+    OUString aPageOfEntry(aPageEntry + " " + m_pFtOfQuestion->GetText());
+    m_pLbDefined->InsertEntry( aPageOfEntry);
 
-    maLbDefined.InsertEntry(aSheetFieldValue);
+    m_pLbDefined->InsertEntry(aSheetFieldValue);
 
-    String aConfidentialEntry(aUserOpt.GetCompany());
-    aConfidentialEntry += ' ';
-    aConfidentialEntry += ScGlobal::GetRscString( STR_HF_CONFIDENTIAL );
-    aConfidentialEntry.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", "));
-    aConfidentialEntry += aDateFieldValue;
-    aConfidentialEntry.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", "));
-    aConfidentialEntry += aPageEntry;
-    maLbDefined.InsertEntry( aConfidentialEntry);
+    OUString aConfidentialEntry(aUserOpt.GetCompany() + " " + m_pFtConfidential->GetText() + ", " + aDateFieldValue + ", " + aPageEntry);
+    m_pLbDefined->InsertEntry( aConfidentialEntry);
 
-    String aFileNamePageEntry(aFileFieldValue);
-    aFileNamePageEntry.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", "));
-    aFileNamePageEntry += aPageEntry;
-    maLbDefined.InsertEntry( aFileNamePageEntry);
+    OUString aFileNamePageEntry(aFileFieldValue + ", " + aPageEntry);
+    m_pLbDefined->InsertEntry( aFileNamePageEntry);
 
-    maLbDefined.InsertEntry( aExtFileFieldValue);
+    m_pLbDefined->InsertEntry( aExtFileFieldValue);
 
-    String aPageSheetNameEntry(aPageEntry);
-    aPageSheetNameEntry.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", "));
-    aPageSheetNameEntry += aSheetFieldValue;
-    maLbDefined.InsertEntry( aPageSheetNameEntry);
+    OUString aPageSheetNameEntry(aPageEntry + ", " + aSheetFieldValue);
+    m_pLbDefined->InsertEntry( aPageSheetNameEntry);
 
-    String aPageFileNameEntry(aPageEntry);
-    aPageFileNameEntry.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", "));
-    aPageFileNameEntry += aFileFieldValue;
-    maLbDefined.InsertEntry( aPageFileNameEntry);
+    OUString aPageFileNameEntry(aPageEntry + ", " + aFileFieldValue);
+    m_pLbDefined->InsertEntry( aPageFileNameEntry);
 
-    String aPagePathNameEntry(aPageEntry);
-    aPagePathNameEntry.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", "));
-    aPagePathNameEntry += aExtFileFieldValue;
-    maLbDefined.InsertEntry( aPagePathNameEntry);
+    OUString aPagePathNameEntry(aPageEntry + ", " + aExtFileFieldValue);
+    m_pLbDefined->InsertEntry( aPagePathNameEntry);
 
-    String aUserNameEntry(aUserOpt.GetFirstName());
-    aUserNameEntry += ' ';
-    aUserNameEntry += (String)aUserOpt.GetLastName();
-    aUserNameEntry.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", "));
-    aUserNameEntry += aPageEntry;
-    aUserNameEntry.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", "));
-    aUserNameEntry += aDateFieldValue;
-    maLbDefined.InsertEntry( aUserNameEntry);
+    OUString aUserNameEntry(aUserOpt.GetFirstName() + " " + aUserOpt.GetLastName() + ", " + aPageEntry + ", " + aDateFieldValue);
+    m_pLbDefined->InsertEntry( aUserNameEntry);
 
-    String aCreatedByEntry(ScGlobal::GetRscString( STR_HF_CREATED_BY ) );
-    aCreatedByEntry += ' ';
-    aCreatedByEntry += (String)aUserOpt.GetFirstName();
-    aCreatedByEntry += ' ';
-    aCreatedByEntry += (String)aUserOpt.GetLastName();
-    aCreatedByEntry.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", "));
-    aCreatedByEntry += aDateFieldValue;
-    aCreatedByEntry.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", "));
-    aCreatedByEntry += aPageEntry;
-    maLbDefined.InsertEntry( aCreatedByEntry);
+    OUString aCreatedByEntry( m_pFtCreatedBy->GetText() + " " + aUserOpt.GetFirstName() + " " + aUserOpt.GetLastName() + ", ");
+    aCreatedByEntry += aDateFieldValue + ", " + aPageEntry;
+    m_pLbDefined->InsertEntry( aCreatedByEntry);
 }
 
 void ScHFEditPage::InsertToDefinedList()
 {
-    sal_uInt16 nCount =  maLbDefined.GetEntryCount();
+    sal_uInt16 nCount =  m_pLbDefined->GetEntryCount();
     if(nCount == eEntryCount)
     {
-        String aCustomizedEntry(ScGlobal::GetRscString( STR_HF_CUSTOMIZED ) );
-        maLbDefined.InsertEntry( aCustomizedEntry);
-        maLbDefined.SelectEntryPos(eEntryCount);
+        m_pLbDefined->InsertEntry( m_pFtCustomized->GetText() );
+        m_pLbDefined->SelectEntryPos(eEntryCount);
     }
 }
 
 void ScHFEditPage::RemoveFromDefinedList()
 {
-    sal_uInt16 nCount =  maLbDefined.GetEntryCount();
+    sal_uInt16 nCount =  m_pLbDefined->GetEntryCount();
     if(nCount > eEntryCount )
-        maLbDefined.RemoveEntry( nCount-1);
+        m_pLbDefined->RemoveEntry( nCount-1);
 }
 
 // determine if the header/footer exists in our predefined list and set select to it.
@@ -328,18 +310,18 @@
     ::std::auto_ptr< EditTextObject > pRightObj;
     SAL_WNODEPRECATED_DECLARATIONS_POP
 
-    XubString aLeftEntry;
-    XubString aCenterEntry;
-    XubString aRightEntry;
+    OUString aLeftEntry;
+    OUString aCenterEntry;
+    OUString aRightEntry;
 
-    pLeftObj.reset(aWndLeft.GetEditEngine()->CreateTextObject());
-    pCenterObj.reset(aWndCenter.GetEditEngine()->CreateTextObject());
-    pRightObj.reset(aWndRight.GetEditEngine()->CreateTextObject());
+    pLeftObj.reset(m_pWndLeft->GetEditEngine()->CreateTextObject());
+    pCenterObj.reset(m_pWndCenter->GetEditEngine()->CreateTextObject());
+    pRightObj.reset(m_pWndRight->GetEditEngine()->CreateTextObject());
 
     bool bFound = false;
 
     sal_uInt16 i;
-    sal_uInt16 nCount =  maLbDefined.GetEntryCount();
+    sal_uInt16 nCount =  m_pLbDefined->GetEntryCount();
     for(i = 0; i < nCount && !bFound; i++)
     {
         switch(static_cast<ScHFEntryId>(i))
@@ -364,7 +346,7 @@
                 aRightEntry = pRightObj->GetText(0);
                 if(aLeftEntry == EMPTY_STRING && aRightEntry == EMPTY_STRING)
                 {
-                    if(IsPageEntry(aWndCenter.GetEditEngine(), pCenterObj.get()))
+                    if(IsPageEntry(m_pWndCenter->GetEditEngine(), pCenterObj.get()))
                     {
                         eSelectEntry = ePageEntry;
                         bFound = true;
@@ -405,12 +387,10 @@
 
             case eConfidentialEntry:
             {
-                if(IsDateEntry(pCenterObj.get()) && IsPageEntry(aWndRight.GetEditEngine(), pRightObj.get()))
+                if(IsDateEntry(pCenterObj.get()) && IsPageEntry(m_pWndRight->GetEditEngine(), pRightObj.get()))
                 {
-                    String aConfidentialEntry(aUserOpt.GetCompany());
-                    aConfidentialEntry += ' ';
-                    aConfidentialEntry += ScGlobal::GetRscString( STR_HF_CONFIDENTIAL );
-                    if(aConfidentialEntry == aWndLeft.GetEditEngine()->GetText(0))
+                    OUString aConfidentialEntry(aUserOpt.GetCompany() + " " + m_pFtConfidential->GetText());
+                    if(aConfidentialEntry == m_pWndLeft->GetEditEngine()->GetText(0))
                     {
                         eSelectEntry = eConfidentialEntry;
                         bFound = true;
@@ -453,7 +433,7 @@
             case ePageExtFileNameEntry:
             {
                 aLeftEntry = pLeftObj->GetText(0);
-                if(IsPageEntry(aWndCenter.GetEditEngine(), pCenterObj.get()) &&
+                if(IsPageEntry(m_pWndCenter->GetEditEngine(), pCenterObj.get()) &&
                     IsExtFileNameEntry(pRightObj.get()) && aLeftEntry == EMPTY_STRING)
                 {
                     eSelectEntry = ePageExtFileNameEntry;
@@ -464,12 +444,11 @@
 
             case eUserNameEntry:
             {
-                if(IsDateEntry(pRightObj.get()) && IsPageEntry(aWndCenter.GetEditEngine(), pCenterObj.get()))
+                if(IsDateEntry(pRightObj.get()) && IsPageEntry(m_pWndCenter->GetEditEngine(), pCenterObj.get()))
                 {
-                    String aUserNameEntry(aUserOpt.GetFirstName());
-                    aUserNameEntry += ' ';
-                    aUserNameEntry += (String)aUserOpt.GetLastName();
-                    if(aUserNameEntry == aWndLeft.GetEditEngine()->GetText(0))
+                    OUString aUserNameEntry(aUserOpt.GetFirstName() + " " + aUserOpt.GetLastName());
+
+                    if(aUserNameEntry == m_pWndLeft->GetEditEngine()->GetText(0))
                     {
                         eSelectEntry = eUserNameEntry;
                         bFound = true;
@@ -480,14 +459,11 @@
 
             case eCreatedByEntry:
             {
-                if(IsDateEntry(pCenterObj.get()) && IsPageEntry(aWndRight.GetEditEngine(), pRightObj.get()))
+                if(IsDateEntry(pCenterObj.get()) && IsPageEntry(m_pWndRight->GetEditEngine(), pRightObj.get()))
                 {
-                    String aCreatedByEntry(ScGlobal::GetRscString( STR_HF_CREATED_BY ) );
-                    aCreatedByEntry += ' ';
-                    aCreatedByEntry += (String)aUserOpt.GetFirstName();
-                    aCreatedByEntry += ' ';
-                    aCreatedByEntry += (String)aUserOpt.GetLastName();
-                    if(aCreatedByEntry == aWndLeft.GetEditEngine()->GetText(0))
+                    OUString aCreatedByEntry(m_pFtCreatedBy->GetText() + " " + aUserOpt.GetFirstName() + " " + aUserOpt.GetLastName());
+
+                    if(aCreatedByEntry == m_pWndLeft->GetEditEngine()->GetText(0))
                     {
                         eSelectEntry = eCreatedByEntry;
                         bFound = true;
@@ -506,7 +482,7 @@
     if(eSelectEntry == eEntryCount)
         InsertToDefinedList();
 
-    maLbDefined.SelectEntryPos( sal::static_int_cast<sal_uInt16>( eSelectEntry ) );
+    m_pLbDefined->SelectEntryPos( sal::static_int_cast<sal_uInt16>( eSelectEntry ) );
 }
 
 bool ScHFEditPage::IsPageEntry(EditEngine*pEngine, EditTextObject* pTextObj)
@@ -522,10 +498,9 @@
         pEngine->GetPortions(0,aPosList);
         if(aPosList.size() == 2)
         {
-            String aPageEntry(ScGlobal::GetRscString( STR_PAGE ) );
-            aPageEntry += ' ';
+            OUString aPageEntry(m_pFtPage->GetText() + " ");
             ESelection aSel(0,0,0,0);
-            aSel.nEndPos = aPageEntry.Len();
+            aSel.nEndPos = aPageEntry.getLength();
             if(aPageEntry == pEngine->GetText(aSel))
             {
                 aSel.nStartPos = aSel.nEndPos;
@@ -599,18 +574,17 @@
         case eNoneEntry:
             ClearTextAreas();
             if(!bTravelling)
-                aWndLeft.GrabFocus();
+                m_pWndLeft->GrabFocus();
         break;
 
         case ePageEntry:
         {
             ClearTextAreas();
-            String aPageEntry(ScGlobal::GetRscString( STR_PAGE ) );
-            aPageEntry += ' ';
-            aWndCenter.GetEditEngine()->SetText(aPageEntry);
-            aWndCenter.InsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD) );
+            OUString aPageEntry( m_pFtPage->GetText() + " " );
+            m_pWndCenter->GetEditEngine()->SetText(aPageEntry);
+            m_pWndCenter->InsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD) );
             if(!bTravelling)
-                aWndCenter.GrabFocus();
+                m_pWndCenter->GrabFocus();
         }
         break;
 
@@ -618,46 +592,42 @@
         {
             ClearTextAreas();
             ESelection aSel(0,0,0,0);
-            String aPageEntry(ScGlobal::GetRscString( STR_PAGE ) );
-            aPageEntry += ' ';
-            aWndCenter.GetEditEngine()->SetText(aPageEntry);
-            aSel.nEndPos = aPageEntry.Len();
-            aWndCenter.GetEditEngine()->QuickInsertField(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara, aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
+            OUString aPageEntry( m_pFtPage->GetText() + " ");
+            m_pWndCenter->GetEditEngine()->SetText(aPageEntry);
+            aSel.nEndPos = aPageEntry.getLength();
+            m_pWndCenter->GetEditEngine()->QuickInsertField(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara, aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
             ++aSel.nEndPos;
-            String aPageOfEntry = OUStringBuffer().append(' ').
-                append(ScGlobal::GetRscString( STR_HF_OF )).append(' ').
-                makeStringAndClear();
-            aWndCenter.GetEditEngine()->QuickInsertText(aPageOfEntry,ESelection(aSel.nEndPara,aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
-            aSel.nEndPos = sal::static_int_cast<xub_StrLen>( aSel.nEndPos + aPageOfEntry.Len() );
-            aWndCenter.GetEditEngine()->QuickInsertField(SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara,aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
-            pTextObj.reset(aWndCenter.GetEditEngine()->CreateTextObject());
-            aWndCenter.SetText(*pTextObj);
+
+            OUString aPageOfEntry(" " + m_pFtOf->GetText() + " ");
+            m_pWndCenter->GetEditEngine()->QuickInsertText(aPageOfEntry,ESelection(aSel.nEndPara,aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
+            aSel.nEndPos = sal::static_int_cast<xub_StrLen>( aSel.nEndPos + aPageOfEntry.getLength() );
+            m_pWndCenter->GetEditEngine()->QuickInsertField(SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara,aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
+            pTextObj.reset(m_pWndCenter->GetEditEngine()->CreateTextObject());
+            m_pWndCenter->SetText(*pTextObj);
             if(!bTravelling)
-                aWndCenter.GrabFocus();
+                m_pWndCenter->GrabFocus();
         }
         break;
 
         case eSheetEntry:
             ClearTextAreas();
-            aWndCenter.InsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD) );
+            m_pWndCenter->InsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD) );
             if(!bTravelling)
-                aWndCenter.GrabFocus();
+                m_pWndCenter->GrabFocus();
         break;
 
         case eConfidentialEntry:
         {
             ClearTextAreas();
-            String aConfidentialEntry(aUserOpt.GetCompany());
-            aConfidentialEntry += ' ';
-            aConfidentialEntry += ScGlobal::GetRscString( STR_HF_CONFIDENTIAL );
-            aWndLeft.GetEditEngine()->SetText(aConfidentialEntry);
-            aWndCenter.InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
-            String aPageEntry(ScGlobal::GetRscString( STR_PAGE ) );
-            aPageEntry += ' ';
-            aWndRight.GetEditEngine()->SetText(aPageEntry);
-            aWndRight.InsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD) );
+            OUString aConfidentialEntry(aUserOpt.GetCompany() + " " + m_pFtConfidential->GetText());
+            m_pWndLeft->GetEditEngine()->SetText(aConfidentialEntry);
+            m_pWndCenter->InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
+
+            OUString aPageEntry( m_pFtPage->GetText() + " ");
+            m_pWndRight->GetEditEngine()->SetText(aPageEntry);
+            m_pWndRight->InsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD) );
             if(!bTravelling)
-                aWndRight.GrabFocus();
+                m_pWndRight->GrabFocus();
         }
         break;
 
@@ -665,48 +635,46 @@
         {
             ClearTextAreas();
             ESelection aSel(0,0,0,0);
-            aWndCenter.GetEditEngine()->QuickInsertField(SvxFieldItem( SvxFileField(), EE_FEATURE_FIELD ), aSel );
+            m_pWndCenter->GetEditEngine()->QuickInsertField(SvxFieldItem( SvxFileField(), EE_FEATURE_FIELD ), aSel );
             ++aSel.nEndPos;
-            String aPageEntry(RTL_CONSTASCII_USTRINGPARAM(", "));
-            aPageEntry += ScGlobal::GetRscString( STR_PAGE ) ;
-            aPageEntry += ' ';
-            aWndCenter.GetEditEngine()->QuickInsertText(aPageEntry, ESelection(aSel.nEndPara,aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
+            OUString aPageEntry(", " + m_pFtPage->GetText() + " ");
+            m_pWndCenter->GetEditEngine()->QuickInsertText(aPageEntry, ESelection(aSel.nEndPara,aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
             aSel.nStartPos = aSel.nEndPos;
-            aSel.nEndPos = sal::static_int_cast<xub_StrLen>( aSel.nEndPos + aPageEntry.Len() );
-            aWndCenter.GetEditEngine()->QuickInsertField(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara,aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
-            pTextObj.reset(aWndCenter.GetEditEngine()->CreateTextObject());
-            aWndCenter.SetText(*pTextObj);
+            aSel.nEndPos = sal::static_int_cast<xub_StrLen>( aSel.nEndPos + aPageEntry.getLength() );
+            m_pWndCenter->GetEditEngine()->QuickInsertField(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara,aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
+            pTextObj.reset(m_pWndCenter->GetEditEngine()->CreateTextObject());
+            m_pWndCenter->SetText(*pTextObj);
             if(!bTravelling)
-                aWndCenter.GrabFocus();
+                m_pWndCenter->GrabFocus();
         }
         break;
 
         case eExtFileNameEntry:
             ClearTextAreas();
-            aWndCenter.InsertField( SvxFieldItem( SvxExtFileField(
+            m_pWndCenter->InsertField( SvxFieldItem( SvxExtFileField(
                 EMPTY_STRING, SVXFILETYPE_VAR, SVXFILEFORMAT_FULLPATH ), EE_FEATURE_FIELD ) );
             if(!bTravelling)
-                aWndCenter.GrabFocus();
+                m_pWndCenter->GrabFocus();
         break;
 
         case ePageSheetEntry:
         {
             ClearTextAreas();
             ESelection aSel(0,0,0,0);
-            String aPageEntry(ScGlobal::GetRscString( STR_PAGE ) );
-            aPageEntry += ' ';
-            aWndCenter.GetEditEngine()->SetText(aPageEntry);
-            aSel.nEndPos = aPageEntry.Len();
-            aWndCenter.GetEditEngine()->QuickInsertField(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara, aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
+            OUString aPageEntry( m_pFtPage->GetText() + " " );
+            m_pWndCenter->GetEditEngine()->SetText(aPageEntry);
+            aSel.nEndPos = aPageEntry.getLength();
+            m_pWndCenter->GetEditEngine()->QuickInsertField(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara, aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
             ++aSel.nEndPos;
-            String aCommaSpace(RTL_CONSTASCII_USTRINGPARAM(", "));
-            aWndCenter.GetEditEngine()->QuickInsertText(aCommaSpace,ESelection(aSel.nEndPara, aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
-            aSel.nEndPos = sal::static_int_cast<xub_StrLen>( aSel.nEndPos + aCommaSpace.Len() );
-            aWndCenter.GetEditEngine()->QuickInsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara, aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
-            pTextObj.reset(aWndCenter.GetEditEngine()->CreateTextObject());
-            aWndCenter.SetText(*pTextObj);
+
+            OUString aCommaSpace(", ");
+            m_pWndCenter->GetEditEngine()->QuickInsertText(aCommaSpace,ESelection(aSel.nEndPara, aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
+            aSel.nEndPos = sal::static_int_cast<xub_StrLen>( aSel.nEndPos + aCommaSpace.getLength() );
+            m_pWndCenter->GetEditEngine()->QuickInsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara, aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
+            pTextObj.reset(m_pWndCenter->GetEditEngine()->CreateTextObject());
+            m_pWndCenter->SetText(*pTextObj);
             if(!bTravelling)
-                aWndCenter.GrabFocus();
+                m_pWndCenter->GrabFocus();
         }
         break;
 
@@ -714,70 +682,62 @@
         {
             ClearTextAreas();
             ESelection aSel(0,0,0,0);
-            String aPageEntry(ScGlobal::GetRscString( STR_PAGE ) );
-            aPageEntry += ' ';
-            aWndCenter.GetEditEngine()->SetText(aPageEntry);
-            aSel.nEndPos = aPageEntry.Len();
-            aWndCenter.GetEditEngine()->QuickInsertField(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara, aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
+            OUString aPageEntry( m_pFtPage->GetText() + " " );
+            m_pWndCenter->GetEditEngine()->SetText(aPageEntry);
+            aSel.nEndPos = aPageEntry.getLength();
+            m_pWndCenter->GetEditEngine()->QuickInsertField(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara, aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
             ++aSel.nEndPos;
-            String aCommaSpace(RTL_CONSTASCII_USTRINGPARAM(", "));
-            aWndCenter.GetEditEngine()->QuickInsertText(aCommaSpace,ESelection(aSel.nEndPara, aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
-            aSel.nEndPos = sal::static_int_cast<xub_StrLen>( aSel.nEndPos + aCommaSpace.Len() );
-            aWndCenter.GetEditEngine()->QuickInsertField( SvxFieldItem(SvxFileField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara, aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
-            pTextObj.reset(aWndCenter.GetEditEngine()->CreateTextObject());
-            aWndCenter.SetText(*pTextObj);
+            OUString aCommaSpace(", ");
+            m_pWndCenter->GetEditEngine()->QuickInsertText(aCommaSpace,ESelection(aSel.nEndPara, aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
+            aSel.nEndPos = sal::static_int_cast<xub_StrLen>( aSel.nEndPos + aCommaSpace.getLength() );
+            m_pWndCenter->GetEditEngine()->QuickInsertField( SvxFieldItem(SvxFileField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara, aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
+            pTextObj.reset(m_pWndCenter->GetEditEngine()->CreateTextObject());
+            m_pWndCenter->SetText(*pTextObj);
             if(!bTravelling)
-                aWndCenter.GrabFocus();
+                m_pWndCenter->GrabFocus();
         }
         break;
 
         case ePageExtFileNameEntry:
         {
             ClearTextAreas();
-            String aPageEntry(ScGlobal::GetRscString( STR_PAGE ) );
-            aPageEntry += ' ';
-            aWndCenter.GetEditEngine()->SetText(aPageEntry);
-            aWndCenter.InsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD) );
-            aWndRight.InsertField( SvxFieldItem( SvxExtFileField(
+            OUString aPageEntry( m_pFtPage->GetText() + " " );
+            m_pWndCenter->GetEditEngine()->SetText(aPageEntry);
+            m_pWndCenter->InsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD) );
+            m_pWndRight->InsertField( SvxFieldItem( SvxExtFileField(
                 EMPTY_STRING, SVXFILETYPE_VAR, SVXFILEFORMAT_FULLPATH ), EE_FEATURE_FIELD ) );
             if(!bTravelling)
-                aWndRight.GrabFocus();
+                m_pWndRight->GrabFocus();
         }
         break;
 
         case eUserNameEntry:
         {
             ClearTextAreas();
-            String aUserNameEntry(aUserOpt.GetFirstName());
-            aUserNameEntry += ' ';
-            aUserNameEntry += (String)aUserOpt.GetLastName();
-            aWndLeft.GetEditEngine()->SetText(aUserNameEntry);
-            String aPageEntry(ScGlobal::GetRscString( STR_PAGE ) );
-            aPageEntry += ' ';
-            aWndCenter.GetEditEngine()->SetText(aPageEntry);
-            aWndCenter.InsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD) );
-            aWndRight.InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
+            OUString aUserNameEntry(aUserOpt.GetFirstName() + " " + aUserOpt.GetLastName());
+            m_pWndLeft->GetEditEngine()->SetText(aUserNameEntry);
+            OUString aPageEntry( m_pFtPage->GetText() + " ");
+            //aPageEntry += " ";
+            m_pWndCenter->GetEditEngine()->SetText(aPageEntry);
+            m_pWndCenter->InsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD) );
+            m_pWndRight->InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
             if(!bTravelling)
-                aWndRight.GrabFocus();
+                m_pWndRight->GrabFocus();
         }
         break;
 
         case eCreatedByEntry:
         {
             ClearTextAreas();
-            String aCreatedByEntry(ScGlobal::GetRscString( STR_HF_CREATED_BY ) );
-            aCreatedByEntry += ' ';
-            aCreatedByEntry += (String)aUserOpt.GetFirstName();
-            aCreatedByEntry += ' ';
-            aCreatedByEntry += (String)aUserOpt.GetLastName();
-            aWndLeft.GetEditEngine()->SetText(aCreatedByEntry);
-            aWndCenter.InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
-            String aPageEntry(ScGlobal::GetRscString( STR_PAGE ) );
-            aPageEntry += ' ';
-            aWndRight.GetEditEngine()->SetText(aPageEntry);
-            aWndRight.InsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD) );
+            OUString aCreatedByEntry( m_pFtCreatedBy->GetText() + " " + aUserOpt.GetFirstName() + " " + aUserOpt.GetLastName());
+            m_pWndLeft->GetEditEngine()->SetText(aCreatedByEntry);
+            m_pWndCenter->InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
+            OUString aPageEntry( m_pFtPage->GetText() );
+            aPageEntry += " ";
+            m_pWndRight->GetEditEngine()->SetText(aPageEntry);
+            m_pWndRight->InsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD) );
             if(!bTravelling)
-                aWndRight.GrabFocus();
+                m_pWndRight->GrabFocus();
         }
         break;
 
@@ -788,12 +748,12 @@
 
 void ScHFEditPage::ClearTextAreas()
 {
-    aWndLeft.GetEditEngine()->SetText(EMPTY_STRING);
-    aWndLeft.Invalidate();
-    aWndCenter.GetEditEngine()->SetText(EMPTY_STRING);
-    aWndCenter.Invalidate();
-    aWndRight.GetEditEngine()->SetText(EMPTY_STRING);
-    aWndRight.Invalidate();
+    m_pWndLeft->GetEditEngine()->SetText(EMPTY_STRING);
+    m_pWndLeft->Invalidate();
+    m_pWndCenter->GetEditEngine()->SetText(EMPTY_STRING);
+    m_pWndCenter->Invalidate();
+    m_pWndRight->GetEditEngine()->SetText(EMPTY_STRING);
+    m_pWndRight->Invalidate();
 }
 
 //-----------------------------------------------------------------------
@@ -802,10 +762,10 @@
 
 IMPL_LINK( ScHFEditPage, ListHdl_Impl, ListBox*, pList )
 {
-    if ( pList && pList == &maLbDefined )
+    if ( pList && pList == m_pLbDefined )
     {
-        ScHFEntryId eSel = static_cast<ScHFEntryId>(maLbDefined.GetSelectEntryPos());
-        if(!maLbDefined.IsTravelSelect())
+        ScHFEntryId eSel = static_cast<ScHFEntryId>(m_pLbDefined->GetSelectEntryPos());
+        if(!m_pLbDefined->IsTravelSelect())
         {
             ProcessDefinedListSel(eSel);
 
@@ -821,31 +781,31 @@
     return 0;
 }
 
-IMPL_LINK( ScHFEditPage, ClickHdl, ImageButton*, pBtn )
+IMPL_LINK( ScHFEditPage, ClickHdl, PushButton*, pBtn )
 {
     pActiveEdWnd = ::GetScEditWindow();
     if ( !pActiveEdWnd )
         return 0;
 
-    if ( pBtn == &aBtnText )
+    if ( pBtn == m_pBtnText )
     {
         pActiveEdWnd->SetCharAttriutes();
     }
     else
     {
-        if ( pBtn == &aBtnPage )
+        if ( pBtn == m_pBtnPage )
             pActiveEdWnd->InsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD) );
-        else if ( pBtn == &aBtnLastPage )
+        else if ( pBtn == m_pBtnLastPage )
             pActiveEdWnd->InsertField( SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD) );
-        else if ( pBtn == &aBtnDate )
+        else if ( pBtn == m_pBtnDate )
             pActiveEdWnd->InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
-        else if ( pBtn == &aBtnTime )
+        else if ( pBtn == m_pBtnTime )
             pActiveEdWnd->InsertField( SvxFieldItem(SvxTimeField(), EE_FEATURE_FIELD) );
-        else if ( pBtn == &aBtnFile )
+        else if ( pBtn == m_pBtnFile )
         {
             pActiveEdWnd->InsertField( SvxFieldItem( SvxFileField(), EE_FEATURE_FIELD ) );
         }
-        else if ( pBtn == &aBtnTable )
+        else if ( pBtn == m_pBtnTable )
             pActiveEdWnd->InsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD) );
     }
     InsertToDefinedList();
@@ -862,6 +822,7 @@
 
     if(pBtn!=NULL)
     {
+        OSL_ENSURE( true, pBtn->GetSelected());
         switch(pBtn->GetSelected())
         {
             case FILE_COMMAND_TITEL:
@@ -885,8 +846,11 @@
 //========================================================================
 
 ScRightHeaderEditPage::ScRightHeaderEditPage( Window* pParent, const SfxItemSet& rCoreSet )
-    : ScHFEditPage( pParent, RID_SCPAGE_HFED_HR, rCoreSet,
-                    rCoreSet.GetPool()->GetWhich(SID_SCATTR_PAGE_HEADERRIGHT ), true )
+    : ScHFEditPage( pParent,
+                    RID_SCPAGE_HFED_HR,
+                    rCoreSet,
+                    rCoreSet.GetPool()->GetWhich(SID_SCATTR_PAGE_HEADERRIGHT ),
+                    true )
     {}
 
 // -----------------------------------------------------------------------
@@ -899,8 +863,11 @@
 //========================================================================
 
 ScLeftHeaderEditPage::ScLeftHeaderEditPage( Window* pParent, const SfxItemSet& rCoreSet )
-    : ScHFEditPage( pParent, RID_SCPAGE_HFED_HL, rCoreSet,
-                    rCoreSet.GetPool()->GetWhich(SID_SCATTR_PAGE_HEADERLEFT ), true )
+    : ScHFEditPage( pParent,
+                    RID_SCPAGE_HFED_HL,
+                    rCoreSet,
+                    rCoreSet.GetPool()->GetWhich(SID_SCATTR_PAGE_HEADERLEFT ),
+                    true )
     {}
 
 // -----------------------------------------------------------------------
@@ -913,8 +880,11 @@
 //========================================================================
 
 ScRightFooterEditPage::ScRightFooterEditPage( Window* pParent, const SfxItemSet& rCoreSet )
-    : ScHFEditPage( pParent, RID_SCPAGE_HFED_FR, rCoreSet,
-                    rCoreSet.GetPool()->GetWhich(SID_SCATTR_PAGE_FOOTERRIGHT ), false )
+    : ScHFEditPage( pParent,
+                    RID_SCPAGE_HFED_FR,
+                    rCoreSet,
+                    rCoreSet.GetPool()->GetWhich(SID_SCATTR_PAGE_FOOTERRIGHT ),
+                    false )
     {}
 
 // -----------------------------------------------------------------------
@@ -927,8 +897,11 @@
 //========================================================================
 
 ScLeftFooterEditPage::ScLeftFooterEditPage( Window* pParent, const SfxItemSet& rCoreSet )
-    : ScHFEditPage( pParent, RID_SCPAGE_HFED_FL, rCoreSet,
-                    rCoreSet.GetPool()->GetWhich(SID_SCATTR_PAGE_FOOTERLEFT ), false )
+    : ScHFEditPage( pParent,
+                    RID_SCPAGE_HFED_FL,
+                    rCoreSet,
+                    rCoreSet.GetPool()->GetWhich(SID_SCATTR_PAGE_FOOTERLEFT ),
+                    false )
     {}
 
 // -----------------------------------------------------------------------
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index 5fd9d40..5e1585e 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -111,6 +111,43 @@
     pEdEngine->InsertView( pEdView );
 }
 
+ScEditWindow::ScEditWindow( Window* pParent, WinBits nBits, ScEditWindowLocation eLoc )
+    :   Control( pParent, nBits ),
+    eLocation(eLoc),
+    pAcc(NULL)
+{
+    EnableRTL(false);
+
+    const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+    Color aBgColor = rStyleSettings.GetWindowColor();
+
+    SetMapMode( MAP_TWIP );
+    SetPointer( POINTER_TEXT );
+    SetBackground( aBgColor );
+
+    Size aSize( GetOutputSize() );
+    aSize.Height() *= 4;
+
+    pEdEngine = new ScHeaderEditEngine( EditEngine::CreatePool(), sal_True );
+    pEdEngine->SetPaperSize( aSize );
+    pEdEngine->SetRefDevice( this );
+
+    ScHeaderFieldData aData;
+    lcl_GetFieldData( aData );
+
+        //  Feldbefehle:
+    pEdEngine->SetData( aData );
+    pEdEngine->SetControlWord( pEdEngine->GetControlWord() | EE_CNTRL_MARKFIELDS );
+    mbRTL = ScGlobal::IsSystemRTL();
+    if (mbRTL)
+        pEdEngine->SetDefaultHorizontalTextDirection(EE_HTEXTDIR_R2L);
+
+    pEdView = new EditView( pEdEngine, this );
+    pEdView->SetOutputArea( Rectangle( Point(0,0), GetOutputSize() ) );
+
+    pEdView->SetBackgroundColor( aBgColor );
+    pEdEngine->InsertView( pEdView );
+}
 // -----------------------------------------------------------------------
 
 ScEditWindow::~ScEditWindow()
@@ -124,6 +161,11 @@
     }
     delete pEdEngine;
     delete pEdView;
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeScEditWindow(Window *pParent, VclBuilder::stringmap &, ScEditWindowLocation eLoc )
+{
+    return new ScEditWindow (pParent, WB_BORDER|WB_TABSTOP, eLoc );
 }
 
 // -----------------------------------------------------------------------
@@ -340,13 +382,24 @@
 }
 
 ScExtIButton::ScExtIButton(Window* pParent, const ResId& rResId )
-:   ImageButton(pParent,rResId),
-    pPopupMenu(NULL)
+    : ImageButton(pParent,rResId), pPopupMenu(NULL)
 {
     nSelected=0;
     aTimer.SetTimeout(600);
     SetDropDown( true);
 }
+ScExtIButton::ScExtIButton(Window* pParent, WinBits nBits )
+    : ImageButton(pParent,nBits), pPopupMenu(NULL)
+{
+    nSelected=0;
+    aTimer.SetTimeout(600);
+    SetDropDown( true);
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeScExtIButton(Window *pParent, VclBuilder::stringmap &)
+{
+    return new ScExtIButton (pParent, 0);// WB_BORDER|WB_TABSTOP);
+}
 
 void ScExtIButton::SetPopupMenu(ScPopupMenu* pPopUp)
 {
diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index 375db7b..6e56e48 100644
--- a/sc/source/ui/src/globstr.src
+++ b/sc/source/ui/src/globstr.src
@@ -742,14 +742,14 @@
     {
         Text [ en-US ] = "Page Style" ;
     };
-    String STR_HEADER
-    {
-        Text [ en-US ] = "Header" ;
-    };
-    String STR_FOOTER
-    {
-        Text [ en-US ] = "Footer" ;
-    };
+//     String STR_HEADER
+//     {
+//         Text [ en-US ] = "Header" ;
+//     };
+//     String STR_FOOTER
+//     {
+//         Text [ en-US ] = "Footer" ;
+//     };
     String STR_TEXTATTRS
     {
         Text [ en-US ] = "Text Attributes" ;
@@ -1619,40 +1619,40 @@
         Text[ en-US ] = "WARNING: This action may have resulted in references to the deleted area not being restored.";
     };
 
-    String STR_HF_NONE_IN_BRACKETS
-    {
-        Text [ en-US ] = "(none)";
-    };
+//     String STR_HF_NONE_IN_BRACKETS
+//     {
+//         Text [ en-US ] = "(none)";
+//     };
+//
+//     String STR_HF_OF
+//     {
+//         Text [ en-US ] = "of";
+//     };
+//
+//     String STR_HF_OF_QUESTION
+//     {
+//         Text [ en-US ] = "of ?";
+//     };
+//
+//     String STR_HF_CREATED_BY
+//     {
+//         Text [ en-US ] = "Created by";
+//     };
+//
+//     String STR_HF_CONFIDENTIAL
+//     {
+//         Text [ en-US ] = "Confidential";
+//     };
+//
+//     String STR_HF_CUSTOMIZED
+//     {
+//         Text [ en-US ] = "Customized";
+//     };
 
-    String STR_HF_OF
-    {
-        Text [ en-US ] = "of";
-    };
-
-    String STR_HF_OF_QUESTION
-    {
-        Text [ en-US ] = "of ?";
-    };
-
-    String STR_HF_CREATED_BY
-    {
-        Text [ en-US ] = "Created by";
-    };
-
-    String STR_HF_CONFIDENTIAL
-    {
-        Text [ en-US ] = "Confidential";
-    };
-
-    String STR_HF_CUSTOMIZED
-    {
-        Text [ en-US ] = "Customized";
-    };
-
-    String STR_HF_CUSTOM_FOOTER
-    {
-        Text [ en-US ] = "Custom footer";
-    };
+//     String STR_HF_CUSTOM_FOOTER
+//     {
+//         Text [ en-US ] = "Custom footer";
+//     };
 
     String STR_UNDO_CHINESE_TRANSLATION
     {
diff --git a/sc/uiconfig/scalc/ui/headerfootercontent.ui b/sc/uiconfig/scalc/ui/headerfootercontent.ui
new file mode 100644
index 0000000..d09879f
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/headerfootercontent.ui
@@ -0,0 +1,504 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <!-- interface-requires LibreOffice 1.0 -->
+  <object class="GtkImage" id="imageBTN_TIME">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="pixbuf">sc/res/time.png</property>
+  </object>
+  <object class="GtkVBox" id="HeaderFooterContent">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="spacing">6</property>
+    <child>
+      <object class="GtkGrid" id="grid1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="row_spacing">12</property>
+        <property name="column_spacing">6</property>
+        <property name="column_homogeneous">True</property>
+        <child>
+          <object class="GtkLabel" id="labelFT_LEFT">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">_Left area</property>
+            <property name="use_underline">True</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="GtkLabel" id="labelFT_CENTER">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">_Center area</property>
+            <property name="use_underline">True</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="labelFT_RIGHT">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">R_ight area</property>
+            <property name="use_underline">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="sclo-ScEditWindow" id="textviewWND_LEFT">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="wrap_mode">word</property>
+            <property name="overwrite">True</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>
+          <object class="sclo-ScEditWindow" id="textviewWND_CENTER">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="sclo-ScEditWindow" id="textviewWND_RIGHT">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</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="GtkGrid" id="grid2">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="row_spacing">12</property>
+        <property name="column_spacing">6</property>
+        <child>
+          <object class="GtkVBox" id="box2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="labelFT_H_DEFINED">
+                <property name="can_focus">False</property>
+                <property name="vexpand">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">_Header</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="labelFT_F_DEFINED">
+                <property name="can_focus">False</property>
+                <property name="vexpand">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">_Footer</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>
+          </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="GtkVBox" id="box3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="labelFT_H_CUSTOM">
+                <property name="can_focus">False</property>
+                <property name="vexpand">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Custom header</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="labelFT_F_CUSTOM">
+                <property name="can_focus">False</property>
+                <property name="vexpand">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Custom footer</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </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>
+          <object class="GtkHBox" id="box">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">12</property>
+            <child>
+              <object class="GtkButton" id="buttonBTN_TEXT">
+                <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">Text Attributes</property>
+                <property name="tooltip_text" translatable="yes">Text Attributes</property>
+                <property name="image">imageBTN_TEXT</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="sclo-ScExtIButton" id="buttonBTN_FILE">
+                <property name="label">gtk-open</property>
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="receives_default">True</property>
+                <property name="tooltip_text" translatable="yes">Title</property>
+                <property name="use_stock">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="buttonBTN_TABLE">
+                <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">Sheet Name</property>
+                <property name="tooltip_text" translatable="yes">Sheet Name</property>
+                <property name="image">imageBTN_TABLE</property>
+                <property name="yalign">0.47999998927116394</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="buttonBTN_PAGE">
+                <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">Page</property>
+                <property name="tooltip_text" translatable="yes">Page</property>
+                <property name="image">imageBTN_PAGE</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="buttonBTN_PAGES">
+                <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">Pages</property>
+                <property name="tooltip_text" translatable="yes">Pages</property>
+                <property name="image">imageBTN_PAGES</property>
+                <property name="yalign">0.49000000953674316</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="buttonBTN_DATE">
+                <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">Date</property>
+                <property name="tooltip_text" translatable="yes">Date</property>
+                <property name="image">imageBTN_DATE</property>
+                <property name="yalign">0.37000000476837158</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">5</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="buttonBTN_TIME">
+                <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">Time</property>
+                <property name="tooltip_text" translatable="yes">Time</property>
+                <property name="image">imageBTN_TIME</property>
+                <property name="yalign">0.41999998688697815</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">6</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkComboBox" id="comboLB_DEFINED">
+            <property name="visible">True</property>
+            <property name="can_focus">False</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>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkFrame" id="frame1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</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="GtkLabel" id="label2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Use the buttons to change the font or insert field commands such as date, time, etc.</property>
+              </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">Note</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">3</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="box4">
+        <property name="can_focus">False</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="labelSTR_HF_NONE_IN_BRACKETS">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">(none)</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="labelSTR_PAGE">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Page</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="labelSTR_HF_OF_QUESTION">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">of ?</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="labelSTR_HF_CONFIDENTIAL">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Confidential</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="labelSTR_HF_CREATED_BY">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Created by</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="labelSTR_HF_CUSTOMIZED">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Customized</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">5</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="labelSTR_HF_OF">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">of</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">6</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">4</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkImage" id="imageBTN_DATE">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="pixbuf">sc/res/date.png</property>
+  </object>
+  <object class="GtkImage" id="imageBTN_PAGE">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="pixbuf">sc/res/page.png</property>
+  </object>
+  <object class="GtkImage" id="imageBTN_PAGES">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="pixbuf">sc/res/pages.png</property>
+  </object>
+  <object class="GtkImage" id="imageBTN_TABLE">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="pixbuf">sc/res/table.png</property>
+  </object>
+  <object class="GtkImage" id="imageBTN_TEXT">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="pixbuf">sc/res/text.png</property>
+  </object>
+</interface>

-- 
To view, visit https://gerrit.libreoffice.org/3737
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26465f69a7fa50fa58643c00225376a82ba8a7fc
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Olivier Hallot <olivier.hallot at edx.srv.br>



More information about the LibreOffice mailing list