summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-11-19 19:45:04 +0000
committerMichael Meeks <michael.meeks@suse.com>2012-11-21 14:52:11 +0000
commitf78a2bcce88dd5c12052ae3e55c561cdd48b05fe (patch)
treee56530808fd0e0ec6cfa1eb58339c8cd467854f0 /xmlhelp
parente5111574fd904b38a3980ca4ea3d21cfcb22dea6 (diff)
re-base on ALv2 code. Includes:
Patch contributed by Herbert Duerr: #i118662# remove berkeleyDB from module xmlhelp (author=orwitt) http://svn.apache.org/viewvc?view=revision&revision=1213188 #i119141# remove ISCII converter for now http://svn.apache.org/viewvc?view=revision&revision=1306246 make exceptions for cppunittester verbose http://svn.apache.org/viewvc?view=revision&revision=1174831 Patches contributed by Pedro Giffuni: Avoid some uses of non portable #!/bin/bash in shell scripts. http://svn.apache.org/viewvc?view=revision&revision=1235297 Patch contributed by Oliver-Rainer Wittmann 88652: applied patch, remove unicows deps http://svn.apache.org/viewvc?view=revision&revision=1177585 drop OS/2 code, remove in-line assembler ARM atomics, and obsolete armarch header.
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/Library_ucpchelp1.mk1
-rw-r--r--xmlhelp/Makefile7
-rw-r--r--xmlhelp/prj/build.lst2
-rw-r--r--xmlhelp/source/cxxhelp/inc/util/CompressorIterator.hxx43
-rw-r--r--xmlhelp/source/cxxhelp/inc/util/Decompressor.hxx37
-rw-r--r--xmlhelp/source/cxxhelp/inc/util/RandomAccessStream.hxx43
-rw-r--r--xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx37
-rw-r--r--xmlhelp/source/cxxhelp/provider/content.cxx37
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx233
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.hxx53
-rw-r--r--xmlhelp/source/cxxhelp/provider/db.cxx226
-rw-r--r--xmlhelp/source/cxxhelp/provider/db.hxx194
-rw-r--r--xmlhelp/source/cxxhelp/provider/inputstream.cxx37
-rw-r--r--xmlhelp/source/cxxhelp/provider/provider.cxx37
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultset.cxx37
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultset.hxx43
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetbase.cxx37
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx37
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx37
-rw-r--r--xmlhelp/source/cxxhelp/provider/services.cxx43
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.cxx100
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.hxx43
-rw-r--r--xmlhelp/source/cxxhelp/test/makefile.mk33
-rw-r--r--xmlhelp/source/cxxhelp/test/searchdemo.cxx37
-rw-r--r--xmlhelp/source/treeview/tvfactory.cxx37
-rw-r--r--xmlhelp/source/treeview/tvhlp1.component43
-rw-r--r--xmlhelp/source/treeview/tvread.cxx37
-rw-r--r--xmlhelp/source/treeview/tvread.hxx37
-rw-r--r--xmlhelp/util/embed.xsl17
-rw-r--r--xmlhelp/util/idxcaption.xsl19
-rw-r--r--xmlhelp/util/idxcontent.xsl19
-rw-r--r--xmlhelp/util/main_transform.xsl42
-rw-r--r--xmlhelp/util/ucpchelp.xml18
-rw-r--r--xmlhelp/util/ucpchelp1.component43
34 files changed, 599 insertions, 1147 deletions
diff --git a/xmlhelp/Library_ucpchelp1.mk b/xmlhelp/Library_ucpchelp1.mk
index 7e867cc96875..23527d1f9df8 100644
--- a/xmlhelp/Library_ucpchelp1.mk
+++ b/xmlhelp/Library_ucpchelp1.mk
@@ -56,7 +56,6 @@ $(eval $(call gb_Library_set_include,ucpchelp1,\
$(eval $(call gb_Library_use_sdk_api,ucpchelp1))
$(eval $(call gb_Library_use_externals,ucpchelp1,\
- berkeleydb \
clucene \
expat_utf8 \
libxml2 \
diff --git a/xmlhelp/Makefile b/xmlhelp/Makefile
index ccb1c85a04da..0997e628485b 100644
--- a/xmlhelp/Makefile
+++ b/xmlhelp/Makefile
@@ -1,4 +1,11 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
diff --git a/xmlhelp/prj/build.lst b/xmlhelp/prj/build.lst
index 0b08b2c15841..f88ac061ec84 100644
--- a/xmlhelp/prj/build.lst
+++ b/xmlhelp/prj/build.lst
@@ -1,3 +1,3 @@
-xh xmlhelp : comphelper ucbhelper LIBXSLT:libxslt unoil BERKELEYDB:berkeleydb javaunohelper DESKTOP:l10ntools DESKTOP:helpcompiler unotools NULL
+xh xmlhelp : comphelper ucbhelper LIBXSLT:libxslt unoil javaunohelper DESKTOP:l10ntools DESKTOP:helpcompiler unotools NULL
xh xmlhelp usr1 - all xh_mkout NULL
xh xmlhelp\prj nmake - all xh_prj NULL
diff --git a/xmlhelp/source/cxxhelp/inc/util/CompressorIterator.hxx b/xmlhelp/source/cxxhelp/inc/util/CompressorIterator.hxx
index 1df455fbf2a2..ab292b1c5193 100644
--- a/xmlhelp/source/cxxhelp/inc/util/CompressorIterator.hxx
+++ b/xmlhelp/source/cxxhelp/inc/util/CompressorIterator.hxx
@@ -1,30 +1,21 @@
/* -*- 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.
- *
- ************************************************************************/
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _XMLSEARCH_UTIL_COMPRESSORITERATOR_HXX_
#define _XMLSEARCH_UTIL_COMPRESSORITERATOR_HXX_
diff --git a/xmlhelp/source/cxxhelp/inc/util/Decompressor.hxx b/xmlhelp/source/cxxhelp/inc/util/Decompressor.hxx
index 44da18dc8961..f678a4ecf866 100644
--- a/xmlhelp/source/cxxhelp/inc/util/Decompressor.hxx
+++ b/xmlhelp/source/cxxhelp/inc/util/Decompressor.hxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _XMLSEARCH_UTIL_DECOMPRESSOR_HXX_
#define _XMLSEARCH_UTIL_DECOMPRESSOR_HXX_
diff --git a/xmlhelp/source/cxxhelp/inc/util/RandomAccessStream.hxx b/xmlhelp/source/cxxhelp/inc/util/RandomAccessStream.hxx
index fc88fcba88b4..861751731df8 100644
--- a/xmlhelp/source/cxxhelp/inc/util/RandomAccessStream.hxx
+++ b/xmlhelp/source/cxxhelp/inc/util/RandomAccessStream.hxx
@@ -1,30 +1,21 @@
/* -*- 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.
- *
- ************************************************************************/
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _XMLEARCH_UTIL_RANDOMACCESSSTREAM_HXX_
#define _XMLEARCH_UTIL_RANDOMACCESSSTREAM_HXX_
diff --git a/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx b/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx
index 303340e614aa..7db8eccb6f2e 100644
--- a/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx
+++ b/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <string.h>
diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx b/xmlhelp/source/cxxhelp/provider/content.cxx
index fe166e37abfe..fa9d00a46848 100644
--- a/xmlhelp/source/cxxhelp/provider/content.cxx
+++ b/xmlhelp/source/cxxhelp/provider/content.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
/**************************************************************************
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 5113638f002a..f9dfe9f1727e 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include "db.hxx"
#include <osl/diagnose.h>
@@ -73,7 +64,6 @@
#include "urlparameter.hxx"
using namespace chelp;
-using namespace berkeleydbproxy;
using namespace com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::io;
@@ -187,8 +177,6 @@ Databases::~Databases()
DatabasesTable::iterator it = m_aDatabases.begin();
while( it != m_aDatabases.end() )
{
- if( it->second )
- it->second->close( 0 );
delete it->second;
++it;
}
@@ -575,7 +563,7 @@ rtl::OUString Databases::country( const rtl::OUString& Language )
-Db* Databases::getBerkeley( const rtl::OUString& Database,
+helpdatafileproxy::Hdf* Databases::getHelpDataFile( const rtl::OUString& Database,
const rtl::OUString& Language, bool helpText,
const rtl::OUString* pExtensionPath )
{
@@ -594,13 +582,13 @@ Db* Databases::getBerkeley( const rtl::OUString& Database,
key = *pExtensionPath + Language + dbFileName; // make unique, don't change language
std::pair< DatabasesTable::iterator,bool > aPair =
- m_aDatabases.insert( DatabasesTable::value_type( key,(Db*)0 ) );
+ m_aDatabases.insert( DatabasesTable::value_type( key, 0 ) );
DatabasesTable::iterator it = aPair.first;
if( aPair.second && ! it->second )
{
- Db* table = new Db();
+ helpdatafileproxy::Hdf* pHdf = 0;
rtl::OUString fileURL;
if( pExtensionPath )
@@ -608,25 +596,18 @@ Db* Databases::getBerkeley( const rtl::OUString& Database,
else
fileURL = getInstallPathAsURL() + key;
- rtl::OUString fileNameDBHelp( fileURL );
+ rtl::OUString fileNameHDFHelp( fileURL );
//Extensions always use the new format
if( pExtensionPath != NULL )
- fileNameDBHelp += rtl::OUString( "_" );
+ fileNameHDFHelp += rtl::OUString( "_" );
//SimpleFileAccess takes file URLs as arguments!!! Using filenames works accidentally but
//fails for example when using long path names on Windows (starting with \\?\)
- if( m_xSFA->exists( fileNameDBHelp ) )
+ if( m_xSFA->exists( fileNameHDFHelp ) )
{
- DBHelp* pDBHelp = new DBHelp( fileNameDBHelp, m_xSFA );
- table->setDBHelp( pDBHelp );
- }
- else if( table->open( 0,fileURL, DB_BTREE,DB_RDONLY,0644 ) )
- {
- table->close( 0 );
- delete table;
- table = 0;
+ pHdf = new helpdatafileproxy::Hdf( fileNameHDFHelp, m_xSFA );
}
- it->second = table;
+ it->second = pHdf;
}
return it->second;
@@ -734,18 +715,18 @@ namespace chelp {
KeywordInfo::KeywordElement::KeywordElement( Databases *pDatabases,
- Db* pDb,
+ helpdatafileproxy::Hdf* pHdf,
rtl::OUString& ky,
rtl::OUString& data )
: key( ky )
{
pDatabases->replaceName( key );
- init( pDatabases,pDb,data );
+ init( pDatabases,pHdf,data );
}
-void KeywordInfo::KeywordElement::init( Databases *pDatabases,Db* pDb,const rtl::OUString& ids )
+void KeywordInfo::KeywordElement::init( Databases *pDatabases,helpdatafileproxy::Hdf* pHdf,const rtl::OUString& ids )
{
const sal_Unicode* idstr = ids.getStr();
std::vector< rtl::OUString > id,anchor;
@@ -770,8 +751,6 @@ void KeywordInfo::KeywordElement::init( Databases *pDatabases,Db* pDb,const rtl:
listAnchor.realloc( id.size() );
listTitle.realloc( id.size() );
- Dbt data;
- DBData aDBData;
const sal_Char* pData = NULL;
const sal_Char pEmpty[] = "";
@@ -781,25 +760,13 @@ void KeywordInfo::KeywordElement::init( Databases *pDatabases,Db* pDb,const rtl:
listAnchor[i] = anchor[i];
pData = pEmpty;
- if( pDb )
+ if( pHdf )
{
rtl::OString idi( id[i].getStr(),id[i].getLength(),RTL_TEXTENCODING_UTF8 );
- DBHelp* pDBHelp = pDb->getDBHelp();
- if( pDBHelp != NULL )
- {
- bool bSuccess = pDBHelp->getValueForKey( idi, aDBData );
- if( bSuccess )
- {
- pData = aDBData.getData();
- }
- }
- else
- {
- Dbt key_( static_cast< void* >( const_cast< sal_Char* >( idi.getStr() ) ),
- idi.getLength() );
- pDb->get( 0,&key_,&data,0 );
- pData = static_cast<sal_Char*>( data.get_data() );
- }
+ helpdatafileproxy::HDFData aHDFData;
+ bool bSuccess = pHdf->getValueForKey( idi, aHDFData );
+ if( bSuccess )
+ pData = aHDFData.getData();
}
DbtToStringConverter converter( pData );
@@ -897,30 +864,25 @@ KeywordInfo* Databases::getKeyword( const rtl::OUString& Database,
bool bExtension = false;
while( !(fileURL = aDbFileIt.nextDbFile( bExtension )).isEmpty() )
{
- Db table;
-
- rtl::OUString fileNameDBHelp( fileURL );
+ rtl::OUString fileNameHDFHelp( fileURL );
if( bExtension )
- fileNameDBHelp += rtl::OUString( "_" );
- if( m_xSFA->exists( fileNameDBHelp ) )
+ fileNameHDFHelp += rtl::OUString::createFromAscii( "_" );
+ if( m_xSFA->exists( fileNameHDFHelp ) )
{
- DBHelp aDBHelp( fileNameDBHelp, m_xSFA );
-
- DBData aKey;
- DBData aValue;
- if( aDBHelp.startIteration() )
+ helpdatafileproxy::Hdf aHdf( fileNameHDFHelp, m_xSFA );
+ helpdatafileproxy::HDFData aKey;
+ helpdatafileproxy::HDFData aValue;
+ if( aHdf.startIteration() )
{
- Db* idmap = getBerkeley( Database,Language );
-
- DBHelp* pDBHelp = idmap->getDBHelp();
- if( pDBHelp != NULL )
+ helpdatafileproxy::Hdf* pHdf = getHelpDataFile( Database,Language );
+ if( pHdf != NULL )
{
bool bOptimizeForPerformance = true;
- pDBHelp->releaseHashMap();
- pDBHelp->createHashMap( bOptimizeForPerformance );
+ pHdf->releaseHashMap();
+ pHdf->createHashMap( bOptimizeForPerformance );
}
- while( aDBHelp.getNextKeyAndValue( aKey, aValue ) )
+ while( aHdf.getNextKeyAndValue( aKey, aValue ) )
{
rtl::OUString keyword( aKey.getData(), aKey.getSize(),
RTL_TEXTENCODING_UTF8 );
@@ -935,59 +897,16 @@ KeywordInfo* Databases::getKeyword( const rtl::OUString& Database,
continue;
aVector.push_back( KeywordInfo::KeywordElement( this,
- idmap,
+ pHdf,
keyword,
doclist ) );
}
- aDBHelp.stopIteration();
+ aHdf.stopIteration();
- if( pDBHelp != NULL )
- pDBHelp->releaseHashMap();
+ if( pHdf != NULL )
+ pHdf->releaseHashMap();
}
}
-
- else if( 0 == table.open( 0,fileURL,DB_BTREE,DB_RDONLY,0644 ) )
- {
- Db* idmap = getBerkeley( Database,Language );
-
- bool first = true;
-
- Dbc* cursor = 0;
- table.cursor( 0,&cursor,0 );
- Dbt key_,data;
- key_.set_flags( DB_DBT_MALLOC ); // Initially the cursor must allocate the necessary memory
- data.set_flags( DB_DBT_MALLOC );
- while( cursor && DB_NOTFOUND != cursor->get( &key_,&data,DB_NEXT ) )
- {
- rtl::OUString keyword( static_cast<sal_Char*>(key_.get_data()),
- key_.get_size(),
- RTL_TEXTENCODING_UTF8 );
- rtl::OUString doclist( static_cast<sal_Char*>(data.get_data()),
- data.get_size(),
- RTL_TEXTENCODING_UTF8 );
-
- bool bBelongsToDatabase = true;
- if( bExtension )
- bBelongsToDatabase = checkModuleMatchForExtension( Database, doclist );
-
- if( !bBelongsToDatabase )
- continue;
-
- aVector.push_back( KeywordInfo::KeywordElement( this,
- idmap,
- keyword,
- doclist ) );
- if( first )
- {
- key_.set_flags( DB_DBT_REALLOC );
- data.set_flags( DB_DBT_REALLOC );
- first = false;
- }
- }
-
- if( cursor ) cursor->close();
- }
- table.close( 0 );
}
// sorting
@@ -1297,8 +1216,7 @@ void Databases::setActiveText( const rtl::OUString& Module,
rtl::OString id( Id.getStr(),Id.getLength(),RTL_TEXTENCODING_UTF8 );
EmptyActiveTextSet::iterator it = m_aEmptyActiveTextSet.find( id );
bool bFoundAsEmpty = ( it != m_aEmptyActiveTextSet.end() );
- Dbt data;
- DBData aDBData;
+ helpdatafileproxy::HDFData aHDFData;
int nSize = 0;
const sal_Char* pData = NULL;
@@ -1306,27 +1224,12 @@ void Databases::setActiveText( const rtl::OUString& Module,
bool bSuccess = false;
if( !bFoundAsEmpty )
{
- Db* db;
- Dbt key( static_cast< void* >( const_cast< sal_Char* >( id.getStr() ) ),id.getLength() );
- while( !bSuccess && (db = aDbIt.nextDb()) != NULL )
+ helpdatafileproxy::Hdf* pHdf = 0;
+ while( !bSuccess && (pHdf = aDbIt.nextHdf()) != NULL )
{
- DBHelp* pDBHelp = db->getDBHelp();
- if( pDBHelp != NULL )
- {
- bSuccess = pDBHelp->getValueForKey( id, aDBData );
- nSize = aDBData.getSize();
- pData = aDBData.getData();
- }
- else
- {
- int err = db->get( 0, &key, &data, 0 );
- if( err == 0 )
- {
- bSuccess = true;
- nSize = data.get_size();
- pData = static_cast<sal_Char*>( data.get_data() );
- }
- }
+ bSuccess = pHdf->getValueForKey( id, aHDFData );
+ nSize = aHDFData.getSize();
+ pData = aHDFData.getData();
}
}
@@ -1648,16 +1551,16 @@ void ExtensionIteratorBase::implGetLanguageVectorFromPackage( ::std::vector< ::r
//===================================================================
// class DataBaseIterator
-Db* DataBaseIterator::nextDb( rtl::OUString* o_pExtensionPath, rtl::OUString* o_pExtensionRegistryPath )
+helpdatafileproxy::Hdf* DataBaseIterator::nextHdf( rtl::OUString* o_pExtensionPath, rtl::OUString* o_pExtensionRegistryPath )
{
- Db* pRetDb = NULL;
+ helpdatafileproxy::Hdf* pRetHdf = NULL;
- while( !pRetDb && m_eState != END_REACHED )
+ while( !pRetHdf && m_eState != END_REACHED )
{
switch( m_eState )
{
case INITIAL_MODULE:
- pRetDb = m_rDatabases.getBerkeley( m_aInitialModule, m_aLanguage, m_bHelpText );
+ pRetHdf = m_rDatabases.getHelpDataFile( m_aInitialModule, m_aLanguage, m_bHelpText );
m_eState = USER_EXTENSIONS; // Later: SHARED_MODULE
break;
@@ -1671,7 +1574,7 @@ Db* DataBaseIterator::nextDb( rtl::OUString* o_pExtensionPath, rtl::OUString* o_
Reference< deployment::XPackage > xHelpPackage = implGetNextUserHelpPackage( xParentPackageBundle );
if( !xHelpPackage.is() )
break;
- pRetDb = implGetDbFromPackage( xHelpPackage, o_pExtensionPath, o_pExtensionRegistryPath );
+ pRetHdf = implGetHdfFromPackage( xHelpPackage, o_pExtensionPath, o_pExtensionRegistryPath );
break;
}
@@ -1682,7 +1585,7 @@ Db* DataBaseIterator::nextDb( rtl::OUString* o_pExtensionPath, rtl::OUString* o_
if( !xHelpPackage.is() )
break;
- pRetDb = implGetDbFromPackage( xHelpPackage, o_pExtensionPath, o_pExtensionRegistryPath );
+ pRetHdf = implGetHdfFromPackage( xHelpPackage, o_pExtensionPath, o_pExtensionRegistryPath );
break;
}
@@ -1693,7 +1596,7 @@ Db* DataBaseIterator::nextDb( rtl::OUString* o_pExtensionPath, rtl::OUString* o_
if( !xHelpPackage.is() )
break;
- pRetDb = implGetDbFromPackage( xHelpPackage, o_pExtensionPath, o_pExtensionRegistryPath );
+ pRetHdf = implGetHdfFromPackage( xHelpPackage, o_pExtensionPath, o_pExtensionRegistryPath );
break;
}
@@ -1703,10 +1606,10 @@ Db* DataBaseIterator::nextDb( rtl::OUString* o_pExtensionPath, rtl::OUString* o_
}
}
- return pRetDb;
+ return pRetHdf;
}
-Db* DataBaseIterator::implGetDbFromPackage( Reference< deployment::XPackage > xPackage,
+helpdatafileproxy::Hdf* DataBaseIterator::implGetHdfFromPackage( Reference< deployment::XPackage > xPackage,
rtl::OUString* o_pExtensionPath, rtl::OUString* o_pExtensionRegistryPath )
{
@@ -1720,7 +1623,7 @@ Db* DataBaseIterator::implGetDbFromPackage( Reference< deployment::XPackage > xP
return NULL;
}
- Db* pRetDb = NULL;
+ helpdatafileproxy::Hdf* pRetHdf = NULL;
if (optRegData.IsPresent && !optRegData.Value.isEmpty())
{
rtl::OUString aRegDataUrl = rtl::OUStringBuffer(optRegData.Value).append('/').makeStringAndClear();
@@ -1728,11 +1631,11 @@ Db* DataBaseIterator::implGetDbFromPackage( Reference< deployment::XPackage > xP
rtl::OUString aHelpFilesBaseName("help");
rtl::OUString aUsedLanguage = m_aLanguage;
- pRetDb = m_rDatabases.getBerkeley(
+ pRetHdf = m_rDatabases.getHelpDataFile(
aHelpFilesBaseName, aUsedLanguage, m_bHelpText, &aRegDataUrl);
// Language fallback
- if( !pRetDb )
+ if( !pRetHdf )
{
::std::vector< ::rtl::OUString > av;
implGetLanguageVectorFromPackage( av, xPackage );
@@ -1746,7 +1649,7 @@ Db* DataBaseIterator::implGetDbFromPackage( Reference< deployment::XPackage > xP
if( pFound != av.end() )
{
aUsedLanguage = *pFound;
- pRetDb = m_rDatabases.getBerkeley(
+ pRetHdf = m_rDatabases.getHelpDataFile(
aHelpFilesBaseName, aUsedLanguage, m_bHelpText, &aRegDataUrl);
}
}
@@ -1758,7 +1661,7 @@ Db* DataBaseIterator::implGetDbFromPackage( Reference< deployment::XPackage > xP
*o_pExtensionRegistryPath = rtl::OUStringBuffer(xPackage->getURL()).append('/').append(aUsedLanguage).makeStringAndClear();
}
- return pRetDb;
+ return pRetHdf;
}
@@ -2100,8 +2003,8 @@ rtl::OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemp
}
}
- HelpIndexer aIndexer(aLang, aMod, aLangURL, aZipDir);
- aIndexer.indexDocuments();
+ HelpIndexer aIndexer(aLang, aMod, aLangURL, aZipDir);
+ aIndexer.indexDocuments();
if( bIsWriteAccess )
aIndexFolder = implGetFileFromPackage( rtl::OUString( ".idxl" ), xPackage );
diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx
index 1afcdba26011..9961cfee2f18 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _DATABASES_HXX_
#define _DATABASES_HXX_
@@ -52,9 +43,9 @@
// Forward declaration
-namespace berkeleydbproxy {
+namespace helpdatafileproxy {
- class Db;
+ class Hdf;
}
@@ -118,7 +109,7 @@ namespace chelp {
public:
KeywordElement( Databases* pDatabases,
- berkeleydbproxy::Db* pDb,
+ helpdatafileproxy::Hdf* pHdf,
rtl::OUString& key,
rtl::OUString& ids );
@@ -129,7 +120,7 @@ namespace chelp {
com::sun::star::uno::Sequence< rtl::OUString > listAnchor;
com::sun::star::uno::Sequence< rtl::OUString > listTitle;
- void init( Databases *pDatabases,berkeleydbproxy::Db* pDb,const rtl::OUString& ids );
+ void init( Databases *pDatabases,helpdatafileproxy::Hdf* pHdf,const rtl::OUString& ids );
};
@@ -205,7 +196,7 @@ namespace chelp {
KeywordInfo* getKeyword( const rtl::OUString& Module,
const rtl::OUString& Language );
- berkeleydbproxy::Db* getBerkeley( const rtl::OUString& Module,
+ helpdatafileproxy::Hdf* getHelpDataFile( const rtl::OUString& Module,
const rtl::OUString& Language, bool helpText = false,
const rtl::OUString* pExtensionPath = NULL );
@@ -327,7 +318,7 @@ namespace chelp {
std::vector< rtl::OUString > m_avModules;
- typedef boost::unordered_map< rtl::OUString,berkeleydbproxy::Db*,ha,eq > DatabasesTable;
+ typedef boost::unordered_map< rtl::OUString,helpdatafileproxy::Hdf*,ha,eq > DatabasesTable;
DatabasesTable m_aDatabases; // Language and module dependent databases
typedef boost::unordered_map< rtl::OUString,rtl::OUString,ha,eq > LangSetTable;
@@ -481,11 +472,11 @@ namespace chelp {
, m_bHelpText( bHelpText )
{}
- berkeleydbproxy::Db* nextDb( rtl::OUString* o_pExtensionPath = NULL, rtl::OUString* o_pExtensionRegistryPath = NULL );
+ helpdatafileproxy::Hdf* nextHdf( rtl::OUString* o_pExtensionPath = NULL, rtl::OUString* o_pExtensionRegistryPath = NULL );
private:
- berkeleydbproxy::Db* implGetDbFromPackage(
+ helpdatafileproxy::Hdf* implGetHdfFromPackage(
com::sun::star::uno::Reference< com::sun::star::deployment::XPackage > xPackage,
rtl::OUString* o_pExtensionPath, rtl::OUString* o_pExtensionRegistryPath );
diff --git a/xmlhelp/source/cxxhelp/provider/db.cxx b/xmlhelp/source/cxxhelp/provider/db.cxx
index 4cf5bd245bf0..6fe749017b94 100644
--- a/xmlhelp/source/cxxhelp/provider/db.cxx
+++ b/xmlhelp/source/cxxhelp/provider/db.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include "db.hxx"
@@ -34,25 +25,12 @@
#include "com/sun/star/io/XSeekable.hpp"
-#include "osl/file.hxx"
-#include "osl/thread.hxx"
-using namespace com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::io;
-namespace berkeleydbproxy {
+namespace helpdatafileproxy {
-//----------------------------------------------------------------------------
-namespace db_internal
-{
- static inline int check_error(int dberr, const char * where)
- {
- (void)where;
- return dberr;
- }
-}
-
-void DBData::copyToBuffer( const char* pSrcData, int nSize )
+void HDFData::copyToBuffer( const char* pSrcData, int nSize )
{
m_nSize = nSize;
delete [] m_pBuffer;
@@ -62,9 +40,9 @@ void DBData::copyToBuffer( const char* pSrcData, int nSize )
}
-// DBHelp
+// Hdf
-bool DBHelp::implReadLenAndData( const char* pData, int& riPos, DBData& rValue )
+bool Hdf::implReadLenAndData( const char* pData, int& riPos, HDFData& rValue )
{
bool bSuccess = false;
@@ -84,7 +62,7 @@ bool DBHelp::implReadLenAndData( const char* pData, int& riPos, DBData& rValue )
return bSuccess;
}
-void DBHelp::createHashMap( bool bOptimizeForPerformance )
+void Hdf::createHashMap( bool bOptimizeForPerformance )
{
releaseHashMap();
if( bOptimizeForPerformance )
@@ -111,7 +89,7 @@ void DBHelp::createHashMap( bool bOptimizeForPerformance )
int iPos = 0;
while( iPos < nRead )
{
- DBData aDBKey;
+ HDFData aDBKey;
if( !implReadLenAndData( pData, iPos, aDBKey ) )
break;
@@ -144,7 +122,7 @@ void DBHelp::createHashMap( bool bOptimizeForPerformance )
}
}
-void DBHelp::releaseHashMap( void )
+void Hdf::releaseHashMap( void )
{
if( m_pStringToDataMap != NULL )
{
@@ -159,7 +137,7 @@ void DBHelp::releaseHashMap( void )
}
-bool DBHelp::getValueForKey( const rtl::OString& rKey, DBData& rValue )
+bool Hdf::getValueForKey( const rtl::OString& rKey, HDFData& rValue )
{
bool bSuccess = false;
if( !m_xSFA.is() )
@@ -227,7 +205,7 @@ bool DBHelp::getValueForKey( const rtl::OString& rKey, DBData& rValue )
return bSuccess;
}
-bool DBHelp::startIteration( void )
+bool Hdf::startIteration( void )
{
bool bSuccess = false;
@@ -252,7 +230,7 @@ bool DBHelp::startIteration( void )
return bSuccess;
}
-bool DBHelp::getNextKeyAndValue( DBData& rKey, DBData& rValue )
+bool Hdf::getNextKeyAndValue( HDFData& rKey, HDFData& rValue )
{
bool bSuccess = false;
@@ -268,7 +246,7 @@ bool DBHelp::getNextKeyAndValue( DBData& rKey, DBData& rValue )
return bSuccess;
}
-void DBHelp::stopIteration( void )
+void Hdf::stopIteration( void )
{
m_aItData = Sequence<sal_Int8>();
m_pItData = NULL;
@@ -276,158 +254,6 @@ void DBHelp::stopIteration( void )
m_iItPos = -1;
}
-
-Db::Db()
-{
- db_internal::check_error( db_create(&m_pDBP,0,0),"Db::Db" );
- m_pDBHelp = NULL;
-}
-
-
-Db::~Db()
-{
- if (m_pDBP)
- {
- // should not happen
- // TODO: add assert
- }
-
- delete m_pDBHelp;
-}
-
-
-int Db::close(u_int32_t flags)
-{
- int error = m_pDBP->close(m_pDBP,flags);
- m_pDBP = 0;
- return db_internal::check_error(error,"Db::close");
-}
-
-int Db::open(DB_TXN *txnid,
- const char *file,
- const char *database,
- DBTYPE type,
- u_int32_t flags,
- int mode)
-{
- int err = m_pDBP->open(m_pDBP,txnid,file,database,type,flags,mode);
- return db_internal::check_error( err,"Db::open" );
-}
-
-int Db::open(DB_TXN *txnid,
- ::rtl::OUString const & fileURL,
- DBTYPE type,
- u_int32_t flags,
- int mode)
-{
- ::rtl::OUString ouPath;
- ::osl::FileBase::getSystemPathFromFileURL(fileURL, ouPath);
- const ::rtl::OString sPath = ::rtl::OUStringToOString(ouPath, osl_getThreadTextEncoding());
- return open(txnid, sPath.getStr(), 0, type, flags, mode);
-}
-
-
-
-int Db::get(DB_TXN *txnid, Dbt *key, Dbt *data, u_int32_t flags)
-{
- int err = m_pDBP->get(m_pDBP,txnid,key,data,flags);
-
- // these are non-exceptional outcomes
- if (err != DB_NOTFOUND && err != DB_KEYEMPTY)
- db_internal::check_error( err,"Db::get" );
-
- return err;
-}
-
-int Db::cursor(DB_TXN *txnid, Dbc **cursorp, u_int32_t flags)
-{
- DBC * dbc = 0;
- int error = m_pDBP->cursor(m_pDBP,txnid,&dbc,flags);
-
- if (!db_internal::check_error(error,"Db::cursor"))
- *cursorp = new Dbc(dbc);
-
- return error;
-}
-
-//----------------------------------------------------------------------------
-
-Dbc::Dbc(DBC * dbc)
-: m_pDBC(dbc)
-{
-}
-
-Dbc::~Dbc()
-{
-}
-
-int Dbc::close()
-{
- int err = m_pDBC->c_close(m_pDBC);
- delete this;
- return db_internal::check_error( err,"Dbcursor::close" );
-}
-
-int Dbc::get(Dbt *key, Dbt *data, u_int32_t flags)
-{
- int err = m_pDBC->c_get(m_pDBC,key,data,flags);
-
- // these are non-exceptional outcomes
- if (err != DB_NOTFOUND && err != DB_KEYEMPTY)
- db_internal::check_error( err, "Dbcursor::get" );
-
- return err;
-}
-
-//----------------------------------------------------------------------------
-
-
-Dbt::Dbt()
-{
- using namespace std;
- DBT * thispod = this;
- memset(thispod, 0, sizeof *thispod);
-}
-
-
-Dbt::Dbt(void *data_arg, u_int32_t size_arg)
-{
- using namespace std;
- DBT * thispod = this;
- memset(thispod, 0, sizeof *thispod);
- this->set_data(data_arg);
- this->set_size(size_arg);
-}
-
-Dbt::~Dbt()
-{
-}
-
-void * Dbt::get_data() const
-{
- return this->data;
-}
-
-void Dbt::set_data(void *value)
-{
- this->data = value;
-}
-
-u_int32_t Dbt::get_size() const
-{
- return this->size;
-}
-
-void Dbt::set_size(u_int32_t value)
-{
- this->size = value;
-}
-
-void Dbt::set_flags(u_int32_t value)
-{
- this->flags = value;
-}
-
-} // namespace ecomp
+} // end of namespace helpdatafileproxy
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/db.hxx b/xmlhelp/source/cxxhelp/provider/db.hxx
index 2b5697d96fd5..a8e90978bdcd 100644
--- a/xmlhelp/source/cxxhelp/provider/db.hxx
+++ b/xmlhelp/source/cxxhelp/provider/db.hxx
@@ -1,38 +1,23 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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 BERKELEYDBPROXY_DB_HXX_
-#define BERKELEYDBPROXY_DB_HXX_
-
-#ifdef SYSTEM_DB_HEADER
-#include SYSTEM_DB_HEADER
-#else
-#include <berkeleydb/db.h>
-#endif
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef HELPDATAFILEPROXY_DB_HXX_
+#define HELPDATAFILEPROXY_DB_HXX_
#include "com/sun/star/ucb/XSimpleFileAccess3.hpp"
@@ -42,19 +27,9 @@
#include <boost/unordered_map.hpp>
#include <rtl/string.hxx>
-extern "C" {
- typedef void *(*db_malloc_fcn_type)(size_t);
- typedef void *(*db_realloc_fcn_type)(void *, size_t);
- typedef void (*db_free_fcn_type)(void *);
-}
-
-
-namespace berkeleydbproxy {
+namespace helpdatafileproxy {
- class Dbc;
- class Dbt;
-
- namespace db_internal
+ namespace hdf_internal
{
class Noncopyable
{
@@ -67,34 +42,9 @@ namespace berkeleydbproxy {
};
}
- class DbException
- {
- rtl::OString what_;
- public:
- explicit DbException(rtl::OString const & whatparam)
- : what_(whatparam)
- {}
-
- const char *what() const
- { return what_.getStr(); }
- };
-
- struct eq
- {
- bool operator()( const rtl::OString& rKey1, const rtl::OString& rKey2 ) const
- { return rKey1.compareTo( rKey2 ) == 0; }
- };
-
- struct ha
- {
- size_t operator()( const rtl::OString& rName ) const
- { return rName.hashCode(); }
- };
-
-
- class DBData
+ class HDFData
{
- friend class DBHelp;
+ friend class Hdf;
int m_nSize;
char* m_pBuffer;
@@ -102,11 +52,11 @@ namespace berkeleydbproxy {
void copyToBuffer( const char* pSrcData, int nSize );
public:
- DBData( void )
+ HDFData( void )
: m_nSize( 0 )
, m_pBuffer( NULL )
{}
- ~DBData()
+ ~HDFData()
{ delete [] m_pBuffer; }
int getSize() const
@@ -115,10 +65,22 @@ namespace berkeleydbproxy {
{ return m_pBuffer; }
};
+ struct eq
+ {
+ bool operator()( const rtl::OString& rKey1, const rtl::OString& rKey2 ) const
+ { return rKey1.compareTo( rKey2 ) == 0; }
+ };
+
+ struct ha
+ {
+ size_t operator()( const rtl::OString& rName ) const
+ { return rName.hashCode(); }
+ };
+
typedef boost::unordered_map< rtl::OString,std::pair<int,int>,ha,eq > StringToValPosMap;
typedef boost::unordered_map< rtl::OString,rtl::OString,ha,eq > StringToDataMap;
- class DBHelp
+ class Hdf : hdf_internal::Noncopyable
{
rtl::OUString m_aFileURL;
StringToDataMap* m_pStringToDataMap;
@@ -132,13 +94,13 @@ namespace berkeleydbproxy {
int m_nItRead;
int m_iItPos;
- bool implReadLenAndData( const char* pData, int& riPos, DBData& rValue );
+ bool implReadLenAndData( const char* pData, int& riPos, HDFData& rValue );
public:
- //DBHelp must get a fileURL which can then directly be used by simple file access.
+ //HDFHelp must get a fileURL which can then directly be used by simple file access.
//SimpleFileAccess requires file URLs as arguments. Passing file path may work but fails
//for example when using long file paths on Windows, which start with "\\?\"
- DBHelp( const rtl::OUString& rFileURL,
+ Hdf( const rtl::OUString& rFileURL,
com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess3 > xSFA )
: m_aFileURL( rFileURL )
, m_pStringToDataMap( NULL )
@@ -150,92 +112,18 @@ namespace berkeleydbproxy {
{
OSL_ASSERT(!rFileURL.compareTo(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:")), 5));
}
- ~DBHelp()
+ ~Hdf()
{ releaseHashMap(); }
void createHashMap( bool bOptimizeForPerformance = false );
void releaseHashMap( void );
- bool getValueForKey( const rtl::OString& rKey, DBData& rValue );
+ bool getValueForKey( const rtl::OString& rKey, HDFData& rValue );
bool startIteration( void );
- bool getNextKeyAndValue( DBData& rKey, DBData& rValue );
+ bool getNextKeyAndValue( HDFData& rKey, HDFData& rValue );
void stopIteration( void );
};
-
- class Db : db_internal::Noncopyable
- {
- private:
- DB* m_pDBP;
- DBHelp* m_pDBHelp;
-
- public:
- Db();
- ~Db();
-
- void setDBHelp( DBHelp* pDBHelp )
- { m_pDBHelp = pDBHelp; }
- DBHelp* getDBHelp( void )
- { return m_pDBHelp; }
-
- int close(u_int32_t flags);
-
- int open(DB_TXN *txnid,
- const char *file,
- const char *database,
- DBTYPE type,
- u_int32_t flags,
- int mode);
-
- int open(DB_TXN *txnid,
- ::rtl::OUString const & fileURL,
- DBTYPE type,
- u_int32_t flags,
- int mode);
-
-
- int get(DB_TXN* txnid, Dbt *key, Dbt *data, u_int32_t flags);
-
- int cursor(DB_TXN *txnid, Dbc **cursorp, u_int32_t flags);
- };
-
- class Dbc : db_internal::Noncopyable
- {
- friend class Db;
- friend class Dbt;
-
- private:
- DBC* m_pDBC;
-
- explicit Dbc(DBC* pDBC);
- ~Dbc();
-
- public:
- int close();
-
- int get(Dbt *key, Dbt *data, u_int32_t flags);
- };
-
- class Dbt: private DBT
- {
- friend class Db;
- friend class Dbc;
-
- public:
- Dbt(void *data_arg, u_int32_t size_arg);
-
- Dbt();
-
- ~Dbt();
-
- void *get_data() const;
- void set_data(void *value);
-
- u_int32_t get_size() const;
- void set_size(u_int32_t value);
-
- void set_flags(u_int32_t);
- };
}
#endif
diff --git a/xmlhelp/source/cxxhelp/provider/inputstream.cxx b/xmlhelp/source/cxxhelp/provider/inputstream.cxx
index e48529505585..17e2f98ffc57 100644
--- a/xmlhelp/source/cxxhelp/provider/inputstream.cxx
+++ b/xmlhelp/source/cxxhelp/provider/inputstream.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include "inputstream.hxx"
diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx
index 4288be7a0b45..f5d6819c4dc6 100644
--- a/xmlhelp/source/cxxhelp/provider/provider.cxx
+++ b/xmlhelp/source/cxxhelp/provider/provider.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
/**************************************************************************
diff --git a/xmlhelp/source/cxxhelp/provider/resultset.cxx b/xmlhelp/source/cxxhelp/provider/resultset.cxx
index 24985c922ef4..640397a571d8 100644
--- a/xmlhelp/source/cxxhelp/provider/resultset.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultset.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <com/sun/star/sdbc/XResultSet.hpp>
diff --git a/xmlhelp/source/cxxhelp/provider/resultset.hxx b/xmlhelp/source/cxxhelp/provider/resultset.hxx
index 48010793aae0..7afaf7c12a15 100644
--- a/xmlhelp/source/cxxhelp/provider/resultset.hxx
+++ b/xmlhelp/source/cxxhelp/provider/resultset.hxx
@@ -1,30 +1,21 @@
/* -*- 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.
- *
- ************************************************************************/
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _RESULTSET_HXX
#define _RESULTSET_HXX
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
index 7a004fb62c4c..7f81469d4d03 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <comphelper/processfactory.hxx>
#include <ucbhelper/contentidentifier.hxx>
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
index 97f32329b3f0..4d87543f1124 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <comphelper/processfactory.hxx>
#include <com/sun/star/ucb/Command.hpp>
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx
index b3dd5a6dd6bb..5de197881271 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <com/sun/star/ucb/Command.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
diff --git a/xmlhelp/source/cxxhelp/provider/services.cxx b/xmlhelp/source/cxxhelp/provider/services.cxx
index 259b44cc4300..43502a09ac08 100644
--- a/xmlhelp/source/cxxhelp/provider/services.cxx
+++ b/xmlhelp/source/cxxhelp/provider/services.cxx
@@ -1,30 +1,21 @@
/* -*- 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.
- *
- ************************************************************************/
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index cb44797bd343..4303a7f23bd9 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include "bufferedinputstream.hxx"
@@ -84,7 +75,6 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::ucb;
using namespace com::sun::star::beans;
using namespace com::sun::star::container;
-using namespace berkeleydbproxy;
using namespace chelp;
@@ -210,7 +200,7 @@ void URLParameter::init( bool bDefaultLanguageIsInitialized )
{
(void)bDefaultLanguageIsInitialized;
- m_bBerkeleyRead = false;
+ m_bHelpDataFileRead = false;
m_bStart = false;
m_bUseDB = true;
m_nHitCount = 100; // The default maximum hitcount
@@ -220,10 +210,10 @@ void URLParameter::init( bool bDefaultLanguageIsInitialized )
rtl::OUString URLParameter::get_the_tag()
{
if(m_bUseDB) {
- if( ! m_bBerkeleyRead )
- readBerkeley();
+ if( ! m_bHelpDataFileRead )
+ readHelpDataFile();
- m_bBerkeleyRead = true;
+ m_bHelpDataFileRead = true;
return m_aTag;
}
@@ -236,9 +226,9 @@ rtl::OUString URLParameter::get_the_tag()
rtl::OUString URLParameter::get_the_path()
{
if(m_bUseDB) {
- if( ! m_bBerkeleyRead )
- readBerkeley();
- m_bBerkeleyRead = true;
+ if( ! m_bHelpDataFileRead )
+ readHelpDataFile();
+ m_bHelpDataFileRead = true;
return m_aPath;
}
@@ -251,9 +241,9 @@ rtl::OUString URLParameter::get_the_path()
rtl::OUString URLParameter::get_the_title()
{
if(m_bUseDB) {
- if( ! m_bBerkeleyRead )
- readBerkeley();
- m_bBerkeleyRead = true;
+ if( ! m_bHelpDataFileRead )
+ readHelpDataFile();
+ m_bHelpDataFileRead = true;
return m_aTitle;
}
@@ -265,9 +255,9 @@ rtl::OUString URLParameter::get_the_title()
rtl::OUString URLParameter::get_the_jar()
{
if(m_bUseDB) {
- if( ! m_bBerkeleyRead )
- readBerkeley();
- m_bBerkeleyRead = true;
+ if( ! m_bHelpDataFileRead )
+ readHelpDataFile();
+ m_bHelpDataFileRead = true;
return m_aJar;
}
@@ -276,9 +266,7 @@ rtl::OUString URLParameter::get_the_jar()
}
-
-
-void URLParameter::readBerkeley()
+void URLParameter::readHelpDataFile()
{
if( get_id().compareToAscii("") == 0 )
return;
@@ -291,39 +279,21 @@ void URLParameter::readBerkeley()
const sal_Char* pData = NULL;
- Dbt data;
- DBData aDBData;
+ helpdatafileproxy::HDFData aHDFData;
rtl::OUString aExtensionPath;
rtl::OUString aExtensionRegistryPath;
while( true )
{
- Db* db = aDbIt.nextDb( &aExtensionPath, &aExtensionRegistryPath );
- if( !db )
+ helpdatafileproxy::Hdf* pHdf = aDbIt.nextHdf( &aExtensionPath, &aExtensionRegistryPath );
+ if( !pHdf )
break;
rtl::OString keyStr( m_aId.getStr(),m_aId.getLength(),RTL_TEXTENCODING_UTF8 );
-
- DBHelp* pDBHelp = db->getDBHelp();
- if( pDBHelp != NULL )
+ bSuccess = pHdf->getValueForKey( keyStr, aHDFData );
+ if( bSuccess )
{
- bSuccess = pDBHelp->getValueForKey( keyStr, aDBData );
- if( bSuccess )
- {
- pData = aDBData.getData();
- break;
- }
- }
- else
- {
- Dbt key( static_cast< void* >( const_cast< sal_Char* >( keyStr.getStr() ) ),
- keyStr.getLength() );
- int err = db->get( 0,&key,&data,0 );
- if( err == 0 )
- {
- bSuccess = true;
- pData = static_cast<sal_Char*>( data.get_data() );
- break;
- }
+ pData = aHDFData.getData();
+ break;
}
}
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.hxx b/xmlhelp/source/cxxhelp/provider/urlparameter.hxx
index 775e8330bfea..67789d1420bb 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.hxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.hxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _URLPARAMETER_HXX_
#define _URLPARAMETER_HXX_
@@ -146,7 +137,7 @@ namespace chelp {
rtl::OUString get_title();
- rtl::OUString get_jar() { return get_the_jar(); } // BerkeleyDb
+ rtl::OUString get_jar() { return get_the_jar(); }
rtl::OUString get_ExtensionRegistryPath() const { return m_aExtensionRegistryPath; }
@@ -194,7 +185,7 @@ namespace chelp {
Databases* m_pDatabases;
- bool m_bBerkeleyRead;
+ bool m_bHelpDataFileRead;
bool m_bStart;
bool m_bUseDB;
@@ -239,7 +230,7 @@ namespace chelp {
rtl::OUString get_the_jar();
- void readBerkeley();
+ void readHelpDataFile();
void parse() throw( com::sun::star::ucb::IllegalIdentifierException );
diff --git a/xmlhelp/source/cxxhelp/test/makefile.mk b/xmlhelp/source/cxxhelp/test/makefile.mk
index 4521f909e4ac..71a7e5651a4a 100644
--- a/xmlhelp/source/cxxhelp/test/makefile.mk
+++ b/xmlhelp/source/cxxhelp/test/makefile.mk
@@ -1,29 +1,20 @@
-#*************************************************************************
#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# This file is part of the LibreOffice project.
#
-# OpenOffice.org - a multi-platform office productivity suite
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-# This file is part of OpenOffice.org.
+# This file incorporates work covered by the following license notice:
#
-# 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.
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-# 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=..$/..$/..
diff --git a/xmlhelp/source/cxxhelp/test/searchdemo.cxx b/xmlhelp/source/cxxhelp/test/searchdemo.cxx
index d56112f3a11f..aa927650ef27 100644
--- a/xmlhelp/source/cxxhelp/test/searchdemo.cxx
+++ b/xmlhelp/source/cxxhelp/test/searchdemo.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <rtl/string.hxx>
#include <osl/file.hxx>
diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx
index 936d7b75b14a..ee443f786b7a 100644
--- a/xmlhelp/source/treeview/tvfactory.cxx
+++ b/xmlhelp/source/treeview/tvfactory.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
diff --git a/xmlhelp/source/treeview/tvhlp1.component b/xmlhelp/source/treeview/tvhlp1.component
index 525de73e0062..68577bb532dc 100644
--- a/xmlhelp/source/treeview/tvhlp1.component
+++ b/xmlhelp/source/treeview/tvhlp1.component
@@ -1,30 +1,21 @@
<?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.
-*
-**********************************************************************-->
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
<component loader="com.sun.star.loader.SharedLibrary"
xmlns="http://openoffice.org/2010/uno-components">
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index e4b4b948404f..fb9b62767b01 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <string.h>
#include <rtl/ustrbuf.hxx>
diff --git a/xmlhelp/source/treeview/tvread.hxx b/xmlhelp/source/treeview/tvread.hxx
index dc3bffdaf67c..bc8f52091ae6 100644
--- a/xmlhelp/source/treeview/tvread.hxx
+++ b/xmlhelp/source/treeview/tvread.hxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * 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.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _TREEVIEW_TVREAD_HXX_
#define _TREEVIEW_TVREAD_HXX_
diff --git a/xmlhelp/util/embed.xsl b/xmlhelp/util/embed.xsl
index 3a4e3ef80f61..a611e4dbcbc0 100644
--- a/xmlhelp/util/embed.xsl
+++ b/xmlhelp/util/embed.xsl
@@ -1,4 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" method="xml"/>
diff --git a/xmlhelp/util/idxcaption.xsl b/xmlhelp/util/idxcaption.xsl
index 7570fa5c7870..08f09d70cefc 100644
--- a/xmlhelp/util/idxcaption.xsl
+++ b/xmlhelp/util/idxcaption.xsl
@@ -1,3 +1,20 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
<xsl:stylesheet version="1.0" encoding="UTF-8"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:office="http://openoffice.org/2000/office"
@@ -12,7 +29,7 @@
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:chart="http://openoffice.org/2000/chart"
xmlns:help="http://openoffice.org/2000/help"
- xmlns:index="http://sun.com/2000/XMLSearch"
+ xmlns:index="http://sun.com/2000/XMLSearch"
xmlns:text="http://openoffice.org/2000/text">
<xsl:param name="Language" select="'en-US'"/>
diff --git a/xmlhelp/util/idxcontent.xsl b/xmlhelp/util/idxcontent.xsl
index cfc16ea7e6a6..c09e04500f71 100644
--- a/xmlhelp/util/idxcontent.xsl
+++ b/xmlhelp/util/idxcontent.xsl
@@ -1,3 +1,20 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
<xsl:stylesheet version="1.0" encoding="UTF-8"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:office="http://openoffice.org/2000/office"
@@ -12,7 +29,7 @@
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:chart="http://openoffice.org/2000/chart"
xmlns:help="http://openoffice.org/2000/help"
- xmlns:index="http://sun.com/2000/XMLSearch"
+ xmlns:index="http://sun.com/2000/XMLSearch"
xmlns:text="http://openoffice.org/2000/text">
<xsl:param name="Language" select="'en-US'"/>
diff --git a/xmlhelp/util/main_transform.xsl b/xmlhelp/util/main_transform.xsl
index bb6136981d8c..0a612fc3748a 100644
--- a/xmlhelp/util/main_transform.xsl
+++ b/xmlhelp/util/main_transform.xsl
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-
<!--***********************************************************************
This is the main transformation style sheet for transforming.
- Only use with OOo 2.0
+ For use with LibreOffice 4.0+
=========================================================================
Changes Log
May 24 2004 Created
@@ -28,30 +27,21 @@
***********************************************************************//-->
<!--
-
- 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.
-
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
diff --git a/xmlhelp/util/ucpchelp.xml b/xmlhelp/util/ucpchelp.xml
index 7897b0db8151..fd8d5fcd8e0c 100644
--- a/xmlhelp/util/ucpchelp.xml
+++ b/xmlhelp/util/ucpchelp.xml
@@ -1,5 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module-description PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "module-description.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
<module-description xmlns:xlink="http://www.w3.org/1999/xlink">
<module-name>
@@ -42,7 +59,6 @@
<project-build-dependency> external </project-build-dependency>
<project-build-dependency> XmlSearch </project-build-dependency>
<project-build-dependency> ucbhelper </project-build-dependency>
- <project-build-dependency> berkeleydb </project-build-dependency>
<runtime-module-dependency> sal3 </runtime-module-dependency>
<runtime-module-dependency> cppu3 </runtime-module-dependency>
diff --git a/xmlhelp/util/ucpchelp1.component b/xmlhelp/util/ucpchelp1.component
index a8bb64124e9c..1642ae74e3eb 100644
--- a/xmlhelp/util/ucpchelp1.component
+++ b/xmlhelp/util/ucpchelp1.component
@@ -1,30 +1,21 @@
<?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.
-*
-**********************************************************************-->
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
<component loader="com.sun.star.loader.SharedLibrary"
xmlns="http://openoffice.org/2010/uno-components">