diff options
author | Caolán McNamara <cmc@openoffice.org> | 2010-05-20 13:11:17 +0100 |
---|---|---|
committer | Caolán McNamara <cmc@openoffice.org> | 2010-05-20 13:11:17 +0100 |
commit | dec4aed0fc56b80333a0755e8c1cae17f1762fe7 (patch) | |
tree | c40890dda9c35d69d1aa36b70cad1538c959ecf3 | |
parent | 470b4aebe45519035088301bb8ed9783de493ad4 (diff) | |
parent | ff494dca2e13bfb2cc35b7d65a178e6093af9842 (diff) |
cmcfixes75: merge with DEV300 m78
156 files changed, 3613 insertions, 4414 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 213cd8b883..e4b4942d94 100644..100755 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -54,6 +54,7 @@ #include "sb.hrc" #include <basrid.hxx> #include <vos/mutex.hxx> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> // #pragma SW_SEGMENT_CLASS( SBASIC, SBASIC_CODE ) @@ -63,18 +64,43 @@ TYPEINIT1(StarBASIC,SbxObject) #define RTLNAME "@SBRTL" // i#i68894# +using com::sun::star::uno::Reference; +using com::sun::star::uno::Any; +using com::sun::star::uno::UNO_QUERY; +using com::sun::star::lang::XMultiServiceFactory; + +const static String aThisComponent( RTL_CONSTASCII_USTRINGPARAM("ThisComponent") ); +const static String aVBAHook( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobals" ) ); SbxObject* StarBASIC::getVBAGlobals( ) { if ( !pVBAGlobals ) - pVBAGlobals = (SbUnoObject*)Find( String(RTL_CONSTASCII_USTRINGPARAM("VBAGlobals")), SbxCLASS_DONTCARE ); + { + Any aThisDoc; + if ( GetUNOConstant("ThisComponent", aThisDoc) ) + { + Reference< XMultiServiceFactory > xDocFac( aThisDoc, UNO_QUERY ); + if ( xDocFac.is() ) + { + try + { + xDocFac->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) ); + } + catch( Exception& ) + { + // Ignore + } + } + } + pVBAGlobals = (SbUnoObject*)Find( aVBAHook , SbxCLASS_DONTCARE ); + } return pVBAGlobals; } // i#i68894# SbxVariable* StarBASIC::VBAFind( const String& rName, SbxClassType t ) { - if( rName.EqualsAscii("ThisComponent") ) + if( rName == aThisComponent ) return NULL; // rename to init globals if ( getVBAGlobals( ) ) diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index cebf92c58a..1d5fc7086d 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -139,16 +139,19 @@ bool SbUnoObject::getDefaultPropName( SbUnoObject* pUnoObj, String& sDfltProp ) SbxVariable* getDefaultProp( SbxVariable* pRef ) { SbxVariable* pDefaultProp = NULL; - SbxObject* pObj = PTR_CAST(SbxObject,(SbxVariable*) pRef); - if ( !pObj ) + if ( pRef->GetType() == SbxOBJECT ) { - SbxBase* pObjVarObj = pRef->GetObject(); - pObj = PTR_CAST(SbxObject,pObjVarObj); - } - if ( pObj && pObj->ISA(SbUnoObject) ) - { - SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,(SbxObject*)pObj); - pDefaultProp = pUnoObj->GetDfltProperty(); + SbxObject* pObj = PTR_CAST(SbxObject,(SbxVariable*) pRef); + if ( !pObj ) + { + SbxBase* pObjVarObj = pRef->GetObject(); + pObj = PTR_CAST(SbxObject,pObjVarObj); + } + if ( pObj && pObj->ISA(SbUnoObject) ) + { + SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,(SbxObject*)pObj); + pDefaultProp = pUnoObj->GetDfltProperty(); + } } return pDefaultProp; } @@ -1601,6 +1604,23 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj, break; } ::rtl::OUString sClassName = xClass->getName(); + if ( sClassName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.oleautomation.XAutomationObject" ) ) ) ) + { + // there is a hack in the extensions/source/ole/oleobj.cxx to return the typename of the automation object, lets check if it + // matches + Reference< XInvocation > xInv( aToInspectObj, UNO_QUERY ); + if ( xInv.is() ) + { + rtl::OUString sTypeName; + xInv->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("$GetTypeName") ) ) >>= sTypeName; + if ( sTypeName.getLength() == 0 || sTypeName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IDispatch") ) ) ) + // can't check type, leave it pass + result = true; + else + result = sTypeName.equals( aClass ); + } + break; // finished checking automation object + } OSL_TRACE("Checking if object implements %s", OUStringToOString( defaultNameSpace + aClass, RTL_TEXTENCODING_UTF8 ).getStr() ); diff --git a/basic/source/runtime/makefile.mk b/basic/source/runtime/makefile.mk index c0b4bd3bdc..9bd197975e 100644 --- a/basic/source/runtime/makefile.mk +++ b/basic/source/runtime/makefile.mk @@ -82,8 +82,5 @@ EXCEPTIONSFILES=$(SLO)$/step0.obj \ $(SLO)$/%.obj: %.s #kendy: Cut'n'paste from bridges/source/cpp_uno/mingw_intel/makefile.mk -#cmc: Ideally --noexecstack would be in operations, but with #i51385# pyuno -#remote bridgeing breaks -# $(CC) -Wa,--noexecstack -c -o $(SLO)$/$(@:b).o $< $(CC) -c -o $(SLO)$/$(@:b).obj $< touch $@ diff --git a/configmgr/inc/configmgr/update.hxx b/configmgr/inc/configmgr/update.hxx index b27a324874..3a15295934 100644 --- a/configmgr/inc/configmgr/update.hxx +++ b/configmgr/inc/configmgr/update.hxx @@ -30,6 +30,8 @@ #include "sal/config.h" +#include <set> + #include "configmgr/detail/configmgrdllapi.hxx" namespace rtl { class OUString; } @@ -44,6 +46,11 @@ OOO_DLLPUBLIC_CONFIGMGR void insertExtensionXcsFile( OOO_DLLPUBLIC_CONFIGMGR void insertExtensionXcuFile( bool shared, rtl::OUString const & fileUri); +OOO_DLLPUBLIC_CONFIGMGR void insertModificationXcuFile( + rtl::OUString const & fileUri, + std::set< rtl::OUString > const & includedPaths, + std::set< rtl::OUString > const & excludedPaths); + } } diff --git a/configmgr/source/README b/configmgr/source/README index 6d19a3b786..b731043d34 100644 --- a/configmgr/source/README +++ b/configmgr/source/README @@ -76,6 +76,7 @@ update.cxx data.cxx lock.cxx nodemap.cxx +partial.cxx path.hxx type.cxx Utilities. diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx index 51a1a6547d..6d97971e1a 100644 --- a/configmgr/source/components.cxx +++ b/configmgr/source/components.cxx @@ -46,6 +46,7 @@ #include "osl/diagnose.h" #include "osl/file.hxx" #include "rtl/bootstrap.hxx" +#include "rtl/logfile.h" #include "rtl/ref.hxx" #include "rtl/string.h" #include "rtl/textenc.h" @@ -58,6 +59,7 @@ #include "modifications.hxx" #include "node.hxx" #include "parsemanager.hxx" +#include "partial.hxx" #include "rootaccess.hxx" #include "writemodfile.hxx" #include "xcdparser.hxx" @@ -82,26 +84,29 @@ struct UnresolvedListItem { typedef std::list< UnresolvedListItem > UnresolvedList; -void parseXcsFile(rtl::OUString const & url, int layer, Data * data, +void parseXcsFile( + rtl::OUString const & url, int layer, Data & data, Partial const * partial, Modifications * modifications) SAL_THROW(( css::container::NoSuchElementException, css::uno::RuntimeException)) { - OSL_ASSERT(modifications == 0); (void) modifications; + OSL_ASSERT(partial == 0 && modifications == 0); + (void) partial; (void) modifications; OSL_VERIFY( rtl::Reference< ParseManager >( new ParseManager(url, new XcsParser(layer, data)))->parse()); } void parseXcuFile( - rtl::OUString const & url, int layer, Data * data, + rtl::OUString const & url, int layer, Data & data, Partial const * partial, Modifications * modifications) SAL_THROW(( css::container::NoSuchElementException, css::uno::RuntimeException)) { OSL_VERIFY( rtl::Reference< ParseManager >( - new ParseManager(url, new XcuParser(layer, data, modifications)))-> + new ParseManager( + url, new XcuParser(layer, data, partial, modifications)))-> parse()); } @@ -112,7 +117,7 @@ rtl::OUString expand(rtl::OUString const & str) { } static bool singletonCreated = false; -static Components * singleton; // leaks +static Components * singleton = 0; } @@ -122,7 +127,8 @@ void Components::initSingleton( OSL_ASSERT(context.is()); if (!singletonCreated) { singletonCreated = true; - singleton = new Components(context); + static Components theSingleton(context); + singleton = &theSingleton; } } @@ -211,7 +217,7 @@ void Components::insertExtensionXcsFile( bool shared, rtl::OUString const & fileUri) { try { - parseXcsFile(fileUri, shared ? 9 : 13, &data_, 0); + parseXcsFile(fileUri, shared ? 9 : 13, data_, 0, 0); } catch (css::container::NoSuchElementException & e) { throw css::uno::RuntimeException( (rtl::OUString( @@ -227,7 +233,7 @@ void Components::insertExtensionXcuFile( { OSL_ASSERT(modifications != 0); try { - parseXcuFile(fileUri, shared ? 10 : 14, &data_, modifications); + parseXcuFile(fileUri, shared ? 10 : 14, data_, 0, modifications); } catch (css::container::NoSuchElementException & e) { throw css::uno::RuntimeException( (rtl::OUString( @@ -238,6 +244,24 @@ void Components::insertExtensionXcuFile( } } +void Components::insertModificationXcuFile( + rtl::OUString const & fileUri, + std::set< rtl::OUString > const & includedPaths, + std::set< rtl::OUString > const & excludedPaths, + Modifications * modifications) +{ + OSL_ASSERT(modifications != 0); + try { + Partial part(includedPaths, excludedPaths); + parseXcuFile(fileUri, Data::NO_LAYER, data_, &part, modifications); + } catch (css::uno::Exception & e) { //TODO: more specific exception catching + OSL_TRACE( + "configmgr error inserting %s: %s", + rtl::OUStringToOString(fileUri, RTL_TEXTENCODING_UTF8).getStr(), + rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr()); + } +} + css::beans::Optional< css::uno::Any > Components::getExternalValue( rtl::OUString const & descriptor) { @@ -315,7 +339,7 @@ Components::Components( context_(context) { OSL_ASSERT(context.is()); -/*SB*/try{ + RTL_LOGFILE_TRACE_AUTHOR("configmgr", "sb", "begin parsing"); parseXcsXcuLayer( 0, expand( @@ -380,24 +404,22 @@ Components::Components( ":UNO_USER_PACKAGES_CACHE}/registry/" "com.sun.star.comp.deployment.configuration." "PackageRegistryBackend/configmgr.ini")))); -/*SB*/}catch(css::uno::Exception&e){fprintf(stderr,"caught <%s>\n",rtl::OUStringToOString(e.Message,RTL_TEXTENCODING_UTF8).getStr());throw;} try { parseModificationLayer(); } catch (css::uno::Exception & e) { //TODO: more specific exception catching - // Silently ignore unreadable parts of a corrupted - // registrymodifications.xcu file, instead of completely preventing OOo - // from starting: + // Silently ignore unreadable parts of a corrupted user modification + // layer, instead of completely preventing OOo from starting: OSL_TRACE( "configmgr error reading user modification layer: %s", rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr()); } + RTL_LOGFILE_TRACE_AUTHOR("configmgr", "sb", "end parsing"); } Components::~Components() {} void Components::parseFiles( - int layer, rtl::OUString const & extension, - void (* parseFile)(rtl::OUString const &, int, Data *, Modifications *), + int layer, rtl::OUString const & extension, FileParser * parseFile, rtl::OUString const & url, bool recursive) { osl::Directory dir(url); @@ -447,7 +469,7 @@ void Components::parseFiles( file.match(extension, file.getLength() - extension.getLength())) { try { - (*parseFile)(stat.getFileURL(), layer, &data_, 0); + (*parseFile)(stat.getFileURL(), layer, data_, 0, 0); } catch (css::container::NoSuchElementException & e) { throw css::uno::RuntimeException( (rtl::OUString( @@ -462,16 +484,15 @@ void Components::parseFiles( } void Components::parseFileList( - int layer, - void (* parseFile)(rtl::OUString const &, int, Data *, Modifications *), - rtl::OUString const & urls, rtl::Bootstrap const & ini) + int layer, FileParser * parseFile, rtl::OUString const & urls, + rtl::Bootstrap const & ini) { for (sal_Int32 i = 0;;) { rtl::OUString url(urls.getToken(0, ' ', i)); if (url.getLength() != 0) { ini.expandMacrosFrom(url); //TODO: detect failure try { - (*parseFile)(url, layer, &data_, 0); + (*parseFile)(url, layer, data_, 0, 0); } catch (css::container::NoSuchElementException & e) { throw css::uno::RuntimeException( (rtl::OUString( @@ -539,7 +560,7 @@ void Components::parseXcdFiles(int layer, rtl::OUString const & url) { rtl::Reference< ParseManager > manager; try { manager = new ParseManager( - stat.getFileURL(), new XcdParser(layer, deps, &data_)); + stat.getFileURL(), new XcdParser(layer, deps, data_)); } catch (css::container::NoSuchElementException & e) { throw css::uno::RuntimeException( (rtl::OUString( @@ -630,7 +651,7 @@ rtl::OUString Components::getModificationFileUrl() const { void Components::parseModificationLayer() { try { - parseXcuFile(getModificationFileUrl(), Data::NO_LAYER, &data_, 0); + parseXcuFile(getModificationFileUrl(), Data::NO_LAYER, data_, 0, 0); } catch (css::container::NoSuchElementException &) { OSL_TRACE( "configmgr user registrymodifications.xcu does not (yet) exist"); diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx index 8523b02cbb..a78ed32596 100644 --- a/configmgr/source/components.hxx +++ b/configmgr/source/components.hxx @@ -58,6 +58,7 @@ namespace configmgr { class Broadcaster; class Modifications; class Node; +class Partial; class RootAccess; class Components: private boost::noncopyable { @@ -96,10 +97,19 @@ public: bool shared, rtl::OUString const & fileUri, Modifications * modifications); + void insertModificationXcuFile( + rtl::OUString const & fileUri, + std::set< rtl::OUString > const & includedPaths, + std::set< rtl::OUString > const & excludedPaths, + Modifications * modifications); + com::sun::star::beans::Optional< com::sun::star::uno::Any > getExternalValue(rtl::OUString const & descriptor); private: + typedef void FileParser( + rtl::OUString const &, int, Data &, Partial const *, Modifications *); + Components( com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const & context); @@ -107,14 +117,12 @@ private: ~Components(); void parseFiles( - int layer, rtl::OUString const & extension, - void (* parseFile)(rtl::OUString const &, int, Data *, Modifications *), + int layer, rtl::OUString const & extension, FileParser * parseFile, rtl::OUString const & url, bool recursive); void parseFileList( - int layer, - void (* parseFile)(rtl::OUString const &, int, Data *, Modifications *), - rtl::OUString const & urls, rtl::Bootstrap const & ini); + int layer, FileParser * parseFile, rtl::OUString const & urls, + rtl::Bootstrap const & ini); void parseXcdFiles(int layer, rtl::OUString const & url); diff --git a/configmgr/source/makefile.mk b/configmgr/source/makefile.mk index d6972e12b9..317e08bdf4 100644 --- a/configmgr/source/makefile.mk +++ b/configmgr/source/makefile.mk @@ -54,6 +54,7 @@ SLOFILES = \ $(SLO)/nodemap.obj \ $(SLO)/pad.obj \ $(SLO)/parsemanager.obj \ + $(SLO)/partial.obj \ $(SLO)/propertynode.obj \ $(SLO)/rootaccess.obj \ $(SLO)/services.obj \ diff --git a/configmgr/source/partial.cxx b/configmgr/source/partial.cxx new file mode 100644 index 0000000000..4c9189ed05 --- /dev/null +++ b/configmgr/source/partial.cxx @@ -0,0 +1,137 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "precompiled_configmgr.hxx" +#include "sal/config.h" + +#include <map> +#include <set> + +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "osl/diagnose.h" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#include "data.hxx" +#include "partial.hxx" + +namespace configmgr { + +namespace { + +namespace css = com::sun::star; + +bool parseSegment( + rtl::OUString const & path, sal_Int32 * index, rtl::OUString * segment) +{ + OSL_ASSERT( + index != 0 && *index >= 0 && *index <= path.getLength() && + segment != 0); + if (path[(*index)++] == '/') { + rtl::OUString name; + bool setElement; + rtl::OUString templateName; + *index = Data::parseSegment( + path, *index, &name, &setElement, &templateName); + if (*index != -1) { + *segment = Data::createSegment(templateName, name); + return *index == path.getLength(); + } + } + throw css::uno::RuntimeException( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bad path ")) + path, + css::uno::Reference< css::uno::XInterface >()); +} + +} + +Partial::Partial( + std::set< rtl::OUString > const & includedPaths, + std::set< rtl::OUString > const & excludedPaths) +{ + for (std::set< rtl::OUString >::const_iterator i(includedPaths.begin()); + i != includedPaths.end(); ++i) + { + sal_Int32 n = 0; + for (Node * p = &root_;;) { + rtl::OUString seg; + bool end = parseSegment(*i, &n, &seg); + p = &p->children[seg]; + if (p->startInclude) { + break; + } + if (end) { + p->children.clear(); + p->startInclude = true; + break; + } + } + } + for (std::set< rtl::OUString >::const_iterator i(excludedPaths.begin()); + i != excludedPaths.end(); ++i) + { + sal_Int32 n = 0; + for (Node * p = &root_;;) { + rtl::OUString seg; + bool end = parseSegment(*i, &n, &seg); + if (end) { + p->children[seg] = Node(); + break; + } + Node::Children::iterator j(p->children.find(seg)); + if (j == p->children.end()) { + break; + } + p = &j->second; + } + } +} + +Partial::~Partial() {} + +Partial::Containment Partial::contains(Path const & path) const { + //TODO: For set elements, the segment names recorded in the node tree need + // not match the corresponding path segments, so this function can fail. + Node const * p = &root_; + bool includes = false; + for (Path::const_iterator i(path.begin()); i != path.end(); ++i) { + Node::Children::const_iterator j(p->children.find(*i)); + if (j == p->children.end()) { + break; + } + p = &j->second; + includes |= p->startInclude; + } + return p->children.empty() && !p->startInclude + ? CONTAINS_NOT + : includes ? CONTAINS_NODE : CONTAINS_SUBNODES; +} + +} diff --git a/configmgr/source/partial.hxx b/configmgr/source/partial.hxx new file mode 100644 index 0000000000..39931448c6 --- /dev/null +++ b/configmgr/source/partial.hxx @@ -0,0 +1,71 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_CONFIGMGR_SOURCE_PARTIAL_HXX +#define INCLUDED_CONFIGMGR_SOURCE_PARTIAL_HXX + +#include "sal/config.h" + +#include <map> +#include <set> + +#include "boost/noncopyable.hpp" + +#include "path.hxx" + +namespace rtl { class OUString; } + +namespace configmgr { + +class Partial: private boost::noncopyable { +public: + enum Containment { CONTAINS_NOT, CONTAINS_SUBNODES, CONTAINS_NODE }; + + Partial( + std::set< rtl::OUString > const & includedPaths, + std::set< rtl::OUString > const & excludedPaths); + + ~Partial(); + + Containment contains(Path const & path) const; + +private: + struct Node { + typedef std::map< rtl::OUString, Node > Children; + + Node(): startInclude(false) {} + + Children children; + bool startInclude; + }; + + Node root_; +}; + +} + +#endif diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx index ab711c3bec..57f45068d9 100644 --- a/configmgr/source/update.cxx +++ b/configmgr/source/update.cxx @@ -28,6 +28,8 @@ #include "precompiled_configmgr.hxx" #include "sal/config.h" +#include <set> + #include "configmgr/update.hxx" #include "osl/mutex.hxx" #include "rtl/ref.hxx" @@ -61,6 +63,23 @@ void insertExtensionXcuFile(bool shared, rtl::OUString const & fileUri) { bc.send(); } +void insertModificationXcuFile( + rtl::OUString const & fileUri, + std::set< rtl::OUString > const & includedPaths, + std::set< rtl::OUString > const & excludedPaths) +{ + Broadcaster bc; + { + osl::MutexGuard g(lock); + Modifications mods; + Components::getSingleton().insertModificationXcuFile( + fileUri, includedPaths, excludedPaths, &mods); + Components::getSingleton().initGlobalBroadcaster( + mods, rtl::Reference< RootAccess >(), &bc); + } + bc.send(); +} + } } diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx index f951aac5ca..4adf452c40 100644 --- a/configmgr/source/valueparser.cxx +++ b/configmgr/source/valueparser.cxx @@ -270,6 +270,10 @@ XmlReader::Text ValueParser::getTextMode() const { if (node_.is()) { switch (state_) { case STATE_TEXT: + if (!items_.empty()) { + break; + } + // fall through case STATE_IT: return (type_ == TYPE_STRING || type_ == TYPE_STRING_LIST || @@ -294,7 +298,9 @@ bool ValueParser::startElement( name.equals(RTL_CONSTASCII_STRINGPARAM("it")) && isListType(type_) && separator_.getLength() == 0) { - checkEmptyPad(reader); + pad_.clear(); + // before first <it>, characters are not ignored; assume they + // are only whitespace state_ = STATE_IT; return true; } @@ -351,7 +357,7 @@ bool ValueParser::startElement( css::uno::Reference< css::uno::XInterface >()); } -bool ValueParser::endElement(XmlReader const & reader) { +bool ValueParser::endElement() { if (!node_.is()) { return false; } @@ -363,7 +369,6 @@ bool ValueParser::endElement(XmlReader const & reader) { value = parseValue(separator_, pad_.get(), type_); pad_.clear(); } else { - checkEmptyPad(reader); switch (type_) { case TYPE_BOOLEAN_LIST: value = convertItems< sal_Bool >(); @@ -454,17 +459,6 @@ int ValueParser::getLayer() const { return layer_; } -void ValueParser::checkEmptyPad(XmlReader const & reader) const { - if (pad_.is()) { - throw css::uno::RuntimeException( - (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "mixed text and <it> elements in ")) + - reader.getUrl()), - css::uno::Reference< css::uno::XInterface >()); - } -} - template< typename T > css::uno::Any ValueParser::convertItems() { css::uno::Sequence< T > seq(items_.size()); for (sal_Int32 i = 0; i < seq.getLength(); ++i) { diff --git a/configmgr/source/valueparser.hxx b/configmgr/source/valueparser.hxx index c328fe7edd..4e899f4632 100644 --- a/configmgr/source/valueparser.hxx +++ b/configmgr/source/valueparser.hxx @@ -61,7 +61,7 @@ public: bool startElement( XmlReader & reader, XmlReader::Namespace ns, Span const & name); - bool endElement(XmlReader const & reader); + bool endElement(); void characters(Span const & text); @@ -75,8 +75,6 @@ public: rtl::OString separator_; private: - void checkEmptyPad(XmlReader const & reader) const; - template< typename T > com::sun::star::uno::Any convertItems(); enum State { STATE_TEXT, STATE_TEXT_UNICODE, STATE_IT, STATE_IT_UNICODE }; diff --git a/configmgr/source/writemodfile.cxx b/configmgr/source/writemodfile.cxx index a8e0f77cbd..c2573ab674 100644 --- a/configmgr/source/writemodfile.cxx +++ b/configmgr/source/writemodfile.cxx @@ -451,9 +451,9 @@ void writeNode( void writeModifications( Components & components, oslFileHandle handle, - rtl::OUString const & grandparentPathRepresentation, - rtl::OUString const & parentName, rtl::Reference< Node > const & parent, - rtl::OUString const & nodeName, rtl::Reference< Node > const & node, + rtl::OUString const & parentPathRepresentation, + rtl::Reference< Node > const & parent, rtl::OUString const & nodeName, + rtl::Reference< Node > const & node, Modifications::Node const & modifications) { // It is never necessary to write oor:finalized or oor:mandatory attributes, @@ -461,27 +461,15 @@ void writeModifications( if (modifications.children.empty()) { OSL_ASSERT(parent.is()); // components themselves have no parent but must have children + writeData(handle, RTL_CONSTASCII_STRINGPARAM("<item oor:path=\"")); + writeAttributeValue(handle, parentPathRepresentation); + writeData(handle, RTL_CONSTASCII_STRINGPARAM("\">")); if (node.is()) { - writeData(handle, RTL_CONSTASCII_STRINGPARAM("<item oor:path=\"")); - writeAttributeValue( - handle, - (grandparentPathRepresentation + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + - Data::createSegment(parent->getTemplateName(), parentName))); - writeData(handle, RTL_CONSTASCII_STRINGPARAM("\">")); writeNode(components, handle, parent, nodeName, node); - writeData(handle, RTL_CONSTASCII_STRINGPARAM("</item>")); } else { - writeData(handle, RTL_CONSTASCII_STRINGPARAM("<item oor:path=\"")); switch (parent->kind()) { case Node::KIND_LOCALIZED_PROPERTY: - writeAttributeValue(handle, grandparentPathRepresentation); - writeData( - handle, RTL_CONSTASCII_STRINGPARAM("\"><prop oor:name=\"")); - writeAttributeValue(handle, parentName); - writeData( - handle, - RTL_CONSTASCII_STRINGPARAM("\" oor:op=\"fuse\"><value")); + writeData(handle, RTL_CONSTASCII_STRINGPARAM("<value")); if (nodeName.getLength() != 0) { writeData( handle, RTL_CONSTASCII_STRINGPARAM(" xml:lang=\"")); @@ -489,61 +477,44 @@ void writeModifications( writeData(handle, RTL_CONSTASCII_STRINGPARAM("\"")); } writeData( - handle, - RTL_CONSTASCII_STRINGPARAM( - " oor:op=\"remove\"/></prop></item>")); + handle, RTL_CONSTASCII_STRINGPARAM(" oor:op=\"remove\"/>")); break; case Node::KIND_GROUP: OSL_ASSERT( dynamic_cast< GroupNode * >(parent.get())->isExtensible()); - writeAttributeValue( - handle, - (grandparentPathRepresentation + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + - Data::createSegment( - parent->getTemplateName(), parentName))); writeData( - handle, RTL_CONSTASCII_STRINGPARAM("\"><prop oor:name=\"")); + handle, RTL_CONSTASCII_STRINGPARAM("<prop oor:name=\"")); writeAttributeValue(handle, nodeName); writeData( handle, - RTL_CONSTASCII_STRINGPARAM( - "\" oor:op=\"remove\"/></item>")); + RTL_CONSTASCII_STRINGPARAM("\" oor:op=\"remove\"/>")); break; case Node::KIND_SET: - writeAttributeValue( - handle, - (grandparentPathRepresentation + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + - Data::createSegment( - parent->getTemplateName(), parentName))); writeData( - handle, RTL_CONSTASCII_STRINGPARAM("\"><node oor:name=\"")); + handle, RTL_CONSTASCII_STRINGPARAM("<node oor:name=\"")); writeAttributeValue(handle, nodeName); writeData( handle, - RTL_CONSTASCII_STRINGPARAM( - "\" oor:op=\"remove\"/></item>")); + RTL_CONSTASCII_STRINGPARAM("\" oor:op=\"remove\"/>")); break; default: OSL_ASSERT(false); // this cannot happen break; } } + writeData(handle, RTL_CONSTASCII_STRINGPARAM("</item>")); } else { - rtl::OUString parentPathRep; - if (parent.is()) { // components themselves have no parent - parentPathRep = grandparentPathRepresentation + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + - Data::createSegment(parent->getTemplateName(), parentName); - } OSL_ASSERT(node.is()); + rtl::OUString pathRep( + parentPathRepresentation + + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + + Data::createSegment(node->getTemplateName(), nodeName)); for (Modifications::Node::Children::const_iterator i( modifications.children.begin()); i != modifications.children.end(); ++i) { writeModifications( - components, handle, parentPathRep, nodeName, node, i->first, + components, handle, pathRep, node, i->first, node->getMember(i->first), i->second); } } @@ -605,9 +576,8 @@ void writeModFile( j != data.modifications.getRoot().children.end(); ++j) { writeModifications( - components, tmp.handle, rtl::OUString(), rtl::OUString(), - rtl::Reference< Node >(), j->first, - Data::findNode(Data::NO_LAYER, data.components, j->first), + components, tmp.handle, rtl::OUString(), rtl::Reference< Node >(), + j->first, Data::findNode(Data::NO_LAYER, data.components, j->first), j->second); } writeData(tmp.handle, RTL_CONSTASCII_STRINGPARAM("</oor:items>")); diff --git a/configmgr/source/xcdparser.cxx b/configmgr/source/xcdparser.cxx index 8306c692c3..498254b356 100644 --- a/configmgr/source/xcdparser.cxx +++ b/configmgr/source/xcdparser.cxx @@ -53,7 +53,7 @@ namespace css = com::sun::star; } -XcdParser::XcdParser(int layer, Dependencies const & dependencies, Data * data): +XcdParser::XcdParser(int layer, Dependencies const & dependencies, Data & data): layer_(layer), dependencies_(dependencies), data_(data), state_(STATE_START) {} @@ -137,7 +137,7 @@ bool XcdParser::startElement( if (ns == XmlReader::NAMESPACE_OOR && name.equals(RTL_CONSTASCII_STRINGPARAM("component-data"))) { - nestedParser_ = new XcuParser(layer_ + 1, data_, 0); + nestedParser_ = new XcuParser(layer_ + 1, data_, 0, 0); nesting_ = 1; return nestedParser_->startElement(reader, ns, name); } diff --git a/configmgr/source/xcdparser.hxx b/configmgr/source/xcdparser.hxx index 2e35b3686e..2ad8ecea7f 100644 --- a/configmgr/source/xcdparser.hxx +++ b/configmgr/source/xcdparser.hxx @@ -47,7 +47,7 @@ class XcdParser: public Parser { public: typedef std::set< rtl::OUString > Dependencies; - XcdParser(int layer, Dependencies const & dependencies, Data * data); + XcdParser(int layer, Dependencies const & dependencies, Data & data); private: virtual ~XcdParser(); @@ -66,7 +66,7 @@ private: int layer_; Dependencies const & dependencies_; - Data * data_; + Data & data_; State state_; rtl::OUString dependency_; rtl::Reference< Parser > nestedParser_; diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx index 15141844a2..12e64ebbe1 100644 --- a/configmgr/source/xcsparser.cxx +++ b/configmgr/source/xcsparser.cxx @@ -60,9 +60,66 @@ namespace { namespace css = com::sun::star; +// Conservatively merge a template or component (and its recursive parts) into +// an existing instance: +void merge( + rtl::Reference< Node > const & original, + rtl::Reference< Node > const & update) +{ + OSL_ASSERT( + original.is() && update.is() && original->kind() == update->kind() && + update->getFinalized() == Data::NO_LAYER); + if (update->getLayer() >= original->getLayer() && + update->getLayer() <= original->getFinalized()) + { + switch (original->kind()) { + case Node::KIND_PROPERTY: + case Node::KIND_LOCALIZED_PROPERTY: + case Node::KIND_LOCALIZED_VALUE: + break; //TODO: merge certain parts? + case Node::KIND_GROUP: + if (dynamic_cast< GroupNode * >(original.get())->isExtensible()) { + for (NodeMap::iterator i2(update->getMembers().begin()); + i2 != update->getMembers().end(); ++i2) + { + NodeMap::iterator i1( + original->getMembers().find(i2->first)); + if (i1 == original->getMembers().end()) { + if (i2->second->kind() == Node::KIND_PROPERTY) { + original->getMembers().insert(*i2); + } + } else if (i2->second->kind() == i1->second->kind()) { + merge(i1->second, i2->second); + } + } + } + break; + case Node::KIND_SET: + for (NodeMap::iterator i2(update->getMembers().begin()); + i2 != update->getMembers().end(); ++i2) + { + NodeMap::iterator i1(original->getMembers().find(i2->first)); + if (i1 == original->getMembers().end()) { + if (dynamic_cast< SetNode * >(original.get())-> + isValidTemplate(i2->second->getTemplateName())) + { + original->getMembers().insert(*i2); + } + } else if (i2->second->kind() == i1->second->kind() && + (i2->second->getTemplateName() == + i1->second->getTemplateName())) + { + merge(i1->second, i2->second); + } + } + break; + } + } } -XcsParser::XcsParser(int layer, Data * data): +} + +XcsParser::XcsParser(int layer, Data & data): valueParser_(layer), data_(data), state_(STATE_START) {} @@ -209,7 +266,7 @@ bool XcsParser::startElement( } void XcsParser::endElement(XmlReader const & reader) { - if (valueParser_.endElement(reader)) { + if (valueParser_.endElement()) { return; } if (ignoring_ > 0) { @@ -218,15 +275,30 @@ void XcsParser::endElement(XmlReader const & reader) { Element top(elements_.top()); elements_.pop(); if (top.node.is()) { - NodeMap * map; if (elements_.empty()) { switch (state_) { case STATE_TEMPLATES: - map = &data_->templates; + { + NodeMap::iterator i(data_.templates.find(top.name)); + if (i == data_.templates.end()) { + data_.templates.insert( + NodeMap::value_type(top.name, top.node)); + } else { + merge(i->second, top.node); + } + } break; case STATE_COMPONENT: - map = &data_->components; - state_ = STATE_COMPONENT_DONE; + { + NodeMap::iterator i(data_.components.find(top.name)); + if (i == data_.components.end()) { + data_.components.insert( + NodeMap::value_type(top.name, top.node)); + } else { + merge(i->second, top.node); + } + state_ = STATE_COMPONENT_DONE; + } break; default: OSL_ASSERT(false); @@ -235,10 +307,9 @@ void XcsParser::endElement(XmlReader const & reader) { RTL_CONSTASCII_USTRINGPARAM("this cannot happen")), css::uno::Reference< css::uno::XInterface >()); } - } else { - map = &elements_.top().node->getMembers(); - } - if (!map->insert(NodeMap::value_type(top.name, top.node)).second) { + } else if (!elements_.top().node->getMembers().insert( + NodeMap::value_type(top.name, top.node)).second) + { throw css::uno::RuntimeException( (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("duplicate ")) + top.name + @@ -372,7 +443,7 @@ void XcsParser::handleNodeRef(XmlReader & reader) { css::uno::Reference< css::uno::XInterface >()); } rtl::Reference< Node > tmpl( - data_->getTemplate( + data_.getTemplate( valueParser_.getLayer(), xmldata::parseTemplateReference( component, hasNodeType, nodeType, 0))); diff --git a/configmgr/source/xcsparser.hxx b/configmgr/source/xcsparser.hxx index 21a124945a..196add9a82 100644 --- a/configmgr/source/xcsparser.hxx +++ b/configmgr/source/xcsparser.hxx @@ -48,7 +48,7 @@ struct Span; class XcsParser: public Parser { public: - XcsParser(int layer, Data * data); + XcsParser(int layer, Data & data); private: virtual ~XcsParser(); @@ -94,7 +94,7 @@ private: typedef std::stack< Element > ElementStack; ValueParser valueParser_; - Data * data_; + Data & data_; rtl::OUString componentName_; State state_; long ignoring_; diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx index 220168c627..77b0f747f3 100644 --- a/configmgr/source/xcuparser.cxx +++ b/configmgr/source/xcuparser.cxx @@ -49,6 +49,7 @@ #include "modifications.hxx" #include "node.hxx" #include "nodemap.hxx" +#include "partial.hxx" #include "path.hxx" #include "propertynode.hxx" #include "setnode.hxx" @@ -65,14 +66,15 @@ namespace css = com::sun::star; } -XcuParser::XcuParser(int layer, Data * data, Modifications * modifications): - valueParser_(layer), data_(data), modifications_(modifications) -{ - if (layer == Data::NO_LAYER) { - OSL_ASSERT(modifications_ == 0); - modifications_ = &data_->modifications; - } -} +XcuParser::XcuParser( + int layer, Data & data, Partial const * partial, + Modifications * broadcastModifications): + valueParser_(layer), data_(data), + partial_(partial), broadcastModifications_(broadcastModifications), + recordModifications_(layer == Data::NO_LAYER), + trackPath_( + partial_ != 0 || broadcastModifications_ != 0 || recordModifications_) +{} XcuParser::~XcuParser() {} @@ -105,7 +107,7 @@ bool XcuParser::startElement( css::uno::Reference< css::uno::XInterface >()); } } else if (state_.top().ignore) { - state_.push(state_.top()); + state_.push(State(false)); } else if (!state_.top().node.is()) { if (ns == XmlReader::NAMESPACE_NONE && name.equals(RTL_CONSTASCII_STRINGPARAM("item"))) @@ -209,12 +211,12 @@ bool XcuParser::startElement( return true; } -void XcuParser::endElement(XmlReader const & reader) { - if (valueParser_.endElement(reader)) { +void XcuParser::endElement(XmlReader const &) { + if (valueParser_.endElement()) { return; } OSL_ASSERT(!state_.empty()); - bool ignore = state_.top().ignore; + bool pop = state_.top().pop; rtl::Reference< Node > insert; rtl::OUString name; if (state_.top().insert) { @@ -227,10 +229,10 @@ void XcuParser::endElement(XmlReader const & reader) { OSL_ASSERT(!state_.empty() && state_.top().node.is()); state_.top().node->getMembers()[name] = insert; } - if (!ignore && !modificationPath_.empty()) { - modificationPath_.pop_back(); + if (pop && !path_.empty()) { + path_.pop_back(); // </item> will pop less than <item> pushed, but that is harmless, - // as the next <item> will reset modificationPath_ + // as the next <item> will reset path_ } } @@ -328,16 +330,27 @@ void XcuParser::handleComponentData(XmlReader & reader) { } componentName_ = xmldata::convertFromUtf8( Span(buf.getStr(), buf.getLength())); + if (trackPath_) { + OSL_ASSERT(path_.empty()); + path_.push_back(componentName_); + if (partial_ != 0 && partial_->contains(path_) == Partial::CONTAINS_NOT) + { + state_.push(State(true)); // ignored + return; + } + } rtl::Reference< Node > node( Data::findNode( - valueParser_.getLayer(), data_->components, componentName_)); + valueParser_.getLayer(), data_.components, componentName_)); if (!node.is()) { - throw css::uno::RuntimeException( - (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("unknown component ")) + - componentName_ + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" in ")) + - reader.getUrl()), - css::uno::Reference< css::uno::XInterface >()); + OSL_TRACE( + "configmgr unknown component %s in %s", + rtl::OUStringToOString( + componentName_, RTL_TEXTENCODING_UTF8).getStr(), + rtl::OUStringToOString( + reader.getUrl(), RTL_TEXTENCODING_UTF8).getStr()); + state_.push(State(true)); // ignored + return; } switch (op) { case OPERATION_MODIFY: @@ -356,10 +369,6 @@ void XcuParser::handleComponentData(XmlReader & reader) { node->getFinalized()); node->setFinalized(finalizedLayer); state_.push(State(node, finalizedLayer < valueParser_.getLayer())); - if (modifications_ != 0) { - OSL_ASSERT(modificationPath_.empty()); - modificationPath_.push_back(componentName_); - } } void XcuParser::handleItem(XmlReader & reader) { @@ -386,27 +395,43 @@ void XcuParser::handleItem(XmlReader & reader) { rtl::OUString path(xmldata::convertFromUtf8(attrPath)); int finalizedLayer; rtl::Reference< Node > node( - data_->resolvePathRepresentation( - path, &modificationPath_, &finalizedLayer)); + data_.resolvePathRepresentation(path, &path_, &finalizedLayer)); if (!node.is()) { - //TODO: Within Components::parseModificationLayer (but only there) it - // can rightly happen that data is read that does not match a schema - // (that no schema exists, or that the schema specifies a different - // type), namely if the schema was brought along by an extension that - // has been removed or replaced; instead of taking care of that at all - // the relevant places, as a hack, only "top-level" <item>s (that only - // appear in modification layer data) with unknown path are filtered out - // here. OSL_TRACE( - "configmgr unknown <item path=\"%s\">", - rtl::OUStringToOString(path, RTL_TEXTENCODING_UTF8).getStr()); - state_.push(State()); // ignored + "configmgr unknown item %s in %s", + rtl::OUStringToOString(path, RTL_TEXTENCODING_UTF8).getStr(), + rtl::OUStringToOString( + reader.getUrl(), RTL_TEXTENCODING_UTF8).getStr()); + state_.push(State(true)); // ignored return; } - OSL_ASSERT(!modificationPath_.empty()); - componentName_ = modificationPath_.front(); - if (modifications_ == 0) { - modificationPath_.clear(); + OSL_ASSERT(!path_.empty()); + componentName_ = path_.front(); + if (trackPath_) { + if (partial_ != 0 && partial_->contains(path_) == Partial::CONTAINS_NOT) + { + state_.push(State(true)); // ignored + return; + } + } else { + path_.clear(); + } + switch (node->kind()) { + case Node::KIND_PROPERTY: + case Node::KIND_LOCALIZED_VALUE: + OSL_TRACE( + "configmgr item of bad type %s in %s", + rtl::OUStringToOString(path, RTL_TEXTENCODING_UTF8).getStr(), + rtl::OUStringToOString( + reader.getUrl(), RTL_TEXTENCODING_UTF8).getStr()); + state_.push(State(true)); // ignored + return; + case Node::KIND_LOCALIZED_PROPERTY: + valueParser_.type_ = dynamic_cast< LocalizedPropertyNode * >( + node.get())->getStaticType(); + break; + default: + break; } state_.push(State(node, finalizedLayer < valueParser_.getLayer())); } @@ -483,13 +508,13 @@ void XcuParser::handlePropValue(XmlReader & reader, PropertyNode * prop) { css::uno::Reference< css::uno::XInterface >()); } prop->setValue(valueParser_.getLayer(), css::uno::Any()); - state_.push(State()); + state_.push(State(false)); } else if (external.getLength() == 0) { valueParser_.separator_ = separator; valueParser_.start(prop); } else { prop->setExternal(valueParser_.getLayer(), external); - state_.push(State()); + state_.push(State(false)); } } @@ -546,11 +571,20 @@ void XcuParser::handleLocpropValue( op = parseOperation(reader.getAttributeValue(true)); } } + if (trackPath_) { + path_.push_back(name); + if (partial_ != 0 && + partial_->contains(path_) != Partial::CONTAINS_NODE) + { + state_.push(State(true)); // ignored + return; + } + } NodeMap::iterator i(locprop->getMembers().find(name)); if (i != locprop->getMembers().end() && i->second->getLayer() > valueParser_.getLayer()) { - state_.push(State()); // ignored + state_.push(State(true)); // ignored return; } if (nil && !locprop->isNillable()) { @@ -563,23 +597,29 @@ void XcuParser::handleLocpropValue( } switch (op) { case OPERATION_FUSE: - if (nil) { - if (i == locprop->getMembers().end()) { - locprop->getMembers()[name] = new LocalizedValueNode( - valueParser_.getLayer(), css::uno::Any()); + { + bool pop = false; + if (nil) { + if (i == locprop->getMembers().end()) { + locprop->getMembers()[name] = new LocalizedValueNode( + valueParser_.getLayer(), css::uno::Any()); + } else { + dynamic_cast< LocalizedValueNode * >( + i->second.get())->setValue( + valueParser_.getLayer(), css::uno::Any()); + } + state_.push(State(true)); } else { - dynamic_cast< LocalizedValueNode * >(i->second.get())->setValue( - valueParser_.getLayer(), css::uno::Any()); + valueParser_.separator_ = separator; + valueParser_.start(locprop, name); + pop = true; + } + if (trackPath_) { + recordModification(); + if (pop) { + path_.pop_back(); + } } - state_.push(State()); - } else { - valueParser_.separator_ = separator; - valueParser_.start(locprop, name); - } - if (modifications_ != 0) { - modificationPath_.push_back(name); - modifications_->add(modificationPath_); - modificationPath_.pop_back(); } break; case OPERATION_REMOVE: @@ -588,12 +628,8 @@ void XcuParser::handleLocpropValue( if (i != locprop->getMembers().end()) { locprop->getMembers().erase(i); } - state_.push(State()); - if (modifications_ != 0) { - modificationPath_.push_back(name); - modifications_->add(modificationPath_); - modificationPath_.pop_back(); - } + state_.push(State(true)); + recordModification(); break; default: throw css::uno::RuntimeException( @@ -643,6 +679,17 @@ void XcuParser::handleGroupProp(XmlReader & reader, GroupNode * group) { reader.getUrl()), css::uno::Reference< css::uno::XInterface >()); } + if (trackPath_) { + path_.push_back(name); + //TODO: This ignores locprop values for which specific include paths + // exist (i.e., for which contains(locprop path) = CONTAINS_SUBNODES): + if (partial_ != 0 && + partial_->contains(path_) != Partial::CONTAINS_NODE) + { + state_.push(State(true)); // ignored + return; + } + } NodeMap::iterator i(group->getMembers().find(name)); if (i == group->getMembers().end()) { handleUnknownGroupProp(reader, group, name, type, op, finalized); @@ -672,17 +719,10 @@ void XcuParser::handleUnknownGroupProp( XmlReader const & reader, GroupNode * group, rtl::OUString const & name, Type type, Operation operation, bool finalized) { - if (!group->isExtensible()) { - throw css::uno::RuntimeException( - (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("unknown prop ")) + - name + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" in ")) + - reader.getUrl()), - css::uno::Reference< css::uno::XInterface >()); - } switch (operation) { case OPERATION_REPLACE: case OPERATION_FUSE: - { + if (group->isExtensible()) { if (type == TYPE_ERROR) { throw css::uno::RuntimeException( (rtl::OUString( @@ -701,17 +741,17 @@ void XcuParser::handleUnknownGroupProp( prop->setFinalized(valueParser_.getLayer()); } state_.push(State(prop, name, state_.top().locked)); - if (modifications_ != 0) { - modificationPath_.push_back(name); - modifications_->add(modificationPath_); - } + recordModification(); + break; } - break; + // fall through default: OSL_TRACE( - "ignoring modify or remove of unknown (presumably extension)" - " property"); - state_.push(State()); + "configmgr unknown property %s in %s", + rtl::OUStringToOString(name, RTL_TEXTENCODING_UTF8).getStr(), + rtl::OUStringToOString( + reader.getUrl(), RTL_TEXTENCODING_UTF8).getStr()); + state_.push(State(true)); // ignored break; } } @@ -724,7 +764,7 @@ void XcuParser::handlePlainGroupProp( PropertyNode * property = dynamic_cast< PropertyNode * >( propertyIndex->second.get()); if (property->getLayer() > valueParser_.getLayer()) { - state_.push(State()); // ignored + state_.push(State(true)); // ignored return; } int finalizedLayer = std::min( @@ -751,10 +791,7 @@ void XcuParser::handlePlainGroupProp( property, (state_.top().locked || finalizedLayer < valueParser_.getLayer()))); - if (modifications_ != 0) { - modificationPath_.push_back(name); - modifications_->add(modificationPath_); - } + recordModification(); break; case OPERATION_REMOVE: if (!property->isExtension()) { @@ -767,12 +804,8 @@ void XcuParser::handlePlainGroupProp( css::uno::Reference< css::uno::XInterface >()); } group->getMembers().erase(propertyIndex); - state_.push(State()); // ignore children - if (modifications_ != 0) { - modificationPath_.push_back(name); - modifications_->add(modificationPath_); - modificationPath_.pop_back(); - } + state_.push(State(true)); // ignore children + recordModification(); break; } } @@ -782,7 +815,7 @@ void XcuParser::handleLocalizedGroupProp( rtl::OUString const & name, Type type, Operation operation, bool finalized) { if (property->getLayer() > valueParser_.getLayer()) { - state_.push(State()); // ignored + state_.push(State(true)); // ignored return; } int finalizedLayer = std::min( @@ -808,9 +841,6 @@ void XcuParser::handleLocalizedGroupProp( property, (state_.top().locked || finalizedLayer < valueParser_.getLayer()))); - if (modifications_ != 0) { - modificationPath_.push_back(name); - } break; case OPERATION_REPLACE: { @@ -824,10 +854,7 @@ void XcuParser::handleLocalizedGroupProp( replacement, name, (state_.top().locked || finalizedLayer < valueParser_.getLayer()))); - if (modifications_ != 0) { - modificationPath_.push_back(name); - modifications_->add(modificationPath_); - } + recordModification(); } break; case OPERATION_REMOVE: @@ -876,14 +903,24 @@ void XcuParser::handleGroupNode( reader.getUrl()), css::uno::Reference< css::uno::XInterface >()); } + if (trackPath_) { + path_.push_back(name); + if (partial_ != 0 && partial_->contains(path_) == Partial::CONTAINS_NOT) + { + state_.push(State(true)); // ignored + return; + } + } rtl::Reference< Node > child( Data::findNode(valueParser_.getLayer(), group->getMembers(), name)); if (!child.is()) { - throw css::uno::RuntimeException( - (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("unknown node ")) + - name + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" in ")) + - reader.getUrl()), - css::uno::Reference< css::uno::XInterface >()); + OSL_TRACE( + "configmgr unknown node %s in %s", + rtl::OUStringToOString(name, RTL_TEXTENCODING_UTF8).getStr(), + rtl::OUStringToOString( + reader.getUrl(), RTL_TEXTENCODING_UTF8).getStr()); + state_.push(State(true)); // ignored + return; } if (op != OPERATION_MODIFY && op != OPERATION_FUSE) { throw css::uno::RuntimeException( @@ -901,9 +938,6 @@ void XcuParser::handleGroupNode( State( child, state_.top().locked || finalizedLayer < valueParser_.getLayer())); - if (modifications_ != 0) { - modificationPath_.push_back(name); - } } void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) { @@ -958,6 +992,14 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) { reader.getUrl()), css::uno::Reference< css::uno::XInterface >()); } + if (trackPath_) { + path_.push_back(name); + if (partial_ != 0 && partial_->contains(path_) == Partial::CONTAINS_NOT) + { + state_.push(State(true)); // ignored + return; + } + } rtl::OUString templateName( xmldata::parseTemplateReference( component, hasNodeType, nodeType, &set->getDefaultTemplateName())); @@ -972,7 +1014,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) { css::uno::Reference< css::uno::XInterface >()); } rtl::Reference< Node > tmpl( - data_->getTemplate(valueParser_.getLayer(), templateName)); + data_.getTemplate(valueParser_.getLayer(), templateName)); if (!tmpl.is()) { throw css::uno::RuntimeException( (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("set member node ")) + @@ -993,7 +1035,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) { mandatoryLayer = std::min(mandatoryLayer, i->second->getMandatory()); i->second->setMandatory(mandatoryLayer); if (i->second->getLayer() > valueParser_.getLayer()) { - state_.push(State()); // ignored + state_.push(State(true)); // ignored return; } } @@ -1001,48 +1043,39 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) { case OPERATION_MODIFY: if (i == set->getMembers().end()) { OSL_TRACE("ignoring modify of unknown set member node"); - state_.push(State()); + state_.push(State(true)); // ignored } else { state_.push( State( i->second, (state_.top().locked || finalizedLayer < valueParser_.getLayer()))); - if (modifications_ != 0) { - modificationPath_.push_back(name); - } } break; case OPERATION_REPLACE: if (state_.top().locked || finalizedLayer < valueParser_.getLayer()) { - state_.push(State()); // ignored + state_.push(State(true)); // ignored } else { rtl::Reference< Node > member(tmpl->clone()); member->setLayer(valueParser_.getLayer()); member->setFinalized(finalizedLayer); member->setMandatory(mandatoryLayer); state_.push(State(member, name, false)); - if (modifications_ != 0) { - modificationPath_.push_back(name); - modifications_->add(modificationPath_); - } + recordModification(); } break; case OPERATION_FUSE: if (i == set->getMembers().end()) { if (state_.top().locked || finalizedLayer < valueParser_.getLayer()) { - state_.push(State()); // ignored + state_.push(State(true)); // ignored } else { rtl::Reference< Node > member(tmpl->clone()); member->setLayer(valueParser_.getLayer()); member->setFinalized(finalizedLayer); member->setMandatory(mandatoryLayer); state_.push(State(member, name, false)); - if (modifications_ != 0) { - modificationPath_.push_back(name); - modifications_->add(modificationPath_); - } + recordModification(); } } else { state_.push( @@ -1050,9 +1083,6 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) { i->second, (state_.top().locked || finalizedLayer < valueParser_.getLayer()))); - if (modifications_ != 0) { - modificationPath_.push_back(name); - } } break; case OPERATION_REMOVE: @@ -1064,14 +1094,19 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) { { set->getMembers().erase(i); } - state_.push(State()); - if (modifications_ != 0) { - modificationPath_.push_back(name); - modifications_->add(modificationPath_); - modificationPath_.pop_back(); - } + state_.push(State(true)); + recordModification(); break; } } +void XcuParser::recordModification() { + if (broadcastModifications_ != 0) { + broadcastModifications_->add(path_); + } + if (recordModifications_) { + data_.modifications.add(path_); + } +} + } diff --git a/configmgr/source/xcuparser.hxx b/configmgr/source/xcuparser.hxx index 21806edebe..64108451b4 100644 --- a/configmgr/source/xcuparser.hxx +++ b/configmgr/source/xcuparser.hxx @@ -49,6 +49,7 @@ namespace configmgr { class GroupNode; class LocalizedPropertyNode; class Modifications; +class Partial; class PropertyNode; class SetNode; struct Data; @@ -56,7 +57,9 @@ struct Span; class XcuParser: public Parser { public: - XcuParser(int layer, Data * data, Modifications * modifications); + XcuParser( + int layer, Data & data, Partial const * partial, + Modifications * broadcastModifications); private: virtual ~XcuParser(); @@ -105,36 +108,44 @@ private: void handleSetNode(XmlReader & reader, SetNode * set); + void recordModification(); + struct State { rtl::Reference< Node > node; // empty iff ignore or <items> rtl::OUString name; // empty and ignored if !insert bool ignore; bool insert; bool locked; + bool pop; - inline State(): ignore(true), insert(false), locked(false) {} + inline State(bool thePop): + ignore(true), insert(false), locked(false), pop(thePop) + {} inline State(rtl::Reference< Node > const & theNode, bool theLocked): - node(theNode), ignore(false), insert(false), locked(theLocked) + node(theNode), ignore(false), insert(false), locked(theLocked), + pop(true) {} inline State( rtl::Reference< Node > const & theNode, rtl::OUString const & theName, bool theLocked): node(theNode), name(theName), ignore(false), insert(true), - locked(theLocked) + locked(theLocked), pop(true) {} }; typedef std::stack< State > StateStack; ValueParser valueParser_; - Data * data_; - Modifications * modifications_; + Data & data_; + Partial const * partial_; + Modifications * broadcastModifications_; + bool recordModifications_; + bool trackPath_; rtl::OUString componentName_; StateStack state_; - Path modificationPath_; - rtl::OUString path_; + Path path_; }; } diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh index 8c25257873..af6a9df908 100644 --- a/desktop/scripts/soffice.sh +++ b/desktop/scripts/soffice.sh @@ -114,10 +114,6 @@ if [ -f /etc/adabasrc ]; then . /etc/adabasrc fi -# Set PATH so that crash_report is found: -PATH=$sd_prog${PATH+:$PATH} -export PATH - # execute soffice binary "$sd_prog/$sd_binary" "$@" & trap 'kill -9 $!' TERM diff --git a/desktop/scripts/unopkg.sh b/desktop/scripts/unopkg.sh index 491b706b58..5a8ee262ae 100644 --- a/desktop/scripts/unopkg.sh +++ b/desktop/scripts/unopkg.sh @@ -70,10 +70,6 @@ unset XENVIRONMENT # uncomment line below if you encounter problems starting soffice on your system # SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS -# Set PATH so that crash_report is found: -PATH=$sd_prog${PATH+:$PATH} -export PATH - # execute binary exec "$sd_prog/unopkg.bin" "$@" \ "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc" diff --git a/desktop/source/app/appfirststart.cxx b/desktop/source/app/appfirststart.cxx index 90818009e1..9e2d865184 100644 --- a/desktop/source/app/appfirststart.cxx +++ b/desktop/source/app/appfirststart.cxx @@ -108,6 +108,9 @@ OUString Desktop::GetLicensePath() /* Check if we need to accept license. */ sal_Bool Desktop::LicenseNeedsAcceptance() { + // Don't show a license + return sal_False; +/* sal_Bool bShowLicense = sal_True; sal_Int32 nOpenSourceContext = 0; try @@ -122,6 +125,7 @@ sal_Bool Desktop::LicenseNeedsAcceptance() bShowLicense = sal_False; return bShowLicense; +*/ } /* Local function - was the wizard completed already? */ diff --git a/desktop/source/app/makefile.mk b/desktop/source/app/makefile.mk index d9db7c1634..83bec90112 100644 --- a/desktop/source/app/makefile.mk +++ b/desktop/source/app/makefile.mk @@ -65,6 +65,7 @@ SHL1LIBS = $(SLB)$/mig.lib SHL1STDLIBS = \ $(COMPHELPERLIB) \ + $(CONFIGMGRLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ $(I18NISOLANGLIB) \ diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index 6418e5c32c..8a3bd27f56 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -542,11 +542,19 @@ OUString PackageManagerImpl::insertToActivationLayer( { // inflate content: ::rtl::OUStringBuffer buf; - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.zip://") ); - buf.append( ::rtl::Uri::encode( sourceContent.getURL(), - rtl_UriCharClassRegName, - rtl_UriEncodeIgnoreEscapes, - RTL_TEXTENCODING_UTF8 ) ); + if (!sourceContent.isFolder()) + { + buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.zip://") ); + buf.append( ::rtl::Uri::encode( sourceContent.getURL(), + rtl_UriCharClassRegName, + rtl_UriEncodeIgnoreEscapes, + RTL_TEXTENCODING_UTF8 ) ); + } + else + { + //Folder. No need to unzip, just copy + buf.append(sourceContent.getURL()); + } buf.append( static_cast<sal_Unicode>('/') ); sourceContent = ::ucbhelper::Content( buf.makeStringAndClear(), xCmdEnv ); diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx index 187ef14a17..579cc8a051 100644 --- a/desktop/source/deployment/misc/dp_platform.cxx +++ b/desktop/source/deployment/misc/dp_platform.cxx @@ -47,8 +47,11 @@ #define PLATFORM_LINUX_MIPS_EL "linux_mips_el" #define PLATFORM_LINUX_MIPS_EB "linux_mips_eb" #define PLATFORM_LINUX_IA64 "linux_ia64" +#define PLATFORM_LINUX_M68K "linux_m68k" #define PLATFORM_LINUX_S390 "linux_s390" #define PLATFORM_LINUX_S390x "linux_s390x" +#define PLATFORM_LINUX_HPPA "linux_hppa" +#define PLATFORM_LINUX_ALPHA "linux_alpha" @@ -142,10 +145,16 @@ namespace ret = checkOSandCPU(OUSTR("Linux"), OUSTR("MIPS_EB")); else if (token.equals(OUSTR(PLATFORM_LINUX_IA64))) ret = checkOSandCPU(OUSTR("Linux"), OUSTR("IA64")); + else if (token.equals(OUSTR(PLATFORM_LINUX_M68K))) + ret = checkOSandCPU(OUSTR("Linux"), OUSTR("M68K")); else if (token.equals(OUSTR(PLATFORM_LINUX_S390))) ret = checkOSandCPU(OUSTR("Linux"), OUSTR("S390")); else if (token.equals(OUSTR(PLATFORM_LINUX_S390x))) ret = checkOSandCPU(OUSTR("Linux"), OUSTR("S390x")); + else if (token.equals(OUSTR(PLATFORM_LINUX_HPPA))) + ret = checkOSandCPU(OUSTR("Linux"), OUSTR("HPPA")); + else if (token.equals(OUSTR(PLATFORM_LINUX_ALPHA))) + ret = checkOSandCPU(OUSTR("Linux"), OUSTR("ALPHA")); else if (token.equals(OUSTR(PLATFORM_SOLARIS_SPARC))) ret = checkOSandCPU(OUSTR("Solaris"), OUSTR("SPARC")); else if (token.equals(OUSTR(PLATFORM_SOLARIS_SPARC64))) diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx index c20a8835f6..fa4fe53c09 100644 --- a/desktop/source/deployment/registry/dp_registry.cxx +++ b/desktop/source/deployment/registry/dp_registry.cxx @@ -181,6 +181,7 @@ OUString normalizeMediaType( OUString const & mediaType ) } //______________________________________________________________________________ + void PackageRegistryImpl::insertBackend( Reference<deployment::XPackageRegistry> const & xBackend ) { @@ -201,7 +202,8 @@ void PackageRegistryImpl::insertBackend( ::std::pair<t_string2registry::iterator, bool> mb_insertion( m_mediaType2backend.insert( t_string2registry::value_type( mediaType, xBackend ) ) ); - if (mb_insertion.second) { + if (mb_insertion.second) + { // add parameterless media-type, too: sal_Int32 semi = mediaType.indexOf( ';' ); if (semi >= 0) { @@ -210,9 +212,13 @@ void PackageRegistryImpl::insertBackend( mediaType.copy( 0, semi ), xBackend ) ); } const OUString fileFilter( xPackageType->getFileFilter() ); + //The package backend shall also be called to determine the mediatype + //(XPackageRegistry.bindPackage) when the URL points to a directory. + const bool bExtension = mediaType.equals(OUSTR("application/vnd.sun.star.package-bundle")); if (fileFilter.getLength() == 0 || fileFilter.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("*.*") ) || - fileFilter.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("*") )) + fileFilter.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("*") ) || + bExtension) { m_ambiguousBackends.insert( xBackend ); } @@ -351,7 +357,10 @@ Reference<deployment::XPackageRegistry> PackageRegistryImpl::create( } } - // insert bundle be: + // Insert bundle back-end. + // Always register as last, because we want to add extensions also as folders + // and as a default we accept every folder, which was not recognized by the other + // backends. that->insertBackend( ::dp_registry::backend::bundle::create( that, context, cachePath, readOnly, xComponentContext ) ); @@ -445,7 +454,8 @@ Reference<deployment::XPackage> PackageRegistryImpl::bindPackage( { ::ucbhelper::Content ucbContent; if (create_ucb_content( - &ucbContent, url, xCmdEnv, false /* no throw */ )) + &ucbContent, url, xCmdEnv, false /* no throw */ ) + && !ucbContent.isFolder()) { OUString title( ucbContent.getPropertyValue( StrTitle::get() ).get<OUString>() ); diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 8a61eb026f..48de481bab 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -287,7 +287,7 @@ BackendImpl::BackendImpl( m_xBundleTypeInfo->getShortDescription(), RID_IMG_DEF_PACKAGE_BUNDLE, RID_IMG_DEF_PACKAGE_BUNDLE_HC ) ), - m_typeInfos( 2 ) + m_typeInfos(2) { m_typeInfos[ 0 ] = m_xBundleTypeInfo; m_typeInfos[ 1 ] = m_xLegacyBundleTypeInfo; @@ -342,17 +342,32 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( ::ucbhelper::Content ucbContent; if (create_ucb_content( &ucbContent, url, xCmdEnv )) { - const OUString title( ucbContent.getPropertyValue( - StrTitle::get() ).get<OUString>() ); - if (title.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM(".oxt") ) || - title.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM(".uno.pkg") )) - mediaType = OUSTR("application/vnd.sun.star.package-bundle"); - else if (title.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM(".zip") )) - mediaType = - OUSTR("application/vnd.sun.star.legacy-package-bundle"); + if (ucbContent.isFolder()) + { + //Every .oxt, uno.pkg file must contain a META-INF folder + ::ucbhelper::Content metaInfContent; + if (create_ucb_content( + &metaInfContent, makeURL( url, OUSTR("META-INF/manifest.xml") ), + xCmdEnv, false /* no throw */ )) + { + mediaType = OUSTR("application/vnd.sun.star.package-bundle"); + } + //No support of legacy bundles, because every folder could be one. + } + else + { + const OUString title( ucbContent.getPropertyValue( + StrTitle::get() ).get<OUString>() ); + if (title.endsWithIgnoreAsciiCaseAsciiL( + RTL_CONSTASCII_STRINGPARAM(".oxt") ) || + title.endsWithIgnoreAsciiCaseAsciiL( + RTL_CONSTASCII_STRINGPARAM(".uno.pkg") )) + mediaType = OUSTR("application/vnd.sun.star.package-bundle"); + else if (title.endsWithIgnoreAsciiCaseAsciiL( + RTL_CONSTASCII_STRINGPARAM(".zip") )) + mediaType = + OUSTR("application/vnd.sun.star.legacy-package-bundle"); + } } if (mediaType.getLength() == 0) throw lang::IllegalArgumentException( @@ -1303,7 +1318,7 @@ void BackendImpl::PackageImpl::scanBundle( { OSL_ENSURE( 0, "### missing META-INF/manifest.xml file!" ); return; -} + } const lang::Locale officeLocale = getOfficeLocale(); diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index ede233edd2..0823377e2e 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -28,6 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_desktop.hxx" +#include <map> +#include <set> + #include "migration.hxx" #include "migration_impl.hxx" #include "cfgfilter.hxx" @@ -35,8 +38,10 @@ #include <unotools/textsearch.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequence.hxx> +#include <configmgr/update.hxx> #include <unotools/bootstrap.hxx> #include <rtl/bootstrap.hxx> +#include <rtl/uri.hxx> #include <tools/config.hxx> #include <i18npool/lang.h> #include <tools/urlobj.hxx> @@ -50,8 +55,6 @@ #include <com/sun/star/task/XJob.hpp> #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/configuration/backend/XLayer.hpp> -#include <com/sun/star/configuration/backend/XSingleLayerStratum.hpp> #include <com/sun/star/util/XRefreshable.hpp> #include <com/sun/star/util/XChangesBatch.hpp> #include <com/sun/star/util/XStringSubstitution.hpp> @@ -64,8 +67,6 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::util; using namespace com::sun::star::container; -using namespace com::sun::star::configuration; -using namespace com::sun::star::configuration::backend; using com::sun::star::uno::Exception; using namespace com::sun::star; @@ -154,18 +155,15 @@ MigrationImpl::~MigrationImpl() sal_Bool MigrationImpl::doMigration() { - // compile file and service list for migration - m_vrFileList = compileFileList(); - m_vrServiceList = compileServiceList(); + // compile file list for migration + m_vrFileList = compileFileList(); sal_Bool result = sal_False; try{ copyFiles(); // execute the migration items from Setup.xcu - // and refresh the cache copyConfig(); - refresh(); // execute custom migration services from Setup.xcu // and refresh the cache @@ -232,6 +230,7 @@ static void insertSorted(migrations_available& rAvailableMigrations, supported_m { rAvailableMigrations.insert(pIter, aSupportedMigration ); bInserted = true; + break; // i111193: insert invalidates iterator! } ++pIter; } @@ -332,13 +331,6 @@ migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigratio tmpStep.excludeExtensions.push_back(tmpSeq[j]); } - // config components - if (tmpAccess->getByName(OUString::createFromAscii("ServiceConfigComponents")) >>= tmpSeq) - { - for (sal_Int32 j=0; j<tmpSeq.getLength(); j++) - tmpStep.configComponents.push_back(tmpSeq[j]); - } - // generic service tmpAccess->getByName(OUString::createFromAscii("MigrationService")) >>= tmpStep.service; @@ -525,77 +517,87 @@ strings_vr MigrationImpl::compileFileList() return vrResult; } +namespace { -void MigrationImpl::copyConfig() -{ - try { - // 1. get a list of all components from hierachy browser - uno::Reference< XJob > xBrowser(m_xFactory->createInstance( - OUString::createFromAscii("com.sun.star.configuration.backend.LocalHierarchyBrowser")), uno::UNO_QUERY_THROW); - - uno::Sequence< NamedValue > seqArgs(2); - seqArgs[0] = NamedValue( - OUString::createFromAscii("LayerDataUrl"), - uno::makeAny(m_aInfo.userdata + OUString::createFromAscii("/user/registry"))); - seqArgs[1] = NamedValue( - OUString::createFromAscii("FetchComponentNames"), - uno::makeAny(sal_True)); - - // execute the search - uno::Any aResult = xBrowser->execute(seqArgs); - uno::Sequence< OUString > seqComponents; - aResult >>= seqComponents; - OSL_ENSURE(seqComponents.getLength()>0, "MigrationImpl::copyConfig(): no config components available"); - - // 2. create an importer - uno::Reference< XJob > xImporter(m_xFactory->createInstance( - OUString::createFromAscii("com.sun.star.configuration.backend.LocalDataImporter")), uno::UNO_QUERY_THROW); - - // 3. for each migration step... - uno::Sequence< NamedValue > importerArgs(3); - importerArgs[0] = NamedValue( - OUString::createFromAscii("LayerDataUrl"), - uno::makeAny(m_aInfo.userdata + OUString::createFromAscii("/user/registry"))); - importerArgs[1] = NamedValue( - OUString::createFromAscii("LayerFilter"), - uno::Any()); - importerArgs[2] = NamedValue( - OUString::createFromAscii("Component"), - uno::Any()); - - migrations_v::const_iterator i_mig = m_vrMigrations->begin(); - while (i_mig != m_vrMigrations->end()) - { - // a. create config filter for step - uno::Reference< XInitialization > xFilter( - new CConfigFilter(&(i_mig->includeConfig), &(i_mig->excludeConfig))); - importerArgs[1].Value = uno::makeAny(xFilter); +struct componentParts { + std::set< rtl::OUString > includedPaths; + std::set< rtl::OUString > excludedPaths; +}; - // b. run each importer with config filter - for (sal_Int32 i=0; i<seqComponents.getLength(); i++) - { - OUString component = seqComponents[i]; - importerArgs[2].Value = uno::makeAny(seqComponents[i]); - try { - aResult = xImporter->execute(importerArgs); - Exception myException; - if (aResult >>= myException) throw myException; - } catch(Exception& aException) { - OString aMsg("Exception in config layer import.\ncomponent: "); - aMsg += OUStringToOString(seqComponents[i], RTL_TEXTENCODING_ASCII_US); - aMsg += "\nmessage: "; - aMsg += OUStringToOString(aException.Message, RTL_TEXTENCODING_ASCII_US); - OSL_ENSURE(sal_False, aMsg.getStr()); - } +typedef std::map< rtl::OUString, componentParts > Components; + +bool getComponent(rtl::OUString const & path, rtl::OUString * component) { + OSL_ASSERT(component != 0); + if (path.getLength() == 0 || path[0] != '/') { + OSL_TRACE( + ("configuration migration in/exclude path %s ignored (does not" + " start with slash)"), + rtl::OUStringToOString(path, RTL_TEXTENCODING_UTF8).getStr()); + return false; + } + sal_Int32 i = path.indexOf('/', 1); + *component = i < 0 ? path.copy(1) : path.copy(1, i - 1); + return true; +} + +} + +void MigrationImpl::copyConfig() { + Components comps; + for (migrations_v::const_iterator i(m_vrMigrations->begin()); + i != m_vrMigrations->end(); ++i) + { + for (strings_v::const_iterator j(i->includeConfig.begin()); + j != i->includeConfig.end(); ++j) + { + rtl::OUString comp; + if (getComponent(*j, &comp)) { + comps[comp].includedPaths.insert(*j); + } + } + for (strings_v::const_iterator j(i->excludeConfig.begin()); + j != i->excludeConfig.end(); ++j) + { + rtl::OUString comp; + if (getComponent(*j, &comp)) { + comps[comp].excludedPaths.insert(*j); } - i_mig++; } } - catch (Exception& e) - { - OString aMsg("Exception in config layer import.\nmessage: "); - aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); - OSL_ENSURE(sal_False, aMsg.getStr()); + for (Components::const_iterator i(comps.begin()); i != comps.end(); ++i) { + if (!i->second.includedPaths.empty()) { + rtl::OUStringBuffer buf(m_aInfo.userdata); + buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("/user/registry/data")); + sal_Int32 n = 0; + do { + rtl::OUString seg(i->first.getToken(0, '.', n)); + rtl::OUString enc( + rtl::Uri::encode( + seg, rtl_UriCharClassPchar, rtl_UriEncodeStrict, + RTL_TEXTENCODING_UTF8)); + if (enc.getLength() == 0 && seg.getLength() != 0) { + OSL_TRACE( + ("configuration migration component %s ignored (cannot" + " be encoded as file path)"), + rtl::OUStringToOString( + i->first, RTL_TEXTENCODING_UTF8).getStr()); + goto next; + } + buf.append(sal_Unicode('/')); + buf.append(enc); + } while (n >= 0); + buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(".xcu")); + configmgr::update::insertModificationXcuFile( + buf.makeStringAndClear(), i->second.includedPaths, + i->second.excludedPaths); + } else { + OSL_TRACE( + ("configuration migration component %s ignored (only excludes," + " no includes)"), + rtl::OUStringToOString( + i->first, RTL_TEXTENCODING_UTF8).getStr()); + } + next:; } } @@ -704,17 +706,8 @@ void MigrationImpl::copyFiles() void MigrationImpl::runServices() { - //create stratum for old user layer - OUString aOldLayerURL = m_aInfo.userdata; - aOldLayerURL += OUString::createFromAscii("/user/registry"); - OUString aStratumSvc = OUString::createFromAscii("com.sun.star.configuration.backend.LocalSingleStratum"); - uno::Sequence< uno::Any > stratumArgs(1); - stratumArgs[0] = uno::makeAny(aOldLayerURL); - uno::Reference< XSingleLayerStratum> xStartum( m_xFactory->createInstanceWithArguments( - aStratumSvc, stratumArgs), uno::UNO_QUERY); - // Build argument array - uno::Sequence< uno::Any > seqArguments(4); + uno::Sequence< uno::Any > seqArguments(3); seqArguments[0] = uno::makeAny(NamedValue( OUString::createFromAscii("Productname"), uno::makeAny(m_aInfo.productname))); @@ -735,34 +728,13 @@ void MigrationImpl::runServices() try { - // create access to old configuration components in the user layer - // that were requested by the migration service - uno::Sequence< NamedValue > seqComponents(i_mig->configComponents.size()); - strings_v::const_iterator i_comp = i_mig->configComponents.begin(); - sal_Int32 i = 0; - while (i_comp != i_mig->configComponents.end() && xStartum.is()) - { - // create Layer for i_comp - seqComponents[i] = NamedValue( - *i_comp, uno::makeAny(xStartum->getLayer(*i_comp, OUString()))); - - // next component - i_comp++; - i++; - } - - // set old config argument - seqArguments[2] = uno::makeAny(NamedValue( - OUString::createFromAscii("OldConfiguration"), - uno::makeAny(seqComponents))); - // set black list for extension migration uno::Sequence< rtl::OUString > seqExtBlackList; sal_uInt32 nSize = i_mig->excludeExtensions.size(); if ( nSize > 0 ) seqExtBlackList = comphelper::arrayToSequence< ::rtl::OUString >( &i_mig->excludeExtensions[0], nSize ); - seqArguments[3] = uno::makeAny(NamedValue( + seqArguments[2] = uno::makeAny(NamedValue( OUString::createFromAscii("ExtensionBlackList"), uno::makeAny( seqExtBlackList ))); @@ -791,17 +763,4 @@ void MigrationImpl::runServices() } } - -strings_vr MigrationImpl::compileServiceList() -{ - strings_vr vrResult(new strings_v); - migrations_v::const_iterator i_migr = m_vrMigrations->begin(); - while (i_migr != m_vrMigrations->end()) - { - vrResult->push_back(i_migr->service); - i_migr++; - } - return vrResult; -} - } // namespace desktop diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx index a1533212ed..9a2980faeb 100644 --- a/desktop/source/migration/migration_impl.hxx +++ b/desktop/source/migration/migration_impl.hxx @@ -64,7 +64,6 @@ struct migration_step strings_v excludeFiles; strings_v includeConfig; strings_v excludeConfig; - strings_v configComponents; strings_v includeExtensions; strings_v excludeExtensions; rtl::OUString service; @@ -92,8 +91,6 @@ private: migrations_vr m_vrMigrations; // list of all migration specs from config install_info m_aInfo; // info about the version being migrated strings_vr m_vrFileList; // final list of files to be copied - strings_vr m_vrConfigList; // final list of nodes to be copied - strings_vr m_vrServiceList; // final list of services to be called // functions to control the migration process bool readAvailableMigrations(migrations_available&); @@ -101,8 +98,6 @@ private: sal_Int32 findPreferedMigrationProcess(const migrations_available&); install_info findInstallation(const strings_v& rVersions); strings_vr compileFileList(); - strings_vr compileConfigList(); - strings_vr compileServiceList(); // helpers void substract(strings_v& va, const strings_v& vb_c) const; diff --git a/desktop/source/splash/makefile.mk b/desktop/source/splash/makefile.mk index 8960968743..2f163fe7b9 100644 --- a/desktop/source/splash/makefile.mk +++ b/desktop/source/splash/makefile.mk @@ -63,6 +63,7 @@ SHL1STDLIBS= \ $(SVLLIB) \ $(SVTOOLLIB) \ $(COMPHELPERLIB) \ + $(CONFIGMGRLIB) \ $(UNOTOOLSLIB) \ $(TOOLSLIB) \ $(UCBHELPERLIB) \ diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx index 72441fa901..333235bf70 100644 --- a/editeng/inc/editeng/svxacorr.hxx +++ b/editeng/inc/editeng/svxacorr.hxx @@ -209,6 +209,8 @@ class EDITENG_DLLPUBLIC SvxAutoCorrect SvxAutoCorrLastFileAskTable_Impl* pLastFileTable; CharClass* pCharClass; + bool bRunNext; + LanguageType eCharClassLang; long nFlags; @@ -374,6 +376,8 @@ public: xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM); + bool HasRunNext() { return bRunNext; } + static long GetDefaultFlags(); // returns TRUE for charcters where the function diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index 89917d77a8..1ead09ce47 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -1129,6 +1129,26 @@ namespace accessibility return aPoint; } + // --> OD 2009-12-16 #i88070# + // fallback to parent's <XAccessibleContext> instance + else + { + uno::Reference< XAccessibleContext > xParentContext = xParent->getAccessibleContext(); + if ( xParentContext.is() ) + { + uno::Reference< XAccessibleComponent > xParentContextComponent( xParentContext, uno::UNO_QUERY ); + if( xParentContextComponent.is() ) + { + awt::Point aRefPoint = xParentContextComponent->getLocationOnScreen(); + awt::Point aPoint = getLocation(); + aPoint.X += aRefPoint.X; + aPoint.Y += aRefPoint.Y; + + return aPoint; + } + } + } + // <-- } throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot access parent")), @@ -1223,7 +1243,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); ::vos::OGuard aGuard( Application::GetSolarMutex() ); - + CheckIndex(nIndex); // may throw IndexOutOfBoundsException // get default attribues... @@ -1254,7 +1274,7 @@ namespace accessibility aAny >>= f1; } int i = 3; - } + } #endif // get resulting sequence @@ -1890,8 +1910,8 @@ namespace accessibility } // XAccessibleTextAttributes - uno::Sequence< beans::PropertyValue > SAL_CALL AccessibleEditableTextPara::getDefaultAttributes( - const uno::Sequence< ::rtl::OUString >& rRequestedAttributes ) + uno::Sequence< beans::PropertyValue > SAL_CALL AccessibleEditableTextPara::getDefaultAttributes( + const uno::Sequence< ::rtl::OUString >& rRequestedAttributes ) throw (uno::RuntimeException) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); @@ -1909,8 +1929,8 @@ namespace accessibility DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::getCharacterAttributes: index value overflow"); - // get XPropertySetInfo for paragraph attributes and - // character attributes that span all the paragraphs text. + // get XPropertySetInfo for paragraph attributes and + // character attributes that span all the paragraphs text. SvxAccessibleTextPropertySet aPropSet( &GetEditSource(), ImplGetSvxCharAndParaPropertiesSet() ); aPropSet.SetSelection( MakeSelection( 0, GetTextLen() ) ); @@ -1957,8 +1977,8 @@ namespace accessibility sal_Int32 nOutLen = 0; for (sal_Int32 i = 0; i < nLength; ++i) { - // calling implementation functions: - // _getPropertyState and _getPropertyValue (see below) to provide + // calling implementation functions: + // _getPropertyState and _getPropertyValue (see below) to provide // the proper paragraph number when retrieving paragraph attributes PropertyState eState = aPropSet._getPropertyState( pProperties->Name, mnParagraphIndex ); if ( eState == PropertyState_AMBIGUOUS_VALUE ) @@ -1967,7 +1987,7 @@ namespace accessibility } //if (eState == PropertyState_DIRECT_VALUE) - // per definition all paragraph properties and all character + // per definition all paragraph properties and all character // properties spanning the whole paragraph should be returned // and declared as default value { @@ -1987,9 +2007,9 @@ namespace accessibility } - uno::Sequence< beans::PropertyValue > SAL_CALL AccessibleEditableTextPara::getRunAttributes( - sal_Int32 nIndex, - const uno::Sequence< ::rtl::OUString >& rRequestedAttributes ) + uno::Sequence< beans::PropertyValue > SAL_CALL AccessibleEditableTextPara::getRunAttributes( + sal_Int32 nIndex, + const uno::Sequence< ::rtl::OUString >& rRequestedAttributes ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); @@ -2046,7 +2066,7 @@ namespace accessibility } else aProperties = xPropSetInfo->getProperties(); - + sal_Int32 nLength = aProperties.getLength(); const beans::Property *pProperties = aProperties.getConstArray(); @@ -2056,7 +2076,7 @@ namespace accessibility sal_Int32 nOutLen = 0; for (sal_Int32 i = 0; i < nLength; ++i) { - // calling 'regular' functions that will operate on the selection + // calling 'regular' functions that will operate on the selection PropertyState eState = aPropSet.getPropertyState( pProperties->Name ); if (eState == PropertyState_DIRECT_VALUE) { @@ -2160,7 +2180,7 @@ namespace accessibility sal_Int32 nRes = -1; sal_Int32 nPara = GetParagraphIndex(); - + SvxTextForwarder &rCacheTF = GetTextForwarder(); const bool bValidPara = 0 <= nPara && nPara < rCacheTF.GetParagraphCount(); DBG_ASSERT( bValidPara, "getLineNumberAtIndex: current paragraph index out of range" ); @@ -2168,7 +2188,7 @@ namespace accessibility { // we explicitly allow for the index to point at the character right behind the text if (0 <= nIndex && nIndex <= rCacheTF.GetTextLen( static_cast< USHORT >(nPara) )) - nRes = rCacheTF.GetLineNumberAtIndex( static_cast< USHORT >(nPara), static_cast< USHORT >(nIndex) ); + nRes = rCacheTF.GetLineNumberAtIndex( static_cast< USHORT >(nPara), static_cast< USHORT >(nIndex) ); else throw lang::IndexOutOfBoundsException(); } @@ -2179,7 +2199,7 @@ namespace accessibility ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleEditableTextPara::getTextAtLineNumber( sal_Int32 nLineNo ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - + ::com::sun::star::accessibility::TextSegment aResult; sal_Int32 nPara = GetParagraphIndex(); SvxTextForwarder &rCacheTF = GetTextForwarder(); @@ -2203,8 +2223,8 @@ namespace accessibility { // this is not the exception that should be raised in this function ... DBG_ASSERT( 0, "unexpected exception" ); - } - } + } + } } else throw lang::IndexOutOfBoundsException(); @@ -2216,7 +2236,7 @@ namespace accessibility ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleEditableTextPara::getTextAtLineWithCaret( ) throw (uno::RuntimeException) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - + ::com::sun::star::accessibility::TextSegment aResult; try { @@ -2225,7 +2245,7 @@ namespace accessibility catch (lang::IndexOutOfBoundsException &) { // this one needs to be catched since this interface does not allow for it. - } + } return aResult; } @@ -2233,7 +2253,7 @@ namespace accessibility sal_Int32 SAL_CALL AccessibleEditableTextPara::getNumberOfLineWithCaret( ) throw (uno::RuntimeException) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - + sal_Int32 nRes = -1; try { @@ -2242,7 +2262,7 @@ namespace accessibility catch (lang::IndexOutOfBoundsException &) { // this one needs to be catched since this interface does not allow for it. - } + } return nRes; } diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index ef1b0c1db9..fd06f8b68c 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -49,6 +49,7 @@ #include <eerdll2.hxx> #include <editeng/eerdll.hxx> #include <editeng.hrc> +#include <editeng/acorrcfg.hxx> #include <editeng/flditem.hxx> #include <editeng/txtrange.hxx> #include <vcl/graph.hxx> @@ -1144,8 +1145,10 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie xub_Unicode nCharCode = rKeyEvent.GetCharCode(); pEditView->pImpEditView->DrawSelection(); // Autokorrektur ? + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); if ( ( pImpEditEngine->GetStatus().DoAutoCorrect() ) && - SvxAutoCorrect::IsAutoCorrectChar( nCharCode ) ) + ( SvxAutoCorrect::IsAutoCorrectChar( nCharCode ) || + pAutoCorrect->HasRunNext() ) ) { aCurSel = pImpEditEngine->AutoCorrect( aCurSel, nCharCode, !pEditView->IsInsertMode() ); } diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index ebc025fea7..78edae142d 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -363,7 +363,7 @@ SvxAutoCorrect::SvxAutoCorrect( const String& rShareAutocorrFile, sUserAutoCorrFile( rUserAutocorrFile ), pLangTable( new SvxAutoCorrLanguageTable_Impl ), pLastFileTable( new SvxAutoCorrLastFileAskTable_Impl ), - pCharClass( 0 ), + pCharClass( 0 ), bRunNext( false ), cStartDQuote( 0 ), cEndDQuote( 0 ), cStartSQuote( 0 ), cEndSQuote( 0 ) { nFlags = SvxAutoCorrect::GetDefaultFlags(); @@ -380,7 +380,7 @@ SvxAutoCorrect::SvxAutoCorrect( const SvxAutoCorrect& rCpy ) pLangTable( new SvxAutoCorrLanguageTable_Impl ), pLastFileTable( new SvxAutoCorrLastFileAskTable_Impl ), - pCharClass( 0 ), + pCharClass( 0 ), bRunNext( false ), nFlags( rCpy.nFlags & ~(ChgWordLstLoad|CplSttLstLoad|WrdSttLstLoad)), cStartDQuote( rCpy.cStartDQuote ), cEndDQuote( rCpy.cEndDQuote ), @@ -669,7 +669,7 @@ BOOL SvxAutoCorrect::FnAddNonBrkSpace( // Check the presence of "://" in the word xub_StrLen nStrPos = rTxt.Search( String::CreateFromAscii( "://" ), nSttWdPos + 1 ); - if ( STRING_NOTFOUND == nStrPos ) + if ( STRING_NOTFOUND == nStrPos && nEndPos > 0 ) { // Check the previous char sal_Unicode cPrevChar = rTxt.GetChar( nEndPos - 1 ); @@ -693,9 +693,12 @@ BOOL SvxAutoCorrect::FnAddNonBrkSpace( // Add the non-breaking space at the end pos if ( bHasSpace ) rDoc.Insert( nPos, CHAR_HARDBLANK ); + bRunNext = true; bRet = true; } } + else if ( chars.indexOf( sal_Unicode( cPrevChar ) ) != -1 ) + bRunNext = true; } } else if ( cChar == '/' ) @@ -1189,6 +1192,9 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, BOOL bInsert ) { ULONG nRet = 0; + bool bIsNextRun = bRunNext; + bRunNext = false; // if it was set, then it has to be turned off + do{ // only for middle check loop !! if( cChar ) { @@ -1227,10 +1233,39 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, rDoc.Replace( nInsPos, cChar ); // Hardspaces autocorrection - if ( NeedsHardspaceAutocorr( cChar ) && IsAutoCorrFlag( AddNonBrkSpace ) && - FnAddNonBrkSpace( rDoc, rTxt, 0, nInsPos, rDoc.GetLanguage( nInsPos, FALSE ) ) ) + if ( IsAutoCorrFlag( AddNonBrkSpace ) ) { - nRet = AddNonBrkSpace; + if ( NeedsHardspaceAutocorr( cChar ) && + FnAddNonBrkSpace( rDoc, rTxt, 0, nInsPos, rDoc.GetLanguage( nInsPos, FALSE ) ) ) + { + nRet = AddNonBrkSpace; + } + else if ( bIsNextRun && !IsAutoCorrectChar( cChar ) ) + { + // Remove the NBSP if it wasn't an autocorrection + if ( NeedsHardspaceAutocorr( rTxt.GetChar( nInsPos - 1 ) ) && + cChar != ' ' && cChar != '\t' && cChar != CHAR_HARDBLANK ) + { + // Look for the last HARD_SPACE + xub_StrLen nPos = nInsPos - 1; + bool bFound = false; + while ( nPos != STRING_NOTFOUND && !bFound ) + { + sal_Unicode cTmpChar = rTxt.GetChar( nPos ); + if ( cTmpChar == CHAR_HARDBLANK ) + bFound = true; + else if ( !NeedsHardspaceAutocorr( cTmpChar ) ) + nPos = STRING_NOTFOUND; + nPos--; + } + + if ( bFound && nPos != STRING_NOTFOUND ) + { + rDoc.Delete( nPos + 1, nPos + 2 ); + nRet = AddNonBrkSpace; + } + } + } } } diff --git a/framework/inc/classes/xmlnamespaces.hxx b/framework/inc/classes/xmlnamespaces.hxx deleted file mode 100644 index 23ca22cf93..0000000000 --- a/framework/inc/classes/xmlnamespaces.hxx +++ /dev/null @@ -1,65 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef __FRAMEWORK_CLASSES_XMLNAMESPACES_HXX_ -#define __FRAMEWORK_CLASSES_XMLNAMESPACES_HXX_ - -#include <com/sun/star/xml/sax/SAXException.hpp> - -#include <map> - -namespace framework -{ - -class XMLNamespaces -{ - public: - XMLNamespaces(); - XMLNamespaces( const XMLNamespaces& ); - virtual ~XMLNamespaces(); - - void addNamespace( const ::rtl::OUString& aName, const ::rtl::OUString& aValue ) - throw( ::com::sun::star::xml::sax::SAXException ); - - ::rtl::OUString applyNSToAttributeName( const ::rtl::OUString& ) const - throw( ::com::sun::star::xml::sax::SAXException ); - ::rtl::OUString applyNSToElementName( const ::rtl::OUString& ) const - throw( ::com::sun::star::xml::sax::SAXException ); - - private: - typedef ::std::map< ::rtl::OUString, ::rtl::OUString > NamespaceMap; - - ::rtl::OUString getNamespaceValue( const ::rtl::OUString& aNamespace ) const - throw( ::com::sun::star::xml::sax::SAXException ); - - ::rtl::OUString m_aDefaultNamespace; - NamespaceMap m_aNamespaceMap; -}; - -} - -#endif // __FRAMEWORK_XMLNAMESPACES_HXX_ diff --git a/framework/inc/framework.hrc b/framework/inc/framework.hrc index bea7dede55..b1abc91cab 100644 --- a/framework/inc/framework.hrc +++ b/framework/inc/framework.hrc @@ -51,19 +51,10 @@ #define STR_BACKING_CREATE 3 #define STR_BACKING_TEMPLATE 4 #define STR_BACKING_FILE 5 -#define BMP_BACKING_WRITER 6 -#define BMP_BACKING_CALC 7 -#define BMP_BACKING_IMPRESS 8 -#define BMP_BACKING_DRAW 9 -#define BMP_BACKING_DATABASE 10 -#define BMP_BACKING_FORMULA 11 -#define BMP_BACKING_OPENFILE 12 -#define BMP_BACKING_OPENTEMPLATE 13 -#define STR_BACKING_EXTHELP 15 -#define STR_BACKING_REGHELP 17 -#define STR_BACKING_INFOHELP 19 -#define STR_BACKING_TPLREP 21 -#define BMP_BACKING_FOLDER 22 +#define STR_BACKING_EXTHELP 6 +#define STR_BACKING_REGHELP 7 +#define STR_BACKING_INFOHELP 8 +#define STR_BACKING_TPLREP 9 #define RES_BACKING_IMAGES (DLG_BACKING+1) #define RES_BACKING_IMAGES_HC (DLG_BACKING+2) @@ -77,6 +68,14 @@ #define BMP_BACKING_REG 7 #define BMP_BACKING_INFO 8 #define BMP_BACKING_TPLREP 9 +#define BMP_BACKING_WRITER 10 +#define BMP_BACKING_CALC 11 +#define BMP_BACKING_IMPRESS 12 +#define BMP_BACKING_DRAW 13 +#define BMP_BACKING_DATABASE 14 +#define BMP_BACKING_FORMULA 15 +#define BMP_BACKING_OPENFILE 16 +#define BMP_BACKING_OPENTEMPLATE 17 // Ids of TabWindow #define WIN_TABWINDOW (RID_FWK_DIALOG_START+101) diff --git a/framework/inc/xml/toolboxlayoutdocumenthandler.hxx b/framework/inc/xml/toolboxlayoutdocumenthandler.hxx deleted file mode 100644 index ff4c668ede..0000000000 --- a/framework/inc/xml/toolboxlayoutdocumenthandler.hxx +++ /dev/null @@ -1,59 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef __FRAMEWORK_XML_TOOLBOXLAYOUTDOCUMENTHANDLER_HXX_ -#define __FRAMEWORK_XML_TOOLBOXLAYOUTDOCUMENTHANDLER_HXX_ - -#include <xml/toolboxconfiguration.hxx> - -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ - -#ifndef __COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_ -#include <com/sun/star/xml/sax/XDocumentHandler.hpp> -#endif - -//_________________________________________________________________________________________________________________ -// other includes -//_________________________________________________________________________________________________________________ -#include <threadhelp/threadhelpbase.hxx> -#include <rtl/ustring.hxx> -#include <cppuhelper/weak.hxx> - -#include <hash_map> -#include <stdtypes.h> - -//_________________________________________________________________________________________________________________ -// namespace -//_________________________________________________________________________________________________________________ - -namespace framework{ - -} // namespace framework - -#endif diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index e9938aecf0..fb28da5774 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -133,7 +133,8 @@ BackingWindow::BackingWindow( Window* i_pParent ) : mbInitControls( false ), mnLayoutStyle( 0 ), mpAccExec( NULL ), - mnBtnPos( 120 ) + mnBtnPos( 120 ), + mnBtnTop( 150 ) { mnColumnWidth[0] = mnColumnWidth[1] = 0; mnTextColumnWidth[0] = mnTextColumnWidth[1] = 0; @@ -163,16 +164,6 @@ BackingWindow::BackingWindow( Window* i_pParent ) : { } - // get icon images from vcl resource and set them on the appropriate buttons - loadImage( FwkResId( BMP_BACKING_WRITER ), maWriterButton ); - loadImage( FwkResId( BMP_BACKING_CALC ), maCalcButton ); - loadImage( FwkResId( BMP_BACKING_IMPRESS ), maImpressButton ); - loadImage( FwkResId( BMP_BACKING_DRAW ), maDrawButton ); - loadImage( FwkResId( BMP_BACKING_DATABASE ), maDBButton ); - loadImage( FwkResId( BMP_BACKING_FORMULA ), maMathButton ); - loadImage( FwkResId( BMP_BACKING_FOLDER ), maOpenButton ); - loadImage( FwkResId( BMP_BACKING_FOLDER ), maTemplateButton ); - String aExtHelpText( FwkResId( STR_BACKING_EXTHELP ) ); String aRegHelpText( FwkResId( STR_BACKING_REGHELP ) ); String aInfoHelpText( FwkResId( STR_BACKING_INFOHELP ) ); @@ -187,10 +178,6 @@ BackingWindow::BackingWindow( Window* i_pParent ) : SetStyle( GetStyle() | WB_DIALOGCONTROL ); - // add some breathing space for the images - maButtonImageSize.Width() += 12; - maButtonImageSize.Height() += 12; - // force tab cycling in toolbox maToolbox.SetStyle( maToolbox.GetStyle() | WB_FORCETABCYCLE ); @@ -236,6 +223,11 @@ BackingWindow::BackingWindow( Window* i_pParent ) : // init background initBackground(); + + // add some breathing space for the images + maButtonImageSize.Width() += 12; + maButtonImageSize.Height() += 12; + } @@ -324,6 +316,17 @@ void BackingWindow::initBackground() else mnBtnPos = maBackgroundLeft.GetSizePixel().Width() + 40; } + + // get icon images from fwk resource and set them on the appropriate buttons + loadImage( FwkResId( BMP_BACKING_WRITER ), maWriterButton ); + loadImage( FwkResId( BMP_BACKING_CALC ), maCalcButton ); + loadImage( FwkResId( BMP_BACKING_IMPRESS ), maImpressButton ); + loadImage( FwkResId( BMP_BACKING_DRAW ), maDrawButton ); + loadImage( FwkResId( BMP_BACKING_DATABASE ), maDBButton ); + loadImage( FwkResId( BMP_BACKING_FORMULA ), maMathButton ); + loadImage( FwkResId( BMP_BACKING_OPENFILE ), maOpenButton ); + loadImage( FwkResId( BMP_BACKING_OPENTEMPLATE ), maTemplateButton ); + } void BackingWindow::initControls() @@ -550,7 +553,7 @@ void BackingWindow::layoutButton( long nTextWidth = i_rBtn.GetTextWidth( i_rBtn.GetText() ); - nTextWidth += maButtonImageSize.Width(); + nTextWidth += maButtonImageSize.Width() + 8; // add some fuzz to be on the safe side if( nColumn >= 0 && nColumn < static_cast<int>(sizeof(mnColumnWidth)/sizeof(mnColumnWidth[0])) ) { if( nTextWidth > mnColumnWidth[nColumn] ) @@ -732,6 +735,9 @@ void BackingWindow::Resize() nYPos += nPDelta - nDiff; nYPos += nWDelta/2 - nDiff; + + if( mnLayoutStyle != 1 ) + nYPos = maControlRect.Top() + mnBtnTop; maWriterButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos, nYPos ), Size( mnTextColumnWidth[0], maButtonImageSize.Height() ) ); maDrawButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos + mnColumnWidth[0], nYPos ), Size( mnTextColumnWidth[1], maButtonImageSize.Height() ) ); diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx index 45fe60f67f..e1ad2ca457 100644 --- a/framework/source/services/backingwindow.hxx +++ b/framework/source/services/backingwindow.hxx @@ -121,7 +121,8 @@ namespace framework sal_Int32 mnLayoutStyle; svt::AcceleratorExecute* mpAccExec; long mnBtnPos; - + long mnBtnTop; + static const int nItemId_Extensions = 1; static const int nItemId_Reg = 2; static const int nItemId_Info = 3; diff --git a/framework/source/services/fwk_services.src b/framework/source/services/fwk_services.src index 7329b381c1..fbc83db937 100644 --- a/framework/source/services/fwk_services.src +++ b/framework/source/services/fwk_services.src @@ -53,34 +53,6 @@ Window DLG_BACKING { Text [ en-US ] = "~Open a document..."; }; - Bitmap BMP_BACKING_WRITER - { - File = "odt_32.png"; - }; - Bitmap BMP_BACKING_CALC - { - File = "ods_32.png"; - }; - Bitmap BMP_BACKING_IMPRESS - { - File = "odp_32.png"; - }; - Bitmap BMP_BACKING_DRAW - { - File = "odg_32.png"; - }; - Bitmap BMP_BACKING_DATABASE - { - File = "odb_32.png"; - }; - Bitmap BMP_BACKING_FORMULA - { - File = "odf_32.png"; - }; - Bitmap BMP_BACKING_FOLDER - { - File = "folder_32.png"; - }; String STR_BACKING_EXTHELP { Text [ en-US ] = "Add new features to %PRODUCTNAME"; @@ -137,6 +109,38 @@ Resource RES_BACKING_IMAGES { File = "addtemplate_32.png"; }; + Bitmap BMP_BACKING_WRITER + { + File = "odt_32.png"; + }; + Bitmap BMP_BACKING_CALC + { + File = "ods_32.png"; + }; + Bitmap BMP_BACKING_IMPRESS + { + File = "odp_32.png"; + }; + Bitmap BMP_BACKING_DRAW + { + File = "odg_32.png"; + }; + Bitmap BMP_BACKING_DATABASE + { + File = "odb_32.png"; + }; + Bitmap BMP_BACKING_FORMULA + { + File = "odf_32.png"; + }; + Bitmap BMP_BACKING_OPENFILE + { + File = "folder_32.png"; + }; + Bitmap BMP_BACKING_OPENTEMPLATE + { + File = "templates_32.png"; + }; }; Resource RES_BACKING_IMAGES_HC @@ -177,6 +181,38 @@ Resource RES_BACKING_IMAGES_HC { File = "template_hc.png"; }; + Bitmap BMP_BACKING_WRITER + { + File = "odt_32_hc.png"; + }; + Bitmap BMP_BACKING_CALC + { + File = "ods_32_hc.png"; + }; + Bitmap BMP_BACKING_IMPRESS + { + File = "odp_32_hc.png"; + }; + Bitmap BMP_BACKING_DRAW + { + File = "odg_32_hc.png"; + }; + Bitmap BMP_BACKING_DATABASE + { + File = "odb_32_hc.png"; + }; + Bitmap BMP_BACKING_FORMULA + { + File = "odf_32_hc.png"; + }; + Bitmap BMP_BACKING_OPENFILE + { + File = "folder_32_hc.png"; + }; + Bitmap BMP_BACKING_OPENTEMPLATE + { + File = "templates_32_hc.png"; + }; }; Window WIN_TABWINDOW diff --git a/framework/source/uielement/rootitemcontainer.cxx b/framework/source/uielement/rootitemcontainer.cxx index c0d79b6f8b..eeeb621613 100644 --- a/framework/source/uielement/rootitemcontainer.cxx +++ b/framework/source/uielement/rootitemcontainer.cxx @@ -127,7 +127,6 @@ RootItemContainer::RootItemContainer( const Reference< XIndexAccess >& rSourceCo Reference< XPropertySet > xPropSet( rSourceContainer, UNO_QUERY ); if ( xPropSet.is() ) { - rtl::OUString aUIName; xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))) >>= m_aUIName; } } diff --git a/framework/source/xml/makefile.mk b/framework/source/xml/makefile.mk index dd40af0cbe..a4f18a555a 100644 --- a/framework/source/xml/makefile.mk +++ b/framework/source/xml/makefile.mk @@ -47,7 +47,6 @@ SLOFILES= \ $(SLO)$/statusbardocumenthandler.obj \ $(SLO)$/toolboxconfiguration.obj \ $(SLO)$/toolboxdocumenthandler.obj \ - $(SLO)$/toolboxlayoutdocumenthandler.obj \ $(SLO)$/saxnamespacefilter.obj \ $(SLO)$/xmlnamespaces.obj \ $(SLO)$/acceleratorconfigurationreader.obj \ diff --git a/framework/source/xml/toolboxconfiguration.cxx b/framework/source/xml/toolboxconfiguration.cxx index 6ef6d36b94..4ed368af21 100644 --- a/framework/source/xml/toolboxconfiguration.cxx +++ b/framework/source/xml/toolboxconfiguration.cxx @@ -30,7 +30,6 @@ #include "precompiled_framework.hxx" #include <xml/toolboxconfiguration.hxx> #include <xml/toolboxdocumenthandler.hxx> -#include <xml/toolboxlayoutdocumenthandler.hxx> #include <xml/saxnamespacefilter.hxx> #include <services.h> diff --git a/framework/source/xml/toolboxlayoutdocumenthandler.cxx b/framework/source/xml/toolboxlayoutdocumenthandler.cxx deleted file mode 100644 index 039eaffad2..0000000000 --- a/framework/source/xml/toolboxlayoutdocumenthandler.cxx +++ /dev/null @@ -1,58 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_framework.hxx" - -#include <stdio.h> - -//_________________________________________________________________________________________________________________ -// my own includes -//_________________________________________________________________________________________________________________ - -#include <threadhelp/resetableguard.hxx> -#include <xml/toolboxlayoutdocumenthandler.hxx> -#include <macros/debug.hxx> -#include <xml/toolboxconfigurationdefines.hxx> - -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ - -#ifndef __COM_SUN_STAR_XML_SAX_XEXTENDEDDOCUMENTHANDLER_HPP_ -#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> -#endif - -//_________________________________________________________________________________________________________________ -// other includes -//_________________________________________________________________________________________________________________ -#include <vcl/svapp.hxx> -#include <vcl/toolbox.hxx> - -//_________________________________________________________________________________________________________________ -// namespace -//_________________________________________________________________________________________________________________ diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk index 65edaff42d..b1b7c691d2 100644 --- a/framework/util/makefile.mk +++ b/framework/util/makefile.mk @@ -79,7 +79,6 @@ LIB2OBJFILES= \ $(SLO)$/statusbardocumenthandler.obj \ $(SLO)$/toolboxconfiguration.obj \ $(SLO)$/toolboxdocumenthandler.obj \ - $(SLO)$/toolboxlayoutdocumenthandler.obj \ $(SLO)$/imagesconfiguration.obj \ $(SLO)$/imagesdocumenthandler.obj \ $(SLO)$/xmlnamespaces.obj \ diff --git a/officecfg/registry/component-update.dtd b/officecfg/registry/component-update.dtd index 51623f40ba..81acc5e35e 100644 --- a/officecfg/registry/component-update.dtd +++ b/officecfg/registry/component-update.dtd @@ -113,7 +113,8 @@ <!ELEMENT oor:items (item*)> <!ATTLIST oor:items> -<!ELEMENT item ((prop | node)*)> +<!ELEMENT item ((node | prop | value)*)> <!ATTLIST item oor:path CDATA #REQUIRED> - <!-- the absolute path representation of a set or group node --> + <!-- the absolute path representation of a localized property or a group + or set node --> diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu index 722ed4df10..bb3c7795a4 100644 --- a/officecfg/registry/data/org/openoffice/Office/Common.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu @@ -134,7 +134,7 @@ <prop oor:name="TemplateRepositoryURL" oor:type="xs:string"> <value>${STARTCENTER_TEMPLREP_URL}</value> </prop> - <prop oor:name="StartCenterLayoutStyle" oor:type="xs:int"> + <prop oor:name="StartCenterLayoutStyle" oor:type="xs:int" install:module="brand"> <value>${STARTCENTER_LAYOUT_STYLE}</value> </prop> </node> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ChartWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/ChartWindowState.xcu index 2397810ed2..3d3c89ab15 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/ChartWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/ChartWindowState.xcu @@ -73,6 +73,90 @@ <value>true</value> </prop> </node> + <node oor:name="private:resource/toolbar/basicshapes" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Basic Shapes</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/symbolshapes" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Symbol Shapes</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/arrowshapes" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Block Arrows</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/flowchartshapes" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Flowchart</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/calloutshapes" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Callouts</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/starshapes" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Stars and Banners</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> </node> </node> </oor:component-data> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu index d57d1b3b4d..38bfc08b2e 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu @@ -229,7 +229,7 @@ <value>com.sun.star.comp.chart.ElementSelectorToolbarController</value> </prop> </node> - <node oor:name="c4" oor:op="replace"> + <node oor:name="com.sun.star.chart2.BasicShapesToolbarController" oor:op="replace"> <prop oor:name="Command"> <value>.uno:BasicShapes</value> </prop> @@ -237,10 +237,10 @@ <value>com.sun.star.chart2.ChartDocument</value> </prop> <prop oor:name="Controller"> - <value>com.sun.star.chart2.comp.ShapeToolbarController</value> + <value>com.sun.star.comp.chart2.ShapeToolbarController</value> </prop> </node> - <node oor:name="c5" oor:op="replace"> + <node oor:name="com.sun.star.chart2.SymbolShapesToolbarController" oor:op="replace"> <prop oor:name="Command"> <value>.uno:SymbolShapes</value> </prop> @@ -248,10 +248,10 @@ <value>com.sun.star.chart2.ChartDocument</value> </prop> <prop oor:name="Controller"> - <value>com.sun.star.chart2.comp.ShapeToolbarController</value> + <value>com.sun.star.comp.chart2.ShapeToolbarController</value> </prop> </node> - <node oor:name="c6" oor:op="replace"> + <node oor:name="com.sun.star.chart2.ArrowShapesToolbarController" oor:op="replace"> <prop oor:name="Command"> <value>.uno:ArrowShapes</value> </prop> @@ -259,10 +259,10 @@ <value>com.sun.star.chart2.ChartDocument</value> </prop> <prop oor:name="Controller"> - <value>com.sun.star.chart2.comp.ShapeToolbarController</value> + <value>com.sun.star.comp.chart2.ShapeToolbarController</value> </prop> </node> - <node oor:name="c7" oor:op="replace"> + <node oor:name="com.sun.star.chart2.FlowChartShapesToolbarController" oor:op="replace"> <prop oor:name="Command"> <value>.uno:FlowChartShapes</value> </prop> @@ -270,10 +270,10 @@ <value>com.sun.star.chart2.ChartDocument</value> </prop> <prop oor:name="Controller"> - <value>com.sun.star.chart2.comp.ShapeToolbarController</value> + <value>com.sun.star.comp.chart2.ShapeToolbarController</value> </prop> </node> - <node oor:name="c8" oor:op="replace"> + <node oor:name="com.sun.star.chart2.CalloutShapesToolbarController" oor:op="replace"> <prop oor:name="Command"> <value>.uno:CalloutShapes</value> </prop> @@ -281,10 +281,10 @@ <value>com.sun.star.chart2.ChartDocument</value> </prop> <prop oor:name="Controller"> - <value>com.sun.star.chart2.comp.ShapeToolbarController</value> + <value>com.sun.star.comp.chart2.ShapeToolbarController</value> </prop> </node> - <node oor:name="c9" oor:op="replace"> + <node oor:name="com.sun.star.chart2.StarShapesToolbarController" oor:op="replace"> <prop oor:name="Command"> <value>.uno:StarShapes</value> </prop> @@ -292,7 +292,7 @@ <value>com.sun.star.chart2.ChartDocument</value> </prop> <prop oor:name="Controller"> - <value>com.sun.star.chart2.comp.ShapeToolbarController</value> + <value>com.sun.star.comp.chart2.ShapeToolbarController</value> </prop> </node> </node> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu index 385617f693..4a316a7c32 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu @@ -705,7 +705,21 @@ <prop oor:name="ContextSensitive" oor:type="xs:boolean"> <value>true</value> </prop> - </node> - </node> + </node> + <node oor:name="private:resource/toolbar/optimizetablebar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Optimize</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + </node> </node> </oor:component-data> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu index af45c79cdf..f887055161 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu @@ -800,7 +800,21 @@ <prop oor:name="ContextSensitive" oor:type="xs:boolean"> <value>true</value> </prop> - </node> - </node> + </node> + <node oor:name="private:resource/toolbar/optimizetablebar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Optimize</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + </node> </node> </oor:component-data> diff --git a/officecfg/registry/data/org/openoffice/Office/Writer.xcu b/officecfg/registry/data/org/openoffice/Office/Writer.xcu index d19e9e5d78..8add2a0aa1 100644 --- a/officecfg/registry/data/org/openoffice/Office/Writer.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Writer.xcu @@ -40,7 +40,7 @@ <prop oor:name="IsHideEmptyParagraphs" > <value>true</value> </prop> - <prop oor:name="EMailSupported" install:module="javamail"> + <prop oor:name="EMailSupported"> <value>true</value> </prop> </node> diff --git a/officecfg/registry/data/org/openoffice/Office/makefile.mk b/officecfg/registry/data/org/openoffice/Office/makefile.mk index 5cd876f75b..e65b03371d 100644 --- a/officecfg/registry/data/org/openoffice/Office/makefile.mk +++ b/officecfg/registry/data/org/openoffice/Office/makefile.mk @@ -88,7 +88,6 @@ MODULEFILES= \ Paths-unxwnt.xcu \ Paths-unixdesktop.xcu \ Writer-cjk.xcu \ - Writer-javamail.xcu \ Impress-ogltrans.xcu \ Embedding-calc.xcu \ Embedding-chart.xcu \ diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu b/officecfg/registry/data/org/openoffice/Setup.xcu index 087e2cf6c5..5afb19f394 100755 --- a/officecfg/registry/data/org/openoffice/Setup.xcu +++ b/officecfg/registry/data/org/openoffice/Setup.xcu @@ -767,14 +767,14 @@ <prop oor:name="ExcludedFiles"> </prop> <prop oor:name="IncludedNodes"> - <value>org.openoffice.Office.DataAccess</value> + <value>/org.openoffice.Office.DataAccess</value> </prop> <prop oor:name="ExcludedNodes"> <value> - org.openoffice.Office.DataAccess/Bibliography - org.openoffice.Office.DataAccess/ConnectionPool - org.openoffice.Office.DataAccess/DataSources - org.openoffice.Office.DataAccess/DriverManager + <it>/org.openoffice.Office.DataAccess/Bibliography</it> + <it>/org.openoffice.Office.DataAccess/ConnectionPool</it> + <it>/org.openoffice.Office.DataAccess/DataSources</it> + <it>/org.openoffice.Office.DataAccess/DriverManager</it> </value> </prop> </node> @@ -785,9 +785,7 @@ </node> <node oor:name="Inet" oor:op="replace"> <prop oor:name="IncludedNodes"> - <value> - org.openoffice.Inet - </value> + <value>/org.openoffice.Inet</value> </prop> </node> <node oor:name="Basic" oor:op="replace"> @@ -797,7 +795,7 @@ </node> <node oor:name="UserProfile" oor:op="replace"> <prop oor:name="IncludedNodes"> - <value>org.openoffice.UserProfile</value> + <value>/org.openoffice.UserProfile</value> </prop> </node> <node oor:name="Common" oor:op="replace"> @@ -814,77 +812,77 @@ </prop> <prop oor:name="IncludedNodes"> <value> - org.openoffice.Office.Compatibility - org.openoffice.Office.Custom - org.openoffice.Office.Embedding - org.openoffice.Office.Events - org.openoffice.Office.ExtendedColorScheme - org.openoffice.Office.Common/Accessibility - org.openoffice.Office.Common/Accessibility/AutoDetectSystemHC - org.openoffice.Office.Common/AsianLayout - org.openoffice.Office.Common/AutoCorrect - org.openoffice.Office.Common/Cache - org.openoffice.Office.Common/DateFormat - org.openoffice.Office.Common/ExternalMailer/Program - org.openoffice.Office.Common/Filter - org.openoffice.Office.Common/Font - org.openoffice.Office.Common/Forms - org.openoffice.Office.Common/Gallery - org.openoffice.Office.Common/Help - org.openoffice.Office.Common/History - org.openoffice.Office.Common/I18N - org.openoffice.Office.Common/InternalMSExport - org.openoffice.Office.Common/Load - org.openoffice.Office.Common/Misc/FormControlPilotsEnabled - org.openoffice.Office.Common/Misc/PluginsEnabled - org.openoffice.Office.Common/Misc/SymbolSet - org.openoffice.Office.Common/Misc/UseSystemFileDialog - org.openoffice.Office.Common/Misc/UseSystemPrintDialog - org.openoffice.Office.Common/Misc/SymbolStyle - org.openoffice.Office.Common/Passwords - org.openoffice.Office.Common/Print/PrintingModifiesDocument - org.openoffice.Office.Common/Print/Warning - org.openoffice.Office.Common/Vectorize - org.openoffice.Office.Common/Save - org.openoffice.Office.Common/SearchOptions - org.openoffice.Office.Common/Undo - org.openoffice.Office.Common/View/Dialog/Dialog/MiddleMouseButton - org.openoffice.Office.Common/View/Dialog/MousePositioning - org.openoffice.Office.Common/View/Localization - org.openoffice.Office.Common/View/Menu - org.openoffice.Office.Common/_3D_Engine + <it>/org.openoffice.Office.Compatibility</it> + <it>/org.openoffice.Office.Custom</it> + <it>/org.openoffice.Office.Embedding</it> + <it>/org.openoffice.Office.Events</it> + <it>/org.openoffice.Office.ExtendedColorScheme</it> + <it>/org.openoffice.Office.Common/Accessibility</it> + <it>/org.openoffice.Office.Common/Accessibility/AutoDetectSystemHC</it> + <it>/org.openoffice.Office.Common/AsianLayout</it> + <it>/org.openoffice.Office.Common/AutoCorrect</it> + <it>/org.openoffice.Office.Common/Cache</it> + <it>/org.openoffice.Office.Common/DateFormat</it> + <it>/org.openoffice.Office.Common/ExternalMailer/Program</it> + <it>/org.openoffice.Office.Common/Filter</it> + <it>/org.openoffice.Office.Common/Font</it> + <it>/org.openoffice.Office.Common/Forms</it> + <it>/org.openoffice.Office.Common/Gallery</it> + <it>/org.openoffice.Office.Common/Help</it> + <it>/org.openoffice.Office.Common/History</it> + <it>/org.openoffice.Office.Common/I18N</it> + <it>/org.openoffice.Office.Common/InternalMSExport</it> + <it>/org.openoffice.Office.Common/Load</it> + <it>/org.openoffice.Office.Common/Misc/FormControlPilotsEnabled</it> + <it>/org.openoffice.Office.Common/Misc/PluginsEnabled</it> + <it>/org.openoffice.Office.Common/Misc/SymbolSet</it> + <it>/org.openoffice.Office.Common/Misc/UseSystemFileDialog</it> + <it>/org.openoffice.Office.Common/Misc/UseSystemPrintDialog</it> + <it>/org.openoffice.Office.Common/Misc/SymbolStyle</it> + <it>/org.openoffice.Office.Common/Passwords</it> + <it>/org.openoffice.Office.Common/Print/PrintingModifiesDocument</it> + <it>/org.openoffice.Office.Common/Print/Warning</it> + <it>/org.openoffice.Office.Common/Vectorize</it> + <it>/org.openoffice.Office.Common/Save</it> + <it>/org.openoffice.Office.Common/SearchOptions</it> + <it>/org.openoffice.Office.Common/Undo</it> + <it>/org.openoffice.Office.Common/View/Dialog/Dialog/MiddleMouseButton</it> + <it>/org.openoffice.Office.Common/View/Dialog/MousePositioning</it> + <it>/org.openoffice.Office.Common/View/Localization</it> + <it>/org.openoffice.Office.Common/View/Menu</it> + <it>/org.openoffice.Office.Common/_3D_Engine</it> </value> </prop> <prop oor:name="ExcludedNodes"> <value> - org.openoffice.Office.Common/_3D_Engine/OpenGL - org.openoffice.Office.Common/Help/Registration + <it>/org.openoffice.Office.Common/_3D_Engine/OpenGL</it> + <it>/org.openoffice.Office.Common/Help/Registration</it> </value> </prop> </node> <node oor:name="Calc" oor:op="replace"> <prop oor:name="IncludedNodes"> - <value>org.openoffice.Office.Calc</value> + <value>/org.openoffice.Office.Calc</value> </prop> </node> <node oor:name="Chart" oor:op="replace"> <prop oor:name="IncludedNodes"> - <value>org.openoffice.Office.Chart</value> + <value>/org.openoffice.Office.Chart</value> </prop> </node> <node oor:name="Draw" oor:op="replace"> <prop oor:name="IncludedNodes"> - <value>org.openoffice.Office.Draw</value> + <value>/org.openoffice.Office.Draw</value> </prop> </node> <node oor:name="Impress" oor:op="replace"> <prop oor:name="IncludedNodes"> - <value>org.openoffice.Office.Impress</value> + <value>/org.openoffice.Office.Impress</value> </prop> </node> <node oor:name="Labels" oor:op="replace"> <prop oor:name="IncludedNodes"> - <value>org.openoffice.Office.Labels</value> + <value>/org.openoffice.Office.Labels</value> </prop> </node> <node oor:name="Linguistic" oor:op="replace"> @@ -892,36 +890,36 @@ <value>com.sun.star.migration.Wordbooks</value> </prop> <prop oor:name="IncludedNodes"> - <value>org.openoffice.Office.Linguistic</value> + <value>/org.openoffice.Office.Linguistic</value> </prop> <prop oor:name="ExcludedNodes"> - <value>org.openoffice.Office.Linguistic/ServiceManager</value> + <value>/org.openoffice.Office.Linguistic/ServiceManager</value> </prop> </node> <node oor:name="Math" oor:op="replace"> <prop oor:name="IncludedNodes"> - <value>org.openoffice.Office.Math</value> + <value>/org.openoffice.Office.Math</value> </prop> </node> <node oor:name="Security" oor:op="replace"> <prop oor:name="IncludedNodes"> - <value>org.openoffice.Office.Security</value> + <value>/org.openoffice.Office.Security</value> </prop> </node> <node oor:name="UI" oor:op="replace"> <prop oor:name="IncludedNodes"> - <value>org.openoffice.Office.UI/ColorScheme</value> + <value>/org.openoffice.Office.UI/ColorScheme</value> </prop> </node> <node oor:name="Writer" oor:op="replace"> <prop oor:name="IncludedNodes"> <value> - org.openoffice.Office.Writer - org.openoffice.Office.WriterWeb + <it>/org.openoffice.Office.Writer</it> + <it>/org.openoffice.Office.WriterWeb</it> </value> </prop> <prop oor:name="ExcludedNodes"> - <value>org.openoffice.Office.Writer/Wizard</value> + <value>/org.openoffice.Office.Writer/Wizard</value> </prop> </node> </node> diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index b5232c21eb..ffe5388caf 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -782,13 +782,13 @@ <desc>MAX</desc> </info> </enumeration> - <enumeration oor:value="5"> + <enumeration oor:value="6"> <info> <desc>IF</desc> </info> </enumeration> </constraints> - <value>224 226 222 223 5</value> + <value>224 226 222 223 6</value> </prop> <prop oor:name="AutoInput" oor:type="xs:boolean"> <!-- OldPath: Calc/Input --> diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index a1e203a293..cb19bb01e1 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -5338,6 +5338,13 @@ </info> <value>true</value> </prop> + <prop oor:name="EmbedStandardFonts" oor:type="xs:boolean"> + <info> + <author>pl</author> + <desc>Specifies whether to embed the 14 standard PDF fonts or not.</desc> + </info> + <value>false</value> + </prop> <prop oor:name="FormsType" oor:type="xs:int"> <info> <desc>Specifies the submitted format of a PDF form.</desc> diff --git a/officecfg/registry/schema/org/openoffice/Setup.xcs b/officecfg/registry/schema/org/openoffice/Setup.xcs index de8a64e2b0..a3d5ba6e5d 100644 --- a/officecfg/registry/schema/org/openoffice/Setup.xcs +++ b/officecfg/registry/schema/org/openoffice/Setup.xcs @@ -53,11 +53,6 @@ <desc>an optional uno service that is called after files and nodes have been copied in order to perform custom migration actions. The service needs to support XInitializable and XJob interfaces according do http://specs.openoffice.org/appwide/migration/spec_migration.sxw</desc> </info> </prop> - <prop oor:name="ServiceConfigComponents" oor:type="oor:string-list"> - <info> - <desc>a list of config components that are to be passed to service</desc> - </info> - </prop> <prop oor:name="IncludedFiles" oor:type="oor:string-list"> <info> <desc>a list of wildcards relative to the old userdata origin that are to be copied</desc> diff --git a/officecfg/util/alllang.xsl b/officecfg/util/alllang.xsl index 339c6685fa..dafb45c85c 100644 --- a/officecfg/util/alllang.xsl +++ b/officecfg/util/alllang.xsl @@ -100,7 +100,7 @@ <xsl:if test="@xml:lang=$locale and not(@install:module)"> <xsl:copy> <xsl:apply-templates select = "@*" mode="locale"/> - <xsl:value-of select="."/> + <xsl:copy-of select="node()"/> </xsl:copy> </xsl:if> </xsl:template> @@ -275,7 +275,7 @@ <xsl:otherwise> <xsl:copy> <xsl:apply-templates select = "@*"/> - <xsl:value-of select="."/> + <xsl:copy-of select="node()"/> </xsl:copy> </xsl:otherwise> </xsl:choose> @@ -285,7 +285,7 @@ <xsl:if test="@xml:lang=$fallback-locale and not(@install:module)"> <xsl:copy> <xsl:apply-templates select = "@*"/> - <xsl:value-of select="."/> + <xsl:copy-of select="node()"/> </xsl:copy> </xsl:if> </xsl:template> diff --git a/oovbaapi/genconstidl/makefile.mk b/oovbaapi/genconstidl/makefile.mk index be9fc931f3..078f4d0904 100644 --- a/oovbaapi/genconstidl/makefile.mk +++ b/oovbaapi/genconstidl/makefile.mk @@ -34,11 +34,6 @@ PRJNAME=oovbaapi .IF "$(L10N_framework)"=="" -.IF "$(ENABLE_VBA)"!="YES" -dummy: - @echo "not building vba..." -.ENDIF - # symbol files of Microsoft API MYSYMFILES = access.api vba.api adodb.api msforms.api word.api dao.api powerpoint.api excel.api stdole.api diff --git a/oovbaapi/ooo/vba/constants/makefile.mk b/oovbaapi/ooo/vba/constants/makefile.mk index a41f6e98a2..a731574363 100644 --- a/oovbaapi/ooo/vba/constants/makefile.mk +++ b/oovbaapi/ooo/vba/constants/makefile.mk @@ -35,11 +35,6 @@ PACKAGE=org$/vba$/constants .INCLUDE : $(PRJ)$/util$/makefile.pmk -.IF "$(ENABLE_VBA)"!="YES" -dummy: - @echo "not building vba..." -.ELSE - .IF "$(L10N_framework)"=="" # ------------------------------------------------------------------------ # I tried to use the IDLFILES target but it failed dismally @@ -64,4 +59,3 @@ $(MYDBTARGET) : $(MYURDFILES) $(MYIDLFILES) $(REGMERGE) $(OUT)$/ucr/constants.db /UCR @$(mktmp $(MYURDFILES)) .ENDIF -.ENDIF diff --git a/oovbaapi/ooo/vba/excel/makefile.mk b/oovbaapi/ooo/vba/excel/makefile.mk index c31531af83..01e26d4cb1 100644 --- a/oovbaapi/ooo/vba/excel/makefile.mk +++ b/oovbaapi/ooo/vba/excel/makefile.mk @@ -34,11 +34,6 @@ PACKAGE=ooo$/vba$/Excel # --- Settings ----------------------------------------------------- .INCLUDE : $(PRJ)$/util$/makefile.pmk -.IF "$(ENABLE_VBA)"!="YES" -dummy: - @echo "not building vba..." -.ENDIF - # ------------------------------------------------------------------------ diff --git a/oovbaapi/ooo/vba/makefile.mk b/oovbaapi/ooo/vba/makefile.mk index e79d348116..7fc70303d9 100644 --- a/oovbaapi/ooo/vba/makefile.mk +++ b/oovbaapi/ooo/vba/makefile.mk @@ -34,11 +34,6 @@ PACKAGE=ooo$/vba # --- Settings ----------------------------------------------------- .INCLUDE : $(PRJ)$/util$/makefile.pmk -.IF "$(ENABLE_VBA)"!="YES" -dummy: - @echo "not building vba..." -.ELSE - # ------------------------------------------------------------------------ .IF "$(L10N_framework)"="" IDLFILES=\ @@ -71,4 +66,3 @@ IDLFILES=\ # ------------------------------------------------------------------ .ENDIF .INCLUDE : target.mk -.ENDIF diff --git a/oovbaapi/ooo/vba/msforms/makefile.mk b/oovbaapi/ooo/vba/msforms/makefile.mk index 61d2675af7..56ac4caf87 100644 --- a/oovbaapi/ooo/vba/msforms/makefile.mk +++ b/oovbaapi/ooo/vba/msforms/makefile.mk @@ -34,11 +34,6 @@ PACKAGE=ooo$/vba$/msforms # --- Settings ----------------------------------------------------- .INCLUDE : $(PRJ)$/util$/makefile.pmk -.IF "$(ENABLE_VBA)"!="YES" -dummy: - @echo "not building vba..." -.ENDIF - # ------------------------------------------------------------------------ IDLFILES=\ diff --git a/oovbaapi/util/makefile.mk b/oovbaapi/util/makefile.mk index 9c33577abf..5100327b4b 100644 --- a/oovbaapi/util/makefile.mk +++ b/oovbaapi/util/makefile.mk @@ -36,11 +36,6 @@ TARGET=oovbaapi_db .INCLUDE : makefile.pmk -.IF "$(ENABLE_VBA)"!="YES" -dummy: - @echo "not building vba..." -.ENDIF - .IF "$(L10N_framework)"=="" # ------------------------------------------------------------------ UNOIDLDBFILES= \ diff --git a/scripting/prj/build.lst b/scripting/prj/build.lst index fc332384e0..7d5162173e 100644..100755 --- a/scripting/prj/build.lst +++ b/scripting/prj/build.lst @@ -1,4 +1,4 @@ -tc scripting : oovbaapi bridges rdbmaker vcl xmlscript basic sfx2 rhino BSH:beanshell javaunohelper NULL +tc scripting : oovbaapi vbahelper bridges rdbmaker vcl xmlscript basic sfx2 rhino BSH:beanshell javaunohelper NULL tc scripting usr1 - all tc1_mkout NULL tc scripting\inc nmake - all tc1_inc NULL tc scripting\source\provider nmake - all tc1_scriptingprovider tc1_inc NULL diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx index 992e670e8d..11a101454e 100644 --- a/scripting/source/dlgprov/dlgevtatt.cxx +++ b/scripting/source/dlgprov/dlgevtatt.cxx @@ -50,9 +50,9 @@ #include <com/sun/star/beans/MethodConcept.hpp> #include <com/sun/star/beans/XMaterialHolder.hpp> -#ifdef FAKE_VBA_EVENT_SUPPORT #include <ooo/vba/XVBAToOOEventDescGen.hpp> -#endif +#include <com/sun/star/lang/XUnoTunnel.hpp> +#include <vbahelper/vbaaccesshelper.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::awt; @@ -104,7 +104,6 @@ namespace dlgprov }; -#ifdef FAKE_VBA_EVENT_SUPPORT class DialogVBAScriptListenerImpl : public DialogScriptListenerImpl { protected: @@ -157,7 +156,6 @@ namespace dlgprov } } } -#endif //......................................................................... @@ -166,7 +164,7 @@ namespace dlgprov // ============================================================================= DialogEventsAttacherImpl::DialogEventsAttacherImpl( const Reference< XComponentContext >& rxContext, const Reference< frame::XModel >& rxModel, const Reference< awt::XControl >& rxControl, const Reference< XInterface >& rxHandler, const Reference< beans::XIntrospectionAccess >& rxIntrospect, bool bProviderMode, const Reference< script::XScriptListener >& rxRTLListener ) - :m_xContext( rxContext ) + :mbUseFakeVBAEvents( false ), m_xContext( rxContext ) { // key listeners by protocol when ScriptType = 'Script' // otherwise key is the ScriptType e.g. StarBasic @@ -177,9 +175,22 @@ namespace dlgprov // handler for Script & ::rtl::OUString::createFromAscii( "vnd.sun.star.UNO:" ) listernersForTypes[ rtl::OUString::createFromAscii("vnd.sun.star.UNO") ] = new DialogUnoScriptListenerImpl( rxContext, rxModel, rxControl, rxHandler, rxIntrospect, bProviderMode ); listernersForTypes[ rtl::OUString::createFromAscii("vnd.sun.star.script") ] = new DialogSFScriptListenerImpl( rxContext, rxModel ); -#ifdef FAKE_VBA_EVENT_SUPPORT - listernersForTypes[ rtl::OUString::createFromAscii("VBAInterop") ] = new DialogVBAScriptListenerImpl( rxContext, rxControl, rxModel ); -#endif + // Note: in a future cws ( npower13_ObjectModule ) it will be possible + // to determine the vba mode from the basiclibrary container, the tunnel hack + // below can then be replaced + SfxObjectShell* pFoundShell = NULL; + if ( rxModel.is() ) + { + uno::Reference< lang::XUnoTunnel > xObjShellTunnel( rxModel, uno::UNO_QUERY ); + if ( xObjShellTunnel.is() ) + { + pFoundShell = reinterpret_cast<SfxObjectShell*>( xObjShellTunnel->getSomething(SfxObjectShell::getUnoTunnelId())); + if ( pFoundShell ) + mbUseFakeVBAEvents = ooo::vba::isAlienExcelDoc( *pFoundShell ); + } + } + if ( mbUseFakeVBAEvents ) + listernersForTypes[ rtl::OUString::createFromAscii("VBAInterop") ] = new DialogVBAScriptListenerImpl( rxContext, rxControl, rxModel ); } // ----------------------------------------------------------------------------- @@ -197,7 +208,6 @@ namespace dlgprov throw RuntimeException(); // more text info here please return it->second; } -#ifdef FAKE_VBA_EVENT_SUPPORT Reference< XScriptEventsSupplier > DialogEventsAttacherImpl::getFakeVbaEventsSupplier( const Reference< XControl >& xControl, rtl::OUString& sControlName ) { Reference< XScriptEventsSupplier > xEventsSupplier; @@ -210,7 +220,6 @@ namespace dlgprov } return xEventsSupplier; } -#endif // ----------------------------------------------------------------------------- void SAL_CALL DialogEventsAttacherImpl::attachEventsToControl( const Reference< XControl>& xControl, const Reference< XScriptEventsSupplier >& xEventsSupplier, const Any& Helper ) @@ -312,7 +321,6 @@ namespace dlgprov // go over all objects const Reference< XInterface >* pObjects = Objects.getConstArray(); sal_Int32 nObjCount = Objects.getLength(); -#ifdef FAKE_VBA_EVENT_SUPPORT Reference< awt::XControl > xDlgControl( Objects[ nObjCount - 1 ], uno::UNO_QUERY ); // last object is the dialog rtl::OUString sDialogCodeName; if ( xDlgControl.is() ) @@ -324,7 +332,6 @@ namespace dlgprov } catch( Exception& ){} } -#endif for ( sal_Int32 i = 0; i < nObjCount; ++i ) { @@ -339,10 +346,11 @@ namespace dlgprov Reference< XControlModel > xControlModel = xControl->getModel(); Reference< XScriptEventsSupplier > xEventsSupplier( xControlModel, UNO_QUERY ); attachEventsToControl( xControl, xEventsSupplier, Helper ); -#ifdef FAKE_VBA_EVENT_SUPPORT - xEventsSupplier.set( getFakeVbaEventsSupplier( xControl, sDialogCodeName ) ); - attachEventsToControl( xControl, xEventsSupplier, Helper ); -#endif + if ( mbUseFakeVBAEvents ) + { + xEventsSupplier.set( getFakeVbaEventsSupplier( xControl, sDialogCodeName ) ); + attachEventsToControl( xControl, xEventsSupplier, Helper ); + } } } diff --git a/scripting/source/dlgprov/dlgevtatt.hxx b/scripting/source/dlgprov/dlgevtatt.hxx index 7e7e23f747..c76ee093da 100644 --- a/scripting/source/dlgprov/dlgevtatt.hxx +++ b/scripting/source/dlgprov/dlgevtatt.hxx @@ -44,8 +44,6 @@ #include <hash_map> -#define FAKE_VBA_EVENT_SUPPORT 1 - //......................................................................... namespace dlgprov { @@ -66,13 +64,12 @@ namespace dlgprov class DialogEventsAttacherImpl : public DialogEventsAttacherImpl_BASE { private: + bool mbUseFakeVBAEvents; ListenerHash listernersForTypes; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacher > m_xEventAttacher; ::com::sun::star::uno::Reference< ::com::sun::star::script::XScriptListener > getScriptListenerForKey( const rtl::OUString& sScriptName ) throw ( ::com::sun::star::uno::RuntimeException ); -#ifdef FAKE_VBA_EVENT_SUPPORT ::com::sun::star::uno::Reference< ::com::sun::star::script::XScriptEventsSupplier > getFakeVbaEventsSupplier( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl, rtl::OUString& sCodeName ); -#endif void SAL_CALL attachEventsToControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl, const ::com::sun::star::uno::Reference< ::com::sun::star::script::XScriptEventsSupplier >& events, const ::com::sun::star::uno::Any& Helper ); public: DialogEventsAttacherImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, diff --git a/scripting/source/dlgprov/makefile.mk b/scripting/source/dlgprov/makefile.mk index 4554234127..6c8ec298c7 100644 --- a/scripting/source/dlgprov/makefile.mk +++ b/scripting/source/dlgprov/makefile.mk @@ -59,6 +59,7 @@ SHL1STDLIBS= \ $(COMPHELPERLIB) \ $(UCBHELPERLIB) \ $(CPPULIB) \ + $(BASICLIB) \ $(SALLIB) SHL1DEPN= diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index 589aec94c2..6975fba08e 100755..100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -349,8 +349,8 @@ static TranslatePropMap aTranslatePropMap_Impl[] = { MAP_CHAR_LEN("mouseDragged"), { MAP_CHAR_LEN("_MouseMove"), ooMouseEvtToVBAMouseEvt, DenyMouseDrag, NULL } }, //liuchen, add to support VBA MouseMove event when the "Shift" key is pressed // keyPressed ooo event - { MAP_CHAR_LEN("keyPressed"), { MAP_CHAR_LEN("_KeyDown"), ooKeyPressedToVBAKeyUpDown, ApproveAll, NULL } }, - { MAP_CHAR_LEN("keyPressed"), { MAP_CHAR_LEN("_KeyPress"), ooKeyPressedToVBAKeyUpDown, ApproveAll, NULL } } + { MAP_CHAR_LEN("keyPressed"), { MAP_CHAR_LEN("_KeyDown"), ooKeyPressedToVBAKeyPressed, ApproveAll, NULL } }, + { MAP_CHAR_LEN("keyPressed"), { MAP_CHAR_LEN("_KeyPress"), ooKeyPressedToVBAKeyPressed, ApproveAll, NULL } } }; EventInfoHash& getEventTransInfo() @@ -929,9 +929,12 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* /*pRet*/ ) throw(Runtime Sequence< Any > aOutArgs; try { - uno::Reference< script::provider::XScript > xScript = xScriptProvider->getScript( url ); - if ( xScript.is() ) - xScript->invoke( aArguments, aOutArgsIndex, aOutArgs ); + if ( mpShell ) + { + uno::Any aRet; + mpShell->CallXScript( url, + aArguments, aRet, aOutArgsIndex, aOutArgs, false ); + } } catch ( uno::Exception& e ) { diff --git a/sfx2/inc/sfx2/Metadatable.hxx b/sfx2/inc/sfx2/Metadatable.hxx index fb5c2cce13..6896fd689f 100644 --- a/sfx2/inc/sfx2/Metadatable.hxx +++ b/sfx2/inc/sfx2/Metadatable.hxx @@ -98,8 +98,8 @@ public: const bool i_bCopyPrecedesSource = false); /** create an Undo Metadatable, which remembers this' reference */ - ::boost::shared_ptr<MetadatableUndo> CreateUndo( - const bool i_isDelete = false); + ::boost::shared_ptr<MetadatableUndo> CreateUndo() const; + ::boost::shared_ptr<MetadatableUndo> CreateUndoForDelete(); /** restore this from Undo Metadatable */ void RestoreMetadata(::boost::shared_ptr<MetadatableUndo> const& i_pUndo); diff --git a/sfx2/inc/sfx2/app.hxx b/sfx2/inc/sfx2/app.hxx index 18c3735d1c..9811bf838b 100644 --- a/sfx2/inc/sfx2/app.hxx +++ b/sfx2/inc/sfx2/app.hxx @@ -33,6 +33,7 @@ #include <tools/solar.h> #include <svl/smplhint.hxx> #include <svl/poolitem.hxx> +#include <vcl/image.hxx> #include <tools/ref.hxx> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/script/XLibraryContainer.hpp> @@ -316,6 +317,9 @@ public: SAL_DLLPRIVATE SfxModule* GetModule_Impl(); SAL_DLLPRIVATE ResMgr* GetOffResManager_Impl(); //#endif + + /** loads the application logo as used in the about dialog and impress slideshow pause screen */ + static Image GetApplicationLogo(); }; #define SFX_APP() SfxGetpApp() diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx index 97196ad3c4..42021778b4 100644 --- a/sfx2/inc/sfx2/objsh.hxx +++ b/sfx2/inc/sfx2/objsh.hxx @@ -398,7 +398,8 @@ public: const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aParams, ::com::sun::star::uno::Any& aRet, ::com::sun::star::uno::Sequence< sal_Int16 >& aOutParamIndex, - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aOutParam + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aOutParam, + bool bRaiseError = true ); static ErrCode CallXScript( @@ -407,7 +408,8 @@ public: const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aParams, ::com::sun::star::uno::Any& aRet, ::com::sun::star::uno::Sequence< sal_Int16 >& aOutParamIndex, - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aOutParam + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aOutParam, + bool bRaiseError = true ); /** adjusts the internal macro mode, according to the current security settings diff --git a/sfx2/qa/complex/DocumentMetadataAccessTest.java b/sfx2/qa/complex/DocumentMetadataAccessTest.java index 767d74dd23..da9cfd6cf7 100644 --- a/sfx2/qa/complex/DocumentMetadataAccessTest.java +++ b/sfx2/qa/complex/DocumentMetadataAccessTest.java @@ -42,6 +42,7 @@ import com.sun.star.lang.WrappedTargetException; import com.sun.star.lang.WrappedTargetRuntimeException; import com.sun.star.beans.XPropertySet; import com.sun.star.beans.PropertyValue; +import com.sun.star.beans.Pair; import com.sun.star.beans.StringPair; import com.sun.star.container.XEnumerationAccess; import com.sun.star.container.XEnumeration; @@ -689,23 +690,25 @@ public class DocumentMetadataAccessTest extends ComplexTestCase log.println("Checking RDFa in loaded test document..."); XMetadatable xPara; - Statement[] stmts; + Pair<Statement[], Boolean> result; Statement x_FooBarLit1 = new Statement(foo, bar, mkLit("1"), null); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); + result = xRep.getStatementRDFa(xPara); assure("RDFa: 1", - eq(stmts, new Statement[] { + !result.Second && + eq(result.First, new Statement[] { x_FooBarLit1 })); Statement x_FooBarLit2 = new Statement(foo, bar, mkLit("2"), null); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); + result = xRep.getStatementRDFa(xPara); assure("RDFa: 2", - eq(stmts, new Statement[] { + !result.Second && + eq(result.First, new Statement[] { x_FooBarLit2 })); @@ -713,37 +716,40 @@ public class DocumentMetadataAccessTest extends ComplexTestCase new Statement(blank1, bar, mkLit("3"), null); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); + result = xRep.getStatementRDFa(xPara); assure("RDFa: 3", - eq(stmts, new Statement[] { + !result.Second && + eq(result.First, new Statement[] { x_BlankBarLit3 })); XBlankNode b3 = (XBlankNode) UnoRuntime.queryInterface( - XBlankNode.class, stmts[0].Subject); + XBlankNode.class, result.First[0].Subject); Statement x_BlankBarLit4 = new Statement(blank2, bar, mkLit("4"), null); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); + result = xRep.getStatementRDFa(xPara); assure("RDFa: 4", - eq(stmts, new Statement[] { + !result.Second && + eq(result.First, new Statement[] { x_BlankBarLit4 })); XBlankNode b4 = (XBlankNode) UnoRuntime.queryInterface( - XBlankNode.class, stmts[0].Subject); + XBlankNode.class, result.First[0].Subject); Statement x_BlankBarLit5 = new Statement(blank1, bar, mkLit("5"), null); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); + result = xRep.getStatementRDFa(xPara); assure("RDFa: 5", - eq(stmts, new Statement[] { + !result.Second && + eq(result.First, new Statement[] { x_BlankBarLit5 })); XBlankNode b5 = (XBlankNode) UnoRuntime.queryInterface( - XBlankNode.class, stmts[0].Subject); + XBlankNode.class, result.First[0].Subject); assure("RDFa: 3 != 4", !b3.getStringValue().equals(b4.getStringValue())); @@ -754,9 +760,10 @@ public class DocumentMetadataAccessTest extends ComplexTestCase Statement x_FooBazLit6 = new Statement(foo, baz, mkLit("6"), null); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); + result = xRep.getStatementRDFa(xPara); assure("RDFa: 6", - eq(stmts, new Statement[] { + !result.Second && + eq(result.First, new Statement[] { x_FooBarLit6, x_FooBazLit6 })); @@ -765,9 +772,10 @@ public class DocumentMetadataAccessTest extends ComplexTestCase Statement x_FooFooLit7 = new Statement(foo, foo, mkLit("7"), null); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); + result = xRep.getStatementRDFa(xPara); assure("RDFa: 7", - eq(stmts, new Statement[] { + !result.Second && + eq(result.First, new Statement[] { x_FooBarLit7, x_FooBazLit7, x_FooFooLit7 })); @@ -776,43 +784,41 @@ public class DocumentMetadataAccessTest extends ComplexTestCase Statement x_FooBarLit = new Statement(foo, bar, lit, null); Statement x_FooBarLittype = new Statement(foo, bar, lit_type, null); - Statement x_FooLabelLit8 = - new Statement(foo, rdfs_label, mkLit("8"), null); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); + result = xRep.getStatementRDFa(xPara); assure("RDFa: 8", - eq(stmts, new Statement[] { - x_FooBarLit, x_FooLabelLit8 + result.Second && + eq(result.First, new Statement[] { + x_FooBarLit })); - Statement x_FooLabelLit9 = - new Statement(foo, rdfs_label, mkLit("9"), null); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); + result = xRep.getStatementRDFa(xPara); assure("RDFa: 9", - eq(stmts, new Statement[] { - x_FooBarLit, x_FooLabelLit9 + result.Second && + eq(result.First, new Statement[] { + x_FooBarLit })); - Statement x_FooLabelLit10 = - new Statement(foo, rdfs_label, mkLit("10"), null); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); + result = xRep.getStatementRDFa(xPara); assure("RDFa: 10", - eq(stmts, new Statement[] { - x_FooBarLittype, x_FooLabelLit10 + result.Second && + eq(result.First, new Statement[] { + x_FooBarLittype })); Statement x_FooBarLit11 = new Statement(foo, bar, mkLit("11", bar), null); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); + result = xRep.getStatementRDFa(xPara); assure("RDFa: 11", - eq(stmts, new Statement[] { + !result.Second && + eq(result.First, new Statement[] { x_FooBarLit11 })); @@ -821,66 +827,67 @@ public class DocumentMetadataAccessTest extends ComplexTestCase new Statement(xFile, bar, mkLit("12"), null); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); + result = xRep.getStatementRDFa(xPara); assure("RDFa: 12", - eq(stmts, new Statement[] { + !result.Second && + eq(result.First, new Statement[] { x_FileBarLit12 })); - Statement x_FooLabelLit13 = - new Statement(foo, rdfs_label, mkLit("13"), null); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); + result = xRep.getStatementRDFa(xPara); assure("RDFa: 13", - eq(stmts, new Statement[] { - x_FooBarLit, x_FooLabelLit13 + result.Second && + eq(result.First, new Statement[] { + x_FooBarLit })); Statement x_FooLabelLit14 = new Statement(foo, rdfs_label, mkLit("14"), null); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); + result = xRep.getStatementRDFa(xPara); assure("RDFa: 14", - eq(stmts, new Statement[] { - x_FooBarLit, x_FooLabelLit14 + result.Second && + eq(result.First, new Statement[] { + x_FooBarLit })); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); - assure("RDFa: 15", eq(stmts, new Statement[] { } )); + result = xRep.getStatementRDFa(xPara); + assure("RDFa: 15", eq(result.First, new Statement[] { } )); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); - assure("RDFa: 16", eq(stmts, new Statement[] { } )); + result = xRep.getStatementRDFa(xPara); + assure("RDFa: 16", eq(result.First, new Statement[] { } )); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); - assure("RDFa: 17", eq(stmts, new Statement[] { } )); + result = xRep.getStatementRDFa(xPara); + assure("RDFa: 17", eq(result.First, new Statement[] { } )); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); - assure("RDFa: 18", eq(stmts, new Statement[] { } )); + result = xRep.getStatementRDFa(xPara); + assure("RDFa: 18", eq(result.First, new Statement[] { } )); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); - assure("RDFa: 19", eq(stmts, new Statement[] { } )); + result = xRep.getStatementRDFa(xPara); + assure("RDFa: 19", eq(result.First, new Statement[] { } )); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); - assure("RDFa: 20", eq(stmts, new Statement[] { } )); + result = xRep.getStatementRDFa(xPara); + assure("RDFa: 20", eq(result.First, new Statement[] { } )); xPara = (XMetadatable) UnoRuntime.queryInterface( XMetadatable.class, xEnum.nextElement()); - stmts = xRep.getStatementRDFa(xPara); - assure("RDFa: 21", eq(stmts, new Statement[] { } )); + result = xRep.getStatementRDFa(xPara); + assure("RDFa: 21", eq(result.First, new Statement[] { } )); log.println("...done"); diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx index 0822d50f8b..77b60b7fe8 100644 --- a/sfx2/source/dialog/about.cxx +++ b/sfx2/source/dialog/about.cxx @@ -109,6 +109,48 @@ static bool impl_loadBitmap( return false; } +/** loads the application logo as used in the about dialog and impress slideshow pause screen */ +Image SfxApplication::GetApplicationLogo() +{ + Image aAppLogo; + + rtl::OUString aAbouts( RTL_CONSTASCII_USTRINGPARAM( ABOUT_BITMAP_STRINGLIST ) ); + bool bLoaded = false; + sal_Int32 nIndex = 0; + do + { + bLoaded = impl_loadBitmap( + rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ), + aAbouts.getToken( 0, ',', nIndex ), aAppLogo ); + } + while ( !bLoaded && ( nIndex >= 0 ) ); + + // fallback to "about.bmp" + if ( !bLoaded ) + { + bLoaded = impl_loadBitmap( + rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program/edition" ), + rtl::OUString::createFromAscii( "about.png" ), aAppLogo ); + if ( !bLoaded ) + bLoaded = impl_loadBitmap( + rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program/edition" ), + rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo ); + } + + if ( !bLoaded ) + { + bLoaded = impl_loadBitmap( + rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ), + rtl::OUString::createFromAscii( "about.png" ), aAppLogo ); + if ( !bLoaded ) + bLoaded = impl_loadBitmap( + rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ), + rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo ); + } + + return aAppLogo; +} + AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerStr ) : SfxModalDialog ( pParent, rId ), @@ -145,39 +187,7 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS } // load image from module path - rtl::OUString aAbouts( RTL_CONSTASCII_USTRINGPARAM( ABOUT_BITMAP_STRINGLIST ) ); - bool bLoaded = false; - sal_Int32 nIndex = 0; - do - { - bLoaded = impl_loadBitmap( - rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ), - aAbouts.getToken( 0, ',', nIndex ), aAppLogo ); - } - while ( !bLoaded && ( nIndex >= 0 ) ); - - // fallback to "about.bmp" - if ( !bLoaded ) - { - bLoaded = impl_loadBitmap( - rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program/edition" ), - rtl::OUString::createFromAscii( "about.png" ), aAppLogo ); - if ( !bLoaded ) - bLoaded = impl_loadBitmap( - rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program/edition" ), - rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo ); - } - - if ( !bLoaded ) - { - bLoaded = impl_loadBitmap( - rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ), - rtl::OUString::createFromAscii( "about.png" ), aAppLogo ); - if ( !bLoaded ) - bLoaded = impl_loadBitmap( - rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ), - rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo ); - } + aAppLogo = SfxApplication::GetApplicationLogo(); // Transparenter Font Font aFont = GetFont(); diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx index f14be1db2c..b21e0c2a7e 100644 --- a/sfx2/source/doc/Metadatable.cxx +++ b/sfx2/source/doc/Metadatable.cxx @@ -33,6 +33,8 @@ #include <vos/mutex.hxx> #include <vcl/svapp.hxx> // solarmutex +#include <rtl/random.h> + #include <boost/bind.hpp> #include <memory> @@ -401,14 +403,16 @@ template< typename T > /*static*/ ::rtl::OUString create_id(const ::std::hash_map< ::rtl::OUString, T, ::rtl::OUStringHash > & i_rXmlIdMap) { + static rtlRandomPool s_Pool( rtl_random_createPool() ); const ::rtl::OUString prefix( ::rtl::OUString::createFromAscii(s_prefix) ); typename ::std::hash_map< ::rtl::OUString, T, ::rtl::OUStringHash > ::const_iterator iter; ::rtl::OUString id; do { - const int n( rand() ); - id = prefix + ::rtl::OUString::valueOf(static_cast<sal_Int64>(n)); + sal_Int32 n; + rtl_random_getBytes(s_Pool, & n, sizeof(n)); + id = prefix + ::rtl::OUString::valueOf(static_cast<sal_Int32>(abs(n))); iter = i_rXmlIdMap.find(id); } while (iter != i_rXmlIdMap.end()); @@ -1488,8 +1492,7 @@ Metadatable::RegisterAsCopyOf(Metadatable const & i_rSource, } } -::boost::shared_ptr<MetadatableUndo> Metadatable::CreateUndo( - const bool i_isDelete) +::boost::shared_ptr<MetadatableUndo> Metadatable::CreateUndo() const { OSL_ENSURE(!IsInUndo(), "CreateUndo called for object in undo?"); OSL_ENSURE(!IsInClipboard(), "CreateUndo called for object in clipboard?"); @@ -1503,11 +1506,6 @@ Metadatable::RegisterAsCopyOf(Metadatable const & i_rSource, pRegDoc->CreateUndo(*this) ); pRegDoc->RegisterCopy(*this, *pUndo, false); pUndo->m_pReg = pRegDoc; - - if (i_isDelete) - { - RemoveMetadataReference(); - } return pUndo; } } @@ -1518,6 +1516,13 @@ Metadatable::RegisterAsCopyOf(Metadatable const & i_rSource, return ::boost::shared_ptr<MetadatableUndo>(); } +::boost::shared_ptr<MetadatableUndo> Metadatable::CreateUndoForDelete() +{ + ::boost::shared_ptr<MetadatableUndo> const pUndo( CreateUndo() ); + RemoveMetadataReference(); + return pUndo; +} + void Metadatable::RestoreMetadata( ::boost::shared_ptr<MetadatableUndo> const& i_pUndo) { @@ -1624,15 +1629,16 @@ MetadatableMixin::getMetadataReference() throw (uno::RuntimeException) { ::vos::OGuard aGuard( Application::GetSolarMutex() ); - Metadatable* pObject( GetCoreObject() ); - if (pObject) - { - return pObject->GetMetadataReference(); - } - else + + Metadatable *const pObject( GetCoreObject() ); + if (!pObject) { - throw uno::RuntimeException(); + throw uno::RuntimeException( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "MetadatableMixin: cannot get core object; not inserted?")), + *this); } + return pObject->GetMetadataReference(); } void SAL_CALL @@ -1641,30 +1647,32 @@ MetadatableMixin::setMetadataReference( throw (uno::RuntimeException, lang::IllegalArgumentException) { ::vos::OGuard aGuard( Application::GetSolarMutex() ); - Metadatable* pObject( GetCoreObject() ); - if (pObject) - { - return pObject->SetMetadataReference(i_rReference); - } - else + + Metadatable *const pObject( GetCoreObject() ); + if (!pObject) { - throw uno::RuntimeException(); + throw uno::RuntimeException( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "MetadatableMixin: cannot get core object; not inserted?")), + *this); } + return pObject->SetMetadataReference(i_rReference); } void SAL_CALL MetadatableMixin::ensureMetadataReference() throw (uno::RuntimeException) { ::vos::OGuard aGuard( Application::GetSolarMutex() ); - Metadatable* pObject( GetCoreObject() ); - if (pObject) - { - return pObject->EnsureMetadataReference(); - } - else + + Metadatable *const pObject( GetCoreObject() ); + if (!pObject) { - throw uno::RuntimeException(); + throw uno::RuntimeException( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "MetadatableMixin: cannot get core object; not inserted?")), + *this); } + return pObject->EnsureMetadataReference(); } } // namespace sfx2 diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index cbbed369fc..9193f5a14f 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -835,10 +835,16 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, } ::rtl::OUString aAdjustToType; - - // bSetStandardName == true means that user agreed to store document in the default (default default ;-)) format - if ( !(( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED )) && - ( bSetStandardName || GetStorable()->hasLocation() )) + if ( ( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED )) + { + // it is export, set the preselected filter + ::rtl::OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault( + ::rtl::OUString::createFromAscii( "UIName" ), + ::rtl::OUString() ); + pFileDlg->SetCurrentFilter( aFilterUIName ); + } + // it is no export, bSetStandardName == true means that user agreed to store document in the default (default default ;-)) format + else if ( bSetStandardName || GetStorable()->hasLocation() ) { uno::Sequence< beans::PropertyValue > aOldFilterProps; ::rtl::OUString aOldFilterName = GetDocProps().getUnpackedValueOrDefault( @@ -1238,6 +1244,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& // parse the slot name sal_Int8 nStoreMode = getStoreModeFromSlotName( aSlotName ); + sal_Int8 nStatusSave = STATUS_NO_ACTION; // handle the special cases if ( nStoreMode & SAVEAS_REQUESTED ) @@ -1259,7 +1266,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& else if ( nStoreMode & SAVE_REQUESTED ) { // if saving is not acceptable by the configuration the warning must be shown - sal_Int8 nStatusSave = aModelData.CheckSaveAcceptable( STATUS_SAVE ); + nStatusSave = aModelData.CheckSaveAcceptable( STATUS_SAVE ); if ( nStatusSave == STATUS_NO_ACTION ) throw task::ErrorCodeIOException( ::rtl::OUString(), uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT ); @@ -1273,32 +1280,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& { throw task::ErrorCodeIOException( ::rtl::OUString(), uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT ); } - else if ( nStatusSave == STATUS_SAVE ) - { - // Document properties can contain streams that should be freed before storing - aModelData.FreeDocumentProps(); - - if ( aModelData.GetStorable2().is() ) - { - try - { - aModelData.GetStorable2()->storeSelf( aModelData.GetMediaDescr().getAsConstPropertyValueList() ); - } - catch( lang::IllegalArgumentException& ) - { - OSL_ENSURE( sal_False, "ModelData didn't handle illegal parameters, all the parameters are ignored!\n" ); - aModelData.GetStorable()->store(); - } - } - else - { - OSL_ENSURE( sal_False, "XStorable2 is not supported by the model!\n" ); - aModelData.GetStorable()->store(); - } - - return sal_False; - } - else + else if ( nStatusSave != STATUS_SAVE ) { // this should be a usual SaveAs operation nStoreMode = SAVEAS_REQUESTED; @@ -1325,6 +1307,32 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& } } + if ( nStoreMode & SAVE_REQUESTED && nStatusSave == STATUS_SAVE ) + { + // Document properties can contain streams that should be freed before storing + aModelData.FreeDocumentProps(); + + if ( aModelData.GetStorable2().is() ) + { + try + { + aModelData.GetStorable2()->storeSelf( aModelData.GetMediaDescr().getAsConstPropertyValueList() ); + } + catch( lang::IllegalArgumentException& ) + { + OSL_ENSURE( sal_False, "ModelData didn't handle illegal parameters, all the parameters are ignored!\n" ); + aModelData.GetStorable()->store(); + } + } + else + { + OSL_ENSURE( sal_False, "XStorable2 is not supported by the model!\n" ); + aModelData.GetStorable()->store(); + } + + return sal_False; + } + // preselect a filter for the storing process uno::Sequence< beans::PropertyValue > aFilterProps = aModelData.GetPreselectedFilter_Impl( nStoreMode ); @@ -1419,13 +1427,13 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& ::rtl::OUString aSelFilterName = aModelData.GetMediaDescr().getUnpackedValueOrDefault( aFilterNameString, ::rtl::OUString() ); - sal_Int8 nStatusSave = aModelData.CheckFilter( aSelFilterName ); - if ( nStatusSave == STATUS_SAVEAS_STANDARDNAME ) + sal_Int8 nStatusFilterSave = aModelData.CheckFilter( aSelFilterName ); + if ( nStatusFilterSave == STATUS_SAVEAS_STANDARDNAME ) { // switch to best filter bSetStandardName = sal_True; } - else if ( nStatusSave == STATUS_SAVE ) + else if ( nStatusFilterSave == STATUS_SAVE ) { // user confirmed alien filter or "good" filter is used bExit = sal_True; @@ -1570,8 +1578,10 @@ uno::Sequence< beans::PropertyValue > SfxStoringHelper::SearchForFilter( uno::Reference< container::XEnumeration > xFilterEnum = xFilterQuery->createSubSetEnumerationByProperties( aSearchRequest ); - // use the first filter that is found + // the first default filter will be taken, + // if there is no filter with flag default the first acceptable filter will be taken if ( xFilterEnum.is() ) + { while ( xFilterEnum->hasMoreElements() ) { uno::Sequence< beans::PropertyValue > aProps; @@ -1582,11 +1592,17 @@ uno::Sequence< beans::PropertyValue > SfxStoringHelper::SearchForFilter( (sal_Int32)0 ); if ( ( ( nFlags & nMustFlags ) == nMustFlags ) && !( nFlags & nDontFlags ) ) { - aFilterProps = aProps; - break; + if ( ( nFlags & SFX_FILTER_DEFAULT ) == SFX_FILTER_DEFAULT ) + { + aFilterProps = aProps; + break; + } + else if ( !aFilterProps.getLength() ) + aFilterProps = aProps; } } } + } return aFilterProps; } diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 3cb2177833..af93a1217c 100644..100755 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1681,7 +1681,7 @@ namespace } ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptContext, const ::rtl::OUString& _rScriptURL, - const Sequence< Any >& aParams, Any& aRet, Sequence< sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam ) + const Sequence< Any >& aParams, Any& aRet, Sequence< sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam, bool bRaiseError ) { OSL_TRACE( "in CallXScript" ); ErrCode nErr = ERRCODE_NONE; @@ -1722,7 +1722,7 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon nErr = ERRCODE_BASIC_INTERNAL_ERROR; } - if ( bCaughtException ) + if ( bCaughtException && bRaiseError ) { ::std::auto_ptr< VclAbstractDialog > pScriptErrDlg; SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); @@ -1745,10 +1745,10 @@ ErrCode SfxObjectShell::CallXScript( const String& rScriptURL, aParams, ::com::sun::star::uno::Any& aRet, ::com::sun::star::uno::Sequence< sal_Int16 >& aOutParamIndex, - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& - aOutParam) + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aOutParam + , bool bRaiseError ) { - return CallXScript( GetModel(), rScriptURL, aParams, aRet, aOutParamIndex, aOutParam ); + return CallXScript( GetModel(), rScriptURL, aParams, aRet, aOutParamIndex, aOutParam, bRaiseError ); } //------------------------------------------------------------------------- diff --git a/shell/source/backends/gconfbe/gconfaccess.cxx b/shell/source/backends/gconfbe/gconfaccess.cxx index e2347572ee..cafa787a86 100644 --- a/shell/source/backends/gconfbe/gconfaccess.cxx +++ b/shell/source/backends/gconfbe/gconfaccess.cxx @@ -448,7 +448,6 @@ sal_Bool SAL_CALL isDependencySatisfied( GConfClient* aClient, const Configurati #ifdef ENABLE_LOCKDOWN case SETTING_AUTO_SAVE: { - GConfClient* aClient = GconfBackend::getGconfClient(); GConfValue* aGconfValue = gconf_client_get( aClient, GCONF_AUTO_SAVE_KEY, NULL ); if( ( aGconfValue != NULL ) ) diff --git a/shell/source/win32/shlxthandler/makefile.mk b/shell/source/win32/shlxthandler/makefile.mk index 4452cb1a90..b6c9a45a95 100644 --- a/shell/source/win32/shlxthandler/makefile.mk +++ b/shell/source/win32/shlxthandler/makefile.mk @@ -34,6 +34,9 @@ USE_DEFFILE=TRUE .IF "$(BUILD_X64)"!="" USE_DEFFILE_X64=TRUE .ENDIF +NO_DEFAULT_STL=TRUE +USE_STLP_DEBUG= + # --- Settings ----------------------------------------------------- .INCLUDE : settings.mk @@ -134,10 +137,6 @@ SHL1STDLIBS_X64+=\ $(OLDNAMESLIB_X64) \ msvcprt.lib -.IF "$(PRODUCT)"!="full" -SHL1STDLIBS+=msvcrt.lib -.ENDIF - SHL1LIBS_X64+=$(SLB_X64)$/util.lib\ $(SLB_X64)$/ooofilereader.lib SHL1OBJS_X64=$(SLOFILES_X64) diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 6070adb015..af3cd66afc 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -3683,11 +3683,8 @@ namespace svxform m_aURLED.DisableHistory(); m_aFilePickerBtn.SetClickHdl( LINK( this, AddInstanceDialog, FilePickerHdl ) ); - // load the filter name from svtools resource - ByteString aResMgrName( "svt" ); - ResMgr* pSvtResMgr = ResMgr::CreateResMgr( - aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); - m_sAllFilterName = String( ResId( STR_FILTERNAME_ALL, *pSvtResMgr ) ); + // load the filter name from fps_office resource + m_sAllFilterName = String( ResId( STR_FILTERNAME_ALL, *CREATEVERSIONRESMGR(fps_office) ) ); } AddInstanceDialog::~AddInstanceDialog() diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 3900c5b694..c674648e08 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -90,25 +90,7 @@ class ScriptEventListenerWrapper : public ScriptEventListener_BASE public: ScriptEventListenerWrapper( FmFormModel& _rModel) throw ( RuntimeException ) : pModel(&_rModel) { - Reference < XPropertySet > xProps( - ::comphelper::getProcessServiceFactory(), UNO_QUERY ); - if ( xProps.is() ) - { - Reference< XComponentContext > xCtx( xProps->getPropertyValue( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY ); - if ( xCtx.is() ) - { - Reference< XMultiComponentFactory > xMFac( - xCtx->getServiceManager(), UNO_QUERY ); - if ( xMFac.is() ) - { - m_vbaListener.set( xMFac->createInstanceWithContext( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "ooo.vba.EventListener" ) ), xCtx ), - UNO_QUERY_THROW ); - } - } - } + } // XEventListener virtual void SAL_CALL disposing(const EventObject& ) throw( RuntimeException ){} @@ -136,6 +118,33 @@ public: private: void setModel() { + if ( !m_vbaListener.is() ) + { + Reference < XPropertySet > xProps( + ::comphelper::getProcessServiceFactory(), UNO_QUERY ); + if ( xProps.is() ) + { + Reference< XComponentContext > xCtx( xProps->getPropertyValue( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY ); + if ( xCtx.is() ) + { + Reference< XMultiComponentFactory > xMFac( + xCtx->getServiceManager(), UNO_QUERY ); + SfxObjectShellRef xObjSh = pModel->GetObjectShell(); + Reference< XMultiServiceFactory > xDocFac; + if ( xObjSh.Is() ) + xDocFac.set( xObjSh->GetModel(), UNO_QUERY ); + + if ( xMFac.is() ) + { + m_vbaListener.set( xMFac->createInstanceWithContext( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "ooo.vba.EventListener" ) ), xCtx ), + UNO_QUERY_THROW ); + } + } + } + } Reference< XPropertySet > xProps( m_vbaListener, UNO_QUERY ); if ( xProps.is() ) { diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 03a7d30e92..6beb3dba74 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -700,7 +700,10 @@ void SdrObjCustomShape::MergeDefaultAttributes( const rtl::OUString* pType ) for ( i = 0; i < nCount; i++ ) { if ( seqAdjustmentValues[ i ].State != com::sun::star::beans::PropertyState_DIRECT_VALUE ) + { seqAdjustmentValues[ i ].Value <<= pDefData[ i ]; + seqAdjustmentValues[ i ].State = com::sun::star::beans::PropertyState_DIRECT_VALUE; + } } } aPropVal.Name = sAdjustmentValues; @@ -2075,7 +2078,7 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded() sal_Int32 nXDiff = aBoundRect.Left() - aRect.Left(); sal_Int32 nYDiff = aBoundRect.Top() - aRect.Top(); - if (nShearWink&&(bMirroredX&&!bMirroredY)||(bMirroredY&&!bMirroredX)) + if (nShearWink&&((bMirroredX&&!bMirroredY)||(bMirroredY&&!bMirroredX))) { nShearWink = -nShearWink; fTan = -fTan; diff --git a/sysui/desktop/freedesktop/freedesktop-menus.spec b/sysui/desktop/freedesktop/freedesktop-menus.spec index 501f8432d9..1649971dad 100644 --- a/sysui/desktop/freedesktop/freedesktop-menus.spec +++ b/sysui/desktop/freedesktop/freedesktop-menus.spec @@ -14,6 +14,8 @@ Conflicts: %pkgprefix-redhat-menus Conflicts: %pkgprefix-mandriva-menus BuildArch: noarch AutoReqProv: no +%define _binary_filedigest_algorithm 1 +%define _binary_payload w9.gzdio %description %productname desktop integration for desktop-environments that implement diff --git a/sysui/desktop/macosx/Info.plist b/sysui/desktop/macosx/Info.plist index 029e479a3f..cf04e8086a 100644 --- a/sysui/desktop/macosx/Info.plist +++ b/sysui/desktop/macosx/Info.plist @@ -622,7 +622,7 @@ </dict> </dict> - <!--- Microsoft Excel XML --> + <!-- Microsoft Excel XML --> <dict> <key>UTTypeConformsTo</key> <array> @@ -1384,7 +1384,7 @@ <key>CFBundleExecutable</key> <string>%EXECUTABLE</string> <key>CFBundleGetInfoString</key> - <string>${PRODUCTNAME} ${ABOUTBOXPRODUCTVERSION} %SOURCE</string> + <string>${PRODUCTNAME} ${ABOUTBOXPRODUCTVERSION} ${BUILDIDCWS}</string> <key>CFBundleIconFile</key> <string>main.icns</string> <key>CFBundleShortVersionString</key> diff --git a/sysui/desktop/macosx/makefile.mk b/sysui/desktop/macosx/makefile.mk index 8a4a4705e9..059b3b87bb 100644 --- a/sysui/desktop/macosx/makefile.mk +++ b/sysui/desktop/macosx/makefile.mk @@ -54,12 +54,6 @@ CREATOR_TYPE=OOO2 EXECUTABLE=soffice .ENDIF -SOURCE=$(RSCREVISION) - -.IF "$(CWS_WORK_STAMP)" != "" -CWS=[CWS:$(CWS_WORK_STAMP)] -.ENDIF - .IF "$(WITH_LANG)"!="" ULFDIR:=$(COMMONMISC)$/desktopshare .ELSE # "$(WITH_LANG)"!="" @@ -79,7 +73,7 @@ $(COMMONMISC)$/PkgInfo : $(COMMONMISC)$/Info.plist : $$(@:f) - sed -e "s|\%EXECUTABLE|${EXECUTABLE}|g" -e "s|\%SOURCE|[$(SOURCE)$(CWS)]|g" $< > $@ + sed -e "s|\%EXECUTABLE|${EXECUTABLE}|g" $< > $@ $(COMMONBIN)$/InfoPlist_{$(alllangiso)}.zip : $(COMMONMISC)$/$$(@:b)/InfoPlist.strings cd $(<:d) && zip ../$(@:f).$(INPATH) $(<:f) diff --git a/sysui/desktop/mandriva/mandriva-menus.spec b/sysui/desktop/mandriva/mandriva-menus.spec index 5be889e392..4c02c70d90 100644 --- a/sysui/desktop/mandriva/mandriva-menus.spec +++ b/sysui/desktop/mandriva/mandriva-menus.spec @@ -16,6 +16,8 @@ Requires: mandrake-release Provides: openoffice.org3-desktop-integration %define _unpackaged_files_terminate_build 0 +%define _binary_filedigest_algorithm 1 +%define _binary_payload w9.gzdio %define menuversion %(echo %version|cut -d'.' -f 1-2) %{?!update_menus:%define update_menus if [ -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi} diff --git a/sysui/desktop/mimetypes/extension.desktop b/sysui/desktop/mimetypes/extension.desktop index 795e828714..80cadae7e9 100644 --- a/sysui/desktop/mimetypes/extension.desktop +++ b/sysui/desktop/mimetypes/extension.desktop @@ -6,4 +6,4 @@ Icon=extension Type=MimeType Patterns=*.oxt MimeType=application/vnd.openofficeorg.extension -Comment=Extension +Comment=%PRODUCTNAME Extension diff --git a/sysui/desktop/redhat/redhat-menus.spec b/sysui/desktop/redhat/redhat-menus.spec index e153b55c3f..85e0a6a5d7 100644 --- a/sysui/desktop/redhat/redhat-menus.spec +++ b/sysui/desktop/redhat/redhat-menus.spec @@ -11,6 +11,8 @@ BuildArch: noarch Requires: redhat-release Provides: openoffice.org3-desktop-integration %define _unpackaged_files_terminate_build 0 +%define _binary_filedigest_algorithm 1 +%define _binary_payload w9.gzdio %description %productname desktop integration diff --git a/sysui/desktop/suse/suse-menus.spec b/sysui/desktop/suse/suse-menus.spec index 7280d9dbae..14dbcde0f5 100644 --- a/sysui/desktop/suse/suse-menus.spec +++ b/sysui/desktop/suse/suse-menus.spec @@ -14,6 +14,8 @@ Requires: /etc/SuSE-release Conflicts: SunDesktopVersion Provides: openoffice.org3-desktop-integration %define _unpackaged_files_terminate_build 0 +%define _binary_filedigest_algorithm 1 +%define _binary_payload w9.gzdio %description %productname desktop integration diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx index 171a989f8b..e44956b2a0 100644 --- a/ucb/source/core/ucb.cxx +++ b/ucb/source/core/ucb.cxx @@ -40,7 +40,11 @@ #include <com/sun/star/ucb/XCommandInfo.hpp> #include <com/sun/star/ucb/XContentProvider.hpp> #include <com/sun/star/ucb/XContentProviderSupplier.hpp> -#include <ucbhelper/configureucb.hxx> +#include <com/sun/star/ucb/XParameterizedContentProvider.hpp> +#include <com/sun/star/ucb/XContentProviderFactory.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/uno/Any.hxx> #include <ucbhelper/cancelcommandexecution.hxx> #include "identify.hxx" #include "ucbcmds.hxx" @@ -59,6 +63,126 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::ucb; using namespace ucb_impl; +using namespace com::sun::star; +using namespace ucbhelper; + + +#define CONFIG_CONTENTPROVIDERS_KEY \ + "/org.openoffice.ucb.Configuration/ContentProviders" + + +namespace { + +bool fillPlaceholders(rtl::OUString const & rInput, + uno::Sequence< uno::Any > const & rReplacements, + rtl::OUString * pOutput) +{ + sal_Unicode const * p = rInput.getStr(); + sal_Unicode const * pEnd = p + rInput.getLength(); + sal_Unicode const * pCopy = p; + rtl::OUStringBuffer aBuffer; + while (p != pEnd) + switch (*p++) + { + case '&': + if (pEnd - p >= 4 + && p[0] == 'a' && p[1] == 'm' && p[2] == 'p' + && p[3] == ';') + { + aBuffer.append(pCopy, p - 1 - pCopy); + aBuffer.append(sal_Unicode('&')); + p += 4; + pCopy = p; + } + else if (pEnd - p >= 3 + && p[0] == 'l' && p[1] == 't' && p[2] == ';') + { + aBuffer.append(pCopy, p - 1 - pCopy); + aBuffer.append(sal_Unicode('<')); + p += 3; + pCopy = p; + } + else if (pEnd - p >= 3 + && p[0] == 'g' && p[1] == 't' && p[2] == ';') + { + aBuffer.append(pCopy, p - 1 - pCopy); + aBuffer.append(sal_Unicode('>')); + p += 3; + pCopy = p; + } + break; + + case '<': + sal_Unicode const * q = p; + while (q != pEnd && *q != '>') + ++q; + if (q == pEnd) + break; + rtl::OUString aKey(p, q - p); + rtl::OUString aValue; + bool bFound = false; + for (sal_Int32 i = 2; i + 1 < rReplacements.getLength(); + i += 2) + { + rtl::OUString aReplaceKey; + if ((rReplacements[i] >>= aReplaceKey) + && aReplaceKey == aKey + && (rReplacements[i + 1] >>= aValue)) + { + bFound = true; + break; + } + } + if (!bFound) + return false; + aBuffer.append(pCopy, p - 1 - pCopy); + aBuffer.append(aValue); + p = q + 1; + pCopy = p; + break; + } + aBuffer.append(pCopy, pEnd - pCopy); + *pOutput = aBuffer.makeStringAndClear(); + return true; +} + +void makeAndAppendXMLName( + rtl::OUStringBuffer & rBuffer, const rtl::OUString & rIn ) +{ + sal_Int32 nCount = rIn.getLength(); + for ( sal_Int32 n = 0; n < nCount; ++n ) + { + const sal_Unicode c = rIn.getStr()[ n ]; + switch ( c ) + { + case '&': + rBuffer.appendAscii( "&" ); + break; + + case '"': + rBuffer.appendAscii( """ ); + break; + + case '\'': + rBuffer.appendAscii( "'" ); + break; + + case '<': + rBuffer.appendAscii( "<" ); + break; + + case '>': + rBuffer.appendAscii( ">" ); + break; + + default: + rBuffer.append( c ); + break; + } + } +} + +} //========================================================================= // @@ -132,6 +256,9 @@ void SAL_CALL UniversalContentBroker::dispose() aEvt.Source = SAL_STATIC_CAST( XComponent*, this ); m_pDisposeEventListeners->disposeAndClear( aEvt ); } + + if ( m_xNotifier.is() ) + m_xNotifier->removeChangesListener( this ); } //========================================================================= @@ -193,9 +320,11 @@ void SAL_CALL UniversalContentBroker::initialize( //@@@ At the moment, there's a problem when one (non-one-instance) factory // 'wraps' another (one-instance) factory, causing this method to be // called several times: + m_aArguments = aArguments; + oslInterlockedCount nCount = osl_incrementInterlockedCount(&m_nInitCount); if (nCount == 1) - ::ucbhelper::configureUcb(this, m_xSMgr, aArguments, 0); + configureUcb(); else osl_decrementInterlockedCount(&m_nInitCount); // make the possibility of overflow less likely... @@ -508,6 +637,80 @@ void SAL_CALL UniversalContentBroker::abort( sal_Int32 ) //========================================================================= // +// XChangesListener methods +// +//========================================================================= +// virtual +void SAL_CALL UniversalContentBroker::changesOccurred( const util::ChangesEvent& Event ) + throw( uno::RuntimeException ) +{ + sal_Int32 nCount = Event.Changes.getLength(); + if ( nCount ) + { + + uno::Reference< lang::XMultiServiceFactory > xConfigProv( + m_xSMgr->createInstance( + rtl::OUString::createFromAscii( + "com.sun.star.configuration.ConfigurationProvider" ) ), + uno::UNO_QUERY_THROW ); + + uno::Sequence< uno::Any > aArguments( 1 ); + beans::PropertyValue aProperty; + aProperty.Name + = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); + aProperty.Value <<= Event.Base; + aArguments[ 0 ] <<= aProperty; + + uno::Reference< uno::XInterface > xInterface( + xConfigProv->createInstanceWithArguments( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.ConfigurationAccess" ) ), + aArguments ) ); + + uno::Reference< container::XHierarchicalNameAccess > + xHierNameAccess( xInterface, uno::UNO_QUERY_THROW ); + + const util::ElementChange* pElementChanges + = Event.Changes.getConstArray(); + + ContentProviderDataList aData; + for ( sal_Int32 n = 0; n < nCount; ++n ) + { + const util::ElementChange& rElem = pElementChanges[ n ]; + rtl::OUString aKey; + rElem.Accessor >>= aKey; + + ContentProviderData aInfo; + + createContentProviderData(aKey, xHierNameAccess, aInfo); + + aData.push_back(aInfo); + } + + prepareAndRegister(aData); + } +} + +//========================================================================= +// +// XEventListener methods +// +//========================================================================= +// virtual +void SAL_CALL UniversalContentBroker::disposing(const lang::EventObject&) + throw( uno::RuntimeException ) +{ + if ( m_xNotifier.is() ) + { + osl::Guard< osl::Mutex > aGuard( m_aMutex ); + + if ( m_xNotifier.is() ) + m_xNotifier.clear(); + } +} + +//========================================================================= +// // Non-interface methods // //========================================================================= @@ -524,6 +727,212 @@ Reference< XContentProvider > UniversalContentBroker::queryContentProvider( : Reference< XContentProvider >(); } +bool UniversalContentBroker::configureUcb() + throw (uno::RuntimeException) +{ + rtl::OUString aKey1; + rtl::OUString aKey2; + if (m_aArguments.getLength() < 2 + || !(m_aArguments[0] >>= aKey1) || !(m_aArguments[1] >>= aKey2)) + { + OSL_ENSURE(false, "UniversalContentBroker::configureUcb(): Bad arguments"); + return false; + } + + ContentProviderDataList aData; + if (!getContentProviderData(aKey1, aKey2, aData)) + { + OSL_ENSURE(false, "UniversalContentBroker::configureUcb(): No configuration"); + return false; + } + + prepareAndRegister(aData); + + return true; +} + +void UniversalContentBroker::prepareAndRegister( + const ContentProviderDataList& rData) +{ + ContentProviderDataList::const_iterator aEnd(rData.end()); + for (ContentProviderDataList::const_iterator aIt(rData.begin()); + aIt != aEnd; ++aIt) + { + rtl::OUString aProviderArguments; + if (fillPlaceholders(aIt->Arguments, + m_aArguments, + &aProviderArguments)) + { + registerAtUcb(this, + m_xSMgr, + aIt->ServiceName, + aProviderArguments, + aIt->URLTemplate, + 0); + + } + else + OSL_ENSURE(false, + "UniversalContentBroker::prepareAndRegister(): Bad argument placeholders"); + } +} + +//========================================================================= +bool UniversalContentBroker::getContentProviderData( + const rtl::OUString & rKey1, + const rtl::OUString & rKey2, + ContentProviderDataList & rListToFill ) +{ + if ( !m_xSMgr.is() || !rKey1.getLength() || !rKey2.getLength() ) + { + OSL_ENSURE( false, + "UniversalContentBroker::getContentProviderData - Invalid argument!" ); + return false; + } + + try + { + uno::Reference< lang::XMultiServiceFactory > xConfigProv( + m_xSMgr->createInstance( + rtl::OUString::createFromAscii( + "com.sun.star.configuration.ConfigurationProvider" ) ), + uno::UNO_QUERY_THROW ); + + rtl::OUStringBuffer aFullPath; + aFullPath.appendAscii( CONFIG_CONTENTPROVIDERS_KEY "/['" ); + makeAndAppendXMLName( aFullPath, rKey1 ); + aFullPath.appendAscii( "']/SecondaryKeys/['" ); + makeAndAppendXMLName( aFullPath, rKey2 ); + aFullPath.appendAscii( "']/ProviderData" ); + + uno::Sequence< uno::Any > aArguments( 1 ); + beans::PropertyValue aProperty; + aProperty.Name + = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); + aProperty.Value <<= aFullPath.makeStringAndClear(); + aArguments[ 0 ] <<= aProperty; + + uno::Reference< uno::XInterface > xInterface( + xConfigProv->createInstanceWithArguments( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.ConfigurationAccess" ) ), + aArguments ) ); + + if ( !m_xNotifier.is() ) + { + m_xNotifier = uno::Reference< util::XChangesNotifier >( + xInterface, uno::UNO_QUERY_THROW ); + + m_xNotifier->addChangesListener( this ); + } + + uno::Reference< container::XNameAccess > xNameAccess( + xInterface, uno::UNO_QUERY_THROW ); + + uno::Sequence< rtl::OUString > aElems = xNameAccess->getElementNames(); + const rtl::OUString* pElems = aElems.getConstArray(); + sal_Int32 nCount = aElems.getLength(); + + if ( nCount > 0 ) + { + uno::Reference< container::XHierarchicalNameAccess > + xHierNameAccess( xInterface, uno::UNO_QUERY_THROW ); + + // Iterate over children. + for ( sal_Int32 n = 0; n < nCount; ++n ) + { + + try + { + + ContentProviderData aInfo; + + rtl::OUStringBuffer aElemBuffer; + aElemBuffer.appendAscii( "['" ); + makeAndAppendXMLName( aElemBuffer, pElems[ n ] ); + aElemBuffer.appendAscii( "']" ); + + createContentProviderData(aElemBuffer.makeStringAndClear(), xHierNameAccess, aInfo); + + rListToFill.push_back( aInfo ); + } + catch ( container::NoSuchElementException& ) + { + // getByHierarchicalName + OSL_ENSURE( false, + "UniversalContentBroker::getContentProviderData - " + "caught NoSuchElementException!" ); + } + } + } + } + catch ( uno::RuntimeException& ) + { + OSL_ENSURE( false, + "UniversalContentBroker::getContentProviderData - caught RuntimeException!" ); + return false; + } + catch ( uno::Exception& ) + { + // createInstance, createInstanceWithArguments + + OSL_ENSURE( false, + "UniversalContentBroker::getContentProviderData - caught Exception!" ); + return false; + } + + return true; +} + +void UniversalContentBroker::createContentProviderData( + const rtl::OUString & rProvider, + const uno::Reference< container::XHierarchicalNameAccess >& rxHierNameAccess, + ContentProviderData & rInfo) +{ + // Obtain service name. + rtl::OUStringBuffer aKeyBuffer (rProvider); + aKeyBuffer.appendAscii( "/ServiceName" ); + + rtl::OUString aValue; + if ( !( rxHierNameAccess->getByHierarchicalName( + aKeyBuffer.makeStringAndClear() ) >>= aValue ) ) + { + OSL_ENSURE( false, + "UniversalContentBroker::getContentProviderData - " + "Error getting item value!" ); + } + + rInfo.ServiceName = aValue; + + // Obtain URL Template. + aKeyBuffer.append(rProvider); + aKeyBuffer.appendAscii( "/URLTemplate" ); + + if ( !( rxHierNameAccess->getByHierarchicalName( + aKeyBuffer.makeStringAndClear() ) >>= aValue ) ) + { + OSL_ENSURE( false, + "UniversalContentBroker::getContentProviderData - " + "Error getting item value!" ); + } + + rInfo.URLTemplate = aValue; + + // Obtain Arguments. + aKeyBuffer.append(rProvider); + aKeyBuffer.appendAscii( "/Arguments" ); + + if ( !( rxHierNameAccess->getByHierarchicalName( + aKeyBuffer.makeStringAndClear() ) >>= aValue ) ) + { + OSL_ENSURE( false, + "UniversalContentBroker::getContentProviderData - " + "Error getting item value!" ); + } + + rInfo.Arguments = aValue; +} + //========================================================================= // // ProviderListEntry_Impl implementation. @@ -545,4 +954,3 @@ Reference< XContentProvider > ProviderListEntry_Impl::resolveProvider() const return m_xResolvedProvider; } - diff --git a/ucb/source/core/ucb.hxx b/ucb/source/core/ucb.hxx index 0b52812d19..db54af4688 100644 --- a/ucb/source/core/ucb.hxx +++ b/ucb/source/core/ucb.hxx @@ -37,13 +37,20 @@ #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XTypeProvider.hpp> +#include <com/sun/star/util/XChangesListener.hpp> +#include <com/sun/star/util/XChangesNotifier.hpp> +#include <com/sun/star/container/XContainer.hpp> +#include <com/sun/star/container/XHierarchicalNameAccess.hpp> + #include <rtl/ustrbuf.hxx> #include <cppuhelper/weak.hxx> #include <osl/mutex.hxx> #include <osl/interlck.h> #include <ucbhelper/macros.hxx> #include "providermap.hxx" +#include <ucbhelper/registerucb.hxx> +#include <vector> //========================================================================= #define UCB_SERVICE_NAME "com.sun.star.ucb.UniversalContentBroker" @@ -66,7 +73,8 @@ class UniversalContentBroker : public com::sun::star::ucb::XContentProviderManager, public com::sun::star::ucb::XContentProvider, public com::sun::star::ucb::XContentIdentifierFactory, - public com::sun::star::ucb::XCommandProcessor + public com::sun::star::ucb::XCommandProcessor, + public com::sun::star::util::XChangesListener { public: UniversalContentBroker( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rXSMgr ); @@ -162,6 +170,14 @@ public: abort( sal_Int32 CommandId ) throw( com::sun::star::uno::RuntimeException ); + // XChangesListener + virtual void SAL_CALL changesOccurred( const com::sun::star::util::ChangesEvent& Event ) + throw( com::sun::star::uno::RuntimeException ); + + // XEventListener ( base of XChangesLisetenr ) + virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) + throw( com::sun::star::uno::RuntimeException ); + private: com::sun::star::uno::Reference< com::sun::star::ucb::XContentProvider > queryContentProvider( const rtl::OUString& Identifier, @@ -177,8 +193,29 @@ private: com::sun::star::ucb::XCommandEnvironment >& xEnv ) throw( com::sun::star::uno::Exception ); + + bool configureUcb() + throw ( com::sun::star::uno::RuntimeException); + + bool getContentProviderData( + const rtl::OUString & rKey1, + const rtl::OUString & rKey2, + ucbhelper::ContentProviderDataList & rListToFill); + + void prepareAndRegister( const ucbhelper::ContentProviderDataList& rData); + + void createContentProviderData( + const rtl::OUString& rProvider, + const com::sun::star::uno::Reference< com::sun::star::container::XHierarchicalNameAccess >& rxHierNameAccess, + ucbhelper::ContentProviderData& rInfo); + com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr; + + com::sun::star::uno::Reference< + com::sun::star::util::XChangesNotifier > m_xNotifier; + + com::sun::star::uno::Sequence< com::sun::star::uno::Any > m_aArguments; ProviderMap_Impl m_aProviders; osl::Mutex m_aMutex; cppu::OInterfaceContainerHelper* m_pDisposeEventListeners; diff --git a/vbahelper/inc/vbahelper/vbaaccesshelper.hxx b/vbahelper/inc/vbahelper/vbaaccesshelper.hxx new file mode 100644 index 0000000000..cfbe9e761e --- /dev/null +++ b/vbahelper/inc/vbahelper/vbaaccesshelper.hxx @@ -0,0 +1,79 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: vbahelper.hxx,v $ + * $Revision: 1.5.32.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef OOVBAAPI_VBA_ACCESS_HELPER_HXX +#define OOVBAAPI_VBA_ACCESS_HELPER_HXX + +#include <com/sun/star/beans/XPropertySet.hpp> +#include <basic/basmgr.hxx> +#include <sfx2/objsh.hxx> +#include <sfx2/docfilt.hxx> +#include <sfx2/docfile.hxx> +#define VBAHELPER_DLLIMPLEMENTATION +#include <vbahelper/vbadllapi.h> +#include <memory> +namespace css = ::com::sun::star; +namespace ooo +{ + namespace vba + { + + VBAHELPER_DLLPRIVATE inline css::uno::Reference< css::lang::XMultiServiceFactory > getVBAServiceFactory( SfxObjectShell* pShell ) + { + css::uno::Any aUnoVar; + if ( !pShell || ! pShell->GetBasicManager()->GetGlobalUNOConstant( "VBAGlobals", aUnoVar ) ) + throw css::lang::IllegalArgumentException(); + css::uno::Reference< css::lang::XMultiServiceFactory > xVBAFactory( aUnoVar, css::uno::UNO_QUERY_THROW ); + return xVBAFactory; + } + + VBAHELPER_DLLPUBLIC inline css::uno::Reference< css::uno::XInterface > createVBAUnoAPIServiceWithArgs( SfxObjectShell* pShell, const sal_Char* _pAsciiName, const css::uno::Sequence< css::uno::Any >& aArgs ) throw (css::uno::RuntimeException) + { + OSL_PRECOND( pShell, "createVBAUnoAPIService: no shell!" ); + ::rtl::OUString sVarName( ::rtl::OUString::createFromAscii( _pAsciiName ) ); + css::uno::Reference< css::uno::XInterface > xIf = getVBAServiceFactory( pShell )->createInstanceWithArguments( sVarName, aArgs ); + return xIf; + } + + + VBAHELPER_DLLPRIVATE inline bool isAlienDoc( SfxObjectShell& rDocShell, const char* pMimeType ) + { + bool bRes( false ); + const SfxFilter *pFilt = rDocShell.GetMedium()->GetFilter(); + if ( pFilt && pFilt->IsAlienFormat() ) + bRes = ( pFilt->GetMimeType().CompareToAscii( pMimeType ) == 0 ); + return bRes; + } + VBAHELPER_DLLPUBLIC inline bool isAlienExcelDoc( SfxObjectShell& rDocShell ) { return isAlienDoc( rDocShell, "application/vnd.ms-excel" ); } + VBAHELPER_DLLPUBLIC inline bool isAlienWordDoc( SfxObjectShell& rDocShell ) { return isAlienDoc( rDocShell, "application/vnd.ms-word" ); } + + } // openoffice +} // org + +#endif diff --git a/vbahelper/inc/vbahelper/vbahelper.hxx b/vbahelper/inc/vbahelper/vbahelper.hxx index 81a823be56..63a3e58fd8 100644 --- a/vbahelper/inc/vbahelper/vbahelper.hxx +++ b/vbahelper/inc/vbahelper/vbahelper.hxx @@ -35,17 +35,19 @@ #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/awt/XControl.hpp> #include <com/sun/star/awt/XDevice.hpp> +#include <basic/basmgr.hxx> #include <basic/sberrors.hxx> #include <cppuhelper/implbase1.hxx> #include <com/sun/star/frame/XModel.hpp> #include <sfx2/dispatch.hxx> -//#include <ooo/vba/msforms/XShape.hpp> +#include <sfx2/objsh.hxx> +#include <sfx2/docfilt.hxx> +#include <sfx2/docfile.hxx> #include <vcl/pointr.hxx> -#define VBAHELPER_DLLIMPLEMENTATION -#include <vbahelper/vbadllapi.h> #include <memory> -namespace css = ::com::sun::star; +#include "vbaaccesshelper.hxx" +namespace css = ::com::sun::star; namespace ooo { namespace vba @@ -62,7 +64,7 @@ namespace ooo } VBAHELPER_DLLPUBLIC SfxObjectShell* getSfxObjShell( const css::uno::Reference< css::frame::XModel >& xModel ) throw ( css::uno::RuntimeException); VBAHELPER_DLLPUBLIC css::uno::Reference< css::uno::XInterface > createVBAUnoAPIService( SfxObjectShell* pShell, const sal_Char* _pAsciiName ) throw (css::uno::RuntimeException); - VBAHELPER_DLLPUBLIC css::uno::Reference< css::uno::XInterface > createVBAUnoAPIServiceWithArgs( SfxObjectShell* pShell, const sal_Char* _pAsciiName, const css::uno::Sequence< css::uno::Any >& aArgs ) throw (css::uno::RuntimeException); + css::uno::Reference< css::frame::XModel > getCurrentDoc( const rtl::OUString& sKey ) throw (css::uno::RuntimeException); VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getCurrentExcelDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getCurrentWordDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); diff --git a/vbahelper/prj/d.lst b/vbahelper/prj/d.lst index d7b61d1e5a..d683e97c8b 100644 --- a/vbahelper/prj/d.lst +++ b/vbahelper/prj/d.lst @@ -8,6 +8,7 @@ mkdir: %_DEST%\inc%_EXT%\basic ..\inc\vbahelper\vbacollectionimpl.hxx %_DEST%\inc%_EXT%\vbahelper\vbacollectionimpl.hxx ..\inc\vbahelper\vbahelper.hxx %_DEST%\inc%_EXT%\vbahelper\vbahelper.hxx +..\inc\vbahelper\vbaaccesshelper.hxx %_DEST%\inc%_EXT%\vbahelper\vbaaccesshelper.hxx ..\inc\vbahelper\helperdecl.hxx %_DEST%\inc%_EXT%\vbahelper\helperdecl.hxx ..\inc\vbahelper\vbahelperinterface.hxx %_DEST%\inc%_EXT%\vbahelper\vbahelperinterface.hxx ..\inc\vbahelper\vbaapplicationbase.hxx %_DEST%\inc%_EXT%\vbahelper\vbaapplicationbase.hxx diff --git a/vbahelper/source/msforms/makefile.mk b/vbahelper/source/msforms/makefile.mk index 9c24c77f80..7c61e4302b 100644 --- a/vbahelper/source/msforms/makefile.mk +++ b/vbahelper/source/msforms/makefile.mk @@ -34,6 +34,11 @@ VISIBILITY_HIDDEN=TRUE # --- Settings ----------------------------------------------------- +.IF "$(ENABLE_VBA)" == "NO" +dummy: + @echo "Nothing to build" +.ENDIF + .INCLUDE : settings.mk SLOFILES=\ diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx index b4c94691b5..077e7626f2 100644 --- a/vbahelper/source/msforms/vbacontrol.cxx +++ b/vbahelper/source/msforms/vbacontrol.cxx @@ -374,10 +374,6 @@ ScVbaControlFactory::ScVbaControlFactory( const uno::Reference< uno::XComponentC { } -ScVbaControl* ScVbaControlFactory::createControl() throw (uno::RuntimeException) -{ - return createControl( m_xModel ); -} ScVbaControl* ScVbaControlFactory::createControl( const uno::Reference< uno::XInterface >& xParent ) throw (uno::RuntimeException) { uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY ); diff --git a/vbahelper/source/msforms/vbacontrol.hxx b/vbahelper/source/msforms/vbacontrol.hxx index 897b38f159..c9c3964268 100644 --- a/vbahelper/source/msforms/vbacontrol.hxx +++ b/vbahelper/source/msforms/vbacontrol.hxx @@ -98,7 +98,6 @@ class ScVbaControlFactory public: ScVbaControlFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel ); - ScVbaControl* createControl() throw ( css::uno::RuntimeException ); ScVbaControl* createControl( const css::uno::Reference< css::uno::XInterface >& xParent ) throw ( css::uno::RuntimeException ); private: ScVbaControl* createControl( const css::uno::Reference< css::awt::XControl >&, const css::uno::Reference< css::uno::XInterface >& ) throw ( css::uno::RuntimeException ); diff --git a/vbahelper/source/vbahelper/makefile.mk b/vbahelper/source/vbahelper/makefile.mk index 88f8f53bd5..3284ec5cec 100644 --- a/vbahelper/source/vbahelper/makefile.mk +++ b/vbahelper/source/vbahelper/makefile.mk @@ -33,6 +33,11 @@ ENABLE_EXCEPTIONS := TRUE VISIBILITY_HIDDEN=TRUE # --- Settings ----------------------------------------------------- +.IF "$(ENABLE_VBA)" == "NO" +dummy: + @echo "Nothing to build" +.ENDIF + .INCLUDE : settings.mk SLOFILES=\ diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index 004d9eeb17..8b6179bc23 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -98,15 +98,6 @@ namespace ooo namespace vba { -uno::Reference< lang::XMultiServiceFactory > getVBAServiceFactory( SfxObjectShell* pShell ) -{ - uno::Any aUnoVar; - if ( !pShell || ! pShell->GetBasicManager()->GetGlobalUNOConstant( "VBAGlobals", aUnoVar ) ) - throw lang::IllegalArgumentException(); - uno::Reference< lang::XMultiServiceFactory > xVBAFactory( aUnoVar, uno::UNO_QUERY_THROW ); - return xVBAFactory; -} - css::uno::Reference< css::uno::XInterface > createVBAUnoAPIService( SfxObjectShell* pShell, const sal_Char* _pAsciiName ) throw (css::uno::RuntimeException) { OSL_PRECOND( pShell, "createVBAUnoAPIService: no shell!" ); @@ -114,13 +105,6 @@ css::uno::Reference< css::uno::XInterface > createVBAUnoAPIService( SfxObjectShe return getVBAServiceFactory( pShell )->createInstance( sVarName ); } -css::uno::Reference< css::uno::XInterface > createVBAUnoAPIServiceWithArgs( SfxObjectShell* pShell, const sal_Char* _pAsciiName, const uno::Sequence< uno::Any >& aArgs ) throw ( css::uno::RuntimeException ) -{ - OSL_PRECOND( pShell, "createVBAUnoAPIService: no shell!" ); - ::rtl::OUString sVarName( ::rtl::OUString::createFromAscii( _pAsciiName ) ); - uno::Reference< uno::XInterface > xIf = getVBAServiceFactory( pShell )->createInstanceWithArguments( sVarName, aArgs ); - return xIf; -} // helper method to determine if the view ( calc ) is in print-preview mode bool isInPrintPreview( SfxViewFrame* pView ) { diff --git a/vbahelper/util/makefile.mk b/vbahelper/util/makefile.mk index 98adae420e..49bc8e7d39 100644 --- a/vbahelper/util/makefile.mk +++ b/vbahelper/util/makefile.mk @@ -34,6 +34,10 @@ TARGET=vbahelper .INCLUDE : settings.mk +.IF "$(ENABLE_VBA)" == "NO" +dummy: + @echo "Nothing to build" +.ENDIF TARGET_HELPER=vbahelper diff --git a/xmloff/inc/RDFaExportHelper.hxx b/xmloff/inc/RDFaExportHelper.hxx index 3079dd1d85..751bc2ec14 100644 --- a/xmloff/inc/RDFaExportHelper.hxx +++ b/xmloff/inc/RDFaExportHelper.hxx @@ -53,8 +53,6 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XDocumentRepository> m_xRepository; - ::rtl::OUString m_RDFsLabel; - typedef ::std::map< ::rtl::OUString, ::rtl::OUString > BlankNodeMap_t; diff --git a/xmloff/inc/RDFaImportHelper.hxx b/xmloff/inc/RDFaImportHelper.hxx index fff29ad5d9..980d529a5d 100644 --- a/xmloff/inc/RDFaImportHelper.hxx +++ b/xmloff/inc/RDFaImportHelper.hxx @@ -28,10 +28,12 @@ #ifndef RDFAIMPORTHELPER_HXX #define RDFAIMPORTHELPER_HXX -#include <com/sun/star/uno/Reference.h> - #include <vector> +#include <boost/shared_ptr.hpp> + +#include <com/sun/star/uno/Reference.h> + namespace rtl { class OUString; } @@ -46,6 +48,7 @@ class SvXMLImport; namespace xmloff { struct RDFaEntry; +struct ParsedRDFaAttributes; class SAL_DLLPRIVATE RDFaImportHelper { @@ -65,10 +68,23 @@ public: ~RDFaImportHelper(); - /** Add a RDFa statement; parameters are XML attribute values */ + /** Parse RDFa attributes */ + ::boost::shared_ptr<ParsedRDFaAttributes> ParseRDFa( + ::rtl::OUString const & i_rAbout, + ::rtl::OUString const & i_rProperty, + ::rtl::OUString const & i_rContent, + ::rtl::OUString const & i_rDatatype); + + /** Add a RDFa statement; must have been parsed with ParseRDFa */ void AddRDFa( ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XMetadatable> - i_xObject, + const & i_xObject, + ::boost::shared_ptr<ParsedRDFaAttributes> & i_pRDFaAttributes); + + /** Parse and add a RDFa statement; parameters are XML attribute values */ + void ParseAndAddRDFa( + ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XMetadatable> + const & i_xObject, ::rtl::OUString const & i_rAbout, ::rtl::OUString const & i_rProperty, ::rtl::OUString const & i_rContent, diff --git a/xmloff/inc/xmlkywd.hxx b/xmloff/inc/xmlkywd.hxx deleted file mode 100644 index ff40e7daab..0000000000 --- a/xmloff/inc/xmlkywd.hxx +++ /dev/null @@ -1,1998 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _XMLOFF_XMLKYWD_HXX -#define _XMLOFF_XMLKYWD_HXX - -#include <tools/string.hxx> - -/* - * THIS FILE IS DEPRECATED. IT IS SUPERSEDED BY XMLTOKEN.HXX. - * - * Please use xmltoken.hxx / xmltoken.cxx from now on. - */ - - -/* if XML_DEFINE_KEYWORDS is defined the variables are - defined rather than declared. So this file MUST be included - WITHOUT this define. - - (Except the xmlkywd.cxx file that actually defines the - variables which sets this define.) - */ - -#ifndef XML_DEFINE_KEYWORDS -#define XML_CONSTASCII_ACTION( n, s ) extern sal_Char __FAR_DATA n[sizeof(s)] -#else -#define XML_CONSTASCII_ACTION( n, s ) sal_Char __FAR_DATA n[sizeof(s)] = s -#endif - -// common XML -XML_CONSTASCII_ACTION( sXML_CDATA, "CDATA" ); -XML_CONSTASCII_ACTION( sXML_WS, " " ); -XML_CONSTASCII_ACTION( sXML_xml, "xml" ); -XML_CONSTASCII_ACTION( sXML_xmlns, "xmlns" ); -XML_CONSTASCII_ACTION( sXML_xml_pi, "version=\"1.0\" encoding=\"UTF-8\"" ); -XML_CONSTASCII_ACTION( sXML_xml_doctype_prefix, "<!DOCTYPE " ); -XML_CONSTASCII_ACTION( sXML_xml_doctype_suffix, " PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\" \"office.dtd\">" ); - -// namespace prefixes and names -XML_CONSTASCII_ACTION( sXML_np_office, "office" ); -XML_CONSTASCII_ACTION( sXML_n_office, "http://openoffice.org/2000/office" ); -XML_CONSTASCII_ACTION( sXML_n_office_old, "http://sun.com/xmlns/staroffice/office" ); -XML_CONSTASCII_ACTION( sXML_np_meta, "meta" ); -XML_CONSTASCII_ACTION( sXML_n_meta, "http://openoffice.org/2000/meta" ); -XML_CONSTASCII_ACTION( sXML_n_meta_old, "http://sun.com/xmlns/staroffice/meta" ); -XML_CONSTASCII_ACTION( sXML_np_style, "style" ); -XML_CONSTASCII_ACTION( sXML_n_style, "http://openoffice.org/2000/style" ); -XML_CONSTASCII_ACTION( sXML_n_style_old, "http://sun.com/xmlns/staroffice/style" ); -XML_CONSTASCII_ACTION( sXML_np_number, "number" ); -XML_CONSTASCII_ACTION( sXML_n_number, "http://openoffice.org/2000/datastyle" ); -XML_CONSTASCII_ACTION( sXML_n_number_old, "http://sun.com/xmlns/staroffice/number" ); -XML_CONSTASCII_ACTION( sXML_np_text, "text" ); -XML_CONSTASCII_ACTION( sXML_n_text, "http://openoffice.org/2000/text" ); -XML_CONSTASCII_ACTION( sXML_n_text_old, "http://sun.com/xmlns/staroffice/text" ); -XML_CONSTASCII_ACTION( sXML_np_table, "table" ); -XML_CONSTASCII_ACTION( sXML_n_table, "http://openoffice.org/2000/table" ); -XML_CONSTASCII_ACTION( sXML_n_table_old, "http://sun.com/xmlns/staroffice/table" ); -XML_CONSTASCII_ACTION( sXML_np_draw, "draw" ); -XML_CONSTASCII_ACTION( sXML_n_draw, "http://openoffice.org/2000/drawing" ); -XML_CONSTASCII_ACTION( sXML_np_dr3d, "dr3d" ); -XML_CONSTASCII_ACTION( sXML_n_dr3d, "http://openoffice.org/2000/dr3d" ); -XML_CONSTASCII_ACTION( sXML_n_draw_old, "http://sun.com/xmlns/staroffice/draw" ); -XML_CONSTASCII_ACTION( sXML_np_presentation, "presentation" ); -XML_CONSTASCII_ACTION( sXML_n_presentation, "http://openoffice.org/2000/presentation" ); -XML_CONSTASCII_ACTION( sXML_n_presentation_old, "http://sun.com/xmlns/staroffice/presentation" ); -XML_CONSTASCII_ACTION( sXML_np_chart, "chart" ); -XML_CONSTASCII_ACTION( sXML_n_chart, "http://openoffice.org/2000/chart" ); -XML_CONSTASCII_ACTION( sXML_np_config, "config" ); -XML_CONSTASCII_ACTION( sXML_n_config, "http://openoffice.org/2001/config" ); -XML_CONSTASCII_ACTION( sXML_n_chart_old, "http://sun.com/xmlns/staroffice/chart" ); -XML_CONSTASCII_ACTION( sXML_np_fo, "fo" ); -XML_CONSTASCII_ACTION( sXML_n_fo_old, "http://www.w3.org/1999/XSL/Format/" ); -XML_CONSTASCII_ACTION( sXML_n_fo, "http://www.w3.org/1999/XSL/Format" ); -XML_CONSTASCII_ACTION( sXML_np_xlink, "xlink" ); -XML_CONSTASCII_ACTION( sXML_n_xlink, "http://www.w3.org/1999/xlink" ); -XML_CONSTASCII_ACTION( sXML_n_xlink_old, "http://www.w3.org/1999/xlink/namespace" ); -XML_CONSTASCII_ACTION( sXML_np_dc, "dc" ); -XML_CONSTASCII_ACTION( sXML_n_dc, "http://purl.org/dc/elements/1.1/" ); -XML_CONSTASCII_ACTION( sXML_np_svg, "svg" ); -XML_CONSTASCII_ACTION( sXML_n_svg, "http://www.w3.org/2000/svg" ); -XML_CONSTASCII_ACTION( sXML_namespace_form, "form" ); -XML_CONSTASCII_ACTION( sXML_url_form, "http://openoffice.org/2000/form" ); -XML_CONSTASCII_ACTION( sXML_namespace_script, "script" ); -XML_CONSTASCII_ACTION( sXML_url_script, "http://openoffice.org/2000/script" ); - -XML_CONSTASCII_ACTION( sXML_np_block_list, "block-list"); -XML_CONSTASCII_ACTION( sXML_n_block_list, "http://openoffice.org/2001/block-list" ); - -XML_CONSTASCII_ACTION( sXML_np_math, "math"); -XML_CONSTASCII_ACTION( sXML_n_math, "http://www.w3.org/1998/Math/MathML" ); - -XML_CONSTASCII_ACTION( sXML_np_versions_list, "VL"); -XML_CONSTASCII_ACTION( sXML_n_versions_list, "http://openoffice.org/2001/versions-list" ); - -// units -XML_CONSTASCII_ACTION( sXML_unit_mm, "mm" ); -XML_CONSTASCII_ACTION( sXML_unit_m, "m" ); -XML_CONSTASCII_ACTION( sXML_unit_km, "km" ); -XML_CONSTASCII_ACTION( sXML_unit_cm, "cm" ); -XML_CONSTASCII_ACTION( sXML_unit_pt, "pt" ); -XML_CONSTASCII_ACTION( sXML_unit_pc, "pc" ); -XML_CONSTASCII_ACTION( sXML_unit_foot, "ft" ); -XML_CONSTASCII_ACTION( sXML_unit_miles, "mi" ); -XML_CONSTASCII_ACTION( sXML_unit_inch, "inch" ); - -// any other -XML_CONSTASCII_ACTION( sXML_1, "1" ); -XML_CONSTASCII_ACTION( sXML_10, "10" ); -XML_CONSTASCII_ACTION( sXML_2, "2" ); -XML_CONSTASCII_ACTION( sXML_3, "3" ); -XML_CONSTASCII_ACTION( sXML_4, "4" ); -XML_CONSTASCII_ACTION( sXML_5, "5" ); -XML_CONSTASCII_ACTION( sXML_6, "6" ); -XML_CONSTASCII_ACTION( sXML_7, "7" ); -XML_CONSTASCII_ACTION( sXML_8, "8" ); -XML_CONSTASCII_ACTION( sXML_9, "9" ); -XML_CONSTASCII_ACTION( sXML_A, "A" ); -XML_CONSTASCII_ACTION( sXML_I, "I" ); -XML_CONSTASCII_ACTION( sXML_IBM437, "IBM437" ); -XML_CONSTASCII_ACTION( sXML_IBM850, "IBM850" ); -XML_CONSTASCII_ACTION( sXML_IBM860, "IBM860" ); -XML_CONSTASCII_ACTION( sXML_IBM861, "IBM861" ); -XML_CONSTASCII_ACTION( sXML_IBM863, "IBM863" ); -XML_CONSTASCII_ACTION( sXML_IBM865, "IBM865" ); -XML_CONSTASCII_ACTION( sXML_ISO_8859_1, "ISO-8859-1" ); -XML_CONSTASCII_ACTION( sXML_OLE2, "ole2" ); -XML_CONSTASCII_ACTION( sXML__colon, ":" ); -XML_CONSTASCII_ACTION( sXML__empty, "" ); -XML_CONSTASCII_ACTION( sXML__unknown_, "_unknown_" ); -XML_CONSTASCII_ACTION( sXML_a, "a" ); -XML_CONSTASCII_ACTION( sXML_abbreviated_name, "abbreviated-name" ); -XML_CONSTASCII_ACTION( sXML_above, "above" ); -XML_CONSTASCII_ACTION( sXML_abs, "abs" ); -XML_CONSTASCII_ACTION( sXML_accent, "accent" ); -XML_CONSTASCII_ACTION( sXML_accentunder, "accentunder" ); -XML_CONSTASCII_ACTION( sXML_acceptance_state, "acceptance-state" ); -XML_CONSTASCII_ACTION( sXML_accepted, "accepted" ); -XML_CONSTASCII_ACTION( sXML_action, "action" ); -XML_CONSTASCII_ACTION( sXML_active, "active" ); -XML_CONSTASCII_ACTION( sXML_active_split_range, "active-split-range" ); -XML_CONSTASCII_ACTION( sXML_active_table, "active-table" ); -XML_CONSTASCII_ACTION( sXML_actuate, "actuate" ); -XML_CONSTASCII_ACTION( sXML_add_in, "add-in" ); -XML_CONSTASCII_ACTION( sXML_add_in_name, "add-in-name" ); -XML_CONSTASCII_ACTION( sXML_address, "address" ); -XML_CONSTASCII_ACTION( sXML_adjustment, "adjustment" ); -XML_CONSTASCII_ACTION( sXML_algorithm, "algorithm" ); -XML_CONSTASCII_ACTION( sXML_align, "align" ); -XML_CONSTASCII_ACTION( sXML_all, "all" ); -XML_CONSTASCII_ACTION( sXML_allow_empty_cell, "allow-empty-cell" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_index, "alphabetical-index" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_index_auto_mark_file, "alphabetical-index-auto-mark-file" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_index_entry_template, "alphabetical-index-entry-template" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_index_mark, "alphabetical-index-mark" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_index_mark_end, "alphabetical-index-mark-end" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_index_mark_start, "alphabetical-index-mark-start" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_index_source, "alphabetical-index-source" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_separators, "alphabetical-separators" ); -XML_CONSTASCII_ACTION( sXML_alternate, "alternate" ); -XML_CONSTASCII_ACTION( sXML_am_pm, "am-pm" ); -XML_CONSTASCII_ACTION( sXML_ambient_color, "ambient-color"); -XML_CONSTASCII_ACTION( sXML_anchor_page_number, "anchor-page-number" ); -XML_CONSTASCII_ACTION( sXML_anchor_type, "anchor-type" ); -XML_CONSTASCII_ACTION( sXML_and, "and" ); -XML_CONSTASCII_ACTION( sXML_animation, "animation" ); -XML_CONSTASCII_ACTION( sXML_animation_direction, "animation-direction" ); -XML_CONSTASCII_ACTION( sXML_animation_start_inside, "animation-start-inside" ); -XML_CONSTASCII_ACTION( sXML_animation_stop_inside, "animation-stop-inside" ); -XML_CONSTASCII_ACTION( sXML_animation_repeat, "animation-repeat" ); -XML_CONSTASCII_ACTION( sXML_animation_delay, "animation-delay" ); -XML_CONSTASCII_ACTION( sXML_animation_steps, "animation-steps" ); -XML_CONSTASCII_ACTION( sXML_annotation, "annotation" ); -XML_CONSTASCII_ACTION( sXML_annotations, "annotations" ); -XML_CONSTASCII_ACTION( sXML_annote, "annote" ); -XML_CONSTASCII_ACTION( sXML_applet, "applet"); -XML_CONSTASCII_ACTION( sXML_applet_name, "applet-name"); -XML_CONSTASCII_ACTION( sXML_application_data, "application-data"); -XML_CONSTASCII_ACTION( sXML_application_xml, "application-xml"); -XML_CONSTASCII_ACTION( sXML_apply, "apply" ); -XML_CONSTASCII_ACTION( sXML_apply_style_name, "apply-style-name" ); -XML_CONSTASCII_ACTION( sXML_aqua, "aqua" ); -XML_CONSTASCII_ACTION( sXML_arccos, "arccos" ); -XML_CONSTASCII_ACTION( sXML_archive, "archive" ); -XML_CONSTASCII_ACTION( sXML_arcsin, "arcsin" ); -XML_CONSTASCII_ACTION( sXML_arctan, "arctan" ); -XML_CONSTASCII_ACTION( sXML_area, "area" ); -XML_CONSTASCII_ACTION( sXML_area_circle, "area-circle" ); -XML_CONSTASCII_ACTION( sXML_area_polygon, "area-polygon" ); -XML_CONSTASCII_ACTION( sXML_area_rectangle, "area-rectangle" ); -XML_CONSTASCII_ACTION( sXML_article, "article" ); -XML_CONSTASCII_ACTION( sXML_as_char, "as-char" ); -XML_CONSTASCII_ACTION( sXML_ascending, "ascending"); -XML_CONSTASCII_ACTION( sXML_attached_axis, "attached-axis" ); -XML_CONSTASCII_ACTION( sXML_attractive, "attractive"); -XML_CONSTASCII_ACTION( sXML_author, "author" ); -XML_CONSTASCII_ACTION( sXML_author_initials, "author-initials" ); -XML_CONSTASCII_ACTION( sXML_author_name, "author-name" ); -XML_CONSTASCII_ACTION( sXML_auto, "auto" ); -XML_CONSTASCII_ACTION( sXML_auto_grow_height, "auto-grow-height" ); -XML_CONSTASCII_ACTION( sXML_auto_grow_width, "auto-grow-width" ); -XML_CONSTASCII_ACTION( sXML_auto_reload, "auto-reload" ); -XML_CONSTASCII_ACTION( sXML_auto_text, "auto-text" ); -XML_CONSTASCII_ACTION( sXML_auto_text_events, "auto-text-events" ); -XML_CONSTASCII_ACTION( sXML_auto_text_group, "auto-text-group" ); -XML_CONSTASCII_ACTION( sXML_auto_text_indent, "auto-text-indent" ); -XML_CONSTASCII_ACTION( sXML_up, "up" ); -XML_CONSTASCII_ACTION( sXML_auto_update, "auto-update" ); -XML_CONSTASCII_ACTION( sXML_automatic, "automatic"); -XML_CONSTASCII_ACTION( sXML_automatic_find_labels, "automatic-find-labels" ); -XML_CONSTASCII_ACTION( sXML_automatic_order, "automatic-order" ); -XML_CONSTASCII_ACTION( sXML_automatic_styles, "automatic-styles" ); -XML_CONSTASCII_ACTION( sXML_automatic_update, "automatic-update" ); -XML_CONSTASCII_ACTION( sXML_average, "average" ); -XML_CONSTASCII_ACTION( sXML_axis, "axis" ); -XML_CONSTASCII_ACTION( sXML_back_scale, "back-scale" ); -XML_CONSTASCII_ACTION( sXML_backface_culling, "backface-culling" ); -XML_CONSTASCII_ACTION( sXML_background, "background" ); -XML_CONSTASCII_ACTION( sXML_background_color, "background-color" ); -XML_CONSTASCII_ACTION( sXML_background_image, "background-image" ); -XML_CONSTASCII_ACTION( sXML_background_no_repeat, "no-repeat" ); -XML_CONSTASCII_ACTION( sXML_background_objects_visible, "background-objects-visible" ); -XML_CONSTASCII_ACTION( sXML_background_repeat, "repeat" ); -XML_CONSTASCII_ACTION( sXML_background_stretch, "stretch" ); -XML_CONSTASCII_ACTION( sXML_background_visible, "background-visible" ); -XML_CONSTASCII_ACTION( sXML_bar, "bar" ); -XML_CONSTASCII_ACTION( sXML_base64Binary, "base64Binary"); -XML_CONSTASCII_ACTION( sXML_base_cell_address, "base-cell-address"); -XML_CONSTASCII_ACTION( sXML_baseline, "baseline" ); -XML_CONSTASCII_ACTION( sXML_before_date_time, "before-date-time" ); -XML_CONSTASCII_ACTION( sXML_below , "below" ); -XML_CONSTASCII_ACTION( sXML_between_date_times, "between-date-times" ); -XML_CONSTASCII_ACTION( sXML_bevel , "bevel" ); -XML_CONSTASCII_ACTION( sXML_bibiliographic_type, "bibiliographic-type" ); -XML_CONSTASCII_ACTION( sXML_bibliography, "bibliography" ); -XML_CONSTASCII_ACTION( sXML_bibliography_configuration, "bibliography-configuration" ); -XML_CONSTASCII_ACTION( sXML_bibliography_data_field, "bibliography-data-field" ); -XML_CONSTASCII_ACTION( sXML_bibliography_entry_template, "bibliography-entry-template" ); -XML_CONSTASCII_ACTION( sXML_bibliography_mark, "bibliography-mark" ); -XML_CONSTASCII_ACTION( sXML_bibliography_source, "bibliography-source" ); -XML_CONSTASCII_ACTION( sXML_bibliography_type, "bibliography-type" ); -XML_CONSTASCII_ACTION( sXML_bind_styles_to_content, "bind-styles-to-content"); -XML_CONSTASCII_ACTION( sXML_bitmap , "bitmap" ); -XML_CONSTASCII_ACTION( sXML_black, "black" ); -XML_CONSTASCII_ACTION( sXML_blend, "blend" ); -XML_CONSTASCII_ACTION( sXML_blinking, "blinking" ); -XML_CONSTASCII_ACTION( sXML_block, "block" ); -XML_CONSTASCII_ACTION( sXML_block_list, "block-list" ); -XML_CONSTASCII_ACTION( sXML_blue , "blue" ); -XML_CONSTASCII_ACTION( sXML_body, "body" ); -XML_CONSTASCII_ACTION( sXML_bold, "bold" ); -XML_CONSTASCII_ACTION( sXML_book, "book" ); -XML_CONSTASCII_ACTION( sXML_booklet, "booklet" ); -XML_CONSTASCII_ACTION( sXML_bookmark, "bookmark" ); -XML_CONSTASCII_ACTION( sXML_bookmark_end, "bookmark-end" ); -XML_CONSTASCII_ACTION( sXML_bookmark_ref, "bookmark-ref" ); -XML_CONSTASCII_ACTION( sXML_bookmark_start, "bookmark-start" ); -XML_CONSTASCII_ACTION( sXML_booktitle, "booktitle" ); -XML_CONSTASCII_ACTION( sXML_boolean, "boolean"); -XML_CONSTASCII_ACTION( sXML_boolean_style, "boolean-style" ); -XML_CONSTASCII_ACTION( sXML_boolean_value, "boolean-value"); -XML_CONSTASCII_ACTION( sXML_border, "border" ); -XML_CONSTASCII_ACTION( sXML_border_bottom, "border-bottom" ); -XML_CONSTASCII_ACTION( sXML_border_color, "border-color" ); -XML_CONSTASCII_ACTION( sXML_border_left, "border-left" ); -XML_CONSTASCII_ACTION( sXML_border_line_width, "border-line-width" ); -XML_CONSTASCII_ACTION( sXML_border_line_width_bottom, "border-line-width-bottom" ); -XML_CONSTASCII_ACTION( sXML_border_line_width_left, "border-line-width-left" ); -XML_CONSTASCII_ACTION( sXML_border_line_width_right, "border-line-width-right" ); -XML_CONSTASCII_ACTION( sXML_border_line_width_top, "border-line-width-top" ); -XML_CONSTASCII_ACTION( sXML_border_right, "border-right" ); -XML_CONSTASCII_ACTION( sXML_border_top, "border-top" ); -XML_CONSTASCII_ACTION( sXML_both, "both"); -XML_CONSTASCII_ACTION( sXML_bottom, "bottom" ); -XML_CONSTASCII_ACTION( sXML_bottom_percent, "bottom percent"); -XML_CONSTASCII_ACTION( sXML_bottom_values, "bottom values"); -XML_CONSTASCII_ACTION( sXML_break_after, "break-after" ); -XML_CONSTASCII_ACTION( sXML_break_before, "break-before" ); -XML_CONSTASCII_ACTION( sXML_break_inside, "break-inside" ); -XML_CONSTASCII_ACTION( sXML_bubble, "bubble" ); -XML_CONSTASCII_ACTION( sXML_bullet_char, "bullet-char" ); -XML_CONSTASCII_ACTION( sXML_bullet_relative_size, "bullet-relative-size" ); -XML_CONSTASCII_ACTION( sXML_buttons, "buttons"); -XML_CONSTASCII_ACTION( sXML_bvar, "bvar"); -XML_CONSTASCII_ACTION( sXML_c, "c" ); -XML_CONSTASCII_ACTION( sXML_cm, "cm" ); -XML_CONSTASCII_ACTION( sXML_calculation_settings, "calculation-settings" ); -XML_CONSTASCII_ACTION( sXML_calendar, "calendar" ); -XML_CONSTASCII_ACTION( sXML_capitalize_entries, "capitalize-entries" ); -XML_CONSTASCII_ACTION( sXML_caption, "caption" ); -XML_CONSTASCII_ACTION( sXML_caption_point_x, "caption-point-x" ); -XML_CONSTASCII_ACTION( sXML_caption_point_y, "caption-point-y" ); -XML_CONSTASCII_ACTION( sXML_caption_sequence_format, "caption-sequence-format" ); -XML_CONSTASCII_ACTION( sXML_caption_sequence_name, "caption-sequence-name" ); -XML_CONSTASCII_ACTION( sXML_case_sensitive, "case-sensitive"); -XML_CONSTASCII_ACTION( sXML_casemap_capitalize, "capitalize" ); -XML_CONSTASCII_ACTION( sXML_casemap_lowercase, "lowercase" ); -XML_CONSTASCII_ACTION( sXML_casemap_normal, "normal" ); -XML_CONSTASCII_ACTION( sXML_casemap_small_caps, "small-caps" ); -XML_CONSTASCII_ACTION( sXML_casemap_uppercase, "uppercase" ); -XML_CONSTASCII_ACTION( sXML_categories, "categories" ); -XML_CONSTASCII_ACTION( sXML_category, "category" ); -XML_CONSTASCII_ACTION( sXML_category_and_value, "category-and-value" ); -XML_CONSTASCII_ACTION( sXML_cell_address, "cell-address"); -XML_CONSTASCII_ACTION( sXML_cell_content_change, "cell-content-change"); -XML_CONSTASCII_ACTION( sXML_cell_content_deletion, "cell-content-deletion"); -XML_CONSTASCII_ACTION( sXML_cell_count, "cell-count"); -XML_CONSTASCII_ACTION( sXML_cell_protect, "cell-protect"); -XML_CONSTASCII_ACTION( sXML_cell_range_address, "cell-range-address"); -XML_CONSTASCII_ACTION( sXML_cell_range_address_list, "cell-range-address-list"); -XML_CONSTASCII_ACTION( sXML_cell_range_source, "cell-range-source"); -XML_CONSTASCII_ACTION( sXML_center, "center" ); -XML_CONSTASCII_ACTION( sXML_chain_next_name, "chain-next-name" ); -XML_CONSTASCII_ACTION( sXML_change, "change" ); -XML_CONSTASCII_ACTION( sXML_change_deletion, "change-deletion" ); -XML_CONSTASCII_ACTION( sXML_change_end, "change-end" ); -XML_CONSTASCII_ACTION( sXML_change_id, "change-id" ); -XML_CONSTASCII_ACTION( sXML_change_info, "change-info" ); -XML_CONSTASCII_ACTION( sXML_change_start, "change-start" ); -XML_CONSTASCII_ACTION( sXML_change_track_table_cell, "change-track-table-cell" ); -XML_CONSTASCII_ACTION( sXML_change_view_conditions, "change-view-conditions" ); -XML_CONSTASCII_ACTION( sXML_change_view_settings, "change-view-settings" ); -XML_CONSTASCII_ACTION( sXML_changed_region, "changed-region" ); -XML_CONSTASCII_ACTION( sXML_chapter, "chapter"); -XML_CONSTASCII_ACTION( sXML_char, "char" ); -XML_CONSTASCII_ACTION( sXML_character_count, "character-count" ); -XML_CONSTASCII_ACTION( sXML_chart, "chart" ); -XML_CONSTASCII_ACTION( sXML_charts, "charts" ); -XML_CONSTASCII_ACTION( sXML_chg_author, "chg-author" ); -XML_CONSTASCII_ACTION( sXML_chg_comment, "chg-comment" ); -XML_CONSTASCII_ACTION( sXML_chg_date_time, "chg-date-time" ); -XML_CONSTASCII_ACTION( sXML_ci, "ci" ); -XML_CONSTASCII_ACTION( sXML_circle, "circle" ); -XML_CONSTASCII_ACTION( sXML_citation_body_style_name, "citation-body-style-name" ); -XML_CONSTASCII_ACTION( sXML_citation_style_name, "citation-style-name" ); -XML_CONSTASCII_ACTION( sXML_class, "class" ); -XML_CONSTASCII_ACTION( sXML_class_id, "class-id" ); -XML_CONSTASCII_ACTION( sXML_clip, "clip" ); -XML_CONSTASCII_ACTION( sXML_clockwise, "clockwise" ); -XML_CONSTASCII_ACTION( sXML_close, "close" ); -XML_CONSTASCII_ACTION( sXML_close_horizontal, "close-horizontal" ); -XML_CONSTASCII_ACTION( sXML_close_vertical, "close-vertical" ); -XML_CONSTASCII_ACTION( sXML_cn, "cn" ); -XML_CONSTASCII_ACTION( sXML_code, "code" ); -XML_CONSTASCII_ACTION( sXML_codebase, "codebase" ); -XML_CONSTASCII_ACTION( sXML_collapse, "collapse" ); -XML_CONSTASCII_ACTION( sXML_color, "color" ); -XML_CONSTASCII_ACTION( sXML_color_inversion , "color-inversion" ); -XML_CONSTASCII_ACTION( sXML_color_mode , "color-mode" ); -XML_CONSTASCII_ACTION( sXML_column, "column" ); -XML_CONSTASCII_ACTION( sXML_column_count, "column-count" ); -XML_CONSTASCII_ACTION( sXML_column_gap, "column-gap" ); -XML_CONSTASCII_ACTION( sXML_column_name, "column-name" ); -XML_CONSTASCII_ACTION( sXML_column_sep, "column-sep" ); -XML_CONSTASCII_ACTION( sXML_column_width, "column-width" ); -XML_CONSTASCII_ACTION( sXML_columns, "columns" ); -XML_CONSTASCII_ACTION( sXML_columnsplit_auto, "auto" ); -XML_CONSTASCII_ACTION( sXML_columnsplit_avoid, "avoid" ); -XML_CONSTASCII_ACTION( sXML_combine_entries, "combine-entries" ); -XML_CONSTASCII_ACTION( sXML_combine_entries_with_dash, "combine-entries-with-dash" ); -XML_CONSTASCII_ACTION( sXML_combine_entries_with_pp, "combine-entries-with-pp" ); -XML_CONSTASCII_ACTION( sXML_comma_separated, "comma-separated" ); -XML_CONSTASCII_ACTION( sXML_command, "command" ); -XML_CONSTASCII_ACTION( sXML_comment, "comment" ); -XML_CONSTASCII_ACTION( sXML_compose, "compose" ); -XML_CONSTASCII_ACTION( sXML_cond_style_name, "cond-style-name" ); -XML_CONSTASCII_ACTION( sXML_condition, "condition" ); -XML_CONSTASCII_ACTION( sXML_condition_source, "condition-source"); -XML_CONSTASCII_ACTION( sXML_condition_source_range_address, "condition-source-range-address"); -XML_CONSTASCII_ACTION( sXML_conditional_text, "conditional-text" ); -XML_CONSTASCII_ACTION( sXML_cone, "cone" ); -XML_CONSTASCII_ACTION( sXML_conference, "conference" ); -XML_CONSTASCII_ACTION( sXML_config_item, "config-item" ); -XML_CONSTASCII_ACTION( sXML_config_item_map_indexed, "config-item-map-indexed" ); -XML_CONSTASCII_ACTION( sXML_config_item_map_named, "config-item-map-named" ); -XML_CONSTASCII_ACTION( sXML_config_item_map_entry, "config-item-map-entry" ); -XML_CONSTASCII_ACTION( sXML_config_item_set, "config-item-set" ); -XML_CONSTASCII_ACTION( sXML_configuration_settings, "configuration-settings" ); -XML_CONSTASCII_ACTION( sXML_conjugate, "conjugate" ); -XML_CONSTASCII_ACTION( sXML_connect_bars, "connect-bars" ); -XML_CONSTASCII_ACTION( sXML_connection_name, "connection-name" ); -XML_CONSTASCII_ACTION( sXML_connector, "connector" ); -XML_CONSTASCII_ACTION( sXML_consecutive_numbering, "consecutive-numbering" ); -XML_CONSTASCII_ACTION( sXML_consolidation, "consolidation" ); -XML_CONSTASCII_ACTION( sXML_constant, "constant" ); -XML_CONSTASCII_ACTION( sXML_contains_error, "contains-error"); -XML_CONSTASCII_ACTION( sXML_contains_header, "contains-header"); -XML_CONSTASCII_ACTION( sXML_content, "content" ); -XML_CONSTASCII_ACTION( sXML_content_validation, "content-validation"); -XML_CONSTASCII_ACTION( sXML_content_validation_name, "validation-name"); -XML_CONSTASCII_ACTION( sXML_content_validations, "content-validations"); -XML_CONSTASCII_ACTION( sXML_continue, "continue" ); -XML_CONSTASCII_ACTION( sXML_continue_numbering, "continue-numbering" ); -XML_CONSTASCII_ACTION( sXML_contour_path, "contour-path" ); -XML_CONSTASCII_ACTION( sXML_contour_polygon, "contour-polygon" ); -XML_CONSTASCII_ACTION( sXML_contrast , "contrast" ); -XML_CONSTASCII_ACTION( sXML_control, "control" ); -XML_CONSTASCII_ACTION( sXML_conversion_mode, "conversion-mode" ); -XML_CONSTASCII_ACTION( sXML_copy_back, "copy-back" ); -XML_CONSTASCII_ACTION( sXML_copy_formulas, "copy-formulas" ); -XML_CONSTASCII_ACTION( sXML_copy_outline_levels, "copy-outline-levels" ); -XML_CONSTASCII_ACTION( sXML_copy_results_only, "copy-results-only" ); -XML_CONSTASCII_ACTION( sXML_copy_styles, "copy-styles" ); -XML_CONSTASCII_ACTION( sXML_corner_radius , "corner-radius" ); -XML_CONSTASCII_ACTION( sXML_correct, "correct"); -XML_CONSTASCII_ACTION( sXML_cos, "cos" ); -XML_CONSTASCII_ACTION( sXML_cosh, "cosh" ); -XML_CONSTASCII_ACTION( sXML_cot, "cot" ); -XML_CONSTASCII_ACTION( sXML_coth, "coth" ); -XML_CONSTASCII_ACTION( sXML_count, "count" ); -XML_CONSTASCII_ACTION( sXML_count_empty_lines, "count-empty-lines" ); -XML_CONSTASCII_ACTION( sXML_count_in_floating_frames, "count-in-floating-frames" ); -XML_CONSTASCII_ACTION( sXML_counterclockwise, "counterclockwise" ); -XML_CONSTASCII_ACTION( sXML_countnums, "countnums" ); -XML_CONSTASCII_ACTION( sXML_country, "country" ); -XML_CONSTASCII_ACTION( sXML_country_asian, "country-asian" ); -XML_CONSTASCII_ACTION( sXML_country_complex, "country-complex" ); -XML_CONSTASCII_ACTION( sXML_covered_table_cell, "covered-table-cell" ); -XML_CONSTASCII_ACTION( sXML_create_date, "create-date" ); -XML_CONSTASCII_ACTION( sXML_create_date_string, "create-date-string" ); -XML_CONSTASCII_ACTION( sXML_creation_date, "creation-date" ); -XML_CONSTASCII_ACTION( sXML_creation_time, "creation-time" ); -XML_CONSTASCII_ACTION( sXML_creator, "creator" ); -XML_CONSTASCII_ACTION( sXML_crossedout_cross, "X" ); -XML_CONSTASCII_ACTION( sXML_crossedout_double, "double-line" ); -XML_CONSTASCII_ACTION( sXML_crossedout_none, "none" ); -XML_CONSTASCII_ACTION( sXML_crossedout_single, "single-line" ); -XML_CONSTASCII_ACTION( sXML_crossedout_slash, "slash" ); -XML_CONSTASCII_ACTION( sXML_crossedout_thick, "thick-line" ); -XML_CONSTASCII_ACTION( sXML_csc, "csc" ); -XML_CONSTASCII_ACTION( sXML_csch, "csch" ); -XML_CONSTASCII_ACTION( sXML_cube, "cube" ); -XML_CONSTASCII_ACTION( sXML_cuboid, "cuboid" ); -XML_CONSTASCII_ACTION( sXML_currency, "currency"); -XML_CONSTASCII_ACTION( sXML_currency_style, "currency-style" ); -XML_CONSTASCII_ACTION( sXML_currency_symbol, "currency-symbol" ); -XML_CONSTASCII_ACTION( sXML_current, "current" ); -XML_CONSTASCII_ACTION( sXML_current_value, "current-value" ); -XML_CONSTASCII_ACTION( sXML_cursor_position, "cursor-position" ); -XML_CONSTASCII_ACTION( sXML_cursor_position_x, "cursor-position-x" ); -XML_CONSTASCII_ACTION( sXML_cursor_position_y, "cursor-position-y" ); -XML_CONSTASCII_ACTION( sXML_custom1, "custom1" ); -XML_CONSTASCII_ACTION( sXML_custom2, "custom2" ); -XML_CONSTASCII_ACTION( sXML_custom3, "custom3" ); -XML_CONSTASCII_ACTION( sXML_custom4, "custom4" ); -XML_CONSTASCII_ACTION( sXML_custom5, "custom5" ); -XML_CONSTASCII_ACTION( sXML_cut_offs, "cut_offs" ); -XML_CONSTASCII_ACTION( sXML_cx, "cx" ); -XML_CONSTASCII_ACTION( sXML_cy, "cy" ); -XML_CONSTASCII_ACTION( sXML_cylinder, "cylinder" ); -XML_CONSTASCII_ACTION( sXML_d, "d" ); -XML_CONSTASCII_ACTION( sXML_dash, "dash" ); -XML_CONSTASCII_ACTION( sXML_dashed, "dashed" ); -XML_CONSTASCII_ACTION( sXML_data, "data"); -XML_CONSTASCII_ACTION( sXML_data_cell_range_address, "data-cell-range-address" ); -XML_CONSTASCII_ACTION( sXML_data_label_number, "data-label-number" ); -XML_CONSTASCII_ACTION( sXML_data_label_symbol, "data-label-symbol" ); -XML_CONSTASCII_ACTION( sXML_data_label_text, "data-label-text" ); -XML_CONSTASCII_ACTION( sXML_data_pilot_field, "data-pilot-field"); -XML_CONSTASCII_ACTION( sXML_data_pilot_level, "data-pilot-level"); -XML_CONSTASCII_ACTION( sXML_data_pilot_member, "data-pilot-member"); -XML_CONSTASCII_ACTION( sXML_data_pilot_members, "data-pilot-members"); -XML_CONSTASCII_ACTION( sXML_data_pilot_subtotal, "data-pilot-subtotal"); -XML_CONSTASCII_ACTION( sXML_data_pilot_subtotals, "data-pilot-subtotals"); -XML_CONSTASCII_ACTION( sXML_data_pilot_table, "data-pilot-table"); -XML_CONSTASCII_ACTION( sXML_data_pilot_tables, "data-pilot-tables"); -XML_CONSTASCII_ACTION( sXML_data_point, "data-point" ); -XML_CONSTASCII_ACTION( sXML_data_style, "data-style" ); -XML_CONSTASCII_ACTION( sXML_data_style_name, "data-style-name" ); -XML_CONSTASCII_ACTION( sXML_data_type, "data-type"); -XML_CONSTASCII_ACTION( sXML_database_display, "database-display" ); -XML_CONSTASCII_ACTION( sXML_database_name, "database-name"); -XML_CONSTASCII_ACTION( sXML_database_next, "database-next" ); -XML_CONSTASCII_ACTION( sXML_database_range, "database-range"); -XML_CONSTASCII_ACTION( sXML_database_ranges, "database-ranges"); -XML_CONSTASCII_ACTION( sXML_database_row_number, "database-row-number" ); -XML_CONSTASCII_ACTION( sXML_database_select, "database-select" ); -XML_CONSTASCII_ACTION( sXML_database_source_query, "database-source-query"); -XML_CONSTASCII_ACTION( sXML_database_source_sql, "database-source-sql"); -XML_CONSTASCII_ACTION( sXML_database_source_table, "database-source-table"); -XML_CONSTASCII_ACTION( sXML_date, "date" ); -XML_CONSTASCII_ACTION( sXML_datetime, "datetime" ); -XML_CONSTASCII_ACTION( sXML_date_adjust, "date-adjust" ); -XML_CONSTASCII_ACTION( sXML_date_style, "date-style" ); -XML_CONSTASCII_ACTION( sXML_date_time, "date-time" ); -XML_CONSTASCII_ACTION( sXML_date_value, "date-value"); -XML_CONSTASCII_ACTION( sXML_day, "day" ); -XML_CONSTASCII_ACTION( sXML_day_of_week, "day-of-week" ); -XML_CONSTASCII_ACTION( sXML_dde_application, "dde-application" ); -XML_CONSTASCII_ACTION( sXML_dde_connection, "dde-connection" ); -XML_CONSTASCII_ACTION( sXML_dde_connection_decl, "dde-connection-decl" ); -XML_CONSTASCII_ACTION( sXML_dde_connection_decls, "dde-connection-decls" ); -XML_CONSTASCII_ACTION( sXML_dde_item, "dde-item" ); -XML_CONSTASCII_ACTION( sXML_dde_link, "dde-link" ); -XML_CONSTASCII_ACTION( sXML_dde_links, "dde-links" ); -XML_CONSTASCII_ACTION( sXML_dde_source, "dde-source" ); -XML_CONSTASCII_ACTION( sXML_dde_topic, "dde-topic" ); -XML_CONSTASCII_ACTION( sXML_decimal_places, "decimal-places" ); -XML_CONSTASCII_ACTION( sXML_decimal_replacement, "decimal-replacement" ); -XML_CONSTASCII_ACTION( sXML_declare, "declare" ); -XML_CONSTASCII_ACTION( sXML_decorate_words_only, "decorate-words-only" ); -XML_CONSTASCII_ACTION( sXML_decorative, "decorative" ); -XML_CONSTASCII_ACTION( sXML_deep, "deep" ); -XML_CONSTASCII_ACTION( sXML_default, "default" ); -XML_CONSTASCII_ACTION( sXML_default_cell_style_name, "default-cell-style-name" ); -XML_CONSTASCII_ACTION( sXML_default_style, "default-style" ); -XML_CONSTASCII_ACTION( sXML_default_style_name, "default-style-name" ); -XML_CONSTASCII_ACTION( sXML_degree, "degree" ); -XML_CONSTASCII_ACTION( sXML_delay, "delay" ); -XML_CONSTASCII_ACTION( sXML_deletion, "deletion" ); -XML_CONSTASCII_ACTION( sXML_deletions, "deletions" ); -XML_CONSTASCII_ACTION( sXML_depth, "depth" ); -XML_CONSTASCII_ACTION( sXML_desc, "desc" ); -XML_CONSTASCII_ACTION( sXML_descending, "descending"); -XML_CONSTASCII_ACTION( sXML_description, "description" ); -XML_CONSTASCII_ACTION( sXML_detective, "detective" ); -XML_CONSTASCII_ACTION( sXML_determinant, "determinant" ); -XML_CONSTASCII_ACTION( sXML_diff, "diff"); -XML_CONSTASCII_ACTION( sXML_diffuse_color, "diffuse-color" ); -XML_CONSTASCII_ACTION( sXML_dependences, "dependences"); -XML_CONSTASCII_ACTION( sXML_dependence, "dependence"); -XML_CONSTASCII_ACTION( sXML_direction, "direction"); -XML_CONSTASCII_ACTION( sXML_disabled, "disabled" ); -XML_CONSTASCII_ACTION( sXML_disc, "disc" ); -XML_CONSTASCII_ACTION( sXML_display, "display" ); -XML_CONSTASCII_ACTION( sXML_display_border, "display-border"); -XML_CONSTASCII_ACTION( sXML_display_details, "display-details"); -XML_CONSTASCII_ACTION( sXML_display_duplicates, "display-duplicates"); -XML_CONSTASCII_ACTION( sXML_display_empty, "display-empty"); -XML_CONSTASCII_ACTION( sXML_display_filter_buttons, "display-filter-buttons"); -XML_CONSTASCII_ACTION( sXML_display_formula, "display-formula" ); -XML_CONSTASCII_ACTION( sXML_display_label, "display-label" ); -XML_CONSTASCII_ACTION( sXML_display_levels, "display-levels" ); -XML_CONSTASCII_ACTION( sXML_display_name, "display-name" ); -XML_CONSTASCII_ACTION( sXML_display_outline_level, "display-outline-level" ); -XML_CONSTASCII_ACTION( sXML_dissolve, "dissolve" ); -XML_CONSTASCII_ACTION( sXML_distance, "distance" ); -XML_CONSTASCII_ACTION( sXML_distribute_letter, "distribute-letter" ); -XML_CONSTASCII_ACTION( sXML_distribute_space, "distribute-space" ); -XML_CONSTASCII_ACTION( sXML_divide, "divide" ); -XML_CONSTASCII_ACTION( sXML_document, "document" ); -XML_CONSTASCII_ACTION( sXML_document_content, "document-content" ); -XML_CONSTASCII_ACTION( sXML_document_meta, "document-meta" ); -XML_CONSTASCII_ACTION( sXML_document_settings, "document-settings" ); -XML_CONSTASCII_ACTION( sXML_document_styles, "document-styles" ); -XML_CONSTASCII_ACTION( sXML_document_statistic, "document-statistic" ); -XML_CONSTASCII_ACTION( sXML_domain, "domain" ); -XML_CONSTASCII_ACTION( sXML_dot, "dot" ); -XML_CONSTASCII_ACTION( sXML_dotted, "dotted" ); -XML_CONSTASCII_ACTION( sXML_double, "double" ); -XML_CONSTASCII_ACTION( sXML_double_sided, "double-sided" ); -XML_CONSTASCII_ACTION( sXML_down, "down" ); -XML_CONSTASCII_ACTION( sXML_draft, "draft"); -XML_CONSTASCII_ACTION( sXML_draw, "draw" ); -XML_CONSTASCII_ACTION( sXML_draw_aspect, "ole-draw-aspect" ); -XML_CONSTASCII_ACTION( sXML_drawing, "drawing" ); -XML_CONSTASCII_ACTION( sXML_drawings, "drawings" ); -XML_CONSTASCII_ACTION( sXML_drawpool , "drawpool" ); -XML_CONSTASCII_ACTION( sXML_drop_cap, "drop-cap" ); -XML_CONSTASCII_ACTION( sXML_dynamic, "dynamic" ); -XML_CONSTASCII_ACTION( sXML_edge_rounding, "edge-rounding" ); -XML_CONSTASCII_ACTION( sXML_editable, "editable" ); -XML_CONSTASCII_ACTION( sXML_editing_cycles, "editing-cycles" ); -XML_CONSTASCII_ACTION( sXML_editing_duration, "editing-duration" ); -XML_CONSTASCII_ACTION( sXML_edition, "edition" ); -XML_CONSTASCII_ACTION( sXML_editor, "editor" ); -XML_CONSTASCII_ACTION( sXML_ellipse , "ellipse" ); -XML_CONSTASCII_ACTION( sXML_email, "email" ); -XML_CONSTASCII_ACTION( sXML_embed, "embed" ); -XML_CONSTASCII_ACTION( sXML_embedded_visible_area, "embedded-visible-area" ); -XML_CONSTASCII_ACTION( sXML_embossed, "embossed" ); -XML_CONSTASCII_ACTION( sXML_emissive_color, "emissive-color" ); -XML_CONSTASCII_ACTION( sXML_empty, "empty"); -XML_CONSTASCII_ACTION( sXML_enabled, "enabled" ); -XML_CONSTASCII_ACTION( sXML_encoding, "encoding" ); -XML_CONSTASCII_ACTION( sXML_end, "end" ); -XML_CONSTASCII_ACTION( sXML_end_angle, "end-angle" ); -XML_CONSTASCII_ACTION( sXML_end_cell_address, "end-cell-address" ); -XML_CONSTASCII_ACTION( sXML_end_color, "end-color" ); -XML_CONSTASCII_ACTION( sXML_end_column, "end-column" ); -XML_CONSTASCII_ACTION( sXML_end_intensity, "end-intensity" ); -XML_CONSTASCII_ACTION( sXML_end_position, "end-position" ); -XML_CONSTASCII_ACTION( sXML_end_row, "end-row" ); -XML_CONSTASCII_ACTION( sXML_end_table, "end-table" ); -XML_CONSTASCII_ACTION( sXML_end_x, "end-x" ); -XML_CONSTASCII_ACTION( sXML_end_y, "end-y" ); -XML_CONSTASCII_ACTION( sXML_endless, "endless" ); -XML_CONSTASCII_ACTION( sXML_endnote, "endnote" ); -XML_CONSTASCII_ACTION( sXML_endnote_body, "endnote-body" ); -XML_CONSTASCII_ACTION( sXML_endnote_citation, "endnote-citation" ); -XML_CONSTASCII_ACTION( sXML_endnote_ref, "endnote-ref" ); -XML_CONSTASCII_ACTION( sXML_endnotes_configuration, "endnotes-configuration"); -XML_CONSTASCII_ACTION( sXML_engraved, "engraved" ); -XML_CONSTASCII_ACTION( sXML_eq, "eq"); -XML_CONSTASCII_ACTION( sXML_equal_author, "equal-author"); -XML_CONSTASCII_ACTION( sXML_equal_comment, "equal-comment"); -XML_CONSTASCII_ACTION( sXML_equal_date, "equal-date"); -XML_CONSTASCII_ACTION( sXML_era, "era" ); -XML_CONSTASCII_ACTION( sXML_ergo_sum, "ergo-sum" ); -XML_CONSTASCII_ACTION( sXML_error_category, "error-category" ); -XML_CONSTASCII_ACTION( sXML_error_lower_indicator, "error-lower-indicator" ); -XML_CONSTASCII_ACTION( sXML_error_lower_limit, "error-lower-limit" ); -XML_CONSTASCII_ACTION( sXML_error_macro, "error-macro" ); -XML_CONSTASCII_ACTION( sXML_error_margin, "error-margin" ); -XML_CONSTASCII_ACTION( sXML_error_message, "error-message" ); -XML_CONSTASCII_ACTION( sXML_error_percentage, "error-percentage" ); -XML_CONSTASCII_ACTION( sXML_error_upper_indicator, "error-upper-indicator" ); -XML_CONSTASCII_ACTION( sXML_error_upper_limit, "error-upper-limit" ); -XML_CONSTASCII_ACTION( sXML_escapement_sub, "sub" ); -XML_CONSTASCII_ACTION( sXML_escapement_super, "super" ); -XML_CONSTASCII_ACTION( sXML_even_page, "even-page" ); -XML_CONSTASCII_ACTION( sXML_event, "event" ); -XML_CONSTASCII_ACTION( sXML_event_name, "event-name" ); -XML_CONSTASCII_ACTION( sXML_events, "events" ); -XML_CONSTASCII_ACTION( sXML_execute, "execute" ); -XML_CONSTASCII_ACTION( sXML_execute_macro, "execute-macro" ); -XML_CONSTASCII_ACTION( sXML_exists, "exists" ); -XML_CONSTASCII_ACTION( sXML_exp, "exp" ); -XML_CONSTASCII_ACTION( sXML_exponential, "exponential" ); -XML_CONSTASCII_ACTION( sXML_expression, "expression"); -XML_CONSTASCII_ACTION( sXML_extra, "extra"); -XML_CONSTASCII_ACTION( sXML_extrude, "extrude" ); -XML_CONSTASCII_ACTION( sXML_factorial, "factorial" ); -XML_CONSTASCII_ACTION( sXML_fade_from_bottom, "fade-from-bottom" ); -XML_CONSTASCII_ACTION( sXML_fade_from_center, "fade-from-center" ); -XML_CONSTASCII_ACTION( sXML_fade_from_left, "fade-from-left" ); -XML_CONSTASCII_ACTION( sXML_fade_from_lowerleft, "fade-from-lowerleft" ); -XML_CONSTASCII_ACTION( sXML_fade_from_lowerright, "fade-from-lowerright" ); -XML_CONSTASCII_ACTION( sXML_fade_from_right, "fade-from-right" ); -XML_CONSTASCII_ACTION( sXML_fade_from_top, "fade-from-top" ); -XML_CONSTASCII_ACTION( sXML_fade_from_upperleft, "fade-from-upperleft" ); -XML_CONSTASCII_ACTION( sXML_fade_from_upperright, "fade-from-upperright" ); -XML_CONSTASCII_ACTION( sXML_fade_to_center, "fade-to-center" ); -XML_CONSTASCII_ACTION( sXML_fade_out, "fade-out" ); -XML_CONSTASCII_ACTION( sXML_false, "false" ); -XML_CONSTASCII_ACTION( sXML_family, "family" ); -XML_CONSTASCII_ACTION( sXML_fast, "fast" ); -XML_CONSTASCII_ACTION( sXML_field_number, "field-number"); -XML_CONSTASCII_ACTION( sXML_file_name, "file-name" ); -XML_CONSTASCII_ACTION( sXML_fill, "fill" ); -XML_CONSTASCII_ACTION( sXML_fill_color , "fill-color" ); -XML_CONSTASCII_ACTION( sXML_fill_gradient_name, "fill-gradient-name" ); -XML_CONSTASCII_ACTION( sXML_fill_hatch_name, "fill-hatch-name" ); -XML_CONSTASCII_ACTION( sXML_fill_hatch_solid, "fill-hatch-solid" ); -XML_CONSTASCII_ACTION( sXML_fill_image, "fill-image" ); -XML_CONSTASCII_ACTION( sXML_fill_image_height, "fill-image-height" ); -XML_CONSTASCII_ACTION( sXML_fill_image_name, "fill-image-name" ); -XML_CONSTASCII_ACTION( sXML_fill_image_width, "fill-image-width" ); -XML_CONSTASCII_ACTION( sXML_filter, "filter"); -XML_CONSTASCII_ACTION( sXML_filter_and, "filter-and"); -XML_CONSTASCII_ACTION( sXML_filter_condition, "filter-condition"); -XML_CONSTASCII_ACTION( sXML_filter_name, "filter-name" ); -XML_CONSTASCII_ACTION( sXML_filter_options, "filter-options" ); -XML_CONSTASCII_ACTION( sXML_filter_or, "filter-or"); -XML_CONSTASCII_ACTION( sXML_first_date_time, "first-date-time"); -XML_CONSTASCII_ACTION( sXML_first_page, "first-page"); -XML_CONSTASCII_ACTION( sXML_first_page_number, "first-page-number"); -XML_CONSTASCII_ACTION( sXML_fit_to_contour, "fit-to-contour"); -XML_CONSTASCII_ACTION( sXML_fit_to_size, "fit-to-size" ); -XML_CONSTASCII_ACTION( sXML_fix, "fix" ); -XML_CONSTASCII_ACTION( sXML_fixed, "fixed" ); -XML_CONSTASCII_ACTION( sXML_flat, "flat" ); -XML_CONSTASCII_ACTION( sXML_float, "float"); -XML_CONSTASCII_ACTION( sXML_floating_frame, "floating-frame"); -XML_CONSTASCII_ACTION( sXML_floor, "floor" ); -XML_CONSTASCII_ACTION( sXML_fn, "fn" ); -XML_CONSTASCII_ACTION( sXML_focal_length, "focal-length"); -XML_CONSTASCII_ACTION( sXML_font_char_width, "font-char-width" ); -XML_CONSTASCII_ACTION( sXML_font_charset, "font-charset" ); -XML_CONSTASCII_ACTION( sXML_font_charset_asian, "font-charset-asian" ); -XML_CONSTASCII_ACTION( sXML_font_charset_complex, "font-charset-complex" ); -XML_CONSTASCII_ACTION( sXML_font_color, "font-color" ); -XML_CONSTASCII_ACTION( sXML_font_decl, "font-decl" ); -XML_CONSTASCII_ACTION( sXML_font_decls, "font-decls" ); -XML_CONSTASCII_ACTION( sXML_font_family, "font-family" ); -XML_CONSTASCII_ACTION( sXML_font_family_asian, "font-family-asian" ); -XML_CONSTASCII_ACTION( sXML_font_family_complex, "font-family-complex" ); -XML_CONSTASCII_ACTION( sXML_font_family_generic, "font-family-generic" ); -XML_CONSTASCII_ACTION( sXML_font_family_generic_asian, "font-family-generic-asian" ); -XML_CONSTASCII_ACTION( sXML_font_family_generic_complex, "font-family-generic-complex" ); -XML_CONSTASCII_ACTION( sXML_font_kerning, "font-kerning" ); -XML_CONSTASCII_ACTION( sXML_font_name, "font-name" ); -XML_CONSTASCII_ACTION( sXML_font_name_asian, "font-name-asian" ); -XML_CONSTASCII_ACTION( sXML_font_name_complex, "font-name-complex" ); -XML_CONSTASCII_ACTION( sXML_font_pitch, "font-pitch" ); -XML_CONSTASCII_ACTION( sXML_font_pitch_asian, "font-pitch-asian" ); -XML_CONSTASCII_ACTION( sXML_font_pitch_complex, "font-pitch-complex" ); -XML_CONSTASCII_ACTION( sXML_font_relief, "font-relief" ); -XML_CONSTASCII_ACTION( sXML_font_size, "font-size" ); -XML_CONSTASCII_ACTION( sXML_font_size_asian, "font-size-asian" ); -XML_CONSTASCII_ACTION( sXML_font_size_complex, "font-size-complex" ); -XML_CONSTASCII_ACTION( sXML_font_size_rel, "font-size-rel" ); -XML_CONSTASCII_ACTION( sXML_font_size_rel_asian, "font-size-rel-asian" ); -XML_CONSTASCII_ACTION( sXML_font_size_rel_complex, "font-size-rel-complex" ); -XML_CONSTASCII_ACTION( sXML_font_style, "font-style" ); -XML_CONSTASCII_ACTION( sXML_font_style_asian, "font-style-asian" ); -XML_CONSTASCII_ACTION( sXML_font_style_complex, "font-style-complex" ); -XML_CONSTASCII_ACTION( sXML_font_style_name, "font-style-name" ); -XML_CONSTASCII_ACTION( sXML_font_style_name_asian, "font-style-name-asian" ); -XML_CONSTASCII_ACTION( sXML_font_style_name_complex, "font-style-name-complex" ); -XML_CONSTASCII_ACTION( sXML_font_variant, "font-variant" ); -XML_CONSTASCII_ACTION( sXML_font_weight, "font-weight" ); -XML_CONSTASCII_ACTION( sXML_font_weight_asian, "font-weight-asian" ); -XML_CONSTASCII_ACTION( sXML_font_weight_complex, "font-weight-complex" ); -XML_CONSTASCII_ACTION( sXML_font_width, "font-width" ); -XML_CONSTASCII_ACTION( sXML_font_word_line_mode, "font-word-line-mode" ); -XML_CONSTASCII_ACTION( sXML_fontfamily, "fontfamily" ); -XML_CONSTASCII_ACTION( sXML_fontsize, "fontsize" ); -XML_CONSTASCII_ACTION( sXML_fontstyle, "fontstyle" ); -XML_CONSTASCII_ACTION( sXML_fontweight, "fontweight" ); -XML_CONSTASCII_ACTION( sXML_fontwork_adjust, "fontwork-adjust" ); -XML_CONSTASCII_ACTION( sXML_fontwork_distance, "fontwork-distance" ); -XML_CONSTASCII_ACTION( sXML_fontwork_form, "fontwork-form" ); -XML_CONSTASCII_ACTION( sXML_fontwork_hide_form, "fontwork-hide-form" ); -XML_CONSTASCII_ACTION( sXML_fontwork_mirror, "fontwork-mirror" ); -XML_CONSTASCII_ACTION( sXML_fontwork_outline, "fontwork-outline" ); -XML_CONSTASCII_ACTION( sXML_fontwork_shadow, "fontwork-shadow" ); -XML_CONSTASCII_ACTION( sXML_fontwork_shadow_color, "fontwork-shadow-color" ); -XML_CONSTASCII_ACTION( sXML_fontwork_shadow_offset_x, "fontwork-shadow-offset-x" ); -XML_CONSTASCII_ACTION( sXML_fontwork_shadow_offset_y, "fontwork-shadow-offset-y" ); -XML_CONSTASCII_ACTION( sXML_fontwork_shadow_transparence, "fontwork-shadow-transparence" ); -XML_CONSTASCII_ACTION( sXML_fontwork_start, "fontwork-start" ); -XML_CONSTASCII_ACTION( sXML_fontwork_style, "fontwork-style" ); -XML_CONSTASCII_ACTION( sXML_footer, "footer" ); -XML_CONSTASCII_ACTION( sXML_footer_left, "footer-left" ); -XML_CONSTASCII_ACTION( sXML_footer_style, "footer-style" ); -XML_CONSTASCII_ACTION( sXML_footnote, "footnote" ); -XML_CONSTASCII_ACTION( sXML_footnote_body, "footnote-body" ); -XML_CONSTASCII_ACTION( sXML_footnote_citation, "footnote-citation" ); -XML_CONSTASCII_ACTION( sXML_footnote_continuation_notice_backward, "footnote-continuation-notice-backward" ); -XML_CONSTASCII_ACTION( sXML_footnote_continuation_notice_forward, "footnote-continuation-notice-forward" ); -XML_CONSTASCII_ACTION( sXML_footnote_max_height, "footnote-max-height" ); -XML_CONSTASCII_ACTION( sXML_distance_after_sep, "distance-after-sep" ); -XML_CONSTASCII_ACTION( sXML_distance_before_sep, "distance-before-sep" ); -XML_CONSTASCII_ACTION( sXML_footnote_ref, "footnote-ref" ); -XML_CONSTASCII_ACTION( sXML_footnote_sep, "footnote-sep" ); -XML_CONSTASCII_ACTION( sXML_footnotes_configuration, "footnotes-configuration"); -XML_CONSTASCII_ACTION( sXML_footnotes_position, "footnotes-position" ); -XML_CONSTASCII_ACTION( sXML_forall, "forall" ); -XML_CONSTASCII_ACTION( sXML_force_manual, "force-manual" ); -XML_CONSTASCII_ACTION( sXML_foreground, "foreground" ); -XML_CONSTASCII_ACTION( sXML_foreign_object, "foreign-object" ); -XML_CONSTASCII_ACTION( sXML_format_change, "format-change" ); -XML_CONSTASCII_ACTION( sXML_format_source, "format-source" ); -XML_CONSTASCII_ACTION( sXML_forms, "forms" ); -XML_CONSTASCII_ACTION( sXML_formula, "formula"); -XML_CONSTASCII_ACTION( sXML_formula_hidden, "formula-hidden"); -XML_CONSTASCII_ACTION( sXML_formulas, "formulas"); -XML_CONSTASCII_ACTION( sXML_fraction, "fraction" ); -XML_CONSTASCII_ACTION( sXML_frame, "frame" ); -XML_CONSTASCII_ACTION( sXML_frame_content, "frame-content" ); -XML_CONSTASCII_ACTION( sXML_frame_display_scrollbar, "frame-display-scrollbar" ); -XML_CONSTASCII_ACTION( sXML_frame_display_border, "frame-display-border" ); -XML_CONSTASCII_ACTION( sXML_frame_margin_horizontal, "frame-margin-horizontal" ); -XML_CONSTASCII_ACTION( sXML_frame_margin_vertical, "frame-margin-vertical" ); -XML_CONSTASCII_ACTION( sXML_frame_end_margin, "frame-end-margin" ); -XML_CONSTASCII_ACTION( sXML_frame_name, "frame-name" ); -XML_CONSTASCII_ACTION( sXML_frame_start_margin, "frame-start-margin" ); -XML_CONSTASCII_ACTION( sXML_freeze, "freeze" ); -XML_CONSTASCII_ACTION( sXML_freeze_position, "freeze-position" ); -XML_CONSTASCII_ACTION( sXML_from_another_table, "from-another-table" ); -XML_CONSTASCII_ACTION( sXML_from_inside, "from-inside" ); -XML_CONSTASCII_ACTION( sXML_from_left, "from-left" ); -XML_CONSTASCII_ACTION( sXML_from_same_table, "from-same-table" ); -XML_CONSTASCII_ACTION( sXML_from_top, "from-top" ); -XML_CONSTASCII_ACTION( sXML_fuchsia, "fuchsia"); -XML_CONSTASCII_ACTION( sXML_full, "full" ); -XML_CONSTASCII_ACTION( sXML_full_screen, "full-screen" ); -XML_CONSTASCII_ACTION( sXML_function, "function"); -XML_CONSTASCII_ACTION( sXML_g , "g" ); -XML_CONSTASCII_ACTION( sXML_gamma , "gamma" ); -XML_CONSTASCII_ACTION( sXML_gap, "gap" ); -XML_CONSTASCII_ACTION( sXML_gap_width, "gap-width" ); -XML_CONSTASCII_ACTION( sXML_gcd, "gcd" ); -XML_CONSTASCII_ACTION( sXML_generator, "generator" ); -XML_CONSTASCII_ACTION( sXML_geq, "geq" ); -XML_CONSTASCII_ACTION( sXML_gouraud, "gouraud"); -XML_CONSTASCII_ACTION( sXML_gradient , "gradient" ); -XML_CONSTASCII_ACTION( sXML_gradient_angle, "angle" ); -XML_CONSTASCII_ACTION( sXML_gradient_border, "border" ); -XML_CONSTASCII_ACTION( sXML_gradient_step_count , "gradient-step-count" ); -XML_CONSTASCII_ACTION( sXML_gradient_style, "gradient-style" ); -XML_CONSTASCII_ACTION( sXML_gradientstyle_axial, "axial" ); -XML_CONSTASCII_ACTION( sXML_gradientstyle_ellipsoid, "ellipsoid" ); -XML_CONSTASCII_ACTION( sXML_gradientstyle_linear, "linear" ); -XML_CONSTASCII_ACTION( sXML_gradientstyle_radial, "radial" ); -XML_CONSTASCII_ACTION( sXML_gradientstyle_rectangular, "rectangular" ); -XML_CONSTASCII_ACTION( sXML_gradientstyle_square, "square" ); -XML_CONSTASCII_ACTION( sXML_grand_total, "grand-total"); -XML_CONSTASCII_ACTION( sXML_graphic , "graphic" ); -XML_CONSTASCII_ACTION( sXML_gray, "gray" ); -XML_CONSTASCII_ACTION( sXML_green , "green" ); -XML_CONSTASCII_ACTION( sXML_greyscale, "greyscale" ); -XML_CONSTASCII_ACTION( sXML_grid, "grid" ); -XML_CONSTASCII_ACTION( sXML_groove, "groove" ); -XML_CONSTASCII_ACTION( sXML_group_by_field_number, "group-by-field-number"); -XML_CONSTASCII_ACTION( sXML_group_name, "group-name" ); -XML_CONSTASCII_ACTION( sXML_grouping, "grouping" ); -XML_CONSTASCII_ACTION( sXML_gt, "gt" ); -XML_CONSTASCII_ACTION( sXML_h, "h" ); -XML_CONSTASCII_ACTION( sXML_hanging, "hanging" ); -XML_CONSTASCII_ACTION( sXML_has_persistent_data, "has-persistent-data"); -XML_CONSTASCII_ACTION( sXML_hatch , "hatch" ); -XML_CONSTASCII_ACTION( sXML_hatch_distance, "distance" ); -XML_CONSTASCII_ACTION( sXML_hatch_style, "style" ); -XML_CONSTASCII_ACTION( sXML_hatchstyle_double, "double" ); -XML_CONSTASCII_ACTION( sXML_hatchstyle_single, "single" ); -XML_CONSTASCII_ACTION( sXML_hatchstyle_triple, "triple" ); -XML_CONSTASCII_ACTION( sXML_header, "header" ); -XML_CONSTASCII_ACTION( sXML_header_left, "header-left" ); -XML_CONSTASCII_ACTION( sXML_header_style, "header-style" ); -XML_CONSTASCII_ACTION( sXML_headers, "headers" ); -XML_CONSTASCII_ACTION( sXML_height, "height" ); -XML_CONSTASCII_ACTION( sXML_help_file_name, "help-file-name" ); -XML_CONSTASCII_ACTION( sXML_help_id, "help-id" ); -XML_CONSTASCII_ACTION( sXML_help_message, "help-message" ); -XML_CONSTASCII_ACTION( sXML_hidden, "hidden" ); -XML_CONSTASCII_ACTION( sXML_hidden_and_protected, "hidden-and-protected"); -XML_CONSTASCII_ACTION( sXML_hidden_paragraph, "hidden-paragraph" ); -XML_CONSTASCII_ACTION( sXML_hidden_text, "hidden-text" ); -XML_CONSTASCII_ACTION( sXML_highlighted_range, "highlighted-range" ); -XML_CONSTASCII_ACTION( sXML_horizontal, "horizontal" ); -XML_CONSTASCII_ACTION( sXML_horizontal_lines, "horizontal-lines" ); -XML_CONSTASCII_ACTION( sXML_horizontal_on_left_pages, "horizontal-on-left-pages" ); -XML_CONSTASCII_ACTION( sXML_horizontal_on_right_pages, "horizontal-on-right-pages" ); -XML_CONSTASCII_ACTION( sXML_horizontal_pos, "horizontal-pos" ); -XML_CONSTASCII_ACTION( sXML_horizontal_rel, "horizontal-rel" ); -XML_CONSTASCII_ACTION( sXML_horizontal_scrollbar_width, "horizontal-scrollbar-width" ); -XML_CONSTASCII_ACTION( sXML_horizontal_segments, "horizontal-segments" ); -XML_CONSTASCII_ACTION( sXML_horizontal_split_mode, "horizontal-split-mode" ); -XML_CONSTASCII_ACTION( sXML_horizontal_split_position, "horizontal-split-position" ); -XML_CONSTASCII_ACTION( sXML_horizontal_stripes, "horizontal-stripes" ); -XML_CONSTASCII_ACTION( sXML_hours, "hours" ); -XML_CONSTASCII_ACTION( sXML_howpublished, "howpublished" ); -XML_CONSTASCII_ACTION( sXML_href, "href" ); -XML_CONSTASCII_ACTION( sXML_html, "html"); -XML_CONSTASCII_ACTION( sXML_hyperlink_behaviour, "hyperlink-behaviour" ); -XML_CONSTASCII_ACTION( sXML_hyphenate, "hyphenate" ); -XML_CONSTASCII_ACTION( sXML_hyphenation_keep, "hyphenation-keep" ); -XML_CONSTASCII_ACTION( sXML_hyphenation_ladder_count, "hyphenation-ladder-count" ); -XML_CONSTASCII_ACTION( sXML_hyphenation_push_char_count, "hyphenation-push-char-count" ); -XML_CONSTASCII_ACTION( sXML_hyphenation_remain_char_count, "hyphenation-remain-char-count" ); -XML_CONSTASCII_ACTION( sXML_i, "i" ); -XML_CONSTASCII_ACTION( sXML_icon, "icon" ); -XML_CONSTASCII_ACTION( sXML_id, "id" ); -XML_CONSTASCII_ACTION( sXML_ident, "ident"); -XML_CONSTASCII_ACTION( sXML_identifier, "identifier" ); -XML_CONSTASCII_ACTION( sXML_identify_categories, "identify-categories"); -XML_CONSTASCII_ACTION( sXML_ideograph_alpha, "ideograph-alpha"); -XML_CONSTASCII_ACTION( sXML_ignore_case, "ignore-case" ); -XML_CONSTASCII_ACTION( sXML_ignore_empty_rows, "ignore-empty-rows"); -XML_CONSTASCII_ACTION( sXML_illustration_index, "illustration-index" ); -XML_CONSTASCII_ACTION( sXML_illustration_index_entry_template, "illustration-index-entry-template" ); -XML_CONSTASCII_ACTION( sXML_illustration_index_source, "illustration-index-source" ); -XML_CONSTASCII_ACTION( sXML_image, "image" ); -XML_CONSTASCII_ACTION( sXML_image_count, "image-count" ); -XML_CONSTASCII_ACTION( sXML_image_map, "image-map" ); -XML_CONSTASCII_ACTION( sXML_implies, "implies" ); -XML_CONSTASCII_ACTION( sXML_in, "in"); -XML_CONSTASCII_ACTION( sXML_in_range, "in-range"); -XML_CONSTASCII_ACTION( sXML_inbook, "inbook" ); -XML_CONSTASCII_ACTION( sXML_incollection, "incollection" ); -XML_CONSTASCII_ACTION( sXML_increment, "increment" ); -XML_CONSTASCII_ACTION( sXML_index, "index"); -XML_CONSTASCII_ACTION( sXML_index_body, "index-body"); -XML_CONSTASCII_ACTION( sXML_index_entry_bibliography, "index-entry-bibliography" ); -XML_CONSTASCII_ACTION( sXML_index_entry_chapter, "index-entry-chapter" ); -XML_CONSTASCII_ACTION( sXML_index_entry_chapter_number, "index-entry-chapter-number" ); -XML_CONSTASCII_ACTION( sXML_index_entry_link_end, "index-entry-link-end" ); -XML_CONSTASCII_ACTION( sXML_index_entry_link_start, "index-entry-link-start" ); -XML_CONSTASCII_ACTION( sXML_index_entry_page_number, "index-entry-page-number" ); -XML_CONSTASCII_ACTION( sXML_index_entry_span, "index-entry-span" ); -XML_CONSTASCII_ACTION( sXML_index_entry_tab_stop, "index-entry-tab-stop" ); -XML_CONSTASCII_ACTION( sXML_index_entry_template, "index-entry-template" ); -XML_CONSTASCII_ACTION( sXML_index_entry_text, "index-entry-text" ); -XML_CONSTASCII_ACTION( sXML_index_name, "index-name" ); -XML_CONSTASCII_ACTION( sXML_index_scope, "index-scope" ); -XML_CONSTASCII_ACTION( sXML_index_source_style, "index-source-style" ); -XML_CONSTASCII_ACTION( sXML_index_source_styles, "index-source-styles" ); -XML_CONSTASCII_ACTION( sXML_index_title, "index-title" ); -XML_CONSTASCII_ACTION( sXML_index_title_template, "index-title-template" ); -XML_CONSTASCII_ACTION( sXML_information, "information" ); -XML_CONSTASCII_ACTION( sXML_initial_creator, "initial-creator" ); -XML_CONSTASCII_ACTION( sXML_inproceedings, "inproceedings" ); -XML_CONSTASCII_ACTION( sXML_insertion, "insertion" ); -XML_CONSTASCII_ACTION( sXML_insertion_cut_off, "insertion-cut-off" ); -XML_CONSTASCII_ACTION( sXML_inset, "inset" ); -XML_CONSTASCII_ACTION( sXML_inside, "inside" ); -XML_CONSTASCII_ACTION( sXML_institution, "institution" ); -XML_CONSTASCII_ACTION( sXML_int, "int" ); -XML_CONSTASCII_ACTION( sXML_intensity, "intensity" ); -XML_CONSTASCII_ACTION( sXML_intersect, "intersect" ); -XML_CONSTASCII_ACTION( sXML_interval, "interval" ); -XML_CONSTASCII_ACTION( sXML_interval_major, "interval-major" ); -XML_CONSTASCII_ACTION( sXML_interval_minor, "interval-minor" ); -XML_CONSTASCII_ACTION( sXML_into_english_number, "into-english-number" ); -XML_CONSTASCII_ACTION( sXML_inverse, "inverse" ); -XML_CONSTASCII_ACTION( sXML_is_active, "is-active"); -XML_CONSTASCII_ACTION( sXML_is_data_layout_field, "is-data-layout-field"); -XML_CONSTASCII_ACTION( sXML_is_hidden, "is-hidden" ); -XML_CONSTASCII_ACTION( sXML_is_selection, "is-selection"); -XML_CONSTASCII_ACTION( sXML_isbn, "isbn" ); -XML_CONSTASCII_ACTION( sXML_italic, "italic" ); -XML_CONSTASCII_ACTION( sXML_iteration, "iteration" ); -XML_CONSTASCII_ACTION( sXML_journal, "journal" ); -XML_CONSTASCII_ACTION( sXML_justified, "justified" ); -XML_CONSTASCII_ACTION( sXML_justify, "justify" ); -XML_CONSTASCII_ACTION( sXML_justify_single_word, "justify-single-word" ); -XML_CONSTASCII_ACTION( sXML_keep_with_next, "keep-with-next" ); -XML_CONSTASCII_ACTION( sXML_kerning_normal, "normal" ); -XML_CONSTASCII_ACTION( sXML_key, "key" ); -XML_CONSTASCII_ACTION( sXML_key1, "key1" ); -XML_CONSTASCII_ACTION( sXML_key2, "key2" ); -XML_CONSTASCII_ACTION( sXML_keyword, "keyword" ); -XML_CONSTASCII_ACTION( sXML_keywords, "keywords" ); -XML_CONSTASCII_ACTION( sXML_km, "km" ); -XML_CONSTASCII_ACTION( sXML_label, "label" ); -XML_CONSTASCII_ACTION( sXML_label_arrangement, "label-arrangement" ); -XML_CONSTASCII_ACTION( sXML_label_cell_address, "label-cell-address" ); -XML_CONSTASCII_ACTION( sXML_label_cell_range_address, "label-cell-range-address" ); -XML_CONSTASCII_ACTION( sXML_label_range, "label-range" ); -XML_CONSTASCII_ACTION( sXML_label_ranges, "label-ranges" ); -XML_CONSTASCII_ACTION( sXML_layer, "layer" ); -XML_CONSTASCII_ACTION( sXML_layer_set, "layer-set" ); -XML_CONSTASCII_ACTION( sXML_lambda, "lambda" ); -XML_CONSTASCII_ACTION( sXML_landscape, "landscape" ); -XML_CONSTASCII_ACTION( sXML_language, "language" ); -XML_CONSTASCII_ACTION( sXML_language_asian, "language-asian" ); -XML_CONSTASCII_ACTION( sXML_language_complex, "language-complex" ); -XML_CONSTASCII_ACTION( sXML_last_column_spanned, "last-column-spanned" ); -XML_CONSTASCII_ACTION( sXML_last_page, "last-page" ); -XML_CONSTASCII_ACTION( sXML_last_row_spanned, "last-row-spanned" ); -XML_CONSTASCII_ACTION( sXML_leader_char, "leader-char" ); -XML_CONSTASCII_ACTION( sXML_left, "left" ); -XML_CONSTASCII_ACTION( sXML_left_outside, "left-outside" ); -XML_CONSTASCII_ACTION( sXML_left_top_position, "left-top-position" ); -XML_CONSTASCII_ACTION( sXML_legend, "legend" ); -XML_CONSTASCII_ACTION( sXML_legend_position, "legend-position" ); -XML_CONSTASCII_ACTION( sXML_length, "length" ); -XML_CONSTASCII_ACTION( sXML_leq, "leq" ); -XML_CONSTASCII_ACTION( sXML_let_text, "let-text" ); -XML_CONSTASCII_ACTION( sXML_letter_kerning, "letter-kerning" ); -XML_CONSTASCII_ACTION( sXML_letter_spacing, "letter-spacing" ); -XML_CONSTASCII_ACTION( sXML_letters, "letters" ); -XML_CONSTASCII_ACTION( sXML_level, "level" ); -XML_CONSTASCII_ACTION( sXML_library, "library" ); -XML_CONSTASCII_ACTION( sXML_library_embedded, "library-embedded" ); -XML_CONSTASCII_ACTION( sXML_library_linked, "library-linked" ); -XML_CONSTASCII_ACTION( sXML_light, "light"); -XML_CONSTASCII_ACTION( sXML_lighting_mode, "lighting-mode"); -XML_CONSTASCII_ACTION( sXML_lime, "lime" ); -XML_CONSTASCII_ACTION( sXML_limit, "limit" ); -XML_CONSTASCII_ACTION( sXML_line, "line" ); -XML_CONSTASCII_ACTION( sXML_line_break, "line-break" ); -XML_CONSTASCII_ACTION( sXML_line_height, "line-height" ); -XML_CONSTASCII_ACTION( sXML_line_height_at_least, "line-height-at-least" ); -XML_CONSTASCII_ACTION( sXML_line_spacing, "line-spacing" ); -XML_CONSTASCII_ACTION( sXML_linear, "linear" ); -XML_CONSTASCII_ACTION( sXML_linenumbering_configuration, "linenumbering-configuration" ); -XML_CONSTASCII_ACTION( sXML_linenumbering_separator, "linenumbering-separator" ); -XML_CONSTASCII_ACTION( sXML_lines, "lines" ); -XML_CONSTASCII_ACTION( sXML_lines_used, "lines-used" ); -XML_CONSTASCII_ACTION( sXML_link_data_style_to_source, "link-data-style-to-source" ); -XML_CONSTASCII_ACTION( sXML_link_to_source_data, "link-to-source-data" ); -XML_CONSTASCII_ACTION( sXML_list, "list"); -XML_CONSTASCII_ACTION( sXML_list_block, "list-block" ); -XML_CONSTASCII_ACTION( sXML_list_header, "list-header" ); -XML_CONSTASCII_ACTION( sXML_list_info, "list-info" ); -XML_CONSTASCII_ACTION( sXML_list_item, "list-item" ); -XML_CONSTASCII_ACTION( sXML_list_level, "list-level" ); -XML_CONSTASCII_ACTION( sXML_list_level_style_bullet, "list-level-style-bullet" ); -XML_CONSTASCII_ACTION( sXML_list_level_style_image, "list-level-style-image" ); -XML_CONSTASCII_ACTION( sXML_list_level_style_number, "list-level-style-number" ); -XML_CONSTASCII_ACTION( sXML_list_name, "list-name" ); -XML_CONSTASCII_ACTION( sXML_list_style, "list-style" ); -XML_CONSTASCII_ACTION( sXML_list_style_name, "list-style-name" ); -XML_CONSTASCII_ACTION( sXML_ln, "ln" ); -XML_CONSTASCII_ACTION( sXML_locked, "locked" ); -XML_CONSTASCII_ACTION( sXML_log, "log" ); -XML_CONSTASCII_ACTION( sXML_logarithmic, "logarithmic" ); -XML_CONSTASCII_ACTION( sXML_logbase, "logbase" ); -XML_CONSTASCII_ACTION( sXML_long, "long" ); -XML_CONSTASCII_ACTION( sXML_lowlimit, "lowlimit" ); -XML_CONSTASCII_ACTION( sXML_lr_tb, "lr-tb" ); -XML_CONSTASCII_ACTION( sXML_lt, "lt"); -XML_CONSTASCII_ACTION( sXML_ltr, "ltr"); -XML_CONSTASCII_ACTION( sXML_luminance , "luminance" ); -XML_CONSTASCII_ACTION( sXML_macro_name, "macro-name"); -XML_CONSTASCII_ACTION( sXML_maction, "maction"); -XML_CONSTASCII_ACTION( sXML_main_entry_style_name, "main-entry-style-name" ); -XML_CONSTASCII_ACTION( sXML_major, "major" ); -XML_CONSTASCII_ACTION( sXML_maligngroup, "maligngroup"); -XML_CONSTASCII_ACTION( sXML_malignmark, "malignmark"); -XML_CONSTASCII_ACTION( sXML_manual, "manual" ); -XML_CONSTASCII_ACTION( sXML_map, "map" ); -XML_CONSTASCII_ACTION( sXML_margin_bottom, "margin-bottom" ); -XML_CONSTASCII_ACTION( sXML_margin_left, "margin-left" ); -XML_CONSTASCII_ACTION( sXML_margin_right, "margin-right" ); -XML_CONSTASCII_ACTION( sXML_margin_top, "margin-top" ); -XML_CONSTASCII_ACTION( sXML_margins, "margins" ); -XML_CONSTASCII_ACTION( sXML_marker, "marker" ); -XML_CONSTASCII_ACTION( sXML_marker_end , "marker-end" ); -XML_CONSTASCII_ACTION( sXML_marker_end_center , "marker-end-center" ); -XML_CONSTASCII_ACTION( sXML_marker_end_width , "marker-end-width" ); -XML_CONSTASCII_ACTION( sXML_marker_start , "marker-start" ); -XML_CONSTASCII_ACTION( sXML_marker_start_center , "marker-start-center" ); -XML_CONSTASCII_ACTION( sXML_marker_start_width , "marker-start-width" ); -XML_CONSTASCII_ACTION( sXML_maroon, "maroon" ); -XML_CONSTASCII_ACTION( sXML_master_page, "master-page" ); -XML_CONSTASCII_ACTION( sXML_master_page_name , "master-page-name" ); -XML_CONSTASCII_ACTION( sXML_master_styles, "master-styles" ); -XML_CONSTASCII_ACTION( sXML_mastersthesis, "mastersthesis" ); -XML_CONSTASCII_ACTION( sXML_match, "match"); -XML_CONSTASCII_ACTION( sXML_math, "math"); -XML_CONSTASCII_ACTION( sXML_matrix, "matrix"); -XML_CONSTASCII_ACTION( sXML_matrix_covered, "matrix-covered"); -XML_CONSTASCII_ACTION( sXML_matrixrow, "matrixrow"); -XML_CONSTASCII_ACTION( sXML_max, "max" ); -XML_CONSTASCII_ACTION( sXML_max_edge, "max-edge"); -XML_CONSTASCII_ACTION( sXML_max_height, "max-height"); -XML_CONSTASCII_ACTION( sXML_max_width, "max-width"); -XML_CONSTASCII_ACTION( sXML_maximum, "maximum" ); -XML_CONSTASCII_ACTION( sXML_maximum_difference, "maximum-difference" ); -XML_CONSTASCII_ACTION( sXML_may_break_between_rows, "may-break-between-rows" ); -XML_CONSTASCII_ACTION( sXML_may_script, "may-script" ); -XML_CONSTASCII_ACTION( sXML_mean, "mean" ); -XML_CONSTASCII_ACTION( sXML_mean_value, "mean-value" ); -XML_CONSTASCII_ACTION( sXML_measure, "measure" ); -XML_CONSTASCII_ACTION( sXML_measure_align, "measure-align" ); -XML_CONSTASCII_ACTION( sXML_measure_vertical_align, "measure-vertical-align" ); -XML_CONSTASCII_ACTION( sXML_median, "median" ); -XML_CONSTASCII_ACTION( sXML_medium, "medium" ); -XML_CONSTASCII_ACTION( sXML_merror, "merror" ); -XML_CONSTASCII_ACTION( sXML_message_type, "message-type" ); -XML_CONSTASCII_ACTION( sXML_meta, "meta" ); -XML_CONSTASCII_ACTION( sXML_mfenced, "mfenced" ); -XML_CONSTASCII_ACTION( sXML_mfrac, "mfrac" ); -XML_CONSTASCII_ACTION( sXML_mi, "mi" ); //MathML Math Identifier -XML_CONSTASCII_ACTION( sXML_middle, "middle" ); -XML_CONSTASCII_ACTION( sXML_mime_type, "mime-type" ); -XML_CONSTASCII_ACTION( sXML_min, "min" ); -XML_CONSTASCII_ACTION( sXML_min_denominator_digits, "min-denominator-digits" ); -XML_CONSTASCII_ACTION( sXML_min_edge, "min-edge"); -XML_CONSTASCII_ACTION( sXML_min_exponent_digits, "min-exponent-digits" ); -XML_CONSTASCII_ACTION( sXML_min_height, "min-height" ); -XML_CONSTASCII_ACTION( sXML_min_width, "min-width" ); -XML_CONSTASCII_ACTION( sXML_min_integer_digits, "min-integer-digits" ); -XML_CONSTASCII_ACTION( sXML_min_label_distance, "min-label-distance" ); -XML_CONSTASCII_ACTION( sXML_min_label_width, "min-label-width" ); -XML_CONSTASCII_ACTION( sXML_min_line_height, "min-line-height" ); -XML_CONSTASCII_ACTION( sXML_min_numerator_digits, "min-numerator-digits" ); -XML_CONSTASCII_ACTION( sXML_min_row_height, "min-row-height" ); -XML_CONSTASCII_ACTION( sXML_minimum, "minimum" ); -XML_CONSTASCII_ACTION( sXML_minor, "minor" ); -XML_CONSTASCII_ACTION( sXML_minus, "minus" ); -XML_CONSTASCII_ACTION( sXML_minutes, "minutes" ); -XML_CONSTASCII_ACTION( sXML_mirror, "mirror" ); -XML_CONSTASCII_ACTION( sXML_mirrored, "mirrored" ); -XML_CONSTASCII_ACTION( sXML_misc, "misc" ); -XML_CONSTASCII_ACTION( sXML_miter , "miter" ); -XML_CONSTASCII_ACTION( sXML_mmultiscripts, "mmultiscripts" ); -XML_CONSTASCII_ACTION( sXML_mm, "mm" ); -XML_CONSTASCII_ACTION( sXML_mn, "mn" ); -XML_CONSTASCII_ACTION( sXML_mo, "mo" ); -XML_CONSTASCII_ACTION( sXML_mode, "mode" ); -XML_CONSTASCII_ACTION( sXML_modern, "modern" ); -XML_CONSTASCII_ACTION( sXML_modification_date, "modification-date" ); -XML_CONSTASCII_ACTION( sXML_modification_time, "modification-time" ); -XML_CONSTASCII_ACTION( sXML_modulate, "modulate" ); -XML_CONSTASCII_ACTION( sXML_module, "module" ); -XML_CONSTASCII_ACTION( sXML_moment, "moment" ); -XML_CONSTASCII_ACTION( sXML_mono, "mono" ); -XML_CONSTASCII_ACTION( sXML_month, "month" ); -XML_CONSTASCII_ACTION( sXML_move_from_bottom, "move-from-bottom" ); -XML_CONSTASCII_ACTION( sXML_move_from_left, "move-from-left" ); -XML_CONSTASCII_ACTION( sXML_move_from_right, "move-from-right" ); -XML_CONSTASCII_ACTION( sXML_move_from_top, "move-from-top" ); -XML_CONSTASCII_ACTION( sXML_move_protect, "move-protect" ); -XML_CONSTASCII_ACTION( sXML_mover, "mover" ); -XML_CONSTASCII_ACTION( sXML_movement, "movement" ); -XML_CONSTASCII_ACTION( sXML_movement_cut_off, "movement-cut-off" ); -XML_CONSTASCII_ACTION( sXML_mouse_as_pen, "mouse-as-pen" ); -XML_CONSTASCII_ACTION( sXML_mouse_visible, "mouse-visible" ); -XML_CONSTASCII_ACTION( sXML_mpadded, "mpadded"); -XML_CONSTASCII_ACTION( sXML_mphantom, "mphantom"); -XML_CONSTASCII_ACTION( sXML_mprescripts, "mprescripts"); -XML_CONSTASCII_ACTION( sXML_mroot, "mroot"); -XML_CONSTASCII_ACTION( sXML_mrow, "mrow"); -XML_CONSTASCII_ACTION( sXML_ms, "ms"); -XML_CONSTASCII_ACTION( sXML_mspace, "mspace"); -XML_CONSTASCII_ACTION( sXML_msqrt, "msqrt"); -XML_CONSTASCII_ACTION( sXML_mstyle, "mstyle"); -XML_CONSTASCII_ACTION( sXML_msub, "msub"); -XML_CONSTASCII_ACTION( sXML_msubsup, "msubsup"); -XML_CONSTASCII_ACTION( sXML_msup, "msup"); -XML_CONSTASCII_ACTION( sXML_mtable, "mtable"); -XML_CONSTASCII_ACTION( sXML_mtd, "mtd"); -XML_CONSTASCII_ACTION( sXML_mtext, "mtext"); -XML_CONSTASCII_ACTION( sXML_mtr, "mtr"); -XML_CONSTASCII_ACTION( sXML_multi_deletion_spanned, "multi-deletion-spanned"); -XML_CONSTASCII_ACTION( sXML_munder, "munder"); -XML_CONSTASCII_ACTION( sXML_munderover, "munderover"); -XML_CONSTASCII_ACTION( sXML_name, "name" ); -XML_CONSTASCII_ACTION( sXML_name_and_extension, "name-and-extension" ); -XML_CONSTASCII_ACTION( sXML_named_expression, "named-expression"); -XML_CONSTASCII_ACTION( sXML_named_expressions, "named-expressions"); -XML_CONSTASCII_ACTION( sXML_named_range, "named-range"); -XML_CONSTASCII_ACTION( sXML_navy, "navy"); -XML_CONSTASCII_ACTION( sXML_neq, "neq" ); -XML_CONSTASCII_ACTION( sXML_new, "new" ); -XML_CONSTASCII_ACTION( sXML_next, "next" ); -XML_CONSTASCII_ACTION( sXML_next_page, "next-page" ); -XML_CONSTASCII_ACTION( sXML_next_style_name, "next-style-name" ); -XML_CONSTASCII_ACTION( sXML_nohref, "nohref" ); -XML_CONSTASCII_ACTION( sXML_no_limit, "no-limit" ); -XML_CONSTASCII_ACTION( sXML_no_wrap, "no-wrap" ); -XML_CONSTASCII_ACTION( sXML_noempty, "!empty"); -XML_CONSTASCII_ACTION( sXML_nomatch, "!match"); -XML_CONSTASCII_ACTION( sXML_none, "none" ); -XML_CONSTASCII_ACTION( sXML_noprtsubset, "notprsubset" ); -XML_CONSTASCII_ACTION( sXML_normal, "normal" ); -XML_CONSTASCII_ACTION( sXML_normals_direction, "normals-direction" ); -XML_CONSTASCII_ACTION( sXML_normals_kind, "normals-kind" ); -XML_CONSTASCII_ACTION( sXML_not, "not" ); -XML_CONSTASCII_ACTION( sXML_not_equal_date, "not-equal-date" ); -XML_CONSTASCII_ACTION( sXML_note, "note" ); -XML_CONSTASCII_ACTION( sXML_notes, "notes" ); -XML_CONSTASCII_ACTION( sXML_notin, "notin" ); -XML_CONSTASCII_ACTION( sXML_notsubset, "notsubset" ); -XML_CONSTASCII_ACTION( sXML_null_date, "null-date" ); -XML_CONSTASCII_ACTION( sXML_null_year, "null-year" ); -XML_CONSTASCII_ACTION( sXML_num_format, "num-format" ); -XML_CONSTASCII_ACTION( sXML_num_letter_sync, "num-letter-sync" ); -XML_CONSTASCII_ACTION( sXML_num_prefix, "num-prefix" ); -XML_CONSTASCII_ACTION( sXML_num_suffix, "num-suffix" ); -XML_CONSTASCII_ACTION( sXML_number, "number" ); -XML_CONSTASCII_ACTION( sXML_number_and_name, "number-and-name" ); -XML_CONSTASCII_ACTION( sXML_number_columns_repeated, "number-columns-repeated" ); -XML_CONSTASCII_ACTION( sXML_number_columns_spanned, "number-columns-spanned" ); -XML_CONSTASCII_ACTION( sXML_number_lines, "number-lines" ); -XML_CONSTASCII_ACTION( sXML_number_matrix_columns_spanned, "number-matrix-columns-spanned" ); -XML_CONSTASCII_ACTION( sXML_number_matrix_rows_spanned, "number-matrix-rows-spanned" ); -XML_CONSTASCII_ACTION( sXML_number_position, "number-position" ); -XML_CONSTASCII_ACTION( sXML_number_rows_repeated, "number-rows-repeated" ); -XML_CONSTASCII_ACTION( sXML_number_rows_spanned, "number-rows-spanned" ); -XML_CONSTASCII_ACTION( sXML_number_style, "number-style" ); -XML_CONSTASCII_ACTION( sXML_number_wrapped_paragraphs, "number-wrapped-paragraphs" ); -XML_CONSTASCII_ACTION( sXML_numbered_entries, "numbered-entries" ); -XML_CONSTASCII_ACTION( sXML_object, "object" ); -XML_CONSTASCII_ACTION( sXML_object_count, "object-count" ); -XML_CONSTASCII_ACTION( sXML_object_index, "object-index" ); -XML_CONSTASCII_ACTION( sXML_object_index_entry_template, "object-index-entry-template" ); -XML_CONSTASCII_ACTION( sXML_object_index_source, "object-index-source" ); -XML_CONSTASCII_ACTION( sXML_object_name, "object-name"); -XML_CONSTASCII_ACTION( sXML_object_ole, "object-ole" ); -XML_CONSTASCII_ACTION( sXML_objects, "objects" ); -XML_CONSTASCII_ACTION( sXML_odd_page, "odd-page" ); -XML_CONSTASCII_ACTION( sXML_offset, "offset" ); -XML_CONSTASCII_ACTION( sXML_olive, "olive" ); -XML_CONSTASCII_ACTION( sXML_online, "online" ); -XML_CONSTASCII_ACTION( sXML_online_text, "online-text" ); -XML_CONSTASCII_ACTION( sXML_onLoad, "onLoad" ); -XML_CONSTASCII_ACTION( sXML_onRequest, "onRequest" ); -XML_CONSTASCII_ACTION( sXML_on_update_keep_size, "on-update-keep-size"); -XML_CONSTASCII_ACTION( sXML_on_update_keep_styles, "on-update-keep-styles"); -XML_CONSTASCII_ACTION( sXML_opaque_background, "background" ); -XML_CONSTASCII_ACTION( sXML_opaque_foreground, "foreground" ); -XML_CONSTASCII_ACTION( sXML_open, "open" ); -XML_CONSTASCII_ACTION( sXML_open_horizontal, "open-horizontal" ); -XML_CONSTASCII_ACTION( sXML_open_vertical, "open-vertical" ); -XML_CONSTASCII_ACTION( sXML_operation, "operation"); -XML_CONSTASCII_ACTION( sXML_operator, "operator"); -XML_CONSTASCII_ACTION( sXML_optimal, "optimal"); -XML_CONSTASCII_ACTION( sXML_or, "or"); -XML_CONSTASCII_ACTION( sXML_order, "order"); -XML_CONSTASCII_ACTION( sXML_ordered_list, "ordered-list" ); -XML_CONSTASCII_ACTION( sXML_organizations, "organizations" ); -XML_CONSTASCII_ACTION( sXML_orientation, "orientation"); -XML_CONSTASCII_ACTION( sXML_orientation_landscape, "orientation-landscape" ); -XML_CONSTASCII_ACTION( sXML_orientation_portrait, "orientation-portrait" ); -XML_CONSTASCII_ACTION( sXML_origin, "origin" ); -XML_CONSTASCII_ACTION( sXML_orphans, "orphans" ); -XML_CONSTASCII_ACTION( sXML_outline_level, "outline-level" ); -XML_CONSTASCII_ACTION( sXML_outline_level_style, "outline-level-style" ); -XML_CONSTASCII_ACTION( sXML_outline_style, "outline-style" ); -XML_CONSTASCII_ACTION( sXML_outset, "outset" ); -XML_CONSTASCII_ACTION( sXML_outside, "outside" ); -XML_CONSTASCII_ACTION( sXML_overlap, "overlap" ); -XML_CONSTASCII_ACTION( sXML_p, "p" ); -XML_CONSTASCII_ACTION( sXML_package_name, "package-name" ); -XML_CONSTASCII_ACTION( sXML_padding, "padding" ); -XML_CONSTASCII_ACTION( sXML_padding_bottom, "padding-bottom" ); -XML_CONSTASCII_ACTION( sXML_padding_left, "padding-left" ); -XML_CONSTASCII_ACTION( sXML_padding_right, "padding-right" ); -XML_CONSTASCII_ACTION( sXML_padding_top, "padding-top" ); -XML_CONSTASCII_ACTION( sXML_page, "page" ); -XML_CONSTASCII_ACTION( sXML_page_adjust, "page-adjust" ); -XML_CONSTASCII_ACTION( sXML_page_breaks_on_group_change, "page-breaks-on-group-change"); -XML_CONSTASCII_ACTION( sXML_page_content, "page-content" ); -XML_CONSTASCII_ACTION( sXML_page_continuation_string, "page-continuation-string" ); -XML_CONSTASCII_ACTION( sXML_page_count, "page-count" ); -XML_CONSTASCII_ACTION( sXML_page_end_margin, "page-end-margin" ); -XML_CONSTASCII_ACTION( sXML_page_height, "page-height" ); -XML_CONSTASCII_ACTION( sXML_page_master, "page-master" ); -XML_CONSTASCII_ACTION( sXML_page_master_name, "page-master-name" ); -XML_CONSTASCII_ACTION( sXML_page_number, "page-number" ); -XML_CONSTASCII_ACTION( sXML_page_start_margin, "page-start-margin" ); -XML_CONSTASCII_ACTION( sXML_page_style_name, "page-style-name" ); -XML_CONSTASCII_ACTION( sXML_page_thumbnail, "page-thumbnail" ); -XML_CONSTASCII_ACTION( sXML_page_usage, "page-usage" ); -XML_CONSTASCII_ACTION( sXML_page_variable_get, "page-variable-get" ); -XML_CONSTASCII_ACTION( sXML_page_variable_set, "page-variable-set" ); -XML_CONSTASCII_ACTION( sXML_page_view_zoom_value, "page-view-zoom-value" ); -XML_CONSTASCII_ACTION( sXML_page_width, "page-width" ); -XML_CONSTASCII_ACTION( sXML_pages, "pages" ); -XML_CONSTASCII_ACTION( sXML_paper_tray_number, "paper-tray-number" ); -XML_CONSTASCII_ACTION( sXML_paragraph, "paragraph" ); -XML_CONSTASCII_ACTION( sXML_paragraph_content, "paragraph-content" ); -XML_CONSTASCII_ACTION( sXML_paragraph_count, "paragraph-count" ); -XML_CONSTASCII_ACTION( sXML_paragraph_end_margin, "paragraph-end-margin" ); -XML_CONSTASCII_ACTION( sXML_paragraph_start_margin, "paragraph-start-margin" ); -XML_CONSTASCII_ACTION( sXML_param, "param" ); -XML_CONSTASCII_ACTION( sXML_parallel, "parallel" ); -XML_CONSTASCII_ACTION( sXML_parent_style_name, "parent-style-name" ); -XML_CONSTASCII_ACTION( sXML_parse_sql_statement, "parse-sql-statement"); -XML_CONSTASCII_ACTION( sXML_parsed, "parsed" ); -XML_CONSTASCII_ACTION( sXML_pause, "pause" ); -XML_CONSTASCII_ACTION( sXML_partialdiff, "partialdiff"); -XML_CONSTASCII_ACTION( sXML_password, "password"); -XML_CONSTASCII_ACTION( sXML_passwort, "passwort"); -XML_CONSTASCII_ACTION( sXML_path , "path" ); -XML_CONSTASCII_ACTION( sXML_pending , "pending" ); -XML_CONSTASCII_ACTION( sXML_percentage, "percentage"); -XML_CONSTASCII_ACTION( sXML_percentage_style, "percentage-style" ); -XML_CONSTASCII_ACTION( sXML_perspective, "perspective"); -XML_CONSTASCII_ACTION( sXML_phdthesis, "phdthesis" ); -XML_CONSTASCII_ACTION( sXML_phong, "phong"); -XML_CONSTASCII_ACTION( sXML_pie_offset, "pie-offset" ); -XML_CONSTASCII_ACTION( sXML_placeholder, "placeholder" ); -XML_CONSTASCII_ACTION( sXML_placeholder_type, "placeholder-type" ); -XML_CONSTASCII_ACTION( sXML_placing, "placing" ); -XML_CONSTASCII_ACTION( sXML_plain_number, "plain-number" ); -XML_CONSTASCII_ACTION( sXML_plain_number_and_name, "plain-number-and-name" ); -XML_CONSTASCII_ACTION( sXML_plot_area, "plot-area" ); -XML_CONSTASCII_ACTION( sXML_plugin, "plugin" ); -XML_CONSTASCII_ACTION( sXML_plus, "plus" ); -XML_CONSTASCII_ACTION( sXML_points, "points" ); -XML_CONSTASCII_ACTION( sXML_polygon , "polygon" ); -XML_CONSTASCII_ACTION( sXML_polyline , "polyline" ); -XML_CONSTASCII_ACTION( sXML_polynomial, "polynomial" ); -XML_CONSTASCII_ACTION( sXML_pool_id, "pool-id" ); -XML_CONSTASCII_ACTION( sXML_portrait, "portrait" ); -XML_CONSTASCII_ACTION( sXML_position, "position" ); -XML_CONSTASCII_ACTION( sXML_position_bottom, "position-bottom" ); -XML_CONSTASCII_ACTION( sXML_position_left, "position-left" ); -XML_CONSTASCII_ACTION( sXML_position_right, "position-right" ); -XML_CONSTASCII_ACTION( sXML_position_top, "position-top" ); -XML_CONSTASCII_ACTION( sXML_posture_italic, "italic" ); -XML_CONSTASCII_ACTION( sXML_posture_normal, "normal" ); -XML_CONSTASCII_ACTION( sXML_posture_oblique, "oblique" ); -XML_CONSTASCII_ACTION( sXML_power, "power" ); -XML_CONSTASCII_ACTION( sXML_precision_as_shown, "precision-as-shown" ); -XML_CONSTASCII_ACTION( sXML_prefix, "prefix" ); -XML_CONSTASCII_ACTION( sXML_presentation, "presentation" ); -XML_CONSTASCII_ACTION( sXML_presentation_chart , "chart" ); -XML_CONSTASCII_ACTION( sXML_presentation_graphic , "graphic" ); -XML_CONSTASCII_ACTION( sXML_presentation_notes , "notes" ); -XML_CONSTASCII_ACTION( sXML_presentation_object , "object" ); -XML_CONSTASCII_ACTION( sXML_presentation_orgchart , "orgchart" ); -XML_CONSTASCII_ACTION( sXML_presentation_outline , "outline" ); -XML_CONSTASCII_ACTION( sXML_presentation_page , "page" ); -XML_CONSTASCII_ACTION( sXML_presentation_page_layout, "presentation-page-layout" ); -XML_CONSTASCII_ACTION( sXML_presentation_page_layout_name, "presentation-page-layout-name" ); -XML_CONSTASCII_ACTION( sXML_presentation_subtitle , "subtitle" ); -XML_CONSTASCII_ACTION( sXML_presentation_table , "table" ); -XML_CONSTASCII_ACTION( sXML_presentation_title , "title" ); -XML_CONSTASCII_ACTION( sXML_previous, "previous" ); -XML_CONSTASCII_ACTION( sXML_previous_page, "previous-page" ); -XML_CONSTASCII_ACTION( sXML_print, "print" ); -XML_CONSTASCII_ACTION( sXML_printable, "printable" ); -XML_CONSTASCII_ACTION( sXML_print_content, "print-content"); -XML_CONSTASCII_ACTION( sXML_print_date, "print-date" ); -XML_CONSTASCII_ACTION( sXML_print_orientation, "print-orientation"); -XML_CONSTASCII_ACTION( sXML_print_page_order, "print-page-order"); -XML_CONSTASCII_ACTION( sXML_print_range, "print-range"); -XML_CONSTASCII_ACTION( sXML_print_ranges, "print-ranges"); -XML_CONSTASCII_ACTION( sXML_print_time, "print-time" ); -XML_CONSTASCII_ACTION( sXML_printed_by, "printed-by" ); -XML_CONSTASCII_ACTION( sXML_proceedings, "proceedings" ); -XML_CONSTASCII_ACTION( sXML_product, "product" ); -XML_CONSTASCII_ACTION( sXML_projection, "projection"); -XML_CONSTASCII_ACTION( sXML_properties, "properties" ); -XML_CONSTASCII_ACTION( sXML_protect, "protect" ); -XML_CONSTASCII_ACTION( sXML_protect_content, "content" ); -XML_CONSTASCII_ACTION( sXML_protect_position, "position" ); -XML_CONSTASCII_ACTION( sXML_protect_size, "size" ); -XML_CONSTASCII_ACTION( sXML_protected, "protected" ); -XML_CONSTASCII_ACTION( sXML_protection_key, "protection-key" ); -XML_CONSTASCII_ACTION( sXML_prsubset, "prsubset" ); -XML_CONSTASCII_ACTION( sXML_publisher, "publisher" ); -XML_CONSTASCII_ACTION( sXML_punctuation_wrap, "punctuation-wrap" ); -XML_CONSTASCII_ACTION( sXML_purple, "purple" ); -XML_CONSTASCII_ACTION( sXML_pyramid, "pyramid" ); -XML_CONSTASCII_ACTION( sXML_quarter, "quarter" ); -XML_CONSTASCII_ACTION( sXML_query_name, "query-name"); -XML_CONSTASCII_ACTION( sXML_quo_vadis, "quo-vadis" ); -XML_CONSTASCII_ACTION( sXML_quotient, "quotient" ); -XML_CONSTASCII_ACTION( sXML_r, "r" ); -XML_CONSTASCII_ACTION( sXML_radar, "radar" ); -XML_CONSTASCII_ACTION( sXML_random, "random" ); -XML_CONSTASCII_ACTION( sXML_range_address, "range-address"); -XML_CONSTASCII_ACTION( sXML_range_usable_as, "range-usable-as"); -XML_CONSTASCII_ACTION( sXML_recreate_on_edit , "recreate-on-edit" ); -XML_CONSTASCII_ACTION( sXML_rect , "rect" ); -XML_CONSTASCII_ACTION( sXML_red , "red" ); -XML_CONSTASCII_ACTION( sXML_ref_name, "ref-name" ); -XML_CONSTASCII_ACTION( sXML_reference, "reference" ); -XML_CONSTASCII_ACTION( sXML_reference_end, "reference-end" ); -XML_CONSTASCII_ACTION( sXML_reference_format, "reference-format" ); -XML_CONSTASCII_ACTION( sXML_reference_mark, "reference-mark" ); -XML_CONSTASCII_ACTION( sXML_reference_mark_end, "reference-mark-end" ); -XML_CONSTASCII_ACTION( sXML_reference_mark_start, "reference-mark-start" ); -XML_CONSTASCII_ACTION( sXML_reference_ref, "reference-ref" ); -XML_CONSTASCII_ACTION( sXML_reference_start, "reference-start" ); -XML_CONSTASCII_ACTION( sXML_reference_type, "reference-type" ); -XML_CONSTASCII_ACTION( sXML_refresh_delay, "refresh-delay" ); -XML_CONSTASCII_ACTION( sXML_region_center, "region-center" ); -XML_CONSTASCII_ACTION( sXML_region_left, "region-left" ); -XML_CONSTASCII_ACTION( sXML_region_right, "region-right" ); -XML_CONSTASCII_ACTION( sXML_register_true, "register-true" ); -XML_CONSTASCII_ACTION( sXML_register_truth_ref_style_name, "register-truth-ref-style-name" ); -XML_CONSTASCII_ACTION( sXML_regression_type, "regression-type" ); -XML_CONSTASCII_ACTION( sXML_rejected, "rejected" ); -XML_CONSTASCII_ACTION( sXML_rejecting_change_id, "rejecting-change-id" ); -XML_CONSTASCII_ACTION( sXML_rejection, "rejection" ); -XML_CONSTASCII_ACTION( sXML_rel_column_width, "rel-column-width" ); -XML_CONSTASCII_ACTION( sXML_rel_height, "rel-height" ); -XML_CONSTASCII_ACTION( sXML_rel_width, "rel-width" ); -XML_CONSTASCII_ACTION( sXML_relative, "relative" ) ; -XML_CONSTASCII_ACTION( sXML_relative_tab_stop_position, "relative-tab-stop-position" ); -XML_CONSTASCII_ACTION( sXML_reln, "reln" ) ; -XML_CONSTASCII_ACTION( sXML_rem, "rem" ) ; -XML_CONSTASCII_ACTION( sXML_remove_dependents, "remove-dependents" ); -XML_CONSTASCII_ACTION( sXML_remove_precedents, "remove-precedents" ); -XML_CONSTASCII_ACTION( sXML_repeat, "repeat" ); -XML_CONSTASCII_ACTION( sXML_repeat_column, "repeat-column"); -XML_CONSTASCII_ACTION( sXML_repeat_row, "repeat-row"); -XML_CONSTASCII_ACTION( sXML_repeated, "repeated" ); -XML_CONSTASCII_ACTION( sXML_replace, "replace" ); -XML_CONSTASCII_ACTION( sXML_report_type, "report-type" ); -XML_CONSTASCII_ACTION( sXML_restart_on_page, "restart-on-page" ); -XML_CONSTASCII_ACTION( sXML_revision, "revision" ); -XML_CONSTASCII_ACTION( sXML_ridge, "ridge" ); -XML_CONSTASCII_ACTION( sXML_right, "right" ); -XML_CONSTASCII_ACTION( sXML_right_outside, "right-outside" ); -XML_CONSTASCII_ACTION( sXML_ring, "ring" ); -XML_CONSTASCII_ACTION( sXML_role, "role" ); -XML_CONSTASCII_ACTION( sXML_roll_from_bottom, "roll-from-bottom" ); -XML_CONSTASCII_ACTION( sXML_roll_from_left, "roll-from-left" ); -XML_CONSTASCII_ACTION( sXML_roll_from_right, "roll-from-right" ); -XML_CONSTASCII_ACTION( sXML_roman, "roman" ); -XML_CONSTASCII_ACTION( sXML_root, "root" ); -XML_CONSTASCII_ACTION( sXML_rotate, "rotate" ); -XML_CONSTASCII_ACTION( sXML_rotation, "rotation" ); -XML_CONSTASCII_ACTION( sXML_rotation_align, "rotation-align" ); -XML_CONSTASCII_ACTION( sXML_rotation_angle, "rotation-angle" ); -XML_CONSTASCII_ACTION( sXML_round , "round" ); -XML_CONSTASCII_ACTION( sXML_row, "row"); -XML_CONSTASCII_ACTION( sXML_rows, "rows"); -XML_CONSTASCII_ACTION( sXML_row_height, "row-height" ); -XML_CONSTASCII_ACTION( sXML_row_number, "row-number" ); -XML_CONSTASCII_ACTION( sXML_ruby, "ruby" ); -XML_CONSTASCII_ACTION( sXML_ruby_align, "ruby-align" ); -XML_CONSTASCII_ACTION( sXML_ruby_base, "ruby-base" ); -XML_CONSTASCII_ACTION( sXML_ruby_position, "ruby-position" ); -XML_CONSTASCII_ACTION( sXML_ruby_text, "ruby-text" ); -XML_CONSTASCII_ACTION( sXML_run_through, "run-through" ); -XML_CONSTASCII_ACTION( sXML_rx, "rx" ); -XML_CONSTASCII_ACTION( sXML_ry, "ry" ); -XML_CONSTASCII_ACTION( sXML_s, "s" ); -XML_CONSTASCII_ACTION( sXML_scale, "scale" ); -XML_CONSTASCII_ACTION( sXML_scale_min, "scale-min" ); -XML_CONSTASCII_ACTION( sXML_scale_text, "scale-text" ); -XML_CONSTASCII_ACTION( sXML_scale_to, "scale-to" ); -XML_CONSTASCII_ACTION( sXML_scale_to_pages, "scale-to-pages" ); -XML_CONSTASCII_ACTION( sXML_scatter, "scatter" ); -XML_CONSTASCII_ACTION( sXML_scenario, "scenario" ); -XML_CONSTASCII_ACTION( sXML_scenario_ranges, "scenario-ranges" ); -XML_CONSTASCII_ACTION( sXML_scene, "scene"); -XML_CONSTASCII_ACTION( sXML_school, "school" ); -XML_CONSTASCII_ACTION( sXML_scientific_number, "scientific-number" ); -XML_CONSTASCII_ACTION( sXML_score_spaces, "score-spaces" ); -XML_CONSTASCII_ACTION( sXML_script, "script" ); -XML_CONSTASCII_ACTION( sXML_scroll, "scroll" ); -XML_CONSTASCII_ACTION( sXML_sdev, "sdev" ); -XML_CONSTASCII_ACTION( sXML_search_criteria_must_apply_to_whole_cell, "search-criteria-must-apply-to-whole-cell" ); -XML_CONSTASCII_ACTION( sXML_sec, "sec" ); -XML_CONSTASCII_ACTION( sXML_sech, "sech" ); -XML_CONSTASCII_ACTION( sXML_second_date_time, "second-date-time" ); -XML_CONSTASCII_ACTION( sXML_seconds, "seconds" ); -XML_CONSTASCII_ACTION( sXML_section, "section" ); -XML_CONSTASCII_ACTION( sXML_section_desc, "section-desc" ); -XML_CONSTASCII_ACTION( sXML_section_name, "section-name" ); -XML_CONSTASCII_ACTION( sXML_section_source, "section-source" ); -XML_CONSTASCII_ACTION( sXML_select_page, "select-page" ); -XML_CONSTASCII_ACTION( sXML_selector, "selector" ); -XML_CONSTASCII_ACTION( sXML_semantics, "semantics" ); -XML_CONSTASCII_ACTION( sXML_semi_automatic, "semi-automatic" ); -XML_CONSTASCII_ACTION( sXML_sender_city, "sender-city" ); -XML_CONSTASCII_ACTION( sXML_sender_company, "sender-company" ); -XML_CONSTASCII_ACTION( sXML_sender_country, "sender-country" ); -XML_CONSTASCII_ACTION( sXML_sender_email, "sender-email" ); -XML_CONSTASCII_ACTION( sXML_sender_fax, "sender-fax" ); -XML_CONSTASCII_ACTION( sXML_sender_firstname, "sender-firstname" ); -XML_CONSTASCII_ACTION( sXML_sender_initials, "sender-initials" ); -XML_CONSTASCII_ACTION( sXML_sender_lastname, "sender-lastname" ); -XML_CONSTASCII_ACTION( sXML_sender_phone_private, "sender-phone-private" ); -XML_CONSTASCII_ACTION( sXML_sender_phone_work, "sender-phone-work" ); -XML_CONSTASCII_ACTION( sXML_sender_position, "sender-position" ); -XML_CONSTASCII_ACTION( sXML_sender_postal_code, "sender-postal-code" ); -XML_CONSTASCII_ACTION( sXML_sender_state_or_province, "sender-state-or-province" ); -XML_CONSTASCII_ACTION( sXML_sender_street, "sender-street" ); -XML_CONSTASCII_ACTION( sXML_sender_title, "sender-title" ); -XML_CONSTASCII_ACTION( sXML_sep, "sep" ); -XML_CONSTASCII_ACTION( sXML_separation_character, "separation-character" ); -XML_CONSTASCII_ACTION( sXML_separator, "separator" ); -XML_CONSTASCII_ACTION( sXML_sequence, "sequence" ); -XML_CONSTASCII_ACTION( sXML_sequence_decl, "sequence-decl" ); -XML_CONSTASCII_ACTION( sXML_sequence_decls, "sequence-decls" ); -XML_CONSTASCII_ACTION( sXML_sequence_ref, "sequence-ref" ); -XML_CONSTASCII_ACTION( sXML_series, "series" ); -XML_CONSTASCII_ACTION( sXML_series_source, "series-source" ); -XML_CONSTASCII_ACTION( sXML_server_map, "server-map" ); -XML_CONSTASCII_ACTION( sXML_set, "set" ); -XML_CONSTASCII_ACTION( sXML_setdiff, "setdiff" ); -XML_CONSTASCII_ACTION( sXML_settings, "settings" ); -XML_CONSTASCII_ACTION( sXML_shade_mode, "shade-mode"); -XML_CONSTASCII_ACTION( sXML_shadow, "shadow" ); -XML_CONSTASCII_ACTION( sXML_shadow_color , "shadow-color" ); -XML_CONSTASCII_ACTION( sXML_shadow_offset_x , "shadow-offset-x" ); -XML_CONSTASCII_ACTION( sXML_shadow_offset_y , "shadow-offset-y" ); -XML_CONSTASCII_ACTION( sXML_shadow_slant, "shadow-slant"); -XML_CONSTASCII_ACTION( sXML_shadow_transparency , "shadow-transparency" ); -XML_CONSTASCII_ACTION( sXML_shape, "shape" ); -XML_CONSTASCII_ACTION( sXML_shapes, "shapes" ); -XML_CONSTASCII_ACTION( sXML_sheet_name, "sheet-name" ); -XML_CONSTASCII_ACTION( sXML_shininess, "shininess" ); -XML_CONSTASCII_ACTION( sXML_short, "short" ); -XML_CONSTASCII_ACTION( sXML_show, "show" ); -XML_CONSTASCII_ACTION( sXML_show_accepted_changes, "show-accepted-changes" ); -XML_CONSTASCII_ACTION( sXML_show_rejected_changes, "show-rejected-changes" ); -XML_CONSTASCII_ACTION( sXML_show_changes, "show-changes" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_author, "show-changes-by-author" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_author_name, "show-changes-by-author-name" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_comment, "show-changes-by-comment" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_comment_text, "show-changes-by-comment-text" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_datetime, "show-changes-by-datetime" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_datetime_mode, "show-changes-by-datetime-mode" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_datetime_first_datetime, "show-changes-by-datetime-first-datetime" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_datetime_second_datetime, "show-changes-by-datetime-second-datetime" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_ranges, "show-changes-by-ranges" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_ranges_list, "show-changes-by-ranges-list" ); -XML_CONSTASCII_ACTION( sXML_show_logo, "show-logo" ); -XML_CONSTASCII_ACTION( sXML_show_unit, "show-unit" ); -XML_CONSTASCII_ACTION( sXML_shows, "shows" ); -XML_CONSTASCII_ACTION( sXML_side_by_side, "side-by-side" ); -XML_CONSTASCII_ACTION( sXML_silver, "silver" ); -XML_CONSTASCII_ACTION( sXML_simple, "simple" ); -XML_CONSTASCII_ACTION( sXML_sin, "sin" ); -XML_CONSTASCII_ACTION( sXML_since_date_time, "since-date-time" ); -XML_CONSTASCII_ACTION( sXML_since_save, "since-save" ); -XML_CONSTASCII_ACTION( sXML_sinh, "sinh" ); -XML_CONSTASCII_ACTION( sXML_size, "size" ); -XML_CONSTASCII_ACTION( sXML_size_protect, "size-protect" ); -XML_CONSTASCII_ACTION( sXML_slide, "slide" ); -XML_CONSTASCII_ACTION( sXML_slow, "slow" ); -XML_CONSTASCII_ACTION( sXML_soft_page_break, "soft-page-break" ); -XML_CONSTASCII_ACTION( sXML_solid, "solid" ); -XML_CONSTASCII_ACTION( sXML_solid_type, "solid-type" ); -XML_CONSTASCII_ACTION( sXML_sort, "sort"); -XML_CONSTASCII_ACTION( sXML_sort_ascending, "sort-ascending" ); -XML_CONSTASCII_ACTION( sXML_sort_by, "sort-by"); -XML_CONSTASCII_ACTION( sXML_sort_by_position, "sort-by-position" ); -XML_CONSTASCII_ACTION( sXML_sort_groups, "sort-groups"); -XML_CONSTASCII_ACTION( sXML_sort_key, "sort-key"); -XML_CONSTASCII_ACTION( sXML_sort_by_x_values, "sort-by-x-values" ); -XML_CONSTASCII_ACTION( sXML_source_cell_range, "source-cell-range"); -XML_CONSTASCII_ACTION( sXML_source_cell_range_addresses, "source-cell-range-addresses"); -XML_CONSTASCII_ACTION( sXML_source_field_name, "source-field-name"); -XML_CONSTASCII_ACTION( sXML_source_name, "source-name"); -XML_CONSTASCII_ACTION( sXML_source_range_address, "source-range-address"); -XML_CONSTASCII_ACTION( sXML_source_service, "source-service"); -XML_CONSTASCII_ACTION( sXML_space_before, "space-before" ); -XML_CONSTASCII_ACTION( sXML_span, "span" ); -XML_CONSTASCII_ACTION( sXML_specular, "specular"); -XML_CONSTASCII_ACTION( sXML_specular_color, "specular-color" ); -XML_CONSTASCII_ACTION( sXML_sphere, "sphere" ); -XML_CONSTASCII_ACTION( sXML_spiralin_left, "spiralin-left" ); -XML_CONSTASCII_ACTION( sXML_spiralin_right, "spiralin-right" ); -XML_CONSTASCII_ACTION( sXML_spiralout_left, "spiralout-left" ); -XML_CONSTASCII_ACTION( sXML_spiralout_right, "spiralout-right" ); -XML_CONSTASCII_ACTION( sXML_splines, "splines" ); -XML_CONSTASCII_ACTION( sXML_split, "split" ); -XML_CONSTASCII_ACTION( sXML_split_column, "split-column" ); -XML_CONSTASCII_ACTION( sXML_split_position, "split-position" ); -XML_CONSTASCII_ACTION( sXML_split_row, "split-row" ); -XML_CONSTASCII_ACTION( sXML_spreadsheet , "spreadsheet" ); -XML_CONSTASCII_ACTION( sXML_sql_statement, "sql-statement"); -XML_CONSTASCII_ACTION( sXML_stacked, "stacked" ); -XML_CONSTASCII_ACTION( sXML_stagger_even, "stagger-even" ); -XML_CONSTASCII_ACTION( sXML_stagger_odd, "stagger-odd" ); -XML_CONSTASCII_ACTION( sXML_standard, "standard" ); -XML_CONSTASCII_ACTION( sXML_standard_deviation, "standard-deviation" ); -XML_CONSTASCII_ACTION( sXML_starbasic, "starbasic" ); -XML_CONSTASCII_ACTION( sXML_start, "start" ); -XML_CONSTASCII_ACTION( sXML_start_color, "start-color" ); -XML_CONSTASCII_ACTION( sXML_start_column, "start-column" ); -XML_CONSTASCII_ACTION( sXML_start_intensity, "start-intensity" ); -XML_CONSTASCII_ACTION( sXML_start_numbering_at, "start-numbering-at" ); -XML_CONSTASCII_ACTION( sXML_start_page, "start-page" ); -XML_CONSTASCII_ACTION( sXML_start_position, "start-position" ); -XML_CONSTASCII_ACTION( sXML_start_row, "start-row" ); -XML_CONSTASCII_ACTION( sXML_start_table, "start-table" ); -XML_CONSTASCII_ACTION( sXML_start_value, "start-value" ); -XML_CONSTASCII_ACTION( sXML_start_with_navigator, "start-with-navigator" ); -XML_CONSTASCII_ACTION( sXML_statistics, "statistics" ); -XML_CONSTASCII_ACTION( sXML_status, "status" ); -XML_CONSTASCII_ACTION( sXML_stay_on_top, "stay-on-top" ); -XML_CONSTASCII_ACTION( sXML_stdev, "stdev" ); -XML_CONSTASCII_ACTION( sXML_stdevp, "stdevp" ); -XML_CONSTASCII_ACTION( sXML_steps, "steps" ); -XML_CONSTASCII_ACTION( sXML_stock, "stock" ); -XML_CONSTASCII_ACTION( sXML_stock_updown_bars, "stock-updown-bars" ); -XML_CONSTASCII_ACTION( sXML_stock_with_volume, "stock-with-volume" ); -XML_CONSTASCII_ACTION( sXML_stop, "stop" ); -XML_CONSTASCII_ACTION( sXML_stretch_from_bottom, "stretch-from-bottom" ); -XML_CONSTASCII_ACTION( sXML_stretch_from_left, "stretch-from-left" ); -XML_CONSTASCII_ACTION( sXML_stretch_from_right, "stretch-from-right" ); -XML_CONSTASCII_ACTION( sXML_stretch_from_top, "stretch-from-top" ); -XML_CONSTASCII_ACTION( sXML_stretchy, "stretchy" ); -XML_CONSTASCII_ACTION( sXML_strict , "strict" ); -XML_CONSTASCII_ACTION( sXML_string, "string"); -XML_CONSTASCII_ACTION( sXML_string_value, "string-value"); -XML_CONSTASCII_ACTION( sXML_string_value_if_false, "string-value-if-false" ); -XML_CONSTASCII_ACTION( sXML_string_value_if_true, "string-value-if-true" ); -XML_CONSTASCII_ACTION( sXML_stroke , "stroke" ); -XML_CONSTASCII_ACTION( sXML_stroke_color , "stroke-color" ); -XML_CONSTASCII_ACTION( sXML_stroke_dash , "stroke-dash" ); -XML_CONSTASCII_ACTION( sXML_stroke_linejoin , "stroke-linejoin" ); -XML_CONSTASCII_ACTION( sXML_stroke_opacity, "stroke-opacity" ); -XML_CONSTASCII_ACTION( sXML_stroke_width, "stroke-width" ); -XML_CONSTASCII_ACTION( sXML_structure_protected, "structure-protected" ); -XML_CONSTASCII_ACTION( sXML_style, "style" ); -XML_CONSTASCII_ACTION( sXML_style_name, "style-name" ); -XML_CONSTASCII_ACTION( sXML_styles, "styles" ); -XML_CONSTASCII_ACTION( sXML_stylesheet, "stylesheet" ); -XML_CONSTASCII_ACTION( sXML_sub_table, "sub-table" ); -XML_CONSTASCII_ACTION( sXML_subject, "subject" ); -XML_CONSTASCII_ACTION( sXML_subset, "subset" ); -XML_CONSTASCII_ACTION( sXML_subtitle, "subtitle" ); -XML_CONSTASCII_ACTION( sXML_subtotal_field, "subtotal-field"); -XML_CONSTASCII_ACTION( sXML_subtotal_rule, "subtotal-rule"); -XML_CONSTASCII_ACTION( sXML_subtotal_rules, "subtotal-rules"); -XML_CONSTASCII_ACTION( sXML_suffix, "suffix" ); -XML_CONSTASCII_ACTION( sXML_sum, "sum" ); -XML_CONSTASCII_ACTION( sXML_swiss, "swiss" ); -XML_CONSTASCII_ACTION( sXML_symbol, "symbol" ); -XML_CONSTASCII_ACTION( sXML_symbol_height, "symbol-height" ); -XML_CONSTASCII_ACTION( sXML_symbol_image_name, "symbol-image-name" ); -XML_CONSTASCII_ACTION( sXML_symbol_width, "symbol-width" ); -XML_CONSTASCII_ACTION( sXML_system, "system" ); -XML_CONSTASCII_ACTION( sXML_tab_stop, "tab-stop" ); -XML_CONSTASCII_ACTION( sXML_tab_stops, "tab-stops" ); -XML_CONSTASCII_ACTION( sXML_table, "table" ); -XML_CONSTASCII_ACTION( sXML_tables, "tables" ); -XML_CONSTASCII_ACTION( sXML_table_background, "table-background" ); -XML_CONSTASCII_ACTION( sXML_table_cell, "table-cell" ); -XML_CONSTASCII_ACTION( sXML_table_centering, "table-centering" ); -XML_CONSTASCII_ACTION( sXML_table_column, "table-column" ); -XML_CONSTASCII_ACTION( sXML_table_column_group, "table-column-group" ); -XML_CONSTASCII_ACTION( sXML_table_columns, "table-columns" ); -XML_CONSTASCII_ACTION( sXML_table_count, "table-count" ); -XML_CONSTASCII_ACTION( sXML_table_header, "table-header" ); -XML_CONSTASCII_ACTION( sXML_table_header_columns, "table-header-columns" ); -XML_CONSTASCII_ACTION( sXML_table_header_rows, "table-header-rows" ); -XML_CONSTASCII_ACTION( sXML_table_index, "table-index" ); -XML_CONSTASCII_ACTION( sXML_table_index_entry_template, "table-index-entry-template" ); -XML_CONSTASCII_ACTION( sXML_table_index_source, "table-index-source" ); -XML_CONSTASCII_ACTION( sXML_table_name, "table-name"); -XML_CONSTASCII_ACTION( sXML_table_number_list, "table-number-list"); -XML_CONSTASCII_ACTION( sXML_table_of_content, "table-of-content" ); -XML_CONSTASCII_ACTION( sXML_table_of_content_entry_template, "table-of-content-entry-template" ); -XML_CONSTASCII_ACTION( sXML_table_of_content_source, "table-of-content-source" ); -XML_CONSTASCII_ACTION( sXML_table_page, "table-page" ); -XML_CONSTASCII_ACTION( sXML_table_row, "table-row" ); -XML_CONSTASCII_ACTION( sXML_table_row_group, "table-row-group" ); -XML_CONSTASCII_ACTION( sXML_table_rows, "table-rows" ); -XML_CONSTASCII_ACTION( sXML_table_source, "table-source" ); -XML_CONSTASCII_ACTION( sXML_table_view, "table-view" ); -XML_CONSTASCII_ACTION( sXML_tab_stop_distance, "tab-stop-distance" ); -XML_CONSTASCII_ACTION( sXML_tan, "tan" ); -XML_CONSTASCII_ACTION( sXML_tanh, "tanh" ); -XML_CONSTASCII_ACTION( sXML_target_cell_address, "target-cell-address"); -XML_CONSTASCII_ACTION( sXML_target_frame_name, "target-frame-name" ); -XML_CONSTASCII_ACTION( sXML_target_range_address, "target-range-address"); -XML_CONSTASCII_ACTION( sXML_tb_rl, "tb-rl" ); -XML_CONSTASCII_ACTION( sXML_teal, "teal" ); -XML_CONSTASCII_ACTION( sXML_techreport, "techreport" ); -XML_CONSTASCII_ACTION( sXML_template, "template" ); -XML_CONSTASCII_ACTION( sXML_template_name, "template-name" ); -XML_CONSTASCII_ACTION( sXML_tendsto, "tendsto" ); -XML_CONSTASCII_ACTION( sXML_tex_filter, "texture-filter" ); -XML_CONSTASCII_ACTION( sXML_tex_generation_mode_x, "texture-generation-mode-x" ); -XML_CONSTASCII_ACTION( sXML_tex_generation_mode_y, "texture-generation-mode-y" ); -XML_CONSTASCII_ACTION( sXML_tex_kind, "texture-kind" ); -XML_CONSTASCII_ACTION( sXML_tex_mode, "texture-mode" ); -XML_CONSTASCII_ACTION( sXML_text, "text" ); -XML_CONSTASCII_ACTION( sXML_text_align, "text-align" ); -XML_CONSTASCII_ACTION( sXML_text_align_last, "text-align-last" ); -XML_CONSTASCII_ACTION( sXML_text_align_source, "text-align-source" ); -XML_CONSTASCII_ACTION( sXML_text_autospace, "text-autospace" ); -XML_CONSTASCII_ACTION( sXML_text_background_color, "text-background-color" ); -XML_CONSTASCII_ACTION( sXML_text_blinking, "text-blinking" ); -XML_CONSTASCII_ACTION( sXML_text_box, "text-box" ); -XML_CONSTASCII_ACTION( sXML_text_combine, "text-combine" ); -XML_CONSTASCII_ACTION( sXML_text_combine_end_char, "text-combine-end-char" ); -XML_CONSTASCII_ACTION( sXML_text_combine_start_char, "text-combine-start-char" ); -XML_CONSTASCII_ACTION( sXML_text_content, "text-content" ); -XML_CONSTASCII_ACTION( sXML_text_crossing_out, "text-crossing-out" ); -XML_CONSTASCII_ACTION( sXML_text_emphasize, "text-emphasize" ); -XML_CONSTASCII_ACTION( sXML_text_global, "text-global" ); -XML_CONSTASCII_ACTION( sXML_text_indent, "text-indent" ); -XML_CONSTASCII_ACTION( sXML_text_input, "text-input" ); -XML_CONSTASCII_ACTION( sXML_text_outline, "text-outline" ); -XML_CONSTASCII_ACTION( sXML_text_position, "text-position" ); -XML_CONSTASCII_ACTION( sXML_text_rotation_angle, "text-rotation-angle" ); -XML_CONSTASCII_ACTION( sXML_text_rotation_scale, "text-rotation-scale" ); -XML_CONSTASCII_ACTION( sXML_text_scale, "text-scale" ); -XML_CONSTASCII_ACTION( sXML_text_shadow, "text-shadow" ); -XML_CONSTASCII_ACTION( sXML_text_style, "text-style" ); -XML_CONSTASCII_ACTION( sXML_text_transform, "text-transform" ); -XML_CONSTASCII_ACTION( sXML_text_underline, "text-underline" ); -XML_CONSTASCII_ACTION( sXML_text_underline_color, "text-underline-color" ); -XML_CONSTASCII_ACTION( sXML_textarea_horizontal_align, "textarea-horizontal-align" ); -XML_CONSTASCII_ACTION( sXML_textarea_vertical_align, "textarea-vertical-align" ); -XML_CONSTASCII_ACTION( sXML_textual, "textual" ); -XML_CONSTASCII_ACTION( sXML_thick, "thick" ); -XML_CONSTASCII_ACTION( sXML_thin, "thin" ); -XML_CONSTASCII_ACTION( sXML_three_dimensional, "three-dimensional" ); -XML_CONSTASCII_ACTION( sXML_thumbnail, "thumbnail" ); -XML_CONSTASCII_ACTION( sXML_tick_marks_major_inner, "tick-marks-major-inner" ); -XML_CONSTASCII_ACTION( sXML_tick_marks_major_outer, "tick-marks-major-outer" ); -XML_CONSTASCII_ACTION( sXML_tick_marks_minor_inner, "tick-marks-minor-inner" ); -XML_CONSTASCII_ACTION( sXML_tick_marks_minor_outer, "tick-marks-minor-outer" ); -XML_CONSTASCII_ACTION( sXML_tile_repeat_offset, "tile-repeat-offset" ); -XML_CONSTASCII_ACTION( sXML_time, "time"); -XML_CONSTASCII_ACTION( sXML_time_adjust, "time-adjust" ); -XML_CONSTASCII_ACTION( sXML_time_style, "time-style" ); -XML_CONSTASCII_ACTION( sXML_time_value, "time-value"); -XML_CONSTASCII_ACTION( sXML_times, "times"); -XML_CONSTASCII_ACTION( sXML_title, "title" ); -XML_CONSTASCII_ACTION( sXML_to_another_table, "to-another-table" ); -XML_CONSTASCII_ACTION( sXML_toc_mark, "toc-mark" ); -XML_CONSTASCII_ACTION( sXML_toc_mark_end, "toc-mark-end" ); -XML_CONSTASCII_ACTION( sXML_toc_mark_start, "toc-mark-start" ); -XML_CONSTASCII_ACTION( sXML_top, "top" ); -XML_CONSTASCII_ACTION( sXML_top_percent, "top percent"); -XML_CONSTASCII_ACTION( sXML_top_values, "top values"); -XML_CONSTASCII_ACTION( sXML_trace_dependents, "trace-dependents" ); -XML_CONSTASCII_ACTION( sXML_trace_errors, "trace-errors" ); -XML_CONSTASCII_ACTION( sXML_trace_precedents, "trace-precedents" ); -XML_CONSTASCII_ACTION( sXML_track_changes, "track-changes" ); -XML_CONSTASCII_ACTION( sXML_tracked_changes, "tracked-changes" ); -XML_CONSTASCII_ACTION( sXML_tracked_changes_view_settings, "tracked-changes-view-settings" ); -XML_CONSTASCII_ACTION( sXML_transform , "transform" ); -XML_CONSTASCII_ACTION( sXML_transition_on_click, "transition-on-click" ); -XML_CONSTASCII_ACTION( sXML_transparency, "transparency" ); -XML_CONSTASCII_ACTION( sXML_transparency_name, "transparency-name" ); -XML_CONSTASCII_ACTION( sXML_transparent, "transparent" ); -XML_CONSTASCII_ACTION( sXML_transpose, "transpose" ); -XML_CONSTASCII_ACTION( sXML_true, "true" ); -XML_CONSTASCII_ACTION( sXML_truncate_on_overflow, "truncate-on-overflow" ); -XML_CONSTASCII_ACTION( sXML_ttb, "ttb"); -XML_CONSTASCII_ACTION( sXML_type, "type" ); -XML_CONSTASCII_ACTION( sXML_underline_bold, "bold" ); -XML_CONSTASCII_ACTION( sXML_underline_bold_dash, "bold-dash" ); -XML_CONSTASCII_ACTION( sXML_underline_bold_dot_dash, "bold-dot-dash" ); -XML_CONSTASCII_ACTION( sXML_underline_bold_dot_dot_dash, "bold-dot-dot-dash" ); -XML_CONSTASCII_ACTION( sXML_underline_bold_dotted, "bold-dotted" ); -XML_CONSTASCII_ACTION( sXML_underline_bold_long_dash, "bold-long-dash" ); -XML_CONSTASCII_ACTION( sXML_underline_bold_wave, "bold-wave" ); -XML_CONSTASCII_ACTION( sXML_underline_dash, "dash" ); -XML_CONSTASCII_ACTION( sXML_underline_dot_dash, "dot-dash" ); -XML_CONSTASCII_ACTION( sXML_underline_dot_dot_dash, "dot-dot-dash" ); -XML_CONSTASCII_ACTION( sXML_underline_dotted, "dotted" ); -XML_CONSTASCII_ACTION( sXML_underline_double, "double" ); -XML_CONSTASCII_ACTION( sXML_underline_double_wave, "double-wave" ); -XML_CONSTASCII_ACTION( sXML_underline_long_dash, "long-dash" ); -XML_CONSTASCII_ACTION( sXML_underline_none, "none" ); -XML_CONSTASCII_ACTION( sXML_underline_single, "single" ); -XML_CONSTASCII_ACTION( sXML_underline_small_wave, "small-wave" ); -XML_CONSTASCII_ACTION( sXML_underline_wave, "wave" ); -XML_CONSTASCII_ACTION( sXML_unformatted_text, "unformatted-text" ); -XML_CONSTASCII_ACTION( sXML_union, "union" ); -XML_CONSTASCII_ACTION( sXML_unit, "unit" ); -XML_CONSTASCII_ACTION( sXML_unordered_list, "unordered-list" ); -XML_CONSTASCII_ACTION( sXML_unpublished, "unpublished" ); -XML_CONSTASCII_ACTION( sXML_uplimit, "uplimit" ); -XML_CONSTASCII_ACTION( sXML_url, "url" ); -XML_CONSTASCII_ACTION( sXML_use_caption, "use-caption" ); -XML_CONSTASCII_ACTION( sXML_use_cell_protection, "use-cell-protection" ); -XML_CONSTASCII_ACTION( sXML_use_chart_objects, "use-chart-objects" ); -XML_CONSTASCII_ACTION( sXML_use_condition, "use-condition" ); -XML_CONSTASCII_ACTION( sXML_use_draw_objects, "use-draw-objects" ); -XML_CONSTASCII_ACTION( sXML_use_floating_frames, "use-floating-frames" ); -XML_CONSTASCII_ACTION( sXML_use_graphics, "use-graphics" ); -XML_CONSTASCII_ACTION( sXML_use_image_objects, "use-image-objects" ); -XML_CONSTASCII_ACTION( sXML_use_index_marks, "use-index-marks" ); -XML_CONSTASCII_ACTION( sXML_use_index_source_styles, "use-index-source-styles" ); -XML_CONSTASCII_ACTION( sXML_use_keys_as_entries, "use-keys-as-entries" ); -XML_CONSTASCII_ACTION( sXML_use_label, "use-label" ); -XML_CONSTASCII_ACTION( sXML_use_math_objects, "use-math-objects" ); -XML_CONSTASCII_ACTION( sXML_use_objects, "use-objects" ); -XML_CONSTASCII_ACTION( sXML_use_optimal_column_width, "use-optimal-column-width"); -XML_CONSTASCII_ACTION( sXML_use_optimal_row_height, "use-optimal-row-height"); -XML_CONSTASCII_ACTION( sXML_use_other_objects, "use-other-objects" ); -XML_CONSTASCII_ACTION( sXML_use_soft_page_breaks, "use-soft-page-breaks" ); -XML_CONSTASCII_ACTION( sXML_use_spreadsheet_objects, "use-spreadsheet-objects" ); -XML_CONSTASCII_ACTION( sXML_use_styles, "use-styles" ); -XML_CONSTASCII_ACTION( sXML_use_tables, "use-tables" ); -XML_CONSTASCII_ACTION( sXML_use_window_font_color, "use-window-font-color" ); -XML_CONSTASCII_ACTION( sXML_used_hierarchy, "used-hierarchy"); -XML_CONSTASCII_ACTION( sXML_user_defined, "user-defined" ); -XML_CONSTASCII_ACTION( sXML_user_field_decl, "user-field-decl" ); -XML_CONSTASCII_ACTION( sXML_user_field_decls, "user-field-decls" ); -XML_CONSTASCII_ACTION( sXML_user_field_get, "user-field-get" ); -XML_CONSTASCII_ACTION( sXML_user_field_input, "user-field-input" ); -XML_CONSTASCII_ACTION( sXML_user_index, "user-index" ); -XML_CONSTASCII_ACTION( sXML_user_index_entry_template, "user-index-entry-template" ); -XML_CONSTASCII_ACTION( sXML_user_index_mark, "user-index-mark" ); -XML_CONSTASCII_ACTION( sXML_user_index_mark_end, "user-index-mark-end" ); -XML_CONSTASCII_ACTION( sXML_user_index_mark_start, "user-index-mark-start" ); -XML_CONSTASCII_ACTION( sXML_user_index_source, "user-index-source" ); -XML_CONSTASCII_ACTION( sXML_user_transformed, "user-transformed" ); -XML_CONSTASCII_ACTION( sXML_username, "username"); -XML_CONSTASCII_ACTION( sXML_value, "value"); -XML_CONSTASCII_ACTION( sXML_value_type, "value-type"); -XML_CONSTASCII_ACTION( sXML_values_cell_range_address, "values-cell-range-address" ); -XML_CONSTASCII_ACTION( sXML_var, "var" ); -XML_CONSTASCII_ACTION( sXML_variable, "variable" ); -XML_CONSTASCII_ACTION( sXML_variable_decl, "variable-decl" ); -XML_CONSTASCII_ACTION( sXML_variable_decls, "variable-decls" ); -XML_CONSTASCII_ACTION( sXML_variable_get, "variable-get" ); -XML_CONSTASCII_ACTION( sXML_variable_input, "variable-input" ); -XML_CONSTASCII_ACTION( sXML_variable_set, "variable-set" ); -XML_CONSTASCII_ACTION( sXML_variance, "variance" ); -XML_CONSTASCII_ACTION( sXML_varp, "varp" ); -XML_CONSTASCII_ACTION( sXML_vector, "vector" ); -XML_CONSTASCII_ACTION( sXML_verb, "verb" ); -XML_CONSTASCII_ACTION( sXML_version, "version" ); -XML_CONSTASCII_ACTION( sXML_version_entry, "version-entry" ); -XML_CONSTASCII_ACTION( sXML_version_list, "version-list" ); -XML_CONSTASCII_ACTION( sXML_vertical, "vertical" ); -XML_CONSTASCII_ACTION( sXML_vertical_align, "vertical-align" ); -XML_CONSTASCII_ACTION( sXML_vertical_lines, "vertical-lines" ); -XML_CONSTASCII_ACTION( sXML_vertical_pos, "vertical-pos" ); -XML_CONSTASCII_ACTION( sXML_vertical_rel, "vertical-rel" ); -XML_CONSTASCII_ACTION( sXML_vertical_segments, "vertical-segments" ); -XML_CONSTASCII_ACTION( sXML_vertical_split_mode, "vertical-split-mode" ); -XML_CONSTASCII_ACTION( sXML_vertical_split_position, "vertical-split-position" ); -XML_CONSTASCII_ACTION( sXML_vertical_stripes, "vertical-stripes" ); -XML_CONSTASCII_ACTION( sXML_view, "view" ); -XML_CONSTASCII_ACTION( sXML_viewBox, "viewBox" ); -XML_CONSTASCII_ACTION( sXML_view_id, "view-id" ); -XML_CONSTASCII_ACTION( sXML_view_settings, "view-settings" ); -XML_CONSTASCII_ACTION( sXML_visibility, "visibility" ); -XML_CONSTASCII_ACTION( sXML_visible, "visible" ); -XML_CONSTASCII_ACTION( sXML_visible_area, "visible-area" ); -XML_CONSTASCII_ACTION( sXML_visible_area_height, "visible-area-height" ); -XML_CONSTASCII_ACTION( sXML_visible_area_left, "visible-area-left" ); -XML_CONSTASCII_ACTION( sXML_visible_area_top, "visible-area-top" ); -XML_CONSTASCII_ACTION( sXML_visible_area_width, "visible-area-width" ); -XML_CONSTASCII_ACTION( sXML_visited_style_name, "visited-style-name" ); -XML_CONSTASCII_ACTION( sXML_volatile, "volatile" ); -XML_CONSTASCII_ACTION( sXML_volume, "volume" ); -XML_CONSTASCII_ACTION( sXML_vpn, "vpn"); -XML_CONSTASCII_ACTION( sXML_vrp, "vrp"); -XML_CONSTASCII_ACTION( sXML_vup, "vup"); -XML_CONSTASCII_ACTION( sXML_wall, "wall" ); -XML_CONSTASCII_ACTION( sXML_warning, "warning" ); -XML_CONSTASCII_ACTION( sXML_watermark, "watermark" ); -XML_CONSTASCII_ACTION( sXML_wavyline_from_bottom, "wavyline-from-bottom" ); -XML_CONSTASCII_ACTION( sXML_wavyline_from_left, "wavyline-from-left" ); -XML_CONSTASCII_ACTION( sXML_wavyline_from_right, "wavyline-from-right" ); -XML_CONSTASCII_ACTION( sXML_wavyline_from_top, "wavyline-from-top" ); -XML_CONSTASCII_ACTION( sXML_week_of_year, "week-of-year" ); -XML_CONSTASCII_ACTION( sXML_weight_bold, "bold" ); -XML_CONSTASCII_ACTION( sXML_weight_normal, "normal" ); -XML_CONSTASCII_ACTION( sXML_white, "white" ); -XML_CONSTASCII_ACTION( sXML_whole_page, "whole-page" ); -XML_CONSTASCII_ACTION( sXML_widows, "widows" ); -XML_CONSTASCII_ACTION( sXML_width, "width" ); -XML_CONSTASCII_ACTION( sXML_word, "word" ); -XML_CONSTASCII_ACTION( sXML_word_count, "word-count" ); -XML_CONSTASCII_ACTION( sXML_wrap, "wrap" ); -XML_CONSTASCII_ACTION( sXML_wrap_contour, "wrap-contour" ); -XML_CONSTASCII_ACTION( sXML_wrap_contour_mode, "wrap-contour-mode" ); -XML_CONSTASCII_ACTION( sXML_wrap_option, "wrap-option" ); -XML_CONSTASCII_ACTION( sXML_writing_mode, "writing-mode" ); -XML_CONSTASCII_ACTION( sXML_www, "www" ); -XML_CONSTASCII_ACTION( sXML_x, "x" ); -XML_CONSTASCII_ACTION( sXML_x1, "x1" ); -XML_CONSTASCII_ACTION( sXML_x2, "x2" ); -XML_CONSTASCII_ACTION( sXML_x_mac_roman, "x-mac-roman" ); -XML_CONSTASCII_ACTION( sXML_x_symbol, "x-symbol" ); -XML_CONSTASCII_ACTION( sXML_x_system, "x-system" ); -XML_CONSTASCII_ACTION( sXML_xor, "xor" ); -XML_CONSTASCII_ACTION( sXML_y, "y" ); -XML_CONSTASCII_ACTION( sXML_y1, "y1" ); -XML_CONSTASCII_ACTION( sXML_y2, "y2" ); -XML_CONSTASCII_ACTION( sXML_year, "year" ); -XML_CONSTASCII_ACTION( sXML_yellow, "yellow" ); -XML_CONSTASCII_ACTION( sXML_zero_values, "zero-values" ); -XML_CONSTASCII_ACTION( sXML_zindex, "z-index" ); -XML_CONSTASCII_ACTION( sXML_zoom_type, "zoom-type" ); -XML_CONSTASCII_ACTION( sXML_zoom_value, "zoom-value" ); - -XML_CONSTASCII_ACTION( sXML_start_shape, "start-shape"); -XML_CONSTASCII_ACTION( sXML_start_glue_point, "start-glue-point"); -XML_CONSTASCII_ACTION( sXML_end_shape, "end-shape"); -XML_CONSTASCII_ACTION( sXML_end_glue_point, "end-glue-point"); -XML_CONSTASCII_ACTION( sXML_line_number, "line-number"); -XML_CONSTASCII_ACTION( sXML_line_skew, "line-skew"); -XML_CONSTASCII_ACTION( sXML_curve, "curve" ); -XML_CONSTASCII_ACTION( sXML_start_line_spacing_horizontal, "start-line-spacing-horizontal" ); -XML_CONSTASCII_ACTION( sXML_start_line_spacing_vertical, "start-line-spacing-vertical" ); -XML_CONSTASCII_ACTION( sXML_end_line_spacing_horizontal, "end-line-spacing-horizontal" ); -XML_CONSTASCII_ACTION( sXML_end_line_spacing_vertical, "end-line-spacing-vertical" ); -XML_CONSTASCII_ACTION( sXML_line_distance, "line-distance" ); -XML_CONSTASCII_ACTION( sXML_guide_overhang, "guide-overhang" ); -XML_CONSTASCII_ACTION( sXML_guide_distance, "guide-distance" ); -XML_CONSTASCII_ACTION( sXML_start_guide, "start-guide" ); -XML_CONSTASCII_ACTION( sXML_end_guide, "end-guide" ); - -XML_CONSTASCII_ACTION( sXML_dots1, "dots1" ); -XML_CONSTASCII_ACTION( sXML_dots1_length, "dots1-length" ); -XML_CONSTASCII_ACTION( sXML_dots2, "dots2" ); -XML_CONSTASCII_ACTION( sXML_dots2_length, "dots2-length" ); -XML_CONSTASCII_ACTION( sXML_enable_numbering, "enable-numbering" ); - -XML_CONSTASCII_ACTION( sXML_top_left, "top-left" ); -XML_CONSTASCII_ACTION( sXML_top_right, "top-right" ); -XML_CONSTASCII_ACTION( sXML_bottom_left, "bottom-left" ); -XML_CONSTASCII_ACTION( sXML_bottom_right, "bottom-right" ); - -XML_CONSTASCII_ACTION( sXML_fill_image_ref_point, "fill-image-ref-point" ); -XML_CONSTASCII_ACTION( sXML_fill_image_ref_point_x, "fill-image-ref-point-x" ); -XML_CONSTASCII_ACTION( sXML_fill_image_ref_point_y, "fill-image-ref-point-y" ); - -XML_CONSTASCII_ACTION( sXML_from_right, "from-right" ); -XML_CONSTASCII_ACTION( sXML_from_bottom, "from-bottom" ); -XML_CONSTASCII_ACTION( sXML_from_center, "from-center" ); -XML_CONSTASCII_ACTION( sXML_from_upper_left, "from-upper-left" ); -XML_CONSTASCII_ACTION( sXML_from_upper_right, "from-upper-right" ); -XML_CONSTASCII_ACTION( sXML_from_lower_left, "from-lower-left" ); -XML_CONSTASCII_ACTION( sXML_from_lower_right, "from-lower-right" ); -XML_CONSTASCII_ACTION( sXML_to_left, "to-left" ); -XML_CONSTASCII_ACTION( sXML_to_top, "to-top" ); -XML_CONSTASCII_ACTION( sXML_to_right, "to-right" ); -XML_CONSTASCII_ACTION( sXML_to_bottom, "to-bottom" ); -XML_CONSTASCII_ACTION( sXML_to_upper_left, "to-upper-left" ); -XML_CONSTASCII_ACTION( sXML_to_upper_right, "to-upper-right" ); -XML_CONSTASCII_ACTION( sXML_to_lower_right, "to-lower-right" ); -XML_CONSTASCII_ACTION( sXML_to_lower_left, "to-lower-left" ); -XML_CONSTASCII_ACTION( sXML_to_center, "to-center" ); -XML_CONSTASCII_ACTION( sXML_counter_clockwise, "counter-clockwise" ); - -XML_CONSTASCII_ACTION( sXML_fade, "fade" ); -XML_CONSTASCII_ACTION( sXML_move, "move" ); -XML_CONSTASCII_ACTION( sXML_stripes, "stripes" ); -XML_CONSTASCII_ACTION( sXML_spiral_inward_left, "spiral-inward-left" ); -XML_CONSTASCII_ACTION( sXML_spiral_inward_right, "spiral-inward-right" ); -XML_CONSTASCII_ACTION( sXML_spiral_outward_left, "spiral-outward-left" ); -XML_CONSTASCII_ACTION( sXML_spiral_outward_right, "spiral-outward-right" ); -XML_CONSTASCII_ACTION( sXML_spiral, "spiral" ); -XML_CONSTASCII_ACTION( sXML_spiral_in, "spiral-in" ); -XML_CONSTASCII_ACTION( sXML_spiral_out, "spiral-out" ); -XML_CONSTASCII_ACTION( sXML_wavyline, "wavyline" ); -XML_CONSTASCII_ACTION( sXML_laser, "laser" ); -XML_CONSTASCII_ACTION( sXML_appear, "appear" ); -XML_CONSTASCII_ACTION( sXML_hide, "hide" ); -XML_CONSTASCII_ACTION( sXML_move_short, "move-short" ); -XML_CONSTASCII_ACTION( sXML_checkerboard, "checkerboard" ); -XML_CONSTASCII_ACTION( sXML_stretch, "stretch" ); - -XML_CONSTASCII_ACTION( sXML_shape_id, "shape-id" ); -XML_CONSTASCII_ACTION( sXML_effect, "effect" ); -XML_CONSTASCII_ACTION( sXML_speed, "speed" ); -XML_CONSTASCII_ACTION( sXML_start_scale, "start-scale" ); -XML_CONSTASCII_ACTION( sXML_show_shape, "show-shape" ); -XML_CONSTASCII_ACTION( sXML_show_text, "show-text" ); -XML_CONSTASCII_ACTION( sXML_hide_shape, "hide-shape" ); -XML_CONSTASCII_ACTION( sXML_hide_text, "hide-text" ); -XML_CONSTASCII_ACTION( sXML_dim, "dim" ); -XML_CONSTASCII_ACTION( sXML_sound, "sound" ); -XML_CONSTASCII_ACTION( sXML_play_full, "play-full" ); -XML_CONSTASCII_ACTION( sXML_path_id, "path-id" ); - -XML_CONSTASCII_ACTION( sXML_animations, "animations" ); - -XML_CONSTASCII_ACTION( sXML_kind, "kind" ); -XML_CONSTASCII_ACTION( sXML_start_angle, "start-angle" ); -XML_CONSTASCII_ACTION( sXML_cut, "cut" ); -XML_CONSTASCII_ACTION( sXML_arc, "arc" ); - -XML_CONSTASCII_ACTION( sXML_upright, "upright" ); -XML_CONSTASCII_ACTION( sXML_slant_x, "slant-x" ); -XML_CONSTASCII_ACTION( sXML_slant_y, "slant-y" ); -XML_CONSTASCII_ACTION( sXML_autosize, "autosize" ); -XML_CONSTASCII_ACTION( sXML_slant, "slant" ); -XML_CONSTASCII_ACTION( sXML_topcircle, "top-circle" ); -XML_CONSTASCII_ACTION( sXML_bottomcircle, "bottom-circle" ); -XML_CONSTASCII_ACTION( sXML_leftcircle, "left-circle" ); -XML_CONSTASCII_ACTION( sXML_rightcircle, "right-circle" ); -XML_CONSTASCII_ACTION( sXML_toparc, "top-arc" ); -XML_CONSTASCII_ACTION( sXML_bottomarc, "bottom-arc" ); -XML_CONSTASCII_ACTION( sXML_leftarc, "left-arc" ); -XML_CONSTASCII_ACTION( sXML_rightarc, "right-arc" ); -XML_CONSTASCII_ACTION( sXML_button1, "button1" ); -XML_CONSTASCII_ACTION( sXML_button2, "button2" ); -XML_CONSTASCII_ACTION( sXML_button3, "button3" ); -XML_CONSTASCII_ACTION( sXML_button4, "button4" ); - -XML_CONSTASCII_ACTION( sXML_caption_type, "caption-type" ); -XML_CONSTASCII_ACTION( sXML_caption_angle_type, "caption-angle-type" ); -XML_CONSTASCII_ACTION( sXML_caption_angle, "caption-angle" ); -XML_CONSTASCII_ACTION( sXML_caption_gap, "caption-gap" ); -XML_CONSTASCII_ACTION( sXML_caption_escape_direction, "caption-escape-direction" ); -XML_CONSTASCII_ACTION( sXML_caption_escape, "caption-escape" ); -XML_CONSTASCII_ACTION( sXML_caption_line_length, "caption-line-length" ); -XML_CONSTASCII_ACTION( sXML_caption_fit_line_length, "caption-fit-line-length" ); -XML_CONSTASCII_ACTION( sXML_free, "free" ); - -XML_CONSTASCII_ACTION( sXML_straight_line, "straight-line" ); -XML_CONSTASCII_ACTION( sXML_angled_line, "angled-line" ); -XML_CONSTASCII_ACTION( sXML_angled_connector_line, "angled-connector-line" ); - -XML_CONSTASCII_ACTION( sXML_data_source_has_labels, "data-source-has-labels" ); - -XML_CONSTASCII_ACTION( sXML_play, "play" ); -XML_CONSTASCII_ACTION( sXML_handout_master, "handout-master" ); - -XML_CONSTASCII_ACTION( sXML_escape_direction, "escape-direction" ); -XML_CONSTASCII_ACTION( sXML_glue_point, "glue-point" ); - -XML_CONSTASCII_ACTION( sXML_text_style_name, "text-style-name" ); - -XML_CONSTASCII_ACTION( sXML_sort_algorithm, "sort-algorithm" ); -XML_CONSTASCII_ACTION( sXML_roll_from_top, "roll-from-top" ); - -XML_CONSTASCII_ACTION( sXML_script_data, "script-data" ); -XML_CONSTASCII_ACTION( sXML_libraries, "libraries" ); -XML_CONSTASCII_ACTION( sXML_source_code, "source-code" ); -XML_CONSTASCII_ACTION( sXML_readonly, "readonly" ); - -XML_CONSTASCII_ACTION( sXML_page_continuation, "page-continuation" ); - -XML_CONSTASCII_ACTION( sXML_contains, "contains" ); -XML_CONSTASCII_ACTION( sXML_does_not_contain, "does-not-contain" ); -XML_CONSTASCII_ACTION( sXML_begins_with, "begins-with" ); -XML_CONSTASCII_ACTION( sXML_does_not_begin_with, "does-not-begin-with" ); -XML_CONSTASCII_ACTION( sXML_ends_with, "ends-with" ); -XML_CONSTASCII_ACTION( sXML_does_not_end_with, "does-not-end-with" ); - -#endif diff --git a/xmloff/inc/xmloff/txtimp.hxx b/xmloff/inc/xmloff/txtimp.hxx index cdfd1d9b34..c7349665e6 100644 --- a/xmloff/inc/xmloff/txtimp.hxx +++ b/xmloff/inc/xmloff/txtimp.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _XMLOFF_TEXTIMP_HXX_ -#define _XMLOFF_TEXTIMP_HXX_ +#ifndef XMLOFF_TEXTIMP_HXX +#define XMLOFF_TEXTIMP_HXX #include "sal/config.h" #include "xmloff/dllapi.h" @@ -33,13 +33,11 @@ #include <com/sun/star/uno/Reference.h> #include <map> -#include <vector> #include <memory> #include <boost/utility.hpp> +#include <boost/shared_ptr.hpp> #include <tools/list.hxx> -#include <xmloff/xmlictxt.hxx> -#include <xmloff/xmlimppr.hxx> #include <xmloff/xmltkmap.hxx> // functional.hxx is obsolete and should be replaced by its comphelper @@ -47,34 +45,44 @@ #include <comphelper/stl_types.hxx> #include <xmloff/uniref.hxx> + // --> OD 2008-04-25 #refactorlists# class XMLTextListsHelper; // <-- -#include <com/sun/star/text/XFormField.hpp> - - +class SvXMLImportContext; +class SvXMLTokenMap; +class SvXMLImportPropertyMapper; +class SvXMLNamespaceMap; class SvXMLImport; class SvXMLStylesContext; class XMLTextListBlockContext; class SvxXMLListStyleContext; class XMLPropStyleContext; class SvI18NMap; -class SvStringsDtor; class XMLSectionImportContext; class XMLFontStylesContext; template<class A> class XMLPropertyBackpatcher; class XMLEventsImportContext; +namespace xmloff { + struct ParsedRDFaAttributes; +} + namespace com { namespace sun { namespace star { -namespace text { class XText; class XTextCursor; class XTextRange; class XTextContent; } +namespace text { + class XText; + class XTextCursor; + class XTextRange; + class XTextContent; + class XFormField; +} namespace frame { class XModel; } namespace container { class XNameContainer; class XIndexReplace; class XNameAccess; } namespace beans { class XPropertySet; } namespace xml { namespace sax { class XAttributeList; } } namespace util { struct DateTime; } namespace lang { class XMultiServiceFactory; } -namespace ucb { class XAnyCompare; } } } } enum SwXMLTextElemTokens @@ -378,127 +386,13 @@ DECLARE_LIST( XMLSectionList_Impl, XMLSectionImportContext* ) class XMLOFF_DLLPUBLIC XMLTextImportHelper : public UniRefBase, private boost::noncopyable { - ::std::auto_ptr<SvXMLTokenMap> pTextElemTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextPElemTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextPAttrTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextFieldAttrTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextNumberedParagraphAttrTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextListBlockAttrTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextListBlockElemTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextFrameAttrTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextContourAttrTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextHyperlinkAttrTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextMasterPageElemTokenMap; - ::std::auto_ptr<SvStringsDtor> pPrevFrmNames; - ::std::auto_ptr<SvStringsDtor> pNextFrmNames; - - // --> OD 2008-04-25 #refactorlists# - ::std::auto_ptr<XMLTextListsHelper> mpTextListsHelper; - // <-- - - SvXMLImportContextRef xAutoStyles; - SvXMLImportContextRef xFontDecls; - - XMLSectionList_Impl aSectionList; - - UniReference < SvXMLImportPropertyMapper > xParaImpPrMap; - UniReference < SvXMLImportPropertyMapper > xTextImpPrMap; - UniReference < SvXMLImportPropertyMapper > xFrameImpPrMap; - UniReference < SvXMLImportPropertyMapper > xSectionImpPrMap; - UniReference < SvXMLImportPropertyMapper > xRubyImpPrMap; - - ::std::auto_ptr<SvI18NMap> pRenameMap; - // --> OD 2006-10-12 #i69629# - change and extend data structure: - // - data structure contains candidates of paragraph styles, which - // will be assigned to the outline style - // - data structure contains more than one candidate for each list level - // of the outline style -// ::rtl::OUString *pOutlineStyles; - ::std::vector< ::rtl::OUString >* mpOutlineStylesCandidates; - // <-- - - /// start ranges for open bookmarks - ::std::map< ::rtl::OUString, - // start range, xml:id - ::std::pair< - ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange>, - ::rtl::OUString>, - ::comphelper::UStringLess> aBookmarkStartRanges; - - typedef ::std::vector< ::rtl::OUString> BookmarkVector_t; - BookmarkVector_t aBookmarkVector; - - /// backpatcher for references to footnotes and endnotes - XMLPropertyBackpatcher<sal_Int16> * pFootnoteBackpatcher; - - /// backpatchers for references to sequences - XMLPropertyBackpatcher<sal_Int16> * pSequenceIdBackpatcher; - - XMLPropertyBackpatcher< ::rtl::OUString> * pSequenceNameBackpatcher; - - /// name of the last 'open' redline that started between paragraphs - ::rtl::OUString sOpenRedlineIdentifier; - - ::com::sun::star::uno::Reference < - ::com::sun::star::text::XText > xText; - ::com::sun::star::uno::Reference < - ::com::sun::star::text::XTextCursor > xCursor; - ::com::sun::star::uno::Reference < - ::com::sun::star::text::XTextRange > xCursorAsRange; - ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer > xParaStyles; - ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer > xTextStyles; - ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer > xNumStyles; - ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer > xFrameStyles; - ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer > xPageStyles; - ::com::sun::star::uno::Reference< - ::com::sun::star::container::XIndexReplace > xChapterNumbering; - ::com::sun::star::uno::Reference< - ::com::sun::star::container::XNameAccess > xTextFrames; - ::com::sun::star::uno::Reference< - ::com::sun::star::container::XNameAccess > xGraphics; - ::com::sun::star::uno::Reference< - ::com::sun::star::container::XNameAccess > xObjects; - ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory; - - SvXMLImport& rSvXMLImport; - - sal_Bool bInsertMode : 1; - sal_Bool bStylesOnlyMode : 1; - sal_Bool bBlockMode : 1; - sal_Bool bProgress : 1; - sal_Bool bOrganizerMode : 1; - sal_Bool bBodyContentStarted : 1; - - // #107848# - // One more flag to remember if we are inside a deleted redline section - sal_Bool bInsideDeleteContext : 1; - - SAL_DLLPRIVATE SvXMLTokenMap *_GetTextElemTokenMap(); - SAL_DLLPRIVATE SvXMLTokenMap *_GetTextPElemTokenMap(); - SAL_DLLPRIVATE SvXMLTokenMap *_GetTextPAttrTokenMap(); - SAL_DLLPRIVATE SvXMLTokenMap *_GetTextFrameAttrTokenMap(); - SAL_DLLPRIVATE SvXMLTokenMap *_GetTextContourAttrTokenMap(); - SAL_DLLPRIVATE SvXMLTokenMap *_GetTextHyperlinkAttrTokenMap(); - SAL_DLLPRIVATE SvXMLTokenMap *_GetTextMasterPageElemTokenMap(); - - // clean up backpatchers; to be called only by destructor - // Code is implemented in XMLPropertyBackpatcher.cxx - SAL_DLLPRIVATE void _FinitBackpatcher(); - - typedef ::std::pair< ::rtl::OUString, ::rtl::OUString> field_name_type_t; - typedef ::std::pair< ::rtl::OUString, ::rtl::OUString > field_param_t; - typedef ::std::vector< field_param_t > field_params_t; - typedef ::std::pair< field_name_type_t, field_params_t > field_stack_item_t; - typedef ::std::stack< field_stack_item_t > field_stack_t; - - field_stack_t aFieldStack; +private: + struct Impl; + ::std::auto_ptr<Impl> m_pImpl; + /// ugly, but implementation of this is in XMLPropertyBackpatcher.cxx + struct BackpatcherImpl; + ::boost::shared_ptr<BackpatcherImpl> m_pBackpatcherImpl; + ::boost::shared_ptr<BackpatcherImpl> MakeBackpatcherImpl(); protected: virtual SvXMLImportContext *CreateTableChildContext( @@ -515,46 +409,13 @@ protected: public: - const ::rtl::OUString sParaStyleName; - const ::rtl::OUString sCharStyleName; - const ::rtl::OUString sHeadingStyleName; - const ::rtl::OUString sNumberingLevel; - const ::rtl::OUString sNumberingStartValue; - const ::rtl::OUString sNumberingRules; - const ::rtl::OUString sParaIsNumberingRestart; - const ::rtl::OUString sNumberingIsNumber; - const ::rtl::OUString sCurrentPresentation; - const ::rtl::OUString sSequenceNumber; - const ::rtl::OUString sSourceName; - const ::rtl::OUString sChainNextName; - const ::rtl::OUString sChainPrevName; - const ::rtl::OUString sHyperLinkURL; - const ::rtl::OUString sHyperLinkName; - const ::rtl::OUString sHyperLinkTarget; - const ::rtl::OUString sUnvisitedCharStyleName; - const ::rtl::OUString sVisitedCharStyleName; - const ::rtl::OUString sTextFrame; - const ::rtl::OUString sPageDescName; - const ::rtl::OUString sServerMap; - const ::rtl::OUString sHyperLinkEvents; - const ::rtl::OUString sContent; - const ::rtl::OUString sServiceCombinedCharacters; - const ::rtl::OUString sNumberingStyleName; - // --> OD 2008-04-23 #refactorlists# - const ::rtl::OUString sPropNameDefaultListId; - const ::rtl::OUString sPropNameListId; - const ::rtl::OUString sOutlineLevel; //#outline level,add by zhaojianwei - // <-- - - ::rtl::OUString sCellParaStyleDefault; XMLTextImportHelper( - const ::com::sun::star::uno::Reference < - ::com::sun::star::frame::XModel>& rModel, + ::com::sun::star::uno::Reference < + ::com::sun::star::frame::XModel> const& rModel, SvXMLImport& rImport, - sal_Bool bInsertM = sal_False, sal_Bool bStylesOnlyM = sal_False, - sal_Bool bProgress = sal_False, - sal_Bool bBlockMode = sal_False, - sal_Bool bOrganizerMode = sal_False ); + bool const bInsertMode = false, bool const bStylesOnlyMode = false, + bool const bProgress = false, bool const bBlockMode = false, + bool const bOrganizerMode = false); ~XMLTextImportHelper(); @@ -575,36 +436,33 @@ public: ::com::sun::star::xml::sax::XAttributeList > & xAttrList, XMLTextType eType = XML_TEXT_TYPE_SHAPE ); - inline const SvXMLTokenMap& GetTextElemTokenMap(); - inline const SvXMLTokenMap& GetTextPElemTokenMap(); - inline const SvXMLTokenMap& GetTextPAttrTokenMap(); - inline const SvXMLTokenMap& GetTextFrameAttrTokenMap(); - inline const SvXMLTokenMap& GetTextContourAttrTokenMap(); - inline const SvXMLTokenMap& GetTextHyperlinkAttrTokenMap(); - inline const SvXMLTokenMap& GetTextMasterPageElemTokenMap(); + SvXMLTokenMap const& GetTextElemTokenMap(); + SvXMLTokenMap const& GetTextPElemTokenMap(); + SvXMLTokenMap const& GetTextPAttrTokenMap(); + SvXMLTokenMap const& GetTextFrameAttrTokenMap(); + SvXMLTokenMap const& GetTextContourAttrTokenMap(); + SvXMLTokenMap const& GetTextHyperlinkAttrTokenMap(); + SvXMLTokenMap const& GetTextMasterPageElemTokenMap(); const SvXMLTokenMap& GetTextNumberedParagraphAttrTokenMap(); const SvXMLTokenMap& GetTextListBlockAttrTokenMap(); const SvXMLTokenMap& GetTextListBlockElemTokenMap(); const SvXMLTokenMap& GetTextFieldAttrTokenMap(); // impl: txtfldi.cxx - ::com::sun::star::uno::Reference < - ::com::sun::star::text::XText > & GetText() { return xText; } - ::com::sun::star::uno::Reference < - ::com::sun::star::text::XTextCursor > & GetCursor() { return xCursor; } - ::com::sun::star::uno::Reference < - ::com::sun::star::text::XTextRange > & GetCursorAsRange() - { - return xCursorAsRange; - } + ::com::sun::star::uno::Reference< + ::com::sun::star::text::XText > & GetText(); + ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextCursor > & GetCursor(); + ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & GetCursorAsRange(); - sal_Bool IsInsertMode() { return bInsertMode; } - sal_Bool IsStylesOnlyMode() { return bStylesOnlyMode; } - sal_Bool IsBlockMode() { return bBlockMode; } - sal_Bool IsOrganizerMode() { return bOrganizerMode; } - sal_Bool IsProgress() { return bProgress; } + bool IsInsertMode() const; + bool IsStylesOnlyMode() const; + bool IsBlockMode() const; + bool IsOrganizerMode() const; + bool IsProgress() const; - XMLSectionList_Impl& GetSectionList() { return aSectionList; } + XMLSectionList_Impl & GetSectionList(); ::rtl::OUString ConvertStarFonts( const ::rtl::OUString& rChars, const ::rtl::OUString& rStyleName, @@ -686,41 +544,25 @@ public: XMLPropStyleContext* FindPageMaster( const ::rtl::OUString& rName ) const; - const ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer>& GetParaStyles() const - { - return xParaStyles; - } - - const ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer>& GetTextStyles() const - { - return xTextStyles; - } - - const ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer>& GetNumberingStyles() const - { - return xNumStyles; - } - - const ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer>& GetFrameStyles() const - { - return xFrameStyles; - } - - const ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer>& GetPageStyles() const - { - return xPageStyles; - } + const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameContainer> & GetParaStyles() const; + + const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameContainer> & GetTextStyles() const; + + const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameContainer> & + GetNumberingStyles() const; const ::com::sun::star::uno::Reference< - ::com::sun::star::container::XIndexReplace >& GetChapterNumbering() const - { - return xChapterNumbering; - } + ::com::sun::star::container::XNameContainer> & GetFrameStyles() const; + + const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameContainer> & GetPageStyles() const; + + const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XIndexReplace > & + GetChapterNumbering() const; sal_Bool HasFrameByName( const ::rtl::OUString& rName ) const; void ConnectFrameChains( const ::rtl::OUString& rFrmName, @@ -728,16 +570,17 @@ public: const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >& rFrmPropSet ); - const UniReference < SvXMLImportPropertyMapper >& - GetParaImportPropertySetMapper() const { return xParaImpPrMap; } - const UniReference < SvXMLImportPropertyMapper >& - GetTextImportPropertySetMapper() const { return xTextImpPrMap; } - const UniReference < SvXMLImportPropertyMapper >& - GetFrameImportPropertySetMapper() const { return xFrameImpPrMap; } - const UniReference < SvXMLImportPropertyMapper >& - GetSectionImportPropertySetMapper() const { return xSectionImpPrMap; } - const UniReference < SvXMLImportPropertyMapper >& - GetRubyImportPropertySetMapper() const { return xRubyImpPrMap; } + UniReference< SvXMLImportPropertyMapper > const& + GetParaImportPropertySetMapper() const; + UniReference< SvXMLImportPropertyMapper > const& + GetTextImportPropertySetMapper() const; + UniReference< SvXMLImportPropertyMapper > const& + GetFrameImportPropertySetMapper() const; + UniReference< SvXMLImportPropertyMapper > const& + GetSectionImportPropertySetMapper() const; + UniReference< SvXMLImportPropertyMapper > const& + GetRubyImportPropertySetMapper() const; + static SvXMLImportPropertyMapper *CreateShapeExtPropMapper(SvXMLImport&); static SvXMLImportPropertyMapper *CreateCharExtPropMapper(SvXMLImport&, XMLFontStylesContext *pFontDecls = NULL); static SvXMLImportPropertyMapper *CreateParaExtPropMapper(SvXMLImport&, XMLFontStylesContext *pFontDecls = NULL); @@ -757,14 +600,18 @@ public: const ::rtl::OUString sName, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange> & rRange, - const ::rtl::OUString & i_rXmlId); + ::rtl::OUString const& i_rXmlId, + ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > & + i_rpRDFaAttributes); /// process the start of a range reference sal_Bool FindAndRemoveBookmarkStartRange( const ::rtl::OUString sName, ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange> & o_rRange, - ::rtl::OUString& o_rXmlId); + ::rtl::OUString & o_rXmlId, + ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > & + o_rpRDFaAttributes); ::rtl::OUString FindActiveBookmarkName(); ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > GetRangeFor(::rtl::OUString &sName); @@ -889,13 +736,13 @@ public: // #107848# // Access methods to the inside_deleted_section flag (redlining) - void SetInsideDeleteContext(sal_Bool bNew) { bInsideDeleteContext = bNew; } - sal_Bool IsInsideDeleteContext() const { return bInsideDeleteContext; } + void SetInsideDeleteContext(bool const bNew); + bool IsInsideDeleteContext() const; - SvXMLImport& GetXMLImport() { return rSvXMLImport;} + SvXMLImport & GetXMLImport(); // --> OD 2008-04-25 #refactorlists# - XMLTextListsHelper& GetTextListHelper() { return *mpTextListsHelper; } + XMLTextListsHelper & GetTextListHelper(); // <-- // forwards to TextListHelper; these are used in many places @@ -903,62 +750,9 @@ public: void PushListContext(XMLTextListBlockContext *i_pListBlock = 0); /// pop the list context stack void PopListContext(); -}; - -inline const SvXMLTokenMap& XMLTextImportHelper::GetTextElemTokenMap() -{ - if( !pTextElemTokenMap.get() ) - pTextElemTokenMap.reset( _GetTextElemTokenMap() ); - - return *pTextElemTokenMap; -} - -inline const SvXMLTokenMap& XMLTextImportHelper::GetTextPElemTokenMap() -{ - if( !pTextPElemTokenMap.get() ) - pTextPElemTokenMap.reset( _GetTextPElemTokenMap() ); - - return *pTextPElemTokenMap; -} - -inline const SvXMLTokenMap& XMLTextImportHelper::GetTextPAttrTokenMap() -{ - if( !pTextPAttrTokenMap.get() ) - pTextPAttrTokenMap.reset( _GetTextPAttrTokenMap() ); - - return *pTextPAttrTokenMap; -} - -inline const SvXMLTokenMap& XMLTextImportHelper::GetTextFrameAttrTokenMap() -{ - if( !pTextFrameAttrTokenMap.get() ) - pTextFrameAttrTokenMap.reset( _GetTextFrameAttrTokenMap() ); - - return *pTextFrameAttrTokenMap; -} - -inline const SvXMLTokenMap& XMLTextImportHelper::GetTextContourAttrTokenMap() -{ - if( !pTextContourAttrTokenMap.get() ) - pTextContourAttrTokenMap.reset( _GetTextContourAttrTokenMap() ); - - return *pTextContourAttrTokenMap; -} -inline const SvXMLTokenMap& XMLTextImportHelper::GetTextHyperlinkAttrTokenMap() -{ - if( !pTextHyperlinkAttrTokenMap.get() ) - pTextHyperlinkAttrTokenMap.reset( _GetTextHyperlinkAttrTokenMap() ); - - return *pTextHyperlinkAttrTokenMap; -} - -inline const SvXMLTokenMap& XMLTextImportHelper::GetTextMasterPageElemTokenMap() -{ - if( !pTextMasterPageElemTokenMap.get() ) - pTextMasterPageElemTokenMap.reset( _GetTextMasterPageElemTokenMap() ); - - return *pTextMasterPageElemTokenMap; -} + void SetCellParaStyleDefault(::rtl::OUString const& rNewValue); + ::rtl::OUString const& GetCellParaStyleDefault(); +}; #endif diff --git a/xmloff/inc/xmloff/xmlimp.hxx b/xmloff/inc/xmloff/xmlimp.hxx index d7c17628d1..584a573e23 100644 --- a/xmloff/inc/xmloff/xmlimp.hxx +++ b/xmloff/inc/xmloff/xmlimp.hxx @@ -77,6 +77,10 @@ class XMLErrors; class StyleMap; class String; +namespace xmloff { + class RDFaImportHelper; +} + #define IMPORT_META 0x0001 #define IMPORT_STYLES 0x0002 #define IMPORT_MASTERSTYLES 0x0004 @@ -432,6 +436,9 @@ public: ::rtl::OUString const & i_rContent, ::rtl::OUString const & i_rDatatype); + /// do not dllexport this; only for advanced cases (bookmark-start) + SAL_DLLPRIVATE ::xmloff::RDFaImportHelper & GetRDFaImportHelper(); + // #i31958# XForms helper method // (to be implemented by applications suporting XForms) virtual void initXForms(); diff --git a/xmloff/prj/d.lst b/xmloff/prj/d.lst index 0b51b0dd97..7784bca047 100644 --- a/xmloff/prj/d.lst +++ b/xmloff/prj/d.lst @@ -21,7 +21,6 @@ mkdir: %_DEST%\inc%_EXT%\xmloff ..\inc\xmloff\xmlement.hxx %_DEST%\inc%_EXT%\xmloff\xmlement.hxx ..\inc\xmloff\xmlictxt.hxx %_DEST%\inc%_EXT%\xmloff\xmlictxt.hxx ..\inc\xmloff\xmlimp.hxx %_DEST%\inc%_EXT%\xmloff\xmlimp.hxx -..\inc\xmlkywd.hxx %_DEST%\inc%_EXT%\xmloff\xmlkywd.hxx ..\inc\xmloff\xmlmetae.hxx %_DEST%\inc%_EXT%\xmloff\xmlmetae.hxx ..\inc\xmloff\xmlmetai.hxx %_DEST%\inc%_EXT%\xmloff\xmlmetai.hxx ..\inc\xmloff\xmlscripti.hxx %_DEST%\inc%_EXT%\xmloff\xmlscripti.hxx diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index b566acb259..534bfddc42 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -649,7 +649,12 @@ lcl_TableData lcl_getDataForLocalTable( SchXMLExportHelper::tDataSequenceCont::const_iterator aIt( aBegin ); size_t nMaxSequenceLength( lcl_getMaxSequenceLength( aSequencesToExport )); - nMaxSequenceLength = std::max( nMaxSequenceLength, size_t( aSimpleCategories.getLength() ) ); + size_t nCategoriesLength( aSimpleCategories.getLength() ); + if( nCategoriesLength > nMaxSequenceLength ) + { + aSimpleCategories.realloc(nMaxSequenceLength);//#i110617# + nCategoriesLength = nMaxSequenceLength; + } size_t nNumColumns( bSeriesFromColumns ? nNumSequences : nMaxSequenceLength ); size_t nNumRows( bSeriesFromColumns ? nMaxSequenceLength : nNumSequences ); @@ -1084,6 +1089,7 @@ void SchXMLExportHelper::parseDocument( Reference< chart::XChartDocument >& rCha aDataProviderURL = OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ); } mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aDataProviderURL ); + mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); } OUString sChartType( xDiagram->getDiagramType() ); diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 55628c961a..86a6a3469c 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -1271,6 +1271,10 @@ void SchXMLAxisContext::CreateAxis() // set properties if( xProp.is()) { + // #i109879# the line color is black as default, in the model it is a light gray + xProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineColor" )), + uno::makeAny( COL_BLACK )); + xProp->setPropertyValue( rtl::OUString::createFromAscii( "DisplayLabels" ), aFalseBool ); // #88077# AutoOrigin 'on' is default diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index a5621b14c8..5a250142c6 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -39,7 +39,6 @@ #include <com/sun/star/chart2/XRegressionCurve.hpp> #include <com/sun/star/chart2/data/XDataSink.hpp> #include <com/sun/star/chart2/data/XDataReceiver.hpp> -#include <com/sun/star/chart2/data/XRangeXMLConversion.hpp> #include <com/sun/star/chart/ChartAxisAssign.hpp> #include <com/sun/star/chart/ChartSymbolType.hpp> @@ -78,15 +77,6 @@ using ::rtl::OUStringBuffer; namespace { -OUString lcl_ConvertRange( const ::rtl::OUString & rRange, const Reference< chart2::data::XDataProvider >& xDataProvider ) -{ - OUString aResult = rRange; - Reference< chart2::data::XRangeXMLConversion > xConversion( xDataProvider, uno::UNO_QUERY ); - if( xConversion.is()) - aResult = xConversion->convertRangeFromXML( rRange ); - return aResult; -} - class SchXMLDomain2Context : public SvXMLImportContext { private: @@ -232,7 +222,7 @@ void lcl_insertErrorBarLSequencesToMap( Reference< chart2::data::XLabeledDataSequence > lcl_createAndAddSequenceToSeries( const rtl::OUString& rRole , const rtl::OUString& rRange - , const Reference< chart2::data::XDataProvider >& xDataProvider + , const Reference< chart2::XChartDocument >& xChartDoc , const Reference< chart2::XDataSeries >& xSeries ) { Reference< chart2::data::XLabeledDataSequence > xLabeledSeq; @@ -240,27 +230,14 @@ Reference< chart2::data::XLabeledDataSequence > lcl_createAndAddSequenceToSeries Reference< chart2::data::XDataSource > xSeriesSource( xSeries,uno::UNO_QUERY ); Reference< chart2::data::XDataSink > xSeriesSink( xSeries, uno::UNO_QUERY ); - if( !(rRange.getLength() && xDataProvider.is() && xSeriesSource.is() && xSeriesSink.is()) ) + if( !(rRange.getLength() && xChartDoc.is() && xSeriesSource.is() && xSeriesSink.is()) ) return xLabeledSeq; // create a new sequence xLabeledSeq = SchXMLTools::GetNewLabeledDataSequence(); // set values at the new sequence - Reference< chart2::data::XDataSequence > xSeq; - try - { - xSeq.set( xDataProvider->createDataSequenceByRangeRepresentation( lcl_ConvertRange( rRange, xDataProvider ))); - SchXMLTools::setXMLRangePropertyAtDataSequence( xSeq, rRange ); - } - catch( const lang::IllegalArgumentException & ex ) - { - (void)ex; // avoid warning for pro build - OSL_ENSURE( false, ::rtl::OUStringToOString( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IllegalArgumentException caught, Message: " )) + - ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); - } - + Reference< chart2::data::XDataSequence > xSeq = SchXMLTools::CreateDataSequence( rRange, xChartDoc ); Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY ); if( xSeqProp.is()) xSeqProp->setPropertyValue(OUString::createFromAscii("Role"), uno::makeAny( rRole)); @@ -336,10 +313,6 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib bool bHasRange = false; bool bHasLabelRange = false; - Reference< chart2::data::XRangeXMLConversion > xRangeConversion; - if( mxNewDoc.is()) - xRangeConversion.set( mxNewDoc->getDataProvider(), uno::UNO_QUERY ); - for( sal_Int16 i = 0; i < nAttrCount; i++ ) { rtl::OUString sAttrName = xAttrList->getNameByIndex( i ); @@ -401,123 +374,93 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib try { OSL_ASSERT( mxNewDoc.is()); - if( mxNewDoc.is()) - { - if( m_rGlobalSeriesImportInfo.rbAllRangeAddressesAvailable && ! bHasRange ) - m_rGlobalSeriesImportInfo.rbAllRangeAddressesAvailable = sal_False; + if( m_rGlobalSeriesImportInfo.rbAllRangeAddressesAvailable && ! bHasRange ) + m_rGlobalSeriesImportInfo.rbAllRangeAddressesAvailable = sal_False; - Reference< chart2::data::XDataProvider > xDataProvider( mxNewDoc->getDataProvider() ); - if( xDataProvider.is()) + bool bIsCandleStick = maGlobalChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.CandleStickChartType")); + if( maSeriesChartTypeName.getLength() ) + { + bIsCandleStick = maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.CandleStickChartType")); + } + else + { + if( bIsCandleStick + && m_bStockHasVolume + && mnSeriesIndex == 0 ) { - bool bIsCandleStick = maGlobalChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.CandleStickChartType")); - if( maSeriesChartTypeName.getLength() ) - { - bIsCandleStick = maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.CandleStickChartType")); - } - else - { - if( bIsCandleStick - && m_bStockHasVolume - && mnSeriesIndex == 0 ) - { - maSeriesChartTypeName = OUString::createFromAscii( "com.sun.star.chart2.ColumnChartType" ); - bIsCandleStick = false; - } - else - { - maSeriesChartTypeName = maGlobalChartTypeName; - } - } - if( ! mrGlobalChartTypeUsedBySeries ) - mrGlobalChartTypeUsedBySeries = (maSeriesChartTypeName.equals( maGlobalChartTypeName )); - sal_Int32 nCoordinateSystemIndex = 0;//so far we can only import one coordinate system - m_xSeries.set( - mrImportHelper.GetNewDataSeries( mxNewDoc, nCoordinateSystemIndex, maSeriesChartTypeName, ! mrGlobalChartTypeUsedBySeries )); - Reference< chart2::data::XLabeledDataSequence > xLabeledSeq( - SchXMLTools::GetNewLabeledDataSequence()); - - if( bIsCandleStick ) - { - // set default color for range-line to black (before applying styles) - Reference< beans::XPropertySet > xSeriesProp( m_xSeries, uno::UNO_QUERY ); - if( xSeriesProp.is()) - xSeriesProp->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Color")), - uno::makeAny( sal_Int32( 0x000000 ))); // black - } - else if( maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.PieChartType"))) - { - //@todo: this property should be saved - Reference< beans::XPropertySet > xSeriesProp( m_xSeries, uno::UNO_QUERY ); - if( xSeriesProp.is()) - xSeriesProp->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VaryColorsByPoint")), - uno::makeAny( true )); - } + maSeriesChartTypeName = OUString::createFromAscii( "com.sun.star.chart2.ColumnChartType" ); + bIsCandleStick = false; + } + else + { + maSeriesChartTypeName = maGlobalChartTypeName; + } + } + if( ! mrGlobalChartTypeUsedBySeries ) + mrGlobalChartTypeUsedBySeries = (maSeriesChartTypeName.equals( maGlobalChartTypeName )); + sal_Int32 nCoordinateSystemIndex = 0;//so far we can only import one coordinate system + m_xSeries.set( + mrImportHelper.GetNewDataSeries( mxNewDoc, nCoordinateSystemIndex, maSeriesChartTypeName, ! mrGlobalChartTypeUsedBySeries )); + Reference< chart2::data::XLabeledDataSequence > xLabeledSeq( + SchXMLTools::GetNewLabeledDataSequence()); + + if( bIsCandleStick ) + { + // set default color for range-line to black (before applying styles) + Reference< beans::XPropertySet > xSeriesProp( m_xSeries, uno::UNO_QUERY ); + if( xSeriesProp.is()) + xSeriesProp->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Color")), + uno::makeAny( sal_Int32( 0x000000 ))); // black + } + else if( maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.PieChartType"))) + { + //@todo: this property should be saved + Reference< beans::XPropertySet > xSeriesProp( m_xSeries, uno::UNO_QUERY ); + if( xSeriesProp.is()) + xSeriesProp->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VaryColorsByPoint")), + uno::makeAny( true )); + } - // values - Reference< chart2::data::XDataSequence > xSeq; - if( bHasRange ) - try - { - xSeq.set( xDataProvider->createDataSequenceByRangeRepresentation( lcl_ConvertRange( m_aSeriesRange, xDataProvider ))); - SchXMLTools::setXMLRangePropertyAtDataSequence( xSeq, m_aSeriesRange ); - } - catch( const lang::IllegalArgumentException & ex ) - { - (void)ex; // avoid warning for pro build - OSL_ENSURE( false, ::rtl::OUStringToOString( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IllegalArgumentException caught, Message: " )) + - ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); - } + // values + Reference< chart2::data::XDataSequence > xSeq; + if( bHasRange ) + xSeq = SchXMLTools::CreateDataSequence( m_aSeriesRange, mxNewDoc ); - Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY ); - if( xSeqProp.is()) - { - OUString aMainRole( OUString::createFromAscii("values-y") ); - if( maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.BubbleChartType") ) ) - aMainRole = OUString::createFromAscii("values-size"); - xSeqProp->setPropertyValue(OUString::createFromAscii("Role"), uno::makeAny( aMainRole )); - } - xLabeledSeq->setValues( xSeq ); + Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY ); + if( xSeqProp.is()) + { + OUString aMainRole( OUString::createFromAscii("values-y") ); + if( maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.BubbleChartType") ) ) + aMainRole = OUString::createFromAscii("values-size"); + xSeqProp->setPropertyValue(OUString::createFromAscii("Role"), uno::makeAny( aMainRole )); + } + xLabeledSeq->setValues( xSeq ); - // register for setting local data if external data provider is not present - maPostponedSequences.insert( - tSchXMLLSequencesPerIndex::value_type( - tSchXMLIndexWithPart( m_rGlobalSeriesImportInfo.nCurrentDataIndex, SCH_XML_PART_VALUES ), xLabeledSeq )); + // register for setting local data if external data provider is not present + maPostponedSequences.insert( + tSchXMLLSequencesPerIndex::value_type( + tSchXMLIndexWithPart( m_rGlobalSeriesImportInfo.nCurrentDataIndex, SCH_XML_PART_VALUES ), xLabeledSeq )); - // label - if( bHasLabelRange ) - { - try - { - Reference< chart2::data::XDataSequence > xLabelSequence( - xDataProvider->createDataSequenceByRangeRepresentation( - lcl_ConvertRange( m_aSeriesLabelRange, xDataProvider ))); - xLabeledSeq->setLabel( xLabelSequence ); - SchXMLTools::setXMLRangePropertyAtDataSequence( xLabelSequence, m_aSeriesLabelRange ); - } - catch( const lang::IllegalArgumentException & ex ) - { - (void)ex; // avoid warning for pro build - OSL_ENSURE( false, ::rtl::OUStringToOString( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IllegalArgumentException caught, Message: " )) + - ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); - } - } + // label + if( bHasLabelRange ) + { + Reference< chart2::data::XDataSequence > xLabelSequence = + SchXMLTools::CreateDataSequence( m_aSeriesLabelRange, mxNewDoc ); + xLabeledSeq->setLabel( xLabelSequence ); + } - // Note: Even if we have no label, we have to register the label - // for creation, because internal data always has labels. If - // they don't exist in the original, auto-generated labels are - // used for the internal data. - maPostponedSequences.insert( - tSchXMLLSequencesPerIndex::value_type( - tSchXMLIndexWithPart( m_rGlobalSeriesImportInfo.nCurrentDataIndex, SCH_XML_PART_LABEL ), xLabeledSeq )); + // Note: Even if we have no label, we have to register the label + // for creation, because internal data always has labels. If + // they don't exist in the original, auto-generated labels are + // used for the internal data. + maPostponedSequences.insert( + tSchXMLLSequencesPerIndex::value_type( + tSchXMLIndexWithPart( m_rGlobalSeriesImportInfo.nCurrentDataIndex, SCH_XML_PART_LABEL ), xLabeledSeq )); - Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeq( &xLabeledSeq, 1 ); - Reference< chart2::data::XDataSink > xSink( m_xSeries, uno::UNO_QUERY_THROW ); - xSink->setData( aSeq ); - } - } + Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeq( &xLabeledSeq, 1 ); + Reference< chart2::data::XDataSink > xSink( m_xSeries, uno::UNO_QUERY_THROW ); + xSink->setData( aSeq ); } catch( uno::Exception & ex ) { @@ -662,15 +605,11 @@ void SchXMLSeries2Context::EndElement() } } - Reference< chart2::data::XDataProvider > xDataProvider; - if ( mxNewDoc.is() ) { - xDataProvider = mxNewDoc->getDataProvider(); - } for( std::vector< DomainInfo >::reverse_iterator aIt( aDomainInfos.rbegin() ); aIt!= aDomainInfos.rend(); ++aIt ) { DomainInfo aDomainInfo( *aIt ); Reference< chart2::data::XLabeledDataSequence > xLabeledSeq = - lcl_createAndAddSequenceToSeries( aDomainInfo.aRole, aDomainInfo.aRange, xDataProvider, m_xSeries ); + lcl_createAndAddSequenceToSeries( aDomainInfo.aRole, aDomainInfo.aRange, mxNewDoc, m_xSeries ); if( xLabeledSeq.is() ) { // register for setting local data if external data provider is not present diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index 6b4bb5097d..8c12781980 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -161,6 +161,11 @@ struct lcl_ApplyCellToData : public ::std::unary_function< SchXMLCell, void > ++m_nIndex; } + sal_Int32 getCurrentIndex() const + { + return m_nIndex; + } + private: Sequence< double > & m_rData; sal_Int32 m_nIndex; @@ -865,7 +870,12 @@ void SchXMLTableHelper::applyTableToInternalDataProvider( lcl_ApplyCellToComplexLabel( rRow.front(), aComplexRowDescriptions[nRow] ); // values - ::std::for_each( rRow.begin() + nColOffset, rRow.end(), lcl_ApplyCellToData( aDataInRows[nRow] )); + Sequence< double >& rTargetRow = aDataInRows[nRow]; + lcl_ApplyCellToData aApplyCellToData = ::std::for_each( rRow.begin() + nColOffset, rRow.end(), lcl_ApplyCellToData( rTargetRow ) ); + double fNaN = 0.0; + ::rtl::math::setNan( &fNaN ); + for( sal_Int32 nCurrentIndex = aApplyCellToData.getCurrentIndex(); nCurrentIndex<nNumColumns; nCurrentIndex++ ) + rTargetRow[nCurrentIndex] = fNaN;//#i110615# } } } diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index d88d8c7ee5..cd504d5485 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -133,20 +133,25 @@ sal_Int32 lcl_getBuildIDFromGenerator( const ::rtl::OUString& rGenerator ) return nBuildId; } +OUString lcl_ConvertRange( const ::rtl::OUString & rRange, const Reference< chart2::data::XDataProvider >& xDataProvider ) +{ + OUString aResult = rRange; + Reference< chart2::data::XRangeXMLConversion > xRangeConversion( xDataProvider, uno::UNO_QUERY ); + if( xRangeConversion.is()) + aResult = xRangeConversion->convertRangeFromXML( rRange ); + return aResult; +} + Reference< chart2::data::XDataSequence > lcl_createNewSequenceFromCachedXMLRange( const Reference< chart2::data::XDataSequence >& xSeq, const Reference< chart2::data::XDataProvider >& xDataProvider ) { Reference< chart2::data::XDataSequence > xRet; OUString aRange; - Reference< chart2::data::XRangeXMLConversion > xRangeConversion( xDataProvider, uno::UNO_QUERY ); - if( xRangeConversion.is() ) + if( xSeq.is() && SchXMLTools::getXMLRangePropertyFromDataSequence( xSeq, aRange, /* bClearProp = */ true ) ) { - if( xSeq.is() && SchXMLTools::getXMLRangePropertyFromDataSequence( xSeq, aRange, /* bClearProp = */ true ) ) - { - xRet.set( xDataProvider->createDataSequenceByRangeRepresentation( - xRangeConversion->convertRangeFromXML( aRange )) ); - SchXMLTools::copyProperties( Reference< beans::XPropertySet >( xSeq, uno::UNO_QUERY ), - Reference< beans::XPropertySet >( xRet, uno::UNO_QUERY )); - } + xRet.set( xDataProvider->createDataSequenceByRangeRepresentation( + lcl_ConvertRange( aRange, xDataProvider )) ); + SchXMLTools::copyProperties( Reference< beans::XPropertySet >( xSeq, uno::UNO_QUERY ), + Reference< beans::XPropertySet >( xRet, uno::UNO_QUERY )); } return xRet; } @@ -385,6 +390,53 @@ Reference< chart2::data::XLabeledDataSequence > GetNewLabeledDataSequence() return xResult; } +Reference< chart2::data::XDataSequence > CreateDataSequence( + const OUString & rRange, + const Reference< chart2::XChartDocument >& xChartDoc ) +{ + Reference< chart2::data::XDataSequence > xRet; + + if( !xChartDoc.is() ) + { + DBG_ERROR( "need a chart document" ); + return xRet; + } + + Reference< chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider() ); + if( !xDataProvider.is() ) + { + DBG_ERROR( "need a data provider" ); + return xRet; + } + + try + { + xRet.set( xDataProvider->createDataSequenceByRangeRepresentation( lcl_ConvertRange( rRange, xDataProvider ))); + SchXMLTools::setXMLRangePropertyAtDataSequence( xRet, rRange ); + } + catch( const lang::IllegalArgumentException & ) + { + DBG_ERROR( "could not create data sequence" ); + } + + if( !xRet.is() && !xChartDoc->hasInternalDataProvider() ) + { + //#i103911# switch to internal data in case the parent cannot provide the requested data + xChartDoc->createInternalDataProvider( sal_True /* bCloneExistingData */ ); + xDataProvider = xChartDoc->getDataProvider(); + try + { + xRet.set( xDataProvider->createDataSequenceByRangeRepresentation( lcl_ConvertRange( rRange, xDataProvider ))); + SchXMLTools::setXMLRangePropertyAtDataSequence( xRet, rRange ); + } + catch( const lang::IllegalArgumentException & ) + { + DBG_ERROR( "could not create data sequence" ); + } + } + return xRet; +} + void CreateCategories( const uno::Reference< chart2::data::XDataProvider > & xDataProvider, const uno::Reference< chart2::XChartDocument > & xNewDoc, diff --git a/xmloff/source/chart/SchXMLTools.hxx b/xmloff/source/chart/SchXMLTools.hxx index d66c125e0c..8e797a6fa0 100644 --- a/xmloff/source/chart/SchXMLTools.hxx +++ b/xmloff/source/chart/SchXMLTools.hxx @@ -87,6 +87,11 @@ namespace SchXMLTools ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > GetNewLabeledDataSequence(); + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > CreateDataSequence( + const ::rtl::OUString& rRange, + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XChartDocument >& xChartDoc ); + void CreateCategories( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > & xDataProvider, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > & xNewDoc, diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx index e755b287d3..e88cb6b84b 100644 --- a/xmloff/source/core/RDFaExportHelper.cxx +++ b/xmloff/source/core/RDFaExportHelper.cxx @@ -95,11 +95,6 @@ RDFaExportHelper::RDFaExportHelper(SvXMLExport & i_rExport) OSL_ENSURE(xRS.is(), "AddRDFa: model is no rdf::XRepositorySupplier"); if (!xRS.is()) throw uno::RuntimeException(); m_xRepository.set(xRS->getRDFRepository(), uno::UNO_QUERY_THROW); - - const uno::Reference<rdf::XURI> xLabel( - rdf::URI::createKnown(m_rExport.GetComponentContext(), - rdf::URIs::RDFS_LABEL)); - m_RDFsLabel = xLabel->getStringValue(); } ::rtl::OUString @@ -128,19 +123,21 @@ RDFaExportHelper::AddRDFa( { try { - uno::Sequence<rdf::Statement> stmts( - m_xRepository->getStatementRDFa(i_xMetadatable) ); + beans::Pair< uno::Sequence<rdf::Statement>, sal_Bool > const + RDFaResult( m_xRepository->getStatementRDFa(i_xMetadatable) ); + + uno::Sequence<rdf::Statement> const & rStatements( RDFaResult.First ); - if (0 == stmts.getLength()) + if (0 == rStatements.getLength()) { return; // no RDFa } // all stmts have the same subject, so we only handle first one - const uno::Reference<rdf::XURI> xSubjectURI(stmts[0].Subject, - uno::UNO_QUERY); - const uno::Reference<rdf::XBlankNode> xSubjectBNode(stmts[0].Subject, + const uno::Reference<rdf::XURI> xSubjectURI(rStatements[0].Subject, uno::UNO_QUERY); + const uno::Reference<rdf::XBlankNode> xSubjectBNode( + rStatements[0].Subject, uno::UNO_QUERY); if (!xSubjectURI.is() && !xSubjectBNode.is()) { throw uno::RuntimeException(); @@ -154,47 +151,31 @@ RDFaExportHelper::AddRDFa( .makeStringAndClear() ); - rdf::Statement* const iter - ( ::std::partition( ::comphelper::stl_begin(stmts), - ::comphelper::stl_end(stmts), - ::boost::bind(&::rtl::OUString::equals, m_RDFsLabel, - ::boost::bind(&rdf::XNode::getStringValue, - ::boost::bind(&rdf::Statement::Predicate, _1))) ) ); - - if (iter != ::comphelper::stl_end(stmts)) + const uno::Reference<rdf::XLiteral> xContent( + rStatements[0].Object, uno::UNO_QUERY_THROW ); + const uno::Reference<rdf::XURI> xDatatype(xContent->getDatatype()); + if (xDatatype.is()) { - // from iter to end, all stmts should have same object - const uno::Reference<rdf::XLiteral> xContent( - (*iter).Object, uno::UNO_QUERY_THROW ); - const uno::Reference<rdf::XURI> xDatatype(xContent->getDatatype()); - if (xDatatype.is()) - { - const ::rtl::OUString datatype( - makeCURIE(&m_rExport, xDatatype) ); - m_rExport.AddAttribute(XML_NAMESPACE_XHTML, - token::XML_DATATYPE, datatype); - } - if (iter != ::comphelper::stl_begin(stmts)) // there is rdfs:label - { - m_rExport.AddAttribute(XML_NAMESPACE_XHTML, token::XML_CONTENT, - xContent->getValue()); - } + const ::rtl::OUString datatype( + makeCURIE(&m_rExport, xDatatype) ); + m_rExport.AddAttribute(XML_NAMESPACE_XHTML, + token::XML_DATATYPE, datatype); } - else + if (RDFaResult.Second) // there is xhtml:content { - OSL_ENSURE(false,"invalid RDFa: every property is rdfs:label"); - return; + m_rExport.AddAttribute(XML_NAMESPACE_XHTML, token::XML_CONTENT, + xContent->getValue()); } ::rtl::OUStringBuffer property; ::comphelper::intersperse( ::boost::make_transform_iterator( - iter, // omit RDFsLabel predicates! + ::comphelper::stl_begin(rStatements), ::boost::bind(&makeCURIE, &m_rExport, ::boost::bind(&rdf::Statement::Predicate, _1))), // argh, this must be the same type :( ::boost::make_transform_iterator( - ::comphelper::stl_end(stmts), + ::comphelper::stl_end(rStatements), ::boost::bind(&makeCURIE, &m_rExport, ::boost::bind(&rdf::Statement::Predicate, _1))), ::comphelper::OUStringBufferAppender(property), diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx index 4257f36c33..a217b3115e 100644 --- a/xmloff/source/core/RDFaImportHelper.cxx +++ b/xmloff/source/core/RDFaImportHelper.cxx @@ -126,28 +126,39 @@ public: void InsertRDFaEntry(struct RDFaEntry const & i_rEntry); }; -/** store metadatable object and its RDFa attributes */ -struct SAL_DLLPRIVATE RDFaEntry +/** store parsed RDFa attributes */ +struct SAL_DLLPRIVATE ParsedRDFaAttributes { - uno::Reference<rdf::XMetadatable> m_xObject; ::rtl::OUString m_About; ::std::vector< ::rtl::OUString > m_Properties; ::rtl::OUString m_Content; ::rtl::OUString m_Datatype; - RDFaEntry(uno::Reference<rdf::XMetadatable> i_xObject, + ParsedRDFaAttributes( ::rtl::OUString const & i_rAbout, ::std::vector< ::rtl::OUString > const & i_rProperties, ::rtl::OUString const & i_rContent, ::rtl::OUString const & i_rDatatype) - : m_xObject(i_xObject) - , m_About(i_rAbout) + : m_About(i_rAbout) , m_Properties(i_rProperties) , m_Content(i_rContent) , m_Datatype(i_rDatatype) { } }; +/** store metadatable object and its RDFa attributes */ +struct SAL_DLLPRIVATE RDFaEntry +{ + uno::Reference<rdf::XMetadatable> m_xObject; + ::boost::shared_ptr<ParsedRDFaAttributes> m_pRDFaAttributes; + + RDFaEntry(uno::Reference<rdf::XMetadatable> const & i_xObject, + ::boost::shared_ptr<ParsedRDFaAttributes> const& i_pRDFaAttributes) + : m_xObject(i_xObject) + , m_pRDFaAttributes(i_pRDFaAttributes) + { } +}; + //////////////////////////////////////////////////////////////////////////// @@ -344,7 +355,7 @@ void RDFaInserter::InsertRDFaEntry( if (!i_rEntry.m_xObject.is()) return; const uno::Reference< rdf::XResource > xSubject( - MakeResource( i_rEntry.m_About ) ); + MakeResource( i_rEntry.m_pRDFaAttributes->m_About ) ); if (!xSubject.is()) { return; // invalid @@ -352,13 +363,15 @@ void RDFaInserter::InsertRDFaEntry( ::comphelper::SequenceAsVector< uno::Reference< rdf::XURI > > predicates; - predicates.reserve(i_rEntry.m_Properties.size()); + predicates.reserve(i_rEntry.m_pRDFaAttributes->m_Properties.size()); ::std::remove_copy_if( - ::boost::make_transform_iterator(i_rEntry.m_Properties.begin(), + ::boost::make_transform_iterator( + i_rEntry.m_pRDFaAttributes->m_Properties.begin(), ::boost::bind(&RDFaInserter::MakeURI, this, _1)), // argh, this must be the same type :( - ::boost::make_transform_iterator(i_rEntry.m_Properties.end(), + ::boost::make_transform_iterator( + i_rEntry.m_pRDFaAttributes->m_Properties.end(), ::boost::bind(&RDFaInserter::MakeURI, this, _1)), ::std::back_inserter(predicates), ref_is_null() ); @@ -375,9 +388,9 @@ void RDFaInserter::InsertRDFaEntry( } uno::Reference<rdf::XURI> xDatatype; - if (i_rEntry.m_Datatype.getLength()) + if (i_rEntry.m_pRDFaAttributes->m_Datatype.getLength()) { - xDatatype = MakeURI( i_rEntry.m_Datatype ); + xDatatype = MakeURI( i_rEntry.m_pRDFaAttributes->m_Datatype ); } try @@ -386,7 +399,8 @@ void RDFaInserter::InsertRDFaEntry( // this must be done _after_ importing the whole XML file, // to prevent collision between generated ids and ids in the file m_xRepository->setStatementRDFa(xSubject, predicates.getAsConstList(), - i_rEntry.m_xObject, i_rEntry.m_Content, xDatatype); + i_rEntry.m_xObject, + i_rEntry.m_pRDFaAttributes->m_Content, xDatatype); } catch (uno::Exception &) { @@ -405,9 +419,8 @@ RDFaImportHelper::~RDFaImportHelper() { } -void -RDFaImportHelper::AddRDFa( - uno::Reference<rdf::XMetadatable> i_xObject, +::boost::shared_ptr<ParsedRDFaAttributes> +RDFaImportHelper::ParseRDFa( ::rtl::OUString const & i_rAbout, ::rtl::OUString const & i_rProperty, ::rtl::OUString const & i_rContent, @@ -416,25 +429,58 @@ RDFaImportHelper::AddRDFa( if (!i_rProperty.getLength()) { OSL_TRACE("AddRDFa: invalid input: xhtml:property empty"); - return; - } - if (!i_xObject.is()) - { - OSL_ENSURE(false, "AddRDFa: invalid arg: null textcontent"); - return; + return ::boost::shared_ptr<ParsedRDFaAttributes>(); } // must parse CURIEs here: need namespace declaration context RDFaReader reader(GetImport()); const ::rtl::OUString about( reader.ReadURIOrSafeCURIE(i_rAbout) ); - if (!about.getLength()) return; + if (!about.getLength()) { + return ::boost::shared_ptr<ParsedRDFaAttributes>(); + } const ::std::vector< ::rtl::OUString > properties( reader.ReadCURIEs(i_rProperty) ); - if (!properties.size()) return; + if (!properties.size()) { + return ::boost::shared_ptr<ParsedRDFaAttributes>(); + } const ::rtl::OUString datatype( i_rDatatype.getLength() ? reader.ReadCURIE(i_rDatatype) : ::rtl::OUString() ); - m_RDFaEntries.push_back(RDFaEntry(i_xObject, - about, properties, i_rContent, datatype)); + return ::boost::shared_ptr<ParsedRDFaAttributes>( + new ParsedRDFaAttributes(about, properties, i_rContent, datatype)); +} + +void +RDFaImportHelper::AddRDFa( + uno::Reference<rdf::XMetadatable> const & i_xObject, + ::boost::shared_ptr<ParsedRDFaAttributes> & i_pRDFaAttributes) +{ + if (!i_xObject.is()) + { + OSL_ENSURE(false, "AddRDFa: invalid arg: null textcontent"); + return; + } + if (!i_pRDFaAttributes.get()) + { + OSL_ENSURE(false, "AddRDFa: invalid arg: null RDFa attributes"); + return; + } + m_RDFaEntries.push_back(RDFaEntry(i_xObject, i_pRDFaAttributes)); +} + +void +RDFaImportHelper::ParseAndAddRDFa( + uno::Reference<rdf::XMetadatable> const & i_xObject, + ::rtl::OUString const & i_rAbout, + ::rtl::OUString const & i_rProperty, + ::rtl::OUString const & i_rContent, + ::rtl::OUString const & i_rDatatype) +{ + ::boost::shared_ptr<ParsedRDFaAttributes> pAttributes( + ParseRDFa(i_rAbout, i_rProperty, i_rContent, i_rDatatype) ); + if (pAttributes.get()) + { + AddRDFa(i_xObject, pAttributes); + } } void RDFaImportHelper::InsertRDFa( diff --git a/xmloff/source/core/makefile.mk b/xmloff/source/core/makefile.mk index b881f9610f..4d663d3218 100644 --- a/xmloff/source/core/makefile.mk +++ b/xmloff/source/core/makefile.mk @@ -38,12 +38,6 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk .INCLUDE: $(PRJ)$/util$/makefile.pmk -# --- to build xmlkywd.obj in obj, too ----------------------------- - -OBJFILES = $(OBJ)$/xmlkywd.obj -LIB2TARGET =$(LB)$/xmlkywd.lib -LIB2OBJFILES =$(OBJFILES) - # --- Files -------------------------------------------------------- SLOFILES = \ @@ -59,7 +53,6 @@ SLOFILES = \ $(SLO)$/xmlexp.obj \ $(SLO)$/xmlictxt.obj \ $(SLO)$/xmlimp.obj \ - $(SLO)$/xmlkywd.obj \ $(SLO)$/xmltkmap.obj \ $(SLO)$/xmltoken.obj \ $(SLO)$/xmluconv.obj \ diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index dda82a237f..e128bfc556 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -38,7 +38,6 @@ #include <xmloff/nmspmap.hxx> #include <xmloff/xmluconv.hxx> #include "xmlnmspe.hxx" -#include "xmlkywd.hxx" #include <xmloff/xmltoken.hxx> #include <xmloff/XMLFontStylesContext.hxx> #include <xmloff/xmlictxt.hxx> @@ -110,6 +109,7 @@ sal_Char __READONLY_DATA sXML_np__number[] = "_number"; sal_Char __READONLY_DATA sXML_np__svg[] = "_svg"; sal_Char __READONLY_DATA sXML_np__chart[] = "_chart"; sal_Char __READONLY_DATA sXML_np__math[] = "_math"; +sal_Char __READONLY_DATA sXML_np__form[] = "_form"; sal_Char __READONLY_DATA sXML_np__script[] = "_script"; sal_Char __READONLY_DATA sXML_np__config[] = "_config"; sal_Char __READONLY_DATA sXML_np__db[] = "_db"; @@ -293,7 +293,7 @@ void SvXMLImport::_InitCtor() mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__math) ), GetXMLToken(XML_N_MATH), XML_NAMESPACE_MATH ); - mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_namespace_form) ), + mpNamespaceMap->Add(OUString(RTL_CONSTASCII_USTRINGPARAM( sXML_np__form )), GetXMLToken(XML_N_FORM), XML_NAMESPACE_FORM ); mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__script) ), @@ -675,7 +675,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName, } } else if( ( rAttrName.getLength() >= 5 ) && - ( rAttrName.compareToAscii( sXML_xmlns, 5 ) == 0 ) && + ( rAttrName.compareTo( GetXMLToken(XML_XMLNS), 5 ) == 0 ) && ( rAttrName.getLength() == 5 || ':' == rAttrName[5] ) ) { if( !pRewindMap ) @@ -1985,6 +1985,16 @@ void SvXMLImport::SetXmlId(uno::Reference<uno::XInterface> const & i_xIfc, } } +SAL_DLLPRIVATE ::xmloff::RDFaImportHelper & +SvXMLImport::GetRDFaImportHelper() +{ + if (!mpImpl->mpRDFaHelper.get()) + { + mpImpl->mpRDFaHelper.reset( new ::xmloff::RDFaImportHelper(*this) ); + } + return *mpImpl->mpRDFaHelper; +} + void SvXMLImport::AddRDFa(uno::Reference<rdf::XMetadatable> i_xObject, ::rtl::OUString const & i_rAbout, @@ -1994,11 +2004,8 @@ SvXMLImport::AddRDFa(uno::Reference<rdf::XMetadatable> i_xObject, { // N.B.: we only get called if i_xObject had xhtml:about attribute // (an empty attribute value is valid) - if (!mpImpl->mpRDFaHelper.get()) - { - mpImpl->mpRDFaHelper.reset( new ::xmloff::RDFaImportHelper(*this) ); - } - mpImpl->mpRDFaHelper->AddRDFa(i_xObject, + ::xmloff::RDFaImportHelper & rRDFaHelper( GetRDFaImportHelper() ); + rRDFaHelper.ParseAndAddRDFa(i_xObject, i_rAbout, i_rProperty, i_rContent, i_rDatatype); } diff --git a/xmloff/source/core/xmlkywd.cxx b/xmloff/source/core/xmlkywd.cxx deleted file mode 100644 index 78203ee781..0000000000 --- a/xmloff/source/core/xmlkywd.cxx +++ /dev/null @@ -1,38 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmloff.hxx" - -#ifndef _XMLOFF_XMLKYWD_HXX -#define XML_DEFINE_KEYWORDS -#include "xmlkywd.hxx" -#undef XML_DEFINE_KEYWORDS -#endif - - - diff --git a/xmloff/source/draw/XMLReplacementImageContext.cxx b/xmloff/source/draw/XMLReplacementImageContext.cxx index a8d1f96d21..e6f079dbfe 100644 --- a/xmloff/source/draw/XMLReplacementImageContext.cxx +++ b/xmloff/source/draw/XMLReplacementImageContext.cxx @@ -33,7 +33,6 @@ #include <xmloff/xmlimp.hxx> #include <xmloff/xmltoken.hxx> #include "xmlnmspe.hxx" -#include "xmlkywd.hxx" #include <xmloff/nmspmap.hxx> #include <xmloff/XMLBase64ImportContext.hxx> #include "XMLReplacementImageContext.hxx" diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index 248f98800a..068f9c83c7 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -323,8 +323,9 @@ const XMLPropertyMapEntry aXMLSDPresPageProps[] = DPMAP( "FillStyle", XML_NAMESPACE_DRAW, XML_FILL, XML_SD_TYPE_FILLSTYLE, 0 ), DPMAP( "FillColor", XML_NAMESPACE_DRAW, XML_FILL_COLOR, XML_TYPE_COLOR, 0 ), DPMAP( "FillGradientName", XML_NAMESPACE_DRAW, XML_FILL_GRADIENT_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLGRADIENTNAME ), - DPMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER16, 0 ), + DPMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER, 0 ), DPMAP( "FillHatchName", XML_NAMESPACE_DRAW, XML_FILL_HATCH_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLHATCHNAME ), + GMAP( "FillBackground", XML_NAMESPACE_DRAW, XML_FILL_HATCH_SOLID, XML_TYPE_BOOL, 0 ), DPMAP( "FillBitmapName", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLBITMAPNAME ), DPMAP( "FillTransparenceGradientName", XML_NAMESPACE_DRAW, XML_OPACITY_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLTRANSNAME ), DPMAP( "FillBitmapSizeX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ), diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index a2eb587a2a..b56bf8b93f 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -27,7 +27,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" + +#include <memory> + #include "unointerfacetouniqueidentifiermapper.hxx" +#include <com/sun/star/presentation/ClickAction.hpp> #include <com/sun/star/lang/ServiceNotRegisteredException.hpp> #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/text/XText.hpp> @@ -75,6 +79,8 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp, SvXMLExportPropertyMapper *pExtMapper ) : mrExport( rExp ), mnNextUniqueShapeId(1), + maShapesInfos(), + maCurrentShapesIter(maShapesInfos.end()), mbExportLayer( sal_False ), // #88546# init to FALSE mbHandleProgressBar( sal_False ), @@ -538,6 +544,38 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape } sal_Int32 nZIndex = 0; uno::Reference< beans::XPropertySet > xSet( xShape, uno::UNO_QUERY ); + + + ::std::auto_ptr< SvXMLElementExport > mpHyperlinkElement; + + // export hyperlinks with <a><shape/></a>. Currently only in draw since draw + // does not support document events + if( xSet.is() && (GetExport().GetModelType() == SvtModuleOptions::E_DRAW) ) try + { + presentation::ClickAction eAction = presentation::ClickAction_NONE; + xSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("OnClick"))) >>= eAction; + + if( (eAction == presentation::ClickAction_DOCUMENT) || + (eAction == presentation::ClickAction_BOOKMARK) ) + { + OUString sURL; + xSet->getPropertyValue(msBookmark) >>= sURL; + + if( sURL.getLength() ) + { + mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sURL ); + mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); + mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED ); + mpHyperlinkElement.reset( new SvXMLElementExport(mrExport, XML_NAMESPACE_DRAW, XML_A, sal_True, sal_True) ); + } + } + } + catch( uno::Exception& ) + { + DBG_ERROR("XMLShapeExport::exportShape(): exception during hyperlink export"); + } + + if( xSet.is() ) xSet->getPropertyValue(msZIndex) >>= nZIndex; @@ -845,6 +883,8 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape } } + mpHyperlinkElement.reset(); + // #97489# #97111# // if there was an error and no element for the shape was exported // we need to clear the attribute list or the attributes will be diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 0a0dbb98ff..504ba5d34c 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -372,31 +372,46 @@ void SdXMLShapeContext::EndElement() if( msHyperlink.getLength() != 0 ) try { - Reference< XEventsSupplier > xEventsSupplier( mxShape, UNO_QUERY_THROW ); - Reference< XNameReplace > xEvents( xEventsSupplier->getEvents(), UNO_QUERY_THROW ); + const OUString sBookmark( RTL_CONSTASCII_USTRINGPARAM( "Bookmark" ) ); - uno::Sequence< beans::PropertyValue > aProperties( 3 ); - aProperties[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "EventType" ) ); - aProperties[0].Handle = -1; - aProperties[0].Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM("Presentation") ); - aProperties[0].State = beans::PropertyState_DIRECT_VALUE; + Reference< XEventsSupplier > xEventsSupplier( mxShape, UNO_QUERY ); + if( xEventsSupplier.is() ) + { + const OUString sEventType( RTL_CONSTASCII_USTRINGPARAM( "EventType" ) ); + const OUString sClickAction( RTL_CONSTASCII_USTRINGPARAM( "ClickAction" ) ); + + Reference< XNameReplace > xEvents( xEventsSupplier->getEvents(), UNO_QUERY_THROW ); - aProperties[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "ClickAction" ) ); - aProperties[1].Handle = -1; - aProperties[1].Value <<= ::com::sun::star::presentation::ClickAction_DOCUMENT; - aProperties[1].State = beans::PropertyState_DIRECT_VALUE; + uno::Sequence< beans::PropertyValue > aProperties( 3 ); + aProperties[0].Name = sEventType; + aProperties[0].Handle = -1; + aProperties[0].Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM("Presentation") ); + aProperties[0].State = beans::PropertyState_DIRECT_VALUE; - aProperties[2].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "Bookmark" ) ); - aProperties[2].Handle = -1; - aProperties[2].Value <<= msHyperlink; - aProperties[2].State = beans::PropertyState_DIRECT_VALUE; + aProperties[1].Name = sClickAction; + aProperties[1].Handle = -1; + aProperties[1].Value <<= ::com::sun::star::presentation::ClickAction_DOCUMENT; + aProperties[1].State = beans::PropertyState_DIRECT_VALUE; - const OUString sAPIEventName( RTL_CONSTASCII_USTRINGPARAM( "OnClick" ) ); - xEvents->replaceByName( sAPIEventName, Any( aProperties ) ); + aProperties[2].Name = sBookmark; + aProperties[2].Handle = -1; + aProperties[2].Value <<= msHyperlink; + aProperties[2].State = beans::PropertyState_DIRECT_VALUE; + + const OUString sAPIEventName( RTL_CONSTASCII_USTRINGPARAM( "OnClick" ) ); + xEvents->replaceByName( sAPIEventName, Any( aProperties ) ); + } + else + { + // in draw use the Bookmark property + Reference< beans::XPropertySet > xSet( mxShape, UNO_QUERY_THROW ); + xSet->setPropertyValue( sBookmark, Any( msHyperlink ) ); + xSet->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "OnClick" ) ), Any( ::com::sun::star::presentation::ClickAction_DOCUMENT ) ); + } } catch( Exception& ) { - DBG_ERROR("xmloff::SdXMLShapeContext::EndElement(), exception caught!"); + DBG_ERROR("xmloff::SdXMLShapeContext::EndElement(), exception caught while setting hyperlink!"); } if( mxLockable.is() ) @@ -3668,7 +3683,7 @@ void SdXMLTableShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl:: SvXMLImportContext* SdXMLTableShapeContext::CreateChildContext( USHORT nPrefix, const ::rtl::OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) { - if( mxTableImportContext.Is() ) + if( mxTableImportContext.Is() && (nPrefix == XML_NAMESPACE_TABLE) ) return mxTableImportContext->CreateChildContext(nPrefix, rLocalName, xAttrList); else return SdXMLShapeContext::CreateChildContext(nPrefix, rLocalName, xAttrList); diff --git a/xmloff/source/style/WordWrapPropertyHdl.cxx b/xmloff/source/style/WordWrapPropertyHdl.cxx index f0ff8f778b..f98604d688 100644 --- a/xmloff/source/style/WordWrapPropertyHdl.cxx +++ b/xmloff/source/style/WordWrapPropertyHdl.cxx @@ -29,7 +29,6 @@ #include "precompiled_xmloff.hxx" #include <xmloff/xmlimp.hxx> #include <xmloff/WordWrapPropertyHdl.hxx> -#include "xmlkywd.hxx" #include <xmloff/xmltoken.hxx> #include <xmloff/xmluconv.hxx> #include <comphelper/extract.hxx> diff --git a/xmloff/source/style/XMLClipPropertyHandler.cxx b/xmloff/source/style/XMLClipPropertyHandler.cxx index c241c1894b..a0be804b98 100644 --- a/xmloff/source/style/XMLClipPropertyHandler.cxx +++ b/xmloff/source/style/XMLClipPropertyHandler.cxx @@ -32,7 +32,6 @@ #include <rtl/ustrbuf.hxx> #include <com/sun/star/text/GraphicCrop.hpp> #include <xmloff/xmluconv.hxx> -#include <xmlkywd.hxx> #include <xmloff/xmltoken.hxx> using ::rtl::OUString; @@ -77,7 +76,7 @@ sal_Bool XMLClipPropertyHandler::importXML( const OUString& rStrImpValue, uno::A sal_Bool bRet = sal_False; sal_Int32 nLen = rStrImpValue.getLength(); if( nLen > 6 && - 0 == rStrImpValue.compareToAscii( sXML_rect, 4 ) && + 0 == rStrImpValue.compareTo( GetXMLToken(XML_RECT), 4 ) && rStrImpValue[4] == '(' && rStrImpValue[nLen-1] == ')' ) { diff --git a/xmloff/source/style/XMLRectangleMembersHandler.cxx b/xmloff/source/style/XMLRectangleMembersHandler.cxx index 4169935bd6..9a3b8297b4 100644 --- a/xmloff/source/style/XMLRectangleMembersHandler.cxx +++ b/xmloff/source/style/XMLRectangleMembersHandler.cxx @@ -48,11 +48,6 @@ XMLRectangleMembersHdl::XMLRectangleMembersHdl( sal_Int32 nType ) { } - sal_Int32 X; - sal_Int32 Y; - sal_Int32 Width; - sal_Int32 Height; - XMLRectangleMembersHdl::~XMLRectangleMembersHdl() { } diff --git a/xmloff/source/style/adjushdl.cxx b/xmloff/source/style/adjushdl.cxx index 7e024e4ca9..3879069f3f 100644 --- a/xmloff/source/style/adjushdl.cxx +++ b/xmloff/source/style/adjushdl.cxx @@ -35,10 +35,6 @@ #include <com/sun/star/style/ParagraphAdjust.hpp> #include <com/sun/star/uno/Any.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using namespace ::com::sun::star; using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/backhdl.cxx b/xmloff/source/style/backhdl.cxx index a65738c554..d82008ecf8 100644 --- a/xmloff/source/style/backhdl.cxx +++ b/xmloff/source/style/backhdl.cxx @@ -34,10 +34,6 @@ #include <com/sun/star/uno/Any.hxx> #include <rtl/ustrbuf.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/bordrhdl.cxx b/xmloff/source/style/bordrhdl.cxx index 141e592d23..df58f82b79 100644 --- a/xmloff/source/style/bordrhdl.cxx +++ b/xmloff/source/style/bordrhdl.cxx @@ -34,10 +34,6 @@ #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Any.hxx> - -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif #include <com/sun/star/table/BorderLine.hpp> using ::rtl::OUString; diff --git a/xmloff/source/style/breakhdl.cxx b/xmloff/source/style/breakhdl.cxx index a8ed90188c..1c8e125620 100644 --- a/xmloff/source/style/breakhdl.cxx +++ b/xmloff/source/style/breakhdl.cxx @@ -34,10 +34,6 @@ #include <com/sun/star/style/BreakType.hpp> #include <com/sun/star/uno/Any.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/cdouthdl.cxx b/xmloff/source/style/cdouthdl.cxx index d1e3c59ecc..6ecc271afa 100644 --- a/xmloff/source/style/cdouthdl.cxx +++ b/xmloff/source/style/cdouthdl.cxx @@ -32,15 +32,9 @@ #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> -#ifndef _COM_SUN_STAR_AWT_FONTSTRIKEOUT_HPP #include <com/sun/star/awt/FontStrikeout.hpp> -#endif #include <com/sun/star/uno/Any.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/chrhghdl.cxx b/xmloff/source/style/chrhghdl.cxx index 24de540aa1..90df3338a2 100644 --- a/xmloff/source/style/chrhghdl.cxx +++ b/xmloff/source/style/chrhghdl.cxx @@ -35,10 +35,6 @@ #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Any.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/chrlohdl.cxx b/xmloff/source/style/chrlohdl.cxx index 68eb011178..4b61a0af55 100644 --- a/xmloff/source/style/chrlohdl.cxx +++ b/xmloff/source/style/chrlohdl.cxx @@ -34,10 +34,6 @@ #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Any.hxx> - -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif #include <com/sun/star/lang/Locale.hpp> using ::rtl::OUString; diff --git a/xmloff/source/style/csmaphdl.cxx b/xmloff/source/style/csmaphdl.cxx index 7ca6e9f0fd..8a65509b21 100644 --- a/xmloff/source/style/csmaphdl.cxx +++ b/xmloff/source/style/csmaphdl.cxx @@ -32,14 +32,8 @@ #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> #include <com/sun/star/style/CaseMap.hpp> - - #include <com/sun/star/uno/Any.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/escphdl.cxx b/xmloff/source/style/escphdl.cxx index 019f0ef9da..3a170f1899 100644 --- a/xmloff/source/style/escphdl.cxx +++ b/xmloff/source/style/escphdl.cxx @@ -35,10 +35,6 @@ #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Any.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx index bbaf3d9b47..037534632d 100644 --- a/xmloff/source/style/fonthdl.cxx +++ b/xmloff/source/style/fonthdl.cxx @@ -37,9 +37,6 @@ #include <com/sun/star/uno/Any.hxx> #include <tools/fontenum.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif #include <tools/string.hxx> using ::rtl::OUString; diff --git a/xmloff/source/style/lspachdl.cxx b/xmloff/source/style/lspachdl.cxx index 678167427f..44c1a57e90 100644 --- a/xmloff/source/style/lspachdl.cxx +++ b/xmloff/source/style/lspachdl.cxx @@ -37,10 +37,6 @@ #include <com/sun/star/style/LineSpacing.hpp> #include <com/sun/star/style/LineSpacingMode.hpp> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/postuhdl.cxx b/xmloff/source/style/postuhdl.cxx index 3d5c55db53..021e65a9c2 100644 --- a/xmloff/source/style/postuhdl.cxx +++ b/xmloff/source/style/postuhdl.cxx @@ -35,10 +35,6 @@ #include <com/sun/star/awt/FontSlant.hpp> #include <tools/fontenum.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index b2b2ed29e3..bff67f9e3b 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -39,7 +39,6 @@ //#include "xmlitmap.hxx" #endif #include <xmloff/xmluconv.hxx> -#include "xmlkywd.hxx" #include <xmloff/attrlist.hxx> #include <xmloff/xmlprmap.hxx> #include <xmloff/xmlexppr.hxx> diff --git a/xmloff/source/style/undlihdl.cxx b/xmloff/source/style/undlihdl.cxx index 12a4a3e79e..8dd9e5f2e8 100644 --- a/xmloff/source/style/undlihdl.cxx +++ b/xmloff/source/style/undlihdl.cxx @@ -34,13 +34,7 @@ #include <com/sun/star/uno/Any.hxx> -#ifndef _COM_SUN_STAR_AWT_FONTUNDERLINE_HPP #include <com/sun/star/awt/FontUnderline.hpp> -#endif - -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx index 5212442340..1c5ddc771f 100644 --- a/xmloff/source/style/xmlimppr.cxx +++ b/xmloff/source/style/xmlimppr.cxx @@ -40,7 +40,6 @@ #include <xmloff/xmlimppr.hxx> #include <xmloff/xmlimp.hxx> -#include "xmlkywd.hxx" #include "unoatrcn.hxx" #include "xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 172868c41a..01d684c7c9 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -2149,7 +2149,7 @@ sal_Bool lcl_IsAtEnd( rtl::OUStringBuffer& rBuffer, const String& rToken ) if ( nTokLen > nBufLen ) return sal_False; - sal_Int32 nStartPos = nTokLen - nBufLen; + sal_Int32 nStartPos = nBufLen - nTokLen; for ( xub_StrLen nTokPos = 0; nTokPos < nTokLen; nTokPos++ ) if ( rToken.GetChar( nTokPos ) != rBuffer.charAt( nStartPos + nTokPos ) ) return sal_False; diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index 140a069ebf..092af4fba7 100644 --- a/xmloff/source/text/XMLIndexTOCContext.cxx +++ b/xmloff/source/text/XMLIndexTOCContext.cxx @@ -50,14 +50,11 @@ #include <xmloff/txtimp.hxx> #include <xmloff/nmspmap.hxx> #include "xmlnmspe.hxx" -#include "xmlkywd.hxx" #include <xmloff/xmltoken.hxx> #include <xmloff/prstylei.hxx> #include "xmlerror.hxx" #include <xmloff/xmluconv.hxx> -#include <tools/debug.hxx> #include <rtl/ustring.hxx> -#include <tools/debug.hxx> using namespace ::com::sun::star::uno; @@ -85,15 +82,15 @@ static const sal_Char* aIndexServiceMap[] = "com.sun.star.text.IllustrationsIndex" }; -static const sal_Char* aIndexSourceElementMap[] = +static const XMLTokenEnum aIndexSourceElementMap[] = { - sXML_table_of_content_source, - sXML_alphabetical_index_source, - sXML_table_index_source, - sXML_object_index_source, - sXML_bibliography_source, - sXML_user_index_source, - sXML_illustration_index_source + XML_TABLE_OF_CONTENT_SOURCE, + XML_ALPHABETICAL_INDEX_SOURCE, + XML_TABLE_INDEX_SOURCE, + XML_OBJECT_INDEX_SOURCE, + XML_BIBLIOGRAPHY_SOURCE, + XML_USER_INDEX_SOURCE, + XML_ILLUSTRATION_INDEX_SOURCE }; SvXMLEnumMapEntry __READONLY_DATA aIndexTypeMap[] = @@ -117,7 +114,6 @@ XMLIndexTOCContext::XMLIndexTOCContext( , sTitle(RTL_CONSTASCII_USTRINGPARAM("Title")) , sIsProtected(RTL_CONSTASCII_USTRINGPARAM("IsProtected")) , sName(RTL_CONSTASCII_USTRINGPARAM("Name")) -, pSourceElementName(NULL) , bValid(sal_False) { if (XML_NAMESPACE_TEXT == nPrfx) @@ -126,13 +122,12 @@ XMLIndexTOCContext::XMLIndexTOCContext( if (SvXMLUnitConverter::convertEnum(nTmp, rLocalName, aIndexTypeMap)) { // check for array index: - DBG_ASSERT(nTmp < (sizeof(aIndexServiceMap)/sizeof(sal_Char*)), "index out of range"); - DBG_ASSERT(sizeof(aIndexServiceMap) == + OSL_ENSURE(nTmp < (sizeof(aIndexServiceMap)/sizeof(sal_Char*)), "index out of range"); + OSL_ENSURE(sizeof(aIndexServiceMap) == sizeof(aIndexSourceElementMap), "service and source element maps must be same size"); - eIndexType = (enum IndexTypeEnum)nTmp; - pSourceElementName = aIndexSourceElementMap[eIndexType]; + eIndexType = static_cast<IndexTypeEnum>(nTmp); bValid = sal_True; } } @@ -201,10 +196,6 @@ void XMLIndexTOCContext::StartElement( OUString::createFromAscii(aIndexServiceMap[eIndexType])); if( xIfc.is() ) { - - // xml:id for RDF metadata - GetImport().SetXmlId(xIfc, sXmlId); - // get Property set Reference<XPropertySet> xPropSet(xIfc, UNO_QUERY); xTOCPropertySet = xPropSet; @@ -246,6 +237,9 @@ void XMLIndexTOCContext::StartElement( return; } + // xml:id for RDF metadata + GetImport().SetXmlId(xIfc, sXmlId); + // b) insert marker and move cursor rImport->InsertString(sMarker); rImport->GetCursor()->goLeft(2, sal_False); @@ -326,7 +320,7 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext( xBodyContextRef = pContext; } } - else if (0 == rLocalName.compareToAscii(pSourceElementName)) + else if (IsXMLToken(rLocalName, aIndexSourceElementMap[eIndexType])) { // instantiate source context for the appropriate index type switch (eIndexType) @@ -367,7 +361,7 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext( break; default: - DBG_ERROR("index type not implemented"); + OSL_ENSURE(false, "index type not implemented"); break; } } diff --git a/xmloff/source/text/XMLIndexTOCContext.hxx b/xmloff/source/text/XMLIndexTOCContext.hxx index 52c2ee2e0d..a43bd23dbc 100644 --- a/xmloff/source/text/XMLIndexTOCContext.hxx +++ b/xmloff/source/text/XMLIndexTOCContext.hxx @@ -73,9 +73,6 @@ class XMLIndexTOCContext : public SvXMLImportContext enum IndexTypeEnum eIndexType; - /** source element name (for CreateChildContext) */ - const sal_Char* pSourceElementName; - sal_Bool bValid; SvXMLImportContextRef xBodyContextRef; diff --git a/xmloff/source/text/XMLPropertyBackpatcher.cxx b/xmloff/source/text/XMLPropertyBackpatcher.cxx index 45fe207a41..9c2a4ddad2 100644 --- a/xmloff/source/text/XMLPropertyBackpatcher.cxx +++ b/xmloff/source/text/XMLPropertyBackpatcher.cxx @@ -30,9 +30,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/uno/Reference.h> -#ifndef _RTL_USTRING #include <rtl/ustring.hxx> -#endif #include <tools/debug.hxx> #include "XMLPropertyBackpatcher.hxx" #include <xmloff/txtimp.hxx> // XMLTextImportHelper partially implemented here @@ -206,7 +204,34 @@ void XMLPropertyBackpatcher<A>::SetDefault() template class XMLPropertyBackpatcher<sal_Int16>; template class XMLPropertyBackpatcher<OUString>; +struct SAL_DLLPRIVATE XMLTextImportHelper::BackpatcherImpl +{ + /// backpatcher for references to footnotes and endnotes + ::std::auto_ptr< XMLPropertyBackpatcher<sal_Int16> > + m_pFootnoteBackpatcher; + + /// backpatchers for references to sequences + ::std::auto_ptr< XMLPropertyBackpatcher<sal_Int16> > + m_pSequenceIdBackpatcher; + + ::std::auto_ptr< XMLPropertyBackpatcher< ::rtl::OUString> > + m_pSequenceNameBackpatcher; +}; + +::boost::shared_ptr<XMLTextImportHelper::BackpatcherImpl> +XMLTextImportHelper::MakeBackpatcherImpl() +{ + // n.b.: the shared_ptr stores the dtor! + return ::boost::shared_ptr<BackpatcherImpl>(new BackpatcherImpl); +} + +static ::rtl::OUString const& GetSequenceNumber() +{ + static ::rtl::OUString s_SequenceNumber( + RTL_CONSTASCII_USTRINGPARAM("SequenceNumber")); + return s_SequenceNumber; +} // // XMLTextImportHelper @@ -224,32 +249,34 @@ template class XMLPropertyBackpatcher<OUString>; XMLPropertyBackpatcher<sal_Int16>& XMLTextImportHelper::GetFootnoteBP() { - if (NULL == pFootnoteBackpatcher) + if (!m_pBackpatcherImpl->m_pFootnoteBackpatcher.get()) { - pFootnoteBackpatcher = - new XMLPropertyBackpatcher<sal_Int16>(sSequenceNumber); + m_pBackpatcherImpl->m_pFootnoteBackpatcher.reset( + new XMLPropertyBackpatcher<sal_Int16>(GetSequenceNumber())); } - return *pFootnoteBackpatcher; + return *m_pBackpatcherImpl->m_pFootnoteBackpatcher; } XMLPropertyBackpatcher<sal_Int16>& XMLTextImportHelper::GetSequenceIdBP() { - if (NULL == pSequenceIdBackpatcher) + if (!m_pBackpatcherImpl->m_pSequenceIdBackpatcher.get()) { - pSequenceIdBackpatcher = - new XMLPropertyBackpatcher<sal_Int16>(sSequenceNumber); + m_pBackpatcherImpl->m_pSequenceIdBackpatcher.reset( + new XMLPropertyBackpatcher<sal_Int16>(GetSequenceNumber())); } - return *pSequenceIdBackpatcher; + return *m_pBackpatcherImpl->m_pSequenceIdBackpatcher; } XMLPropertyBackpatcher<OUString>& XMLTextImportHelper::GetSequenceNameBP() { - if (NULL == pSequenceNameBackpatcher) + static ::rtl::OUString s_SourceName( + RTL_CONSTASCII_USTRINGPARAM("SourceName")); + if (!m_pBackpatcherImpl->m_pSequenceNameBackpatcher.get()) { - pSequenceNameBackpatcher = - new XMLPropertyBackpatcher<OUString>(sSourceName); + m_pBackpatcherImpl->m_pSequenceNameBackpatcher.reset( + new XMLPropertyBackpatcher<OUString>(s_SourceName)); } - return *pSequenceNameBackpatcher; + return *m_pBackpatcherImpl->m_pSequenceNameBackpatcher; } void XMLTextImportHelper::InsertFootnoteID( @@ -283,9 +310,3 @@ void XMLTextImportHelper::ProcessSequenceReference( GetSequenceNameBP().SetProperty(xPropSet, sXMLId); } -void XMLTextImportHelper::_FinitBackpatcher() -{ - delete pFootnoteBackpatcher; - delete pSequenceIdBackpatcher; - delete pSequenceNameBackpatcher; -} diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index 702f259eb2..3e52a7fb67 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -28,7 +28,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include "XMLSectionExport.hxx" -#include <tools/debug.hxx> #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> @@ -53,7 +52,6 @@ #include <com/sun/star/text/XTextFieldsSupplier.hpp> #include <com/sun/star/text/XChapterNumberingSupplier.hpp> #include <com/sun/star/text/ChapterFormat.hpp> //i90246 -#include "xmlkywd.hxx" #include <xmloff/xmltoken.hxx> #include "xmlnmspe.hxx" #include <xmloff/families.hxx> @@ -306,7 +304,7 @@ void XMLSectionExport::ExportSectionEnd( break; default: - DBG_ERROR("unknown index type"); + OSL_ENSURE(false, "unknown index type"); // default: skip index! break; } @@ -332,7 +330,7 @@ void XMLSectionExport::ExportSectionEnd( } else { - DBG_ERROR("Need element name!"); + OSL_ENSURE(false, "Need element name!"); } } // else: autostyles -> ignore @@ -376,7 +374,7 @@ void XMLSectionExport::ExportIndexStart( default: // skip index - DBG_ERROR("unknown index type"); + OSL_ENSURE(false, "unknown index type"); break; } } @@ -809,15 +807,15 @@ void XMLSectionExport::ExportBaseIndexStart( GetExport().StartElement( XML_NAMESPACE_TEXT, eElement, sal_False ); } -static const sal_Char* aTypeSourceElementNameMap[] = +static const XMLTokenEnum aTypeSourceElementNameMap[] = { - sXML_table_of_content_source, // TOC - sXML_table_index_source, // table index - sXML_illustration_index_source, // illustration index - sXML_object_index_source, // object index - sXML_user_index_source, // user index - sXML_alphabetical_index_source, // alphabetical index - sXML_bibliography_source // bibliography + XML_TABLE_OF_CONTENT_SOURCE, // TOC + XML_TABLE_INDEX_SOURCE, // table index + XML_ILLUSTRATION_INDEX_SOURCE, // illustration index + XML_OBJECT_INDEX_SOURCE, // object index + XML_USER_INDEX_SOURCE, // user index + XML_ALPHABETICAL_INDEX_SOURCE, // alphabetical index + XML_BIBLIOGRAPHY_SOURCE // bibliography }; void XMLSectionExport::ExportBaseIndexSource( @@ -825,8 +823,8 @@ void XMLSectionExport::ExportBaseIndexSource( const Reference<XPropertySet> & rPropertySet) { // check type - DBG_ASSERT(eType >= TEXT_SECTION_TYPE_TOC, "illegal index type"); - DBG_ASSERT(eType <= TEXT_SECTION_TYPE_BIBLIOGRAPHY, "illegal index type"); + OSL_ENSURE(eType >= TEXT_SECTION_TYPE_TOC, "illegal index type"); + OSL_ENSURE(eType <= TEXT_SECTION_TYPE_BIBLIOGRAPHY, "illegal index type"); Any aAny; @@ -854,8 +852,9 @@ void XMLSectionExport::ExportBaseIndexSource( // the index source element (all indices) SvXMLElementExport aElem(GetExport(), XML_NAMESPACE_TEXT, - aTypeSourceElementNameMap[ - eType - TEXT_SECTION_TYPE_TOC], + GetXMLToken( + aTypeSourceElementNameMap[ + eType - TEXT_SECTION_TYPE_TOC]), sal_True, sal_True); // scope for title template (all indices) @@ -925,8 +924,8 @@ void XMLSectionExport::ExportBaseIndexBody( const Reference<XPropertySet> &) { // type not used; checked anyway. - DBG_ASSERT(eType >= TEXT_SECTION_TYPE_TOC, "illegal index type"); - DBG_ASSERT(eType <= TEXT_SECTION_TYPE_BIBLIOGRAPHY, "illegal index type"); + OSL_ENSURE(eType >= TEXT_SECTION_TYPE_TOC, "illegal index type"); + OSL_ENSURE(eType <= TEXT_SECTION_TYPE_BIBLIOGRAPHY, "illegal index type"); // export start only @@ -969,23 +968,23 @@ void XMLSectionExport::ExportTableAndIllustrationIndexSourceAttributes( // map index of LevelFormats to attribute value; // level 0 is always the header -static const sal_Char* aLevelNameTOCMap[] = - { NULL, sXML_1, sXML_2, sXML_3, sXML_4, sXML_5, sXML_6, sXML_7, - sXML_8, sXML_9, sXML_10, NULL }; -static const sal_Char* aLevelNameTableMap[] = - { NULL, "", NULL }; -static const sal_Char* aLevelNameAlphaMap[] = - { NULL, sXML_separator, sXML_1, sXML_2, sXML_3, NULL }; -static const sal_Char* aLevelNameBibliographyMap[] = - { NULL, sXML_article, sXML_book, sXML_booklet, sXML_conference, - sXML_custom1, sXML_custom2, sXML_custom3, sXML_custom4, - sXML_custom5, sXML_email, sXML_inbook, sXML_incollection, - sXML_inproceedings, sXML_journal, - sXML_manual, sXML_mastersthesis, sXML_misc, sXML_phdthesis, - sXML_proceedings, sXML_techreport, sXML_unpublished, sXML_www, - NULL }; - -static const sal_Char** aTypeLevelNameMap[] = +static const XMLTokenEnum aLevelNameTOCMap[] = + { XML_TOKEN_INVALID, XML_1, XML_2, XML_3, XML_4, XML_5, XML_6, XML_7, + XML_8, XML_9, XML_10, XML_TOKEN_INVALID }; +static const XMLTokenEnum aLevelNameTableMap[] = + { XML_TOKEN_INVALID, XML__EMPTY, XML_TOKEN_INVALID }; +static const XMLTokenEnum aLevelNameAlphaMap[] = + { XML_TOKEN_INVALID, XML_SEPARATOR, XML_1, XML_2, XML_3, XML_TOKEN_INVALID }; +static const XMLTokenEnum aLevelNameBibliographyMap[] = + { XML_TOKEN_INVALID, XML_ARTICLE, XML_BOOK, XML_BOOKLET, XML_CONFERENCE, + XML_CUSTOM1, XML_CUSTOM2, XML_CUSTOM3, XML_CUSTOM4, + XML_CUSTOM5, XML_EMAIL, XML_INBOOK, XML_INCOLLECTION, + XML_INPROCEEDINGS, XML_JOURNAL, + XML_MANUAL, XML_MASTERSTHESIS, XML_MISC, XML_PHDTHESIS, + XML_PROCEEDINGS, XML_TECHREPORT, XML_UNPUBLISHED, XML_WWW, + XML_TOKEN_INVALID }; + +static const XMLTokenEnum* aTypeLevelNameMap[] = { aLevelNameTOCMap, // TOC aLevelNameTableMap, // table index @@ -1029,26 +1028,26 @@ static const sal_Char** aTypeLevelStylePropNameMap[] = aLevelStylePropNameBibliographyMap // bibliography }; -static const sal_Char* aTypeLevelAttrMap[] = +static const XMLTokenEnum aTypeLevelAttrMap[] = { - sXML_outline_level, // TOC - NULL, // table index - NULL, // illustration index - NULL, // object index - sXML_outline_level, // user index - sXML_outline_level, // alphabetical index - sXML_bibliography_type // bibliography + XML_OUTLINE_LEVEL, // TOC + XML_TOKEN_INVALID, // table index + XML_TOKEN_INVALID, // illustration index + XML_TOKEN_INVALID, // object index + XML_OUTLINE_LEVEL, // user index + XML_OUTLINE_LEVEL, // alphabetical index + XML_BIBLIOGRAPHY_TYPE // bibliography }; -static const sal_Char* aTypeElementNameMap[] = +static const XMLTokenEnum aTypeElementNameMap[] = { - sXML_table_of_content_entry_template, // TOC - sXML_table_index_entry_template, // table index - sXML_illustration_index_entry_template, // illustration index - sXML_object_index_entry_template, // object index - sXML_user_index_entry_template, // user index - sXML_alphabetical_index_entry_template, // alphabetical index - sXML_bibliography_entry_template // bibliography + XML_TABLE_OF_CONTENT_ENTRY_TEMPLATE, // TOC + XML_TABLE_INDEX_ENTRY_TEMPLATE, // table index + XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE, // illustration index + XML_OBJECT_INDEX_ENTRY_TEMPLATE, // object index + XML_USER_INDEX_ENTRY_TEMPLATE, // user index + XML_ALPHABETICAL_INDEX_ENTRY_TEMPLATE, // alphabetical index + XML_BIBLIOGRAPHY_ENTRY_TEMPLATE // bibliography }; @@ -1058,44 +1057,44 @@ sal_Bool XMLSectionExport::ExportIndexTemplate( const Reference<XPropertySet> & rPropertySet, Sequence<Sequence<PropertyValue> > & rValues) { - DBG_ASSERT(eType >= TEXT_SECTION_TYPE_TOC, "illegal index type"); - DBG_ASSERT(eType <= TEXT_SECTION_TYPE_BIBLIOGRAPHY, "illegal index type"); - DBG_ASSERT(nOutlineLevel >= 0, "illegal outline level"); + OSL_ENSURE(eType >= TEXT_SECTION_TYPE_TOC, "illegal index type"); + OSL_ENSURE(eType <= TEXT_SECTION_TYPE_BIBLIOGRAPHY, "illegal index type"); + OSL_ENSURE(nOutlineLevel >= 0, "illegal outline level"); if ( (eType >= TEXT_SECTION_TYPE_TOC) && (eType <= TEXT_SECTION_TYPE_BIBLIOGRAPHY) && (nOutlineLevel >= 0) ) { // get level name and level attribute name from aLevelNameMap; - const sal_Char* pLevelAttrName = - aTypeLevelAttrMap[eType-TEXT_SECTION_TYPE_TOC]; - const sal_Char* pLevelName = - aTypeLevelNameMap[eType-TEXT_SECTION_TYPE_TOC][nOutlineLevel]; + const XMLTokenEnum eLevelAttrName( + aTypeLevelAttrMap[eType-TEXT_SECTION_TYPE_TOC]); + const XMLTokenEnum eLevelName( + aTypeLevelNameMap[eType-TEXT_SECTION_TYPE_TOC][nOutlineLevel]); // #92124#: some old documents may be broken, then they have // too many template levels; we need to recognize this and // export only as many as is legal for the respective index // type. To do this, we simply return an error flag, which // will then abort further template level exports. - DBG_ASSERT(NULL != pLevelName, "can't find level name"); - if ( NULL == pLevelName ) + OSL_ENSURE(XML_TOKEN_INVALID != eLevelName, "can't find level name"); + if ( XML_TOKEN_INVALID == eLevelName ) { // output level not found? Then end of templates! #91214# return sal_False; } // output level name - if ((NULL != pLevelName) && (NULL != pLevelAttrName)) + if ((XML_TOKEN_INVALID != eLevelName) && (XML_TOKEN_INVALID != eLevelAttrName)) { - GetExport().AddAttributeASCII(XML_NAMESPACE_TEXT, - pLevelAttrName, - pLevelName); + GetExport().AddAttribute(XML_NAMESPACE_TEXT, + GetXMLToken(eLevelAttrName), + GetXMLToken(eLevelName)); } // paragraph level style name - const sal_Char* pPropName = - aTypeLevelStylePropNameMap[eType-TEXT_SECTION_TYPE_TOC][nOutlineLevel]; - DBG_ASSERT(NULL != pPropName, "can't find property name"); + const sal_Char* pPropName( + aTypeLevelStylePropNameMap[eType-TEXT_SECTION_TYPE_TOC][nOutlineLevel]); + OSL_ENSURE(NULL != pPropName, "can't find property name"); if (NULL != pPropName) { Any aAny = rPropertySet->getPropertyValue( @@ -1108,11 +1107,11 @@ sal_Bool XMLSectionExport::ExportIndexTemplate( } // template element - const sal_Char* pElementName = - aTypeElementNameMap[eType - TEXT_SECTION_TYPE_TOC]; + const XMLTokenEnum eElementName( + aTypeElementNameMap[eType - TEXT_SECTION_TYPE_TOC]); SvXMLElementExport aLevelTemplate(GetExport(), XML_NAMESPACE_TEXT, - pElementName, + GetXMLToken(eElementName), sal_True, sal_True); // export sequence @@ -1353,39 +1352,46 @@ void XMLSectionExport::ExportIndexTemplateElement( } // convert type to token (and check validity) ... - sal_Char* pElement = NULL; + XMLTokenEnum eElement(XML_TOKEN_INVALID); switch(nTokenType) { case TOK_TTYPE_ENTRY_TEXT: - pElement = sXML_index_entry_text; + eElement = XML_INDEX_ENTRY_TEXT; break; case TOK_TTYPE_TAB_STOP: // test validity - pElement = ( bRightAligned || bTabPositionOK || bFillCharOK ) - ? sXML_index_entry_tab_stop : NULL; + if ( bRightAligned || bTabPositionOK || bFillCharOK ) + { + eElement = XML_INDEX_ENTRY_TAB_STOP; + } break; case TOK_TTYPE_TEXT: // test validity - pElement = bTextOK ? sXML_index_entry_span : NULL; + if (bTextOK) + { + eElement = XML_INDEX_ENTRY_SPAN; + } break; case TOK_TTYPE_PAGE_NUMBER: - pElement = sXML_index_entry_page_number; + eElement = XML_INDEX_ENTRY_PAGE_NUMBER; break; case TOK_TTYPE_CHAPTER_INFO: // keyword index - pElement = sXML_index_entry_chapter; + eElement = XML_INDEX_ENTRY_CHAPTER; break; case TOK_TTYPE_ENTRY_NUMBER: // table of content - pElement = sXML_index_entry_chapter; + eElement = XML_INDEX_ENTRY_CHAPTER; break; case TOK_TTYPE_HYPERLINK_START: - pElement = sXML_index_entry_link_start; + eElement = XML_INDEX_ENTRY_LINK_START; break; case TOK_TTYPE_HYPERLINK_END: - pElement = sXML_index_entry_link_end; + eElement = XML_INDEX_ENTRY_LINK_END; break; case TOK_TTYPE_BIBLIOGRAPHY: - pElement = bBibliographyDataOK - ? sXML_index_entry_bibliography : NULL; + if (bBibliographyDataOK) + { + eElement = XML_INDEX_ENTRY_BIBLIOGRAPHY; + } break; default: ; // unknown/unimplemented template @@ -1404,7 +1410,7 @@ void XMLSectionExport::ExportIndexTemplateElement( //it's not permitted in other indexes if (eType != TEXT_SECTION_TYPE_ALPHABETICAL) { - pElement = NULL; //not permitted, null the element + eElement = XML_TOKEN_INVALID; //not permitted, invalidate the element } else //maps format for 1.1 & 1.0 { @@ -1447,7 +1453,7 @@ void XMLSectionExport::ExportIndexTemplateElement( //<--- // ... and write Element - if (pElement != NULL) + if (eElement != XML_TOKEN_INVALID) { // character style (for most templates) if (bCharStyleOK) @@ -1510,7 +1516,7 @@ void XMLSectionExport::ExportIndexTemplateElement( // bibliography data if (TOK_TTYPE_BIBLIOGRAPHY == nTokenType) { - DBG_ASSERT(bBibliographyDataOK, "need bibl data"); + OSL_ENSURE(bBibliographyDataOK, "need bibl data"); OUStringBuffer sBuf; if (SvXMLUnitConverter::convertEnum( sBuf, nBibliographyData, aBibliographyDataFieldMap ) ) @@ -1524,7 +1530,7 @@ void XMLSectionExport::ExportIndexTemplateElement( // chapter info if (TOK_TTYPE_CHAPTER_INFO == nTokenType) { - DBG_ASSERT(bChapterFormatOK, "need chapter info"); + OSL_ENSURE(bChapterFormatOK, "need chapter info"); GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_DISPLAY, XMLTextFieldExport::MapChapterDisplayFormat(nChapterFormat)); @@ -1550,7 +1556,9 @@ void XMLSectionExport::ExportIndexTemplateElement( //<--- // export template SvXMLElementExport aTemplateElement(GetExport(), XML_NAMESPACE_TEXT, - pElement, sal_True, sal_False); + GetXMLToken(eElement), + sal_True, sal_False) + ; // entry text or span element: write text if (TOK_TTYPE_TEXT == nTokenType) @@ -1614,7 +1622,7 @@ void XMLSectionExport::ExportBoolean( sal_Bool bDefault, sal_Bool bInvert) { - DBG_ASSERT(eAttributeName != XML_TOKEN_INVALID, "Need attribute name"); + OSL_ENSURE(eAttributeName != XML_TOKEN_INVALID, "Need attribute name"); Any aAny = rPropSet->getPropertyValue(sPropertyName); sal_Bool bTmp = *(sal_Bool*)aAny.getValue(); @@ -1656,7 +1664,7 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport) Reference<XPropertySet> xPropSet; aAny >>= xPropSet; - DBG_ASSERT( xPropSet.is(), "field master must have XPropSet" ); + OSL_ENSURE( xPropSet.is(), "field master must have XPropSet" ); const OUString sBracketBefore( RTL_CONSTASCII_USTRINGPARAM("BracketBefore")); @@ -1843,7 +1851,7 @@ sal_Bool XMLSectionExport::IsInSection( { // default: like default argument sal_Bool bRet = bDefault; - DBG_ASSERT(rEnclosingSection.is(), "enclosing section expected"); + OSL_ENSURE(rEnclosingSection.is(), "enclosing section expected"); Reference<XPropertySet> xPropSet(rContent, UNO_QUERY); if (xPropSet.is()) diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx index 46cfeeab86..f95557f69c 100644 --- a/xmloff/source/text/XMLSectionImportContext.cxx +++ b/xmloff/source/text/XMLSectionImportContext.cxx @@ -161,9 +161,6 @@ void XMLSectionImportContext::StartElement( // save PropertySet (for CreateChildContext) xSectionPropertySet = xPropSet; - // xml:id for RDF metadata - GetImport().SetXmlId(xIfc, sXmlId); - // name Reference<XNamed> xNamed(xPropSet, UNO_QUERY); xNamed->setName(sName); @@ -253,6 +250,9 @@ void XMLSectionImportContext::StartElement( // finally, check for redlines that should start at // the section start node rHelper->RedlineAdjustStartNodeCursor(sal_True); // start ??? + + // xml:id for RDF metadata + GetImport().SetXmlId(xIfc, sXmlId); } } } diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 61b065ef2e..5bdbce9930 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -43,7 +43,6 @@ #include <xmloff/xmlimp.hxx> #include <xmloff/xmltoken.hxx> #include "xmlnmspe.hxx" -#include "xmlkywd.hxx" #include <xmloff/nmspmap.hxx> #include <xmloff/xmluconv.hxx> #include "XMLAnchorTypePropHdl.hxx" @@ -1032,10 +1031,11 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( { OUString sValue( rValue ); sValue.trim(); - const sal_Int32 nRotateLen = sizeof(sXML_rotate)-1; + const OUString aRotate(GetXMLToken(XML_ROTATE)); + const sal_Int32 nRotateLen(aRotate.getLength()); sal_Int32 nLen = sValue.getLength(); if( nLen >= nRotateLen+3 && - 0 == sValue.compareToAscii( sXML_rotate, nRotateLen ) && + 0 == sValue.compareTo( aRotate, nRotateLen ) && '(' == sValue[nRotateLen] && ')' == sValue[nLen-1] ) { @@ -1241,6 +1241,14 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString& rHRef, const OUString& rTargetFrameName, sal_Bool bMap ) { + static ::rtl::OUString s_HyperLinkURL( + RTL_CONSTASCII_USTRINGPARAM("HyperLinkURL")); + static ::rtl::OUString s_HyperLinkName( + RTL_CONSTASCII_USTRINGPARAM("HyperLinkName")); + static ::rtl::OUString s_HyperLinkTarget( + RTL_CONSTASCII_USTRINGPARAM("HyperLinkTarget")); + static ::rtl::OUString s_ServerMap( + RTL_CONSTASCII_USTRINGPARAM("ServerMap")); if( !xPropSet.is() ) return; @@ -1248,29 +1256,29 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString& rHRef, Reference < XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); if( !xPropSetInfo.is() || - !xPropSetInfo->hasPropertyByName( xTxtImp->sHyperLinkURL ) ) + !xPropSetInfo->hasPropertyByName(s_HyperLinkURL)) return; Any aAny; aAny <<= rHRef; - xPropSet->setPropertyValue( xTxtImp->sHyperLinkURL, aAny ); + xPropSet->setPropertyValue( s_HyperLinkURL, aAny ); - if( xPropSetInfo->hasPropertyByName( xTxtImp->sHyperLinkName ) ) + if (xPropSetInfo->hasPropertyByName(s_HyperLinkName)) { aAny <<= rName; - xPropSet->setPropertyValue( xTxtImp->sHyperLinkName, aAny ); + xPropSet->setPropertyValue(s_HyperLinkName, aAny); } - if( xPropSetInfo->hasPropertyByName( xTxtImp->sHyperLinkTarget ) ) + if (xPropSetInfo->hasPropertyByName(s_HyperLinkTarget)) { aAny <<= rTargetFrameName; - xPropSet->setPropertyValue( xTxtImp->sHyperLinkTarget, aAny ); + xPropSet->setPropertyValue( s_HyperLinkTarget, aAny ); } - if( xPropSetInfo->hasPropertyByName( xTxtImp->sServerMap ) ) + if (xPropSetInfo->hasPropertyByName(s_ServerMap)) { aAny.setValue( &bMap, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( xTxtImp->sServerMap, aAny ); + xPropSet->setPropertyValue(s_ServerMap, aAny); } } diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx index 6fc2c27c31..41d293dc08 100644 --- a/xmloff/source/text/XMLTextListBlockContext.cxx +++ b/xmloff/source/text/XMLTextListBlockContext.cxx @@ -79,6 +79,8 @@ XMLTextListBlockContext::XMLTextListBlockContext( , msContinueListId() // <-- { + static ::rtl::OUString s_PropNameDefaultListId( + RTL_CONSTASCII_USTRINGPARAM("DefaultListId")); { // get the parent list block context (if any); this is a bit ugly... XMLTextListBlockContext * pLB(0); @@ -180,10 +182,12 @@ XMLTextListBlockContext::XMLTextListBlockContext( { uno::Reference< beans::XPropertySetInfo > xNumRulePropSetInfo( xNumRuleProps->getPropertySetInfo()); - if ( xNumRulePropSetInfo.is() && - xNumRulePropSetInfo->hasPropertyByName( mrTxtImport.sPropNameDefaultListId) ) + if (xNumRulePropSetInfo.is() && + xNumRulePropSetInfo->hasPropertyByName( + s_PropNameDefaultListId)) { - xNumRuleProps->getPropertyValue( mrTxtImport.sPropNameDefaultListId ) >>= sListStyleDefaultListId; + xNumRuleProps->getPropertyValue(s_PropNameDefaultListId) + >>= sListStyleDefaultListId; DBG_ASSERT( sListStyleDefaultListId.getLength() != 0, "no default list id found at numbering rules instance. Serious defect -> please inform OD." ); } diff --git a/xmloff/source/text/XMLTextListItemContext.cxx b/xmloff/source/text/XMLTextListItemContext.cxx index 52b3f04574..8c287c809c 100644 --- a/xmloff/source/text/XMLTextListItemContext.cxx +++ b/xmloff/source/text/XMLTextListItemContext.cxx @@ -69,6 +69,8 @@ XMLTextListItemContext::XMLTextListItemContext( mxNumRulesOverride() // <-- { + static ::rtl::OUString s_NumberingRules( + RTL_CONSTASCII_USTRINGPARAM("NumberingRules")); sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -105,7 +107,7 @@ XMLTextListItemContext::XMLTextListItemContext( aAny >>= xStyle; uno::Reference< beans::XPropertySet > xPropSet( xStyle, UNO_QUERY ); - aAny = xPropSet->getPropertyValue( rTxtImp.sNumberingRules ); + aAny = xPropSet->getPropertyValue(s_NumberingRules); aAny >>= mxNumRulesOverride; } else diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx index 08cb730d3a..803f3c5473 100644 --- a/xmloff/source/text/XMLTextMarkImportContext.cxx +++ b/xmloff/source/text/XMLTextMarkImportContext.cxx @@ -49,10 +49,13 @@ #include <com/sun/star/text/XFormField.hpp> +#include "RDFaImportHelper.hxx" + using ::rtl::OUString; using ::rtl::OUStringBuffer; +using namespace ::com::sun::star; using namespace ::com::sun::star::text; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -113,7 +116,6 @@ XMLTextMarkImportContext::XMLTextMarkImportContext( const OUString& rLocalName ) : SvXMLImportContext(rImport, nPrefix, rLocalName) , m_rHelper(rHlp) - , m_bHaveAbout(false) { } @@ -190,13 +192,13 @@ void XMLTextMarkImportContext::EndElement() { SvXMLImportContext::EndElement(); - const OUString sAPI_reference_mark( + static const OUString sAPI_reference_mark( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.ReferenceMark")); - const OUString sAPI_bookmark( + static const OUString sAPI_bookmark( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmark")); - const OUString sAPI_fieldmark( + static const OUString sAPI_fieldmark( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Fieldmark")); - const OUString sAPI_formfieldmark( + static const OUString sAPI_formfieldmark( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.FormFieldmark")); if (m_sBookmarkName.getLength() > 0) @@ -228,13 +230,6 @@ void XMLTextMarkImportContext::EndElement() m_sBookmarkName, m_rHelper.GetCursorAsRange()->getStart(), m_sXmlId) ); - if (m_bHaveAbout) - { - const Reference<com::sun::star::rdf::XMetadatable> - xMeta( xContent, UNO_QUERY); - GetImport().AddRDFa(xMeta, - m_sAbout, m_sProperty, m_sContent, m_sDatatype); - } if ((lcl_MarkType)nTmp==TypeFieldmark) { if (xContent.is() && bImportAsField) { // setup fieldmark... @@ -252,9 +247,22 @@ void XMLTextMarkImportContext::EndElement() case TypeFieldmarkStart: case TypeBookmarkStart: // save XTextRange for later construction of bookmark - m_rHelper.InsertBookmarkStartRange( - m_sBookmarkName, m_rHelper.GetCursorAsRange()->getStart(), - m_sXmlId); + { + ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > + pRDFaAttributes; + if (m_bHaveAbout && (TypeBookmarkStart + == static_cast<lcl_MarkType>(nTmp))) + { + pRDFaAttributes = + GetImport().GetRDFaImportHelper().ParseRDFa( + m_sAbout, m_sProperty, + m_sContent, m_sDatatype); + } + m_rHelper.InsertBookmarkStartRange( + m_sBookmarkName, + m_rHelper.GetCursorAsRange()->getStart(), + m_sXmlId, pRDFaAttributes); + } break; case TypeFieldmarkEnd: @@ -262,8 +270,11 @@ void XMLTextMarkImportContext::EndElement() { // get old range, and construct Reference<XTextRange> xStartRange; - if (m_rHelper.FindAndRemoveBookmarkStartRange(m_sBookmarkName, - xStartRange, m_sXmlId)) + ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > + pRDFaAttributes; + if (m_rHelper.FindAndRemoveBookmarkStartRange( + m_sBookmarkName, xStartRange, + m_sXmlId, pRDFaAttributes)) { Reference<XTextRange> xEndRange( m_rHelper.GetCursorAsRange()->getStart()); @@ -295,12 +306,12 @@ void XMLTextMarkImportContext::EndElement() m_sBookmarkName, xInsertionRange, m_sXmlId) ); - if (m_bHaveAbout) + if (pRDFaAttributes) { - const Reference<com::sun::star::rdf::XMetadatable> - xMeta( xContent, UNO_QUERY); - GetImport().AddRDFa(xMeta, - m_sAbout, m_sProperty, m_sContent, m_sDatatype); + const Reference<rdf::XMetadatable> + xMeta(xContent, UNO_QUERY); + GetImport().GetRDFaImportHelper().AddRDFa( + xMeta, pRDFaAttributes); } if ((lcl_MarkType)nTmp==TypeFieldmarkEnd) { diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 5b8032662c..7087f7e71e 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -212,87 +212,6 @@ const sal_Char sAPI_TextRange[] = "TextRange"; const sal_Char sAPI_true[] = "TRUE"; -static __FAR_DATA SvXMLTokenMapEntry aTextFieldAttrTokenMap[] = -{ - { XML_NAMESPACE_TEXT, XML_FIXED, XML_TOK_TEXTFIELD_FIXED }, - { XML_NAMESPACE_TEXT, XML_DESCRIPTION, XML_TOK_TEXTFIELD_DESCRIPTION }, - { XML_NAMESPACE_TEXT, XML_HELP, XML_TOK_TEXTFIELD_HELP }, - { XML_NAMESPACE_TEXT, XML_HINT, XML_TOK_TEXTFIELD_HINT }, - { XML_NAMESPACE_TEXT, XML_PLACEHOLDER_TYPE, - XML_TOK_TEXTFIELD_PLACEHOLDER_TYPE }, - { XML_NAMESPACE_TEXT, XML_NAME, XML_TOK_TEXTFIELD_NAME }, - { XML_NAMESPACE_TEXT, XML_FORMULA, XML_TOK_TEXTFIELD_FORMULA }, - { XML_NAMESPACE_STYLE, XML_NUM_FORMAT, XML_TOK_TEXTFIELD_NUM_FORMAT }, - { XML_NAMESPACE_STYLE, XML_NUM_LETTER_SYNC, - XML_TOK_TEXTFIELD_NUM_LETTER_SYNC }, - { XML_NAMESPACE_TEXT, XML_DISPLAY_FORMULA, - XML_TOK_TEXTFIELD_DISPLAY_FORMULA }, - { XML_NAMESPACE_TEXT, XML_VALUE_TYPE, XML_TOK_TEXTFIELD_VALUE_TYPE }, // #i32362#: src680m48++ saves text:value-type - { XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_TOK_TEXTFIELD_VALUE_TYPE }, - { XML_NAMESPACE_TEXT, XML_VALUE, XML_TOK_TEXTFIELD_VALUE }, - { XML_NAMESPACE_OFFICE, XML_VALUE, XML_TOK_TEXTFIELD_VALUE }, - { XML_NAMESPACE_TEXT, XML_STRING_VALUE, XML_TOK_TEXTFIELD_STRING_VALUE }, - { XML_NAMESPACE_OFFICE, XML_STRING_VALUE, XML_TOK_TEXTFIELD_STRING_VALUE }, - { XML_NAMESPACE_TEXT, XML_DATE_VALUE, XML_TOK_TEXTFIELD_DATE_VALUE }, - { XML_NAMESPACE_OFFICE, XML_DATE_VALUE, XML_TOK_TEXTFIELD_DATE_VALUE }, - { XML_NAMESPACE_TEXT, XML_TIME_VALUE, XML_TOK_TEXTFIELD_TIME_VALUE }, - { XML_NAMESPACE_OFFICE, XML_TIME_VALUE, XML_TOK_TEXTFIELD_TIME_VALUE }, - { XML_NAMESPACE_OFFICE, XML_BOOLEAN_VALUE, XML_TOK_TEXTFIELD_BOOL_VALUE}, - { XML_NAMESPACE_OFFICE, XML_CURRENCY, XML_TOK_TEXTFIELD_CURRENCY}, - { XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME, - XML_TOK_TEXTFIELD_DATA_STYLE_NAME }, - { XML_NAMESPACE_TEXT, XML_DISPLAY_OUTLINE_LEVEL, - XML_TOK_TEXTFIELD_NUMBERING_LEVEL }, - { XML_NAMESPACE_TEXT, XML_SEPARATION_CHARACTER, - XML_TOK_TEXTFIELD_NUMBERING_SEPARATOR }, - { XML_NAMESPACE_TEXT, XML_DISPLAY, XML_TOK_TEXTFIELD_DISPLAY }, - { XML_NAMESPACE_TEXT, XML_TIME_ADJUST, XML_TOK_TEXTFIELD_TIME_ADJUST }, - { XML_NAMESPACE_TEXT, XML_DATE_ADJUST, XML_TOK_TEXTFIELD_DATE_ADJUST }, - { XML_NAMESPACE_TEXT, XML_PAGE_ADJUST, XML_TOK_TEXTFIELD_PAGE_ADJUST }, - { XML_NAMESPACE_TEXT, XML_SELECT_PAGE, XML_TOK_TEXTFIELD_SELECT_PAGE }, - { XML_NAMESPACE_TEXT, XML_DATABASE_NAME, XML_TOK_TEXTFIELD_DATABASE_NAME}, - { XML_NAMESPACE_TEXT, XML_TABLE_NAME, XML_TOK_TEXTFIELD_TABLE_NAME }, - { XML_NAMESPACE_TEXT, XML_COLUMN_NAME, XML_TOK_TEXTFIELD_COLUMN_NAME }, - { XML_NAMESPACE_TEXT, XML_ROW_NUMBER, XML_TOK_TEXTFIELD_ROW_NUMBER }, - { XML_NAMESPACE_TEXT, XML_CONDITION, XML_TOK_TEXTFIELD_CONDITION }, - { XML_NAMESPACE_TEXT, XML_STRING_VALUE_IF_TRUE, - XML_TOK_TEXTFIELD_STRING_VALUE_IF_TRUE }, - { XML_NAMESPACE_TEXT, XML_STRING_VALUE_IF_FALSE, - XML_TOK_TEXTFIELD_STRING_VALUE_IF_FALSE }, - { XML_NAMESPACE_TEXT, XML_EDITING_CYCLES, XML_TOK_TEXTFIELD_REVISION }, - { XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL, XML_TOK_TEXTFIELD_OUTLINE_LEVEL}, - { XML_NAMESPACE_TEXT, XML_ACTIVE, XML_TOK_TEXTFIELD_ACTIVE }, - { XML_NAMESPACE_TEXT, XML_NOTE_CLASS, XML_TOK_TEXTFIELD_NOTE_CLASS }, - { XML_NAMESPACE_TEXT, XML_REFERENCE_FORMAT, - XML_TOK_TEXTFIELD_REFERENCE_FORMAT }, - { XML_NAMESPACE_TEXT, XML_REF_NAME, XML_TOK_TEXTFIELD_REF_NAME }, - { XML_NAMESPACE_TEXT, XML_CONNECTION_NAME, - XML_TOK_TEXTFIELD_CONNECTION_NAME }, - { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_TEXTFIELD_HREF }, - { XML_NAMESPACE_OFFICE, XML_TARGET_FRAME_NAME, - XML_TOK_TEXTFIELD_TARGET_FRAME }, - { XML_NAMESPACE_TEXT, XML_ANNOTATION, XML_TOK_TEXTFIELD_ANNOTATION }, - { XML_NAMESPACE_SCRIPT, XML_LANGUAGE, XML_TOK_TEXTFIELD_LANGUAGE }, - { XML_NAMESPACE_TEXT, XML_KIND, XML_TOK_TEXTFIELD_MEASURE_KIND }, - { XML_NAMESPACE_TEXT, XML_IS_HIDDEN, XML_TOK_TEXTFIELD_IS_HIDDEN }, - { XML_NAMESPACE_TEXT, XML_CURRENT_VALUE, - XML_TOK_TEXTFIELD_CURRENT_VALUE }, - { XML_NAMESPACE_TEXT, XML_TABLE_TYPE, XML_TOK_TEXTFIELD_TABLE_TYPE }, - - XML_TOKEN_MAP_END -}; - -const SvXMLTokenMap& XMLTextImportHelper::GetTextFieldAttrTokenMap() -{ - if ( !pTextFieldAttrTokenMap.get() ) { - pTextFieldAttrTokenMap.reset( - new SvXMLTokenMap(aTextFieldAttrTokenMap) ); - } - - return *pTextFieldAttrTokenMap; - -} - TYPEINIT1( XMLTextFieldImportContext, SvXMLImportContext); XMLTextFieldImportContext::XMLTextFieldImportContext( diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 153d51e71c..ff0c8bb63a 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -27,6 +27,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" + +#include <vector> + +#include <boost/scoped_array.hpp> +#include <boost/tuple/tuple.hpp> + #include <tools/solar.h> #include <tools/debug.hxx> #ifndef _SVSTDARR_STRINGSDTOR_DECL @@ -45,6 +51,7 @@ #include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp> #include <com/sun/star/text/TextContentAnchorType.hpp> #include <com/sun/star/text/XTextFrame.hpp> +#include <com/sun/star/text/XFormField.hpp> #include <com/sun/star/drawing/XShapes.hpp> #include <com/sun/star/util/DateTime.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -56,6 +63,8 @@ #include <xmloff/families.hxx> #include <xmloff/xmlnumfi.hxx> #include <xmloff/xmlnumi.hxx> +#include <xmloff/xmlictxt.hxx> +#include <xmloff/xmlimppr.hxx> #include "txtparai.hxx" #include <xmloff/txtimp.hxx> @@ -97,6 +106,7 @@ using ::rtl::OUStringBuffer; using ::com::sun::star::ucb::XAnyCompare; using namespace ::std; +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::text; @@ -444,9 +454,436 @@ static __FAR_DATA SvXMLTokenMapEntry aTextMasterPageElemTokenMap[] = XML_TOKEN_MAP_END }; +static __FAR_DATA SvXMLTokenMapEntry aTextFieldAttrTokenMap[] = +{ + { XML_NAMESPACE_TEXT, XML_FIXED, XML_TOK_TEXTFIELD_FIXED }, + { XML_NAMESPACE_TEXT, XML_DESCRIPTION, XML_TOK_TEXTFIELD_DESCRIPTION }, + { XML_NAMESPACE_TEXT, XML_HELP, XML_TOK_TEXTFIELD_HELP }, + { XML_NAMESPACE_TEXT, XML_HINT, XML_TOK_TEXTFIELD_HINT }, + { XML_NAMESPACE_TEXT, XML_PLACEHOLDER_TYPE, + XML_TOK_TEXTFIELD_PLACEHOLDER_TYPE }, + { XML_NAMESPACE_TEXT, XML_NAME, XML_TOK_TEXTFIELD_NAME }, + { XML_NAMESPACE_TEXT, XML_FORMULA, XML_TOK_TEXTFIELD_FORMULA }, + { XML_NAMESPACE_STYLE, XML_NUM_FORMAT, XML_TOK_TEXTFIELD_NUM_FORMAT }, + { XML_NAMESPACE_STYLE, XML_NUM_LETTER_SYNC, + XML_TOK_TEXTFIELD_NUM_LETTER_SYNC }, + { XML_NAMESPACE_TEXT, XML_DISPLAY_FORMULA, + XML_TOK_TEXTFIELD_DISPLAY_FORMULA }, + { XML_NAMESPACE_TEXT, XML_VALUE_TYPE, XML_TOK_TEXTFIELD_VALUE_TYPE }, // #i32362#: src680m48++ saves text:value-type + { XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_TOK_TEXTFIELD_VALUE_TYPE }, + { XML_NAMESPACE_TEXT, XML_VALUE, XML_TOK_TEXTFIELD_VALUE }, + { XML_NAMESPACE_OFFICE, XML_VALUE, XML_TOK_TEXTFIELD_VALUE }, + { XML_NAMESPACE_TEXT, XML_STRING_VALUE, XML_TOK_TEXTFIELD_STRING_VALUE }, + { XML_NAMESPACE_OFFICE, XML_STRING_VALUE, XML_TOK_TEXTFIELD_STRING_VALUE }, + { XML_NAMESPACE_TEXT, XML_DATE_VALUE, XML_TOK_TEXTFIELD_DATE_VALUE }, + { XML_NAMESPACE_OFFICE, XML_DATE_VALUE, XML_TOK_TEXTFIELD_DATE_VALUE }, + { XML_NAMESPACE_TEXT, XML_TIME_VALUE, XML_TOK_TEXTFIELD_TIME_VALUE }, + { XML_NAMESPACE_OFFICE, XML_TIME_VALUE, XML_TOK_TEXTFIELD_TIME_VALUE }, + { XML_NAMESPACE_OFFICE, XML_BOOLEAN_VALUE, XML_TOK_TEXTFIELD_BOOL_VALUE}, + { XML_NAMESPACE_OFFICE, XML_CURRENCY, XML_TOK_TEXTFIELD_CURRENCY}, + { XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME, + XML_TOK_TEXTFIELD_DATA_STYLE_NAME }, + { XML_NAMESPACE_TEXT, XML_DISPLAY_OUTLINE_LEVEL, + XML_TOK_TEXTFIELD_NUMBERING_LEVEL }, + { XML_NAMESPACE_TEXT, XML_SEPARATION_CHARACTER, + XML_TOK_TEXTFIELD_NUMBERING_SEPARATOR }, + { XML_NAMESPACE_TEXT, XML_DISPLAY, XML_TOK_TEXTFIELD_DISPLAY }, + { XML_NAMESPACE_TEXT, XML_TIME_ADJUST, XML_TOK_TEXTFIELD_TIME_ADJUST }, + { XML_NAMESPACE_TEXT, XML_DATE_ADJUST, XML_TOK_TEXTFIELD_DATE_ADJUST }, + { XML_NAMESPACE_TEXT, XML_PAGE_ADJUST, XML_TOK_TEXTFIELD_PAGE_ADJUST }, + { XML_NAMESPACE_TEXT, XML_SELECT_PAGE, XML_TOK_TEXTFIELD_SELECT_PAGE }, + { XML_NAMESPACE_TEXT, XML_DATABASE_NAME, XML_TOK_TEXTFIELD_DATABASE_NAME}, + { XML_NAMESPACE_TEXT, XML_TABLE_NAME, XML_TOK_TEXTFIELD_TABLE_NAME }, + { XML_NAMESPACE_TEXT, XML_COLUMN_NAME, XML_TOK_TEXTFIELD_COLUMN_NAME }, + { XML_NAMESPACE_TEXT, XML_ROW_NUMBER, XML_TOK_TEXTFIELD_ROW_NUMBER }, + { XML_NAMESPACE_TEXT, XML_CONDITION, XML_TOK_TEXTFIELD_CONDITION }, + { XML_NAMESPACE_TEXT, XML_STRING_VALUE_IF_TRUE, + XML_TOK_TEXTFIELD_STRING_VALUE_IF_TRUE }, + { XML_NAMESPACE_TEXT, XML_STRING_VALUE_IF_FALSE, + XML_TOK_TEXTFIELD_STRING_VALUE_IF_FALSE }, + { XML_NAMESPACE_TEXT, XML_EDITING_CYCLES, XML_TOK_TEXTFIELD_REVISION }, + { XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL, XML_TOK_TEXTFIELD_OUTLINE_LEVEL}, + { XML_NAMESPACE_TEXT, XML_ACTIVE, XML_TOK_TEXTFIELD_ACTIVE }, + { XML_NAMESPACE_TEXT, XML_NOTE_CLASS, XML_TOK_TEXTFIELD_NOTE_CLASS }, + { XML_NAMESPACE_TEXT, XML_REFERENCE_FORMAT, + XML_TOK_TEXTFIELD_REFERENCE_FORMAT }, + { XML_NAMESPACE_TEXT, XML_REF_NAME, XML_TOK_TEXTFIELD_REF_NAME }, + { XML_NAMESPACE_TEXT, XML_CONNECTION_NAME, + XML_TOK_TEXTFIELD_CONNECTION_NAME }, + { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_TEXTFIELD_HREF }, + { XML_NAMESPACE_OFFICE, XML_TARGET_FRAME_NAME, + XML_TOK_TEXTFIELD_TARGET_FRAME }, + { XML_NAMESPACE_TEXT, XML_ANNOTATION, XML_TOK_TEXTFIELD_ANNOTATION }, + { XML_NAMESPACE_SCRIPT, XML_LANGUAGE, XML_TOK_TEXTFIELD_LANGUAGE }, + { XML_NAMESPACE_TEXT, XML_KIND, XML_TOK_TEXTFIELD_MEASURE_KIND }, + { XML_NAMESPACE_TEXT, XML_IS_HIDDEN, XML_TOK_TEXTFIELD_IS_HIDDEN }, + { XML_NAMESPACE_TEXT, XML_CURRENT_VALUE, + XML_TOK_TEXTFIELD_CURRENT_VALUE }, + { XML_NAMESPACE_TEXT, XML_TABLE_TYPE, XML_TOK_TEXTFIELD_TABLE_TYPE }, + + XML_TOKEN_MAP_END +}; + + // maximum allowed length of combined characters field #define MAX_COMBINED_CHARACTERS 6 +struct SAL_DLLPRIVATE XMLTextImportHelper::Impl + : private ::boost::noncopyable +{ + ::std::auto_ptr<SvXMLTokenMap> m_pTextElemTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextPElemTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextPAttrTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextFieldAttrTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextNumberedParagraphAttrTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextListBlockAttrTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextListBlockElemTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextFrameAttrTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextContourAttrTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextHyperlinkAttrTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextMasterPageElemTokenMap; + ::std::auto_ptr<SvStringsDtor> m_pPrevFrmNames; + ::std::auto_ptr<SvStringsDtor> m_pNextFrmNames; + + // --> OD 2008-04-25 #refactorlists# + ::std::auto_ptr<XMLTextListsHelper> m_pTextListsHelper; + // <-- + + SvXMLImportContextRef m_xAutoStyles; + SvXMLImportContextRef m_xFontDecls; + + XMLSectionList_Impl m_SectionList; + + UniReference< SvXMLImportPropertyMapper > m_xParaImpPrMap; + UniReference< SvXMLImportPropertyMapper > m_xTextImpPrMap; + UniReference< SvXMLImportPropertyMapper > m_xFrameImpPrMap; + UniReference< SvXMLImportPropertyMapper > m_xSectionImpPrMap; + UniReference< SvXMLImportPropertyMapper > m_xRubyImpPrMap; + + ::std::auto_ptr<SvI18NMap> m_pRenameMap; + // --> OD 2006-10-12 #i69629# - change and extend data structure: + // - data structure contains candidates of paragraph styles, which + // will be assigned to the outline style + // - data structure contains more than one candidate for each list level + // of the outline style + ::boost::scoped_array< ::std::vector< ::rtl::OUString > > + m_pOutlineStylesCandidates; + // <-- + + // start range, xml:id, RDFa stuff + typedef ::boost::tuple< + uno::Reference<text::XTextRange>, ::rtl::OUString, + ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > > + BookmarkMapEntry_t; + /// start ranges for open bookmarks + ::std::map< ::rtl::OUString, BookmarkMapEntry_t, + ::comphelper::UStringLess> m_BookmarkStartRanges; + + typedef ::std::vector< ::rtl::OUString > BookmarkVector_t; + BookmarkVector_t m_BookmarkVector; + + /// name of the last 'open' redline that started between paragraphs + ::rtl::OUString m_sOpenRedlineIdentifier; + + uno::Reference<text::XText> m_xText; + uno::Reference<text::XTextCursor> m_xCursor; + uno::Reference<text::XTextRange> m_xCursorAsRange; + uno::Reference<container::XNameContainer> m_xParaStyles; + uno::Reference<container::XNameContainer> m_xTextStyles; + uno::Reference<container::XNameContainer> m_xNumStyles; + uno::Reference<container::XNameContainer> m_xFrameStyles; + uno::Reference<container::XNameContainer> m_xPageStyles; + uno::Reference<container::XIndexReplace> m_xChapterNumbering; + uno::Reference<container::XNameAccess> m_xTextFrames; + uno::Reference<container::XNameAccess> m_xGraphics; + uno::Reference<container::XNameAccess> m_xObjects; + uno::Reference<lang::XMultiServiceFactory> m_xServiceFactory; + + SvXMLImport & m_rSvXMLImport; + + bool m_bInsertMode : 1; + bool m_bStylesOnlyMode : 1; + bool m_bBlockMode : 1; + bool m_bProgress : 1; + bool m_bOrganizerMode : 1; + bool m_bBodyContentStarted : 1; + + // #107848# + // One more flag to remember if we are inside a deleted redline section + bool m_bInsideDeleteContext : 1; + + typedef ::std::pair< ::rtl::OUString, ::rtl::OUString> field_name_type_t; + typedef ::std::pair< ::rtl::OUString, ::rtl::OUString > field_param_t; + typedef ::std::vector< field_param_t > field_params_t; + typedef ::std::pair< field_name_type_t, field_params_t > field_stack_item_t; + typedef ::std::stack< field_stack_item_t > field_stack_t; + + field_stack_t m_FieldStack; + + ::rtl::OUString m_sCellParaStyleDefault; + + Impl( uno::Reference<frame::XModel> const& rModel, + SvXMLImport & rImport, + bool const bInsertMode, bool const bStylesOnlyMode, + bool const bProgress, bool const bBlockMode, + bool const bOrganizerMode) + : m_pTextElemTokenMap( 0 ) + , m_pTextPElemTokenMap( 0 ) + , m_pTextPAttrTokenMap( 0 ) + , m_pTextFieldAttrTokenMap( 0 ) + , m_pTextNumberedParagraphAttrTokenMap( 0 ) + , m_pTextListBlockAttrTokenMap( 0 ) + , m_pTextListBlockElemTokenMap( 0 ) + , m_pTextFrameAttrTokenMap( 0 ) + , m_pTextContourAttrTokenMap( 0 ) + , m_pTextHyperlinkAttrTokenMap( 0 ) + , m_pTextMasterPageElemTokenMap( 0 ) + , m_pPrevFrmNames( 0 ) + , m_pNextFrmNames( 0 ) + // --> OD 2008-04-25 #refactorlists# + , m_pTextListsHelper( new XMLTextListsHelper() ) + // <-- + , m_pRenameMap( 0 ) + // --> OD 2006-10-12 #i69629# + , m_pOutlineStylesCandidates( 0 ) + // <-- + , m_xServiceFactory( rModel, UNO_QUERY ) + , m_rSvXMLImport( rImport ) + , m_bInsertMode( bInsertMode ) + , m_bStylesOnlyMode( bStylesOnlyMode ) + , m_bBlockMode( bBlockMode ) + , m_bProgress( bProgress ) + , m_bOrganizerMode( bOrganizerMode ) + , m_bBodyContentStarted( true ) + // #107848# Initialize inside_deleted_section flag correctly + , m_bInsideDeleteContext( false ) + { + } + + void InitOutlineStylesCandidates() + { + if (!m_pOutlineStylesCandidates) + { + size_t const size(m_xChapterNumbering->getCount()); + m_pOutlineStylesCandidates.reset( + new ::std::vector< ::rtl::OUString >[size] ); + } + } + +}; + + +uno::Reference< text::XText > & XMLTextImportHelper::GetText() +{ + return m_pImpl->m_xText; +} + +uno::Reference< text::XTextCursor > & XMLTextImportHelper::GetCursor() +{ + return m_pImpl->m_xCursor; +} + +uno::Reference< text::XTextRange > & XMLTextImportHelper::GetCursorAsRange() +{ + return m_pImpl->m_xCursorAsRange; +} + +bool XMLTextImportHelper::IsInsertMode() const +{ + return m_pImpl->m_bInsertMode; +} + +bool XMLTextImportHelper::IsStylesOnlyMode() const +{ + return m_pImpl->m_bStylesOnlyMode; +} + +bool XMLTextImportHelper::IsBlockMode() const +{ + return m_pImpl->m_bBlockMode; +} + +bool XMLTextImportHelper::IsOrganizerMode() const +{ + return m_pImpl->m_bOrganizerMode; +} + +bool XMLTextImportHelper::IsProgress() const +{ + return m_pImpl->m_bProgress; +} + +XMLSectionList_Impl & XMLTextImportHelper::GetSectionList() +{ + return m_pImpl->m_SectionList; +} + +uno::Reference<container::XNameContainer> const& +XMLTextImportHelper::GetParaStyles() const +{ + return m_pImpl->m_xParaStyles; +} + +uno::Reference<container::XNameContainer> const& +XMLTextImportHelper::GetTextStyles() const +{ + return m_pImpl->m_xTextStyles; +} + +uno::Reference<container::XNameContainer> const& +XMLTextImportHelper::GetNumberingStyles() const +{ + return m_pImpl->m_xNumStyles; +} + +uno::Reference<container::XNameContainer> const& +XMLTextImportHelper::GetFrameStyles() const +{ + return m_pImpl->m_xFrameStyles; +} + +uno::Reference<container::XNameContainer> const& +XMLTextImportHelper::GetPageStyles() const +{ + return m_pImpl->m_xPageStyles; +} + +uno::Reference<container::XIndexReplace> const& +XMLTextImportHelper::GetChapterNumbering() const +{ + return m_pImpl->m_xChapterNumbering; +} + +UniReference< SvXMLImportPropertyMapper > const& +XMLTextImportHelper::GetParaImportPropertySetMapper() const +{ + return m_pImpl->m_xParaImpPrMap; +} + +UniReference< SvXMLImportPropertyMapper > const& +XMLTextImportHelper::GetTextImportPropertySetMapper() const +{ + return m_pImpl->m_xTextImpPrMap; +} + +UniReference< SvXMLImportPropertyMapper > const& +XMLTextImportHelper::GetFrameImportPropertySetMapper() const +{ + return m_pImpl->m_xFrameImpPrMap; +} + +UniReference< SvXMLImportPropertyMapper > const& +XMLTextImportHelper::GetSectionImportPropertySetMapper() const +{ + return m_pImpl->m_xSectionImpPrMap; +} + +UniReference< SvXMLImportPropertyMapper > const& +XMLTextImportHelper::GetRubyImportPropertySetMapper() const +{ + return m_pImpl->m_xRubyImpPrMap; +} + +void XMLTextImportHelper::SetInsideDeleteContext(bool const bNew) +{ + m_pImpl->m_bInsideDeleteContext = bNew; +} + +bool XMLTextImportHelper::IsInsideDeleteContext() const +{ + return m_pImpl->m_bInsideDeleteContext; +} + +SvXMLImport & XMLTextImportHelper::GetXMLImport() +{ + return m_pImpl->m_rSvXMLImport; +} + +XMLTextListsHelper & XMLTextImportHelper::GetTextListHelper() +{ + return *m_pImpl->m_pTextListsHelper; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextElemTokenMap() +{ + if (!m_pImpl->m_pTextElemTokenMap.get()) + { + m_pImpl->m_pTextElemTokenMap.reset( + new SvXMLTokenMap( aTextElemTokenMap )); + } + return *m_pImpl->m_pTextElemTokenMap; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextPElemTokenMap() +{ + if (!m_pImpl->m_pTextPElemTokenMap.get()) + { + m_pImpl->m_pTextPElemTokenMap.reset( + new SvXMLTokenMap( aTextPElemTokenMap )); + } + return *m_pImpl->m_pTextPElemTokenMap; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextPAttrTokenMap() +{ + if (!m_pImpl->m_pTextPAttrTokenMap.get()) + { + m_pImpl->m_pTextPAttrTokenMap.reset( + new SvXMLTokenMap( aTextPAttrTokenMap )); + } + return *m_pImpl->m_pTextPAttrTokenMap; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextFrameAttrTokenMap() +{ + if (!m_pImpl->m_pTextFrameAttrTokenMap.get()) + { + m_pImpl->m_pTextFrameAttrTokenMap.reset( + new SvXMLTokenMap( aTextFrameAttrTokenMap )); + } + return *m_pImpl->m_pTextFrameAttrTokenMap; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextContourAttrTokenMap() +{ + if (!m_pImpl->m_pTextContourAttrTokenMap.get()) + { + m_pImpl->m_pTextContourAttrTokenMap.reset( + new SvXMLTokenMap( aTextContourAttrTokenMap )); + } + return *m_pImpl->m_pTextContourAttrTokenMap; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextHyperlinkAttrTokenMap() +{ + if (!m_pImpl->m_pTextHyperlinkAttrTokenMap.get()) + { + m_pImpl->m_pTextHyperlinkAttrTokenMap.reset( + new SvXMLTokenMap( aTextHyperlinkAttrTokenMap )); + } + return *m_pImpl->m_pTextHyperlinkAttrTokenMap; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextMasterPageElemTokenMap() +{ + if (!m_pImpl->m_pTextMasterPageElemTokenMap.get()) + { + m_pImpl->m_pTextMasterPageElemTokenMap.reset( + new SvXMLTokenMap( aTextMasterPageElemTokenMap )); + } + return *m_pImpl->m_pTextMasterPageElemTokenMap; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextFieldAttrTokenMap() +{ + if (!m_pImpl->m_pTextFieldAttrTokenMap.get()) + { + m_pImpl->m_pTextFieldAttrTokenMap.reset( + new SvXMLTokenMap( aTextFieldAttrTokenMap )); + } + return *m_pImpl->m_pTextFieldAttrTokenMap; +} + namespace { @@ -513,111 +950,48 @@ namespace } XMLTextImportHelper::XMLTextImportHelper( - const Reference < XModel >& rModel, + uno::Reference<frame::XModel> const& rModel, SvXMLImport& rImport, - sal_Bool bInsertM, sal_Bool bStylesOnlyM, - sal_Bool bPrg, - sal_Bool bBlockM, - sal_Bool bOrganizerM ) -: pTextElemTokenMap( 0 ) -, pTextPElemTokenMap( 0 ) -, pTextPAttrTokenMap( 0 ) -, pTextFieldAttrTokenMap( 0 ) -, pTextNumberedParagraphAttrTokenMap( 0 ) -, pTextListBlockAttrTokenMap( 0 ) -, pTextListBlockElemTokenMap( 0 ) -, pTextFrameAttrTokenMap( 0 ) -, pTextContourAttrTokenMap( 0 ) -, pTextHyperlinkAttrTokenMap( 0 ) -, pTextMasterPageElemTokenMap( 0 ) -, pPrevFrmNames( 0 ) -, pNextFrmNames( 0 ) - -// --> OD 2008-04-25 #refactorlists# -, mpTextListsHelper( new XMLTextListsHelper() ) -// <-- - -, pRenameMap( 0 ) -// --> OD 2006-10-12 #i69629# -, mpOutlineStylesCandidates( 0 ) -// <-- - -, pFootnoteBackpatcher( NULL ) -, pSequenceIdBackpatcher( NULL ) -, pSequenceNameBackpatcher( NULL ) - -, xServiceFactory( rModel, UNO_QUERY ) - -, rSvXMLImport( rImport ) - -, bInsertMode( bInsertM ) -, bStylesOnlyMode( bStylesOnlyM ) -, bBlockMode( bBlockM ) -, bProgress( bPrg ) -, bOrganizerMode( bOrganizerM ) -, bBodyContentStarted( sal_True ) - - // #107848# - // Initialize inside_deleted_section flag correctly -, bInsideDeleteContext( sal_False ) - -, sParaStyleName(RTL_CONSTASCII_USTRINGPARAM("ParaStyleName")) -, sCharStyleName(RTL_CONSTASCII_USTRINGPARAM("CharStyleName")) -, sHeadingStyleName(RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName")) -, sNumberingLevel(RTL_CONSTASCII_USTRINGPARAM("NumberingLevel")) -, sNumberingStartValue(RTL_CONSTASCII_USTRINGPARAM("NumberingStartValue")) -, sNumberingRules(RTL_CONSTASCII_USTRINGPARAM("NumberingRules")) -, sParaIsNumberingRestart(RTL_CONSTASCII_USTRINGPARAM("ParaIsNumberingRestart")) -, sNumberingIsNumber(RTL_CONSTASCII_USTRINGPARAM("NumberingIsNumber")) -, sCurrentPresentation(RTL_CONSTASCII_USTRINGPARAM("CurrentPresentation")) -, sSequenceNumber(RTL_CONSTASCII_USTRINGPARAM("SequenceNumber")) -, sSourceName(RTL_CONSTASCII_USTRINGPARAM("SourceName")) -, sChainNextName(RTL_CONSTASCII_USTRINGPARAM("ChainNextName")) -, sChainPrevName(RTL_CONSTASCII_USTRINGPARAM("ChainPrevName")) -, sHyperLinkURL(RTL_CONSTASCII_USTRINGPARAM("HyperLinkURL")) -, sHyperLinkName(RTL_CONSTASCII_USTRINGPARAM("HyperLinkName")) -, sHyperLinkTarget(RTL_CONSTASCII_USTRINGPARAM("HyperLinkTarget")) -, sUnvisitedCharStyleName(RTL_CONSTASCII_USTRINGPARAM("UnvisitedCharStyleName")) -, sVisitedCharStyleName(RTL_CONSTASCII_USTRINGPARAM("VisitedCharStyleName")) -, sTextFrame(RTL_CONSTASCII_USTRINGPARAM("TextFrame")) -, sPageDescName(RTL_CONSTASCII_USTRINGPARAM("PageDescName")) -, sServerMap(RTL_CONSTASCII_USTRINGPARAM("ServerMap")) -, sHyperLinkEvents(RTL_CONSTASCII_USTRINGPARAM("HyperLinkEvents")) -, sContent(RTL_CONSTASCII_USTRINGPARAM("Content")) -, sServiceCombinedCharacters(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.CombinedCharacters")) -, sNumberingStyleName(RTL_CONSTASCII_USTRINGPARAM("NumberingStyleName")) -// --> OD 2008-04-23 #refactorlists# -, sPropNameDefaultListId(RTL_CONSTASCII_USTRINGPARAM("DefaultListId")) -, sPropNameListId(RTL_CONSTASCII_USTRINGPARAM("ListId")) -, sOutlineLevel( RTL_CONSTASCII_USTRINGPARAM("OutlineLevel")) //#outline level,add by zhaojianwei -// <-- + bool const bInsertMode, bool const bStylesOnlyMode, + bool const bProgress, bool const bBlockMode, + bool const bOrganizerMode) + : m_pImpl( new Impl(rModel, rImport, bInsertMode, bStylesOnlyMode, + bProgress, bBlockMode, bOrganizerMode) ) + , m_pBackpatcherImpl( MakeBackpatcherImpl() ) { + static ::rtl::OUString s_PropNameDefaultListId( + RTL_CONSTASCII_USTRINGPARAM("DefaultListId")); + Reference< XChapterNumberingSupplier > xCNSupplier( rModel, UNO_QUERY ); if( xCNSupplier.is() ) { - xChapterNumbering = xCNSupplier->getChapterNumberingRules(); + m_pImpl->m_xChapterNumbering = xCNSupplier->getChapterNumberingRules(); // --> OD 2008-05-15 #refactorlists# - if ( xChapterNumbering.is() ) + if (m_pImpl->m_xChapterNumbering.is()) { - Reference< XPropertySet > xNumRuleProps( xChapterNumbering, UNO_QUERY ); + Reference< XPropertySet > const xNumRuleProps( + m_pImpl->m_xChapterNumbering, UNO_QUERY); if ( xNumRuleProps.is() ) { Reference< XPropertySetInfo > xNumRulePropSetInfo( xNumRuleProps->getPropertySetInfo()); - if ( xNumRulePropSetInfo.is() && - xNumRulePropSetInfo->hasPropertyByName( sPropNameDefaultListId) ) + if (xNumRulePropSetInfo.is() && + xNumRulePropSetInfo->hasPropertyByName( + s_PropNameDefaultListId)) { ::rtl::OUString sListId; - xNumRuleProps->getPropertyValue( sPropNameDefaultListId ) >>= sListId; + xNumRuleProps->getPropertyValue(s_PropNameDefaultListId) + >>= sListId; DBG_ASSERT( sListId.getLength() != 0, "no default list id found at chapter numbering rules instance. Serious defect -> please inform OD." ); if ( sListId.getLength() ) { - Reference< XNamed > xChapterNumNamed( xChapterNumbering, UNO_QUERY ); + Reference< XNamed > const xChapterNumNamed( + m_pImpl->m_xChapterNumbering, UNO_QUERY); if ( xChapterNumNamed.is() ) { - mpTextListsHelper->KeepListAsProcessed( + m_pImpl->m_pTextListsHelper->KeepListAsProcessed( sListId, xChapterNumNamed->getName(), ::rtl::OUString() ); @@ -639,72 +1013,81 @@ XMLTextImportHelper::XMLTextImportHelper( const OUString aParaStyles(RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles")); if( xFamilies->hasByName( aParaStyles ) ) { - xParaStyles.set(xFamilies->getByName( aParaStyles ), UNO_QUERY); + m_pImpl->m_xParaStyles.set(xFamilies->getByName(aParaStyles), + UNO_QUERY); } const OUString aCharStyles(RTL_CONSTASCII_USTRINGPARAM("CharacterStyles")); if( xFamilies->hasByName( aCharStyles ) ) { - xTextStyles.set(xFamilies->getByName( aCharStyles ), UNO_QUERY); + m_pImpl->m_xTextStyles.set(xFamilies->getByName(aCharStyles), + UNO_QUERY); } const OUString aNumStyles(RTL_CONSTASCII_USTRINGPARAM("NumberingStyles")); if( xFamilies->hasByName( aNumStyles ) ) { - xNumStyles.set(xFamilies->getByName( aNumStyles ), UNO_QUERY); + m_pImpl->m_xNumStyles.set(xFamilies->getByName(aNumStyles), + UNO_QUERY); } const OUString aFrameStyles(RTL_CONSTASCII_USTRINGPARAM("FrameStyles")); if( xFamilies->hasByName( aFrameStyles ) ) { - xFrameStyles.set(xFamilies->getByName( aFrameStyles ), UNO_QUERY); + m_pImpl->m_xFrameStyles.set(xFamilies->getByName(aFrameStyles), + UNO_QUERY); } const OUString aPageStyles(RTL_CONSTASCII_USTRINGPARAM("PageStyles")); if( xFamilies->hasByName( aPageStyles ) ) { - xPageStyles.set(xFamilies->getByName( aPageStyles ), UNO_QUERY); + m_pImpl->m_xPageStyles.set(xFamilies->getByName(aPageStyles), + UNO_QUERY); } } Reference < XTextFramesSupplier > xTFS( rModel, UNO_QUERY ); if( xTFS.is() ) - xTextFrames.set(xTFS->getTextFrames()); + { + m_pImpl->m_xTextFrames.set(xTFS->getTextFrames()); + } Reference < XTextGraphicObjectsSupplier > xTGOS( rModel, UNO_QUERY ); if( xTGOS.is() ) - xGraphics.set(xTGOS->getGraphicObjects()); + { + m_pImpl->m_xGraphics.set(xTGOS->getGraphicObjects()); + } Reference < XTextEmbeddedObjectsSupplier > xTEOS( rModel, UNO_QUERY ); if( xTEOS.is() ) - xObjects.set(xTEOS->getEmbeddedObjects()); + { + m_pImpl->m_xObjects.set(xTEOS->getEmbeddedObjects()); + } XMLPropertySetMapper *pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA ); - xParaImpPrMap = new XMLTextImportPropertyMapper( pPropMapper, rImport ); + m_pImpl->m_xParaImpPrMap = + new XMLTextImportPropertyMapper( pPropMapper, rImport ); pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT ); - xTextImpPrMap = new XMLTextImportPropertyMapper( pPropMapper, rImport ); + m_pImpl->m_xTextImpPrMap = + new XMLTextImportPropertyMapper( pPropMapper, rImport ); pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_FRAME ); - xFrameImpPrMap = new XMLTextImportPropertyMapper( pPropMapper, rImport ); + m_pImpl->m_xFrameImpPrMap = + new XMLTextImportPropertyMapper( pPropMapper, rImport ); pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_SECTION ); - xSectionImpPrMap = new XMLTextImportPropertyMapper( pPropMapper, rImport ); + m_pImpl->m_xSectionImpPrMap = + new XMLTextImportPropertyMapper( pPropMapper, rImport ); pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_RUBY ); - xRubyImpPrMap = new SvXMLImportPropertyMapper( pPropMapper, rImport ); + m_pImpl->m_xRubyImpPrMap = + new SvXMLImportPropertyMapper( pPropMapper, rImport ); } XMLTextImportHelper::~XMLTextImportHelper() { - // --> OD 2006-10-12 #i69629# - delete [] mpOutlineStylesCandidates; - // <-- - - aBookmarkVector.clear(); - - _FinitBackpatcher(); } SvXMLImportPropertyMapper *XMLTextImportHelper::CreateShapeExtPropMapper(SvXMLImport& rImport) @@ -771,75 +1154,46 @@ SvXMLImportPropertyMapper* void XMLTextImportHelper::SetCursor( const Reference < XTextCursor > & rCursor ) { - xCursor.set(rCursor); - xText.set(rCursor->getText()); - xCursorAsRange.set( rCursor, UNO_QUERY ); + m_pImpl->m_xCursor.set(rCursor); + m_pImpl->m_xText.set(rCursor->getText()); + m_pImpl->m_xCursorAsRange.set( rCursor, UNO_QUERY ); } void XMLTextImportHelper::ResetCursor() { - xCursor.set(0); - xText.set(0); - xCursorAsRange.set(0); -} - -SvXMLTokenMap *XMLTextImportHelper::_GetTextElemTokenMap() -{ - return new SvXMLTokenMap( aTextElemTokenMap ); -} - -SvXMLTokenMap *XMLTextImportHelper::_GetTextPElemTokenMap() -{ - return new SvXMLTokenMap( aTextPElemTokenMap ); -} - -SvXMLTokenMap *XMLTextImportHelper::_GetTextPAttrTokenMap() -{ - return new SvXMLTokenMap( aTextPAttrTokenMap ); -} - -SvXMLTokenMap *XMLTextImportHelper::_GetTextFrameAttrTokenMap() -{ - return new SvXMLTokenMap( aTextFrameAttrTokenMap ); -} - -SvXMLTokenMap *XMLTextImportHelper::_GetTextContourAttrTokenMap() -{ - return new SvXMLTokenMap( aTextContourAttrTokenMap ); -} - - -SvXMLTokenMap *XMLTextImportHelper::_GetTextHyperlinkAttrTokenMap() -{ - return new SvXMLTokenMap( aTextHyperlinkAttrTokenMap ); + m_pImpl->m_xCursor.set(0); + m_pImpl->m_xText.set(0); + m_pImpl->m_xCursorAsRange.set(0); } -SvXMLTokenMap *XMLTextImportHelper::_GetTextMasterPageElemTokenMap() -{ - return new SvXMLTokenMap( aTextMasterPageElemTokenMap ); -} sal_Bool XMLTextImportHelper::HasFrameByName( const OUString& rName ) const { - return ( xTextFrames.is() && xTextFrames->hasByName( rName ) ) || - ( xGraphics.is() && xGraphics->hasByName( rName ) ) || - ( xObjects.is() && xObjects->hasByName( rName ) ); + return (m_pImpl->m_xTextFrames.is() && + m_pImpl->m_xTextFrames->hasByName(rName)) + || (m_pImpl->m_xGraphics.is() && + m_pImpl->m_xGraphics->hasByName(rName)) + || (m_pImpl->m_xObjects.is() && + m_pImpl->m_xObjects->hasByName(rName)); } void XMLTextImportHelper::InsertString( const OUString& rChars ) { - DBG_ASSERT( xText.is(), "no text" ); - DBG_ASSERT( xCursorAsRange.is(), "no range" ); - if( xText.is() ) - xText->insertString( xCursorAsRange, rChars, sal_False ); + DBG_ASSERT(m_pImpl->m_xText.is(), "no text"); + DBG_ASSERT(m_pImpl->m_xCursorAsRange.is(), "no range"); + if (m_pImpl->m_xText.is()) + { + m_pImpl->m_xText->insertString(m_pImpl->m_xCursorAsRange, + rChars, sal_False); + } } void XMLTextImportHelper::InsertString( const OUString& rChars, sal_Bool& rIgnoreLeadingSpace ) { - DBG_ASSERT( xText.is(), "no text" ); - DBG_ASSERT( xCursorAsRange.is(), "no range" ); - if( xText.is() ) + DBG_ASSERT(m_pImpl->m_xText.is(), "no text"); + DBG_ASSERT(m_pImpl->m_xCursorAsRange.is(), "no range"); + if (m_pImpl->m_xText.is()) { sal_Int32 nLen = rChars.getLength(); OUStringBuffer sChars( nLen ); @@ -863,35 +1217,43 @@ void XMLTextImportHelper::InsertString( const OUString& rChars, break; } } - xText->insertString( xCursorAsRange, sChars.makeStringAndClear(), - sal_False ); + m_pImpl->m_xText->insertString(m_pImpl->m_xCursorAsRange, + sChars.makeStringAndClear(), sal_False); } } + void XMLTextImportHelper::InsertControlCharacter( sal_Int16 nControl ) { - DBG_ASSERT( xText.is(), "no text" ); - DBG_ASSERT( xCursorAsRange.is(), "no range" ); - if( xText.is() ) - xText->insertControlCharacter( xCursorAsRange, nControl, sal_False ); + DBG_ASSERT(m_pImpl->m_xText.is(), "no text"); + DBG_ASSERT(m_pImpl->m_xCursorAsRange.is(), "no range"); + if (m_pImpl->m_xText.is()) + { + m_pImpl->m_xText->insertControlCharacter( + m_pImpl->m_xCursorAsRange, nControl, sal_False); + } } void XMLTextImportHelper::InsertTextContent( Reference < XTextContent > & xContent ) { - DBG_ASSERT( xText.is(), "no text" ); - DBG_ASSERT( xCursorAsRange.is(), "no range" ); - if( xText.is() ) - xText->insertTextContent( xCursorAsRange, xContent, sal_False ); + DBG_ASSERT(m_pImpl->m_xText.is(), "no text"); + DBG_ASSERT(m_pImpl->m_xCursorAsRange.is(), "no range"); + if (m_pImpl->m_xText.is()) + { + m_pImpl->m_xText->insertTextContent( + m_pImpl->m_xCursorAsRange, xContent, sal_False); + } } void XMLTextImportHelper::DeleteParagraph() { - DBG_ASSERT( xText.is(), "no text" ); - DBG_ASSERT( xCursor.is(), "no cursor" ); - DBG_ASSERT( xCursorAsRange.is(), "no range" ); + DBG_ASSERT(m_pImpl->m_xText.is(), "no text"); + DBG_ASSERT(m_pImpl->m_xCursor.is(), "no cursor"); + DBG_ASSERT(m_pImpl->m_xCursorAsRange.is(), "no range"); sal_Bool bDelete = sal_True; - Reference < XEnumerationAccess > xEnumAccess( xCursor, UNO_QUERY ); + Reference < XEnumerationAccess > const xEnumAccess( + m_pImpl->m_xCursor, UNO_QUERY); if( xEnumAccess.is() ) { Reference < XEnumeration > xEnum(xEnumAccess->createEnumeration()); @@ -909,10 +1271,11 @@ void XMLTextImportHelper::DeleteParagraph() } if( bDelete ) { - if( xCursor->goLeft( 1, sal_True ) ) + if (m_pImpl->m_xCursor->goLeft( 1, sal_True )) { OUString sEmpty; - xText->insertString( xCursorAsRange, sEmpty, sal_True ); + m_pImpl->m_xText->insertString(m_pImpl->m_xCursorAsRange, + sEmpty, sal_True); } } } @@ -935,9 +1298,10 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars, XMLTextStyleContext *pStyle = 0; sal_uInt16 nFamily = bPara ? XML_STYLE_FAMILY_TEXT_PARAGRAPH : XML_STYLE_FAMILY_TEXT_TEXT; - if( rStyleName.getLength() && xAutoStyles.Is() ) + if (rStyleName.getLength() && m_pImpl->m_xAutoStyles.Is()) { - const SvXMLStyleContext* pTempStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pTempStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( nFamily, rStyleName, sal_True ); pStyle = PTR_CAST( XMLTextStyleContext,pTempStyle); @@ -949,7 +1313,8 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars, if( nCount ) { UniReference < SvXMLImportPropertyMapper > xImpPrMap = - ((SvXMLStylesContext *)&xAutoStyles)->GetImportPropertyMapper(nFamily); + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles) + ->GetImportPropertyMapper(nFamily); if( xImpPrMap.is() ) { UniReference<XMLPropertySetMapper> rPropMapper = @@ -1135,13 +1500,41 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( sal_Bool bSetListAttrs ) // <-- { + static ::rtl::OUString s_ParaStyleName( + RTL_CONSTASCII_USTRINGPARAM("ParaStyleName")); + static ::rtl::OUString s_CharStyleName( + RTL_CONSTASCII_USTRINGPARAM("CharStyleName")); + static ::rtl::OUString s_NumberingRules( + RTL_CONSTASCII_USTRINGPARAM("NumberingRules")); + static ::rtl::OUString s_NumberingIsNumber( + RTL_CONSTASCII_USTRINGPARAM("NumberingIsNumber")); + static ::rtl::OUString s_NumberingLevel( + RTL_CONSTASCII_USTRINGPARAM("NumberingLevel")); + static ::rtl::OUString s_ParaIsNumberingRestart( + RTL_CONSTASCII_USTRINGPARAM("ParaIsNumberingRestart")); + static ::rtl::OUString s_NumberingStartValue( + RTL_CONSTASCII_USTRINGPARAM("NumberingStartValue")); + static ::rtl::OUString s_PropNameListId( + RTL_CONSTASCII_USTRINGPARAM("ListId")); + static ::rtl::OUString s_PageDescName( + RTL_CONSTASCII_USTRINGPARAM("PageDescName")); + static ::rtl::OUString s_ServiceCombinedCharacters( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.text.TextField.CombinedCharacters")); + static ::rtl::OUString s_Content(RTL_CONSTASCII_USTRINGPARAM("Content")); + static ::rtl::OUString s_OutlineLevel( + RTL_CONSTASCII_USTRINGPARAM("OutlineLevel")); + static ::rtl::OUString s_NumberingStyleName( + RTL_CONSTASCII_USTRINGPARAM("NumberingStyleName")); + const sal_uInt16 nFamily = bPara ? XML_STYLE_FAMILY_TEXT_PARAGRAPH : XML_STYLE_FAMILY_TEXT_TEXT; XMLTextStyleContext *pStyle = 0; OUString sStyleName( rStyleName ); - if( sStyleName.getLength() && xAutoStyles.Is() ) + if (sStyleName.getLength() && m_pImpl->m_xAutoStyles.Is()) { - const SvXMLStyleContext* pTempStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pTempStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( nFamily, sStyleName, sal_True ); pStyle = PTR_CAST( XMLTextStyleContext,pTempStyle); } @@ -1156,9 +1549,10 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if( sStyleName.getLength() ) { sStyleName = rImport.GetStyleDisplayName( nFamily, sStyleName ); - const String& rPropName = bPara ? sParaStyleName : sCharStyleName; - const Reference < XNameContainer > & rStyles = bPara ? xParaStyles - : xTextStyles; + const String& rPropName = (bPara) ? s_ParaStyleName : s_CharStyleName; + const Reference < XNameContainer > & rStyles = (bPara) + ? m_pImpl->m_xParaStyles + : m_pImpl->m_xTextStyles; if( rStyles.is() && xPropSetInfo->hasPropertyByName( rPropName ) && rStyles->hasByName( sStyleName ) ) @@ -1174,11 +1568,13 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // is not inside a list and if it by default applies the outline style. bool bApplyOutlineLevelAsListLevel( false ); // --> OD 2007-08-17 #i80724# - if ( bSetListAttrs && bPara && xPropSetInfo->hasPropertyByName( sNumberingRules ) ) + if (bSetListAttrs && bPara + && xPropSetInfo->hasPropertyByName( s_NumberingRules)) // <-- { // Set numbering rules - Reference < XIndexReplace > xNumRules(xPropSet->getPropertyValue( sNumberingRules ), UNO_QUERY); + Reference< XIndexReplace > const xNumRules( + xPropSet->getPropertyValue(s_NumberingRules), UNO_QUERY); XMLTextListBlockContext * pListBlock(0); XMLTextListItemContext * pListItem(0); @@ -1214,7 +1610,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( } // --> OD 2008-08-15 #i92811# - sListId = mpTextListsHelper->GetListIdForListBlock( *pListBlock ); + sListId = m_pImpl->m_pTextListsHelper->GetListIdForListBlock( + *pListBlock); // <-- } else if (pNumberedParagraph) @@ -1268,7 +1665,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // gracefully. try { - xPropSet->setPropertyValue( sNumberingRules, makeAny(xNewNumRules) ); + xPropSet->setPropertyValue( + s_NumberingRules, makeAny(xNewNumRules) ); } catch( Exception e ) { @@ -1279,37 +1677,37 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( } if (!bNumberingIsNumber && - xPropSetInfo->hasPropertyByName( sNumberingIsNumber ) ) + xPropSetInfo->hasPropertyByName(s_NumberingIsNumber)) { - xPropSet->setPropertyValue( sNumberingIsNumber, Any(sal_False) ); + xPropSet->setPropertyValue(s_NumberingIsNumber, Any(sal_False)); } - xPropSet->setPropertyValue( sNumberingLevel, Any(nLevel) ); + xPropSet->setPropertyValue( s_NumberingLevel, Any(nLevel) ); if( pListBlock && pListBlock->IsRestartNumbering() ) { // TODO: property missing - if( xPropSetInfo->hasPropertyByName( sParaIsNumberingRestart ) ) + if (xPropSetInfo->hasPropertyByName(s_ParaIsNumberingRestart)) { sal_Bool bTmp = sal_True; - xPropSet->setPropertyValue(sParaIsNumberingRestart, + xPropSet->setPropertyValue(s_ParaIsNumberingRestart, makeAny(bTmp) ); } pListBlock->ResetRestartNumbering(); } if ( 0 <= nStartValue && - xPropSetInfo->hasPropertyByName( sNumberingStartValue ) ) + xPropSetInfo->hasPropertyByName(s_NumberingStartValue)) { - xPropSet->setPropertyValue(sNumberingStartValue, + xPropSet->setPropertyValue(s_NumberingStartValue, makeAny(nStartValue)); } // --> OD 2008-04-23 #refactorlists# - if ( xPropSetInfo->hasPropertyByName( sPropNameListId ) ) + if (xPropSetInfo->hasPropertyByName(s_PropNameListId)) { if (sListId.getLength()) { - xPropSet->setPropertyValue( sPropNameListId, + xPropSet->setPropertyValue(s_PropNameListId, makeAny(sListId) ); } } @@ -1338,10 +1736,11 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if ( ( bBuildIdFound && nUPD == 680 ) || !pStyle || !pStyle->IsListStyleSet() ) { - if ( xChapterNumbering.is() ) + if (m_pImpl->m_xChapterNumbering.is()) { Reference< XNamed > xNumNamed( xNumRules, UNO_QUERY ); - Reference< XNamed > xChapterNumNamed( xChapterNumbering, UNO_QUERY ); + Reference< XNamed > const xChapterNumNamed ( + m_pImpl->m_xChapterNumbering, UNO_QUERY); if ( xNumNamed.is() && xChapterNumNamed.is() && xNumNamed->getName() == xChapterNumNamed->getName() ) { @@ -1355,7 +1754,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // <-- if ( bRemove ) { - xPropSet->setPropertyValue( sNumberingRules, Any() ); + xPropSet->setPropertyValue( s_NumberingRules, Any() ); } } // <-- @@ -1367,27 +1766,28 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( { pStyle->FillPropertySet( xPropSet ); if( bPara && pStyle->HasMasterPageName() && - xPropSetInfo->hasPropertyByName( sPageDescName ) ) + xPropSetInfo->hasPropertyByName(s_PageDescName)) { OUString sDisplayName( rImport.GetStyleDisplayName( XML_STYLE_FAMILY_MASTER_PAGE, pStyle->GetMasterPageName()) ); if( !sDisplayName.getLength() || - (xPageStyles.is() && - xPageStyles->hasByName( sDisplayName )) ) + (m_pImpl->m_xPageStyles.is() && + m_pImpl->m_xPageStyles->hasByName( sDisplayName))) { - xPropSet->setPropertyValue( sPageDescName, makeAny(sDisplayName) ); + xPropSet->setPropertyValue(s_PageDescName, + makeAny(sDisplayName)); } } if( bPara && pStyle->GetDropCapStyleName().getLength() && - xTextStyles.is() ) + m_pImpl->m_xTextStyles.is()) { OUString sDisplayName( rImport.GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, pStyle->GetDropCapStyleName()) ); - if( xTextStyles->hasByName( sDisplayName ) && + if (m_pImpl->m_xTextStyles->hasByName(sDisplayName) && xPropSetInfo->hasPropertyByName( sDisplayName ) ) { xPropSet->setPropertyValue( pStyle->sDropCapCharStyleName, makeAny(sDisplayName) ); @@ -1398,9 +1798,11 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if (!bPara && pStyle->HasCombinedCharactersLetter()) { // insert combined characters text field - if( xServiceFactory.is() ) + if (m_pImpl->m_xServiceFactory.is()) { - Reference<XPropertySet> xTmp( xServiceFactory->createInstance(sServiceCombinedCharacters), UNO_QUERY ); + uno::Reference<beans::XPropertySet> const xTmp( + m_pImpl->m_xServiceFactory->createInstance( + s_ServiceCombinedCharacters), UNO_QUERY); if( xTmp.is() ) { // fix cursor if larger than possible for @@ -1413,15 +1815,16 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( } // set field value (the combined character string) - xTmp->setPropertyValue(sContent, makeAny(rCursor->getString())); + xTmp->setPropertyValue(s_Content, + makeAny(rCursor->getString())); // insert the field over it's original text Reference<XTextRange> xRange(rCursor, UNO_QUERY); Reference<XTextContent> xTextContent(xTmp, UNO_QUERY); - if (xText.is() && xRange.is()) + if (m_pImpl->m_xText.is() && xRange.is()) { - xText->insertTextContent( xRange, xTextContent, - sal_True ); + m_pImpl->m_xText->insertTextContent( + xRange, xTextContent, sal_True); } } } @@ -1444,10 +1847,12 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( { // --> OD 2009-08-18 #i103817# sal_Int16 nCurrentOutlineLevelInheritedFromParagraphStyle = 0; - const bool bHasOutlineLevelProp( xPropSetInfo->hasPropertyByName( sOutlineLevel ) ); + const bool bHasOutlineLevelProp( + xPropSetInfo->hasPropertyByName(s_OutlineLevel)); if ( bHasOutlineLevelProp ) { - xPropSet->getPropertyValue( sOutlineLevel ) >>= nCurrentOutlineLevelInheritedFromParagraphStyle; + xPropSet->getPropertyValue(s_OutlineLevel) + >>= nCurrentOutlineLevelInheritedFromParagraphStyle; } // <-- //if ( bPara && nOutlineLevel != -1 ) //#outline level,removed by zhaojianwei @@ -1460,7 +1865,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // attribute outline level, the paragraph attribute value is left unset if ( nCurrentOutlineLevelInheritedFromParagraphStyle != nOutlineLevel ) { - xPropSet->setPropertyValue( sOutlineLevel, + xPropSet->setPropertyValue( s_OutlineLevel, makeAny( static_cast<sal_Int16>(nOutlineLevel) ) ); } }//<-end,zhaojianwei @@ -1469,11 +1874,11 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if ( bApplyOutlineLevelAsListLevel ) { sal_Int16 nNumLevel = -1; - xPropSet->getPropertyValue( sNumberingLevel ) >>= nNumLevel; + xPropSet->getPropertyValue( s_NumberingLevel ) >>= nNumLevel; if ( nNumLevel == -1 || nNumLevel != (nOutlineLevel - 1) ) { - xPropSet->setPropertyValue( sNumberingLevel, + xPropSet->setPropertyValue( s_NumberingLevel, makeAny( static_cast<sal_Int8>(nOutlineLevel - 1) ) ); } } @@ -1486,7 +1891,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // a candidate for an assignment to the list level of the outline // style, if it has no direct list style property and (if exists) the // automatic paragraph style has also no direct list style set. - if( xParaStyles->hasByName( sStyleName ) ) + if (m_pImpl->m_xParaStyles->hasByName(sStyleName)) { bool bOutlineStyleCandidate( false ); @@ -1538,19 +1943,19 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // Assure that heading applies the outline style if ( ( !pStyle || !pStyle->IsListStyleSet() ) && !bOutlineStyleCandidate && - xChapterNumbering.is() ) + m_pImpl->m_xChapterNumbering.is()) { OUString sEmptyStr; if ( !lcl_HasListStyle( sStyleName, - xParaStyles, GetXMLImport(), - sNumberingStyleName, + m_pImpl->m_xParaStyles, GetXMLImport(), + s_NumberingStyleName, sEmptyStr ) ) { // heading not in a list --> apply outline style - xPropSet->setPropertyValue( sNumberingRules, - makeAny(xChapterNumbering) ); - xPropSet->setPropertyValue( sNumberingLevel, - makeAny( static_cast<sal_Int8>(nOutlineLevel - 1) ) ); + xPropSet->setPropertyValue( s_NumberingRules, + makeAny(m_pImpl->m_xChapterNumbering) ); + xPropSet->setPropertyValue( s_NumberingLevel, + makeAny(static_cast<sal_Int8>(nOutlineLevel - 1))); } } // <-- @@ -1564,7 +1969,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if ( nCurrentOutlineLevelInheritedFromParagraphStyle != 0 ) { sal_Int16 nZero = 0; - xPropSet->setPropertyValue( sOutlineLevel, makeAny( static_cast<sal_Int16>(nZero) ) ); + xPropSet->setPropertyValue(s_OutlineLevel, + makeAny( static_cast<sal_Int16>(nZero) )); } }//<-end,zhaojianwei } @@ -1576,38 +1982,39 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( void XMLTextImportHelper::FindOutlineStyleName( ::rtl::OUString& rStyleName, sal_Int8 nOutlineLevel ) { + static ::rtl::OUString s_HeadingStyleName( + RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName")); + // style name empty? if( rStyleName.getLength() == 0 ) { // Empty? Then we need o do stuff. Let's do error checking first. - if( xChapterNumbering.is() && + if (m_pImpl->m_xChapterNumbering.is() && ( nOutlineLevel > 0 ) && - ( nOutlineLevel <= xChapterNumbering->getCount() ) ) + (nOutlineLevel <= m_pImpl->m_xChapterNumbering->getCount())) { nOutlineLevel--; // for the remainder, the level's are 0-based // empty style name: look-up previously used name // if we don't have a previously used name, we'll use the default - if ( mpOutlineStylesCandidates == NULL ) - { - mpOutlineStylesCandidates = new ::std::vector<OUString>[xChapterNumbering->getCount()]; - } - - if ( mpOutlineStylesCandidates[nOutlineLevel].empty() ) + m_pImpl->InitOutlineStylesCandidates(); + if (m_pImpl->m_pOutlineStylesCandidates[nOutlineLevel].empty()) { // no other name used previously? Then use default // iterate over property value sequence to find the style name Sequence<PropertyValue> aProperties; - xChapterNumbering->getByIndex( nOutlineLevel ) >>= aProperties; + m_pImpl->m_xChapterNumbering->getByIndex( nOutlineLevel ) + >>= aProperties; for( sal_Int32 i = 0; i < aProperties.getLength(); i++ ) { - if( aProperties[i].Name == sHeadingStyleName ) + if (aProperties[i].Name == s_HeadingStyleName) { rtl::OUString aOutlineStyle; aProperties[i].Value >>= aOutlineStyle; - mpOutlineStylesCandidates[nOutlineLevel].push_back( aOutlineStyle ); + m_pImpl->m_pOutlineStylesCandidates[nOutlineLevel] + .push_back( aOutlineStyle ); break; // early out, if we found it!. } } @@ -1616,7 +2023,8 @@ void XMLTextImportHelper::FindOutlineStyleName( ::rtl::OUString& rStyleName, // finally, we'll use the previously used style name for this // format (or the default we've just put into that style) // --> OD 2006-11-06 #i71249# - take last added one - rStyleName = mpOutlineStylesCandidates[nOutlineLevel].back(); + rStyleName = + m_pImpl->m_pOutlineStylesCandidates[nOutlineLevel].back(); // <-- } // else: nothing we can do, so we'll leave it empty @@ -1627,23 +2035,27 @@ void XMLTextImportHelper::FindOutlineStyleName( ::rtl::OUString& rStyleName, void XMLTextImportHelper::AddOutlineStyleCandidate( const sal_Int8 nOutlineLevel, const OUString& rStyleName ) { - if ( rStyleName.getLength() && - xChapterNumbering.is() && - nOutlineLevel > 0 && nOutlineLevel <= xChapterNumbering->getCount() ) + if (rStyleName.getLength() + && m_pImpl->m_xChapterNumbering.is() + && (nOutlineLevel > 0) + && (nOutlineLevel <= m_pImpl->m_xChapterNumbering->getCount())) { - if( !mpOutlineStylesCandidates ) - { - mpOutlineStylesCandidates = new ::std::vector<OUString>[xChapterNumbering->getCount()]; - } - mpOutlineStylesCandidates[nOutlineLevel-1].push_back( rStyleName ); + m_pImpl->InitOutlineStylesCandidates(); + m_pImpl->m_pOutlineStylesCandidates[nOutlineLevel-1].push_back( + rStyleName); } } void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) { - if ( ( mpOutlineStylesCandidates != NULL || bSetEmptyLevels ) && - xChapterNumbering.is() && - !IsInsertMode() ) + static ::rtl::OUString s_NumberingStyleName( + RTL_CONSTASCII_USTRINGPARAM("NumberingStyleName")); + static ::rtl::OUString s_HeadingStyleName( + RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName")); + + if ((m_pImpl->m_pOutlineStylesCandidates != NULL || bSetEmptyLevels) && + m_pImpl->m_xChapterNumbering.is() && + !IsInsertMode()) { bool bChooseLastOne( false ); { @@ -1666,12 +2078,13 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) OUString sOutlineStyleName; { - Reference<XPropertySet> xChapterNumRule( xChapterNumbering, UNO_QUERY ); + Reference<XPropertySet> xChapterNumRule( + m_pImpl->m_xChapterNumbering, UNO_QUERY); const OUString sName(RTL_CONSTASCII_USTRINGPARAM("Name")); xChapterNumRule->getPropertyValue(sName) >>= sOutlineStyleName; } - const sal_Int32 nCount = xChapterNumbering->getCount(); + const sal_Int32 nCount = m_pImpl->m_xChapterNumbering->getCount(); // --> OD 2009-11-13 #i106218# // First collect all paragraph styles choosen for assignment to each // list level of the outline style, then perform the intrinsic assignment. @@ -1683,28 +2096,33 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) for( sal_Int32 i=0; i < nCount; ++i ) { if ( bSetEmptyLevels || - ( mpOutlineStylesCandidates && - !mpOutlineStylesCandidates[i].empty() ) ) + (m_pImpl->m_pOutlineStylesCandidates && + !m_pImpl->m_pOutlineStylesCandidates[i].empty())) { // determine, which candidate is one to be assigned to the list // level of the outline style - if ( mpOutlineStylesCandidates && - !mpOutlineStylesCandidates[i].empty() ) + if (m_pImpl->m_pOutlineStylesCandidates && + !m_pImpl->m_pOutlineStylesCandidates[i].empty()) { if ( bChooseLastOne ) { - sChosenStyles[i] = mpOutlineStylesCandidates[i].back(); + sChosenStyles[i] = + m_pImpl->m_pOutlineStylesCandidates[i].back(); } else { - for ( sal_uInt32 j = 0; j < mpOutlineStylesCandidates[i].size(); ++j ) + for (sal_uInt32 j = 0; + j < m_pImpl->m_pOutlineStylesCandidates[i].size(); + ++j) { - if ( !lcl_HasListStyle( mpOutlineStylesCandidates[i][j], - xParaStyles, GetXMLImport(), - sNumberingStyleName, - sOutlineStyleName ) ) + if (!lcl_HasListStyle( + m_pImpl->m_pOutlineStylesCandidates[i][j], + m_pImpl->m_xParaStyles, GetXMLImport(), + s_NumberingStyleName, + sOutlineStyleName)) { - sChosenStyles[i] = mpOutlineStylesCandidates[i][j]; + sChosenStyles[i] = + m_pImpl->m_pOutlineStylesCandidates[i][j]; break; } } @@ -1715,7 +2133,7 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) // --> OD 2009-11-13 #i106218# Sequence < PropertyValue > aProps( 1 ); PropertyValue *pProps = aProps.getArray(); - pProps->Name = sHeadingStyleName; + pProps->Name = s_HeadingStyleName; for ( sal_Int32 i = 0; i < nCount; ++i ) { // --> OD 2009-12-11 #i107610# @@ -1724,7 +2142,8 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) // <-- { pProps->Value <<= sChosenStyles[i]; - xChapterNumbering->replaceByIndex( i, makeAny( aProps ) ); + m_pImpl->m_xChapterNumbering->replaceByIndex(i, + makeAny( aProps )); } } // <-- @@ -1741,62 +2160,79 @@ void XMLTextImportHelper::SetHyperlink( const OUString& rVisitedStyleName, XMLEventsImportContext* pEvents) { + static ::rtl::OUString s_HyperLinkURL( + RTL_CONSTASCII_USTRINGPARAM("HyperLinkURL")); + static ::rtl::OUString s_HyperLinkName( + RTL_CONSTASCII_USTRINGPARAM("HyperLinkName")); + static ::rtl::OUString s_HyperLinkTarget( + RTL_CONSTASCII_USTRINGPARAM("HyperLinkTarget")); + static ::rtl::OUString s_UnvisitedCharStyleName( + RTL_CONSTASCII_USTRINGPARAM("UnvisitedCharStyleName")); + static ::rtl::OUString s_VisitedCharStyleName( + RTL_CONSTASCII_USTRINGPARAM("VisitedCharStyleName")); + static ::rtl::OUString s_HyperLinkEvents( + RTL_CONSTASCII_USTRINGPARAM("HyperLinkEvents")); + Reference < XPropertySet > xPropSet( rCursor, UNO_QUERY ); Reference < XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo()); - if( !xPropSetInfo.is() || !xPropSetInfo->hasPropertyByName(sHyperLinkURL) ) + if (!xPropSetInfo.is() || !xPropSetInfo->hasPropertyByName(s_HyperLinkURL)) return; - xPropSet->setPropertyValue( sHyperLinkURL, makeAny(rHRef) ); + xPropSet->setPropertyValue(s_HyperLinkURL, makeAny(rHRef)); - if( xPropSetInfo->hasPropertyByName( sHyperLinkName ) ) + if (xPropSetInfo->hasPropertyByName(s_HyperLinkName)) { - xPropSet->setPropertyValue( sHyperLinkName, makeAny(rName) ); + xPropSet->setPropertyValue(s_HyperLinkName, makeAny(rName)); } - if( xPropSetInfo->hasPropertyByName( sHyperLinkTarget ) ) + if (xPropSetInfo->hasPropertyByName(s_HyperLinkTarget)) { - xPropSet->setPropertyValue( sHyperLinkTarget, makeAny(rTargetFrameName) ); + xPropSet->setPropertyValue(s_HyperLinkTarget, + makeAny(rTargetFrameName)); } if ( (pEvents != NULL) && - xPropSetInfo->hasPropertyByName( sHyperLinkEvents )) + xPropSetInfo->hasPropertyByName(s_HyperLinkEvents)) { // The API treats events at hyperlinks differently from most // other properties: You have to set a name replace with the // events in it. The easiest way to to this is to 1) get // events, 2) set new ones, and 3) then put events back. - Reference<XNameReplace> xReplace(xPropSet->getPropertyValue( sHyperLinkEvents ), UNO_QUERY); + uno::Reference<XNameReplace> const xReplace( + xPropSet->getPropertyValue(s_HyperLinkEvents), UNO_QUERY); if (xReplace.is()) { // set events pEvents->SetEvents(xReplace); // put events - xPropSet->setPropertyValue( sHyperLinkEvents, makeAny(xReplace) ); + xPropSet->setPropertyValue(s_HyperLinkEvents, makeAny(xReplace)); } } - if( xTextStyles.is() ) + if (m_pImpl->m_xTextStyles.is()) { OUString sDisplayName( rImport.GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, rStyleName ) ); if( sDisplayName.getLength() && - xPropSetInfo->hasPropertyByName( sUnvisitedCharStyleName ) && - xTextStyles->hasByName( sDisplayName ) ) + xPropSetInfo->hasPropertyByName(s_UnvisitedCharStyleName) && + m_pImpl->m_xTextStyles->hasByName(sDisplayName)) { - xPropSet->setPropertyValue( sUnvisitedCharStyleName, makeAny(sDisplayName) ); + xPropSet->setPropertyValue(s_UnvisitedCharStyleName, + makeAny(sDisplayName)); } sDisplayName = rImport.GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, rVisitedStyleName ); if( sDisplayName.getLength() && - xPropSetInfo->hasPropertyByName( sVisitedCharStyleName ) && - xTextStyles->hasByName( sDisplayName ) ) + xPropSetInfo->hasPropertyByName(s_VisitedCharStyleName) && + m_pImpl->m_xTextStyles->hasByName(sDisplayName)) { - xPropSet->setPropertyValue( sVisitedCharStyleName, makeAny(sDisplayName) ); + xPropSet->setPropertyValue(s_VisitedCharStyleName, + makeAny(sDisplayName)); } } } @@ -1822,9 +2258,10 @@ void XMLTextImportHelper::SetRuby( // the ruby style (ruby-adjust) XMLPropStyleContext *pStyle = 0; - if( rStyleName.getLength() && xAutoStyles.Is() ) + if (rStyleName.getLength() && m_pImpl->m_xAutoStyles.Is()) { - const SvXMLStyleContext* pTempStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pTempStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_TEXT_RUBY, rStyleName, sal_True ); pStyle = PTR_CAST(XMLPropStyleContext,pTempStyle); @@ -1834,14 +2271,14 @@ void XMLTextImportHelper::SetRuby( } // the ruby text character style - if( xTextStyles.is() ) + if (m_pImpl->m_xTextStyles.is()) { OUString sDisplayName( rImport.GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, rTextStyleName ) ); if( (sDisplayName.getLength() > 0) && // xPropSetInfo->hasPropertyByName( sRubyCharStyleName ) && - xTextStyles->hasByName( sDisplayName ) ) + m_pImpl->m_xTextStyles->hasByName( sDisplayName )) { xPropSet->setPropertyValue(sRubyCharStyleName, makeAny(sDisplayName)); } @@ -1851,21 +2288,21 @@ void XMLTextImportHelper::SetRuby( void XMLTextImportHelper::SetAutoStyles( SvXMLStylesContext *pStyles ) { - xAutoStyles = pStyles; + m_pImpl->m_xAutoStyles = pStyles; } void XMLTextImportHelper::SetFontDecls( XMLFontStylesContext *pFontDecls ) { - xFontDecls = pFontDecls; - ((XMLTextImportPropertyMapper *)xParaImpPrMap.get()) + m_pImpl->m_xFontDecls = pFontDecls; + ((XMLTextImportPropertyMapper *)m_pImpl->m_xParaImpPrMap.get()) ->SetFontDecls( pFontDecls ); - ((XMLTextImportPropertyMapper *)xTextImpPrMap.get()) + ((XMLTextImportPropertyMapper *)m_pImpl->m_xTextImpPrMap.get()) ->SetFontDecls( pFontDecls ); } const XMLFontStylesContext *XMLTextImportHelper::GetFontDecls() const { - return (XMLFontStylesContext *)&xFontDecls; + return (XMLFontStylesContext *)&m_pImpl->m_xFontDecls; } sal_Bool XMLTextImportHelper::HasDrawNameAttribute( @@ -1910,7 +2347,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( pContext = new XMLParaContext( rImport, nPrefix, rLocalName, xAttrList, bHeading ); - if( bProgress && XML_TEXT_TYPE_SHAPE != eType ) + if (m_pImpl->m_bProgress && XML_TEXT_TYPE_SHAPE != eType) { rImport.GetProgressBarHelper()->Increment(); } @@ -1935,7 +2372,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( xAttrList ); break; case XML_TOK_TEXT_SEQUENCE_DECLS: - if( (XML_TEXT_TYPE_BODY == eType && bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_HEADER_FOOTER == eType ) { pContext = new XMLVariableDeclsImportContext( @@ -1945,7 +2382,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_TEXT_VARFIELD_DECLS: - if( (XML_TEXT_TYPE_BODY == eType && bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_HEADER_FOOTER == eType ) { pContext = new XMLVariableDeclsImportContext( @@ -1955,7 +2392,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_TEXT_USERFIELD_DECLS: - if( (XML_TEXT_TYPE_BODY == eType && bBodyContentStarted)|| + if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted)|| XML_TEXT_TYPE_HEADER_FOOTER == eType ) { pContext = new XMLVariableDeclsImportContext( @@ -1965,7 +2402,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_TEXT_DDE_DECLS: - if( (XML_TEXT_TYPE_BODY == eType && bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_HEADER_FOOTER == eType ) { pContext = new XMLDdeFieldDeclsImportContext( @@ -1975,7 +2412,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_TEXT_FRAME_PAGE: - if( (XML_TEXT_TYPE_BODY == eType && bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_TEXTBOX == eType || XML_TEXT_TYPE_CHANGED_REGION == eType ) { @@ -1990,7 +2427,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_DRAW_A_PAGE: - if( (XML_TEXT_TYPE_BODY == eType && bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_TEXTBOX == eType || XML_TEXT_TYPE_CHANGED_REGION == eType) { @@ -2080,7 +2517,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; default: - if( (XML_TEXT_TYPE_BODY == eType && bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_TEXTBOX == eType || XML_TEXT_TYPE_CHANGED_REGION == eType ) { @@ -2103,7 +2540,9 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( } if( XML_TEXT_TYPE_BODY == eType && bContent ) - bBodyContentStarted = sal_False; + { + m_pImpl->m_bBodyContentStarted = sal_False; + } return pContext; } @@ -2120,7 +2559,8 @@ SvXMLImportContext *XMLTextImportHelper::CreateTableChildContext( sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName, sal_Bool* pIsSystemLanguage ) { - const SvXMLStyleContext* pStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_DATA_STYLE, sStyleName, sal_True ); @@ -2153,9 +2593,10 @@ sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName, const SvxXMLListStyleContext *XMLTextImportHelper::FindAutoListStyle( const OUString& rName ) const { const SvxXMLListStyleContext *pStyle = 0; - if( xAutoStyles.Is() ) + if (m_pImpl->m_xAutoStyles.Is()) { - const SvXMLStyleContext* pTempStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pTempStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_TEXT_LIST, rName, sal_True ); pStyle = PTR_CAST( SvxXMLListStyleContext ,pTempStyle); @@ -2167,9 +2608,10 @@ const SvxXMLListStyleContext *XMLTextImportHelper::FindAutoListStyle( const OUSt XMLPropStyleContext *XMLTextImportHelper::FindAutoFrameStyle( const OUString& rName ) const { XMLPropStyleContext *pStyle = 0; - if( xAutoStyles.Is() ) + if (m_pImpl->m_xAutoStyles.Is()) { - const SvXMLStyleContext* pTempStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pTempStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_SD_GRAPHICS_ID, rName, sal_True ); pStyle = PTR_CAST( XMLPropStyleContext ,pTempStyle); @@ -2182,9 +2624,10 @@ XMLPropStyleContext* XMLTextImportHelper::FindSectionStyle( const OUString& rName ) const { XMLPropStyleContext* pStyle = NULL; - if (xAutoStyles.Is() ) + if (m_pImpl->m_xAutoStyles.Is()) { - const SvXMLStyleContext* pTempStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pTempStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_TEXT_SECTION, rName, sal_True ); @@ -2198,9 +2641,10 @@ XMLPropStyleContext* XMLTextImportHelper::FindPageMaster( const OUString& rName ) const { XMLPropStyleContext* pStyle = NULL; - if (xAutoStyles.Is() ) + if (m_pImpl->m_xAutoStyles.Is()) { - const SvXMLStyleContext* pTempStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pTempStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_PAGE_MASTER, rName, sal_True ); @@ -2224,63 +2668,75 @@ void XMLTextImportHelper::PopListContext() const SvXMLTokenMap& XMLTextImportHelper::GetTextNumberedParagraphAttrTokenMap() { - if( !pTextNumberedParagraphAttrTokenMap.get() ) - pTextNumberedParagraphAttrTokenMap.reset( + if (!m_pImpl->m_pTextNumberedParagraphAttrTokenMap.get()) + { + m_pImpl->m_pTextNumberedParagraphAttrTokenMap.reset( new SvXMLTokenMap( aTextNumberedParagraphAttrTokenMap ) ); - - return *pTextNumberedParagraphAttrTokenMap; + } + return *m_pImpl->m_pTextNumberedParagraphAttrTokenMap; } const SvXMLTokenMap& XMLTextImportHelper::GetTextListBlockAttrTokenMap() { - if( !pTextListBlockAttrTokenMap.get() ) - pTextListBlockAttrTokenMap.reset( + if (!m_pImpl->m_pTextListBlockAttrTokenMap.get()) + { + m_pImpl->m_pTextListBlockAttrTokenMap.reset( new SvXMLTokenMap( aTextListBlockAttrTokenMap ) ); - - return *pTextListBlockAttrTokenMap; + } + return *m_pImpl->m_pTextListBlockAttrTokenMap; } const SvXMLTokenMap& XMLTextImportHelper::GetTextListBlockElemTokenMap() { - if( !pTextListBlockElemTokenMap.get() ) - pTextListBlockElemTokenMap.reset( + if (!m_pImpl->m_pTextListBlockElemTokenMap.get()) + { + m_pImpl->m_pTextListBlockElemTokenMap.reset( new SvXMLTokenMap( aTextListBlockElemTokenMap ) ); - - return *pTextListBlockElemTokenMap; + } + return *m_pImpl->m_pTextListBlockElemTokenMap; } SvI18NMap& XMLTextImportHelper::GetRenameMap() { - if( !pRenameMap.get() ) - pRenameMap.reset( new SvI18NMap() ); - return *pRenameMap; + if (!m_pImpl->m_pRenameMap.get()) + { + m_pImpl->m_pRenameMap.reset( new SvI18NMap() ); + } + return *m_pImpl->m_pRenameMap; } void XMLTextImportHelper::InsertBookmarkStartRange( const OUString sName, const Reference<XTextRange> & rRange, - const OUString& i_rXmlId) + OUString const& i_rXmlId, + ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > & i_rpRDFaAttributes) { - aBookmarkStartRanges[sName] = std::make_pair(rRange, i_rXmlId); - aBookmarkVector.push_back(sName); + m_pImpl->m_BookmarkStartRanges[sName] = + ::boost::make_tuple(rRange, i_rXmlId, i_rpRDFaAttributes); + m_pImpl->m_BookmarkVector.push_back(sName); } sal_Bool XMLTextImportHelper::FindAndRemoveBookmarkStartRange( const OUString sName, Reference<XTextRange> & o_rRange, - OUString& o_rXmlId) + OUString & o_rXmlId, + ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > & o_rpRDFaAttributes) { - if (aBookmarkStartRanges.count(sName)) + if (m_pImpl->m_BookmarkStartRanges.count(sName)) { - o_rRange.set(aBookmarkStartRanges[sName].first); - o_rXmlId = aBookmarkStartRanges[sName].second; - aBookmarkStartRanges.erase(sName); - BookmarkVector_t::iterator it=aBookmarkVector.begin(); - while(it!=aBookmarkVector.end() && it->compareTo(sName)!=0) { + Impl::BookmarkMapEntry_t & rEntry = + (*m_pImpl->m_BookmarkStartRanges.find(sName)).second; + o_rRange.set(rEntry.get<0>()); + o_rXmlId = rEntry.get<1>(); + o_rpRDFaAttributes = rEntry.get<2>(); + m_pImpl->m_BookmarkStartRanges.erase(sName); + Impl::BookmarkVector_t::iterator it(m_pImpl->m_BookmarkVector.begin()); + while (it != m_pImpl->m_BookmarkVector.end() && it->compareTo(sName)!=0) + { it++; } - if (it!=aBookmarkVector.end()) { - aBookmarkVector.erase(it); + if (it!=m_pImpl->m_BookmarkVector.end()) { + m_pImpl->m_BookmarkVector.erase(it); } return sal_True; } @@ -2292,62 +2748,68 @@ sal_Bool XMLTextImportHelper::FindAndRemoveBookmarkStartRange( ::rtl::OUString XMLTextImportHelper::FindActiveBookmarkName() { - if ( !aBookmarkVector.empty() ) { - return aBookmarkVector.back(); + if (!m_pImpl->m_BookmarkVector.empty()) { + return m_pImpl->m_BookmarkVector.back(); } else return ::rtl::OUString(); // return the empty string on error... } ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > XMLTextImportHelper::GetRangeFor(::rtl::OUString &sName) { - return aBookmarkStartRanges[sName].first; + return m_pImpl->m_BookmarkStartRanges[sName].get<0>(); } void XMLTextImportHelper::pushFieldCtx( ::rtl::OUString name, ::rtl::OUString type ) { - aFieldStack.push(field_stack_item_t(field_name_type_t(name, type), field_params_t())); + m_pImpl->m_FieldStack.push(Impl::field_stack_item_t( + Impl::field_name_type_t(name, type), Impl::field_params_t())); } void XMLTextImportHelper::popFieldCtx() { - aFieldStack.pop(); + m_pImpl->m_FieldStack.pop(); } void XMLTextImportHelper::addFieldParam( ::rtl::OUString name, ::rtl::OUString value ) { - DBG_ASSERT(!aFieldStack.empty(), "stack is empty: not good! Do a pushFieldCtx before..."); - if (!aFieldStack.empty()) { - field_stack_item_t &aFieldStackItem=aFieldStack.top(); - aFieldStackItem.second.push_back(field_param_t( name, value )); + DBG_ASSERT(!m_pImpl->m_FieldStack.empty(), + "stack is empty: not good! Do a pushFieldCtx before..."); + if (!m_pImpl->m_FieldStack.empty()) { + Impl::field_stack_item_t & FieldStackItem(m_pImpl->m_FieldStack.top()); + FieldStackItem.second.push_back(Impl::field_param_t( name, value )); } } ::rtl::OUString XMLTextImportHelper::getCurrentFieldName() { - DBG_ASSERT(!aFieldStack.empty(), "stack is empty: not good! Do a pushFieldCtx before..."); - if (!aFieldStack.empty()) { - return aFieldStack.top().first.first; + DBG_ASSERT(!m_pImpl->m_FieldStack.empty(), + "stack is empty: not good! Do a pushFieldCtx before..."); + if (!m_pImpl->m_FieldStack.empty()) { + return m_pImpl->m_FieldStack.top().first.first; } else return ::rtl::OUString(); } ::rtl::OUString XMLTextImportHelper::getCurrentFieldType() { - DBG_ASSERT(!aFieldStack.empty(), "stack is empty: not good! Do a pushFieldCtx before..."); - if (!aFieldStack.empty()) { - return aFieldStack.top().first.second; + DBG_ASSERT(!m_pImpl->m_FieldStack.empty(), + "stack is empty: not good! Do a pushFieldCtx before..."); + if (!m_pImpl->m_FieldStack.empty()) { + return m_pImpl->m_FieldStack.top().first.second; } else return ::rtl::OUString(); } bool XMLTextImportHelper::hasCurrentFieldCtx() { - return !aFieldStack.empty(); + return !m_pImpl->m_FieldStack.empty(); } void XMLTextImportHelper::setCurrentFieldParamsTo(::com::sun::star::uno::Reference< ::com::sun::star::text::XFormField> &xFormField) { - DBG_ASSERT(!aFieldStack.empty(), "stack is empty: not good! Do a pushFieldCtx before..."); - if (!aFieldStack.empty() && xFormField.is()) + DBG_ASSERT(!m_pImpl->m_FieldStack.empty(), + "stack is empty: not good! Do a pushFieldCtx before..."); + if (!m_pImpl->m_FieldStack.empty() && xFormField.is()) { - FieldParamImporter(&aFieldStack.top().second, xFormField->getParameters()).Import(); + FieldParamImporter(&m_pImpl->m_FieldStack.top().second, + xFormField->getParameters()).Import(); } } @@ -2357,6 +2819,11 @@ void XMLTextImportHelper::ConnectFrameChains( const OUString& rNextFrmName, const Reference < XPropertySet >& rFrmPropSet ) { + static ::rtl::OUString s_ChainNextName( + RTL_CONSTASCII_USTRINGPARAM("ChainNextName")); + static ::rtl::OUString s_ChainPrevName( + RTL_CONSTASCII_USTRINGPARAM("ChainPrevName")); + if( !rFrmName.getLength() ) return; @@ -2364,39 +2831,42 @@ void XMLTextImportHelper::ConnectFrameChains( { OUString sNextFrmName(GetRenameMap().Get( XML_TEXT_RENAME_TYPE_FRAME, rNextFrmName )); - if( xTextFrames.is() && xTextFrames->hasByName( sNextFrmName ) ) + if (m_pImpl->m_xTextFrames.is() + && m_pImpl->m_xTextFrames->hasByName(sNextFrmName)) { - rFrmPropSet->setPropertyValue( sChainNextName, makeAny(sNextFrmName) ); + rFrmPropSet->setPropertyValue(s_ChainNextName, + makeAny(sNextFrmName)); } else { - if( !pPrevFrmNames.get() ) + if (!m_pImpl->m_pPrevFrmNames.get()) { - pPrevFrmNames.reset( new SvStringsDtor ); - pNextFrmNames.reset( new SvStringsDtor ); + m_pImpl->m_pPrevFrmNames.reset( new SvStringsDtor ); + m_pImpl->m_pNextFrmNames.reset( new SvStringsDtor ); } - pPrevFrmNames->Insert( new String( rFrmName ), - pPrevFrmNames->Count() ); - pNextFrmNames->Insert( new String( sNextFrmName ), - pNextFrmNames->Count() ); + m_pImpl->m_pPrevFrmNames->Insert( new String( rFrmName ), + m_pImpl->m_pPrevFrmNames->Count() ); + m_pImpl->m_pNextFrmNames->Insert( new String( sNextFrmName ), + m_pImpl->m_pNextFrmNames->Count() ); } } - if( pPrevFrmNames.get() && pPrevFrmNames->Count() ) + if (m_pImpl->m_pPrevFrmNames.get() && m_pImpl->m_pPrevFrmNames->Count()) { - sal_uInt16 nCount = pPrevFrmNames->Count(); + sal_uInt16 nCount = m_pImpl->m_pPrevFrmNames->Count(); for( sal_uInt16 i=0; i<nCount; i++ ) { - String *pNext = (*pNextFrmNames)[i]; + String *pNext = (*m_pImpl->m_pNextFrmNames)[i]; if( OUString(*pNext) == rFrmName ) { // The previuous frame must exist, because it existing than // inserting the entry - String *pPrev = (*pPrevFrmNames)[i]; + String *pPrev = (*m_pImpl->m_pPrevFrmNames)[i]; - rFrmPropSet->setPropertyValue( sChainPrevName, makeAny(OUString( *pPrev )) ); + rFrmPropSet->setPropertyValue(s_ChainPrevName, + makeAny(OUString( *pPrev ))); - pPrevFrmNames->Remove( i, 1 ); - pNextFrmNames->Remove( i, 1 ); + m_pImpl->m_pPrevFrmNames->Remove( i, 1 ); + m_pImpl->m_pNextFrmNames->Remove( i, 1 ); delete pPrev; delete pNext; @@ -2409,6 +2879,9 @@ void XMLTextImportHelper::ConnectFrameChains( sal_Bool XMLTextImportHelper::IsInFrame() const { + static ::rtl::OUString s_TextFrame( + RTL_CONSTASCII_USTRINGPARAM("TextFrame")); + sal_Bool bIsInFrame = sal_False; // are we currently in a text frame? yes, if the cursor has a @@ -2416,9 +2889,10 @@ sal_Bool XMLTextImportHelper::IsInFrame() const Reference<XPropertySet> xPropSet(((XMLTextImportHelper *)this)->GetCursor(), UNO_QUERY); if (xPropSet.is()) { - if (xPropSet->getPropertySetInfo()->hasPropertyByName(sTextFrame)) + if (xPropSet->getPropertySetInfo()->hasPropertyByName(s_TextFrame)) { - Reference<XTextFrame> xFrame(xPropSet->getPropertyValue(sTextFrame), UNO_QUERY); + uno::Reference<XTextFrame> const xFrame( + xPropSet->getPropertyValue(s_TextFrame), UNO_QUERY); if (xFrame.is()) { @@ -2541,12 +3015,12 @@ void XMLTextImportHelper::SetChangesProtectionKey(const Sequence<sal_Int8> &) OUString XMLTextImportHelper::GetOpenRedlineId() { - return sOpenRedlineIdentifier; + return m_pImpl->m_sOpenRedlineIdentifier; } void XMLTextImportHelper::SetOpenRedlineId( ::rtl::OUString& rId) { - sOpenRedlineIdentifier = rId; + m_pImpl->m_sOpenRedlineIdentifier = rId; } void XMLTextImportHelper::ResetOpenRedlineId() @@ -2555,3 +3029,14 @@ void XMLTextImportHelper::ResetOpenRedlineId() SetOpenRedlineId(sEmpty); } +void +XMLTextImportHelper::SetCellParaStyleDefault(::rtl::OUString const& rNewValue) +{ + m_pImpl->m_sCellParaStyleDefault = rNewValue; +} + +::rtl::OUString const& XMLTextImportHelper::GetCellParaStyleDefault() +{ + return m_pImpl->m_sCellParaStyleDefault; +} + diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx index b4b83e5ec7..82735fdf59 100644 --- a/xmloff/source/text/txtlists.cxx +++ b/xmloff/source/text/txtlists.cxx @@ -453,6 +453,8 @@ XMLTextListsHelper::MakeNumRule( sal_Bool* o_pRestartNumbering, sal_Bool* io_pSetDefaults) { + static ::rtl::OUString s_NumberingRules( + RTL_CONSTASCII_USTRINGPARAM("NumberingRules")); uno::Reference<container::XIndexReplace> xNumRules(i_rNumRule); if ( i_StyleName.getLength() && i_StyleName != i_ParentStyleName ) @@ -479,8 +481,7 @@ XMLTextListsHelper::MakeNumRule( uno::Reference< beans::XPropertySet > xPropSet( xStyle, uno::UNO_QUERY ); - any = xPropSet->getPropertyValue( - i_rImport.GetTextImport()->sNumberingRules ); + any = xPropSet->getPropertyValue(s_NumberingRules); any >>= xNumRules; } else diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index cdfbf4ca86..a5abb6eed4 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -90,7 +90,6 @@ #include <com/sun/star/text/XEndnotesSupplier.hpp> #include <com/sun/star/drawing/XControlShape.hpp> #include <com/sun/star/util/DateTime.hpp> -#include "xmlkywd.hxx" #include "xmlnmspe.hxx" #include <xmloff/xmlaustp.hxx> #include <xmloff/families.hxx> diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index 7fd7702aa5..a9196d1d20 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -2067,7 +2067,7 @@ XMLParaContext::~XMLParaContext() } } - OUString sCellParaStyleName = xTxtImport->sCellParaStyleDefault; + OUString const sCellParaStyleName(xTxtImport->GetCellParaStyleDefault()); if( sCellParaStyleName.getLength() > 0 ) { // --> OD 2007-08-16 #i80724# diff --git a/xmloff/util/makefile.mk b/xmloff/util/makefile.mk index a7060d7950..b8745b6b8f 100644 --- a/xmloff/util/makefile.mk +++ b/xmloff/util/makefile.mk @@ -53,17 +53,8 @@ LIB1FILES= \ # --- Shared-Library ----------------------------------------------- -.IF "$(GUI)"!="UNX" -LIB4TARGET= $(LB)$/ixo.lib -LIB4FILES= $(LB)$/_ixo.lib -.IF "$(GUI)"!="OS2" -LIB4OBJFILES=\ - $(OBJ)$/xmlkywd.obj -.ENDIF -.ENDIF - SHL1TARGET= xo$(DLLPOSTFIX) -SHL1IMPLIB= _ixo +SHL1IMPLIB= i$(TARGET) SHL1USE_EXPORTS=name SHL1STDLIBS= \ @@ -86,21 +77,6 @@ SHL1STDLIBS+=-licg617mxp SHL1DEF= $(MISC)$/$(SHL1TARGET).def SHL1LIBS= $(LIB1TARGET) - -SHL5STDLIBS= \ - $(TOOLSLIB) \ - $(SALLIB) \ - $(SALHELPERLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(COMPHELPERLIB) - -.IF "$(GUI)"=="UNX" || "$(COM)"=="GCC" - SHL5STDLIBS += -lxo$(DLLPOSTFIX) -.ELSE - SHL5STDLIBS += ixo.lib -.ENDIF - # --- Def-File --------------------------------------------------------- DEF1NAME =$(SHL1TARGET) |