summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2011-02-11 22:37:17 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2011-02-11 22:37:17 -0600
commit5ae0d2157579c35b134f0580e063e6f84439ec15 (patch)
tree98fbd9ea4b6cb3722252d73fbd0b7b3b4fa04eb8
parent51d1262b8046262c41f887ba44d45a91365bc8c3 (diff)
emerge non-conflicting changes in xmlhelper
-rw-r--r--xmlhelp/inc/pch/precompiled_xmlhelp.cxx2
-rw-r--r--xmlhelp/inc/pch/precompiled_xmlhelp.hxx2
-rw-r--r--xmlhelp/source/cxxhelp/inc/db/EntryProcessor.hxx5
-rw-r--r--xmlhelp/source/cxxhelp/inc/excep/XmlSearchExceptions.hxx3
-rw-r--r--xmlhelp/source/cxxhelp/inc/qe/DocGenerator.hxx5
-rw-r--r--xmlhelp/source/cxxhelp/inc/qe/Query.hxx3
-rw-r--r--xmlhelp/source/cxxhelp/inc/util/CompressorIterator.hxx3
-rw-r--r--xmlhelp/source/cxxhelp/inc/util/ConceptList.hxx3
-rw-r--r--xmlhelp/source/cxxhelp/inc/util/Decompressor.hxx5
-rw-r--r--xmlhelp/source/cxxhelp/inc/util/RandomAccessStream.hxx9
-rw-r--r--xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx3
-rw-r--r--xmlhelp/source/cxxhelp/provider/bufferedinputstream.hxx3
-rw-r--r--xmlhelp/source/cxxhelp/provider/content.cxx69
-rw-r--r--xmlhelp/source/cxxhelp/provider/content.hxx4
-rw-r--r--xmlhelp/source/cxxhelp/provider/contentcaps.cxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx454
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.hxx33
-rw-r--r--xmlhelp/source/cxxhelp/provider/db.cxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/db.hxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/inputstream.cxx5
-rw-r--r--xmlhelp/source/cxxhelp/provider/inputstream.hxx3
-rw-r--r--xmlhelp/source/cxxhelp/provider/provider.cxx25
-rw-r--r--xmlhelp/source/cxxhelp/provider/provider.hxx3
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultset.cxx4
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultset.hxx8
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetbase.cxx25
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetbase.hxx3
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetfactory.hxx3
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx19
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetforquery.hxx3
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx11
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetforroot.hxx3
-rw-r--r--xmlhelp/source/cxxhelp/provider/services.cxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.cxx203
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.hxx42
-rw-r--r--xmlhelp/source/cxxhelp/qe/DocGenerator.cxx3
-rw-r--r--xmlhelp/source/cxxhelp/test/abidebug.hxx2
-rw-r--r--xmlhelp/source/cxxhelp/test/searchdemo.cxx15
-rw-r--r--xmlhelp/source/cxxhelp/util/Decompressor.cxx3
-rw-r--r--xmlhelp/source/treeview/tvfactory.cxx13
-rw-r--r--xmlhelp/source/treeview/tvfactory.hxx3
-rw-r--r--xmlhelp/source/treeview/tvread.cxx294
-rw-r--r--xmlhelp/source/treeview/tvread.hxx3
43 files changed, 743 insertions, 567 deletions
diff --git a/xmlhelp/inc/pch/precompiled_xmlhelp.cxx b/xmlhelp/inc/pch/precompiled_xmlhelp.cxx
index b273758c58..7b35c1d755 100644
--- a/xmlhelp/inc/pch/precompiled_xmlhelp.cxx
+++ b/xmlhelp/inc/pch/precompiled_xmlhelp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,3 +28,4 @@
#include "precompiled_xmlhelp.hxx"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/inc/pch/precompiled_xmlhelp.hxx b/xmlhelp/inc/pch/precompiled_xmlhelp.hxx
index 03f6387a70..258bdd062f 100644
--- a/xmlhelp/inc/pch/precompiled_xmlhelp.hxx
+++ b/xmlhelp/inc/pch/precompiled_xmlhelp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,3 +31,4 @@
#ifdef PRECOMPILED_HEADERS
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/inc/db/EntryProcessor.hxx b/xmlhelp/source/cxxhelp/inc/db/EntryProcessor.hxx
index 09ff47ed3f..d7890e20ed 100644
--- a/xmlhelp/source/cxxhelp/inc/db/EntryProcessor.hxx
+++ b/xmlhelp/source/cxxhelp/inc/db/EntryProcessor.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef _XMLSEARCH_DB_ENTRYPROCESSOR_HXX_
#define _XMLSEARCH_DB_ENTRYPROCESSOR_HXX_
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring>
-#endif
namespace xmlsearch {
@@ -50,3 +49,5 @@ namespace xmlsearch {
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/inc/excep/XmlSearchExceptions.hxx b/xmlhelp/source/cxxhelp/inc/excep/XmlSearchExceptions.hxx
index 2c33416182..a6f80b3952 100644
--- a/xmlhelp/source/cxxhelp/inc/excep/XmlSearchExceptions.hxx
+++ b/xmlhelp/source/cxxhelp/inc/excep/XmlSearchExceptions.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,3 +106,5 @@ namespace xmlsearch {
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/inc/qe/DocGenerator.hxx b/xmlhelp/source/cxxhelp/inc/qe/DocGenerator.hxx
index 24b9ff414b..6ee522ab16 100644
--- a/xmlhelp/source/cxxhelp/inc/qe/DocGenerator.hxx
+++ b/xmlhelp/source/cxxhelp/inc/qe/DocGenerator.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#define _XMLSEARCH_QE_DOCGENERATOR_HXX_
#include <rtl/ref.hxx>
-#ifndef _RTL_USTRING_HXX__
#include <rtl/ustring.hxx>
-#endif
#include <excep/XmlSearchExceptions.hxx>
#include <util/CompressorIterator.hxx>
#include <util/Decompressor.hxx>
@@ -102,3 +101,5 @@ namespace xmlsearch {
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/inc/qe/Query.hxx b/xmlhelp/source/cxxhelp/inc/qe/Query.hxx
index 3767684cc2..78f9a8af5c 100644
--- a/xmlhelp/source/cxxhelp/inc/qe/Query.hxx
+++ b/xmlhelp/source/cxxhelp/inc/qe/Query.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -173,3 +174,5 @@ namespace xmlsearch {
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/inc/util/CompressorIterator.hxx b/xmlhelp/source/cxxhelp/inc/util/CompressorIterator.hxx
index 2c5966a1f6..a14859a329 100644
--- a/xmlhelp/source/cxxhelp/inc/util/CompressorIterator.hxx
+++ b/xmlhelp/source/cxxhelp/inc/util/CompressorIterator.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,3 +48,5 @@ namespace xmlsearch {
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/inc/util/ConceptList.hxx b/xmlhelp/source/cxxhelp/inc/util/ConceptList.hxx
index ffad0f58a8..4f5d15f976 100644
--- a/xmlhelp/source/cxxhelp/inc/util/ConceptList.hxx
+++ b/xmlhelp/source/cxxhelp/inc/util/ConceptList.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,5 @@ namespace xmlsearch {
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/inc/util/Decompressor.hxx b/xmlhelp/source/cxxhelp/inc/util/Decompressor.hxx
index 512495a9c5..8e0e41c9c6 100644
--- a/xmlhelp/source/cxxhelp/inc/util/Decompressor.hxx
+++ b/xmlhelp/source/cxxhelp/inc/util/Decompressor.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,7 +120,7 @@ namespace xmlsearch {
{
if( arrayL_ <= index_ )
throw xmlsearch::excep::XmlSearchException(
- rtl::OUString::createFromAscii( "ByteArrayDecompressor->getNextByte()" ) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ByteArrayDecompressor->getNextByte()" )) );
return array_[index_++] & 0xFF;
}
@@ -149,3 +150,5 @@ namespace xmlsearch {
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/inc/util/RandomAccessStream.hxx b/xmlhelp/source/cxxhelp/inc/util/RandomAccessStream.hxx
index f805d338e5..c4ecca2da2 100644
--- a/xmlhelp/source/cxxhelp/inc/util/RandomAccessStream.hxx
+++ b/xmlhelp/source/cxxhelp/inc/util/RandomAccessStream.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,9 +51,9 @@ namespace xmlsearch {
protected:
- enum OPENFLAG { Read = OpenFlag_Read,
- Write = OpenFlag_Write,
- Create = OpenFlag_Create };
+ enum OPENFLAG { Read = osl_File_OpenFlag_Read,
+ Write = osl_File_OpenFlag_Write,
+ Create = osl_File_OpenFlag_Create };
};
@@ -61,3 +62,5 @@ namespace xmlsearch {
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx b/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx
index b68e304759..dd96b7a2a5 100644
--- a/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx
+++ b/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -231,3 +232,5 @@ sal_Int64 SAL_CALL BufferedInputStream::getLength( void ) throw( IOException,Run
osl::MutexGuard aGuard( m_aMutex );
return m_nBufferSize;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/bufferedinputstream.hxx b/xmlhelp/source/cxxhelp/provider/bufferedinputstream.hxx
index 5a6e1fe270..acaf34945a 100644
--- a/xmlhelp/source/cxxhelp/provider/bufferedinputstream.hxx
+++ b/xmlhelp/source/cxxhelp/provider/bufferedinputstream.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -111,3 +112,5 @@ namespace chelp {
const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx b/xmlhelp/source/cxxhelp/provider/content.cxx
index 29d320d30b..fb5ccc63f9 100644
--- a/xmlhelp/source/cxxhelp/provider/content.cxx
+++ b/xmlhelp/source/cxxhelp/provider/content.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,14 +46,10 @@
#include <com/sun/star/ucb/UnsupportedDataSinkException.hpp>
#include <com/sun/star/io/XActiveDataStreamer.hpp>
#include <com/sun/star/ucb/XPersistentPropertySet.hpp>
-#ifndef _VOS_DIAGNOSE_HXX_
-#include <vos/diagnose.hxx>
-#endif
+#include <osl/diagnose.h>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/propertyvalueset.hxx>
-#ifndef _UCBHELPER_CANCELCOMMANDEXECUTION_HXX
#include <ucbhelper/cancelcommandexecution.hxx>
-#endif
#include "content.hxx"
#include "provider.hxx"
#include "resultset.hxx"
@@ -168,7 +165,7 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes()
rtl::OUString SAL_CALL Content::getImplementationName()
throw( uno::RuntimeException )
{
- return rtl::OUString::createFromAscii( "CHelpContent" );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CHelpContent" ));
}
//=========================================================================
@@ -178,7 +175,7 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames()
{
uno::Sequence< rtl::OUString > aSNS( 1 );
aSNS.getArray()[ 0 ]
- = rtl::OUString::createFromAscii( MYUCP_CONTENT_SERVICE_NAME );
+ = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( MYUCP_CONTENT_SERVICE_NAME ));
return aSNS;
}
@@ -192,7 +189,7 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames()
rtl::OUString SAL_CALL Content::getContentType()
throw( uno::RuntimeException )
{
- return rtl::OUString::createFromAscii( MYUCP_CONTENT_TYPE );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( MYUCP_CONTENT_TYPE ));
}
//=========================================================================
@@ -316,7 +313,7 @@ uno::Any SAL_CALL Content::execute(
{
uno::Any aRet;
- if ( aCommand.Name.compareToAscii( "getPropertyValues" ) == 0 )
+ if ( aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getPropertyValues")) )
{
uno::Sequence< beans::Property > Properties;
if ( !( aCommand.Argument >>= Properties ) )
@@ -327,7 +324,7 @@ uno::Any SAL_CALL Content::execute(
aRet <<= getPropertyValues( Properties );
}
- else if ( aCommand.Name.compareToAscii( "setPropertyValues" ) == 0 )
+ else if ( aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("setPropertyValues")) )
{
uno::Sequence<beans::PropertyValue> propertyValues;
@@ -350,17 +347,17 @@ uno::Any SAL_CALL Content::execute(
aRet <<= ret;
}
- else if ( aCommand.Name.compareToAscii( "getPropertySetInfo" ) == 0 )
+ else if ( aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getPropertySetInfo")) )
{
// Note: Implemented by base class.
aRet <<= getPropertySetInfo( Environment );
}
- else if ( aCommand.Name.compareToAscii( "getCommandInfo" ) == 0 )
+ else if ( aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getCommandInfo")) )
{
// Note: Implemented by base class.
aRet <<= getCommandInfo( Environment );
}
- else if ( aCommand.Name.compareToAscii( "open" ) == 0 )
+ else if ( aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("open")) )
{
ucb::OpenCommandArgument2 aOpenCommand;
if ( !( aCommand.Argument >>= aOpenCommand ) )
@@ -462,45 +459,45 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
{
const beans::Property& rProp = rProperties[n];
- if ( rProp.Name.compareToAscii( "ContentType" ) == 0 )
+ if ( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ContentType")) )
xRow->appendString(
rProp,
- rtl::OUString::createFromAscii(
- "application/vnd.sun.star.help" ) );
- else if( rProp.Name.compareToAscii( "Title" ) == 0 )
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "application/vnd.sun.star.help" )) );
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Title")) )
xRow->appendString ( rProp,m_aURLParameter.get_title() );
- else if( rProp.Name.compareToAscii( "IsReadOnly" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsReadOnly")) )
xRow->appendBoolean( rProp,true );
- else if( rProp.Name.compareToAscii( "IsDocument" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsDocument")) )
xRow->appendBoolean(
rProp,
m_aURLParameter.isFile() || m_aURLParameter.isRoot() );
- else if( rProp.Name.compareToAscii( "IsFolder" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsFolder")) )
xRow->appendBoolean(
rProp,
! m_aURLParameter.isFile() || m_aURLParameter.isRoot() );
- else if( rProp.Name.compareToAscii( "IsErrorDocument" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsErrorDocument")) )
xRow->appendBoolean( rProp, m_aURLParameter.isErrorDocument() );
- else if( rProp.Name.compareToAscii( "MediaType" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MediaType")) )
if( m_aURLParameter.isPicture() )
xRow->appendString(
rProp,
- rtl::OUString::createFromAscii( "image/gif" ) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "image/gif" )) );
else if( m_aURLParameter.isActive() )
xRow->appendString(
rProp,
- rtl::OUString::createFromAscii( "text/plain" ) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "text/plain" )) );
else if( m_aURLParameter.isFile() )
xRow->appendString(
- rProp,rtl::OUString::createFromAscii( "text/html" ) );
+ rProp,rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "text/html" )) );
else if( m_aURLParameter.isRoot() )
xRow->appendString(
rProp,
- rtl::OUString::createFromAscii( "text/css" ) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "text/css" )) );
else
xRow->appendVoid( rProp );
else if( m_aURLParameter.isModule() )
- if( rProp.Name.compareToAscii( "KeywordList" ) == 0 )
+ if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("KeywordList")) )
{
KeywordInfo *inf =
m_pDatabases->getKeyword( m_aURLParameter.get_module(),
@@ -511,7 +508,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
aAny <<= inf->getKeywordList();
xRow->appendObject( rProp,aAny );
}
- else if( rProp.Name.compareToAscii( "KeywordRef" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("KeywordRef")) )
{
KeywordInfo *inf =
m_pDatabases->getKeyword( m_aURLParameter.get_module(),
@@ -522,7 +519,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
aAny <<= inf->getIdList();
xRow->appendObject( rProp,aAny );
}
- else if( rProp.Name.compareToAscii( "KeywordAnchorForRef" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("KeywordAnchorForRef")) )
{
KeywordInfo *inf =
m_pDatabases->getKeyword( m_aURLParameter.get_module(),
@@ -533,7 +530,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
aAny <<= inf->getAnchorList();
xRow->appendObject( rProp,aAny );
}
- else if( rProp.Name.compareToAscii( "KeywordTitleForRef" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("KeywordTitleForRef")) )
{
KeywordInfo *inf =
m_pDatabases->getKeyword( m_aURLParameter.get_module(),
@@ -544,16 +541,16 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
aAny <<= inf->getTitleList();
xRow->appendObject( rProp,aAny );
}
- else if( rProp.Name.compareToAscii( "SearchScopes" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SearchScopes")) )
{
uno::Sequence< rtl::OUString > seq( 2 );
- seq[0] = rtl::OUString::createFromAscii( "Heading" );
- seq[1] = rtl::OUString::createFromAscii( "FullText" );
+ seq[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Heading" ));
+ seq[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FullText" ));
uno::Any aAny;
aAny <<= seq;
xRow->appendObject( rProp,aAny );
}
- else if( rProp.Name.compareToAscii( "Order" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Order")) )
{
StaticModuleInformation *inf =
m_pDatabases->getStaticInformationForModule(
@@ -567,7 +564,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
}
else
xRow->appendVoid( rProp );
- else if( rProp.Name.compareToAscii( "AnchorName" ) == 0 &&
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("AnchorName")) &&
m_aURLParameter.isFile() )
xRow->appendString( rProp,m_aURLParameter.get_tag() );
else
@@ -576,3 +573,5 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
return uno::Reference< sdbc::XRow >( xRow.get() );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/content.hxx b/xmlhelp/source/cxxhelp/provider/content.hxx
index dcb6a0e064..6a4386854e 100644
--- a/xmlhelp/source/cxxhelp/provider/content.hxx
+++ b/xmlhelp/source/cxxhelp/provider/content.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
#ifndef _CONTENT_HXX
#define _CONTENT_HXX
-#include <vos/ref.hxx>
#include <ucbhelper/contenthelper.hxx>
#include <com/sun/star/io/XInputStream.hpp>
@@ -150,3 +150,5 @@ namespace chelp
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/contentcaps.cxx b/xmlhelp/source/cxxhelp/provider/contentcaps.cxx
index 2019f9084d..4aa0a6699f 100644
--- a/xmlhelp/source/cxxhelp/provider/contentcaps.cxx
+++ b/xmlhelp/source/cxxhelp/provider/contentcaps.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -245,3 +246,4 @@ uno::Sequence< star::ucb::CommandInfo > Content::getCommands(
aCommandInfoTable, COMMAND_COUNT );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 8eeafa64c9..8614f0c334 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,10 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_xmlhelp.hxx"
#include "db.hxx"
-#ifndef _VOS_DIAGNOSE_HXX_
-#include <vos/diagnose.hxx>
-#endif
+#include <osl/diagnose.h>
#include <osl/thread.h>
+#include <osl/process.h>
#include <rtl/uri.hxx>
#include <osl/file.hxx>
#include <rtl/memory.h>
@@ -82,9 +82,8 @@ using namespace com::sun::star::deployment;
using namespace com::sun::star::beans;
-static rtl::OUString aSlash( rtl::OUString::createFromAscii( "/" ) );
-static rtl::OUString aHelpFilesBaseName( rtl::OUString::createFromAscii( "help" ) );
-static rtl::OUString aHelpMediaType( rtl::OUString::createFromAscii( "application/vnd.sun.star.help" ) );
+static rtl::OUString aSlash(RTL_CONSTASCII_USTRINGPARAM("/"));
+static rtl::OUString aHelpFilesBaseName(RTL_CONSTASCII_USTRINGPARAM("help"));
rtl::OUString Databases::expandURL( const rtl::OUString& aURL )
{
@@ -106,18 +105,18 @@ rtl::OUString Databases::expandURL( const rtl::OUString& aURL, Reference< uno::X
Reference< XMultiComponentFactory > xSMgr( xContext->getServiceManager(), UNO_QUERY );
xFac = Reference< uri::XUriReferenceFactory >(
- xSMgr->createInstanceWithContext( rtl::OUString::createFromAscii(
- "com.sun.star.uri.UriReferenceFactory"), xContext ) , UNO_QUERY );
+ xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.uri.UriReferenceFactory")), xContext ) , UNO_QUERY );
if( !xFac.is() )
{
throw RuntimeException(
- ::rtl::OUString::createFromAscii( "Databases::expand(), could not instatiate UriReferenceFactory." ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Databases::expand(), could not instatiate UriReferenceFactory." )),
Reference< XInterface >() );
}
xMacroExpander = Reference< util::XMacroExpander >(
xContext->getValueByName(
- ::rtl::OUString::createFromAscii( "/singletons/com.sun.star.util.theMacroExpander" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.util.theMacroExpander" )) ),
UNO_QUERY_THROW );
}
@@ -155,13 +154,13 @@ Databases::Databases( sal_Bool showBasic,
m_nCustomCSSDocLength( 0 ),
m_pCustomCSSDoc( 0 ),
m_aCSS(styleSheet.toAsciiLowerCase()),
- newProdName(rtl::OUString::createFromAscii( "$[officename]" ) ),
- newProdVersion(rtl::OUString::createFromAscii( "$[officeversion]" ) ),
- prodName( rtl::OUString::createFromAscii( "%PRODUCTNAME" ) ),
- prodVersion( rtl::OUString::createFromAscii( "%PRODUCTVERSION" ) ),
- vendName( rtl::OUString::createFromAscii( "%VENDORNAME" ) ),
- vendVersion( rtl::OUString::createFromAscii( "%VENDORVERSION" ) ),
- vendShort( rtl::OUString::createFromAscii( "%VENDORSHORT" ) ),
+ newProdName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "$[officename]" )) ),
+ newProdVersion(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "$[officeversion]" )) ),
+ prodName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "%PRODUCTNAME" )) ),
+ prodVersion( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "%PRODUCTVERSION" )) ),
+ vendName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "%VENDORNAME" )) ),
+ vendVersion( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "%VENDORVERSION" )) ),
+ vendShort( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "%VENDORSHORT" )) ),
m_aImagesZipPaths( imagesZipPaths ),
m_nSymbolsStyle( 0 )
{
@@ -180,28 +179,28 @@ Databases::Databases( sal_Bool showBasic,
// m_vReplacement[2...4] (vendorName/-Version/-Short) are empty strings
m_vReplacement[5] = productName;
m_vReplacement[6] = productVersion;
-
+
setInstallPath( instPath );
- m_xSFA = Reference< ucb::XSimpleFileAccess >(
- m_xSMgr->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ),
+ m_xSFA = Reference< ucb::XSimpleFileAccess >(
+ m_xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )),
m_xContext ), UNO_QUERY_THROW );
}
Databases::~Databases()
{
// release stylesheet
-
+
delete[] m_pCustomCSSDoc;
-
+
// release errorDocument
-
+
delete[] m_pErrorDoc;
-
+
// unload the databases
-
+
{
- // DatabasesTable
+ // DatabasesTable
DatabasesTable::iterator it = m_aDatabases.begin();
while( it != m_aDatabases.end() )
{
@@ -211,10 +210,10 @@ Databases::~Databases()
++it;
}
}
-
+
{
// ModInfoTable
-
+
ModInfoTable::iterator it = m_aModInfo.begin();
while( it != m_aModInfo.end() )
{
@@ -222,10 +221,10 @@ Databases::~Databases()
++it;
}
}
-
+
{
// KeywordInfoTable
-
+
KeywordInfoTable::iterator it = m_aKeywordInfo.begin();
while( it != m_aKeywordInfo.end() )
{
@@ -240,17 +239,21 @@ static bool impl_getZipFile(
const rtl::OUString & rZipName,
rtl::OUString & rFileName )
{
+ rtl::OUString aWorkingDir;
+ osl_getProcessWorkingDir( &aWorkingDir.pData );
const rtl::OUString *pPathArray = rImagesZipPaths.getArray();
for ( int i = 0; i < rImagesZipPaths.getLength(); ++i )
{
- rFileName = pPathArray[ i ];
- if ( rFileName.getLength() )
+ rtl::OUString aFileName = pPathArray[ i ];
+ if ( aFileName.getLength() )
{
- if ( 1 + rFileName.lastIndexOf( '/' ) != rFileName.getLength() )
+ if ( 1 + aFileName.lastIndexOf( '/' ) != aFileName.getLength() )
{
- rFileName += rtl::OUString::createFromAscii( "/" );
+ aFileName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ));
}
- rFileName += rZipName;
+ aFileName += rZipName;
+ // the icons are not read when the URL is a symlink
+ osl::File::getAbsoluteFileURL( aWorkingDir, aFileName, rFileName );
// test existence
osl::DirectoryItem aDirItem;
@@ -333,16 +336,16 @@ void Databases::replaceName( rtl::OUString& oustring ) const
sal_Int32 idx = -1,idx1 = -1,idx2 = -1,k = 0,off;
bool cap = false;
rtl::OUStringBuffer aStrBuf( 0 );
-
+
while( true )
{
++idx;
idx1 = oustring.indexOf( sal_Unicode('%'),idx);
idx2 = oustring.indexOf( sal_Unicode('$'),idx);
-
+
if(idx1 == -1 && idx2 == -1)
break;
-
+
if(idx1 == -1)
idx = idx2;
else if(idx2 == -1)
@@ -354,7 +357,7 @@ void Databases::replaceName( rtl::OUString& oustring ) const
else if(idx2 < idx1 )
idx = idx2;
}
-
+
if( oustring.indexOf( prodName,idx ) == idx )
off = PRODUCTNAME;
else if( oustring.indexOf( prodVersion,idx ) == idx )
@@ -371,7 +374,7 @@ void Databases::replaceName( rtl::OUString& oustring ) const
off = NEWPRODUCTVERSION;
else
off = -1;
-
+
if( off != -1 )
{
if( ! cap )
@@ -379,13 +382,13 @@ void Databases::replaceName( rtl::OUString& oustring ) const
cap = true;
aStrBuf.ensureCapacity( 256 );
}
-
+
aStrBuf.append( &oustring.getStr()[k],idx - k );
aStrBuf.append( m_vReplacement[off] );
k = idx + m_vAdd[off];
}
}
-
+
if( cap )
{
if( k < oustring.getLength() )
@@ -395,24 +398,24 @@ void Databases::replaceName( rtl::OUString& oustring ) const
}
-
+
rtl::OUString Databases::getInstallPathAsSystemPath()
{
osl::MutexGuard aGuard( m_aMutex );
-
+
if( ! m_aInstallDirectoryAsSystemPath.getLength() )
{
#ifdef DBG_UTIL
bool bla =
osl::FileBase::E_None ==
osl::FileBase::getSystemPathFromFileURL( m_aInstallDirectory,m_aInstallDirectoryAsSystemPath );
- VOS_ENSURE( bla,"HelpProvider, no installpath" );
-#else
- osl::FileBase::getSystemPathFromFileURL( m_aInstallDirectory,m_aInstallDirectoryAsSystemPath );
+ OSL_ENSURE( bla,"HelpProvider, no installpath" );
+#else
+ osl::FileBase::getSystemPathFromFileURL( m_aInstallDirectory,m_aInstallDirectoryAsSystemPath );
#endif
}
-
+
return m_aInstallDirectoryAsSystemPath;
}
@@ -422,7 +425,7 @@ rtl::OUString Databases::getInstallPathAsSystemPath()
rtl::OUString Databases::getInstallPathAsURL()
{
osl::MutexGuard aGuard( m_aMutex );
-
+
return m_aInstallDirectory;
}
@@ -434,32 +437,32 @@ const std::vector< rtl::OUString >& Databases::getModuleList( const rtl::OUStrin
rtl::OUString fileName,dirName = getInstallPathAsURL() + processLang( Language );
osl::Directory dirFile( dirName );
- osl::DirectoryItem aDirItem;
+ osl::DirectoryItem aDirItem;
osl::FileStatus aStatus( FileStatusMask_FileName );
-
+
sal_Int32 idx;
if( osl::FileBase::E_None != dirFile.open() )
return m_avModules;
-
- while( dirFile.getNextItem( aDirItem ) == osl::FileBase::E_None &&
+
+ while( dirFile.getNextItem( aDirItem ) == osl::FileBase::E_None &&
aDirItem.getFileStatus( aStatus ) == osl::FileBase::E_None )
{
if( ! aStatus.isValid( FileStatusMask_FileName ) )
continue;
-
+
fileName = aStatus.getFileName();
-
+
// Check, whether fileName is of the form *.cfg
idx = fileName.lastIndexOf( sal_Unicode( '.' ) );
-
+
if( idx == -1 )
continue;
-
+
const sal_Unicode* str = fileName.getStr();
-
- if( fileName.getLength() == idx + 4 &&
- ( str[idx + 1] == 'c' || str[idx + 1] == 'C' ) &&
+
+ if( fileName.getLength() == idx + 4 &&
+ ( str[idx + 1] == 'c' || str[idx + 1] == 'C' ) &&
( str[idx + 2] == 'f' || str[idx + 2] == 'F' ) &&
( str[idx + 3] == 'g' || str[idx + 3] == 'G' ) &&
( fileName = fileName.copy(0,idx).toAsciiLowerCase() ).compareToAscii( "picture" ) != 0 ) {
@@ -470,7 +473,7 @@ const std::vector< rtl::OUString >& Databases::getModuleList( const rtl::OUStrin
}
}
return m_avModules;
-}
+}
@@ -479,20 +482,20 @@ StaticModuleInformation* Databases::getStaticInformationForModule( const rtl::OU
{
osl::MutexGuard aGuard( m_aMutex );
- rtl::OUString key = processLang(Language) + rtl::OUString::createFromAscii( "/" ) + Module;
+ rtl::OUString key = processLang(Language) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" )) + Module;
- std::pair< ModInfoTable::iterator,bool > aPair =
- m_aModInfo.insert( ModInfoTable::value_type( key,0 ) );
+ std::pair< ModInfoTable::iterator,bool > aPair =
+ m_aModInfo.insert( ModInfoTable::value_type( key,0 ) );
ModInfoTable::iterator it = aPair.first;
-
+
if( aPair.second && ! it->second )
{
osl::File cfgFile( getInstallPathAsURL() +
key +
- rtl::OUString::createFromAscii( ".cfg" ) );
-
- if( osl::FileBase::E_None != cfgFile.open( OpenFlag_Read ) )
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".cfg" )) );
+
+ if( osl::FileBase::E_None != cfgFile.open( osl_File_OpenFlag_Read ) )
it->second = 0;
else
{
@@ -501,16 +504,16 @@ StaticModuleInformation* Databases::getStaticInformationForModule( const rtl::OU
sal_Char buffer[2048];
sal_Unicode lineBuffer[1028];
rtl::OUString fileContent;
-
+
while( osl::FileBase::E_None == cfgFile.read( &buffer,2048,nRead ) && nRead )
fileContent += rtl::OUString( buffer,sal_Int32( nRead ),RTL_TEXTENCODING_UTF8 );
-
+
cfgFile.close();
-
+
const sal_Unicode* str = fileContent.getStr();
rtl::OUString current,lang_,program,startid,title,heading,fulltext;
- rtl::OUString order = rtl::OUString::createFromAscii( "1" );
-
+ rtl::OUString order(RTL_CONSTASCII_USTRINGPARAM( "1" ));
+
for( sal_Int32 i = 0;i < fileContent.getLength();i++ )
{
sal_Unicode ch = str[ i ];
@@ -519,7 +522,7 @@ StaticModuleInformation* Databases::getStaticInformationForModule( const rtl::OU
if( pos )
{
current = rtl::OUString( lineBuffer,pos );
-
+
if( current.compareToAscii( "Title",5 ) == 0 )
{
title = current.copy( current.indexOf(sal_Unicode( '=' ) ) + 1 );
@@ -560,10 +563,10 @@ StaticModuleInformation* Databases::getStaticInformationForModule( const rtl::OU
program,
heading,
fulltext,
- order );
+ order );
}
}
-
+
return it->second;
}
@@ -576,12 +579,12 @@ rtl::OUString Databases::processLang( const rtl::OUString& Language )
rtl::OUString ret;
LangSetTable::iterator it = m_aLangSet.find( Language );
-
+
if( it == m_aLangSet.end() )
{
sal_Int32 idx;
osl::DirectoryItem aDirItem;
-
+
if( osl::FileBase::E_None == osl::DirectoryItem::get( getInstallPathAsURL() + Language,aDirItem ) )
{
ret = Language;
@@ -600,7 +603,7 @@ rtl::OUString Databases::processLang( const rtl::OUString& Language )
ret = it->second;
return ret;
-}
+}
rtl::OUString Databases::country( const rtl::OUString& Language )
@@ -609,7 +612,7 @@ rtl::OUString Databases::country( const rtl::OUString& Language )
if( ( idx = Language.indexOf( '-' ) ) != -1 ||
( idx = Language.indexOf( '_' ) ) != -1 )
return Language.copy( 1+idx );
-
+
return rtl::OUString();
}
@@ -621,11 +624,11 @@ Db* Databases::getBerkeley( const rtl::OUString& Database,
{
if( ! Database.getLength() || ! Language.getLength() )
return 0;
-
+
osl::MutexGuard aGuard( m_aMutex );
- rtl::OUString aFileExt( rtl::OUString::createFromAscii( helpText ? ".ht" : ".db" ) );
+ rtl::OUString aFileExt( helpText ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".ht")) : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".db" )) );
rtl::OUString dbFileName = aSlash + Database + aFileExt;
rtl::OUString key;
if( pExtensionPath == NULL )
@@ -633,21 +636,21 @@ Db* Databases::getBerkeley( const rtl::OUString& Database,
else
key = *pExtensionPath + Language + dbFileName; // make unique, don't change language
- std::pair< DatabasesTable::iterator,bool > aPair =
+ std::pair< DatabasesTable::iterator,bool > aPair =
m_aDatabases.insert( DatabasesTable::value_type( key,0 ) );
-
- DatabasesTable::iterator it = aPair.first;
-
+
+ DatabasesTable::iterator it = aPair.first;
+
if( aPair.second && ! it->second )
{
Db* table = new Db();
-
+
rtl::OUString fileNameOU;
if( pExtensionPath )
{
- rtl::OUString aExpandedURL = expandURL( *pExtensionPath );
+ rtl::OUString aExpandedURL = expandURL( *pExtensionPath );
aExpandedURL += Language + dbFileName;
- osl::FileBase::getSystemPathFromFileURL( aExpandedURL, fileNameOU );
+ osl::FileBase::getSystemPathFromFileURL( aExpandedURL, fileNameOU );
}
else
fileNameOU = getInstallPathAsSystemPath() + key;
@@ -657,7 +660,7 @@ Db* Databases::getBerkeley( const rtl::OUString& Database,
rtl::OUString fileNameDBHelp( fileNameOU );
if( pExtensionPath != NULL )
- fileNameDBHelp += rtl::OUString::createFromAscii( "_" );
+ fileNameDBHelp += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_" ));
if( m_xSFA->exists( fileNameDBHelp ) )
{
DBHelp* pDBHelp = new DBHelp( fileNameDBHelp, m_xSFA );
@@ -678,7 +681,7 @@ Db* Databases::getBerkeley( const rtl::OUString& Database,
delete table;
table = 0;
}
-
+
it->second = table;
}
@@ -692,76 +695,76 @@ Databases::getCollator( const rtl::OUString& Language,
(void)System;
rtl::OUString key = Language;
-
+
osl::MutexGuard aGuard( m_aMutex );
-
+
CollatorTable::iterator it =
m_aCollatorTable.insert( CollatorTable::value_type( key,0 ) ).first;
-
+
if( ! it->second.is() )
{
- it->second =
- Reference< XCollator > (
- m_xSMgr->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.i18n.Collator" ),
+ it->second =
+ Reference< XCollator > (
+ m_xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.Collator" )),
m_xContext ), UNO_QUERY );
rtl::OUString langStr = processLang(Language);
rtl::OUString countryStr = country(Language);
if( !countryStr.getLength() )
{
if( langStr.compareToAscii("de") == 0 )
- countryStr = rtl::OUString::createFromAscii("DE");
+ countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DE"));
else if( langStr.compareToAscii("en") == 0 )
- countryStr = rtl::OUString::createFromAscii("US");
+ countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US"));
else if( langStr.compareToAscii("es") == 0 )
- countryStr = rtl::OUString::createFromAscii("ES");
+ countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ES"));
else if( langStr.compareToAscii("it") == 0 )
- countryStr = rtl::OUString::createFromAscii("IT");
+ countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IT"));
else if( langStr.compareToAscii("fr") == 0 )
- countryStr = rtl::OUString::createFromAscii("FR");
+ countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FR"));
else if( langStr.compareToAscii("sv") == 0 )
- countryStr = rtl::OUString::createFromAscii("SE");
+ countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SE"));
else if( langStr.compareToAscii("ja") == 0 )
- countryStr = rtl::OUString::createFromAscii("JP");
+ countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JP"));
else if( langStr.compareToAscii("ko") == 0 )
- countryStr = rtl::OUString::createFromAscii("KR");
+ countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KR"));
}
it->second->loadDefaultCollator( Locale( langStr,
countryStr,
rtl::OUString() ),
0 );
}
-
+
return it->second;
}
namespace chelp {
-
+
struct KeywordElementComparator
{
KeywordElementComparator( const Reference< XCollator >& xCollator )
: m_xCollator( xCollator )
{ }
-
+
bool operator()( const KeywordInfo::KeywordElement& la,
const KeywordInfo::KeywordElement& ra ) const
{
const rtl::OUString& l = la.key;
const rtl::OUString& r = ra.key;
-
+
bool ret;
-
+
if( m_xCollator.is() )
{
sal_Int32 l1 = l.indexOf( sal_Unicode( ';' ) );
sal_Int32 l3 = ( l1 == -1 ? l.getLength() : l1 );
-
+
sal_Int32 r1 = r.indexOf( sal_Unicode( ';' ) );
sal_Int32 r3 = ( r1 == -1 ? r.getLength() : r1 );
-
+
sal_Int32 c1 = m_xCollator->compareSubstring( l,0,l3,r,0,r3 );
-
+
if( c1 == +1 )
ret = false;
else if( c1 == 0 )
@@ -775,13 +778,13 @@ namespace chelp {
}
else
ret = bool( l < r );
-
+
return ret;
}
-
+
Reference< XCollator > m_xCollator;
}; // end struct KeywordElementComparator
-
+
}
@@ -818,7 +821,7 @@ void KeywordInfo::KeywordElement::init( Databases *pDatabases,Db* pDb,const rtl:
anchor.push_back( rtl::OUString() );
}
}
-
+
listId.realloc( id.size() );
listAnchor.realloc( id.size() );
listTitle.realloc( id.size() );
@@ -836,7 +839,7 @@ void KeywordInfo::KeywordElement::init( Databases *pDatabases,Db* pDb,const rtl:
pData = pEmpty;
if( pDb )
{
- rtl::OString idi( id[i].getStr(),id[i].getLength(),RTL_TEXTENCODING_UTF8 );
+ rtl::OString idi( id[i].getStr(),id[i].getLength(),RTL_TEXTENCODING_UTF8 );
DBHelp* pDBHelp = pDb->getDBHelp();
if( pDBHelp != NULL )
{
@@ -858,9 +861,9 @@ void KeywordInfo::KeywordElement::init( Databases *pDatabases,Db* pDb,const rtl:
pData = static_cast<sal_Char*>( data.get_data() );
}
}
-
+
DbtToStringConverter converter( pData, nSize );
-
+
rtl::OUString title = converter.getTitle();
pDatabases->replaceName( title );
listTitle[i] = title;
@@ -937,14 +940,14 @@ KeywordInfo* Databases::getKeyword( const rtl::OUString& Database,
const rtl::OUString& Language )
{
osl::MutexGuard aGuard( m_aMutex );
-
- rtl::OUString key = processLang(Language) + rtl::OUString::createFromAscii( "/" ) + Database;
-
- std::pair< KeywordInfoTable::iterator,bool > aPair =
- m_aKeywordInfo.insert( KeywordInfoTable::value_type( key,0 ) );
-
- KeywordInfoTable::iterator it = aPair.first;
-
+
+ rtl::OUString key = processLang(Language) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" )) + Database;
+
+ std::pair< KeywordInfoTable::iterator,bool > aPair =
+ m_aKeywordInfo.insert( KeywordInfoTable::value_type( key,0 ) );
+
+ KeywordInfoTable::iterator it = aPair.first;
+
if( aPair.second && ! it->second )
{
std::vector<KeywordInfo::KeywordElement> aVector;
@@ -962,7 +965,7 @@ KeywordInfo* Databases::getKeyword( const rtl::OUString& Database,
rtl::OUString fileNameDBHelp( fileNameOU );
if( bExtension )
- fileNameDBHelp += rtl::OUString::createFromAscii( "_" );
+ fileNameDBHelp += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_" ));
if( m_xSFA->exists( fileNameDBHelp ) )
{
DBHelp aDBHelp( fileNameDBHelp, m_xSFA );
@@ -994,7 +997,7 @@ KeywordInfo* Databases::getKeyword( const rtl::OUString& Database,
if( !bBelongsToDatabase )
continue;
-
+
aVector.push_back( KeywordInfo::KeywordElement( this,
idmap,
keyword,
@@ -1017,11 +1020,11 @@ KeywordInfo* Databases::getKeyword( const rtl::OUString& Database,
int nDummy = 0;
#endif
}
-
+
else if( 0 == table.open( 0,fileName.getStr(),0,DB_BTREE,DB_RDONLY,0644 ) )
{
Db* idmap = getBerkeley( Database,Language );
-
+
bool first = true;
Dbc* cursor = 0;
@@ -1044,7 +1047,7 @@ KeywordInfo* Databases::getKeyword( const rtl::OUString& Database,
if( !bBelongsToDatabase )
continue;
-
+
aVector.push_back( KeywordInfo::KeywordElement( this,
idmap,
keyword,
@@ -1056,7 +1059,7 @@ KeywordInfo* Databases::getKeyword( const rtl::OUString& Database,
first = false;
}
}
-
+
if( cursor ) cursor->close();
}
table.close( 0 );
@@ -1066,11 +1069,11 @@ KeywordInfo* Databases::getKeyword( const rtl::OUString& Database,
Reference< XCollator > xCollator = getCollator( Language,rtl::OUString());
KeywordElementComparator aComparator( xCollator );
std::sort(aVector.begin(),aVector.end(),aComparator);
-
+
KeywordInfo* pInfo = it->second = new KeywordInfo( aVector );
(void)pInfo;
}
-
+
return it->second;
}
@@ -1085,10 +1088,10 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const rtl::OUString& ja
rtl::OUString key = processLang(Language) + aSlash + jar;
osl::MutexGuard aGuard( m_aMutex );
-
+
ZipFileTable::iterator it =
m_aZipFileTable.insert( ZipFileTable::value_type( key,Reference< XHierarchicalNameAccess >(0) ) ).first;
-
+
if( ! it->second.is() )
{
rtl::OUString zipFile;
@@ -1115,7 +1118,7 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const rtl::OUString& ja
}
Sequence< Any > aArguments( 2 );
-
+
XInputStream_impl* p = new XInputStream_impl( zipFile );
if( p->CtorSuccess() )
{
@@ -1127,7 +1130,7 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const rtl::OUString& ja
delete p;
aArguments[ 0 ] <<= zipFile;
}
-
+
// let ZipPackage be used ( no manifest.xml is required )
beans::NamedValue aArg;
aArg.Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StorageFormat" ) );
@@ -1136,19 +1139,19 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const rtl::OUString& ja
Reference< XInterface > xIfc
= m_xSMgr->createInstanceWithArgumentsAndContext(
- rtl::OUString::createFromAscii(
- "com.sun.star.packages.comp.ZipPackage" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.packages.comp.ZipPackage" )),
aArguments, m_xContext );
-
+
if ( xIfc.is() )
{
it->second = Reference< XHierarchicalNameAccess >( xIfc, UNO_QUERY );
-
- VOS_ENSURE( it->second.is(),
+
+ OSL_ENSURE( it->second.is(),
"ContentProvider::createPackage - "
"Got no hierarchical name access!" );
-
- }
+
+ }
}
catch ( RuntimeException & )
{
@@ -1157,7 +1160,7 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const rtl::OUString& ja
{
}
}
-
+
return it->second;
}
@@ -1192,20 +1195,20 @@ Reference< XHierarchicalNameAccess > Databases::findJarFileForPath
if( aIdentifierInPath.getLength() && aIdentifierOptional.IsPresent )
{
rtl::OUString aUnencodedIdentifier = aIdentifierOptional.Value;
- rtl::OUString aIdentifier = rtl::Uri::encode( aUnencodedIdentifier,
+ rtl::OUString aIdentifier = rtl::Uri::encode( aUnencodedIdentifier,
rtl_UriCharClassPchar, rtl_UriEncodeIgnoreEscapes, RTL_TEXTENCODING_UTF8 );
if( !aIdentifierInPath.equals( aIdentifier ) )
{
// path does not start with extension identifier -> ignore
bSuccess = false;
- }
+ }
}
else
{
// No identifier -> ignore
bSuccess = false;
- }
+ }
}
if( bSuccess )
@@ -1215,7 +1218,7 @@ Reference< XHierarchicalNameAccess > Databases::findJarFileForPath
}
}
}
-
+
return xNA;
}
@@ -1229,17 +1232,17 @@ void Databases::popupDocument( URLParameter* urlPar,char **buffer,int *byteCount
" <body> "
" <help:popup-cut Id=\"";
const sal_Int32 l1 = strlen( pop1 );
-
+
const char* pop3 = "\" Eid=\"";
const sal_Int32 l3 = strlen( pop3 );
- const char* pop5 =
+ const char* pop5 =
"\" xmlns:help=\"http://openoffice.org/2000/help\"></help:popup-cut> "
" </body> "
" </html>";
const sal_Int32 l5 = strlen( pop5 );
sal_Int32 l2,l4;
-
+
rtl::OUString val = urlPar->get_id();
rtl::OString pop2O( val.getStr(),l2 = val.getLength(),RTL_TEXTENCODING_UTF8 );
const char* pop2 = pop2O.getStr();
@@ -1247,9 +1250,9 @@ void Databases::popupDocument( URLParameter* urlPar,char **buffer,int *byteCount
val = urlPar->get_eid();
rtl::OString pop4O( val.getStr(),l4 = val.getLength(),RTL_TEXTENCODING_UTF8 );
const char* pop4 = pop4O.getStr();
-
+
(*byteCount) = l1 + l2 + l3 + l4 + l5;
-
+
*buffer = new char[ 1+*byteCount ];
rtl_copyMemory( *buffer,pop1,l1 );
@@ -1272,7 +1275,7 @@ void Databases::changeCSS(const rtl::OUString& newStyleSheet)
void Databases::cascadingStylesheet( const rtl::OUString& Language,
char** buffer,
int* byteCount )
-{
+{
if( ! m_pCustomCSSDoc )
{
int retry = 2;
@@ -1310,14 +1313,14 @@ void Databases::cascadingStylesheet( const rtl::OUString& Language,
{
if( retry == 2 )
- fileURL =
+ fileURL =
getInstallPathAsURL() +
processLang( Language ) +
rtl::OUString::createFromAscii( "/" ) +
aCSS +
rtl::OUString::createFromAscii( ".css" );
else if( retry == 1 )
- fileURL =
+ fileURL =
getInstallPathAsURL() +
aCSS +
rtl::OUString::createFromAscii( ".css" );
@@ -1325,12 +1328,14 @@ void Databases::cascadingStylesheet( const rtl::OUString& Language,
osl::DirectoryItem aDirItem;
osl::File aFile( fileURL );
osl::FileStatus aStatus( FileStatusMask_FileSize );
-
+
if( osl::FileBase::E_None == osl::DirectoryItem::get( fileURL,aDirItem ) &&
- osl::FileBase::E_None == aFile.open( OpenFlag_Read ) &&
+ osl::FileBase::E_None == aFile.open( osl_File_OpenFlag_Read ) &&
osl::FileBase::E_None == aDirItem.getFileStatus( aStatus ) )
{
- m_nCustomCSSDocLength = int( aStatus.getFileSize() );
+ sal_uInt64 nSize;
+ aFile.getSize( nSize );
+ m_nCustomCSSDocLength = (int)nSize;
m_pCustomCSSDoc = new char[ 1 + m_nCustomCSSDocLength ];
m_pCustomCSSDoc[ m_nCustomCSSDocLength ] = 0;
sal_uInt64 a = m_nCustomCSSDocLength,b = m_nCustomCSSDocLength;
@@ -1348,19 +1353,19 @@ void Databases::cascadingStylesheet( const rtl::OUString& Language,
bHighContrastMode = sal_False;
}
}
-
+
if( error )
{
m_nCustomCSSDocLength = 0;
m_pCustomCSSDoc = new char[ 1 ]; // Initialize with 1 to avoid gcc compiler warning
}
}
-
+
*byteCount = m_nCustomCSSDocLength;
*buffer = new char[ 1 + *byteCount ];
(*buffer)[*byteCount] = 0;
rtl_copyMemory( *buffer,m_pCustomCSSDoc,m_nCustomCSSDocLength );
-
+
}
@@ -1411,7 +1416,7 @@ void Databases::setActiveText( const rtl::OUString& Module,
if( bSuccess )
{
- // ensure existence of tmp after for
+ // ensure existence of tmp after for
rtl::OString tmp;
for( int i = 0; i < nSize; ++i )
if( pData[i] == '%' || pData[i] == '$' )
@@ -1445,13 +1450,13 @@ void Databases::setActiveText( const rtl::OUString& Module,
void Databases::setInstallPath( const rtl::OUString& aInstDir )
{
osl::MutexGuard aGuard( m_aMutex );
-
+
osl::FileBase::getFileURLFromSystemPath( aInstDir,m_aInstallDirectory );
//TODO: check returned error code
-
+
if( m_aInstallDirectory.lastIndexOf( sal_Unicode( '/' ) ) != m_aInstallDirectory.getLength() - 1 )
- m_aInstallDirectory += rtl::OUString::createFromAscii( "/" );
-
+ m_aInstallDirectory += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ));
+
m_aInstallDirectoryWithoutEncoding = rtl::Uri::decode( m_aInstallDirectory,
rtl_UriDecodeWithCharset,
RTL_TEXTENCODING_UTF8 );
@@ -1463,7 +1468,7 @@ void Databases::setInstallPath( const rtl::OUString& aInstDir )
ExtensionHelpExistanceMap ExtensionIteratorBase::aHelpExistanceMap;
-ExtensionIteratorBase::ExtensionIteratorBase( Reference< XComponentContext > xContext,
+ExtensionIteratorBase::ExtensionIteratorBase( Reference< XComponentContext > xContext,
Databases& rDatabases, const rtl::OUString& aInitialModule, const rtl::OUString& aLanguage )
: m_xContext( xContext )
, m_rDatabases( rDatabases )
@@ -1501,13 +1506,13 @@ void ExtensionIteratorBase::init()
if( !m_xContext.is() )
{
throw RuntimeException(
- ::rtl::OUString::createFromAscii( "ExtensionIteratorBase::init(), no XComponentContext" ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ExtensionIteratorBase::init(), no XComponentContext" )),
Reference< XInterface >() );
}
Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager(), UNO_QUERY );
- m_xSFA = Reference< ucb::XSimpleFileAccess >(
- xSMgr->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ),
+ m_xSFA = Reference< ucb::XSimpleFileAccess >(
+ xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )),
m_xContext ), UNO_QUERY_THROW );
m_bUserPackagesLoaded = false;
@@ -1547,6 +1552,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetHelpPackageFromP
}
if( bRegistered )
{
+ rtl::OUString aHelpMediaType( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.help" ) );
if( xPackage->isBundle() )
{
Sequence< Reference< deployment::XPackage > > aPkgSeq = xPackage->getBundle
@@ -1602,7 +1608,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextUserHelpPack
{
const Reference< deployment::XPackage >* pUserPackages = m_aUserPackagesSeq.getConstArray();
Reference< deployment::XPackage > xPackage = pUserPackages[ m_iUserPackage++ ];
- VOS_ENSURE( xPackage.is(), "ExtensionIteratorBase::implGetNextUserHelpPackage(): Invalid package" );
+ OSL_ENSURE( xPackage.is(), "ExtensionIteratorBase::implGetNextUserHelpPackage(): Invalid package" );
xHelpPackage = implGetHelpPackageFromPackage( xPackage, o_xParentPackageBundle );
}
@@ -1630,7 +1636,37 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextSharedHelpPa
{
const Reference< deployment::XPackage >* pSharedPackages = m_aSharedPackagesSeq.getConstArray();
Reference< deployment::XPackage > xPackage = pSharedPackages[ m_iSharedPackage++ ];
- VOS_ENSURE( xPackage.is(), "ExtensionIteratorBase::implGetNextSharedHelpPackage(): Invalid package" );
+ OSL_ENSURE( xPackage.is(), "ExtensionIteratorBase::implGetNextSharedHelpPackage(): Invalid package" );
+ xHelpPackage = implGetHelpPackageFromPackage( xPackage, o_xParentPackageBundle );
+ }
+
+ return xHelpPackage;
+}
+
+Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextBundledHelpPackage
+ ( Reference< deployment::XPackage >& o_xParentPackageBundle )
+{
+ Reference< deployment::XPackage > xHelpPackage;
+
+ if( !m_bBundledPackagesLoaded )
+ {
+ Reference< XPackageManager > xBundledManager =
+ thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bundled")) );
+ m_aBundledPackagesSeq = xBundledManager->getDeployedPackages
+ ( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
+ m_bBundledPackagesLoaded = true;
+ }
+
+ if( m_iBundledPackage == m_aBundledPackagesSeq.getLength() )
+ {
+ m_eState = END_REACHED;
+ }
+ else
+ {
+ const Reference< deployment::XPackage >* pBundledPackages =
+ m_aBundledPackagesSeq.getConstArray();
+ Reference< deployment::XPackage > xPackage = pBundledPackages[ m_iBundledPackage++ ];
+ OSL_ENSURE( xPackage.is(), "ExtensionIteratorBase::implGetNextBundledHelpPackage(): Invalid package" );
xHelpPackage = implGetHelpPackageFromPackage( xPackage, o_xParentPackageBundle );
}
@@ -1801,7 +1837,7 @@ Db* DataBaseIterator::nextDb( rtl::OUString* o_pExtensionPath, rtl::OUString* o_
}
case END_REACHED:
- VOS_ENSURE( false, "DataBaseIterator::nextDb(): Invalid case END_REACHED" );
+ OSL_ENSURE( false, "DataBaseIterator::nextDb(): Invalid case END_REACHED" );
break;
}
}
@@ -1876,10 +1912,10 @@ rtl::OUString KeyDataBaseFileIterator::nextDbFile( bool& o_rbExtension )
switch( m_eState )
{
case INITIAL_MODULE:
- aRetFile =
+ aRetFile =
m_rDatabases.getInstallPathAsSystemPath() +
m_rDatabases.processLang( m_aLanguage ) + aSlash + m_aInitialModule +
- rtl::OUString::createFromAscii( ".key" );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".key" ));
o_rbExtension = false;
@@ -1927,7 +1963,7 @@ rtl::OUString KeyDataBaseFileIterator::nextDbFile( bool& o_rbExtension )
}
case END_REACHED:
- VOS_ENSURE( false, "DataBaseIterator::nextDbFile(): Invalid case END_REACHED" );
+ OSL_ENSURE( false, "DataBaseIterator::nextDbFile(): Invalid case END_REACHED" );
break;
}
}
@@ -1939,7 +1975,7 @@ rtl::OUString KeyDataBaseFileIterator::implGetDbFileFromPackage
( Reference< deployment::XPackage > xPackage )
{
rtl::OUString aExpandedURL =
- implGetFileFromPackage( rtl::OUString::createFromAscii( ".key" ), xPackage );
+ implGetFileFromPackage( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".key" )), xPackage );
rtl::OUString aRetFile;
osl::FileBase::getSystemPathFromFileURL( aExpandedURL, aRetFile );
@@ -2001,7 +2037,7 @@ Reference< XHierarchicalNameAccess > JarFileIterator::nextJarFile
}
case END_REACHED:
- VOS_ENSURE( false, "JarFileIterator::nextJarFile(): Invalid case END_REACHED" );
+ OSL_ENSURE( false, "JarFileIterator::nextJarFile(): Invalid case END_REACHED" );
break;
}
}
@@ -2015,7 +2051,7 @@ Reference< XHierarchicalNameAccess > JarFileIterator::implGetJarFromPackage
Reference< XHierarchicalNameAccess > xNA;
rtl::OUString zipFile =
- implGetFileFromPackage( rtl::OUString::createFromAscii( ".jar" ), xPackage );
+ implGetFileFromPackage( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".jar" )), xPackage );
try
{
@@ -2031,18 +2067,18 @@ Reference< XHierarchicalNameAccess > JarFileIterator::implGetJarFromPackage
Reference< XMultiComponentFactory >xSMgr( m_xContext->getServiceManager(), UNO_QUERY );
Reference< XInterface > xIfc
= xSMgr->createInstanceWithArgumentsAndContext(
- rtl::OUString::createFromAscii(
- "com.sun.star.packages.comp.ZipPackage" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.packages.comp.ZipPackage" )),
aArguments, m_xContext );
-
+
if ( xIfc.is() )
{
xNA = Reference< XHierarchicalNameAccess >( xIfc, UNO_QUERY );
-
- VOS_ENSURE( xNA.is(),
+
+ OSL_ENSURE( xNA.is(),
"JarFileIterator::implGetJarFromPackage() - "
"Got no hierarchical name access!" );
- }
+ }
}
catch ( RuntimeException & )
{}
@@ -2065,7 +2101,7 @@ Reference< XHierarchicalNameAccess > JarFileIterator::implGetJarFromPackage
*o_pExtensionRegistryPath += rPath.copy( nLastSlashInPath);
}
}
-
+
return xNA;
}
@@ -2082,10 +2118,10 @@ rtl::OUString IndexFolderIterator::nextIndexFolder( bool& o_rbExtension, bool& o
switch( m_eState )
{
case INITIAL_MODULE:
- aIndexFolder =
+ aIndexFolder =
m_rDatabases.getInstallPathAsURL() +
m_rDatabases.processLang( m_aLanguage ) + aSlash + m_aInitialModule +
- rtl::OUString::createFromAscii( ".idxl" );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".idxl" ));
o_rbTemporary = false;
o_rbExtension = false;
@@ -2134,7 +2170,7 @@ rtl::OUString IndexFolderIterator::nextIndexFolder( bool& o_rbExtension, bool& o
}
case END_REACHED:
- VOS_ENSURE( false, "IndexFolderIterator::nextIndexFolder(): Invalid case END_REACHED" );
+ OSL_ENSURE( false, "IndexFolderIterator::nextIndexFolder(): Invalid case END_REACHED" );
break;
}
}
@@ -2145,7 +2181,7 @@ rtl::OUString IndexFolderIterator::nextIndexFolder( bool& o_rbExtension, bool& o
rtl::OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemporary, Reference< deployment::XPackage > xPackage )
{
rtl::OUString aIndexFolder =
- implGetFileFromPackage( rtl::OUString::createFromAscii( ".idxl" ), xPackage );
+ implGetFileFromPackage( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".idxl" )), xPackage );
o_rbTemporary = false;
if( !m_xSFA->isFolder( aIndexFolder ) )
@@ -2158,7 +2194,7 @@ rtl::OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemp
bool bIsWriteAccess = false;
try
{
- rtl::OUString aCreateTestFolder = aLangURL + rtl::OUString::createFromAscii( "CreateTestFolder" );
+ rtl::OUString aCreateTestFolder = aLangURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CreateTestFolder" ));
m_xSFA->createFolder( aCreateTestFolder );
if( m_xSFA->isFolder( aCreateTestFolder ) )
bIsWriteAccess = true;
@@ -2175,26 +2211,26 @@ rtl::OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemp
Reference< XMultiComponentFactory >xSMgr( m_xContext->getServiceManager(), UNO_QUERY );
try
{
- xInvocation = Reference< script::XInvocation >(
- m_xContext->getServiceManager()->createInstanceWithContext( rtl::OUString::createFromAscii(
- "com.sun.star.help.HelpIndexer" ), m_xContext ) , UNO_QUERY );
+ xInvocation = Reference< script::XInvocation >(
+ m_xContext->getServiceManager()->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.help.HelpIndexer" )), m_xContext ) , UNO_QUERY );
if( xInvocation.is() )
{
Sequence<uno::Any> aParamsSeq( bIsWriteAccess ? 6 : 8 );
- aParamsSeq[0] = uno::makeAny( rtl::OUString::createFromAscii( "-lang" ) );
+ aParamsSeq[0] = uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "-lang" )) );
rtl::OUString aLang;
sal_Int32 nLastSlash = aLangURL.lastIndexOf( '/' );
if( nLastSlash != -1 )
aLang = aLangURL.copy( nLastSlash + 1 );
else
- aLang = rtl::OUString::createFromAscii( "en" );
+ aLang = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "en" ));
aParamsSeq[1] = uno::makeAny( aLang );
- aParamsSeq[2] = uno::makeAny( rtl::OUString::createFromAscii( "-mod" ) );
- aParamsSeq[3] = uno::makeAny( rtl::OUString::createFromAscii( "help" ) );
+ aParamsSeq[2] = uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "-mod" )) );
+ aParamsSeq[3] = uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "help" )) );
rtl::OUString aZipDir = aLangURL;
if( !bIsWriteAccess )
@@ -2217,14 +2253,14 @@ rtl::OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemp
}
}
- aParamsSeq[4] = uno::makeAny( rtl::OUString::createFromAscii( "-zipdir" ) );
+ aParamsSeq[4] = uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "-zipdir" )) );
rtl::OUString aSystemPath;
osl::FileBase::getSystemPathFromFileURL( aZipDir, aSystemPath );
aParamsSeq[5] = uno::makeAny( aSystemPath );
if( !bIsWriteAccess )
{
- aParamsSeq[6] = uno::makeAny( rtl::OUString::createFromAscii( "-srcdir" ) );
+ aParamsSeq[6] = uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "-srcdir" )) );
rtl::OUString aSrcDirVal;
osl::FileBase::getSystemPathFromFileURL( aLangURL, aSrcDirVal );
aParamsSeq[7] = uno::makeAny( aSrcDirVal );
@@ -2232,13 +2268,13 @@ rtl::OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemp
Sequence< sal_Int16 > aOutParamIndex;
Sequence< uno::Any > aOutParam;
- uno::Any aRet = xInvocation->invoke( rtl::OUString::createFromAscii( "createIndex" ),
+ uno::Any aRet = xInvocation->invoke( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "createIndex" )),
aParamsSeq, aOutParamIndex, aOutParam );
if( bIsWriteAccess )
- aIndexFolder = implGetFileFromPackage( rtl::OUString::createFromAscii( ".idxl" ), xPackage );
+ aIndexFolder = implGetFileFromPackage( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".idxl" )), xPackage );
else
- aIndexFolder = aZipDir + rtl::OUString::createFromAscii( "/help.idxl" );
+ aIndexFolder = aZipDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/help.idxl" ));
}
}
catch (Exception &)
@@ -2263,3 +2299,5 @@ void IndexFolderIterator::deleteTempIndexFolder( const rtl::OUString& aIndexFold
{}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx
index 0b26e2501b..af44554076 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -98,12 +99,12 @@ namespace chelp {
~StaticModuleInformation() { }
- rtl::OUString get_title() { return m_aTitle; }
- rtl::OUString get_id() { return m_aStartId; }
- rtl::OUString get_program() { return m_aProgramSwitch; }
- rtl::OUString get_heading() { return m_aHeading; }
- rtl::OUString get_fulltext() { return m_aFulltext; }
- int get_order() { return m_nOrder; }
+ rtl::OUString get_title() const { return m_aTitle; }
+ rtl::OUString get_id() const { return m_aStartId; }
+ rtl::OUString get_program() const { return m_aProgramSwitch; }
+ rtl::OUString get_heading() const { return m_aHeading; }
+ rtl::OUString get_fulltext() const { return m_aFulltext; }
+ int get_order() const { return m_nOrder; }
}; // end class StaticModuleInformation
@@ -309,14 +310,16 @@ namespace chelp {
int m_nCustomCSSDocLength;
char* m_pCustomCSSDoc;
rtl::OUString m_aCSS;
-
-#define PRODUCTNAME 0
-#define PRODUCTVERSION 1
-#define VENDORNAME 2
-#define VENDORVERSION 3
-#define VENDORSHORT 4
-#define NEWPRODUCTNAME 5
-#define NEWPRODUCTVERSION 6
+
+ enum {
+ PRODUCTNAME = 0,
+ PRODUCTVERSION,
+ VENDORNAME,
+ VENDORVERSION,
+ VENDORSHORT,
+ NEWPRODUCTNAME,
+ NEWPRODUCTVERSION
+ };
int m_vAdd[7];
rtl::OUString m_vReplacement[7];
@@ -558,3 +561,5 @@ namespace chelp {
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/db.cxx b/xmlhelp/source/cxxhelp/provider/db.cxx
index aafa1bf4dc..4cce60f635 100644
--- a/xmlhelp/source/cxxhelp/provider/db.cxx
+++ b/xmlhelp/source/cxxhelp/provider/db.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -662,3 +663,4 @@ void db_internal::raise_error(int dberr, const char * where)
//----------------------------------------------------------------------------
} // namespace ecomp
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/db.hxx b/xmlhelp/source/cxxhelp/provider/db.hxx
index 58bb06bde4..26858fe735 100644
--- a/xmlhelp/source/cxxhelp/provider/db.hxx
+++ b/xmlhelp/source/cxxhelp/provider/db.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -248,3 +249,4 @@ namespace berkeleydbproxy {
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/inputstream.cxx b/xmlhelp/source/cxxhelp/provider/inputstream.cxx
index a877122310..b668a7da93 100644
--- a/xmlhelp/source/cxxhelp/provider/inputstream.cxx
+++ b/xmlhelp/source/cxxhelp/provider/inputstream.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,7 @@ XInputStream_impl::XInputStream_impl( const rtl::OUString& aUncPath )
: m_bIsOpen( false ),
m_aFile( aUncPath )
{
- m_bIsOpen = ( osl::FileBase::E_None == m_aFile.open( OpenFlag_Read ) );
+ m_bIsOpen = ( osl::FileBase::E_None == m_aFile.open( osl_File_OpenFlag_Read ) );
}
@@ -221,3 +222,5 @@ XInputStream_impl::getLength(
else
return sal_Int64( uEndPos );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/inputstream.hxx b/xmlhelp/source/cxxhelp/provider/inputstream.hxx
index cfcd7aa4a9..c2e7aafa79 100644
--- a/xmlhelp/source/cxxhelp/provider/inputstream.hxx
+++ b/xmlhelp/source/cxxhelp/provider/inputstream.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -142,3 +143,5 @@ namespace chelp {
} // end namespace XInputStream_impl
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx
index 0a16022a89..37ca62a10b 100644
--- a/xmlhelp/source/cxxhelp/provider/provider.cxx
+++ b/xmlhelp/source/cxxhelp/provider/provider.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,14 +37,10 @@
#include <stdio.h>
#include <osl/file.hxx>
-#ifndef _VOS_DIAGNOSE_HXX_
-#include <vos/diagnose.hxx>
-#endif
+#include <osl/diagnose.h>
#include <ucbhelper/contentidentifier.hxx>
#include <com/sun/star/frame/XConfigManager.hpp>
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/container/XContainer.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -72,7 +69,7 @@ ContentProvider::ContentProvider(
const uno::Reference< lang::XMultiServiceFactory >& rSMgr )
: ::ucbhelper::ContentProviderImplHelper( rSMgr ),
isInitialized( false ),
- m_aScheme( rtl::OUString::createFromAscii( MYUCP_URL_SCHEME ) ),
+ m_aScheme(RTL_CONSTASCII_USTRINGPARAM(MYUCP_URL_SCHEME)),
m_pDatabases( 0 )
{
}
@@ -125,7 +122,7 @@ rtl::OUString SAL_CALL ContentProvider::getImplementationName()
rtl::OUString ContentProvider::getImplementationName_Static()
{
- return rtl::OUString::createFromAscii("CHelpContentProvider" );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CHelpContentProvider" ));
}
sal_Bool SAL_CALL
@@ -165,11 +162,11 @@ ContentProvider::getSupportedServiceNames_Static()
{
uno::Sequence< rtl::OUString > aSNS( 2 );
aSNS.getArray()[ 0 ] =
- rtl::OUString::createFromAscii(
- MYUCP_CONTENT_PROVIDER_SERVICE_NAME1 );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ MYUCP_CONTENT_PROVIDER_SERVICE_NAME1 ));
aSNS.getArray()[ 1 ] =
- rtl::OUString::createFromAscii(
- MYUCP_CONTENT_PROVIDER_SERVICE_NAME2 );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ MYUCP_CONTENT_PROVIDER_SERVICE_NAME2 ));
return aSNS;
}
@@ -280,7 +277,7 @@ void ContentProvider::init()
rtl::OUString instPath( getKey( xHierAccess,"Path/Current/Help" ) );
if( ! instPath.getLength() )
// try to determine path from default
- instPath = rtl::OUString::createFromAscii( "$(instpath)/help" );
+ instPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "$(instpath)/help" ));
// replace anything like $(instpath);
subst( instPath );
@@ -293,7 +290,7 @@ void ContentProvider::init()
if( xAccess.is() )
{
uno::Any aAny =
- xAccess->getByName( rtl::OUString::createFromAscii( "Help" ) );
+ xAccess->getByName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Help" )) );
aAny >>= m_xContainer;
if( m_xContainer.is() )
m_xContainer->addContainerListener( this );
@@ -508,3 +505,5 @@ void ContentProvider::subst( rtl::OUString& instpath ) const
if( xCfgMgr.is() )
instpath = xCfgMgr->substituteVariables( instpath );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/provider.hxx b/xmlhelp/source/cxxhelp/provider/provider.hxx
index e45aec3b21..0acb16b7f7 100644
--- a/xmlhelp/source/cxxhelp/provider/provider.hxx
+++ b/xmlhelp/source/cxxhelp/provider/provider.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -185,3 +186,5 @@ namespace chelp {
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/resultset.cxx b/xmlhelp/source/cxxhelp/provider/resultset.cxx
index 5ac0fc672f..e232168f06 100644
--- a/xmlhelp/source/cxxhelp/provider/resultset.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultset.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,7 +51,7 @@ using namespace chelp;
DynamicResultSet::DynamicResultSet(
const Reference< XMultiServiceFactory >& rxSMgr,
- const vos::ORef< Content >& rxContent,
+ const rtl::Reference< Content >& rxContent,
const OpenCommandArgument2& rCommand,
const Reference< XCommandEnvironment >& rxEnv,
ResultSetFactory* pFactory )
@@ -88,3 +89,4 @@ void DynamicResultSet::initDynamic()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/resultset.hxx b/xmlhelp/source/cxxhelp/provider/resultset.hxx
index b1c0e3b6ce..09f2ac3ecb 100644
--- a/xmlhelp/source/cxxhelp/provider/resultset.hxx
+++ b/xmlhelp/source/cxxhelp/provider/resultset.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#define _RESULTSET_HXX
#include <ucbhelper/resultsethelper.hxx>
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
#include "content.hxx"
@@ -39,7 +40,7 @@ namespace chelp {
class DynamicResultSet : public ::ucbhelper::ResultSetImplHelper
{
- vos::ORef< Content > m_xContent;
+ rtl::Reference< Content > m_xContent;
com::sun::star::uno::Reference<
com::sun::star::ucb::XCommandEnvironment > m_xEnv;
ResultSetFactory* m_pFactory;
@@ -52,7 +53,7 @@ namespace chelp {
DynamicResultSet(
const com::sun::star::uno::Reference<
com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
- const vos::ORef< Content >& rxContent,
+ const rtl::Reference< Content >& rxContent,
const com::sun::star::ucb::OpenCommandArgument2& rCommand,
const com::sun::star::uno::Reference<
com::sun::star::ucb::XCommandEnvironment >& rxEnv,
@@ -65,3 +66,4 @@ namespace chelp {
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
index c726747bc7..89831c0c64 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <ucbhelper/contentidentifier.hxx>
#include <com/sun/star/ucb/OpenMode.hpp>
#include <com/sun/star/uno/Reference.h>
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
#include <com/sun/star/ucb/ListActionType.hpp>
#include <com/sun/star/ucb/XSourceInitialization.hpp>
#include <ucbhelper/resultsetmetadata.hxx>
@@ -506,12 +505,12 @@ ResultSetBase::getPropertySetInfo()
throw( uno::RuntimeException)
{
uno::Sequence< beans::Property > seq(2);
- seq[0].Name = rtl::OUString::createFromAscii( "RowCount" );
+ seq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowCount" ));
seq[0].Handle = -1;
seq[0].Type = getCppuType( static_cast< sal_Int32* >(0) );
seq[0].Attributes = beans::PropertyAttribute::READONLY;
- seq[1].Name = rtl::OUString::createFromAscii( "IsRowCountFinal" );
+ seq[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "IsRowCountFinal" ));
seq[1].Handle = -1;
seq[1].Type = getCppuType( static_cast< sal_Bool* >(0) );
seq[1].Attributes = beans::PropertyAttribute::READONLY;
@@ -532,8 +531,8 @@ void SAL_CALL ResultSetBase::setPropertyValue(
{
(void)aValue;
- if( aPropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) ||
- aPropertyName == rtl::OUString::createFromAscii( "RowCount" ) )
+ if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "IsRowCountFinal" )) ||
+ aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowCount" )) )
return;
throw beans::UnknownPropertyException();
@@ -546,13 +545,13 @@ uno::Any SAL_CALL ResultSetBase::getPropertyValue(
lang::WrappedTargetException,
uno::RuntimeException)
{
- if( PropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) )
+ if( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "IsRowCountFinal" )) )
{
uno::Any aAny;
aAny <<= m_bRowCountFinal;
return aAny;
}
- else if ( PropertyName == rtl::OUString::createFromAscii( "RowCount" ) )
+ else if ( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowCount" )) )
{
uno::Any aAny;
sal_Int32 count = m_aItems.size();
@@ -571,7 +570,7 @@ void SAL_CALL ResultSetBase::addPropertyChangeListener(
lang::WrappedTargetException,
uno::RuntimeException)
{
- if( aPropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) )
+ if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "IsRowCountFinal" )) )
{
osl::MutexGuard aGuard( m_aMutex );
if ( ! m_pIsFinalListeners )
@@ -580,7 +579,7 @@ void SAL_CALL ResultSetBase::addPropertyChangeListener(
m_pIsFinalListeners->addInterface( xListener );
}
- else if ( aPropertyName == rtl::OUString::createFromAscii( "RowCount" ) )
+ else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowCount" )) )
{
osl::MutexGuard aGuard( m_aMutex );
if ( ! m_pRowCountListeners )
@@ -600,13 +599,13 @@ void SAL_CALL ResultSetBase::removePropertyChangeListener(
lang::WrappedTargetException,
uno::RuntimeException)
{
- if( aPropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) &&
+ if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "IsRowCountFinal" )) &&
m_pIsFinalListeners )
{
osl::MutexGuard aGuard( m_aMutex );
m_pIsFinalListeners->removeInterface( aListener );
}
- else if ( aPropertyName == rtl::OUString::createFromAscii( "RowCount" ) &&
+ else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowCount" )) &&
m_pRowCountListeners )
{
osl::MutexGuard aGuard( m_aMutex );
@@ -654,3 +653,5 @@ ResultSetBase::getMetaData(
m_xMSF, m_sProperty );
return uno::Reference< sdbc::XResultSetMetaData >( p );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetbase.hxx b/xmlhelp/source/cxxhelp/provider/resultsetbase.hxx
index 9038ea95c8..32665e3f5c 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetbase.hxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -574,3 +575,5 @@ namespace chelp {
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetfactory.hxx b/xmlhelp/source/cxxhelp/provider/resultsetfactory.hxx
index 30879508ba..4eca33cc26 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetfactory.hxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetfactory.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef _RESULTSETFACTORY_HXX
#define _RESULTSETFACTORY_HXX
@@ -25,3 +26,5 @@ namespace chelp {
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
index 5e941a7664..664b646f9e 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,7 +90,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF
m_aURLParameter( aURLParameter )
{
Reference< XTransliteration > xTrans(
- xMSF->createInstance( rtl::OUString::createFromAscii( "com.sun.star.i18n.Transliteration" ) ),
+ xMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.Transliteration" )) ),
UNO_QUERY );
Locale aLocale( aURLParameter.get_language(),
rtl::OUString(),
@@ -100,7 +101,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF
// Access Lucene via XInvocation
Reference< script::XInvocation > xInvocation(
- xMSF->createInstance( rtl::OUString::createFromAscii( "com.sun.star.help.HelpSearch" ) ),
+ xMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.help.HelpSearch" )) ),
UNO_QUERY );
vector< vector< rtl::OUString > > queryList;
@@ -201,7 +202,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF
Sequence< sal_Int16 > aOutParamIndex;
Sequence< uno::Any > aOutParam;
- uno::Any aRet = xInvocation->invoke( rtl::OUString::createFromAscii( "search" ),
+ uno::Any aRet = xInvocation->invoke( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "search" )),
aParamsSeq, aOutParamIndex, aOutParam );
Sequence< float > aScoreSeq;
@@ -411,8 +412,8 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF
#endif
}
- sal_Int32 replIdx = rtl::OUString::createFromAscii( "#HLP#" ).getLength();
- rtl::OUString replWith = rtl::OUString::createFromAscii( "vnd.sun.star.help://" );
+ sal_Int32 replIdx = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "#HLP#" )).getLength();
+ rtl::OUString replWith = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.help://" ));
int nResultCount = aCompleteResultVector.size();
for( int r = 0 ; r < nResultCount ; ++r )
@@ -426,16 +427,16 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF
m_aIdents.resize( m_aPath.size() );
Command aCommand;
- aCommand.Name = rtl::OUString::createFromAscii( "getPropertyValues" );
+ aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ));
aCommand.Argument <<= m_sProperty;
for( m_nRow = 0; sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aPath.size(); ++m_nRow )
{
m_aPath[m_nRow] =
m_aPath[m_nRow] +
- rtl::OUString::createFromAscii( "?Language=" ) +
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "?Language=" )) +
m_aURLParameter.get_language() +
- rtl::OUString::createFromAscii( "&System=" ) +
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "&System=" )) +
m_aURLParameter.get_system();
uno::Reference< XContent > content = queryContent();
@@ -447,3 +448,5 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF
}
m_nRow = 0xffffffff;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.hxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.hxx
index 226c16524f..54a8227ddc 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.hxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,5 @@ namespace chelp {
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx
index e42a0448aa..46f292644c 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,17 +57,17 @@ ResultSetForRoot::ResultSetForRoot( const uno::Reference< lang::XMultiServiceFac
m_aIdents.resize( m_aPath.size() );
Command aCommand;
- aCommand.Name = rtl::OUString::createFromAscii( "getPropertyValues" );
+ aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ));
aCommand.Argument <<= m_sProperty;
for( sal_uInt32 i = 0; i < m_aPath.size(); ++i )
{
m_aPath[i] =
- rtl::OUString::createFromAscii( "vnd.sun.star.help://" ) +
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.help://" )) +
m_aPath[i] +
- rtl::OUString::createFromAscii( "?Language=" ) +
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "?Language=" )) +
m_aURLParameter.get_language() +
- rtl::OUString::createFromAscii( "&System=" ) +
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "&System=" )) +
m_aURLParameter.get_system();
m_nRow = sal_Int32( i );
@@ -80,3 +81,5 @@ ResultSetForRoot::ResultSetForRoot( const uno::Reference< lang::XMultiServiceFac
m_nRow = 0xffffffff;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforroot.hxx b/xmlhelp/source/cxxhelp/provider/resultsetforroot.hxx
index c7e694f202..7140c00121 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforroot.hxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforroot.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,5 @@ namespace chelp {
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/services.cxx b/xmlhelp/source/cxxhelp/provider/services.cxx
index 834638807b..e4beadfeb6 100644
--- a/xmlhelp/source/cxxhelp/provider/services.cxx
+++ b/xmlhelp/source/cxxhelp/provider/services.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,3 +76,4 @@ extern "C" void * SAL_CALL component_getFactory(
return pRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index 0082163a26..feaecefc7a 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,9 +36,7 @@
#endif
#include <string.h>
-#ifndef _VOS_DIAGNOSE_HXX_
-#include <vos/diagnose.hxx>
-#endif
+#include <osl/diagnose.hxx>
#include <osl/thread.h>
#include <rtl/memory.h>
#include <osl/file.hxx>
@@ -72,13 +71,13 @@ namespace chelp {
{
return ((ch >= 0x0030) && (ch <= 0x0039));
}
-
+
inline bool ascii_isLetter( sal_Unicode ch )
{
- return ( ( (ch >= 0x0041) && (ch <= 0x005A) ) ||
+ return ( ( (ch >= 0x0041) && (ch <= 0x005A) ) ||
( (ch >= 0x0061) && (ch <= 0x007A) ) );
}
-
+
inline bool isLetterOrDigit( sal_Unicode ch )
{
return ascii_isLetter( ch ) || ascii_isDigit( ch );
@@ -126,7 +125,7 @@ bool URLParameter::isErrorDocument()
rtl::OString URLParameter::getByName( const char* par )
{
rtl::OUString val;
-
+
if( strcmp( par,"Program" ) == 0 )
val = get_program();
else if( strcmp( par,"Database" ) == 0 )
@@ -143,7 +142,7 @@ rtl::OString URLParameter::getByName( const char* par )
val = get_system();
else if( strcmp( par,"HelpPrefix" ) == 0 )
val = get_prefix();
-
+
return rtl::OString( val.getStr(),val.getLength(),RTL_TEXTENCODING_UTF8 );
}
@@ -157,13 +156,13 @@ rtl::OUString URLParameter::get_id()
get_language() );
if( inf )
m_aId = inf->get_id();
-
+
m_bStart = true;
}
-
+
return m_aId;
}
-
+
rtl::OUString URLParameter::get_tag()
{
if( isFile() )
@@ -186,17 +185,17 @@ rtl::OUString URLParameter::get_title()
m_aTitle = inf->get_title();
}
else // This must be the root
- m_aTitle = rtl::OUString::createFromAscii("root");
-
+ m_aTitle = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("root"));
+
return m_aTitle;
}
-
+
rtl::OUString URLParameter::get_language()
{
if( m_aLanguage.getLength() == 0 )
return m_aDefaultLanguage;
-
+
return m_aLanguage;
}
@@ -213,7 +212,7 @@ rtl::OUString URLParameter::get_program()
}
return m_aProgram;
}
-
+
void URLParameter::init( bool bDefaultLanguageIsInitialized )
{
@@ -222,7 +221,7 @@ void URLParameter::init( bool bDefaultLanguageIsInitialized )
m_bBerkeleyRead = false;
m_bStart = false;
m_bUseDB = true;
- m_nHitCount = 100; // The default maximum hitcount
+ m_nHitCount = 100; // The default maximum hitcount
}
@@ -231,9 +230,9 @@ rtl::OUString URLParameter::get_the_tag()
if(m_bUseDB) {
if( ! m_bBerkeleyRead )
readBerkeley();
-
+
m_bBerkeleyRead = true;
-
+
return m_aTag;
}
else
@@ -248,14 +247,14 @@ rtl::OUString URLParameter::get_the_path()
if( ! m_bBerkeleyRead )
readBerkeley();
m_bBerkeleyRead = true;
-
+
return m_aPath;
}
else
return get_id();
}
-
+
rtl::OUString URLParameter::get_the_title()
{
@@ -263,7 +262,7 @@ rtl::OUString URLParameter::get_the_title()
if( ! m_bBerkeleyRead )
readBerkeley();
m_bBerkeleyRead = true;
-
+
return m_aTitle;
}
else
@@ -277,11 +276,11 @@ rtl::OUString URLParameter::get_the_jar()
if( ! m_bBerkeleyRead )
readBerkeley();
m_bBerkeleyRead = true;
-
+
return m_aJar;
}
else
- return get_module() + rtl::OUString::createFromAscii(".jar");
+ return get_module() + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".jar"));
}
@@ -289,7 +288,7 @@ rtl::OUString URLParameter::get_the_jar()
void URLParameter::readBerkeley()
{
- static rtl::OUString aQuestionMark( rtl::OUString::createFromAscii( "?" ) );
+ static rtl::OUString aQuestionMark(RTL_CONSTASCII_USTRINGPARAM("?"));
if( get_id().compareToAscii("") == 0 )
return;
@@ -314,7 +313,7 @@ void URLParameter::readBerkeley()
break;
rtl::OString keyStr( m_aId.getStr(),m_aId.getLength(),RTL_TEXTENCODING_UTF8 );
-
+
DBHelp* pDBHelp = db->getDBHelp();
if( pDBHelp != NULL )
{
@@ -373,60 +372,60 @@ class InputStreamTransformer
public XSeekable
{
public:
-
+
InputStreamTransformer( URLParameter* urlParam,
Databases* pDatatabases,
bool isRoot = false );
-
+
~InputStreamTransformer();
-
+
virtual Any SAL_CALL queryInterface( const Type& rType ) throw( RuntimeException );
virtual void SAL_CALL acquire( void ) throw();
virtual void SAL_CALL release( void ) throw();
- virtual sal_Int32 SAL_CALL readBytes( Sequence< sal_Int8 >& aData,sal_Int32 nBytesToRead )
+ virtual sal_Int32 SAL_CALL readBytes( Sequence< sal_Int8 >& aData,sal_Int32 nBytesToRead )
throw( NotConnectedException,
BufferSizeExceededException,
IOException,
RuntimeException);
-
+
virtual sal_Int32 SAL_CALL readSomeBytes( Sequence< sal_Int8 >& aData,sal_Int32 nMaxBytesToRead )
throw( NotConnectedException,
BufferSizeExceededException,
IOException,
RuntimeException);
-
+
virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) throw( NotConnectedException,
BufferSizeExceededException,
IOException,
RuntimeException );
-
+
virtual sal_Int32 SAL_CALL available( void ) throw( NotConnectedException,
IOException,
RuntimeException );
-
+
virtual void SAL_CALL closeInput( void ) throw( NotConnectedException,
IOException,
RuntimeException );
-
+
virtual void SAL_CALL seek( sal_Int64 location ) throw( IllegalArgumentException,
IOException,
RuntimeException );
-
+
virtual sal_Int64 SAL_CALL getPosition( void ) throw( IOException,RuntimeException );
-
+
virtual sal_Int64 SAL_CALL getLength( void ) throw( IOException,RuntimeException );
-
+
void addToBuffer( const char* buffer,int len );
sal_Int8* getData() const { return (sal_Int8*) buffer; }
sal_Int32 getLen() const { return sal_Int32( len ); }
-
+
private:
-
+
osl::Mutex m_aMutex;
-
+
int len,pos;
char *buffer;
};
@@ -446,14 +445,14 @@ void URLParameter::open( const Reference< XMultiServiceFactory >& rxSMgr,
if( ! xDataSink.is() )
return;
-
+
if( isPicture() )
{
Reference< XInputStream > xStream;
Reference< XHierarchicalNameAccess > xNA =
- m_pDatabases->jarFile( rtl::OUString::createFromAscii( "picture.jar" ),
+ m_pDatabases->jarFile( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "picture.jar" )),
get_language() );
-
+
rtl::OUString path = get_path();
if( xNA.is() )
{
@@ -490,7 +489,7 @@ void URLParameter::open( const Reference< XMultiServiceFactory >& rxSMgr,
}
else
{
- // a standard document or else an active help text, plug in the new input stream
+ // a standard document or else an active help text, plug in the new input stream
InputStreamTransformer* p = new InputStreamTransformer( this,m_pDatabases,isRoot() );
try
{
@@ -521,9 +520,9 @@ void URLParameter::open( const Reference< XMultiServiceFactory >& rxSMgr,
{
Reference< XInputStream > xStream;
Reference< XHierarchicalNameAccess > xNA =
- m_pDatabases->jarFile( rtl::OUString::createFromAscii( "picture.jar" ),
+ m_pDatabases->jarFile( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "picture.jar" )),
get_language() );
-
+
rtl::OUString path = get_path();
if( xNA.is() )
{
@@ -545,22 +544,20 @@ void URLParameter::open( const Reference< XMultiServiceFactory >& rxSMgr,
#endif
}
else
- // a standard document or else an active help text, plug in the new input stream
+ // a standard document or else an active help text, plug in the new input stream
xDataSink->setInputStream( new InputStreamTransformer( this,m_pDatabases,isRoot() ) );
}
-// #include <stdio.h>
-
void URLParameter::parse() throw( com::sun::star::ucb::IllegalIdentifierException )
{
// fprintf(stdout,"url send to xmlhelp: %s\n",(rtl::OUStringToOString(m_aURL,RTL_TEXTENCODING_UTF8).getStr()));
m_aExpr = m_aURL;
-
+
sal_Int32 lstIdx = m_aExpr.lastIndexOf( sal_Unicode( '#' ) );
if( lstIdx != -1 )
m_aExpr = m_aExpr.copy( 0,lstIdx );
-
+
if( ! scheme() ||
! name( module() ) ||
! query() ||
@@ -568,7 +565,7 @@ void URLParameter::parse() throw( com::sun::star::ucb::IllegalIdentifierExceptio
! m_aSystem.getLength() )
throw com::sun::star::ucb::IllegalIdentifierException();
}
-
+
bool URLParameter::scheme()
{
@@ -581,7 +578,7 @@ bool URLParameter::scheme()
if( aLastStr.compareToAscii( "DbPAR=" ) == 0 )
{
rtl::OUString aNewExpr = m_aExpr.copy( 0, 20 );
- rtl::OUString aSharedStr = rtl::OUString::createFromAscii( "shared" );
+ rtl::OUString aSharedStr(RTL_CONSTASCII_USTRINGPARAM("shared"));
aNewExpr += aSharedStr;
aNewExpr += m_aExpr.copy( 20 );
aNewExpr += aSharedStr;
@@ -600,14 +597,14 @@ bool URLParameter::scheme()
return false;
}
-
+
bool URLParameter::module()
{
sal_Int32 idx = 0,length = m_aExpr.getLength();
-
- while( idx < length && isLetterOrDigit( (m_aExpr.getStr())[idx] ) )
+
+ while( idx < length && isLetterOrDigit( (m_aExpr.getStr())[idx] ) )
++idx;
-
+
if( idx != 0 )
{
m_aModule = m_aExpr.copy( 0,idx );
@@ -617,24 +614,24 @@ bool URLParameter::module()
else
return false;
}
-
-
-
+
+
+
bool URLParameter::name( bool modulePresent )
{
// if modulepresent, a name may be present, but must not
sal_Int32 length = m_aExpr.getLength();
-
+
if( length != 0 && (m_aExpr.getStr())[0] == sal_Unicode( '/' ) )
{
sal_Int32 idx = 1;
while( idx < length && (m_aExpr.getStr())[idx] != '?' )
-// ( isLetterOrDigit( (m_aExpr.getStr())[idx] )
+// ( isLetterOrDigit( (m_aExpr.getStr())[idx] )
// || (m_aExpr.getStr())[idx] == '/'
// || (m_aExpr.getStr())[idx] == '.' ))
++idx;
-
+
if( idx != 1 && ! modulePresent )
return false;
else
@@ -643,28 +640,28 @@ bool URLParameter::name( bool modulePresent )
m_aExpr = m_aExpr.copy( idx );
}
}
-
+
// fprintf(stdout,"id %s\n",(rtl::OUStringToOString(m_aId,RTL_TEXTENCODING_UTF8).getStr()));
return true;
}
-
-
+
+
bool URLParameter::query()
{
rtl::OUString query_;
-
+
if( ! m_aExpr.getLength() )
return true;
else if( (m_aExpr.getStr())[0] == sal_Unicode( '?' ) )
query_ = m_aExpr.copy( 1 ).trim();
else
return false;
-
-
+
+
bool ret = true;
sal_Int32 delimIdx,equalIdx;
rtl::OUString parameter,value;
-
+
while( query_.getLength() != 0 )
{
delimIdx = query_.indexOf( sal_Unicode( '&' ) );
@@ -680,7 +677,7 @@ bool URLParameter::query()
value = query_.copy( equalIdx+1,delimIdx - equalIdx - 1 ).trim();
query_ = query_.copy( delimIdx+1 ).trim();
}
-
+
if( parameter.compareToAscii( "Language" ) == 0 )
m_aLanguage = value;
else if( parameter.compareToAscii( "Device" ) == 0 )
@@ -694,11 +691,11 @@ bool URLParameter::query()
else if( parameter.compareToAscii( "DbPAR" ) == 0 )
m_aDbPar = value;
else if( parameter.compareToAscii( "Query" ) == 0 )
- {
+ {
if( ! m_aQuery.getLength() )
m_aQuery = value;
else
- m_aQuery += ( rtl::OUString::createFromAscii( " " ) + value );
+ m_aQuery += ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " " )) + value );
}
else if( parameter.compareToAscii( "Scope" ) == 0 )
m_aScope = value;
@@ -716,12 +713,12 @@ bool URLParameter::query()
else
ret = false;
}
-
+
return ret;
}
struct UserData {
-
+
UserData( InputStreamTransformer* pTransformer,
URLParameter* pInitial,
Databases* pDatabases )
@@ -730,7 +727,7 @@ struct UserData {
m_pInitial( pInitial )
{
}
-
+
InputStreamTransformer* m_pTransformer;
Databases* m_pDatabases;
URLParameter* m_pInitial;
@@ -764,7 +761,7 @@ helpMatch(const char * URI) {
static void *
fileOpen(const char *URI) {
osl::File *pRet = new osl::File(rtl::OUString(URI, strlen(URI), RTL_TEXTENCODING_UTF8));
- pRet->open(OpenFlag_Read);
+ pRet->open(osl_File_OpenFlag_Read);
return pRet;
}
@@ -799,7 +796,7 @@ zipOpen(const char * /*URI*/) {
{
}
}
-
+
if( xInputStream.is() )
{
return new Reference<XInputStream>(xInputStream);
@@ -813,7 +810,7 @@ helpOpen(const char * URI) {
URLParameter urlpar( rtl::OUString::createFromAscii( URI ),
ugblData->m_pDatabases );
-
+
jar = urlpar.get_jar();
language = urlpar.get_language();
path = urlpar.get_path();
@@ -836,7 +833,7 @@ helpOpen(const char * URI) {
{
}
}
-
+
if( xInputStream.is() )
return new Reference<XInputStream>(xInputStream);
return 0;
@@ -905,7 +902,7 @@ extern "C" void StructuredXMLErrorFunction(void *userData, xmlErrorPtr error)
(void)error;
// Reset error handler
- xmlSetStructuredErrorFunc( NULL, NULL );
+ xmlSetStructuredErrorFunc( NULL, NULL );
}
*/
@@ -935,13 +932,13 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
else
{
UserData userData( this,urlParam,pDatabases );
-
+
// Uses the implementation detail, that rtl::OString::getStr returns a zero terminated character-array
-
+
const char* parameter[47];
rtl::OString parString[46];
int last = 0;
-
+
parString[last++] = "Program";
rtl::OString aPureProgramm( urlParam->getByName( "Program" ) );
parString[last++] = rtl::OString('\'') + aPureProgramm + rtl::OString('\'');
@@ -964,7 +961,7 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
pDatabases->getProductName().getLength(),
RTL_TEXTENCODING_UTF8 ) + rtl::OString('\'');
parString[last++] = "productversion";
- parString[last++] = rtl::OString('\'') +
+ parString[last++] = rtl::OString('\'') +
rtl::OString( pDatabases->getProductVersion().getStr(),
pDatabases->getProductVersion().getLength(),
RTL_TEXTENCODING_UTF8 ) + rtl::OString('\'');
@@ -973,7 +970,7 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
parString[last++] = rtl::OString('\'') + pDatabases->getImagesZipFileURL() + rtl::OString('\'');
parString[last++] = "hp";
parString[last++] = rtl::OString('\'') + urlParam->getByName( "HelpPrefix" ) + rtl::OString('\'');
-
+
if( parString[last-1].getLength() )
{
parString[last++] = "sm";
@@ -1000,7 +997,7 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
parString[last++] = "vendorshort";
parString[last++] = rtl::OString("''");
}
-
+
// Do we need to add extension path?
::rtl::OUString aExtensionPath;
rtl::OUString aJar = urlParam->get_jar();
@@ -1038,7 +1035,7 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
if( !xContext.is() )
{
throw RuntimeException(
- ::rtl::OUString::createFromAscii( "InputStreamTransformer::InputStreamTransformer(), no XComponentContext" ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "InputStreamTransformer::InputStreamTransformer(), no XComponentContext" )),
Reference< XInterface >() );
}
@@ -1061,10 +1058,10 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
for( int i = 0; i < last; ++i )
parameter[i] = parString[i].getStr();
parameter[last] = 0;
-
+
rtl::OUString xslURL = pDatabases->getInstallPathAsURL();
-
- rtl::OString xslURLascii(
+
+ rtl::OString xslURLascii(
xslURL.getStr(),
xslURL.getLength(),
RTL_TEXTENCODING_UTF8);
@@ -1076,9 +1073,9 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
xmlRegisterInputCallbacks(zipMatch, zipOpen, zipRead, uriClose);
xmlRegisterInputCallbacks(helpMatch, helpOpen, helpRead, uriClose);
xmlRegisterInputCallbacks(fileMatch, fileOpen, fileRead, fileClose);
- //xmlSetStructuredErrorFunc( NULL, (xmlStructuredErrorFunc)StructuredXMLErrorFunction );
+ //xmlSetStructuredErrorFunc( NULL, (xmlStructuredErrorFunc)StructuredXMLErrorFunction );
- xsltStylesheetPtr cur =
+ xsltStylesheetPtr cur =
xsltParseStylesheetFile((const xmlChar *)xslURLascii.getStr());
xmlDocPtr doc = xmlParseFile("vnd.sun.star.zip:/");
@@ -1113,7 +1110,7 @@ Any SAL_CALL InputStreamTransformer::queryInterface( const Type& rType ) throw(
Any aRet = ::cppu::queryInterface( rType,
SAL_STATIC_CAST( XInputStream*,this ),
SAL_STATIC_CAST( XSeekable*,this ) );
-
+
return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
}
@@ -1146,13 +1143,13 @@ sal_Int32 SAL_CALL InputStreamTransformer::readBytes( Sequence< sal_Int8 >& aDat
curr = nBytesToRead;
else
curr = available_;
-
+
if( 0 <= curr && aData.getLength() < curr )
- aData.realloc( curr );
-
+ aData.realloc( curr );
+
for( int k = 0; k < curr; ++k )
aData[k] = buffer[pos++];
-
+
return curr > 0 ? curr : 0;
}
@@ -1206,7 +1203,7 @@ void SAL_CALL InputStreamTransformer::seek( sal_Int64 location ) throw( IllegalA
throw IllegalArgumentException();
else
pos = sal::static_int_cast<sal_Int32>( location );
-
+
if( pos > len )
pos = len;
}
@@ -1225,7 +1222,7 @@ sal_Int64 SAL_CALL InputStreamTransformer::getPosition( void ) throw( IOExceptio
sal_Int64 SAL_CALL InputStreamTransformer::getLength( void ) throw( IOException,RuntimeException )
{
osl::MutexGuard aGuard( m_aMutex );
-
+
return len;
}
@@ -1233,7 +1230,7 @@ sal_Int64 SAL_CALL InputStreamTransformer::getLength( void ) throw( IOException,
void InputStreamTransformer::addToBuffer( const char* buffer_,int len_ )
{
osl::MutexGuard aGuard( m_aMutex );
-
+
char* tmp = buffer;
buffer = new char[ len+len_ ];
rtl_copyMemory( (void*)(buffer),(void*)(tmp),sal_uInt32( len ) );
@@ -1241,3 +1238,5 @@ void InputStreamTransformer::addToBuffer( const char* buffer_,int len_ )
delete[] tmp;
len += len_;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.hxx b/xmlhelp/source/cxxhelp/provider/urlparameter.hxx
index d9716f15fc..de6e5e1c1a 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.hxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -125,16 +126,16 @@ namespace chelp {
Databases* pDatabases )
throw( com::sun::star::ucb::IllegalIdentifierException );
- bool isPicture() { return m_aModule.compareToAscii("picture") == 0; }
- bool isActive() { return m_aActive.getLength() > 0 && m_aActive.compareToAscii( "true" ) == 0; }
- bool isQuery() { return m_aId.compareToAscii("") == 0 && m_aQuery.compareToAscii("") != 0; }
- bool isEntryForModule() { return m_aId.compareToAscii("start") == 0 || m_bStart; }
- bool isFile() { return m_aId.compareToAscii( "" ) != 0; }
- bool isModule() { return m_aId.compareToAscii("") == 0 && m_aModule.compareToAscii("") != 0; }
- bool isRoot() { return m_aModule.compareToAscii("") == 0; }
+ bool isPicture() const { return m_aModule.compareToAscii("picture") == 0; }
+ bool isActive() const { return m_aActive.getLength() > 0 && m_aActive.compareToAscii( "true" ) == 0; }
+ bool isQuery() const { return m_aId.compareToAscii("") == 0 && m_aQuery.compareToAscii("") != 0; }
+ bool isEntryForModule() const { return m_aId.compareToAscii("start") == 0 || m_bStart; }
+ bool isFile() const { return m_aId.compareToAscii( "" ) != 0; }
+ bool isModule() const { return m_aId.compareToAscii("") == 0 && m_aModule.compareToAscii("") != 0; }
+ bool isRoot() const { return m_aModule.compareToAscii("") == 0; }
bool isErrorDocument();
- rtl::OUString get_url() { return m_aURL; }
+ rtl::OUString get_url() const { return m_aURL; }
rtl::OUString get_id();
@@ -144,7 +145,7 @@ namespace chelp {
rtl::OUString get_path() { return get_the_path(); }
- rtl::OUString get_eid() { return m_aEid; }
+ rtl::OUString get_eid() const { return m_aEid; }
rtl::OUString get_title();
@@ -154,26 +155,29 @@ namespace chelp {
rtl::OUString get_module() { return m_aModule; }
- rtl::OUString get_dbpar() {
- if( m_aDbPar.getLength() ) return m_aDbPar;
- else return m_aModule;
+ rtl::OUString get_dbpar() const
+ {
+ if( m_aDbPar.getLength() )
+ return m_aDbPar;
+ else
+ return m_aModule;
}
- rtl::OUString get_prefix() { return m_aPrefix; }
+ rtl::OUString get_prefix() const { return m_aPrefix; }
rtl::OUString get_language();
- rtl::OUString get_device() { return m_aDevice; }
+ rtl::OUString get_device() const { return m_aDevice; }
rtl::OUString get_program();
- rtl::OUString get_query() { return m_aQuery; }
+ rtl::OUString get_query() const { return m_aQuery; }
- rtl::OUString get_scope() { return m_aScope; }
+ rtl::OUString get_scope() const { return m_aScope; }
- rtl::OUString get_system() { return m_aSystem; }
+ rtl::OUString get_system() const { return m_aSystem; }
- sal_Int32 get_hitCount() { return m_nHitCount; }
+ sal_Int32 get_hitCount() const { return m_nHitCount; }
rtl::OString getByName( const char* par );
@@ -256,3 +260,5 @@ namespace chelp {
} // end namespace chelp
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx b/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx
index 329a095995..9020e0e6fd 100644
--- a/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx
+++ b/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,5 @@ RoleFiller::~RoleFiller()
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/test/abidebug.hxx b/xmlhelp/source/cxxhelp/test/abidebug.hxx
index 7f0074aa0d..3f15ace9fc 100644
--- a/xmlhelp/source/cxxhelp/test/abidebug.hxx
+++ b/xmlhelp/source/cxxhelp/test/abidebug.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,3 +31,4 @@
#endif
ostream& operator<<( ostream& out,const rtl::OUString& bla );
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/test/searchdemo.cxx b/xmlhelp/source/cxxhelp/test/searchdemo.cxx
index ac72c4d147..1ed77376f9 100644
--- a/xmlhelp/source/cxxhelp/test/searchdemo.cxx
+++ b/xmlhelp/source/cxxhelp/test/searchdemo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,21 +78,21 @@ int main( int argc,char* argv[] )
try
{
- rtl::OUString installDir = rtl::OUString::createFromAscii( "//./e|/index/" );
+ rtl::OUString installDir(RTL_CONSTASCII_USTRINGPARAM("//./e|/index/"));
QueryProcessor queryProcessor( installDir );
std::vector<rtl::OUString> Query(2);
- Query[0] = rtl::OUString::createFromAscii( "text*" );
- Query[1] = rtl::OUString::createFromAscii( "abbildung" );
- rtl::OUString Scope = rtl::OUString::createFromAscii( "headingheading" );
+ Query[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "text*" ));
+ Query[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "abbildung" ));
+ rtl::OUString Scope = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "headingheading" ));
int HitCount = 40;
QueryStatement queryStatement( HitCount,Query,Scope );
queryResults = queryProcessor.processQuery( queryStatement );
rtl::OUString translations[2];
- translations[0] = rtl::OUString::createFromAscii( "#HLP#" );
- translations[1] = rtl::OUString::createFromAscii( "vnd.sun.star.help://" );
+ translations[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "#HLP#" ));
+ translations[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.help://" ));
PrefixTranslator* translator = PrefixTranslator::makePrefixTranslator( translations,2 );
@@ -115,3 +116,5 @@ int main( int argc,char* argv[] )
}
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/util/Decompressor.cxx b/xmlhelp/source/cxxhelp/util/Decompressor.cxx
index 3a16942608..8530131082 100644
--- a/xmlhelp/source/cxxhelp/util/Decompressor.cxx
+++ b/xmlhelp/source/cxxhelp/util/Decompressor.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,5 @@ sal_Int32 StreamDecompressor::getNextByte()
else
return -1;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx
index 10f508b745..02cc3aecc1 100644
--- a/xmlhelp/source/treeview/tvfactory.cxx
+++ b/xmlhelp/source/treeview/tvfactory.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -146,7 +147,7 @@ TVFactory::createInstance(
aAny <<= rtl::OUString();
Sequence< Any > seq( 1 );
seq[0] <<= PropertyValue(
- rtl::OUString::createFromAscii( "nodepath" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "nodepath" )),
-1,
aAny,
PropertyState_DIRECT_VALUE );
@@ -207,7 +208,7 @@ TVFactory::getAvailableServiceNames( )
throw( RuntimeException )
{
Sequence< rtl::OUString > seq( 1 );
- seq[0] = rtl::OUString::createFromAscii( "com.sun.star.ucb.HierarchyDataReadAccess" );
+ seq[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.HierarchyDataReadAccess" ));
return seq;
}
@@ -219,7 +220,7 @@ TVFactory::getAvailableServiceNames( )
rtl::OUString SAL_CALL
TVFactory::getImplementationName_static()
{
- return rtl::OUString::createFromAscii( "com.sun.star.help.TreeViewImpl" );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.help.TreeViewImpl" ));
}
@@ -227,8 +228,8 @@ Sequence< rtl::OUString > SAL_CALL
TVFactory::getSupportedServiceNames_static()
{
Sequence< rtl::OUString > seq( 2 );
- seq[0] = rtl::OUString::createFromAscii( "com.sun.star.help.TreeView" );
- seq[1] = rtl::OUString::createFromAscii( "com.sun.star.ucb.HiearchyDataSource" );
+ seq[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.help.TreeView" ));
+ seq[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.HiearchyDataSource" ));
return seq;
}
@@ -296,3 +297,5 @@ extern "C" void * SAL_CALL component_getFactory(
return pRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/treeview/tvfactory.hxx b/xmlhelp/source/treeview/tvfactory.hxx
index 9d9715bd50..4d46b0242c 100644
--- a/xmlhelp/source/treeview/tvfactory.hxx
+++ b/xmlhelp/source/treeview/tvfactory.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -136,3 +137,5 @@ namespace treeview {
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index 3942844285..45261fec9b 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <string.h>
#include <rtl/ustrbuf.hxx>
-#ifndef _VOS_DIAGNOSE_HXX_
-#include <vos/diagnose.hxx>
-#endif
+#include <osl/diagnose.h>
#include "tvread.hxx"
#include <expat.h>
#include <osl/file.hxx>
@@ -50,14 +49,14 @@
namespace treeview {
-
+
class TVDom
{
friend class TVChildTarget;
friend class TVRead;
-
+
public:
-
+
TVDom( TVDom* arent = 0 )
: kind( other ),
parent( arent ),
@@ -70,15 +69,15 @@ namespace treeview {
for( unsigned i = 0; i < childs.size(); ++i )
delete childs[i];
}
-
-
+
+
TVDom* newChild()
{
childs.push_back( new TVDom( this ) );
return childs.back();
}
-
-
+
+
TVDom* getParent() const
{
if( parent )
@@ -93,39 +92,39 @@ namespace treeview {
tree_leaf,
other
};
-
+
bool isLeaf() const { return kind == TVDom::tree_leaf; }
void setKind( Kind ind ) { kind = ind; }
Kind getKind( ) const { return kind; }
-
-
+
+
void setApplication( const char* appl )
{
application = rtl::OUString( (sal_Char*)(appl),
strlen( appl ),
RTL_TEXTENCODING_UTF8 );
}
-
+
void setTitle( const char* itle )
{
title += rtl::OUString( (sal_Char*)(itle),
strlen( itle ),
RTL_TEXTENCODING_UTF8 );
}
-
+
void setTitle( const XML_Char* itle,int len )
{
title += rtl::OUString( (sal_Char*)(itle),
len,
RTL_TEXTENCODING_UTF8 );
}
-
+
void setId( const char* d )
{
id = rtl::OUString( (sal_Char*)(d),
strlen( d ),
RTL_TEXTENCODING_UTF8 );
- }
+ }
void setAnchor( const char* nchor )
{
@@ -145,27 +144,27 @@ namespace treeview {
if ( len != 0 )
break;
}
-
+
rtl::OUStringBuffer strBuff( 22 + len + id.getLength() );
strBuff.appendAscii(
"vnd.sun.star.help://"
).append(id);
-
+
targetURL = strBuff.makeStringAndClear();
}
-
+
return targetURL;
}
-
+
private:
-
+
Kind kind;
rtl::OUString application;
rtl::OUString title;
rtl::OUString id;
rtl::OUString anchor;
rtl::OUString targetURL;
-
+
TVDom *parent;
std::vector< TVDom* > childs;
};
@@ -186,11 +185,11 @@ using namespace com::sun::star::deployment;
ConfigData::ConfigData()
- : prodName( rtl::OUString::createFromAscii( "%PRODUCTNAME" ) ),
- prodVersion( rtl::OUString::createFromAscii( "%PRODUCTVERSION" ) ),
- vendName( rtl::OUString::createFromAscii( "%VENDORNAME" ) ),
- vendVersion( rtl::OUString::createFromAscii( "%VENDORVERSION" ) ),
- vendShort( rtl::OUString::createFromAscii( "%VENDORSHORT" ) )
+ : prodName(RTL_CONSTASCII_USTRINGPARAM("%PRODUCTNAME")),
+ prodVersion(RTL_CONSTASCII_USTRINGPARAM("%PRODUCTVERSION")),
+ vendName(RTL_CONSTASCII_USTRINGPARAM("%VENDORNAME")),
+ vendVersion(RTL_CONSTASCII_USTRINGPARAM("%VENDORVERSION")),
+ vendShort(RTL_CONSTASCII_USTRINGPARAM("%VENDORSHORT"))
{
}
@@ -199,7 +198,7 @@ void SAL_CALL ConfigData::replaceName( rtl::OUString& oustring ) const
sal_Int32 idx = -1,k = 0,off;
bool cap = false;
rtl::OUStringBuffer aStrBuf( 0 );
-
+
while( ( idx = oustring.indexOf( sal_Unicode('%'),++idx ) ) != -1 )
{
if( oustring.indexOf( prodName,idx ) == idx )
@@ -214,7 +213,7 @@ void SAL_CALL ConfigData::replaceName( rtl::OUString& oustring ) const
off = VENDORSHORT;
else
off = -1;
-
+
if( off != -1 )
{
if( ! cap )
@@ -222,13 +221,13 @@ void SAL_CALL ConfigData::replaceName( rtl::OUString& oustring ) const
cap = true;
aStrBuf.ensureCapacity( 256 );
}
-
+
aStrBuf.append( &oustring.getStr()[k],idx - k );
aStrBuf.append( m_vReplacement[off] );
k = idx + m_vAdd[off];
}
}
-
+
if( cap )
{
if( k < oustring.getLength() )
@@ -274,7 +273,7 @@ TVBase::queryInterface(
SAL_STATIC_CAST( XHierarchicalNameAccess*, this ),
SAL_STATIC_CAST( XChangesNotifier*, this ),
SAL_STATIC_CAST( XComponent*, this ) );
-
+
return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
}
@@ -302,14 +301,14 @@ TVRead::TVRead( const ConfigData& configData,TVDom* tvDom )
{
if( ! tvDom )
return;
-
+
Title = tvDom->title;
configData.replaceName( Title );
if( tvDom->isLeaf() )
{
TargetURL = ( tvDom->getTargetURL() + configData.appendix );
if( tvDom->anchor.getLength() )
- TargetURL += ( rtl::OUString::createFromAscii( "#" ) +
+ TargetURL += ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "#" )) +
tvDom->anchor );
}
else
@@ -342,13 +341,13 @@ TVRead::getByName( const rtl::OUString& aName )
else if( aName.compareToAscii( "TargetURL" ) == 0 )
aAny <<= TargetURL;
else if( aName.compareToAscii( "Children" ) == 0 )
- {
+ {
cppu::OWeakObject* p = Children.get();
aAny <<= Reference< XInterface >( p );
}
else
found = false;
-
+
if( found )
return aAny;
@@ -363,10 +362,10 @@ TVRead::getElementNames( )
throw( RuntimeException )
{
Sequence< rtl::OUString > seq( 3 );
-
- seq[0] = rtl::OUString::createFromAscii( "Title" );
- seq[1] = rtl::OUString::createFromAscii( "TargetURL" );
- seq[2] = rtl::OUString::createFromAscii( "Children" );
+
+ seq[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Title" ));
+ seq[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "TargetURL" ));
+ seq[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Children" ));
return seq;
}
@@ -381,7 +380,7 @@ TVRead::hasByName( const rtl::OUString& aName )
aName.compareToAscii( "TargetURL" ) == 0 ||
aName.compareToAscii( "Children" ) == 0 )
return true;
-
+
return false;
}
@@ -395,11 +394,11 @@ TVRead::getByHierarchicalName( const rtl::OUString& aName )
{
sal_Int32 idx;
rtl::OUString name( aName );
-
+
if( ( idx = name.indexOf( sal_Unicode( '/' ) ) ) != -1 &&
name.copy( 0,idx ).compareToAscii( "Children" ) == 0 )
return Children->getByHierarchicalName( name.copy( 1 + idx ) );
-
+
return getByName( name );
}
@@ -412,11 +411,11 @@ TVRead::hasByHierarchicalName( const rtl::OUString& aName )
{
sal_Int32 idx;
rtl::OUString name( aName );
-
+
if( ( idx = name.indexOf( sal_Unicode( '/' ) ) ) != -1 &&
name.copy( 0,idx ).compareToAscii( "Children" ) == 0 )
return Children->hasByHierarchicalName( name.copy( 1 + idx ) );
-
+
return hasByName( name );
}
@@ -434,9 +433,9 @@ TVRead::hasByHierarchicalName( const rtl::OUString& aName )
extern "C" void start_handler(void *userData,
const XML_Char *name,
const XML_Char **atts)
-{
+{
TVDom::Kind kind;
-
+
if( strcmp( name,"help_section" ) == 0 ||
strcmp( name,"node" ) == 0 )
kind = TVDom::tree_node;
@@ -444,14 +443,14 @@ extern "C" void start_handler(void *userData,
kind = TVDom::tree_leaf;
else
return;
-
+
TVDom **tvDom = static_cast< TVDom** >( userData );
TVDom *p;
p = *tvDom;
*tvDom = p->newChild();
p = *tvDom;
-
+
p->setKind( kind );
while( *atts )
{
@@ -463,7 +462,7 @@ extern "C" void start_handler(void *userData,
p->setId( *(atts+1) );
else if( strcmp( *atts,"anchor" ) == 0 )
p->setAnchor( *(atts+1) );
-
+
atts+=2;
}
}
@@ -496,22 +495,22 @@ TVChildTarget::TVChildTarget( const ConfigData& configData,TVDom* tvDom )
for( unsigned i = 0; i < Elements.size(); ++i )
Elements[i] = new TVRead( configData,tvDom->childs[i] );
}
-
-
+
+
TVChildTarget::TVChildTarget( const Reference< XMultiServiceFactory >& xMSF )
-{
+{
ConfigData configData = init( xMSF );
if( ! configData.locale.getLength() ||
! configData.system.getLength() )
return;
-
+
sal_uInt64 ret,len = 0;
int j = configData.vFileURL.size();
-
+
TVDom tvDom;
TVDom* pTVDom = &tvDom;
@@ -520,10 +519,10 @@ TVChildTarget::TVChildTarget( const Reference< XMultiServiceFactory >& xMSF )
len = configData.vFileLen[--j];
char* s = new char[ int(len) ]; // the buffer to hold the installed files
osl::File aFile( configData.vFileURL[j] );
- aFile.open( OpenFlag_Read );
+ aFile.open( osl_File_OpenFlag_Read );
aFile.read( s,len,ret );
aFile.close();
-
+
XML_Parser parser = XML_ParserCreate( 0 );
XML_SetElementHandler( parser,
start_handler,
@@ -531,15 +530,15 @@ TVChildTarget::TVChildTarget( const Reference< XMultiServiceFactory >& xMSF )
XML_SetCharacterDataHandler( parser,
data_handler);
XML_SetUserData( parser,&pTVDom ); // does not return this
-
+
int parsed = XML_Parse( parser,s,int( len ),j==0 );
(void)parsed;
OSL_ENSURE( parsed, "TVChildTarget::TVChildTarget(): Tree file parsing failed" );
-
- XML_ParserFree( parser );
+
+ XML_ParserFree( parser );
delete[] s;
- }
-
+ }
+
// now TVDom holds the relevant information
Elements.resize( tvDom.childs.size() );
@@ -560,11 +559,11 @@ TVChildTarget::getByName( const rtl::OUString& aName )
WrappedTargetException,
RuntimeException )
{
- rtl::OUString num( aName.getStr()+2,aName.getLength()-4 );
+ rtl::OUString num( aName.getStr()+2,aName.getLength()-4 );
sal_Int32 idx = num.toInt32() - 1;
if( idx < 0 || Elements.size() <= sal_uInt32( idx ) )
throw NoSuchElementException();
-
+
Any aAny;
cppu::OWeakObject* p = Elements[idx].get();
aAny <<= Reference< XInterface >( p );
@@ -581,7 +580,7 @@ TVChildTarget::getElementNames( )
Sequence< rtl::OUString > seq( Elements.size() );
for( unsigned i = 0; i < Elements.size(); ++i )
seq[i] = rtl::OUString::valueOf( sal_Int32( 1+i ) );
-
+
return seq;
}
@@ -591,11 +590,11 @@ sal_Bool SAL_CALL
TVChildTarget::hasByName( const rtl::OUString& aName )
throw( RuntimeException )
{
- rtl::OUString num( aName.getStr()+2,aName.getLength()-4 );
+ rtl::OUString num( aName.getStr()+2,aName.getLength()-4 );
sal_Int32 idx = num.toInt32() - 1;
if( idx < 0 || Elements.size() <= sal_uInt32( idx ) )
return false;
-
+
return true;
}
@@ -610,15 +609,15 @@ TVChildTarget::getByHierarchicalName( const rtl::OUString& aName )
{
sal_Int32 idx;
rtl::OUString name( aName );
-
+
if( ( idx = name.indexOf( sal_Unicode( '/' ) ) ) != -1 )
{
- rtl::OUString num( name.getStr()+2,idx-4 );
+ rtl::OUString num( name.getStr()+2,idx-4 );
sal_Int32 pref = num.toInt32() - 1;
-
+
if( pref < 0 || Elements.size() <= sal_uInt32( pref ) )
throw NoSuchElementException();
-
+
return Elements[pref]->getByHierarchicalName( name.copy( 1 + idx ) );
}
else
@@ -633,14 +632,14 @@ TVChildTarget::hasByHierarchicalName( const rtl::OUString& aName )
{
sal_Int32 idx;
rtl::OUString name( aName );
-
+
if( ( idx = name.indexOf( sal_Unicode( '/' ) ) ) != -1 )
{
rtl::OUString num( name.getStr()+2,idx-4 );
- sal_Int32 pref = num.toInt32() - 1;
+ sal_Int32 pref = num.toInt32() - 1;
if( pref < 0 || Elements.size() <= sal_uInt32( pref ) )
return false;
-
+
return Elements[pref]->hasByHierarchicalName( name.copy( 1 + idx ) );
}
else
@@ -656,20 +655,20 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
{
ConfigData configData;
Reference< XMultiServiceFactory > sProvider( getConfiguration(xSMgr) );
-
+
/**********************************************************************/
/* reading Office.Common */
/**********************************************************************/
-
+
Reference< XHierarchicalNameAccess > xHierAccess( getHierAccess( sProvider,
"org.openoffice.Office.Common" ) );
- rtl::OUString system( getKey( xHierAccess,"Help/System" ) );
+ rtl::OUString system( getKey( xHierAccess,"Help/System" ) );
sal_Bool showBasic( getBooleanKey(xHierAccess,"Help/ShowBasic") );
rtl::OUString instPath( getKey( xHierAccess,"Path/Current/Help" ) );
if( ! instPath.getLength() )
// try to determine path from default
- instPath = rtl::OUString::createFromAscii( "$(instpath)/help" );
-
+ instPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "$(instpath)/help" ));
+
// replace anything like $(instpath);
subst( xSMgr,instPath );
@@ -677,10 +676,12 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
/* reading setup */
/**********************************************************************/
+ rtl::OUString productName;
+ ::utl::ConfigManager::GetDirectConfigProperty(::utl::ConfigManager::PRODUCTNAME) >>= productName;
+
xHierAccess = getHierAccess( sProvider,
"org.openoffice.Setup" );
-
- rtl::OUString productName( getKey( xHierAccess,"Product/ooName" ) );
+
rtl::OUString setupversion( getKey( xHierAccess,"Product/ooSetupVersion" ) );
rtl::OUString setupextension;
@@ -714,13 +715,13 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
setupextension );
rtl::OUString locale( getKey( xHierAccess,"L10N/ooLocale" ) );
-
+
// Determine fileurl from url and locale
rtl::OUString url;
osl::FileBase::RC errFile = osl::FileBase::getFileURLFromSystemPath( instPath,url );
if( errFile != osl::FileBase::E_None ) return configData;
if( url.lastIndexOf( sal_Unicode( '/' ) ) != url.getLength() - 1 )
- url += rtl::OUString::createFromAscii( "/" );
+ url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ));
rtl::OUString ret;
sal_Int32 idx;
osl::DirectoryItem aDirItem;
@@ -733,11 +734,11 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
ret = locale.copy( 0,idx );
else
{
- locale = rtl::OUString::createFromAscii( "en-US" );
- ret = rtl::OUString::createFromAscii("en");
+ locale = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "en-US" ));
+ ret = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en"));
}
url = url + ret;
-
+
// first of all, try do determine whether there are any *.tree files present
// Start with extensions to set them at the end of the list
@@ -758,7 +759,7 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
rtl::OUString aFileUrl, aFileName;
while( aDirectory.getNextItem( aDirItem ) == osl::FileBase::E_None &&
aDirItem.getFileStatus( aFileStatus ) == osl::FileBase::E_None &&
- aFileStatus.isValid( FileStatusMask_FileURL ) &&
+ aFileStatus.isValid( FileStatusMask_FileURL ) &&
aFileStatus.isValid( FileStatusMask_FileName ) )
{
aFileUrl = aFileStatus.getFileURL();
@@ -766,24 +767,30 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
idx_ = aFileName.lastIndexOf( sal_Unicode( '.' ) );
if( idx_ == -1 )
continue;
-
+
const sal_Unicode* str = aFileName.getStr();
-
- if( aFileName.getLength() == idx_ + 5 &&
- ( str[idx_ + 1] == 't' || str[idx_ + 1] == 'T' ) &&
+
+ if( aFileName.getLength() == idx_ + 5 &&
+ ( str[idx_ + 1] == 't' || str[idx_ + 1] == 'T' ) &&
( str[idx_ + 2] == 'r' || str[idx_ + 2] == 'R' ) &&
( str[idx_ + 3] == 'e' || str[idx_ + 3] == 'E' ) &&
( str[idx_ + 4] == 'e' || str[idx_ + 4] == 'E' ) )
{
OSL_ENSURE( aFileStatus.isValid( FileStatusMask_FileSize ),
- "invalid file size" );
-
+ "invalid file size" );
+
rtl::OUString baseName = aFileName.copy(0,idx_).toAsciiLowerCase();
if(! showBasic && baseName.compareToAscii("sbasic") == 0 )
continue;
-
- configData.vFileLen.push_back( aFileStatus.getFileSize() );
- configData.vFileURL.push_back( aFileUrl );
+ osl::File aFile( aFileUrl );
+ if( osl::FileBase::E_None == aFile.open( osl_File_OpenFlag_Read ) )
+ {
+ sal_uInt64 nSize;
+ aFile.getSize( nSize );
+ configData.vFileLen.push_back( aFileStatus.getFileSize() );
+ configData.vFileURL.push_back( aFileUrl );
+ aFile.close();
+ }
}
}
aDirectory.close();
@@ -799,14 +806,14 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
// m_vReplacement[2...4] (vendorName/-Version/-Short) are empty strings
configData.system = system;
- configData.locale = locale;
+ configData.locale = locale;
configData.appendix =
- rtl::OUString::createFromAscii( "?Language=" ) +
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "?Language=" )) +
configData.locale +
- rtl::OUString::createFromAscii( "&System=" ) +
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "&System=" )) +
configData.system +
- rtl::OUString::createFromAscii( "&UseDB=no" ) ;
-
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "&UseDB=no" )) ;
+
return configData;
}
@@ -827,7 +834,7 @@ TVChildTarget::getConfiguration(const Reference< XMultiServiceFactory >& m_xSMgr
try
{
rtl::OUString sProviderService =
- rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationProvider" );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" ));
sProvider =
Reference< XMultiServiceFactory >(
m_xSMgr->createInstance( sProviderService ),
@@ -838,7 +845,7 @@ TVChildTarget::getConfiguration(const Reference< XMultiServiceFactory >& m_xSMgr
OSL_ENSURE( sProvider.is(),"cant instantiate configuration" );
}
}
-
+
return sProvider;
}
@@ -849,18 +856,18 @@ TVChildTarget::getHierAccess( const Reference< XMultiServiceFactory >& sProvider
const char* file ) const
{
Reference< XHierarchicalNameAccess > xHierAccess;
-
+
if( sProvider.is() )
{
Sequence< Any > seq(1);
rtl::OUString sReaderService =
- rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationAccess" );
-
- seq[0] <<= rtl::OUString::createFromAscii( file );
-
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" ));
+
+ seq[0] <<= rtl::OUString::createFromAscii( file );
+
try
{
- xHierAccess =
+ xHierAccess =
Reference< XHierarchicalNameAccess >
( sProvider->createInstanceWithArguments( sReaderService,seq ),
UNO_QUERY );
@@ -869,7 +876,7 @@ TVChildTarget::getHierAccess( const Reference< XMultiServiceFactory >& sProvider
{
}
}
-
+
return xHierAccess;
}
@@ -931,7 +938,7 @@ void TVChildTarget::subst( const Reference< XMultiServiceFactory >& m_xSMgr,
{
xCfgMgr =
Reference< XConfigManager >(
- m_xSMgr->createInstance( rtl::OUString::createFromAscii( "com.sun.star.config.SpecialConfigManager" ) ),
+ m_xSMgr->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.config.SpecialConfigManager" )) ),
UNO_QUERY );
}
catch( const com::sun::star::uno::Exception& )
@@ -939,9 +946,9 @@ void TVChildTarget::subst( const Reference< XMultiServiceFactory >& m_xSMgr,
OSL_ENSURE( xCfgMgr.is()," cant instantiate the special config manager " );
}
}
-
+
OSL_ENSURE( xCfgMgr.is(), "specialconfigmanager not found\n" );
-
+
if( xCfgMgr.is() )
instpath = xCfgMgr->substituteVariables( instpath );
}
@@ -950,9 +957,9 @@ void TVChildTarget::subst( const Reference< XMultiServiceFactory >& m_xSMgr,
//===================================================================
// class ExtensionIteratorBase
-static rtl::OUString aSlash( rtl::OUString::createFromAscii( "/" ) );
-static rtl::OUString aHelpFilesBaseName( rtl::OUString::createFromAscii( "help" ) );
-static rtl::OUString aHelpMediaType( rtl::OUString::createFromAscii( "application/vnd.sun.star.help" ) );
+static rtl::OUString aSlash(RTL_CONSTASCII_USTRINGPARAM("/"));
+static rtl::OUString aHelpFilesBaseName(RTL_CONSTASCII_USTRINGPARAM("help"));
+static rtl::OUString aHelpMediaType(RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.help"));
ExtensionIteratorBase::ExtensionIteratorBase( const rtl::OUString& aLanguage )
: m_eState( USER_EXTENSIONS )
@@ -975,13 +982,13 @@ void ExtensionIteratorBase::init()
if( !m_xContext.is() )
{
throw RuntimeException(
- ::rtl::OUString::createFromAscii( "ExtensionIteratorBase::init(), no XComponentContext" ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ExtensionIteratorBase::init(), no XComponentContext" )),
Reference< XInterface >() );
}
Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager(), UNO_QUERY );
- m_xSFA = Reference< ucb::XSimpleFileAccess >(
- xSMgr->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ),
+ m_xSFA = Reference< ucb::XSimpleFileAccess >(
+ xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )),
m_xContext ), UNO_QUERY_THROW );
m_bUserPackagesLoaded = false;
@@ -1052,7 +1059,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextUserHelpPack
if( !m_bUserPackagesLoaded )
{
Reference< XPackageManager > xUserManager =
- thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString::createFromAscii("user") );
+ thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user")) );
m_aUserPackagesSeq = xUserManager->getDeployedPackages
( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
@@ -1067,7 +1074,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextUserHelpPack
{
const Reference< deployment::XPackage >* pUserPackages = m_aUserPackagesSeq.getConstArray();
Reference< deployment::XPackage > xPackage = pUserPackages[ m_iUserPackage++ ];
- VOS_ENSURE( xPackage.is(), "ExtensionIteratorBase::implGetNextUserHelpPackage(): Invalid package" );
+ OSL_ENSURE( xPackage.is(), "ExtensionIteratorBase::implGetNextUserHelpPackage(): Invalid package" );
xHelpPackage = implGetHelpPackageFromPackage( xPackage, o_xParentPackageBundle );
}
@@ -1082,7 +1089,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextSharedHelpPa
if( !m_bSharedPackagesLoaded )
{
Reference< XPackageManager > xSharedManager =
- thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString::createFromAscii("shared") );
+ thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("shared")) );
m_aSharedPackagesSeq = xSharedManager->getDeployedPackages
( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
@@ -1097,7 +1104,37 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextSharedHelpPa
{
const Reference< deployment::XPackage >* pSharedPackages = m_aSharedPackagesSeq.getConstArray();
Reference< deployment::XPackage > xPackage = pSharedPackages[ m_iSharedPackage++ ];
- VOS_ENSURE( xPackage.is(), "ExtensionIteratorBase::implGetNextSharedHelpPackage(): Invalid package" );
+ OSL_ENSURE( xPackage.is(), "ExtensionIteratorBase::implGetNextSharedHelpPackage(): Invalid package" );
+ xHelpPackage = implGetHelpPackageFromPackage( xPackage, o_xParentPackageBundle );
+ }
+
+ return xHelpPackage;
+}
+
+Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextBundledHelpPackage
+ ( Reference< deployment::XPackage >& o_xParentPackageBundle )
+{
+ Reference< deployment::XPackage > xHelpPackage;
+
+ if( !m_bBundledPackagesLoaded )
+ {
+ Reference< XPackageManager > xBundledManager =
+ thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bundled")) );
+ m_aBundledPackagesSeq = xBundledManager->getDeployedPackages
+ ( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
+
+ m_bBundledPackagesLoaded = true;
+ }
+
+ if( m_iBundledPackage == m_aBundledPackagesSeq.getLength() )
+ {
+ m_eState = END_REACHED;
+ }
+ else
+ {
+ const Reference< deployment::XPackage >* pBundledPackages = m_aBundledPackagesSeq.getConstArray();
+ Reference< deployment::XPackage > xPackage = pBundledPackages[ m_iBundledPackage++ ];
+ OSL_ENSURE( xPackage.is(), "ExtensionIteratorBase::implGetNextBundledHelpPackage(): Invalid package" );
xHelpPackage = implGetHelpPackageFromPackage( xPackage, o_xParentPackageBundle );
}
@@ -1237,18 +1274,18 @@ rtl::OUString TreeFileIterator::expandURL( const rtl::OUString& aURL )
Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager(), UNO_QUERY );
xFac = Reference< uri::XUriReferenceFactory >(
- xSMgr->createInstanceWithContext( rtl::OUString::createFromAscii(
- "com.sun.star.uri.UriReferenceFactory"), m_xContext ) , UNO_QUERY );
+ xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.uri.UriReferenceFactory")), m_xContext ) , UNO_QUERY );
if( !xFac.is() )
{
throw RuntimeException(
- ::rtl::OUString::createFromAscii( "Databases::expand(), could not instatiate UriReferenceFactory." ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Databases::expand(), could not instatiate UriReferenceFactory." )),
Reference< XInterface >() );
}
xMacroExpander = Reference< util::XMacroExpander >(
m_xContext->getValueByName(
- ::rtl::OUString::createFromAscii( "/singletons/com.sun.star.util.theMacroExpander" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.util.theMacroExpander" )) ),
UNO_QUERY_THROW );
}
@@ -1318,3 +1355,4 @@ rtl::OUString TreeFileIterator::implGetTreeFileFromPackage
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/treeview/tvread.hxx b/xmlhelp/source/treeview/tvread.hxx
index c0d2f51f33..16f28a589d 100644
--- a/xmlhelp/source/treeview/tvread.hxx
+++ b/xmlhelp/source/treeview/tvread.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -402,3 +403,5 @@ namespace treeview {
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */