LibreOffice Module sc (master)  1
dbdocfun.hxx
Go to the documentation of this file.
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 INCLUDED_SC_SOURCE_UI_INC_DBDOCFUN_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_DBDOCFUN_HXX
22 
23 #include <address.hxx>
24 #include <vector>
25 
26 struct ScImportParam;
27 struct ScQueryParam;
28 struct ScSortParam;
29 struct ScSubTotalParam;
30 
31 class SfxViewFrame;
32 class ScDBData;
33 class ScDocShell;
34 class ScDPObject;
35 class ScDBCollection;
36 
37 namespace com::sun::star::uno { template <typename > class Sequence; }
38 namespace com::sun::star::beans { struct PropertyValue; }
39 
40 namespace svx {
41  class ODataAccessDescriptor;
42 }
43 
45 {
46 friend class ScDBFunc;
47 
48 private:
50 
51 public:
52  ScDBDocFunc( ScDocShell& rDocSh ): rDocShell(rDocSh) {}
53 
54  void UpdateImport( const OUString& rTarget, const svx::ODataAccessDescriptor& rDescriptor );
55 
56  bool DoImport( SCTAB nTab, const ScImportParam& rParam,
57  const svx::ODataAccessDescriptor* pDescriptor); // used for selection an existing ResultSet
58 
59  void DoImportUno( const ScAddress& rPos,
60  const css::uno::Sequence<css::beans::PropertyValue>& aArgs );
61 
62  static void ShowInBeamer( const ScImportParam& rParam, const SfxViewFrame* pFrame );
63 
64  SC_DLLPUBLIC bool Sort(
65  SCTAB nTab, const ScSortParam& rSortParam, bool bRecord, bool bPaint, bool bApi );
66 
67  SC_DLLPUBLIC bool Query( SCTAB nTab, const ScQueryParam& rQueryParam,
68  const ScRange* pAdvSource, bool bRecord, bool bApi );
69 
70  void DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
71  bool bRecord, bool bApi );
72 
73  bool AddDBRange( const OUString& rName, const ScRange& rRange );
74  bool DeleteDBRange( const OUString& rName );
75  bool RenameDBRange( const OUString& rOld, const OUString& rNew );
76  void ModifyDBData( const ScDBData& rNewData ); // Name unveraendert
77 
78  void ModifyAllDBData( const ScDBCollection& rNewColl, const std::vector<ScRange>& rDelAreaList );
79 
80  bool RepeatDB( const OUString& rDBName, bool bApi, bool bIsUnnamed, SCTAB aTab = 0);
81 
82  bool DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
83  bool bRecord, bool bApi, bool bAllowMove = false );
84 
85  bool RemovePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi);
86  bool CreatePivotTable(const ScDPObject& rDPObj, bool bRecord, bool bApi);
87  bool UpdatePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi);
88 
93  void RefreshPivotTables(const ScDPObject* pDPObj, bool bApi);
94 
99  void RefreshPivotTableGroups(ScDPObject* pDPObj);
100 };
101 
102 #endif
103 
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScDBDocFunc(ScDocShell &rDocSh)
Definition: dbdocfun.hxx:52
bool DoImport(SCTAB nTab, const ScImportParam &rParam, const svx::ODataAccessDescriptor *pDescriptor)
Definition: dbdocimp.cxx:120
static void ShowInBeamer(const ScImportParam &rParam, const SfxViewFrame *pFrame)
Definition: dbdocimp.cxx:71
bool UpdatePivotTable(ScDPObject &rDPObj, bool bRecord, bool bApi)
Definition: dbdocfun.cxx:1534
bool RepeatDB(const OUString &rDBName, bool bApi, bool bIsUnnamed, SCTAB aTab=0)
Definition: dbdocfun.cxx:282
void RefreshPivotTables(const ScDPObject *pDPObj, bool bApi)
Reload the referenced pivot cache, and refresh all pivot tables that reference the cache...
Definition: dbdocfun.cxx:1608
bool DeleteDBRange(const OUString &rName)
Definition: dbdocfun.cxx:117
bool RenameDBRange(const OUString &rOld, const OUString &rNew)
Definition: dbdocfun.cxx:153
bool DataPilotUpdate(ScDPObject *pOldObj, const ScDPObject *pNewObj, bool bRecord, bool bApi, bool bAllowMove=false)
Definition: dbdocfun.cxx:1239
void DoImportUno(const ScAddress &rPos, const css::uno::Sequence< css::beans::PropertyValue > &aArgs)
Definition: dbdocimp.cxx:107
SC_DLLPUBLIC bool Query(SCTAB nTab, const ScQueryParam &rQueryParam, const ScRange *pAdvSource, bool bRecord, bool bApi)
Definition: dbdocfun.cxx:624
ScDocShell & rDocShell
Definition: dbdocfun.hxx:49
bool RemovePivotTable(ScDPObject &rDPObj, bool bRecord, bool bApi)
Definition: dbdocfun.cxx:1341
SC_DLLPUBLIC bool Sort(SCTAB nTab, const ScSortParam &rSortParam, bool bRecord, bool bPaint, bool bApi)
Definition: dbdocfun.cxx:465
void DoSubTotals(SCTAB nTab, const ScSubTotalParam &rParam, bool bRecord, bool bApi)
Definition: dbdocfun.cxx:980
void ModifyAllDBData(const ScDBCollection &rNewColl, const std::vector< ScRange > &rDelAreaList)
Definition: dbdocfun.cxx:244
void UpdateImport(const OUString &rTarget, const svx::ODataAccessDescriptor &rDescriptor)
Definition: dbdocfun.cxx:1669
void ModifyDBData(const ScDBData &rNewData)
Definition: dbdocfun.cxx:200
void RefreshPivotTableGroups(ScDPObject *pDPObj)
Refresh the group dimensions of all pivot tables referencing the same cache.
Definition: dbdocfun.cxx:1626
bool AddDBRange(const OUString &rName, const ScRange &rRange)
Definition: dbdocfun.cxx:64
#define SC_DLLPUBLIC
Definition: scdllapi.h:28
sal_Int16 SCTAB
Definition: types.hxx:23
bool CreatePivotTable(const ScDPObject &rDPObj, bool bRecord, bool bApi)
Definition: dbdocfun.cxx:1423