Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef SC_DBDOCFUN_HXX
21 : #define SC_DBDOCFUN_HXX
22 :
23 : #include "address.hxx"
24 : #include <tools/solar.h>
25 : #include <com/sun/star/uno/Sequence.hxx>
26 :
27 : class String;
28 :
29 : struct ScImportParam;
30 : struct ScQueryParam;
31 : struct ScSortParam;
32 : struct ScSubTotalParam;
33 :
34 : class SfxViewFrame;
35 : class ScDBData;
36 : class ScDocShell;
37 : class ScAddress;
38 : class ScRange;
39 : class ScDPObject;
40 :
41 : namespace com { namespace sun { namespace star {
42 : namespace beans {
43 : struct PropertyValue;
44 : }
45 : } } }
46 :
47 : namespace svx {
48 : class ODataAccessDescriptor;
49 : }
50 :
51 : class ScDBDocFunc
52 : {
53 : friend class ScDBFunc;
54 :
55 : private:
56 : ScDocShell& rDocShell;
57 :
58 : public:
59 8 : ScDBDocFunc( ScDocShell& rDocSh ): rDocShell(rDocSh) {}
60 8 : ~ScDBDocFunc() {}
61 :
62 : void UpdateImport( const String& rTarget, const svx::ODataAccessDescriptor& rDescriptor );
63 :
64 : bool DoImport( SCTAB nTab, const ScImportParam& rParam,
65 : const svx::ODataAccessDescriptor* pDescriptor, // used for selection an existing ResultSet
66 : bool bRecord,
67 : bool bAddrInsert = false );
68 :
69 : bool DoImportUno( const ScAddress& rPos,
70 : const com::sun::star::uno::Sequence<
71 : com::sun::star::beans::PropertyValue>& aArgs );
72 :
73 : static void ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFrame );
74 :
75 : sal_Bool Sort( SCTAB nTab, const ScSortParam& rSortParam,
76 : sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi );
77 :
78 : SC_DLLPUBLIC sal_Bool Query( SCTAB nTab, const ScQueryParam& rQueryParam,
79 : const ScRange* pAdvSource, sal_Bool bRecord, sal_Bool bApi );
80 :
81 : sal_Bool DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
82 : const ScSortParam* pForceNewSort,
83 : sal_Bool bRecord, sal_Bool bApi );
84 :
85 : bool AddDBRange( const ::rtl::OUString& rName, const ScRange& rRange, sal_Bool bApi );
86 : bool DeleteDBRange( const ::rtl::OUString& rName );
87 : bool RenameDBRange( const String& rOld, const String& rNew );
88 : bool ModifyDBData( const ScDBData& rNewData ); // Name unveraendert
89 :
90 : bool RepeatDB( const ::rtl::OUString& rDBName, bool bRecord, bool bApi, bool bIsUnnamed=false, SCTAB aTab = 0);
91 :
92 : bool DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
93 : bool bRecord, bool bApi, bool bAllowMove = false );
94 :
95 : /**
96 : * Reload the referenced pivot cache, and refresh all pivot tables that
97 : * reference the cache.
98 : */
99 : sal_uLong RefreshPivotTables(ScDPObject* pDPObj, bool bApi);
100 :
101 : /**
102 : * Refresh the group dimensions of all pivot tables referencing the same
103 : * cache.
104 : */
105 : void RefreshPivotTableGroups(ScDPObject* pDPObj);
106 : };
107 :
108 :
109 :
110 : #endif
111 :
112 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|