summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/misc/TableCopyHelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/misc/TableCopyHelper.cxx')
-rw-r--r--dbaccess/source/ui/misc/TableCopyHelper.cxx87
1 files changed, 8 insertions, 79 deletions
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index b95dab6f4596..6b095f371a6b 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,116 +28,44 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBUI_TABLECOPYHELPER_HXX
#include "TableCopyHelper.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
#include "WCopyTable.hxx"
-#endif
-#ifndef DBAUI_GENERICCONTROLLER_HXX
#include "genericcontroller.hxx"
-#endif
-#ifndef DBAUI_WIZARD_CPAGE_HXX
#include "WCPage.hxx"
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
#include <com/sun/star/task/XInteractionHandler.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_COPYTABLEOPERATION_HPP_
#include <com/sun/star/sdb/application/CopyTableOperation.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_COPYTABLEWIZARD_HPP_
#include <com/sun/star/sdb/application/CopyTableWizard.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_DATAACCESSDESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdb/DataAccessDescriptorFactory.hpp>
-#endif
-#ifndef DBAUI_RTFREADER_HXX
#include "RtfReader.hxx"
-#endif
-#ifndef DBAUI_HTMLREADER_HXX
#include "HtmlReader.hxx"
-#endif
-#ifndef DBAUI_TOKENWRITER_HXX
#include "TokenWriter.hxx"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef DBAUI_DATAVIEW_HXX
#include "dataview.hxx"
-#endif
-#ifndef _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
-#endif
-#ifndef _UNOTOOLS_UCBHELPER_HXX
#include <unotools/ucbhelper.hxx>
-#endif
-#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef COMPHELPER_COMPONENTCONTEXT_HXX
#include <comphelper/componentcontext.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XVIEWSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XQUERYDEFINITIONSSUPPLIER_HPP_
#include <com/sun/star/sdb/XQueryDefinitionsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XPARAMETERS_HPP_
#include <com/sun/star/sdbc/XParameters.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XQUERIESSUPPLIER_HPP_
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCOLUMNLOCATE_HPP_
#include <com/sun/star/sdbc/XColumnLocate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XROWLOCATE_HPP_
#include <com/sun/star/sdbcx/XRowLocate.hpp>
-#endif
-#ifndef _SV_WAITOBJ_HXX
#include <vcl/waitobj.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSERFACTORY_HPP_
#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
-#endif
-#ifndef _UNOTOOLS_TEMPFILE_HXX
#include <unotools/tempfile.hxx>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
-#ifndef DBAUI_DBEXCHANGE_HXX
#include "dbexchange.hxx"
-#endif
#include <rtl/logfile.hxx>
//........................................................................
namespace dbaui
@@ -170,7 +99,7 @@ void OTableCopyHelper::insertTable( const ::rtl::OUString& i_rSourceDataSource,
{
if ( CommandType::QUERY != i_nCommandType && CommandType::TABLE != i_nCommandType )
{
- DBG_ERROR( "OTableCopyHelper::insertTable: invalid call (no supported format found)!" );
+ OSL_FAIL( "OTableCopyHelper::insertTable: invalid call (no supported format found)!" );
return;
}
@@ -182,7 +111,7 @@ void OTableCopyHelper::insertTable( const ::rtl::OUString& i_rSourceDataSource,
if ( !xSrcConnection.is() || !i_rDestConnection.is() )
{
- OSL_ENSURE( false, "OTableCopyHelper::insertTable: no connection/s!" );
+ OSL_FAIL( "OTableCopyHelper::insertTable: no connection/s!" );
return;
}
@@ -294,7 +223,7 @@ void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId
aTrans.bHtml = SOT_FORMATSTR_ID_HTML == _nFormatId;
aTrans.sDefaultTableName = GetTableNameForAppend();
if ( !copyTagTable(aTrans,sal_False,_xConnection) )
- m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString::createFromAscii("S1000") ,0,Any()));
+ m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")),0,Any()));
}
catch(const SQLException&)
{
@@ -306,7 +235,7 @@ void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId
}
}
else
- m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString::createFromAscii("S1000") ,0,Any()));
+ m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")),0,Any()));
}
// -----------------------------------------------------------------------------
@@ -337,10 +266,9 @@ sal_Bool OTableCopyHelper::copyTagTable(OTableCopyHelper::DropDescriptor& _rDesc
if ( _bCheck )
pImport->enableCheckOnly();
- //dyf add 20070601
//set the selected tablename
pImport->setSTableName(_rDesc.sDefaultTableName);
- //dyf add end
+
pImport->setStream(pStream);
return pImport->Read();
}
@@ -406,10 +334,11 @@ void OTableCopyHelper::asyncCopyTagTable( DropDescriptor& _rDesc
else if ( !_rDesc.bError )
pasteTable(_rDesc.aDroppedData,i_rDestDataSource,_xConnection);
else
- m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString::createFromAscii("S1000") ,0,Any()));
+ m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")),0,Any()));
}
// -----------------------------------------------------------------------------
//........................................................................
} // namespace dbaui
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */