diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-04-13 19:23:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-04-14 15:54:08 +0200 |
commit | c3bca577807d7cbd93ce8c66aab8798de45bef16 (patch) | |
tree | c320c4ae892ea79f7353486ebde03c667d03368a /sc | |
parent | 6154489314d2f2bf9cb99b72f15c79dd48a1da14 (diff) |
weld ScConsolidateDlg
Change-Id: I7d52aea1917503a37cdc7d1ae16d7d2377397f30
Reviewed-on: https://gerrit.libreoffice.org/70714
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/uitest/calc_tests2/consolidate.py | 9 | ||||
-rw-r--r-- | sc/source/ui/dbgui/consdlg.cxx | 415 | ||||
-rw-r--r-- | sc/source/ui/inc/consdlg.hxx | 84 | ||||
-rw-r--r-- | sc/source/ui/inc/reffact.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/reffact.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshc.cxx | 75 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/consolidatedialog.ui | 107 |
7 files changed, 339 insertions, 357 deletions
diff --git a/sc/qa/uitest/calc_tests2/consolidate.py b/sc/qa/uitest/calc_tests2/consolidate.py index 4d47d03be898..508ac7aaee83 100644 --- a/sc/qa/uitest/calc_tests2/consolidate.py +++ b/sc/qa/uitest/calc_tests2/consolidate.py @@ -87,14 +87,15 @@ class consolidate(UITestCase): xeddestarea = xDialog.getChild("eddestarea") xconsareas = xDialog.getChild("consareas") self.assertEqual(get_state_as_dict(xfunc)["SelectEntryText"], "Sum") - self.assertEqual(get_state_as_dict(xconsareas)["EntryCount"], "3") + self.assertEqual(get_state_as_dict(xconsareas)["Children"], "3") self.assertEqual(get_state_as_dict(xeddestarea)["Text"], "$Total.$A$2") self.assertEqual(get_state_as_dict(xbyrow)["Selected"], "true") self.assertEqual(get_state_as_dict(xbycol)["Selected"], "true") #delete first range - select_pos(xconsareas, "0") + xFirstEntry = xconsareas.getChild("0") + xFirstEntry.executeAction("SELECT", tuple()) xdelete.executeAction("CLICK", tuple()) - self.assertEqual(get_state_as_dict(xconsareas)["EntryCount"], "2") + self.assertEqual(get_state_as_dict(xconsareas)["Children"], "2") xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) @@ -120,4 +121,4 @@ class consolidate(UITestCase): self.ui_test.close_doc() -# vim: set shiftwidth=4 softtabstop=4 expandtab:
\ No newline at end of file +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index c2138dd89ffe..127d18dfde66 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -64,77 +64,48 @@ public: OUString aStrArea; }; -ScConsolidateDlg::ScConsolidateDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, - const SfxItemSet& rArgSet ) - - : ScAnyRefDlg ( pB, pCW, pParent, "ConsolidateDialog" , "modules/scalc/ui/consolidatedialog.ui" ), - aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ), - theConsData ( static_cast<const ScConsolidateItem&>( - rArgSet.Get( rArgSet.GetPool()-> - GetWhich( SID_CONSOLIDATE ) ) - ).GetData() ), - rViewData ( static_cast<ScTabViewShell*>(SfxViewShell::Current())-> - GetViewData() ), - pDoc ( static_cast<ScTabViewShell*>(SfxViewShell::Current())-> - GetViewData().GetDocument() ), - pRangeUtil ( new ScRangeUtil ), - nAreaDataCount ( 0 ), - nWhichCons ( rArgSet.GetPool()->GetWhich( SID_CONSOLIDATE ) ), - bDlgLostFocus ( false ) +ScConsolidateDlg::ScConsolidateDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent, + const SfxItemSet& rArgSet) + + : ScAnyRefDlgController(pB, pCW, pParent, "modules/scalc/ui/consolidatedialog.ui", "ConsolidateDialog") + , aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ) + , theConsData ( static_cast<const ScConsolidateItem&>( + rArgSet.Get( rArgSet.GetPool()-> + GetWhich( SID_CONSOLIDATE ) ) + ).GetData() ) + , rViewData ( static_cast<ScTabViewShell*>(SfxViewShell::Current())-> + GetViewData() ) + , pDoc ( static_cast<ScTabViewShell*>(SfxViewShell::Current())-> + GetViewData().GetDocument() ) + , pRangeUtil ( new ScRangeUtil ) + , nAreaDataCount ( 0 ) + , nWhichCons ( rArgSet.GetPool()->GetWhich( SID_CONSOLIDATE ) ) + , bDlgLostFocus ( false ) + , m_xLbFunc(m_xBuilder->weld_combo_box("func")) + , m_xLbConsAreas(m_xBuilder->weld_tree_view("consareas")) + , m_xLbDataArea(m_xBuilder->weld_combo_box("lbdataarea")) + , m_xEdDataArea(new formula::WeldRefEdit(m_xBuilder->weld_entry("eddataarea"))) + , m_xRbDataArea(new formula::WeldRefButton(m_xBuilder->weld_button("rbdataarea"))) + , m_xLbDestArea(m_xBuilder->weld_combo_box("lbdestarea")) + , m_xEdDestArea(new formula::WeldRefEdit(m_xBuilder->weld_entry("eddestarea"))) + , m_xRbDestArea(new formula::WeldRefButton(m_xBuilder->weld_button("rbdestarea"))) + , m_xExpander(m_xBuilder->weld_expander("more")) + , m_xBtnByRow(m_xBuilder->weld_check_button("byrow")) + , m_xBtnByCol(m_xBuilder->weld_check_button("bycol")) + , m_xBtnRefs(m_xBuilder->weld_check_button("refs")) + , m_xBtnOk(m_xBuilder->weld_button("ok")) + , m_xBtnCancel(m_xBuilder->weld_button("cancel")) + , m_xBtnAdd(m_xBuilder->weld_button("add")) + , m_xBtnRemove(m_xBuilder->weld_button("delete")) + , m_xDataFT(m_xBuilder->weld_label("ftdataarea")) + , m_xDestFT(m_xBuilder->weld_label("ftdestarea")) { - get(pLbFunc,"func"); - get(pLbConsAreas,"consareas"); - - get(pLbDataArea,"lbdataarea"); - get(pEdDataArea,"eddataarea"); - get(pRbDataArea,"rbdataarea"); - - pRefInputEdit = pEdDataArea; - - get(pLbDestArea,"lbdestarea"); - get(pEdDestArea,"eddestarea"); - get(pRbDestArea,"rbdestarea"); - - get(pExpander,"more"); - get(pBtnByRow,"byrow"); - get(pBtnByCol,"bycol"); - get(pBtnRefs,"refs"); - - get(pBtnOk,"ok"); - get(pBtnCancel,"cancel"); - get(pBtnAdd,"add"); - get(pBtnRemove,"delete"); - + m_pRefInputEdit = m_xEdDataArea.get(); Init(); } ScConsolidateDlg::~ScConsolidateDlg() { - disposeOnce(); -} - -void ScConsolidateDlg::dispose() -{ - pAreaData.reset(); - pRangeUtil.reset(); - pLbFunc.clear(); - pLbConsAreas.clear(); - pLbDataArea.clear(); - pEdDataArea.clear(); - pRbDataArea.clear(); - pLbDestArea.clear(); - pEdDestArea.clear(); - pRbDestArea.clear(); - pExpander.clear(); - pBtnByRow.clear(); - pBtnByCol.clear(); - pBtnRefs.clear(); - pBtnOk.clear(); - pBtnCancel.clear(); - pBtnAdd.clear(); - pBtnRemove.clear(); - pRefInputEdit.clear(); - ScAnyRefDlg::dispose(); } void ScConsolidateDlg::Init() @@ -144,43 +115,46 @@ void ScConsolidateDlg::Init() OUString aStr; sal_uInt16 i=0; - pRbDataArea->SetReferences(this, pEdDataArea); - pEdDataArea->SetReferences(this, get<FixedText>("ftdataarea")); - pRbDestArea->SetReferences(this, pEdDestArea); - pEdDestArea->SetReferences(this, get<FixedText>("ftdestarea")); - - pEdDataArea ->SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) ); - pEdDestArea ->SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) ); - pLbDataArea ->SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) ); - pLbDestArea ->SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) ); - pEdDataArea ->SetModifyHdl ( LINK( this, ScConsolidateDlg, ModifyHdl ) ); - pEdDestArea ->SetModifyHdl ( LINK( this, ScConsolidateDlg, ModifyHdl ) ); - pLbConsAreas->SetSelectHdl ( LINK( this, ScConsolidateDlg, SelectHdl ) ); - pLbDataArea ->SetSelectHdl ( LINK( this, ScConsolidateDlg, SelectHdl ) ); - pLbDestArea ->SetSelectHdl ( LINK( this, ScConsolidateDlg, SelectHdl ) ); - pBtnOk ->SetClickHdl ( LINK( this, ScConsolidateDlg, OkHdl ) ); - pBtnCancel ->SetClickHdl ( LINK( this, ScConsolidateDlg, ClickHdl ) ); - pBtnAdd ->SetClickHdl ( LINK( this, ScConsolidateDlg, ClickHdl ) ); - pBtnRemove ->SetClickHdl ( LINK( this, ScConsolidateDlg, ClickHdl ) ); - - pBtnAdd->Disable(); - pBtnRemove->Disable(); - - pBtnByRow->Check( theConsData.bByRow ); - pBtnByCol->Check( theConsData.bByCol ); - pBtnRefs->Check( theConsData.bReferenceData ); - - pLbFunc->SelectEntryPos( FuncToLbPos( theConsData.eFunction ) ); - - // Hack: pLbConsAreas used to be MultiLB. We don't have VCL builder equivalent - // of it yet. So enable selecting multiple items here - pLbConsAreas->EnableMultiSelection( true ); - - pLbConsAreas->set_width_request(pLbConsAreas->approximate_char_width() * 16); - pLbConsAreas->SetDropDownLineCount(5); + m_xRbDataArea->SetReferences(this, m_xEdDataArea.get()); + m_xEdDataArea->SetReferences(this, m_xDataFT.get()); + m_xRbDestArea->SetReferences(this, m_xEdDestArea.get()); + m_xEdDestArea->SetReferences(this, m_xDestFT.get()); + + m_xEdDataArea->SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetEditFocusHdl ) ); + m_xEdDestArea->SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetEditFocusHdl ) ); + m_xEdDataArea->SetLoseFocusHdl( LINK( this, ScConsolidateDlg, LoseEditFocusHdl ) ); + m_xEdDestArea->SetLoseFocusHdl( LINK( this, ScConsolidateDlg, LoseEditFocusHdl ) ); + m_xRbDataArea->SetLoseFocusHdl( LINK( this, ScConsolidateDlg, LoseButtonFocusHdl ) ); + m_xRbDestArea->SetLoseFocusHdl( LINK( this, ScConsolidateDlg, LoseButtonFocusHdl ) ); + m_xLbDataArea->connect_focus_in( LINK( this, ScConsolidateDlg, GetFocusHdl ) ); + m_xLbDestArea->connect_focus_in( LINK( this, ScConsolidateDlg, GetFocusHdl ) ); + m_xLbDataArea->connect_focus_out( LINK( this, ScConsolidateDlg, LoseFocusHdl ) ); + m_xLbDestArea->connect_focus_out( LINK( this, ScConsolidateDlg, LoseFocusHdl ) ); + m_xEdDataArea->SetModifyHdl( LINK( this, ScConsolidateDlg, ModifyHdl ) ); + m_xEdDestArea->SetModifyHdl( LINK( this, ScConsolidateDlg, ModifyHdl ) ); + m_xLbConsAreas->connect_changed( LINK( this, ScConsolidateDlg, SelectTVHdl ) ); + m_xLbDataArea->connect_changed( LINK( this, ScConsolidateDlg, SelectCBHdl ) ); + m_xLbDestArea->connect_changed( LINK( this, ScConsolidateDlg, SelectCBHdl ) ); + m_xBtnOk->connect_clicked( LINK( this, ScConsolidateDlg, OkHdl ) ); + m_xBtnCancel->connect_clicked( LINK( this, ScConsolidateDlg, ClickHdl ) ); + m_xBtnAdd->connect_clicked( LINK( this, ScConsolidateDlg, ClickHdl ) ); + m_xBtnRemove->connect_clicked( LINK( this, ScConsolidateDlg, ClickHdl ) ); + + m_xBtnAdd->set_sensitive(false); + m_xBtnRemove->set_sensitive(false); + + m_xBtnByRow->set_active( theConsData.bByRow ); + m_xBtnByCol->set_active( theConsData.bByCol ); + m_xBtnRefs->set_active( theConsData.bReferenceData ); + + m_xLbFunc->set_active( FuncToLbPos( theConsData.eFunction ) ); + + m_xLbConsAreas->set_selection_mode(SelectionMode::Multiple); + m_xLbConsAreas->set_size_request(m_xLbConsAreas->get_approximate_digit_width() * 16, + m_xLbConsAreas->get_height_rows(5)); // read consolidation areas - pLbConsAreas->Clear(); + m_xLbConsAreas->clear(); const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); for ( i=0; i<theConsData.nDataAreaCount; i++ ) { @@ -190,7 +164,7 @@ void ScConsolidateDlg::Init() aStr = ScRange( rArea.nColStart, rArea.nRowStart, rArea.nTab, rArea.nColEnd, rArea.nRowEnd, rArea.nTab ).Format( ScRefFlags::RANGE_ABS_3D, pDoc, eConv ); - pLbConsAreas->InsertEntry( aStr ); + m_xLbConsAreas->append_text(aStr); } } @@ -198,10 +172,10 @@ void ScConsolidateDlg::Init() { aStr = ScAddress( theConsData.nCol, theConsData.nRow, theConsData.nTab ).Format( ScRefFlags::ADDR_ABS_3D, pDoc, eConv ); - pEdDestArea->SetText( aStr ); + m_xEdDestArea->SetText( aStr ); } else - pEdDestArea->SetText(OUString()); + m_xEdDestArea->SetText(OUString()); // Use the ScAreaData helper class to save those range names from the // RangeNames and database ranges that appear in the ListBoxes. @@ -230,23 +204,23 @@ void ScConsolidateDlg::Init() } FillAreaLists(); - ModifyHdl( *pEdDestArea ); - pLbDataArea->SelectEntryPos( 0 ); - pEdDataArea->SetText(OUString()); - pEdDataArea->GrabFocus(); + ModifyHdl( *m_xEdDestArea ); + m_xLbDataArea->set_active( 0 ); + m_xEdDataArea->SetText(OUString()); + m_xEdDataArea->GrabFocus(); //aFlSep.SetStyle( aFlSep.GetStyle() | WB_VERT ); //@BugID 54702 enable/disable only in base class - //SFX_APPWINDOW->Enable(); + //SFX_APPWINDOW->set_sensitive(true); } void ScConsolidateDlg::FillAreaLists() { - pLbDataArea->Clear(); - pLbDestArea->Clear(); - pLbDataArea->InsertEntry( aStrUndefined ); - pLbDestArea->InsertEntry( aStrUndefined ); + m_xLbDataArea->clear(); + m_xLbDestArea->clear(); + m_xLbDataArea->append_text( aStrUndefined ); + m_xLbDestArea->append_text( aStrUndefined ); if ( pRangeUtil && pAreaData && (nAreaDataCount > 0) ) { @@ -254,10 +228,8 @@ void ScConsolidateDlg::FillAreaLists() (i<nAreaDataCount) && (!pAreaData[i].aStrName.isEmpty()); i++ ) { - pLbDataArea->InsertEntry( pAreaData[i].aStrName, i+1 ); - -// if ( !pAreaData[i].bIsDbArea ) - pLbDestArea->InsertEntry( pAreaData[i].aStrName, i+1 ); + m_xLbDataArea->append_text(pAreaData[i].aStrName); + m_xLbDestArea->append_text(pAreaData[i].aStrName); } } } @@ -267,10 +239,10 @@ void ScConsolidateDlg::FillAreaLists() void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) { - if ( pRefInputEdit ) + if ( m_pRefInputEdit ) { if ( rRef.aStart != rRef.aEnd ) - RefInputStart( pRefInputEdit ); + RefInputStart( m_pRefInputEdit ); OUString aStr; ScRefFlags nFmt = ScRefFlags::RANGE_ABS_3D; //!!! nCurTab is still missing @@ -279,19 +251,19 @@ void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) if ( rRef.aStart.Tab() != rRef.aEnd.Tab() ) nFmt |= ScRefFlags::TAB2_3D; - if ( pRefInputEdit == pEdDataArea) + if ( m_pRefInputEdit == m_xEdDataArea.get()) aStr = rRef.Format(nFmt, pDocP, eConv); - else if ( pRefInputEdit == pEdDestArea ) + else if ( m_pRefInputEdit == m_xEdDestArea.get() ) aStr = rRef.aStart.Format(nFmt, pDocP, eConv); - pRefInputEdit->SetRefString( aStr ); - ModifyHdl( *pRefInputEdit ); + m_pRefInputEdit->SetRefString( aStr ); + ModifyHdl( *m_pRefInputEdit ); } } -bool ScConsolidateDlg::Close() +void ScConsolidateDlg::Close() { - return DoClose( ScConsolidateDlgWrapper::GetChildWindowId() ); + DoClose( ScConsolidateDlgWrapper::GetChildWindowId() ); } void ScConsolidateDlg::SetActive() @@ -300,27 +272,37 @@ void ScConsolidateDlg::SetActive() { bDlgLostFocus = false; - if ( pRefInputEdit ) + if ( m_pRefInputEdit ) { - pRefInputEdit->GrabFocus(); - ModifyHdl( *pRefInputEdit ); + m_pRefInputEdit->GrabFocus(); + ModifyHdl( *m_pRefInputEdit ); } } else - GrabFocus(); + m_xDialog->grab_focus(); RefInputDone(); } -void ScConsolidateDlg::Deactivate() +IMPL_LINK_NOARG(ScConsolidateDlg, LoseFocusHdl, weld::Widget&, void) +{ + bDlgLostFocus = !m_xDialog->has_toplevel_focus(); +} + +IMPL_LINK_NOARG(ScConsolidateDlg, LoseEditFocusHdl, formula::WeldRefEdit&, void) +{ + bDlgLostFocus = !m_xDialog->has_toplevel_focus(); +} + +IMPL_LINK_NOARG(ScConsolidateDlg, LoseButtonFocusHdl, formula::WeldRefButton&, void) { - bDlgLostFocus = true; + bDlgLostFocus = !m_xDialog->has_toplevel_focus(); } -bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd ) +bool ScConsolidateDlg::VerifyEdit( formula::WeldRefEdit* pEd ) { if ( !pRangeUtil || !pDoc || - ((pEd != pEdDataArea) && (pEd != pEdDestArea)) ) + ((pEd != m_xEdDataArea.get()) && (pEd != m_xEdDestArea.get())) ) return false; SCTAB nTab = rViewData.GetTabNo(); @@ -328,12 +310,12 @@ bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd ) OUString theCompleteStr; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); - if ( pEd == pEdDataArea ) + if ( pEd == m_xEdDataArea.get() ) { bEditOk = ScRangeUtil::IsAbsArea( pEd->GetText(), pDoc, nTab, &theCompleteStr, nullptr, nullptr, eConv ); } - else if ( pEd == pEdDestArea ) + else if ( pEd == m_xEdDestArea.get() ) { OUString aPosStr; @@ -350,32 +332,28 @@ bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd ) // Handler: -IMPL_LINK( ScConsolidateDlg, GetFocusHdl, Control&, rControl, void ) +IMPL_LINK( ScConsolidateDlg, GetEditFocusHdl, formula::WeldRefEdit&, rControl, void ) { - if ( &rControl ==static_cast<Control*>(pEdDataArea) || - &rControl ==static_cast<Control*>(pEdDestArea)) - { - pRefInputEdit = static_cast<formula::RefEdit*>(&rControl); - } - else if(&rControl ==static_cast<Control*>(pLbDataArea) ) - { - pRefInputEdit = pEdDataArea; - } - else if(&rControl ==static_cast<Control*>(pLbDestArea) ) - { - pRefInputEdit = pEdDestArea; - } + m_pRefInputEdit = &rControl; } -IMPL_LINK_NOARG(ScConsolidateDlg, OkHdl, Button*, void) +IMPL_LINK( ScConsolidateDlg, GetFocusHdl, weld::Widget&, rControl, void ) { - const sal_Int32 nDataAreaCount = pLbConsAreas->GetEntryCount(); + if (&rControl == m_xLbDataArea.get()) + m_pRefInputEdit = m_xEdDataArea.get(); + else if (&rControl == m_xLbDestArea.get()) + m_pRefInputEdit = m_xEdDestArea.get(); +} + +IMPL_LINK_NOARG(ScConsolidateDlg, OkHdl, weld::Button&, void) +{ + const sal_Int32 nDataAreaCount = m_xLbConsAreas->n_children(); if ( nDataAreaCount > 0 ) { ScRefAddress aDestAddress; SCTAB nTab = rViewData.GetTabNo(); - OUString aDestPosStr( pEdDestArea->GetText() ); + OUString aDestPosStr( m_xEdDestArea->GetText() ); const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); if ( ScRangeUtil::IsAbsPos( aDestPosStr, pDoc, nTab, nullptr, &aDestAddress, eConv ) ) @@ -385,17 +363,17 @@ IMPL_LINK_NOARG(ScConsolidateDlg, OkHdl, Button*, void) for ( sal_Int32 i=0; i<nDataAreaCount; ++i ) { - ScRangeUtil::MakeArea( pLbConsAreas->GetEntry( i ), - pDataAreas[i], pDoc, nTab, eConv ); + ScRangeUtil::MakeArea(m_xLbConsAreas->get_text(i), + pDataAreas[i], pDoc, nTab, eConv); } theOutParam.nCol = aDestAddress.Col(); theOutParam.nRow = aDestAddress.Row(); theOutParam.nTab = aDestAddress.Tab(); - theOutParam.eFunction = LbPosToFunc( pLbFunc->GetSelectedEntryPos() ); - theOutParam.bByCol = pBtnByCol->IsChecked(); - theOutParam.bByRow = pBtnByRow->IsChecked(); - theOutParam.bReferenceData = pBtnRefs->IsChecked(); + theOutParam.eFunction = LbPosToFunc( m_xLbFunc->get_active() ); + theOutParam.bByCol = m_xBtnByCol->get_active(); + theOutParam.bByRow = m_xBtnByRow->get_active(); + theOutParam.bReferenceData = m_xBtnRefs->get_active(); theOutParam.SetAreas( std::move(pDataAreas), nDataAreaCount ); ScConsolidateItem aOutItem( nWhichCons, &theOutParam ); @@ -405,27 +383,27 @@ IMPL_LINK_NOARG(ScConsolidateDlg, OkHdl, Button*, void) GetBindings().GetDispatcher()->ExecuteList(SID_CONSOLIDATE, SfxCallMode::SLOT | SfxCallMode::RECORD, { &aOutItem }); - Close(); + response(RET_OK); } else { - INFOBOX(GetFrameWeld(), STR_INVALID_TABREF); - pEdDestArea->GrabFocus(); + INFOBOX(m_xDialog.get(), STR_INVALID_TABREF); + m_xEdDestArea->GrabFocus(); } } else - Close(); // no area defined -> Cancel + response(RET_CANCEL); // no area defined -> Cancel } -IMPL_LINK( ScConsolidateDlg, ClickHdl, Button*, pBtn, void ) +IMPL_LINK( ScConsolidateDlg, ClickHdl, weld::Button&, rBtn, void ) { - if ( pBtn == pBtnCancel ) - Close(); - else if ( pBtn == pBtnAdd ) + if ( &rBtn == m_xBtnCancel.get() ) + response(RET_CANCEL); + else if ( &rBtn == m_xBtnAdd.get() ) { - if ( !pEdDataArea->GetText().isEmpty() ) + if ( !m_xEdDataArea->GetText().isEmpty() ) { - OUString aNewEntry( pEdDataArea->GetText() ); + OUString aNewEntry( m_xEdDataArea->GetText() ); std::unique_ptr<ScArea[]> ppAreas; sal_uInt16 nAreaCount = 0; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); @@ -443,93 +421,90 @@ IMPL_LINK( ScConsolidateDlg, ClickHdl, Button*, pBtn, void ) rArea.nColEnd, rArea.nRowEnd, rArea.nTab ).Format(ScRefFlags::RANGE_ABS_3D, pDoc, eConv); - if ( pLbConsAreas->GetEntryPos( aNewArea ) - == LISTBOX_ENTRY_NOTFOUND ) + if (m_xLbConsAreas->find_text(aNewArea) == -1) { - pLbConsAreas->InsertEntry( aNewArea ); + m_xLbConsAreas->append_text( aNewArea ); } } } - else if ( VerifyEdit( pEdDataArea ) ) + else if ( VerifyEdit( m_xEdDataArea.get() ) ) { - OUString aNewArea( pEdDataArea->GetText() ); + OUString aNewArea( m_xEdDataArea->GetText() ); - if ( pLbConsAreas->GetEntryPos( aNewArea ) == LISTBOX_ENTRY_NOTFOUND ) - pLbConsAreas->InsertEntry( aNewArea ); + if (m_xLbConsAreas->find_text(aNewArea) == -1) + m_xLbConsAreas->append_text(aNewArea); else - INFOBOX(GetFrameWeld(), STR_AREA_ALREADY_INSERTED); + INFOBOX(m_xDialog.get(), STR_AREA_ALREADY_INSERTED); } else { - INFOBOX(GetFrameWeld(), STR_INVALID_TABREF); - pEdDataArea->GrabFocus(); + INFOBOX(m_xDialog.get(), STR_INVALID_TABREF); + m_xEdDataArea->GrabFocus(); } } } - else if ( pBtn == pBtnRemove ) + else if ( &rBtn == m_xBtnRemove.get() ) { - while ( pLbConsAreas->GetSelectedEntryCount() ) - pLbConsAreas->RemoveEntry( pLbConsAreas->GetSelectedEntryPos() ); - pBtnRemove->Disable(); + std::vector<int> aSelectedRows(m_xLbConsAreas->get_selected_rows()); + std::sort(aSelectedRows.begin(), aSelectedRows.end()); + for (auto it = aSelectedRows.rbegin(); it != aSelectedRows.rend(); ++it) + m_xLbConsAreas->remove(*it); + m_xBtnRemove->set_sensitive(false); } } -IMPL_LINK( ScConsolidateDlg, SelectHdl, ListBox&, rLb, void ) +IMPL_LINK( ScConsolidateDlg, SelectTVHdl, weld::TreeView&, rLb, void ) { - if ( &rLb == pLbConsAreas ) - { - if ( pLbConsAreas->GetSelectedEntryCount() > 0 ) - pBtnRemove->Enable(); - else - pBtnRemove->Disable(); - } - else if ( (&rLb == pLbDataArea) || (&rLb == pLbDestArea) ) - { - Edit* pEd = (&rLb == pLbDataArea) ? pEdDataArea : pEdDestArea; - const sal_Int32 nSelPos = rLb.GetSelectedEntryPos(); + if (rLb.get_selected_index() != -1) + m_xBtnRemove->set_sensitive(true); + else + m_xBtnRemove->set_sensitive(false); +} + +IMPL_LINK( ScConsolidateDlg, SelectCBHdl, weld::ComboBox&, rLb, void ) +{ + formula::WeldRefEdit* pEd = (&rLb == m_xLbDataArea.get()) ? m_xEdDataArea.get() : m_xEdDestArea.get(); + const sal_Int32 nSelPos = rLb.get_active(); - if ( pRangeUtil - && (nSelPos > 0) - && (nAreaDataCount > 0) - && (pAreaData != nullptr) ) + if ( pRangeUtil + && (nSelPos > 0) + && (nAreaDataCount > 0) + && (pAreaData != nullptr) ) + { + if ( static_cast<size_t>(nSelPos) <= nAreaDataCount ) { - if ( static_cast<size_t>(nSelPos) <= nAreaDataCount ) - { - OUString aString( pAreaData[nSelPos-1].aStrArea ); + OUString aString( pAreaData[nSelPos-1].aStrArea ); - if ( &rLb == pLbDestArea ) - ScRangeUtil::CutPosString( aString, aString ); + if ( &rLb == m_xLbDestArea.get() ) + ScRangeUtil::CutPosString( aString, aString ); - pEd->SetText( aString ); + pEd->SetText( aString ); - if ( pEd == pEdDataArea ) - pBtnAdd->Enable(); - } - } - else - { - pEd->SetText( EMPTY_OUSTRING ); - if ( pEd == pEdDataArea ) - pBtnAdd->Enable(); + if ( pEd == m_xEdDataArea.get() ) + m_xBtnAdd->set_sensitive(true); } } + else + { + pEd->SetText( EMPTY_OUSTRING ); + if ( pEd == m_xEdDataArea.get() ) + m_xBtnAdd->set_sensitive(true); + } } -IMPL_LINK( ScConsolidateDlg, ModifyHdl, Edit&, rEd, void ) +IMPL_LINK( ScConsolidateDlg, ModifyHdl, formula::WeldRefEdit&, rEd, void ) { - if ( &rEd == pEdDataArea ) + if ( &rEd == m_xEdDataArea.get() ) { OUString aAreaStr( rEd.GetText() ); if ( !aAreaStr.isEmpty() ) - { - pBtnAdd->Enable(); - } + m_xBtnAdd->set_sensitive(true); else - pBtnAdd->Disable(); + m_xBtnAdd->set_sensitive(false); } - else if ( &rEd == pEdDestArea ) + else if ( &rEd == m_xEdDestArea.get() ) { - pLbDestArea->SelectEntryPos(0); + m_xLbDestArea->set_active(0); } } diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx index f3e6401ed2e5..673122ea1a93 100644 --- a/sc/source/ui/inc/consdlg.hxx +++ b/sc/source/ui/inc/consdlg.hxx @@ -30,47 +30,21 @@ class ScDocument; class ScRangeUtil; class ScAreaData; -class ScConsolidateDlg : public ScAnyRefDlg +class ScConsolidateDlg : public ScAnyRefDlgController { public: - ScConsolidateDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, - const SfxItemSet& rArgSet ); - virtual ~ScConsolidateDlg() override; - virtual void dispose() override; + ScConsolidateDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent, + const SfxItemSet& rArgSet); + virtual ~ScConsolidateDlg() override; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) override; virtual bool IsRefInputMode() const override { return true; } virtual void SetActive() override; - virtual bool Close() override; - -protected: - virtual void Deactivate() override; + virtual void Close() override; private: - VclPtr<ListBox> pLbFunc; - VclPtr<ListBox> pLbConsAreas; - - VclPtr<ListBox> pLbDataArea; - VclPtr<formula::RefEdit> pEdDataArea; - VclPtr<formula::RefButton> pRbDataArea; - - VclPtr<ListBox> pLbDestArea; - VclPtr<formula::RefEdit> pEdDestArea; - VclPtr<formula::RefButton> pRbDestArea; - - VclPtr<VclExpander> pExpander; - VclPtr<CheckBox> pBtnByRow; - VclPtr<CheckBox> pBtnByCol; - - VclPtr<CheckBox> pBtnRefs; - - VclPtr<OKButton> pBtnOk; - VclPtr<CancelButton> pBtnCancel; - VclPtr<PushButton> pBtnAdd; - VclPtr<PushButton> pBtnRemove; - OUString const aStrUndefined; ScConsolidateParam const theConsData; @@ -80,19 +54,49 @@ private: std::unique_ptr<ScAreaData[]> pAreaData; size_t nAreaDataCount; sal_uInt16 const nWhichCons; - - VclPtr<formula::RefEdit> pRefInputEdit; bool bDlgLostFocus; + formula::WeldRefEdit* m_pRefInputEdit; + + std::unique_ptr<weld::ComboBox> m_xLbFunc; + std::unique_ptr<weld::TreeView> m_xLbConsAreas; + + std::unique_ptr<weld::ComboBox> m_xLbDataArea; + std::unique_ptr<formula::WeldRefEdit> m_xEdDataArea; + std::unique_ptr<formula::WeldRefButton> m_xRbDataArea; + + std::unique_ptr<weld::ComboBox> m_xLbDestArea; + std::unique_ptr<formula::WeldRefEdit> m_xEdDestArea; + std::unique_ptr<formula::WeldRefButton> m_xRbDestArea; + + std::unique_ptr<weld::Expander> m_xExpander; + std::unique_ptr<weld::CheckButton> m_xBtnByRow; + std::unique_ptr<weld::CheckButton> m_xBtnByCol; + + std::unique_ptr<weld::CheckButton> m_xBtnRefs; + + std::unique_ptr<weld::Button> m_xBtnOk; + std::unique_ptr<weld::Button> m_xBtnCancel; + std::unique_ptr<weld::Button> m_xBtnAdd; + std::unique_ptr<weld::Button> m_xBtnRemove; + + std::unique_ptr<weld::Label> m_xDataFT; + std::unique_ptr<weld::Label> m_xDestFT; + void Init (); void FillAreaLists (); - bool VerifyEdit ( formula::RefEdit* pEd ); - - DECL_LINK( OkHdl, Button*, void ); - DECL_LINK( ClickHdl, Button*, void ); - DECL_LINK( GetFocusHdl, Control&, void ); - DECL_LINK( ModifyHdl, Edit&, void ); - DECL_LINK( SelectHdl, ListBox&, void ); + bool VerifyEdit(formula::WeldRefEdit* pEd); + + DECL_LINK( OkHdl, weld::Button&, void ); + DECL_LINK( ClickHdl, weld::Button&, void ); + DECL_LINK( GetFocusHdl, weld::Widget&, void ); + DECL_LINK( LoseFocusHdl, weld::Widget&, void ); + DECL_LINK( GetEditFocusHdl, formula::WeldRefEdit&, void ); + DECL_LINK( LoseEditFocusHdl, formula::WeldRefEdit&, void ); + DECL_LINK( LoseButtonFocusHdl, formula::WeldRefButton&, void ); + DECL_LINK( ModifyHdl, formula::WeldRefEdit&, void ); + DECL_LINK( SelectTVHdl, weld::TreeView&, void ); + DECL_LINK( SelectCBHdl, weld::ComboBox&, void ); static ScSubTotalFunc LbPosToFunc( sal_Int32 nPos ); static sal_Int32 FuncToLbPos( ScSubTotalFunc eFunc ); diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx index c8ab3bc47651..81ec1f17e90e 100644 --- a/sc/source/ui/inc/reffact.hxx +++ b/sc/source/ui/inc/reffact.hxx @@ -54,7 +54,7 @@ DECL_WRAPPER_WITHID_CONTROLLER(ScTabOpDlgWrapper) DECL_WRAPPER_WITHID(ScFilterDlgWrapper) DECL_WRAPPER_WITHID(ScSpecialFilterDlgWrapper) DECL_WRAPPER_WITHID_CONTROLLER(ScDbNameDlgWrapper) -DECL_WRAPPER_WITHID(ScConsolidateDlgWrapper) +DECL_WRAPPER_WITHID_CONTROLLER(ScConsolidateDlgWrapper) DECL_WRAPPER_WITHID_CONTROLLER(ScPrintAreasDlgWrapper) DECL_WRAPPER_WITHID_CONTROLLER(ScColRowNameRangesDlgWrapper) DECL_WRAPPER_WITHID(ScFormulaDlgWrapper) diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx index b480dc079ce9..21e2b8a05e74 100644 --- a/sc/source/ui/view/reffact.cxx +++ b/sc/source/ui/view/reffact.cxx @@ -42,7 +42,7 @@ SFX_IMPL_CHILDWINDOW_WITHID(ScTabOpDlgWrapper, SID_OPENDLG_TABOP ) SFX_IMPL_MODELESSDIALOG_WITHID(ScFilterDlgWrapper, SID_FILTER ) SFX_IMPL_MODELESSDIALOG_WITHID(ScSpecialFilterDlgWrapper, SID_SPECIAL_FILTER ) SFX_IMPL_CHILDWINDOW_WITHID(ScDbNameDlgWrapper, SID_DEFINE_DBNAME ) -SFX_IMPL_MODELESSDIALOG_WITHID(ScConsolidateDlgWrapper, SID_OPENDLG_CONSOLIDATE ) +SFX_IMPL_CHILDWINDOW_WITHID(ScConsolidateDlgWrapper, SID_OPENDLG_CONSOLIDATE) SFX_IMPL_CHILDWINDOW_WITHID(ScPrintAreasDlgWrapper, SID_OPENDLG_EDIT_PRINTAREA ) SFX_IMPL_CHILDWINDOW_WITHID(ScColRowNameRangesDlgWrapper, SID_DEFINE_COLROWNAMERANGES ) SFX_IMPL_MODELESSDIALOG_WITHID(ScFormulaDlgWrapper, SID_OPENDLG_FUNCTION ) @@ -143,7 +143,7 @@ IMPL_CONTROLLER_CHILD_CTOR( ScDbNameDlgWrapper, SID_DEFINE_DBNAME ) IMPL_CONTROLLER_CHILD_CTOR( ScColRowNameRangesDlgWrapper, SID_DEFINE_COLROWNAMERANGES ) -IMPL_CHILD_CTOR( ScConsolidateDlgWrapper, SID_OPENDLG_CONSOLIDATE ) +IMPL_CONTROLLER_CHILD_CTOR( ScConsolidateDlgWrapper, SID_OPENDLG_CONSOLIDATE ) IMPL_CONTROLLER_CHILD_CTOR( ScPrintAreasDlgWrapper, SID_OPENDLG_EDIT_PRINTAREA ) diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx index 1452a319b577..202db6f17e6d 100644 --- a/sc/source/ui/view/tabvwshc.cxx +++ b/sc/source/ui/view/tabvwshc.cxx @@ -144,44 +144,6 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog( switch( nSlotId ) { - case SID_OPENDLG_CONSOLIDATE: - { - SfxItemSet aArgSet( GetPool(), - svl::Items<SCITEM_CONSOLIDATEDATA, - SCITEM_CONSOLIDATEDATA>{} ); - - const ScConsolidateParam* pDlgData = - pDoc->GetConsolidateDlgData(); - - if ( !pDlgData ) - { - ScConsolidateParam aConsParam; - SCCOL nStartCol, nEndCol; - SCROW nStartRow, nEndRow; - SCTAB nStartTab, nEndTab; - - GetViewData().GetSimpleArea( nStartCol, nStartRow, nStartTab, - nEndCol, nEndRow, nEndTab ); - - PutInOrder( nStartCol, nEndCol ); - PutInOrder( nStartRow, nEndRow ); - PutInOrder( nStartTab, nEndTab ); - - aConsParam.nCol = nStartCol; - aConsParam.nRow = nStartRow; - aConsParam.nTab = nStartTab; - - aArgSet.Put( ScConsolidateItem( SCITEM_CONSOLIDATEDATA, - &aConsParam ) ); - } - else - { - aArgSet.Put( ScConsolidateItem( SCITEM_CONSOLIDATEDATA, pDlgData ) ); - } - pResult = VclPtr<ScConsolidateDlg>::Create( pB, pCW, pParent, aArgSet ); - } - break; - case SID_SPECIAL_FILTER: { ScQueryParam aQueryParam; @@ -487,6 +449,43 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont xResult.reset(new ScTabOpDlg(pB, pCW, pParent, rViewData.GetDocument(), aCurPos)); break; } + case SID_OPENDLG_CONSOLIDATE: + { + SfxItemSet aArgSet( GetPool(), + svl::Items<SCITEM_CONSOLIDATEDATA, + SCITEM_CONSOLIDATEDATA>{} ); + + const ScConsolidateParam* pDlgData = + pDoc->GetConsolidateDlgData(); + + if ( !pDlgData ) + { + ScConsolidateParam aConsParam; + SCCOL nStartCol, nEndCol; + SCROW nStartRow, nEndRow; + SCTAB nStartTab, nEndTab; + + GetViewData().GetSimpleArea( nStartCol, nStartRow, nStartTab, + nEndCol, nEndRow, nEndTab ); + + PutInOrder( nStartCol, nEndCol ); + PutInOrder( nStartRow, nEndRow ); + PutInOrder( nStartTab, nEndTab ); + + aConsParam.nCol = nStartCol; + aConsParam.nRow = nStartRow; + aConsParam.nTab = nStartTab; + + aArgSet.Put( ScConsolidateItem( SCITEM_CONSOLIDATEDATA, + &aConsParam ) ); + } + else + { + aArgSet.Put( ScConsolidateItem( SCITEM_CONSOLIDATEDATA, pDlgData ) ); + } + xResult.reset(new ScConsolidateDlg(pB, pCW, pParent, aArgSet)); + break; + } } if (xResult) diff --git a/sc/uiconfig/scalc/ui/consolidatedialog.ui b/sc/uiconfig/scalc/ui/consolidatedialog.ui index 384b5d2315b2..5b91044f575a 100644 --- a/sc/uiconfig/scalc/ui/consolidatedialog.ui +++ b/sc/uiconfig/scalc/ui/consolidatedialog.ui @@ -1,14 +1,26 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.16.1 --> +<!-- Generated with glade 3.22.1 --> <interface domain="sc"> <requires lib="gtk+" version="3.18"/> - <requires lib="LibreOffice" version="1.0"/> + <object class="GtkTreeStore" id="liststore1"> + <columns> + <!-- column-name text --> + <column type="gchararray"/> + <!-- column-name id --> + <column type="gchararray"/> + </columns> + </object> <object class="GtkDialog" id="ConsolidateDialog"> <property name="can_focus">False</property> <property name="border_width">6</property> <property name="title" translatable="yes" context="consolidatedialog|ConsolidateDialog">Consolidate</property> <property name="resizable">False</property> + <property name="default_width">0</property> + <property name="default_height">0</property> <property name="type_hint">dialog</property> + <child> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> <property name="can_focus">False</property> @@ -87,16 +99,14 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="consolidatedialog|label1">_Function:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">func</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -104,16 +114,14 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="consolidatedialog|label2">_Consolidation ranges:</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">consareas:border</property> + <property name="mnemonic_widget">consareas</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">2</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -138,28 +146,47 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> - <object class="GtkTreeView" id="consareas:border"> + <object class="GtkScrolledWindow"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="show_expanders">False</property> - <child internal-child="selection"> - <object class="GtkTreeSelection" id="treeview-selection1"> - <property name="mode">multiple</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkTreeView" id="consareas"> + <property name="width_request">-1</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="model">liststore1</property> + <property name="headers_visible">False</property> + <property name="search_column">0</property> + <property name="show_expanders">False</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="Macro Library List-selection1"/> + </child> + <child> + <object class="GtkTreeViewColumn" id="treeviewcolumn3"> + <property name="spacing">6</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext3"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + </child> </object> </child> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">3</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> </object> @@ -182,7 +209,7 @@ <property name="vexpand">True</property> <property name="column_spacing">12</property> <child> - <object class="GtkComboBox" id="lbdataarea"> + <object class="GtkComboBoxText" id="lbdataarea"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> @@ -190,26 +217,23 @@ <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="eddataarea"> + <object class="GtkEntry" id="eddataarea"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hexpand">True</property> + <property name="activates_default">True</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="rbdataarea"> + <object class="GtkButton" id="rbdataarea"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -220,16 +244,12 @@ <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> <packing> <property name="left_attach">0</property> <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -240,7 +260,7 @@ <property name="vexpand">True</property> <property name="column_spacing">12</property> <child> - <object class="GtkComboBox" id="lbdestarea"> + <object class="GtkComboBoxText" id="lbdestarea"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> @@ -248,26 +268,23 @@ <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="eddestarea"> + <object class="GtkEntry" id="eddestarea"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hexpand">True</property> + <property name="activates_default">True</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="rbdestarea"> + <object class="GtkButton" id="rbdestarea"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -278,16 +295,12 @@ <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> <packing> <property name="left_attach">0</property> <property name="top_attach">3</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -331,40 +344,34 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">4</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> <object class="GtkLabel" id="ftdataarea"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="consolidatedialog|ftdataarea">_Source data ranges:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">lbdataarea</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> <object class="GtkLabel" id="ftdestarea"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="consolidatedialog|ftdestarea">Copy results _to:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">lbdestarea</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">2</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> </object> @@ -425,8 +432,6 @@ <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> @@ -443,8 +448,6 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> </object> |