LibreOffice Module sc (master) 1
consdlg.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <sfx2/dispatch.hxx>
21
22#include <tabvwsh.hxx>
23#include <uiitems.hxx>
24#include <dbdata.hxx>
25#include <rangenam.hxx>
26#include <rangeutl.hxx>
27#include <reffact.hxx>
28#include <document.hxx>
29#include <scresid.hxx>
30
31#include <globstr.hrc>
32#include <strings.hrc>
33
34#include <consdlg.hxx>
35#include <o3tl/safeint.hxx>
36#include <vcl/svapp.hxx>
37#include <vcl/weld.hxx>
38
39namespace
40{
41 void INFOBOX(weld::Window* pWindow, TranslateId id)
42 {
43 std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow,
44 VclMessageType::Info, VclButtonsType::Ok,
45 ScResId(id)));
46 xInfoBox->run();
47 }
48}
49
51{
52public:
54 {
55 }
56
57 void Set( const OUString& rName, const OUString& rArea )
58 {
59 aStrName = rName;
60 aStrArea = rArea;
61 }
62
63 OUString aStrName;
64 OUString aStrArea;
65};
66
68 const SfxItemSet& rArgSet)
69
70 : ScAnyRefDlgController(pB, pCW, pParent, "modules/scalc/ui/consolidatedialog.ui", "ConsolidateDialog")
71 , aStrUndefined ( ScResId( SCSTR_UNDEFINED ) )
72 , theConsData ( static_cast<const ScConsolidateItem&>(
73 rArgSet.Get( rArgSet.GetPool()->
74 GetWhich( SID_CONSOLIDATE ) )
75 ).GetData() )
76 , rViewData ( static_cast<ScTabViewShell*>(SfxViewShell::Current())->
77 GetViewData() )
78 , rDoc ( static_cast<ScTabViewShell*>(SfxViewShell::Current())->
79 GetViewData().GetDocument() )
80 , nAreaDataCount ( 0 )
81 , nWhichCons ( rArgSet.GetPool()->GetWhich( SID_CONSOLIDATE ) )
82 , bDlgLostFocus ( false )
83 , m_xLbFunc(m_xBuilder->weld_combo_box("func"))
84 , m_xLbConsAreas(m_xBuilder->weld_tree_view("consareas"))
85 , m_xLbDataArea(m_xBuilder->weld_combo_box("lbdataarea"))
86 , m_xEdDataArea(new formula::RefEdit(m_xBuilder->weld_entry("eddataarea")))
87 , m_xRbDataArea(new formula::RefButton(m_xBuilder->weld_button("rbdataarea")))
88 , m_xLbDestArea(m_xBuilder->weld_combo_box("lbdestarea"))
89 , m_xEdDestArea(new formula::RefEdit(m_xBuilder->weld_entry("eddestarea")))
90 , m_xRbDestArea(new formula::RefButton(m_xBuilder->weld_button("rbdestarea")))
91 , m_xBtnByRow(m_xBuilder->weld_check_button("byrow"))
92 , m_xBtnByCol(m_xBuilder->weld_check_button("bycol"))
93 , m_xBtnRefs(m_xBuilder->weld_check_button("refs"))
94 , m_xBtnOk(m_xBuilder->weld_button("ok"))
95 , m_xBtnCancel(m_xBuilder->weld_button("cancel"))
96 , m_xBtnAdd(m_xBuilder->weld_button("add"))
97 , m_xBtnRemove(m_xBuilder->weld_button("delete"))
98 , m_xDataFT(m_xBuilder->weld_label("ftdataarea"))
99 , m_xDestFT(m_xBuilder->weld_label("ftdestarea"))
100{
102 Init();
103}
104
106{
107}
108
110{
111 OUString aStr;
112 sal_uInt16 i=0;
113
114 m_xRbDataArea->SetReferences(this, m_xEdDataArea.get());
115 m_xEdDataArea->SetReferences(this, m_xDataFT.get());
116 m_xRbDestArea->SetReferences(this, m_xEdDestArea.get());
117 m_xEdDestArea->SetReferences(this, m_xDestFT.get());
118
119 m_xEdDataArea->SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetEditFocusHdl ) );
120 m_xEdDestArea->SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetEditFocusHdl ) );
121 m_xLbDataArea->connect_focus_in( LINK( this, ScConsolidateDlg, GetFocusHdl ) );
122 m_xLbDestArea->connect_focus_in( LINK( this, ScConsolidateDlg, GetFocusHdl ) );
123 m_xEdDataArea->SetModifyHdl( LINK( this, ScConsolidateDlg, ModifyHdl ) );
124 m_xEdDestArea->SetModifyHdl( LINK( this, ScConsolidateDlg, ModifyHdl ) );
125 m_xLbConsAreas->connect_changed( LINK( this, ScConsolidateDlg, SelectTVHdl ) );
126 m_xLbDataArea->connect_changed( LINK( this, ScConsolidateDlg, SelectCBHdl ) );
127 m_xLbDestArea->connect_changed( LINK( this, ScConsolidateDlg, SelectCBHdl ) );
128 m_xBtnOk->connect_clicked( LINK( this, ScConsolidateDlg, OkHdl ) );
129 m_xBtnCancel->connect_clicked( LINK( this, ScConsolidateDlg, ClickHdl ) );
130 m_xBtnAdd->connect_clicked( LINK( this, ScConsolidateDlg, ClickHdl ) );
131 m_xBtnRemove->connect_clicked( LINK( this, ScConsolidateDlg, ClickHdl ) );
132
133 m_xBtnAdd->set_sensitive(false);
134 m_xBtnRemove->set_sensitive(false);
135
136 m_xBtnByRow->set_active( theConsData.bByRow );
137 m_xBtnByCol->set_active( theConsData.bByCol );
139
140 m_xLbFunc->set_active( FuncToLbPos( theConsData.eFunction ) );
141
142 m_xLbConsAreas->set_selection_mode(SelectionMode::Multiple);
143 m_xLbConsAreas->set_size_request(m_xLbConsAreas->get_approximate_digit_width() * 16,
144 m_xLbConsAreas->get_height_rows(5));
145
146 // read consolidation areas
147 m_xLbConsAreas->clear();
149 for ( i=0; i<theConsData.nDataAreaCount; i++ )
150 {
151 const ScArea& rArea = theConsData.pDataAreas[i];
152 if ( rArea.nTab < rDoc.GetTableCount() )
153 {
154 aStr = ScRange( rArea.nColStart, rArea.nRowStart, rArea.nTab,
155 rArea.nColEnd, rArea.nRowEnd, rArea.nTab ).Format( rDoc,
157 m_xLbConsAreas->append_text(aStr);
158 }
159 }
160
162 {
164 ).Format( ScRefFlags::ADDR_ABS_3D, &rDoc, eConv );
165 m_xEdDestArea->SetText( aStr );
166 }
167 else
168 m_xEdDestArea->SetText(OUString());
169
170 // Use the ScAreaData helper class to save those range names from the
171 // RangeNames and database ranges that appear in the ListBoxes.
172
173 ScRangeName* pRangeNames = rDoc.GetRangeName();
174 ScDBCollection* pDbNames = rDoc.GetDBCollection();
175 size_t nRangeCount = pRangeNames ? pRangeNames->size() : 0;
176 size_t nDbCount = pDbNames ? pDbNames->getNamedDBs().size() : 0;
177
178 nAreaDataCount = nRangeCount+nDbCount;
179 pAreaData = nullptr;
180
181 if ( nAreaDataCount > 0 )
182 {
183 pAreaData.reset( new ScAreaData[nAreaDataCount] );
184
185 OUString aStrName;
186 sal_uInt16 nAt = 0;
187 ScRange aRange;
188 ScAreaNameIterator aIter( rDoc );
189 while ( aIter.Next( aStrName, aRange ) )
190 {
191 OUString aStrArea(aRange.Format(rDoc, ScRefFlags::ADDR_ABS_3D, eConv));
192 pAreaData[nAt++].Set( aStrName, aStrArea );
193 }
194 }
195
197 ModifyHdl( *m_xEdDestArea );
198 m_xLbDataArea->set_active( 0 );
199 m_xEdDataArea->SetText(OUString());
200 m_xEdDataArea->GrabFocus();
201
202 //aFlSep.SetStyle( aFlSep.GetStyle() | WB_VERT );
203
204 //@BugID 54702 enable/disable only in base class
205 //SFX_APPWINDOW->set_sensitive(true);
206}
207
209{
210 m_xLbDataArea->clear();
211 m_xLbDestArea->clear();
212 m_xLbDataArea->append_text( aStrUndefined );
213 m_xLbDestArea->append_text( aStrUndefined );
214
215 if ( pAreaData && (nAreaDataCount > 0) )
216 {
217 for ( size_t i=0;
218 (i<nAreaDataCount) && (!pAreaData[i].aStrName.isEmpty());
219 i++ )
220 {
221 m_xLbDataArea->append_text(pAreaData[i].aStrName);
222 m_xLbDestArea->append_text(pAreaData[i].aStrName);
223 }
224 }
225}
226
227// Handover of a range within a table that has been selected by the mouse.
228// This range is then shown in the reference window as new selection.
229
231{
232 if ( !m_pRefInputEdit )
233 return;
234
235 if ( rRef.aStart != rRef.aEnd )
237
238 OUString aStr;
241
242 if ( rRef.aStart.Tab() != rRef.aEnd.Tab() )
243 nFmt |= ScRefFlags::TAB2_3D;
244
245 if ( m_pRefInputEdit == m_xEdDataArea.get())
246 aStr = rRef.Format(rDocP, nFmt, eConv);
247 else if ( m_pRefInputEdit == m_xEdDestArea.get() )
248 aStr = rRef.aStart.Format(nFmt, &rDocP, eConv);
249
251 ModifyHdl( *m_pRefInputEdit );
252}
253
255{
256 DoClose( ScConsolidateDlgWrapper::GetChildWindowId() );
257}
258
260{
261 if ( bDlgLostFocus )
262 {
263 bDlgLostFocus = false;
264
265 if ( m_pRefInputEdit )
266 {
268 ModifyHdl( *m_pRefInputEdit );
269 }
270 }
271 else
272 m_xDialog->grab_focus();
273
274 RefInputDone();
275}
276
278{
279 bDlgLostFocus = true;
280}
281
283{
284 if (pEd != m_xEdDataArea.get() && pEd != m_xEdDestArea.get())
285 return false;
286
287 SCTAB nTab = rViewData.GetTabNo();
288 bool bEditOk = false;
289 OUString theCompleteStr;
291
292 if ( pEd == m_xEdDataArea.get() )
293 {
294 bEditOk = ScRangeUtil::IsAbsArea( pEd->GetText(), rDoc,
295 nTab, &theCompleteStr, nullptr, nullptr, eConv );
296 }
297 else if ( pEd == m_xEdDestArea.get() )
298 {
299 OUString aPosStr;
300
301 ScRangeUtil::CutPosString( pEd->GetText(), aPosStr );
302 bEditOk = ScRangeUtil::IsAbsPos( aPosStr, rDoc,
303 nTab, &theCompleteStr, nullptr, eConv );
304 }
305
306 if ( bEditOk )
307 pEd->SetText( theCompleteStr );
308
309 return bEditOk;
310}
311
312// Handler:
313
314IMPL_LINK( ScConsolidateDlg, GetEditFocusHdl, formula::RefEdit&, rControl, void )
315{
316 m_pRefInputEdit = &rControl;
317}
318
319IMPL_LINK( ScConsolidateDlg, GetFocusHdl, weld::Widget&, rControl, void )
320{
321 if (&rControl == m_xLbDataArea.get())
322 m_pRefInputEdit = m_xEdDataArea.get();
323 else if (&rControl == m_xLbDestArea.get())
324 m_pRefInputEdit = m_xEdDestArea.get();
325}
326
328{
329 const sal_Int32 nDataAreaCount = m_xLbConsAreas->n_children();
330
331 if ( nDataAreaCount > 0 )
332 {
333 ScRefAddress aDestAddress;
334 SCTAB nTab = rViewData.GetTabNo();
335 OUString aDestPosStr( m_xEdDestArea->GetText() );
336 const formula::FormulaGrammar::AddressConvention eConv = rDoc.GetAddressConvention();
337
338 if ( ScRangeUtil::IsAbsPos( aDestPosStr, rDoc, nTab, nullptr, &aDestAddress, eConv ) )
339 {
340 ScConsolidateParam theOutParam( theConsData );
341 std::unique_ptr<ScArea[]> pDataAreas(new ScArea[nDataAreaCount]);
342
343 for ( sal_Int32 i=0; i<nDataAreaCount; ++i )
344 {
345 ScRangeUtil::MakeArea(m_xLbConsAreas->get_text(i),
346 pDataAreas[i], rDoc, nTab, eConv);
347 }
348
349 theOutParam.nCol = aDestAddress.Col();
350 theOutParam.nRow = aDestAddress.Row();
351 theOutParam.nTab = aDestAddress.Tab();
352 theOutParam.eFunction = LbPosToFunc( m_xLbFunc->get_active() );
353 theOutParam.bByCol = m_xBtnByCol->get_active();
354 theOutParam.bByRow = m_xBtnByRow->get_active();
355 theOutParam.bReferenceData = m_xBtnRefs->get_active();
356 theOutParam.SetAreas( std::move(pDataAreas), nDataAreaCount );
357
358 ScConsolidateItem aOutItem( nWhichCons, &theOutParam );
359
360 SetDispatcherLock( false );
361 SwitchToDocument();
362 GetBindings().GetDispatcher()->ExecuteList(SID_CONSOLIDATE,
363 SfxCallMode::SLOT | SfxCallMode::RECORD,
364 { &aOutItem });
365 response(RET_OK);
366 }
367 else
368 {
369 INFOBOX(m_xDialog.get(), STR_INVALID_TABREF);
370 m_xEdDestArea->GrabFocus();
371 }
372 }
373 else
374 response(RET_CANCEL); // no area defined -> Cancel
375}
376
377IMPL_LINK( ScConsolidateDlg, ClickHdl, weld::Button&, rBtn, void )
378{
379 if ( &rBtn == m_xBtnCancel.get() )
380 response(RET_CANCEL);
381 else if ( &rBtn == m_xBtnAdd.get() )
382 {
383 if ( !m_xEdDataArea->GetText().isEmpty() )
384 {
385 OUString aNewEntry( m_xEdDataArea->GetText() );
386 std::unique_ptr<ScArea[]> ppAreas;
387 sal_uInt16 nAreaCount = 0;
388 const formula::FormulaGrammar::AddressConvention eConv = rDoc.GetAddressConvention();
389
390 if ( ScRangeUtil::IsAbsTabArea( aNewEntry, &rDoc, &ppAreas, &nAreaCount, true, eConv ) )
391 {
392 // IsAbsTabArea() creates an array of ScArea pointers,
393 // which have been created dynamically as well.
394 // These objects need to be deleted here.
395
396 for ( sal_uInt16 i=0; i<nAreaCount; i++ )
397 {
398 const ScArea& rArea = ppAreas[i];
399 OUString aNewArea = ScRange( rArea.nColStart, rArea.nRowStart, rArea.nTab,
400 rArea.nColEnd, rArea.nRowEnd, rArea.nTab
401 ).Format(rDoc, ScRefFlags::RANGE_ABS_3D, eConv);
402
403 if (m_xLbConsAreas->find_text(aNewArea) == -1)
404 {
405 m_xLbConsAreas->append_text( aNewArea );
406 }
407 }
408 }
409 else if ( VerifyEdit( m_xEdDataArea.get() ) )
410 {
411 OUString aNewArea( m_xEdDataArea->GetText() );
412
413 if (m_xLbConsAreas->find_text(aNewArea) == -1)
414 m_xLbConsAreas->append_text(aNewArea);
415 else
416 INFOBOX(m_xDialog.get(), STR_AREA_ALREADY_INSERTED);
417 }
418 else
419 {
420 INFOBOX(m_xDialog.get(), STR_INVALID_TABREF);
421 m_xEdDataArea->GrabFocus();
422 }
423 }
424 }
425 else if ( &rBtn == m_xBtnRemove.get() )
426 {
427 std::vector<int> aSelectedRows(m_xLbConsAreas->get_selected_rows());
428 std::sort(aSelectedRows.begin(), aSelectedRows.end());
429 for (auto it = aSelectedRows.rbegin(); it != aSelectedRows.rend(); ++it)
430 m_xLbConsAreas->remove(*it);
431 m_xBtnRemove->set_sensitive(false);
432 }
433}
434
435IMPL_LINK( ScConsolidateDlg, SelectTVHdl, weld::TreeView&, rLb, void )
436{
437 if (rLb.get_selected_index() != -1)
438 m_xBtnRemove->set_sensitive(true);
439 else
440 m_xBtnRemove->set_sensitive(false);
441}
442
443IMPL_LINK( ScConsolidateDlg, SelectCBHdl, weld::ComboBox&, rLb, void )
444{
445 formula::RefEdit* pEd = (&rLb == m_xLbDataArea.get()) ? m_xEdDataArea.get() : m_xEdDestArea.get();
446 const sal_Int32 nSelPos = rLb.get_active();
447
448 if ( (nSelPos > 0)
449 && (nAreaDataCount > 0)
450 && (pAreaData != nullptr) )
451 {
452 if ( o3tl::make_unsigned(nSelPos) <= nAreaDataCount )
453 {
454 OUString aString( pAreaData[nSelPos-1].aStrArea );
455
456 if ( &rLb == m_xLbDestArea.get() )
457 ScRangeUtil::CutPosString( aString, aString );
458
459 pEd->SetText( aString );
460
461 if ( pEd == m_xEdDataArea.get() )
462 m_xBtnAdd->set_sensitive(true);
463 }
464 }
465 else
466 {
467 pEd->SetText( OUString() );
468 if ( pEd == m_xEdDataArea.get() )
469 m_xBtnAdd->set_sensitive(true);
470 }
471}
472
474{
475 if ( &rEd == m_xEdDataArea.get() )
476 {
477 OUString aAreaStr( rEd.GetText() );
478 if ( !aAreaStr.isEmpty() )
479 m_xBtnAdd->set_sensitive(true);
480 else
481 m_xBtnAdd->set_sensitive(false);
482 }
483 else if ( &rEd == m_xEdDestArea.get() )
484 {
485 m_xLbDestArea->set_active(0);
486 }
487}
488
489// TODO: generalize!
490// Resource of the ListBox and these two conversion methods are also in
491// tpsubt and everywhere, where StarCalc functions are selectable.
492
494{
495 switch ( nPos )
496 {
497 case 2: return SUBTOTAL_FUNC_AVE;
498 case 6: return SUBTOTAL_FUNC_CNT;
499 case 1: return SUBTOTAL_FUNC_CNT2;
500 case 3: return SUBTOTAL_FUNC_MAX;
501 case 4: return SUBTOTAL_FUNC_MIN;
502 case 5: return SUBTOTAL_FUNC_PROD;
503 case 7: return SUBTOTAL_FUNC_STD;
504 case 8: return SUBTOTAL_FUNC_STDP;
505 case 9: return SUBTOTAL_FUNC_VAR;
506 case 10: return SUBTOTAL_FUNC_VARP;
507 case 0:
508 default:
509 return SUBTOTAL_FUNC_SUM;
510 }
511}
512
514{
515 switch ( eFunc )
516 {
517 case SUBTOTAL_FUNC_AVE: return 2;
518 case SUBTOTAL_FUNC_CNT: return 6;
519 case SUBTOTAL_FUNC_CNT2: return 1;
520 case SUBTOTAL_FUNC_MAX: return 3;
521 case SUBTOTAL_FUNC_MIN: return 4;
522 case SUBTOTAL_FUNC_PROD: return 5;
523 case SUBTOTAL_FUNC_STD: return 7;
524 case SUBTOTAL_FUNC_STDP: return 8;
525 case SUBTOTAL_FUNC_VAR: return 9;
526 case SUBTOTAL_FUNC_VARP: return 10;
529 default:
530 return 0;
531 }
532}
533
534/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScRefFlags
Definition: address.hxx:158
Reference< XExecutableDialog > m_xDialog
#define GetWhich(nSlot)
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
SCTAB Tab() const
Definition: address.hxx:283
SC_DLLPUBLIC void Format(OStringBuffer &r, ScRefFlags nFlags, const ScDocument *pDocument=nullptr, const Details &rDetails=detailsOOOa1) const
Definition: address.cxx:2074
OUString aStrArea
Definition: consdlg.cxx:64
void Set(const OUString &rName, const OUString &rArea)
Definition: consdlg.cxx:57
OUString aStrName
Definition: consdlg.cxx:63
ScAreaData()
Definition: consdlg.cxx:53
bool Next(OUString &rName, ScRange &rRange)
Definition: rangeutl.cxx:1006
SCCOL nColEnd
Definition: rangeutl.hxx:250
SCTAB nTab
Definition: rangeutl.hxx:247
SCCOL nColStart
Definition: rangeutl.hxx:248
SCROW nRowEnd
Definition: rangeutl.hxx:251
SCROW nRowStart
Definition: rangeutl.hxx:249
std::unique_ptr< weld::ComboBox > m_xLbDataArea
Definition: consdlg.hxx:61
std::unique_ptr< weld::CheckButton > m_xBtnRefs
Definition: consdlg.hxx:72
void FillAreaLists()
Definition: consdlg.cxx:208
virtual void Deactivate() override
Definition: consdlg.cxx:277
ScDocument & rDoc
Definition: consdlg.hxx:50
bool bDlgLostFocus
Definition: consdlg.hxx:54
std::unique_ptr< ScAreaData[]> pAreaData
Definition: consdlg.hxx:51
static sal_Int32 FuncToLbPos(ScSubTotalFunc eFunc)
Definition: consdlg.cxx:513
std::unique_ptr< weld::Button > m_xBtnOk
Definition: consdlg.hxx:74
virtual ~ScConsolidateDlg() override
Definition: consdlg.cxx:105
std::unique_ptr< weld::Button > m_xBtnRemove
Definition: consdlg.hxx:77
std::unique_ptr< weld::TreeView > m_xLbConsAreas
Definition: consdlg.hxx:59
std::unique_ptr< formula::RefEdit > m_xEdDestArea
Definition: consdlg.hxx:66
static ScSubTotalFunc LbPosToFunc(sal_Int32 nPos)
Definition: consdlg.cxx:493
OUString aStrUndefined
Definition: consdlg.hxx:46
std::unique_ptr< weld::CheckButton > m_xBtnByRow
Definition: consdlg.hxx:69
std::unique_ptr< weld::Button > m_xBtnAdd
Definition: consdlg.hxx:76
std::unique_ptr< weld::CheckButton > m_xBtnByCol
Definition: consdlg.hxx:70
std::unique_ptr< formula::RefButton > m_xRbDataArea
Definition: consdlg.hxx:63
virtual void SetActive() override
Definition: consdlg.cxx:259
ScConsolidateDlg(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, const SfxItemSet &rArgSet)
Definition: consdlg.cxx:67
ScViewData & rViewData
Definition: consdlg.hxx:49
virtual void SetReference(const ScRange &rRef, ScDocument &rDoc) override
Definition: consdlg.cxx:230
std::unique_ptr< weld::ComboBox > m_xLbDestArea
Definition: consdlg.hxx:65
std::unique_ptr< weld::Button > m_xBtnCancel
Definition: consdlg.hxx:75
ScConsolidateParam theConsData
Definition: consdlg.hxx:48
std::unique_ptr< weld::Label > m_xDataFT
Definition: consdlg.hxx:79
virtual void Close() override
Definition: consdlg.cxx:254
formula::RefEdit * m_pRefInputEdit
Definition: consdlg.hxx:56
std::unique_ptr< formula::RefEdit > m_xEdDataArea
Definition: consdlg.hxx:62
size_t nAreaDataCount
Definition: consdlg.hxx:52
std::unique_ptr< formula::RefButton > m_xRbDestArea
Definition: consdlg.hxx:67
std::unique_ptr< weld::Label > m_xDestFT
Definition: consdlg.hxx:80
bool VerifyEdit(formula::RefEdit *pEd)
Definition: consdlg.cxx:282
std::unique_ptr< weld::ComboBox > m_xLbFunc
Definition: consdlg.hxx:58
size_t size() const
Definition: dbdata.cxx:1273
NamedDBs & getNamedDBs()
Definition: dbdata.hxx:324
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:492
SC_DLLPUBLIC ScDBCollection * GetDBCollection() const
Definition: document.hxx:827
SC_DLLPUBLIC ScRangeName * GetRangeName(SCTAB nTab) const
Definition: documen3.cxx:171
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:297
SC_DLLPUBLIC size_t size() const
Definition: rangenam.hxx:247
static bool IsAbsArea(const OUString &rAreaStr, const ScDocument &rDoc, SCTAB nTab, OUString *pCompleteStr, ScRefAddress *pStartPos=nullptr, ScRefAddress *pEndPos=nullptr, ScAddress::Details const &rDetails=ScAddress::detailsOOOa1)
Definition: rangeutl.cxx:169
static bool IsAbsTabArea(const OUString &rAreaStr, const ScDocument *pDoc, std::unique_ptr< ScArea[]> *ppAreas, sal_uInt16 *pAreaCount, bool bAcceptCellRef=false, ScAddress::Details const &rDetails=ScAddress::detailsOOOa1)
Definition: rangeutl.cxx:86
static bool IsAbsPos(const OUString &rPosStr, const ScDocument &rDoc, SCTAB nTab, OUString *pCompleteStr, ScRefAddress *pPosTripel=nullptr, ScAddress::Details const &rDetails=ScAddress::detailsOOOa1)
Definition: rangeutl.cxx:208
static bool MakeArea(const OUString &rAreaStr, ScArea &rArea, const ScDocument &rDoc, SCTAB nTab, ScAddress::Details const &rDetails)
Definition: rangeutl.cxx:36
static void CutPosString(const OUString &theAreaStr, OUString &thePosStr)
Definition: rangeutl.cxx:69
OUString Format(const ScDocument &rDocument, ScRefFlags nFlags=ScRefFlags::ZERO, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1, bool bFullAddressNotation=false) const
Returns string with formatted cell range from aStart to aEnd, according to provided address conventio...
Definition: address.cxx:2170
ScAddress aEnd
Definition: address.hxx:498
ScAddress aStart
Definition: address.hxx:497
SCCOL Col() const
Definition: address.hxx:886
SCTAB Tab() const
Definition: address.hxx:894
SCROW Row() const
Definition: address.hxx:890
virtual void RefInputStart(formula::RefEdit *pEdit, formula::RefButton *pButton=nullptr) override
Definition: anyrefdg.cxx:745
virtual void RefInputDone(bool bForced=false) override
Definition: anyrefdg.cxx:775
bool DoClose(sal_uInt16 nId)
Definition: anyrefdg.cxx:714
SCTAB GetTabNo() const
Definition: viewdata.hxx:395
SfxDispatcher * GetDispatcher() const
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
void SetText(const OUString &rStr)
void SetRefString(const OUString &rStr)
OUString GetText() const
IMPL_LINK(ScConsolidateDlg, GetEditFocusHdl, formula::RefEdit &, rControl, void)
Definition: consdlg.cxx:314
IMPL_LINK_NOARG(ScConsolidateDlg, OkHdl, weld::Button &, void)
Definition: consdlg.cxx:327
virtual SfxBindings & GetBindings() override
ScSubTotalFunc
Definition: global.hxx:860
@ SUBTOTAL_FUNC_STDP
Definition: global.hxx:869
@ SUBTOTAL_FUNC_MAX
Definition: global.hxx:865
@ SUBTOTAL_FUNC_CNT2
Definition: global.hxx:864
@ SUBTOTAL_FUNC_AVE
Definition: global.hxx:862
@ SUBTOTAL_FUNC_VARP
Definition: global.hxx:872
@ SUBTOTAL_FUNC_VAR
Definition: global.hxx:871
@ SUBTOTAL_FUNC_NONE
Definition: global.hxx:861
@ SUBTOTAL_FUNC_SUM
Definition: global.hxx:870
@ SUBTOTAL_FUNC_STD
Definition: global.hxx:868
@ SUBTOTAL_FUNC_MIN
Definition: global.hxx:866
@ SUBTOTAL_FUNC_CNT
Definition: global.hxx:863
@ SUBTOTAL_FUNC_PROD
Definition: global.hxx:867
sal_uInt16 nPos
aStr
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)
int i
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:90
sal_uInt16 nDataAreaCount
Definition: global.hxx:908
std::unique_ptr< ScArea[]> pDataAreas
Definition: global.hxx:909
ScSubTotalFunc eFunction
Definition: global.hxx:907
void SetAreas(std::unique_ptr< ScArea[]> pAreas, sal_uInt16 nCount)
Definition: global2.cxx:184
sal_Int16 SCTAB
Definition: types.hxx:22
RET_OK
RET_CANCEL