/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * *************************************************************/ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbaccess.hxx" #ifndef DBA_XMLDATASOURCESETTINGS_HXX #include "xmlDataSourceSettings.hxx" #endif #ifndef DBA_XMLDATASOURCESETTING_HXX #include "xmlDataSourceSetting.hxx" #endif #ifndef DBA_XMLFILTER_HXX #include "xmlfilter.hxx" #endif #ifndef _XMLOFF_XMLTOKEN_HXX #include #endif #ifndef _XMLOFF_XMLNMSPE_HXX #include #endif #ifndef _XMLOFF_NMSPMAP_HXX #include #endif #ifndef DBA_XMLENUMS_HXX #include "xmlEnums.hxx" #endif #ifndef DBACCESS_SHARED_XMLSTRINGS_HRC #include "xmlstrings.hrc" #endif #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ #include #endif #ifndef _TOOLS_DEBUG_HXX #include #endif #include namespace dbaxml { using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; DBG_NAME(OXMLDataSourceSettings) OXMLDataSourceSettings::OXMLDataSourceSettings( ODBFilter& rImport ,sal_uInt16 nPrfx ,const ::rtl::OUString& _sLocalName) : SvXMLImportContext( rImport, nPrfx, _sLocalName ) { DBG_CTOR(OXMLDataSourceSettings,NULL); } // ----------------------------------------------------------------------------- OXMLDataSourceSettings::~OXMLDataSourceSettings() { DBG_DTOR(OXMLDataSourceSettings,NULL); } // ----------------------------------------------------------------------------- SvXMLImportContext* OXMLDataSourceSettings::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { SvXMLImportContext *pContext = 0; const SvXMLTokenMap& rTokenMap = GetOwnImport().GetDataSourceInfoElemTokenMap(); switch( rTokenMap.Get( nPrefix, rLocalName ) ) { case XML_TOK_DATA_SOURCE_SETTING: GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); pContext = new OXMLDataSourceSetting( GetOwnImport(), nPrefix, rLocalName,xAttrList); break; } if( !pContext ) pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); return pContext; } // ----------------------------------------------------------------------------- ODBFilter& OXMLDataSourceSettings::GetOwnImport() { return static_cast(GetImport()); } // ----------------------------------------------------------------------------- //---------------------------------------------------------------------------- } // namespace dbaxml // -----------------------------------------------------------------------------