update dev300-m58
[ooovba.git] / sc / source / ui / inc / dbdocfun.hxx
blob92cbf32774c33ddcf854f3f4f856098dcaf6a040
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dbdocfun.hxx,v $
10 * $Revision: 1.10.128.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_DBDOCFUN_HXX
32 #define SC_DBDOCFUN_HXX
34 #include "address.hxx"
35 #include <tools/solar.h>
36 #include <com/sun/star/uno/Sequence.hxx>
38 class String;
40 struct ScImportParam;
41 struct ScQueryParam;
42 struct ScSortParam;
43 struct ScSubTotalParam;
45 class SfxViewFrame;
46 class SbaSelectionList;
47 class ScDBData;
48 class ScDocShell;
49 class ScAddress;
50 class ScRange;
51 class ScDPObject;
53 namespace com { namespace sun { namespace star {
54 namespace beans {
55 struct PropertyValue;
57 namespace sdbc {
58 class XResultSet;
60 } } }
62 // ---------------------------------------------------------------------------
63 // -----------------------------------------------------------------
64 class SbaSelectionList: public List , public SvRefBase
66 public:
67 SbaSelectionList():
68 List(CONTAINER_MAXBLOCKSIZE,100,100){}
71 SV_DECL_IMPL_REF(SbaSelectionList)
74 class ScDBDocFunc
76 friend class ScDBFunc;
78 private:
79 ScDocShell& rDocShell;
81 public:
82 ScDBDocFunc( ScDocShell& rDocSh ): rDocShell(rDocSh) {}
83 ~ScDBDocFunc() {}
85 void UpdateImport( const String& rTarget, const String& rDBName,
86 const String& rTableName, const String& rStatement,
87 BOOL bNative, BYTE nType,
88 const ::com::sun::star::uno::Reference<
89 ::com::sun::star::sdbc::XResultSet >& xResultSet,
90 const SbaSelectionList* pSelection );
92 BOOL DoImport( SCTAB nTab, const ScImportParam& rParam,
93 const ::com::sun::star::uno::Reference<
94 ::com::sun::star::sdbc::XResultSet >& xResultSet,
95 const SbaSelectionList* pSelection, BOOL bRecord,
96 BOOL bAddrInsert = FALSE );
98 BOOL DoImportUno( const ScAddress& rPos,
99 const com::sun::star::uno::Sequence<
100 com::sun::star::beans::PropertyValue>& aArgs );
102 static void ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFrame );
104 BOOL Sort( SCTAB nTab, const ScSortParam& rSortParam,
105 BOOL bRecord, BOOL bPaint, BOOL bApi );
107 SC_DLLPUBLIC BOOL Query( SCTAB nTab, const ScQueryParam& rQueryParam,
108 const ScRange* pAdvSource, BOOL bRecord, BOOL bApi );
110 BOOL DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
111 const ScSortParam* pForceNewSort,
112 BOOL bRecord, BOOL bApi );
114 BOOL AddDBRange( const String& rName, const ScRange& rRange, BOOL bApi );
115 BOOL DeleteDBRange( const String& rName, BOOL bApi );
116 BOOL RenameDBRange( const String& rOld, const String& rNew, BOOL bApi );
117 BOOL ModifyDBData( const ScDBData& rNewData, BOOL bApi ); // Name unveraendert
119 BOOL RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi );
121 BOOL DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
122 BOOL bRecord, BOOL bApi, BOOL bAllowMove = FALSE );
127 #endif