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