From 61fabac7219fac5fd3681b8f7de126b4408dc4c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Barfurth?= Date: Thu, 11 Jul 2002 16:23:02 +0000 Subject: [PATCH] #98489# Corrections to updating and formatting --- configmgr/source/xml/basicparser.hxx | 15 +++++++-------- configmgr/source/xml/elementformatter.cxx | 6 +++--- configmgr/source/xml/layerwriter.cxx | 7 ++++--- configmgr/source/xml/layerwriter.hxx | 15 +++++++-------- configmgr/source/xml/valueformatter.cxx | 8 ++++---- 5 files changed, 25 insertions(+), 26 deletions(-) diff --git a/configmgr/source/xml/basicparser.hxx b/configmgr/source/xml/basicparser.hxx index 3c883c678e18..66e3b62147c0 100644 --- a/configmgr/source/xml/basicparser.hxx +++ b/configmgr/source/xml/basicparser.hxx @@ -2,9 +2,9 @@ * * $RCSfile: basicparser.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: jb $ $Date: 2002-07-03 14:07:19 $ + * last change: $Author: jb $ $Date: 2002-07-11 17:23:01 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,9 +65,13 @@ #ifndef CONFIGMGR_XML_ELEMENTPARSER_HXX #include "elementparser.hxx" #endif + #ifndef CONFIGMGR_UTILITY_HXX_ #include "utility.hxx" #endif +#ifndef CONFIGMGR_STACK_HXX_ +#include "stack.hxx" +#endif #ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_ #include @@ -77,11 +81,6 @@ #include #endif -#ifndef INCLUDED_STACK -#include -#define INCLUDED_STACK -#endif - namespace configmgr { // ----------------------------------------------------------------------------- @@ -106,7 +105,7 @@ namespace configmgr uno::Reference< uno::XInterface > m_xTypeConverter; uno::Reference< sax::XLocator > m_xLocator; ElementParser m_aDataParser; - std::stack< ElementInfo > m_aNodes; + Stack< ElementInfo > m_aNodes; uno::Type m_aValueType; ValueData * m_pValueData; sal_uInt16 m_nSkipLevels; diff --git a/configmgr/source/xml/elementformatter.cxx b/configmgr/source/xml/elementformatter.cxx index c47b3c0ea706..503c92cad835 100644 --- a/configmgr/source/xml/elementformatter.cxx +++ b/configmgr/source/xml/elementformatter.cxx @@ -2,9 +2,9 @@ * * $RCSfile: elementformatter.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: jb $ $Date: 2002-07-03 14:07:20 $ + * last change: $Author: jb $ $Date: 2002-07-11 17:23:01 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -205,7 +205,7 @@ void ElementFormatter::addOperation(Operation::Enum _eOp) switch (_eOp) { case Operation::none: break; - case Operation::modify: addAttribute(ATTR_OPERATION, static_cast(OPERATION_MODIFY)); break; + case Operation::modify: break ; //addAttribute(ATTR_OPERATION, static_cast(OPERATION_MODIFY)); break; case Operation::replace: addAttribute(ATTR_OPERATION, static_cast(OPERATION_REPLACE)); break; case Operation::remove: addAttribute(ATTR_OPERATION, static_cast(OPERATION_REMOVE)); break; diff --git a/configmgr/source/xml/layerwriter.cxx b/configmgr/source/xml/layerwriter.cxx index f33ae874671f..6993a5b271c9 100644 --- a/configmgr/source/xml/layerwriter.cxx +++ b/configmgr/source/xml/layerwriter.cxx @@ -2,9 +2,9 @@ * * $RCSfile: layerwriter.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: jb $ $Date: 2002-07-03 14:07:24 $ + * last change: $Author: jb $ $Date: 2002-07-11 17:23:01 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -306,7 +306,7 @@ void LayerWriter::raiseIllegalTypeException(sal_Char const * pMsg) bool LayerWriter::isInElement() const { - return m_aTagStack.empty(); + return !m_aTagStack.empty(); } // ----------------------------------------------------------------------------- @@ -334,6 +334,7 @@ void LayerWriter::startNode() { OUString sTag = m_aFormatter.getElementTag(); getWriteHandler()->startElement(sTag,m_aFormatter.getElementAttributes()); + getWriteHandler()->ignorableWhitespace(OUString()); m_aTagStack.push(sTag); } // ----------------------------------------------------------------------------- diff --git a/configmgr/source/xml/layerwriter.hxx b/configmgr/source/xml/layerwriter.hxx index 4535c0d2f883..c0ba23a1fc65 100644 --- a/configmgr/source/xml/layerwriter.hxx +++ b/configmgr/source/xml/layerwriter.hxx @@ -2,9 +2,9 @@ * * $RCSfile: layerwriter.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: jb $ $Date: 2002-07-03 14:07:25 $ + * last change: $Author: jb $ $Date: 2002-07-11 17:23:01 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,13 +70,12 @@ #include "elementformatter.hxx" #endif -#include - -#ifndef INCLUDED_STACK -#include -#define INCLUDED_STACK +#ifndef CONFIGMGR_STACK_HXX_ +#include "stack.hxx" #endif +#include + namespace configmgr { // ----------------------------------------------------------------------------- @@ -172,7 +171,7 @@ namespace configmgr void raiseMalformedDataException(sal_Char const * pMsg); void raiseIllegalTypeException(sal_Char const * pMsg); private: - typedef std::stack< OUString > TagStack; + typedef Stack< OUString > TagStack; uno::Reference< uno::XInterface > m_xTCV; TagStack m_aTagStack; ElementFormatter m_aFormatter; diff --git a/configmgr/source/xml/valueformatter.cxx b/configmgr/source/xml/valueformatter.cxx index d54c5115df34..b1eaab25ce8d 100644 --- a/configmgr/source/xml/valueformatter.cxx +++ b/configmgr/source/xml/valueformatter.cxx @@ -2,9 +2,9 @@ * * $RCSfile: valueformatter.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: jb $ $Date: 2002-05-28 15:42:24 $ + * last change: $Author: jb $ $Date: 2002-07-11 17:23:02 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -495,11 +495,11 @@ OUString ValueFormatter::getContent(TypeConverter const & _xTCV) const { if (this->isList()) { - aResult = formatSimpleValue(m_aValue, _xTCV); + aResult = formatSequenceValue(m_aValue, m_sSeparator, _xTCV); } else { - aResult = formatSequenceValue(m_aValue, m_sSeparator, _xTCV); + aResult = formatSimpleValue(m_aValue, _xTCV); } } catch (script::CannotConvertException& cce)