summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-07-26 09:30:13 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-07-26 14:13:02 +0100
commit1b95b749e0fe8d909b918cf9b37b45209d6d3f8b (patch)
tree87a061b26e2e4ac799865c66fae19dc494f5c48c
parentc11b6db4a08cab2ba48a733bc565f26e33492061 (diff)
adapt code for define database range dialog .ui conversion
Change-Id: If89e5eded5873f1bb33d04bebcc742d747d7a1c4
-rw-r--r--sc/AllLangResTarget_sc.mk1
-rw-r--r--sc/UIConfig_scalc.mk1
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx320
-rw-r--r--sc/source/ui/inc/dbnamdlg.hxx55
-rw-r--r--sc/source/ui/src/dbnamdlg.src181
-rw-r--r--sc/uiconfig/scalc/ui/definedatabaserangedialog.ui396
-rw-r--r--sc/uiconfig/scalc/ui/managenamesdialog.ui2
-rw-r--r--vcl/source/window/builder.cxx7
8 files changed, 333 insertions, 630 deletions
diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index 03fd7bd675aa..88f60ad99dcb 100644
--- a/sc/AllLangResTarget_sc.mk
+++ b/sc/AllLangResTarget_sc.mk
@@ -51,7 +51,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/src/miscdlgs.src \
sc/source/ui/src/tabopdlg.src \
sc/source/ui/src/scstring.src \
- sc/source/ui/src/dbnamdlg.src \
sc/source/ui/src/sortdlg.src \
sc/source/ui/src/filter.src \
sc/source/ui/src/colorformat.src \
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 3244ea23f62a..2a168fa72bcf 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -66,6 +66,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/consolidatedialog \
sc/uiconfig/scalc/ui/createnamesdialog \
sc/uiconfig/scalc/ui/dataform \
+ sc/uiconfig/scalc/ui/definedatabaserangedialog \
sc/uiconfig/scalc/ui/definename \
sc/uiconfig/scalc/ui/deletecells \
sc/uiconfig/scalc/ui/deletecontents \
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index f9c8482255a9..e46ffc430dd2 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -24,13 +24,9 @@
#include "document.hxx"
#include "scresid.hxx"
#include "globstr.hrc"
-#include "dbnamdlg.hrc"
#include "rangenam.hxx" // IsNameValid
#include "globalnames.hxx"
-
-#define _DBNAMDLG_CXX
#include "dbnamdlg.hxx"
-#undef _DBNAMDLG_CXX
//============================================================================
@@ -118,56 +114,49 @@ void DBSaveData::Restore()
//----------------------------------------------------------------------------
-ScDbNameDlg::ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
- ScViewData* ptrViewData )
-
- : ScAnyRefDlg ( pB, pCW, pParent, RID_SCDLG_DBNAMES ),
- //
- aFlName ( this, ScResId( FL_NAME ) ),
- aEdName ( this, ScResId( ED_NAME ) ),
-
- aFlAssign ( this, ScResId( FL_ASSIGN ) ),
- aEdAssign ( this, this, &aFlAssign, ScResId( ED_DBAREA ) ),
- aRbAssign ( this, ScResId( RB_DBAREA ), &aEdAssign, this ),
-
- aFlOptions ( this, ScResId( FL_OPTIONS ) ),
- aBtnHeader ( this, ScResId( BTN_HEADER ) ),
- aBtnDoSize ( this, ScResId( BTN_SIZE ) ),
- aBtnKeepFmt ( this, ScResId( BTN_FORMAT ) ),
- aBtnStripData ( this, ScResId( BTN_STRIPDATA ) ),
- aFTSource ( this, ScResId( FT_SOURCE ) ),
- aFTOperations ( this, ScResId( FT_OPERATIONS ) ),
-
- aBtnOk ( this, ScResId( BTN_OK ) ),
- aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
- aBtnHelp ( this, ScResId( BTN_HELP ) ),
- aBtnAdd ( this, ScResId( BTN_ADD ) ),
- aBtnRemove ( this, ScResId( BTN_REMOVE ) ),
- aBtnMore ( this, ScResId( BTN_MORE ) ),
-
- aStrAdd ( ScResId( STR_ADD ) ),
- aStrModify ( ScResId( STR_MODIFY ) ),
- aStrInvalid ( ScResId( STR_DB_INVALID ) ),
- //
- pViewData ( ptrViewData ),
- pDoc ( ptrViewData->GetDocument() ),
- bRefInputMode ( false ),
- aAddrDetails ( pDoc->GetAddressConvention(), 0, 0 ),
- aLocalDbCol ( *(pDoc->GetDBCollection()) )
+ScDbNameDlg::ScDbNameDlg(SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ ScViewData* ptrViewData)
+ : ScAnyRefDlg(pB, pCW, pParent,
+ "DefineDatabaseRangeDialog",
+ "modules/scalc/ui/definedatabaserangedialog.ui")
+ , pViewData(ptrViewData)
+ , pDoc(ptrViewData->GetDocument())
+ , bRefInputMode(false)
+ , aAddrDetails(pDoc->GetAddressConvention(), 0, 0)
+ , aLocalDbCol(*(pDoc->GetDBCollection()))
{
- // WB_NOLABEL can't be set in resource...
- aFTSource.SetStyle( aFTSource.GetStyle() | WB_NOLABEL );
- aFTOperations.SetStyle( aFTOperations.GetStyle() | WB_NOLABEL );
+ get(m_pEdName, "entry");
+ m_pEdName->set_height_request(m_pEdName->GetOptimalSize().Height() + m_pEdName->GetTextHeight() * 8);
+ get(m_pEdAssign, "assign");
+ get(m_pAssignFrame, "RangeFrame");
+ m_pEdAssign->SetReferences(this, m_pAssignFrame->get_label_widget());
+ get(m_pRbAssign, "assignrb");
+ m_pRbAssign->SetReferences(this, m_pEdAssign);
+ get(m_pOptions, "Options");
+ get(m_pBtnHeader, "ContainsColumnLabels");
+ get(m_pBtnDoSize, "InsertOrDeleteCells");
+ get(m_pBtnKeepFmt, "KeepFormatting");
+ get(m_pBtnStripData, "DontSaveImportedData");
+ get(m_pFTSource, "Source");
+ get(m_pFTOperations, "Operations");
+ get(m_pBtnOk, "ok");
+ get(m_pBtnCancel, "cancel");
+ get(m_pBtnAdd, "add");
+ aStrAdd = m_pBtnAdd->GetText();
+ aStrModify = get<Window>("modify")->GetText();
+ get(m_pBtnRemove, "delete");
+ aStrInvalid = get<Window>("invalid")->GetText();
+
+ m_pFTSource->SetStyle(m_pFTSource->GetStyle() | WB_NOLABEL);
+ m_pFTOperations->SetStyle(m_pFTOperations->GetStyle() | WB_NOLABEL);
// damit die Strings in der Resource bei den FixedTexten bleiben koennen:
- aStrSource = aFTSource.GetText();
- aStrOperations = aFTOperations.GetText();
+ aStrSource = m_pFTSource->GetText();
+ aStrOperations = m_pFTOperations->GetText();
- pSaveObj = new DBSaveData( aEdAssign, aBtnHeader,
- aBtnDoSize, aBtnKeepFmt, aBtnStripData, theCurArea );
+ pSaveObj = new DBSaveData( *m_pEdAssign, *m_pBtnHeader,
+ *m_pBtnDoSize, *m_pBtnKeepFmt, *m_pBtnStripData, theCurArea );
Init();
- FreeResource();
- aRbAssign.SetAccessibleRelationMemberOf(&aFlAssign);
}
@@ -183,22 +172,14 @@ ScDbNameDlg::~ScDbNameDlg()
void ScDbNameDlg::Init()
{
- aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen
-
- aBtnMore.AddWindow( &aFlOptions );
- aBtnMore.AddWindow( &aBtnHeader );
- aBtnMore.AddWindow( &aBtnDoSize );
- aBtnMore.AddWindow( &aBtnKeepFmt );
- aBtnMore.AddWindow( &aBtnStripData );
- aBtnMore.AddWindow( &aFTSource );
- aBtnMore.AddWindow( &aFTOperations );
-
- aBtnOk.SetClickHdl ( LINK( this, ScDbNameDlg, OkBtnHdl ) );
- aBtnCancel.SetClickHdl ( LINK( this, ScDbNameDlg, CancelBtnHdl ) );
- aBtnAdd.SetClickHdl ( LINK( this, ScDbNameDlg, AddBtnHdl ) );
- aBtnRemove.SetClickHdl ( LINK( this, ScDbNameDlg, RemoveBtnHdl ) );
- aEdName.SetModifyHdl ( LINK( this, ScDbNameDlg, NameModifyHdl ) );
- aEdAssign.SetModifyHdl ( LINK( this, ScDbNameDlg, AssModifyHdl ) );
+ m_pBtnHeader->Check( sal_True ); // Default: mit Spaltenkoepfen
+
+ m_pBtnOk->SetClickHdl ( LINK( this, ScDbNameDlg, OkBtnHdl ) );
+ m_pBtnCancel->SetClickHdl ( LINK( this, ScDbNameDlg, CancelBtnHdl ) );
+ m_pBtnAdd->SetClickHdl ( LINK( this, ScDbNameDlg, AddBtnHdl ) );
+ m_pBtnRemove->SetClickHdl ( LINK( this, ScDbNameDlg, RemoveBtnHdl ) );
+ m_pEdName->SetModifyHdl ( LINK( this, ScDbNameDlg, NameModifyHdl ) );
+ m_pEdAssign->SetModifyHdl ( LINK( this, ScDbNameDlg, AssModifyHdl ) );
UpdateNames();
String theAreaStr;
@@ -245,20 +226,20 @@ void ScDbNameDlg::Init()
{
OUString aDBName = pDBData->GetName();
if ( aDBName != STR_DB_LOCAL_NONAME )
- aEdName.SetText(aDBName);
+ m_pEdName->SetText(aDBName);
- aBtnHeader.Check( pDBData->HasHeader() );
- aBtnDoSize.Check( pDBData->IsDoSize() );
- aBtnKeepFmt.Check( pDBData->IsKeepFmt() );
- aBtnStripData.Check( pDBData->IsStripData() );
+ m_pBtnHeader->Check( pDBData->HasHeader() );
+ m_pBtnDoSize->Check( pDBData->IsDoSize() );
+ m_pBtnKeepFmt->Check( pDBData->IsKeepFmt() );
+ m_pBtnStripData->Check( pDBData->IsStripData() );
SetInfoStrings( pDBData );
}
}
}
}
- aEdAssign.SetText( theAreaStr );
- aEdName.GrabFocus();
+ m_pEdAssign->SetText( theAreaStr );
+ m_pEdName->GrabFocus();
bSaved=sal_True;
pSaveObj->Save();
NameModifyHdl( 0 );
@@ -274,7 +255,7 @@ void ScDbNameDlg::SetInfoStrings( const ScDBData* pDBData )
aBuf.append(sal_Unicode(' '));
aBuf.append(pDBData->GetSourceString());
}
- aFTSource.SetText(aBuf.makeStringAndClear());
+ m_pFTSource->SetText(aBuf.makeStringAndClear());
aBuf.append(aStrOperations);
if (pDBData)
@@ -282,7 +263,7 @@ void ScDbNameDlg::SetInfoStrings( const ScDBData* pDBData )
aBuf.append(sal_Unicode(' '));
aBuf.append(pDBData->GetOperations());
}
- aFTOperations.SetText(aBuf.makeStringAndClear());
+ m_pFTOperations->SetText(aBuf.makeStringAndClear());
}
//----------------------------------------------------------------------------
@@ -291,23 +272,18 @@ void ScDbNameDlg::SetInfoStrings( const ScDBData* pDBData )
void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
{
- if ( aEdAssign.IsEnabled() )
+ if ( m_pEdAssign->IsEnabled() )
{
if ( rRef.aStart != rRef.aEnd )
- RefInputStart( &aEdAssign );
+ RefInputStart(m_pEdAssign);
theCurArea = rRef;
String aRefStr;
theCurArea.Format( aRefStr, ABS_DREF3D, pDocP, aAddrDetails );
- aEdAssign.SetRefString( aRefStr );
- aBtnHeader.Enable();
- aBtnDoSize.Enable();
- aBtnKeepFmt.Enable();
- aBtnStripData.Enable();
- aFTSource.Enable();
- aFTOperations.Enable();
- aBtnAdd.Enable();
+ m_pEdAssign->SetRefString( aRefStr );
+ m_pOptions->Enable();
+ m_pBtnAdd->Enable();
bSaved=sal_True;
pSaveObj->Save();
}
@@ -325,7 +301,7 @@ sal_Bool ScDbNameDlg::Close()
void ScDbNameDlg::SetActive()
{
- aEdAssign.GrabFocus();
+ m_pEdAssign->GrabFocus();
// kein NameModifyHdl, weil sonst Bereiche nicht geaendert werden koennen
// (nach dem Aufziehen der Referenz wuerde der alte Inhalt wieder angezeigt)
@@ -342,26 +318,26 @@ void ScDbNameDlg::UpdateNames()
const DBsType& rDBs = aLocalDbCol.getNamedDBs();
- aEdName.SetUpdateMode( false );
+ m_pEdName->SetUpdateMode( false );
//-----------------------------------------------------------
- aEdName.Clear();
- aEdAssign.SetText( EMPTY_STRING );
+ m_pEdName->Clear();
+ m_pEdAssign->SetText( EMPTY_STRING );
if (!rDBs.empty())
{
DBsType::const_iterator itr = rDBs.begin(), itrEnd = rDBs.end();
for (; itr != itrEnd; ++itr)
- aEdName.InsertEntry(itr->GetName());
+ m_pEdName->InsertEntry(itr->GetName());
}
else
{
- aBtnAdd.SetText( aStrAdd );
- aBtnAdd.Disable();
- aBtnRemove.Disable();
+ m_pBtnAdd->SetText( aStrAdd );
+ m_pBtnAdd->Disable();
+ m_pBtnRemove->Disable();
}
//-----------------------------------------------------------
- aEdName.SetUpdateMode( sal_True );
- aEdName.Invalidate();
+ m_pEdName->SetUpdateMode( sal_True );
+ m_pEdName->Invalidate();
}
//------------------------------------------------------------------------
@@ -384,24 +360,19 @@ void ScDbNameDlg::UpdateDBData( const String& rStrName )
ScAddress( nColEnd, nRowEnd, nTab ) );
OUString theArea;
theCurArea.Format( theArea, ABS_DREF3D, pDoc, aAddrDetails );
- aEdAssign.SetText( theArea );
- aBtnAdd.SetText( aStrModify );
- aBtnHeader.Check( pData->HasHeader() );
- aBtnDoSize.Check( pData->IsDoSize() );
- aBtnKeepFmt.Check( pData->IsKeepFmt() );
- aBtnStripData.Check( pData->IsStripData() );
+ m_pEdAssign->SetText( theArea );
+ m_pBtnAdd->SetText( aStrModify );
+ m_pBtnHeader->Check( pData->HasHeader() );
+ m_pBtnDoSize->Check( pData->IsDoSize() );
+ m_pBtnKeepFmt->Check( pData->IsKeepFmt() );
+ m_pBtnStripData->Check( pData->IsStripData() );
SetInfoStrings( pData );
}
- aBtnAdd.SetText( aStrModify );
- aBtnAdd.Enable();
- aBtnRemove.Enable();
- aBtnHeader.Enable();
- aBtnDoSize.Enable();
- aBtnKeepFmt.Enable();
- aBtnStripData.Enable();
- aFTSource.Enable();
- aFTOperations.Enable();
+ m_pBtnAdd->SetText( aStrModify );
+ m_pBtnAdd->Enable();
+ m_pBtnRemove->Enable();
+ m_pOptions->Enable();
}
//------------------------------------------------------------------------
@@ -444,8 +415,8 @@ IMPL_LINK_NOARG_INLINE_END(ScDbNameDlg, CancelBtnHdl)
IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl)
{
- String aNewName = comphelper::string::strip(aEdName.GetText(), ' ');
- String aNewArea = aEdAssign.GetText();
+ String aNewName = comphelper::string::strip(m_pEdName->GetText(), ' ');
+ String aNewArea = m_pEdAssign->GetText();
if ( aNewName.Len() > 0 && aNewArea.Len() > 0 )
{
@@ -453,7 +424,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl)
{
// weil jetzt editiert werden kann, muss erst geparst werden
ScRange aTmpRange;
- String aText = aEdAssign.GetText();
+ String aText = m_pEdAssign->GetText();
if ( aTmpRange.ParseAny( aText, pDoc, aAddrDetails ) & SCA_VALID )
{
theCurArea = aTmpRange;
@@ -468,10 +439,10 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl)
pOldEntry->MoveTo( aStart.Tab(), aStart.Col(), aStart.Row(),
aEnd.Col(), aEnd.Row() );
pOldEntry->SetByRow( sal_True );
- pOldEntry->SetHeader( aBtnHeader.IsChecked() );
- pOldEntry->SetDoSize( aBtnDoSize.IsChecked() );
- pOldEntry->SetKeepFmt( aBtnKeepFmt.IsChecked() );
- pOldEntry->SetStripData( aBtnStripData.IsChecked() );
+ pOldEntry->SetHeader( m_pBtnHeader->IsChecked() );
+ pOldEntry->SetDoSize( m_pBtnDoSize->IsChecked() );
+ pOldEntry->SetKeepFmt( m_pBtnKeepFmt->IsChecked() );
+ pOldEntry->SetStripData( m_pBtnStripData->IsChecked() );
}
else
{
@@ -480,26 +451,26 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl)
ScDBData* pNewEntry = new ScDBData( aNewName, aStart.Tab(),
aStart.Col(), aStart.Row(),
aEnd.Col(), aEnd.Row(),
- sal_True, aBtnHeader.IsChecked() );
- pNewEntry->SetDoSize( aBtnDoSize.IsChecked() );
- pNewEntry->SetKeepFmt( aBtnKeepFmt.IsChecked() );
- pNewEntry->SetStripData( aBtnStripData.IsChecked() );
+ sal_True, m_pBtnHeader->IsChecked() );
+ pNewEntry->SetDoSize( m_pBtnDoSize->IsChecked() );
+ pNewEntry->SetKeepFmt( m_pBtnKeepFmt->IsChecked() );
+ pNewEntry->SetStripData( m_pBtnStripData->IsChecked() );
aLocalDbCol.getNamedDBs().insert(pNewEntry);
}
UpdateNames();
- aEdName.SetText( EMPTY_STRING );
- aEdName.GrabFocus();
- aBtnAdd.SetText( aStrAdd );
- aBtnAdd.Disable();
- aBtnRemove.Disable();
- aEdAssign.SetText( EMPTY_STRING );
- aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen
- aBtnDoSize.Check( false );
- aBtnKeepFmt.Check( false );
- aBtnStripData.Check( false );
+ m_pEdName->SetText( EMPTY_STRING );
+ m_pEdName->GrabFocus();
+ m_pBtnAdd->SetText( aStrAdd );
+ m_pBtnAdd->Disable();
+ m_pBtnRemove->Disable();
+ m_pEdAssign->SetText( EMPTY_STRING );
+ m_pBtnHeader->Check( sal_True ); // Default: mit Spaltenkoepfen
+ m_pBtnDoSize->Check( false );
+ m_pBtnKeepFmt->Check( false );
+ m_pBtnStripData->Check( false );
SetInfoStrings( NULL ); // leer
theCurArea = ScRange();
bSaved=sal_True;
@@ -509,15 +480,15 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl)
else
{
ERRORBOX( aStrInvalid );
- aEdAssign.SetSelection( Selection( 0, SELECTION_MAX ) );
- aEdAssign.GrabFocus();
+ m_pEdAssign->SetSelection( Selection( 0, SELECTION_MAX ) );
+ m_pEdAssign->GrabFocus();
}
}
else
{
ERRORBOX( ScGlobal::GetRscString(STR_INVALIDNAME) );
- aEdName.SetSelection( Selection( 0, SELECTION_MAX ) );
- aEdName.GrabFocus();
+ m_pEdName->SetSelection( Selection( 0, SELECTION_MAX ) );
+ m_pEdName->GrabFocus();
}
}
return 0;
@@ -540,7 +511,7 @@ public:
IMPL_LINK_NOARG(ScDbNameDlg, RemoveBtnHdl)
{
- OUString aStrEntry = aEdName.GetText();
+ OUString aStrEntry = m_pEdName->GetText();
ScDBCollection::NamedDBs& rDBs = aLocalDbCol.getNamedDBs();
ScDBCollection::NamedDBs::iterator itr =
::std::find_if(rDBs.begin(), rDBs.end(), FindByName(aStrEntry));
@@ -569,17 +540,17 @@ IMPL_LINK_NOARG(ScDbNameDlg, RemoveBtnHdl)
UpdateNames();
- aEdName.SetText( EMPTY_STRING );
- aEdName.GrabFocus();
- aBtnAdd.SetText( aStrAdd );
- aBtnAdd.Disable();
- aBtnRemove.Disable();
- aEdAssign.SetText( EMPTY_STRING );
+ m_pEdName->SetText( EMPTY_STRING );
+ m_pEdName->GrabFocus();
+ m_pBtnAdd->SetText( aStrAdd );
+ m_pBtnAdd->Disable();
+ m_pBtnRemove->Disable();
+ m_pEdAssign->SetText( EMPTY_STRING );
theCurArea = ScRange();
- aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen
- aBtnDoSize.Check( false );
- aBtnKeepFmt.Check( false );
- aBtnStripData.Check( false );
+ m_pBtnHeader->Check( sal_True ); // Default: mit Spaltenkoepfen
+ m_pBtnDoSize->Check( false );
+ m_pBtnKeepFmt->Check( false );
+ m_pBtnStripData->Check( false );
SetInfoStrings( NULL ); // leer
bSaved=false;
pSaveObj->Restore();
@@ -593,25 +564,18 @@ IMPL_LINK_NOARG(ScDbNameDlg, RemoveBtnHdl)
IMPL_LINK_NOARG(ScDbNameDlg, NameModifyHdl)
{
- OUString theName = aEdName.GetText();
+ OUString theName = m_pEdName->GetText();
sal_Bool bNameFound = (COMBOBOX_ENTRY_NOTFOUND
- != aEdName.GetEntryPos( theName ));
+ != m_pEdName->GetEntryPos( theName ));
if ( theName.isEmpty() )
{
- if (aBtnAdd.GetText() != aStrAdd)
- aBtnAdd.SetText( aStrAdd );
- aBtnAdd .Disable();
- aBtnRemove .Disable();
- aFlAssign .Disable();
- aBtnHeader .Disable();
- aBtnDoSize .Disable();
- aBtnKeepFmt .Disable();
- aBtnStripData.Disable();
- aFTSource .Disable();
- aFTOperations.Disable();
- aEdAssign .Disable();
- aRbAssign .Disable();
+ if (m_pBtnAdd->GetText() != aStrAdd)
+ m_pBtnAdd->SetText( aStrAdd );
+ m_pBtnAdd->Disable();
+ m_pBtnRemove->Disable();
+ m_pAssignFrame->Disable();
+ m_pOptions->Disable();
//bSaved=sal_False;
//pSaveObj->Restore();
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
@@ -622,8 +586,8 @@ IMPL_LINK_NOARG(ScDbNameDlg, NameModifyHdl)
{
if ( bNameFound )
{
- if (aBtnAdd.GetText() != aStrModify)
- aBtnAdd.SetText( aStrModify );
+ if (m_pBtnAdd->GetText() != aStrModify)
+ m_pBtnAdd->SetText( aStrModify );
if(!bSaved)
{
@@ -634,38 +598,26 @@ IMPL_LINK_NOARG(ScDbNameDlg, NameModifyHdl)
}
else
{
- if (aBtnAdd.GetText() != aStrAdd)
- aBtnAdd.SetText( aStrAdd );
+ if (m_pBtnAdd->GetText() != aStrAdd)
+ m_pBtnAdd->SetText( aStrAdd );
bSaved=false;
pSaveObj->Restore();
- if ( !aEdAssign.GetText().isEmpty() )
+ if ( !m_pEdAssign->GetText().isEmpty() )
{
- aBtnAdd.Enable();
- aBtnHeader.Enable();
- aBtnDoSize.Enable();
- aBtnKeepFmt.Enable();
- aBtnStripData.Enable();
- aFTSource.Enable();
- aFTOperations.Enable();
+ m_pBtnAdd->Enable();
+ m_pOptions->Enable();
}
else
{
- aBtnAdd.Disable();
- aBtnHeader.Disable();
- aBtnDoSize.Disable();
- aBtnKeepFmt.Disable();
- aBtnStripData.Disable();
- aFTSource.Disable();
- aFTOperations.Disable();
+ m_pBtnAdd->Disable();
+ m_pOptions->Disable();
}
- aBtnRemove.Disable();
+ m_pBtnRemove->Disable();
}
- aFlAssign.Enable();
- aEdAssign.Enable();
- aRbAssign.Enable();
+ m_pAssignFrame->Enable();
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
//SFX_APPWINDOW->Enable();
@@ -681,7 +633,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, AssModifyHdl)
// hier parsen fuer Save() etc.
ScRange aTmpRange;
- String aText = aEdAssign.GetText();
+ String aText = m_pEdAssign->GetText();
if ( aTmpRange.ParseAny( aText, pDoc, aAddrDetails ) & SCA_VALID )
theCurArea = aTmpRange;
diff --git a/sc/source/ui/inc/dbnamdlg.hxx b/sc/source/ui/inc/dbnamdlg.hxx
index a6f01bd0a3ec..e36b6222ee2b 100644
--- a/sc/source/ui/inc/dbnamdlg.hxx
+++ b/sc/source/ui/inc/dbnamdlg.hxx
@@ -23,10 +23,9 @@
#include <vector>
#include <vcl/combobox.hxx>
-
#include <vcl/fixed.hxx>
+#include <vcl/layout.hxx>
-#include <vcl/morebtn.hxx>
#include "anyrefdg.hxx"
#include "dbdata.hxx"
#include "expftext.hxx"
@@ -51,37 +50,33 @@ public:
virtual sal_Bool Close();
private:
- FixedLine aFlName;
- ComboBox aEdName;
-
- FixedLine aFlAssign;
- formula::RefEdit aEdAssign;
- formula::RefButton aRbAssign;
-
- FixedLine aFlOptions;
- CheckBox aBtnHeader;
- CheckBox aBtnDoSize;
- CheckBox aBtnKeepFmt;
- CheckBox aBtnStripData;
- ScExpandedFixedText aFTSource;
- FixedText aFTOperations;
-
- OKButton aBtnOk;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
- PushButton aBtnAdd;
- PushButton aBtnRemove;
- MoreButton aBtnMore;
+ ComboBox* m_pEdName;
- sal_Bool bSaved;
+ VclFrame* m_pAssignFrame;
+ formula::RefEdit* m_pEdAssign;
+ formula::RefButton* m_pRbAssign;
+
+ VclContainer* m_pOptions;
+ CheckBox* m_pBtnHeader;
+ CheckBox* m_pBtnDoSize;
+ CheckBox* m_pBtnKeepFmt;
+ CheckBox* m_pBtnStripData;
+ FixedText* m_pFTSource;
+ FixedText* m_pFTOperations;
+ OKButton* m_pBtnOk;
+ CancelButton* m_pBtnCancel;
+ PushButton* m_pBtnAdd;
+ PushButton* m_pBtnRemove;
+
+ sal_Bool bSaved;
- const String aStrAdd;
- const String aStrModify;
- const String aStrInvalid;
+ OUString aStrAdd;
+ OUString aStrModify;
+ OUString aStrInvalid;
- String aStrSource;
- String aStrOperations;
+ OUString aStrSource;
+ OUString aStrOperations;
ScViewData* pViewData;
ScDocument* pDoc;
@@ -92,7 +87,6 @@ private:
ScRange theCurArea;
std::vector<ScRange> aRemoveList;
-#ifdef _DBNAMDLG_CXX
private:
void Init();
void UpdateNames();
@@ -105,7 +99,6 @@ private:
DECL_LINK( RemoveBtnHdl, void * );
DECL_LINK( NameModifyHdl, void * );
DECL_LINK( AssModifyHdl, void * );
-#endif
};
diff --git a/sc/source/ui/src/dbnamdlg.src b/sc/source/ui/src/dbnamdlg.src
deleted file mode 100644
index 11a372e2e70d..000000000000
--- a/sc/source/ui/src/dbnamdlg.src
+++ /dev/null
@@ -1,181 +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 "dbnamdlg.hrc"
-ModelessDialog RID_SCDLG_DBNAMES
-{
- OutputSize = TRUE ;
- HelpId = CMD_SID_DEFINE_DBNAME ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 222 , 142 ) ;
- Text [ en-US ] = "Define Database Range" ;
- Moveable = TRUE ;
- // Closeable = TRUE; // Dieser Dialog hat einen Cancel-Button !
- FixedLine FL_NAME
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 154 , 8 ) ;
- Text [ en-US ] = "Na~me" ;
- };
- ComboBox ED_NAME
- {
- HelpID = "sc:ComboBox:RID_SCDLG_DBNAMES:ED_NAME";
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 145 , 92 ) ;
- TabStop = TRUE ;
- VScroll = TRUE ;
- };
- FixedLine FL_ASSIGN
- {
- Pos = MAP_APPFONT ( 6 , 112 ) ;
- Size = MAP_APPFONT ( 154 , 8 ) ;
- Text [ en-US ] = "~Range" ;
- };
- Edit ED_DBAREA
- {
- HelpID = "sc:Edit:RID_SCDLG_DBNAMES:ED_DBAREA";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 123 ) ;
- Size = MAP_APPFONT ( 131 , 12 ) ;
- TabStop = TRUE ;
- };
- ImageButton RB_DBAREA
- {
- HelpID = "sc:ImageButton:RID_SCDLG_DBNAMES:RB_DBAREA";
- Pos = MAP_APPFONT ( 145 , 122 ) ;
- Size = MAP_APPFONT ( 13 , 15 ) ;
- TabStop = FALSE ;
- QuickHelpText [ en-US ] = "Shrink" ;
- };
- FixedLine FL_OPTIONS
- {
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 6 , 142 ) ;
- Size = MAP_APPFONT ( 154 , 8 ) ;
- Text [ en-US ] = "Options" ;
- };
- CheckBox BTN_HEADER
- {
- HelpID = "sc:CheckBox:RID_SCDLG_DBNAMES:BTN_HEADER";
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 12 , 153 ) ;
- Size = MAP_APPFONT ( 145 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Co~ntains column labels" ;
- };
- CheckBox BTN_SIZE
- {
- HelpID = "sc:CheckBox:RID_SCDLG_DBNAMES:BTN_SIZE";
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 12 , 167 ) ;
- Size = MAP_APPFONT ( 145 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Insert or delete ~cells" ;
- };
- CheckBox BTN_FORMAT
- {
- HelpID = "sc:CheckBox:RID_SCDLG_DBNAMES:BTN_FORMAT";
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 12 , 181 ) ;
- Size = MAP_APPFONT ( 145 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Keep ~formatting" ;
- };
- CheckBox BTN_STRIPDATA
- {
- HelpID = "sc:CheckBox:RID_SCDLG_DBNAMES:BTN_STRIPDATA";
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 12 , 195 ) ;
- Size = MAP_APPFONT ( 145 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Don't save ~imported data" ;
- };
- FixedText FT_SOURCE
- {
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 12 , 209 ) ;
- Size = MAP_APPFONT ( 145 , 8 ) ;
- Text [ en-US ] = "Source:" ;
- };
- FixedText FT_OPERATIONS
- {
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 12 , 221 ) ;
- Size = MAP_APPFONT ( 145 , 8 ) ;
- Text [ en-US ] = "Operations:" ;
- };
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 166 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 166 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- PushButton BTN_ADD
- {
- HelpID = "sc:PushButton:RID_SCDLG_DBNAMES:BTN_ADD";
- Pos = MAP_APPFONT ( 166 , 74 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~Add" ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- PushButton BTN_REMOVE
- {
- HelpID = "sc:PushButton:RID_SCDLG_DBNAMES:BTN_REMOVE";
- Pos = MAP_APPFONT ( 166 , 92 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~Delete" ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 166 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- MoreButton BTN_MORE
- {
- HelpID = "sc:MoreButton:RID_SCDLG_DBNAMES:BTN_MORE";
- Pos = MAP_APPFONT ( 166 , 122 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- MapUnit = MAP_APPFONT ;
- Delta = 93 ;
- };
- String STR_ADD
- {
- Text [ en-US ] = "~Add" ;
- };
- String STR_MODIFY
- {
- Text [ en-US ] = "M~odify" ;
- };
- String STR_DB_INVALID
- {
- Text [ en-US ] = "Invalid range" ;
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/uiconfig/scalc/ui/definedatabaserangedialog.ui b/sc/uiconfig/scalc/ui/definedatabaserangedialog.ui
index a8ee84f4ce8c..4305eaed589e 100644
--- a/sc/uiconfig/scalc/ui/definedatabaserangedialog.ui
+++ b/sc/uiconfig/scalc/ui/definedatabaserangedialog.ui
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
<object class="GtkDialog" id="DefineDatabaseRangeDialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -9,183 +10,44 @@
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="spacing">2</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="layout_style">start</property>
- <child>
- <object class="GtkBox" id="box7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</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="can_default">True</property>
- <property name="has_default">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="margin_bottom">59</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="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkButton" id="Add">
- <property name="label">gtk-add</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="Delete">
- <property name="label">gtk-delete</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>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="More">
- <property name="label" translatable="yes">More</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="margin_bottom">49</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>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">12</property>
<child>
<object class="GtkFrame" id="NameFrame">
<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="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="GtkBox" id="box2">
+ <object class="VclComboBoxText" id="entry">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkEntry" id="entry1">
- <property name="visible">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="has_entry">True</property>
+ <property name="dropdown">False</property>
+ <child internal-child="entry">
+ <object class="GtkEntry" id="ComboBoxText-entry">
<property name="can_focus">False</property>
- <property name="margin_left">12</property>
- <property name="invisible_char">•</property>
- <property name="invisible_char_set">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkTextView" id="textview1">
- <property name="width_request">325</property>
- <property name="height_request">155</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_left">12</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
</child>
@@ -212,27 +74,26 @@
<object class="GtkFrame" id="RangeFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkEntry" id="entry2">
- <property name="width_request">292</property>
+ <object class="foruilo-RefEdit" id="assign">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">12</property>
- <property name="margin_right">4</property>
- <property name="invisible_char">•</property>
- <property name="invisible_char_set">True</property>
+ <property name="hexpand">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -241,8 +102,7 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="button1">
- <property name="label" translatable="yes"> </property>
+ <object class="foruilo-RefButton" id="assignrb">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">True</property>
@@ -275,21 +135,21 @@
</packing>
</child>
<child>
- <object class="GtkFrame" id="OptionsFrame">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <object class="GtkExpander" id="more">
+ <property name="visible">True</property>
+ <property name="can_focus">True</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="top_padding">6</property>
<property name="left_padding">12</property>
<child>
- <object class="GtkBox" id="box4">
+ <object class="GtkBox" id="Options">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
@@ -298,7 +158,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="margin_left">12</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -315,7 +174,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="margin_left">12</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -332,7 +190,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="margin_left">12</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -344,12 +201,11 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="Don'tSaveImportedData">
+ <object class="GtkCheckButton" id="DontSaveImportedData">
<property name="label" translatable="yes">Don't save _imported data</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="margin_left">12</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -361,34 +217,11 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="box5">
+ <object class="GtkLabel" id="Source">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <child>
- <object class="GtkLabel" id="Source">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_right">12</property>
- <property name="label" translatable="yes">Source:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes"> </property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Source:</property>
</object>
<packing>
<property name="expand">False</property>
@@ -397,34 +230,11 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="box6">
+ <object class="GtkLabel" id="Operations">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <child>
- <object class="GtkLabel" id="Operations">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_right">12</property>
- <property name="label" translatable="yes">Operations:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes"> </property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Operations:</property>
</object>
<packing>
<property name="expand">False</property>
@@ -432,18 +242,28 @@
<property name="position">5</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="invalid">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Invalid range</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
</object>
</child>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="Options">
+ <object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Options</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
</object>
</child>
</object>
@@ -453,17 +273,131 @@
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkButtonBox" id="buttonbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <property name="layout_style">spread</property>
+ <child>
+ <object class="GtkButton" id="add">
+ <property name="label">gtk-add</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="modify">
+ <property name="label">M_odify</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="use_underline">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="delete">
+ <property name="label">gtk-delete</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="position">3</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <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="can_default">True</property>
+ <property name="has_default">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">2</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">3</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
- <action-widget response="0">More</action-widget>
+ <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>
diff --git a/sc/uiconfig/scalc/ui/managenamesdialog.ui b/sc/uiconfig/scalc/ui/managenamesdialog.ui
index d43551bad377..f022b58d4538 100644
--- a/sc/uiconfig/scalc/ui/managenamesdialog.ui
+++ b/sc/uiconfig/scalc/ui/managenamesdialog.ui
@@ -357,7 +357,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
- <property name="layout_style">start</property>
+ <property name="layout_style">spread</property>
<child>
<object class="GtkButton" id="add">
<property name="label">gtk-add</property>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index b091bf5bddaa..da45c56b5831 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1212,7 +1212,12 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
OString sPattern = extractCustomProperty(rMap);
extractModel(id, rMap);
- WinBits nBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_DROPDOWN;
+ WinBits nBits = WB_LEFT|WB_VCENTER|WB_3DLOOK;
+
+ bool bDropdown = VclBuilder::extractDropdown(rMap);
+
+ if (bDropdown)
+ nBits |= WB_DROPDOWN;
if (!sPattern.isEmpty())
{