summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-03-19 12:21:02 +0000
committerOliver Bolte <obo@openoffice.org>2004-03-19 12:21:02 +0000
commitf2855525d69370d9db0003d8c7c472d5f47fceb9 (patch)
tree7b23b5402813dbbaac7f653489cdc294442d051e /stoc
parent43ca955591b44dab9c16b02fd1021411c98e503b (diff)
INTEGRATION: CWS sb15 (1.2.14); FILE MERGED
2004/02/25 16:01:01 sb 1.2.14.1: #i24436# Adapted to new XVndSunStarScriptUrlReference; changed stoc::uriproc::UriReference from a base class to an implementation helper class.
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/uriproc/UriReference.cxx47
1 files changed, 17 insertions, 30 deletions
diff --git a/stoc/source/uriproc/UriReference.cxx b/stoc/source/uriproc/UriReference.cxx
index fb89c9c78e3e..e8ef233e15e0 100644
--- a/stoc/source/uriproc/UriReference.cxx
+++ b/stoc/source/uriproc/UriReference.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: UriReference.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: kz $ $Date: 2004-01-19 18:28:25 $
+ * last change: $Author: obo $ $Date: 2004-03-19 13:21:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,6 +66,7 @@
#include "rtl/string.h"
#include "rtl/ustrbuf.hxx"
#include "rtl/ustring.hxx"
+#include "sal/types.h"
namespace css = com::sun::star;
using stoc::uriproc::UriReference;
@@ -74,12 +75,24 @@ UriReference::UriReference(
rtl::OUString const & scheme, bool isHierarchical, bool hasAuthority,
rtl::OUString const & authority, rtl::OUString const & path,
bool hasQuery, rtl::OUString const & query):
+ m_scheme(scheme),
+ m_authority(authority),
+ m_path(path),
+ m_query(query),
+ m_isHierarchical(isHierarchical),
+ m_hasAuthority(hasAuthority),
+ m_hasQuery(hasQuery),
m_hasFragment(false)
{
- initialize(scheme, isHierarchical, hasAuthority, authority, path, hasQuery,
- query);
+ OSL_ASSERT(scheme.getLength() != 0 || isHierarchical);
+ OSL_ASSERT(!hasAuthority || isHierarchical);
+ OSL_ASSERT(authority.getLength() == 0 || hasAuthority);
+ OSL_ASSERT(!hasQuery || isHierarchical);
+ OSL_ASSERT(query.getLength() == 0 || hasQuery);
}
+UriReference::~UriReference() {}
+
rtl::OUString UriReference::getUriReference() throw (css::uno::RuntimeException)
{
osl::MutexGuard g(m_mutex);
@@ -210,32 +223,6 @@ void UriReference::clearFragment() throw (css::uno::RuntimeException) {
m_fragment = rtl::OUString();
}
-UriReference::UriReference():
- m_isHierarchical(true), m_hasAuthority(false), m_hasQuery(false),
- m_hasFragment(false)
-{}
-
-UriReference::~UriReference() {}
-
-void UriReference::initialize(
- rtl::OUString const & scheme, bool isHierarchical, bool hasAuthority,
- rtl::OUString const & authority, rtl::OUString const & path,
- bool hasQuery, rtl::OUString const & query)
-{
- OSL_ASSERT(scheme.getLength() != 0 || isHierarchical);
- OSL_ASSERT(!hasAuthority || isHierarchical);
- OSL_ASSERT(authority.getLength() == 0 || hasAuthority);
- OSL_ASSERT(!hasQuery || isHierarchical);
- OSL_ASSERT(query.getLength() == 0 || hasQuery);
- m_scheme = scheme;
- m_isHierarchical = isHierarchical;
- m_hasAuthority = hasAuthority;
- m_authority = authority;
- m_path = path;
- m_hasQuery = hasQuery;
- m_query = query;
-}
-
void UriReference::appendSchemeSpecificPart(rtl::OUStringBuffer & buffer) const
{
if (m_hasAuthority) {