Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef SC_DBDOCFUN_HXX
30 : : #define SC_DBDOCFUN_HXX
31 : :
32 : : #include "address.hxx"
33 : : #include <tools/solar.h>
34 : : #include <com/sun/star/uno/Sequence.hxx>
35 : :
36 : : class String;
37 : :
38 : : struct ScImportParam;
39 : : struct ScQueryParam;
40 : : struct ScSortParam;
41 : : struct ScSubTotalParam;
42 : :
43 : : class SfxViewFrame;
44 : : class ScDBData;
45 : : class ScDocShell;
46 : : class ScAddress;
47 : : class ScRange;
48 : : class ScDPObject;
49 : :
50 : : namespace com { namespace sun { namespace star {
51 : : namespace beans {
52 : : struct PropertyValue;
53 : : }
54 : : } } }
55 : :
56 : : namespace svx {
57 : : class ODataAccessDescriptor;
58 : : }
59 : :
60 : : class ScDBDocFunc
61 : : {
62 : : friend class ScDBFunc;
63 : :
64 : : private:
65 : : ScDocShell& rDocShell;
66 : :
67 : : public:
68 : 146 : ScDBDocFunc( ScDocShell& rDocSh ): rDocShell(rDocSh) {}
69 : 146 : ~ScDBDocFunc() {}
70 : :
71 : : void UpdateImport( const String& rTarget, const svx::ODataAccessDescriptor& rDescriptor );
72 : :
73 : : bool DoImport( SCTAB nTab, const ScImportParam& rParam,
74 : : const svx::ODataAccessDescriptor* pDescriptor, // used for selection and existing ResultSet
75 : : bool bRecord,
76 : : bool bAddrInsert = false );
77 : :
78 : : bool DoImportUno( const ScAddress& rPos,
79 : : const com::sun::star::uno::Sequence<
80 : : com::sun::star::beans::PropertyValue>& aArgs );
81 : :
82 : : static void ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFrame );
83 : :
84 : : sal_Bool Sort( SCTAB nTab, const ScSortParam& rSortParam,
85 : : sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi );
86 : :
87 : : SC_DLLPUBLIC sal_Bool Query( SCTAB nTab, const ScQueryParam& rQueryParam,
88 : : const ScRange* pAdvSource, sal_Bool bRecord, sal_Bool bApi );
89 : :
90 : : sal_Bool DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
91 : : const ScSortParam* pForceNewSort,
92 : : sal_Bool bRecord, sal_Bool bApi );
93 : :
94 : : bool AddDBRange( const ::rtl::OUString& rName, const ScRange& rRange, sal_Bool bApi );
95 : : bool DeleteDBRange( const ::rtl::OUString& rName );
96 : : bool RenameDBRange( const String& rOld, const String& rNew );
97 : : bool ModifyDBData( const ScDBData& rNewData ); // Name unveraendert
98 : :
99 : : bool RepeatDB( const ::rtl::OUString& rDBName, bool bRecord, bool bApi, bool bIsUnnamed=false, SCTAB aTab = 0);
100 : :
101 : : bool DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
102 : : bool bRecord, bool bApi, bool bAllowMove = false );
103 : :
104 : : /**
105 : : * Reload the referenced pivot cache, and refresh all pivot tables that
106 : : * reference the cache.
107 : : */
108 : : sal_uLong RefreshPivotTables(ScDPObject* pDPObj, bool bApi);
109 : :
110 : : /**
111 : : * Refresh the group dimensions of all pivot tables referencing the same
112 : : * cache.
113 : : */
114 : : void RefreshPivotTableGroups(ScDPObject* pDPObj);
115 : : };
116 : :
117 : :
118 : :
119 : : #endif
120 : :
121 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|