Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / dbfunc.hxx
blob0720ce5bd83563f7dd4ba25172e30e28be46c3e5
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 SC_DBFUNC_HXX
21 #define SC_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 // ---------------------------------------------------------------------------
41 class ScDBFunc : public ScViewFunc
43 private:
44 void GetSelectedMemberList(ScDPUniqueStringSet& rEntries, long& rDimension);
46 public:
47 ScDBFunc( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell );
48 virtual ~ScDBFunc();
50 // only UISort repeat the partial results if necessary
52 void UISort( const ScSortParam& rSortParam,
53 sal_Bool bRecord = sal_True );
55 void Sort( const ScSortParam& rSortParam,
56 sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True );
57 SC_DLLPUBLIC void Query( const ScQueryParam& rQueryParam,
58 const ScRange* pAdvSource, sal_Bool bRecord );
59 void DoSubTotals( const ScSubTotalParam& rParam, sal_Bool bRecord = sal_True,
60 const ScSortParam* pForceNewSort = NULL );
62 void ToggleAutoFilter();
63 void HideAutoFilter();
65 void RepeatDB( sal_Bool bRecord = sal_True );
67 sal_Bool ImportData( const ScImportParam& rParam, sal_Bool bRecord = sal_True );
69 void GotoDBArea( const OUString& rDBName );
71 // DB range from Cursor
72 ScDBData* GetDBData( bool bMarkArea = true, ScGetDBMode eMode = SC_DB_MAKE, ScGetDBSelection eSel = SC_DBSEL_KEEP);
73 ScDBData* GetAnonymousDBData();
75 void NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const std::vector<ScRange> &rDelAreaList );
77 void Consolidate( const ScConsolidateParam& rParam, sal_Bool bRecord = sal_True );
79 bool MakePivotTable(
80 const ScDPSaveData& rData, const ScRange& rDest, bool bNewTable,
81 const ScDPObject& rSource, bool bApi = false );
83 void DeletePivotTable();
84 void RecalcPivotTable();
85 bool HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts );
86 bool HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo );
87 void GroupDataPilot();
88 void DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nParts );
89 void NumGroupDataPilot( const ScDPNumGroupInfo& rInfo );
90 void UngroupDataPilot();
91 void DataPilotInput( const ScAddress& rPos, const OUString& rString );
93 bool DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16* pUserListId = NULL );
94 sal_Bool DataPilotMove( const ScRange& rSource, const ScAddress& rDest );
96 bool HasSelectionForDrillDown( sal_uInt16& rOrientation );
97 void SetDataPilotDetails(bool bShow, const OUString* pNewDimensionName = NULL);
99 void ShowDataPilotSourceData( ScDPObject& rDPObj,
100 const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::DataPilotFieldFilter >& rFilters );
102 void MakeOutline( sal_Bool bColumns, sal_Bool bRecord = sal_True );
103 void RemoveOutline( sal_Bool bColumns, sal_Bool bRecord = sal_True );
104 void RemoveAllOutlines( sal_Bool bRecord = sal_True );
105 void TestRemoveOutline( sal_Bool& rCol, sal_Bool& rRow );
107 void AutoOutline( sal_Bool bRecord = sal_True );
109 void SelectLevel( sal_Bool bColumns, sal_uInt16 nLevel,
110 sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True );
111 void ShowOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
112 sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True );
113 void HideOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
114 sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True );
116 void ShowMarkedOutlines( sal_Bool bRecord = sal_True );
117 void HideMarkedOutlines( sal_Bool bRecord = sal_True );
118 sal_Bool OutlinePossible(sal_Bool bHide);
120 void UpdateCharts(sal_Bool bAllCharts = false); // Default: am Cursor
122 static sal_uInt16 DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sal_Bool bAllCharts );
127 #endif
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */