[Libreoffice-commits] core.git: 2 commits - sw/AllLangResTarget_sw.mk sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk vcl/source

Caolán McNamara caolanm at redhat.com
Mon Aug 19 06:21:52 PDT 2013


 sw/AllLangResTarget_sw.mk                 |    1 
 sw/UIConfig_swriter.mk                    |    1 
 sw/inc/helpid.h                           |    1 
 sw/source/ui/fldui/flddok.cxx             |  362 ++++++++++++++----------------
 sw/source/ui/fldui/flddok.hxx             |   31 +-
 sw/source/ui/fldui/flddok.src             |  165 -------------
 sw/source/ui/fldui/fldtdlg.hrc            |   22 -
 sw/uiconfig/swriter/ui/flddocinfopage.ui  |    1 
 sw/uiconfig/swriter/ui/flddocumentpage.ui |  360 +++++++++++++++++++++++++++++
 vcl/source/window/window.cxx              |   15 -
 10 files changed, 568 insertions(+), 391 deletions(-)

New commits:
commit 23a289cfbb5b89c25a20852f3dcb672e6674027d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 19 14:06:10 2013 +0100

    convert document field page to .ui
    
    Change-Id: Ifaad85d637167bd85be2e15809e847efcdecd584

diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
index 66c6f77..633ae43 100644
--- a/sw/AllLangResTarget_sw.mk
+++ b/sw/AllLangResTarget_sw.mk
@@ -102,7 +102,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
     sw/source/ui/envelp/labfmt.src \
     sw/source/ui/envelp/mailmrge.src \
     sw/source/ui/fldui/flddb.src \
-    sw/source/ui/fldui/flddok.src \
     sw/source/ui/fldui/fldref.src \
     sw/source/ui/fldui/fldtdlg.src \
     sw/source/ui/fldui/fldui.src \
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 7d0d04c..9389f3a 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -91,6 +91,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
 	sw/uiconfig/swriter/ui/envprinterpage \
 	sw/uiconfig/swriter/ui/exchangedatabases \
 	sw/uiconfig/swriter/ui/flddocinfopage \
+	sw/uiconfig/swriter/ui/flddocumentpage \
 	sw/uiconfig/swriter/ui/fldfuncpage \
 	sw/uiconfig/swriter/ui/formatsectiondialog \
 	sw/uiconfig/swriter/ui/formattablepage \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 736388a..168da9a 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -146,7 +146,6 @@
 
 #define HID_FLD_DB                                              "SW_HID_FLD_DB"
 #define HID_FLD_VAR                                             "SW_HID_FLD_VAR"
-#define HID_FLD_DOK                                             "SW_HID_FLD_DOK"
 #define HID_FLD_REF                                             "SW_HID_FLD_REF"
 
 #define HID_EDIT_FLD_DB                                         "SW_HID_EDIT_FLD_DB"
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index 923bc1e..c0bceb8 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -35,39 +35,41 @@
 #define USER_DATA_VERSION_1 "1"
 #define USER_DATA_VERSION USER_DATA_VERSION_1
 
-SwFldDokPage::SwFldDokPage(Window* pWindow, const SfxItemSet& rCoreSet ) :
-    SwFldPage( pWindow, SW_RES( TP_FLD_DOK ), rCoreSet ),
-
-    aTypeFT         (this, SW_RES(FT_DOKTYPE)),
-    aTypeLB         (this, SW_RES(LB_DOKTYPE)),
-    aSelectionFT    (this, SW_RES(FT_DOKSELECTION)),
-    aSelectionLB    (this, SW_RES(LB_DOKSELECTION)),
-    aValueFT        (this, SW_RES(FT_DOKVALUE)),
-    aValueED        (this, SW_RES(ED_DOKVALUE)),
-    aLevelED        (this, SW_RES(ED_DOKLEVEL)),
-    aDateOffsetED   (this, SW_RES(ED_DOKDATEOFF)),
-
-    aFormatFT       (this, SW_RES(FT_DOKFORMAT)),
-    aFormatLB       (this, SW_RES(LB_DOKFORMAT)),
-    aNumFormatLB    (this, SW_RES(LB_DOKNUMFORMAT)),
-    aFixedCB        (this, SW_RES(CB_DOKFIXEDCONTENT)),
-
-    sDateOffset     (SW_RES(STR_DOKDATEOFF)),
-    sTimeOffset     (SW_RES(STR_DOKTIMEOFF)),
-    aRootOpened     (SW_RES(BMP_DOKROOT_OPENED)),
-    aRootClosed     (SW_RES(BMP_DOKROOT_CLOSED))
+SwFldDokPage::SwFldDokPage(Window* pParent, const SfxItemSet& rCoreSet )
+    : SwFldPage(pParent, "FldDocumentPage",
+        "modules/swriter/ui/flddocumentpage.ui", rCoreSet)
 {
-    FreeResource();
-
-    aSelectionLB.SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl));
-    aFormatLB.SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl));
-    aNumFormatLB.SetDoubleClickHdl(LINK(this, SwFldDokPage, NumFormatHdl));
-
-    aLevelED.SetMax(MAXLEVEL);
-    aDateOffsetED.SetMin(LONG_MIN);
-    aDateOffsetED.SetMax(LONG_MAX);
+    get(m_pSelection, "selectframe");
+    get(m_pFormat, "formatframe");
+    get(m_pTypeLB, "type");
+    m_pTypeLB->SetStyle(m_pTypeLB->GetStyle() | WB_SORT);
+    get(m_pSelectionLB, "select");
+    get(m_pValueFT, "valueft");
+    get(m_pValueED, "value");
+    get(m_pLevelFT, "levelft");
+    get(m_pLevelED, "level");
+    get(m_pDateFT, "daysft");
+    get(m_pTimeFT, "minutesft");
+    get(m_pDateOffsetED, "offset");
+    get(m_pFormatLB, "format");
+    m_pFormatLB->SetStyle(m_pFormatLB->GetStyle() | WB_SORT);
+    get(m_pNumFormatLB, "numformat");
+    get(m_pFixedCB, "fixed");
+
+    long nHeight = m_pTypeLB->GetTextHeight() * 20;
+    m_pTypeLB->set_height_request(nHeight);
+    m_pSelectionLB->set_height_request(nHeight);
+    m_pFormatLB->set_height_request(nHeight);
+
+    m_pSelectionLB->SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl));
+    m_pFormatLB->SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl));
+    m_pNumFormatLB->SetDoubleClickHdl(LINK(this, SwFldDokPage, NumFormatHdl));
+
+    m_pLevelED->SetMax(MAXLEVEL);
+    m_pDateOffsetED->SetMin(LONG_MIN);
+    m_pDateOffsetED->SetMax(LONG_MAX);
     //enable 'active' language selection
-    aNumFormatLB.SetShowLanguageControl(sal_True);
+    m_pNumFormatLB->SetShowLanguageControl(sal_True);
 }
 
 SwFldDokPage::~SwFldDokPage()
@@ -76,14 +78,14 @@ SwFldDokPage::~SwFldDokPage()
 
 void SwFldDokPage::Reset(const SfxItemSet& )
 {
-    SavePos(&aTypeLB);
+    SavePos(m_pTypeLB);
     Init(); // general initialisation
 
     // initialise TypeListBox
     const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup());
 
-    aTypeLB.SetUpdateMode(sal_False);
-    aTypeLB.Clear();
+    m_pTypeLB->SetUpdateMode(sal_False);
+    m_pTypeLB->Clear();
 
     sal_uInt16 nPos, nTypeId;
 
@@ -102,15 +104,15 @@ void SwFldDokPage::Reset(const SfxItemSet& )
                 case TYP_PAGENUMBERFLD:
                     if (!bPage)
                     {
-                        nPos = aTypeLB.InsertEntry(SW_RESSTR(FMT_REF_PAGE));
-                        aTypeLB.SetEntryData(nPos, (void*)USHRT_MAX);
+                        nPos = m_pTypeLB->InsertEntry(SW_RESSTR(FMT_REF_PAGE));
+                        m_pTypeLB->SetEntryData(nPos, (void*)USHRT_MAX);
                         bPage = true;
                     }
                     break;
 
                 default:
-                    nPos = aTypeLB.InsertEntry(GetFldMgr().GetTypeStr(i));
-                    aTypeLB.SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
+                    nPos = m_pTypeLB->InsertEntry(GetFldMgr().GetTypeStr(i));
+                    m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
                     break;
             }
         }
@@ -123,9 +125,9 @@ void SwFldDokPage::Reset(const SfxItemSet& )
             nTypeId = TYP_DATEFLD;
         if (nTypeId == TYP_FIXTIMEFLD)
             nTypeId = TYP_TIMEFLD;
-        nPos = aTypeLB.InsertEntry(GetFldMgr().GetTypeStr(GetFldMgr().GetPos(nTypeId)));
-        aTypeLB.SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
-        aNumFormatLB.SetAutomaticLanguage(pCurField->IsAutomaticLanguage());
+        nPos = m_pTypeLB->InsertEntry(GetFldMgr().GetTypeStr(GetFldMgr().GetPos(nTypeId)));
+        m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
+        m_pNumFormatLB->SetAutomaticLanguage(pCurField->IsAutomaticLanguage());
         SwWrtShell *pSh = GetWrtShell();
         if(!pSh)
             pSh = ::GetActiveWrtShell();
@@ -133,17 +135,17 @@ void SwFldDokPage::Reset(const SfxItemSet& )
         {
             const SvNumberformat* pFormat = pSh->GetNumberFormatter()->GetEntry(pCurField->GetFormat());
             if(pFormat)
-                aNumFormatLB.SetLanguage(pFormat->GetLanguage());
+                m_pNumFormatLB->SetLanguage(pFormat->GetLanguage());
         }
     }
 
     // select old Pos
-    RestorePos(&aTypeLB);
+    RestorePos(m_pTypeLB);
 
-    aTypeLB.SetUpdateMode(sal_True);
-    aTypeLB.SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl));
-    aTypeLB.SetSelectHdl(LINK(this, SwFldDokPage, TypeHdl));
-    aFormatLB.SetSelectHdl(LINK(this, SwFldDokPage, FormatHdl));
+    m_pTypeLB->SetUpdateMode(sal_True);
+    m_pTypeLB->SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl));
+    m_pTypeLB->SetSelectHdl(LINK(this, SwFldDokPage, TypeHdl));
+    m_pFormatLB->SetSelectHdl(LINK(this, SwFldDokPage, FormatHdl));
 
     if( !IsRefresh() )
     {
@@ -154,10 +156,10 @@ void SwFldDokPage::Reset(const SfxItemSet& )
             sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32());
             if(nVal != USHRT_MAX)
             {
-                for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++)
-                    if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
+                for(sal_uInt16 i = 0; i < m_pTypeLB->GetEntryCount(); i++)
+                    if(nVal == (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(i))
                     {
-                        aTypeLB.SelectEntryPos(i);
+                        m_pTypeLB->SelectEntryPos(i);
                         break;
                     }
             }
@@ -167,12 +169,12 @@ void SwFldDokPage::Reset(const SfxItemSet& )
 
     if (IsFldEdit())
     {
-        nOldSel = aSelectionLB.GetSelectEntryPos();
+        nOldSel = m_pSelectionLB->GetSelectEntryPos();
         nOldFormat = GetCurField()->GetFormat();
-        aFixedCB.SaveValue();
-        aValueED.SaveValue();
-        aLevelED.SaveValue();
-        aDateOffsetED.SaveValue();
+        m_pFixedCB->SaveValue();
+        m_pValueED->SaveValue();
+        m_pLevelED->SaveValue();
+        m_pDateOffsetED->SaveValue();
     }
 }
 
@@ -182,22 +184,25 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
     const sal_uInt16 nOld = GetTypeSel();
 
     // current ListBoxPos
-    SetTypeSel(aTypeLB.GetSelectEntryPos());
+    SetTypeSel(m_pTypeLB->GetSelectEntryPos());
 
     if(GetTypeSel() == LISTBOX_ENTRY_NOTFOUND)
     {
         SetTypeSel(0);
-        aTypeLB.SelectEntryPos(0);
+        m_pTypeLB->SelectEntryPos(0);
     }
 
     sal_uInt16 nCount;
 
     if (nOld != GetTypeSel())
     {
-        sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
+        m_pDateFT->Hide();
+        m_pTimeFT->Hide();
+
+        sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel());
 
         // fill Selection-Listbox
-        aSelectionLB.Clear();
+        m_pSelectionLB->Clear();
 
         if (nTypeId != USHRT_MAX)
         {
@@ -216,11 +221,11 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
                 if (!IsFldEdit())
                 {
                     if (nTypeId != TYP_AUTHORFLD)
-                        nPos = aSelectionLB.InsertEntry(aLst[i]);
+                        nPos = m_pSelectionLB->InsertEntry(aLst[i]);
                     else
-                        nPos = aSelectionLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+                        nPos = m_pSelectionLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
 
-                    aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(i));
+                    m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(i));
                 }
                 else
                 {
@@ -230,28 +235,28 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
                     {
                         case TYP_DATEFLD:
                         case TYP_TIMEFLD:
-                            nPos = aSelectionLB.InsertEntry(aLst[i]);
-                            aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(i));
+                            nPos = m_pSelectionLB->InsertEntry(aLst[i]);
+                            m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(i));
                             if (((SwDateTimeField*)GetCurField())->IsFixed() && !i)
-                                aSelectionLB.SelectEntryPos(nPos);
+                                m_pSelectionLB->SelectEntryPos(nPos);
                             if (!((SwDateTimeField*)GetCurField())->IsFixed() && i)
-                                aSelectionLB.SelectEntryPos(nPos);
+                                m_pSelectionLB->SelectEntryPos(nPos);
                             break;
 
                         case TYP_EXTUSERFLD:
                         case TYP_DOCSTATFLD:
-                            nPos = aSelectionLB.InsertEntry(aLst[i]);
-                            aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(i));
+                            nPos = m_pSelectionLB->InsertEntry(aLst[i]);
+                            m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(i));
                             if (GetCurField()->GetSubType() == i)
-                                aSelectionLB.SelectEntryPos(nPos);
+                                m_pSelectionLB->SelectEntryPos(nPos);
                             break;
 
                         case TYP_AUTHORFLD:
                         {
                             String sFmt(GetFldMgr().GetFormatStr(nTypeId, i));
-                            nPos = aSelectionLB.InsertEntry(sFmt);
-                            aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(i));
-                            aSelectionLB.SelectEntry(GetFldMgr().GetFormatStr(nTypeId, GetCurField()->GetFormat()));
+                            nPos = m_pSelectionLB->InsertEntry(sFmt);
+                            m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(i));
+                            m_pSelectionLB->SelectEntry(GetFldMgr().GetFormatStr(nTypeId, GetCurField()->GetFormat()));
                             break;
                         }
 
@@ -262,31 +267,30 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
                     }
                     if (bInsert)
                     {
-                        nPos = aSelectionLB.InsertEntry(aLst[i]);
-                        aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(i));
+                        nPos = m_pSelectionLB->InsertEntry(aLst[i]);
+                        m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(i));
                         break;
                     }
                 }
             }
-            aSelectionLB.SetSelectHdl(Link());
+            m_pSelectionLB->SetSelectHdl(Link());
         }
         else
         {
             AddSubType(TYP_PAGENUMBERFLD);
             AddSubType(TYP_PREVPAGEFLD);
             AddSubType(TYP_NEXTPAGEFLD);
-            nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(0);
+            nTypeId = (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(0);
             nCount = 3;
-            aSelectionLB.SetSelectHdl(LINK(this, SwFldDokPage, SubTypeHdl));
+            m_pSelectionLB->SetSelectHdl(LINK(this, SwFldDokPage, SubTypeHdl));
         }
 
         sal_Bool bEnable = nCount != 0;
 
-        if (bEnable && !aSelectionLB.GetSelectEntryCount())
-            aSelectionLB.SelectEntryPos(0);
+        if (bEnable && !m_pSelectionLB->GetSelectEntryCount())
+            m_pSelectionLB->SelectEntryPos(0);
 
-        aSelectionLB.Enable( bEnable );
-        aSelectionFT.Enable( bEnable );
+        m_pSelection->Enable( bEnable );
 
         // fill Format-Listbox
         sal_uInt16 nSize = FillFormatLB(nTypeId);
@@ -303,62 +307,66 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
                 bFormat = bNumFmt = bOneArea = bOffset = sal_True;
 
                 nFmtType = NUMBERFORMAT_DATE;
-                aValueFT.SetText(sDateOffset);
-                aDateOffsetED.SetFirst(-31);    // one month
-                aDateOffsetED.SetLast(31);
+
+                m_pDateFT->Show();
+
+                m_pDateOffsetED->SetFirst(-31);    // one month
+                m_pDateOffsetED->SetLast(31);
 
                 if (IsFldEdit())
-                    aDateOffsetED.SetValue( ((SwDateTimeField*)GetCurField())->GetOffset() / 24 / 60);
+                    m_pDateOffsetED->SetValue( ((SwDateTimeField*)GetCurField())->GetOffset() / 24 / 60);
                 break;
 
             case TYP_TIMEFLD:
                 bFormat = bNumFmt = bOneArea = bOffset = sal_True;
 
                 nFmtType = NUMBERFORMAT_TIME;
-                aValueFT.SetText(sTimeOffset);
-                aDateOffsetED.SetFirst(-1440);  // one day
-                aDateOffsetED.SetLast(1440);
+
+                m_pTimeFT->Show();
+
+                m_pDateOffsetED->SetFirst(-1440);  // one day
+                m_pDateOffsetED->SetLast(1440);
 
                 if (IsFldEdit())
-                    aDateOffsetED.SetValue( ((SwDateTimeField*)GetCurField())->GetOffset() );
+                    m_pDateOffsetED->SetValue( ((SwDateTimeField*)GetCurField())->GetOffset() );
                 break;
 
             case TYP_PREVPAGEFLD:
             case TYP_NEXTPAGEFLD:
                 if (IsFldEdit())
                 {
-                    sal_uInt16 nTmp = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
-                                            aFormatLB.GetSelectEntryPos() );
+                    sal_uInt16 nTmp = (sal_uInt16)(sal_uLong)m_pFormatLB->GetEntryData(
+                                            m_pFormatLB->GetSelectEntryPos() );
 
                     if(SVX_NUM_CHAR_SPECIAL != nTmp)
                     {
                         sal_Int32 nOff = GetCurField()->GetPar2().toInt32();
                         if( TYP_NEXTPAGEFLD == nTypeId && 1 != nOff )
-                            aValueED.SetText(
+                            m_pValueED->SetText(
                                 OUString::number(nOff - 1) );
                         else if( TYP_PREVPAGEFLD == nTypeId && -1 != nOff )
-                            aValueED.SetText(
+                            m_pValueED->SetText(
                                 OUString::number(nOff + 1) );
                         else
-                            aValueED.SetText(aEmptyStr);
+                            m_pValueED->SetText(aEmptyStr);
                     }
                     else
-                        aValueED.SetText(((SwPageNumberField*)GetCurField())->GetUserString());
+                        m_pValueED->SetText(((SwPageNumberField*)GetCurField())->GetUserString());
                 }
                 bValue = sal_True;
                 break;
 
             case TYP_CHAPTERFLD:
-                aValueFT.SetText(SW_RESSTR(STR_LEVEL));
+                m_pValueFT->SetText(SW_RESSTR(STR_LEVEL));
                 if (IsFldEdit())
-                    aLevelED.SetText(OUString::number(((SwChapterField*)GetCurField())->GetLevel() + 1));
+                    m_pLevelED->SetText(OUString::number(((SwChapterField*)GetCurField())->GetLevel() + 1));
                 bLevel = sal_True;
                 break;
 
             case TYP_PAGENUMBERFLD:
-                aValueFT.SetText( SW_RESSTR( STR_OFFSET ));
+                m_pValueFT->SetText( SW_RESSTR( STR_OFFSET ));
                 if (IsFldEdit())
-                    aValueED.SetText(GetCurField()->GetPar2());
+                    m_pValueED->SetText(GetCurField()->GetPar2());
                 bValue = sal_True;
                 break;
 
@@ -376,54 +384,44 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
         {
             if (IsFldEdit())
             {
-                aNumFormatLB.SetDefFormat(GetCurField()->GetFormat());
+                m_pNumFormatLB->SetDefFormat(GetCurField()->GetFormat());
 
-                if (aNumFormatLB.GetFormatType() == (NUMBERFORMAT_DATE|NUMBERFORMAT_TIME))
+                if (m_pNumFormatLB->GetFormatType() == (NUMBERFORMAT_DATE|NUMBERFORMAT_TIME))
                 {
                     // always set Format-Type because otherwise when date/time formats are combined,
                     // both formats would be displayed at the same time
-                    aNumFormatLB.SetFormatType(0);
-                    aNumFormatLB.SetFormatType(nFmtType);
+                    m_pNumFormatLB->SetFormatType(0);
+                    m_pNumFormatLB->SetFormatType(nFmtType);
                     // set correct format once again
-                    aNumFormatLB.SetDefFormat(GetCurField()->GetFormat());
+                    m_pNumFormatLB->SetDefFormat(GetCurField()->GetFormat());
                 }
             }
             else
-                aNumFormatLB.SetFormatType(nFmtType);
+                m_pNumFormatLB->SetFormatType(nFmtType);
 
-            aNumFormatLB.SetOneArea(bOneArea);
+            m_pNumFormatLB->SetOneArea(bOneArea);
         }
 
-        aFormatLB.Show(!bNumFmt);
-        aNumFormatLB.Show(bNumFmt);
-
-        Size aSz(aFormatLB.GetSizePixel());
-
-        if (bValue | bLevel | bOffset)
-            aSz.Height() = aFormatLB.LogicToPixel(Size(1, 137), MAP_APPFONT).Height();
-        else
-            aSz.Height() = aFormatLB.LogicToPixel(Size(1, 152), MAP_APPFONT).Height();
-
-        aValueFT.Show(bValue | bLevel | bOffset);
-        aValueED.Show(bValue);
-        aLevelED.Show(bLevel);
-        aDateOffsetED.Show(bOffset);
-        aFixedCB.Show(!bValue && !bLevel && !bOffset);
+        m_pFormatLB->Show(!bNumFmt);
+        m_pNumFormatLB->Show(bNumFmt);
 
-        aFormatLB.SetSizePixel(aSz);
-        aNumFormatLB.SetSizePixel(aSz);
+        m_pValueFT->Show(bValue);
+        m_pValueED->Show(bValue);
+        m_pLevelFT->Show(bLevel);
+        m_pLevelED->Show(bLevel);
+        m_pDateOffsetED->Show(bOffset);
+        m_pFixedCB->Show(!bValue && !bLevel && !bOffset);
 
-        aFormatLB.Enable(bFormat);
-        aFormatFT.Enable(bFormat);
-        aFixedCB.Enable(bFixed);
+        m_pFormat->Enable(bFormat);
+        m_pFixedCB->Enable(bFixed);
 
         if (IsFldEdit())
-            aFixedCB.Check( static_cast< sal_Bool >(((GetCurField()->GetFormat() & AF_FIXED) != 0) & bFixed));
+            m_pFixedCB->Check( static_cast< sal_Bool >(((GetCurField()->GetFormat() & AF_FIXED) != 0) & bFixed));
 
-        if (aNumFormatLB.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND)
-            aNumFormatLB.SelectEntryPos(0);
-        aValueFT.Enable(bValue | bLevel | bOffset);
-        aValueED.Enable(bValue);
+        if (m_pNumFormatLB->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND)
+            m_pNumFormatLB->SelectEntryPos(0);
+        m_pValueFT->Enable(bValue | bLevel | bOffset);
+        m_pValueED->Enable(bValue);
     }
 
     return 0;
@@ -431,17 +429,17 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
 
 void SwFldDokPage::AddSubType(sal_uInt16 nTypeId)
 {
-    sal_uInt16 nPos = aSelectionLB.InsertEntry(SwFieldType::GetTypeStr(nTypeId));
-    aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
+    sal_uInt16 nPos = m_pSelectionLB->InsertEntry(SwFieldType::GetTypeStr(nTypeId));
+    m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
 }
 
 IMPL_LINK_NOARG(SwFldDokPage, SubTypeHdl)
 {
-    sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
+    sal_uInt16 nPos = m_pSelectionLB->GetSelectEntryPos();
     if(nPos == LISTBOX_ENTRY_NOTFOUND)
         nPos = 0;
 
-    sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
+    sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(nPos);
     FillFormatLB(nTypeId);
 
     sal_uInt16 nTextRes = 0;
@@ -453,8 +451,8 @@ IMPL_LINK_NOARG(SwFldDokPage, SubTypeHdl)
 
     case TYP_PREVPAGEFLD:
     case TYP_NEXTPAGEFLD:
-        nTextRes = SVX_NUM_CHAR_SPECIAL == (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
-                                        aFormatLB.GetSelectEntryPos() )
+        nTextRes = SVX_NUM_CHAR_SPECIAL == (sal_uInt16)(sal_uLong)m_pFormatLB->GetEntryData(
+                                        m_pFormatLB->GetSelectEntryPos() )
                         ? STR_VALUE : STR_OFFSET;
         break;
 
@@ -464,7 +462,7 @@ IMPL_LINK_NOARG(SwFldDokPage, SubTypeHdl)
     }
 
     if( nTextRes )
-        aValueFT.SetText( SW_RESSTR( nTextRes ));
+        m_pValueFT->SetText( SW_RESSTR( nTextRes ));
 
     return 0;
 }
@@ -472,30 +470,30 @@ IMPL_LINK_NOARG(SwFldDokPage, SubTypeHdl)
 sal_uInt16 SwFldDokPage::FillFormatLB(sal_uInt16 nTypeId)
 {
     // fill Format-Listbox
-    aFormatLB.Clear();
+    m_pFormatLB->Clear();
 
     if (nTypeId == TYP_AUTHORFLD)
-        return aFormatLB.GetEntryCount();
+        return m_pFormatLB->GetEntryCount();
 
     sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, false, IsFldDlgHtmlMode());
 
     for( sal_uInt16 i = 0; i < nSize; ++i )
     {
-        sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+        sal_uInt16 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
         sal_uInt16 nFmtId = GetFldMgr().GetFormatId( nTypeId, i );
-        aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>( nFmtId ));
+        m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>( nFmtId ));
         if (IsFldEdit() && nFmtId == (GetCurField()->GetFormat() & ~AF_FIXED))
-            aFormatLB.SelectEntryPos( nPos );
+            m_pFormatLB->SelectEntryPos( nPos );
     }
 
-    if( nSize && !aFormatLB.GetSelectEntryCount() )
+    if( nSize && !m_pFormatLB->GetSelectEntryCount() )
     {
-        aFormatLB.SelectEntry( SW_RESSTR(FMT_NUM_PAGEDESC) );
-        if( !aFormatLB.GetSelectEntryCount() )
+        m_pFormatLB->SelectEntry( SW_RESSTR(FMT_NUM_PAGEDESC) );
+        if( !m_pFormatLB->GetSelectEntryCount() )
         {
-            aFormatLB.SelectEntry( SW_RESSTR(FMT_NUM_ARABIC) );
-            if( !aFormatLB.GetSelectEntryCount() )
-                aFormatLB.SelectEntryPos( 0 );
+            m_pFormatLB->SelectEntry( SW_RESSTR(FMT_NUM_ARABIC) );
+            if( !m_pFormatLB->GetSelectEntryCount() )
+                m_pFormatLB->SelectEntryPos( 0 );
         }
     }
 
@@ -506,31 +504,31 @@ sal_uInt16 SwFldDokPage::FillFormatLB(sal_uInt16 nTypeId)
 
 IMPL_LINK_NOARG(SwFldDokPage, FormatHdl)
 {
-    sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
+    sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel());
 
     if (nTypeId == USHRT_MAX)
     {
-        sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
+        sal_uInt16 nPos = m_pSelectionLB->GetSelectEntryPos();
         if(nPos == LISTBOX_ENTRY_NOTFOUND)
             nPos = 0;
 
-        nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
+        nTypeId = (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(nPos);
     }
 
     if (nTypeId == TYP_NEXTPAGEFLD || nTypeId == TYP_PREVPAGEFLD)
     {
         // Prev/Next - PageNumFields special treatment:
-        sal_uInt16 nTmp = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
-                                        aFormatLB.GetSelectEntryPos() );
-        OUString sOldTxt( aValueFT.GetText() );
+        sal_uInt16 nTmp = (sal_uInt16)(sal_uLong)m_pFormatLB->GetEntryData(
+                                        m_pFormatLB->GetSelectEntryPos() );
+        OUString sOldTxt( m_pValueFT->GetText() );
         OUString sNewTxt( SW_RES( SVX_NUM_CHAR_SPECIAL == nTmp  ? STR_VALUE
                                                          : STR_OFFSET ));
 
         if( sOldTxt != sNewTxt )
-            aValueFT.SetText( sNewTxt );
+            m_pValueFT->SetText( sNewTxt );
 
-        if (sOldTxt != aValueFT.GetText())
-            aValueED.SetText( aEmptyStr );
+        if (sOldTxt != m_pValueFT->GetText())
+            m_pValueED->SetText( aEmptyStr );
     }
 
     return 0;
@@ -538,32 +536,32 @@ IMPL_LINK_NOARG(SwFldDokPage, FormatHdl)
 
 sal_Bool SwFldDokPage::FillItemSet(SfxItemSet& )
 {
-    sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
+    sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel());
 
     if (nTypeId == USHRT_MAX)
     {
-        sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
+        sal_uInt16 nPos = m_pSelectionLB->GetSelectEntryPos();
         if(nPos == LISTBOX_ENTRY_NOTFOUND)
             nPos = 0;
-        nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
+        nTypeId = (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(nPos);
     }
 
-    String aVal(aValueED.GetText());
+    String aVal(m_pValueED->GetText());
     sal_uLong nFormat = 0;
     sal_uInt16 nSubType = 0;
 
-    if (aFormatLB.IsEnabled())
+    if (m_pFormatLB->IsEnabled())
     {
-        sal_uInt16 nPos = aFormatLB.GetSelectEntryPos();
+        sal_uInt16 nPos = m_pFormatLB->GetSelectEntryPos();
         if(nPos != LISTBOX_ENTRY_NOTFOUND)
-            nFormat = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(nPos);
+            nFormat = (sal_uInt16)(sal_uLong)m_pFormatLB->GetEntryData(nPos);
     }
 
-    if (aSelectionLB.IsEnabled())
+    if (m_pSelectionLB->IsEnabled())
     {
-        sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
+        sal_uInt16 nPos = m_pSelectionLB->GetSelectEntryPos();
         if(nPos != LISTBOX_ENTRY_NOTFOUND)
-            nSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
+            nSubType = (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(nPos);
     }
 
     switch (nTypeId)
@@ -573,18 +571,18 @@ sal_Bool SwFldDokPage::FillItemSet(SfxItemSet& )
             nSubType = 0;
             // no break!
         case TYP_EXTUSERFLD:
-            nFormat |= aFixedCB.IsChecked() ? AF_FIXED : 0;
+            nFormat |= m_pFixedCB->IsChecked() ? AF_FIXED : 0;
             break;
 
         case TYP_FILENAMEFLD:
-            nFormat |= aFixedCB.IsChecked() ? FF_FIXED : 0;
+            nFormat |= m_pFixedCB->IsChecked() ? FF_FIXED : 0;
             break;
 
         case TYP_DATEFLD:
         case TYP_TIMEFLD:
         {
-            nFormat = aNumFormatLB.GetFormat();
-            long nVal = static_cast< long >(aDateOffsetED.GetValue());
+            nFormat = m_pNumFormatLB->GetFormat();
+            long nVal = static_cast< long >(m_pDateOffsetED->GetValue());
             if (nTypeId == TYP_DATEFLD)
                 aVal = OUString::number(nVal * 60 * 24);
             else
@@ -600,14 +598,14 @@ sal_Bool SwFldDokPage::FillItemSet(SfxItemSet& )
             if( SVX_NUM_CHAR_SPECIAL != nFormat &&
                 (TYP_PREVPAGEFLD == nTypeId || TYP_NEXTPAGEFLD == nTypeId))
             {
-                sal_Int32 nVal = aValueED.GetText().toInt32();
+                sal_Int32 nVal = m_pValueED->GetText().toInt32();
                 aVal = OUString::number(nVal);
             }
             break;
         }
 
         case TYP_CHAPTERFLD:
-            aVal = aLevelED.GetText();
+            aVal = m_pLevelED->GetText();
             break;
 
         default:
@@ -615,14 +613,14 @@ sal_Bool SwFldDokPage::FillItemSet(SfxItemSet& )
     }
 
     if (!IsFldEdit() ||
-        nOldSel != aSelectionLB.GetSelectEntryPos() ||
+        nOldSel != m_pSelectionLB->GetSelectEntryPos() ||
         nOldFormat != nFormat ||
-        aFixedCB.GetState() != aFixedCB.GetSavedValue() ||
-        aValueED.GetText() != aValueED.GetSavedValue() ||
-        aLevelED.GetText() != aLevelED.GetSavedValue() ||
-        aDateOffsetED.GetText() != aDateOffsetED.GetSavedValue())
+        m_pFixedCB->GetState() != m_pFixedCB->GetSavedValue() ||
+        m_pValueED->GetText() != m_pValueED->GetSavedValue() ||
+        m_pLevelED->GetText() != m_pLevelED->GetSavedValue() ||
+        m_pDateOffsetED->GetText() != m_pDateOffsetED->GetSavedValue())
     {
-        InsertFld( nTypeId, nSubType, aEmptyStr, aVal, nFormat, ' ', aNumFormatLB.IsAutomaticLanguage() );
+        InsertFld( nTypeId, nSubType, aEmptyStr, aVal, nFormat, ' ', m_pNumFormatLB->IsAutomaticLanguage() );
     }
 
     return sal_False;
@@ -643,11 +641,11 @@ void    SwFldDokPage::FillUserData()
 {
     String sData(OUString(USER_DATA_VERSION));
     sData += ';';
-    sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
+    sal_uInt16 nTypeSel = m_pTypeLB->GetSelectEntryPos();
     if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
         nTypeSel = USHRT_MAX;
     else
-        nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
+        nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(m_pTypeLB->GetEntryData( nTypeSel )));
     sData += OUString::number( nTypeSel );
     SetUserData(sData);
 }
diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx
index 44be79e..8320872 100644
--- a/sw/source/ui/fldui/flddok.hxx
+++ b/sw/source/ui/fldui/flddok.hxx
@@ -32,23 +32,20 @@
 
 class SwFldDokPage : public SwFldPage
 {
-    FixedText           aTypeFT;
-    ListBox             aTypeLB;
-    FixedText           aSelectionFT;
-    ListBox             aSelectionLB;
-    FixedText           aValueFT;
-    Edit                aValueED;
-    NumericField        aLevelED;
-    NumericField        aDateOffsetED;
-    FixedText           aFormatFT;
-    ListBox             aFormatLB;
-    NumFormatListBox    aNumFormatLB;
-    CheckBox            aFixedCB;
-
-    String              sDateOffset;
-    String              sTimeOffset;
-    Bitmap              aRootOpened;
-    Bitmap              aRootClosed;
+    ListBox*            m_pTypeLB;
+    VclContainer*       m_pSelection;
+    ListBox*            m_pSelectionLB;
+    FixedText*          m_pValueFT;
+    Edit*               m_pValueED;
+    FixedText*          m_pLevelFT;
+    NumericField*       m_pLevelED;
+    FixedText*          m_pDateFT;
+    FixedText*          m_pTimeFT;
+    NumericField*       m_pDateOffsetED;
+    VclContainer*       m_pFormat;
+    ListBox*            m_pFormatLB;
+    NumFormatListBox*   m_pNumFormatLB;
+    CheckBox*           m_pFixedCB;
 
     sal_uInt16              nOldSel;
     sal_uLong               nOldFormat;
diff --git a/sw/source/ui/fldui/flddok.src b/sw/source/ui/fldui/flddok.src
deleted file mode 100644
index fa48827..0000000
--- a/sw/source/ui/fldui/flddok.src
+++ /dev/null
@@ -1,165 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "globals.hrc"
-#include "fldtdlg.hrc"
-#include "helpid.h"
-TabPage TP_FLD_DOK
-{
-    HelpID = HID_FLD_DOK ;
-    SVLook = TRUE ;
-    Hide = TRUE ;
-    Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-    FixedText FT_DOKTYPE
-    {
-        Pos = MAP_APPFONT ( 6 , 3 ) ;
-        Size = MAP_APPFONT ( 76 , 8 ) ;
-        Text [ en-US ] = "~Type" ;
-        Left = TRUE ;
-    };
-    ListBox LB_DOKTYPE
-    {
-        HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKTYPE";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 6 , 14 ) ;
-        Size = MAP_APPFONT ( 76 , 165 ) ;
-        TabStop = TRUE ;
-        Sort = TRUE ;
-        AutoHScroll = TRUE ;
-    };
-    FixedText FT_DOKSELECTION
-    {
-        Pos = MAP_APPFONT ( 88 , 3 ) ;
-        Size = MAP_APPFONT ( 76 , 8 ) ;
-        Text [ en-US ] = "S~elect" ;
-        Left = TRUE ;
-    };
-    ListBox LB_DOKSELECTION
-    {
-        HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKSELECTION";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 88 , 15 ) ;
-        Size = MAP_APPFONT ( 76 , 165 ) ;
-        TabStop = TRUE ;
-    };
-    FixedText FT_DOKFORMAT
-    {
-        Pos = MAP_APPFONT ( 170 , 3 ) ;
-        Size = MAP_APPFONT ( 84 , 8 ) ;
-        Left = TRUE ;
-        Text [ en-US ] = "F~ormat" ;
-    };
-    ListBox LB_DOKFORMAT
-    {
-        HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKFORMAT";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 170 , 14 ) ;
-        Size = MAP_APPFONT ( 84 , 151 ) ;
-        TabStop = TRUE ;
-        DropDown = FALSE ;
-        Sort = TRUE ;
-        AutoHScroll = TRUE ;
-    };
-    ListBox LB_DOKNUMFORMAT
-    {
-        HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKNUMFORMAT";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 170 , 14 ) ;
-        Size = MAP_APPFONT ( 84 , 151 ) ;
-        TabStop = TRUE ;
-        AutoHScroll = TRUE ;
-        Hide = TRUE ;
-    };
-    FixedText FT_DOKVALUE
-    {
-        Pos = MAP_APPFONT ( 170 , 155 ) ;
-        Size = MAP_APPFONT ( 84 , 8 ) ;
-        Text [ en-US ] = "O~ffset" ;
-        Left = TRUE ;
-        Hide = TRUE ;
-    };
-    Edit ED_DOKVALUE
-    {
-        HelpID = "sw:Edit:TP_FLD_DOK:ED_DOKVALUE";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 170 , 167 ) ;
-        Size = MAP_APPFONT ( 84 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Hide = TRUE ;
-    };
-    NumericField ED_DOKLEVEL
-    {
-        HelpID = "sw:NumericField:TP_FLD_DOK:ED_DOKLEVEL";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 170 , 167 ) ;
-        Size = MAP_APPFONT ( 84 , 12 ) ;
-        Text = "1" ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Hide = TRUE ;
-        Minimum = 1 ;
-        Maximum = 10 ;
-        First = 1 ;
-        SpinSize = 1 ;
-    };
-    NumericField ED_DOKDATEOFF
-    {
-        HelpID = "sw:NumericField:TP_FLD_DOK:ED_DOKDATEOFF";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 170 , 167 ) ;
-        Size = MAP_APPFONT ( 84 , 12 ) ;
-        Text = "0" ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Hide = TRUE ;
-        SpinSize = 1 ;
-    };
-    CheckBox CB_DOKFIXEDCONTENT
-    {
-        HelpID = "sw:CheckBox:TP_FLD_DOK:CB_DOKFIXEDCONTENT";
-        Pos = MAP_APPFONT ( 170 , 170 ) ;
-        Size = MAP_APPFONT ( 72 , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Fixed content" ;
-    };
-    Bitmap BMP_DOKROOT_OPENED
-    {
-        File = "plus.bmp" ;
-    };
-    Bitmap BMP_DOKROOT_CLOSED
-    {
-        File = "minus.bmp" ;
-    };
-    String STR_DOKDATEOFF
-    {
-        Text [ en-US ] = "Offs~et in days" ;
-    };
-    String STR_DOKTIMEOFF
-    {
-        Text [ en-US ] = "Offs~et in minutes" ;
-    };
-    Text [ en-US ] = "Document" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldtdlg.hrc b/sw/source/ui/fldui/fldtdlg.hrc
index 7bf0a05..0cc653a 100644
--- a/sw/source/ui/fldui/fldtdlg.hrc
+++ b/sw/source/ui/fldui/fldtdlg.hrc
@@ -66,28 +66,8 @@
 #define BT_VARDELETE        (RC_TP_VAR_START + 20)
 #define RC_TP_VAR_END       (RC_TP_VAR_START + 21)
 
-// Document-TabPage:
-#define RC_TP_DOC_START     (RC_TP_VAR_END)
-#define FT_DOKTYPE          (RC_TP_DOC_START + 1)
-#define LB_DOKTYPE          (RC_TP_DOC_START + 2)
-#define FT_DOKSELECTION     (RC_TP_DOC_START + 3)
-#define LB_DOKSELECTION     (RC_TP_DOC_START + 4)
-#define LB_DOKNUMFORMAT     (RC_TP_DOC_START + 5)
-#define LB_DOKFORMAT        (RC_TP_DOC_START + 6)
-#define FT_DOKFORMAT        (RC_TP_DOC_START + 7)
-#define FT_DOKVALUE         (RC_TP_DOC_START + 8)
-#define ED_DOKVALUE         (RC_TP_DOC_START + 9)
-#define ED_DOKLEVEL         (RC_TP_DOC_START + 10)
-#define ED_DOKDATEOFF       (RC_TP_DOC_START + 11)
-#define CB_DOKFIXEDCONTENT  (RC_TP_DOC_START + 12)
-#define STR_DOKDATEOFF      (RC_TP_DOC_START + 13)
-#define STR_DOKTIMEOFF      (RC_TP_DOC_START + 14)
-#define BMP_DOKROOT_OPENED  (RC_TP_DOC_START + 15)
-#define BMP_DOKROOT_CLOSED  (RC_TP_DOC_START + 16)
-#define RC_TP_DOC_END       (RC_TP_DOC_START + 17)
-
 // Reference-TabPage:
-#define RC_TP_REF_START     (RC_TP_DOC_END)
+#define RC_TP_REF_START     (RC_TP_VAR_END)
 #define FT_REFTYPE          (RC_TP_REF_START + 1)
 #define LB_REFTYPE          (RC_TP_REF_START + 2)
 #define FT_REFSELECTION     (RC_TP_REF_START + 3)
diff --git a/sw/uiconfig/swriter/ui/flddocinfopage.ui b/sw/uiconfig/swriter/ui/flddocinfopage.ui
index a6cdd31..913e9e0 100644
--- a/sw/uiconfig/swriter/ui/flddocinfopage.ui
+++ b/sw/uiconfig/swriter/ui/flddocinfopage.ui
@@ -195,6 +195,7 @@
   </object>
   <object class="GtkSizeGroup" id="sizegroup1">
     <property name="mode">both</property>
+    <property name="ignore_hidden">True</property>
     <widgets>
       <widget name="type:border"/>
       <widget name="select:border"/>
diff --git a/sw/uiconfig/swriter/ui/flddocumentpage.ui b/sw/uiconfig/swriter/ui/flddocumentpage.ui
new file mode 100644
index 0000000..8858ab7
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/flddocumentpage.ui
@@ -0,0 +1,360 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <!-- interface-requires LibreOffice 1.0 -->
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="lower">1</property>
+    <property name="upper">10</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkBox" id="FldDocumentPage">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="spacing">12</property>
+    <property name="homogeneous">True</property>
+    <child>
+      <object class="GtkFrame" id="typeframe">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">none</property>
+        <child>
+          <object class="GtkAlignment" id="alignment1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="top_padding">6</property>
+            <child>
+              <object class="GtkTreeView" id="type:border">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="search_column">0</property>
+                <child internal-child="selection">
+                  <object class="GtkTreeSelection" id="treeview-selection1"/>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">_Type</property>
+            <property name="use_underline">True</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkFrame" id="selectframe">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">none</property>
+        <child>
+          <object class="GtkAlignment" id="alignment2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="top_padding">6</property>
+            <child>
+              <object class="GtkTreeView" id="select:border">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <child internal-child="selection">
+                  <object class="GtkTreeSelection" id="treeview-selection3"/>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">S_elect</property>
+            <property name="use_underline">True</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkGrid" id="grid1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="row_spacing">6</property>
+        <child>
+          <object class="GtkFrame" id="formatframe">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
+            <child>
+              <object class="GtkAlignment" id="alignment3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="top_padding">6</property>
+                <child>
+                  <object class="GtkBox" id="box1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <object class="GtkTreeView" id="format:border">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="vexpand">True</property>
+                        <property name="search_column">0</property>
+                        <child internal-child="selection">
+                          <object class="GtkTreeSelection" id="treeview-selection5"/>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="swlo-NumFormatListBox" id="numformat:border">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="vexpand">True</property>
+                        <property name="entry_text_column">0</property>
+                        <property name="id_column">1</property>
+                        <property name="dropdown">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">F_ormat</property>
+                <property name="use_underline">True</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkCheckButton" id="fixed">
+            <property name="label" translatable="yes">_Fixed content</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="use_underline">True</property>
+            <property name="xalign">0</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkGrid" id="grid2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="row_spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="levelft">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Level</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">level</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="level">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">•</property>
+                <property name="invisible_char_set">True</property>
+                <property name="adjustment">adjustment1</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="offset">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">•</property>
+                <property name="invisible_char_set">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">4</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="daysft">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Offs_et in days</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">offset</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">2</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="minutesft">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Offs_et in minutes</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">offset</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">3</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">2</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkGrid" id="grid3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="row_spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="valueft">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">_Value</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">value</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="value">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">•</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">3</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkSizeGroup" id="sizegroup1">
+    <property name="mode">both</property>
+    <property name="ignore_hidden">True</property>
+    <widgets>
+      <widget name="type:border"/>
+      <widget name="select:border"/>
+      <widget name="format:border"/>
+    </widgets>
+  </object>
+</interface>
commit 650f7c168160fe5118b7b4e362b82438244ec5ba
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 19 14:16:16 2013 +0100

    prefer first visible label when presented by multiple ones
    
    Change-Id: Ie3e5e3b8a68fdfa7b5a0c985b49f69fc87449ee0

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index dec55d1..df1456d 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -9083,11 +9083,18 @@ Window* Window::GetAccessibleRelationLabeledBy() const
     if (mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabeledByWindow)
         return mpWindowImpl->mpAccessibleInfos->pLabeledByWindow;
 
-    std::vector<FixedText*> m_aMnemonicLabels(list_mnemonic_labels());
-    if (!m_aMnemonicLabels.empty())
+    std::vector<FixedText*> aMnemonicLabels(list_mnemonic_labels());
+    if (!aMnemonicLabels.empty())
     {
-        SAL_WARN_IF(m_aMnemonicLabels.size() != 1, "vcl.a11y", "TODO: multiple LabeledBy not handled yet");
-        return m_aMnemonicLabels[0];
+        //if we have multiple labels, then prefer the first that is visible
+        for (std::vector<FixedText*>::iterator
+            aI = aMnemonicLabels.begin(), aEnd = aMnemonicLabels.end(); aI != aEnd; ++aI)
+        {
+            Window *pCandidate = *aI;
+            if (pCandidate->IsVisible())
+                return pCandidate;
+        }
+        return aMnemonicLabels[0];
     }
 
     if (!isContainerWindow(this) && !isContainerWindow(GetParent()))


More information about the Libreoffice-commits mailing list