/src/libreoffice/sc/source/ui/inc/dbdocfun.hxx
Line | Count | Source |
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 | | #pragma once |
21 | | |
22 | | #include <address.hxx> |
23 | | #include <vector> |
24 | | |
25 | | struct ScImportParam; |
26 | | struct ScQueryParam; |
27 | | struct ScSortParam; |
28 | | struct ScSubTotalParam; |
29 | | |
30 | | class SfxViewFrame; |
31 | | class ScDBData; |
32 | | class ScDocShell; |
33 | | class ScDPObject; |
34 | | class ScDBCollection; |
35 | | |
36 | | namespace com::sun::star::uno { template <typename > class Sequence; } |
37 | | namespace com::sun::star::beans { struct PropertyValue; } |
38 | | |
39 | | namespace svx { |
40 | | class ODataAccessDescriptor; |
41 | | } |
42 | | namespace sc |
43 | | { |
44 | | enum class Operation; |
45 | | } |
46 | | |
47 | | class ScDBDocFunc |
48 | | { |
49 | | friend class ScDBFunc; |
50 | | |
51 | | private: |
52 | | ScDocShell& rDocShell; |
53 | | static bool CheckSheetViewProtection(sc::Operation eOperation); |
54 | | |
55 | | public: |
56 | 3.40k | ScDBDocFunc( ScDocShell& rDocSh ): rDocShell(rDocSh) {} |
57 | | |
58 | | void UpdateImport( const OUString& rTarget, const svx::ODataAccessDescriptor& rDescriptor ); |
59 | | |
60 | | bool DoImport( SCTAB nTab, const ScImportParam& rParam, |
61 | | const svx::ODataAccessDescriptor* pDescriptor); // used for selection an existing ResultSet |
62 | | |
63 | | void DoImportUno( const ScAddress& rPos, |
64 | | const css::uno::Sequence<css::beans::PropertyValue>& aArgs ); |
65 | | |
66 | | static void ShowInBeamer( const ScImportParam& rParam, const SfxViewFrame* pFrame ); |
67 | | |
68 | | SC_DLLPUBLIC bool Sort( |
69 | | SCTAB nTab, const ScSortParam& rSortParam, bool bRecord, bool bPaint, bool bApi ); |
70 | | |
71 | | SC_DLLPUBLIC bool Query( SCTAB nTab, const ScQueryParam& rQueryParam, |
72 | | const ScRange* pAdvSource, bool bRecord, bool bApi ); |
73 | | |
74 | | void DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, |
75 | | bool bRecord, bool bApi ); |
76 | | |
77 | | void DoTableSubTotals( SCTAB nTab, const ScDBData& rNewData, const ScSubTotalParam& rParam, |
78 | | bool bRecord, bool bApi ); |
79 | | |
80 | | bool AddDBTable(const OUString& rName, const ScRange& rRange, bool bHeader, bool bRecord, |
81 | | bool bApi, const OUString& rStyleName = u""_ustr); |
82 | | bool DeleteDBTable(const ScDBData* pDBObj, bool bRecord, bool bApi ); |
83 | | |
84 | | SC_DLLPUBLIC bool AddDBRange( const OUString& rName, const ScRange& rRange ); |
85 | | bool DeleteDBRange( const OUString& rName ); |
86 | | bool RenameDBRange( const OUString& rOld, const OUString& rNew ); |
87 | | void ModifyDBData( const ScDBData& rNewData ); // Name unchanged |
88 | | |
89 | | void ModifyAllDBData( const ScDBCollection& rNewColl, const std::vector<ScRange>& rDelAreaList ); |
90 | | |
91 | | bool RepeatDB( const OUString& rDBName, bool bApi, bool bIsUnnamed, SCTAB aTab = 0); |
92 | | |
93 | | bool DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj, |
94 | | bool bRecord, bool bApi, bool bAllowMove = false ); |
95 | | |
96 | | bool RemovePivotTable(const ScDPObject& rDPObj, bool bRecord, bool bApi); |
97 | | bool CreatePivotTable(const ScDPObject& rDPObj, bool bRecord, bool bApi); |
98 | | bool UpdatePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi); |
99 | | |
100 | | /** |
101 | | * Reload the referenced pivot cache, and refresh all pivot tables that |
102 | | * reference the cache. |
103 | | */ |
104 | | void RefreshPivotTables(const ScDPObject* pDPObj, bool bApi); |
105 | | |
106 | | /** |
107 | | * Refresh the group dimensions of all pivot tables referencing the same |
108 | | * cache. |
109 | | */ |
110 | | void RefreshPivotTableGroups(ScDPObject* pDPObj); |
111 | | }; |
112 | | |
113 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |