tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / ui / inc / dbdocfun.hxx
blob780e523b5193abab6298e20b56ba280db7ea47c2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
22 #include <address.hxx>
23 #include <vector>
25 struct ScImportParam;
26 struct ScQueryParam;
27 struct ScSortParam;
28 struct ScSubTotalParam;
30 class SfxViewFrame;
31 class ScDBData;
32 class ScDocShell;
33 class ScDPObject;
34 class ScDBCollection;
36 namespace com::sun::star::uno { template <typename > class Sequence; }
37 namespace com::sun::star::beans { struct PropertyValue; }
39 namespace svx {
40 class ODataAccessDescriptor;
43 class ScDBDocFunc
45 friend class ScDBFunc;
47 private:
48 ScDocShell& rDocShell;
50 public:
51 ScDBDocFunc( ScDocShell& rDocSh ): rDocShell(rDocSh) {}
53 void UpdateImport( const OUString& rTarget, const svx::ODataAccessDescriptor& rDescriptor );
55 bool DoImport( SCTAB nTab, const ScImportParam& rParam,
56 const svx::ODataAccessDescriptor* pDescriptor); // used for selection an existing ResultSet
58 void DoImportUno( const ScAddress& rPos,
59 const css::uno::Sequence<css::beans::PropertyValue>& aArgs );
61 static void ShowInBeamer( const ScImportParam& rParam, const SfxViewFrame* pFrame );
63 SC_DLLPUBLIC bool Sort(
64 SCTAB nTab, const ScSortParam& rSortParam, bool bRecord, bool bPaint, bool bApi );
66 SC_DLLPUBLIC bool Query( SCTAB nTab, const ScQueryParam& rQueryParam,
67 const ScRange* pAdvSource, bool bRecord, bool bApi );
69 void DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
70 bool bRecord, bool bApi );
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
77 void ModifyAllDBData( const ScDBCollection& rNewColl, const std::vector<ScRange>& rDelAreaList );
79 bool RepeatDB( const OUString& rDBName, bool bApi, bool bIsUnnamed, SCTAB aTab = 0);
81 bool DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
82 bool bRecord, bool bApi, bool bAllowMove = false );
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);
88 /**
89 * Reload the referenced pivot cache, and refresh all pivot tables that
90 * reference the cache.
92 void RefreshPivotTables(const ScDPObject* pDPObj, bool bApi);
94 /**
95 * Refresh the group dimensions of all pivot tables referencing the same
96 * cache.
98 void RefreshPivotTableGroups(ScDPObject* pDPObj);
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */