[Libreoffice-commits] core.git: sc/source sc/uiconfig sc/UIConfig_scalc.mk

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


 sc/UIConfig_scalc.mk                     |    1 
 sc/source/ui/inc/areasdlg.hxx            |   36 +--
 sc/source/ui/pagedlg/areasdlg.cxx        |  205 +++++++++---------
 sc/source/ui/pagedlg/pagedlg.hrc         |   22 -
 sc/source/ui/pagedlg/pagedlg.src         |  132 -----------
 sc/uiconfig/scalc/ui/printareasdialog.ui |  348 +++++++++++++++++++++++++++++++
 6 files changed, 471 insertions(+), 273 deletions(-)

New commits:
commit 9f0644d62f5d54a8d2788f358c850df2fcb1516b
Author: Csikós Tamás <csks.tomi at gmail.com>
Date:   Fri Jul 12 15:50:41 2013 +0200

    modern .ui widgetlayout for areasdlg/printareasdlg
    
    Change-Id: I91ae85f6ca896bdc91d43654213a079480e627e0
    Reviewed-on: https://gerrit.libreoffice.org/4866
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 72e7547..ddf13e8 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -88,6 +88,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
 	sc/uiconfig/scalc/ui/optdlg \
 	sc/uiconfig/scalc/ui/optformula \
 	sc/uiconfig/scalc/ui/optsortlists \
+	sc/uiconfig/scalc/ui/printareasdialog \
 	sc/uiconfig/scalc/ui/printeroptions \
 	sc/uiconfig/scalc/ui/protectsheetdlg \
 	sc/uiconfig/scalc/ui/rightfooterdialog \
diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx
index 64c33ce..9f0a03e 100644
--- a/sc/source/ui/inc/areasdlg.hxx
+++ b/sc/source/ui/inc/areasdlg.hxx
@@ -48,24 +48,24 @@ public:
     virtual sal_Bool    Close();
 
 private:
-    FixedLine       aFlPrintArea;
-    ListBox         aLbPrintArea;
-    formula::RefEdit        aEdPrintArea;
-    formula::RefButton      aRbPrintArea;
-
-    FixedLine       aFlRepeatRow;
-    ListBox         aLbRepeatRow;
-    formula::RefEdit        aEdRepeatRow;
-    formula::RefButton      aRbRepeatRow;
-
-    FixedLine       aFlRepeatCol;
-    ListBox         aLbRepeatCol;
-    formula::RefEdit        aEdRepeatCol;
-    formula::RefButton      aRbRepeatCol;
-
-    OKButton        aBtnOk;
-    CancelButton    aBtnCancel;
-    HelpButton      aBtnHelp;
+    FixedLine*               pFlPrintArea;
+    ListBox*                 pLbPrintArea;
+    formula::RefEdit*        pEdPrintArea;
+    formula::RefButton*      pRbPrintArea;
+
+    FixedLine*               pFlRepeatRow;
+    ListBox*                 pLbRepeatRow;
+    formula::RefEdit*        pEdRepeatRow;
+    formula::RefButton*      pRbRepeatRow;
+
+    FixedLine*               pFlRepeatCol;
+    ListBox*                 pLbRepeatCol;
+    formula::RefEdit*        pEdRepeatCol;
+    formula::RefButton*      pRbRepeatCol;
+
+    OKButton*        pBtnOk;
+    CancelButton*    pBtnCancel;
+    HelpButton*      pBtnHelp;
 
     sal_Bool            bDlgLostFocus;
     formula::RefEdit*       pRefInputEdit;
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 1235314..97b8a16 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -105,33 +105,38 @@ static void printAddressFlags(sal_uInt16 nFlag)
 //----------------------------------------------------------------------------
 
 ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent )
-    :   ScAnyRefDlg     ( pB, pCW, pParent, RID_SCDLG_AREAS),
-        //
-        aFlPrintArea    ( this, ScResId( FL_PRINTAREA ) ),
-        aLbPrintArea    ( this, ScResId( LB_PRINTAREA ) ),
-        aEdPrintArea    ( this, this, &aFlPrintArea, ScResId( ED_PRINTAREA ) ),
-        aRbPrintArea    ( this, ScResId( RB_PRINTAREA ), &aEdPrintArea, this ),
-        //
-        aFlRepeatRow    ( this, ScResId( FL_REPEATROW ) ),
-        aLbRepeatRow    ( this, ScResId( LB_REPEATROW ) ),
-        aEdRepeatRow    ( this, this, &aFlRepeatRow, ScResId( ED_REPEATROW ) ),
-        aRbRepeatRow    ( this, ScResId( RB_REPEATROW ), &aEdRepeatRow, this ),
-        //
-        aFlRepeatCol    ( this, ScResId( FL_REPEATCOL ) ),
-        aLbRepeatCol    ( this, ScResId( LB_REPEATCOL ) ),
-        aEdRepeatCol    ( this, this, &aFlRepeatCol, ScResId( ED_REPEATCOL ) ),
-        aRbRepeatCol    ( this, ScResId( RB_REPEATCOL ), &aEdRepeatCol, this ),
-        //
-        aBtnOk          ( this, ScResId( BTN_OK ) ),
-        aBtnCancel      ( this, ScResId( BTN_CANCEL ) ),
-        aBtnHelp        ( this, ScResId( BTN_HELP ) ),
+    :   ScAnyRefDlg     ( pB, pCW, pParent, "PrintAreasDialog", "modules/scalc/ui/printareasdialog.ui"),
         //
         bDlgLostFocus   ( false ),
-        pRefInputEdit   ( &aEdPrintArea ),
         pDoc            ( NULL ),
         pViewData       ( NULL ),
         nCurTab         ( 0 )
 {
+    get(pFlPrintArea,"label1");
+    get(pLbPrintArea,"lbprintarea");
+    get(pEdPrintArea,"edprintarea");
+    pEdPrintArea->SetReferences(this, pFlPrintArea);
+    pRefInputEdit = pEdPrintArea;
+    get(pRbPrintArea,"rbprintarea");
+    pRbPrintArea->SetReferences(this, pEdPrintArea);
+
+    get(pFlRepeatRow,"label2");
+    get(pLbRepeatRow,"lbrepeatrow");
+    get(pEdRepeatRow,"edrepeatrow");
+    pEdRepeatRow->SetReferences(this, pFlRepeatRow);
+    get(pRbRepeatRow,"rbrepeatrow");
+    pRbRepeatRow->SetReferences(this, pEdRepeatRow);
+
+    get(pFlRepeatCol,"label3");
+    get(pLbRepeatCol,"lbrepeatcol");
+    get(pEdRepeatCol,"edrepeatcol");
+    pEdRepeatCol->SetReferences(this, pFlRepeatCol);
+    get(pRbRepeatCol,"rbrepeatcol");
+    pRbRepeatCol->SetReferences(this, pEdRepeatCol);
+
+    get(pBtnOk,"ok");
+    get(pBtnCancel,"cancel");
+
     ScTabViewShell* pScViewSh = PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
     ScDocShell*     pScDocSh  = PTR_CAST( ScDocShell,     SfxObjectShell::Current() );
 
@@ -149,8 +154,6 @@ ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window*
 
     //@BugID 54702 Enablen/Disablen nur noch in Basisklasse
     //SFX_APPWINDOW->Enable();
-
-    FreeResource();
 }
 
 
@@ -159,7 +162,7 @@ ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window*
 ScPrintAreasDlg::~ScPrintAreasDlg()
 {
     // Extra-Data an ListBox-Entries abraeumen
-    ListBox* pLb[3] = { &aLbPrintArea, &aLbRepeatRow, &aLbRepeatCol };
+    ListBox* pLb[3] = { pLbPrintArea, pLbRepeatRow, pLbRepeatCol };
 
     for ( sal_uInt16 i=0; i<3; i++ )
     {
@@ -201,21 +204,21 @@ void ScPrintAreasDlg::SetReference( const ScRange& rRef, ScDocument* /* pDoc */
         String  aStr;
         const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
 
-        if ( &aEdPrintArea == pRefInputEdit )
+        if ( pEdPrintArea == pRefInputEdit )
         {
             rRef.Format( aStr, SCR_ABS, pDoc, eConv );
-            String aVal = aEdPrintArea.GetText();
-            Selection aSel = aEdPrintArea.GetSelection();
+            String aVal = pEdPrintArea->GetText();
+            Selection aSel = pEdPrintArea->GetSelection();
             aSel.Justify();
             aVal.Erase( (xub_StrLen)aSel.Min(), (xub_StrLen)aSel.Len() );
             aVal.Insert( aStr, (xub_StrLen)aSel.Min() );
             Selection aNewSel( aSel.Min(), aSel.Min()+aStr.Len() );
-            aEdPrintArea.SetRefString( aVal );
-            aEdPrintArea.SetSelection( aNewSel );
+            pEdPrintArea->SetRefString( aVal );
+            pEdPrintArea->SetSelection( aNewSel );
         }
         else
         {
-            sal_Bool bRow = ( &aEdRepeatRow == pRefInputEdit );
+            sal_Bool bRow = ( pEdRepeatRow == pRefInputEdit );
             lcl_GetRepeatRangeString(&rRef, pDoc, bRow, aStr);
             pRefInputEdit->SetRefString( aStr );
         }
@@ -229,17 +232,17 @@ void ScPrintAreasDlg::SetReference( const ScRange& rRef, ScDocument* /* pDoc */
 
 void ScPrintAreasDlg::AddRefEntry()
 {
-    if ( pRefInputEdit == &aEdPrintArea )
+    if ( pRefInputEdit == pEdPrintArea )
     {
         const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
-        String aVal = aEdPrintArea.GetText();
+        String aVal = pEdPrintArea->GetText();
         aVal += sep;
-        aEdPrintArea.SetText(aVal);
+        pEdPrintArea->SetText(aVal);
 
         xub_StrLen nLen = aVal.Len();
-        aEdPrintArea.SetSelection( Selection( nLen, nLen ) );
+        pEdPrintArea->SetSelection( Selection( nLen, nLen ) );
 
-        Impl_ModifyHdl( &aEdPrintArea );
+        Impl_ModifyHdl( pEdPrintArea );
     }
 }
 
@@ -281,20 +284,20 @@ void ScPrintAreasDlg::Impl_Reset()
     const ScRange*  pRepeatColRange = pDoc->GetRepeatColRange( nCurTab );
     const ScRange*  pRepeatRowRange = pDoc->GetRepeatRowRange( nCurTab );
 
-    aEdPrintArea.SetModifyHdl   ( HDL(Impl_ModifyHdl) );
-    aEdRepeatRow.SetModifyHdl   ( HDL(Impl_ModifyHdl) );
-    aEdRepeatCol.SetModifyHdl   ( HDL(Impl_ModifyHdl) );
-    aEdPrintArea.SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
-    aEdRepeatRow.SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
-    aEdRepeatCol.SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
-    aLbPrintArea.SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
-    aLbRepeatRow.SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
-    aLbRepeatCol.SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
-    aLbPrintArea.SetSelectHdl   ( HDL(Impl_SelectHdl) );
-    aLbRepeatRow.SetSelectHdl   ( HDL(Impl_SelectHdl) );
-    aLbRepeatCol.SetSelectHdl   ( HDL(Impl_SelectHdl) );
-    aBtnOk      .SetClickHdl    ( HDL(Impl_BtnHdl)    );
-    aBtnCancel  .SetClickHdl    ( HDL(Impl_BtnHdl)    );
+    pEdPrintArea->SetModifyHdl   ( HDL(Impl_ModifyHdl) );
+    pEdRepeatRow->SetModifyHdl   ( HDL(Impl_ModifyHdl) );
+    pEdRepeatCol->SetModifyHdl   ( HDL(Impl_ModifyHdl) );
+    pEdPrintArea->SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
+    pEdRepeatRow->SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
+    pEdRepeatCol->SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
+    pLbPrintArea->SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
+    pLbRepeatRow->SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
+    pLbRepeatCol->SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
+    pLbPrintArea->SetSelectHdl   ( HDL(Impl_SelectHdl) );
+    pLbRepeatRow->SetSelectHdl   ( HDL(Impl_SelectHdl) );
+    pLbRepeatCol->SetSelectHdl   ( HDL(Impl_SelectHdl) );
+    pBtnOk->      SetClickHdl    ( HDL(Impl_BtnHdl)    );
+    pBtnCancel->  SetClickHdl    ( HDL(Impl_BtnHdl)    );
 
     Impl_FillLists();
 
@@ -317,29 +320,29 @@ void ScPrintAreasDlg::Impl_Reset()
             aStrRange += aOne;
         }
     }
-    aEdPrintArea.SetText( aStrRange );
+    pEdPrintArea->SetText( aStrRange );
 
     //-------------------------------
     // Wiederholungszeile
     //-------------------------------
     lcl_GetRepeatRangeString(pRepeatRowRange, pDoc, true, aStrRange);
-    aEdRepeatRow.SetText( aStrRange );
+    pEdRepeatRow->SetText( aStrRange );
 
     //--------------------------------
     // Wiederholungsspalte
     //--------------------------------
     lcl_GetRepeatRangeString(pRepeatColRange, pDoc, false, aStrRange);
-    aEdRepeatCol.SetText( aStrRange );
+    pEdRepeatCol->SetText( aStrRange );
 
-    Impl_ModifyHdl( &aEdPrintArea );
-    Impl_ModifyHdl( &aEdRepeatRow );
-    Impl_ModifyHdl( &aEdRepeatCol );
+    Impl_ModifyHdl( pEdPrintArea );
+    Impl_ModifyHdl( pEdRepeatRow );
+    Impl_ModifyHdl( pEdRepeatCol );
     if( pDoc->IsPrintEntireSheet( nCurTab ) )
-        aLbPrintArea.SelectEntryPos( SC_AREASDLG_PR_ENTIRE );
+        pLbPrintArea->SelectEntryPos( SC_AREASDLG_PR_ENTIRE );
 
-    aEdPrintArea.SaveValue();   // fuer FillItemSet() merken:
-    aEdRepeatRow.SaveValue();
-    aEdRepeatCol.SaveValue();
+    pEdPrintArea->SaveValue();   // fuer FillItemSet() merken:
+    pEdRepeatRow->SaveValue();
+    pEdRepeatCol->SaveValue();
 }
 
 
@@ -350,11 +353,11 @@ bool ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem )
     String  aRangeStr = pEd->GetText();
     bool bDataChanged = (pEd->GetSavedValue() != aRangeStr);
 
-    if ( (aRangeStr.Len() > 0) && &aEdPrintArea != pEd )
+    if ( (aRangeStr.Len() > 0) && pEdPrintArea != pEd )
     {
         ScRange aRange;
         const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
-        lcl_CheckRepeatString(aRangeStr, pDoc, &aEdRepeatRow == pEd, &aRange);
+        lcl_CheckRepeatString(aRangeStr, pDoc, pEdRepeatRow == pEd, &aRange);
         aRange.Format(aRangeStr, SCR_ABS, pDoc, eConv);
     }
 
@@ -369,9 +372,9 @@ bool ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem )
 sal_Bool ScPrintAreasDlg::Impl_CheckRefStrings()
 {
     sal_Bool        bOk = false;
-    String      aStrPrintArea   = aEdPrintArea.GetText();
-    String      aStrRepeatRow   = aEdRepeatRow.GetText();
-    String      aStrRepeatCol   = aEdRepeatCol.GetText();
+    String      aStrPrintArea   = pEdPrintArea->GetText();
+    String      aStrRepeatRow   = pEdRepeatRow->GetText();
+    String      aStrRepeatCol   = pEdRepeatCol->GetText();
 
     sal_Bool bPrintAreaOk = sal_True;
     if ( aStrPrintArea.Len() )
@@ -413,9 +416,9 @@ sal_Bool ScPrintAreasDlg::Impl_CheckRefStrings()
     {
         Edit* pEd = NULL;
 
-             if ( !bPrintAreaOk ) pEd = &aEdPrintArea;
-        else if ( !bRepeatRowOk ) pEd = &aEdRepeatRow;
-        else if ( !bRepeatColOk ) pEd = &aEdRepeatCol;
+             if ( !bPrintAreaOk ) pEd = pEdPrintArea;
+        else if ( !bRepeatRowOk ) pEd = pEdRepeatRow;
+        else if ( !bRepeatColOk ) pEd = pEdRepeatCol;
 
         ERRORBOX( STR_INVALID_TABREF );
 
@@ -454,7 +457,7 @@ void ScPrintAreasDlg::Impl_FillLists()
         aList->Format( aStrRange, SCR_ABS, pDoc, eConv );
     }
 
-    aLbPrintArea.SetEntryData( SC_AREASDLG_PR_SELECT, new String( aStrRange ) );
+    pLbPrintArea->SetEntryData( SC_AREASDLG_PR_SELECT, new String( aStrRange ) );
 
     //------------------------------------------------------
     // Ranges holen und in ListBoxen merken
@@ -479,24 +482,24 @@ void ScPrintAreasDlg::Impl_FillLists()
             if (itr->second->HasType(RT_PRINTAREA))
             {
                 aRange.Format(aSymbol, SCR_ABS, pDoc, eConv);
-                aLbPrintArea.SetEntryData(
-                    aLbPrintArea.InsertEntry(aName),
+                pLbPrintArea->SetEntryData(
+                    pLbPrintArea->InsertEntry(aName),
                     new String(aSymbol) );
             }
 
             if (itr->second->HasType(RT_ROWHEADER))
             {
                 lcl_GetRepeatRangeString(&aRange, pDoc, true, aSymbol);
-                aLbRepeatRow.SetEntryData(
-                    aLbRepeatRow.InsertEntry(aName),
+                pLbRepeatRow->SetEntryData(
+                    pLbRepeatRow->InsertEntry(aName),
                     new String(aSymbol) );
             }
 
             if (itr->second->HasType(RT_COLHEADER))
             {
                 lcl_GetRepeatRangeString(&aRange, pDoc, false, aSymbol);
-                aLbRepeatCol.SetEntryData(
-                    aLbRepeatCol.InsertEntry(aName),
+                pLbRepeatCol->SetEntryData(
+                    pLbRepeatCol->InsertEntry(aName),
                     new String(aSymbol));
             }
         }
@@ -510,7 +513,7 @@ void ScPrintAreasDlg::Impl_FillLists()
 
 IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn )
 {
-    if ( &aBtnOk == pBtn )
+    if ( pBtnOk == pBtn )
     {
         if ( Impl_CheckRefStrings() )
         {
@@ -525,25 +528,25 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn )
             //-------------------------
 
             // first try the list box, if "Entite sheet" is selected
-            bool bEntireSheet = (aLbPrintArea.GetSelectEntryPos() == SC_AREASDLG_PR_ENTIRE);
+            bool bEntireSheet = (pLbPrintArea->GetSelectEntryPos() == SC_AREASDLG_PR_ENTIRE);
             SfxBoolItem aEntireSheet( FN_PARAM_4, bEntireSheet );
 
             bDataChanged = bEntireSheet != pDoc->IsPrintEntireSheet( nCurTab );
             if( !bEntireSheet )
             {
                 // if new list box selection is not "Entire sheet", get the edit field contents
-                bDataChanged |= Impl_GetItem( &aEdPrintArea, aPrintArea );
+                bDataChanged |= Impl_GetItem( pEdPrintArea, aPrintArea );
             }
 
             //-------------------------------
             // Wiederholungszeile veraendert?
             //-------------------------------
-            bDataChanged |= Impl_GetItem( &aEdRepeatRow, aRepeatRow );
+            bDataChanged |= Impl_GetItem( pEdRepeatRow, aRepeatRow );
 
             //--------------------------------
             // Wiederholungsspalte veraendert?
             //--------------------------------
-            bDataChanged |= Impl_GetItem( &aEdRepeatCol, aRepeatCol );
+            bDataChanged |= Impl_GetItem( pEdRepeatCol, aRepeatCol );
 
             if ( bDataChanged )
             {
@@ -557,7 +560,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn )
             Close();
         }
     }
-    else if ( &aBtnCancel == pBtn )
+    else if ( pBtnCancel == pBtn )
         Close();
 
     return 0;
@@ -568,23 +571,23 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn )
 
 IMPL_LINK( ScPrintAreasDlg, Impl_GetFocusHdl, Control*, pCtr )
 {
-    if ( pCtr ==(Control *) &aEdPrintArea ||
-         pCtr ==(Control *) &aEdRepeatRow ||
-         pCtr ==(Control *) &aEdRepeatCol)
+    if ( pCtr ==(Control *) pEdPrintArea ||
+         pCtr ==(Control *) pEdRepeatRow ||
+         pCtr ==(Control *) pEdRepeatCol)
     {
          pRefInputEdit = (formula::RefEdit*) pCtr;
     }
-    else if ( pCtr ==(Control *) &aLbPrintArea)
+    else if ( pCtr ==(Control *) pLbPrintArea)
     {
-        pRefInputEdit = &aEdPrintArea;
+        pRefInputEdit = pEdPrintArea;
     }
-    else if ( pCtr ==(Control *) &aLbRepeatRow)
+    else if ( pCtr ==(Control *) pLbRepeatRow)
     {
-        pRefInputEdit = &aEdRepeatRow;
+        pRefInputEdit = pEdRepeatRow;
     }
-    else if ( pCtr ==(Control *) &aLbRepeatCol)
+    else if ( pCtr ==(Control *) pLbRepeatCol)
     {
-        pRefInputEdit = &aEdRepeatCol;
+        pRefInputEdit = pEdRepeatCol;
     }
 
     return 0;
@@ -604,17 +607,17 @@ IMPL_LINK( ScPrintAreasDlg, Impl_SelectHdl, ListBox*, pLb )
     sal_uInt16 nFirstCustomPos = SC_AREASDLG_RR_OFFSET;
 
     // find edit field for list box, and list box positions
-    if( pLb == &aLbPrintArea )
+    if( pLb == pLbPrintArea )
     {
-        pEd = &aEdPrintArea;
+        pEd = pEdPrintArea;
         nAllSheetPos = SC_AREASDLG_PR_ENTIRE;
         nUserDefPos = SC_AREASDLG_PR_USER;
         nFirstCustomPos = SC_AREASDLG_PR_SELECT;    // "Selection" and following
     }
-    else if( pLb == &aLbRepeatCol )
-        pEd = &aEdRepeatCol;
-    else if( pLb == &aLbRepeatRow )
-        pEd = &aEdRepeatRow;
+    else if( pLb == pLbRepeatCol )
+        pEd = pEdRepeatCol;
+    else if( pLb == pLbRepeatRow )
+        pEd = pEdRepeatRow;
     else
         return 0;
 
@@ -640,16 +643,16 @@ IMPL_LINK( ScPrintAreasDlg, Impl_ModifyHdl, formula::RefEdit*, pEd )
     sal_uInt16 nUserDefPos = SC_AREASDLG_RR_USER;
     sal_uInt16 nFirstCustomPos = SC_AREASDLG_RR_OFFSET;
 
-    if( pEd == &aEdPrintArea )
+    if( pEd == pEdPrintArea )
     {
-        pLb = &aLbPrintArea;
+        pLb = pLbPrintArea;
         nUserDefPos = SC_AREASDLG_PR_USER;
         nFirstCustomPos = SC_AREASDLG_PR_SELECT;    // "Selection" and following
     }
-    else if( pEd == &aEdRepeatCol )
-        pLb = &aLbRepeatCol;
-    else if( pEd == &aEdRepeatRow )
-        pLb = &aLbRepeatRow;
+    else if( pEd == pEdRepeatCol )
+        pLb = pLbRepeatCol;
+    else if( pEd == pEdRepeatRow )
+        pLb = pLbRepeatRow;
     else
         return 0;
 
diff --git a/sc/source/ui/pagedlg/pagedlg.hrc b/sc/source/ui/pagedlg/pagedlg.hrc
index d4b13b0..6d2d792 100644
--- a/sc/source/ui/pagedlg/pagedlg.hrc
+++ b/sc/source/ui/pagedlg/pagedlg.hrc
@@ -31,26 +31,4 @@
 #define IMG_LEFTRIGHT       (SC_DIALOGS_START + 43 + 23)
 #define IMG_TOPDOWN         (SC_DIALOGS_START + 43 + 24)
 
-//================================================
-// Dialog: Druckbereiche
-
-#define FL_PRINTAREA        10
-#define ED_PRINTAREA        11
-#define RB_PRINTAREA        12
-#define LB_PRINTAREA        13
-
-#define FL_REPEATROW        20
-#define ED_REPEATROW        21
-#define RB_REPEATROW        22
-#define LB_REPEATROW        23
-
-#define FL_REPEATCOL        30
-#define ED_REPEATCOL        31
-#define RB_REPEATCOL        32
-#define LB_REPEATCOL        33
-
-#define BTN_OK              1
-#define BTN_CANCEL          2
-#define BTN_HELP            3
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/pagedlg/pagedlg.src b/sc/source/ui/pagedlg/pagedlg.src
index 2c174a0..cc257a2 100644
--- a/sc/source/ui/pagedlg/pagedlg.src
+++ b/sc/source/ui/pagedlg/pagedlg.src
@@ -18,138 +18,6 @@
  */
 #include "pagedlg.hrc"
 
-ModelessDialog RID_SCDLG_AREAS
-{
-    HelpId = HID_SCPAGE_AREAS ;
-    Size = MAP_APPFONT ( 316 , 90 ) ;
-    OutputSize = TRUE ;
-    Moveable = TRUE ;
-     //Closeable = TRUE;    // Dieser Dialog hat einen Cancel-Button !
-    Hide = TRUE ;
-    SVLook = TRUE ;
-    Text [ en-US ] = "Edit Print Ranges" ;
-    OKButton BTN_OK
-    {
-        Pos = MAP_APPFONT ( 260 , 6 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        DefButton = TRUE ;
-    };
-    CancelButton BTN_CANCEL
-    {
-        Pos = MAP_APPFONT ( 260 , 23 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-    };
-    HelpButton BTN_HELP
-    {
-        Pos = MAP_APPFONT ( 260 , 43 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-    };
-    FixedLine FL_PRINTAREA
-    {
-        Pos = MAP_APPFONT ( 6 , 3 ) ;
-        Size = MAP_APPFONT ( 248 , 8 ) ;
-        Text [ en-US ] = "Print range" ;
-    };
-    ListBox LB_PRINTAREA
-    {
-        HelpID = "sc:ListBox:RID_SCDLG_AREAS:LB_PRINTAREA";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 14 ) ;
-        Size = MAP_APPFONT ( 90 , 60 ) ;
-        DropDown = TRUE ;
-        StringList [ en-US ] =
-        {
-            < "- none -" ; Default ; > ;
-            < "- entire sheet -" ; Default ; > ;
-            < "- user defined -" ; Default ; > ;
-            < "- selection -" ; Default ; > ;
-        };
-    };
-    Edit ED_PRINTAREA
-    {
-        HelpID = "sc:Edit:RID_SCDLG_AREAS:ED_PRINTAREA";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 106 , 14 ) ;
-        Size = MAP_APPFONT ( 131 , 12 ) ;
-    };
-    ImageButton RB_PRINTAREA
-    {
-        HelpID = "sc:ImageButton:RID_SCDLG_AREAS:RB_PRINTAREA";
-        Pos = MAP_APPFONT ( 239 , 13 ) ;
-        Size = MAP_APPFONT ( 13 , 15 ) ;
-        TabStop = FALSE ;
-        QuickHelpText [ en-US ] = "Shrink" ;
-    };
-    FixedLine FL_REPEATROW
-    {
-        Pos = MAP_APPFONT ( 6 , 32 ) ;
-        Size = MAP_APPFONT ( 248 , 8 ) ;
-        Text [ en-US ] = "Rows to repeat" ;
-    };
-    ListBox LB_REPEATROW
-    {
-        HelpID = "sc:ListBox:RID_SCDLG_AREAS:LB_REPEATROW";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 43 ) ;
-        Size = MAP_APPFONT ( 90 , 60 ) ;
-        DropDown = TRUE ;
-        StringList [ en-US ] =
-        {
-            < "- none -" ; Default ; > ;
-            < "- user defined -" ; Default ; > ;
-        };
-    };
-    Edit ED_REPEATROW
-    {
-        HelpID = "sc:Edit:RID_SCDLG_AREAS:ED_REPEATROW";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 106 , 43 ) ;
-        Size = MAP_APPFONT ( 131 , 12 ) ;
-    };
-    ImageButton RB_REPEATROW
-    {
-        HelpID = "sc:ImageButton:RID_SCDLG_AREAS:RB_REPEATROW";
-        Pos = MAP_APPFONT ( 239 , 42 ) ;
-        Size = MAP_APPFONT ( 13 , 15 ) ;
-        TabStop = FALSE ;
-        QuickHelpText [ en-US ] = "Shrink" ;
-    };
-    FixedLine FL_REPEATCOL
-    {
-        Pos = MAP_APPFONT ( 6 , 61 ) ;
-        Size = MAP_APPFONT ( 248 , 8 ) ;
-        Text [ en-US ] = "Columns to repeat" ;
-    };
-    ListBox LB_REPEATCOL
-    {
-        HelpID = "sc:ListBox:RID_SCDLG_AREAS:LB_REPEATCOL";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 72 ) ;
-        Size = MAP_APPFONT ( 90 , 60 ) ;
-        DropDown = TRUE ;
-        StringList [ en-US ] =
-        {
-            < "- none -" ; Default ; > ;
-            < "- user defined -" ; Default ; > ;
-        };
-    };
-    Edit ED_REPEATCOL
-    {
-        HelpID = "sc:Edit:RID_SCDLG_AREAS:ED_REPEATCOL";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 106 , 72 ) ;
-        Size = MAP_APPFONT ( 131 , 12 ) ;
-    };
-    ImageButton RB_REPEATCOL
-    {
-        HelpID = "sc:ImageButton:RID_SCDLG_AREAS:RB_REPEATCOL";
-        Pos = MAP_APPFONT ( 239 , 71 ) ;
-        Size = MAP_APPFONT ( 13 , 15 ) ;
-        TabStop = FALSE ;
-        QuickHelpText [ en-US ] = "Shrink" ;
-    };
-};
-
 Image IMG_LEFTRIGHT
     {
         ImageBitmap = Bitmap { File = "lftrgt.png" ; };
diff --git a/sc/uiconfig/scalc/ui/printareasdialog.ui b/sc/uiconfig/scalc/ui/printareasdialog.ui
new file mode 100644
index 0000000..6e119d4
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/printareasdialog.ui
@@ -0,0 +1,348 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="PrintAreasDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="internal-box1">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="box1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</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="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="top_padding">6</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkGrid" id="grid1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="row_spacing">6</property>
+                        <property name="column_spacing">12</property>
+                        <child>
+                          <object class="foruilo-RefButton" id="rbprintarea">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="receives_default">False</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="foruilo-RefEdit" id="edprintarea">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</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="GtkComboBox" id="lbprintarea">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="hexpand">True</property>
+                            <items>
+                              <item>- none -</item>
+                              <item>- entire sheet -</item>
+                              <item>- user defined -</item>
+                              <item>- selection -</item>
+                            </items>
+                          </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>
+                    </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">Print range</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="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="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="row_spacing">6</property>
+                        <property name="column_spacing">12</property>
+                        <child>
+                          <object class="GtkComboBox" id="lbrepeatrow">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="hexpand">True</property>
+                            <items>
+                              <item>- none -</item>
+                              <item>- user defined -</item>
+                            </items>
+                          </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="foruilo-RefEdit" id="edrepeatrow">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</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="foruilo-RefButton" id="rbrepeatrow">
+                            <property name="visible">True</property>
+                            <property name="can_focus">Fales</property>
+                            <property name="receives_default">False</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                      </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">Moves to repeat</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="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="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="row_spacing">6</property>
+                        <property name="column_spacing">12</property>
+                        <child>
+                          <object class="GtkComboBox" id="lbrepeatcol">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="hexpand">True</property>
+                            <items>
+                              <item>- none -</item>
+                              <item>- user defined -</item>
+                            </items>
+                          </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="foruilo-RefEdit" id="edrepeatcol">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</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="foruilo-RefButton" id="rbrepeatcol">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="receives_default">False</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                      </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">Columns to repeat</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>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">help</action-widget>
+    </action-widgets>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list