summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/AllLangResTarget_sc.mk1
-rw-r--r--sc/UIConfig_scalc.mk1
-rw-r--r--sc/inc/scabstdlg.hxx3
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx21
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx3
-rw-r--r--sc/source/ui/inc/datafdlg.hrc43
-rw-r--r--sc/source/ui/inc/datafdlg.hxx18
-rw-r--r--sc/source/ui/miscdlgs/datafdlg.cxx126
-rw-r--r--sc/source/ui/src/datafdlg.src100
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx3
-rw-r--r--sc/source/ui/view/cellsh2.cxx3
-rw-r--r--sc/uiconfig/scalc/ui/dataform.ui189
12 files changed, 223 insertions, 288 deletions
diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index eac9600f7886..ff58ce3f5312 100644
--- a/sc/AllLangResTarget_sc.mk
+++ b/sc/AllLangResTarget_sc.mk
@@ -57,7 +57,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/src/autofmt.src \
sc/source/ui/src/globstr.src \
sc/source/ui/src/optsolver.src \
- sc/source/ui/src/datafdlg.src \
sc/source/ui/src/toolbox.src \
sc/source/ui/src/scfuncs.src \
sc/source/ui/src/textdlgs.src \
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 3d3c47f55d35..12f00255390b 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -61,6 +61,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/scalc,\
$(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/cellprotectionpage \
sc/uiconfig/scalc/ui/createnamesdialog \
+ sc/uiconfig/scalc/ui/dataform \
sc/uiconfig/scalc/ui/definename \
sc/uiconfig/scalc/ui/deletecells \
sc/uiconfig/scalc/ui/deletecontents \
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 2e80c1cfc3de..c50e3556c240 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -367,7 +367,8 @@ public:
virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg(Window* pParent, bool bDisallowCellMove = false) = 0 ; //add for ScDeleteCellDlg
//for dataform
- virtual AbstractScDataFormDlg * CreateScDataFormDlg( Window* pParent, int nId, ScTabViewShell* pTabViewShell ) = 0 ; //add for ScDataFormDlg
+ virtual AbstractScDataFormDlg * CreateScDataFormDlg(Window* pParent,
+ ScTabViewShell* pTabViewShell) = 0;
virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent, //add for ScDeleteContentsDlg
sal_uInt16 nCheckDefaults = 0) = 0;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 1283a3b0f290..0a24dd6fa88b 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -827,26 +827,13 @@ AbstractScDeleteCellDlg* ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg(Win
return new AbstractScDeleteCellDlg_Impl( pDlg );
}
-AbstractScDataFormDlg* ScAbstractDialogFactory_Impl::CreateScDataFormDlg( Window* pParent, int nId, ScTabViewShell* pTabViewShell )
+AbstractScDataFormDlg* ScAbstractDialogFactory_Impl::CreateScDataFormDlg(Window* pParent,
+ ScTabViewShell* pTabViewShell)
{
- ScDataFormDlg * pDlg=NULL;
- switch ( nId )
- {
- case RID_SCDLG_DATAFORM :
- pDlg = new ScDataFormDlg( pParent, pTabViewShell);
- break;
- default:
- break;
- }
-
- if ( pDlg )
- return new AbstractScDataFormDlg_Impl( pDlg );
- return 0;
+ ScDataFormDlg* pDlg = new ScDataFormDlg(pParent, pTabViewShell);
+ return new AbstractScDataFormDlg_Impl(pDlg);
}
-
-
-
AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(Window* pParent,
sal_uInt16 nCheckDefaults)
{
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 14c263fe4f73..a86192bb02c6 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -434,7 +434,8 @@ public:
virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg(Window* pParent, bool bDisallowCellMove = false );
//for dataform
- virtual AbstractScDataFormDlg * CreateScDataFormDlg( Window* pParent, int nId, ScTabViewShell* pTabViewShell); //add for ScDeleteCellDlg
+ virtual AbstractScDataFormDlg* CreateScDataFormDlg(Window* pParent,
+ ScTabViewShell* pTabViewShell);
virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent, //add for ScDeleteContentsDlg
sal_uInt16 nCheckDefaults = 0);
diff --git a/sc/source/ui/inc/datafdlg.hrc b/sc/source/ui/inc/datafdlg.hrc
deleted file mode 100644
index a0a2f043e235..000000000000
--- a/sc/source/ui/inc/datafdlg.hrc
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Initial Developer of the Original Code is
- * Novell Inc.
- * Portions created by the Initial Developer are Copyright (C) 2010 the
- * Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Amelia Wang <amwang@novell.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
- * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
- * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
- * instead of those above.
- */
-#include "sc.hrc" // -> RID_SCDLG_DATAFORM
-
-//dataform
-#define BTN_DATAFORM_NEW 1
-#define BTN_DATAFORM_DELETE 2
-#define BTN_DATAFORM_RESTORE 3
-#define BTN_DATAFORM_PREV 4
-#define BTN_DATAFORM_NEXT 5
-#define BTN_DATAFORM_CLOSE 6
-#define WND_DATAFORM_SCROLLBAR 7
-#define LAB_DATAFORM_RECORDNO 8
-
-
-#define STR_NEW_RECORD 11
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/datafdlg.hxx b/sc/source/ui/inc/datafdlg.hxx
index 3e7d92e9e364..e96f91fc6ace 100644
--- a/sc/source/ui/inc/datafdlg.hxx
+++ b/sc/source/ui/inc/datafdlg.hxx
@@ -51,19 +51,19 @@
#define EDIT_LEFT 62
#define LINE_HEIGHT 16
-//zhangyun
class ScDataFormDlg : public ModalDialog
{
private:
- PushButton aBtnNew;
- PushButton aBtnDelete;
- PushButton aBtnRestore;
- PushButton aBtnPrev;
- PushButton aBtnNext;
- PushButton aBtnClose;
- ScrollBar aSlider;
- FixedText aFixedText;
+ PushButton* m_pBtnNew;
+ PushButton* m_pBtnDelete;
+ PushButton* m_pBtnRestore;
+ PushButton* m_pBtnPrev;
+ PushButton* m_pBtnNext;
+ PushButton* m_pBtnClose;
+ ScrollBar* m_pSlider;
+ VclGrid* m_pGrid;
+ FixedText* m_pFixedText;
OUString sNewRecord;
ScTabViewShell* pTabViewShell;
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index c8810aca533e..23926913afd9 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -33,7 +33,6 @@
#include "datafdlg.hxx"
#include "scresid.hxx"
-#include "datafdlg.hrc"
#include "viewdata.hxx"
#include "docsh.hxx"
#include "refundo.hxx"
@@ -44,21 +43,21 @@
#define HDL(hdl) LINK( this, ScDataFormDlg, hdl )
-//zhangyun
-ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri) :
- ModalDialog ( pParent, ScResId( RID_SCDLG_DATAFORM ) ),
- aBtnNew ( this, ScResId( BTN_DATAFORM_NEW ) ),
- aBtnDelete ( this, ScResId( BTN_DATAFORM_DELETE ) ),
- aBtnRestore ( this, ScResId( BTN_DATAFORM_RESTORE ) ),
- aBtnPrev ( this, ScResId( BTN_DATAFORM_PREV ) ),
- aBtnNext ( this, ScResId( BTN_DATAFORM_NEXT ) ),
- aBtnClose ( this, ScResId( BTN_DATAFORM_CLOSE ) ),
- aSlider ( this, ScResId( WND_DATAFORM_SCROLLBAR ) ),
- aFixedText ( this, ScResId( LAB_DATAFORM_RECORDNO ) ),
- sNewRecord(SC_RESSTR(STR_NEW_RECORD))
+ScDataFormDlg::ScDataFormDlg(Window* pParent, ScTabViewShell* pTabViewShellOri)
+ : ModalDialog(pParent, "DataFormDialog", "modules/scalc/ui/dataform.ui")
+ , pTabViewShell(pTabViewShellOri)
{
- pTabViewShell = pTabViewShellOri;
- FreeResource();
+ get(m_pBtnNew, "new");
+ get(m_pBtnDelete, "delete");
+ get(m_pBtnRestore, "restore");
+ get(m_pBtnPrev, "prev");
+ get(m_pBtnNext, "next");
+ get(m_pBtnClose, "close");
+ get(m_pFixedText, "label");
+ sNewRecord = m_pFixedText->GetText();
+ get(m_pSlider, "scrollbar");
+ get(m_pGrid, "grid");
+
//read header form current document, and add new controls
OSL_ENSURE( pTabViewShell, "pTabViewShell is NULL! :-/" );
ScViewData* pViewData = pTabViewShell->GetViewData();
@@ -157,42 +156,35 @@ ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri
nCurrentRow = nStartRow + 1;
- String aFieldName;
-
- //align with LAB_DATAFORM_RECORDNO
- int nTop = LogicToPixel( Size(1,6), MapMode(MAP_APPFONT) ).getHeight();
- const int nOne = LogicToPixel( Size(1,1), MapMode(MAP_APPFONT) ).getHeight();
- const int nLineHeight = LogicToPixel( Size(1, LINE_HEIGHT), MapMode(MAP_APPFONT) ).getHeight();
- const int nFixedLeft = LogicToPixel( Size(FIXED_LEFT, 1), MapMode(MAP_APPFONT) ).getWidth();
- const int nEditLeft = LogicToPixel( Size(EDIT_LEFT, 1), MapMode(MAP_APPFONT) ).getWidth();
-
- Size nFixedSize(LogicToPixel( Size(FIXED_WIDTH, FIXED_HEIGHT), MapMode(MAP_APPFONT) ));
- Size nEditSize(LogicToPixel( Size(EDIT_WIDTH, EDIT_HEIGHT), MapMode(MAP_APPFONT) ));
-
aColLength = nEndCol - nStartCol + 1;
//new the controls
maFixedTexts.reserve(aColLength);
maEdits.reserve(aColLength);
- for(sal_uInt16 nIndex = 0; nIndex < aColLength; nIndex++)
+ sal_Int32 nGridRow = 0;
+ for(sal_uInt16 nIndex = 0; nIndex < aColLength; ++nIndex)
{
- aFieldName = pDoc->GetString(nIndex + nStartCol, nStartRow, nTab);
+ OUString aFieldName = pDoc->GetString(nIndex + nStartCol, nStartRow, nTab);
int nColWidth = pDoc->GetColWidth( nIndex + nStartCol, nTab );
if (nColWidth)
{
- maFixedTexts.push_back( new FixedText(this) );
- maEdits.push_back( new Edit(this, WB_BORDER) );
+ maFixedTexts.push_back( new FixedText(m_pGrid) );
+ maEdits.push_back( new Edit(m_pGrid, WB_BORDER) );
+
+ maFixedTexts[nIndex].set_grid_left_attach(0);
+ maEdits[nIndex].set_grid_left_attach(1);
+ maFixedTexts[nIndex].set_grid_top_attach(nGridRow);
+ maEdits[nIndex].set_grid_top_attach(nGridRow);
+
+ maEdits[nIndex].SetWidthInChars(32);
+ maEdits[nIndex].set_hexpand(true);
+
+ ++nGridRow;
- maFixedTexts[nIndex].SetSizePixel(nFixedSize);
- maEdits[nIndex].SetSizePixel(nEditSize);
- maFixedTexts[nIndex].SetPosPixel(Point(nFixedLeft, nTop + nOne));
- maEdits[nIndex].SetPosPixel(Point(nEditLeft, nTop));
maFixedTexts[nIndex].SetText(aFieldName);
maFixedTexts[nIndex].Show();
maEdits[nIndex].Show();
-
- nTop += nLineHeight;
}
else
{
@@ -202,35 +194,25 @@ ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri
if (!maEdits.is_null(nIndex))
maEdits[nIndex].SetModifyHdl( HDL(Impl_DataModifyHdl) );
}
-
- Size nDialogSize = this->GetSizePixel();
- if (nTop > nDialogSize.Height())
- {
- nDialogSize.setHeight(nTop);
- this->SetSizePixel(nDialogSize);
- }
- Size nScrollSize = aSlider.GetSizePixel();
- nScrollSize.setHeight(nDialogSize.Height()-20);
- aSlider.SetSizePixel(nScrollSize);
}
FillCtrls(nCurrentRow);
- aSlider.SetPageSize( 10 );
- aSlider.SetVisibleSize( 1 );
- aSlider.SetLineSize( 1 );
- aSlider.SetRange( Range( 0, nEndRow - nStartRow + 1) );
- aSlider.Show();
+ m_pSlider->SetPageSize( 10 );
+ m_pSlider->SetVisibleSize( 1 );
+ m_pSlider->SetLineSize( 1 );
+ m_pSlider->SetRange( Range( 0, nEndRow - nStartRow + 1) );
+ m_pSlider->Show();
- aBtnNew.SetClickHdl ( HDL(Impl_NewHdl) );
- aBtnPrev.SetClickHdl ( HDL(Impl_PrevHdl) );
- aBtnNext.SetClickHdl ( HDL(Impl_NextHdl) );
+ m_pBtnNew->SetClickHdl(HDL(Impl_NewHdl));
+ m_pBtnPrev->SetClickHdl(HDL(Impl_PrevHdl));
+ m_pBtnNext->SetClickHdl(HDL(Impl_NextHdl));
- aBtnRestore.SetClickHdl ( HDL(Impl_RestoreHdl) );
- aBtnDelete.SetClickHdl ( HDL(Impl_DeleteHdl) );
- aBtnClose.SetClickHdl ( HDL(Impl_CloseHdl) );
+ m_pBtnRestore->SetClickHdl(HDL(Impl_RestoreHdl));
+ m_pBtnDelete->SetClickHdl(HDL(Impl_DeleteHdl));
+ m_pBtnClose->SetClickHdl(HDL(Impl_CloseHdl));
- aSlider.SetEndScrollHdl( HDL( Impl_ScrollHdl ) );
+ m_pSlider->SetEndScrollHdl(HDL(Impl_ScrollHdl));
SetButtonState();
}
@@ -263,18 +245,18 @@ void ScDataFormDlg::FillCtrls(SCROW /*nCurrentRow*/)
aBuf.append(static_cast<sal_Int32>(nCurrentRow - nStartRow));
aBuf.appendAscii(" / ");
aBuf.append(static_cast<sal_Int32>(nEndRow - nStartRow));
- aFixedText.SetText(aBuf.makeStringAndClear());
+ m_pFixedText->SetText(aBuf.makeStringAndClear());
}
else
- aFixedText.SetText(sNewRecord);
+ m_pFixedText->SetText(sNewRecord);
- aSlider.SetThumbPos(nCurrentRow-nStartRow-1);
+ m_pSlider->SetThumbPos(nCurrentRow-nStartRow-1);
}
IMPL_LINK( ScDataFormDlg, Impl_DataModifyHdl, Edit*, pEdit)
{
if ( pEdit->IsModified() )
- aBtnRestore.Enable( true );
+ m_pBtnRestore->Enable( true );
return 0;
}
@@ -301,7 +283,7 @@ IMPL_LINK_NOARG(ScDataFormDlg, Impl_NewHdl)
if (nCurrentRow >= nEndRow + 2)
{
nEndRow ++ ;
- aSlider.SetRange( Range( 0, nEndRow - nStartRow + 1) );
+ m_pSlider->SetRange( Range( 0, nEndRow - nStartRow + 1) );
}
SetButtonState();
FillCtrls(nCurrentRow);
@@ -375,7 +357,7 @@ IMPL_LINK_NOARG(ScDataFormDlg, Impl_CloseHdl)
IMPL_LINK_NOARG(ScDataFormDlg, Impl_ScrollHdl)
{
- long nOffset = aSlider.GetThumbPos();
+ long nOffset = m_pSlider->GetThumbPos();
nCurrentRow = nStartRow + nOffset + 1;
SetButtonState();
FillCtrls(nCurrentRow);
@@ -386,21 +368,21 @@ void ScDataFormDlg::SetButtonState()
{
if (nCurrentRow > nEndRow)
{
- aBtnDelete.Enable( false );
- aBtnNext.Enable( false );
+ m_pBtnDelete->Enable( false );
+ m_pBtnNext->Enable( false );
}
else
{
- aBtnDelete.Enable( true );
- aBtnNext.Enable( true );
+ m_pBtnDelete->Enable( true );
+ m_pBtnNext->Enable( true );
}
if (nCurrentRow == nStartRow + 1)
- aBtnPrev.Enable( false );
+ m_pBtnPrev->Enable( false );
else
- aBtnPrev.Enable( true );
+ m_pBtnPrev->Enable( true );
- aBtnRestore.Enable( false );
+ m_pBtnRestore->Enable( false );
if ( maEdits.size()>=1 && !maEdits.is_null(0) )
maEdits[0].GrabFocus();
}
diff --git a/sc/source/ui/src/datafdlg.src b/sc/source/ui/src/datafdlg.src
deleted file mode 100644
index 525bc00e49ec..000000000000
--- a/sc/source/ui/src/datafdlg.src
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Initial Developer of the Original Code is
- * Novell Inc.
- * Portions created by the Initial Developer are Copyright (C) 2010 the
- * Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Amelia Wang <amwang@novell.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
- * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
- * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
- * instead of those above.
- */
-#include "datafdlg.hrc"
-
-ModalDialog RID_SCDLG_DATAFORM
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 257 , 180 ) ;
- Text [ en-US ] = "Data Form" ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- FixedText LAB_DATAFORM_RECORDNO
- {
- Pos = MAP_APPFONT ( 162 , 6 ) ;
- Size = MAP_APPFONT ( 60 , 12 ) ;
- Text = "/" ; //placeholder only
- };
- PushButton BTN_DATAFORM_NEW
- {
- Pos = MAP_APPFONT ( 161 , 23 ) ;
- Size = MAP_APPFONT ( 90 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- Text [ en-US ] = "New" ;
- };
- PushButton BTN_DATAFORM_DELETE
- {
- Pos = MAP_APPFONT ( 161 , 40 ) ;
- Size = MAP_APPFONT ( 90 , 14 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Delete" ;
- };
- PushButton BTN_DATAFORM_RESTORE
- {
- Pos = MAP_APPFONT ( 161 , 57 ) ;
- Size = MAP_APPFONT ( 90 , 14 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Restore" ;
- };
- PushButton BTN_DATAFORM_PREV
- {
- Pos = MAP_APPFONT ( 161 , 82 ) ;
- Size = MAP_APPFONT ( 90 , 14 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Previous Record" ;
- };
- PushButton BTN_DATAFORM_NEXT
- {
- Pos = MAP_APPFONT ( 161 , 99 ) ;
- Size = MAP_APPFONT ( 90 , 14 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Next Record" ;
- };
- PushButton BTN_DATAFORM_CLOSE
- {
- Pos = MAP_APPFONT ( 161 , 116 ) ;
- Size = MAP_APPFONT ( 90 , 14 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Close" ;
- };
- ScrollBar WND_DATAFORM_SCROLLBAR
- {
- Pos = MAP_APPFONT ( 150 , 6 ) ;
- Size = MAP_APPFONT ( 8 , 135 ) ;
- HScroll = FALSE ;
- TabStop = FALSE ;
- };
- String STR_NEW_RECORD
- {
- Text [ en-US ] = "New Record" ;
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index d481cee78a90..4c9a1fa96bb7 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -906,7 +906,8 @@ ScVbaWorksheet::ShowDataForm( ) throw (uno::RuntimeException)
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- AbstractScDataFormDlg* pDlg = pFact->CreateScDataFormDlg( pTabViewShell->GetDialogParent(),RID_SCDLG_DATAFORM, pTabViewShell);
+ AbstractScDataFormDlg* pDlg = pFact->CreateScDataFormDlg(pTabViewShell->GetDialogParent(),
+ pTabViewShell);
OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->Execute();
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 39892616fe8b..5f16fb1f81bf 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -315,7 +315,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- AbstractScDataFormDlg* pDlg = pFact->CreateScDataFormDlg( pTabViewShell->GetDialogParent(),RID_SCDLG_DATAFORM, pTabViewShell);
+ AbstractScDataFormDlg* pDlg = pFact->CreateScDataFormDlg(
+ pTabViewShell->GetDialogParent(), pTabViewShell);
OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->Execute();
diff --git a/sc/uiconfig/scalc/ui/dataform.ui b/sc/uiconfig/scalc/ui/dataform.ui
index c64b4cc2f0e3..51bae0226589 100644
--- a/sc/uiconfig/scalc/ui/dataform.ui
+++ b/sc/uiconfig/scalc/ui/dataform.ui
@@ -1,108 +1,121 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
- <object class="GtkDialog" id="dataform">
+ <object class="GtkDialog" id="DataFormDialog">
<property name="can_focus">False</property>
- <property name="border_width">5</property>
+ <property name="border_width">6</property>
<property name="title" translatable="yes">Data Form</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
- <property name="spacing">2</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="orientation">vertical</property>
+ <property name="homogeneous">True</property>
<property name="layout_style">start</property>
<child>
- <object class="GtkButton" id="button1">
+ <object class="GtkLabel" id="label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">New Record</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="new">
<property name="label" translatable="yes">_New</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="button2">
+ <object class="GtkButton" id="delete">
<property name="label" translatable="yes">_Delete</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="button3">
+ <object class="GtkButton" id="restore">
<property name="label" translatable="yes">_Restore</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="button4">
+ <object class="GtkButton" id="prev">
<property name="label" translatable="yes">_Previous Record</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">4</property>
+ <property name="secondary">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="button5">
+ <object class="GtkButton" id="next">
<property name="label" translatable="yes">Ne_xt Record</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">4</property>
+ <property name="position">5</property>
+ <property name="secondary">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="button6">
+ <object class="GtkButton" id="close">
<property name="label" translatable="yes">_Close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">6</property>
+ <property name="secondary">True</property>
</packing>
</child>
</object>
@@ -114,38 +127,130 @@
</packing>
</child>
<child>
- <object class="GtkEntry" id="entry1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrollbar" id="scrollbar1">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkBox" id="box2">
+ <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>
+ <child>
+ <object class="GtkGrid" id="grid">
+ <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>
+ <property name="row_homogeneous">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrollbar" id="scrollbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
- <action-widget response="0">button1</action-widget>
- <action-widget response="0">button2</action-widget>
- <action-widget response="0">button3</action-widget>
- <action-widget response="0">button4</action-widget>
- <action-widget response="0">button5</action-widget>
- <action-widget response="0">button6</action-widget>
+ <action-widget response="0">new</action-widget>
+ <action-widget response="0">delete</action-widget>
+ <action-widget response="0">restore</action-widget>
+ <action-widget response="0">prev</action-widget>
+ <action-widget response="0">next</action-widget>
+ <action-widget response="0">close</action-widget>
</action-widgets>
</object>
</interface>