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 case DataPilotFieldLayoutMode::COMPACT_LAYOUT:
604 return 3;
605 }
606 return -1;
607 }
608
609 int ToDataPilotFieldLayoutMode(int nPos)
610 {
611 switch (nPos)
612 {
613 case 0:
614 return DataPilotFieldLayoutMode::TABULAR_LAYOUT;
615 case 1:
616 return DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_TOP;
617 case 2:
618 return DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_BOTTOM;
619 case 3:
620 return DataPilotFieldLayoutMode::COMPACT_LAYOUT;
621 }
622 return DataPilotFieldLayoutMode::TABULAR_LAYOUT;
623 }
624
625 int FromDataPilotFieldShowItemsMode(int eMode)
626 {
627 switch (eMode)
628 {
629 case DataPilotFieldShowItemsMode::FROM_TOP:
630 return 0;
631 case DataPilotFieldShowItemsMode::FROM_BOTTOM:
632 return 1;
633 }
634 return -1;
635 }
636
637 int ToDataPilotFieldShowItemsMode(int nPos)
638 {
639 switch (nPos)
640 {
641 case 0:
642 return DataPilotFieldShowItemsMode::FROM_TOP;
643 case 1:
644 return DataPilotFieldShowItemsMode::FROM_BOTTOM;
645 }
646 return DataPilotFieldShowItemsMode::FROM_TOP;
647 }
648}
649
651 const ScDPLabelData& rLabelData, const ScDPNameVec& rDataFields,
652 bool bEnableLayout )
653 : GenericDialogController(pParent, "modules/scalc/ui/datafieldoptionsdialog.ui",
654 "DataFieldOptionsDialog")
655 , m_xLbSortBy(m_xBuilder->weld_combo_box("sortby"))
656 , m_xRbSortAsc(m_xBuilder->weld_radio_button("ascending"))
657 , m_xRbSortDesc(m_xBuilder->weld_radio_button("descending"))
658 , m_xRbSortMan(m_xBuilder->weld_radio_button("manual"))
659 , m_xLayoutFrame(m_xBuilder->weld_widget("layoutframe"))
660 , m_xLbLayout(m_xBuilder->weld_combo_box("layout"))
661 , m_xCbLayoutEmpty(m_xBuilder->weld_check_button("emptyline"))
662 , m_xCbRepeatItemLabels(m_xBuilder->weld_check_button("repeatitemlabels"))
663 , m_xCbShow(m_xBuilder->weld_check_button("show"))
664 , m_xNfShow(m_xBuilder->weld_spin_button("items"))
665 , m_xFtShow(m_xBuilder->weld_label("showft"))
666 , m_xFtShowFrom(m_xBuilder->weld_label("showfromft"))
667 , m_xLbShowFrom(m_xBuilder->weld_combo_box("from"))
668 , m_xFtShowUsing(m_xBuilder->weld_label("usingft"))
669 , m_xLbShowUsing(m_xBuilder->weld_combo_box("using"))
670 , m_xHideFrame(m_xBuilder->weld_widget("hideframe"))
671 , m_xLbHide(m_xBuilder->weld_tree_view("hideitems"))
672 , m_xFtHierarchy(m_xBuilder->weld_label("hierarchyft"))
673 , m_xLbHierarchy(m_xBuilder->weld_combo_box("hierarchy"))
674 , m_xBtnOk(m_xBuilder->weld_button("ok"))
675 , m_xBtnCancel(m_xBuilder->weld_button("cancel"))
676 , mrDPObj(rDPObj)
677 , maLabelData(rLabelData)
678{
679 m_xLbHide->enable_toggle_buttons(weld::ColumnToggleType::Check);
680
681 m_xLbSortBy->set_size_request(m_xLbSortBy->get_approximate_digit_width() * 18, -1);
682 m_xLbHide->set_size_request(-1, m_xLbHide->get_height_rows(5));
683 Init(rDataFields, bEnableLayout);
684}
685
687{
688}
689
691{
692 // *** SORTING ***
693
694 if (m_xRbSortMan->get_active())
695 rLabelData.maSortInfo.Mode = DataPilotFieldSortMode::MANUAL;
696 else if (m_xLbSortBy->get_active() == SC_SORTNAME_POS)
697 rLabelData.maSortInfo.Mode = DataPilotFieldSortMode::NAME;
698 else
699 rLabelData.maSortInfo.Mode = DataPilotFieldSortMode::DATA;
700
701 ScDPName aFieldName = GetFieldName(m_xLbSortBy->get_active_text());
702 if (!aFieldName.maName.isEmpty())
703 {
704 rLabelData.maSortInfo.Field =
706 rLabelData.maSortInfo.IsAscending = m_xRbSortAsc->get_active();
707 }
708
709 // *** LAYOUT MODE ***
710
711 rLabelData.maLayoutInfo.LayoutMode = ToDataPilotFieldLayoutMode(m_xLbLayout->get_active());
712 rLabelData.maLayoutInfo.AddEmptyLines = m_xCbLayoutEmpty->get_active();
713 rLabelData.mbRepeatItemLabels = m_xCbRepeatItemLabels->get_active();
714
715 // *** AUTO SHOW ***
716
717 aFieldName = GetFieldName(m_xLbShowUsing->get_active_text());
718 if (!aFieldName.maName.isEmpty())
719 {
720 rLabelData.maShowInfo.IsEnabled = m_xCbShow->get_active();
721 rLabelData.maShowInfo.ShowItemsMode = ToDataPilotFieldShowItemsMode(m_xLbShowFrom->get_active());
722 rLabelData.maShowInfo.ItemCount = sal::static_int_cast<sal_Int32>( m_xNfShow->get_value() );
723 rLabelData.maShowInfo.DataField =
725 }
726
727 // *** HIDDEN ITEMS ***
728
729 rLabelData.maMembers = maLabelData.maMembers;
730 int nVisCount = m_xLbHide->n_children();
731 for (int nPos = 0; nPos < nVisCount; ++nPos)
732 rLabelData.maMembers[nPos].mbVisible = m_xLbHide->get_toggle(nPos) == TRISTATE_FALSE;
733
734 // *** HIERARCHY ***
735
736 rLabelData.mnUsedHier = m_xLbHierarchy->get_active() != -1 ? m_xLbHierarchy->get_active() : 0;
737}
738
739void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayout )
740{
741 m_xBtnOk->connect_clicked(LINK(this, ScDPSubtotalOptDlg, ButtonClicked));
742 m_xBtnCancel->connect_clicked(LINK(this, ScDPSubtotalOptDlg, ButtonClicked));
743
744 // *** SORTING ***
745
746 sal_Int32 nSortMode = maLabelData.maSortInfo.Mode;
747
748 // sort fields list box
749 m_xLbSortBy->append_text(maLabelData.getDisplayName());
750
751 for( const auto& rDataField : rDataFields )
752 {
753 // Cache names for later lookup.
754 maDataFieldNameMap.emplace(rDataField.maLayoutName, rDataField);
755
756 m_xLbSortBy->append_text(rDataField.maLayoutName);
757 m_xLbShowUsing->append_text(rDataField.maLayoutName); // for AutoShow
758 }
759
760 sal_Int32 nSortPos = SC_SORTNAME_POS;
761 if( nSortMode == DataPilotFieldSortMode::DATA )
762 {
763 nSortPos = FindListBoxEntry( *m_xLbSortBy, maLabelData.maSortInfo.Field, SC_SORTDATA_POS );
764 if( nSortPos == -1 )
765 {
766 nSortPos = SC_SORTNAME_POS;
767 nSortMode = DataPilotFieldSortMode::MANUAL;
768 }
769 }
770 m_xLbSortBy->set_active(nSortPos);
771
772 // sorting mode
773 m_xRbSortAsc->connect_toggled( LINK( this, ScDPSubtotalOptDlg, RadioClickHdl ) );
774 m_xRbSortDesc->connect_toggled( LINK( this, ScDPSubtotalOptDlg, RadioClickHdl ) );
775 m_xRbSortMan->connect_toggled( LINK( this, ScDPSubtotalOptDlg, RadioClickHdl ) );
776
777 weld::RadioButton* pRBtn = nullptr;
778 switch( nSortMode )
779 {
781 case DataPilotFieldSortMode::MANUAL:
782 pRBtn = m_xRbSortMan.get();
783 break;
784 default:
785 pRBtn = maLabelData.maSortInfo.IsAscending ? m_xRbSortAsc.get() : m_xRbSortDesc.get();
786 }
787 pRBtn->set_active(true);
788 RadioClickHdl(*pRBtn);
789
790 // *** LAYOUT MODE ***
791
792 m_xLayoutFrame->set_sensitive(bEnableLayout);
793
794 m_xLbLayout->set_active(FromDataPilotFieldLayoutMode(maLabelData.maLayoutInfo.LayoutMode));
795 m_xCbLayoutEmpty->set_active( maLabelData.maLayoutInfo.AddEmptyLines );
797
798 // *** AUTO SHOW ***
799
800 m_xCbShow->set_active( maLabelData.maShowInfo.IsEnabled );
801 m_xCbShow->connect_toggled( LINK( this, ScDPSubtotalOptDlg, CheckHdl ) );
802
803 m_xLbShowFrom->set_active(FromDataPilotFieldShowItemsMode(maLabelData.maShowInfo.ShowItemsMode));
804 tools::Long nCount = static_cast< tools::Long >( maLabelData.maShowInfo.ItemCount );
805 if( nCount < 1 )
806 nCount = SC_SHOW_DEFAULT;
807 m_xNfShow->set_value( nCount );
808
809 // m_xLbShowUsing already filled above
810 m_xLbShowUsing->set_active_text(maLabelData.maShowInfo.DataField);
811 if (m_xLbShowUsing->get_active() == -1)
812 m_xLbShowUsing->set_active(0);
813
814 CheckHdl(*m_xCbShow); // enable/disable dependent controls
815
816 // *** HIDDEN ITEMS ***
817
819
820 // *** HIERARCHY ***
821
822 if( maLabelData.maHiers.getLength() > 1 )
823 {
824 lclFillListBox(*m_xLbHierarchy, maLabelData.maHiers);
825 sal_Int32 nHier = maLabelData.mnUsedHier;
826 if( (nHier < 0) || (nHier >= maLabelData.maHiers.getLength()) ) nHier = 0;
827 m_xLbHierarchy->set_active( nHier );
828 m_xLbHierarchy->connect_changed( LINK( this, ScDPSubtotalOptDlg, SelectHdl ) );
829 }
830 else
831 {
832 m_xFtHierarchy->set_sensitive(false);
833 m_xLbHierarchy->set_sensitive(false);
834 }
835}
836
838{
839 m_xLbHide->clear();
840 lclFillListBox(*m_xLbHide, maLabelData.maMembers);
841 size_t n = maLabelData.maMembers.size();
842 for (size_t i = 0; i < n; ++i)
843 m_xLbHide->set_toggle(i, maLabelData.maMembers[i].mbVisible ? TRISTATE_FALSE : TRISTATE_TRUE);
844 bool bEnable = m_xLbHide->n_children() > 0;
845 m_xHideFrame->set_sensitive(bEnable);
846}
847
848ScDPName ScDPSubtotalOptDlg::GetFieldName(const OUString& rLayoutName) const
849{
850 NameMapType::const_iterator itr = maDataFieldNameMap.find(rLayoutName);
851 return itr == maDataFieldNameMap.end() ? ScDPName() : itr->second;
852}
853
855 const weld::ComboBox& rLBox, std::u16string_view rEntry, sal_Int32 nStartPos ) const
856{
857 sal_Int32 nPos = nStartPos;
858 bool bFound = false;
859 while (nPos < rLBox.get_count())
860 {
861 // translate the displayed field name back to its original field name.
863 OUString aUnoName = ScDPUtil::createDuplicateDimensionName(aName.maName, aName.mnDupCount);
864 if (aUnoName == rEntry)
865 {
866 bFound = true;
867 break;
868 }
869 ++nPos;
870 }
871 return bFound ? nPos : -1;
872}
873
874IMPL_LINK(ScDPSubtotalOptDlg, ButtonClicked, weld::Button&, rButton, void)
875{
876 if (&rButton == m_xBtnOk.get())
877 response(RET_OK);
878 else
879 response(RET_CANCEL);
880}
881
882IMPL_LINK(ScDPSubtotalOptDlg, RadioClickHdl, weld::Toggleable&, rBtn, void)
883{
884 if (!rBtn.get_active())
885 return;
886
887 m_xLbSortBy->set_sensitive(m_xRbSortMan->get_active());
888}
889
891{
892 if (&rCBox == m_xCbShow.get())
893 {
894 bool bEnable = m_xCbShow->get_active();
895 m_xNfShow->set_sensitive( bEnable );
896 m_xFtShow->set_sensitive( bEnable );
897 m_xFtShowFrom->set_sensitive( bEnable );
898 m_xLbShowFrom->set_sensitive( bEnable );
899
900 bool bEnableUsing = bEnable && (m_xLbShowUsing->get_count() > 0);
901 m_xFtShowUsing->set_sensitive(bEnableUsing);
902 m_xLbShowUsing->set_sensitive(bEnableUsing);
903 }
904}
905
907{
908 mrDPObj.GetMembers(maLabelData.mnCol, m_xLbHierarchy->get_active(), maLabelData.maMembers);
909 InitHideListBox();
910}
911
912ScDPShowDetailDlg::ScDPShowDetailDlg(weld::Window* pParent, ScDPObject& rDPObj, css::sheet::DataPilotFieldOrientation nOrient)
913 : GenericDialogController(pParent, "modules/scalc/ui/showdetaildialog.ui", "ShowDetail")
914 , mrDPObj(rDPObj)
915 , mxLbDims(m_xBuilder->weld_tree_view("dimsTreeview"))
916{
917 ScDPSaveData* pSaveData = rDPObj.GetSaveData();
919 for (tools::Long nDim=0; nDim<nDimCount; nDim++)
920 {
921 bool bIsDataLayout;
922 sal_Int32 nDimFlags = 0;
923 OUString aName = rDPObj.GetDimName( nDim, bIsDataLayout, &nDimFlags );
924 if ( !bIsDataLayout && !rDPObj.IsDuplicated( nDim ) && ScDPObject::IsOrientationAllowed( nOrient, nDimFlags ) )
925 {
926 const ScDPSaveDimension* pDimension = pSaveData ? pSaveData->GetExistingDimensionByName(aName) : nullptr;
927 if ( !pDimension || (pDimension->GetOrientation() != nOrient) )
928 {
929 if (pDimension)
930 {
931 const std::optional<OUString> & pLayoutName = pDimension->GetLayoutName();
932 if (pLayoutName)
933 aName = *pLayoutName;
934 }
935 mxLbDims->append_text(aName);
936 maNameIndexMap.emplace(aName, nDim);
937 }
938 }
939 }
940 if (mxLbDims->n_children())
941 mxLbDims->select(0);
942
943 mxLbDims->connect_row_activated(LINK(this, ScDPShowDetailDlg, DblClickHdl));
944}
945
947{
948}
949
951{
952 return mxLbDims->n_children() ? GenericDialogController::run() : static_cast<short>(RET_CANCEL);
953}
954
956{
957 // Look up the internal dimension name which may be different from the
958 // displayed field name.
959 OUString aSelectedName = mxLbDims->get_selected_text();
960 DimNameIndexMap::const_iterator itr = maNameIndexMap.find(aSelectedName);
961 if (itr == maNameIndexMap.end())
962 // This should never happen!
963 return aSelectedName;
964
965 tools::Long nDim = itr->second;
966 bool bIsDataLayout = false;
967 return mrDPObj.GetDimName(nDim, bIsDataLayout);
968}
969
971{
972 m_xDialog->response(RET_OK);
973 return true;
974}
975
976/* 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:2745
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:849
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:912
virtual ~ScDPShowDetailDlg() override
Definition: pvfundlg.cxx:946
std::unique_ptr< weld::TreeView > mxLbDims
Definition: pvfundlg.hxx:212
DimNameIndexMap maNameIndexMap
Definition: pvfundlg.hxx:209
virtual short run() override
Definition: pvfundlg.cxx:950
OUString GetDimensionName() const
Definition: pvfundlg.cxx:955
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:837
std::unique_ptr< weld::ComboBox > m_xLbShowFrom
Definition: pvfundlg.hxx:171
ScDPName GetFieldName(const OUString &rLayoutName) const
Definition: pvfundlg.cxx:848
NameMapType maDataFieldNameMap
Definition: pvfundlg.hxx:185
void Init(const ScDPNameVec &rDataFields, bool bEnableLayout)
Definition: pvfundlg.cxx:739
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:650
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:690
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:854
virtual ~ScDPSubtotalOptDlg() override
Definition: pvfundlg.cxx:686
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