Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / sc / source / ui / inc / dbfunc.hxx
blob69325bd323562f989ff2449e1eba65b716c54bbd
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_DBFUNC_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_DBFUNC_HXX
23 #include "viewfunc.hxx"
24 #include "dptypes.hxx"
26 namespace com { namespace sun { namespace star { namespace sheet {
27 struct DataPilotFieldFilter;
28 }}}}
30 struct ScSortParam;
31 struct ScQueryParam;
32 class ScDBData;
33 class ScDBCollection;
34 class ScDPObject;
35 class ScDPSaveData;
36 struct ScDPNumGroupInfo;
37 struct ScSubTotalParam;
39 class ScDBFunc : public ScViewFunc
41 private:
42 void GetSelectedMemberList(ScDPUniqueStringSet& rEntries, long& rDimension);
44 public:
45 ScDBFunc( vcl::Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell );
46 virtual ~ScDBFunc();
48 // only UISort repeat the partial results if necessary
50 void UISort( const ScSortParam& rSortParam );
52 void Sort( const ScSortParam& rSortParam,
53 bool bRecord = true, bool bPaint = true );
54 SC_DLLPUBLIC void Query( const ScQueryParam& rQueryParam,
55 const ScRange* pAdvSource, bool bRecord );
56 void DoSubTotals( const ScSubTotalParam& rParam, bool bRecord = true,
57 const ScSortParam* pForceNewSort = nullptr );
59 void ToggleAutoFilter();
60 void HideAutoFilter();
62 void RepeatDB( bool bRecord = true );
64 bool ImportData( const ScImportParam& rParam );
66 void GotoDBArea( const OUString& rDBName );
68 // DB range from Cursor
69 ScDBData* GetDBData( bool bMarkArea = true, ScGetDBMode eMode = SC_DB_MAKE, ScGetDBSelection eSel = SC_DBSEL_KEEP);
70 ScDBData* GetAnonymousDBData();
72 void Consolidate( const ScConsolidateParam& rParam );
74 bool MakePivotTable(
75 const ScDPSaveData& rData, const ScRange& rDest, bool bNewTable,
76 const ScDPObject& rSource );
78 void DeletePivotTable();
79 void RecalcPivotTable();
80 bool HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts );
81 bool HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo );
82 void GroupDataPilot();
83 void DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nParts );
84 void NumGroupDataPilot( const ScDPNumGroupInfo& rInfo );
85 void UngroupDataPilot();
86 void DataPilotInput( const ScAddress& rPos, const OUString& rString );
88 void DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16* pUserListId = nullptr );
89 bool DataPilotMove( const ScRange& rSource, const ScAddress& rDest );
91 bool HasSelectionForDrillDown( sal_uInt16& rOrientation );
92 void SetDataPilotDetails(bool bShow, const OUString* pNewDimensionName = nullptr);
94 void ShowDataPilotSourceData( ScDPObject& rDPObj,
95 const css::uno::Sequence< css::sheet::DataPilotFieldFilter >& rFilters );
97 void MakeOutline( bool bColumns, bool bRecord = true );
98 void RemoveOutline( bool bColumns, bool bRecord = true );
99 void RemoveAllOutlines( bool bRecord = true );
100 void TestRemoveOutline( bool& rCol, bool& rRow );
102 void AutoOutline();
104 void SelectLevel( bool bColumns, sal_uInt16 nLevel,
105 bool bRecord = true );
106 void ShowOutline( bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
107 bool bRecord = true, bool bPaint = true );
108 void HideOutline( bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
109 bool bRecord = true, bool bPaint = true );
111 void ShowMarkedOutlines( bool bRecord = true );
112 void HideMarkedOutlines( bool bRecord = true );
113 bool OutlinePossible(bool bHide);
115 void UpdateCharts(bool bAllCharts = false); // Default: am Cursor
117 static sal_uInt16 DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, bool bAllCharts );
120 #endif
122 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */