summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/source/drivers/evoab/LCatalog.cxx74
-rw-r--r--connectivity/source/drivers/evoab/LColumnAlias.cxx235
-rw-r--r--connectivity/source/drivers/evoab/LColumnAlias.hxx116
-rw-r--r--connectivity/source/drivers/evoab/LColumns.cxx59
-rw-r--r--connectivity/source/drivers/evoab/LColumns.hxx54
-rw-r--r--connectivity/source/drivers/evoab/LConfigAccess.cxx162
-rw-r--r--connectivity/source/drivers/evoab/LConnection.cxx281
-rw-r--r--connectivity/source/drivers/evoab/LConnection.hxx81
-rw-r--r--connectivity/source/drivers/evoab/LDatabaseMetaData.cxx398
-rw-r--r--connectivity/source/drivers/evoab/LDatabaseMetaData.hxx58
-rw-r--r--connectivity/source/drivers/evoab/LDebug.cxx43
-rw-r--r--connectivity/source/drivers/evoab/LDriver.cxx508
-rw-r--r--connectivity/source/drivers/evoab/LDriver.hxx118
-rw-r--r--connectivity/source/drivers/evoab/LFolderList.cxx563
-rw-r--r--connectivity/source/drivers/evoab/LFolderList.hxx94
-rw-r--r--connectivity/source/drivers/evoab/LNoException.cxx325
-rw-r--r--connectivity/source/drivers/evoab/LPreparedStatement.cxx45
-rw-r--r--connectivity/source/drivers/evoab/LPreparedStatement.hxx52
-rw-r--r--connectivity/source/drivers/evoab/LResultSet.cxx191
-rw-r--r--connectivity/source/drivers/evoab/LResultSet.hxx83
-rw-r--r--connectivity/source/drivers/evoab/LServices.cxx123
-rw-r--r--connectivity/source/drivers/evoab/LStatement.cxx45
-rw-r--r--connectivity/source/drivers/evoab/LStatement.hxx52
-rw-r--r--connectivity/source/drivers/evoab/LTable.cxx867
-rw-r--r--connectivity/source/drivers/evoab/LTable.hxx102
-rw-r--r--connectivity/source/drivers/evoab/LTables.cxx64
-rw-r--r--connectivity/source/drivers/evoab/LTables.hxx54
-rw-r--r--connectivity/source/drivers/evoab/evoab.xcu61
-rwxr-xr-xconnectivity/source/drivers/evoab/evoab.xml31
-rwxr-xr-xconnectivity/source/drivers/evoab/exports.dxp2
-rwxr-xr-xconnectivity/source/drivers/evoab/makefile.mk113
-rwxr-xr-xediteng/Library_editeng.mk9
-rw-r--r--editeng/source/rtf/segincr.asm39
-rw-r--r--framework/JunitTest_framework_complex.mk2
-rw-r--r--framework/JunitTest_framework_unoapi.mk2
-rw-r--r--framework/Library_fwe.mk7
-rw-r--r--framework/Library_fwi.mk3
-rw-r--r--idl/Executable_svidl.mk65
-rw-r--r--idl/Makefile38
-rw-r--r--[-rwxr-xr-x]idl/Module_idl.mk (renamed from xmlscript/util/target.pmk)12
-rw-r--r--idl/prj/build.lst8
-rw-r--r--idl/prj/d.lst2
-rwxr-xr-xidl/prj/makefile.mk (renamed from idl/inc/makefile.mk)27
-rw-r--r--idl/util/idlpch.cxx51
-rw-r--r--[-rwxr-xr-x]linguistic/JunitTest_linguistic_complex.mk (renamed from idl/source/cmptools/makefile.mk)38
-rwxr-xr-x[-rw-r--r--]linguistic/JunitTest_linguistic_unoapi.mk72
-rw-r--r--linguistic/Library_lng.mk88
-rw-r--r--linguistic/Module_linguistic.mk13
-rwxr-xr-xlinguistic/Package_inc.mk (renamed from idl/source/objects/makefile.mk)34
-rw-r--r--linguistic/inc/linguistic/hyphdta.hxx13
-rw-r--r--linguistic/inc/linguistic/lngdllapi.h (renamed from connectivity/source/drivers/evoab/LDebug.hxx)18
-rw-r--r--linguistic/inc/linguistic/lngprophelp.hxx93
-rw-r--r--linguistic/inc/linguistic/misc.hxx24
-rw-r--r--linguistic/inc/linguistic/spelldta.hxx6
-rw-r--r--linguistic/prj/build.lst8
-rw-r--r--linguistic/prj/d.lst13
-rwxr-xr-xlinguistic/prj/makefile.mk (renamed from sfx2/qa/unoapi/makefile.mk)36
-rwxr-xr-xlinguistic/qa/complex/linguistic/makefile.mk61
-rw-r--r--linguistic/source/grammarchecker.cxx305
-rw-r--r--linguistic/source/grammarchecker.hxx109
-rw-r--r--linguistic/source/hyphdta.cxx16
-rw-r--r--linguistic/source/lngprophelp.cxx155
-rwxr-xr-xlinguistic/source/makefile.mk114
-rw-r--r--linguistic/source/spelldta.cxx10
-rwxr-xr-xsfx2/CppunitTest_sfx2_metadatable.mk1
-rwxr-xr-xsfx2/JunitTest_sfx2_complex.mk2
-rwxr-xr-xsfx2/JunitTest_sfx2_unoapi.mk2
-rwxr-xr-xsfx2/Library_qstart.mk12
-rwxr-xr-xsfx2/Library_sfx.mk10
-rwxr-xr-xsfx2/Module_sfx2.mk1
-rwxr-xr-xsfx2/Package_inc.mk1
-rw-r--r--sfx2/inc/pch/precompiled_sfx2.hxx1
-rw-r--r--sfx2/inc/sfx2/qswin32.h (renamed from connectivity/source/drivers/evoab/LConfigAccess.hxx)34
-rw-r--r--sfx2/prj/build.lst3
-rwxr-xr-xsfx2/qa/complex/sfx2/makefile.mk84
-rwxr-xr-xsfx2/qa/cppunit/makefile.mk70
-rw-r--r--sfx2/source/appl/shutdowniconw32.cxx2
-rw-r--r--svx/JunitTest_svx_unoapi.mk2
-rw-r--r--svx/Library_svx.mk6
-rw-r--r--svx/Library_svxcore.mk6
-rw-r--r--svx/Library_textconversiondlgs.mk4
-rwxr-xr-xvbahelper/Library_vbahelper.mk4
-rwxr-xr-xxmloff/JunitTest_xmloff_unoapi.mk2
-rw-r--r--xmloff/Library_xo.mk3
-rw-r--r--xmlscript/Library_xcr.mk71
-rw-r--r--xmlscript/Makefile38
-rwxr-xr-xxmlscript/Module_xmlscript.mk36
-rwxr-xr-xxmlscript/Package_dtd.mk (renamed from linguistic/inc/makefile.mk)27
-rwxr-xr-xxmlscript/Package_inc.mk (renamed from xmlscript/source/misc/makefile.mk)29
-rw-r--r--xmlscript/inc/xmlscript/xcrdllapi.h (renamed from connectivity/source/drivers/evoab/LCatalog.hxx)34
-rw-r--r--xmlscript/inc/xmlscript/xml_helper.hxx7
-rw-r--r--xmlscript/inc/xmlscript/xmldlg_imexp.hxx10
-rw-r--r--xmlscript/inc/xmlscript/xmllib_imexp.hxx14
-rw-r--r--xmlscript/inc/xmlscript/xmlmod_imexp.hxx8
-rw-r--r--xmlscript/prj/build.lst11
-rw-r--r--xmlscript/prj/d.lst14
-rwxr-xr-xxmlscript/prj/makefile.mk (renamed from xmlscript/inc/makefile.mk)27
-rw-r--r--xmlscript/source/inc/xml_import.hxx (renamed from xmlscript/inc/xmlscript/xml_import.hxx)1
-rwxr-xr-xxmlscript/source/xml_helper/makefile.mk50
-rw-r--r--xmlscript/source/xml_helper/xml_impctx.cxx2
-rwxr-xr-xxmlscript/source/xmldlg_imexp/makefile.mk52
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_import.cxx2
-rwxr-xr-xxmlscript/source/xmlflat_imexp/makefile.mk50
-rwxr-xr-xxmlscript/source/xmllib_imexp/makefile.mk50
-rw-r--r--xmlscript/source/xmllib_imexp/xmllib_import.cxx2
-rwxr-xr-xxmlscript/source/xmlmod_imexp/makefile.mk49
-rw-r--r--xmlscript/source/xmlmod_imexp/xmlmod_import.cxx2
-rwxr-xr-xxmlscript/util/makefile.mk85
-rwxr-xr-xxmlscript/util/xcr.flt13
109 files changed, 875 insertions, 6604 deletions
diff --git a/connectivity/source/drivers/evoab/LCatalog.cxx b/connectivity/source/drivers/evoab/LCatalog.cxx
deleted file mode 100644
index 25e06e2b90c0..000000000000
--- a/connectivity/source/drivers/evoab/LCatalog.cxx
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-
-
-#include "LCatalog.hxx"
-#include "LConnection.hxx"
-#include "LTables.hxx"
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/XResultSet.hpp>
-
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::sdbcx;
-using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::container;
-
-// -------------------------------------------------------------------------
-using namespace connectivity::evoab;
-// -------------------------------------------------------------------------
-OEvoabCatalog::OEvoabCatalog(OEvoabConnection* _pCon) : file::OFileCatalog(_pCon)
-{
-}
-// -------------------------------------------------------------------------
-void OEvoabCatalog::refreshTables()
-{
- TStringVector aVector;
- Sequence< ::rtl::OUString > aTypes;
- Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),aTypes);
-
- if(xResult.is())
- {
- Reference< XRow > xRow(xResult,UNO_QUERY);
- while(xResult->next())
- aVector.push_back(xRow->getString(3));
- }
- if(m_pTables)
- m_pTables->reFill(aVector);
- else
- m_pTables = new OEvoabTables(m_xMetaData,*this,m_aMutex,aVector);
-}
-// -----------------------------------------------------------------------------
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LColumnAlias.cxx b/connectivity/source/drivers/evoab/LColumnAlias.cxx
deleted file mode 100644
index 425276ae3dda..000000000000
--- a/connectivity/source/drivers/evoab/LColumnAlias.cxx
+++ /dev/null
@@ -1,235 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-#include "LColumnAlias.hxx"
-#include "LDriver.hxx"
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include "LConfigAccess.hxx"
-
-using namespace ::connectivity;
-using namespace ::connectivity::evoab;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::container;
-
-static const ::rtl::OUString sProgrammaticNames[] =
-{
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FirstName")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LastName")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NickName")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PrimaryEmail")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SecondEmail")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PreferMailFormat")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkPhone")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomePhone")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FaxNumber")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PagerNumber")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CellularNumber")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomeAddress")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomeAddress2")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomeCity")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomeState")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomeZipCode")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomeCountry")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkAddress")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkAddress2")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkCity")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkState")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkZipCode")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkCountry")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JobTitle")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Department")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Company")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WebPage1")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WebPage2")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BirthYear")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BirthMonth")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BirthDay")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Notes"))
-};
-//------------------------------------------------------------------------------
-OColumnAlias::OColumnAlias()
-{
- // Initialise m_aAlias with the default values from sProgrammaticNames.
- initialise();
-
- // Initialise m_aAlias map with the default values from sProgrammaticNames.
- setAliasMap();
-}
-//------------------------------------------------------------------
-OColumnAlias::~OColumnAlias()
-{
-}
-//------------------------------------------------------------------
-void OColumnAlias::initialise()
-{
- m_aAlias.reserve( END - FIRSTNAME + 1 );
- for (sal_Int32 i(FIRSTNAME); i < END; ++i)
- {
- m_aAlias.push_back(sProgrammaticNames[i]);
- m_aHeadLineNames.push_back(sProgrammaticNames[i]);
- }
-
- return;
-}
-//------------------------------------------------------------------
-void OColumnAlias::setAlias(const ::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XMultiServiceFactory >& _rxORB)
-{
- OSL_TRACE("OColumnAlias::setAlias()entered");
-
- // open our driver settings config node
-
- // the config path for our own driver's settings
- Reference< XPropertySet > xEvoDriverNode = createDriverConfigNode( _rxORB, OEvoabDriver::getImplementationName_Static() );
- //Reference< XPropertySet > xMozDriverNode = createDriverConfigNode( _rxORB, mozab::OConnection::getDriverImplementationName() );
- Reference< XPropertySet > xMozDriverNode = createDriverConfigNode( _rxORB, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.comp.sdbc.MozabDriver")) );
- if ( xEvoDriverNode.is() && xMozDriverNode.is() )
- {
- try
- {
- //=============================================================
- Reference< XNameAccess > xEvoAliasesNode;
- Reference< XNameAccess > xMozAliasesNode;
- xEvoDriverNode->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnAliases")) ) >>= xEvoAliasesNode;
- xMozDriverNode->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnAliases")) ) >>= xMozAliasesNode;
- OSL_ENSURE( xEvoAliasesNode.is(), "OColumnAlias::setAlias: missing the evolution aliases node!" );
- OSL_ENSURE( xMozAliasesNode.is(), "OColumnAlias::setAlias: missing the mozilla aliases node!" );
-
- // this is a set of string nodes
- Sequence< ::rtl::OUString > aColumnProgrammaticNames;
- //OSL_TRACE("OColumnAlias::setAlias()before xAliasesNode->getElementNames()");
- if ( xEvoAliasesNode.is() )
- aColumnProgrammaticNames = xEvoAliasesNode->getElementNames();
- //OSL_TRACE("OColumnAlias::setAlias()after xAliasesNode->getElementNames()");
-
- //=============================================================
- // travel through all the set elements
- const ::rtl::OUString* pProgrammaticNames = aColumnProgrammaticNames.getConstArray();
- const ::rtl::OUString* pProgrammaticNamesEnd = pProgrammaticNames + aColumnProgrammaticNames.getLength();
- ::rtl::OUString sAssignedAlias;
- ::rtl::OUString sHeadLineName;
-
- for ( ; pProgrammaticNames < pProgrammaticNamesEnd; ++pProgrammaticNames )
- {
- //OSL_TRACE("OColumnAlias::setAlias()::*pProgrammaticNames = %s\n", ((OUtoCStr(*pProgrammaticNames)) ? (OUtoCStr(*pProgrammaticNames)):("NULL")) );
- OSL_ENSURE( m_aAliasMap.end() != m_aAliasMap.find( *pProgrammaticNames ),
- "OColumnAlias::setAlias: found an invalid programmtic name!" );
- // if this asserts, somebody stored a programmatic name in the configuration
- // which is not allowed (i.e. not in the list of known programmatics).
- //OSL_TRACE("OColumnAlias::setAlias()before xAliasesNode->getByName()");
-
-#if OSL_DEBUG_LEVEL > 0
- sal_Bool bExtractionSuccess =
-#endif
- xMozAliasesNode->getByName( *pProgrammaticNames) >>= sAssignedAlias;
- OSL_ENSURE( bExtractionSuccess, "OColumnAlias::setAlias: invalid mozilla config data!" );
-#if OSL_DEBUG_LEVEL > 0
- bExtractionSuccess =
-#endif
- xEvoAliasesNode->getByName( *pProgrammaticNames) >>= sHeadLineName;
- OSL_ENSURE( bExtractionSuccess, "OColumnAlias::setAlias: invalid evolution config data!" );
- //OSL_TRACE("OColumnAlias::setAlias()after xAliasesNode->getByName()");
-
- // normalize in case the config data is corrupted
- // (what we really don't need is an empty alias ...)
- if ( 0 == sAssignedAlias.getLength() )
- sAssignedAlias = *pProgrammaticNames;
- if ( 0 == sHeadLineName.getLength() )
- sHeadLineName = *pProgrammaticNames;
- //OSL_TRACE("OColumnAlias::setAlias()::sAssignedAlias = %s\n", ((OUtoCStr(sAssignedAlias)) ? (OUtoCStr(sAssignedAlias)):("NULL")) );
- //OSL_TRACE("OColumnAlias::setAlias()::sHeadLineName = %s\n", ((OUtoCStr(sHeadLineName)) ? (OUtoCStr(sHeadLineName)):("NULL")) );
-
- //=============================================================
- // check the value
- // look up the programmatic indicated by pProgrammaticNames in the known programmatics
- const ::rtl::OUString* pProgrammatic = sProgrammaticNames + FIRSTNAME;
- const ::rtl::OUString* pProgrammaticEnd = sProgrammaticNames + END;
-
- OSL_ENSURE( (sal_Int32)m_aAlias.size() == pProgrammaticEnd - pProgrammatic,
- "OColumnAlias::setAlias: aliases vector not yet initialized!" );
-
- // the destination where we want to remember the alias
- ::std::vector< ::rtl::OUString >::iterator aAlias = m_aAlias.begin();
- ::std::vector< ::rtl::OUString >::iterator aHeadLineName = m_aHeadLineNames.begin();
-
- for ( ; pProgrammatic < pProgrammaticEnd; ++pProgrammatic, ++aAlias, ++aHeadLineName )
- {
- //OSL_TRACE("OColumnAlias::setAlias()::*pProgrammatic = %s\n", ((OUtoCStr(*pProgrammatic)) ? (OUtoCStr(*pProgrammatic)):("NULL")) );
- if ( pProgrammaticNames->equals( *pProgrammatic ) )
- {
- // add alias to the vector
- *aAlias = sAssignedAlias;
- *aHeadLineName = sHeadLineName;
- break;
- }
- }
- }
- }
- catch( const Exception& )
- {
- OSL_FAIL( "OColumnAlias::setAlias: could not read my driver's configuration data!" );
- }
- }
-
- // Initialise m_aAliasMap.
- setAliasMap();
-
- return;
-}
-//------------------------------------------------------------------
-const ::std::vector< ::rtl::OUString> & OColumnAlias::getAlias() const
-{
- return m_aAlias;
-}
-//------------------------------------------------------------------
-const ::std::map< ::rtl::OUString, ::rtl::OUString> & OColumnAlias::getAliasMap() const
-{
- return m_aAliasMap;
-}
-//------------------------------------------------------------------
-void OColumnAlias::setAliasMap()
-{
- // Fill the map with the values of m_aAlias
- // and the sProgrammaticNames array.
- for (sal_Int32 i(FIRSTNAME); i < END; ++i) {
- m_aAliasMap[m_aAlias[i]] = m_aHeadLineNames[i];
- //OSL_TRACE("OColumnAlias::setAliasMap()::m_aAlias[i] = %s\n", ((OUtoCStr(m_aAlias[i])) ? (OUtoCStr(m_aAlias[i])):("NULL")) );
- //OSL_TRACE("OColumnAlias::setAliasMap()::m_aAliasMap[m_aAlias[i]] = %s\n", ((OUtoCStr(m_aAliasMap[m_aAlias[i]])) ? (OUtoCStr(m_aAliasMap[m_aAlias[i]])):("NULL")) );
- }
-
- return;
-}
-//------------------------------------------------------------------
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LColumnAlias.hxx b/connectivity/source/drivers/evoab/LColumnAlias.hxx
deleted file mode 100644
index 419d158fa105..000000000000
--- a/connectivity/source/drivers/evoab/LColumnAlias.hxx
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _CONNECTIVITY_EVOAB_LCOLUMNALIAS_HXX_
-#define _CONNECTIVITY_EVOAB_LCOLUMNALIAS_HXX_
-
-#include <unotools/confignode.hxx>
-
-#include <osl/mutex.hxx>
-#include <vector>
-#include <map>
-
-namespace connectivity
-{
- namespace evoab
- {
- typedef enum {
- FIRSTNAME = 0,
- LASTNAME,
- DISPLAYNAME,
- NICKNAME,
- PRIMARYEMAIL,
- SECONDEMAIL,
- PREFERMAILFORMAT,
- WORKPHONE,
- HOMEPHONE,
- FAXNUMBER,
- PAGERNUMBER,
- CELLULARNUMBER,
- HOMEADDRESS,
- HOMEADDRESS2,
- HOMECITY,
- HOMESTATE,
- HOMEZIPCODE,
- HOMECOUNTRY,
- WORKADDRESS,
- WORKADDRESS2,
- WORKCITY,
- WORKSTATE,
- WORKZIPCODE,
- WORKCOUNTRY,
- JOBTITLE,
- DEPARTMENT,
- COMPANY,
- WEBPAGE1,
- WEBPAGE2,
- BIRTHYEAR,
- BIRTHMONTH,
- BIRTHDAY,
- NOTES,
- END
- } ProgrammaticName;
-
- class OColumnAlias
- {
- /**
- * m_Alias holds aliases for the evolution addressbook
- * column names. This member gets initialised during
- * creation of the connection to the driver.
- * m_aAlias initialises m_aAliasMap which then can be
- * used to find the corresponding programmatic name
- * when an alias is used as a query attribute. Mozilla
- * expects programmatic names from its clients.
- *
- * m_aAlias: vector of aliases used to initialise m_aAliasMap.
- * m_AliasMap: map of {alias, programmaticname} pairs.
- *
- */
- private:
- ::std::vector< ::rtl::OUString> m_aAlias;
- ::std::vector< ::rtl::OUString> m_aHeadLineNames;
- ::std::map< ::rtl::OUString, ::rtl::OUString> m_aAliasMap;
- protected:
- ::osl::Mutex m_aMutex;
- public:
- void initialise(void);
- const ::std::vector< ::rtl::OUString> & getAlias(void) const;
- const ::std::map< ::rtl::OUString, ::rtl::OUString> & getAliasMap(void) const;
- void setAlias(const ::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XMultiServiceFactory > &);
- private:
- void setAliasMap(void);
- public:
- OColumnAlias(void);
- ~OColumnAlias(void);
- };
- }
-}
-#endif // _CONNECTIVITY_EVOAB_LCOLUMNALIAS_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LColumns.cxx b/connectivity/source/drivers/evoab/LColumns.cxx
deleted file mode 100644
index 5d69f28290b9..000000000000
--- a/connectivity/source/drivers/evoab/LColumns.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-
-#include "LColumns.hxx"
-#include "LTable.hxx"
-#include "connectivity/sdbcx/VColumn.hxx"
-
-using namespace connectivity::evoab;
-using namespace connectivity;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::sdbcx;
-using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::container;
-
-
-sdbcx::ObjectType OEvoabColumns::createObject(const ::rtl::OUString& _rName)
-{
-
- OEvoabTable* pTable = (OEvoabTable*)m_pTable;
- ::rtl::Reference<OSQLColumns> aCols = pTable->getTableColumns();
- OSQLColumns::Vector::const_iterator aIter = find(aCols->get().begin(),aCols->get().end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
- sdbcx::ObjectType xRet;
- if(aIter != aCols->get().end())
- xRet = sdbcx::ObjectType(*aIter,UNO_QUERY);
- return xRet;
-}
-// -------------------------------------------------------------------------
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LColumns.hxx b/connectivity/source/drivers/evoab/LColumns.hxx
deleted file mode 100644
index 5be028cdfe2e..000000000000
--- a/connectivity/source/drivers/evoab/LColumns.hxx
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _CONNECTIVITY_EVOAB_LCOLUMNS_HXX_
-#define _CONNECTIVITY_EVOAB_LCOLUMNS_HXX_
-
-#include "file/FColumns.hxx"
-
-namespace connectivity
-{
- namespace evoab
- {
- class OEvoabColumns : public file::OColumns
- {
- protected:
- virtual sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
- public:
- OEvoabColumns(file::OFileTable* _pTable,
- ::osl::Mutex& _rMutex,
- const TStringVector &_rVector
- ) : file::OColumns(_pTable,_rMutex,_rVector)
- {}
-
- };
- }
-}
-#endif // _CONNECTIVITY_EVOAB_LCOLUMNS_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LConfigAccess.cxx b/connectivity/source/drivers/evoab/LConfigAccess.cxx
deleted file mode 100644
index 6f7e05cb6b04..000000000000
--- a/connectivity/source/drivers/evoab/LConfigAccess.cxx
+++ /dev/null
@@ -1,162 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-#include "LConfigAccess.hxx"
-#include "LDriver.hxx"
-#include "LDebug.hxx"
-
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::beans;
-
-//.........................................................................
-namespace connectivity
-{
- namespace evoab
- {
- //-----------------------------------------------------------------
- Reference< XPropertySet > createDriverConfigNode( Reference< XMultiServiceFactory > _rxORB, ::rtl::OUString _sDriverImplementationName )
- {
- OSL_TRACE("createDriverConfigNode()entered");
-
- Reference< XPropertySet > xNode;
- try
- {
- //=============================================================
- // create the config provider
- Reference< XMultiServiceFactory > xConfigProvider(
- _rxORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider")) ),
- UNO_QUERY
- );
- OSL_ENSURE( xConfigProvider.is(), "createDriverConfigNode: could not create the config provider!" );
-
- if ( xConfigProvider.is() )
- {
- ::rtl::OUString sCompleteNodePath(RTL_CONSTASCII_USTRINGPARAM ("/org.openoffice.Office.DataAccess/DriverSettings/" ));
- sCompleteNodePath += _sDriverImplementationName;
- //sCompleteNodePath += OEvoabConnection::getDriverImplementationName();
- //sCompleteNodePath += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.comp.sdbc.MozabDriver"));
- EVO_TRACE_STRING("createDriverConfigNode()::sCompleteNodePath = %s\n", sCompleteNodePath );
-
- //=========================================================
- // arguments for creating the config access
- Sequence< Any > aArguments(2);
- // the path to the node to open
- aArguments[0] <<= PropertyValue(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")),
- 0,
- makeAny( sCompleteNodePath ),
- PropertyState_DIRECT_VALUE
- );
- // the depth: -1 means unlimited
- aArguments[1] <<= PropertyValue(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("depth")),
- 0,
- makeAny( (sal_Int32)-1 ),
- PropertyState_DIRECT_VALUE
- );
-
- //=========================================================
- // create the access
- Reference< XInterface > xAccess = xConfigProvider->createInstanceWithArguments(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")),
- aArguments
- );
- OSL_ENSURE( xAccess.is(), "createDriverConfigNode: invalid access returned (should throw an exception instead)!" );
-
- xNode = xNode.query( xAccess );
- }
- }
- catch( const Exception& )
- {
- OSL_FAIL( "createDriverConfigNode: caught an exception while accessing the driver's config node!" );
- }
-
- // outta here
- return xNode;
- }
-
- //-----------------------------------------------------------------
- namespace
- {
- // a private helper to accessing the point where we store the reference
- // to the factory
- Reference< XMultiServiceFactory >& accessFactoryStorage( )
- {
- static Reference< XMultiServiceFactory > xEvoabServiceFactory;
- return xEvoabServiceFactory;
- }
- }
-
- //-----------------------------------------------------------------
- void setEvoabServiceFactory( const Reference< XMultiServiceFactory >& _rxFactory )
- {
- accessFactoryStorage( ) = _rxFactory;
- }
-
- //-----------------------------------------------------------------
- const Reference< XMultiServiceFactory >& getEvoabServiceFactory( )
- {
- return accessFactoryStorage( );
- }
-
- //-----------------------------------------------------------------
- ::rtl::OUString getFullPathExportingCommand( Reference< XMultiServiceFactory > _rxORB )
- {
- ::rtl::OUString sFullPathExportingCommand;
-
- //Reference< XMultiServiceFactory > xFactory = getEvoabServiceFactory();
- //OSL_ENSURE( xFactory.is(), "getPreferredProfileName: invalid service factory!" );
- OSL_ENSURE( _rxORB.is(), "getFullPathExportingCommand: invalid service factory!" );
- if ( _rxORB.is() )
- {
- try
- {
- Reference< XPropertySet > xDriverNode = createDriverConfigNode( _rxORB, OEvoabDriver::getImplementationName_Static() );
- Reference< XPropertySet > xEvoPrefsNode;
- if ( xDriverNode.is() )
- xDriverNode->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EvolutionPreferences")) ) >>= xEvoPrefsNode;
- OSL_ENSURE( xEvoPrefsNode.is(), "getFullPathExportingCommand: could not access the node for the evolution preferences!" );
- if ( xEvoPrefsNode.is() )
- xEvoPrefsNode->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FullPathExportingCommand")) ) >>= sFullPathExportingCommand;
- }
- catch( const Exception& )
- {
- OSL_FAIL( "getFullPathExportingCommand: caught an exception!" );
- }
- }
- return sFullPathExportingCommand;
- }
- }
-}
-
-//.........................................................................
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LConnection.cxx b/connectivity/source/drivers/evoab/LConnection.cxx
deleted file mode 100644
index 725f24ff2236..000000000000
--- a/connectivity/source/drivers/evoab/LConnection.cxx
+++ /dev/null
@@ -1,281 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-#include "LConnection.hxx"
-#include "LDatabaseMetaData.hxx"
-#include "LCatalog.hxx"
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <tools/urlobj.hxx>
-#include "LPreparedStatement.hxx"
-#include "LStatement.hxx"
-#include <comphelper/extract.hxx>
-#include <connectivity/dbcharset.hxx>
-#include <connectivity/dbexception.hxx>
-#include <comphelper/processfactory.hxx>
-#include <osl/process.h>
-#include <tools/debug.hxx>
-#include "LDebug.hxx"
-#include "diagnose_ex.h"
-#include <comphelper/sequence.hxx>
-#include <connectivity/dbexception.hxx>
-#include "resource/common_res.hrc"
-
-using namespace connectivity::evoab;
-using namespace connectivity::file;
-
-typedef connectivity::file::OConnection OConnection_B;
-
-//------------------------------------------------------------------------------
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::sdbcx;
-using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::lang;
-
-::rtl::OUString implGetExceptionMsg( Exception& e, const ::rtl::OUString& aExceptionType_ )
-{
- ::rtl::OUString aExceptionType = aExceptionType_;
- if( aExceptionType.getLength() == 0 )
- aExceptionType = ::rtl::OUString( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown")) );
-
- ::rtl::OUString aTypeLine( RTL_CONSTASCII_USTRINGPARAM("\nType: ") );
- aTypeLine += aExceptionType;
-
- ::rtl::OUString aMessageLine( RTL_CONSTASCII_USTRINGPARAM("\nMessage: ") );
- aMessageLine += ::rtl::OUString( e.Message );
-
- ::rtl::OUString aMsg(aTypeLine);
- aMsg += aMessageLine;
- return aMsg;
-}
-
- // Exception type unknown
-::rtl::OUString implGetExceptionMsg( Exception& e )
-{
- ::rtl::OUString aMsg = implGetExceptionMsg( e, ::rtl::OUString() );
- return aMsg;
-}
-
-// --------------------------------------------------------------------------------
-OEvoabConnection::OEvoabConnection(OEvoabDriver* _pDriver) : OConnection(_pDriver)
- ,m_bHeaderLine(sal_True)
- ,m_cFieldDelimiter(',')
- ,m_cStringDelimiter('"')
- ,m_cDecimalDelimiter('.')
- ,m_cThousandDelimiter(' ')
-{
- // Initialise m_aColumnAlias.
- m_aColumnAlias.setAlias(_pDriver->getFactory());
-}
-//-----------------------------------------------------------------------------
-OEvoabConnection::~OEvoabConnection()
-{
-}
-
-// XServiceInfo
-// --------------------------------------------------------------------------------
-IMPLEMENT_SERVICE_INFO(OEvoabConnection, "com.sun.star.sdbc.drivers.evoab.Connection", "com.sun.star.sdbc.Connection")
-
-//-----------------------------------------------------------------------------
-void OEvoabConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyValue >& info) throw(SQLException)
-{
- osl_incrementInterlockedCount( &m_refCount );
- EVO_TRACE_STRING("OEvoabConnection::construct()::url = %s\n", url );
-
-
- ::rtl::OUString aCLICommand = getDriver()->getEvoab_CLI_EffectiveCommand();
- ::rtl::OUString aWorkingDirPath = getDriver()->getWorkingDirPath();
- ::rtl::OUString aArg1 = ::rtl::OUString::createFromAscii(OEvoabDriver::getEVOAB_CLI_ARG_LIST_FOLDERS());
- ::rtl::OUString aArg2 = ::rtl::OUString::createFromAscii(OEvoabDriver::getEVOAB_CLI_ARG_OUTPUT_FILE_PREFIX());
- aArg2 += aWorkingDirPath;
- aArg2 += getDriver()->getEvoFolderListFileName();
-
- const sal_uInt32 nArgsCount = 2;
- rtl_uString* pPargs[nArgsCount] = { aArg1.pData, aArgs2.pData };
-
- EVO_TRACE_STRING("OEvoabConnection::construct()::aCLICommand = %s\n", aCLICommand );
- EVO_TRACE_STRING("OEvoabConnection::construct()::aWorkingDirPath = %s\n", aWorkingDirPath );
- EVO_TRACE_STRING("OEvoabConnection::construct()::aArg1 = %s\n", aArg1 );
- EVO_TRACE_STRING("OEvoabConnection::construct()::aArg2 = %s\n", aArg2 );
-
- oslProcess aProcess;
- if ( osl_Process_E_None != osl_executeProcess(
- aCLICommand.pData,
- pArgs,
- nArgsCount,
- osl_Process_HIDDEN | osl_Process_WAIT | osl_Process_SEARCHPATH,
- NULL,
- aWorkingDirPath.pData,
- NULL, 0,
- &aProcess ) )
- {
- OSL_TRACE("Error at execute evolution-addressbook-export to get VCards");
- ::dbtools::throwGenericSQLException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Error at execute evolution-addressbook-export to get VCards")),NULL);
- }
-
- Sequence<PropertyValue> aDriverParam;
- ::std::vector<PropertyValue> aParam;
-
- aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EnableSQL92Check")), 0, Any(), PropertyState_DIRECT_VALUE));
- ::dbtools::OCharsetMap aLookupIanaName;
- ::dbtools::OCharsetMap::const_iterator aLookup = aLookupIanaName.find(RTL_TEXTENCODING_UTF8);
- aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharSet")), 0,
- makeAny((*aLookup).getIanaName()), PropertyState_DIRECT_VALUE));
- aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Extension")), 0, makeAny(getDriver()->getFileExt()), PropertyState_DIRECT_VALUE));
- aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HeaderLine")), 0, makeAny(m_bHeaderLine), PropertyState_DIRECT_VALUE));
- aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FieldDelimiter")), 0, makeAny(::rtl::OUString(&m_cFieldDelimiter,1)), PropertyState_DIRECT_VALUE));
- aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StringDelimiter")), 0, makeAny(::rtl::OUString(&m_cStringDelimiter,1)), PropertyState_DIRECT_VALUE));
- aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DecimalDelimiter")), 0, makeAny(::rtl::OUString(&m_cDecimalDelimiter,1)), PropertyState_DIRECT_VALUE));
- aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ThousandDelimiter")), 0, makeAny(::rtl::OUString(&m_cThousandDelimiter,1)), PropertyState_DIRECT_VALUE));
-
- // build a new parameter sequence from the original parameters, appended by the new parameters from above
- PropertyValue *pParams = aParam.empty() ? 0 : &aParam[0];
- aDriverParam = ::comphelper::concatSequences(
- info,
- Sequence< PropertyValue >( pParams, aParam.size() )
- );
-
- // transform "sdbc:address:evolution" part of URL to "sdbc:flat:file:///..."
- //
- sal_Int32 nLen = url.indexOf(':');
- nLen = url.indexOf(':',nLen+1);
- ::rtl::OUString aAddrbookURI(url.copy(nLen+1));
- // Get Scheme
- nLen = aAddrbookURI.indexOf(':');
- ::rtl::OUString aAddrbookScheme;
- if ( nLen == -1 )
- {
- // There isn't any subschema: - but could be just subschema
- if ( aAddrbookURI.getLength() > 0 )
- {
- aAddrbookScheme= aAddrbookURI;
- }
- else
- {
- OSL_TRACE( "No subschema given!!!\n");
- throwGenericSQLException(STR_URI_SYNTAX_ERROR ,*this);
- }
- }
- else
- {
- aAddrbookScheme = aAddrbookURI.copy(0, nLen);
- }
-
- EVO_TRACE_STRING("OEvoabConnection::construct()::URI = %s\n", aAddrbookURI );
- EVO_TRACE_STRING("OEvoabConnection::construct()::Scheme = %s\n", aAddrbookScheme );
-
- //
- // Now we have a URI convert it to a Evolution CLI flat file URI
- //
- // The Mapping being used is:
- //
- // * for Evolution
- // "sdbc:address:evolution:" -> "sdbc:flat:file:///(file path generated)
-
- rtl::OUString aEvoFlatURI;
- if ( aAddrbookScheme.compareToAscii( OEvoabDriver::getSDBC_SCHEME_EVOLUTION() ) == 0 )
- {
- aEvoFlatURI = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "sdbc:flat:" ));
- }
-
-
- aEvoFlatURI += getDriver()->getWorkingDirURL();
- EVO_TRACE_STRING("OEvoabConnection::construct()::m_aEvoFlatURI = %s\n", aEvoFlatURI );
- //setURL(aEvoFlatURI);
- m_aEvoFlatURI = aEvoFlatURI;
-
- osl_decrementInterlockedCount( &m_refCount );
- OConnection::construct(aEvoFlatURI,aDriverParam);
-}
-// --------------------------------------------------------------------------------
-Reference< XDatabaseMetaData > SAL_CALL OEvoabConnection::getMetaData( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_B::rBHelper.bDisposed);
-
-
- Reference< XDatabaseMetaData > xMetaData = m_xMetaData;
- if(!xMetaData.is())
- {
- xMetaData = new OEvoabDatabaseMetaData(this);
- m_xMetaData = xMetaData;
- }
-
- return xMetaData;
-}
-//------------------------------------------------------------------------------
-::com::sun::star::uno::Reference< XTablesSupplier > OEvoabConnection::createCatalog()
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- Reference< XTablesSupplier > xTab = m_xCatalog;
- if(!xTab.is())
- {
- OEvoabCatalog *pCat = new OEvoabCatalog(this);
- xTab = pCat;
- m_xCatalog = xTab;
- }
- return xTab;
-}
-// --------------------------------------------------------------------------------
-Reference< XStatement > SAL_CALL OEvoabConnection::createStatement( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_B::rBHelper.bDisposed);
-
- OEvoabStatement* pStmt = new OEvoabStatement(this);
-
- Reference< XStatement > xStmt = pStmt;
- m_aStatements.push_back(WeakReferenceHelper(*pStmt));
- return xStmt;
-}
-// --------------------------------------------------------------------------------
-Reference< XPreparedStatement > SAL_CALL OEvoabConnection::prepareStatement( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_B::rBHelper.bDisposed);
-
-
- OEvoabPreparedStatement* pStmt = new OEvoabPreparedStatement(this);
- Reference< XPreparedStatement > xStmt = pStmt;
- pStmt->construct(sql);
-
- m_aStatements.push_back(WeakReferenceHelper(*pStmt));
- return xStmt;
-}
-// --------------------------------------------------------------------------------
-Reference< XPreparedStatement > SAL_CALL OEvoabConnection::prepareCall( const ::rtl::OUString& /*sql*/ ) throw(SQLException, RuntimeException)
-{
- ::dbtools::throwFeatureNotImplementedException( "XConnection::prepareCall", *this );
- return NULL;
-}
-// -------------------------------------------------------------------------
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LConnection.hxx b/connectivity/source/drivers/evoab/LConnection.hxx
deleted file mode 100644
index 9d7df3e3d713..000000000000
--- a/connectivity/source/drivers/evoab/LConnection.hxx
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _CONNECTIVITY_EVOAB_LCONNECTION_HXX_
-#define _CONNECTIVITY_EVOAB_LCONNECTION_HXX_
-
-#include "LDriver.hxx"
-#include "file/FConnection.hxx"
-#include "LColumnAlias.hxx"
-
-namespace connectivity
-{
- namespace evoab
- {
- class OEvoabConnection : public file::OConnection
- {
- private:
- OColumnAlias m_aColumnAlias;
- sal_Bool m_bHeaderLine; // column names in first row
- sal_Unicode m_cFieldDelimiter; // look at the name
- sal_Unicode m_cStringDelimiter; // delimiter for strings m_cStringDelimiter blabla m_cStringDelimiter
- sal_Unicode m_cDecimalDelimiter; // Dezimal-delimiter (Dezimalpoint)
- sal_Unicode m_cThousandDelimiter; //
- rtl::OUString m_aEvoFlatURI;
-
- public:
- OEvoabConnection(OEvoabDriver* _pDriver);
- virtual ~OEvoabConnection();
-
- virtual void construct(const ::rtl::OUString& _rUrl,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rInfo ) throw( ::com::sun::star::sdbc::SQLException);
-
- // own methods
- inline const OEvoabDriver* getDriver() const { return static_cast< const OEvoabDriver* >( m_pDriver ); }
- inline sal_Bool isHeaderLine() const { return m_bHeaderLine; }
- inline sal_Unicode getFieldDelimiter() const { return m_cFieldDelimiter; }
- inline sal_Unicode getStringDelimiter() const { return m_cStringDelimiter; }
- inline sal_Unicode getDecimalDelimiter() const { return m_cDecimalDelimiter; }
- inline sal_Unicode getThousandDelimiter() const { return m_cThousandDelimiter;}
- const OColumnAlias& getColumnAlias() const { return m_aColumnAlias; }
-
- // XServiceInfo
- DECLARE_SERVICE_INFO();
-
- // XConnection
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > SAL_CALL getMetaData( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > createCatalog();
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement > SAL_CALL createStatement( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareStatement( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareCall( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
-
- };
- }
-}
-#endif // _CONNECTIVITY_EVOAB_LCONNECTION_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx b/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx
deleted file mode 100644
index 77821cb6137b..000000000000
--- a/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx
+++ /dev/null
@@ -1,398 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-#include "LDatabaseMetaData.hxx"
-#include "LConnection.hxx"
-#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ResultSetType.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/beans/XFastPropertySet.hpp>
-#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
-#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#include <com/sun/star/sdbcx/XIndexesSupplier.hpp>
-#include <com/sun/star/ucb/XContentAccess.hpp>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <tools/urlobj.hxx>
-#include "FDatabaseMetaDataResultSet.hxx"
-#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <comphelper/extract.hxx>
-#include <comphelper/types.hxx>
-#include "LFolderList.hxx"
-#include "connectivity/CommonTools.hxx"
-#include <osl/process.h>
-#include <tools/debug.hxx>
-#include <map>
-#include <vector>
-
-#include "LDebug.hxx"
-#include "diagnose_ex.h"
-
-using namespace ::comphelper;
-using namespace connectivity;
-using namespace connectivity::evoab;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::sdbcx;
-using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::ucb;
-using namespace osl;
-
-namespace connectivity
-{
- namespace evoab
- {
- static sal_Int32 const s_nCOLUMN_SIZE = 256;
- static sal_Int32 const s_nDECIMAL_DIGITS = 0;
- static sal_Int32 const s_nNULLABLE = 1;
- static sal_Int32 const s_nCHAR_OCTET_LENGTH = 65535;
- }
-}
-
-OEvoabDatabaseMetaData::OEvoabDatabaseMetaData(::connectivity::file::OConnection* _pCon) :ODatabaseMetaData(_pCon)
-{
-}
-// -------------------------------------------------------------------------
-OEvoabDatabaseMetaData::~OEvoabDatabaseMetaData()
-{
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw( )
-{
- ::osl::MutexGuard aGuard( m_aMutex );
-
- ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTypeInfo);
- Reference< XResultSet > xRef = pResult;
- static ODatabaseMetaDataResultSet::ORows aRows;
- if(aRows.empty())
- {
- ODatabaseMetaDataResultSet::ORow aRow;
-
- aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
- aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CHAR"))));
- aRow.push_back(new ORowSetValueDecorator(DataType::CHAR));
- aRow.push_back(new ORowSetValueDecorator((sal_Int32)254));
- aRow.push_back(ODatabaseMetaDataResultSet::getQuoteValue());
- aRow.push_back(ODatabaseMetaDataResultSet::getQuoteValue());
- aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
- aRow.push_back(new ORowSetValueDecorator((sal_Int32)ColumnValue::NULLABLE));
- aRow.push_back(ODatabaseMetaDataResultSet::get1Value());
- aRow.push_back(new ORowSetValueDecorator((sal_Int32)ColumnSearch::CHAR));
- aRow.push_back(ODatabaseMetaDataResultSet::get1Value());
- aRow.push_back(ODatabaseMetaDataResultSet::get0Value());
- aRow.push_back(ODatabaseMetaDataResultSet::get0Value());
- aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
- aRow.push_back(ODatabaseMetaDataResultSet::get0Value());
- aRow.push_back(ODatabaseMetaDataResultSet::get0Value());
- aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
- aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
- aRow.push_back(new ORowSetValueDecorator((sal_Int32)10));
-
- aRows.push_back(aRow);
-
- aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")));
- aRow[2] = new ORowSetValueDecorator(DataType::VARCHAR);
- aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue();
- aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue();
- aRows.push_back(aRow);
-
-
- aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LONGVARCHAR")));
- aRow[2] = new ORowSetValueDecorator(DataType::LONGVARCHAR);
- aRow[3] = new ORowSetValueDecorator((sal_Int32)65535);
- aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue();
- aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue();
- aRows.push_back(aRow);
-
- aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE")));
- aRow[2] = new ORowSetValueDecorator(DataType::DATE);
- aRow[3] = new ORowSetValueDecorator((sal_Int32)10);
- aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue();
- aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue();
- aRows.push_back(aRow);
-
- aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME")));
- aRow[2] = new ORowSetValueDecorator(DataType::TIME);
- aRow[3] = new ORowSetValueDecorator((sal_Int32)8);
- aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue();
- aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue();
- aRows.push_back(aRow);
-
- aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP")));
- aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP);
- aRow[3] = new ORowSetValueDecorator((sal_Int32)19);
- aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue();
- aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue();
- aRows.push_back(aRow);
-
- aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BOOL")));
- aRow[2] = new ORowSetValueDecorator(DataType::BIT);
- aRow[3] = ODatabaseMetaDataResultSet::get1Value();
- aRow[9] = ODatabaseMetaDataResultSet::getBasicValue();
- aRows.push_back(aRow);
-
- aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DECIMAL")));
- aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL);
- aRow[3] = new ORowSetValueDecorator((sal_Int32)20);
- aRow[15] = new ORowSetValueDecorator((sal_Int32)15);
- aRows.push_back(aRow);
-
- aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOUBLE")));
- aRow[2] = new ORowSetValueDecorator(DataType::DOUBLE);
- aRow[3] = new ORowSetValueDecorator((sal_Int32)20);
- aRow[15] = ODatabaseMetaDataResultSet::get0Value();
- aRows.push_back(aRow);
-
- aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMERIC")));
- aRow[2] = new ORowSetValueDecorator(DataType::NUMERIC);
- aRow[3] = new ORowSetValueDecorator((sal_Int32)20);
- aRow[15] = new ORowSetValueDecorator((sal_Int32)20);
- aRows.push_back(aRow);
- }
-
- pResult->setRows(aRows);
- return xRef;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getColumns(
- const Any& /*catalog*/, const ::rtl::OUString& /*schemaPattern*/, const ::rtl::OUString& tableNamePattern,
- const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException)
-{
- OSL_TRACE("OEvoabDatabaseMetaData::getColumns()::Entered\n");
- EVO_TRACE_STRING("OEvoabDatabaseMetaData::getColumns()::schemaPattern = %s\n", schemaPattern );
- EVO_TRACE_STRING("OEvoabDatabaseMetaData::getColumns()::tableNamePattern = %s\n", tableNamePattern );
- EVO_TRACE_STRING("OEvoabDatabaseMetaData::getColumns()::columnNamePattern = %s\n", columnNamePattern );
-
- ::osl::MutexGuard aGuard( m_aMutex );
-
- Reference< XTablesSupplier > xTables = m_pConnection->createCatalog();
- if(!xTables.is())
- throw SQLException();
-
- Reference< XNameAccess> xNames = xTables->getTables();
- if(!xNames.is())
- throw SQLException();
-
- ODatabaseMetaDataResultSet::ORows aRows;
- ODatabaseMetaDataResultSet::ORow aRow(19);
- aRow[10] = new ORowSetValueDecorator((sal_Int32)10);
- Sequence< ::rtl::OUString> aTabNames(xNames->getElementNames());
- const ::rtl::OUString* pTabBegin = aTabNames.getConstArray();
- const ::rtl::OUString* pTabEnd = pTabBegin + aTabNames.getLength();
- for(;pTabBegin != pTabEnd;++pTabBegin)
- {
- if(match(tableNamePattern,*pTabBegin,'\0'))
- {
- Reference< XColumnsSupplier> xTable;
- ::cppu::extractInterface(xTable,xNames->getByName(*pTabBegin));
- aRow[3] = new ORowSetValueDecorator(*pTabBegin);
-
- Reference< XNameAccess> xColumns = xTable->getColumns();
- if(!xColumns.is())
- throw SQLException();
-
- Sequence< ::rtl::OUString> aColNames(xColumns->getElementNames());
-
- const ::rtl::OUString* pBegin = aColNames.getConstArray();
- const ::rtl::OUString* pEnd = pBegin + aColNames.getLength();
- Reference< XPropertySet> xColumn;
- for(sal_Int32 i=1;pBegin != pEnd;++pBegin,++i)
- {
- if(match(columnNamePattern,*pBegin,'\0'))
- {
- aRow[4] = new ORowSetValueDecorator(*pBegin);
-
- ::cppu::extractInterface(xColumn,xColumns->getByName(*pBegin));
- OSL_ENSURE(xColumn.is(),"Columns contains a column who isn't a fastpropertyset!");
- aRow[5] = new ORowSetValueDecorator(getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))));
- aRow[6] = new ORowSetValueDecorator(getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME))));
- aRow[7] = new ORowSetValueDecorator(getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))));
- aRow[9] = new ORowSetValueDecorator(getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE))));
- aRow[11] = new ORowSetValueDecorator(getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE))));
- aRow[13] = new ORowSetValueDecorator(getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE))));
-
- switch((sal_Int32)aRow[5]->getValue())
- {
- case DataType::CHAR:
- case DataType::VARCHAR:
- aRow[16] = new ORowSetValueDecorator((sal_Int32)254);
- break;
- case DataType::LONGVARCHAR:
- aRow[16] = new ORowSetValueDecorator((sal_Int32)65535);
- break;
- default:
- aRow[16] = new ORowSetValueDecorator((sal_Int32)0);
- }
- aRow[17] = new ORowSetValueDecorator(i);
- switch(sal_Int32(aRow[11]->getValue()))
- {
- case ColumnValue::NO_NULLS:
- aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NO")));
- break;
- case ColumnValue::NULLABLE:
- aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("YES")));
- break;
- default:
- aRow[18] = new ORowSetValueDecorator(::rtl::OUString());
- }
- aRows.push_back(aRow);
- }
- }
- }
- }
-
- ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumns);
- Reference< XResultSet > xRef = pResult;
- pResult->setRows(aRows);
-
- return xRef;
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL OEvoabDatabaseMetaData::getURL( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:flat:")) + m_pConnection->getURL();
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
- const Any& /*catalog*/, const ::rtl::OUString& /*schemaPattern*/,
- const ::rtl::OUString& /*tableNamePattern*/, const Sequence< ::rtl::OUString >& types ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
-
-
- ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eTables);
- Reference< XResultSet > xRef = pResult;
-
- // check if any type is given
- // when no types are given then we have to return all tables e.g. TABLE
-
- static const ::rtl::OUString aTable(RTL_CONSTASCII_USTRINGPARAM("TABLE"));
-
- sal_Bool bTableFound = sal_True;
- sal_Int32 nLength = types.getLength();
- if(nLength)
- {
- bTableFound = sal_False;
-
- const ::rtl::OUString* pBegin = types.getConstArray();
- const ::rtl::OUString* pEnd = pBegin + nLength;
- for(;pBegin != pEnd;++pBegin)
- {
- if(*pBegin == aTable)
- {
- bTableFound = sal_True;
- break;
- }
- }
- }
- if(!bTableFound)
- return xRef;
-
- OEvoabConnection* pOEvoabConnection = (OEvoabConnection*)m_pConnection;
- OEvoabFolderList* pFolderList = new OEvoabFolderList( pOEvoabConnection );
-
-
- ODatabaseMetaDataResultSet::ORows aRows;
- sal_Bool bMoreData = sal_True;
- ::rtl::OUString aName, aLocation;
- sal_Int32 nCardsCount;
-
- pFolderList->initializeRow(3);
- bMoreData = pFolderList->first();
- OSL_TRACE("OEvoabDatabaseMetaData::getTables()::first %d\n",bMoreData );
- do
- {
- if(bMoreData)
- bMoreData = pFolderList->getRow();
- if(bMoreData)
- {
- aLocation = pFolderList->getString(1);
- aName = pFolderList->getString(2);
- nCardsCount = pFolderList->getInt(3);
- EVO_TRACE_STRING( "OEvoabDatabaseMetaData::getTables()::aLocation = %s\n", aLocation );
- EVO_TRACE_STRING( "OEvoabDatabaseMetaData::getTables()::aName = %s\n", aName );
- OSL_TRACE("OEvoabDatabaseMetaData::getTables()::nCardsCount = %d\n", nCardsCount);
-
- ODatabaseMetaDataResultSet::ORow aRow(3);
- aRow.reserve(6);
- aRow.push_back(new ORowSetValueDecorator(aName));
- aRow.push_back(new ORowSetValueDecorator(aTable));
- aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
- aRows.push_back(aRow);
-
- ::rtl::OUString aWorkingDir = pOEvoabConnection->getDriver()->getWorkingDirPath();
- ::rtl::OUString aCLICommand = pOEvoabConnection->getDriver()->getEvoab_CLI_EffectiveCommand();
- ::rtl::OUString aArg1 = aLocation;
- ::rtl::OUString aArg2 = ::rtl::OUString::createFromAscii(pOEvoabConnection->getDriver()->getEVOAB_CLI_ARG_OUTPUT_FILE_PREFIX());
- aArg2 += aWorkingDir;
- aArg2 += aName;
- aArg2 += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("."));
- aArg2 += ::rtl::OUString(pOEvoabConnection->getExtension());
- ::rtl::OUString aArg3 = ::rtl::OUString::createFromAscii(pOEvoabConnection->getDriver()->getEVOAB_CLI_ARG_OUTPUT_FORMAT());
-
- const sal_uInt32 nArgsCount = 3;
- rtl_uString *pArgs[nArgsCount] = { aArg1.pData, aArg2.pData, aArg3.pData };
-
- EVO_TRACE_STRING( "OEvoabDatabaseMetaData::getTables()::aCLICommand = %s\n", aCLICommand );
- EVO_TRACE_STRING( "OEvoabDatabaseMetaData::getTables()::aWorkingDir = %s\n", aWorkingDir );
- EVO_TRACE_STRING( "OEvoabDatabaseMetaData::getTables()::aArg1 = %s\n", aArg1 );
- EVO_TRACE_STRING( "OEvoabDatabaseMetaData::getTables()::aArg2 = %s\n", aArg2 );
- EVO_TRACE_STRING( "OEvoabDatabaseMetaData::getTables()::aArg3 = %s\n", aArg3 );
-
- oslProcess aProcess;
- if ( osl_Process_E_None != osl_executeProcess(
- aCLICommand.pData,
- pArgs,
- nArgsCount,
- osl_Process_HIDDEN | osl_Process_WAIT | osl_Process_SEARCHPATH,
- NULL,
- aWorkingDir.pData,
- NULL, 0,
- &aProcess ) )
- {
- OSL_TRACE("Error at execute evolution-addressbook-export to get VCards");
- throw SQLException();
- }
-
- bMoreData = pFolderList->next();
- }
- }
- while ( bMoreData );
-
- delete pFolderList;
- pFolderList = NULL;
-
- pResult->setRows(aRows);
-
- return xRef;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LDatabaseMetaData.hxx b/connectivity/source/drivers/evoab/LDatabaseMetaData.hxx
deleted file mode 100644
index ebd693874818..000000000000
--- a/connectivity/source/drivers/evoab/LDatabaseMetaData.hxx
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _CONNECTIVITY_EVOAB_LDATABASEMETADATA_HXX_
-#define _CONNECTIVITY_EVOAB_LDATABASEMETADATA_HXX_
-
-#include "file/FDatabaseMetaData.hxx"
-#include "FDatabaseMetaDataResultSet.hxx"
-
-namespace connectivity
-{
- namespace evoab
- {
- //**************************************************************
- //************ Class: java.sql.DatabaseMetaDataDate
- //**************************************************************
-
- class OEvoabDatabaseMetaData : public file::ODatabaseMetaData
- {
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > impl_getTypeInfo_throw();
- virtual ::rtl::OUString SAL_CALL getURL( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getColumns( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern, const ::rtl::OUString& columnNamePattern ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getTables( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& types ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- protected:
- virtual ~OEvoabDatabaseMetaData();
- public:
- OEvoabDatabaseMetaData(file::OConnection* _pCon);
- };
- }
-}
-#endif // _CONNECTIVITY_EVOAB_LDATABASEMETADATA_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LDebug.cxx b/connectivity/source/drivers/evoab/LDebug.cxx
deleted file mode 100644
index b28e06c55b7e..000000000000
--- a/connectivity/source/drivers/evoab/LDebug.cxx
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-
-#include "LDebug.hxx"
-#include <osl/diagnose.h>
-
-void evo_traceStringMessage( const sal_Char* _pFormat, const ::rtl::OUString& _rAsciiString )
-{
- ::rtl::OString sByteStringMessage( _rAsciiString.getStr(), _rAsciiString.getLength(), RTL_TEXTENCODING_ASCII_US );
- if ( !sByteStringMessage.getLength() )
- sByteStringMessage = "<empty>";
- OSL_TRACE( _pFormat, sByteStringMessage.getStr() );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LDriver.cxx b/connectivity/source/drivers/evoab/LDriver.cxx
deleted file mode 100644
index 53ac9fc3ec39..000000000000
--- a/connectivity/source/drivers/evoab/LDriver.cxx
+++ /dev/null
@@ -1,508 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-#include "LDriver.hxx"
-#include "LConnection.hxx"
-#include <com/sun/star/lang/DisposedException.hpp>
-#include "connectivity/dbexception.hxx"
-#include "LConfigAccess.hxx"
-#include <osl/file.hxx>
-#include "osl/security.hxx"
-#include <comphelper/processfactory.hxx>
-#include <com/sun/star/ucb/XCommandEnvironment.hpp>
-#include <ucbhelper/content.hxx>
-#include <tools/debug.hxx>
-#include "resource/common_res.hrc"
-#include "resource/sharedresources.hxx"
-#include "LDebug.hxx"
-
-using namespace osl;
-using namespace connectivity::evoab;
-using namespace connectivity::file;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::sdbcx;
-using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::ucb;
-
-// --------------------------------------------------------------------------------
-OEvoabDriver::OEvoabDriver(const Reference< XMultiServiceFactory >& _rxFactory) : OFileDriver(_rxFactory)
- ,m_aTempDir(NULL, sal_True)
- ,m_aFolderListName(::rtl::OUString::createFromAscii(getEVOAB_FOLDERLIST_FILE_NAME()))
- ,m_aVersionName(::rtl::OUString::createFromAscii(getEVOAB_VERSION_FILE_NAME()))
- ,m_aFileExt(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(getEVOAB_META_FILE_EXT())))
- ,m_bWorkingDirCreated(sal_False)
- ,m_eSupportedEvoVersion( eUnknown )
-{
- m_aEvoab_CLI_FullPathCommand = getFullPathExportingCommand(_rxFactory);
-
- if ( m_aEvoab_CLI_FullPathCommand.getLength() == 0 )
- m_aEvoab_CLI_FullPathCommand = ::rtl::OUString::createFromAscii(getEVOAB_CLI_FULLPATHCOMMAND());
- if ( m_aEvoab_CLI_FullPathCommand.copy(0,7) != ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file://")) && m_aEvoab_CLI_FullPathCommand.copy(0,1) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")))
- m_aEvoab_CLI_FullPathCommand = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file://")) + m_aEvoab_CLI_FullPathCommand;
- m_aEvoab_CLI_EffectiveCommand = m_aEvoab_CLI_FullPathCommand;
- m_aTempDir.EnableKillingFile();
-
- EVO_TRACE_STRING("OEvoabDriver::OEvoabDriver()::m_aEvoab_CLI_FullPathCommand = %s", m_aEvoab_CLI_FullPathCommand );
-}
-// static ServiceInfo
-//------------------------------------------------------------------------------
-rtl::OUString OEvoabDriver::getImplementationName_Static( ) throw(RuntimeException)
-{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(EVOAB_DRIVER_IMPL_NAME));
-}
-
-//------------------------------------------------------------------
-::rtl::OUString SAL_CALL OEvoabDriver::getImplementationName( ) throw(RuntimeException)
-{
- return getImplementationName_Static();
-}
-
-//------------------------------------------------------------------
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL connectivity::evoab::OEvoabDriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception )
-{
- return *(new OEvoabDriver(_rxFactory));
-}
-// --------------------------------------------------------------------------------
-Reference< XConnection > SAL_CALL OEvoabDriver::connect( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- if (ODriver_BASE::rBHelper.bDisposed)
- throw DisposedException();
-
- if ( ! acceptsURL(url) )
- return NULL;
-
- OEvoabConnection* pCon = new OEvoabConnection(this);
- pCon->construct(url,info);
- Reference< XConnection > xCon = pCon;
- m_xConnections.push_back(WeakReferenceHelper(*pCon));
-
- return xCon;
-}
-// --------------------------------------------------------------------------------
-namespace
-{
- ::rtl::OUString lcl_translateProcessErrorMessage( oslProcessError nProcErr)
- {
- ::rtl::OUString sProcErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" not executed!."));
- switch (nProcErr)
- {
- case osl_Process_E_None:
- sProcErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" executed sucessful!"));
- break;
- case osl_Process_E_NotFound:
- sProcErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" executed failed: not found!"));
- break;
- case osl_Process_E_NoPermission:
- sProcErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" executed failed: has no permission!"));
- break;
- case osl_Process_E_TimedOut:
- sProcErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" executed failed: time out!"));
- break;
- case osl_Process_E_Unknown:
- sProcErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" executed failed: unkown reason!"));
- break;
- case osl_Process_E_InvalidError:
- sProcErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" executed failed: invalid error!"));
- break;
- default:
- sProcErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" executed failed: other reason!"));
- }
- return sProcErr;
- }
- oslProcessError lcl_execute( const ::rtl::OUString& _rCommand, ::rtl::OUString& _rArgument,
- const ::rtl::OUString& _rWorkingDir, oslProcessOption _nOptions, oslFileHandle& /*[out]*/ _hStdOut )
- {
- oslProcessError nError = osl_Process_E_None;
-
- EVO_TRACE_STRING("LDriver.cxx::lcl_execute: command : %s", _rCommand );
- EVO_TRACE_STRING("LDriver.cxx::lcl_execute: argument : %s", _rArgument );
- EVO_TRACE_STRING("LDriver.cxx::lcl_execute: working dir: %s", _rWorkingDir );
-
- oslProcess hProcess( 0 );
-
- nError = osl_executeProcess_WithRedirectedIO(
- _rCommand.pData,
- &_rArgument.pData,
- 1,
- _nOptions,
- 0,
- _rWorkingDir.pData,
- 0,
- 0,
- &hProcess,
- NULL,
- &_hStdOut,
- NULL
- );
- ::rtl::OUString sError = _rCommand + lcl_translateProcessErrorMessage( nError);
- EVO_TRACE_STRING( "%s", sError );
-
- if ( nError == osl_Process_E_None )
- {
- TimeValue aFiveSeconds;
- aFiveSeconds.Seconds = 5;
- aFiveSeconds.Nanosec = 0;
- oslProcessError nWaitForProcessError = osl_joinProcessWithTimeout( hProcess, &aFiveSeconds );
- if ( osl_Process_E_None != nWaitForProcessError )
- {
- nError = nWaitForProcessError;
- // TODO: kill the running process?
- }
- osl_freeProcessHandle( hProcess );
- }
- return nError;
- }
-}
-
-// --------------------------------------------------------------------------------
-sal_Bool SAL_CALL OEvoabDriver::acceptsURL( const ::rtl::OUString& url )
- throw(SQLException, RuntimeException)
-{
- sal_Bool bRet;
- bRet = sal_False;
- // here we have to look if we support this url format
- if(acceptsURL_Stat(url))
- {
- if ( m_eSupportedEvoVersion != eUnknown )
- return m_eSupportedEvoVersion == eTrue ? sal_True : sal_False;
-
- if(!m_bWorkingDirCreated)
- {
- String sTempDirURL = getTempDirURL();
- //EVO_TRACE_STRING("OEvoabDriver::acceptsURL()::sTempDirURL = %s", sTempDirURL );
-
- ::rtl::OUString aTempDirURL(sTempDirURL);
- m_aWorkingDirURL = aTempDirURL;
- m_bWorkingDirCreated = sal_True;
- }
-
- ::rtl::OUString aCLICommand = getEvoab_CLI_EffectiveCommand();
- ::rtl::OUString aWorkingDirURL = getWorkingDirURL();
- ::rtl::OUString aArgVersion = ::rtl::OUString::createFromAscii(getEVOAB_CLI_ARG_VERSION());
-
- oslFileHandle hStdout = NULL;
- oslProcessError nProcErr = lcl_execute( aCLICommand, aArgVersion, aWorkingDirURL, 0, hStdout );
- if(nProcErr != osl_Process_E_None)
- {
- if(doesEvoab_CLI_HavePath())
- aCLICommand = getEvoab_CLI_Command();
- else
- aCLICommand = getEvoab_CLI_Path() + getEvoab_CLI_Command();
- nProcErr = lcl_execute( aCLICommand, aArgVersion, aWorkingDirURL, osl_Process_SEARCHPATH | osl_Process_HIDDEN, hStdout );
- if ( nProcErr == osl_Process_E_None )
- m_aEvoab_CLI_EffectiveCommand = aCLICommand;
- }
-
- if ( hStdout != NULL )
- {
- OSL_ASSERT( hStdout );
- sal_Char pBuffer[256];
- sal_uInt64 nBytesRead;
- oslFileError nFileErr = osl_File_E_None;
- nFileErr = osl_readFile( hStdout, pBuffer, 256, &nBytesRead);
- if ( nFileErr != osl_File_E_None )
- {
- ::rtl::OUString sErr = translateFileErrorMessage( nFileErr);
- OSL_FAIL(::rtl::OUStringToOString( sErr, RTL_TEXTENCODING_ASCII_US ).getStr());
- }
- ::rtl::OUString aVersionInfo;
- if ( nFileErr == osl_File_E_None && nBytesRead > 0 && nBytesRead <= 256)
- {
- OSL_TRACE("OEvoabDriver::acceptsURL()::osl_readFile(),nBytesRead = %u",nBytesRead);
- aVersionInfo =
- ::rtl::OUString( ( const sal_Char * )pBuffer,
- (sal_Int32)nBytesRead,
- RTL_TEXTENCODING_UTF8 );
- EVO_TRACE_STRING("OEvoabDriver::acceptsURL()::aVersionInfo = %s", aVersionInfo );
- sal_Int32 nIndex = 0;
- sal_Bool bNumRetrieved = sal_False;
- ::rtl::OUString aToken;
- sal_Int32 aVer[4];
- sal_Int32 i;
- for ( i = 0; i < 4; i++ )
- aVer[i] = 0;
- do
- {
- aToken = aVersionInfo.getToken( 0, ' ', nIndex );
- //OSL_TRACE("OEvoabDriver::acceptsURL()::Token:%d", nIndex );
- //EVO_TRACE_STRING("OEvoabDriver::acceptsURL()::aToken = %s", aToken );
- if( aToken.toChar() >= '0' && aToken.toChar() <= '9' )
- {
- bNumRetrieved = sal_True;
- sal_Int32 nIndex1 = 0;
- ::rtl::OUString aNum;
- for(i = 0; i < 4 ; i++)
- {
- if( nIndex1 >= 0 )
- {
- aNum = aToken.getToken( 0, '.', nIndex1);
- aVer[i] = aNum.toInt32();
- OSL_TRACE("OEvoabDriver::acceptsURL()::Ver[%u]=%u", i, aVer[i] );
- }
- }
- }
- }
- while ( nIndex >= 0 && !bNumRetrieved );
-
- if((aVer[0]>1)||(aVer[0]==1 && aVer[1]>3)||(aVer[0]==1 && aVer[1]==3 && aVer[2]>2)||(aVer[0]==1 && aVer[1]==3 && aVer[2]==2 && aVer[3]>=99))
- bRet = sal_True;
- else
- bRet = sal_False;
- }
- else
- bRet = sal_False;
-
- osl_closeFile( hStdout );
- }
- m_eSupportedEvoVersion = bRet ? eTrue : eFalse;
- }
- EVO_TRACE_STRING("OEvoabDriver::acceptsURL()::return, return value = %s", ::rtl::OUString::valueOf(bRet) );
- return bRet;
-}
-
-
-// --------------------------------------------------------------------------------
-sal_Bool OEvoabDriver::acceptsURL_Stat( const ::rtl::OUString& url )
-{
-
- EVO_TRACE_STRING("OEvoabDriver::acceptsURL_Stat()::Scheme = %s", url );
- // Skip 'sdbc:address: part of URL
- //
- sal_Int32 nLen = url.indexOf(':');
- nLen = url.indexOf(':',nLen+1);
- ::rtl::OUString aAddrbookURI(url.copy(nLen+1));
-
- // Get Scheme
- nLen = aAddrbookURI.indexOf(':');
- ::rtl::OUString aAddrbookScheme;
- if ( nLen == -1 )
- {
- // There isn't any subschema: - but could be just subschema
- if ( aAddrbookURI.getLength() > 0 )
- aAddrbookScheme= aAddrbookURI;
- else if(url == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:")) )
- return sal_True; // special case here
- else
- return sal_False;
- }
- else
- aAddrbookScheme = aAddrbookURI.copy(0, nLen);
-
-
- EVO_TRACE_STRING("OEvoabDriver::acceptsURL_Stat()::URI = %s", aAddrbookURI );
- EVO_TRACE_STRING("OEvoabDriver::acceptsURL_Stat()::Scheme = %s", aAddrbookScheme );
-
- return aAddrbookScheme.compareToAscii( getSDBC_SCHEME_EVOLUTION() ) == 0 ;
-}
-// -------------------------------------------------------------------------
-const rtl::OUString OEvoabDriver::getEvoab_CLI_Command() const
-{
- rtl::OUString aEvoab_CLI_Command;
- sal_Int32 nLen = m_aEvoab_CLI_FullPathCommand.lastIndexOf('/');
-
- if ( nLen == -1 )
- aEvoab_CLI_Command = m_aEvoab_CLI_FullPathCommand;
- else
- aEvoab_CLI_Command = m_aEvoab_CLI_FullPathCommand.copy(nLen+1);
-
- EVO_TRACE_STRING( "OEvoabDriver::getEvoab_CLI_Command()::aEvoab_CLI_Command = %s", aEvoab_CLI_Command );
-
- return aEvoab_CLI_Command;
-}
-// -------------------------------------------------------------------------
-const rtl::OUString OEvoabDriver::getEvoab_CLI_Path() const
-{
- rtl::OUString aEvoab_CLI_Path;
- sal_Int32 nLen = m_aEvoab_CLI_FullPathCommand.lastIndexOf('/');
-
- if ( nLen == -1 )
- {
- rtl::OUString aDefault_CLI_FullPathCommand;
- aDefault_CLI_FullPathCommand = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(OEvoabDriver::getEVOAB_CLI_FULLPATHCOMMAND()));
- sal_Int32 nLength = aDefault_CLI_FullPathCommand.lastIndexOf('/');
- aEvoab_CLI_Path = aDefault_CLI_FullPathCommand.copy(0, nLength+1);
- }
- else
- aEvoab_CLI_Path = m_aEvoab_CLI_FullPathCommand.copy(0, nLen+1);
- EVO_TRACE_STRING( "OEvoabDriver::getEvoab_CLI_Path()::aEvoab_CLI_Path = %s", aEvoab_CLI_Path );
-
- return aEvoab_CLI_Path;
-}
-// -------------------------------------------------------------------------
-const rtl::OUString OEvoabDriver::getWorkingDirPath() const
-{
- ::rtl::OUString aWorkingDirPath;
- if(m_bWorkingDirCreated)
- osl::File::getSystemPathFromFileURL( m_aWorkingDirURL, aWorkingDirPath );
- return aWorkingDirPath;
-}
-// -------------------------------------------------------------------------
-const String OEvoabDriver::getEvoFolderListFileURL() const
-{
-
- ::rtl::OUString aEvoFolderListFileURL;
- aEvoFolderListFileURL = getWorkingDirURL() + getEvoFolderListFileName();
-
- EVO_TRACE_STRING("OEvoabDriver::getEvoFolderListFileURL(): aEvoFolderListFileURL = %s", aEvoFolderListFileURL );
- return aEvoFolderListFileURL.getStr();
-}
-
-// -------------------------------------------------------------------------
-String OEvoabDriver::getTempDirURL() const
-{
- ::rtl::OUString aTempDirURL;
- aTempDirURL = m_aTempDir.GetURL();
- if((aTempDirURL.lastIndexOf( '/')) != (aTempDirURL.getLength( ) - 1))
- aTempDirURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
-
- EVO_TRACE_STRING("OEvoabDriver::getTempDirURL(): aTempDirURL = %s", aTempDirURL );
- return aTempDirURL.getStr();
-}
-//-------------------------------------------------------------------------
-sal_Bool OEvoabDriver::fileExists(const ::rtl::OUString& _rURL, sal_Bool _bIsDir) const
-{
- ::ucbhelper::Content aCheckExistence;
- sal_Bool bExists = sal_False;
- try
- {
- aCheckExistence = ::ucbhelper::Content(_rURL, Reference< XCommandEnvironment >());
- if(_bIsDir)
- bExists = aCheckExistence.isFolder();
- else
- bExists = aCheckExistence.isDocument();
- }
- catch(const Exception&) { }
- return bExists;
-}
-
-// -----------------------------------------------------------------------------
-const sal_Char* OEvoabDriver::getSDBC_SCHEME_EVOLUTION()
-{
- static const sal_Char* SDBC_SCHEME_EVOLUTION = EVOAB_EVOLUTION_SCHEMA;
- return SDBC_SCHEME_EVOLUTION;
-}
-const sal_Char* OEvoabDriver::getEVOAB_FOLDERLIST_FILE_NAME()
-{
- static const sal_Char* EVOAB_FOLDERLIST_FILE_NAME = "FolderList";
- return EVOAB_FOLDERLIST_FILE_NAME;
-}
-const sal_Char* OEvoabDriver::getEVOAB_VERSION_FILE_NAME()
-{
- static const sal_Char* EVOAB_VERSION_FILE_NAME = "EvoVersion";
- return EVOAB_VERSION_FILE_NAME;
-}
-const sal_Char* OEvoabDriver::getEVOAB_META_FILE_EXT()
-{
- static const sal_Char* EVOAB_META_FILE_EXT = "csv";
- return EVOAB_META_FILE_EXT;
-}
-const sal_Char* OEvoabDriver::getEVOAB_CLI_FULLPATHCOMMAND()
-{
- static const sal_Char* EVOAB_CLI_FULLPATHCOMMAND = "file:///home/evoab/extra/share/evolution/*/tools/evolution-addressbook-export";
- return EVOAB_CLI_FULLPATHCOMMAND;
-}
-const sal_Char* OEvoabDriver::getEVOAB_CLI_ARG_LIST_FOLDERS()
-{
- static const sal_Char* EVOAB_CLI_ARG_LIST_FOLDERS = "-l";
- return EVOAB_CLI_ARG_LIST_FOLDERS;
-}
-const sal_Char* OEvoabDriver::getEVOAB_CLI_ARG_OUTPUT_FILE_PREFIX()
-{
- static const sal_Char* EVOAB_CLI_ARG_OUTPUT_FILE_PREFIX = "--output=";
- return EVOAB_CLI_ARG_OUTPUT_FILE_PREFIX;
-}
-const sal_Char* OEvoabDriver::getEVOAB_CLI_ARG_OUTPUT_FORMAT()
-{
- static const sal_Char* EVOAB_CLI_ARG_OUTPUT_FORMAT = "--format=csv";
- return EVOAB_CLI_ARG_OUTPUT_FORMAT;
-}
-const sal_Char* OEvoabDriver::getEVOAB_CLI_ARG_VERSION()
-{
- static const sal_Char* EVOAB_CLI_ARG_VERSION = "--version";
- return EVOAB_CLI_ARG_VERSION;
-}
-const sal_Char* OEvoabDriver::getEVOAB_CLI_ARG_OUTPUT_REDIRECT()
-{
- static const sal_Char* EVOAB_CLI_ARG_OUTPUT_REDIRECT = ">";
- return EVOAB_CLI_ARG_OUTPUT_REDIRECT;
-}
-rtl::OUString OEvoabDriver::translateFileErrorMessage( oslFileError nFileErr)
-{
- ::rtl::OUString sFileErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" no file operation!."));
- switch (nFileErr)
- {
- case osl_File_E_None:
- sFileErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" File operation succeeded!"));
- break;
- case osl_File_E_INVAL:
- sFileErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" File operation failed: the format of the parameters was not valid!"));
- break;
- case osl_File_E_INTR:
- sFileErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" File operation failed: function call was interrupted!"));
- break;
- case osl_File_E_IO:
- sFileErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" File operation failed: I/O errors!"));
- break;
- case osl_File_E_ISDIR:
- sFileErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" File operation failed: is a directory!"));
- break;
- case osl_File_E_BADF:
- sFileErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" File operation failed: bad file!"));
- break;
- case osl_File_E_FAULT:
- sFileErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" File operation failed: bad address!"));
- break;
- case osl_File_E_AGAIN:
- sFileErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" File operation failed: operation would block!"));
- break;
- case osl_File_E_NOLINK:
- sFileErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" File operation failed: link has been severed!"));
- break;
- default:
- sFileErr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" File operation failed: other reason!"));
- }
- return sFileErr;
-}
-// -----------------------------------------------------------------------------
-Sequence< DriverPropertyInfo > SAL_CALL OEvoabDriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException)
-{
- if ( !acceptsURL(url) )
- {
- ::connectivity::SharedResources aResources;
- const ::rtl::OUString sMessage = aResources.getResourceString(STR_URI_SYNTAX_ERROR);
- ::dbtools::throwGenericSQLException(sMessage ,*this);
- } // if ( !acceptsURL(url) )
- return Sequence< DriverPropertyInfo >();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LDriver.hxx b/connectivity/source/drivers/evoab/LDriver.hxx
deleted file mode 100644
index 65b15c50cd3f..000000000000
--- a/connectivity/source/drivers/evoab/LDriver.hxx
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _CONNECTIVITY_EVOAB_LDRIVER_HXX_
-#define _CONNECTIVITY_EVOAB_LDRIVER_HXX_
-
-#include <cppuhelper/compbase2.hxx>
-#include "connectivity/CommonTools.hxx"
-#include "file/FDriver.hxx"
-#include <unotools/tempfile.hxx>
-#include <osl/file.h>
-#include <osl/process.h>
-
-#define EVOAB_EVOLUTION_SCHEMA "evolution"
-#define EVOAB_LDAP_SCHEMA "ldap"
-#define EVOAB_DRIVER_IMPL_NAME "com.sun.star.comp.sdbc.evoab.OEvoabDriver"
-
-namespace connectivity
-{
- namespace evoab
- {
-
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL OEvoabDriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception );
-
- class OEvoabDriver : public file::OFileDriver
- {
- private:
- enum MaybeVoidBool
- {
- eUnknown,
- eTrue,
- eFalse
- };
- ::utl::TempFile m_aTempDir;
- rtl::OUString m_aFolderListName;
- rtl::OUString m_aVersionName;
- rtl::OUString m_aFileExt;
- rtl::OUString m_aWorkingDirURL;
- rtl::OUString m_aEvoab_CLI_EffectiveCommand;
- rtl::OUString m_aEvoab_CLI_FullPathCommand;
- sal_Bool m_bWorkingDirCreated;
- MaybeVoidBool m_eSupportedEvoVersion;
-
- sal_Bool fileExists(const ::rtl::OUString& _rURL, sal_Bool _bIsDir=sal_False) const;
-
- public:
- OEvoabDriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory);
-
- inline rtl::OUString getEvoFolderListName() const { return m_aFolderListName;}
- inline rtl::OUString getFileExt() const { return m_aFileExt;}
- inline rtl::OUString getEvoFolderListFileName() const { return m_aFolderListName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + m_aFileExt;}
- inline rtl::OUString getEvoVersionFileName() const { return m_aVersionName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + m_aFileExt;}
- inline rtl::OUString getWorkingDirURL() const { return m_aWorkingDirURL;}
- inline rtl::OUString getEvoab_CLI_FullPathCommand() const { return m_aEvoab_CLI_FullPathCommand;}
- inline rtl::OUString getEvoab_CLI_EffectiveCommand() const { return m_aEvoab_CLI_EffectiveCommand;}
- inline sal_Bool doesEvoab_CLI_HavePath() const { return m_aEvoab_CLI_FullPathCommand.lastIndexOf('/')!=-1;}
- const rtl::OUString getEvoab_CLI_Command() const;
- const rtl::OUString getEvoab_CLI_Path() const;
- const rtl::OUString getWorkingDirPath() const;
- const String getEvoFolderListFileURL() const;
- String getTempDirURL() const;
-
- // XInterface
- ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
- // XDriver
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL connect( const ::rtl::OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL acceptsURL( const ::rtl::OUString& url ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo( const ::rtl::OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
-
-
- // static methods
- static ::rtl::OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);
- static sal_Bool acceptsURL_Stat( const ::rtl::OUString& url );
- static ::rtl::OUString translateProcessErrorMessage( oslProcessError nProcErr);
- static ::rtl::OUString translateFileErrorMessage( oslFileError nFileErr);
- static const sal_Char* getSDBC_SCHEME_EVOLUTION();
- static const sal_Char* getEVOAB_FOLDERLIST_FILE_NAME();
- static const sal_Char* getEVOAB_VERSION_FILE_NAME();
- static const sal_Char* getEVOAB_META_FILE_EXT();
- static const sal_Char* getEVOAB_CLI_FULLPATHCOMMAND();
- static const sal_Char* getEVOAB_CLI_ARG_LIST_FOLDERS();
- static const sal_Char* getEVOAB_CLI_ARG_OUTPUT_FILE_PREFIX();
- static const sal_Char* getEVOAB_CLI_ARG_OUTPUT_FORMAT();
- static const sal_Char* getEVOAB_CLI_ARG_VERSION();
- static const sal_Char* getEVOAB_CLI_ARG_OUTPUT_REDIRECT();
-
- };
- }
-
-}
-#endif //_CONNECTIVITY_EVOAB_LDRIVER_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LFolderList.cxx b/connectivity/source/drivers/evoab/LFolderList.cxx
deleted file mode 100644
index b60225907277..000000000000
--- a/connectivity/source/drivers/evoab/LFolderList.cxx
+++ /dev/null
@@ -1,563 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-
-#include <ctype.h>
-#include <algorithm>
-#include "LFolderList.hxx"
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
-#include <svl/converter.hxx>
-#include "LConnection.hxx"
-#include "LColumns.hxx"
-#include <osl/thread.h>
-#include <tools/config.hxx>
-#include <comphelper/sequence.hxx>
-#include <svl/zforlist.hxx>
-#include <rtl/math.hxx>
-#include <stdio.h> //sprintf
-#include <comphelper/extract.hxx>
-#include <comphelper/numbers.hxx>
-#include "LDriver.hxx"
-#include <com/sun/star/util/NumberFormat.hpp>
-#include <unotools/configmgr.hxx>
-#include <i18npool/mslangid.hxx>
-#include "connectivity/dbconversion.hxx"
-#include <comphelper/types.hxx>
-#include <unotools/ucbstreamhelper.hxx>
-#include <tools/debug.hxx>
-#include "connectivity/dbexception.hxx"
-#include "LDebug.hxx"
-#include <unotools/syslocale.hxx>
-
-using namespace ::comphelper;
-using namespace connectivity;
-using namespace connectivity::evoab;
-using namespace connectivity::file;
-using namespace ::cppu;
-using namespace utl;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::sdbcx;
-using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::lang;
-
-// -------------------------------------------------------------------------
-void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
-{
- sal_Bool bRead = sal_True;
-
- QuotedTokenizedString aHeaderLine;
- OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
-
- // read first row
- QuotedTokenizedString aFirstLine;
- bRead = m_pFileStream->ReadByteStringLine(aFirstLine,pConnection->getTextEncoding());
-
- while(bRead && !aFirstLine.Len())
- {
- bRead = m_pFileStream->ReadByteStringLine(aFirstLine,pConnection->getTextEncoding());
- }
- // use first row as headerline because we need the number of columns
- aHeaderLine = aFirstLine;
-
- // column count
- xub_StrLen nFieldCount = aHeaderLine.GetTokenCount(pConnection->getFieldDelimiter(),pConnection->getStringDelimiter());
-
- if(!m_aColumns.is())
- m_aColumns = new OSQLColumns();
- else
- m_aColumns->get().clear();
-
- m_aTypes.clear();
- m_aPrecisions.clear();
- m_aScales.clear();
- // reserve some space
- m_aColumns->get().reserve(nFieldCount);
- m_aTypes.reserve(nFieldCount);
- m_aPrecisions.reserve(nFieldCount);
- m_aScales.reserve(nFieldCount);
-
- sal_Bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers();
- CharClass aCharClass(pConnection->getDriver()->getFactory(),_aLocale);
- // read description
- sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter();
- sal_Unicode cThousandDelimiter = pConnection->getThousandDelimiter();
- String aColumnName;
- ::rtl::OUString aTypeName;
- ::comphelper::UStringMixEqual aCase(bCase);
- xub_StrLen nStartPosFirstLine = 0; // use for eficient way to get the tokens
- xub_StrLen nStartPosFirstLine2 = 0;
- for (xub_StrLen i = 0; i < nFieldCount; i++)
- {
-
- // no column name so ...
- aColumnName = 'C';
- aColumnName += String::CreateFromInt32(i+1);
-
- sal_Int32 eType;
- sal_uInt16 nPrecision = 0;
- sal_uInt16 nScale = 0;
-
- sal_Bool bNumeric = sal_False;
- sal_uIntPtr nIndex = 0;
-
- // first without fielddelimiter
- String aField;
- aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine,pConnection->getFieldDelimiter(),'\0');
- if (aField.Len() == 0 ||
- (pConnection->getStringDelimiter() && pConnection->getStringDelimiter() == aField.GetChar(0)))
- {
- bNumeric = sal_False;
- }
- else
- {
- String aField2;
- if ( pConnection->getStringDelimiter() != '\0' )
- aFirstLine.GetTokenSpecial(aField2,nStartPosFirstLine2,pConnection->getFieldDelimiter(),pConnection->getStringDelimiter());
- else
- aField2 = aField;
-
- if (aField2.Len() == 0)
- {
- bNumeric = sal_False;
- }
- else
- {
- bNumeric = sal_True;
- xub_StrLen nDot = 0;
- for (xub_StrLen j = 0; j < aField2.Len(); j++)
- {
- sal_Unicode c = aField2.GetChar(j);
- // Only digits and decimalpoint and thousands delimiter?
- if ((!cDecimalDelimiter || c != cDecimalDelimiter) &&
- (!cThousandDelimiter || c != cThousandDelimiter) &&
- !aCharClass.isDigit(aField2,j))
- {
- bNumeric = sal_False;
- break;
- }
- if (cDecimalDelimiter && c == cDecimalDelimiter)
- {
- nPrecision = 15; // we have an decimal value
- nScale = 2;
- nDot++;
- }
- }
-
- if (nDot > 1) // if there is more than one dot it isn't a number
- bNumeric = sal_False;
- if (bNumeric && cThousandDelimiter)
- {
- // Is the delimiter given correctly?
- String aValue = aField2.GetToken(0,cDecimalDelimiter);
- for (sal_Int32 j = aValue.Len() - 4; j >= 0; j -= 4)
- {
- sal_Unicode c = aValue.GetChar(j);
- // Only digits, decimalpoint and thousands delimiter?
- if (c == cThousandDelimiter && j)
- continue;
- else
- {
- bNumeric = sal_False;
- break;
- }
- }
- }
-
- // now it might still be a date-field
- if (!bNumeric)
- {
- try
- {
- nIndex = m_xNumberFormatter->detectNumberFormat(::com::sun::star::util::NumberFormat::ALL,aField2);
- }
- catch(Exception&)
- {
- }
- }
- }
- }
-
- sal_Int32 nFlags = 0;
- if (bNumeric)
- {
- if (cDecimalDelimiter)
- {
- if(nPrecision)
- {
- eType = DataType::DECIMAL;
- aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DECIMAL"));
- }
- else
- {
- eType = DataType::DOUBLE;
- aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOUBLE"));
- }
- }
- else
- eType = DataType::INTEGER;
- nFlags = ColumnSearch::BASIC;
- }
- else
- {
-
- switch (comphelper::getNumberFormatType(m_xNumberFormatter,nIndex))
- {
- case NUMBERFORMAT_DATE:
- eType = DataType::DATE;
- aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE"));
- break;
- case NUMBERFORMAT_DATETIME:
- eType = DataType::TIMESTAMP;
- aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"));
- break;
- case NUMBERFORMAT_TIME:
- eType = DataType::TIME;
- aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME"));
- break;
- default:
- eType = DataType::VARCHAR;
- nPrecision = 0; // nyi: Data can be longer!
- nScale = 0;
- aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR"));
- };
- nFlags |= ColumnSearch::CHAR;
- }
-
- // check if the columname already exists
- String aAlias(aColumnName);
- OSQLColumns::Vector::const_iterator aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase);
- sal_Int32 nExprCnt = 0;
- while(aFind != m_aColumns->get().end())
- {
- (aAlias = aColumnName) += String::CreateFromInt32(++nExprCnt);
- aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase);
- }
-
- sdbcx::OColumn* pColumn = new sdbcx::OColumn(aAlias,aTypeName,::rtl::OUString(),
- ColumnValue::NULLABLE,
- nPrecision,
- nScale,
- eType,
- sal_False,
- sal_False,
- sal_False,
- bCase);
- Reference< XPropertySet> xCol = pColumn;
- m_aColumns->get().push_back(xCol);
- m_aTypes.push_back(eType);
- m_aPrecisions.push_back(nPrecision);
- m_aScales.push_back(nScale);
- }
- m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN);
-}
-// -------------------------------------------------------------------------
-DBG_NAME( OEvoabFolderList );
-OEvoabFolderList::OEvoabFolderList(OEvoabConnection* _pConnection)
- :m_nFilePos(0)
- ,m_pFileStream(NULL)
- ,m_pConnection(_pConnection)
- ,m_bIsNull(sal_False)
-{
- DBG_CTOR( OEvoabFolderList, NULL );
- m_aColumns = new OSQLColumns();
-
- construct();
-}
-// -----------------------------------------------------------------------------
-void OEvoabFolderList::construct()
-{
- SvtSysLocale aLocale;
- ::com::sun::star::lang::Locale aAppLocale(aLocale.GetLocaleDataPtr()->getLocale());
- Sequence< ::com::sun::star::uno::Any > aArg(1);
- aArg[0] <<= aAppLocale;
-
- Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(m_pConnection->getDriver()->getFactory()->createInstanceWithArguments(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatsSupplier")),aArg),UNO_QUERY);
- m_xNumberFormatter = Reference< ::com::sun::star::util::XNumberFormatter >(m_pConnection->getDriver()->getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatter"))),UNO_QUERY);
- m_xNumberFormatter->attachNumberFormatsSupplier(xSupplier);
-
- INetURLObject aURL;
- aURL.SetURL(m_pConnection->getDriver()->getEvoFolderListFileURL());
-
- String aFileName = aURL.GetMainURL(INetURLObject::NO_DECODE);
-
- EVO_TRACE_STRING("OJ::construct()::aFileName = %s\n", aFileName );
- m_pFileStream = createStream_simpleError( aFileName,STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYWRITE);
-
- if(!m_pFileStream)
- m_pFileStream = createStream_simpleError( aFileName,STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYNONE);
-
- if(m_pFileStream)
- {
- m_pFileStream->Seek(STREAM_SEEK_TO_END);
- sal_Int32 nSize = m_pFileStream->Tell();
- m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN);
-
- // Buffersize dependent on the file-size
- m_pFileStream->SetBufferSize(nSize > 1000000 ? 32768 :
- nSize > 100000 ? 16384 :
- nSize > 10000 ? 4096 : 1024);
- OSL_TRACE("OEvoabFolderList::construct()::m_pFileStream->Tell() = %d\n", nSize );
-
- fillColumns(aAppLocale);
- }
-}
-
-
-//------------------------------------------------------------------
-sal_Bool OEvoabFolderList::fetchRow(OValueRow _rRow,const OSQLColumns & _rCols)
-{
- (_rRow->get())[0] = m_nFilePos; // the "bookmark"
-
- OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
- // Fields:
- xub_StrLen nStartPos = 0;
- String aStr;
- OSQLColumns::Vector::const_iterator aIter = _rCols.get().begin();
- for (sal_Int32 i = 0; aIter != _rCols.get().end();++aIter, ++i)
- {
- m_aCurrentLine.GetTokenSpecial(aStr,nStartPos,pConnection->getFieldDelimiter(),pConnection->getStringDelimiter());
- //OSL_TRACE("OEvoabFolderList::fetchRow()::aStr = %s\n", ((OUtoCStr(::rtl::OUString(aStr))) ? (OUtoCStr(::rtl::OUString(aStr))):("NULL")) );
-
- if (aStr.Len() == 0)
- (_rRow->get())[i+1].setNull();
- else
- {
- // length depending on the data type
- sal_Int32 nType = m_aTypes[i];
- switch(nType)
- {
- case DataType::TIMESTAMP:
- case DataType::DATE:
- case DataType::TIME:
- {
- double nRes = 0.0;
- try
- {
- nRes = m_xNumberFormatter->convertStringToNumber(::com::sun::star::util::NumberFormat::ALL,aStr);
- Reference<XPropertySet> xProp(m_xNumberFormatter->getNumberFormatsSupplier()->getNumberFormatSettings(),UNO_QUERY);
- com::sun::star::util::Date aDate;
- xProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NullDate"))) >>= aDate;
-
- switch(nType)
- {
- case DataType::DATE:
- (_rRow->get())[i+1] = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDate(nRes,aDate));
- break;
- case DataType::TIMESTAMP:
- (_rRow->get())[i+1] = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDateTime(nRes,aDate));
- break;
- default:
- (_rRow->get())[i+1] = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(nRes));
- }
- }
- catch(Exception&)
- {
- (_rRow->get())[i+1].setNull();
- }
- } break;
- case DataType::DOUBLE:
- case DataType::INTEGER:
- case DataType::DECIMAL:
- case DataType::NUMERIC:
- {
- sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter();
- sal_Unicode cThousandDelimiter = pConnection->getThousandDelimiter();
- String aStrConverted;
-
- OSL_ENSURE(cDecimalDelimiter && nType != DataType::INTEGER ||
- !cDecimalDelimiter && nType == DataType::INTEGER,
- "FalscherTyp");
-
- // Convert to standard notation (DecimalPOINT without Thousands-comma):
- for (xub_StrLen j = 0; j < aStr.Len(); ++j)
- {
- if (cDecimalDelimiter && aStr.GetChar(j) == cDecimalDelimiter)
- aStrConverted += '.';
- else if ( aStr.GetChar(j) == '.' ) // special case, if decimal seperator isn't '.' we have to vut the string after it
- break;
- else if (cThousandDelimiter && aStr.GetChar(j) == cThousandDelimiter)
- {
- // leave out
- }
- else
- aStrConverted += aStr.GetChar(j) ;
- }
- double nVal = ::rtl::math::stringToDouble(aStrConverted.GetBuffer(),',','.',NULL,NULL);
-
- if ( DataType::DECIMAL == nType || DataType::NUMERIC == nType )
- (_rRow->get())[i+1] = String::CreateFromDouble(nVal);
- else
- (_rRow->get())[i+1] = nVal;
- } break;
-
- default:
- {
- // put value as string in Row variable
- (_rRow->get())[i+1] = aStr;
- }
- break;
- }
- }
- }
- return sal_True;
-}
-
-
-//------------------------------------------------------------------
-sal_Bool OEvoabFolderList::seekRow(IResultSetHelper::Movement eCursorPosition)
-{
- //OSL_TRACE("OEvoabFolderList::seekRow()::(before SeekRow)m_aCurrentLine = %d\n", ((OUtoCStr(::rtl::OUString(m_aCurrentLine))) ? (OUtoCStr(::rtl::OUString(m_aCurrentLine))):("NULL")) );
-
- if ( !m_pFileStream )
- return sal_False;
- OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
- // ----------------------------------------------------------
- // Prepare positioning:
- //OSL_TRACE("OEvoabFolderList::seekRow()::(before SeekRow,m_pFileStriam Exist)m_aCurrentLine = %d\n", ((OUtoCStr(::rtl::OUString(m_aCurrentLine))) ? (OUtoCStr(::rtl::OUString(m_aCurrentLine))):("NULL")) );
-
- switch(eCursorPosition)
- {
- case IResultSetHelper::FIRST:
- m_nFilePos = 0;
- // run through
-
- case IResultSetHelper::NEXT:
- m_pFileStream->Seek(m_nFilePos);
-
- if (m_pFileStream->IsEof())
- {
- OSL_TRACE( "OEvoabFolderList::seekRow: EOF /before/ reading the line." );
- return sal_False;
- }
-
- m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
- if (m_pFileStream->IsEof())
- {
- OSL_TRACE( "OEvoabFolderList::seekRow: EOF /after/ reading the line." );
- if ( !m_aCurrentLine.Len() )
- {
- OSL_TRACE( "OEvoabFolderList::seekRow: empty line read." );
- return sal_False;
- }
- }
- m_nFilePos = m_pFileStream->Tell();
- break;
-
- default:
- OSL_FAIL( "OEvoabFolderList::seekRow: unsupported positioning!" );
- break;
- }
-
- //OSL_TRACE("OEvoabFolderList::seekRow()::(after SeekRow)m_aCurrentLine = %d\n", ((OUtoCStr(::rtl::OUString(m_aCurrentLine))) ? (OUtoCStr(::rtl::OUString(m_aCurrentLine))):("NULL")) );
-
- return sal_True;
-}
-// -----------------------------------------------------------------------------
-SvStream* OEvoabFolderList::createStream_simpleError( const String& _rFileName, StreamMode _eOpenMode)
-{
- utl::UcbLockBytesHandler* p_null_dummy=NULL;
- SvStream* pReturn = ::utl::UcbStreamHelper::CreateStream( _rFileName, _eOpenMode, p_null_dummy);
- if (pReturn && (ERRCODE_NONE != pReturn->GetErrorCode()))
- {
- delete pReturn;
- pReturn = NULL;
- }
- return pReturn;
-}
-// -----------------------------------------------------------------------------
-const ORowSetValue& OEvoabFolderList::getValue(sal_Int32 _nColumnIndex ) throw(::com::sun::star::sdbc::SQLException)
-{
- checkIndex( _nColumnIndex );
-
- m_bIsNull = (m_aRow->get())[_nColumnIndex].isNull();
- return (m_aRow->get())[_nColumnIndex];
-}
-// -----------------------------------------------------------------------------
-void OEvoabFolderList::checkIndex(sal_Int32 _nColumnIndex ) throw(::com::sun::star::sdbc::SQLException)
-{
- if ( _nColumnIndex <= 0 || _nColumnIndex >= (sal_Int32)m_aRow->get().size() ) {
-// ::dbtools::throwInvalidIndexException();
- ;
- }
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL OEvoabFolderList::getString( sal_Int32 _nColumnIndex ) throw(SQLException, RuntimeException)
-{
- return getValue(_nColumnIndex);
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL OEvoabFolderList::getInt( sal_Int32 _nColumnIndex ) throw(SQLException, RuntimeException)
-{
- return getValue( _nColumnIndex );
-}
-// -----------------------------------------------------------------------------
-void OEvoabFolderList::initializeRow(sal_Int32 _nColumnCount)
-{
- if(!m_aRow.is())
- {
- m_aRow = new OValueVector(_nColumnCount);
- (m_aRow->get())[0].setBound(sal_True);
- ::std::for_each(m_aRow->get().begin()+1,m_aRow->get().end(),TSetBound(sal_False));
- }
- //OSL_TRACE("OEvoabFolderList::initializeRow()::_nColumnCount = %d\n", _nColumnCount);
-
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OEvoabFolderList::first( ) throw(SQLException, RuntimeException)
-{
- sal_Bool bSuccess = seekRow(IResultSetHelper::FIRST);
-
- EVO_TRACE_STRING("OEvoabFolderList::first(): returning %s\n", ::rtl::OUString::valueOf(bSuccess) );
- return bSuccess;
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OEvoabFolderList::next( ) throw(SQLException, RuntimeException)
-{
- sal_Bool bSuccess = seekRow(IResultSetHelper::NEXT);
-
- EVO_TRACE_STRING("OEvoabFolderList::next(): returning %s\n", ::rtl::OUString::valueOf(bSuccess) );
- return bSuccess;
-}
-// -------------------------------------------------------------------------
-
-sal_Int32 SAL_CALL OEvoabFolderList::getRow( ) throw(SQLException, RuntimeException)
-{
- sal_Bool bRet = fetchRow(m_aRow,*(getTableColumns()));
- EVO_TRACE_STRING("OEvoabFolderList::getRow()::fetchRow() = %s\n", ::rtl::OUString::valueOf(bRet) );
-
- return bRet;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LFolderList.hxx b/connectivity/source/drivers/evoab/LFolderList.hxx
deleted file mode 100644
index f6cb1ac985ea..000000000000
--- a/connectivity/source/drivers/evoab/LFolderList.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _CONNECTIVITY_EVOAB_LEVOABFOLDERLIST_HXX_
-#define _CONNECTIVITY_EVOAB_LEVOABFOLDERLIST_HXX_
-
-#include "connectivity/sdbcx/VColumn.hxx"
-#include "connectivity/CommonTools.hxx"
-#include <tools/urlobj.hxx>
-#include "LTable.hxx"
-#include "TResultSetHelper.hxx"
-
-
-namespace connectivity
-{
- namespace evoab
- {
- //==================================================================
- // Derivation of String with overloaded GetToken/GetTokenCount methods
- // Especially for FLAT FILE-Format: Strings can be quoted
- //==================================================================
-
- class OEvoabConnection;
-
- class OEvoabFolderList
- {
- // maps a row postion to a file position
- ::std::vector<sal_Int32> m_aTypes; // holds all type for columns just to avoid to ask the propertyset
- ::std::vector<sal_Int32> m_aPrecisions; // same as aboth
- ::std::vector<sal_Int32> m_aScales;
- QuotedTokenizedString m_aCurrentLine;
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xNumberFormatter;
- sal_Int32 m_nFilePos; // current IResultSetHelper::Movement
- SvStream* m_pFileStream;
- OEvoabConnection* m_pConnection;
- ::rtl::Reference<OSQLColumns> m_aColumns;
- OValueRow m_aRow;
- sal_Bool m_bIsNull;
-
- private:
- void fillColumns(const ::com::sun::star::lang::Locale& _aLocale);
- sal_Bool CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo);
-
- sal_Bool fetchRow(OValueRow _rRow,const OSQLColumns& _rCols);
- sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition);
-
- public:
-
- OEvoabFolderList( OEvoabConnection* _pConnection);
-
- OEvoabConnection* getConnection() const { return m_pConnection;}
- ::rtl::Reference<OSQLColumns> getTableColumns() const {return m_aColumns;}
- void construct(); // can throw any exception
- static SvStream* createStream_simpleError( const String& _rFileName, StreamMode _eOpenMode);
- void initializeRow(sal_Int32 _nColumnCount);
- void checkIndex(sal_Int32 _nColumnIndex ) throw(::com::sun::star::sdbc::SQLException);
- const ORowSetValue& getValue(sal_Int32 _nColumnIndex ) throw(::com::sun::star::sdbc::SQLException);
- ::rtl::OUString SAL_CALL getString( sal_Int32 _nColumnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- sal_Int32 SAL_CALL getInt( sal_Int32 _nColumnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- sal_Bool SAL_CALL first( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- sal_Bool SAL_CALL next( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- sal_Int32 SAL_CALL getRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
-
- };
- }
-}
-#endif // _CONNECTIVITY_EVOAB_LEVOABFOLDERLIST_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LNoException.cxx b/connectivity/source/drivers/evoab/LNoException.cxx
deleted file mode 100644
index 3b223ddd943b..000000000000
--- a/connectivity/source/drivers/evoab/LNoException.cxx
+++ /dev/null
@@ -1,325 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-#include "LTable.hxx"
-#include "LConnection.hxx"
-
-using namespace connectivity;
-using namespace connectivity::evoab;
-
-//------------------------------------------------------------------
-xub_StrLen OEvoabString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel ) const
-{
- if ( !Len() )
- return 0;
-
- xub_StrLen nTokCount = 1;
- sal_Bool bStart = sal_True; // Are we on the fist character of the token?
- sal_Bool bInString = sal_False; // Are we within a (cStrDel delimited) string?
-
- // Search for the first not-matching character (search ends at the end of string)
- for( xub_StrLen i = 0; i < Len(); i++ )
- {
- if (bStart)
- {
- bStart = sal_False;
- // First character a string delimiter?
- if ((*this).GetChar(i) == cStrDel)
- {
- bInString = sal_True; // then we are within a string!
- continue; // read next character!
- }
- }
-
- if (bInString) {
- // If we see the string delimiter ...
- if ( (*this).GetChar(i) == cStrDel )
- {
- if ((i+1 < Len()) && ((*this).GetChar(i+1) == cStrDel))
- {
- // doubled string-delimiter:
- i++; // no end of string, skip next character.
- }
- else
- {
- // end of String
- bInString = sal_False;
- }
- }
- } else {
- // if the token character matches, then raise TokCount
- if ( (*this).GetChar(i) == cTok )
- {
- nTokCount++;
- bStart = sal_True;
- }
- }
- }
- //OSL_TRACE("OEvoabString::nTokCount = %d\n", ((OUtoCStr(::rtl::OUString(nTokCount))) ? (OUtoCStr(::rtl::OUString(nTokCount))):("NULL")) );
-
- return nTokCount;
-}
-
-//------------------------------------------------------------------
-void OEvoabString::GetTokenSpecial( String& _rStr,xub_StrLen& nStartPos, sal_Unicode cTok, sal_Unicode cStrDel ) const
-{
- _rStr.Erase();
- xub_StrLen nLen = Len();
- if ( nLen )
- {
- sal_Bool bInString = (nStartPos < nLen) && ((*this).GetChar(nStartPos) == cStrDel); // are we within a (cStrDel delimited) String?
-
- // Is the first character a String-Delimiter?
- if (bInString )
- ++nStartPos; // skip the character!
- // Search until end of string for the first not-matching character
- for( xub_StrLen i = nStartPos; i < nLen; ++i )
- {
- if (bInString)
- {
- // If we see the String-Delimiter ...
- if ( (*this).GetChar(i) == cStrDel )
- {
- if ((i+1 < nLen) && ((*this).GetChar(i+1) == cStrDel))
- {
- // doubled String-Delimiter:
- ++i; // no end of String, skip next character
- _rStr += (*this).GetChar(i); // Character belongs to Result-String
- }
- else
- {
- // end of String
- bInString = sal_False;
- }
- }
- else
- {
- _rStr += (*this).GetChar(i); // Character belongs to Result-String
- }
-
- }
- else
- {
- // Does the Token-character match, then raise nTok
- if ( (*this).GetChar(i) == cTok )
- {
- // Early termination of loop possible, because we found what we were looking for.
- nStartPos = i+1;
- break;
- }
- else
- {
- _rStr += (*this).GetChar(i); // Character belongs to Result-String
- }
- }
- }
- }
-}
-// -----------------------------------------------------------------------------
-void OEvoabTable::refreshIndexes()
-{
-}
-// -----------------------------------------------------------------------------
-sal_Bool OEvoabTable::checkHeaderLine()
-{
- if (m_nFilePos == 0 && ((OEvoabConnection*)m_pConnection)->isHeaderLine())
- {
- sal_Bool bRead2;
- do
- {
- bRead2 = m_pFileStream->ReadByteStringLine(m_aCurrentLine,m_pConnection->getTextEncoding());
- }
- while(bRead2 && !m_aCurrentLine.Len());
-
- m_nFilePos = m_pFileStream->Tell();
- if (m_pFileStream->IsEof())
- return sal_False;
- }
- return sal_True;
-}
-//------------------------------------------------------------------
-sal_Bool OEvoabTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos)
-{
- //OSL_TRACE("OEvoabTable::(before SeekRow)m_aCurrentLine = %d\n", ((OUtoCStr(::rtl::OUString(m_aCurrentLine))) ? (OUtoCStr(::rtl::OUString(m_aCurrentLine))):("NULL")) );
-
- if ( !m_pFileStream )
- return sal_False;
- OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
- // ----------------------------------------------------------
- // prepare positioning:
- //OSL_TRACE("OEvoabTable::(before SeekRow,m_pFileStriam Exist)m_aCurrentLine = %d\n", ((OUtoCStr(::rtl::OUString(m_aCurrentLine))) ? (OUtoCStr(::rtl::OUString(m_aCurrentLine))):("NULL")) );
-
- m_nFilePos = nCurPos;
-
- switch(eCursorPosition)
- {
- case IResultSetHelper::FIRST:
- m_nFilePos = 0;
- m_nRowPos = 1;
- // run through
- case IResultSetHelper::NEXT:
- if(eCursorPosition != IResultSetHelper::FIRST)
- ++m_nRowPos;
- m_pFileStream->Seek(m_nFilePos);
- if (m_pFileStream->IsEof() || !checkHeaderLine())
- {
- m_nMaxRowCount = m_nRowPos;
- return sal_False;
- }
-
- m_aRowToFilePos.insert(::std::map<sal_Int32,sal_Int32>::value_type(m_nRowPos,m_nFilePos));
-
- m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
- if (m_pFileStream->IsEof())
- {
- m_nMaxRowCount = m_nRowPos;
- return sal_False;
- }
- nCurPos = m_pFileStream->Tell();
- break;
- case IResultSetHelper::PRIOR:
- --m_nRowPos;
- if(m_nRowPos > 0)
- {
- m_nFilePos = m_aRowToFilePos.find(m_nRowPos)->second;
- m_pFileStream->Seek(m_nFilePos);
- if (m_pFileStream->IsEof() || !checkHeaderLine())
- return sal_False;
- m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
- if (m_pFileStream->IsEof())
- return sal_False;
- nCurPos = m_pFileStream->Tell();
- }
- else
- m_nRowPos = 0;
-
- break;
-
- break;
- case IResultSetHelper::LAST:
- if(m_nMaxRowCount)
- {
- m_nFilePos = m_aRowToFilePos.rbegin()->second;
- m_nRowPos = m_aRowToFilePos.rbegin()->first;
- m_pFileStream->Seek(m_nFilePos);
- if (m_pFileStream->IsEof() || !checkHeaderLine())
- return sal_False;
- m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
- if (m_pFileStream->IsEof())
- return sal_False;
- nCurPos = m_pFileStream->Tell();
- }
- else
- {
- while(seekRow(IResultSetHelper::NEXT,1,nCurPos)) ; // run through after last row
- // now I know all
- seekRow(IResultSetHelper::PRIOR,1,nCurPos);
- }
- break;
- case IResultSetHelper::RELATIVE:
- if(nOffset > 0)
- {
- for(sal_Int32 i = 0;i<nOffset;++i)
- seekRow(IResultSetHelper::NEXT,1,nCurPos);
- }
- else if(nOffset < 0)
- {
- for(sal_Int32 i = nOffset;i;++i)
- seekRow(IResultSetHelper::PRIOR,1,nCurPos);
- }
- break;
- case IResultSetHelper::ABSOLUTE:
- {
- if(nOffset < 0)
- nOffset = m_nRowPos + nOffset;
- ::std::map<sal_Int32,sal_Int32>::const_iterator aIter = m_aRowToFilePos.find(nOffset);
- if(aIter != m_aRowToFilePos.end())
- {
- m_nFilePos = aIter->second;
- m_pFileStream->Seek(m_nFilePos);
- if (m_pFileStream->IsEof() || !checkHeaderLine())
- return sal_False;
- m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
- if (m_pFileStream->IsEof())
- return sal_False;
- nCurPos = m_pFileStream->Tell();
- }
- else if(m_nMaxRowCount && nOffset > m_nMaxRowCount) // offset is outside the table
- {
- m_nRowPos = m_nMaxRowCount;
- return sal_False;
- }
- else
- {
- aIter = m_aRowToFilePos.upper_bound(nOffset);
- if(aIter == m_aRowToFilePos.end())
- {
- m_nRowPos = m_aRowToFilePos.rbegin()->first;
- nCurPos = m_nFilePos = m_aRowToFilePos.rbegin()->second;
- while(m_nRowPos != nOffset)
- seekRow(IResultSetHelper::NEXT,1,nCurPos);
- }
- else
- {
- --aIter;
- m_nRowPos = aIter->first;
- m_nFilePos = aIter->second;
- m_pFileStream->Seek(m_nFilePos);
- if (m_pFileStream->IsEof() || !checkHeaderLine())
- return sal_False;
- m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
- if (m_pFileStream->IsEof())
- return sal_False;
- nCurPos = m_pFileStream->Tell();
- }
- }
- }
-
- break;
- case IResultSetHelper::BOOKMARK:
- m_pFileStream->Seek(nOffset);
- if (m_pFileStream->IsEof())
- return sal_False;
-
- m_nFilePos = m_pFileStream->Tell(); // save Byte-Position in the file (at start of line)
- m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
- if (m_pFileStream->IsEof())
- return sal_False;
- nCurPos = m_pFileStream->Tell();
- break;
- }
-
- //OSL_TRACE("OEvoabTable::(after SeekRow)m_aCurrentLine = %d\n", ((OUtoCStr(::rtl::OUString(m_aCurrentLine))) ? (OUtoCStr(::rtl::OUString(m_aCurrentLine))):("NULL")) );
-
- return sal_True;
-}
-// -----------------------------------------------------------------------------
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LPreparedStatement.cxx b/connectivity/source/drivers/evoab/LPreparedStatement.cxx
deleted file mode 100644
index fee0905e29ab..000000000000
--- a/connectivity/source/drivers/evoab/LPreparedStatement.cxx
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-#include "LPreparedStatement.hxx"
-#include "LResultSet.hxx"
-
-using namespace connectivity::evoab;
-using namespace connectivity::file;
-using namespace ::com::sun::star::uno;
-// -------------------------------------------------------------------------
-OResultSet* OEvoabPreparedStatement::createResultSet()
-{
- return new OEvoabResultSet(this,m_aSQLIterator);
-}
-// -------------------------------------------------------------------------
-IMPLEMENT_SERVICE_INFO(OEvoabPreparedStatement,"com.sun.star.sdbc.driver.evoab.PreparedStatement","com.sun.star.sdbc.PreparedStatement");
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LPreparedStatement.hxx b/connectivity/source/drivers/evoab/LPreparedStatement.hxx
deleted file mode 100644
index 700768c686c0..000000000000
--- a/connectivity/source/drivers/evoab/LPreparedStatement.hxx
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _CONNECTIVITY_EVOAB_LPREPAREDSTATEMENT_HXX_
-#define _CONNECTIVITY_EVOAB_LPREPAREDSTATEMENT_HXX_
-
-#include "file/FPreparedStatement.hxx"
-
-namespace connectivity
-{
- namespace evoab
- {
- class OConnection;
- class OEvoabPreparedStatement : public file::OPreparedStatement
- {
- protected:
- virtual file::OResultSet* createResultSet();
- public:
- OEvoabPreparedStatement( file::OConnection* _pConnection) : file::OPreparedStatement( _pConnection){};
- DECLARE_SERVICE_INFO();
- };
- }
-}
-
-#endif //_CONNECTIVITY_EVOAB_LPREPAREDSTATEMENT_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LResultSet.cxx b/connectivity/source/drivers/evoab/LResultSet.cxx
deleted file mode 100644
index 4ff0e701f8a4..000000000000
--- a/connectivity/source/drivers/evoab/LResultSet.cxx
+++ /dev/null
@@ -1,191 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-#include <com/sun/star/sdbcx/CompareBookmark.hpp>
-#include <com/sun/star/sdbcx/XDeleteRows.hpp>
-#include "LResultSet.hxx"
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <comphelper/sequence.hxx>
-#include <comphelper/types.hxx>
-
-using namespace ::comphelper;
-
-using namespace connectivity::evoab;
-using namespace connectivity::file;
-using namespace ::cppu;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::sdbc;
-using namespace com::sun::star::sdbcx;
-
-//------------------------------------------------------------------------------
-OEvoabResultSet::OEvoabResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator)
- : file::OResultSet(pStmt,_aSQLIterator)
- ,m_bBookmarkable(sal_True)
-{
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISBOOKMARKABLE), PROPERTY_ID_ISBOOKMARKABLE, PropertyAttribute::READONLY,&m_bBookmarkable, ::getBooleanCppuType());
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL OEvoabResultSet::getImplementationName( ) throw ( RuntimeException)
-{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.evoab.ResultSet"));
-}
-// -------------------------------------------------------------------------
-Sequence< ::rtl::OUString > SAL_CALL OEvoabResultSet::getSupportedServiceNames( ) throw( RuntimeException)
-{
- Sequence< ::rtl::OUString > aSupported(2);
- aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ResultSet"));
- aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.ResultSet"));
- return aSupported;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OEvoabResultSet::supportsService( const ::rtl::OUString& _rServiceName ) throw( RuntimeException)
-{
- Sequence< ::rtl::OUString > aSupported(getSupportedServiceNames());
- const ::rtl::OUString* pSupported = aSupported.getConstArray();
- const ::rtl::OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
-}
-// -------------------------------------------------------------------------
-Any SAL_CALL OEvoabResultSet::queryInterface( const Type & rType ) throw(RuntimeException)
-{
- if(rType == ::getCppuType((const Reference<XDeleteRows>*)0) || rType == ::getCppuType((const Reference<XResultSetUpdate>*)0)
- || rType == ::getCppuType((const Reference<XRowUpdate>*)0))
- return Any();
-
- Any aRet = OResultSet::queryInterface(rType);
- return aRet.hasValue() ? aRet : OEvoabResultSet_BASE::queryInterface(rType);
-}
-// -------------------------------------------------------------------------
-Sequence< Type > SAL_CALL OEvoabResultSet::getTypes( ) throw( RuntimeException)
-{
- Sequence< Type > aTypes = OResultSet::getTypes();
- ::std::vector<Type> aOwnTypes;
- aOwnTypes.reserve(aTypes.getLength());
- const Type* pBegin = aTypes.getConstArray();
- const Type* pEnd = pBegin + aTypes.getLength();
- for(;pBegin != pEnd;++pBegin)
- {
- if(!(*pBegin == ::getCppuType((const Reference<XDeleteRows>*)0) ||
- *pBegin == ::getCppuType((const Reference<XResultSetUpdate>*)0) ||
- *pBegin == ::getCppuType((const Reference<XRowUpdate>*)0)))
- {
- aOwnTypes.push_back(*pBegin);
- }
- }
- Type *pTypes = aOwnTypes.empty() ? 0 : &aOwnTypes[0];
- Sequence< Type > aRet(pTypes, aOwnTypes.size());
- return ::comphelper::concatSequences(aRet,OEvoabResultSet_BASE::getTypes());
-}
-
-// -------------------------------------------------------------------------
-// XRowLocate
-Any SAL_CALL OEvoabResultSet::getBookmark( ) throw( SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- return makeAny((sal_Int32)(m_aRow->get())[0]->getValue());
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OEvoabResultSet::moveToBookmark( const Any& bookmark ) throw( SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False;
-
- return Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),sal_True);
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OEvoabResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw( SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False;
-
- Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),sal_False);
-
- return relative(rows);
-}
-
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL OEvoabResultSet::compareBookmarks( const Any& lhs, const Any& rhs ) throw( SQLException, RuntimeException)
-{
- return (lhs == rhs) ? 0 : 2;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OEvoabResultSet::hasOrderedBookmarks( ) throw( SQLException, RuntimeException)
-{
- return sal_True;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL OEvoabResultSet::hashBookmark( const Any& bookmark ) throw( SQLException, RuntimeException)
-{
- return comphelper::getINT32(bookmark);
-}
-// -------------------------------------------------------------------------
-IPropertyArrayHelper* OEvoabResultSet::createArrayHelper( ) const
-{
- Sequence< Property > aProps;
- describeProperties(aProps);
- return new ::cppu::OPropertyArrayHelper(aProps);
-}
-// -------------------------------------------------------------------------
-IPropertyArrayHelper & OEvoabResultSet::getInfoHelper()
-{
- return *OEvoabResultSet_BASE3::getArrayHelper();
-}
-// -----------------------------------------------------------------------------
-void SAL_CALL OEvoabResultSet::acquire() throw()
-{
- OEvoabResultSet_BASE2::acquire();
-}
-// -----------------------------------------------------------------------------
-void SAL_CALL OEvoabResultSet::release() throw()
-{
- OEvoabResultSet_BASE2::release();
-}
-// -----------------------------------------------------------------------------
-::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OEvoabResultSet::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException)
-{
- return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
-}
-// -----------------------------------------------------------------------------
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LResultSet.hxx b/connectivity/source/drivers/evoab/LResultSet.hxx
deleted file mode 100644
index ebd64292e911..000000000000
--- a/connectivity/source/drivers/evoab/LResultSet.hxx
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _CONNECTIVITY_EVOAB_LRESULTSET_HXX_
-#define _CONNECTIVITY_EVOAB_LRESULTSET_HXX_
-
-#include "file/FResultSet.hxx"
-#include <com/sun/star/sdbcx/XRowLocate.hpp>
-#include <cppuhelper/implbase1.hxx>
-
-namespace connectivity
-{
- namespace evoab
- {
- class OEvoabResultSet;
- // these typedef's are only necessary for the compiler
- typedef ::cppu::ImplHelper1< ::com::sun::star::sdbcx::XRowLocate> OEvoabResultSet_BASE;
- typedef file::OResultSet OEvoabResultSet_BASE2;
- typedef ::comphelper::OPropertyArrayUsageHelper<OEvoabResultSet> OEvoabResultSet_BASE3;
-
-
- class OEvoabResultSet : public OEvoabResultSet_BASE2,
- public OEvoabResultSet_BASE,
- public OEvoabResultSet_BASE3
- {
- sal_Bool m_bBookmarkable;
- protected:
- // OPropertyArrayUsageHelper
- virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
- // OPropertySetHelper
- virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
- public:
- DECLARE_SERVICE_INFO();
-
- OEvoabResultSet( file::OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator);
-
- // XInterface
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL acquire() throw();
- virtual void SAL_CALL release() throw();
- //XTypeProvider
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
- // XPropertySet
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
-
- // XRowLocate
- virtual ::com::sun::star::uno::Any SAL_CALL getBookmark( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL compareBookmarks( const ::com::sun::star::uno::Any& first, const ::com::sun::star::uno::Any& second ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL hashBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- };
- }
-}
-#endif //_CONNECTIVITY_EVOAB_LRESULTSET_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LServices.cxx b/connectivity/source/drivers/evoab/LServices.cxx
deleted file mode 100644
index a9d413ec762a..000000000000
--- a/connectivity/source/drivers/evoab/LServices.cxx
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-#include "LDriver.hxx"
-#include <cppuhelper/factory.hxx>
-
-using namespace connectivity::evoab;
-using ::rtl::OUString;
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
-using ::com::sun::star::lang::XSingleServiceFactory;
-using ::com::sun::star::lang::XMultiServiceFactory;
-
-typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
- (
- const Reference< XMultiServiceFactory > & rServiceManager,
- const OUString & rComponentName,
- ::cppu::ComponentInstantiation pCreateFunction,
- const Sequence< OUString > & rServiceNames,
- rtl_ModuleCount* _pT
- );
-
-//---------------------------------------------------------------------------------------
-struct ProviderRequest
-{
- Reference< XSingleServiceFactory > xRet;
- Reference< XMultiServiceFactory > const xServiceManager;
- OUString const sImplementationName;
-
- ProviderRequest(
- void* pServiceManager,
- sal_Char const* pImplementationName
- )
- : xServiceManager(reinterpret_cast<XMultiServiceFactory*>(pServiceManager))
- , sImplementationName(OUString::createFromAscii(pImplementationName))
- {
- }
-
- inline
- sal_Bool CREATE_PROVIDER(
- const OUString& Implname,
- const Sequence< OUString > & Services,
- ::cppu::ComponentInstantiation Factory,
- createFactoryFunc creator
- )
- {
- if (!xRet.is() && (Implname == sImplementationName))
- try
- {
- xRet = creator( xServiceManager, sImplementationName,Factory, Services,0);
- }
- catch(...)
- {
- }
- return xRet.is();
- }
-
- void* getProvider() const { return xRet.get(); }
-};
-
-//---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
- const sal_Char **ppEnvTypeName,
- uno_Environment ** /*ppEnv*/
- )
-{
- *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-}
-
-//---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
- const sal_Char* pImplementationName,
- void* pServiceManager,
- void* /*pRegistryKey*/)
-{
- void* pRet = 0;
- if (pServiceManager)
- {
- ProviderRequest aReq(pServiceManager,pImplementationName);
-
- aReq.CREATE_PROVIDER(
- OEvoabDriver::getImplementationName_Static(),
- OEvoabDriver::getSupportedServiceNames_Static(),
- OEvoabDriver_CreateInstance, ::cppu::createSingleFactory)
- ;
-
- if(aReq.xRet.is())
- aReq.xRet->acquire();
-
- pRet = aReq.getProvider();
- }
-
- return pRet;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LStatement.cxx b/connectivity/source/drivers/evoab/LStatement.cxx
deleted file mode 100644
index a6350f11139b..000000000000
--- a/connectivity/source/drivers/evoab/LStatement.cxx
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-#include "LStatement.hxx"
-#include "LResultSet.hxx"
-
-using namespace connectivity::evoab;
-using namespace connectivity::file;
-using namespace com::sun::star::uno;
-// -------------------------------------------------------------------------
-OResultSet* OEvoabStatement::createResultSet()
-{
- return new OEvoabResultSet(this,m_aSQLIterator);
-}
-// -------------------------------------------------------------------------
-IMPLEMENT_SERVICE_INFO(OEvoabStatement,"com.sun.star.sdbc.driver.evoab.Statement","com.sun.star.sdbc.Statement");
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LStatement.hxx b/connectivity/source/drivers/evoab/LStatement.hxx
deleted file mode 100644
index a870c4722034..000000000000
--- a/connectivity/source/drivers/evoab/LStatement.hxx
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _CONNECTIVITY_EVOAB_LSTATEMENT_HXX_
-#define _CONNECTIVITY_EVOAB_LSTATEMENT_HXX_
-
-#include "file/FStatement.hxx"
-
-namespace connectivity
-{
- namespace evoab
- {
- class OConnection;
- class OEvoabStatement : public file::OStatement
- {
- protected:
- virtual file::OResultSet* createResultSet();
- public:
- OEvoabStatement( file::OConnection* _pConnection) : file::OStatement( _pConnection){}
- DECLARE_SERVICE_INFO();
- };
- }
-}
-
-#endif //_CONNECTIVITY_EVOAB_LSTATEMENT_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LTable.cxx b/connectivity/source/drivers/evoab/LTable.cxx
deleted file mode 100644
index a8cd887bc26b..000000000000
--- a/connectivity/source/drivers/evoab/LTable.cxx
+++ /dev/null
@@ -1,867 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-
-#include <ctype.h>
-#include "LTable.hxx"
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/ucb/XContentAccess.hpp>
-#include <svl/converter.hxx>
-#include "LConnection.hxx"
-#include "LColumns.hxx"
-#include <osl/thread.h>
-#include <tools/config.hxx>
-#include <comphelper/sequence.hxx>
-#include <svl/zforlist.hxx>
-#include <rtl/math.hxx>
-#include <stdio.h> //sprintf
-#include <comphelper/extract.hxx>
-#include <comphelper/numbers.hxx>
-#include "LDriver.hxx"
-#include <com/sun/star/util/NumberFormat.hpp>
-#include <unotools/configmgr.hxx>
-#include <i18npool/mslangid.hxx>
-#include "connectivity/dbconversion.hxx"
-#include <comphelper/types.hxx>
-#include <unotools/syslocale.hxx>
-#include "LDebug.hxx"
-#include <map>
-
-using namespace ::comphelper;
-using namespace connectivity;
-using namespace connectivity::evoab;
-using namespace connectivity::file;
-using namespace ::cppu;
-using namespace utl;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::ucb;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::sdbcx;
-using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::lang;
-
-// -------------------------------------------------------------------------
-void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
-{
- sal_Bool bRead = sal_True;
-
- QuotedTokenizedString aHeaderLine;
- OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
- if (pConnection->isHeaderLine())
- {
- while(bRead && !aHeaderLine.Len())
- {
- bRead = m_pFileStream->ReadByteStringLine(aHeaderLine,pConnection->getTextEncoding());
- }
- }
-
- // read first row
- QuotedTokenizedString aFirstLine;
- bRead = m_pFileStream->ReadByteStringLine(aFirstLine,pConnection->getTextEncoding());
-
- if (!pConnection->isHeaderLine() || !aHeaderLine.Len())
- {
- while(bRead && !aFirstLine.Len())
- {
- bRead = m_pFileStream->ReadByteStringLine(aFirstLine,pConnection->getTextEncoding());
- }
- // use first row as headerline because we need the number of columns
- aHeaderLine = aFirstLine;
- }
- // column count
- xub_StrLen nFieldCount = aHeaderLine.GetTokenCount(pConnection->getFieldDelimiter(),pConnection->getStringDelimiter());
-
- if(!m_aColumns.is())
- m_aColumns = new OSQLColumns();
- else
- m_aColumns->get().clear();
-
- m_aTypes.clear();
- m_aPrecisions.clear();
- m_aScales.clear();
- // reserve some space
- m_aColumnRawNames.reserve(nFieldCount);
- m_aColumns->get().reserve(nFieldCount);
- m_aTypes.reserve(nFieldCount);
- m_aPrecisions.reserve(nFieldCount);
- m_aScales.reserve(nFieldCount);
-
- sal_Bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers();
- CharClass aCharClass(pConnection->getDriver()->getFactory(),_aLocale);
- // read description
- sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter();
- sal_Unicode cThousandDelimiter = pConnection->getThousandDelimiter();
- String aColumnName;
- ::rtl::OUString aTypeName;
- ::comphelper::UStringMixEqual aCase(bCase);
- xub_StrLen nStartPosHeaderLine = 0; // use for eficient way to get the tokens
- xub_StrLen nStartPosFirstLine = 0; // use for eficient way to get the tokens
- xub_StrLen nStartPosFirstLine2 = 0;
- for (xub_StrLen i = 0; i < nFieldCount; i++)
- {
- if (pConnection->isHeaderLine())
- {
- aHeaderLine.GetTokenSpecial(aColumnName,nStartPosHeaderLine,pConnection->getFieldDelimiter(),pConnection->getStringDelimiter());
- }
- else
- {
- // no column name so ...
- aColumnName = 'C';
- aColumnName += String::CreateFromInt32(i+1);
- }
- //OSL_TRACE("OEvoabTable::aColumnName = %s\n", ((OUtoCStr(::rtl::OUString(aColumnName))) ? (OUtoCStr(::rtl::OUString(aColumnName))):("NULL")) );
-
- sal_Int32 eType;
- sal_uInt16 nPrecision = 0;
- sal_uInt16 nScale = 0;
-
- sal_Bool bNumeric = sal_False;
- sal_uIntPtr nIndex = 0;
-
- // first without fielddelimiter
- String aField;
- aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine,pConnection->getFieldDelimiter(),'\0');
- //OSL_TRACE("OEvoabTable::aField = %s\n", ((OUtoCStr(::rtl::OUString(aField))) ? (OUtoCStr(::rtl::OUString(aField))):("NULL")) );
-
- if (aField.Len() == 0 ||
- (pConnection->getStringDelimiter() && pConnection->getStringDelimiter() == aField.GetChar(0)))
- {
- bNumeric = sal_False;
- }
- else
- {
- String aField2;
- if ( pConnection->getStringDelimiter() != '\0' )
- aFirstLine.GetTokenSpecial(aField2,nStartPosFirstLine2,pConnection->getFieldDelimiter(),pConnection->getStringDelimiter());
- else
- aField2 = aField;
-
- //OSL_TRACE("OEvoabTable::aField2 = %s\n", ((OUtoCStr(::rtl::OUString(aField2))) ? (OUtoCStr(::rtl::OUString(aField2))):("NULL")) );
-
- if (aField2.Len() == 0)
- {
- bNumeric = sal_False;
- }
- else
- {
- bNumeric = sal_True;
- xub_StrLen nDot = 0;
- for (xub_StrLen j = 0; j < aField2.Len(); j++)
- {
- sal_Unicode c = aField2.GetChar(j);
- // only digits, decimalpoint and thousands-delimiter
- if ((!cDecimalDelimiter || c != cDecimalDelimiter) &&
- (!cThousandDelimiter || c != cThousandDelimiter) &&
- !aCharClass.isDigit(aField2,j))
- {
- bNumeric = sal_False;
- break;
- }
- if (cDecimalDelimiter && c == cDecimalDelimiter)
- {
- nPrecision = 15; // we have an decimal value
- nScale = 2;
- nDot++;
- }
- }
-
- if (nDot > 1) // if there is more than one dot it isn't a number
- bNumeric = sal_False;
- if (bNumeric && cThousandDelimiter)
- {
- // is the delimiter given correctly
- String aValue = aField2.GetToken(0,cDecimalDelimiter);
- for (sal_Int32 j = aValue.Len() - 4; j >= 0; j -= 4)
- {
- sal_Unicode c = aValue.GetChar(j);
- // only digits, decimalpoint and thousands-delimiter?
- if (c == cThousandDelimiter && j)
- continue;
- else
- {
- bNumeric = sal_False;
- break;
- }
- }
- }
-
- // Now it might still be a Date-field
- if (!bNumeric)
- {
- try
- {
- nIndex = m_xNumberFormatter->detectNumberFormat(::com::sun::star::util::NumberFormat::ALL,aField2);
- }
- catch(Exception&)
- {
- }
- }
- }
- }
-
- sal_Int32 nFlags = 0;
- if (bNumeric)
- {
- if (cDecimalDelimiter)
- {
- if(nPrecision)
- {
- eType = DataType::DECIMAL;
- aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DECIMAL"));
- }
- else
- {
- eType = DataType::DOUBLE;
- aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOUBLE"));
- }
- }
- else
- eType = DataType::INTEGER;
- nFlags = ColumnSearch::BASIC;
- }
- else
- {
-
- switch (comphelper::getNumberFormatType(m_xNumberFormatter,nIndex))
- {
- case NUMBERFORMAT_DATE:
- eType = DataType::DATE;
- aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE"));
- break;
- case NUMBERFORMAT_DATETIME:
- eType = DataType::TIMESTAMP;
- aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"));
- break;
- case NUMBERFORMAT_TIME:
- eType = DataType::TIME;
- aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME"));
- break;
- default:
- eType = DataType::VARCHAR;
- nPrecision = 0; // nyi: Data can be longer
- nScale = 0;
- aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR"));
- };
- nFlags |= ColumnSearch::CHAR;
- }
-
- // check if the columname already exists
- String aAlias(aColumnName);
- OSQLColumns::Vector::const_iterator aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase);
- sal_Int32 nExprCnt = 0;
- while(aFind != m_aColumns->get().end())
- {
- (aAlias = aColumnName) += String::CreateFromInt32(++nExprCnt);
- aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase);
- }
-
- m_aColumnRawNames.push_back(::rtl::OUString(aAlias));
-
- //~ sdbcx::OColumn* pColumn = new sdbcx::OColumn(aAlias,aTypeName,::rtl::OUString(),
- //~ ColumnValue::NULLABLE,
- //~ nPrecision,
- //~ nScale,
- //~ eType,
- //~ sal_False,
- //~ sal_False,
- //~ sal_False,
- //~ bCase);
- //~ Reference< XPropertySet> xCol = pColumn;
- //~ m_aColumns->push_back(xCol);
- m_aTypes.push_back(eType);
- m_aPrecisions.push_back(nPrecision);
- m_aScales.push_back(nScale);
- }
- setColumnAliases();
- m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN);
-}
-// -------------------------------------------------------------------------
-OEvoabTable::OEvoabTable(sdbcx::OCollection* _pTables,OEvoabConnection* _pConnection) : OEvoabTable_BASE(_pTables,_pConnection)
-{
-
-}
-// -------------------------------------------------------------------------
-OEvoabTable::OEvoabTable(sdbcx::OCollection* _pTables,OEvoabConnection* _pConnection,
- const ::rtl::OUString& _Name,
- const ::rtl::OUString& _Type,
- const ::rtl::OUString& _Description ,
- const ::rtl::OUString& _SchemaName,
- const ::rtl::OUString& _CatalogName
- ) : OEvoabTable_BASE(_pTables,_pConnection,_Name,
- _Type,
- _Description,
- _SchemaName,
- _CatalogName)
- ,m_nRowPos(0)
- ,m_nMaxRowCount(0)
-{
- //~ OSL_TRACE("OEvoabTable::(in constructor)_Name = %s\n", ((OUtoCStr(_Name)) ? (OUtoCStr(_Name)):("NULL")) );
- //~ OSL_TRACE("OEvoabTable::(in constructor)_Type = %s\n", ((OUtoCStr(_Type)) ? (OUtoCStr(_Type)):("NULL")) );
- //~ OSL_TRACE("OEvoabTable::(in constructor)_Description = %s\n", ((OUtoCStr(_Description)) ? (OUtoCStr(_Description)):("NULL")) );
- //~ OSL_TRACE("OEvoabTable::(in constructor)_SchemaName = %s\n", ((OUtoCStr(_SchemaName)) ? (OUtoCStr(_SchemaName)):("NULL")) );
- //~ OSL_TRACE("OEvoabTable::(in constructor)_CatalogName = %s\n", ((OUtoCStr(_CatalogName)) ? (OUtoCStr(_CatalogName)):("NULL")) );
-}
-// -----------------------------------------------------------------------------
-void OEvoabTable::construct()
-{
- SvtSysLocale aLocale;
- ::com::sun::star::lang::Locale aAppLocale(aLocale.GetLocaleDataPtr()->getLocale());
- Sequence< ::com::sun::star::uno::Any > aArg(1);
- aArg[0] <<= aAppLocale;
-
- Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(m_pConnection->getDriver()->getFactory()->createInstanceWithArguments(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatsSupplier")),aArg),UNO_QUERY);
- m_xNumberFormatter = Reference< ::com::sun::star::util::XNumberFormatter >(m_pConnection->getDriver()->getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatter"))),UNO_QUERY);
- m_xNumberFormatter->attachNumberFormatsSupplier(xSupplier);
-
- INetURLObject aURL;
- aURL.SetURL(getEntry());
-
- if(aURL.getExtension() != rtl::OUString(m_pConnection->getExtension()))
- aURL.setExtension(m_pConnection->getExtension());
-
- String aFileName = aURL.GetMainURL(INetURLObject::NO_DECODE);
-
- m_pFileStream = createStream_simpleError( aFileName,STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYWRITE);
-
- if(!m_pFileStream)
- m_pFileStream = createStream_simpleError( aFileName,STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYNONE);
-
- if(m_pFileStream)
- {
- OSL_TRACE("OEvoabTable::construct()::m_pFileStream created\n" );
- m_pFileStream->Seek(STREAM_SEEK_TO_END);
- sal_Int32 nSize = m_pFileStream->Tell();
- m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN);
-
- // Buffer size is dependent on the file-size
- m_pFileStream->SetBufferSize(nSize > 1000000 ? 32768 :
- nSize > 100000 ? 16384 :
- nSize > 10000 ? 4096 : 1024);
- OSL_TRACE("OEvoabTable::construct()::m_pFileStream->Tell() = %d\n", nSize );
-
- fillColumns(aAppLocale);
-
- refreshColumns();
- }
-}
-// -------------------------------------------------------------------------
-String OEvoabTable::getEntry()
-{
- ::rtl::OUString sURL;
- try
- {
- Reference< XResultSet > xDir = m_pConnection->getDir()->getStaticResultSet();
- Reference< XRow> xRow(xDir,UNO_QUERY);
- ::rtl::OUString sName;
- ::rtl::OUString sExt;
-
- INetURLObject aURL;
- xDir->beforeFirst();
- static const ::rtl::OUString s_sSeparator(RTL_CONSTASCII_USTRINGPARAM("/"));
- while(xDir->next())
- {
- sName = xRow->getString(1);
- aURL.SetSmartProtocol(INET_PROT_FILE);
- String sUrl = m_pConnection->getURL() + s_sSeparator + sName;
- aURL.SetSmartURL( sUrl );
-
- // cut the extension
- sExt = aURL.getExtension();
-
- // name and extension have to coincide
- if ( m_pConnection->matchesExtension( sExt ) )
- {
- sName = sName.replaceAt(sName.getLength()-(sExt.getLength()+1),sExt.getLength()+1,::rtl::OUString());
- if ( sName == m_Name )
- {
- Reference< XContentAccess > xContentAccess( xDir, UNO_QUERY );
- sURL = xContentAccess->queryContentIdentifierString();
- break;
- }
- }
- }
- xDir->beforeFirst(); // move back to before first record
- }
- catch(Exception&)
- {
- OSL_ASSERT(0);
- }
- return sURL.getStr();
-}
-// -------------------------------------------------------------------------
-void OEvoabTable::refreshColumns()
-{
- ::osl::MutexGuard aGuard( m_aMutex );
-
- TStringVector aVector;
- aVector.reserve(m_aColumns->get().size());
-
- for(OSQLColumns::Vector::const_iterator aIter = m_aColumns->get().begin();aIter != m_aColumns->get().end();++aIter)
- aVector.push_back(Reference< XNamed>(*aIter,UNO_QUERY)->getName());
-
- if(m_pColumns)
- m_pColumns->reFill(aVector);
- else
- m_pColumns = new OEvoabColumns(this,m_aMutex,aVector);
-
- OSL_TRACE("OEvoabTable::refreshColumns()::end\n" );
-}
-
-// -------------------------------------------------------------------------
-void SAL_CALL OEvoabTable::disposing(void)
-{
- OFileTable::disposing();
- ::osl::MutexGuard aGuard(m_aMutex);
- m_aColumns = NULL;
-}
-// -------------------------------------------------------------------------
-Sequence< Type > SAL_CALL OEvoabTable::getTypes( ) throw(RuntimeException)
-{
- Sequence< Type > aTypes = OTable_TYPEDEF::getTypes();
- ::std::vector<Type> aOwnTypes;
- aOwnTypes.reserve(aTypes.getLength());
- const Type* pBegin = aTypes.getConstArray();
- const Type* pEnd = pBegin + aTypes.getLength();
- for(;pBegin != pEnd;++pBegin)
- {
- if(!(*pBegin == ::getCppuType((const Reference<XKeysSupplier>*)0) ||
- *pBegin == ::getCppuType((const Reference<XRename>*)0) ||
- *pBegin == ::getCppuType((const Reference<XIndexesSupplier>*)0) ||
- *pBegin == ::getCppuType((const Reference<XAlterTable>*)0) ||
- *pBegin == ::getCppuType((const Reference<XDataDescriptorFactory>*)0)))
- {
- aOwnTypes.push_back(*pBegin);
- }
- }
- Type *pTypes = aOwnTypes.empty() ? 0 : &aOwnTypes[0];
- return Sequence< Type >(pTypes, aOwnTypes.size());
-}
-
-// -------------------------------------------------------------------------
-Any SAL_CALL OEvoabTable::queryInterface( const Type & rType ) throw(RuntimeException)
-{
- if( rType == ::getCppuType((const Reference<XKeysSupplier>*)0) ||
- rType == ::getCppuType((const Reference<XIndexesSupplier>*)0) ||
- rType == ::getCppuType((const Reference<XRename>*)0) ||
- rType == ::getCppuType((const Reference<XAlterTable>*)0) ||
- rType == ::getCppuType((const Reference<XDataDescriptorFactory>*)0))
- return Any();
-
- Any aRet = OTable_TYPEDEF::queryInterface(rType);
- return aRet.hasValue() ? aRet : ::cppu::queryInterface(rType,static_cast< ::com::sun::star::lang::XUnoTunnel*> (this));
-}
-
-//--------------------------------------------------------------------------
-Sequence< sal_Int8 > OEvoabTable::getUnoTunnelImplementationId()
-{
- static ::cppu::OImplementationId * pId = 0;
- if (! pId)
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if (! pId)
- {
- static ::cppu::OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
-}
-
-// com::sun::star::lang::XUnoTunnel
-//------------------------------------------------------------------
-sal_Int64 OEvoabTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException)
-{
- return (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
- ? reinterpret_cast< sal_Int64 >( this )
- : OEvoabTable_BASE::getSomething(rId);
-}
-//------------------------------------------------------------------
-sal_Bool OEvoabTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal_Bool bIsTable,sal_Bool bRetrieveData)
-{
- *(_rRow->get())[0] = m_nFilePos;
-
- if (!bRetrieveData)
- return sal_True;
-
- OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
- // Fields:
- xub_StrLen nStartPos = 0;
- String aStr;
- OSQLColumns::Vector::const_iterator aIter = _rCols.get().begin();
- for (sal_Int32 i = 0; aIter != _rCols.get().end();++aIter, ++i)
- {
- m_aCurrentLine.GetTokenSpecial(aStr,nStartPos,pConnection->getFieldDelimiter(),pConnection->getStringDelimiter());
- //OSL_TRACE("OEvoabTable::fetchRow()::aStr = %s\n", ((OUtoCStr(::rtl::OUString(aStr))) ? (OUtoCStr(::rtl::OUString(aStr))):("NULL")) );
-
- if (aStr.Len() == 0)
- (_rRow->get())[i+1]->setNull();
- else
- {
- // Lengths for each data-type:
- sal_Int32 nLen,
- nType = 0;
- if(bIsTable)
- {
- nLen = m_aPrecisions[i];
- nType = m_aTypes[i];
- }
- else
- {
- Reference< XPropertySet> xColumn = *aIter;
- xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nLen;
- xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nType;
- }
- switch(nType)
- {
- case DataType::TIMESTAMP:
- case DataType::DATE:
- case DataType::TIME:
- {
- double nRes = 0.0;
- try
- {
- nRes = m_xNumberFormatter->convertStringToNumber(::com::sun::star::util::NumberFormat::ALL,aStr);
- Reference<XPropertySet> xProp(m_xNumberFormatter->getNumberFormatsSupplier()->getNumberFormatSettings(),UNO_QUERY);
- com::sun::star::util::Date aDate;
- xProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NullDate"))) >>= aDate;
-
- switch(nType)
- {
- case DataType::DATE:
- *(_rRow->get())[i+1] = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDate(nRes,aDate));
- break;
- case DataType::TIMESTAMP:
- *(_rRow->get())[i+1] = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDateTime(nRes,aDate));
- break;
- default:
- *(_rRow->get())[i+1] = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(nRes));
- }
- }
- catch(Exception&)
- {
- (_rRow->get())[i+1]->setNull();
- }
- } break;
- case DataType::DOUBLE:
- case DataType::INTEGER:
- case DataType::DECIMAL:
- case DataType::NUMERIC:
- {
- sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter();
- sal_Unicode cThousandDelimiter = pConnection->getThousandDelimiter();
- String aStrConverted;
-
- OSL_ENSURE(cDecimalDelimiter && nType != DataType::INTEGER ||
- !cDecimalDelimiter && nType == DataType::INTEGER,
- "FalscherTyp");
-
- // Convert to standard-notation (DecimalPOINT without Thousands-comma):
- for (xub_StrLen j = 0; j < aStr.Len(); ++j)
- {
- if (cDecimalDelimiter && aStr.GetChar(j) == cDecimalDelimiter)
- aStrConverted += '.';
- else if ( aStr.GetChar(j) == '.' ) // special case, if decimal seperator isn't '.' we have to vut the string after it
- break;
- else if (cThousandDelimiter && aStr.GetChar(j) == cThousandDelimiter)
- {
- // leave out
- }
- else
- aStrConverted += aStr.GetChar(j) ;
- }
- double nVal = ::rtl::math::stringToDouble(aStrConverted.GetBuffer(),',','.',NULL,NULL);
-
- if ( DataType::DECIMAL == nType || DataType::NUMERIC == nType )
- *(_rRow->get())[i+1] = ORowSetValue(String::CreateFromDouble(nVal));
- else
- *(_rRow->get())[i+1] = nVal;
- } break;
-
- default:
- {
- // Copy Value as String in Row-variable
- *(_rRow->get())[i+1] = ORowSetValue(aStr);
- }
- break;
- }
- }
- }
- return sal_True;
-}
-// -----------------------------------------------------------------------------
-sal_Bool OEvoabTable::setColumnAliases()
-{
-
- size_t nSize = m_aColumnRawNames.size();
- if(nSize == 0 || m_aPrecisions.size() != nSize || m_aScales.size() != nSize || m_aTypes.size() != nSize)
- return sal_False;
- m_aColumns->get().clear();
- m_aColumns->get().reserve(nSize);
- ::rtl::OUString aColumnReadName;
- ::rtl::OUString aColumnHeadlineName;
- ::rtl::OUString aColumnDisplayName;
- ::rtl::OUString aColumnFinalName;
- String sColumnFinalName;
-
- const TStringVector& colAliasNames = ((OEvoabConnection*)m_pConnection)->getColumnAlias().getAlias();
- const ::std::map< ::rtl::OUString, ::rtl::OUString > & colMap = ((OEvoabConnection*)m_pConnection)->getColumnAlias().getAliasMap();
- ::osl::MutexGuard aGuard( m_aMutex );
-
- for(size_t i = 0;i < nSize; ++i)
- {
- aColumnReadName = m_aColumnRawNames[i];
- //OSL_TRACE("OEvoabTable::getColumnRows()::aColumnReadName = %s\n", ((OUtoCStr(aColumnReadName)) ? (OUtoCStr(aColumnReadName)):("NULL")) );
- sal_Bool bFound = sal_False;
- for ( size_t j = 0; j < colAliasNames.size(); ++j )
- {
- aColumnDisplayName = colAliasNames[j];
-
- ::std::map< ::rtl::OUString, ::rtl::OUString >::const_iterator aPos = colMap.find( aColumnDisplayName );
- if ( colMap.end() != aPos )
- {
- aColumnHeadlineName = aPos->second;
- EVO_TRACE_STRING( "OEvoabTable::getColumnRows()::aColumnDisplayName = %s\n", aColumnDisplayName );
- EVO_TRACE_STRING( "OEvoabTable::getColumnRows()::aColumnHeadlineName= %s\n", aColumnHeadlineName );
- if(aColumnReadName == aColumnHeadlineName)
- {
- //OSL_TRACE("OEvoabTable::getColumnRows()::aColumnHeadlineName = %s\n", ((OUtoCStr(aColumnHeadlineName)) ? (OUtoCStr(aColumnHeadlineName)):("NULL")) );
- //OSL_TRACE("OEvoabTable::getColumnRows()::aColumnDisplayName = %s\n", ((OUtoCStr(aColumnDisplayName)) ? (OUtoCStr(aColumnDisplayName)):("NULL")) );
- aColumnFinalName = aColumnDisplayName;
- bFound = sal_True;
- //OSL_TRACE("OEvoabTable::getColumnRows()::j = %d\n", j );
-
- break;
- }
- }
- else
- OSL_FAIL( "OEvoabTable::setColumnAliases: did not find one of the aliases!" );
- }
- if(!bFound)
- aColumnFinalName = aColumnReadName;
- sColumnFinalName = aColumnFinalName;
-
- sal_Bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers();
- ::rtl::OUString aTypeName;
- aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR"));
- sdbcx::OColumn* pColumn = new sdbcx::OColumn(sColumnFinalName,aTypeName,::rtl::OUString(),
- ColumnValue::NULLABLE,
- m_aPrecisions[i],
- m_aScales[i],
- m_aTypes[i],
- sal_False,
- sal_False,
- sal_False,
- bCase);
- Reference< XPropertySet> xCol = pColumn;
- m_aColumns->get().push_back(xCol);
- }
- return sal_True;
-}
-// -----------------------------------------------------------------------------
-void OEvoabTable::refreshIndexes()
-{
-}
-// -----------------------------------------------------------------------------
-sal_Bool OEvoabTable::checkHeaderLine()
-{
- if (m_nFilePos == 0 && ((OEvoabConnection*)m_pConnection)->isHeaderLine())
- {
- sal_Bool bRead2;
- do
- {
- bRead2 = m_pFileStream->ReadByteStringLine(m_aCurrentLine,m_pConnection->getTextEncoding());
- }
- while(bRead2 && !m_aCurrentLine.Len());
-
- m_nFilePos = m_pFileStream->Tell();
- if (m_pFileStream->IsEof())
- return sal_False;
- }
- return sal_True;
-}
-//------------------------------------------------------------------
-sal_Bool OEvoabTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos)
-{
- //OSL_TRACE("OEvoabTable::(before SeekRow)m_aCurrentLine = %d\n", ((OUtoCStr(::rtl::OUString(m_aCurrentLine))) ? (OUtoCStr(::rtl::OUString(m_aCurrentLine))):("NULL")) );
-
- if ( !m_pFileStream )
- return sal_False;
- OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
- // ----------------------------------------------------------
- // prepare positioning:
- //OSL_TRACE("OEvoabTable::(before SeekRow,m_pFileStriam Exist)m_aCurrentLine = %d\n", ((OUtoCStr(::rtl::OUString(m_aCurrentLine))) ? (OUtoCStr(::rtl::OUString(m_aCurrentLine))):("NULL")) );
-
- m_nFilePos = nCurPos;
-
- switch(eCursorPosition)
- {
- case IResultSetHelper::FIRST:
- m_nFilePos = 0;
- m_nRowPos = 1;
- // run through
- case IResultSetHelper::NEXT:
- if(eCursorPosition != IResultSetHelper::FIRST)
- ++m_nRowPos;
- m_pFileStream->Seek(m_nFilePos);
- if (m_pFileStream->IsEof() || !checkHeaderLine())
- {
- m_nMaxRowCount = m_nRowPos;
- return sal_False;
- }
-
- m_aRowToFilePos.insert(::std::map<sal_Int32,sal_Int32>::value_type(m_nRowPos,m_nFilePos));
-
- m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
- if (m_pFileStream->IsEof())
- {
- m_nMaxRowCount = m_nRowPos;
- return sal_False;
- }
- nCurPos = m_pFileStream->Tell();
- break;
- case IResultSetHelper::PRIOR:
- --m_nRowPos;
- if(m_nRowPos > 0)
- {
- m_nFilePos = m_aRowToFilePos.find(m_nRowPos)->second;
- m_pFileStream->Seek(m_nFilePos);
- if (m_pFileStream->IsEof() || !checkHeaderLine())
- return sal_False;
- m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
- if (m_pFileStream->IsEof())
- return sal_False;
- nCurPos = m_pFileStream->Tell();
- }
- else
- m_nRowPos = 0;
-
- break;
- case IResultSetHelper::LAST:
- if(m_nMaxRowCount)
- {
- m_nFilePos = m_aRowToFilePos.rbegin()->second;
- m_nRowPos = m_aRowToFilePos.rbegin()->first;
- m_pFileStream->Seek(m_nFilePos);
- if (m_pFileStream->IsEof() || !checkHeaderLine())
- return sal_False;
- m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
- if (m_pFileStream->IsEof())
- return sal_False;
- nCurPos = m_pFileStream->Tell();
- }
- else
- {
- while(seekRow(IResultSetHelper::NEXT,1,nCurPos)) ; // run through after last row
- // now I know all
- seekRow(IResultSetHelper::PRIOR,1,nCurPos);
- }
- break;
- case IResultSetHelper::RELATIVE:
- if(nOffset > 0)
- {
- for(sal_Int32 i = 0;i<nOffset;++i)
- seekRow(IResultSetHelper::NEXT,1,nCurPos);
- }
- else if(nOffset < 0)
- {
- for(sal_Int32 i = nOffset;i;++i)
- seekRow(IResultSetHelper::PRIOR,1,nCurPos);
- }
- break;
- case IResultSetHelper::ABSOLUTE:
- {
- if(nOffset < 0)
- nOffset = m_nRowPos + nOffset;
- ::std::map<sal_Int32,sal_Int32>::const_iterator aIter = m_aRowToFilePos.find(nOffset);
- if(aIter != m_aRowToFilePos.end())
- {
- m_nFilePos = aIter->second;
- m_pFileStream->Seek(m_nFilePos);
- if (m_pFileStream->IsEof() || !checkHeaderLine())
- return sal_False;
- m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
- if (m_pFileStream->IsEof())
- return sal_False;
- nCurPos = m_pFileStream->Tell();
- }
- else if(m_nMaxRowCount && nOffset > m_nMaxRowCount) // offset is outside the table
- {
- m_nRowPos = m_nMaxRowCount;
- return sal_False;
- }
- else
- {
- aIter = m_aRowToFilePos.upper_bound(nOffset);
- if(aIter == m_aRowToFilePos.end())
- {
- m_nRowPos = m_aRowToFilePos.rbegin()->first;
- nCurPos = m_nFilePos = m_aRowToFilePos.rbegin()->second;
- while(m_nRowPos != nOffset)
- seekRow(IResultSetHelper::NEXT,1,nCurPos);
- }
- else
- {
- --aIter;
- m_nRowPos = aIter->first;
- m_nFilePos = aIter->second;
- m_pFileStream->Seek(m_nFilePos);
- if (m_pFileStream->IsEof() || !checkHeaderLine())
- return sal_False;
- m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
- if (m_pFileStream->IsEof())
- return sal_False;
- nCurPos = m_pFileStream->Tell();
- }
- }
- }
-
- break;
- case IResultSetHelper::BOOKMARK:
- m_pFileStream->Seek(nOffset);
- if (m_pFileStream->IsEof())
- return sal_False;
-
- m_nFilePos = m_pFileStream->Tell(); // save Byte-Position in the file (at start of line)
- m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
- if (m_pFileStream->IsEof())
- return sal_False;
- nCurPos = m_pFileStream->Tell();
- break;
- }
-
- //OSL_TRACE("OEvoabTable::(after SeekRow)m_aCurrentLine = %d\n", ((OUtoCStr(::rtl::OUString(m_aCurrentLine))) ? (OUtoCStr(::rtl::OUString(m_aCurrentLine))):("NULL")) );
-
- return sal_True;
-}
-// -----------------------------------------------------------------------------
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LTable.hxx b/connectivity/source/drivers/evoab/LTable.hxx
deleted file mode 100644
index 998086be4985..000000000000
--- a/connectivity/source/drivers/evoab/LTable.hxx
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _CONNECTIVITY_EVOAB_LTABLE_HXX_
-#define _CONNECTIVITY_EVOAB_LTABLE_HXX_
-
-#include "file/FTable.hxx"
-#include "connectivity/sdbcx/VColumn.hxx"
-#include "connectivity/CommonTools.hxx"
-#include <tools/urlobj.hxx>
-#include "file/quotedstring.hxx"
-#include <vector>
-
-namespace connectivity
-{
- namespace evoab
- {
- typedef file::OFileTable OEvoabTable_BASE;
- class OEvoabConnection;
-
- typedef ::std::map< ::rtl::OUString,
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed>, comphelper::UStringMixLess > OContainer;
-
- class OEvoabTable : public OEvoabTable_BASE
- {
- private:
- // maps a row postion to a file position
- ::std::map<sal_Int32,sal_Int32> m_aRowToFilePos;
- ::std::vector<sal_Int32> m_aTypes; // holds all type for columns just to avoid to ask the propertyset
- ::std::vector<sal_Int32> m_aPrecisions; // same as aboth
- ::std::vector<sal_Int32> m_aScales;
- QuotedTokenizedString m_aCurrentLine;
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xNumberFormatter;
- sal_Int32 m_nRowPos;
- sal_Int32 m_nMaxRowCount; // will be set if stream is once eof
- ::std::vector< ::rtl::OUString> m_aColumnRawNames;
- sal_Bool setColumnAliases();
- void fillColumns(const ::com::sun::star::lang::Locale& _aLocale);
- sal_Bool checkHeaderLine();
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet> isUniqueByColumnName(const ::rtl::OUString& _rColName);
-
- public:
- virtual void refreshColumns();
- virtual void refreshIndexes();
-
- public:
- // DECLARE_CTY_DEFAULTS( OFlatTable_BASE);
- OEvoabTable( sdbcx::OCollection* _pTables,OEvoabConnection* _pConnection);
- OEvoabTable( sdbcx::OCollection* _pTables,OEvoabConnection* _pConnection,
- const ::rtl::OUString& _Name,
- const ::rtl::OUString& _Type,
- const ::rtl::OUString& _Description = ::rtl::OUString(),
- const ::rtl::OUString& _SchemaName = ::rtl::OUString(),
- const ::rtl::OUString& _CatalogName = ::rtl::OUString()
- );
-
- void construct(); // can throw any exception
-
- virtual sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos);
- virtual sal_Bool fetchRow(OValueRefRow& _rRow,const OSQLColumns& _rCols, sal_Bool bIsTable,sal_Bool bRetrieveData);
-
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- //XTypeProvider
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL disposing(void);
-
- // com::sun::star::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
- static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
-
- String getEntry();
- };
- }
-}
-#endif // _CONNECTIVITY_EVOAB_LTABLE_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LTables.cxx b/connectivity/source/drivers/evoab/LTables.cxx
deleted file mode 100644
index 26b5009683c6..000000000000
--- a/connectivity/source/drivers/evoab/LTables.cxx
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_connectivity.hxx"
-#include "LTables.hxx"
-#include "LTable.hxx"
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
-#include <com/sun/star/sdbcx/KeyType.hpp>
-#include "file/FCatalog.hxx"
-#include "file/FConnection.hxx"
-#include <comphelper/types.hxx>
-
-using namespace connectivity;
-using namespace ::comphelper;
-using namespace connectivity::evoab;
-using namespace connectivity::file;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::sdbcx;
-using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::container;
-namespace starutil = ::com::sun::star::util;
-
-sdbcx::ObjectType OEvoabTables::createObject(const ::rtl::OUString& _rName)
-{
- OEvoabTable* pRet = new OEvoabTable(this,(OEvoabConnection*)static_cast<OFileCatalog&>(m_rParent).getConnection(),
- _rName,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE")));
- sdbcx::ObjectType xRet = pRet;
- pRet->construct();
- return xRet;
-}
-// -------------------------------------------------------------------------
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/LTables.hxx b/connectivity/source/drivers/evoab/LTables.hxx
deleted file mode 100644
index ef2c3f838da3..000000000000
--- a/connectivity/source/drivers/evoab/LTables.hxx
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _CONNECTIVITY_EVOAB_LTABLES_HXX_
-#define _CONNECTIVITY_EVOAB_LTABLES_HXX_
-
-#include "file/FTables.hxx"
-
-namespace connectivity
-{
- namespace evoab
- {
- // namespace ::com::sun::star::sdbcx = ::com::sun::star::sdbcx;
- typedef file::OTables OEvoabTables_BASE;
-
- class OEvoabTables : public OEvoabTables_BASE
- {
- protected:
- virtual sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
- public:
- OEvoabTables(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex,
- const TStringVector &_rVector) : OEvoabTables_BASE(_rMetaData,_rParent,_rMutex,_rVector)
- {}
- };
- }
-}
-#endif // _CONNECTIVITY_EVOAB_LTABLES_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab/evoab.xcu b/connectivity/source/drivers/evoab/evoab.xcu
deleted file mode 100644
index c54c9856cad9..000000000000
--- a/connectivity/source/drivers/evoab/evoab.xcu
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--***********************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************ -->
-<oor:component-data oor:name="Drivers" oor:package="org.openoffice.Office.DataAccess" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <node oor:name="Installed">
- <node oor:name="sdbc:address:evolution:ldap" oor:op="replace">
- <prop oor:name="Driver">
- <value>com.sun.star.comp.sdbc.evoab.OEvoabDriver</value>
- </prop>
- <prop oor:name="DriverTypeDisplayName" oor:type="xs:string">
- <value xml:lang="en-US">Evolution LDAP</value>
- </prop>
- <node oor:name="Features">
- <node oor:name="EscapeDateTime" oor:op="replace">
- <prop oor:name="Value" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- </node>
- </node>
- <node oor:name="sdbc:address:evolution:groupwise" oor:op="replace">
- <prop oor:name="Driver">
- <value>com.sun.star.comp.sdbc.evoab.OEvoabDriver</value>
- </prop>
- <prop oor:name="DriverTypeDisplayName" oor:type="xs:string">
- <value xml:lang="en-US">Groupwise</value>
- </prop>
- <node oor:name="Features">
- <node oor:name="EscapeDateTime" oor:op="replace">
- <prop oor:name="Value" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- </node>
- </node>
- </node>
-</oor:component-data>
diff --git a/connectivity/source/drivers/evoab/evoab.xml b/connectivity/source/drivers/evoab/evoab.xml
deleted file mode 100755
index f2bafcffdada..000000000000
--- a/connectivity/source/drivers/evoab/evoab.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE module-description PUBLIC "-//W3C//DTD HTML 3.2//EN" "module-description.dtd">
-<module-description>
- <module-name>file</module-name>
- <component-description>
- <author>Xibei(Berry) Jia</author>
- <name>com.sun.star.comp.sdbc.evoab.OEvoabDriver</name>
- <description>This library implements the database driver for evolution address book formats.
-</description>
- <loader-name>com.sun.star.loader.SharedLibrary</loader-name>
- <language>c++</language>
- <status value="final"/>
- <supported-service>com.sun.star.sdbc.Driver</supported-service>
- <supported-service>com.sun.star.sdbcx.Driver</supported-service>
- <service-dependency> ... </service-dependency>
- </component-description>
- <project-build-dependency>cppuhelper</project-build-dependency>
- <project-build-dependency>cppu</project-build-dependency>
- <project-build-dependency>sal</project-build-dependency>
- <runtime-module-dependency>file</runtime-module-dependency>
- <runtime-module-dependency>cppuhelper</runtime-module-dependency>
- <runtime-module-dependency>cppu</runtime-module-dependency>
- <runtime-module-dependency>sal</runtime-module-dependency>
- <runtime-module-dependency>osl</runtime-module-dependency>
- <runtime-module-dependency>svtools-light1</runtime-module-dependency>
- <runtime-module-dependency>svtools</runtime-module-dependency>
- <runtime-module-dependency>ucbhelper</runtime-module-dependency>
- <runtime-module-dependency>dbtools</runtime-module-dependency>
- <runtime-module-dependency>unotools</runtime-module-dependency>
- <runtime-module-dependency>comphelper</runtime-module-dependency>
-</module-description>
diff --git a/connectivity/source/drivers/evoab/exports.dxp b/connectivity/source/drivers/evoab/exports.dxp
deleted file mode 100755
index f0e1c69934bc..000000000000
--- a/connectivity/source/drivers/evoab/exports.dxp
+++ /dev/null
@@ -1,2 +0,0 @@
-component_getImplementationEnvironment
-component_getFactory
diff --git a/connectivity/source/drivers/evoab/makefile.mk b/connectivity/source/drivers/evoab/makefile.mk
deleted file mode 100755
index 4c9357b71ead..000000000000
--- a/connectivity/source/drivers/evoab/makefile.mk
+++ /dev/null
@@ -1,113 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-PRJINC=..$/..
-PRJNAME=connectivity
-TARGET=evoab
-
-VISIBILITY_HIDDEN=TRUE
-
-.IF "$(ENABLE_EVOAB2)"=="TRUE"
-dummy:
- @echo "Evolution 1.x Addressbook build disabled in favour of Evolution 2.x Addressbook"
-.ELSE
-
-# --- Settings ----------------------------------
-
-.IF "$(DBGUTIL_OJ)"!=""
-ENVCFLAGS+=/FR$(SLO)$/
-.ENDIF
-
-.INCLUDE : $(PRJ)$/version.mk
-.INCLUDE : $(PRJ)$/makefile.pmk
-
-.IF "$(GUI)"=="UNX"
-
-# --- Files -------------------------------------
-
-EXCEPTIONSFILES=\
- $(SLO)$/LResultSet.obj \
- $(SLO)$/LStatement.obj \
- $(SLO)$/LPreparedStatement.obj \
- $(SLO)$/LFolderList.obj \
- $(SLO)$/LConfigAccess.obj \
- $(SLO)$/LColumnAlias.obj \
- $(SLO)$/LTable.obj \
- $(SLO)$/LDatabaseMetaData.obj \
- $(SLO)$/LCatalog.obj \
- $(SLO)$/LColumns.obj \
- $(SLO)$/LTables.obj \
- $(SLO)$/LConnection.obj \
- $(SLO)$/LServices.obj \
- $(SLO)$/LDriver.obj
-
-SLOFILES=\
- $(EXCEPTIONSFILES) \
- $(SLO)$/LDebug.obj
-
-
-SHL1VERSIONMAP=$(SOLARENV)/src/component.map
-
-
-# --- Library -----------------------------------
-
-SHL1TARGET= $(EVOAB_TARGET)$(DLLPOSTFIX)
-SHL1OBJS=$(SLOFILES)
-SHL1STDLIBS=\
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(TOOLSLIB) \
- $(SVTOOLLIB) \
- $(UNOTOOLSLIB) \
- $(UCBHELPERLIB) \
- $(SALLIB) \
- $(SALHELPERLIB) \
- $(DBTOOLSLIB) \
- $(DBFILELIB) \
- $(COMPHELPERLIB)
-
-.IF "$(DBFILELIB)" == ""
-SHL1STDLIBS+= ifile.lib
-.ENDIF
-
-SHL1DEPN=
-SHL1IMPLIB= i$(TARGET)
-
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-
-DEF1NAME= $(SHL1TARGET)
-
-.ELSE
-dummy:
- @echo "Nothing to build for GUI $(GUI)"
-.ENDIF
-.ENDIF
-
-# --- Targets ----------------------------------
-
-.INCLUDE : $(PRJ)$/target.pmk
diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk
index df11ba7fb5f6..f5444d378ec6 100755
--- a/editeng/Library_editeng.mk
+++ b/editeng/Library_editeng.mk
@@ -38,14 +38,12 @@ $(eval $(call gb_Library_set_include,editeng,\
-I$(OUTDIR)/inc/offuh \
))
-$(eval $(call gb_Library_set_defs,editeng,\
- $$(DEFS) \
+$(eval $(call gb_Library_add_defs,editeng,\
-DEDITENG_DLLIMPLEMENTATION \
))
ifneq ($(strip $(EDITDEBUG)),)
-$(eval $(call gb_Library_set_defs,editeng,\
- $$(DEFS) \
+$(eval $(call gb_Library_add_defs,editeng,\
-DEDITDEBUG \
))
endif
@@ -158,11 +156,12 @@ $(eval $(call gb_Library_add_linked_libs,editeng,\
cppu \
sal \
salhelper \
- icuuc \
i18nisolang1 \
i18npaper \
$(gb_STDLIBS) \
))
+$(call gb_Library_use_external,editeng,icuuc)
+
# vim: set noet sw=4 ts=4:
diff --git a/editeng/source/rtf/segincr.asm b/editeng/source/rtf/segincr.asm
deleted file mode 100644
index 27575f74ad8e..000000000000
--- a/editeng/source/rtf/segincr.asm
+++ /dev/null
@@ -1,39 +0,0 @@
-;*************************************************************************
-;
-; DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-;
-; Copyright 2000, 2010 Oracle and/or its affiliates.
-;
-; OpenOffice.org - a multi-platform office productivity suite
-;
-; This file is part of OpenOffice.org.
-;
-; OpenOffice.org is free software: you can redistribute it and/or modify
-; it under the terms of the GNU Lesser General Public License version 3
-; only, as published by the Free Software Foundation.
-;
-; OpenOffice.org is distributed in the hope that it will be useful,
-; but WITHOUT ANY WARRANTY; without even the implied warranty of
-; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-; GNU Lesser General Public License version 3 for more details
-; (a copy is included in the LICENSE file that accompanied this code).
-;
-; You should have received a copy of the GNU Lesser General Public License
-; version 3 along with OpenOffice.org. If not, see
-; <http://www.openoffice.org/license.html>
-; for a copy of the LGPLv3 License.
-;
-;*************************************************************************
-
-EXTRN __AHINCR:abs
- .MODEL LARGE
-STARTWS0_SEG SEGMENT WORD PUBLIC 'STARTWS_CODE'
-
- PUBLIC _SegIncr
-_SegIncr PROC
- MOV AX, __AHINCR
- RET
-_SegIncr ENDP
-
-STARTWS0_SEG ENDS
- END
diff --git a/framework/JunitTest_framework_complex.mk b/framework/JunitTest_framework_complex.mk
index 5865a6fb9f38..d7dba37635ff 100644
--- a/framework/JunitTest_framework_complex.mk
+++ b/framework/JunitTest_framework_complex.mk
@@ -25,7 +25,7 @@
#
#*************************************************************************
-$(eval $(call gb_JunitTest_JunitTest,framework_complex))
+$(eval $(call gb_JunitTest_JunitTest,framework_complex,SRCDIR))
$(eval $(call gb_JunitTest_set_defs,framework_complex,\
$$(DEFS) \
diff --git a/framework/JunitTest_framework_unoapi.mk b/framework/JunitTest_framework_unoapi.mk
index e8dbe205d7f4..73d9ca1ffbb5 100644
--- a/framework/JunitTest_framework_unoapi.mk
+++ b/framework/JunitTest_framework_unoapi.mk
@@ -25,7 +25,7 @@
#
#*************************************************************************
-$(eval $(call gb_JunitTest_JunitTest,framework_unoapi))
+$(eval $(call gb_JunitTest_JunitTest,framework_unoapi,SRCDIR))
$(eval $(call gb_JunitTest_set_defs,framework_unoapi,\
$$(DEFS) \
diff --git a/framework/Library_fwe.mk b/framework/Library_fwe.mk
index 6c87f86d1542..7665b91d06ed 100644
--- a/framework/Library_fwe.mk
+++ b/framework/Library_fwe.mk
@@ -37,8 +37,7 @@ $(eval $(call gb_Library_set_include,fwe,\
-I$(OUTDIR)/inc/offuh \
))
-$(eval $(call gb_Library_set_defs,fwe,\
- $$(DEFS) \
+$(eval $(call gb_Library_add_defs,fwe,\
-DFWE_DLLIMPLEMENTATION\
))
@@ -91,9 +90,5 @@ $(eval $(call gb_Library_add_exception_objects,fwe,\
framework/source/fwe/xml/xmlnamespaces \
))
-#todo: ImageListDescriptor can't be exported completely without exporting everything
ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS)))
-$(eval $(call gb_Library_set_cxxflags,fwe,$$(filter-out -fvisibility=hidden,$$(CXXFLAGS))))
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/framework/Library_fwi.mk b/framework/Library_fwi.mk
index 3a8c75941eea..748bee52c022 100644
--- a/framework/Library_fwi.mk
+++ b/framework/Library_fwi.mk
@@ -29,8 +29,7 @@ $(eval $(call gb_Library_Library,fwi))
$(eval $(call gb_Library_add_package_headers,fwi,framework_inc))
-$(eval $(call gb_Library_set_defs,fwi,\
- $$(DEFS) \
+$(eval $(call gb_Library_add_defs,fwi,\
-DFWI_DLLIMPLEMENTATION \
))
diff --git a/idl/Executable_svidl.mk b/idl/Executable_svidl.mk
new file mode 100644
index 000000000000..a856cf7a4612
--- /dev/null
+++ b/idl/Executable_svidl.mk
@@ -0,0 +1,65 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Executable_Executable,svidl))
+
+$(eval $(call gb_Executable_set_include,svidl,\
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/ \
+ -I$(OUTDIR)/inc/offuh/ \
+ -I$(SRCDIR)/idl/inc/pch \
+ -I$(SRCDIR)/idl/inc \
+))
+
+$(eval $(call gb_Executable_add_defs,svidl,\
+ -DIDL_COMPILER \
+))
+
+$(eval $(call gb_Executable_add_linked_libs,svidl,\
+ tl \
+ sal \
+ stl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Executable_add_exception_objects,svidl,\
+ idl/source/cmptools/char \
+ idl/source/cmptools/hash \
+ idl/source/cmptools/lex \
+ idl/source/objects/basobj \
+ idl/source/objects/bastype \
+ idl/source/objects/module \
+ idl/source/objects/object \
+ idl/source/objects/slot \
+ idl/source/objects/types \
+ idl/source/prj/command \
+ idl/source/prj/database \
+ idl/source/prj/globals \
+ idl/source/prj/svidl \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/idl/Makefile b/idl/Makefile
new file mode 100644
index 000000000000..a79aff831024
--- /dev/null
+++ b/idl/Makefile
@@ -0,0 +1,38 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/xmlscript/util/target.pmk b/idl/Module_idl.mk
index 907ec41dd90f..f23ac7f04d9a 100755..100644
--- a/xmlscript/util/target.pmk
+++ b/idl/Module_idl.mk
@@ -24,12 +24,12 @@
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-.IF "$(debug)" != ""
-# msvc++: no inlining
-.IF "$(COM)" == "MSC"
-CFLAGS += /Ob0
-.ENDIF
-.ENDIF
+$(eval $(call gb_Module_Module,idl))
+$(eval $(call gb_Module_add_targets,idl,\
+ Executable_svidl \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/idl/prj/build.lst b/idl/prj/build.lst
index e5f36475eeed..92d343a24021 100644
--- a/idl/prj/build.lst
+++ b/idl/prj/build.lst
@@ -1,8 +1,2 @@
id idl : tools NULL
-id idl usr1 - all idl_mkout NULL
-id idl\prj get - all idl_gprj NULL
-id idl\inc nmake - all idl_inc NULL
-id idl\source\cmptools nmake - all idl_cmp idl_inc NULL
-id idl\source\objects nmake - all idl_obj idl_inc NULL
-id idl\source\prj nmake - all idl_prj idl_inc NULL
-id idl\util nmake - all idl_util idl_cmp idl_obj idl_prj NULL
+id idl\prj nmake - all idl_gprj NULL
diff --git a/idl/prj/d.lst b/idl/prj/d.lst
index 9940b5c36aa3..e69de29bb2d1 100644
--- a/idl/prj/d.lst
+++ b/idl/prj/d.lst
@@ -1,2 +0,0 @@
-..\%__SRC%\bin\svidl.exe %_DEST%\bin\svidl.exe
-..\%__SRC%\bin\svidl %_DEST%\bin\svidl
diff --git a/idl/inc/makefile.mk b/idl/prj/makefile.mk
index 66b944a14867..88cd9dfe08b8 100755
--- a/idl/inc/makefile.mk
+++ b/idl/prj/makefile.mk
@@ -24,24 +24,17 @@
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-PRJ=..
-
-PRJNAME=idl
-TARGET=inc
-
-# --- Settings -----------------------------------------------------
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-# --- Targets -------------------------------------------------------
+PRJ=..
+TARGET=prj
-.INCLUDE : target.mk
+.INCLUDE : settings.mk
-.IF "$(ENABLE_PCH)"!=""
-ALLTAR : \
- $(SLO)$/precompiled.pch \
- $(SLO)$/precompiled_ex.pch
-
-.ENDIF # "$(ENABLE_PCH)"!=""
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
+all:
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/idl/util/idlpch.cxx b/idl/util/idlpch.cxx
deleted file mode 100644
index b32ec99901c9..000000000000
--- a/idl/util/idlpch.cxx
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_idl.hxx"
-#include <memory.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <limits.h>
-
-#include <tlbigint.hxx>
-#include <tlfsys.hxx>
-#include <char.hxx>
-#include <command.hxx>
-#include <hash.hxx>
-#include <lex.hxx>
-#include <attrib.hxx>
-#include <globals.hxx>
-#include <bastype.hxx>
-#include <object.hxx>
-#include <slot.hxx>
-#include <module.hxx>
-#include <database.hxx>
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/idl/source/cmptools/makefile.mk b/linguistic/JunitTest_linguistic_complex.mk
index bf53623dfd0d..705ab853a199 100755..100644
--- a/idl/source/cmptools/makefile.mk
+++ b/linguistic/JunitTest_linguistic_complex.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,23 +25,29 @@
#
#*************************************************************************
-PRJ=..$/..
+$(eval $(call gb_JunitTest_JunitTest,linguistic_complex,SRCDIR))
-PRJNAME=idl
-TARGET=cmptools
+$(eval $(call gb_JunitTest_set_defs,linguistic_complex,\
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/linguistic/qa/complex/linguistic/testdocuments \
+))
-# --- Settings -----------------------------------------------------------
+$(eval $(call gb_JunitTest_add_jars,linguistic_complex,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/test-tools.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+))
-.INCLUDE : settings.mk
+$(eval $(call gb_JunitTest_add_sourcefiles,linguistic_complex,\
+ linguistic/qa/complex/linguistic/HangulHanjaConversion \
+ linguistic/qa/complex/linguistic/TestDocument \
+))
-CDEFS+=-DIDL_COMPILER
-# --- Files --------------------------------------------------------------
-
-OBJFILES= $(OBJ)$/lex.obj \
- $(OBJ)$/char.obj \
- $(OBJ)$/hash.obj
-
-# --- Targets ------------------------------------------------------------
-
-.INCLUDE : target.mk
+$(eval $(call gb_JunitTest_add_classes,linguistic_complex,\
+ complex.linguistic.HangulHanjaConversion \
+))
+# vim: set noet sw=4 ts=4:
diff --git a/linguistic/JunitTest_linguistic_unoapi.mk b/linguistic/JunitTest_linguistic_unoapi.mk
index 2036fef787fd..c6638746b71c 100644..100755
--- a/linguistic/JunitTest_linguistic_unoapi.mk
+++ b/linguistic/JunitTest_linguistic_unoapi.mk
@@ -1,49 +1,53 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#*************************************************************************
#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
+# OpenOffice.org - a multi-platform office productivity suite
#
-# The Initial Developer of the Original Code is
-# Bjoern Michaelsen, Canonical Ltd. <bjoern.michaelsen@canonical.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
+# This file is part of OpenOffice.org.
#
-# Major Contributor(s):
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
#
-# For minor contributions see the git repository.
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_JunitTest_JunitTest,linguistic_unoapi,SRCDIR))
-$(eval $(call gb_JunitTest_JunitTest,configmgr_unoapi))
+$(eval $(call gb_JunitTest_set_defs,linguistic_unoapi,\
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.sce=$(SRCDIR)/linguistic/qa/unoapi/lng.sce \
+ -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/linguistic/qa/unoapi/knownissues.xcl \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/linguistic/qa/unoapi \
+))
-$(eval $(call gb_JunitTest_set_defs,configmgr_unoapi,\
- $$(DEFS) \
- -Dorg.openoffice.test.arg.sce=$(SRCDIR)/configmgr/qa/unoapi/module.sce \
- -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/configmgr/qa/unoapi/knownissues.xcl \
- -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/configmgr/qa/unoapi/testdocuments \
+$(eval $(call gb_JunitTest_add_jars,linguistic_unoapi,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
))
-$(eval $(call gb_JunitTest_add_jars,configmgr_unoapi,\
- $(OUTDIR)/bin/OOoRunner.jar \
- $(OUTDIR)/bin/ridl.jar \
- $(OUTDIR)/bin/test.jar \
- $(OUTDIR)/bin/unoil.jar \
- $(OUTDIR)/bin/jurt.jar \
+$(eval $(call gb_JunitTest_add_sourcefiles,linguistic_unoapi,\
+ linguistic/qa/unoapi/Test \
))
-$(eval $(call gb_JunitTest_add_classes,configmgr_unoapi,\
- org.openoffice.test.UnoApiTest \
+$(eval $(call gb_JunitTest_add_classes,linguistic_unoapi,\
+ org.openoffice.linguistic.qa.unoapi.Test \
))
# vim: set noet sw=4 ts=4:
diff --git a/linguistic/Library_lng.mk b/linguistic/Library_lng.mk
new file mode 100644
index 000000000000..d97278d9d819
--- /dev/null
+++ b/linguistic/Library_lng.mk
@@ -0,0 +1,88 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,lng))
+
+$(eval $(call gb_Library_add_package_headers,lng,linguistic_inc))
+
+$(eval $(call gb_Library_add_precompiled_header,lng,$(SRCDIR)/linguistic/inc/pch/precompiled_linguistic))
+
+$(eval $(call gb_Library_set_componentfile,lng,linguistic/source/lng))
+
+$(eval $(call gb_Library_set_include,lng,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/linguistic/inc \
+ -I$(SRCDIR)/linguistic/inc/pch \
+ -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Library_add_defs,lng,\
+ -DLNG_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_add_linked_libs,lng,\
+ cppu \
+ cppuhelper \
+ comphelper \
+ vos3 \
+ tl \
+ i18nisolang1 \
+ svl \
+ stl \
+ sal \
+ xo \
+ ucbhelper \
+ utl \
+ $(gb_STDLIBS) \
+))
+
+$(call gb_Library_use_external,lng,icuuc)
+
+$(eval $(call gb_Library_add_exception_objects,lng,\
+ linguistic/source/convdic \
+ linguistic/source/convdiclist \
+ linguistic/source/convdicxml \
+ linguistic/source/dicimp \
+ linguistic/source/dlistimp \
+ linguistic/source/gciterator \
+ linguistic/source/hhconvdic \
+ linguistic/source/hyphdsp \
+ linguistic/source/hyphdta \
+ linguistic/source/iprcache \
+ linguistic/source/lngopt \
+ linguistic/source/lngprophelp \
+ linguistic/source/lngreg \
+ linguistic/source/lngsvcmgr \
+ linguistic/source/misc \
+ linguistic/source/misc2 \
+ linguistic/source/spelldsp \
+ linguistic/source/spelldta \
+ linguistic/source/thesdsp \
+ linguistic/source/thesdta \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/linguistic/Module_linguistic.mk b/linguistic/Module_linguistic.mk
index 4ed03eed4331..1c1651657d4b 100644
--- a/linguistic/Module_linguistic.mk
+++ b/linguistic/Module_linguistic.mk
@@ -27,8 +27,19 @@
$(eval $(call gb_Module_Module,linguistic))
+$(eval $(call gb_Module_add_targets,linguistic,\
+ Library_lng \
+ Package_inc \
+))
+
+#$(eval $(call gb_Module_add_check_targets,linguistic,\
+#))
+
$(eval $(call gb_Module_add_subsequentcheck_targets,linguistic,\
JunitTest_linguistic_unoapi \
))
-# vim: set noet ts=4 sw=4:
+# was disabled in old build system
+# JunitTest_linguistic_complex \
+
+# vim: set noet sw=4 ts=4:
diff --git a/idl/source/objects/makefile.mk b/linguistic/Package_inc.mk
index e141d85540de..4c86bddc7c96 100755
--- a/idl/source/objects/makefile.mk
+++ b/linguistic/Package_inc.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,26 +25,16 @@
#
#*************************************************************************
-PRJ=..$/..
+$(eval $(call gb_Package_Package,linguistic_inc,$(SRCDIR)/linguistic/inc))
-PRJNAME=idl
-TARGET=objects
-
-# --- Settings -----------------------------------------------------------
-
-.INCLUDE : settings.mk
-
-CDEFS+=-DIDL_COMPILER
-# --- Files --------------------------------------------------------------
-
-OBJFILES= $(OBJ)$/bastype.obj \
- $(OBJ)$/basobj.obj \
- $(OBJ)$/types.obj \
- $(OBJ)$/object.obj \
- $(OBJ)$/slot.obj \
- $(OBJ)$/module.obj
-
-# --- Targets ------------------------------------------------------------
-
-.INCLUDE : target.mk
+# add files to the package
+# SOURCE_RELPATH/file.ext is the name of the source file (relative to the root give above)
+# DESTINATION_RELPATH/file.ext is the destination file (relative to $(OUTDIR))
+$(eval $(call gb_Package_add_file,linguistic_inc,inc/linguistic/lngdllapi.h,linguistic/lngdllapi.h))
+$(eval $(call gb_Package_add_file,linguistic_inc,inc/linguistic/hyphdta.hxx,linguistic/hyphdta.hxx))
+$(eval $(call gb_Package_add_file,linguistic_inc,inc/linguistic/lngprophelp.hxx,linguistic/lngprophelp.hxx))
+$(eval $(call gb_Package_add_file,linguistic_inc,inc/linguistic/lngprops.hxx,linguistic/lngprops.hxx))
+$(eval $(call gb_Package_add_file,linguistic_inc,inc/linguistic/misc.hxx,linguistic/misc.hxx))
+$(eval $(call gb_Package_add_file,linguistic_inc,inc/linguistic/spelldta.hxx,linguistic/spelldta.hxx))
+# vim: set noet sw=4 ts=4:
diff --git a/linguistic/inc/linguistic/hyphdta.hxx b/linguistic/inc/linguistic/hyphdta.hxx
index e8c4c41b4d2e..ffdc36a01509 100644
--- a/linguistic/inc/linguistic/hyphdta.hxx
+++ b/linguistic/inc/linguistic/hyphdta.hxx
@@ -29,15 +29,12 @@
#ifndef _LINGUISTIC_HYPHDTA_HXX_
#define _LINGUISTIC_HYPHDTA_HXX_
-
#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
#include <com/sun/star/linguistic2/XPossibleHyphens.hpp>
-
#include <tools/solar.h>
-
#include <uno/lbnames.h> // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type
#include <cppuhelper/implbase1.hxx> // helper for implementations
-
+#include <linguistic/lngdllapi.h>
namespace linguistic
{
@@ -90,6 +87,9 @@ public:
void SetWord( ::rtl::OUString &rTxt ) { aWord = rTxt; }
void SetHyphenatedWord( ::rtl::OUString &rTxt ) { aHyphenatedWord = rTxt; }
void SetLanguage( sal_Int16 nLang ) { nLanguage = nLang; }
+ static com::sun::star::uno::Reference <com::sun::star::linguistic2::XHyphenatedWord> LNG_DLLPUBLIC CreateHyphenatedWord(
+ const ::rtl::OUString &rWord, sal_Int16 nLang, sal_Int16 nHyphenationPos,
+ const ::rtl::OUString &rHyphenatedWord, sal_Int16 nHyphenPos );
};
@@ -132,6 +132,11 @@ public:
sal_Int16 GetLanguage() { return nLanguage; }
void SetWord( ::rtl::OUString &rTxt ) { aWord = rTxt; }
void SetLanguage( sal_Int16 nLang ) { nLanguage = nLang; }
+
+ static com::sun::star::uno::Reference < com::sun::star::linguistic2::XPossibleHyphens > LNG_DLLPUBLIC CreatePossibleHyphens
+ (const ::rtl::OUString &rWord, sal_Int16 nLang,
+ const ::rtl::OUString &rHyphWord,
+ const ::com::sun::star::uno::Sequence< sal_Int16 > &rPositions);
};
} // namespace linguistic
diff --git a/connectivity/source/drivers/evoab/LDebug.hxx b/linguistic/inc/linguistic/lngdllapi.h
index eeb9eed1860f..265a11d8b51a 100644
--- a/connectivity/source/drivers/evoab/LDebug.hxx
+++ b/linguistic/inc/linguistic/lngdllapi.h
@@ -26,20 +26,20 @@
*
************************************************************************/
-#ifndef CONNECTIVITY_EVOAB_DEBUG_HELPER_HXX
-#define CONNECTIVITY_EVOAB_DEBUG_HELPER_HXX
+#ifndef INCLUDED_LNG_DLLAPI_H
+#define INCLUDED_LNG_DLLAPI_H
-#include <rtl/ustring.hxx>
+#include "sal/config.h"
+#include "sal/types.h"
-#ifdef _DEBUG
- void evo_traceStringMessage( const sal_Char* _pFormat, const ::rtl::OUString& _rAsciiString );
-
- #define EVO_TRACE_STRING( pFormat, rAsciiString ) evo_traceStringMessage( pFormat, rAsciiString )
+#if defined LNG_DLLIMPLEMENTATION
+#define LNG_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
#else
- #define EVO_TRACE_STRING( pFormat, rAsciiString ) (void)(0)
+#define LNG_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
+#define LNG_DLLPRIVATE SAL_DLLPRIVATE
-#endif // CONNECTIVITY_EVOAB_DEBUG_HELPER_HXX
+#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/inc/linguistic/lngprophelp.hxx b/linguistic/inc/linguistic/lngprophelp.hxx
index c32c70437de2..18528eb465b0 100644
--- a/linguistic/inc/linguistic/lngprophelp.hxx
+++ b/linguistic/inc/linguistic/lngprophelp.hxx
@@ -30,14 +30,13 @@
#define _LINGUISTIC_LNGPROPHELP_HXX_
#include <tools/solar.h>
-
#include <uno/lbnames.h>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
#include <com/sun/star/beans/PropertyValues.hpp>
-
#include <com/sun/star/linguistic2/XLinguServiceEventBroadcaster.hpp>
+#include <linguistic/lngdllapi.h>
namespace com { namespace sun { namespace star { namespace beans {
class XPropertySet;
@@ -180,6 +179,28 @@ public:
throw(::com::sun::star::uno::RuntimeException);
};
+class LNG_DLLPUBLIC PropertyHelper_Thesaurus
+{
+ PropertyHelper_Thes* pInst;
+ com::sun::star::uno::Reference< com::sun::star::beans::XPropertyChangeListener > xPropHelper;
+
+ // disallow use of copy-constructor and assignment-operator
+ PropertyHelper_Thesaurus( const PropertyHelper_Thes & );
+ PropertyHelper_Thesaurus & operator = ( const PropertyHelper_Thes & );
+
+public:
+ PropertyHelper_Thesaurus(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface > &rxSource,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > &rxPropSet );
+ ~PropertyHelper_Thesaurus();
+ void AddAsPropListener();
+ void RemoveAsPropListener();
+ void SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals );
+};
+
+
class PropertyHelper_Spell :
public PropertyChgHelper
{
@@ -230,6 +251,41 @@ public:
};
+class LNG_DLLPUBLIC PropertyHelper_Spelling
+{
+ PropertyHelper_Spell* pInst;
+ com::sun::star::uno::Reference< com::sun::star::beans::XPropertyChangeListener > xPropHelper;
+
+ // disallow use of copy-constructor and assignment-operator
+ PropertyHelper_Spelling( const PropertyHelper_Spell & );
+ PropertyHelper_Spelling & operator = ( const PropertyHelper_Spell & );
+
+public:
+ PropertyHelper_Spelling(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface > &rxSource,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > &rxPropSet );
+ ~PropertyHelper_Spelling();
+
+ void AddAsPropListener();
+ void RemoveAsPropListener();
+ void SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals );
+ sal_Int16 GetMaxNumberOfSuggestions() const;
+ sal_Bool IsSpellUpperCase() const;
+ sal_Bool IsSpellWithDigits() const;
+ sal_Bool IsSpellCapitalization() const;
+ sal_Bool addLinguServiceEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
+ throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool removeLinguServiceEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
+ throw(::com::sun::star::uno::RuntimeException);
+};
+
+
class PropertyHelper_Hyphen :
public PropertyChgHelper
{
@@ -274,6 +330,39 @@ public:
sal_Int16 GetMinWordLength() const { return nResHyphMinWordLength; }
};
+class LNG_DLLPUBLIC PropertyHelper_Hyphenation
+{
+ PropertyHelper_Hyphen* pInst;
+ com::sun::star::uno::Reference< com::sun::star::beans::XPropertyChangeListener > xPropHelper;
+
+ // disallow use of copy-constructor and assignment-operator
+ PropertyHelper_Hyphenation( const PropertyHelper_Hyphen & );
+ PropertyHelper_Hyphenation & operator = ( const PropertyHelper_Hyphen & );
+
+public:
+ PropertyHelper_Hyphenation(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface > &rxSource,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > &rxPropSet);
+ ~PropertyHelper_Hyphenation();
+
+ void AddAsPropListener();
+ void RemoveAsPropListener();
+ void SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals );
+ sal_Int16 GetMinLeading() const;
+ sal_Int16 GetMinTrailing() const;
+ sal_Int16 GetMinWordLength() const;
+ sal_Bool addLinguServiceEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
+ throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool removeLinguServiceEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
+ throw(::com::sun::star::uno::RuntimeException);
+};
+
} // namespace linguistic
#endif
diff --git a/linguistic/inc/linguistic/misc.hxx b/linguistic/inc/linguistic/misc.hxx
index 055016e60f75..4061701c1f66 100644
--- a/linguistic/inc/linguistic/misc.hxx
+++ b/linguistic/inc/linguistic/misc.hxx
@@ -29,7 +29,6 @@
#ifndef _LINGUISTIC_MISC_HXX_
#define _LINGUISTIC_MISC_HXX_
-
#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/beans/PropertyValues.hpp>
@@ -48,6 +47,7 @@
#include <unotools/charclass.hxx>
#include <osl/thread.h>
#include <osl/mutex.hxx>
+#include <linguistic/lngdllapi.h>
namespace com { namespace sun { namespace star { namespace beans {
class XPropertySet;
@@ -95,7 +95,7 @@ namespace linguistic
#define DIC_ERR_NOT_EXISTS 4
-::osl::Mutex & GetLinguMutex();
+LNG_DLLPUBLIC ::osl::Mutex& GetLinguMutex();
LocaleDataWrapper & GetLocaleDataWrapper( sal_Int16 nLang );
@@ -118,7 +118,7 @@ sal_Int32 LevDistance( const rtl::OUString &rTxt1, const rtl::OUString &rTxt2 );
::com::sun::star::lang::Locale
CreateLocale( LanguageType eLang );
-LanguageType
+LNG_DLLPUBLIC LanguageType
LocaleToLanguage( const ::com::sun::star::lang::Locale& rLocale );
::com::sun::star::lang::Locale&
@@ -145,14 +145,14 @@ sal_Bool FileExists( const String &rURL );
/// @returns an URL for a new and writable dictionary rDicName.
/// The URL will point to the path given by 'GetDictionaryWriteablePath'
-String GetWritableDictionaryURL( const String &rDicName );
+LNG_DLLPUBLIC String GetWritableDictionaryURL( const String &rDicName );
// looks for the specified file in the list of paths.
// In case of multiple occurrences only the first found is returned.
String SearchFileInPaths( const String &rFile, const ::com::sun::star::uno::Sequence< ::rtl::OUString > &rPaths );
-sal_Int32 GetPosInWordToCheck( const rtl::OUString &rTxt, sal_Int32 nPos );
+LNG_DLLPUBLIC sal_Int32 GetPosInWordToCheck( const rtl::OUString &rTxt, sal_Int32 nPos );
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XHyphenatedWord >
@@ -161,8 +161,8 @@ sal_Int32 GetPosInWordToCheck( const rtl::OUString &rTxt, sal_Int32 nPos )
::com::sun::star::linguistic2::XHyphenatedWord > &rxHyphWord );
-sal_Bool IsUpper( const String &rText, xub_StrLen nPos, xub_StrLen nLen, sal_Int16 nLanguage );
-sal_Bool IsLower( const String &rText, xub_StrLen nPos, xub_StrLen nLen, sal_Int16 nLanguage );
+LNG_DLLPUBLIC sal_Bool IsUpper( const String &rText, xub_StrLen nPos, xub_StrLen nLen, sal_Int16 nLanguage );
+LNG_DLLPUBLIC sal_Bool IsLower( const String &rText, xub_StrLen nPos, xub_StrLen nLen, sal_Int16 nLanguage );
inline sal_Bool IsUpper( const String &rText, sal_Int16 nLanguage ) { return IsUpper( rText, 0, rText.Len(), nLanguage ); }
inline sal_Bool IsLower( const String &rText, sal_Int16 nLanguage ) { return IsLower( rText, 0, rText.Len(), nLanguage ); }
@@ -172,12 +172,12 @@ String ToUpper( const String &rText, sal_Int16 nLanguage );
String ToTitle( const String &rText, sal_Int16 nLanguage );
sal_Unicode ToLower( const sal_Unicode cChar, sal_Int16 nLanguage );
sal_Unicode ToUpper( const sal_Unicode cChar, sal_Int16 nLanguage );
-sal_Bool HasDigits( const ::rtl::OUString &rText );
-sal_Bool IsNumeric( const String &rText );
+LNG_DLLPUBLIC sal_Bool HasDigits( const ::rtl::OUString &rText );
+LNG_DLLPUBLIC sal_Bool IsNumeric( const String &rText );
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > GetOneInstanceService( const char *pServiceName );
-::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > GetLinguProperties();
+LNG_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > GetLinguProperties();
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSearchableDictionaryList > GetSearchableDictionaryList();
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionaryList > GetDictionaryList();
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > GetIgnoreAllList();
@@ -198,13 +198,13 @@ sal_Bool IsIgnoreControlChars( const ::com::sun::star::beans::PropertyValues &rP
const ::rtl::OUString& rWord, sal_Int16 nLanguage,
sal_Bool bSearchPosDics, sal_Bool bSearchSpellEntry );
-sal_uInt8 AddEntryToDic(
+LNG_DLLPUBLIC sal_uInt8 AddEntryToDic(
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > &rxDic,
const ::rtl::OUString &rWord, sal_Bool bIsNeg,
const ::rtl::OUString &rRplcTxt, sal_Int16 nRplcLang,
sal_Bool bStripDot = sal_True );
-sal_Bool SaveDictionaries( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionaryList > &xDicList );
+LNG_DLLPUBLIC sal_Bool SaveDictionaries( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionaryList > &xDicList );
// AppExitLstnr:
// virtual base class that calls it AtExit function when the application
diff --git a/linguistic/inc/linguistic/spelldta.hxx b/linguistic/inc/linguistic/spelldta.hxx
index 0e501ee0002e..81ff61791b30 100644
--- a/linguistic/inc/linguistic/spelldta.hxx
+++ b/linguistic/inc/linguistic/spelldta.hxx
@@ -37,6 +37,7 @@
#include <uno/lbnames.h> // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type
#include <cppuhelper/implbase2.hxx>
+#include <linguistic/lngdllapi.h>
namespace com { namespace sun { namespace star {
namespace linguistic2 {
@@ -122,8 +123,9 @@ public:
// non-interface specific functions
void SetWordLanguage(const ::rtl::OUString &rWord, sal_Int16 nLang);
void SetFailureType(sal_Int16 nTypeP);
- void SetAlternatives(
- const ::com::sun::star::uno::Sequence< ::rtl::OUString > &rAlt );
+ void SetAlternatives( const ::com::sun::star::uno::Sequence< ::rtl::OUString > &rAlt );
+ static com::sun::star::uno::Reference < com::sun::star::linguistic2::XSpellAlternatives > LNG_DLLPUBLIC CreateSpellAlternatives(
+ const ::rtl::OUString &rWord, sal_Int16 nLang, sal_Int16 nTypeP, const ::com::sun::star::uno::Sequence< ::rtl::OUString > &rAlt );
};
diff --git a/linguistic/prj/build.lst b/linguistic/prj/build.lst
index 7ee07a2f6f27..3ef507e2e115 100644
--- a/linguistic/prj/build.lst
+++ b/linguistic/prj/build.lst
@@ -1,8 +1,2 @@
lg linguistic : svl xmloff ucbhelper comphelper ICU:icu LIBXSLT:libxslt NULL
-lg linguistic usr1 - all lg_mkout NULL
-lg linguistic\prj get - all lg_prj NULL
-lg linguistic\inc nmake - all lg_inc NULL
-lg linguistic\source nmake - all lg_src lg_inc NULL
-
-# could be we need a Japanese office version
-# lg linguistic\qa\complex\linguistic nmake - all lg_qa_complex NULL
+lg linguistic\prj nmake - all lg_prj NULL
diff --git a/linguistic/prj/d.lst b/linguistic/prj/d.lst
index ed24c0a840ca..e69de29bb2d1 100644
--- a/linguistic/prj/d.lst
+++ b/linguistic/prj/d.lst
@@ -1,13 +0,0 @@
-..\%__SRC%\bin\lng* %_DEST%\bin\lng*
-..\%__SRC%\lib\ilng* %_DEST%\lib\ilng*
-..\%__SRC%\lib\liblng.a %_DEST%\lib\liblng.a
-..\%__SRC%\lib\*.dylib %_DEST%\lib\*.dylib
-..\%__SRC%\lib\liblng*.so %_DEST%\lib\liblng*.so
-
-..\xml\*.xml %_DEST%\xml\*.xml
-
-mkdir: %_DEST%\inc\linguistic
-..\inc\linguistic\*.hxx %_DEST%\inc\linguistic\*.hxx
-
-..\%__SRC%\misc\lng.component %_DEST%\xml\lng.component
-
diff --git a/sfx2/qa/unoapi/makefile.mk b/linguistic/prj/makefile.mk
index ea91ba4d1c44..88cd9dfe08b8 100755
--- a/sfx2/qa/unoapi/makefile.mk
+++ b/linguistic/prj/makefile.mk
@@ -1,6 +1,7 @@
#*************************************************************************
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -21,28 +22,19 @@
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
-#***********************************************************************/
-
-.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
-nothing .PHONY:
-.ELSE
-
-PRJ = ../..
-PRJNAME = sfx2
-TARGET = qa_unoapi
+#
+#*************************************************************************
-.IF "$(OOO_JUNIT_JAR)" != ""
-PACKAGE = org/openoffice/sfx2/qa/unoapi
-JAVATESTFILES = Test.java
-JAVAFILES = $(JAVATESTFILES)
-JARFILES = OOoRunner.jar ridl.jar test.jar
-EXTRAJARFILES = $(OOO_JUNIT_JAR)
-.END
+PRJ=..
+TARGET=prj
-.INCLUDE: settings.mk
-.INCLUDE: target.mk
-.INCLUDE: installationtest.mk
+.INCLUDE : settings.mk
-ALLTAR : javatest
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
-.END
+all:
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/linguistic/qa/complex/linguistic/makefile.mk b/linguistic/qa/complex/linguistic/makefile.mk
deleted file mode 100755
index 43a88ee0a198..000000000000
--- a/linguistic/qa/complex/linguistic/makefile.mk
+++ /dev/null
@@ -1,61 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
-nothing .PHONY:
-.ELSE
-
-PRJ = ../../..
-PRJNAME = sc
-TARGET = qa_complex_linguistic
-
-.IF "$(OOO_JUNIT_JAR)" != ""
-PACKAGE = complex/linguistic
-
-# here store only Files which contain a @Test
-JAVATESTFILES = \
- HangulHanjaConversion.java
-
-# put here all other files
-JAVAFILES = $(JAVATESTFILES) \
- TestDocument.java
-
-JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
-EXTRAJARFILES = $(OOO_JUNIT_JAR)
-
-# Sample how to debug
-# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
-
-.END
-
-.INCLUDE: settings.mk
-.INCLUDE: target.mk
-.INCLUDE: installationtest.mk
-
-ALLTAR : javatest
-
-.END
diff --git a/linguistic/source/grammarchecker.cxx b/linguistic/source/grammarchecker.cxx
deleted file mode 100644
index a5c1fa11b564..000000000000
--- a/linguistic/source/grammarchecker.cxx
+++ /dev/null
@@ -1,305 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include "precompiled_linguistic.hxx"
-
-#include <sal/config.h>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <cppuhelper/implbase1.hxx>
-#include <com/sun/star/linguistic2/XGrammarChecker.hpp>
-#include <com/sun/star/i18n/XBreakIterator.hpp>
-#include <cppuhelper/implbase4.hxx>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include "linguistic/misc.hxx"
-#include "defs.hxx"
-#include <cppuhelper/factory.hxx>
-#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-
-#include <cppuhelper/interfacecontainer.h>
-#include <com/sun/star/container/XContentEnumerationAccess.hpp>
-#include <com/sun/star/container/XEnumeration.hpp>
-#include <com/sun/star/linguistic2/XSupportedLocales.hpp>
-#include <com/sun/star/linguistic2/SingleGrammarError.hpp>
-#include <com/sun/star/linguistic2/GrammarCheckingResult.hpp>
-#include "lngopt.hxx"
-#include <comphelper/extract.hxx>
-#include <unotools/processfactory.hxx>
-#include <map>
-#include <com/sun/star/text/TextMarkupType.hpp>
-
-#include "grammarchecker.hxx"
-
-using namespace ::utl;
-using namespace ::rtl;
-using namespace ::com::sun::star;
-
-
-GrammarChecker::GrammarChecker( /*uno::Reference< uno::XComponentContext > const & context*/ )
- /*m_xContext(context)*/
-{}
-
-GrammarChecker::~GrammarChecker()
-{
-}
-
-
-sal_Bool SAL_CALL GrammarChecker::isSpellChecker() throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- return sal_False;
-}
-
-
-sal_Bool SAL_CALL GrammarChecker::hasLocale( const lang::Locale & aLocale ) throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- (void) aLocale;
- return sal_False;
-}
-
-uno::Sequence< lang::Locale > SAL_CALL GrammarChecker::getLocales( ) throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- return uno::Sequence< lang::Locale >();
-}
-
-
-void SAL_CALL GrammarChecker::startDocument(sal_Int32 nDocId)
- throw (uno::RuntimeException, lang::IllegalArgumentException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- (void) nDocId;
-}
-
-void SAL_CALL GrammarChecker::startParagraph(sal_Int32 nDocId)
- throw (uno::RuntimeException, lang::IllegalArgumentException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- (void) nDocId;
-}
-
-void SAL_CALL GrammarChecker::endParagraph( sal_Int32 nDocId )
- throw (uno::RuntimeException, lang::IllegalArgumentException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- (void) nDocId;
-}
-
-void SAL_CALL GrammarChecker::endDocument(sal_Int32 nDocId)
- throw (uno::RuntimeException, lang::IllegalArgumentException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- (void) nDocId;
-}
-
-linguistic2::GrammarCheckingResult SAL_CALL GrammarChecker::doGrammarChecking(
- sal_Int32 nDocId,
- const rtl::OUString& rText,
- const lang::Locale& rLocale,
- sal_Int32 nStartOfSentencePos,
- sal_Int32 nSuggestedSentenceEndPos,
- const uno::Sequence< ::sal_Int32 >& rLanguagePortions,
- const uno::Sequence< lang::Locale >& rLanguagePortionsLocales )
- throw (lang::IllegalArgumentException, uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
-
- (void) rLanguagePortions;
- (void) rLanguagePortionsLocales;
-
- linguistic2::GrammarCheckingResult aRes;
- aRes.nDocumentId = nDocId;
- aRes.aText = rText;
- aRes.aLocale = rLocale;
- aRes.nEndOfSentencePos = nSuggestedSentenceEndPos;
- aRes.xGrammarChecker = this;
- aRes.aGrammarErrors = GrammarCheckingInDummy( nDocId, rText, rLocale, nStartOfSentencePos, nSuggestedSentenceEndPos );;
-
- return aRes;
-}
-
-uno::Sequence< linguistic2::SingleGrammarError > GrammarChecker::GrammarCheckingInDummy(
- sal_Int32 nDocId,
- const OUString & rFlatParaText,
- const lang::Locale & rLocale,
- sal_Int32 nStartOfSentencePos,
- sal_Int32 nSuggestedSentenceEndPos )
-{
- (void) nDocId;
- (void) rFlatParaText;
- (void) rLocale;
- (void) nStartOfSentencePos;
- (void) nSuggestedSentenceEndPos;
-
-
- typedef std::map< OUString, uno::Sequence<OUString> > Error_t;
- Error_t aError;
- uno::Sequence< OUString > aSuggestion(1);
- OUString *pSeggestion = aSuggestion.getArray();
- pSeggestion[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("Modified"));
-
- aError[OUString(RTL_CONSTASCII_USTRINGPARAM("GrammarError"))] = aSuggestion;
- aError[OUString(RTL_CONSTASCII_USTRINGPARAM("Grammar Error"))] = aSuggestion;
-
- typedef std::vector< linguistic2::SingleGrammarError> ErrorVector_t;
- ErrorVector_t aErrorVector;
-
- OUString aText = rFlatParaText.copy( nStartOfSentencePos, nSuggestedSentenceEndPos - nStartOfSentencePos );
- sal_Int32 nIndexOf = 0;
- for(Error_t::const_iterator it = aError.begin(); it != aError.end(); ++it)
- {
-
- while(nIndexOf >= 0)
- {
- nIndexOf=aText.indexOf(it->first, nIndexOf);
- if(nIndexOf > -1)
- {
- //error found
- linguistic2::SingleGrammarError aErr;
- aErr.nErrorStart = nIndexOf + nStartOfSentencePos;
- nIndexOf += it->first.getLength();
- aErr.nErrorLength = it->first.getLength();
- aErr.nErrorType = text::TextMarkupType::GRAMMAR;
- aErr.nErrorLevel = 0;
- aErr.aShortComment = OUString();
- aErr.aFullComment = OUString();
- aErr.aNewLocale = rLocale;
- aErr.aSuggestions = it->second;
-
- aErrorVector.push_back( aErr );
- }
- }
- nIndexOf = 0;
- }
-
- sal_Int32 nCount = aErrorVector.size();
- uno::Sequence< linguistic2::SingleGrammarError > aErrors( nCount );
- if( nCount > 0 )
- {
- linguistic2::SingleGrammarError* pErrors = aErrors.getArray();
- for (sal_Int32 i=0; i < nCount; ++i)
- {
- pErrors[i] = aErrorVector[i];
- }
- }
- return aErrors;
-}
-
-
-sal_Bool SAL_CALL GrammarChecker::hasOptionsDialog( ) throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- return sal_False;
-}
-
-void SAL_CALL GrammarChecker::runOptionsDialog()
- throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
-}
-
-void SAL_CALL GrammarChecker::dispose( ) throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
-}
-
-void SAL_CALL GrammarChecker::addEventListener( const uno::Reference< lang::XEventListener >& xListener )
- throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- (void) xListener;
-}
-
-void SAL_CALL GrammarChecker::removeEventListener( const uno::Reference< lang::XEventListener >& xListener )
- throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- (void) xListener;
-}
-
-sal_Bool SAL_CALL GrammarChecker::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
-
- uno::Sequence< OUString > aSNL = getSupportedServiceNames();
- const OUString * pArray = aSNL.getConstArray();
- for( sal_Int32 i = 0; i < aSNL.getLength(); ++i )
- if( pArray[i] == ServiceName )
- return sal_True;
- return sal_False;
-}
-
-uno::Sequence< OUString > GrammarChecker::getSupportedServiceNames_Static( ) throw()
-{
-
- uno::Sequence< OUString > aSNS( 1 ); // more than 1 service possible
- aSNS.getArray()[0] = A2OU( "com.sun.star.linguistic2.GrammarChecker" );//SN_LINGU_SERVCICE_MANAGER
- return aSNS;
-}
-
-uno::Sequence< OUString > SAL_CALL GrammarChecker::getSupportedServiceNames( ) throw(uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- return getSupportedServiceNames_Static();
-}
-
-OUString SAL_CALL GrammarChecker::getImplementationName( ) throw(uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- return getImplementationName_Static();
-}
-
-uno::Reference< uno::XInterface > SAL_CALL GrammarChecker_CreateInstance(
- const uno::Reference< lang::XMultiServiceFactory > & /*rSMgr*/ )
- throw(uno::Exception)
-{
- uno::Reference< uno::XInterface > xService = (cppu::OWeakObject*) new GrammarChecker;
- return xService;
-}
-
-void * SAL_CALL GrammarChecker_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, void * /*pRegistryKey*/ )
-{
-
- void * pRet = 0;
- if ( !GrammarChecker::getImplementationName_Static().compareToAscii( pImplName ) )
- {
- uno::Reference< lang::XSingleServiceFactory > xFactory =
- cppu::createOneInstanceFactory(
- pServiceManager,
- GrammarChecker::getImplementationName_Static(),
- GrammarChecker_CreateInstance,
- GrammarChecker::getSupportedServiceNames_Static());
- // acquire, because we return an interface pointer instead of a reference
- xFactory->acquire();
- pRet = xFactory.get();
- }
- return pRet;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/grammarchecker.hxx b/linguistic/source/grammarchecker.hxx
deleted file mode 100644
index d7443530ab0d..000000000000
--- a/linguistic/source/grammarchecker.hxx
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _LINGUISTIC_GRAMMARCHECKER_HXX_
-#define _LINGUISTIC_GRAMMARCHECKER_HXX_
-
-
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/linguistic2/XGrammarChecker.hpp>
-#include <com/sun/star/linguistic2/SingleGrammarError.hpp>
-#include <com/sun/star/linguistic2/XSupportedLocales.hpp>
-
-#include <cppuhelper/implbase3.hxx>
-#include <cppuhelper/interfacecontainer.h>
-
-#include <map>
-
-
-class GrammarChecker:
- public cppu::WeakImplHelper3
- <
- ::com::sun::star::linguistic2::XGrammarChecker,
- ::com::sun::star::lang::XComponent,
- ::com::sun::star::lang::XServiceInfo
- >
-{
-
- // disallow use of copy c-tor and assignment operator
- GrammarChecker( const GrammarChecker & );
- GrammarChecker & operator = ( const GrammarChecker & );
-
-public:
- explicit GrammarChecker( /* uno::Reference< uno::XComponentContext > const & rXContext */ );
- virtual ~GrammarChecker();
-
- // XSupportedLocales
- virtual ::sal_Bool SAL_CALL hasLocale( const ::com::sun::star::lang::Locale & aLocale) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > SAL_CALL getLocales( ) throw ( ::com::sun::star::uno::RuntimeException );
-
- // XGrammarChecker
- virtual ::sal_Bool SAL_CALL isSpellChecker( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL startDocument( ::sal_Int32 nDocId ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL startParagraph( ::sal_Int32 nDocId ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL endParagraph( ::sal_Int32 nDocId ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL endDocument( ::sal_Int32 nDocId ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::linguistic2::GrammarCheckingResult SAL_CALL doGrammarChecking( ::sal_Int32 nDocId, const ::rtl::OUString& aText, const ::com::sun::star::lang::Locale& aLocale, ::sal_Int32 nStartOfSentencePos, ::sal_Int32 nSuggestedEndOfSentencePos, const ::com::sun::star::uno::Sequence< ::sal_Int32 >& aLanguagePortions, const ::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale >& aLanguagePortionsLocales ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual ::sal_Bool SAL_CALL hasOptionsDialog( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL runOptionsDialog( ) throw (::com::sun::star::uno::RuntimeException);
-
- // XComponent
- virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw ( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
-
- static inline ::rtl::OUString getImplementationName_Static();
- static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw();
-
- ::com::sun::star::uno::Sequence< ::com::sun::star::linguistic2::SingleGrammarError > GrammarCheckingInDummy(
- ::sal_Int32 nDocId, const ::rtl::OUString &rFlatParaText, const ::com::sun::star::lang::Locale & rLocale,
- ::sal_Int32 nStartOfSentencePos, ::sal_Int32 nSuggestedSentenceEndPos );
-
-
- inline ::osl::Mutex & GetMutex()
- {
- static osl::Mutex aMutex;
- return aMutex;
- }
-};
-
-inline ::rtl::OUString GrammarChecker::getImplementationName_Static()
-{
- return A2OU( "com.sun.star.lingu2.GrammarChecker" );
-}
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/hyphdta.cxx b/linguistic/source/hyphdta.cxx
index d03636db7dad..12244e21fc57 100644
--- a/linguistic/source/hyphdta.cxx
+++ b/linguistic/source/hyphdta.cxx
@@ -181,6 +181,22 @@ Sequence< sal_Int16 > SAL_CALL PossibleHyphens::getHyphenationPositions()
return aOrigHyphenPos;
}
+com::sun::star::uno::Reference <com::sun::star::linguistic2::XHyphenatedWord> HyphenatedWord::CreateHyphenatedWord(
+ const ::rtl::OUString &rWord, sal_Int16 nLang, sal_Int16 nHyphenationPos,
+ const ::rtl::OUString &rHyphenatedWord, sal_Int16 nHyphenPos )
+{
+ return new HyphenatedWord( rWord, nLang, nHyphenationPos, rHyphenatedWord, nHyphenPos );
+}
+
+com::sun::star::uno::Reference < com::sun::star::linguistic2::XPossibleHyphens > PossibleHyphens::CreatePossibleHyphens
+ (const ::rtl::OUString &rWord, sal_Int16 nLang,
+ const ::rtl::OUString &rHyphWord,
+ const ::com::sun::star::uno::Sequence< sal_Int16 > &rPositions)
+{
+ return new PossibleHyphens( rWord, nLang, rHyphWord, rPositions );
+}
+
+
} // namespace linguistic
diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx
index 8a5c17c27827..ef5a910e0867 100644
--- a/linguistic/source/lngprophelp.cxx
+++ b/linguistic/source/lngprophelp.cxx
@@ -707,6 +707,161 @@ void PropertyHelper_Hyphen::SetTmpPropVals( const PropertyValues &rPropVals )
}
}
+PropertyHelper_Thesaurus::PropertyHelper_Thesaurus(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface > &rxSource,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > &rxPropSet )
+{
+ pInst = new PropertyHelper_Thes( rxSource, rxPropSet );
+ xPropHelper = pInst;
+}
+
+PropertyHelper_Thesaurus::~PropertyHelper_Thesaurus()
+{
+}
+
+void PropertyHelper_Thesaurus::AddAsPropListener()
+{
+ pInst->AddAsPropListener();
+}
+
+void PropertyHelper_Thesaurus::RemoveAsPropListener()
+{
+ pInst->RemoveAsPropListener();
+}
+
+void PropertyHelper_Thesaurus::SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals )
+{
+ pInst->SetTmpPropVals( rPropVals );
+}
+
+PropertyHelper_Hyphenation::PropertyHelper_Hyphenation(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface > &rxSource,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > &rxPropSet)
+{
+ pInst = new PropertyHelper_Hyphen( rxSource, rxPropSet );
+ xPropHelper = pInst;
+}
+
+PropertyHelper_Hyphenation::~PropertyHelper_Hyphenation()
+{
+}
+
+void PropertyHelper_Hyphenation::AddAsPropListener()
+{
+ pInst->AddAsPropListener();
+}
+
+void PropertyHelper_Hyphenation::RemoveAsPropListener()
+{
+ pInst->RemoveAsPropListener();
+}
+
+void PropertyHelper_Hyphenation::SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals )
+{
+ pInst->SetTmpPropVals( rPropVals );
+}
+
+sal_Int16 PropertyHelper_Hyphenation::GetMinLeading() const
+{
+ return pInst->GetMinLeading();
+}
+
+sal_Int16 PropertyHelper_Hyphenation::GetMinTrailing() const
+{
+ return pInst->GetMinTrailing();
+}
+
+sal_Int16 PropertyHelper_Hyphenation::GetMinWordLength() const
+{
+ return pInst->GetMinWordLength();
+}
+
+sal_Bool PropertyHelper_Hyphenation::addLinguServiceEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ return pInst->addLinguServiceEventListener( rxListener );
+}
+
+sal_Bool PropertyHelper_Hyphenation::removeLinguServiceEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ return pInst->removeLinguServiceEventListener( rxListener );
+}
+
+PropertyHelper_Spelling::PropertyHelper_Spelling(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface > &rxSource,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > &rxPropSet )
+{
+ pInst = new PropertyHelper_Spell( rxSource, rxPropSet );
+ xPropHelper = pInst;
+}
+
+PropertyHelper_Spelling::~PropertyHelper_Spelling()
+{
+}
+
+void PropertyHelper_Spelling::AddAsPropListener()
+{
+ pInst->AddAsPropListener();
+}
+
+void PropertyHelper_Spelling::RemoveAsPropListener()
+{
+ pInst->RemoveAsPropListener();
+}
+
+void PropertyHelper_Spelling::SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals )
+{
+ pInst->SetTmpPropVals( rPropVals );
+}
+
+sal_Int16 PropertyHelper_Spelling::GetMaxNumberOfSuggestions() const
+{
+ return pInst->GetMaxNumberOfSuggestions();
+}
+
+sal_Bool PropertyHelper_Spelling::IsSpellUpperCase() const
+{
+ return pInst->IsSpellUpperCase();
+}
+
+sal_Bool PropertyHelper_Spelling::IsSpellWithDigits() const
+{
+ return pInst->IsSpellWithDigits();
+}
+
+sal_Bool PropertyHelper_Spelling::IsSpellCapitalization() const
+{
+ return pInst->IsSpellCapitalization();
+}
+
+sal_Bool PropertyHelper_Spelling::addLinguServiceEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ return pInst->addLinguServiceEventListener( rxListener );
+}
+
+sal_Bool PropertyHelper_Spelling::removeLinguServiceEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ return pInst->removeLinguServiceEventListener( rxListener );
+}
+
+
} // namespace linguistic
diff --git a/linguistic/source/makefile.mk b/linguistic/source/makefile.mk
deleted file mode 100755
index c69985405888..000000000000
--- a/linguistic/source/makefile.mk
+++ /dev/null
@@ -1,114 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..
-
-PRJNAME=linguistic
-TARGET=lng
-ENABLE_EXCEPTIONS=sal_True
-
-#----- Settings ---------------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/convdiclist.obj\
- $(SLO)$/convdic.obj\
- $(SLO)$/convdicxml.obj\
- $(SLO)$/dicimp.obj\
- $(SLO)$/dlistimp.obj\
- $(SLO)$/hhconvdic.obj\
- $(SLO)$/hyphdsp.obj\
- $(SLO)$/hyphdta.obj\
- $(SLO)$/iprcache.obj\
- $(SLO)$/lngopt.obj\
- $(SLO)$/lngprophelp.obj\
- $(SLO)$/lngreg.obj\
- $(SLO)$/lngsvcmgr.obj\
- $(SLO)$/misc.obj\
- $(SLO)$/misc2.obj\
- $(SLO)$/spelldsp.obj\
- $(SLO)$/spelldta.obj\
- $(SLO)$/thesdsp.obj\
- $(SLO)$/thesdta.obj\
- $(SLO)$/gciterator.obj
-
-SHL1TARGET= $(TARGET)$(DLLPOSTFIX)
-
-SHL1STDLIBS= \
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(COMPHELPERLIB) \
- $(TOOLSLIB) \
- $(I18NISOLANGLIB) \
- $(SVLLIB) \
- $(SALLIB) \
- $(XMLOFFLIB) \
- $(UCBHELPERLIB) \
- $(UNOTOOLSLIB) \
- $(ICUUCLIB)
-
-# build DLL
-SHL1LIBS= $(SLB)$/$(TARGET).lib
-SHL1DEPN= $(SLB)$/$(TARGET).lib
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-SHL1IMPLIB= ilng
-
-# build DEF file
-DEF1NAME =$(SHL1TARGET)
-DEF1DEPN =$(MISC)$/$(SHL1TARGET).flt
-DEFLIB1NAME =$(TARGET)
-DEF1DES =Linguistic main DLL
-
-
-.IF "$(GUI)"=="WNT"
-DEF1EXPORT1 = component_getFactory
-DEF1EXPORT2 = component_getImplementationEnvironment
-.ENDIF
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-$(MISC)$/$(SHL1TARGET).flt: makefile.mk
- @echo ------------------------------
- @echo Making: $@
- @echo lcl > $@
- @echo component >> $@
- @echo __CT >> $@
-
-
-ALLTAR : $(MISC)/lng.component
-
-$(MISC)/lng.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
- lng.component
- $(XSLTPROC) --nonet --stringparam uri \
- '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
- $(SOLARENV)/bin/createcomponent.xslt lng.component
diff --git a/linguistic/source/spelldta.cxx b/linguistic/source/spelldta.cxx
index 3bc4ce100451..ced7de88ed0f 100644
--- a/linguistic/source/spelldta.cxx
+++ b/linguistic/source/spelldta.cxx
@@ -359,6 +359,16 @@ void SpellAlternatives::SetAlternatives( const Sequence< OUString > &rAlt )
}
+com::sun::star::uno::Reference < com::sun::star::linguistic2::XSpellAlternatives > SpellAlternatives::CreateSpellAlternatives(
+ const ::rtl::OUString &rWord, sal_Int16 nLang, sal_Int16 nTypeP, const ::com::sun::star::uno::Sequence< ::rtl::OUString > &rAlt )
+{
+ SpellAlternatives* pAlt = new SpellAlternatives;
+ pAlt->SetWordLanguage( rWord, nLang );
+ pAlt->SetFailureType( nTypeP );
+ pAlt->SetAlternatives( rAlt );
+ return Reference < XSpellAlternatives >(pAlt);
+}
+
} // namespace linguistic
diff --git a/sfx2/CppunitTest_sfx2_metadatable.mk b/sfx2/CppunitTest_sfx2_metadatable.mk
index bf86f0a74e25..0824d40cfa64 100755
--- a/sfx2/CppunitTest_sfx2_metadatable.mk
+++ b/sfx2/CppunitTest_sfx2_metadatable.mk
@@ -40,7 +40,6 @@ $(eval $(call gb_CppunitTest_add_linked_libs,sfx2_metadatable, \
$(eval $(call gb_CppunitTest_set_include,sfx2_metadatable,\
$$(INCLUDE) \
-I$(OUTDIR)/inc/offuh \
- -I$(OUTDIR)/inc \
))
# vim: set noet sw=4 ts=4:
diff --git a/sfx2/JunitTest_sfx2_complex.mk b/sfx2/JunitTest_sfx2_complex.mk
index 9c799476d0df..8f09f3d799a9 100755
--- a/sfx2/JunitTest_sfx2_complex.mk
+++ b/sfx2/JunitTest_sfx2_complex.mk
@@ -25,7 +25,7 @@
#
#*************************************************************************
-$(eval $(call gb_JunitTest_JunitTest,sfx2_complex))
+$(eval $(call gb_JunitTest_JunitTest,sfx2_complex,SRCDIR))
$(eval $(call gb_JunitTest_set_defs,sfx2_complex,\
$$(DEFS) \
diff --git a/sfx2/JunitTest_sfx2_unoapi.mk b/sfx2/JunitTest_sfx2_unoapi.mk
index 33602a0b720d..f7fdfae94e76 100755
--- a/sfx2/JunitTest_sfx2_unoapi.mk
+++ b/sfx2/JunitTest_sfx2_unoapi.mk
@@ -25,7 +25,7 @@
#
#*************************************************************************
-$(eval $(call gb_JunitTest_JunitTest,sfx2_unoapi))
+$(eval $(call gb_JunitTest_JunitTest,sfx2_unoapi,SRCDIR))
$(eval $(call gb_JunitTest_set_defs,sfx2_unoapi,\
$$(DEFS) \
diff --git a/sfx2/Library_qstart.mk b/sfx2/Library_qstart.mk
index 0709f60ba5fa..c775d21650d7 100755
--- a/sfx2/Library_qstart.mk
+++ b/sfx2/Library_qstart.mk
@@ -38,19 +38,16 @@ $(eval $(call gb_Library_set_include,qstart_gtk,\
$(filter -I%,$(GTK_CFLAGS)) \
))
-$(eval $(call gb_Library_set_defs,qstart_gtk,\
- $$(DEFS) \
+$(eval $(call gb_Library_add_defs,qstart_gtk,\
-DDLL_NAME=$(notdir $(call gb_Library_get_target,sfx2)) \
-DENABLE_QUICKSTART_APPLET \
))
-$(eval $(call gb_Library_set_cflags,qstart_gtk,\
- $$(CFLAGS) \
+$(eval $(call gb_Library_add_cflags,qstart_gtk,\
$(filter-out -I%,$(GTK_CFLAGS)) \
))
-$(eval $(call gb_Library_set_ldflags,qstart_gtk,\
- $$(LDFLAGS) \
+$(eval $(call gb_Library_add_libs,qstart_gtk,\
$(GTK_LIBS) \
))
@@ -71,10 +68,11 @@ $(eval $(call gb_Library_add_linked_libs,qstart_gtk,\
ucbhelper \
utl \
vcl \
- xml2 \
sfx \
))
+$(call gb_Library_use_external,qstart_gtk,libxml2)
+
$(eval $(call gb_Library_add_exception_objects,qstart_gtk,\
sfx2/source/appl/shutdowniconunx \
))
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index c93efacab9f8..bb57c4d59d57 100755
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -48,11 +48,9 @@ $(eval $(call gb_Library_set_include,sfx,\
$$(INCLUDE) \
-I$(OUTDIR)/inc/offuh \
-I$(OUTDIR)/inc \
- $(LIBXML_CFLAGS) \
))
-$(eval $(call gb_Library_set_defs,sfx,\
- $$(DEFS) \
+$(eval $(call gb_Library_add_defs,sfx,\
-DSFX2_DLLIMPLEMENTATION \
))
@@ -73,10 +71,11 @@ $(eval $(call gb_Library_add_linked_libs,sfx,\
ucbhelper \
utl \
vcl \
- xml2 \
$(gb_STDLIBS) \
))
+$(call gb_Library_use_external,sfx,libxml2)
+
$(eval $(call gb_Library_add_exception_objects,sfx,\
sfx2/source/appl/app \
sfx2/source/appl/appbas \
@@ -245,8 +244,7 @@ $(eval $(call gb_SdiTarget_set_include,sfx2/sdi/sfxslots,\
))
ifeq ($(OS),$(filter WNT MACOSX,$(OS)))
-$(eval $(call gb_Library_set_defs,sfx,\
- $$(DEFS) \
+$(eval $(call gb_Library_add_defs,sfx,\
-DENABLE_QUICKSTART_APPLET \
))
endif
diff --git a/sfx2/Module_sfx2.mk b/sfx2/Module_sfx2.mk
index 577073df81b1..33fd675822a1 100755
--- a/sfx2/Module_sfx2.mk
+++ b/sfx2/Module_sfx2.mk
@@ -52,7 +52,6 @@ endif
endif
#todo: source/dialog BUILD_VER_STRING
-#todo: source/doc SYSTEM_LIBXML2
#todo: ENABLE_LAYOUT
#todo: clean up quickstarter stuff in both libraries
#todo: move standard pool to svl
diff --git a/sfx2/Package_inc.mk b/sfx2/Package_inc.mk
index 57317629323b..6ecf5f368d27 100755
--- a/sfx2/Package_inc.mk
+++ b/sfx2/Package_inc.mk
@@ -135,3 +135,4 @@ $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/userinputinterception.hxx,sf
$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfac.hxx,sfx2/viewfac.hxx))
$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfrm.hxx,sfx2/viewfrm.hxx))
$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewsh.hxx,sfx2/viewsh.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/qswin32.h,sfx2/qswin32.h))
diff --git a/sfx2/inc/pch/precompiled_sfx2.hxx b/sfx2/inc/pch/precompiled_sfx2.hxx
index 8615cc61d450..f5a7c5a4187e 100644
--- a/sfx2/inc/pch/precompiled_sfx2.hxx
+++ b/sfx2/inc/pch/precompiled_sfx2.hxx
@@ -482,7 +482,6 @@
#include "rtl/ustring.hxx"
#include "sal/config.h"
#include "sal/types.h"
-#include "setup_native/qswin32.h"
#include "sot/clsids.hxx"
#include "sot/exchange.hxx"
#include "sot/factory.hxx"
diff --git a/connectivity/source/drivers/evoab/LConfigAccess.hxx b/sfx2/inc/sfx2/qswin32.h
index c19c63c00750..30045ddadcb0 100644
--- a/connectivity/source/drivers/evoab/LConfigAccess.hxx
+++ b/sfx2/inc/sfx2/qswin32.h
@@ -26,24 +26,26 @@
*
************************************************************************/
-#ifndef _CONNECTIVITY_EVOAB_LCONFIGACCESS_HXX_
-#define _CONNECTIVITY_EVOAB_LCONFIGACCESS_HXX_
+#ifndef _QSWIN32_H
+#define _QSWIN32_H
-// This is the extended version (for use on the SO side of the driver) of MConfigAccess
-// (which is for use on the mozilla side only)
+#define QUICKSTART_CLASSNAMEA "SO Listener Class"
+#define QUICKSTART_WINDOWNAMEA "SO Listener Window"
+#define SHUTDOWN_QUICKSTART_MESSAGEA "SO KillTray"
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#define QUICKSTART_CLASSNAMEW L##QUICKSTART_CLASSNAMEA
+#define QUICKSTART_WINDOWNAMEW L##QUICKSTART_WINDOWNAMEA
+#define SHUTDOWN_QUICKSTART_MESSAGEW L##SHUTDOWN_QUICKSTART_MESSAGEA
-namespace connectivity
-{
- namespace evoab
- {
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
- createDriverConfigNode( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > _rxORB, ::rtl::OUString _sDriverImplementationName );
- ::rtl::OUString getFullPathExportingCommand( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > _rxORB );
- }
-}
-#endif // _CONNECTIVITY_EVOAB_LCONFIGACCESS_HXX_
+#ifdef UNICODE
+# define QUICKSTART_CLASSNAME QUICKSTART_CLASSNAMEW
+# define QUICKSTART_WINDOWNAME QUICKSTART_WINDOWNAMEW
+# define SHUTDOWN_QUICKSTART_MESSAGE SHUTDOWN_QUICKSTART_MESSAGEW
+#else
+# define QUICKSTART_CLASSNAME QUICKSTART_CLASSNAMEA
+# define QUICKSTART_WINDOWNAME QUICKSTART_WINDOWNAMEA
+# define SHUTDOWN_QUICKSTART_MESSAGE SHUTDOWN_QUICKSTART_MESSAGEA
+
+#endif /* _QSWIN32_H */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst
index 32f90ba3d826..1cf56d7517cd 100644
--- a/sfx2/prj/build.lst
+++ b/sfx2/prj/build.lst
@@ -1,3 +1,2 @@
-sf sfx2 : TRANSLATIONS:translations idl basic xmlscript framework readlicense_oo shell setup_native sax LIBXML2:libxml2 LIBXSLT:libxslt NULL
+sf sfx2 : TRANSLATIONS:translations idl basic xmlscript framework readlicense_oo shell sax LIBXML2:libxml2 LIBXSLT:libxslt NULL
sf sfx2\prj nmake - all sf_prj NULL
-
diff --git a/sfx2/qa/complex/sfx2/makefile.mk b/sfx2/qa/complex/sfx2/makefile.mk
deleted file mode 100755
index 20b170fba3b4..000000000000
--- a/sfx2/qa/complex/sfx2/makefile.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-.IF "$(OOO_JUNIT_JAR)" == ""
-nothing .PHONY:
- @echo -----------------------------------------------------
- @echo - JUnit not available, not building anything
- @echo -----------------------------------------------------
-.ELSE # IF "$(OOO_JUNIT_JAR)" != ""
-
-PRJ = ../../..
-PRJNAME = sfx2
-TARGET = qa_complex
-PACKAGE = complex/sfx2
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = OOoRunnerLight.jar ridl.jar test.jar test-tools.jar unoil.jar
-EXTRAJARFILES = $(OOO_JUNIT_JAR)
-JAVAFILES = $(shell @$(FIND) . -name "*.java") \
-
-#----- create a jar from compiled files ----------------------------
-
-JARTARGET = $(TARGET).jar
-
-#----- JUnit tests class -------------------------------------------
-
-JAVATESTFILES = \
- DocumentInfo.java \
- DocumentProperties.java \
- StandaloneDocumentInfo.java \
- DocumentMetadataAccess.java \
- UndoManager.java \
-
-# disabled: #i115674#
-# GlobalEventBroadcaster.java \
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE: target.mk
-
-ALL : ALLTAR
-
-# --- subsequent tests ---------------------------------------------
-
-.IF "$(OOO_SUBSEQUENT_TESTS)" != ""
-
-.INCLUDE: installationtest.mk
-
-ALLTAR : javatest
-
- # Sample how to debug
- # JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
-
-.END # "$(OOO_SUBSEQUENT_TESTS)" == ""
-
-.END # ELSE "$(OOO_JUNIT_JAR)" != ""
diff --git a/sfx2/qa/cppunit/makefile.mk b/sfx2/qa/cppunit/makefile.mk
deleted file mode 100755
index 10e0eaa3d979..000000000000
--- a/sfx2/qa/cppunit/makefile.mk
+++ /dev/null
@@ -1,70 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=../..
-PRJNAME=sfx2
-TARGET=qa_cppunit
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
-DLLPRE = # no leading "lib" on .so files
-
-# --- Libs ---------------------------------------------------------
-
-SHL1OBJS= \
- $(SLO)/test_metadatable.obj
-
-SHL1STDLIBS= \
- $(CPPUNITLIB) \
- $(SALLIB) \
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(VCLLIB) \
- $(SFXLIB)
-
-SHL1TARGET= test_metadatable
-SHL1RPATH = NONE
-SHL1IMPLIB= i$(SHL1TARGET)
-DEF1NAME=$(SHL1TARGET)
-SHL1VERSIONMAP= version.map
-
-# --- All object files ---------------------------------------------
-
-SLOFILES= \
- $(SHL1OBJS)
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-.INCLUDE : _cppunit.mk
-
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx
index 5d2042eca984..57cb6ab0d926 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -53,7 +53,7 @@
#include <stdio.h>
#include <io.h>
#include <osl/thread.h>
-#include <setup_native/qswin32.h>
+#include <sfx2/qswin32.h>
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/uno/Reference.h>
diff --git a/svx/JunitTest_svx_unoapi.mk b/svx/JunitTest_svx_unoapi.mk
index 2db815c2443d..d94858b4af9a 100644
--- a/svx/JunitTest_svx_unoapi.mk
+++ b/svx/JunitTest_svx_unoapi.mk
@@ -25,7 +25,7 @@
#
#*************************************************************************
-$(eval $(call gb_JunitTest_JunitTest,svx_unoapi))
+$(eval $(call gb_JunitTest_JunitTest,svx_unoapi,SRCDIR))
$(eval $(call gb_JunitTest_set_defs,svx_unoapi,\
$$(DEFS) \
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 38b780103e7a..2cc9b4a0663f 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -37,8 +37,7 @@ $(eval $(call gb_Library_set_include,svx,\
-I$(OUTDIR)/inc/offuh \
))
-$(eval $(call gb_Library_set_defs,svx,\
- $$(DEFS) \
+$(eval $(call gb_Library_add_defs,svx,\
-DSVX_DLLIMPLEMENTATION \
-DBOOST_SPIRIT_USE_OLD_NAMESPACE \
))
@@ -52,7 +51,6 @@ $(eval $(call gb_Library_add_linked_libs,svx,\
drawinglayer \
editeng \
i18nisolang1 \
- icuuc \
sal \
sfx \
sot \
@@ -69,6 +67,8 @@ $(eval $(call gb_Library_add_linked_libs,svx,\
$(gb_STDLIBS) \
))
+$(call gb_Library_use_external,svx,icuuc)
+
$(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/accessibility/AccessibleControlShape \
svx/source/accessibility/AccessibleEmptyEditSource \
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 65134fd50100..d4bc81352f90 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -51,8 +51,7 @@ $(eval $(call gb_Library_set_include,svxcore,\
#CFLAGS+= -DUNICODE -D_UNICODE
#.ENDIF
-$(eval $(call gb_Library_set_defs,svxcore,\
- $$(DEFS) \
+$(eval $(call gb_Library_add_defs,svxcore,\
-DSVX_DLLIMPLEMENTATION \
-DBOOST_SPIRIT_USE_OLD_NAMESPACE \
))
@@ -68,7 +67,6 @@ $(eval $(call gb_Library_add_linked_libs,svxcore,\
editeng \
fwe \
i18nisolang1 \
- icuuc \
lng \
sal \
sfx \
@@ -84,6 +82,8 @@ $(eval $(call gb_Library_add_linked_libs,svxcore,\
$(gb_STDLIBS) \
))
+$(call gb_Library_use_external,svxcore,icuuc)
+
$(eval $(call gb_Library_add_exception_objects,svxcore,\
svx/source/core/coreservices \
svx/source/customshapes/EnhancedCustomShape2d \
diff --git a/svx/Library_textconversiondlgs.mk b/svx/Library_textconversiondlgs.mk
index 513789f0f5e5..69bb8c75c8ff 100644
--- a/svx/Library_textconversiondlgs.mk
+++ b/svx/Library_textconversiondlgs.mk
@@ -36,10 +36,6 @@ $(eval $(call gb_Library_set_include,textconversiondlgs,\
-I$(OUTDIR)/inc/offuh \
))
-$(eval $(call gb_Library_set_defs,textconversiondlgs,\
- $$(DEFS) \
-))
-
$(eval $(call gb_Library_add_linked_libs,textconversiondlgs,\
comphelper \
cppuhelper \
diff --git a/vbahelper/Library_vbahelper.mk b/vbahelper/Library_vbahelper.mk
index 3b78599422e4..45691f8066a7 100755
--- a/vbahelper/Library_vbahelper.mk
+++ b/vbahelper/Library_vbahelper.mk
@@ -42,8 +42,7 @@ $(eval $(call gb_Library_set_include,vbahelper,\
-I$(OUTDIR)/inc/offuh \
))
-$(eval $(call gb_Library_set_defs,vbahelper,\
- $$(DEFS) \
+$(eval $(call gb_Library_add_defs,vbahelper,\
-DVBAHELPER_DLLIMPLEMENTATION \
))
@@ -59,6 +58,7 @@ $(eval $(call gb_Library_add_linked_libs,vbahelper,\
sfx \
svl \
svt \
+ svxcore \
tk \
tl \
utl \
diff --git a/xmloff/JunitTest_xmloff_unoapi.mk b/xmloff/JunitTest_xmloff_unoapi.mk
index 7dfe6974f225..3a9824dc6877 100755
--- a/xmloff/JunitTest_xmloff_unoapi.mk
+++ b/xmloff/JunitTest_xmloff_unoapi.mk
@@ -25,7 +25,7 @@
#
#*************************************************************************
-$(eval $(call gb_JunitTest_JunitTest,xmloff_unoapi))
+$(eval $(call gb_JunitTest_JunitTest,xmloff_unoapi,SRCDIR))
$(eval $(call gb_JunitTest_set_defs,xmloff_unoapi,\
$$(DEFS) \
diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk
index 278971088472..1ded182ff63e 100644
--- a/xmloff/Library_xo.mk
+++ b/xmloff/Library_xo.mk
@@ -40,8 +40,7 @@ $(eval $(call gb_Library_set_include,xo,\
-I$(OUTDIR)/inc/offuh \
))
-$(eval $(call gb_Library_set_defs,xo,\
- $$(DEFS) \
+$(eval $(call gb_Library_add_defs,xo,\
-DXMLOFF_DLLIMPLEMENTATION \
))
diff --git a/xmlscript/Library_xcr.mk b/xmlscript/Library_xcr.mk
new file mode 100644
index 000000000000..d3bb35c4fddf
--- /dev/null
+++ b/xmlscript/Library_xcr.mk
@@ -0,0 +1,71 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,xcr))
+
+$(eval $(call gb_Library_add_package_headers,xcr,xmlscript_inc))
+
+$(eval $(call gb_Library_set_componentfile,xcr,xmlscript/util/xcr))
+
+$(eval $(call gb_Library_set_include,xcr,\
+ -I$(SRCDIR)/xmlscript/source/inc \
+ -I$(SRCDIR)/xmlscript/inc/pch \
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Library_add_defs,xcr,\
+ -DXCR_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_add_linked_libs,xcr,\
+ sal \
+ cppu \
+ cppuhelper \
+ stl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,xcr,\
+ xmlscript/source/xmldlg_imexp/xmldlg_impmodels \
+ xmlscript/source/xmldlg_imexp/xmldlg_import \
+ xmlscript/source/xmldlg_imexp/xmldlg_addfunc \
+ xmlscript/source/xmldlg_imexp/xmldlg_export \
+ xmlscript/source/xmldlg_imexp/xmldlg_expmodels \
+ xmlscript/source/misc/unoservices \
+ xmlscript/source/xml_helper/xml_byteseq \
+ xmlscript/source/xml_helper/xml_impctx \
+ xmlscript/source/xml_helper/xml_element \
+ xmlscript/source/xmlflat_imexp/xmlbas_import \
+ xmlscript/source/xmlflat_imexp/xmlbas_export \
+ xmlscript/source/xmllib_imexp/xmllib_import \
+ xmlscript/source/xmllib_imexp/xmllib_export \
+ xmlscript/source/xmlmod_imexp/xmlmod_import \
+ xmlscript/source/xmlmod_imexp/xmlmod_export \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/xmlscript/Makefile b/xmlscript/Makefile
new file mode 100644
index 000000000000..90947b2e5f48
--- /dev/null
+++ b/xmlscript/Makefile
@@ -0,0 +1,38 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/xmlscript/Module_xmlscript.mk b/xmlscript/Module_xmlscript.mk
new file mode 100755
index 000000000000..30fa3147c8f5
--- /dev/null
+++ b/xmlscript/Module_xmlscript.mk
@@ -0,0 +1,36 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Module_Module,xmlscript))
+
+$(eval $(call gb_Module_add_targets,xmlscript,\
+ Library_xcr \
+ Package_inc \
+ Package_dtd \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/linguistic/inc/makefile.mk b/xmlscript/Package_dtd.mk
index fa5aad7b0a40..cab5ddd0faeb 100755
--- a/linguistic/inc/makefile.mk
+++ b/xmlscript/Package_dtd.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -24,24 +24,11 @@
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-PRJ=..
-PRJNAME=linguistic
-TARGET=inc
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.IF "$(ENABLE_PCH)"!=""
-ALLTAR : \
- $(SLO)$/precompiled.pch \
- $(SLO)$/precompiled_ex.pch
-
-.ENDIF # "$(ENABLE_PCH)"!=""
+$(eval $(call gb_Package_Package,xmlscript_inc,$(SRCDIR)/xmlscript/dtd))
+$(eval $(call gb_Package_add_file,xmlscript_inc,bin/dialog.dtd,dialog.dtd))
+$(eval $(call gb_Package_add_file,xmlscript_inc,bin/libraries.dtd,libraries.dtd))
+$(eval $(call gb_Package_add_file,xmlscript_inc,bin/library.dtd,library.dtd))
+$(eval $(call gb_Package_add_file,xmlscript_inc,bin/module.dtd,module.dtd))
+# vim: set noet sw=4 ts=4:
diff --git a/xmlscript/source/misc/makefile.mk b/xmlscript/Package_inc.mk
index dfac81bfa6aa..649dde7b44b3 100755
--- a/xmlscript/source/misc/makefile.mk
+++ b/xmlscript/Package_inc.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,24 +25,13 @@
#
#*************************************************************************
-PRJ=..$/..
+$(eval $(call gb_Package_Package,xmlscript_inc,$(SRCDIR)/xmlscript/inc))
-PRJNAME=xmlscript
-TARGET=misc
-NO_BSYMBOLIC=TRUE
-ENABLE_EXCEPTIONS=TRUE
+$(eval $(call gb_Package_add_file,xmlscript_inc,inc/xmlscript/xmldlg_imexp.hxx,xmlscript/xmldlg_imexp.hxx))
+$(eval $(call gb_Package_add_file,xmlscript_inc,inc/xmlscript/xml_helper.hxx,xmlscript/xml_helper.hxx))
+$(eval $(call gb_Package_add_file,xmlscript_inc,inc/xmlscript/xmllib_imexp.hxx,xmlscript/xmllib_imexp.hxx))
+$(eval $(call gb_Package_add_file,xmlscript_inc,inc/xmlscript/xmlmod_imexp.hxx,xmlscript/xmlmod_imexp.hxx))
+$(eval $(call gb_Package_add_file,xmlscript_inc,inc/xmlscript/xmlns.h,xmlscript/xmlns.h))
+$(eval $(call gb_Package_add_file,xmlscript_inc,inc/xmlscript/xcrdllapi.h,xmlscript/xcrdllapi.h))
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.IF "$(L10N_framework)"==""
-#-----------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/unoservices.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-.ENDIF # L10N_framework
-.INCLUDE : target.mk
+# vim: set noet sw=4 ts=4:
diff --git a/connectivity/source/drivers/evoab/LCatalog.hxx b/xmlscript/inc/xmlscript/xcrdllapi.h
index b8a205a38c83..8c4a7a581dc4 100644
--- a/connectivity/source/drivers/evoab/LCatalog.hxx
+++ b/xmlscript/inc/xmlscript/xcrdllapi.h
@@ -3,10 +3,13 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
+ * $RCSfile: XCRdllapi.h,v $
+ * $Revision: 1.4 $
+ *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -26,26 +29,17 @@
*
************************************************************************/
-#ifndef _CONNECTIVITY_EVOAB_LCATALOG_HXX_
-#define _CONNECTIVITY_EVOAB_LCATALOG_HXX_
-
-#include "file/FCatalog.hxx"
+#ifndef INCLUDED_XCRDLLAPI_H
+#define INCLUDED_XCRDLLAPI_H
-namespace connectivity
-{
- namespace evoab
- {
- class OEvoabConnection;
- class OEvoabCatalog : public file::OFileCatalog
- {
- public:
- virtual void refreshTables();
+#include "sal/types.h"
- public:
- OEvoabCatalog(OEvoabConnection* _pCon);
- };
- }
-}
-#endif // _CONNECTIVITY_EVOAB_LCATALOG_HXX_
+#if defined(XCR_DLLIMPLEMENTATION)
+#define XCR_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define XCR_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+#define XCR_DLLPRIVATE SAL_DLLPRIVATE
+#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlscript/inc/xmlscript/xml_helper.hxx b/xmlscript/inc/xmlscript/xml_helper.hxx
index f3b272db7afd..48c0905a0b49 100644
--- a/xmlscript/inc/xmlscript/xml_helper.hxx
+++ b/xmlscript/inc/xmlscript/xml_helper.hxx
@@ -35,6 +35,7 @@
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
+#include "xmlscript/xcrdllapi.h"
namespace xmlscript
{
@@ -46,7 +47,7 @@ namespace xmlscript
##################################################################################################*/
//==================================================================================================
-class XMLElement
+class XCR_DLLPUBLIC XMLElement
: public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XAttributeList >
{
public:
@@ -131,13 +132,13 @@ protected:
##################################################################################################*/
//==================================================================================================
-::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >
+XCR_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >
SAL_CALL createInputStream(
::rtl::ByteSequence const & rInData )
SAL_THROW( () );
//==================================================================================================
-::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >
+XCR_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >
SAL_CALL createOutputStream(
::rtl::ByteSequence * pOutData )
SAL_THROW( () );
diff --git a/xmlscript/inc/xmlscript/xmldlg_imexp.hxx b/xmlscript/inc/xmlscript/xmldlg_imexp.hxx
index 47d0d17e989f..86b98c13406b 100644
--- a/xmlscript/inc/xmlscript/xmldlg_imexp.hxx
+++ b/xmlscript/inc/xmlscript/xmldlg_imexp.hxx
@@ -36,13 +36,13 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include "xmlscript/xmlns.h"
-
+#include "xmlscript/xcrdllapi.h"
namespace xmlscript
{
//==============================================================================
-void SAL_CALL exportDialogModel(
+XCR_DLLPUBLIC void SAL_CALL exportDialogModel(
::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XExtendedDocumentHandler > const & xOut,
::com::sun::star::uno::Reference<
@@ -52,7 +52,7 @@ void SAL_CALL exportDialogModel(
SAL_THROW( (::com::sun::star::uno::Exception) );
//==============================================================================
-::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler >
+XCR_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler >
SAL_CALL importDialogModel(
::com::sun::star::uno::Reference<
::com::sun::star::container::XNameContainer > const & xDialogModel,
@@ -65,7 +65,7 @@ SAL_CALL importDialogModel(
// additional functions for convenience
//==============================================================================
-::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >
+XCR_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >
SAL_CALL exportDialogModel(
::com::sun::star::uno::Reference<
::com::sun::star::container::XNameContainer > const & xDialogModel,
@@ -76,7 +76,7 @@ SAL_CALL exportDialogModel(
SAL_THROW( (::com::sun::star::uno::Exception) );
//==============================================================================
-void SAL_CALL importDialogModel(
+XCR_DLLPUBLIC void SAL_CALL importDialogModel(
::com::sun::star::uno::Reference<
::com::sun::star::io::XInputStream > const & xInput,
::com::sun::star::uno::Reference<
diff --git a/xmlscript/inc/xmlscript/xmllib_imexp.hxx b/xmlscript/inc/xmlscript/xmllib_imexp.hxx
index 95750c26655f..9b5aad1318cc 100644
--- a/xmlscript/inc/xmlscript/xmllib_imexp.hxx
+++ b/xmlscript/inc/xmlscript/xmllib_imexp.hxx
@@ -32,7 +32,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include "xmlscript/xmlns.h"
-
+#include "xmlscript/xcrdllapi.h"
namespace xmlscript
{
@@ -42,7 +42,7 @@ namespace xmlscript
// HACK C++ struct to transport info. Later the container
// itself should do the export/import and use exportet XML
// functionality from xmlscript
-struct LibDescriptor
+struct XCR_DLLPUBLIC LibDescriptor
{
::rtl::OUString aName;
::rtl::OUString aStorageURL;
@@ -53,7 +53,7 @@ struct LibDescriptor
sal_Bool bPreload;
};
-struct LibDescriptorArray
+struct XCR_DLLPUBLIC LibDescriptorArray
{
LibDescriptor* mpLibs;
sal_Int32 mnLibCount;
@@ -65,27 +65,27 @@ struct LibDescriptorArray
};
-void
+XCR_DLLPUBLIC void
SAL_CALL exportLibraryContainer(
::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XExtendedDocumentHandler > const & xOut,
const LibDescriptorArray* pLibArray )
SAL_THROW( (::com::sun::star::uno::Exception) );
-::com::sun::star::uno::Reference<
+XCR_DLLPUBLIC ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XDocumentHandler >
SAL_CALL importLibraryContainer( LibDescriptorArray* pLibArray )
SAL_THROW( (::com::sun::star::uno::Exception) );
-void
+XCR_DLLPUBLIC void
SAL_CALL exportLibrary(
::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XExtendedDocumentHandler > const & xOut,
const LibDescriptor& rLib )
SAL_THROW( (::com::sun::star::uno::Exception) );
-::com::sun::star::uno::Reference<
+XCR_DLLPUBLIC ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XDocumentHandler >
SAL_CALL importLibrary( LibDescriptor& rLib )
SAL_THROW( (::com::sun::star::uno::Exception) );
diff --git a/xmlscript/inc/xmlscript/xmlmod_imexp.hxx b/xmlscript/inc/xmlscript/xmlmod_imexp.hxx
index f2e3b169454f..fd2faf14586a 100644
--- a/xmlscript/inc/xmlscript/xmlmod_imexp.hxx
+++ b/xmlscript/inc/xmlscript/xmlmod_imexp.hxx
@@ -31,7 +31,7 @@
#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <xmlscript/xmlns.h>
-
+#include "xmlscript/xcrdllapi.h"
namespace xmlscript
{
@@ -41,7 +41,7 @@ namespace xmlscript
// HACK C++ struct to transport info. Later the container
// itself should do the export/import and use exportet XML
// functionality from xmlscript
-struct ModuleDescriptor
+struct XCR_DLLPUBLIC ModuleDescriptor
{
::rtl::OUString aName;
::rtl::OUString aLanguage;
@@ -49,14 +49,14 @@ struct ModuleDescriptor
::rtl::OUString aModuleType; // VBA
};
-void
+XCR_DLLPUBLIC void
SAL_CALL exportScriptModule(
::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XExtendedDocumentHandler > const & xOut,
const ModuleDescriptor& rMod )
SAL_THROW( (::com::sun::star::uno::Exception) );
-::com::sun::star::uno::Reference<
+XCR_DLLPUBLIC ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XDocumentHandler >
SAL_CALL importScriptModule( ModuleDescriptor& rMod )
SAL_THROW( (::com::sun::star::uno::Exception) );
diff --git a/xmlscript/prj/build.lst b/xmlscript/prj/build.lst
index 388a59f134ff..ea87780c3832 100644
--- a/xmlscript/prj/build.lst
+++ b/xmlscript/prj/build.lst
@@ -1,10 +1,3 @@
xt xmlscript : comphelper tools offapi LIBXSLT:libxslt NULL
-xt xmlscript usr1 - all xt_mkout NULL
-xt xmlscript\inc nmake - all xt_inc NULL
-xt xmlscript\source\xml_helper nmake - all xt_xml_helper xt_inc NULL
-xt xmlscript\source\xmldlg_imexp nmake - all xt_xmldlg_imexp xt_inc NULL
-xt xmlscript\source\xmllib_imexp nmake - all xt_xmllib_imexp xt_inc NULL
-xt xmlscript\source\xmlmod_imexp nmake - all xt_xmlmod_imexp xt_inc NULL
-xt xmlscript\source\xmlflat_imexp nmake - all xt_xmlflat_imexp xt_inc NULL
-xt xmlscript\source\misc nmake - all xt_misc xt_inc NULL
-xt xmlscript\util nmake - all xt_util xt_xml_helper xt_xmldlg_imexp xt_xmllib_imexp xt_xmlmod_imexp xt_xmlflat_imexp xt_misc NULL
+xt xmlscript\prj nmake - all xt_prj NULL
+
diff --git a/xmlscript/prj/d.lst b/xmlscript/prj/d.lst
index 6a2447ad8c1f..e69de29bb2d1 100644
--- a/xmlscript/prj/d.lst
+++ b/xmlscript/prj/d.lst
@@ -1,14 +0,0 @@
-mkdir: %_DEST%\inc\xmlscript
-..\%__SRC%\bin\*.dll %_DEST%\bin\*.dll
-..\%__SRC%\lib\*.lib %_DEST%\lib\*.lib
-..\%__SRC%\lib\lib*.so %_DEST%\lib\lib*.so
-..\%__SRC%\lib\*.dylib %_DEST%\lib\*.dylib
-
-..\inc\xmlscript\xml_helper.hxx %_DEST%\inc\xmlscript\xml_helper.hxx
-..\inc\xmlscript\xmldlg_imexp.hxx %_DEST%\inc\xmlscript\xmldlg_imexp.hxx
-..\inc\xmlscript\xmllib_imexp.hxx %_DEST%\inc\xmlscript\xmllib_imexp.hxx
-..\inc\xmlscript\xmlmod_imexp.hxx %_DEST%\inc\xmlscript\xmlmod_imexp.hxx
-..\inc\xmlscript\xmlns.h %_DEST%\inc\xmlscript\xmlns.h
-
-..\dtd\*.dtd %_DEST%\bin\*.dtd
-..\%__SRC%\misc\xcr.component %_DEST%\xml\xcr.component
diff --git a/xmlscript/inc/makefile.mk b/xmlscript/prj/makefile.mk
index 4141e88a2844..88cd9dfe08b8 100755
--- a/xmlscript/inc/makefile.mk
+++ b/xmlscript/prj/makefile.mk
@@ -24,24 +24,17 @@
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-PRJ=..
-
-PRJNAME=xmlscript
-TARGET=inc
-
-# --- Settings -----------------------------------------------------
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-# --- Targets -------------------------------------------------------
+PRJ=..
+TARGET=prj
-.INCLUDE : target.mk
+.INCLUDE : settings.mk
-.IF "$(ENABLE_PCH)"!=""
-ALLTAR : \
- $(SLO)$/precompiled.pch \
- $(SLO)$/precompiled_ex.pch
-
-.ENDIF # "$(ENABLE_PCH)"!=""
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
+all:
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/xmlscript/inc/xmlscript/xml_import.hxx b/xmlscript/source/inc/xml_import.hxx
index ca8cc3a0f0e9..2e36643379fd 100644
--- a/xmlscript/inc/xmlscript/xml_import.hxx
+++ b/xmlscript/source/inc/xml_import.hxx
@@ -31,7 +31,6 @@
#include "com/sun/star/xml/input/XRoot.hpp"
#include "com/sun/star/xml/sax/XExtendedDocumentHandler.hpp"
-
namespace xmlscript
{
diff --git a/xmlscript/source/xml_helper/makefile.mk b/xmlscript/source/xml_helper/makefile.mk
deleted file mode 100755
index 7b48695bae64..000000000000
--- a/xmlscript/source/xml_helper/makefile.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..
-
-PRJNAME=xmlscript
-TARGET=xml_helper
-NO_BSYMBOLIC=TRUE
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.IF "$(L10N_framework)"==""
-#-----------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/xml_impctx.obj \
- $(SLO)$/xml_element.obj \
- $(SLO)$/xml_byteseq.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-.ENDIF # L10N_framework
-
-.INCLUDE : target.mk
diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx
index 646fadfb1b9f..308efd537c29 100644
--- a/xmlscript/source/xml_helper/xml_impctx.cxx
+++ b/xmlscript/source/xml_helper/xml_impctx.cxx
@@ -36,7 +36,7 @@
#include "cppuhelper/implementationentry.hxx"
#include "cppuhelper/implbase1.hxx"
#include "cppuhelper/implbase3.hxx"
-#include "xmlscript/xml_import.hxx"
+#include "xml_import.hxx"
#include "com/sun/star/xml/input/XAttributes.hpp"
#include "com/sun/star/lang/XInitialization.hpp"
diff --git a/xmlscript/source/xmldlg_imexp/makefile.mk b/xmlscript/source/xmldlg_imexp/makefile.mk
deleted file mode 100755
index e0583aa78d9b..000000000000
--- a/xmlscript/source/xmldlg_imexp/makefile.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..
-
-PRJNAME=xmlscript
-TARGET=xmldlg_imexp
-NO_BSYMBOLIC=TRUE
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.IF "$(L10N_framework)"==""
-#-----------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/xmldlg_import.obj \
- $(SLO)$/xmldlg_impmodels.obj \
- $(SLO)$/xmldlg_export.obj \
- $(SLO)$/xmldlg_expmodels.obj \
- $(SLO)$/xmldlg_addfunc.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-.ENDIF # L10N_framework
-
-.INCLUDE : target.mk
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
index b5d61fd7dc83..8e3b28dafcb9 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
@@ -36,7 +36,7 @@
#include <rtl/ustrbuf.hxx>
-#include <xmlscript/xml_import.hxx>
+#include <xml_import.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/awt/CharSet.hpp>
diff --git a/xmlscript/source/xmlflat_imexp/makefile.mk b/xmlscript/source/xmlflat_imexp/makefile.mk
deleted file mode 100755
index ed4d434afbd0..000000000000
--- a/xmlscript/source/xmlflat_imexp/makefile.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=xmlscript
-TARGET=xmlflat_imexp
-NO_BSYMBOLIC=TRUE
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.IF "$(L10N_framework)"==""
-#-----------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/xmlbas_export.obj \
- $(SLO)$/xmlbas_import.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-.ENDIF # L10N_framework
-
-.INCLUDE : target.mk
diff --git a/xmlscript/source/xmllib_imexp/makefile.mk b/xmlscript/source/xmllib_imexp/makefile.mk
deleted file mode 100755
index c6ef65a43393..000000000000
--- a/xmlscript/source/xmllib_imexp/makefile.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..
-
-PRJNAME=xmlscript
-TARGET=xmllib_imexp
-NO_BSYMBOLIC=TRUE
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.IF "$(L10N_framework)"==""
-#-----------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/xmllib_import.obj \
- $(SLO)$/xmllib_export.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-
-.ENDIF # L10N_framework
-
-.INCLUDE : target.mk
diff --git a/xmlscript/source/xmllib_imexp/xmllib_import.cxx b/xmlscript/source/xmllib_imexp/xmllib_import.cxx
index a1fd0fff2b2f..2be008de582c 100644
--- a/xmlscript/source/xmllib_imexp/xmllib_import.cxx
+++ b/xmlscript/source/xmllib_imexp/xmllib_import.cxx
@@ -34,7 +34,7 @@
#include <rtl/ustrbuf.hxx>
-#include <xmlscript/xml_import.hxx>
+#include <xml_import.hxx>
#include <comphelper/processfactory.hxx>
diff --git a/xmlscript/source/xmlmod_imexp/makefile.mk b/xmlscript/source/xmlmod_imexp/makefile.mk
deleted file mode 100755
index 174bf94c75ae..000000000000
--- a/xmlscript/source/xmlmod_imexp/makefile.mk
+++ /dev/null
@@ -1,49 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..
-
-PRJNAME=xmlscript
-TARGET=xmlmod_imexp
-NO_BSYMBOLIC=TRUE
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.IF "$(L10N_framework)"==""
-#-----------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/xmlmod_import.obj \
- $(SLO)$/xmlmod_export.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-
-.ENDIF # L10N_framework
-.INCLUDE : target.mk
diff --git a/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx b/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
index efae2852eec6..ab64e9eddb61 100644
--- a/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
+++ b/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
@@ -34,7 +34,7 @@
#include <rtl/ustrbuf.hxx>
-#include <xmlscript/xml_import.hxx>
+#include <xml_import.hxx>
#include <comphelper/processfactory.hxx>
diff --git a/xmlscript/util/makefile.mk b/xmlscript/util/makefile.mk
deleted file mode 100755
index c10f31946aca..000000000000
--- a/xmlscript/util/makefile.mk
+++ /dev/null
@@ -1,85 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..
-
-PRJNAME=xmlscript
-TARGET=xcr
-NO_BSYMBOLIC=TRUE
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-#-------------------------------------------------------------------
-
-LIB1TARGET= $(SLB)$/$(TARGET).lib
-
-LIB1FILES= \
- $(SLB)$/xml_helper.lib \
- $(SLB)$/xmldlg_imexp.lib \
- $(SLB)$/xmllib_imexp.lib \
- $(SLB)$/xmlmod_imexp.lib \
- $(SLB)$/xmlflat_imexp.lib \
- $(SLB)$/misc.lib
-
-SHL1TARGET=$(TARGET)$(DLLPOSTFIX)
-
-SHL1LIBS= \
- $(LIB1TARGET)
-
-SHL1STDLIBS= \
- $(COMPHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(COMPHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB)
-
-SHL1DEPN=
-SHL1IMPLIB= i$(TARGET)
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-
-DEF1NAME= $(SHL1TARGET)
-DEFLIB1NAME= $(TARGET)
-DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-$(MISC)$/$(SHL1TARGET).flt : makefile.mk xcr.flt
- @echo ------------------------------
- @echo Making: $@
- $(TYPE) xcr.flt > $@
-
-ALLTAR : $(MISC)/xcr.component
-
-$(MISC)/xcr.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
- xcr.component
- $(XSLTPROC) --nonet --stringparam uri \
- '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
- $(SOLARENV)/bin/createcomponent.xslt xcr.component
diff --git a/xmlscript/util/xcr.flt b/xmlscript/util/xcr.flt
deleted file mode 100755
index e9a7f0344007..000000000000
--- a/xmlscript/util/xcr.flt
+++ /dev/null
@@ -1,13 +0,0 @@
-??_7
-??_8
-??_C
-??_E
-??_F
-??_G
-??_H
-??_I
-0Imp
-Impl@@
-Imp@@
-__CT
-_STL