1*38d50f7bSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*38d50f7bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*38d50f7bSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*38d50f7bSAndrew Rist * distributed with this work for additional information 6*38d50f7bSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*38d50f7bSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*38d50f7bSAndrew Rist * "License"); you may not use this file except in compliance 9*38d50f7bSAndrew Rist * with the License. You may obtain a copy of the License at 10*38d50f7bSAndrew Rist * 11*38d50f7bSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*38d50f7bSAndrew Rist * 13*38d50f7bSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*38d50f7bSAndrew Rist * software distributed under the License is distributed on an 15*38d50f7bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*38d50f7bSAndrew Rist * KIND, either express or implied. See the License for the 17*38d50f7bSAndrew Rist * specific language governing permissions and limitations 18*38d50f7bSAndrew Rist * under the License. 19*38d50f7bSAndrew Rist * 20*38d50f7bSAndrew Rist *************************************************************/ 21*38d50f7bSAndrew Rist 22*38d50f7bSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SC_DBFUNC_HXX 25cdf0e10cSrcweir #define SC_DBFUNC_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "viewfunc.hxx" 28cdf0e10cSrcweir 29cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace sheet { 30cdf0e10cSrcweir struct DataPilotFieldFilter; 31cdf0e10cSrcweir }}}} 32cdf0e10cSrcweir 33cdf0e10cSrcweir struct ScSortParam; 34cdf0e10cSrcweir struct ScQueryParam; 35cdf0e10cSrcweir class ScDBData; 36cdf0e10cSrcweir class ScDBCollection; 37cdf0e10cSrcweir class ScDPObject; 38cdf0e10cSrcweir class ScDPSaveData; 39cdf0e10cSrcweir class ScStrCollection; 40cdf0e10cSrcweir struct ScDPNumGroupInfo; 41cdf0e10cSrcweir 42cdf0e10cSrcweir // --------------------------------------------------------------------------- 43cdf0e10cSrcweir 44cdf0e10cSrcweir class ScDBFunc : public ScViewFunc 45cdf0e10cSrcweir { 46cdf0e10cSrcweir private: 47cdf0e10cSrcweir void GetSelectedMemberList( ScStrCollection& rEntries, long& rDimension ); 48cdf0e10cSrcweir 49cdf0e10cSrcweir public: 50cdf0e10cSrcweir ScDBFunc( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell ); 51cdf0e10cSrcweir //UNUSED2008-05 ScDBFunc( Window* pParent, const ScDBFunc& rDBFunc, ScTabViewShell* pViewShell ); 52cdf0e10cSrcweir virtual ~ScDBFunc(); 53cdf0e10cSrcweir 54cdf0e10cSrcweir // nur UISort wiederholt bei Bedarf die Teilergebnisse 55cdf0e10cSrcweir 56cdf0e10cSrcweir void UISort( const ScSortParam& rSortParam, 57cdf0e10cSrcweir sal_Bool bRecord = sal_True ); 58cdf0e10cSrcweir 59cdf0e10cSrcweir void Sort( const ScSortParam& rSortParam, 60cdf0e10cSrcweir sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True ); 61cdf0e10cSrcweir SC_DLLPUBLIC void Query( const ScQueryParam& rQueryParam, 62cdf0e10cSrcweir const ScRange* pAdvSource, sal_Bool bRecord ); 63cdf0e10cSrcweir void DoSubTotals( const ScSubTotalParam& rParam, sal_Bool bRecord = sal_True, 64cdf0e10cSrcweir const ScSortParam* pForceNewSort = NULL ); 65cdf0e10cSrcweir 66cdf0e10cSrcweir void ToggleAutoFilter(); 67cdf0e10cSrcweir void HideAutoFilter(); 68cdf0e10cSrcweir 69cdf0e10cSrcweir void RepeatDB( sal_Bool bRecord = sal_True ); 70cdf0e10cSrcweir 71cdf0e10cSrcweir sal_Bool ImportData( const ScImportParam& rParam, sal_Bool bRecord = sal_True ); 72cdf0e10cSrcweir 73cdf0e10cSrcweir void GotoDBArea( const String& rDBName ); 74cdf0e10cSrcweir 75cdf0e10cSrcweir // DB-Bereich vom Cursor 76cdf0e10cSrcweir ScDBData* GetDBData( sal_Bool bMarkArea = sal_True, ScGetDBMode eMode = SC_DB_MAKE, ScGetDBSelection eSel = SC_DBSEL_KEEP ); 77cdf0e10cSrcweir 78cdf0e10cSrcweir void NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List& rDelAreaList ); 79cdf0e10cSrcweir 80cdf0e10cSrcweir void Consolidate( const ScConsolidateParam& rParam, sal_Bool bRecord = sal_True ); 81cdf0e10cSrcweir 82cdf0e10cSrcweir bool MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, sal_Bool bNewTable, 83cdf0e10cSrcweir const ScDPObject& rSource, sal_Bool bApi = sal_False ); 84cdf0e10cSrcweir void DeletePivotTable(); 85cdf0e10cSrcweir // Wang Xu Ming -- 2009-6-17 86cdf0e10cSrcweir // DataPilot Migration 87cdf0e10cSrcweir sal_uLong RecalcPivotTable(); 88cdf0e10cSrcweir // End Comments 89cdf0e10cSrcweir sal_Bool HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts ); 90cdf0e10cSrcweir sal_Bool HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo ); 91cdf0e10cSrcweir void GroupDataPilot(); 92cdf0e10cSrcweir void DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nParts ); 93cdf0e10cSrcweir void NumGroupDataPilot( const ScDPNumGroupInfo& rInfo ); 94cdf0e10cSrcweir void UngroupDataPilot(); 95cdf0e10cSrcweir void DataPilotInput( const ScAddress& rPos, const String& rString ); 96cdf0e10cSrcweir 97cdf0e10cSrcweir bool DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16* pUserListId = NULL ); 98cdf0e10cSrcweir sal_Bool DataPilotMove( const ScRange& rSource, const ScAddress& rDest ); 99cdf0e10cSrcweir 100cdf0e10cSrcweir sal_Bool HasSelectionForDrillDown( sal_uInt16& rOrientation ); 101cdf0e10cSrcweir void SetDataPilotDetails( sal_Bool bShow, const String* pNewDimensionName = NULL ); 102cdf0e10cSrcweir 103cdf0e10cSrcweir void ShowDataPilotSourceData( ScDPObject& rDPObj, 104cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::DataPilotFieldFilter >& rFilters ); 105cdf0e10cSrcweir 106cdf0e10cSrcweir void MakeOutline( sal_Bool bColumns, sal_Bool bRecord = sal_True ); 107cdf0e10cSrcweir void RemoveOutline( sal_Bool bColumns, sal_Bool bRecord = sal_True ); 108cdf0e10cSrcweir void RemoveAllOutlines( sal_Bool bRecord = sal_True ); 109cdf0e10cSrcweir void TestRemoveOutline( sal_Bool& rCol, sal_Bool& rRow ); 110cdf0e10cSrcweir 111cdf0e10cSrcweir void AutoOutline( sal_Bool bRecord = sal_True ); 112cdf0e10cSrcweir 113cdf0e10cSrcweir void SelectLevel( sal_Bool bColumns, sal_uInt16 nLevel, 114cdf0e10cSrcweir sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True ); 115cdf0e10cSrcweir void ShowOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, 116cdf0e10cSrcweir sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True ); 117cdf0e10cSrcweir void HideOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, 118cdf0e10cSrcweir sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True ); 119cdf0e10cSrcweir 120cdf0e10cSrcweir void ShowMarkedOutlines( sal_Bool bRecord = sal_True ); 121cdf0e10cSrcweir void HideMarkedOutlines( sal_Bool bRecord = sal_True ); 122cdf0e10cSrcweir sal_Bool OutlinePossible(sal_Bool bHide); 123cdf0e10cSrcweir 124cdf0e10cSrcweir void UpdateCharts(sal_Bool bAllCharts = sal_False); // Default: am Cursor 125cdf0e10cSrcweir 126cdf0e10cSrcweir static sal_uInt16 DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sal_Bool bAllCharts ); 127cdf0e10cSrcweir }; 128cdf0e10cSrcweir 129cdf0e10cSrcweir 130cdf0e10cSrcweir 131cdf0e10cSrcweir #endif 132cdf0e10cSrcweir 133