LibreOffice Module sc (master) 1
pvfundlg.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#undef SC_DLLIMPLEMENTATION
21
22#include <pvfundlg.hxx>
23
24#include <com/sun/star/sheet/DataPilotFieldReferenceType.hpp>
25#include <com/sun/star/sheet/DataPilotFieldReferenceItemType.hpp>
26#include <com/sun/star/sheet/DataPilotFieldLayoutMode.hpp>
27#include <com/sun/star/sheet/DataPilotFieldSortMode.hpp>
28#include <com/sun/star/sheet/DataPilotFieldShowItemsMode.hpp>
29
30#include <osl/diagnose.h>
31
32#include <scresid.hxx>
33#include <dpobject.hxx>
34#include <dpsave.hxx>
35#include <pvfundlg.hrc>
36#include <globstr.hrc>
37#include <dputil.hxx>
38
39#include <vector>
40
41using namespace ::com::sun::star::sheet;
42
43using ::com::sun::star::uno::Sequence;
44using ::std::vector;
45
46namespace {
47
56bool lclFillListBox(weld::ComboBox& rLBox, const Sequence< OUString >& rStrings)
57{
58 bool bEmpty = false;
59 for (const OUString& str : rStrings)
60 {
61 if (!str.isEmpty())
62 rLBox.append_text(str);
63 else
64 {
65 rLBox.append_text(ScResId(STR_EMPTYDATA));
66 bEmpty = true;
67 }
68 }
69 return bEmpty;
70}
71
72bool lclFillListBox(weld::ComboBox& rLBox, const vector<ScDPLabelData::Member>& rMembers, int nEmptyPos)
73{
74 bool bEmpty = false;
75 vector<ScDPLabelData::Member>::const_iterator itr = rMembers.begin(), itrEnd = rMembers.end();
76 for (; itr != itrEnd; ++itr)
77 {
78 OUString aName = itr->getDisplayName();
79 if (!aName.isEmpty())
80 rLBox.append_text(aName);
81 else
82 {
83 rLBox.insert_text(nEmptyPos, ScResId(STR_EMPTYDATA));
84 bEmpty = true;
85 }
86 }
87 return bEmpty;
88}
89
90bool lclFillListBox(weld::TreeView& rLBox, const vector<ScDPLabelData::Member>& rMembers)
91{
92 bool bEmpty = false;
93 for (const auto& rMember : rMembers)
94 {
95 rLBox.append();
96 int pos = rLBox.n_children() - 1;
97 rLBox.set_toggle(pos, TRISTATE_FALSE);
98 OUString aName = rMember.getDisplayName();
99 if (!aName.isEmpty())
100 rLBox.set_text(pos, aName, 0);
101 else
102 {
103 rLBox.set_text(pos, ScResId(STR_EMPTYDATA), 0);
104 bEmpty = true;
105 }
106 }
107 return bEmpty;
108}
109
111const PivotFunc spnFunctions[] =
112{
125};
126
127const sal_uInt16 SC_BASEITEM_PREV_POS = 0;
128const sal_uInt16 SC_BASEITEM_NEXT_POS = 1;
129const sal_uInt16 SC_BASEITEM_USER_POS = 2;
130
131const sal_uInt16 SC_SORTNAME_POS = 0;
132const sal_uInt16 SC_SORTDATA_POS = 1;
133
134const tools::Long SC_SHOW_DEFAULT = 10;
135
136} // namespace
137
138ScDPFunctionListBox::ScDPFunctionListBox(std::unique_ptr<weld::TreeView> xControl)
139 : m_xControl(std::move(xControl))
140{
142}
143
145{
146 if( (nFuncMask == PivotFunc::NONE) || (nFuncMask == PivotFunc::Auto) )
147 m_xControl->unselect_all();
148 else
149 {
150 for( sal_Int32 nEntry = 0, nCount = m_xControl->n_children(); nEntry < nCount; ++nEntry )
151 {
152 if (bool(nFuncMask & spnFunctions[ nEntry ]))
153 m_xControl->select(nEntry);
154 else
155 m_xControl->unselect(nEntry);
156 }
157 }
158}
159
161{
162 PivotFunc nFuncMask = PivotFunc::NONE;
163 std::vector<int> aRows = m_xControl->get_selected_rows();
164 for (int nSel : aRows)
165 nFuncMask |= spnFunctions[nSel];
166 return nFuncMask;
167}
168
170{
171 OSL_ENSURE( !m_xControl->n_children(), "ScDPMultiFuncListBox::FillFunctionNames - do not add texts to resource" );
172 m_xControl->clear();
173 m_xControl->freeze();
174 for (size_t nIndex = 0; nIndex < SAL_N_ELEMENTS(SCSTR_DPFUNCLISTBOX); ++nIndex)
175 m_xControl->append_text(ScResId(SCSTR_DPFUNCLISTBOX[nIndex]));
176 m_xControl->thaw();
177 assert(m_xControl->n_children() == SAL_N_ELEMENTS(spnFunctions));
178}
179
180namespace
181{
182 int FromDataPilotFieldReferenceType(int eMode)
183 {
184 switch (eMode)
185 {
187 return 0;
188 case DataPilotFieldReferenceType::ITEM_DIFFERENCE:
189 return 1;
190 case DataPilotFieldReferenceType::ITEM_PERCENTAGE:
191 return 2;
192 case DataPilotFieldReferenceType::ITEM_PERCENTAGE_DIFFERENCE:
193 return 3;
194 case DataPilotFieldReferenceType::RUNNING_TOTAL:
195 return 4;
196 case DataPilotFieldReferenceType::ROW_PERCENTAGE:
197 return 5;
198 case DataPilotFieldReferenceType::COLUMN_PERCENTAGE:
199 return 6;
200 case DataPilotFieldReferenceType::TOTAL_PERCENTAGE:
201 return 7;
202 case DataPilotFieldReferenceType::INDEX:
203 return 8;
204 }
205 return -1;
206 }
207
208 int ToDataPilotFieldReferenceType(int nPos)
209 {
210 switch (nPos)
211 {
212 case 0:
214 case 1:
215 return DataPilotFieldReferenceType::ITEM_DIFFERENCE;
216 case 2:
217 return DataPilotFieldReferenceType::ITEM_PERCENTAGE;
218 case 3:
219 return DataPilotFieldReferenceType::ITEM_PERCENTAGE_DIFFERENCE;
220 case 4:
221 return DataPilotFieldReferenceType::RUNNING_TOTAL;
222 case 5:
223 return DataPilotFieldReferenceType::ROW_PERCENTAGE;
224 case 6:
225 return DataPilotFieldReferenceType::COLUMN_PERCENTAGE;
226 case 7:
227 return DataPilotFieldReferenceType::TOTAL_PERCENTAGE;
228 case 8:
229 return DataPilotFieldReferenceType::INDEX;
230 }
232
233 }
234}
235
237 weld::Widget* pParent, const ScDPLabelDataVector& rLabelVec,
238 const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData)
239 : GenericDialogController(pParent, "modules/scalc/ui/datafielddialog.ui", "DataFieldDialog")
240 , mxLbFunc(new ScDPFunctionListBox(m_xBuilder->weld_tree_view("functions")))
241 , mxFtName(m_xBuilder->weld_label("name"))
242 , mxLbType(m_xBuilder->weld_combo_box("type"))
243 , mxFtBaseField(m_xBuilder->weld_label("basefieldft"))
244 , mxLbBaseField(m_xBuilder->weld_combo_box("basefield"))
245 , mxFtBaseItem(m_xBuilder->weld_label("baseitemft"))
246 , mxLbBaseItem(m_xBuilder->weld_combo_box("baseitem"))
247 , mxBtnOk(m_xBuilder->weld_button("ok"))
248 , mxBtnCancel(m_xBuilder->weld_button("cancel"))
249 , mrLabelVec(rLabelVec)
250 , mbEmptyItem(false)
251{
252 mxLbFunc->set_size_request(-1, mxLbFunc->get_height_rows(8));
253
254 Init(rLabelData, rFuncData);
255}
256
258{
259}
260
262{
263 return mxLbFunc->GetSelection();
264}
265
266DataPilotFieldReference ScDPFunctionDlg::GetFieldRef() const
267{
268 DataPilotFieldReference aRef;
269
270 aRef.ReferenceType = ToDataPilotFieldReferenceType(mxLbType->get_active());
271 aRef.ReferenceField = GetBaseFieldName(mxLbBaseField->get_active_text());
272
273 sal_Int32 nBaseItemPos = mxLbBaseItem->get_active();
274 switch( nBaseItemPos )
275 {
276 case SC_BASEITEM_PREV_POS:
277 aRef.ReferenceItemType = DataPilotFieldReferenceItemType::PREVIOUS;
278 break;
279 case SC_BASEITEM_NEXT_POS:
280 aRef.ReferenceItemType = DataPilotFieldReferenceItemType::NEXT;
281 break;
282 default:
283 {
284 aRef.ReferenceItemType = DataPilotFieldReferenceItemType::NAMED;
285 if( !mbEmptyItem || (nBaseItemPos > SC_BASEITEM_USER_POS) )
286 aRef.ReferenceItemName = GetBaseItemName(mxLbBaseItem->get_active_text());
287 }
288 }
289
290 return aRef;
291}
292
293void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData )
294{
295 mxBtnOk->connect_clicked( LINK( this, ScDPFunctionDlg, ButtonClicked ) );
296 mxBtnCancel->connect_clicked( LINK( this, ScDPFunctionDlg, ButtonClicked ) );
297
298 // list box
299 PivotFunc nFuncMask = (rFuncData.mnFuncMask == PivotFunc::NONE) ? PivotFunc::Sum : rFuncData.mnFuncMask;
300 mxLbFunc->SetSelection( nFuncMask );
301
302 // field name
303 mxFtName->set_label(rLabelData.getDisplayName());
304
305 // handlers
306 mxLbFunc->connect_row_activated( LINK( this, ScDPFunctionDlg, DblClickHdl ) );
307 mxLbType->connect_changed( LINK( this, ScDPFunctionDlg, SelectHdl ) );
308 mxLbBaseField->connect_changed( LINK( this, ScDPFunctionDlg, SelectHdl ) );
309
310 // base field list box
311 OUString aSelectedEntry;
312 for( const auto& rxLabel : mrLabelVec )
313 {
314 mxLbBaseField->append_text(rxLabel->getDisplayName());
315 maBaseFieldNameMap.emplace(rxLabel->getDisplayName(), rxLabel->maName);
316 if (rxLabel->maName == rFuncData.maFieldRef.ReferenceField)
317 aSelectedEntry = rxLabel->getDisplayName();
318 }
319
320 // select field reference type
321 mxLbType->set_active(FromDataPilotFieldReferenceType(rFuncData.maFieldRef.ReferenceType));
322 SelectHdl( *mxLbType ); // enables base field/item list boxes
323
324 // select base field
325 mxLbBaseField->set_active_text(aSelectedEntry);
326 if (mxLbBaseField->get_active() == -1)
327 mxLbBaseField->set_active(0);
328 SelectHdl( *mxLbBaseField ); // fills base item list, selects base item
329
330 // select base item
331 switch( rFuncData.maFieldRef.ReferenceItemType )
332 {
333 case DataPilotFieldReferenceItemType::PREVIOUS:
334 mxLbBaseItem->set_active( SC_BASEITEM_PREV_POS );
335 break;
336 case DataPilotFieldReferenceItemType::NEXT:
337 mxLbBaseItem->set_active( SC_BASEITEM_NEXT_POS );
338 break;
339 default:
340 {
341 if( mbEmptyItem && rFuncData.maFieldRef.ReferenceItemName.isEmpty() )
342 {
343 // select special "(empty)" entry added before other items
344 mxLbBaseItem->set_active( SC_BASEITEM_USER_POS );
345 }
346 else
347 {
348 sal_Int32 nStartPos = mbEmptyItem ? (SC_BASEITEM_USER_POS + 1) : SC_BASEITEM_USER_POS;
349 sal_Int32 nPos = FindBaseItemPos( rFuncData.maFieldRef.ReferenceItemName, nStartPos );
350 if( nPos == -1)
351 nPos = (mxLbBaseItem->get_count() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS;
352 mxLbBaseItem->set_active( nPos );
353 }
354 }
355 }
356}
357
358const OUString& ScDPFunctionDlg::GetBaseFieldName(const OUString& rLayoutName) const
359{
360 NameMapType::const_iterator itr = maBaseFieldNameMap.find(rLayoutName);
361 return itr == maBaseFieldNameMap.end() ? rLayoutName : itr->second;
362}
363
364const OUString& ScDPFunctionDlg::GetBaseItemName(const OUString& rLayoutName) const
365{
366 NameMapType::const_iterator itr = maBaseItemNameMap.find(rLayoutName);
367 return itr == maBaseItemNameMap.end() ? rLayoutName : itr->second;
368}
369
370sal_Int32 ScDPFunctionDlg::FindBaseItemPos( std::u16string_view rEntry, sal_Int32 nStartPos ) const
371{
372 sal_Int32 nPos = nStartPos;
373 bool bFound = false;
374 while (nPos < mxLbBaseItem->get_count())
375 {
376 // translate the displayed field name back to its original field name.
377 const OUString& rInName = mxLbBaseItem->get_text(nPos);
378 const OUString& rName = GetBaseItemName(rInName);
379 if (rName == rEntry)
380 {
381 bFound = true;
382 break;
383 }
384 ++nPos;
385 }
386 return bFound ? nPos : -1;
387}
388
389IMPL_LINK( ScDPFunctionDlg, SelectHdl, weld::ComboBox&, rLBox, void )
390{
391 if (&rLBox == mxLbType.get())
392 {
393 bool bEnableField, bEnableItem;
394 switch (ToDataPilotFieldReferenceType(mxLbType->get_active()))
395 {
396 case DataPilotFieldReferenceType::ITEM_DIFFERENCE:
397 case DataPilotFieldReferenceType::ITEM_PERCENTAGE:
398 case DataPilotFieldReferenceType::ITEM_PERCENTAGE_DIFFERENCE:
399 bEnableField = bEnableItem = true;
400 break;
401
402 case DataPilotFieldReferenceType::RUNNING_TOTAL:
403 bEnableField = true;
404 bEnableItem = false;
405 break;
406
407 default:
408 bEnableField = bEnableItem = false;
409 }
410
411 bEnableField &= (mxLbBaseField->get_count() > 0);
412 mxFtBaseField->set_sensitive( bEnableField );
413 mxLbBaseField->set_sensitive( bEnableField );
414
415 bEnableItem &= bEnableField;
416 mxFtBaseItem->set_sensitive( bEnableItem );
417 mxLbBaseItem->set_sensitive( bEnableItem );
418 }
419 else if (&rLBox == mxLbBaseField.get())
420 {
421 // keep "previous" and "next" entries
422 while (mxLbBaseItem->get_count() > SC_BASEITEM_USER_POS)
423 mxLbBaseItem->remove(SC_BASEITEM_USER_POS);
424
425 // update item list for current base field
426 mbEmptyItem = false;
427 size_t nBasePos = mxLbBaseField->get_active();
428 if (nBasePos < mrLabelVec.size())
429 {
430 const vector<ScDPLabelData::Member>& rMembers = mrLabelVec[nBasePos]->maMembers;
431 mbEmptyItem = lclFillListBox(*mxLbBaseItem, rMembers, SC_BASEITEM_USER_POS);
432 // build cache for base names.
433 NameMapType aMap;
434 for (const auto& rMember : rMembers)
435 aMap.emplace(rMember.getDisplayName(), rMember.maName);
436 maBaseItemNameMap.swap(aMap);
437 }
438
439 // select base item
440 sal_uInt16 nItemPos = (mxLbBaseItem->get_count() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS;
441 mxLbBaseItem->set_active( nItemPos );
442 }
443}
444
445IMPL_LINK(ScDPFunctionDlg, ButtonClicked, weld::Button&, rButton, void)
446{
447 if (&rButton == mxBtnOk.get())
448 response(RET_OK);
449 else
450 response(RET_CANCEL);
451}
452
454{
455 m_xDialog->response(RET_OK);
456 return true;
457}
458
460 const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData,
461 const ScDPNameVec& rDataFields, bool bEnableLayout)
462 : GenericDialogController(pParent, "modules/scalc/ui/pivotfielddialog.ui", "PivotFieldDialog")
463 , mrDPObj(rDPObj)
464 , mrDataFields(rDataFields)
465 , maLabelData(rLabelData)
466 , mbEnableLayout(bEnableLayout)
467 , mxRbNone(m_xBuilder->weld_radio_button("none"))
468 , mxRbAuto(m_xBuilder->weld_radio_button("auto"))
469 , mxRbUser(m_xBuilder->weld_radio_button("user"))
470 , mxLbFunc(new ScDPFunctionListBox(m_xBuilder->weld_tree_view("functions")))
471 , mxFtName(m_xBuilder->weld_label("name"))
472 , mxCbShowAll(m_xBuilder->weld_check_button("showall"))
473 , mxBtnOk(m_xBuilder->weld_button("ok"))
474 , mxBtnCancel(m_xBuilder->weld_button("cancel"))
475 , mxBtnOptions(m_xBuilder->weld_button("options"))
476{
477 mxLbFunc->set_selection_mode(SelectionMode::Multiple);
478 mxLbFunc->set_size_request(-1, mxLbFunc->get_height_rows(8));
479 Init(rLabelData, rFuncData);
480}
481
483{
485}
486
488{
489 if (mxOptionsDlg && mxOptionsDlg->getDialog())
490 {
491 mxOptionsDlg->getDialog()->response(RET_CANCEL);
492 mxOptionsDlg = nullptr;
493 }
494}
495
497{
498 PivotFunc nFuncMask = PivotFunc::NONE;
499
500 if (mxRbAuto->get_active())
501 nFuncMask = PivotFunc::Auto;
502 else if (mxRbUser->get_active())
503 nFuncMask = mxLbFunc->GetSelection();
504
505 return nFuncMask;
506}
507
509{
510 rLabelData.mnFuncMask = GetFuncMask();
511 rLabelData.mnUsedHier = maLabelData.mnUsedHier;
512 rLabelData.mbShowAll = mxCbShowAll->get_active();
513 rLabelData.maMembers = maLabelData.maMembers;
514 rLabelData.maSortInfo = maLabelData.maSortInfo;
516 rLabelData.maShowInfo = maLabelData.maShowInfo;
518}
519
520void ScDPSubtotalDlg::Init( const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData )
521{
522 mxBtnOk->connect_clicked( LINK( this, ScDPSubtotalDlg, ButtonClicked ) );
523 mxBtnCancel->connect_clicked( LINK( this, ScDPSubtotalDlg, ButtonClicked ) );
524
525 // field name
526 mxFtName->set_label(rLabelData.getDisplayName());
527
528 // radio buttons
529 mxRbNone->connect_toggled( LINK( this, ScDPSubtotalDlg, RadioClickHdl ) );
530 mxRbAuto->connect_toggled( LINK( this, ScDPSubtotalDlg, RadioClickHdl ) );
531 mxRbUser->connect_toggled( LINK( this, ScDPSubtotalDlg, RadioClickHdl ) );
532
533 weld::RadioButton* pRBtn = nullptr;
534 switch( rFuncData.mnFuncMask )
535 {
536 case PivotFunc::NONE: pRBtn = mxRbNone.get(); break;
537 case PivotFunc::Auto: pRBtn = mxRbAuto.get(); break;
538 default: pRBtn = mxRbUser.get();
539 }
540 pRBtn->set_active(true);
541 RadioClickHdl(*pRBtn);
542
543 // list box
544 mxLbFunc->SetSelection( rFuncData.mnFuncMask );
545 mxLbFunc->connect_row_activated( LINK( this, ScDPSubtotalDlg, DblClickHdl ) );
546
547 // show all
548 mxCbShowAll->set_active( rLabelData.mbShowAll );
549
550 // options
551 mxBtnOptions->connect_clicked( LINK( this, ScDPSubtotalDlg, ClickHdl ) );
552}
553
554IMPL_LINK(ScDPSubtotalDlg, ButtonClicked, weld::Button&, rButton, void)
555{
556 CloseSubdialog();
557
558 if (&rButton == mxBtnOk.get())
559 response(RET_OK);
560 else
561 response(RET_CANCEL);
562}
563
564IMPL_LINK(ScDPSubtotalDlg, RadioClickHdl, weld::Toggleable&, rBtn, void)
565{
566 if (!rBtn.get_active())
567 return;
568 mxLbFunc->set_sensitive(mxRbUser->get_active());
569}
570
572{
573 m_xDialog->response(RET_OK);
574 return true;
575}
576
577IMPL_LINK(ScDPSubtotalDlg, ClickHdl, weld::Button&, rBtn, void)
578{
579 if (&rBtn == mxBtnOptions.get())
580 {
581 mxOptionsDlg = std::make_shared<ScDPSubtotalOptDlg>(m_xDialog.get(), mrDPObj, maLabelData, mrDataFields, mbEnableLayout);
582
583 weld::DialogController::runAsync(mxOptionsDlg, [this](int nResult) {
584 if (nResult == RET_OK)
585 mxOptionsDlg->FillLabelData(maLabelData);
586 mxOptionsDlg = nullptr;
587 });
588 }
589}
590
591namespace
592{
593 int FromDataPilotFieldLayoutMode(int eMode)
594 {
595 switch (eMode)
596 {
597 case DataPilotFieldLayoutMode::TABULAR_LAYOUT:
598 return 0;
599 case DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_TOP:
600 return 1;
601 case DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_BOTTOM:
602 return 2;
603 }
604 return -1;
605 }
606
607 int ToDataPilotFieldLayoutMode(int nPos)
608 {
609 switch (nPos)
610 {
611 case 0:
612 return DataPilotFieldLayoutMode::TABULAR_LAYOUT;
613 case 1:
614 return DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_TOP;
615 case 2:
616 return DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_BOTTOM;
617 }
618 return DataPilotFieldLayoutMode::TABULAR_LAYOUT;
619 }
620
621 int FromDataPilotFieldShowItemsMode(int eMode)
622 {
623 switch (eMode)
624 {
625 case DataPilotFieldShowItemsMode::FROM_TOP:
626 return 0;
627 case DataPilotFieldShowItemsMode::FROM_BOTTOM:
628 return 1;
629 }
630 return -1;
631 }
632
633 int ToDataPilotFieldShowItemsMode(int nPos)
634 {
635 switch (nPos)
636 {
637 case 0:
638 return DataPilotFieldShowItemsMode::FROM_TOP;
639 case 1:
640 return DataPilotFieldShowItemsMode::FROM_BOTTOM;
641 }
642 return DataPilotFieldShowItemsMode::FROM_TOP;
643 }
644}
645
647 const ScDPLabelData& rLabelData, const ScDPNameVec& rDataFields,
648 bool bEnableLayout )
649 : GenericDialogController(pParent, "modules/scalc/ui/datafieldoptionsdialog.ui",
650 "DataFieldOptionsDialog")
651 , m_xLbSortBy(m_xBuilder->weld_combo_box("sortby"))
652 , m_xRbSortAsc(m_xBuilder->weld_radio_button("ascending"))
653 , m_xRbSortDesc(m_xBuilder->weld_radio_button("descending"))
654 , m_xRbSortMan(m_xBuilder->weld_radio_button("manual"))
655 , m_xLayoutFrame(m_xBuilder->weld_widget("layoutframe"))
656 , m_xLbLayout(m_xBuilder->weld_combo_box("layout"))
657 , m_xCbLayoutEmpty(m_xBuilder->weld_check_button("emptyline"))
658 , m_xCbRepeatItemLabels(m_xBuilder->weld_check_button("repeatitemlabels"))
659 , m_xCbShow(m_xBuilder->weld_check_button("show"))
660 , m_xNfShow(m_xBuilder->weld_spin_button("items"))
661 , m_xFtShow(m_xBuilder->weld_label("showft"))
662 , m_xFtShowFrom(m_xBuilder->weld_label("showfromft"))
663 , m_xLbShowFrom(m_xBuilder->weld_combo_box("from"))
664 , m_xFtShowUsing(m_xBuilder->weld_label("usingft"))
665 , m_xLbShowUsing(m_xBuilder->weld_combo_box("using"))
666 , m_xHideFrame(m_xBuilder->weld_widget("hideframe"))
667 , m_xLbHide(m_xBuilder->weld_tree_view("hideitems"))
668 , m_xFtHierarchy(m_xBuilder->weld_label("hierarchyft"))
669 , m_xLbHierarchy(m_xBuilder->weld_combo_box("hierarchy"))
670 , m_xBtnOk(m_xBuilder->weld_button("ok"))
671 , m_xBtnCancel(m_xBuilder->weld_button("cancel"))
672 , mrDPObj(rDPObj)
673 , maLabelData(rLabelData)
674{
675 m_xLbHide->enable_toggle_buttons(weld::ColumnToggleType::Check);
676
677 m_xLbSortBy->set_size_request(m_xLbSortBy->get_approximate_digit_width() * 18, -1);
678 m_xLbHide->set_size_request(-1, m_xLbHide->get_height_rows(5));
679 Init(rDataFields, bEnableLayout);
680}
681
683{
684}
685
687{
688 // *** SORTING ***
689
690 if (m_xRbSortMan->get_active())
691 rLabelData.maSortInfo.Mode = DataPilotFieldSortMode::MANUAL;
692 else if (m_xLbSortBy->get_active() == SC_SORTNAME_POS)
693 rLabelData.maSortInfo.Mode = DataPilotFieldSortMode::NAME;
694 else
695 rLabelData.maSortInfo.Mode = DataPilotFieldSortMode::DATA;
696
697 ScDPName aFieldName = GetFieldName(m_xLbSortBy->get_active_text());
698 if (!aFieldName.maName.isEmpty())
699 {
700 rLabelData.maSortInfo.Field =
702 rLabelData.maSortInfo.IsAscending = m_xRbSortAsc->get_active();
703 }
704
705 // *** LAYOUT MODE ***
706
707 rLabelData.maLayoutInfo.LayoutMode = ToDataPilotFieldLayoutMode(m_xLbLayout->get_active());
708 rLabelData.maLayoutInfo.AddEmptyLines = m_xCbLayoutEmpty->get_active();
709 rLabelData.mbRepeatItemLabels = m_xCbRepeatItemLabels->get_active();
710
711 // *** AUTO SHOW ***
712
713 aFieldName = GetFieldName(m_xLbShowUsing->get_active_text());
714 if (!aFieldName.maName.isEmpty())
715 {
716 rLabelData.maShowInfo.IsEnabled = m_xCbShow->get_active();
717 rLabelData.maShowInfo.ShowItemsMode = ToDataPilotFieldShowItemsMode(m_xLbShowFrom->get_active());
718 rLabelData.maShowInfo.ItemCount = sal::static_int_cast<sal_Int32>( m_xNfShow->get_value() );
719 rLabelData.maShowInfo.DataField =
721 }
722
723 // *** HIDDEN ITEMS ***
724
725 rLabelData.maMembers = maLabelData.maMembers;
726 int nVisCount = m_xLbHide->n_children();
727 for (int nPos = 0; nPos < nVisCount; ++nPos)
728 rLabelData.maMembers[nPos].mbVisible = m_xLbHide->get_toggle(nPos) == TRISTATE_FALSE;
729
730 // *** HIERARCHY ***
731
732 rLabelData.mnUsedHier = m_xLbHierarchy->get_active() != -1 ? m_xLbHierarchy->get_active() : 0;
733}
734
735void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayout )
736{
737 m_xBtnOk->connect_clicked(LINK(this, ScDPSubtotalOptDlg, ButtonClicked));
738 m_xBtnCancel->connect_clicked(LINK(this, ScDPSubtotalOptDlg, ButtonClicked));
739
740 // *** SORTING ***
741
742 sal_Int32 nSortMode = maLabelData.maSortInfo.Mode;
743
744 // sort fields list box
745 m_xLbSortBy->append_text(maLabelData.getDisplayName());
746
747 for( const auto& rDataField : rDataFields )
748 {
749 // Cache names for later lookup.
750 maDataFieldNameMap.emplace(rDataField.maLayoutName, rDataField);
751
752 m_xLbSortBy->append_text(rDataField.maLayoutName);
753 m_xLbShowUsing->append_text(rDataField.maLayoutName); // for AutoShow
754 }
755
756 sal_Int32 nSortPos = SC_SORTNAME_POS;
757 if( nSortMode == DataPilotFieldSortMode::DATA )
758 {
759 nSortPos = FindListBoxEntry( *m_xLbSortBy, maLabelData.maSortInfo.Field, SC_SORTDATA_POS );
760 if( nSortPos == -1 )
761 {
762 nSortPos = SC_SORTNAME_POS;
763 nSortMode = DataPilotFieldSortMode::MANUAL;
764 }
765 }
766 m_xLbSortBy->set_active(nSortPos);
767
768 // sorting mode
769 m_xRbSortAsc->connect_toggled( LINK( this, ScDPSubtotalOptDlg, RadioClickHdl ) );
770 m_xRbSortDesc->connect_toggled( LINK( this, ScDPSubtotalOptDlg, RadioClickHdl ) );
771 m_xRbSortMan->connect_toggled( LINK( this, ScDPSubtotalOptDlg, RadioClickHdl ) );
772
773 weld::RadioButton* pRBtn = nullptr;
774 switch( nSortMode )
775 {
777 case DataPilotFieldSortMode::MANUAL:
778 pRBtn = m_xRbSortMan.get();
779 break;
780 default:
781 pRBtn = maLabelData.maSortInfo.IsAscending ? m_xRbSortAsc.get() : m_xRbSortDesc.get();
782 }
783 pRBtn->set_active(true);
784 RadioClickHdl(*pRBtn);
785
786 // *** LAYOUT MODE ***
787
788 m_xLayoutFrame->set_sensitive(bEnableLayout);
789
790 m_xLbLayout->set_active(FromDataPilotFieldLayoutMode(maLabelData.maLayoutInfo.LayoutMode));
791 m_xCbLayoutEmpty->set_active( maLabelData.maLayoutInfo.AddEmptyLines );
793
794 // *** AUTO SHOW ***
795
796 m_xCbShow->set_active( maLabelData.maShowInfo.IsEnabled );
797 m_xCbShow->connect_toggled( LINK( this, ScDPSubtotalOptDlg, CheckHdl ) );
798
799 m_xLbShowFrom->set_active(FromDataPilotFieldShowItemsMode(maLabelData.maShowInfo.ShowItemsMode));
800 tools::Long nCount = static_cast< tools::Long >( maLabelData.maShowInfo.ItemCount );
801 if( nCount < 1 )
802 nCount = SC_SHOW_DEFAULT;
803 m_xNfShow->set_value( nCount );
804
805 // m_xLbShowUsing already filled above
806 m_xLbShowUsing->set_active_text(maLabelData.maShowInfo.DataField);
807 if (m_xLbShowUsing->get_active() == -1)
808 m_xLbShowUsing->set_active(0);
809
810 CheckHdl(*m_xCbShow); // enable/disable dependent controls
811
812 // *** HIDDEN ITEMS ***
813
815
816 // *** HIERARCHY ***
817
818 if( maLabelData.maHiers.getLength() > 1 )
819 {
820 lclFillListBox(*m_xLbHierarchy, maLabelData.maHiers);
821 sal_Int32 nHier = maLabelData.mnUsedHier;
822 if( (nHier < 0) || (nHier >= maLabelData.maHiers.getLength()) ) nHier = 0;
823 m_xLbHierarchy->set_active( nHier );
824 m_xLbHierarchy->connect_changed( LINK( this, ScDPSubtotalOptDlg, SelectHdl ) );
825 }
826 else
827 {
828 m_xFtHierarchy->set_sensitive(false);
829 m_xLbHierarchy->set_sensitive(false);
830 }
831}
832
834{
835 m_xLbHide->clear();
836 lclFillListBox(*m_xLbHide, maLabelData.maMembers);
837 size_t n = maLabelData.maMembers.size();
838 for (size_t i = 0; i < n; ++i)
839 m_xLbHide->set_toggle(i, maLabelData.maMembers[i].mbVisible ? TRISTATE_FALSE : TRISTATE_TRUE);
840 bool bEnable = m_xLbHide->n_children() > 0;
841 m_xHideFrame->set_sensitive(bEnable);
842}
843
844ScDPName ScDPSubtotalOptDlg::GetFieldName(const OUString& rLayoutName) const
845{
846 NameMapType::const_iterator itr = maDataFieldNameMap.find(rLayoutName);
847 return itr == maDataFieldNameMap.end() ? ScDPName() : itr->second;
848}
849
851 const weld::ComboBox& rLBox, std::u16string_view rEntry, sal_Int32 nStartPos ) const
852{
853 sal_Int32 nPos = nStartPos;
854 bool bFound = false;
855 while (nPos < rLBox.get_count())
856 {
857 // translate the displayed field name back to its original field name.
859 OUString aUnoName = ScDPUtil::createDuplicateDimensionName(aName.maName, aName.mnDupCount);
860 if (aUnoName == rEntry)
861 {
862 bFound = true;
863 break;
864 }
865 ++nPos;
866 }
867 return bFound ? nPos : -1;
868}
869
870IMPL_LINK(ScDPSubtotalOptDlg, ButtonClicked, weld::Button&, rButton, void)
871{
872 if (&rButton == m_xBtnOk.get())
873 response(RET_OK);
874 else
875 response(RET_CANCEL);
876}
877
878IMPL_LINK(ScDPSubtotalOptDlg, RadioClickHdl, weld::Toggleable&, rBtn, void)
879{
880 if (!rBtn.get_active())
881 return;
882
883 m_xLbSortBy->set_sensitive(m_xRbSortMan->get_active());
884}
885
887{
888 if (&rCBox == m_xCbShow.get())
889 {
890 bool bEnable = m_xCbShow->get_active();
891 m_xNfShow->set_sensitive( bEnable );
892 m_xFtShow->set_sensitive( bEnable );
893 m_xFtShowFrom->set_sensitive( bEnable );
894 m_xLbShowFrom->set_sensitive( bEnable );
895
896 bool bEnableUsing = bEnable && (m_xLbShowUsing->get_count() > 0);
897 m_xFtShowUsing->set_sensitive(bEnableUsing);
898 m_xLbShowUsing->set_sensitive(bEnableUsing);
899 }
900}
901
903{
904 mrDPObj.GetMembers(maLabelData.mnCol, m_xLbHierarchy->get_active(), maLabelData.maMembers);
905 InitHideListBox();
906}
907
908ScDPShowDetailDlg::ScDPShowDetailDlg(weld::Window* pParent, ScDPObject& rDPObj, css::sheet::DataPilotFieldOrientation nOrient)
909 : GenericDialogController(pParent, "modules/scalc/ui/showdetaildialog.ui", "ShowDetail")
910 , mrDPObj(rDPObj)
911 , mxLbDims(m_xBuilder->weld_tree_view("dimsTreeview"))
912{
913 ScDPSaveData* pSaveData = rDPObj.GetSaveData();
915 for (tools::Long nDim=0; nDim<nDimCount; nDim++)
916 {
917 bool bIsDataLayout;
918 sal_Int32 nDimFlags = 0;
919 OUString aName = rDPObj.GetDimName( nDim, bIsDataLayout, &nDimFlags );
920 if ( !bIsDataLayout && !rDPObj.IsDuplicated( nDim ) && ScDPObject::IsOrientationAllowed( nOrient, nDimFlags ) )
921 {
922 const ScDPSaveDimension* pDimension = pSaveData ? pSaveData->GetExistingDimensionByName(aName) : nullptr;
923 if ( !pDimension || (pDimension->GetOrientation() != nOrient) )
924 {
925 if (pDimension)
926 {
927 const std::optional<OUString> & pLayoutName = pDimension->GetLayoutName();
928 if (pLayoutName)
929 aName = *pLayoutName;
930 }
931 mxLbDims->append_text(aName);
932 maNameIndexMap.emplace(aName, nDim);
933 }
934 }
935 }
936 if (mxLbDims->n_children())
937 mxLbDims->select(0);
938
939 mxLbDims->connect_row_activated(LINK(this, ScDPShowDetailDlg, DblClickHdl));
940}
941
943{
944}
945
947{
948 return mxLbDims->n_children() ? GenericDialogController::run() : static_cast<short>(RET_CANCEL);
949}
950
952{
953 // Look up the internal dimension name which may be different from the
954 // displayed field name.
955 OUString aSelectedName = mxLbDims->get_selected_text();
956 DimNameIndexMap::const_iterator itr = maNameIndexMap.find(aSelectedName);
957 if (itr == maNameIndexMap.end())
958 // This should never happen!
959 return aSelectedName;
960
961 tools::Long nDim = itr->second;
962 bool bIsDataLayout = false;
963 return mrDPObj.GetDimName(nDim, bIsDataLayout);
964}
965
967{
968 m_xDialog->response(RET_OK);
969 return true;
970}
971
972/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XExecutableDialog > m_xDialog
int nDimCount
NameMapType maBaseItemNameMap
Definition: pvfundlg.hxx:87
std::unique_ptr< weld::Button > mxBtnOk
Definition: pvfundlg.hxx:83
PivotFunc GetFuncMask() const
Definition: pvfundlg.cxx:261
std::unique_ptr< weld::Button > mxBtnCancel
Definition: pvfundlg.hxx:84
bool mbEmptyItem
Data of all labels.
Definition: pvfundlg.hxx:90
std::unique_ptr< weld::ComboBox > mxLbBaseField
Definition: pvfundlg.hxx:80
sal_Int32 FindBaseItemPos(std::u16string_view rEntry, sal_Int32 nStartPos) const
Searches for a listbox entry, starts search at specified position.
Definition: pvfundlg.cxx:370
std::unique_ptr< ScDPFunctionListBox > mxLbFunc
Definition: pvfundlg.hxx:76
const OUString & GetBaseFieldName(const OUString &rLayoutName) const
Definition: pvfundlg.cxx:358
ScDPFunctionDlg(weld::Widget *pParent, const ScDPLabelDataVector &rLabelVec, const ScDPLabelData &rLabelData, const ScPivotFuncData &rFuncData)
Definition: pvfundlg.cxx:236
css::sheet::DataPilotFieldReference GetFieldRef() const
Definition: pvfundlg.cxx:266
const ScDPLabelDataVector & mrLabelVec
Definition: pvfundlg.hxx:89
std::unique_ptr< weld::Label > mxFtName
Definition: pvfundlg.hxx:77
NameMapType maBaseFieldNameMap
Definition: pvfundlg.hxx:86
const OUString & GetBaseItemName(const OUString &rLayoutName) const
Definition: pvfundlg.cxx:364
void Init(const ScDPLabelData &rLabelData, const ScPivotFuncData &rFuncData)
Definition: pvfundlg.cxx:293
std::unique_ptr< weld::ComboBox > mxLbType
Definition: pvfundlg.hxx:78
std::unique_ptr< weld::ComboBox > mxLbBaseItem
Definition: pvfundlg.hxx:82
virtual ~ScDPFunctionDlg() override
Definition: pvfundlg.cxx:257
std::unique_ptr< weld::TreeView > m_xControl
Definition: pvfundlg.hxx:48
void SetSelection(PivotFunc nFuncMask)
Definition: pvfundlg.cxx:144
ScDPFunctionListBox(std::unique_ptr< weld::TreeView > xControl)
Definition: pvfundlg.cxx:138
PivotFunc GetSelection() const
Definition: pvfundlg.cxx:160
void FillFunctionNames()
Definition: pvfundlg.cxx:169
static bool IsOrientationAllowed(css::sheet::DataPilotFieldOrientation nOrient, sal_Int32 nDimFlags)
Definition: dpobject.cxx:2717
bool IsDuplicated(tools::Long nDim)
Definition: dpobject.cxx:1256
ScDPSaveData * GetSaveData() const
Definition: dpobject.hxx:141
OUString GetDimName(tools::Long nDim, bool &rIsDataLayout, sal_Int32 *pFlags=nullptr)
Definition: dpobject.cxx:1207
tools::Long GetDimCount()
Definition: dpobject.cxx:1285
SC_DLLPUBLIC ScDPSaveDimension * GetExistingDimensionByName(std::u16string_view rName) const
Definition: dpsave.cxx:847
css::sheet::DataPilotFieldOrientation GetOrientation() const
Definition: dpsave.hxx:202
const std::optional< OUString > & GetLayoutName() const
Definition: dpsave.cxx:386
ScDPShowDetailDlg(weld::Window *pParent, ScDPObject &rDPObj, css::sheet::DataPilotFieldOrientation nOrient)
Definition: pvfundlg.cxx:908
virtual ~ScDPShowDetailDlg() override
Definition: pvfundlg.cxx:942
std::unique_ptr< weld::TreeView > mxLbDims
Definition: pvfundlg.hxx:212
DimNameIndexMap maNameIndexMap
Definition: pvfundlg.hxx:209
virtual short run() override
Definition: pvfundlg.cxx:946
OUString GetDimensionName() const
Definition: pvfundlg.cxx:951
ScDPObject & mrDPObj
Definition: pvfundlg.hxx:210
std::unique_ptr< weld::Label > mxFtName
Definition: pvfundlg.hxx:126
void FillLabelData(ScDPLabelData &rLabelData) const
Definition: pvfundlg.cxx:508
std::unique_ptr< weld::RadioButton > mxRbAuto
Definition: pvfundlg.hxx:123
PivotFunc GetFuncMask() const
Definition: pvfundlg.cxx:496
std::shared_ptr< ScDPSubtotalOptDlg > mxOptionsDlg
Definition: pvfundlg.hxx:132
ScDPSubtotalDlg(weld::Widget *pParent, ScDPObject &rDPObj, const ScDPLabelData &rLabelData, const ScPivotFuncData &rFuncData, const ScDPNameVec &rDataFields, bool bEnableLayout)
Definition: pvfundlg.cxx:459
std::unique_ptr< weld::RadioButton > mxRbUser
Definition: pvfundlg.hxx:124
std::unique_ptr< weld::RadioButton > mxRbNone
true = Enable Layout mode controls.
Definition: pvfundlg.hxx:122
void CloseSubdialog()
Definition: pvfundlg.cxx:487
std::unique_ptr< weld::Button > mxBtnOptions
Definition: pvfundlg.hxx:130
std::unique_ptr< weld::CheckButton > mxCbShowAll
Definition: pvfundlg.hxx:127
std::unique_ptr< weld::Button > mxBtnOk
Definition: pvfundlg.hxx:128
ScDPLabelData maLabelData
The list of all data field names.
Definition: pvfundlg.hxx:119
std::unique_ptr< weld::Button > mxBtnCancel
Definition: pvfundlg.hxx:129
void Init(const ScDPLabelData &rLabelData, const ScPivotFuncData &rFuncData)
Definition: pvfundlg.cxx:520
virtual ~ScDPSubtotalDlg() override
Definition: pvfundlg.cxx:482
std::unique_ptr< ScDPFunctionListBox > mxLbFunc
Definition: pvfundlg.hxx:125
std::unique_ptr< weld::ComboBox > m_xLbShowUsing
Definition: pvfundlg.hxx:173
std::unique_ptr< weld::Button > m_xBtnCancel
Definition: pvfundlg.hxx:179
void InitHideListBox()
Definition: pvfundlg.cxx:833
std::unique_ptr< weld::ComboBox > m_xLbShowFrom
Definition: pvfundlg.hxx:171
ScDPName GetFieldName(const OUString &rLayoutName) const
Definition: pvfundlg.cxx:844
NameMapType maDataFieldNameMap
Definition: pvfundlg.hxx:185
void Init(const ScDPNameVec &rDataFields, bool bEnableLayout)
Definition: pvfundlg.cxx:735
std::unique_ptr< weld::ComboBox > m_xLbLayout
Definition: pvfundlg.hxx:164
std::unique_ptr< weld::SpinButton > m_xNfShow
Definition: pvfundlg.hxx:168
std::unique_ptr< weld::RadioButton > m_xRbSortAsc
Definition: pvfundlg.hxx:160
ScDPLabelData maLabelData
The DataPilot object (for member names).
Definition: pvfundlg.hxx:182
ScDPSubtotalOptDlg(weld::Window *pParent, ScDPObject &rDPObj, const ScDPLabelData &rLabelData, const ScDPNameVec &rDataFields, bool bEnableLayout)
Definition: pvfundlg.cxx:646
std::unique_ptr< weld::ComboBox > m_xLbSortBy
Definition: pvfundlg.hxx:159
std::unique_ptr< weld::CheckButton > m_xCbRepeatItemLabels
Definition: pvfundlg.hxx:166
std::unique_ptr< weld::ComboBox > m_xLbHierarchy
Definition: pvfundlg.hxx:177
std::unique_ptr< weld::Label > m_xFtHierarchy
Definition: pvfundlg.hxx:176
void FillLabelData(ScDPLabelData &rLabelData) const
Definition: pvfundlg.cxx:686
sal_Int32 FindListBoxEntry(const weld::ComboBox &rLBox, std::u16string_view rEntry, sal_Int32 nStartPos) const
Searches for a listbox entry, starts search at specified position.
Definition: pvfundlg.cxx:850
virtual ~ScDPSubtotalOptDlg() override
Definition: pvfundlg.cxx:682
std::unique_ptr< weld::RadioButton > m_xRbSortMan
Definition: pvfundlg.hxx:162
std::unique_ptr< weld::Button > m_xBtnOk
Definition: pvfundlg.hxx:178
std::unique_ptr< weld::Widget > m_xLayoutFrame
Definition: pvfundlg.hxx:163
std::unique_ptr< weld::TreeView > m_xLbHide
Definition: pvfundlg.hxx:175
std::unique_ptr< weld::CheckButton > m_xCbShow
Definition: pvfundlg.hxx:167
std::unique_ptr< weld::CheckButton > m_xCbLayoutEmpty
Definition: pvfundlg.hxx:165
std::unique_ptr< weld::RadioButton > m_xRbSortDesc
Definition: pvfundlg.hxx:161
std::unique_ptr< weld::Widget > m_xHideFrame
Definition: pvfundlg.hxx:174
static SC_DLLPUBLIC OUString createDuplicateDimensionName(const OUString &rOriginal, size_t nDupCount)
Definition: dputil.cxx:92
virtual OUString get_text(int pos) const=0
void append_text(const OUString &rStr)
void insert_text(int pos, const OUString &rStr)
virtual int get_count() const=0
static bool runAsync(const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
virtual void set_active(bool active)=0
virtual void set_text(int row, const OUString &rText, int col=-1)=0
virtual void set_toggle(int row, TriState eState, int col=-1)=0
virtual int n_children() const=0
void append(TreeIter *pRet=nullptr)
int nCount
PivotFunc
Definition: dpglobal.hxx:24
TRISTATE_FALSE
TRISTATE_TRUE
sal_Int32 nIndex
OUString aName
sal_Int64 n
sal_uInt16 nPos
#define SAL_N_ELEMENTS(arr)
int i
long Long
HashMap_OWString_Interface aMap
std::vector< ScDPName > ScDPNameVec
Definition: pivot.hxx:172
std::vector< std::unique_ptr< ScDPLabelData > > ScDPLabelDataVector
Definition: pivot.hxx:113
IMPL_LINK_NOARG(ScDPFunctionDlg, DblClickHdl, weld::TreeView &, bool)
Definition: pvfundlg.cxx:453
IMPL_LINK(ScDPFunctionDlg, SelectHdl, weld::ComboBox &, rLBox, void)
Definition: pvfundlg.cxx:389
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:90
sal_Int32 mnUsedHier
Used hierarchy.
Definition: pivot.hxx:74
css::sheet::DataPilotFieldAutoShowInfo maShowInfo
AutoShow info.
Definition: pivot.hxx:102
bool mbRepeatItemLabels
Definition: pivot.hxx:80
css::sheet::DataPilotFieldLayoutInfo maLayoutInfo
Layout info.
Definition: pivot.hxx:101
bool mbShowAll
true = Show all (also empty) results.
Definition: pivot.hxx:77
css::uno::Sequence< OUString > maHiers
Hierarchies.
Definition: pivot.hxx:99
css::sheet::DataPilotFieldSortInfo maSortInfo
Sorting info.
Definition: pivot.hxx:100
PivotFunc mnFuncMask
Page/Column/Row subtotal function.
Definition: pivot.hxx:73
std::vector< Member > maMembers
Definition: pivot.hxx:98
SC_DLLPUBLIC OUString const & getDisplayName() const
Definition: pivot2.cxx:67
OUString maName
Original name of the dimension.
Definition: pivot.hxx:58
sal_uInt8 mnDupCount
Definition: pivot.hxx:60
css::sheet::DataPilotFieldReference maFieldRef
Definition: pivot.hxx:158
PivotFunc mnFuncMask
Definition: pivot.hxx:161
RET_OK
RET_CANCEL
Reference< XControl > m_xControl
size_t pos