[Libreoffice-commits] core.git: 4 commits - dbaccess/source extras/source svtools/source sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk writerfilter/source

Caolán McNamara caolanm at redhat.com
Mon Aug 26 04:37:14 PDT 2013


 dbaccess/source/ui/querydesign/querycontroller.cxx    |    2 
 extras/source/glade/libreoffice-catalog.xml.in        |    6 
 svtools/source/brwbox/brwbox3.cxx                     |   12 
 sw/UIConfig_swriter.mk                                |    2 
 sw/inc/globals.hrc                                    |    2 
 sw/inc/helpid.h                                       |    2 
 sw/inc/index.hrc                                      |   30 
 sw/source/ui/inc/swuicnttab.hxx                       |  179 +-
 sw/source/ui/index/cnttab.cxx                         |  887 ++++++--------
 sw/source/ui/index/cnttab.hrc                         |   37 
 sw/source/ui/index/cnttab.src                         |  642 +---------
 sw/uiconfig/swriter/ui/cardmediumpage.ui              |  214 +--
 sw/uiconfig/swriter/ui/labelformatpage.ui             |    4 
 sw/uiconfig/swriter/ui/tocentriespage.ui              | 1135 ++++++++++++++++++
 sw/uiconfig/swriter/ui/tokenwidget.ui                 |   57 
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |    2 
 16 files changed, 1916 insertions(+), 1297 deletions(-)

New commits:
commit 7800193a54f3f43210a7a5afd6c3ff419dd9e2b3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 26 12:25:57 2013 +0100

    convert token widget to .ui
    
    which means that the widgets inside the token window in index/table->entries
    are no longer truncated at the bottom
    
    Change-Id: I4852ce217b6c8f6322391db30501668d035b7d92

diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 2dfb673..951445b 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -221,6 +221,9 @@
       </properties>
     </glade-widget-class>
 
+    <glade-widget-class title="Token Window" name="swuilo-SwTokenWindow"
+                        generic-name="Token Window" parent="GtkDrawingArea"
+                        icon-name="widget-gtk-drawingarea"/>
     <glade-widget-class title="Mark Preview" name="swuilo-SwMarkPreview"
                         generic-name="Mark Preview Window" parent="GtkDrawingArea"
                         icon-name="widget-gtk-drawingarea"/>
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 11a4002..d250a6b 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -182,6 +182,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
 	sw/uiconfig/swriter/ui/templatedialog16 \
 	sw/uiconfig/swriter/ui/textgridpage \
 	sw/uiconfig/swriter/ui/titlepage \
+	sw/uiconfig/swriter/ui/tokenwidget \
 	sw/uiconfig/swriter/ui/viewoptionspage \
 	sw/uiconfig/swriter/ui/wordcount \
 	sw/uiconfig/swriter/ui/wrapdialog \
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index 767b1fb..d11071c 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -124,9 +124,7 @@
 
 #define TP_OPTCAPTION_PAGE          (RC_GLOBALS_BEGIN +  77)
 #define DLG_SVXTEST_NUM_BULLET      (RC_GLOBALS_BEGIN +  79)
-#define WIN_TOKEN                   (RC_GLOBALS_BEGIN +  89)
 #define TP_TOX_SELECT               (RC_GLOBALS_BEGIN +  90)
-#define TP_TOX_ENTRY                (RC_GLOBALS_BEGIN +  91)
 #define TP_TOX_STYLES               (RC_GLOBALS_BEGIN +  92)
 #define DLG_ADD_IDX_STYLES          (RC_GLOBALS_BEGIN +  94)
 //maximum: RC_GLOBALS_BEGIN +  120
diff --git a/sw/inc/index.hrc b/sw/inc/index.hrc
index 51773bc..48351fb 100644
--- a/sw/inc/index.hrc
+++ b/sw/inc/index.hrc
@@ -44,6 +44,33 @@
 #define  STR_NOSORTKEY          (RC_INDEX_BEGIN + 21)
 #define  STR_NO_CHAR_STYLE      (RC_INDEX_BEGIN + 22)
 #define  STR_DELIM              (RC_INDEX_BEGIN + 23)
+#define  STR_BUTTON_TEXT_START  (RC_INDEX_BEGIN + 24)
+#define  STR_TOKEN_ENTRY_NO     (STR_BUTTON_TEXT_START)
+#define  STR_TOKEN_ENTRY_TEXT   (STR_BUTTON_TEXT_START + 1)
+#define  STR_TOKEN_ENTRY        (STR_BUTTON_TEXT_START + 2)
+#define  STR_TOKEN_TAB_STOP     (STR_BUTTON_TEXT_START + 3)
+#define  STR_TOKEN_TEXT         (STR_BUTTON_TEXT_START + 4)
+#define  STR_TOKEN_PAGE_NUMS    (STR_BUTTON_TEXT_START + 5)
+#define  STR_TOKEN_CHAPTER_INFO (STR_BUTTON_TEXT_START + 6)
+#define  STR_TOKEN_LINK_START   (STR_BUTTON_TEXT_START + 7)
+#define  STR_TOKEN_LINK_END     (STR_BUTTON_TEXT_START + 8)
+#define  STR_TOKEN_AUTHORITY    (STR_BUTTON_TEXT_START + 9)
+
+#define  STR_BUTTON_HELP_TEXT_START  (STR_TOKEN_AUTHORITY + 1)
+#define  STR_TOKEN_HELP_ENTRY_NO      (STR_BUTTON_HELP_TEXT_START)
+#define  STR_TOKEN_HELP_ENTRY_TEXT    (STR_BUTTON_HELP_TEXT_START + 1)
+#define  STR_TOKEN_HELP_ENTRY         (STR_BUTTON_HELP_TEXT_START + 2)
+#define  STR_TOKEN_HELP_TAB_STOP      (STR_BUTTON_HELP_TEXT_START + 3)
+#define  STR_TOKEN_HELP_TEXT          (STR_BUTTON_HELP_TEXT_START + 4)
+#define  STR_TOKEN_HELP_PAGE_NUMS     (STR_BUTTON_HELP_TEXT_START + 5)
+#define  STR_TOKEN_HELP_CHAPTER_INFO  (STR_BUTTON_HELP_TEXT_START + 6)
+#define  STR_TOKEN_HELP_LINK_START    (STR_BUTTON_HELP_TEXT_START + 7)
+#define  STR_TOKEN_HELP_LINK_END      (STR_BUTTON_HELP_TEXT_START + 8)
+#define  STR_TOKEN_HELP_AUTHORITY     (STR_BUTTON_HELP_TEXT_START + 9)
+
+#define  STR_CHARSTYLE          (STR_TOKEN_HELP_AUTHORITY + 1)
+
+
 
 #endif  // _INDEX_HRC
 
diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx
index f7a3c9b..c5c67a9 100644
--- a/sw/source/ui/inc/swuicnttab.hxx
+++ b/sw/source/ui/inc/swuicnttab.hxx
@@ -253,23 +253,23 @@ class SwTOXEdit;
 class SwTOXButton;
 class SwTOXEntryTabPage;
 
-class SwTokenWindow : public Window
+class SwTokenWindow : public VclHBox, public VclBuilderContainer
 {
     typedef std::vector<Control*>::iterator ctrl_iterator;
     typedef std::vector<Control*>::const_iterator ctrl_const_iterator;
     typedef std::vector<Control*>::reverse_iterator ctrl_reverse_iterator;
     typedef std::vector<Control*>::const_reverse_iterator ctrl_const_reverse_iterator;
 
-    ImageButton     aLeftScrollWin;
-    Window          aCtrlParentWin;
-    ImageButton     aRightScrollWin;
+    Button* m_pLeftScrollWin;
+    Window* m_pCtrlParentWin;
+    Button* m_pRightScrollWin;
     std::vector<Control*>   aControlList;
     SwForm*         pForm;
-    sal_uInt16          nLevel;
-    sal_Bool            bValid;
-    String          aButtonTexts[TOKEN_END]; // Text of the buttons
-    String          aButtonHelpTexts[TOKEN_END]; // QuickHelpText of the buttons
-    String          sCharStyle;
+    sal_uInt16      nLevel;
+    bool            bValid;
+    OUString        aButtonTexts[TOKEN_END]; // Text of the buttons
+    OUString        aButtonHelpTexts[TOKEN_END]; // QuickHelpText of the buttons
+    OUString        sCharStyle;
     Link            aButtonSelectedHdl;
     Control*        pActiveCtrl;
     Link            aModifyHdl;
@@ -291,7 +291,7 @@ class SwTokenWindow : public Window
     void        MoveControls(long nOffset);
 
 public:
-    SwTokenWindow(Window* pParent, const ResId& rResId);
+    SwTokenWindow(Window* pParent);
     ~SwTokenWindow();
 
     void SetTabPage(SwTOXEntryTabPage *pParent) { m_pParent = pParent; }
@@ -324,8 +324,8 @@ public:
     sal_Bool        CreateQuickHelp(Control* pCtrl,
                     const SwFormToken& rToken, const HelpEvent& );
 
-    virtual void        Resize();
-    virtual void        GetFocus();
+    virtual void    GetFocus();
+    virtual void    setAllocation(const Size &rAllocation);
 };
 
 class SwTOXEntryTabPage;
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index b9a0215..c3f6987 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -2647,43 +2647,60 @@ String  SwTOXEntryTabPage::GetLevelHelp(sal_uInt16 nLevel) const
     return sRet;
 }
 
-SwTokenWindow::SwTokenWindow(Window* pParent, const ResId& rResId) :
-        Window( pParent, rResId ),
-        aLeftScrollWin(this, ResId(WIN_LEFT_SCROLL, *rResId.GetResMgr()  )),
-        aCtrlParentWin(this, ResId(WIN_CTRL_PARENT, *rResId.GetResMgr()   )),
-        aRightScrollWin(this, ResId(WIN_RIGHT_SCROLL, *rResId.GetResMgr() )),
-        pForm(0),
-        nLevel(0),
-        bValid(sal_False),
-        sCharStyle(ResId(STR_CHARSTYLE, *rResId.GetResMgr())),
-        pActiveCtrl(0),
-        m_pParent(NULL)
-{
-    SetStyle(GetStyle()|WB_TABSTOP|WB_DIALOGCONTROL);
-    SetHelpId(HID_TOKEN_WINDOW);
-    for(sal_uInt16 i = 0; i < TOKEN_END; i++)
+SwTokenWindow::SwTokenWindow(Window* pParent)
+    : VclHBox(pParent)
+    , pForm(0)
+    , nLevel(0)
+    , bValid(false)
+    , sCharStyle(SW_RESSTR(STR_CHARSTYLE))
+    , pActiveCtrl(0)
+    , m_pParent(NULL)
+{
+    m_pUIBuilder = new VclBuilder(this, getUIRootDir(),
+        "modules/swriter/ui/tokenwidget.ui", "TokenWidget");
+    get(m_pLeftScrollWin, "left");
+    get(m_pCtrlParentWin, "ctrl");
+    m_pCtrlParentWin->set_height_request(Edit::GetMinimumEditSize().Height());
+    get(m_pRightScrollWin, "right");
+
+    for (sal_uInt16 i = 0; i < TOKEN_END; ++i)
     {
         sal_uInt16 nTextId = STR_BUTTON_TEXT_START + i;
         if( STR_TOKEN_ENTRY_TEXT == nTextId )
             nTextId = STR_TOKEN_ENTRY;
-        aButtonTexts[i] = String(ResId(nTextId, *rResId.GetResMgr()));
+        aButtonTexts[i] = SW_RESSTR(nTextId);
 
         sal_uInt16 nHelpId = STR_BUTTON_HELP_TEXT_START + i;
         if(STR_TOKEN_HELP_ENTRY_TEXT == nHelpId)
             nHelpId = STR_TOKEN_HELP_ENTRY;
-        aButtonHelpTexts[i] = String(ResId(nHelpId, *rResId.GetResMgr()));
+        aButtonHelpTexts[i] = SW_RESSTR(nHelpId);
     }
 
-    FreeResource();
-
     Link aLink(LINK(this, SwTokenWindow, ScrollHdl));
-    aLeftScrollWin.SetClickHdl(aLink);
-    aRightScrollWin.SetClickHdl(aLink);
+    m_pLeftScrollWin->SetClickHdl(aLink);
+    m_pRightScrollWin->SetClickHdl(aLink);
 }
 
 extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSwTokenWindow(Window *pParent, VclBuilder::stringmap &)
 {
-    return new SwTokenWindow(pParent, SW_RES(WIN_TOKEN));
+    return new SwTokenWindow(pParent);
+}
+
+void SwTokenWindow::setAllocation(const Size &rAllocation)
+{
+    VclHBox::setAllocation(rAllocation);
+
+    if (aControlList.empty())
+        return;
+
+    Size aControlSize(m_pCtrlParentWin->GetSizePixel());
+    for (ctrl_iterator it = aControlList.begin(); it != aControlList.end(); ++it)
+    {
+        Control* pControl = (*it);
+        Size aSize(pControl->GetSizePixel());
+        aSize.Height() = aControlSize.Height();
+        pControl->SetSizePixel(aSize);
+    }
 }
 
 SwTokenWindow::~SwTokenWindow()
@@ -2803,7 +2820,7 @@ void SwTokenWindow::SetActiveControl(Control* pSet)
 Control*    SwTokenWindow::InsertItem(const String& rText, const SwFormToken& rToken)
 {
     Control* pRet = 0;
-    Size aControlSize(GetOutputSizePixel());
+    Size aControlSize(m_pCtrlParentWin->GetSizePixel());
     Point aControlPos;
 
     if(!aControlList.empty())
@@ -2817,7 +2834,7 @@ Control*    SwTokenWindow::InsertItem(const String& rText, const SwFormToken& rT
 
     if(TOKEN_TEXT == rToken.eTokenType)
     {
-        SwTOXEdit* pEdit = new SwTOXEdit(&aCtrlParentWin, this, rToken);
+        SwTOXEdit* pEdit = new SwTOXEdit(m_pCtrlParentWin, this, rToken);
         pEdit->SetPosPixel(aControlPos);
 
         aControlList.push_back(pEdit);
@@ -2834,7 +2851,7 @@ Control*    SwTokenWindow::InsertItem(const String& rText, const SwFormToken& rT
     }
     else
     {
-        SwTOXButton* pButton = new SwTOXButton(&aCtrlParentWin, this, rToken);
+        SwTOXButton* pButton = new SwTOXButton(m_pCtrlParentWin, this, rToken);
         pButton->SetPosPixel(aControlPos);
 
         aControlList.push_back(pButton);
@@ -2850,9 +2867,9 @@ Control*    SwTokenWindow::InsertItem(const String& rText, const SwFormToken& rT
         else
         {
             //use the first two chars as symbol
-            String sTmp(SwAuthorityFieldType::GetAuthFieldName(
+            OUString sTmp(SwAuthorityFieldType::GetAuthFieldName(
                         (ToxAuthorityField)rToken.nAuthorityField));
-            pButton->SetText(sTmp.Copy(0, 2));
+            pButton->SetText(sTmp.copy(0, 2));
         }
 
         pButton->Show();
@@ -3003,7 +3020,7 @@ void    SwTokenWindow::InsertAtSelection(
         ((SwTOXEdit*)pActiveCtrl)->AdjustSize();
 
         SwFormToken aTmpToken(TOKEN_TEXT);
-        SwTOXEdit* pEdit = new SwTOXEdit(&aCtrlParentWin, this, aTmpToken);
+        SwTOXEdit* pEdit = new SwTOXEdit(m_pCtrlParentWin, this, aTmpToken);
 
         iterActive = aControlList.insert(iterActive, pEdit);
 
@@ -3023,7 +3040,7 @@ void    SwTokenWindow::InsertAtSelection(
     }
 
     //now the new button
-    SwTOXButton* pButton = new SwTOXButton(&aCtrlParentWin, this, aToInsertToken);
+    SwTOXButton* pButton = new SwTOXButton(m_pCtrlParentWin, this, aToInsertToken);
 
     aControlList.insert(iterActive, pButton);
 
@@ -3134,7 +3151,7 @@ void SwTokenWindow::AdjustScrolling()
         Control* pFirstCtrl = *(aControlList.begin());
         Control* pLastCtrl = *(aControlList.rbegin());
 
-        long nSpace = aCtrlParentWin.GetSizePixel().Width();
+        long nSpace = m_pCtrlParentWin->GetSizePixel().Width();
         long nWidth = pLastCtrl->GetPosPixel().X() - pFirstCtrl->GetPosPixel().X()
                                                     + pLastCtrl->GetSizePixel().Width();
         bool bEnable = nWidth > nSpace;
@@ -3154,9 +3171,9 @@ void SwTokenWindow::AdjustScrolling()
             if(nMove)
                 MoveControls(nMove);
 
-            aLeftScrollWin.Enable(pFirstCtrl->GetPosPixel().X() < 0);
+            m_pLeftScrollWin->Enable(pFirstCtrl->GetPosPixel().X() < 0);
 
-            aRightScrollWin.Enable((pLastCtrl->GetPosPixel().X() + pLastCtrl->GetSizePixel().Width()) > nSpace);
+            m_pRightScrollWin->Enable((pLastCtrl->GetPosPixel().X() + pLastCtrl->GetSizePixel().Width()) > nSpace);
         }
         else
         {
@@ -3169,8 +3186,8 @@ void SwTokenWindow::AdjustScrolling()
                     MoveControls(-nFirstPos);
             }
 
-            aRightScrollWin.Enable(false);
-            aLeftScrollWin.Enable(false);
+            m_pRightScrollWin->Enable(false);
+            m_pLeftScrollWin->Enable(false);
         }
     }
 }
@@ -3180,7 +3197,7 @@ IMPL_LINK(SwTokenWindow, ScrollHdl, ImageButton*, pBtn )
     if(aControlList.empty())
         return 0;
 
-    const long nSpace = aCtrlParentWin.GetSizePixel().Width();
+    const long nSpace = m_pCtrlParentWin->GetSizePixel().Width();
 #if OSL_DEBUG_LEVEL > 1
     //find all start/end positions and print it
     String sMessage(OUString("Space: "));
@@ -3203,7 +3220,7 @@ IMPL_LINK(SwTokenWindow, ScrollHdl, ImageButton*, pBtn )
 #endif
 
     long nMove = 0;
-    if(pBtn == &aLeftScrollWin)
+    if(pBtn == m_pLeftScrollWin)
     {
         //find the first completely visible control (left edge visible)
         for (ctrl_iterator it = aControlList.begin(); it != aControlList.end(); ++it)
@@ -3269,10 +3286,10 @@ IMPL_LINK(SwTokenWindow, ScrollHdl, ImageButton*, pBtn )
         Control *pCtrl = 0;
 
         pCtrl = *(aControlList.begin());
-        aLeftScrollWin.Enable(pCtrl->GetPosPixel().X() < 0);
+        m_pLeftScrollWin->Enable(pCtrl->GetPosPixel().X() < 0);
 
         pCtrl = *(aControlList.rbegin());
-        aRightScrollWin.Enable((pCtrl->GetPosPixel().X() + pCtrl->GetSizePixel().Width()) > nSpace);
+        m_pRightScrollWin->Enable((pCtrl->GetPosPixel().X() + pCtrl->GetSizePixel().Width()) > nSpace);
     }
 
     return 0;
@@ -3368,23 +3385,6 @@ sal_Bool SwTokenWindow::CreateQuickHelp(Control* pCtrl,
     return bRet;
 }
 
-void SwTokenWindow::Resize()
-{
- Size aCompleteSize(GetOutputSizePixel());
-
- Point aRightPos(aRightScrollWin.GetPosPixel());
- Size aRightSize(aRightScrollWin.GetSizePixel());
-
- Size aMiddleSize(aCtrlParentWin.GetSizePixel());
-
-    long nMove = aCompleteSize.Width() - aRightSize.Width() - aRightPos.X();
-
-    aRightPos.X() += nMove;
-    aRightScrollWin.SetPosPixel(aRightPos);
-    aMiddleSize.Width() += nMove;
-    aCtrlParentWin.SetSizePixel(aMiddleSize);
-}
-
 IMPL_LINK(SwTokenWindow, EditResize, Edit*, pEdit)
 {
     ((SwTOXEdit*)pEdit)->AdjustSize();
diff --git a/sw/source/ui/index/cnttab.hrc b/sw/source/ui/index/cnttab.hrc
index ae77c37..3305765 100644
--- a/sw/source/ui/index/cnttab.hrc
+++ b/sw/source/ui/index/cnttab.hrc
@@ -20,7 +20,6 @@
 #define FL_TITLE       14
 #define ED_TITLE       15
 #define BT_HELP        16
-#define ST_AUTHTYPE    17
 
 #define LB_ENTRY       20
 #define ED_ENTRY       22
@@ -92,37 +91,7 @@
 #define CLB_FROMOBJ             62
 #define FL_FROMOBJ              63
 #define RES_SRCTYPES            64
-#define WIN_LEFT_SCROLL         65
-#define WIN_CTRL_PARENT         66
-#define WIN_RIGHT_SCROLL        67
-#define PB_ALL_LEVELS           68
 #define FT_AREA                 69
-#define STR_BUTTON_TEXT_START   70
-#define STR_TOKEN_ENTRY_NO      (STR_BUTTON_TEXT_START)
-#define STR_TOKEN_ENTRY_TEXT    (STR_BUTTON_TEXT_START + 1)
-#define STR_TOKEN_ENTRY         (STR_BUTTON_TEXT_START + 2)
-#define STR_TOKEN_TAB_STOP      (STR_BUTTON_TEXT_START + 3)
-#define STR_TOKEN_TEXT          (STR_BUTTON_TEXT_START + 4)
-#define STR_TOKEN_PAGE_NUMS     (STR_BUTTON_TEXT_START + 5)
-#define STR_TOKEN_CHAPTER_INFO  (STR_BUTTON_TEXT_START + 6)
-#define STR_TOKEN_LINK_START    (STR_BUTTON_TEXT_START + 7)
-#define STR_TOKEN_LINK_END      (STR_BUTTON_TEXT_START + 8)
-#define STR_TOKEN_AUTHORITY     (STR_BUTTON_TEXT_START + 9)
-
-#define STR_BUTTON_HELP_TEXT_START  (STR_TOKEN_AUTHORITY + 1)
-#define STR_TOKEN_HELP_ENTRY_NO      (STR_BUTTON_HELP_TEXT_START)
-#define STR_TOKEN_HELP_ENTRY_TEXT    (STR_BUTTON_HELP_TEXT_START + 1)
-#define STR_TOKEN_HELP_ENTRY         (STR_BUTTON_HELP_TEXT_START + 2)
-#define STR_TOKEN_HELP_TAB_STOP      (STR_BUTTON_HELP_TEXT_START + 3)
-#define STR_TOKEN_HELP_TEXT          (STR_BUTTON_HELP_TEXT_START + 4)
-#define STR_TOKEN_HELP_PAGE_NUMS     (STR_BUTTON_HELP_TEXT_START + 5)
-#define STR_TOKEN_HELP_CHAPTER_INFO  (STR_BUTTON_HELP_TEXT_START + 6)
-#define STR_TOKEN_HELP_LINK_START    (STR_BUTTON_HELP_TEXT_START + 7)
-#define STR_TOKEN_HELP_LINK_END      (STR_BUTTON_HELP_TEXT_START + 8)
-#define STR_TOKEN_HELP_AUTHORITY     (STR_BUTTON_HELP_TEXT_START + 9)
-
-#define STR_CHARSTYLE               (STR_TOKEN_HELP_AUTHORITY + 1)
-
 #define TLB_STYLES              100
 #define FL_STYLES                   101
 #define PB_OK                   102
@@ -191,8 +160,6 @@
 //TabDialog
 #define WIN_EXAMPLE         1
 
-#define CB_SHOWEXAMPLE      14
-
 //ButtonMenu
 #define MN_AUTOMARK_OPEN    1
 #define MN_AUTOMARK_NEW     2
diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src
index bc4bfd4..564a6a4 100644
--- a/sw/source/ui/index/cnttab.src
+++ b/sw/source/ui/index/cnttab.src
@@ -60,6 +60,85 @@ String STR_DELIM
     Text [ en-US ] = "S";
 };
 
+String STR_TOKEN_ENTRY_NO
+{
+    Text [ en-US ] = "E#";
+};
+String STR_TOKEN_ENTRY
+{
+    Text [ en-US ] = "E";
+};
+String STR_TOKEN_TAB_STOP
+{
+    Text [ en-US ] = "T";
+};
+String STR_TOKEN_TEXT
+{
+    Text = "";
+    //unused
+};
+String STR_TOKEN_PAGE_NUMS
+{
+    Text [ en-US ] = "#";
+};
+String STR_TOKEN_CHAPTER_INFO
+{
+    Text [ en-US ] = "CI";
+};
+String STR_TOKEN_LINK_START
+{
+    Text [ en-US ] = "LS";
+};
+String STR_TOKEN_LINK_END
+{
+    Text [ en-US ] = "LE";
+};
+String STR_TOKEN_AUTHORITY
+{
+    Text [ en-US ] = "A";
+};
+String STR_TOKEN_HELP_ENTRY_NO
+{
+    Text [ en-US ] = "Chapter number";
+};
+String STR_TOKEN_HELP_ENTRY
+{
+    Text [ en-US ] = "Entry";
+};
+String STR_TOKEN_HELP_TAB_STOP
+{
+    Text [ en-US ] = "Tab stop";
+};
+String STR_TOKEN_HELP_TEXT
+{
+    Text [ en-US ] = "Text";
+};
+String STR_TOKEN_HELP_PAGE_NUMS
+{
+    Text [ en-US ] = "Page number";
+};
+String STR_TOKEN_HELP_CHAPTER_INFO
+{
+    Text [ en-US ] = "Chapter info";
+};
+String STR_TOKEN_HELP_LINK_START
+{
+    Text [ en-US ] = "Hyperlink start";
+};
+String STR_TOKEN_HELP_LINK_END
+{
+    Text [ en-US ] = "Hyperlink end";
+};
+String STR_TOKEN_HELP_AUTHORITY
+{
+    Text [ en-US ] = "Bibliography entry: ";
+};
+String STR_CHARSTYLE
+{
+    Text [ en-US ] = "Character Style: ";
+};
+
+
 //------------------------------------------------------------------
 TabPage TP_TOX_SELECT
 {
@@ -494,542 +573,6 @@ TabPage TP_TOX_SELECT
     };
 };
 
-TabPage TP_TOX_ENTRY
-{
-    Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-    Hide = TRUE ;
-    FixedText FT_LEVEL
-    {
-        Pos = MAP_APPFONT ( 6, 3 ) ;
-        Size = MAP_APPFONT ( 25, 8 ) ;
-        Text [ en-US ] = "~Level";
-    };
-    Control LB_LEVEL
-    {
-        Pos = MAP_APPFONT (  6, 15 ) ;
-        Size = MAP_APPFONT ( 25, 167 ) ;
-        TabStop = TRUE ;
-        Border = TRUE;
-    };
-    String ST_AUTHTYPE
-    {
-        Text [ en-US ] = "~Type";
-    };
-    FixedText FT_TOKEN
-    {
-        Pos = MAP_APPFONT (  37, 18 ) ;
-        Size = MAP_APPFONT ( 30, 8 ) ;
-        Text [ en-US ] = "~Structure";
-    };
-    PushButton PB_ALL_LEVELS
-    {
-        HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ALL_LEVELS";
-        Pos = MAP_APPFONT ( 209 , 14 ) ;
-        Size = MAP_APPFONT ( 40, 14 ) ;
-        Text [ en-US ] = "~All";
-    };
-    PushButton PB_ENTRYNO
-    {
-        HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ENTRYNO";
-        Pos = MAP_APPFONT ( 37 , 32 ) ;
-        Size = MAP_APPFONT ( 40, 14 ) ;
-        Text [ en-US ] = "Chapter no.";
-    };
-    PushButton PB_ENTRY
-    {
-        HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ENTRY";
-        Pos = MAP_APPFONT (  80, 32 ) ;
-        Size = MAP_APPFONT ( 40, 14 ) ;
-        Text [ en-US ] = "Entry text";
-    };
-    PushButton PB_CHAPTERINFO
-    {
-        HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_CHAPTERINFO";
-        Pos = MAP_APPFONT ( 123 , 32 ) ;
-        Size = MAP_APPFONT ( 40, 14) ;
-        Text [ en-US ] = "~Chapter info";
-    };
-    PushButton PB_PAGENO
-    {
-        HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_PAGENO";
-        Pos = MAP_APPFONT ( 166 , 32 ) ;
-        Size = MAP_APPFONT ( 40, 14 ) ;
-        Text [ en-US ] = "Page no.";
-    };
-    PushButton PB_TAB
-    {
-        HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_TAB";
-        Pos = MAP_APPFONT ( 209 ,32  ) ;
-        Size = MAP_APPFONT ( 40, 14 ) ;
-        Text [ en-US ] = "Tab stop";
-    };
-    PushButton PB_HYPERLINK
-    {
-        HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_HYPERLINK";
-        Pos = MAP_APPFONT ( 209 , 32 ) ;
-        Size = MAP_APPFONT ( 40, 14 ) ;
-        Text [ en-US ] = "H~yperlink";
-    };
-    ListBox LB_AUTHFIELD
-    {
-        HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_AUTHFIELD";
-        Pos = MAP_APPFONT ( 37 , 33 ) ;
-        Size = MAP_APPFONT ( 59, 60 ) ;
-        DropDown = TRUE;
-        Border = TRUE;
-        Sort = TRUE;
-    };
-    PushButton PB_AUTHINSERT
-    {
-        HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_AUTHINSERT";
-        Pos = MAP_APPFONT ( 99 , 32 ) ;
-        Size = MAP_APPFONT ( 39, 14 ) ;
-        Text [ en-US ] = "~Insert";
-    };
-    PushButton PB_AUTHREMOVE
-    {
-        HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_AUTHREMOVE";
-        Pos = MAP_APPFONT ( 142 , 32 ) ;
-        Size = MAP_APPFONT ( 39, 14 ) ;
-        Text [ en-US ] = "~Remove";
-    };
-    FixedText FT_CHARSTYLE
-    {
-        Pos = MAP_APPFONT ( 37 , 55 ) ;
-        Size = MAP_APPFONT (60 , 8 ) ;
-        Text [ en-US ] = "Character Style";
-    };
-    ListBox LB_CHARSTYLE
-    {
-        HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_CHARSTYLE";
-        Pos = MAP_APPFONT ( 100 , 53 ) ;
-        Size = MAP_APPFONT ( 93, 60 ) ;
-        TabStop = TRUE ;
-        DropDown = TRUE ;
-    };
-    PushButton PB_EDITSTYLE
-    {
-        HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_EDITSTYLE";
-        Pos = MAP_APPFONT ( 199 , 52 ) ;
-        Size = MAP_APPFONT ( 50, 14 ) ;
-        Text [ en-US ] = "~Edit...";
-    };
-    FixedText FT_FILLCHAR
-    {
-        Pos = MAP_APPFONT ( 37 , 71 ) ;
-        Size = MAP_APPFONT (60 , 8 ) ;
-        Text [ en-US ] = "Fill character";
-    };
-    ComboBox CB_FILLCHAR
-    {
-        HelpID = "sw:ComboBox:TP_TOX_ENTRY:CB_FILLCHAR";
-        Pos = MAP_APPFONT ( 100 , 69 ) ;
-        Size = MAP_APPFONT ( 40, 40 ) ;
-        TabStop = TRUE ;
-        DropDown = TRUE ;
-    };
-    FixedText FT_CHAPTERENTRY
-    {
-        Pos = MAP_APPFONT ( 37 , 71 ) ;
-        Size = MAP_APPFONT ( 60, 8 ) ;
-        Text [ en-US ] = "Chapter entry";
-    };
-    ListBox LB_CHAPTERENTRY
-    {
-        HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_CHAPTERENTRY";
-        Pos = MAP_APPFONT ( 100 , 69 ) ;
-        Size = MAP_APPFONT ( 93, 40 ) ;
-        TabStop = TRUE ;
-        DropDown = TRUE ;
-    StringList [ en-US ] =
-    {
-            < "Number range only" ; > ;
-        < "Description only" ; > ;
-        < "Number range and description" ; > ;
-    };
-    };
-
-    FixedText FT_ENTRY_NO
-        {
-            Pos = MAP_APPFONT ( 37 , 71 ) ;
-            Size = MAP_APPFONT ( 60, 8 ) ;
-            Text [ en-US ] = "Format";
-        };
-    ListBox LB_ENTRY_NO
-    {
-        HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_ENTRY_NO";
-        Pos = MAP_APPFONT ( 100 , 69 ) ;
-        Size = MAP_APPFONT ( 93, 40 ) ;
-        TabStop = TRUE ;
-        DropDown = TRUE ;
-        StringList [ en-US ] =
-            {
-                < "Number" ; > ;
-                < "Number without separator" ; > ;
-            };
-    };
-
-    FixedText       FT_LEVEL_OL
-        {
-            Pos = MAP_APPFONT ( 37 , 87 ) ;
-            Size = MAP_APPFONT ( 60 , 8 ) ;
-            Text [ en-US ] = "Evaluate up to level";
-        };
-    NumericField    NF_LEVEL_OL
-        {
-        HelpID = "sw:NumericField:TP_TOX_ENTRY:NF_LEVEL_OL";
-            Pos = MAP_APPFONT ( 100 , 85 ) ;
-            Size = MAP_APPFONT ( 20 , 12 ) ;
-            Border = TRUE ;
-            TabStop = TRUE ;
-            Left = TRUE ;
-            Repeat = TRUE ;
-            Spin = TRUE ;
-            Minimum = 1 ;
-            Maximum = 10 ;
-            Value = 10 ;
-            SpinSize = 1 ;
-        };
-
-    FixedText FT_TABPOS
-    {
-        Pos = MAP_APPFONT ( 37 , 87 ) ;
-        Size = MAP_APPFONT ( 60, 8 ) ;
-        Text [ en-US ] = "Tab stop position";
-    };
-    MetricField MF_TABPOS
-    {
-        HelpID = "sw:MetricField:TP_TOX_ENTRY:MF_TABPOS";
-        Pos = MAP_APPFONT ( 100 , 85 ) ;
-        Size = MAP_APPFONT ( 40, 12 ) ;
-        Border = TRUE ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 0 ;
-        Maximum = 1999 ;
-        DecimalDigits = 2 ;
-        Value = 0 ;
-        Unit = FUNIT_CM ;
-        First = 0 ;
-        Last = 1999 ;
-        SpinSize = 5 ;
-    };
-    CheckBox CB_AUTORIGHT
-    {
-        HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_AUTORIGHT";
-        Pos = MAP_APPFONT ( 143 , 86 ) ;
-        Size = MAP_APPFONT ( 100, 10 ) ;
-        Text [ en-US ] = "Align right";
-    };
-    FixedLine FL_ENTRY
-    {
-        Pos = MAP_APPFONT ( 34 , 3 ) ;
-        Size = MAP_APPFONT ( 220, 8 ) ;
-        Text [ en-US ] = "Structure and Formatting";
-    };
-    CheckBox CB_RELTOSTYLE
-    {
-        HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_RELTOSTYLE";
-        Pos = MAP_APPFONT ( 37 , 110 ) ;
-        Size = MAP_APPFONT ( 200, 10 ) ;
-        Text [ en-US ] = "Tab position relati~ve to Paragraph Style indent";
-    };
-    FixedText FT_MAIN_ENTRY_STYLE
-    {
-        Pos = MAP_APPFONT ( 37 , 112 ) ;
-        Size = MAP_APPFONT ( 116, 8 ) ;
-        Text [ en-US ] = "Character Style for main entries";
-    };
-    ListBox LB_MAIN_ENTRY_STYLE
-    {
-        HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_MAIN_ENTRY_STYLE";
-        Pos = MAP_APPFONT ( 157 , 110 ) ;
-        Size = MAP_APPFONT ( 92, 80 ) ;
-        TabStop = TRUE ;
-        DropDown = TRUE ;
-        AutoHScroll = TRUE;
-    };
-
-    CheckBox CB_ALPHADELIM
-    {
-        HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_ALPHADELIM";
-        Pos = MAP_APPFONT ( 37 , 126 ) ;
-        Size = MAP_APPFONT ( 105, 10 ) ;
-        Text [ en-US ] = "Alphabetical delimiter";
-    };
-    CheckBox CB_COMMASEPARATED
-    {
-        HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_COMMASEPARATED";
-        Pos = MAP_APPFONT ( 37 , 140 ) ;
-        Size = MAP_APPFONT ( 105, 10 ) ;
-        Text [ en-US ] = "Key separated by commas";
-    };
-    FixedLine FL_FORMAT
-    {
-        Pos = MAP_APPFONT ( 34 , 99 ) ;
-        Size = MAP_APPFONT ( 220, 8  ) ;
-        Text [ en-US ] = "Format";
-    };
-    RadioButton RB_DOCPOS
-    {
-        HelpID = "sw:RadioButton:TP_TOX_ENTRY:RB_DOCPOS";
-        Pos = MAP_APPFONT ( 40 , 113) ;
-        Size = MAP_APPFONT ( 94, 10  ) ;
-        Text [ en-US ] = "Document ~position ";
-    };
-    RadioButton RB_SORTCONTENT
-    {
-        HelpID = "sw:RadioButton:TP_TOX_ENTRY:RB_SORTCONTENT";
-        Pos = MAP_APPFONT ( 136 , 113 ) ;
-        Size = MAP_APPFONT ( 90, 10  ) ;
-        Text [ en-US ] = "~Content";
-    };
-    FixedLine FL_SORTING
-    {
-        Pos = MAP_APPFONT ( 34 , 102 ) ;
-        Size = MAP_APPFONT ( 220, 8  ) ;
-        Text [ en-US ] = "Sort by";
-    };
-    FixedText FT_FIRSTKEY
-    {
-        Pos = MAP_APPFONT ( 40 , 140 ) ;
-        Size = MAP_APPFONT ( 10, 8  ) ;
-        Text = "~1" ;
-    };
-    ListBox LB_FIRSTKEY
-    {
-        HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_FIRSTKEY";
-        Pos = MAP_APPFONT ( 60 , 138 ) ;
-        Size = MAP_APPFONT ( 159, 50  ) ;
-        Border = TRUE;
-        DropDown = TRUE;
-    };
-    ImageRadioButton RB_SORTUP1
-    {
-        HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP1";
-        Pos = MAP_APPFONT ( 222 , 138 ) ;
-        Size = MAP_APPFONT ( 12, 12  ) ;
-        RadioButtonImage =
-            Image
-            {
-                ImageBitmap = Bitmap{File = "sc10712.bmp"; };
-                MaskColor = IMAGE_MASK_COLOR ;
-            };
-        Check = TRUE;
-        QuickHelpText [ en-US ] = "Ascending";
-    };
-    ImageRadioButton RB_SORTDOWN1
-    {
-        HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN1";
-        Pos = MAP_APPFONT ( 237 , 138 ) ;
-        Size = MAP_APPFONT ( 12, 12  ) ;
-        RadioButtonImage =
-            Image
-            {
-                ImageBitmap = Bitmap{File = "sc10713.bmp"; };
-                MaskColor = IMAGE_MASK_COLOR ;
-            };
-        QuickHelpText [ en-US ] = "Descending";
-    };
-    ImageRadioButton RB_SORTUP2
-    {
-        HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP2";
-        Pos = MAP_APPFONT ( 222 , 153 ) ;
-        Size = MAP_APPFONT ( 12, 12  ) ;
-        RadioButtonImage =
-            Image
-            {
-                ImageBitmap = Bitmap{File = "sc10712.bmp"; };
-                MaskColor = IMAGE_MASK_COLOR ;
-            };
-        Check = TRUE;
-        QuickHelpText [ en-US ] = "Ascending";
-    };
-    ImageRadioButton RB_SORTDOWN2
-    {
-        HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN2";
-        Pos = MAP_APPFONT ( 237 , 153 ) ;
-        Size = MAP_APPFONT ( 12, 12  ) ;
-        RadioButtonImage =
-            Image
-            {
-                ImageBitmap = Bitmap{File = "sc10713.bmp"; };
-                MaskColor = IMAGE_MASK_COLOR ;
-            };
-        QuickHelpText [ en-US ] = "Descending";
-    };
-    ImageRadioButton RB_SORTUP3
-    {
-        HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP3";
-        Pos = MAP_APPFONT ( 222 , 168 ) ;
-        Size = MAP_APPFONT ( 12, 12  ) ;
-        RadioButtonImage =
-            Image
-            {
-                ImageBitmap = Bitmap{File = "sc10712.bmp"; };
-                MaskColor = IMAGE_MASK_COLOR ;
-            };
-        Check = TRUE;
-        QuickHelpText [ en-US ] = "Ascending";
-    };
-    ImageRadioButton RB_SORTDOWN3
-    {
-        HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN3";
-        Pos = MAP_APPFONT ( 237 ,168 ) ;
-        Size = MAP_APPFONT ( 12, 12  ) ;
-        RadioButtonImage =
-            Image
-            {
-                ImageBitmap = Bitmap{File = "sc10713.bmp"; };
-                MaskColor = IMAGE_MASK_COLOR ;
-            };
-        QuickHelpText [ en-US ] = "Descending";
-    };
-    FixedText FT_SECONDKEY
-    {
-        Pos = MAP_APPFONT ( 40 , 155 ) ;
-        Size = MAP_APPFONT ( 10, 8  ) ;
-        Text = "~2" ;
-    };
-    ListBox LB_SECONDKEY
-    {
-        HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_SECONDKEY";
-        Pos = MAP_APPFONT ( 60 , 153 ) ;
-        Size = MAP_APPFONT ( 159, 50  ) ;
-        Border = TRUE;
-        DropDown = TRUE;
-    };
-    FixedText FT_THIRDDKEY
-    {
-        Pos = MAP_APPFONT ( 40 , 170 ) ;
-        Size = MAP_APPFONT ( 10, 8  ) ;
-        Text = "~3" ;
-    };
-    ListBox LB_THIRDKEY
-    {
-        HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_THIRDKEY";
-        Pos = MAP_APPFONT ( 60 , 168 ) ;
-        Size = MAP_APPFONT ( 159, 50  ) ;
-        Border = TRUE;
-        DropDown = TRUE;
-    };
-    FixedLine FL_SORTKEY
-    {
-        Pos = MAP_APPFONT ( 34 , 126) ;
-        Size = MAP_APPFONT ( 220, 8  ) ;
-        Text [ en-US ] = "Sort keys";
-    };
-};
-
-Window WIN_TOKEN
-{
-    Pos = MAP_APPFONT (  70, 15 ) ;
-    Size = MAP_APPFONT ( 136, 14 ) ;
-    ImageButton WIN_LEFT_SCROLL
-    {
-        HelpID = "sw:ImageButton:TP_TOX_ENTRY:WIN_LEFT_SCROLL";
-        Pos = MAP_APPFONT (  0, 0 ) ;
-        Size = MAP_APPFONT ( 10, 12 ) ;
-        Symbol = IMAGEBUTTON_ARROW_LEFT;
-        DialogControl        = FALSE;
-        TabStop              = FALSE;
-    };
-    Window WIN_CTRL_PARENT
-    {
-        Pos = MAP_APPFONT (  11, 0 ) ;
-        Size = MAP_APPFONT ( 114, 12 ) ;
-        DialogControl        = TRUE;
-    };
-    ImageButton WIN_RIGHT_SCROLL
-    {
-        HelpID = "sw:ImageButton:TP_TOX_ENTRY:WIN_RIGHT_SCROLL";
-        Pos = MAP_APPFONT (  126, 0 ) ;
-        Size = MAP_APPFONT ( 10, 12 ) ;
-        Symbol = IMAGEBUTTON_ARROW_RIGHT;
-        DialogControl        = FALSE;
-        TabStop              = FALSE;
-    };
-    String STR_TOKEN_ENTRY_NO
-    {
-        Text [ en-US ] = "E#";
-    };
-    String STR_TOKEN_ENTRY
-    {
-        Text [ en-US ] = "E";
-    };
-    String STR_TOKEN_TAB_STOP
-    {
-        Text [ en-US ] = "T";
-    };
-    String STR_TOKEN_TEXT
-    {
-        Text = "";
-        //unused
-    };
-    String STR_TOKEN_PAGE_NUMS
-    {
-        Text [ en-US ] = "#";
-    };
-    String STR_TOKEN_CHAPTER_INFO
-    {
-        Text [ en-US ] = "CI";
-    };
-    String STR_TOKEN_LINK_START
-    {
-        Text [ en-US ] = "LS";
-    };
-    String STR_TOKEN_LINK_END
-    {
-        Text [ en-US ] = "LE";
-    };
-    String STR_TOKEN_AUTHORITY
-    {
-        Text [ en-US ] = "A";
-    };
-    String STR_TOKEN_HELP_ENTRY_NO
-    {
-        Text [ en-US ] = "Chapter number";
-    };
-    String STR_TOKEN_HELP_ENTRY
-    {
-        Text [ en-US ] = "Entry";
-    };
-    String STR_TOKEN_HELP_TAB_STOP
-    {
-        Text [ en-US ] = "Tab stop";
-    };
-    String STR_TOKEN_HELP_TEXT
-    {
-        Text [ en-US ] = "Text";
-    };
-    String STR_TOKEN_HELP_PAGE_NUMS
-    {
-        Text [ en-US ] = "Page number";
-    };
-    String STR_TOKEN_HELP_CHAPTER_INFO
-    {
-        Text [ en-US ] = "Chapter info";
-    };
-    String STR_TOKEN_HELP_LINK_START
-    {
-        Text [ en-US ] = "Hyperlink start";
-    };
-    String STR_TOKEN_HELP_LINK_END
-    {
-        Text [ en-US ] = "Hyperlink end";
-    };
-    String STR_TOKEN_HELP_AUTHORITY
-    {
-        Text [ en-US ] = "Bibliography entry: ";
-    };
-    String STR_CHARSTYLE
-    {
-        Text [ en-US ] = "Character Style: ";
-    };
-};
-
 ModalDialog DLG_ADD_IDX_STYLES
 {
     HelpId = HID_DLG_ADD_IDX_STYLES;
diff --git a/sw/uiconfig/swriter/ui/tocentriespage.ui b/sw/uiconfig/swriter/ui/tocentriespage.ui
index 0f3d53b..e50cf44 100644
--- a/sw/uiconfig/swriter/ui/tocentriespage.ui
+++ b/sw/uiconfig/swriter/ui/tocentriespage.ui
@@ -197,8 +197,8 @@
                               <object class="swuilo-SwTokenWindow" id="token">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
+                                <property name="valign">center</property>
                                 <property name="hexpand">True</property>
-                                <property name="label" translatable="yes">label</property>
                               </object>
                               <packing>
                                 <property name="left_attach">1</property>
diff --git a/sw/uiconfig/swriter/ui/tokenwidget.ui b/sw/uiconfig/swriter/ui/tokenwidget.ui
new file mode 100644
index 0000000..e764269
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/tokenwidget.ui
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.6 -->
+  <object class="GtkImage" id="image1">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-go-back</property>
+  </object>
+  <object class="GtkImage" id="image2">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-go-forward</property>
+  </object>
+  <object class="GtkBox" id="TokenWidget">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">12</property>
+    <child>
+      <object class="GtkButton" id="left">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">True</property>
+        <property name="image">image1</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkDrawingArea" id="ctrl">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkButton" id="right">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">True</property>
+        <property name="image">image2</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+  </object>
+</interface>
commit 4a4631b86cdc1665484b14311ec0e83494aac8bb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Aug 24 20:18:12 2013 +0100

    convert tox entries page to .ui
    
    Change-Id: Iedc6ab145a39b3844a42b70bfa18f4af574d732d

diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 958d5ae..2dfb673 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -368,6 +368,9 @@
     <glade-widget-class title="Tab List" name="svtlo-SvTabListBox"
                         generic-name="Tab List" parent="svtlo-SvTreeListBox"
                         icon-name="widget-gtk-treeview"/>
+    <glade-widget-class title="SwIdxTreeListBox" name="swuilo-SwIdxTreeListBox"
+                        generic-name="SwIdxTreeListBox" parent="svtlo-SvTreeListBox"
+                        icon-name="widget-gtk-treeview"/>
     <glade-widget-class title="Tooltip Tree List" name="swuilo-SwFldRefTreeListBox"
                         generic-name="Tooltip Tree List" parent="svtlo-SvTreeListBox"
                         icon-name="widget-gtk-treeview"/>
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 030e5653..11a4002 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -170,6 +170,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
 	sw/uiconfig/swriter/ui/statisticsinfopage \
 	sw/uiconfig/swriter/ui/stringinput \
 	sw/uiconfig/swriter/ui/tocdialog \
+	sw/uiconfig/swriter/ui/tocentriespage \
 	sw/uiconfig/swriter/ui/tocstylespage \
 	sw/uiconfig/swriter/ui/tablecolumnpage \
 	sw/uiconfig/swriter/ui/tableproperties \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index d74754a..eae35fc 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -138,7 +138,6 @@
 #define HID_REDLINE_CTRL                                        "SW_HID_REDLINE_CTRL"
 #define HID_OPTCAPTION_PAGE                                     "SW_HID_OPTCAPTION_PAGE"
 #define HID_TP_TOX_SELECT                                       "SW_HID_TP_TOX_SELECT"
-#define HID_TP_TOX_ENTRY                                        "SW_HID_TP_TOX_ENTRY"
 #define HID_DLG_ADD_IDX_STYLES                                  "SW_HID_DLG_ADD_IDX_STYLES"
 #define HID_ADD_STYLES_TLB                                      "SW_HID_ADD_STYLES_TLB"
 #define HID_OLE_CHECKLB                                         "SW_HID_OLE_CHECKLB"
@@ -350,7 +349,6 @@
 #define HID_AUTH_FIELD_CUSTOM5                                  "SW_HID_AUTH_FIELD_CUSTOM5"
 #define HID_AUTH_FIELD_ISBN                                     "SW_HID_AUTH_FIELD_ISBN"
 
-#define HID_INSERT_INDEX_ENTRY_LEVEL_LB                         "SW_HID_INSERT_INDEX_ENTRY_LEVEL_LB"
 #define HID_BUSINESS_FMT_PAGE                                   "SW_HID_BUSINESS_FMT_PAGE"
 #define HID_BUSINESS_FMT_PAGE_CONT                              "SW_HID_BUSINESS_FMT_PAGE_CONT"
 #define HID_BUSINESS_FMT_PAGE_SHEET                             "SW_HID_BUSINESS_FMT_PAGE_SHEET"
diff --git a/sw/inc/index.hrc b/sw/inc/index.hrc
index 7797f65..51773bc 100644
--- a/sw/inc/index.hrc
+++ b/sw/inc/index.hrc
@@ -41,6 +41,9 @@
 #define  STR_FILE_NOT_FOUND     (RC_INDEX_BEGIN + 18)
 #define  DLG_CHANGE_AUTH_ENTRY  (RC_INDEX_BEGIN + 19)
 #define  STR_USER_DEFINED_INDEX (RC_INDEX_BEGIN + 20)
+#define  STR_NOSORTKEY          (RC_INDEX_BEGIN + 21)
+#define  STR_NO_CHAR_STYLE      (RC_INDEX_BEGIN + 22)
+#define  STR_DELIM              (RC_INDEX_BEGIN + 23)
 
 #endif  // _INDEX_HRC
 
diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx
index 55ccc26..f7a3c9b 100644
--- a/sw/source/ui/inc/swuicnttab.hxx
+++ b/sw/source/ui/inc/swuicnttab.hxx
@@ -291,9 +291,11 @@ class SwTokenWindow : public Window
     void        MoveControls(long nOffset);
 
 public:
-    SwTokenWindow(SwTOXEntryTabPage* pParent, const ResId& rResId);
+    SwTokenWindow(Window* pParent, const ResId& rResId);
     ~SwTokenWindow();
 
+    void SetTabPage(SwTOXEntryTabPage *pParent) { m_pParent = pParent; }
+
     void        SetForm(SwForm& rForm, sal_uInt16 nLevel);
     sal_uInt16      GetLastLevel()const {return nLevel;};
 
@@ -334,96 +336,83 @@ class SwIdxTreeListBox : public SvTreeListBox
 
     virtual void    RequestHelp( const HelpEvent& rHEvt );
 public:
-    SwIdxTreeListBox(SwTOXEntryTabPage* pPar, const ResId& rResId);
+    SwIdxTreeListBox(Window* pPar, WinBits nStyle);
+    void SetTabPage(SwTOXEntryTabPage* pPar) { pParent = pPar; }
 };
 
 class SwTOXEntryTabPage : public SfxTabPage
 {
-    FixedText           aLevelFT;
-    SwIdxTreeListBox    aLevelLB;
-
-    FixedLine       aEntryFL;
-    FixedText       aTokenFT;
-    SwTokenWindow   aTokenWIN;
-    PushButton      aAllLevelsPB;
-
-    PushButton      aEntryNoPB;
-    PushButton      aEntryPB;
-    PushButton      aTabPB;
-    PushButton      aChapterInfoPB;
-    PushButton      aPageNoPB;
-    PushButton      aHyperLinkPB;
-
-    ListBox         aAuthFieldsLB;
-    PushButton      aAuthInsertPB;
-    PushButton      aAuthRemovePB;
-
-    FixedText       aCharStyleFT;
-    ListBox         aCharStyleLB;       // character style of the current token
-    PushButton      aEditStylePB;
-
-    FixedText       aChapterEntryFT;
-    ListBox         aChapterEntryLB;    // type of chapter info
-
-    FixedText       aNumberFormatFT;
-    ListBox         aNumberFormatLB;    //!< format for numbering (E#)
-
-    FixedText       aEntryOutlineLevelFT;    //!< Fixed text, for i53420
-    NumericField    aEntryOutlineLevelNF;   //!< level to evaluate outline level to, for i53420
-    FixedText       aFillCharFT;
-    ComboBox        aFillCharCB;        // fill char for tab stop
-    FixedText       aTabPosFT;
-    MetricField     aTabPosMF;          // tab stop position
-    CheckBox        aAutoRightCB;
-    FixedLine       aFormatFL;
-
-    CheckBox        aRelToStyleCB;      // position relative to the right margin of the para style
-    FixedText       aMainEntryStyleFT;
-    ListBox         aMainEntryStyleLB;  // character style of main entries in indexes
-    CheckBox        aAlphaDelimCB;
-    CheckBox        aCommaSeparatedCB;
-
-    RadioButton     aSortDocPosRB;
-    RadioButton     aSortContentRB;
-    FixedLine       aSortingFL;
-
-    FixedText           aFirstKeyFT;
-    ListBox             aFirstKeyLB;
-    ImageRadioButton    aFirstSortUpRB;
-    ImageRadioButton    aFirstSortDownRB;
-
-    FixedText           aSecondKeyFT;
-    ListBox             aSecondKeyLB;
-    ImageRadioButton    aSecondSortUpRB;
-    ImageRadioButton    aSecondSortDownRB;
-
-    FixedText           aThirdKeyFT;
-    ListBox             aThirdKeyLB;
-    ImageRadioButton    aThirdSortUpRB;
-    ImageRadioButton    aThirdSortDownRB;
-
-    FixedLine       aSortKeyFL;
-
-    String          sDelimStr;
-    String          sLevelStr;
-    String          sAuthTypeStr;
-
-    String          sNoCharStyle;
-    String          sNoCharSortKey;
-    Point           aButtonPositions[5];
-    SwForm*         m_pCurrentForm;
+    FixedText*          m_pLevelFT;
+    SwIdxTreeListBox*   m_pLevelLB;
 
-    Point           aRelToStylePos;
-    Point           aRelToStyleIdxPos;
-    Size            aLevelFLSize;
+    SwTokenWindow*  m_pTokenWIN;
 
-    CurTOXType      aLastTOXType;
-    sal_Bool            bInLevelHdl;
+    PushButton*     m_pAllLevelsPB;
+
+    PushButton*     m_pEntryNoPB;
+    PushButton*     m_pEntryPB;
+    PushButton*     m_pTabPB;
+    PushButton*     m_pChapterInfoPB;
+    PushButton*     m_pPageNoPB;
+    PushButton*     m_pHyperLinkPB;
+
+    ListBox*        m_pAuthFieldsLB;
+    PushButton*     m_pAuthInsertPB;
+    PushButton*     m_pAuthRemovePB;
+
+    ListBox*        m_pCharStyleLB;       // character style of the current token
+    PushButton*     m_pEditStylePB;
+
+    FixedText*      m_pChapterEntryFT;
+    ListBox*        m_pChapterEntryLB;    // type of chapter info
+
+    FixedText*      m_pNumberFormatFT;
+    ListBox*        m_pNumberFormatLB;    //!< format for numbering (E#)
+
+    FixedText*      m_pEntryOutlineLevelFT;    //!< Fixed text, for i53420
+    NumericField*   m_pEntryOutlineLevelNF;   //!< level to evaluate outline level to, for i53420
+
+    FixedText*      m_pFillCharFT;
+    ComboBox*       m_pFillCharCB;        // fill char for tab stop
 
-    Point           aChapterEntryFTPosition; //!< holds position of ChapterEntryFT control,
-                                             //to be used in moving the element among different tokens
-    Point           aEntryOutlineLevelFTPosition;//!< holds position ofrEntryOutlineLevelFT control
-    sal_Int32       nBiasToEntryPoint;
+    FixedText*      m_pTabPosFT;
+    MetricField*    m_pTabPosMF;          // tab stop position
+    CheckBox*       m_pAutoRightCB;
+
+    VclContainer*   m_pFormatFrame;
+    FixedText*      m_pMainEntryStyleFT;
+    ListBox*        m_pMainEntryStyleLB;  // character style of main entries in indexes
+    CheckBox*       m_pAlphaDelimCB;
+    CheckBox*       m_pCommaSeparatedCB;
+    CheckBox*       m_pRelToStyleCB;      // position relative to the right margin of the para style
+
+    VclContainer*   m_pSortingFrame;
+    RadioButton*    m_pSortDocPosRB;
+    RadioButton*    m_pSortContentRB;
+
+    VclContainer*   m_pSortKeyFrame;
+    ListBox*        m_pFirstKeyLB;
+    RadioButton*    m_pFirstSortUpRB;
+    RadioButton*    m_pFirstSortDownRB;
+
+    ListBox*        m_pSecondKeyLB;
+    RadioButton*    m_pSecondSortUpRB;
+    RadioButton*    m_pSecondSortDownRB;
+
+    ListBox*        m_pThirdKeyLB;
+    RadioButton*    m_pThirdSortUpRB;
+    RadioButton*    m_pThirdSortDownRB;
+
+    OUString        sDelimStr;
+    OUString        sLevelStr;
+    OUString        sAuthTypeStr;
+
+    OUString        sNoCharStyle;
+    OUString        sNoCharSortKey;
+    SwForm*         m_pCurrentForm;
+
+    CurTOXType      aLastTOXType;
+    bool            bInLevelHdl;
 
     DECL_LINK(StyleSelectHdl, ListBox*);
     DECL_LINK(EditStyleHdl, PushButton*);
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index cfae291..b9a0215 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1765,12 +1765,21 @@ void    SwTOXButton::RequestHelp( const HelpEvent& rHEvt )
         Button::RequestHelp(rHEvt);
 }
 
-SwIdxTreeListBox::SwIdxTreeListBox(SwTOXEntryTabPage* pPar, const ResId& rResId) :
-        SvTreeListBox(pPar, rResId),
-        pParent(pPar)
+SwIdxTreeListBox::SwIdxTreeListBox(Window* pPar, WinBits nStyle)
+    : SvTreeListBox(pPar, nStyle)
+    , pParent(NULL)
 {
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSwIdxTreeListBox(Window *pParent, VclBuilder::stringmap &rMap)
+{
+    WinBits nWinStyle = WB_TABSTOP;
+    OString sBorder = VclBuilder::extractCustomProperty(rMap);
+    if (!sBorder.isEmpty())
+        nWinStyle |= WB_BORDER;
+    return new SwIdxTreeListBox(pParent, nWinStyle);
+}
+
 void    SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt )
 {
     if( rHEvt.GetMode() & HELPMODE_QUICK )
@@ -1809,194 +1818,157 @@ void    SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt )
         SvTreeListBox::RequestHelp(rHEvt);
 }
 
-SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet) :
-        SfxTabPage(pParent, SW_RES(TP_TOX_ENTRY), rAttrSet),
-    aLevelFT(this,              SW_RES(FT_LEVEL              )),
-    aLevelLB(this,              SW_RES(LB_LEVEL             )),
-    aEntryFL(this,              SW_RES(FL_ENTRY              )),
-
-    aTokenFT(this,              SW_RES(FT_TOKEN              )),
-    aTokenWIN(this,             SW_RES(WIN_TOKEN             )),
-    aAllLevelsPB(this,          SW_RES(PB_ALL_LEVELS            )),
-
-    aEntryNoPB(this,            SW_RES(PB_ENTRYNO            )),
-    aEntryPB(this,              SW_RES(PB_ENTRY             )),
-    aTabPB(this,                SW_RES(PB_TAB                )),
-    aChapterInfoPB(this,        SW_RES(PB_CHAPTERINFO        )),
-    aPageNoPB(this,             SW_RES(PB_PAGENO                )),
-    aHyperLinkPB(this,          SW_RES(PB_HYPERLINK         )),
-
-    aAuthFieldsLB(this,         SW_RES(LB_AUTHFIELD          )),
-    aAuthInsertPB(this,         SW_RES(PB_AUTHINSERT            )),
-    aAuthRemovePB(this,         SW_RES(PB_AUTHREMOVE            )),
-
-    aCharStyleFT(this,          SW_RES(FT_CHARSTYLE          )),
-    aCharStyleLB(this,          SW_RES(LB_CHARSTYLE         )),
-    aEditStylePB(this,          SW_RES(PB_EDITSTYLE         )),
-
-    aChapterEntryFT(this,       SW_RES(FT_CHAPTERENTRY       )),
-    aChapterEntryLB(this,       SW_RES(LB_CHAPTERENTRY       )),
-
-    aNumberFormatFT(this,       SW_RES(FT_ENTRY_NO           )),//i53420
-    aNumberFormatLB(this,       SW_RES(LB_ENTRY_NO           )),
-    aEntryOutlineLevelFT(this,  SW_RES(FT_LEVEL_OL           )),//i53420
-    aEntryOutlineLevelNF(this,  SW_RES(NF_LEVEL_OL           )),
-
-    aFillCharFT(this,           SW_RES(FT_FILLCHAR           )),
-    aFillCharCB(this,           SW_RES(CB_FILLCHAR          )),
-    aTabPosFT(this,             SW_RES(FT_TABPOS                )),
-    aTabPosMF(this,             SW_RES(MF_TABPOS                )),
-    aAutoRightCB(this,          SW_RES(CB_AUTORIGHT         )),
-    aFormatFL(this,             SW_RES(FL_FORMAT             )),
-
-
-    aRelToStyleCB(this,         SW_RES(CB_RELTOSTYLE         )),
-    aMainEntryStyleFT(this,     SW_RES(FT_MAIN_ENTRY_STYLE)),
-    aMainEntryStyleLB(this,     SW_RES(LB_MAIN_ENTRY_STYLE)),
-    aAlphaDelimCB(this,         SW_RES(CB_ALPHADELIM            )),
-    aCommaSeparatedCB(this,     SW_RES(CB_COMMASEPARATED        )),
-
-    aSortDocPosRB(this,         SW_RES(RB_DOCPOS                )),
-    aSortContentRB(this,        SW_RES(RB_SORTCONTENT       )),
-    aSortingFL(this,            SW_RES(FL_SORTING            )),
-
-    aFirstKeyFT(this,           SW_RES(FT_FIRSTKEY          )),
-    aFirstKeyLB(this,           SW_RES(LB_FIRSTKEY          )),
-    aFirstSortUpRB(this,        SW_RES(RB_SORTUP1            )),
-    aFirstSortDownRB(this,      SW_RES(RB_SORTDOWN1          )),
-
-    aSecondKeyFT(this,          SW_RES(FT_SECONDKEY          )),
-    aSecondKeyLB(this,          SW_RES(LB_SECONDKEY         )),
-    aSecondSortUpRB(this,       SW_RES(RB_SORTUP2            )),
-    aSecondSortDownRB(this,     SW_RES(RB_SORTDOWN2          )),
-
-    aThirdKeyFT(this,           SW_RES(FT_THIRDDKEY          )),
-    aThirdKeyLB(this,           SW_RES(LB_THIRDKEY           )),
-    aThirdSortUpRB(this,        SW_RES(RB_SORTUP3           )),
-    aThirdSortDownRB(this,      SW_RES(RB_SORTDOWN3          )),
-
-    aSortKeyFL(this,            SW_RES(FL_SORTKEY            )),
-
-    sDelimStr(                  SW_RES(STR_DELIM)),
-    sAuthTypeStr(               SW_RES(ST_AUTHTYPE)),
-
-    sNoCharStyle(               SW_RES(STR_NO_CHAR_STYLE)),
-    sNoCharSortKey(             SW_RES(STR_NOSORTKEY        )),
-    m_pCurrentForm(0),
-    bInLevelHdl(sal_False)
-{
-    aEditStylePB.SetAccessibleRelationMemberOf(&aEntryFL);
-    aHyperLinkPB.SetAccessibleRelationMemberOf(&aEntryFL);
-    aPageNoPB.SetAccessibleRelationMemberOf(&aEntryFL);
-    aTabPB.SetAccessibleRelationMemberOf(&aEntryFL);
-    aEntryPB.SetAccessibleRelationMemberOf(&aEntryFL);
-    aEntryNoPB.SetAccessibleRelationMemberOf(&aEntryFL);
-    aAllLevelsPB.SetAccessibleRelationMemberOf(&aEntryFL);
-    aTokenWIN.SetAccessibleRelationMemberOf(&aEntryFL);
-    aTokenWIN.SetAccessibleRelationLabeledBy(&aTokenFT);
-
-    FreeResource();
-
-    sLevelStr = aLevelFT.GetText();
-    aLevelLB.SetStyle( aLevelLB.GetStyle() | WB_HSCROLL );
-    aLevelLB.SetSpaceBetweenEntries(0);
-    aLevelLB.SetSelectionMode( SINGLE_SELECTION );
-    aLevelLB.SetHighlightRange();   // select full width
-    aLevelLB.SetHelpId(HID_INSERT_INDEX_ENTRY_LEVEL_LB);
-    aLevelLB.Show();
+SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet)
+    : SfxTabPage(pParent, "TocEntriesPage",
+        "modules/swriter/ui/tocentriespage.ui", rAttrSet)
+    , sDelimStr(SW_RESSTR(STR_DELIM))
+    , sNoCharStyle(SW_RESSTR(STR_NO_CHAR_STYLE))
+    , sNoCharSortKey(SW_RESSTR(STR_NOSORTKEY))
+    , m_pCurrentForm(0)
+    , bInLevelHdl(false)
+{
+    get(m_pLevelFT, "levelft");
+    sAuthTypeStr = get<FixedText>("typeft")->GetText();
+    get(m_pLevelLB, "level");
+    m_pLevelLB->SetTabPage(this);
+    get(m_pAllLevelsPB, "all");
+    get(m_pEntryNoPB, "chapterno");
+    get(m_pEntryPB, "entrytext");
+    get(m_pTabPB, "tabstop");
+    get(m_pChapterInfoPB, "chapterinfo");
+    get(m_pPageNoPB, "pageno");
+    get(m_pHyperLinkPB, "hyperlink");
+
+    get(m_pAuthFieldsLB, "authfield");
+    m_pAuthFieldsLB->SetStyle(m_pAuthFieldsLB->GetStyle() | WB_SORT);
+    get(m_pAuthInsertPB, "insert");
+    get(m_pAuthRemovePB, "remove");
+
+    get(m_pCharStyleLB, "charstyle");
+    get(m_pEditStylePB, "edit");
+
+    get(m_pChapterEntryFT, "chapterentryft");
+    get(m_pChapterEntryLB, "chapterentry");
+
+    get(m_pNumberFormatFT, "numberformatft");
+    get(m_pNumberFormatLB, "numberformat");
+
+    get(m_pEntryOutlineLevelFT, "entryoutlinelevelft");
+    get(m_pEntryOutlineLevelNF, "entryoutlinelevel");
+
+    get(m_pFillCharFT, "fillcharft");
+    get(m_pFillCharCB, "fillchar");
+
+    get(m_pTabPosFT, "tabstopposft");
+    get(m_pTabPosMF, "tabstoppos");
+    get(m_pAutoRightCB, "alignright");
+
+    get(m_pFormatFrame, "formatframe");
+    get(m_pRelToStyleCB, "reltostyle");
+    get(m_pMainEntryStyleFT, "mainstyleft");
+    get(m_pMainEntryStyleLB, "mainstyle");
+    get(m_pAlphaDelimCB, "alphadelim");
+    get(m_pCommaSeparatedCB, "commasep");
+
+    get(m_pSortingFrame, "sortingframe");
+    get(m_pSortDocPosRB, "sortpos");
+    get(m_pSortContentRB, "sortcontents");
+
+    get(m_pSortKeyFrame, "sortkeyframe");
+    get(m_pFirstKeyLB, "key1lb");
+    get(m_pSecondKeyLB, "key2lb");
+    get(m_pThirdKeyLB, "key3lb");
+    get(m_pFirstSortUpRB, "up1cb");
+    get(m_pSecondSortUpRB, "up2cb");
+    get(m_pThirdSortUpRB, "up3cb");
+    get(m_pFirstSortDownRB, "down1cb");
+    get(m_pSecondSortDownRB, "down2cb");
+    get(m_pThirdSortDownRB, "down3cb");
+
+    get(m_pTokenWIN, "token");
+    m_pTokenWIN->SetTabPage(this);
+
+    sLevelStr = m_pLevelFT->GetText();
+    m_pLevelLB->SetStyle( m_pLevelLB->GetStyle() | WB_HSCROLL );
+    m_pLevelLB->SetSpaceBetweenEntries(0);
+    m_pLevelLB->SetSelectionMode( SINGLE_SELECTION );
+    m_pLevelLB->SetHighlightRange();   // select full width
+    m_pLevelLB->Show();
 
     aLastTOXType.eType = (TOXTypes)USHRT_MAX;
     aLastTOXType.nIndex = 0;
-    aLevelFLSize = aLevelFT.GetSizePixel();
 
     SetExchangeSupport();
-    aEntryNoPB.SetClickHdl(LINK(this, SwTOXEntryTabPage, InsertTokenHdl));
-    aEntryPB.SetClickHdl(LINK(this, SwTOXEntryTabPage, InsertTokenHdl));
-    aChapterInfoPB.SetClickHdl(LINK(this, SwTOXEntryTabPage, InsertTokenHdl));
-    aPageNoPB.SetClickHdl(LINK(this, SwTOXEntryTabPage, InsertTokenHdl));
-    aTabPB.SetClickHdl(LINK(this, SwTOXEntryTabPage, InsertTokenHdl));
-    aHyperLinkPB.SetClickHdl(LINK(this, SwTOXEntryTabPage, InsertTokenHdl));
-    aEditStylePB.SetClickHdl(LINK(this, SwTOXEntryTabPage, EditStyleHdl));
-    aLevelLB.SetSelectHdl(LINK(this, SwTOXEntryTabPage, LevelHdl));
-    aTokenWIN.SetButtonSelectedHdl(LINK(this, SwTOXEntryTabPage, TokenSelectedHdl));
-    aTokenWIN.SetModifyHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
-    aCharStyleLB.SetSelectHdl(LINK(this, SwTOXEntryTabPage, StyleSelectHdl));
-    aCharStyleLB.InsertEntry(sNoCharStyle);
-    aChapterEntryLB.SetSelectHdl(LINK(this, SwTOXEntryTabPage, ChapterInfoHdl));
-    aEntryOutlineLevelNF.SetModifyHdl(LINK(this, SwTOXEntryTabPage, ChapterInfoOutlineHdl));
-    aNumberFormatLB.SetSelectHdl(LINK(this, SwTOXEntryTabPage, NumberFormatHdl));
-
-    aTabPosMF.SetModifyHdl(LINK(this, SwTOXEntryTabPage, TabPosHdl));
-    aFillCharCB.SetModifyHdl(LINK(this, SwTOXEntryTabPage, FillCharHdl));
-    aAutoRightCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, AutoRightHdl));
-    aAuthInsertPB.SetClickHdl(LINK(this, SwTOXEntryTabPage, RemoveInsertAuthHdl));
-    aAuthRemovePB.SetClickHdl(LINK(this, SwTOXEntryTabPage, RemoveInsertAuthHdl));
-    aSortDocPosRB.SetClickHdl(LINK(this, SwTOXEntryTabPage, SortKeyHdl));
-    aSortContentRB.SetClickHdl(LINK(this, SwTOXEntryTabPage, SortKeyHdl));
-    aAllLevelsPB.SetClickHdl(LINK(this, SwTOXEntryTabPage, AllLevelsHdl));
-
-    aAlphaDelimCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
-    aCommaSeparatedCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
-    aRelToStyleCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
+    m_pEntryNoPB->SetClickHdl(LINK(this, SwTOXEntryTabPage, InsertTokenHdl));
+    m_pEntryPB->SetClickHdl(LINK(this, SwTOXEntryTabPage, InsertTokenHdl));
+    m_pChapterInfoPB->SetClickHdl(LINK(this, SwTOXEntryTabPage, InsertTokenHdl));
+    m_pPageNoPB->SetClickHdl(LINK(this, SwTOXEntryTabPage, InsertTokenHdl));
+    m_pTabPB->SetClickHdl(LINK(this, SwTOXEntryTabPage, InsertTokenHdl));
+    m_pHyperLinkPB->SetClickHdl(LINK(this, SwTOXEntryTabPage, InsertTokenHdl));
+    m_pEditStylePB->SetClickHdl(LINK(this, SwTOXEntryTabPage, EditStyleHdl));
+    m_pLevelLB->SetSelectHdl(LINK(this, SwTOXEntryTabPage, LevelHdl));
+    m_pTokenWIN->SetButtonSelectedHdl(LINK(this, SwTOXEntryTabPage, TokenSelectedHdl));
+    m_pTokenWIN->SetModifyHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
+    m_pCharStyleLB->SetSelectHdl(LINK(this, SwTOXEntryTabPage, StyleSelectHdl));
+    m_pCharStyleLB->InsertEntry(sNoCharStyle);
+    m_pChapterEntryLB->SetSelectHdl(LINK(this, SwTOXEntryTabPage, ChapterInfoHdl));
+    m_pEntryOutlineLevelNF->SetModifyHdl(LINK(this, SwTOXEntryTabPage, ChapterInfoOutlineHdl));
+    m_pNumberFormatLB->SetSelectHdl(LINK(this, SwTOXEntryTabPage, NumberFormatHdl));
+
+    m_pTabPosMF->SetModifyHdl(LINK(this, SwTOXEntryTabPage, TabPosHdl));
+    m_pFillCharCB->SetModifyHdl(LINK(this, SwTOXEntryTabPage, FillCharHdl));
+    m_pAutoRightCB->SetClickHdl(LINK(this, SwTOXEntryTabPage, AutoRightHdl));
+    m_pAuthInsertPB->SetClickHdl(LINK(this, SwTOXEntryTabPage, RemoveInsertAuthHdl));
+    m_pAuthRemovePB->SetClickHdl(LINK(this, SwTOXEntryTabPage, RemoveInsertAuthHdl));
+    m_pSortDocPosRB->SetClickHdl(LINK(this, SwTOXEntryTabPage, SortKeyHdl));
+    m_pSortContentRB->SetClickHdl(LINK(this, SwTOXEntryTabPage, SortKeyHdl));
+    m_pAllLevelsPB->SetClickHdl(LINK(this, SwTOXEntryTabPage, AllLevelsHdl));
+
+    m_pAlphaDelimCB->SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
+    m_pCommaSeparatedCB->SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
+    m_pRelToStyleCB->SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
 
     FieldUnit aMetric = ::GetDfltMetric(sal_False);
-    SetMetric(aTabPosMF, aMetric);
-
-    aSortDocPosRB.Check();
-
-    aFillCharCB.SetMaxTextLen(1);
-    aFillCharCB.InsertEntry(OUString(' '));
-    aFillCharCB.InsertEntry(OUString('.'));
-    aFillCharCB.InsertEntry(OUString('-'));
-    aFillCharCB.InsertEntry(OUString('_'));
-
-    aButtonPositions[0] = aEntryNoPB.GetPosPixel();
-    aButtonPositions[1] = aEntryPB.GetPosPixel();
-    aButtonPositions[2] = aChapterInfoPB.GetPosPixel();
-    aButtonPositions[3] = aPageNoPB.GetPosPixel();
-    aButtonPositions[4] = aTabPB.GetPosPixel();
-
-    aRelToStylePos = aRelToStyleCB.GetPosPixel();
-    aRelToStyleIdxPos = aCommaSeparatedCB.GetPosPixel();
-    aRelToStyleIdxPos.Y() +=
-        (aRelToStyleIdxPos.Y() - aAlphaDelimCB.GetPosPixel().Y());
-    aEditStylePB.Enable(sal_False);
-
-    //get position for Numbering and other stuff
-    aChapterEntryFTPosition = aChapterEntryFT.GetPosPixel();
-    aEntryOutlineLevelFTPosition = aEntryOutlineLevelFT.GetPosPixel();
-    nBiasToEntryPoint = aEntryOutlineLevelNF.GetPosPixel().X() -
-                               aEntryOutlineLevelFT.GetPosPixel().X();
+    SetMetric(*m_pTabPosMF, aMetric);
+
+    m_pSortDocPosRB->Check();
+
+    m_pFillCharCB->SetMaxTextLen(1);
+    m_pFillCharCB->InsertEntry(OUString(' '));
+    m_pFillCharCB->InsertEntry(OUString('.'));
+    m_pFillCharCB->InsertEntry(OUString('-'));
+    m_pFillCharCB->InsertEntry(OUString('_'));
+
+    m_pEditStylePB->Enable(sal_False);
 
     //fill the types in
-    sal_uInt16 i;
-    for( i = 0; i < AUTH_FIELD_END; i++)
+    for (sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i)
     {
         String sTmp(SW_RES(STR_AUTH_FIELD_START + i));
-        sal_uInt16 nPos = aAuthFieldsLB.InsertEntry(sTmp);
-        aAuthFieldsLB.SetEntryData(nPos, reinterpret_cast< void * >(sal::static_int_cast< sal_uIntPtr >(i)));
-    }
-    sal_uInt16 nPos = aFirstKeyLB.InsertEntry(sNoCharSortKey);
-    aFirstKeyLB.SetEntryData(nPos, reinterpret_cast< void * >(sal::static_int_cast< sal_uIntPtr >(USHRT_MAX)));
-    nPos = aSecondKeyLB.InsertEntry(sNoCharSortKey);
-    aSecondKeyLB.SetEntryData(nPos, reinterpret_cast< void * >(sal::static_int_cast< sal_uIntPtr >(USHRT_MAX)));
-    nPos = aThirdKeyLB.InsertEntry(sNoCharSortKey);
-    aThirdKeyLB.SetEntryData(nPos, reinterpret_cast< void * >(sal::static_int_cast< sal_uIntPtr >(USHRT_MAX)));
-
-    for( i = 0; i < AUTH_FIELD_END; i++)
-    {
-        String sTmp(aAuthFieldsLB.GetEntry(i));
-        void* pEntryData = aAuthFieldsLB.GetEntryData(i);
-        nPos = aFirstKeyLB.InsertEntry(sTmp);
-        aFirstKeyLB.SetEntryData(nPos, pEntryData);
-        nPos = aSecondKeyLB.InsertEntry(sTmp);
-        aSecondKeyLB.SetEntryData(nPos, pEntryData);
-        nPos = aThirdKeyLB.InsertEntry(sTmp);
-        aThirdKeyLB.SetEntryData(nPos, pEntryData);
-    }
-    aFirstKeyLB.SelectEntryPos(0);
-    aSecondKeyLB.SelectEntryPos(0);
-    aThirdKeyLB.SelectEntryPos(0);
+        sal_uInt16 nPos = m_pAuthFieldsLB->InsertEntry(sTmp);
+        m_pAuthFieldsLB->SetEntryData(nPos, reinterpret_cast< void * >(sal::static_int_cast< sal_uIntPtr >(i)));
+    }
+    sal_uInt16 nPos = m_pFirstKeyLB->InsertEntry(sNoCharSortKey);
+    m_pFirstKeyLB->SetEntryData(nPos, reinterpret_cast< void * >(sal::static_int_cast< sal_uIntPtr >(USHRT_MAX)));
+    nPos = m_pSecondKeyLB->InsertEntry(sNoCharSortKey);
+    m_pSecondKeyLB->SetEntryData(nPos, reinterpret_cast< void * >(sal::static_int_cast< sal_uIntPtr >(USHRT_MAX)));
+    nPos = m_pThirdKeyLB->InsertEntry(sNoCharSortKey);
+    m_pThirdKeyLB->SetEntryData(nPos, reinterpret_cast< void * >(sal::static_int_cast< sal_uIntPtr >(USHRT_MAX)));
+
+    for (sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i)
+    {
+        String sTmp(m_pAuthFieldsLB->GetEntry(i));
+        void* pEntryData = m_pAuthFieldsLB->GetEntryData(i);
+        nPos = m_pFirstKeyLB->InsertEntry(sTmp);
+        m_pFirstKeyLB->SetEntryData(nPos, pEntryData);
+        nPos = m_pSecondKeyLB->InsertEntry(sTmp);
+        m_pSecondKeyLB->SetEntryData(nPos, pEntryData);
+        nPos = m_pThirdKeyLB->InsertEntry(sTmp);
+        m_pThirdKeyLB->SetEntryData(nPos, pEntryData);
+    }
+    m_pFirstKeyLB->SelectEntryPos(0);
+    m_pSecondKeyLB->SelectEntryPos(0);
+    m_pThirdKeyLB->SelectEntryPos(0);
 }
 /* --------------------------------------------------
     pVoid is used as signal to change all levels of the example
@@ -2008,7 +1980,7 @@ IMPL_LINK(SwTOXEntryTabPage, ModifyHdl, void*, pVoid)
 
     if(pTOXDlg)
     {
-        sal_uInt16 nCurLevel = static_cast< sal_uInt16 >(aLevelLB.GetModel()->GetAbsPos(aLevelLB.FirstSelected()) + 1);
+        sal_uInt16 nCurLevel = static_cast< sal_uInt16 >(m_pLevelLB->GetModel()->GetAbsPos(m_pLevelLB->FirstSelected()) + 1);
         if(aLastTOXType.eType == TOX_CONTENT && pVoid)
             nCurLevel = USHRT_MAX;
         pTOXDlg->CreateOrUpdateExample(
@@ -2039,31 +2011,17 @@ void SwTOXEntryTabPage::Reset( const SfxItemSet& )
         if(sMainEntryCharStyle.Len())
         {
             if( LISTBOX_ENTRY_NOTFOUND ==
-                    aMainEntryStyleLB.GetEntryPos(sMainEntryCharStyle))
-                aMainEntryStyleLB.InsertEntry(
+                    m_pMainEntryStyleLB->GetEntryPos(sMainEntryCharStyle))
+                m_pMainEntryStyleLB->InsertEntry(
                         sMainEntryCharStyle);
-            aMainEntryStyleLB.SelectEntry(sMainEntryCharStyle);
+            m_pMainEntryStyleLB->SelectEntry(sMainEntryCharStyle);
         }
         else
-            aMainEntryStyleLB.SelectEntry(sNoCharStyle);
-        aAlphaDelimCB.Check( 0 != (rDesc.GetIndexOptions() & nsSwTOIOptions::TOI_ALPHA_DELIMITTER) );
+            m_pMainEntryStyleLB->SelectEntry(sNoCharStyle);
+        m_pAlphaDelimCB->Check( 0 != (rDesc.GetIndexOptions() & nsSwTOIOptions::TOI_ALPHA_DELIMITTER) );
     }
-    aRelToStyleCB.Check(m_pCurrentForm->IsRelTabPos());
-    aCommaSeparatedCB.Check(m_pCurrentForm->IsCommaSeparated());
-}
-
-static void lcl_ChgWidth(Window& rWin, long nDiff)
-{
- Size aTempSz(rWin.GetSizePixel());
-    aTempSz.Width() += nDiff;
-    rWin.SetSizePixel(aTempSz);
-}
-
-static void lcl_ChgXPos(Window& rWin, long nDiff)
-{
-    Point aTempPos(rWin.GetPosPixel());
-    aTempPos.X() += nDiff;
-    rWin.SetPosPixel(aTempPos);
+    m_pRelToStyleCB->Check(m_pCurrentForm->IsRelTabPos());
+    m_pCommaSeparatedCB->Check(m_pCurrentForm->IsCommaSeparated());
 }
 
 void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/)
@@ -2079,21 +2037,21 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/)
         sal_Bool bToxIsContent =     TOX_CONTENT == aCurType.eType;
         sal_Bool bToxIsSequence =    TOX_ILLUSTRATIONS == aCurType.eType;
 
-        aLevelLB.Clear();
+        m_pLevelLB->Clear();
         for(sal_uInt16 i = 1; i < m_pCurrentForm->GetFormMax(); i++)
         {
             if(bToxIsAuthorities)
-                aLevelLB.InsertEntry( SwAuthorityFieldType::GetAuthTypeName(
+                m_pLevelLB->InsertEntry( SwAuthorityFieldType::GetAuthTypeName(
                                             (ToxAuthorityType) (i - 1)) );
             else if( bToxIsIndex )
             {
                 if(i == 1)
-                    aLevelLB.InsertEntry( sDelimStr );
+                    m_pLevelLB->InsertEntry( sDelimStr );
                 else
-                    aLevelLB.InsertEntry( OUString::number(i - 1) );
+                    m_pLevelLB->InsertEntry( OUString::number(i - 1) );
             }
             else
-                aLevelLB.InsertEntry(OUString::number(i));
+                m_pLevelLB->InsertEntry(OUString::number(i));
         }
         if(bToxIsAuthorities)
         {
@@ -2104,151 +2062,74 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/)
             if(pFType)
             {
                 if(pFType->IsSortByDocument())
-                    aSortDocPosRB.Check();
+                    m_pSortDocPosRB->Check();
                 else
                 {
-                    aSortContentRB.Check();
+                    m_pSortContentRB->Check();
                     sal_uInt16 nKeyCount = pFType->GetSortKeyCount();
                     if(0 < nKeyCount)
                     {
                         const SwTOXSortKey* pKey = pFType->GetSortKey(0);
-                        aFirstKeyLB.SelectEntryPos(
-                            aFirstKeyLB.GetEntryPos((void*)(sal_uIntPtr)pKey->eField));
-                        aFirstSortUpRB.Check(pKey->bSortAscending);
-                        aFirstSortDownRB.Check(!pKey->bSortAscending);
+                        m_pFirstKeyLB->SelectEntryPos(
+                            m_pFirstKeyLB->GetEntryPos((void*)(sal_uIntPtr)pKey->eField));
+                        m_pFirstSortUpRB->Check(pKey->bSortAscending);
+                        m_pFirstSortDownRB->Check(!pKey->bSortAscending);
                     }
                     if(1 < nKeyCount)
                     {
                         const SwTOXSortKey* pKey = pFType->GetSortKey(1);
-                        aSecondKeyLB.SelectEntryPos(
-                            aSecondKeyLB.GetEntryPos((void*)(sal_uIntPtr)pKey->eField));
-                        aSecondSortUpRB.Check(pKey->bSortAscending);
-                        aSecondSortDownRB.Check(!pKey->bSortAscending);
+                        m_pSecondKeyLB->SelectEntryPos(
+                            m_pSecondKeyLB->GetEntryPos((void*)(sal_uIntPtr)pKey->eField));
+                        m_pSecondSortUpRB->Check(pKey->bSortAscending);
+                        m_pSecondSortDownRB->Check(!pKey->bSortAscending);
                     }
                     if(2 < nKeyCount)
                     {
                         const SwTOXSortKey* pKey = pFType->GetSortKey(2);
-                        aThirdKeyLB.SelectEntryPos(
-                            aThirdKeyLB.GetEntryPos((void*)(sal_uIntPtr)pKey->eField));
-                        aThirdSortUpRB.Check(pKey->bSortAscending);
-                        aThirdSortDownRB.Check(!pKey->bSortAscending);
+                        m_pThirdKeyLB->SelectEntryPos(
+                            m_pThirdKeyLB->GetEntryPos((void*)(sal_uIntPtr)pKey->eField));
+                        m_pThirdSortUpRB->Check(pKey->bSortAscending);
+                        m_pThirdSortDownRB->Check(!pKey->bSortAscending);
                     }
                 }
             }
-            SortKeyHdl(aSortDocPosRB.IsChecked() ? &aSortDocPosRB : &aSortContentRB);
-            aLevelFT.SetText(sAuthTypeStr);
+            SortKeyHdl(m_pSortDocPosRB->IsChecked() ? m_pSortDocPosRB : m_pSortContentRB);
+            m_pLevelFT->SetText(sAuthTypeStr);
         }
         else
-            aLevelFT.SetText(sLevelStr);
-
-        long nDiff = 0;
-        if( bToxIsAuthorities ? aLevelFT.GetSizePixel() == aLevelFLSize
-                              : aLevelFT.GetSizePixel() != aLevelFLSize )
-        {
-            nDiff = aLevelFLSize.Width();
-            if( !bToxIsAuthorities )
-                nDiff *= -1;
-        }
+            m_pLevelFT->SetText(sLevelStr);
 
-        if(nDiff)
-        {
-            lcl_ChgWidth(aLevelFT, nDiff);
-            lcl_ChgWidth(aLevelLB, nDiff);
-            lcl_ChgXPos(aCharStyleFT, nDiff);
-            lcl_ChgXPos(aCharStyleLB, nDiff);
-            lcl_ChgWidth(aCharStyleLB, -nDiff);
-            lcl_ChgXPos(aFillCharFT,  nDiff);
-            lcl_ChgXPos(aFillCharCB,  nDiff);
-            lcl_ChgXPos(aTabPosFT,   nDiff);
-            lcl_ChgXPos(aTabPosMF,   nDiff);
-            lcl_ChgXPos(aAutoRightCB, nDiff);
-            lcl_ChgXPos(aAuthFieldsLB,   nDiff);
-            lcl_ChgXPos(aAuthInsertPB,   nDiff);
-            lcl_ChgXPos(aAuthRemovePB,   nDiff);
-            lcl_ChgXPos(aTokenFT, nDiff);
-            lcl_ChgXPos(aTokenWIN,   nDiff);
-            lcl_ChgWidth(aTokenWIN, -nDiff);
-            lcl_ChgXPos(aSortDocPosRB,   nDiff);
-            lcl_ChgXPos(aSortContentRB,      nDiff);
-            lcl_ChgXPos(aFormatFL,  nDiff);
-            lcl_ChgWidth(aFormatFL,     -nDiff);
-            lcl_ChgXPos(aSortingFL, nDiff);
-            lcl_ChgWidth(aSortingFL,    -nDiff);
-            lcl_ChgXPos(aEntryFL,   nDiff);
-            lcl_ChgWidth(aEntryFL,  -nDiff);
-
-            lcl_ChgXPos(aFirstKeyFT, nDiff);
-            lcl_ChgXPos(aFirstKeyLB, nDiff);
-            lcl_ChgXPos(aSecondKeyFT, nDiff);
-            lcl_ChgXPos(aSecondKeyLB, nDiff);
-            lcl_ChgXPos(aThirdKeyFT, nDiff);
-            lcl_ChgXPos(aThirdKeyLB, nDiff);
-            lcl_ChgXPos(aSortKeyFL,     nDiff);
-
-            lcl_ChgWidth(aFirstKeyLB, -nDiff);
-            lcl_ChgWidth(aSecondKeyLB, -nDiff);
-            lcl_ChgWidth(aThirdKeyLB, -nDiff);
-            lcl_ChgWidth(aSortKeyFL, -nDiff);
-        }
-        Link aLink = aLevelLB.GetSelectHdl();
-        aLevelLB.SetSelectHdl(Link());
-        aLevelLB.Select( aLevelLB.GetEntry( bToxIsIndex ? 1 : 0 ) );
-        aLevelLB.SetSelectHdl(aLink);
-
-        // sort token buttons
-        aEntryNoPB.SetPosPixel(aButtonPositions[0]);
-        aEntryPB.SetPosPixel(aButtonPositions[ bToxIsContent ? 1 : 0]);
-        aChapterInfoPB.SetPosPixel(aButtonPositions[2]);
-        aPageNoPB.SetPosPixel(aButtonPositions[3]);
-        sal_uInt16 nBtPos = 1;
-        if( bToxIsContent )
-            nBtPos = 2;
-        else if( bToxIsAuthorities )
-            nBtPos = 4;
-        aTabPB.SetPosPixel(aButtonPositions[nBtPos]);
-        aHyperLinkPB.SetPosPixel(aButtonPositions[4]);
+        Link aLink = m_pLevelLB->GetSelectHdl();
+        m_pLevelLB->SetSelectHdl(Link());
+        m_pLevelLB->Select( m_pLevelLB->GetEntry( bToxIsIndex ? 1 : 0 ) );
+        m_pLevelLB->SetSelectHdl(aLink);
 
         //show or hide controls
-        aEntryNoPB.Show(        bToxIsContent );
-        aHyperLinkPB.Show(      bToxIsContent || bToxIsSequence );
-        aRelToStyleCB.Show(    !bToxIsAuthorities );
-        aChapterInfoPB.Show(    !bToxIsContent && !bToxIsAuthorities);
-        aEntryPB.Show(         !bToxIsAuthorities );
-        aPageNoPB.Show(        !bToxIsAuthorities );
-        aAuthFieldsLB.Show(     bToxIsAuthorities );
-        aAuthInsertPB.Show(     bToxIsAuthorities );
-        aAuthRemovePB.Show(     bToxIsAuthorities );
-        aFormatFL.Show(        !bToxIsAuthorities );
-        aSortDocPosRB.Show(     bToxIsAuthorities );
-        aSortContentRB.Show(    bToxIsAuthorities );
-        aSortingFL.Show(        bToxIsAuthorities );
-        aFirstKeyFT.Show(       bToxIsAuthorities );
-        aFirstKeyLB.Show(       bToxIsAuthorities );
-        aSecondKeyFT.Show(      bToxIsAuthorities );
-        aSecondKeyLB.Show(      bToxIsAuthorities );
-        aThirdKeyFT.Show(       bToxIsAuthorities );
-        aThirdKeyLB.Show(       bToxIsAuthorities );
-        aSortKeyFL.Show(        bToxIsAuthorities );
-        aFirstSortUpRB.Show(    bToxIsAuthorities );
-        aFirstSortDownRB.Show(  bToxIsAuthorities );
-        aSecondSortUpRB.Show(   bToxIsAuthorities );
-        aSecondSortDownRB.Show( bToxIsAuthorities );
-        aThirdSortUpRB.Show(    bToxIsAuthorities );
-        aThirdSortDownRB.Show(  bToxIsAuthorities );
-
-        aRelToStyleCB.SetPosPixel( bToxIsIndex ? aRelToStyleIdxPos
-                                               : aRelToStylePos );
-
-        aMainEntryStyleFT.Show( bToxIsIndex );
-        aMainEntryStyleLB.Show( bToxIsIndex );
-        aAlphaDelimCB.Show(     bToxIsIndex );
-        aCommaSeparatedCB.Show( bToxIsIndex );
+        m_pEntryNoPB->Show(bToxIsContent);
+        m_pHyperLinkPB->Show(bToxIsContent || bToxIsSequence);
+        m_pRelToStyleCB->Show(!bToxIsAuthorities);
+        m_pChapterInfoPB->Show(!bToxIsContent && !bToxIsAuthorities);
+        m_pEntryPB->Show(!bToxIsAuthorities);
+        m_pPageNoPB->Show(!bToxIsAuthorities);
+        m_pAuthFieldsLB->Show(bToxIsAuthorities);
+        m_pAuthInsertPB->Show(bToxIsAuthorities);
+        m_pAuthRemovePB->Show(bToxIsAuthorities);
+
+        m_pFormatFrame->Show(!bToxIsAuthorities);
+
+        m_pSortingFrame->Show(bToxIsAuthorities);
+        m_pSortKeyFrame->Show(bToxIsAuthorities);
+
+        m_pMainEntryStyleFT->Show(bToxIsIndex);
+        m_pMainEntryStyleLB->Show(bToxIsIndex);
+        m_pAlphaDelimCB->Show(bToxIsIndex);
+        m_pCommaSeparatedCB->Show(bToxIsIndex);
     }
     aLastTOXType = aCurType;
 
     //invalidate PatternWindow
-    aTokenWIN.SetInvalid();
-    LevelHdl(&aLevelLB);
+    m_pTokenWIN->SetInvalid();
+    LevelHdl(m_pLevelLB);
 }
 
 void SwTOXEntryTabPage::UpdateDescriptor()
@@ -2258,37 +2139,37 @@ void SwTOXEntryTabPage::UpdateDescriptor()
     SwTOXDescription& rDesc = pTOXDlg->GetTOXDescription(aLastTOXType);
     if(TOX_INDEX == aLastTOXType.eType)
     {
-        String sTemp(aMainEntryStyleLB.GetSelectEntry());
+        String sTemp(m_pMainEntryStyleLB->GetSelectEntry());
         rDesc.SetMainEntryCharStyle(sNoCharStyle == sTemp ? aEmptyStr : sTemp);
         sal_uInt16 nIdxOptions = rDesc.GetIndexOptions() & ~nsSwTOIOptions::TOI_ALPHA_DELIMITTER;
-        if(aAlphaDelimCB.IsChecked())
+        if(m_pAlphaDelimCB->IsChecked())
             nIdxOptions |= nsSwTOIOptions::TOI_ALPHA_DELIMITTER;
         rDesc.SetIndexOptions(nIdxOptions);
     }
     else if(TOX_AUTHORITIES == aLastTOXType.eType)
     {
-        rDesc.SetSortByDocument(aSortDocPosRB.IsChecked());
+        rDesc.SetSortByDocument(m_pSortDocPosRB->IsChecked());
         SwTOXSortKey aKey1, aKey2, aKey3;
-        aKey1.eField = (ToxAuthorityField)(sal_uIntPtr)aFirstKeyLB.GetEntryData(
-                                    aFirstKeyLB.GetSelectEntryPos());
-        aKey1.bSortAscending = aFirstSortUpRB.IsChecked();
-        aKey2.eField = (ToxAuthorityField)(sal_uIntPtr)aSecondKeyLB.GetEntryData(
-                                    aSecondKeyLB.GetSelectEntryPos());
-        aKey2.bSortAscending = aSecondSortUpRB.IsChecked();
-        aKey3.eField = (ToxAuthorityField)(sal_uIntPtr)aThirdKeyLB.GetEntryData(
-                                aThirdKeyLB.GetSelectEntryPos());
-        aKey3.bSortAscending = aThirdSortUpRB.IsChecked();
+        aKey1.eField = (ToxAuthorityField)(sal_uIntPtr)m_pFirstKeyLB->GetEntryData(
+                                    m_pFirstKeyLB->GetSelectEntryPos());
+        aKey1.bSortAscending = m_pFirstSortUpRB->IsChecked();
+        aKey2.eField = (ToxAuthorityField)(sal_uIntPtr)m_pSecondKeyLB->GetEntryData(
+                                    m_pSecondKeyLB->GetSelectEntryPos());
+        aKey2.bSortAscending = m_pSecondSortUpRB->IsChecked();
+        aKey3.eField = (ToxAuthorityField)(sal_uIntPtr)m_pThirdKeyLB->GetEntryData(
+                                m_pThirdKeyLB->GetSelectEntryPos());
+        aKey3.bSortAscending = m_pThirdSortUpRB->IsChecked();
 
 
         rDesc.SetSortKeys(aKey1, aKey2, aKey3);
     }
     SwForm* pCurrentForm = pTOXDlg->GetForm(aLastTOXType);
-    if(aRelToStyleCB.IsVisible())
+    if(m_pRelToStyleCB->IsVisible())
     {
-        pCurrentForm->SetRelTabPos(aRelToStyleCB.IsChecked());
+        pCurrentForm->SetRelTabPos(m_pRelToStyleCB->IsChecked());
     }
-    if(aCommaSeparatedCB.IsVisible())
-        pCurrentForm->SetCommaSeparated(aCommaSeparatedCB.IsChecked());
+    if(m_pCommaSeparatedCB->IsVisible())
+        pCurrentForm->SetCommaSeparated(m_pCommaSeparatedCB->IsChecked());
 }
 
 int SwTOXEntryTabPage::DeactivatePage( SfxItemSet* /*pSet*/)
@@ -2304,9 +2185,9 @@ SfxTabPage* SwTOXEntryTabPage::Create( Window* pParent,     const SfxItemSet& rA
 
 IMPL_LINK(SwTOXEntryTabPage, EditStyleHdl, PushButton*, pBtn)
 {
-    if( LISTBOX_ENTRY_NOTFOUND != aCharStyleLB.GetSelectEntryPos())
+    if( LISTBOX_ENTRY_NOTFOUND != m_pCharStyleLB->GetSelectEntryPos())
     {
-        SfxStringItem aStyle(SID_STYLE_EDIT, aCharStyleLB.GetSelectEntry());
+        SfxStringItem aStyle(SID_STYLE_EDIT, m_pCharStyleLB->GetSelectEntry());
         SfxUInt16Item aFamily(SID_STYLE_FAMILY, SFX_STYLE_FAMILY_CHAR);
         // TODO: WrtShell?
 //      SwPtrItem aShell(FN_PARAM_WRTSHELL, pWrtShell);
@@ -2323,27 +2204,27 @@ IMPL_LINK(SwTOXEntryTabPage, EditStyleHdl, PushButton*, pBtn)
 
 IMPL_LINK(SwTOXEntryTabPage, RemoveInsertAuthHdl, PushButton*, pButton)
 {
-    bool bInsert = pButton == &aAuthInsertPB;
+    bool bInsert = pButton == m_pAuthInsertPB;
     if(bInsert)
     {
-        sal_uInt16 nSelPos = aAuthFieldsLB.GetSelectEntryPos();
-        String sToInsert(aAuthFieldsLB.GetSelectEntry());
+        sal_uInt16 nSelPos = m_pAuthFieldsLB->GetSelectEntryPos();
+        String sToInsert(m_pAuthFieldsLB->GetSelectEntry());
         SwFormToken aInsert(TOKEN_AUTHORITY);
-        aInsert.nAuthorityField = (sal_uInt16)(sal_uIntPtr)aAuthFieldsLB.GetEntryData(nSelPos);
-        aTokenWIN.InsertAtSelection(SwForm::GetFormAuth(), aInsert);
-        aAuthFieldsLB.RemoveEntry(sToInsert);
-        aAuthFieldsLB.SelectEntryPos( nSelPos ? nSelPos - 1 : 0);
+        aInsert.nAuthorityField = (sal_uInt16)(sal_uIntPtr)m_pAuthFieldsLB->GetEntryData(nSelPos);
+        m_pTokenWIN->InsertAtSelection(SwForm::GetFormAuth(), aInsert);
+        m_pAuthFieldsLB->RemoveEntry(sToInsert);
+        m_pAuthFieldsLB->SelectEntryPos( nSelPos ? nSelPos - 1 : 0);
     }
     else
     {
-        Control* pCtrl = aTokenWIN.GetActiveControl();
+        Control* pCtrl = m_pTokenWIN->GetActiveControl();
         OSL_ENSURE(WINDOW_EDIT != pCtrl->GetType(), "Remove should be disabled");
         if( WINDOW_EDIT != pCtrl->GetType() )
         {
             //fill it into the ListBox
             const SwFormToken& rToken = ((SwTOXButton*)pCtrl)->GetFormToken();
             PreTokenButtonRemoved(rToken);
-            aTokenWIN.RemoveControl((SwTOXButton*)pCtrl);
+            m_pTokenWIN->RemoveControl((SwTOXButton*)pCtrl);
         }
     }
     ModifyHdl(0);
@@ -2355,8 +2236,8 @@ void SwTOXEntryTabPage::PreTokenButtonRemoved(const SwFormToken& rToken)
     //fill it into the ListBox
     sal_uInt32 nData = rToken.nAuthorityField;
     String sTemp(SW_RES(STR_AUTH_FIELD_START + nData));
-    sal_uInt16 nPos = aAuthFieldsLB.InsertEntry(sTemp);
-    aAuthFieldsLB.SetEntryData(nPos, (void*)(sal_uIntPtr)(nData));
+    sal_uInt16 nPos = m_pAuthFieldsLB->InsertEntry(sTemp);
+    m_pAuthFieldsLB->SetEntryData(nPos, (void*)(sal_uIntPtr)(nData));
 }
 /*-----------------------------------------------------------------------
 
@@ -2369,12 +2250,12 @@ IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, PushButton*, pBtn)
     FormTokenType eTokenType = TOKEN_ENTRY_NO;
     String sCharStyle;
     sal_uInt16  nChapterFormat = CF_NUMBER; // i89791
-    if(pBtn == &aEntryNoPB)
+    if(pBtn == m_pEntryNoPB)
     {
         sText = SwForm::GetFormEntryNum();
         eTokenType = TOKEN_ENTRY_NO;
     }
-    else if(pBtn == &aEntryPB)
+    else if(pBtn == m_pEntryPB)
     {
         if( TOX_CONTENT == m_pCurrentForm->GetTOXType() )
         {
@@ -2387,24 +2268,24 @@ IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, PushButton*, pBtn)
             eTokenType = TOKEN_ENTRY;
         }
     }
-    else if(pBtn == &aChapterInfoPB)
+    else if(pBtn == m_pChapterInfoPB)
     {
         sText = SwForm::GetFormChapterMark();
         eTokenType = TOKEN_CHAPTER_INFO;
         nChapterFormat = CF_NUM_NOPREPST_TITLE; // i89791
     }
-    else if(pBtn == &aPageNoPB)
+    else if(pBtn == m_pPageNoPB)
     {
         sText = SwForm::GetFormPageNums();
         eTokenType = TOKEN_PAGE_NUMS;
     }
-    else if(pBtn == &aHyperLinkPB)
+    else if(pBtn == m_pHyperLinkPB)
     {
         sText = SwForm::GetFormLinkStt();
         eTokenType = TOKEN_LINK_START;
         sCharStyle = String(SW_RES(STR_POOLCHR_TOXJUMP));
     }
-    else if(pBtn == &aTabPB)
+    else if(pBtn == m_pTabPB)
     {
         sText = SwForm::GetFormTab();
         eTokenType = TOKEN_TAB_STOP;
@@ -2413,7 +2294,7 @@ IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, PushButton*, pBtn)
     aInsert.sCharStyleName = sCharStyle;
     aInsert.nTabStopPosition = 0;
     aInsert.nChapterFormat = nChapterFormat; // i89791
-    aTokenWIN.InsertAtSelection(sText, aInsert);
+    m_pTokenWIN->InsertAtSelection(sText, aInsert);
     ModifyHdl(0);
     return 0;
 }
@@ -2422,9 +2303,9 @@ IMPL_LINK_NOARG(SwTOXEntryTabPage, AllLevelsHdl)
 {
     //get current level
     //write it into all levels
-    if(aTokenWIN.IsValid())
+    if(m_pTokenWIN->IsValid())
     {
-        String sNewToken = aTokenWIN.GetPattern();
+        String sNewToken = m_pTokenWIN->GetPattern();
         for(sal_uInt16 i = 1; i < m_pCurrentForm->GetFormMax(); i++)
             m_pCurrentForm->SetPattern(i, sNewToken);
         //
@@ -2435,10 +2316,10 @@ IMPL_LINK_NOARG(SwTOXEntryTabPage, AllLevelsHdl)
 
 void SwTOXEntryTabPage::WriteBackLevel()
 {
-    if(aTokenWIN.IsValid())
+    if(m_pTokenWIN->IsValid())
     {
-        String sNewToken = aTokenWIN.GetPattern();
-        sal_uInt16 nLastLevel = aTokenWIN.GetLastLevel();
+        String sNewToken = m_pTokenWIN->GetPattern();
+        sal_uInt16 nLastLevel = m_pTokenWIN->GetLastLevel();
         if(nLastLevel != USHRT_MAX)
             m_pCurrentForm->SetPattern(nLastLevel + 1, sNewToken );
     }
@@ -2452,16 +2333,16 @@ IMPL_LINK(SwTOXEntryTabPage, LevelHdl, SvTreeListBox*, pBox)
     WriteBackLevel();
 
     sal_uInt16 nLevel = static_cast< sal_uInt16 >(pBox->GetModel()->GetAbsPos(pBox->FirstSelected()));
-    aTokenWIN.SetForm(*m_pCurrentForm, nLevel);
+    m_pTokenWIN->SetForm(*m_pCurrentForm, nLevel);
     if(TOX_AUTHORITIES == m_pCurrentForm->GetTOXType())
     {
         //fill the types in
-        aAuthFieldsLB.Clear();
+        m_pAuthFieldsLB->Clear();
         for( sal_uInt32 i = 0; i < AUTH_FIELD_END; i++)
         {
             String sTmp(SW_RES(STR_AUTH_FIELD_START + i));
-            sal_uInt16 nPos = aAuthFieldsLB.InsertEntry(sTmp);
-            aAuthFieldsLB.SetEntryData(nPos, (void*)(sal_uIntPtr)(i));
+            sal_uInt16 nPos = m_pAuthFieldsLB->InsertEntry(sTmp);
+            m_pAuthFieldsLB->SetEntryData(nPos, (void*)(sal_uIntPtr)(i));
         }
 
         // #i21237#
@@ -2474,14 +2355,14 @@ IMPL_LINK(SwTOXEntryTabPage, LevelHdl, SvTreeListBox*, pBox)
             if(TOKEN_AUTHORITY == aToken.eTokenType)
             {
                 sal_uInt32 nSearch = aToken.nAuthorityField;
-                sal_uInt16  nLstBoxPos = aAuthFieldsLB.GetEntryPos( (void*)(sal_uIntPtr)nSearch );
+                sal_uInt16  nLstBoxPos = m_pAuthFieldsLB->GetEntryPos( (void*)(sal_uIntPtr)nSearch );
                 OSL_ENSURE(LISTBOX_ENTRY_NOTFOUND != nLstBoxPos, "Entry not found?");
-                aAuthFieldsLB.RemoveEntry(nLstBoxPos);
+                m_pAuthFieldsLB->RemoveEntry(nLstBoxPos);
             }
 
             aIt++; // #i21237#
         }
-        aAuthFieldsLB.SelectEntryPos(0);
+        m_pAuthFieldsLB->SelectEntryPos(0);
     }
     bInLevelHdl = sal_False;
     pBox->GrabFocus();
@@ -2490,32 +2371,20 @@ IMPL_LINK(SwTOXEntryTabPage, LevelHdl, SvTreeListBox*, pBox)
 
 IMPL_LINK(SwTOXEntryTabPage, SortKeyHdl, RadioButton*, pButton)
 {
-    sal_Bool bEnable = &aSortContentRB == pButton;
-    aFirstKeyFT.Enable(bEnable);
-    aFirstKeyLB.Enable(bEnable);
-    aSecondKeyFT.Enable(bEnable);
-    aSecondKeyLB.Enable(bEnable);
-    aThirdKeyFT.Enable(bEnable);
-    aThirdKeyLB.Enable(bEnable);
-    aSortKeyFL.Enable(bEnable);
-    aFirstSortUpRB.Enable(bEnable);
-    aFirstSortDownRB.Enable(bEnable);
-    aSecondSortUpRB.Enable(bEnable);
-    aSecondSortDownRB.Enable(bEnable);
-    aThirdSortUpRB.Enable(bEnable);
-    aThirdSortDownRB.Enable(bEnable);
+    bool bEnable = m_pSortContentRB == pButton;
+    m_pSortKeyFrame->Enable(bEnable);
     return 0;
 }
 
 IMPL_LINK(SwTOXEntryTabPage, TokenSelectedHdl, SwFormToken*, pToken)
 {
     if (!pToken->sCharStyleName.isEmpty())
-        aCharStyleLB.SelectEntry(pToken->sCharStyleName);
+        m_pCharStyleLB->SelectEntry(pToken->sCharStyleName);
     else
-        aCharStyleLB.SelectEntry(sNoCharStyle);
+        m_pCharStyleLB->SelectEntry(sNoCharStyle);
 
-    String sEntry = aCharStyleLB.GetSelectEntry();
-    aEditStylePB.Enable(sEntry != sNoCharStyle);
+    String sEntry = m_pCharStyleLB->GetSelectEntry();
+    m_pEditStylePB->Enable(sEntry != sNoCharStyle);
 
     if(pToken->eTokenType == TOKEN_CHAPTER_INFO)
     {
@@ -2523,102 +2392,102 @@ IMPL_LINK(SwTOXEntryTabPage, TokenSelectedHdl, SwFormToken*, pToken)
         switch(pToken->nChapterFormat)
         {
         default:
-            aChapterEntryLB.SetNoSelection();//to alert the user
+            m_pChapterEntryLB->SetNoSelection();//to alert the user
             break;
         case CF_NUM_NOPREPST_TITLE:
-            aChapterEntryLB.SelectEntryPos(0);
+            m_pChapterEntryLB->SelectEntryPos(0);
             break;
         case CF_TITLE:
-            aChapterEntryLB.SelectEntryPos(1);
+            m_pChapterEntryLB->SelectEntryPos(1);
            break;
         case CF_NUMBER_NOPREPST:
-            aChapterEntryLB.SelectEntryPos(2);
+            m_pChapterEntryLB->SelectEntryPos(2);
             break;
         }
 //i53420
 
-        aEntryOutlineLevelNF.SetValue(pToken->nOutlineLevel);
+        m_pEntryOutlineLevelNF->SetValue(pToken->nOutlineLevel);
     }
 
 //i53420
     if(pToken->eTokenType == TOKEN_ENTRY_NO)
     {
-        aEntryOutlineLevelNF.SetValue(pToken->nOutlineLevel);
+        m_pEntryOutlineLevelNF->SetValue(pToken->nOutlineLevel);
         sal_uInt16 nFormat = 0;
         if( pToken->nChapterFormat == CF_NUM_NOPREPST_TITLE )
             nFormat = 1;
-        aNumberFormatLB.SelectEntryPos(nFormat);
+        m_pNumberFormatLB->SelectEntryPos(nFormat);
     }
 
     sal_Bool bTabStop = TOKEN_TAB_STOP == pToken->eTokenType;
-    aFillCharFT.Show(bTabStop);
-    aFillCharCB.Show(bTabStop);
-    aTabPosFT.Show(bTabStop);
-    aTabPosMF.Show(bTabStop);
-    aAutoRightCB.Show(bTabStop);
-    aAutoRightCB.Enable(bTabStop);
+    m_pFillCharFT->Show(bTabStop);
+    m_pFillCharCB->Show(bTabStop);
+    m_pTabPosFT->Show(bTabStop);
+    m_pTabPosMF->Show(bTabStop);
+    m_pAutoRightCB->Show(bTabStop);
+    m_pAutoRightCB->Enable(bTabStop);
     if(bTabStop)
     {
-        aTabPosMF.SetValue(aTabPosMF.Normalize(pToken->nTabStopPosition), FUNIT_TWIP);
-        aAutoRightCB.Check(SVX_TAB_ADJUST_END == pToken->eTabAlign);
-        aFillCharCB.SetText(OUString(pToken->cTabFillChar));
-        aTabPosFT.Enable(!aAutoRightCB.IsChecked());
-        aTabPosMF.Enable(!aAutoRightCB.IsChecked());
+        m_pTabPosMF->SetValue(m_pTabPosMF->Normalize(pToken->nTabStopPosition), FUNIT_TWIP);
+        m_pAutoRightCB->Check(SVX_TAB_ADJUST_END == pToken->eTabAlign);
+        m_pFillCharCB->SetText(OUString(pToken->cTabFillChar));
+        m_pTabPosFT->Enable(!m_pAutoRightCB->IsChecked());
+        m_pTabPosMF->Enable(!m_pAutoRightCB->IsChecked());
     }
     else
     {
-        aTabPosMF.Enable(sal_False);
+        m_pTabPosMF->Enable(sal_False);
     }
 
     sal_Bool bIsChapterInfo = pToken->eTokenType == TOKEN_CHAPTER_INFO;
     sal_Bool bIsEntryNumber = pToken->eTokenType == TOKEN_ENTRY_NO;
-    aChapterEntryFT.Show( bIsChapterInfo );
-    aChapterEntryLB.Show( bIsChapterInfo );
-    aEntryOutlineLevelFT.Show( bIsChapterInfo || bIsEntryNumber );
-    aEntryOutlineLevelNF.Show( bIsChapterInfo || bIsEntryNumber );
-    aNumberFormatFT.Show( bIsEntryNumber );
-    aNumberFormatLB.Show( bIsEntryNumber );
+    m_pChapterEntryFT->Show( bIsChapterInfo );
+    m_pChapterEntryLB->Show( bIsChapterInfo );
+    m_pEntryOutlineLevelFT->Show( bIsChapterInfo || bIsEntryNumber );
+    m_pEntryOutlineLevelNF->Show( bIsChapterInfo || bIsEntryNumber );
+    m_pNumberFormatFT->Show( bIsEntryNumber );
+    m_pNumberFormatLB->Show( bIsEntryNumber );
 
 
     //now enable the visible buttons
     //- inserting the same type of control is not allowed
     //- some types of controls can only appear once (EntryText EntryNumber)
 
-    if(aEntryNoPB.IsVisible())
+    if(m_pEntryNoPB->IsVisible())
     {
-        aEntryNoPB.Enable(TOKEN_ENTRY_NO != pToken->eTokenType );
+        m_pEntryNoPB->Enable(TOKEN_ENTRY_NO != pToken->eTokenType );
     }
-    if(aEntryPB.IsVisible())
+    if(m_pEntryPB->IsVisible())
     {
-        aEntryPB.Enable(TOKEN_ENTRY_TEXT != pToken->eTokenType &&
-                                !aTokenWIN.Contains(TOKEN_ENTRY_TEXT)
-                                && !aTokenWIN.Contains(TOKEN_ENTRY));
+        m_pEntryPB->Enable(TOKEN_ENTRY_TEXT != pToken->eTokenType &&
+                                !m_pTokenWIN->Contains(TOKEN_ENTRY_TEXT)
+                                && !m_pTokenWIN->Contains(TOKEN_ENTRY));
     }
 
-    if(aChapterInfoPB.IsVisible())
+    if(m_pChapterInfoPB->IsVisible())
     {
-        aChapterInfoPB.Enable(TOKEN_CHAPTER_INFO != pToken->eTokenType);
+        m_pChapterInfoPB->Enable(TOKEN_CHAPTER_INFO != pToken->eTokenType);
     }
-    if(aPageNoPB.IsVisible())
+    if(m_pPageNoPB->IsVisible())
     {
-        aPageNoPB.Enable(TOKEN_PAGE_NUMS != pToken->eTokenType &&
-                                !aTokenWIN.Contains(TOKEN_PAGE_NUMS));
+        m_pPageNoPB->Enable(TOKEN_PAGE_NUMS != pToken->eTokenType &&
+                                !m_pTokenWIN->Contains(TOKEN_PAGE_NUMS));
     }
-    if(aTabPB.IsVisible())
+    if(m_pTabPB->IsVisible())
     {
-        aTabPB.Enable(!bTabStop);
+        m_pTabPB->Enable(!bTabStop);
     }
-    if(aHyperLinkPB.IsVisible())
+    if(m_pHyperLinkPB->IsVisible())
     {
-        aHyperLinkPB.Enable(TOKEN_LINK_START != pToken->eTokenType &&
+        m_pHyperLinkPB->Enable(TOKEN_LINK_START != pToken->eTokenType &&
                             TOKEN_LINK_END != pToken->eTokenType);
     }
     //table of authorities
-    if(aAuthInsertPB.IsVisible())
+    if(m_pAuthInsertPB->IsVisible())
     {
         bool bText = TOKEN_TEXT == pToken->eTokenType;
-        aAuthInsertPB.Enable(bText && !aAuthFieldsLB.GetSelectEntry().isEmpty());
-        aAuthRemovePB.Enable(!bText);
+        m_pAuthInsertPB->Enable(bText && !m_pAuthFieldsLB->GetSelectEntry().isEmpty());
+        m_pAuthRemovePB->Enable(!bText);
     }
 
     return 0;
@@ -2628,10 +2497,10 @@ IMPL_LINK(SwTOXEntryTabPage, StyleSelectHdl, ListBox*, pBox)
 {
     String sEntry = pBox->GetSelectEntry();
     sal_uInt16 nId = (sal_uInt16)(sal_IntPtr)pBox->GetEntryData(pBox->GetSelectEntryPos());
-    aEditStylePB.Enable(sEntry != sNoCharStyle);
+    m_pEditStylePB->Enable(sEntry != sNoCharStyle);
     if(sEntry == sNoCharStyle)
         sEntry.Erase();
-    Control* pCtrl = aTokenWIN.GetActiveControl();
+    Control* pCtrl = m_pTokenWIN->GetActiveControl();
     OSL_ENSURE(pCtrl, "no active control?");
     if(pCtrl)
     {
@@ -2650,7 +2519,7 @@ IMPL_LINK(SwTOXEntryTabPage, ChapterInfoHdl, ListBox*, pBox)
     sal_uInt16 nPos = pBox->GetSelectEntryPos();
     if(LISTBOX_ENTRY_NOTFOUND != nPos)
     {
-        Control* pCtrl = aTokenWIN.GetActiveControl();
+        Control* pCtrl = m_pTokenWIN->GetActiveControl();
         OSL_ENSURE(pCtrl, "no active control?");
         if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
             ((SwTOXButton*)pCtrl)->SetChapterInfo(nPos);
@@ -2664,7 +2533,7 @@ IMPL_LINK(SwTOXEntryTabPage, ChapterInfoOutlineHdl, NumericField*, pField)
 {
     const sal_uInt16 nLevel = static_cast<sal_uInt8>(pField->GetValue());
 
-    Control* pCtrl = aTokenWIN.GetActiveControl();
+    Control* pCtrl = m_pTokenWIN->GetActiveControl();
     OSL_ENSURE(pCtrl, "no active control?");
     if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
         ((SwTOXButton*)pCtrl)->SetOutlineLevel(nLevel);
@@ -2679,7 +2548,7 @@ IMPL_LINK(SwTOXEntryTabPage, NumberFormatHdl, ListBox*, pBox)
 
     if(LISTBOX_ENTRY_NOTFOUND != nPos)
     {
-        Control* pCtrl = aTokenWIN.GetActiveControl();
+        Control* pCtrl = m_pTokenWIN->GetActiveControl();
         OSL_ENSURE(pCtrl, "no active control?");
         if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
         {
@@ -2692,7 +2561,7 @@ IMPL_LINK(SwTOXEntryTabPage, NumberFormatHdl, ListBox*, pBox)
 
 IMPL_LINK(SwTOXEntryTabPage, TabPosHdl, MetricField*, pField)
 {
-    Control* pCtrl = aTokenWIN.GetActiveControl();
+    Control* pCtrl = m_pTokenWIN->GetActiveControl();
     OSL_ENSURE(pCtrl && WINDOW_EDIT != pCtrl->GetType() &&
         TOKEN_TAB_STOP == ((SwTOXButton*)pCtrl)->GetFormToken().eTokenType,
                 "no active style::TabStop control?");
@@ -2707,7 +2576,7 @@ IMPL_LINK(SwTOXEntryTabPage, TabPosHdl, MetricField*, pField)
 
 IMPL_LINK(SwTOXEntryTabPage, FillCharHdl, ComboBox*, pBox)
 {
-    Control* pCtrl = aTokenWIN.GetActiveControl();
+    Control* pCtrl = m_pTokenWIN->GetActiveControl();
     OSL_ENSURE(pCtrl && WINDOW_EDIT != pCtrl->GetType() &&
         TOKEN_TAB_STOP == ((SwTOXButton*)pCtrl)->GetFormToken().eTokenType,
                 "no active style::TabStop control?");
@@ -2727,7 +2596,7 @@ IMPL_LINK(SwTOXEntryTabPage, FillCharHdl, ComboBox*, pBox)
 IMPL_LINK(SwTOXEntryTabPage, AutoRightHdl, CheckBox*, pBox)
 {
     //the most right style::TabStop is usually right aligned
-    Control* pCurCtrl = aTokenWIN.GetActiveControl();
+    Control* pCurCtrl = m_pTokenWIN->GetActiveControl();
     OSL_ENSURE(WINDOW_EDIT != pCurCtrl->GetType() &&
             ((SwTOXButton*)pCurCtrl)->GetFormToken().eTokenType == TOKEN_TAB_STOP,
             "no style::TabStop selected!");
@@ -2737,8 +2606,8 @@ IMPL_LINK(SwTOXEntryTabPage, AutoRightHdl, CheckBox*, pBox)
     if(rToken.eTokenType == TOKEN_TAB_STOP)
         ((SwTOXButton*)pCurCtrl)->SetTabAlign(
             bChecked ? SVX_TAB_ADJUST_END : SVX_TAB_ADJUST_LEFT);
-    aTabPosFT.Enable(!bChecked);
-    aTabPosMF.Enable(!bChecked);
+    m_pTabPosFT->Enable(!bChecked);
+    m_pTabPosMF->Enable(!bChecked);
     ModifyHdl(0);
     return 0;
 }
@@ -2746,18 +2615,18 @@ IMPL_LINK(SwTOXEntryTabPage, AutoRightHdl, CheckBox*, pBox)
 void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh)
 {
     SwDocShell* pDocSh = rSh.GetView().GetDocShell();
-    ::FillCharStyleListBox(aCharStyleLB, pDocSh, true, true);
+    ::FillCharStyleListBox(*m_pCharStyleLB, pDocSh, true, true);
     const String sDefault(SW_RES(STR_POOLCOLL_STANDARD));
-    for(sal_uInt16 i = 0; i < aCharStyleLB.GetEntryCount(); i++)
+    for(sal_uInt16 i = 0; i < m_pCharStyleLB->GetEntryCount(); i++)
     {
-        String sEntry = aCharStyleLB.GetEntry(i);
+        String sEntry = m_pCharStyleLB->GetEntry(i);
         if(sDefault != sEntry)
         {
-            aMainEntryStyleLB.InsertEntry( sEntry );
-            aMainEntryStyleLB.SetEntryData(i, aCharStyleLB.GetEntryData(i));
+            m_pMainEntryStyleLB->InsertEntry( sEntry );
+            m_pMainEntryStyleLB->SetEntryData(i, m_pCharStyleLB->GetEntryData(i));
         }
     }
-    aMainEntryStyleLB.SelectEntry( SwStyleNameMapper::GetUIName(
+    m_pMainEntryStyleLB->SelectEntry( SwStyleNameMapper::GetUIName(
                                 RES_POOLCHR_IDX_MAIN_ENTRY, aEmptyStr ));
 }
 
@@ -2778,7 +2647,7 @@ String  SwTOXEntryTabPage::GetLevelHelp(sal_uInt16 nLevel) const
     return sRet;
 }
 
-SwTokenWindow::SwTokenWindow(SwTOXEntryTabPage* pParent, const ResId& rResId) :
+SwTokenWindow::SwTokenWindow(Window* pParent, const ResId& rResId) :

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list