LibreOffice Module dbaccess (master) 1
WCopyTable.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 <com/sun/star/container/XNameAccess.hpp>
23#include <com/sun/star/sdbc/XConnection.hpp>
24#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
25#include <com/sun/star/uno/XComponentContext.hpp>
26#include <com/sun/star/beans/XPropertySet.hpp>
28#include "TypeInfo.hxx"
29#include <vcl/roadmapwizard.hxx>
30#include "DExport.hxx"
31#include "WTabPage.hxx"
32#include "FieldDescriptions.hxx"
33#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
34#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
35#include <com/sun/star/task/XInteractionHandler.hpp>
36#include <map>
37#include <algorithm>
38
39namespace dbaui
40{
41
43 {
44 public:
45 virtual bool operator()(const OUString& _sColumnName) const = 0;
46
47 protected:
49 };
50
52 {
54 public:
56 {
57 m_pColumns = _pColumns;
58 }
59
61
62 bool operator()(const OUString& _sColumnName) const override
63 {
64 return m_pColumns->find(_sColumnName) != m_pColumns->end();
65 }
66 };
67
69 {
71 std::vector< OUString>* m_pVector;
72 public:
73 TMultiListBoxEntryFindFunctor(std::vector< OUString>* _pVector,
74 const ::comphelper::UStringMixEqual& _aCase)
75 :m_aCase(_aCase)
76 ,m_pVector(_pVector)
77 {
78 }
79
81
82 bool operator()(const OUString& _sColumnName) const override
83 {
84 return std::any_of(m_pVector->begin(),m_pVector->end(),
85 [this, &_sColumnName](const OUString& lhs)
86 { return m_aCase(lhs, _sColumnName); });
87 }
88 };
89
90 // ICopyTableSourceObject
101 {
102 public:
104 virtual OUString getQualifiedObjectName() const = 0;
106 virtual bool isView() const = 0;
110 virtual void copyUISettingsTo( const css::uno::Reference< css::beans::XPropertySet >& _rxObject ) const = 0;
112 virtual css::uno::Sequence< OUString >
113 getColumnNames() const = 0;
115 virtual css::uno::Sequence< OUString >
118 virtual OFieldDescription* createFieldDescription( const OUString& _rColumnName ) const = 0;
120 virtual OUString getSelectStatement() const = 0;
121
126 virtual void copyFilterAndSortingTo(const css::uno::Reference< css::sdbc::XConnection >& _xConnection,const css::uno::Reference< css::beans::XPropertySet >& _rxObject ) const = 0;
127
133 virtual ::utl::SharedUNOComponent< css::sdbc::XPreparedStatement >
135
136 virtual ~ICopyTableSourceObject();
137 };
138
139 // ObjectCopySource
141 {
142 private:
143 css::uno::Reference< css::sdbc::XConnection > m_xConnection;
144 css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData;
145 css::uno::Reference< css::beans::XPropertySet > m_xObject;
146 css::uno::Reference< css::beans::XPropertySetInfo > m_xObjectPSI;
147 css::uno::Reference< css::container::XNameAccess > m_xObjectColumns;
148
149 public:
151 const css::uno::Reference< css::sdbc::XConnection >& _rxConnection,
152 const css::uno::Reference< css::beans::XPropertySet >& _rxObject
153 );
154
155 // ICopyTableSourceObject overridables
156 virtual OUString getQualifiedObjectName() const override;
157 virtual bool isView() const override;
158 virtual void copyUISettingsTo( const css::uno::Reference< css::beans::XPropertySet >& _rxObject ) const override;
159 virtual void copyFilterAndSortingTo(const css::uno::Reference< css::sdbc::XConnection >& _xConnection, const css::uno::Reference< css::beans::XPropertySet >& _rxObject ) const override;
160 virtual css::uno::Sequence< OUString >
161 getColumnNames() const override;
162 virtual css::uno::Sequence< OUString >
163 getPrimaryKeyColumnNames() const override;
164 virtual OFieldDescription* createFieldDescription( const OUString& _rColumnName ) const override;
165 virtual OUString getSelectStatement() const override;
166 virtual ::utl::SharedUNOComponent< css::sdbc::XPreparedStatement >
167 getPreparedSelectStatement() const override;
168 };
169
170 // NamedTableCopySource
172 {
173 private:
174 css::uno::Reference< css::sdbc::XConnection > m_xConnection;
175 css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData;
176 OUString m_sTableName;
180 std::vector< OFieldDescription > m_aColumnInfo;
182
183 public:
185 const css::uno::Reference< css::sdbc::XConnection >& _rxConnection,
186 OUString _sTableName
187 );
188
189 // ICopyTableSourceObject overridables
190 virtual OUString getQualifiedObjectName() const override;
191 virtual bool isView() const override;
192 virtual void copyUISettingsTo( const css::uno::Reference< css::beans::XPropertySet >& _rxObject ) const override;
193 virtual void copyFilterAndSortingTo(const css::uno::Reference< css::sdbc::XConnection >& _xConnection,const css::uno::Reference< css::beans::XPropertySet >& _rxObject ) const override;
194 virtual css::uno::Sequence< OUString >
195 getColumnNames() const override;
196 virtual css::uno::Sequence< OUString >
197 getPrimaryKeyColumnNames() const override;
198 virtual OFieldDescription* createFieldDescription( const OUString& _rColumnName ) const override;
199 virtual OUString getSelectStatement() const override;
200 virtual ::utl::SharedUNOComponent< css::sdbc::XPreparedStatement >
201 getPreparedSelectStatement() const override;
202
203 private:
207 };
208
209 // Wizard Dialog
211 {
212 friend class OWizColumnSelect;
213 friend class OWizTypeSelect;
215 friend class OCopyTable;
216 friend class OWizNameMatching;
217
218 public:
219 typedef std::map<OUString, OUString, ::comphelper::UStringMixLess> TNameMapping;
220
222 {
226
228 };
229
230 private:
232 ODatabaseExport::TColumnVector m_aDestVec; // the order to insert the columns
235
237 std::vector<OTypeInfoMap::iterator> m_aTypeInfoIndex;
239 std::vector<OTypeInfoMap::iterator> m_aDestTypeInfoIndex;
241
243 std::vector<sal_Int32> m_vColumnTypes;
244
245 css::uno::Reference< css::sdbc::XConnection > m_xDestConnection;
246
248
249 css::uno::Reference< css::util::XNumberFormatter > m_xFormatter;
250 css::uno::Reference< css::uno::XComponentContext> m_xContext;
251 css::uno::Reference< css::task::XInteractionHandler> m_xInteractionHandler;
252
253 OUString m_sTypeNames; // these type names are the ones out of the resource file
254 sal_uInt32 m_nPageCount;
256 bool m_bInterConnectionCopy; // are we copying between different connections?
257
258 css::lang::Locale m_aLocale;
259 OUString m_sName; // for a table the name is composed
261 OUString m_aKeyName;
262 TOTypeInfoSP m_pTypeInfo; // default type
264 sal_Int16 m_nOperation;
268
269 private:
270 DECL_LINK( ImplPrevHdl, weld::Button&, void );
271 DECL_LINK( ImplNextHdl, weld::Button&, void);
272 DECL_LINK( ImplOKHdl, weld::Button&, void );
273 bool CheckColumns(sal_Int32& _rnBreakPos);
274 void loadData( const ICopyTableSourceObject& _rSourceObject,
275 ODatabaseExport::TColumns& _rColumns,
276 ODatabaseExport::TColumnVector& _rColVector );
277 void construct();
278 // need for table creation
279 static void appendColumns( css::uno::Reference< css::sdbcx::XColumnsSupplier> const & _rxColSup, const ODatabaseExport::TColumnVector* _pVec, bool _bKeyColumns = false );
280 static void appendKey(css::uno::Reference< css::sdbcx::XKeysSupplier> const & _rxSup,const ODatabaseExport::TColumnVector* _pVec);
281 // checks if the type is supported in the destination database
282 bool supportsType(sal_Int32 _nDataType,sal_Int32& _rNewDataType);
283
284 virtual std::unique_ptr<BuilderPage> createPage(vcl::WizardTypes::WizardState /*nState*/) override
285 {
286 assert(false);
287 return nullptr;
288 }
289
290 virtual void ActivatePage() override;
291
292 sal_uInt16 GetCurLevel() const { return getCurrentState(); }
293
295
296 public:
297 // used for copy tables or queries
299 weld::Window * pParent,
300 const OUString& _rDefaultName,
301 sal_Int16 _nOperation,
302 const ICopyTableSourceObject& _rSourceObject,
303 const css::uno::Reference< css::sdbc::XConnection >& _xSourceConnection,
304 const css::uno::Reference< css::sdbc::XConnection >& _xConnection,
305 const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
306 const css::uno::Reference< css::task::XInteractionHandler>& _xInteractionHandler
307 );
308
309 // used for importing rtf/html sources
311 weld::Window* pParent,
312 OUString _sDefaultName,
313 sal_Int16 _nOperation,
314 ODatabaseExport::TColumns&& _rDestColumns,
315 const ODatabaseExport::TColumnVector& _rSourceColVec,
316 const css::uno::Reference< css::sdbc::XConnection >& _xConnection,
317 const css::uno::Reference< css::util::XNumberFormatter >& _xFormatter,
318 TypeSelectionPageFactory _pTypeSelectionPageFactory,
319 SvStream& _rTypeSelectionPageArg,
320 const css::uno::Reference< css::uno::XComponentContext >& _rxContext
321 );
322
323 virtual ~OCopyTableWizard() override;
324
325 virtual bool DeactivatePage() override;
328 void EnableNextButton(bool bEnable);
329 void AddWizardPage(std::unique_ptr<OWizardPage> xPage); // delete page from OCopyTableWizard
330 void CheckButtons(); // checks which button can be disabled, enabled
331
332 // returns a vector where the position of a column and if the column is in the selection
333 // when not the value is COLUMN_POSITION_NOT_FOUND.
335 const std::vector<sal_Int32>& GetColumnTypes() const { return m_vColumnTypes; }
336 bool UseHeaderLine() const { return m_bUseHeaderLine; }
337 void setUseHeaderLine(bool _bUseHeaderLine) { m_bUseHeaderLine = _bUseHeaderLine; }
338
339 void insertColumn(sal_Int32 _nPos,OFieldDescription* _pField);
340
349 void replaceColumn(sal_Int32 _nPos,OFieldDescription* _pField,const OUString& _sOldName);
350
354 void setCreatePrimaryKey( bool _bDoCreate, const OUString& _rSuggestedName );
355
356 static bool supportsPrimaryKey( const css::uno::Reference< css::sdbc::XConnection >& _rxConnection );
358
359 static bool supportsViews( const css::uno::Reference< css::sdbc::XConnection >& _rxConnection );
361
366 const OUString& getPrimaryKeyName() const { return m_aKeyName; }
367
368 const OTypeInfoMap& getTypeInfo() const { return m_aTypeInfo; }
369
370 TOTypeInfoSP const & getDestTypeInfo(sal_Int32 _nPos) const { return m_aDestTypeInfoIndex[_nPos]->second; }
372
373 const css::lang::Locale& GetLocale() const { return m_aLocale; }
374 const css::uno::Reference< css::util::XNumberFormatter >& GetFormatter() const { return m_xFormatter; }
375 const css::uno::Reference< css::uno::XComponentContext>& GetComponentContext() const { return m_xContext; }
376
381 const OUString& getName() const { return m_sName; }
382
385 void clearDestColumns();
386
387 css::uno::Reference< css::beans::XPropertySet > returnTable();
388 css::uno::Reference< css::beans::XPropertySet > getTable() const;
389 css::uno::Reference< css::beans::XPropertySet > createTable();
390 css::uno::Reference< css::beans::XPropertySet > createView() const;
391 sal_Int32 getMaxColumnNameLength() const;
392
393 void setOperation( const sal_Int16 _nOperation );
394 sal_Int16 getOperation() const { return m_nOperation;}
395
396 OUString convertColumnName( const TColumnFindFunctor& _rCmpFunctor,
397 const OUString& _sColumnName,
398 std::u16string_view _sExtraChars,
399 sal_Int32 _nMaxNameLen);
400 TOTypeInfoSP convertType(const TOTypeInfoSP&_pType, bool& _bNotConvert);
401
402 OUString createUniqueName(const OUString& _sName);
403
404 // displays an error message that a column type is not supported
405 void showColumnTypeNotSupported(std::u16string_view _rColumnName);
406
407 void removeColumnNameFromNameMap(const OUString& _sName);
408 void showError(const OUString& _sErrorMessage);
409 void showError(const css::uno::Any& _aError);
410 };
411}
412
413/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
interface to an object to copy to another DB, using the OCopyTableWizard
Definition: WCopyTable.hxx:101
virtual ::utl::SharedUNOComponent< css::sdbc::XPreparedStatement > getPreparedSelectStatement() const =0
returns the prepared statement which can be used to retrieve the data of the to-be-copied object
virtual css::uno::Sequence< OUString > getPrimaryKeyColumnNames() const =0
retrieves the names of the primary keys of the to-be-copied object
virtual css::uno::Sequence< OUString > getColumnNames() const =0
retrieves the column names of the to-be-copied object
virtual void copyFilterAndSortingTo(const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const css::uno::Reference< css::beans::XPropertySet > &_rxObject) const =0
copies the filter and sorting
virtual OUString getSelectStatement() const =0
returns the SELECT statement which can be used to retrieve the data of the to-be-copied object
virtual OFieldDescription * createFieldDescription(const OUString &_rColumnName) const =0
creates a OFieldDescription for the given column of the to-be-copied object
virtual OUString getQualifiedObjectName() const =0
retrieves the fully qualified name of the object to copy
virtual void copyUISettingsTo(const css::uno::Reference< css::beans::XPropertySet > &_rxObject) const =0
copies the UI settings of the object to the given target object.
virtual bool isView() const =0
determines whether the object is a view
::utl::SharedUNOComponent< css::sdbc::XPreparedStatement > const & impl_ensureStatement_throw()
Definition: WCopyTable.cxx:322
css::uno::Reference< css::sdbc::XConnection > m_xConnection
Definition: WCopyTable.hxx:174
NamedTableCopySource(const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, OUString _sTableName)
Definition: WCopyTable.cxx:253
virtual void copyFilterAndSortingTo(const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const css::uno::Reference< css::beans::XPropertySet > &_rxObject) const override
copies the filter and sorting
Definition: WCopyTable.cxx:291
std::vector< OFieldDescription > m_aColumnInfo
Definition: WCopyTable.hxx:180
virtual css::uno::Sequence< OUString > getColumnNames() const override
retrieves the column names of the to-be-copied object
Definition: WCopyTable.cxx:329
virtual OFieldDescription * createFieldDescription(const OUString &_rColumnName) const override
creates a OFieldDescription for the given column of the to-be-copied object
Definition: WCopyTable.cxx:361
virtual ::utl::SharedUNOComponent< css::sdbc::XPreparedStatement > getPreparedSelectStatement() const override
returns the prepared statement which can be used to retrieve the data of the to-be-copied object
Definition: WCopyTable.cxx:376
::utl::SharedUNOComponent< css::sdbc::XPreparedStatement > m_xStatement
Definition: WCopyTable.hxx:181
virtual css::uno::Sequence< OUString > getPrimaryKeyColumnNames() const override
retrieves the names of the primary keys of the to-be-copied object
Definition: WCopyTable.cxx:338
virtual void copyUISettingsTo(const css::uno::Reference< css::beans::XPropertySet > &_rxObject) const override
copies the UI settings of the object to the given target object.
Definition: WCopyTable.cxx:286
virtual bool isView() const override
determines whether the object is a view
Definition: WCopyTable.cxx:267
virtual OUString getSelectStatement() const override
returns the SELECT statement which can be used to retrieve the data of the to-be-copied object
Definition: WCopyTable.cxx:370
virtual OUString getQualifiedObjectName() const override
retrieves the fully qualified name of the object to copy
Definition: WCopyTable.cxx:262
css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData
Definition: WCopyTable.hxx:175
OTypeInfoMap m_aTypeInfo
Definition: WCopyTable.hxx:236
ODatabaseExport::TColumnVector m_aDestVec
Definition: WCopyTable.hxx:232
const ODatabaseExport::TColumnVector & getSrcVector() const
Definition: WCopyTable.hxx:378
const css::uno::Reference< css::uno::XComponentContext > & GetComponentContext() const
Definition: WCopyTable.hxx:375
const css::uno::Reference< css::util::XNumberFormatter > & GetFormatter() const
Definition: WCopyTable.hxx:374
virtual bool DeactivatePage() override
Definition: WCopyTable.cxx:944
const OTypeInfoMap & getDestTypeInfo() const
Definition: WCopyTable.hxx:371
void setUseHeaderLine(bool _bUseHeaderLine)
Definition: WCopyTable.hxx:337
static void appendKey(css::uno::Reference< css::sdbcx::XKeysSupplier > const &_rxSup, const ODatabaseExport::TColumnVector *_pVec)
const ICopyTableSourceObject & m_rSourceObject
Definition: WCopyTable.hxx:247
const OUString & getPrimaryKeyName() const
returns the name of the primary key
Definition: WCopyTable.hxx:366
virtual ~OCopyTableWizard() override
Definition: WCopyTable.cxx:663
const OTypeInfoMap & getTypeInfo() const
Definition: WCopyTable.hxx:368
bool supportsPrimaryKey() const
Definition: WCopyTable.hxx:357
void EnableNextButton(bool bEnable)
Definition: WCopyTable.cxx:939
css::uno::Reference< css::util::XNumberFormatter > m_xFormatter
Definition: WCopyTable.hxx:249
void replaceColumn(sal_Int32 _nPos, OFieldDescription *_pField, const OUString &_sOldName)
replaces a field description with another one.
Definition: WCopyTable.cxx:974
void AddWizardPage(std::unique_ptr< OWizardPage > xPage)
Definition: WCopyTable.cxx:950
void clearDestColumns()
clears the dest vectors
void showError(const css::uno::Any &_aError)
static void appendColumns(css::uno::Reference< css::sdbcx::XColumnsSupplier > const &_rxColSup, const ODatabaseExport::TColumnVector *_pVec, bool _bKeyColumns=false)
sal_Int16 getOperation() const
Definition: WCopyTable.hxx:394
void setOperation(const sal_Int16 _nOperation)
virtual void ActivatePage() override
Definition: WCopyTable.cxx:901
DECL_LINK(ImplPrevHdl, weld::Button &, void)
sal_uInt16 GetCurLevel() const
Definition: WCopyTable.hxx:292
bool supportsType(sal_Int32 _nDataType, sal_Int32 &_rNewDataType)
static bool supportsPrimaryKey(const css::uno::Reference< css::sdbc::XConnection > &_rxConnection)
TOTypeInfoSP m_pTypeInfo
Definition: WCopyTable.hxx:262
DECL_LINK(ImplNextHdl, weld::Button &, void)
ODatabaseExport::TColumns & getDestColumns()
Definition: WCopyTable.hxx:379
Wizard_Button_Style m_ePressed
Definition: WCopyTable.hxx:265
TOTypeInfoSP const & getDestTypeInfo(sal_Int32 _nPos) const
Definition: WCopyTable.hxx:370
const ODatabaseExport::TColumnVector & getDestVector() const
Definition: WCopyTable.hxx:380
css::lang::Locale m_aLocale
Definition: WCopyTable.hxx:258
ODatabaseExport::TPositions m_vColumnPositions
Definition: WCopyTable.hxx:242
const ODatabaseExport::TPositions & GetColumnPositions() const
Definition: WCopyTable.hxx:334
std::map< OUString, OUString, ::comphelper::UStringMixLess > TNameMapping
Definition: WCopyTable.hxx:219
std::vector< sal_Int32 > m_vColumnTypes
Definition: WCopyTable.hxx:243
ODatabaseExport::TColumnVector m_vSourceVec
Definition: WCopyTable.hxx:234
css::uno::Reference< css::beans::XPropertySet > getTable() const
css::uno::Reference< css::beans::XPropertySet > returnTable()
const std::vector< sal_Int32 > & GetColumnTypes() const
Definition: WCopyTable.hxx:335
OTypeInfoMap m_aDestTypeInfo
Definition: WCopyTable.hxx:238
void insertColumn(sal_Int32 _nPos, OFieldDescription *_pField)
Definition: WCopyTable.cxx:956
const ODatabaseExport::TColumns & getSourceColumns() const
Definition: WCopyTable.hxx:377
css::uno::Reference< css::beans::XPropertySet > createView() const
OUString convertColumnName(const TColumnFindFunctor &_rCmpFunctor, const OUString &_sColumnName, std::u16string_view _sExtraChars, sal_Int32 _nMaxNameLen)
TNameMapping m_mNameMapping
Definition: WCopyTable.hxx:240
OUString createUniqueName(const OUString &_sName)
void showColumnTypeNotSupported(std::u16string_view _rColumnName)
css::uno::Reference< css::beans::XPropertySet > createTable()
bool shouldCreatePrimaryKey() const
returns whether a primary key should be created in the target database
Definition: WCopyTable.hxx:353
bool supportsViews() const
Definition: WCopyTable.hxx:360
css::uno::Reference< css::task::XInteractionHandler > m_xInteractionHandler
Definition: WCopyTable.hxx:251
void loadData(const ICopyTableSourceObject &_rSourceObject, ODatabaseExport::TColumns &_rColumns, ODatabaseExport::TColumnVector &_rColVector)
Definition: WCopyTable.cxx:986
Wizard_Button_Style GetPressedButton() const
Definition: WCopyTable.hxx:327
std::vector< OTypeInfoMap::iterator > m_aTypeInfoIndex
Definition: WCopyTable.hxx:237
css::uno::Reference< css::sdbc::XConnection > m_xDestConnection
Definition: WCopyTable.hxx:245
TOTypeInfoSP convertType(const TOTypeInfoSP &_pType, bool &_bNotConvert)
void removeColumnNameFromNameMap(const OUString &_sName)
weld::Button & GetOKButton()
Definition: WCopyTable.hxx:326
bool CheckColumns(sal_Int32 &_rnBreakPos)
Definition: WCopyTable.cxx:711
bool UseHeaderLine() const
Definition: WCopyTable.hxx:336
ODatabaseExport::TColumns m_vSourceColumns
Definition: WCopyTable.hxx:233
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: WCopyTable.hxx:250
void showError(const OUString &_sErrorMessage)
DECL_LINK(ImplOKHdl, weld::Button &, void)
sal_Int32 getMaxColumnNameLength() const
OCopyTableWizard(weld::Window *pParent, const OUString &_rDefaultName, sal_Int16 _nOperation, const ICopyTableSourceObject &_rSourceObject, const css::uno::Reference< css::sdbc::XConnection > &_xSourceConnection, const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const css::uno::Reference< css::task::XInteractionHandler > &_xInteractionHandler)
std::vector< OTypeInfoMap::iterator > m_aDestTypeInfoIndex
Definition: WCopyTable.hxx:239
void setCreatePrimaryKey(bool _bDoCreate, const OUString &_rSuggestedName)
Definition: WCopyTable.cxx:889
static bool supportsViews(const css::uno::Reference< css::sdbc::XConnection > &_rxConnection)
virtual std::unique_ptr< BuilderPage > createPage(vcl::WizardTypes::WizardState) override
Definition: WCopyTable.hxx:284
const OUString & getName() const
Definition: WCopyTable.hxx:381
ODatabaseExport::TColumns m_vDestColumns
Definition: WCopyTable.hxx:231
OCopyTableWizard(weld::Window *pParent, OUString _sDefaultName, sal_Int16 _nOperation, ODatabaseExport::TColumns &&_rDestColumns, const ODatabaseExport::TColumnVector &_rSourceColVec, const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const css::uno::Reference< css::util::XNumberFormatter > &_xFormatter, TypeSelectionPageFactory _pTypeSelectionPageFactory, SvStream &_rTypeSelectionPageArg, const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
weld::Container * CreatePageContainer()
Definition: WCopyTable.cxx:579
const css::lang::Locale & GetLocale() const
Definition: WCopyTable.hxx:373
std::map< OUString, OFieldDescription *, ::comphelper::UStringMixLess > TColumns
Definition: DExport.hxx:57
std::vector< std::pair< sal_Int32, sal_Int32 > > TPositions
Definition: DExport.hxx:59
std::vector< TColumns::const_iterator > TColumnVector
Definition: DExport.hxx:58
virtual css::uno::Sequence< OUString > getColumnNames() const override
retrieves the column names of the to-be-copied object
Definition: WCopyTable.cxx:187
virtual OUString getQualifiedObjectName() const override
retrieves the fully qualified name of the object to copy
Definition: WCopyTable.cxx:104
virtual bool isView() const override
determines whether the object is a view
Definition: WCopyTable.cxx:115
virtual void copyFilterAndSortingTo(const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const css::uno::Reference< css::beans::XPropertySet > &_rxObject) const override
copies the filter and sorting
Definition: WCopyTable.cxx:146
ObjectCopySource(const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const css::uno::Reference< css::beans::XPropertySet > &_rxObject)
Definition: WCopyTable.cxx:95
css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData
Definition: WCopyTable.hxx:144
virtual OUString getSelectStatement() const override
returns the SELECT statement which can be used to retrieve the data of the to-be-copied object
Definition: WCopyTable.cxx:207
css::uno::Reference< css::sdbc::XConnection > m_xConnection
Definition: WCopyTable.hxx:143
css::uno::Reference< css::container::XNameAccess > m_xObjectColumns
Definition: WCopyTable.hxx:147
css::uno::Reference< css::beans::XPropertySetInfo > m_xObjectPSI
Definition: WCopyTable.hxx:146
virtual ::utl::SharedUNOComponent< css::sdbc::XPreparedStatement > getPreparedSelectStatement() const override
returns the prepared statement which can be used to retrieve the data of the to-be-copied object
Definition: WCopyTable.cxx:243
virtual css::uno::Sequence< OUString > getPrimaryKeyColumnNames() const override
retrieves the names of the primary keys of the to-be-copied object
Definition: WCopyTable.cxx:192
virtual OFieldDescription * createFieldDescription(const OUString &_rColumnName) const override
creates a OFieldDescription for the given column of the to-be-copied object
Definition: WCopyTable.cxx:201
virtual void copyUISettingsTo(const css::uno::Reference< css::beans::XPropertySet > &_rxObject) const override
copies the UI settings of the object to the given target object.
Definition: WCopyTable.cxx:134
css::uno::Reference< css::beans::XPropertySet > m_xObject
Definition: WCopyTable.hxx:145
virtual bool operator()(const OUString &_sColumnName) const =0
TExportColumnFindFunctor(ODatabaseExport::TColumns *_pColumns)
Definition: WCopyTable.hxx:55
bool operator()(const OUString &_sColumnName) const override
Definition: WCopyTable.hxx:62
ODatabaseExport::TColumns * m_pColumns
Definition: WCopyTable.hxx:53
TMultiListBoxEntryFindFunctor(std::vector< OUString > *_pVector, const ::comphelper::UStringMixEqual &_aCase)
Definition: WCopyTable.hxx:73
::comphelper::UStringMixEqual m_aCase
Definition: WCopyTable.hxx:70
bool operator()(const OUString &_sColumnName) const override
Definition: WCopyTable.hxx:82
std::vector< OUString > * m_pVector
Definition: WCopyTable.hxx:71
std::unique_ptr< weld::Button > m_xFinish
WizardTypes::WizardState getCurrentState() const
std::unique_ptr< OWizTypeSelect >(* TypeSelectionPageFactory)(weld::Container *, OCopyTableWizard *, SvStream &)
std::multimap< sal_Int32, TOTypeInfoSP > OTypeInfoMap
Definition: TypeInfo.hxx:100
std::shared_ptr< OTypeInfo > TOTypeInfoSP
Definition: TypeInfo.hxx:99
sal_Int16 WizardState
sal_Int32 _nPos