summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-12-25 21:37:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-12-26 09:59:39 +0000
commit297f5b525f22e05bad8b17c98be2a716463d0408 (patch)
tree9ada4a0f46111d9bcf8fba58f9cc787d72326a8b /dbaccess/source/ui
parentc4792c86a7addb4a77301d78ac1fc11d5c2608b9 (diff)
convert col width and row height dialogs to .ui
Change-Id: Ic64d2e0e296b8d2ed06162e1f778194486fb6fed
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r--dbaccess/source/ui/dlg/dlgsize.cxx51
-rw-r--r--dbaccess/source/ui/dlg/dlgsize.hrc32
-rw-r--r--dbaccess/source/ui/dlg/dlgsize.src139
-rw-r--r--dbaccess/source/ui/inc/dbu_resource.hrc3
-rw-r--r--dbaccess/source/ui/inc/dlgsize.hxx10
5 files changed, 22 insertions, 213 deletions
diff --git a/dbaccess/source/ui/dlg/dlgsize.cxx b/dbaccess/source/ui/dlg/dlgsize.cxx
index c60d0f10aa71..c7645146e107 100644
--- a/dbaccess/source/ui/dlg/dlgsize.cxx
+++ b/dbaccess/source/ui/dlg/dlgsize.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "dlgsize.hrc"
#include "dlgsize.hxx"
#include "dbu_dlg.hrc"
#include "moduledbu.hxx"
@@ -30,64 +29,52 @@ namespace dbaui
DBG_NAME(DlgSize)
DlgSize::DlgSize( Window* pParent, sal_Int32 nVal, sal_Bool bRow, sal_Int32 _nAlternativeStandard )
- :ModalDialog( pParent, ModuleRes(bRow ? DLG_ROWHEIGHT : DLG_COLWIDTH))
- ,m_nPrevValue(nVal)
- ,m_nStandard(bRow ? DEF_ROW_HEIGHT : DEF_COL_WIDTH)
- ,aFT_VALUE(this, ModuleRes( FT_VALUE))
- ,aMF_VALUE(this, ModuleRes( MF_VALUE))
- ,aCB_STANDARD(this, ModuleRes(CB_STANDARD))
- ,aPB_OK(this, ModuleRes(PB_OK))
- ,aPB_CANCEL(this, ModuleRes(PB_CANCEL))
- ,aPB_HELP(this, ModuleRes(PB_HELP))
+ : ModalDialog(pParent, bRow ? OString("RowHeightDialog") : OString("ColWidthDialog"),
+ bRow ? OUString("dbaccess/ui/rowheightdialog.ui") : OUString("dbaccess/ui/colwidthdialog.ui"))
+ , m_nPrevValue(nVal)
+ , m_nStandard(bRow ? DEF_ROW_HEIGHT : DEF_COL_WIDTH)
{
- DBG_CTOR(DlgSize,NULL);
+ get(m_pMF_VALUE, "value");
+ get(m_pCB_STANDARD, "automatic");
if ( _nAlternativeStandard > 0 )
m_nStandard = _nAlternativeStandard;
- aCB_STANDARD.SetClickHdl(LINK(this,DlgSize,CbClickHdl));
+ m_pCB_STANDARD->SetClickHdl(LINK(this,DlgSize,CbClickHdl));
- aMF_VALUE.EnableEmptyFieldValue(sal_True);
+ m_pMF_VALUE->EnableEmptyFieldValue(sal_True);
sal_Bool bDefault = -1 == nVal;
- aCB_STANDARD.Check(bDefault);
+ m_pCB_STANDARD->Check(bDefault);
if (bDefault)
{
SetValue(m_nStandard);
m_nPrevValue = m_nStandard;
}
- LINK(this,DlgSize,CbClickHdl).Call(&aCB_STANDARD);
-
- FreeResource();
-}
-
-DlgSize::~DlgSize()
-{
-
- DBG_DTOR(DlgSize,NULL);
+ LINK(this,DlgSize,CbClickHdl).Call(m_pCB_STANDARD);
}
void DlgSize::SetValue( sal_Int32 nVal )
{
- aMF_VALUE.SetValue(nVal, FUNIT_CM );
+ m_pMF_VALUE->SetValue(nVal, FUNIT_CM );
}
sal_Int32 DlgSize::GetValue()
{
- if (aCB_STANDARD.IsChecked())
+ if (m_pCB_STANDARD->IsChecked())
return -1;
- return (sal_Int32)aMF_VALUE.GetValue( FUNIT_CM );
+ return (sal_Int32)m_pMF_VALUE->GetValue( FUNIT_CM );
}
IMPL_LINK( DlgSize, CbClickHdl, Button *, pButton )
{
- if( pButton == &aCB_STANDARD )
+ if( pButton == m_pCB_STANDARD )
{
- aMF_VALUE.Enable(!aCB_STANDARD.IsChecked());
- if (aCB_STANDARD.IsChecked())
+ m_pMF_VALUE->Enable(!m_pCB_STANDARD->IsChecked());
+ if (m_pCB_STANDARD->IsChecked())
{
- m_nPrevValue = static_cast<sal_Int32>(aMF_VALUE.GetValue(FUNIT_CM));
- // don't use getValue as this will use aCB_STANDARD.to determine if we're standard
- aMF_VALUE.SetEmptyFieldValue();
+ m_nPrevValue = static_cast<sal_Int32>(m_pMF_VALUE->GetValue(FUNIT_CM));
+ // don't use getValue as this will use m_pCB_STANDARD->to determine if we're standard
+ m_pMF_VALUE->SetEmptyFieldValue();
}
else
{
diff --git a/dbaccess/source/ui/dlg/dlgsize.hrc b/dbaccess/source/ui/dlg/dlgsize.hrc
deleted file mode 100644
index 6815bb9241e4..000000000000
--- a/dbaccess/source/ui/dlg/dlgsize.hrc
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef DBAUI_DLGSIZE_HRC
-#define DBAUI_DLGSIZE_HRC
-
-#define FT_VALUE 1
-#define MF_VALUE 1
-#define CB_STANDARD 2
-#define PB_OK 1
-#define PB_CANCEL 1
-#define PB_HELP 1
-
-#endif //DBAUI_DLGSIZE_HRC
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dlgsize.src b/dbaccess/source/ui/dlg/dlgsize.src
deleted file mode 100644
index 6b9dedaf2468..000000000000
--- a/dbaccess/source/ui/dlg/dlgsize.src
+++ /dev/null
@@ -1,139 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "dlgsize.hrc"
-#include "dbaccess_helpid.hrc"
-#include "dbu_dlg.hrc"
-
-ModalDialog DLG_ROWHEIGHT
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- HelpId = HID_DLG_ROWHEIGHT ;
- Size = MAP_APPFONT ( 159 , 59 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- FixedText FT_VALUE
- {
- Pos = MAP_APPFONT ( 6 , 8 ) ;
- Size = MAP_APPFONT ( 23 , 10 ) ;
- Text [ en-US ] = "~Height" ;
- };
- MetricField MF_VALUE
- {
- HelpID = "dbaccess:MetricField:DLG_ROWHEIGHT:MF_VALUE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 36 , 6 ) ;
- Size = MAP_APPFONT ( 63 , 12 ) ;
- TabStop = TRUE ;
- Spin = TRUE ;
- Minimum = 10 ;
- Maximum = 1600 ;
- DecimalDigits = 2 ;
- Unit = FUNIT_CM ;
- Repeat = TRUE ;
- };
- CheckBox CB_STANDARD
- {
- HelpID = "dbaccess:CheckBox:DLG_ROWHEIGHT:CB_STANDARD";
- Pos = MAP_APPFONT ( 36 , 25 ) ;
- Size = MAP_APPFONT ( 62 , 12 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Automatic";
- };
- OKButton PB_OK
- {
- Pos = MAP_APPFONT ( 105 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton PB_CANCEL
- {
- Pos = MAP_APPFONT ( 105 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton PB_HELP
- {
- Pos = MAP_APPFONT ( 105 , 42 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- Text [ en-US ] = "Row Height" ;
-};
-ModalDialog DLG_COLWIDTH
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- HelpId = HID_DLG_COLWIDTH ;
- Size = MAP_APPFONT ( 159 , 59 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- FixedText FT_VALUE
- {
- Pos = MAP_APPFONT ( 6 , 8 ) ;
- Size = MAP_APPFONT ( 23 , 10 ) ;
- Text [ en-US ] = "~Width" ;
- };
- MetricField MF_VALUE
- {
- HelpID = "dbaccess:MetricField:DLG_COLWIDTH:MF_VALUE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 36 , 6 ) ;
- Size = MAP_APPFONT ( 63 , 12 ) ;
- TabStop = TRUE ;
- Spin = TRUE ;
- Minimum = 10 ;
- Maximum = 20000 ;
- DecimalDigits = 2 ;
- Unit = FUNIT_CM ;
- Repeat = TRUE ;
- };
- CheckBox CB_STANDARD
- {
- HelpID = "dbaccess:CheckBox:DLG_COLWIDTH:CB_STANDARD";
- Pos = MAP_APPFONT ( 36 , 25 ) ;
- Size = MAP_APPFONT ( 62 , 12 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Automatic";
- };
- OKButton PB_OK
- {
- Pos = MAP_APPFONT ( 105 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton PB_CANCEL
- {
- Pos = MAP_APPFONT ( 105 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton PB_HELP
- {
- Pos = MAP_APPFONT ( 105 , 42 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- Text [ en-US ] = "Column Width" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index 0eebf9cfeb62..dc0ed4f20d23 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -83,8 +83,7 @@
#define DLG_PARAMETERS RID_DIALOG_START + 5
#define DLG_FILTERCRIT RID_DIALOG_START + 6
#define DLG_ORDERCRIT RID_DIALOG_START + 7
-#define DLG_ROWHEIGHT RID_DIALOG_START + 8
-#define DLG_COLWIDTH RID_DIALOG_START + 9
+
#define DLG_ATTR RID_DIALOG_START + 10
#define DLG_SAVE_AS RID_DIALOG_START + 11
#define DLG_JOIN_TABADD RID_DIALOG_START + 14
diff --git a/dbaccess/source/ui/inc/dlgsize.hxx b/dbaccess/source/ui/inc/dlgsize.hxx
index ddfcbaadacd5..d61ca8ef99f3 100644
--- a/dbaccess/source/ui/inc/dlgsize.hxx
+++ b/dbaccess/source/ui/inc/dlgsize.hxx
@@ -39,17 +39,11 @@ namespace dbaui
protected:
DECL_LINK( CbClickHdl, Button * );
- FixedText aFT_VALUE;
- MetricField aMF_VALUE;
- CheckBox aCB_STANDARD;
- OKButton aPB_OK;
- CancelButton aPB_CANCEL;
- HelpButton aPB_HELP;
+ MetricField* m_pMF_VALUE;
+ CheckBox* m_pCB_STANDARD;
public:
DlgSize( Window * pParent, sal_Int32 nVal, sal_Bool bRow, sal_Int32 _nAlternativeStandard = -1 );
- ~DlgSize();
-
sal_Int32 GetValue();
};
} // namespace dbaui