1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dbfunc.hxx,v $
10 * $Revision: 1.12.100.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
34 #include "viewfunc.hxx"
36 namespace com
{ namespace sun
{ namespace star
{ namespace sheet
{
37 struct DataPilotFieldFilter
;
46 class ScStrCollection
;
47 struct ScDPNumGroupInfo
;
49 // ---------------------------------------------------------------------------
51 class ScDBFunc
: public ScViewFunc
54 void GetSelectedMemberList( ScStrCollection
& rEntries
, long& rDimension
);
57 ScDBFunc( Window
* pParent
, ScDocShell
& rDocSh
, ScTabViewShell
* pViewShell
);
58 //UNUSED2008-05 ScDBFunc( Window* pParent, const ScDBFunc& rDBFunc, ScTabViewShell* pViewShell );
61 // nur UISort wiederholt bei Bedarf die Teilergebnisse
63 void UISort( const ScSortParam
& rSortParam
,
64 BOOL bRecord
= TRUE
);
66 void Sort( const ScSortParam
& rSortParam
,
67 BOOL bRecord
= TRUE
, BOOL bPaint
= TRUE
);
68 SC_DLLPUBLIC
void Query( const ScQueryParam
& rQueryParam
,
69 const ScRange
* pAdvSource
, BOOL bRecord
);
70 void DoSubTotals( const ScSubTotalParam
& rParam
, BOOL bRecord
= TRUE
,
71 const ScSortParam
* pForceNewSort
= NULL
);
73 void ToggleAutoFilter();
74 void HideAutoFilter();
76 void RepeatDB( BOOL bRecord
= TRUE
);
78 BOOL
ImportData( const ScImportParam
& rParam
, BOOL bRecord
= TRUE
);
80 void GotoDBArea( const String
& rDBName
);
82 // DB-Bereich vom Cursor
83 ScDBData
* GetDBData( bool bMarkArea
= true, ScGetDBMode eMode
= SC_DB_MAKE
, bool bExpandRows
= false, bool bShrinkToData
= false );
85 void NotifyCloseDbNameDlg( const ScDBCollection
& rNewColl
, const List
& rDelAreaList
);
87 void Consolidate( const ScConsolidateParam
& rParam
, BOOL bRecord
= TRUE
);
89 bool MakePivotTable( const ScDPSaveData
& rData
, const ScRange
& rDest
, BOOL bNewTable
,
90 const ScDPObject
& rSource
, BOOL bApi
= FALSE
);
91 void DeletePivotTable();
92 void RecalcPivotTable();
93 void AutoFormatPivotTable(USHORT nIndex
);
94 void AutoFormatPivotTable(ScDPObject
* pDPObj
, USHORT nIndex
);
96 BOOL
HasSelectionForDateGroup( ScDPNumGroupInfo
& rOldInfo
, sal_Int32
& rParts
);
97 BOOL
HasSelectionForNumGroup( ScDPNumGroupInfo
& rOldInfo
);
98 void GroupDataPilot();
99 void DateGroupDataPilot( const ScDPNumGroupInfo
& rInfo
, sal_Int32 nParts
);
100 void NumGroupDataPilot( const ScDPNumGroupInfo
& rInfo
);
101 void UngroupDataPilot();
102 void DataPilotInput( const ScAddress
& rPos
, const String
& rString
);
104 bool DataPilotSort( const ScAddress
& rPos
, bool bAscending
, sal_uInt16
* pUserListId
= NULL
);
105 BOOL
DataPilotMove( const ScRange
& rSource
, const ScAddress
& rDest
);
107 BOOL
HasSelectionForDrillDown( USHORT
& rOrientation
);
108 void SetDataPilotDetails( BOOL bShow
, const String
* pNewDimensionName
= NULL
);
110 void ShowDataPilotSourceData( ScDPObject
& rDPObj
,
111 const ::com::sun::star::uno::Sequence
< ::com::sun::star::sheet::DataPilotFieldFilter
>& rFilters
);
113 void MakeOutline( BOOL bColumns
, BOOL bRecord
= TRUE
);
114 void RemoveOutline( BOOL bColumns
, BOOL bRecord
= TRUE
);
115 void RemoveAllOutlines( BOOL bRecord
= TRUE
);
116 void TestRemoveOutline( BOOL
& rCol
, BOOL
& rRow
);
118 void AutoOutline( BOOL bRecord
= TRUE
);
120 void SelectLevel( BOOL bColumns
, USHORT nLevel
,
121 BOOL bRecord
= TRUE
, BOOL bPaint
= TRUE
);
122 void ShowOutline( BOOL bColumns
, USHORT nLevel
, USHORT nEntry
,
123 BOOL bRecord
= TRUE
, BOOL bPaint
= TRUE
);
124 void HideOutline( BOOL bColumns
, USHORT nLevel
, USHORT nEntry
,
125 BOOL bRecord
= TRUE
, BOOL bPaint
= TRUE
);
127 void ShowMarkedOutlines( BOOL bRecord
= TRUE
);
128 void HideMarkedOutlines( BOOL bRecord
= TRUE
);
129 BOOL
OutlinePossible(BOOL bHide
);
131 void UpdateCharts(BOOL bAllCharts
= FALSE
); // Default: am Cursor
133 static USHORT
DoUpdateCharts( const ScAddress
& rPos
, ScDocument
* pDoc
, BOOL bAllCharts
);