[Libreoffice-commits] core.git: sw/source sw/uiconfig sw/UIConfig_swriter.mk

Csikós Tamás csks.tomi at gmail.com
Fri Jul 12 02:38:06 PDT 2013


 sw/UIConfig_swriter.mk               |    1 
 sw/source/ui/frmdlg/frmpage.cxx      |  267 +++++++++++------------
 sw/source/ui/frmdlg/frmpage.hrc      |   16 -
 sw/source/ui/frmdlg/frmpage.src      |  158 -------------
 sw/source/ui/inc/frmpage.hxx         |   41 +--
 sw/uiconfig/swriter/ui/frmaddpage.ui |  403 +++++++++++++++++++++++++++++++++++
 6 files changed, 556 insertions(+), 330 deletions(-)

New commits:
commit 78f5ef0a36f1484b533197136279821497bc4151
Author: Csikós Tamás <csks.tomi at gmail.com>
Date:   Thu Jul 11 18:56:17 2013 +0200

    modern .ui widgetlayout for frmpage/frmaddpage
    
    Change-Id: Idbc62b17551398b80711c5a4a4a6c8346580e73e
    Reviewed-on: https://gerrit.libreoffice.org/4843
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index c4a09e5..7096808 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -87,6 +87,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
 	sw/uiconfig/swriter/ui/footendnotedialog \
 	sw/uiconfig/swriter/ui/footnotepage \
 	sw/uiconfig/swriter/ui/footnoteareapage \
+	sw/uiconfig/swriter/ui/frmaddpage \
 	sw/uiconfig/swriter/ui/indexentry \
 	sw/uiconfig/swriter/ui/inputfielddialog \
 	sw/uiconfig/swriter/ui/insertbookmark \
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 274998f..47e98bc 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2741,29 +2741,7 @@ static void lcl_Move(Window& rWin, sal_Int32 nDiff)
 }
 
 SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) :
-    SfxTabPage(pParent,     SW_RES(TP_FRM_ADD), rSet),
-
-    aNamesFL           (this, SW_RES(FL_NAME)),
-    aNameFT            (this, SW_RES(FT_NAME)),
-    aNameED            (this, SW_RES(ED_NAME)),
-    aAltNameFT         (this, SW_RES(FT_ALT_NAME)),
-    aAltNameED         (this, SW_RES(ED_ALT_NAME)),
-    aPrevFT            (this, SW_RES(FT_PREV)),
-    aPrevLB            (this, SW_RES(LB_PREV)),
-    aNextFT            (this, SW_RES(FT_NEXT)),
-    aNextLB            (this, SW_RES(LB_NEXT)),
-
-    aProtectFL         (this, SW_RES(FL_PROTECT)),
-    aProtectContentCB  (this, SW_RES(CB_PROTECT_CONTENT)),
-    aProtectFrameCB    (this, SW_RES(CB_PROTECT_FRAME)),
-    aProtectSizeCB     (this, SW_RES(CB_PROTECT_SIZE)),
-    aExtFL             (this, SW_RES(FL_EXT)),
-
-    aEditInReadonlyCB  (this, SW_RES(CB_EDIT_IN_READONLY)),
-    aPrintFrameCB      (this, SW_RES(CB_PRINT_FRAME)),
-    aTextFlowFT        (this, SW_RES(FT_TEXTFLOW)),
-    aTextFlowLB        (this, SW_RES(LB_TEXTFLOW)),
-
+    SfxTabPage(pParent, "FrmAddPage" , "modules/swriter/ui/frmaddpage.ui", rSet),
     pWrtSh(0),
 
     nDlgType(0),
@@ -2771,7 +2749,26 @@ SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) :
     bFormat(sal_False),
     bNew(sal_False)
 {
-    FreeResource();
+    get(pNamesFT,"");
+    get(pNameFT,"name_label");
+    get(pNameED,"name");
+    get(pAltNameFT,"altname_label");
+    get(pAltNameED,"altname");
+    get(pPrevFT,"prev_label");
+    get(pPrevLB,"prev");
+    get(pNextFT,"next_label");
+    get(pNextLB,"next");
+    get(pProtectFT,"label1");
+
+    get(pProtectContentCB,"protectcontent");
+    get(pProtectFrameCB,"protectframe");
+    get(pProtectSizeCB,"protectsize");
+    get(pExtFT,"label2");
+
+    get(pEditInReadonlyCB,"editinreadonly");
+    get(pPrintFrameCB,"printframe");
+    get(pTextFlowFT,"textflow_label");
+    get(pTextFlowLB,"textflow");
 
 }
 
@@ -2791,24 +2788,24 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
     bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
     if(bHtmlMode)
     {
-        aProtectContentCB .Hide();
-        aProtectFrameCB   .Hide();
-        aProtectSizeCB    .Hide();
-        aEditInReadonlyCB .Hide();
-        aPrintFrameCB     .Hide();
-        aExtFL            .Hide();
-        aProtectFL.Hide();
+        pProtectContentCB->Hide();
+        pProtectFrameCB->Hide();
+        pProtectSizeCB->Hide();
+        pEditInReadonlyCB->Hide();
+        pPrintFrameCB->Hide();
+        pExtFT->Hide();
+        pProtectFT->Hide();
     }
     if ( DLG_FRM_GRF == nDlgType || DLG_FRM_OLE == nDlgType )
     {
-        aEditInReadonlyCB.Hide();
-        aPrintFrameCB.SetPosPixel(aEditInReadonlyCB.GetPosPixel());
+        pEditInReadonlyCB->Hide();
+        pPrintFrameCB->SetPosPixel(pEditInReadonlyCB->GetPosPixel());
     }
 
     if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_ALT_NAME, sal_False, &pItem))
     {
-        aAltNameED.SetText(((const SfxStringItem*)pItem)->GetValue());
-        aAltNameED.SaveValue();
+        pAltNameED->SetText(((const SfxStringItem*)pItem)->GetValue());
+        pAltNameED->SaveValue();
     }
 
     if(!bFormat)
@@ -2837,50 +2834,50 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
                     break;
             }
 
-        aNameED.SetText( aTmpName1 );
-        aNameED.SaveValue();
+        pNameED->SetText( aTmpName1 );
+        pNameED->SaveValue();
     }
     else
     {
-        aNameED.Enable( sal_False );
-        aAltNameED.Enable(sal_False);
-        aNameFT.Enable( sal_False );
-        aAltNameFT.Enable(sal_False);
-        aNamesFL.Enable(sal_False);
+        pNameED->Enable( sal_False );
+        pAltNameED->Enable(sal_False);
+        pNameFT->Enable( sal_False );
+        pAltNameFT->Enable(sal_False);
+        pNamesFT->Enable(sal_False);
     }
-    if(nDlgType == DLG_FRM_STD && aAltNameFT.IsVisible())
+    if(nDlgType == DLG_FRM_STD && pAltNameFT->IsVisible())
     {
-        aAltNameFT.Hide();
-        aAltNameED.Hide();
+        pAltNameFT->Hide();
+        pAltNameED->Hide();
         //move all controls one step up
-        Window* aWindows[] =
+        /*Window* aWindows[] =
         {
-            &aPrevFT,
-            &aPrevLB,
-            &aNextFT,
-            &aNextLB,
-            &aNamesFL,
-            &aProtectContentCB,
-            &aProtectFrameCB,
-            &aProtectSizeCB,
-            &aProtectFL,
-            &aEditInReadonlyCB,
-            &aPrintFrameCB,
-            &aTextFlowFT,
-            &aTextFlowLB,
-            &aExtFL,
+            pPrevFT,
+            pPrevLB,
+            pNextFT,
+            pNextLB,
+            pNamesFT,
+            pProtectContentCB,
+            pProtectFrameCB,
+            pProtectSizeCB,
+            pProtectFT,
+            pEditInReadonlyCB,
+            pPrintFrameCB,
+            pTextFlowFT,
+            pTextFlowLB,
+            pExtFT,
             0
         };
-        sal_Int32 nOffset = aAltNameED.GetPosPixel().Y() - aNameED.GetPosPixel().Y();
+        sal_Int32 nOffset = pAltNameED->GetPosPixel().Y() - pNameED->GetPosPixel().Y();
         sal_Int32 nIdx = 0;
         while(aWindows[nIdx])
         {
             lcl_Move(*aWindows[nIdx++], nOffset);
-        }
+        }*/
     }
     else
     {
-        aNameED.SetModifyHdl(LINK(this, SwFrmAddPage, EditModifyHdl));
+        pNameED->SetModifyHdl(LINK(this, SwFrmAddPage, EditModifyHdl));
     }
 
     if (!bNew)
@@ -2908,15 +2905,15 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
             ::std::vector< String > aRemainFrames;
             pWrtSh->GetConnectableFrmFmts(*pFmt, sNextChain, sal_False,
                             aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames );
-            lcl_InsertVectors(aPrevLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames);
+            lcl_InsertVectors(*pPrevLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames);
             if(sPrevChain.Len())
             {
-                if(LISTBOX_ENTRY_NOTFOUND == aPrevLB.GetEntryPos(sPrevChain))
-                    aPrevLB.InsertEntry(sPrevChain, 1);
-                aPrevLB.SelectEntry(sPrevChain);
+                if(LISTBOX_ENTRY_NOTFOUND == pPrevLB->GetEntryPos(sPrevChain))
+                    pPrevLB->InsertEntry(sPrevChain, 1);
+                pPrevLB->SelectEntry(sPrevChain);
             }
             else
-                aPrevLB.SelectEntryPos(0);
+                pPrevLB->SelectEntryPos(0);
             aPrevPageFrames.erase(aPrevPageFrames.begin(), aPrevPageFrames.end());
             aNextPageFrames.erase(aNextPageFrames.begin(), aNextPageFrames.end());
             aThisPageFrames.erase(aThisPageFrames.begin(), aThisPageFrames.end());
@@ -2924,32 +2921,32 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
 
             pWrtSh->GetConnectableFrmFmts(*pFmt, sPrevChain, sal_True,
                             aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames );
-            lcl_InsertVectors(aNextLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames);
+            lcl_InsertVectors(*pNextLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames);
             if(sNextChain.Len())
             {
-                if(LISTBOX_ENTRY_NOTFOUND == aNextLB.GetEntryPos(sNextChain))
-                    aNextLB.InsertEntry(sNextChain, 1);
-                aNextLB.SelectEntry(sNextChain);
+                if(LISTBOX_ENTRY_NOTFOUND == pNextLB->GetEntryPos(sNextChain))
+                    pNextLB->InsertEntry(sNextChain, 1);
+                pNextLB->SelectEntry(sNextChain);
             }
             else
-                aNextLB.SelectEntryPos(0);
+                pNextLB->SelectEntryPos(0);
             Link aLink(LINK(this, SwFrmAddPage, ChainModifyHdl));
-            aPrevLB.SetSelectHdl(aLink);
-            aNextLB.SetSelectHdl(aLink);
+            pPrevLB->SetSelectHdl(aLink);
+            pNextLB->SetSelectHdl(aLink);
         }
     }
     // Pos Protected
     const SvxProtectItem& rProt = (const SvxProtectItem& )rSet.Get(RES_PROTECT);
-    aProtectFrameCB.Check(rProt.IsPosProtected());
-    aProtectContentCB.Check(rProt.IsCntntProtected());
-    aProtectSizeCB.Check(rProt.IsSizeProtected());
+    pProtectFrameCB->Check(rProt.IsPosProtected());
+    pProtectContentCB->Check(rProt.IsCntntProtected());
+    pProtectSizeCB->Check(rProt.IsSizeProtected());
 
     const SwFmtEditInReadonly& rEdit = (const SwFmtEditInReadonly& )rSet.Get(RES_EDIT_IN_READONLY);
-    aEditInReadonlyCB.Check(rEdit.GetValue());          aEditInReadonlyCB.SaveValue();
+    pEditInReadonlyCB->Check(rEdit.GetValue());          pEditInReadonlyCB->SaveValue();
 
     // print
     const SvxPrintItem& rPrt = (const SvxPrintItem&)rSet.Get(RES_PRINT);
-    aPrintFrameCB.Check(rPrt.GetValue());               aPrintFrameCB.SaveValue();
+    pPrintFrameCB->Check(rPrt.GetValue());               pPrintFrameCB->SaveValue();
 
     // textflow
     SfxItemState eState;
@@ -2958,60 +2955,60 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
         SFX_ITEM_UNKNOWN != ( eState = rSet.GetItemState(
                                         RES_FRAMEDIR, sal_True )) )
     {
-        aTextFlowFT.Show();
-        aTextFlowLB.Show();
+        pTextFlowFT->Show();
+        pTextFlowLB->Show();
 
         //vertical text flow is not possible in HTML
         if(bHtmlMode)
         {
             sal_uLong nData = FRMDIR_VERT_TOP_RIGHT;
-            aTextFlowLB.RemoveEntry(aTextFlowLB.GetEntryPos((void*)nData));
+            pTextFlowLB->RemoveEntry(pTextFlowLB->GetEntryPos((void*)nData));
         }
         sal_uInt16 nPos, nVal = ((SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR)).GetValue();
-        for( nPos = aTextFlowLB.GetEntryCount(); nPos; )
-            if( (sal_uInt16)(sal_IntPtr)aTextFlowLB.GetEntryData( --nPos ) == nVal )
+        for( nPos = pTextFlowLB->GetEntryCount(); nPos; )
+            if( (sal_uInt16)(sal_IntPtr)pTextFlowLB->GetEntryData( --nPos ) == nVal )
                 break;
-        aTextFlowLB.SelectEntryPos( nPos );
-        aTextFlowLB.SaveValue();
+        pTextFlowLB->SelectEntryPos( nPos );
+        pTextFlowLB->SaveValue();
     }
     else
     {
-        aTextFlowFT.Hide();
-        aTextFlowLB.Hide();
+        pTextFlowFT->Hide();
+        pTextFlowLB->Hide();
     }
 }
 
 sal_Bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
 {
     sal_Bool bRet = sal_False;
-    if (aNameED.GetText() != aNameED.GetSavedValue())
-        bRet |= 0 != rSet.Put(SfxStringItem(FN_SET_FRM_NAME, aNameED.GetText()));
-    if (aAltNameED.GetText()  != aAltNameED.GetSavedValue())
-        bRet |= 0 != rSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, aAltNameED.GetText()));
+    if (pNameED->GetText() != pNameED->GetSavedValue())
+        bRet |= 0 != rSet.Put(SfxStringItem(FN_SET_FRM_NAME, pNameED->GetText()));
+    if (pAltNameED->GetText()  != pAltNameED->GetSavedValue())
+        bRet |= 0 != rSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, pAltNameED->GetText()));
 
     const SfxPoolItem* pOldItem;
     SvxProtectItem aProt ( (const SvxProtectItem& )GetItemSet().Get(RES_PROTECT) );
-    aProt.SetCntntProtect( aProtectContentCB.IsChecked() );
-    aProt.SetSizeProtect ( aProtectSizeCB.IsChecked() );
-    aProt.SetPosProtect  ( aProtectFrameCB.IsChecked() );
+    aProt.SetCntntProtect( pProtectContentCB->IsChecked() );
+    aProt.SetSizeProtect ( pProtectSizeCB->IsChecked() );
+    aProt.SetPosProtect  ( pProtectFrameCB->IsChecked() );
     if ( 0 == (pOldItem = GetOldItem(rSet, FN_SET_PROTECT)) ||
                 aProt != *pOldItem )
         bRet |= 0 != rSet.Put( aProt);
 
     sal_Bool bChecked;
-    if ( (bChecked = aEditInReadonlyCB.IsChecked()) != aEditInReadonlyCB.GetSavedValue() )
+    if ( (bChecked = pEditInReadonlyCB->IsChecked()) != pEditInReadonlyCB->GetSavedValue() )
         bRet |= 0 != rSet.Put( SwFmtEditInReadonly( RES_EDIT_IN_READONLY, bChecked));
 
-    if ( (bChecked = aPrintFrameCB.IsChecked()) != aPrintFrameCB.GetSavedValue() )
+    if ( (bChecked = pPrintFrameCB->IsChecked()) != pPrintFrameCB->GetSavedValue() )
         bRet |= 0 != rSet.Put( SvxPrintItem( RES_PRINT, bChecked));
 
     // textflow
-    if( aTextFlowLB.IsVisible() )
+    if( pTextFlowLB->IsVisible() )
     {
-        sal_uInt16 nPos = aTextFlowLB.GetSelectEntryPos();
-        if( nPos != aTextFlowLB.GetSavedValue() )
+        sal_uInt16 nPos = pTextFlowLB->GetSelectEntryPos();
+        if( nPos != pTextFlowLB->GetSavedValue() )
         {
-            nPos = (sal_uInt16)(sal_IntPtr)aTextFlowLB.GetEntryData( nPos );
+            nPos = (sal_uInt16)(sal_IntPtr)pTextFlowLB->GetEntryData( nPos );
             bRet |= 0 != rSet.Put( SvxFrameDirectionItem(
                                     (SvxFrameDirection)nPos, RES_FRAMEDIR ));
         }
@@ -3022,10 +3019,10 @@ sal_Bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
         if (pFmt)
         {
             String sCurrentPrevChain, sCurrentNextChain;
-            if(aPrevLB.GetSelectEntryPos())
-                sCurrentPrevChain = aPrevLB.GetSelectEntry();
-            if(aNextLB.GetSelectEntryPos())
-                sCurrentNextChain = aNextLB.GetSelectEntry();
+            if(pPrevLB->GetSelectEntryPos())
+                sCurrentPrevChain = pPrevLB->GetSelectEntry();
+            if(pNextLB->GetSelectEntryPos())
+                sCurrentNextChain = pNextLB->GetSelectEntry();
             const SwFmtChain &rChain = pFmt->GetChain();
             const SwFlyFrmFmt* pFlyFmt;
             String sNextChain, sPrevChain;
@@ -3050,9 +3047,9 @@ sal_uInt16* SwFrmAddPage::GetRanges()
 
 IMPL_LINK_NOARG(SwFrmAddPage, EditModifyHdl)
 {
-    sal_Bool bEnable = !aNameED.GetText().isEmpty();
-    aAltNameED.Enable(bEnable);
-    aAltNameFT.Enable(bEnable);
+    sal_Bool bEnable = !pNameED->GetText().isEmpty();
+    pAltNameED->Enable(bEnable);
+    pAltNameFT->Enable(bEnable);
 
     return 0;
 }
@@ -3062,28 +3059,28 @@ void    SwFrmAddPage::SetFormatUsed(sal_Bool bFmt)
     bFormat  = bFmt;
     if(bFormat)
     {
-        aNameFT.Show(sal_False);
-        aNameED.Show(sal_False);
-        aAltNameFT.Show(sal_False);
-        aAltNameED.Show(sal_False);
-        aPrevFT.Show(sal_False);
-        aPrevLB.Show(sal_False);
-        aNextFT.Show(sal_False);
-        aNextLB.Show(sal_False);
-        aNamesFL.Show(sal_False);
-
-        sal_Int32 nDiff = aExtFL.GetPosPixel().Y() - aNamesFL.GetPosPixel().Y();
+        pNameFT->Show(sal_False);
+        pNameED->Show(sal_False);
+        pAltNameFT->Show(sal_False);
+        pAltNameED->Show(sal_False);
+        pPrevFT->Show(sal_False);
+        pPrevLB->Show(sal_False);
+        pNextFT->Show(sal_False);
+        pNextLB->Show(sal_False);
+        pNamesFT->Show(sal_False);
+
+        sal_Int32 nDiff = pExtFT->GetPosPixel().Y() - pNamesFT->GetPosPixel().Y();
         Window* aWindows[] =
         {
-            &aProtectContentCB,
-            &aProtectFrameCB,
-            &aProtectSizeCB,
-            &aProtectFL,
-            &aEditInReadonlyCB,
-            &aPrintFrameCB,
-            &aExtFL,
-            &aTextFlowFT,
-            &aTextFlowLB,
+            pProtectContentCB,
+            pProtectFrameCB,
+            pProtectSizeCB,
+            pProtectFT,
+            pEditInReadonlyCB,
+            pPrintFrameCB,
+            pExtFT,
+            pTextFlowFT,
+            pTextFlowLB,
             0
         };
         sal_Int32 nIdx = 0;
@@ -3095,15 +3092,15 @@ void    SwFrmAddPage::SetFormatUsed(sal_Bool bFmt)
 IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox)
 {
     String sCurrentPrevChain, sCurrentNextChain;
-    if(aPrevLB.GetSelectEntryPos())
-        sCurrentPrevChain = aPrevLB.GetSelectEntry();
-    if(aNextLB.GetSelectEntryPos())
-        sCurrentNextChain = aNextLB.GetSelectEntry();
+    if(pPrevLB->GetSelectEntryPos())
+        sCurrentPrevChain = pPrevLB->GetSelectEntry();
+    if(pNextLB->GetSelectEntryPos())
+        sCurrentNextChain = pNextLB->GetSelectEntry();
     SwFrmFmt* pFmt = pWrtSh->GetFlyFrmFmt();
     if (pFmt)
     {
-        bool bNextBox = &aNextLB == pBox;
-        ListBox& rChangeLB = bNextBox ? aPrevLB : aNextLB;
+        bool bNextBox = pNextLB == pBox;
+        ListBox& rChangeLB = bNextBox ? *pPrevLB : *pNextLB;
         for(sal_uInt16 nEntry = rChangeLB.GetEntryCount(); nEntry > 1; nEntry--)
             rChangeLB.RemoveEntry(nEntry - 1);
         //determine chainable frames
diff --git a/sw/source/ui/frmdlg/frmpage.hrc b/sw/source/ui/frmdlg/frmpage.hrc
index 2438675..e44fc42 100644
--- a/sw/source/ui/frmdlg/frmpage.hrc
+++ b/sw/source/ui/frmdlg/frmpage.hrc
@@ -113,23 +113,7 @@
 
 #define FT_NAME                 110
 #define ED_NAME                 111
-#define FT_ALT_NAME             112
-#define ED_ALT_NAME             113
-#define FT_PREV                 114
-#define LB_PREV                 115
-#define FT_NEXT                 116
-#define LB_NEXT                 117
-#define FL_NAME                 118
-#define CB_PROTECT_CONTENT      119
-#define CB_PROTECT_FRAME        120
-#define CB_PROTECT_SIZE         121
-#define FL_PROTECT              122
-#define CB_EDIT_IN_READONLY     123
-#define CB_PRINT_FRAME          124
-#define FL_EXT                  125
 #define FL_TYPE_SEP             126
-#define FT_TEXTFLOW             127
-#define LB_TEXTFLOW             128
 #define CB_FOLLOWTEXTFLOW       129
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/frmdlg/frmpage.src b/sw/source/ui/frmdlg/frmpage.src
index e87d99f..9223bce 100644
--- a/sw/source/ui/frmdlg/frmpage.src
+++ b/sw/source/ui/frmdlg/frmpage.src
@@ -705,162 +705,4 @@ TabPage TP_FRM_URL
         Text [ en-US ] = "Image map" ;
     };
 };
-TabPage TP_FRM_ADD
-{
-    Hide = TRUE ;
-    SVLook = TRUE ;
-    HelpID = HID_FRM_ADD ;
-    Pos = MAP_APPFONT ( 0 , 0 ) ;
-    Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-    FixedText FT_NAME
-    {
-        Pos = MAP_APPFONT ( 12 , 16 ) ;
-        Size = MAP_APPFONT ( 75 , 8 ) ;
-        Text [ en-US ] = "~Name" ;
-    };
-    Edit ED_NAME
-    {
-        HelpID = "sw:Edit:TP_FRM_ADD:ED_NAME";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 91 , 14 ) ;
-        Size = MAP_APPFONT ( 157 , 12 ) ;
-        TabStop = TRUE ;
-    };
-    FixedText FT_ALT_NAME
-    {
-        Pos = MAP_APPFONT ( 12 , 32 ) ;
-        Size = MAP_APPFONT ( 75 , 8 ) ;
-        Text [ en-US ] = "~Alternative (Text only)" ;
-    };
-    Edit ED_ALT_NAME
-    {
-        HelpID = "sw:Edit:TP_FRM_ADD:ED_ALT_NAME";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 91 , 30 ) ;
-        Size = MAP_APPFONT ( 157 , 12 ) ;
-        TabStop = TRUE ;
-    };
-    FixedText FT_PREV
-    {
-        Pos = MAP_APPFONT ( 12 , 48 ) ;
-        Size = MAP_APPFONT ( 75 , 8 ) ;
-        Text [ en-US ] = "~Previous link" ;
-    };
-    ListBox LB_PREV
-    {
-        HelpID = "sw:ListBox:TP_FRM_ADD:LB_PREV";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 91 , 46 ) ;
-        Size = MAP_APPFONT ( 157 , 50 ) ;
-        TabStop = TRUE ;
-        DropDown = TRUE;
-        StringList [ en-US ] =
-        {
-            < "<None>" ; > ;
-        };
-    };
-    FixedText FT_NEXT
-    {
-        Pos = MAP_APPFONT ( 12 , 64 ) ;
-        Size = MAP_APPFONT ( 75 , 8 ) ;
-        Text [ en-US ] = "~Next link" ;
-    };
-    ListBox LB_NEXT
-    {
-        HelpID = "sw:ListBox:TP_FRM_ADD:LB_NEXT";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 91 , 62 ) ;
-        Size = MAP_APPFONT ( 157 , 50 ) ;
-        Border = TRUE;
-        DropDown = TRUE;
-        StringList [ en-US ] =
-        {
-            < "<None>" ; > ;
-        };
-    };
-    FixedLine FL_NAME
-    {
-        Pos = MAP_APPFONT ( 6 , 3 ) ;
-        Size = MAP_APPFONT ( 248 , 8 ) ;
-        Text [ en-US ] = "Names" ;
-    };
-    CheckBox CB_PROTECT_CONTENT
-    {
-        HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PROTECT_CONTENT";
-        Pos = MAP_APPFONT ( 12 , 91 ) ;
-        Size = MAP_APPFONT ( 80 , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Contents" ;
-    };
-    CheckBox CB_PROTECT_FRAME
-    {
-        HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PROTECT_FRAME";
-        Pos = MAP_APPFONT ( 12 , 105 ) ;
-        Size = MAP_APPFONT ( 80 , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "P~osition" ;
-    };
-    CheckBox CB_PROTECT_SIZE
-    {
-        HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PROTECT_SIZE";
-        Pos = MAP_APPFONT ( 12 , 119 ) ;
-        Size = MAP_APPFONT ( 80 , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Size" ;
-    };
-    FixedLine FL_PROTECT
-    {
-        Pos = MAP_APPFONT ( 6 , 80 ) ;
-        Size = MAP_APPFONT ( 248 , 8 ) ;
-        Text [ en-US ] = "Protect" ;
-    };
-    CheckBox CB_EDIT_IN_READONLY
-    {
-        HelpID = "sw:CheckBox:TP_FRM_ADD:CB_EDIT_IN_READONLY";
-        Pos = MAP_APPFONT ( 12 , 146 ) ;
-        Size = MAP_APPFONT ( 236 , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Editable in read-only document" ;
-    };
-    CheckBox CB_PRINT_FRAME
-    {
-        HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PRINT_FRAME";
-        Pos = MAP_APPFONT ( 12 , 160 ) ;
-        Size = MAP_APPFONT ( 236 , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "Prin~t" ;
-    };
-    FixedLine FL_EXT
-    {
-        Pos = MAP_APPFONT ( 6 , 135 ) ;
-        Size = MAP_APPFONT ( 248 , 8 ) ;
-        Text [ en-US ] = "Properties";
-    };
-
-    FixedText FT_TEXTFLOW
-    {
-        Pos = MAP_APPFONT ( 12 , 174 ) ;
-        Size = MAP_APPFONT ( 65 , 8 ) ;
-        Left = TRUE ;
-        Hide = TRUE ;
-        Text [ en-US ] = "~Text direction";
-    };
-    ListBox LB_TEXTFLOW
-    {
-        HelpID = "sw:ListBox:TP_FRM_ADD:LB_TEXTFLOW";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 81 , 172 ) ;
-        Size = MAP_APPFONT ( 167 , 50 ) ;
-        DropDown = TRUE ;
-        Hide = TRUE ;
-    StringList [ en-US ] =
-    {
-         < "Left-to-right (horizontal)" ; 0; > ;
-        < "Right-to-left (horizontal)" ; 1; > ;
-        < "Right-to-left (vertical)" ; 2; > ;
-        < "Use superordinate object settings" ; 4; > ;
-    };
-    };
-};
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx
index e2e0c02..a47406d 100644
--- a/sw/source/ui/inc/frmpage.hxx
+++ b/sw/source/ui/inc/frmpage.hxx
@@ -274,27 +274,26 @@ public:
 
 class SwFrmAddPage : public SfxTabPage
 {
-      FixedLine   aNamesFL;
-    FixedText   aNameFT;
-    Edit        aNameED;
-    FixedText   aAltNameFT;
-    Edit        aAltNameED;
-    FixedText   aPrevFT;
-    ListBox     aPrevLB;
-    FixedText   aNextFT;
-    ListBox     aNextLB;
-        FixedLine   aProtectFL;
-
-    CheckBox    aProtectContentCB;
-    CheckBox    aProtectFrameCB;
-    CheckBox    aProtectSizeCB;
-    FixedLine   aExtFL;
-
-    CheckBox    aEditInReadonlyCB;
-    CheckBox    aPrintFrameCB;
-    FixedText   aTextFlowFT;
-    ListBox     aTextFlowLB;
-
+    FixedText*   pNamesFT;
+    FixedText*   pNameFT;
+    Edit*        pNameED;
+    FixedText*   pAltNameFT;
+    Edit*        pAltNameED;
+    FixedText*   pPrevFT;
+    ListBox*     pPrevLB;
+    FixedText*   pNextFT;
+    ListBox*     pNextLB;
+    FixedText*   pProtectFT;
+
+    CheckBox*    pProtectContentCB;
+    CheckBox*    pProtectFrameCB;
+    CheckBox*    pProtectSizeCB;
+    FixedText*   pExtFT;
+
+    CheckBox*    pEditInReadonlyCB;
+    CheckBox*    pPrintFrameCB;
+    FixedText*   pTextFlowFT;
+    ListBox*     pTextFlowLB;
 
     SwWrtShell* pWrtSh;
 
diff --git a/sw/uiconfig/swriter/ui/frmaddpage.ui b/sw/uiconfig/swriter/ui/frmaddpage.ui
new file mode 100644
index 0000000..0fef3af
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/frmaddpage.ui
@@ -0,0 +1,403 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkBox" id="FrmAddPage">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="orientation">vertical</property>
+    <property name="spacing">12</property>
+    <child>
+      <object class="GtkFrame" id="frame1">
+        <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="vexpand">True</property>
+            <property name="top_padding">6</property>
+            <property name="left_padding">12</property>
+            <child>
+              <object class="GtkGrid" id="grid1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="row_spacing">6</property>
+                <property name="column_spacing">12</property>
+                <child>
+                  <object class="GtkEntry" id="name">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="halign">start</property>
+                    <property name="invisible_char">●</property>
+                    <property name="width_chars">50</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="altname">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="halign">start</property>
+                    <property name="invisible_char">●</property>
+                    <property name="width_chars">50</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="name_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Name:</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">name</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="altname_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Alternative (Text only):</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">altname</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="GtkComboBoxText" id="prev">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <items>
+                      <item>None</item>
+                    </items>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBoxText" id="next">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <items>
+                      <item>None</item>
+                    </items>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="prev_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Previous link:</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">prev</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="next_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Next link:</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">next</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>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Names</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="frame2">
+        <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="vexpand">True</property>
+            <property name="top_padding">6</property>
+            <property name="left_padding">12</property>
+            <child>
+              <object class="GtkGrid" id="grid2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="row_spacing">6</property>
+                <property name="column_spacing">12</property>
+                <child>
+                  <object class="GtkCheckButton" id="protectcontent">
+                    <property name="label" translatable="yes">_Contents</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">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="protectframe">
+                    <property name="label" translatable="yes">P_osition</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="GtkCheckButton" id="protectsize">
+                    <property name="label" translatable="yes">_Size</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</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>
+              </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="label" translatable="yes">Protect</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="GtkFrame" id="frame3">
+        <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>
+            <property name="left_padding">12</property>
+            <child>
+              <object class="GtkGrid" id="grid3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="row_spacing">6</property>
+                <property name="column_spacing">12</property>
+                <child>
+                  <object class="GtkCheckButton" id="editinreadonly">
+                    <property name="label" translatable="yes">_Editable in read-only document</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">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="printframe">
+                    <property name="label" translatable="yes">Prin_t</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="grid4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <property name="row_spacing">6</property>
+                    <property name="column_spacing">12</property>
+                    <child>
+                      <object class="GtkComboBox" id="textflow">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="halign">end</property>
+                        <items>
+                          <item>Left-to-right (horizontal)</item>
+                          <item>Right-to-left (horizontal)</item>
+                          <item>Right-to-left (vertical)</item>
+                          <item>Use superordinate object settings</item>
+                        </items>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">0</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="textflow_label">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">_Text direction:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">textflow</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>
+                  </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>
+              </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="label" translatable="yes">Properties</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">2</property>
+      </packing>
+    </child>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list