diff options
author | Joachim Lingner <jl@openoffice.org> | 2010-06-07 10:13:44 +0200 |
---|---|---|
committer | Joachim Lingner <jl@openoffice.org> | 2010-06-07 10:13:44 +0200 |
commit | 4edc7f8eac625e30719fec69bd9b26dd9356657c (patch) | |
tree | eb75be1da94db899a53afb6ed788e017bd783b41 | |
parent | 88581862df4e46ee0f6515267ffeb46a53d1ba53 (diff) | |
parent | f8e7afbac976ca862a801b9648fd95b2107757b2 (diff) |
jl152 merge with DEV300_m80
244 files changed, 5101 insertions, 5212 deletions
diff --git a/basic/inc/basic/sberrors.hxx b/basic/inc/basic/sberrors.hxx index c21b3b0237b8..c34176e0bde7 100644 --- a/basic/inc/basic/sberrors.hxx +++ b/basic/inc/basic/sberrors.hxx @@ -287,6 +287,8 @@ typedef ULONG SbError; #define ERRCODE_BASIC_LOOP_NOT_INIT ((LAST_SBX_ERROR_ID+109UL) | ERRCODE_AREA_SBX | \ ERRCODE_CLASS_COMPILER) // For loop not initialized +#define ERRCODE_BASIC_COMPAT ((LAST_SBX_ERROR_ID+103UL)| ERRCODE_AREA_SBX | ERRCODE_CLASS_RUNTIME) + // Map old codes to new codes #define SbERR_SYNTAX ERRCODE_BASIC_SYNTAX #define SbERR_NO_GOSUB ERRCODE_BASIC_NO_GOSUB @@ -410,6 +412,7 @@ typedef ULONG SbError; #define SbERR_PROG_TOO_LARGE ERRCODE_BASIC_PROG_TOO_LARGE #define SbERR_NO_STRINGS_ARRAYS ERRCODE_BASIC_NO_STRINGS_ARRAYS #define SbERR_BASIC_EXCEPTION ERRCODE_BASIC_EXCEPTION +#define SbERR_BASIC_COMPAT ERRCODE_BASIC_COMPAT #define SbERR_BASIC_ARRAY_FIX ERRCODE_BASIC_ARRAY_FIX #define SbERR_BASIC_STRING_OVERFLOW ERRCODE_BASIC_STRING_OVERFLOW #define SbERR_BASIC_EXPR_TOO_COMPLEX ERRCODE_BASIC_EXPR_TOO_COMPLEX diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx index d73c9780b1bb..63ffef6cdd61 100644 --- a/basic/inc/basic/sbmod.hxx +++ b/basic/inc/basic/sbmod.hxx @@ -31,9 +31,7 @@ #include <basic/sbdef.hxx> #include <basic/sbxobj.hxx> #include <basic/sbxdef.hxx> -#ifndef _RTL_USTRING_HXX #include <rtl/ustring.hxx> -#endif class SbMethod; class SbProperty; @@ -63,6 +61,10 @@ protected: SbiImage* pImage; // the Image SbiBreakpoints* pBreaks; // Breakpoints SbClassData* pClassData; + BOOL mbVBACompat; + INT32 mnType; + SbxObjectRef pDocObject; // an impl object ( used by Document Modules ) + bool bIsProxyModule; void StartDefinitions(); SbMethod* GetMethod( const String&, SbxDataType ); @@ -87,7 +89,7 @@ protected: public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICMOD,2); TYPEINFO(); - SbModule( const String& ); + SbModule( const String&, BOOL bCompat = FALSE ); virtual void SetParent( SbxObject* ); virtual void Clear(); @@ -123,6 +125,11 @@ public: BOOL LoadBinaryData( SvStream& ); BOOL ExceedsLegacyModuleSize(); void fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg = NULL ) const; + BOOL IsVBACompat(); + void SetVBACompat( BOOL bCompat ); + INT32 GetModuleType() { return mnType; } + void SetModuleType( INT32 nType ) { mnType = nType; } + bool GetIsProxyModule() { return bIsProxyModule; } }; #ifndef __SB_SBMODULEREF_HXX diff --git a/basic/inc/basic/sbobjmod.hxx b/basic/inc/basic/sbobjmod.hxx new file mode 100644 index 000000000000..ad804dcfab38 --- /dev/null +++ b/basic/inc/basic/sbobjmod.hxx @@ -0,0 +1,97 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sbobjmod.hxx,v $ + * + * $Revision: 1.4 $ + * + * last change: $Author: $ $Date: 2007/08/27 16:31:39 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef _SB_OBJMOD_HXX +#define _SB_OBJMOD_HXX + +#include <basic/sbmod.hxx> +#include <basic/sbstar.hxx> +#include <com/sun/star/script/ModuleInfo.hpp> +#include <com/sun/star/lang/XEventListener.hpp> +#include <com/sun/star/awt/XDialog.hpp> +#include <com/sun/star/frame/XModel.hpp> + +namespace css = ::com::sun::star; + +// Basic-Module for excel object. + +class SbObjModule : public SbModule +{ + SbObjModule( const SbObjModule& ); + SbObjModule(); +public: + TYPEINFO(); + SbObjModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible ); + virtual SbxVariable* Find( const XubString& rName, SbxClassType t ); + using SbxValue::GetObject; + SbxVariable* GetObject(); + void SetUnoObject( const com::sun::star::uno::Any& aObj )throw ( com::sun::star::uno::RuntimeException ) ; +}; + +class SbUserFormModule : public SbObjModule +{ + css::uno::Reference<css::lang::XEventListener> m_DialogListener; + css::uno::Reference<css::awt::XDialog> m_xDialog; + css::uno::Reference<css::frame::XModel> m_xModel; + String sFormName; + bool mbInit; + SbUserFormModule( const SbUserFormModule& ); + SbUserFormModule(); + +protected: + virtual void InitObject(); +public: + TYPEINFO(); + SbUserFormModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat ); + virtual SbxVariable* Find( const XubString& rName, SbxClassType t ); + void ResetApiObj(); + void Unload(); + void load(); + void triggerMethod( const String& ); + void triggerMethod( const String&, css::uno::Sequence< css::uno::Any >& ); + void triggerActivateEvent(); + void triggerDeActivateEvent(); + void triggerInitializeEvent(); + void triggerTerminateEvent(); +}; + +#ifndef __SB_SBOBJMODULEREF_HXX +#define __SB_SBOBJMODULEREF_HXX + +SV_DECL_IMPL_REF(SbObjModule); + +#endif +#endif + diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx index bdc4aa011cc9..a234dc206ec7 100644 --- a/basic/inc/basic/sbstar.hxx +++ b/basic/inc/basic/sbstar.hxx @@ -37,6 +37,7 @@ #include <basic/sbdef.hxx> #include <basic/sberrors.hxx> +#include <com/sun/star/script/ModuleInfo.hpp> class SbModule; // completed module class SbiInstance; // runtime instance @@ -69,6 +70,7 @@ class StarBASIC : public SbxObject BOOL bNoRtl; // if TRUE: do not search RTL BOOL bBreak; // if TRUE: Break, otherwise Step BOOL bDocBasic; + BOOL bVBAEnabled; BasicLibInfo* pLibInfo; // Info block for basic manager SbLanguageMode eLanguageMode; // LanguageMode of the basic object BOOL bQuit; @@ -117,6 +119,7 @@ public: // Compiler-Interface SbModule* MakeModule( const String& rName, const String& rSrc ); SbModule* MakeModule32( const String& rName, const ::rtl::OUString& rSrc ); + SbModule* MakeModule32( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, const ::rtl::OUString& rSrc ); BOOL Compile( SbModule* ); BOOL Disassemble( SbModule*, String& rText ); static void Stop(); @@ -189,6 +192,8 @@ public: ( const String& rName, USHORT& rStatus ); static SbMethod* GetActiveMethod( USHORT nLevel = 0 ); static SbModule* GetActiveModule(); + void SetVBAEnabled( BOOL bEnabled ); + BOOL isVBAEnabled(); // #60175 TRUE: SFX-Resource is not displayed on basic errors static void StaticSuppressSfxResource( BOOL bSuppress ); diff --git a/basic/inc/basic/sbuno.hxx b/basic/inc/basic/sbuno.hxx index 68e2c6ab8778..d816d424313b 100644 --- a/basic/inc/basic/sbuno.hxx +++ b/basic/inc/basic/sbuno.hxx @@ -41,5 +41,7 @@ void createAllObjectProperties( SbxObject* pObj ); ::com::sun::star::uno::Any sbxToUnoValue( SbxVariable* pVar ); +void unoToSbxValue( SbxVariable* pVar, const ::com::sun::star::uno::Any& aValue ); + #endif diff --git a/basic/prj/build.lst b/basic/prj/build.lst index 994901580c86..9453154edf46 100644..100755 --- a/basic/prj/build.lst +++ b/basic/prj/build.lst @@ -1,11 +1,11 @@ -sb basic : l10n offuh svtools xmlscript framework NULL +sb basic : l10n offuh oovbaapi svtools xmlscript framework NULL sb basic usr1 - all sb_mkout NULL sb basic\inc nmake - all sb_inc NULL sb basic\source\app nmake - all sb_app sb_class sb_inc NULL sb basic\source\basmgr nmake - all sb_mgr sb_inc NULL sb basic\source\classes nmake - all sb_class sb_inc NULL sb basic\source\comp nmake - all sb_comp sb_inc NULL -sb basic\source\runtime nmake - all sb_rt sb_inc NULL +sb basic\source\runtime nmake - all sb_rt sb_inc sb_class NULL sb basic\source\sample nmake - all sb_samp sb_inc NULL sb basic\source\sbx nmake - all sb_sbx sb_inc NULL sb basic\source\uno nmake - all sb_uno sb_inc NULL diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 7646667bc277..c242165df825 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -41,6 +41,7 @@ #include <tools/debug.hxx> #include <tools/diagnose_ex.h> #include <basic/sbmod.hxx> +#include <basic/sbobjmod.hxx> #include <basic/sbuno.hxx> #include <basic/basmgr.hxx> @@ -65,6 +66,9 @@ #include <com/sun/star/script/XStarBasicDialogInfo.hpp> #include <com/sun/star/script/XStarBasicLibraryInfo.hpp> #include <com/sun/star/script/XLibraryContainerPassword.hpp> +#include <com/sun/star/script/ModuleInfo.hpp> +#include <com/sun/star/script/XVBAModuleInfo.hpp> +#include <com/sun/star/script/XVBACompat.hpp> #include <cppuhelper/implbase1.hxx> @@ -236,7 +240,15 @@ void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager* pMgr, Any aElement = xLibNameAccess->getByName( aModuleName ); ::rtl::OUString aMod; aElement >>= aMod; - pLib->MakeModule32( aModuleName, aMod ); + Reference< XVBAModuleInfo > xVBAModuleInfo( xLibNameAccess, UNO_QUERY ); + if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( aModuleName ) ) + { + ModuleInfo mInfo = xVBAModuleInfo->getModuleInfo( aModuleName ); + OSL_TRACE("#addLibraryModulesImpl - aMod"); + pLib->MakeModule32( aModuleName, mInfo, aMod ); + } + else + pLib->MakeModule32( aModuleName, aMod ); } } @@ -270,11 +282,16 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent { Reference< XLibraryContainer > xScriptCont( Event.Source, UNO_QUERY ); insertLibraryImpl( xScriptCont, mpMgr, Event.Element, aName ); + StarBASIC* pLib = mpMgr->GetLib( aName ); + if ( pLib ) + { + Reference<XVBACompat> xVBACompat( xScriptCont, UNO_QUERY ); + if ( xVBACompat.is() ) + pLib->SetVBAEnabled( xVBACompat->getVBACompatModeOn() ); + } } else { - ::rtl::OUString aMod; - Event.Element >>= aMod; StarBASIC* pLib = mpMgr->GetLib( maLibName ); DBG_ASSERT( pLib, "BasMgrContainerListenerImpl::elementInserted: Unknown lib!"); @@ -283,7 +300,16 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent SbModule* pMod = pLib->FindModule( aName ); if( !pMod ) { - pLib->MakeModule32( aName, aMod ); + ::rtl::OUString aMod; + Event.Element >>= aMod; + Reference< XVBAModuleInfo > xVBAModuleInfo( Event.Source, UNO_QUERY ); + if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( aName ) ) + { + ModuleInfo mInfo = xVBAModuleInfo->getModuleInfo( aName ); + pLib->MakeModule32( aName, mInfo, aMod ); + } + else + pLib->MakeModule32( aName, aMod ); pLib->SetModified( FALSE ); } } @@ -312,10 +338,11 @@ void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const ContainerEvent SbModule* pMod = pLib->FindModule( aName ); ::rtl::OUString aMod; Event.Element >>= aMod; + if( pMod ) - pMod->SetSource32( aMod ); + pMod->SetSource32( aMod ); else - pLib->MakeModule32( aName, aMod ); + pLib->MakeModule32( aName, aMod ); pLib->SetModified( FALSE ); } diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx new file mode 100644 index 000000000000..0ec0454e2bb5 --- /dev/null +++ b/basic/source/classes/errobject.cxx @@ -0,0 +1,225 @@ +/************************************************************************* +* +* 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_basic.hxx" +#include "errobject.hxx" + +#include <cppuhelper/implbase2.hxx> +#include <com/sun/star/script/XDefaultProperty.hpp> +#include "sbintern.hxx" +#include "runtime.hxx" + +using namespace ::com::sun::star; +using namespace ::ooo; + +typedef ::cppu::WeakImplHelper2< vba::XErrObject, script::XDefaultProperty > ErrObjectImpl_BASE; + +class ErrObject : public ErrObjectImpl_BASE +{ + rtl::OUString m_sHelpFile; + rtl::OUString m_sSource; + rtl::OUString m_sDescription; + sal_Int32 m_nNumber; + sal_Int32 m_nHelpContext; + +public: + ErrObject(); + ~ErrObject(); + // Attributes + virtual ::sal_Int32 SAL_CALL getNumber() throw (uno::RuntimeException); + virtual void SAL_CALL setNumber( ::sal_Int32 _number ) throw (uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getHelpContext() throw (uno::RuntimeException); + virtual void SAL_CALL setHelpContext( ::sal_Int32 _helpcontext ) throw (uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getHelpFile() throw (uno::RuntimeException); + virtual void SAL_CALL setHelpFile( const ::rtl::OUString& _helpfile ) throw (uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getDescription() throw (uno::RuntimeException); + virtual void SAL_CALL setDescription( const ::rtl::OUString& _description ) throw (uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getSource() throw (uno::RuntimeException); + virtual void SAL_CALL setSource( const ::rtl::OUString& _source ) throw (uno::RuntimeException); + + // Methods + virtual void SAL_CALL Clear( ) throw (uno::RuntimeException); + virtual void SAL_CALL Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext ) throw (uno::RuntimeException); + // XDefaultProperty + virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (uno::RuntimeException); + + // Helper method + void setData( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, + const uno::Any& HelpFile, const uno::Any& HelpContext ) throw (uno::RuntimeException); +}; + + +ErrObject::~ErrObject() +{ +} + +ErrObject::ErrObject() : m_nNumber(0), m_nHelpContext(0) +{ +} + +sal_Int32 SAL_CALL +ErrObject::getNumber() throw (uno::RuntimeException) +{ + return m_nNumber; +} + +void SAL_CALL +ErrObject::setNumber( ::sal_Int32 _number ) throw (uno::RuntimeException) +{ + pINST->setErrorVB( _number, String() ); + ::rtl::OUString _description = pINST->GetErrorMsg(); + setData( uno::makeAny( _number ), uno::Any(), uno::makeAny( _description ), uno::Any(), uno::Any() ); +} + +::sal_Int32 SAL_CALL +ErrObject::getHelpContext() throw (uno::RuntimeException) +{ + return m_nHelpContext; +} +void SAL_CALL +ErrObject::setHelpContext( ::sal_Int32 _helpcontext ) throw (uno::RuntimeException) +{ + m_nHelpContext = _helpcontext; +} + +::rtl::OUString SAL_CALL +ErrObject::getHelpFile() throw (uno::RuntimeException) +{ + return m_sHelpFile; +} + +void SAL_CALL +ErrObject::setHelpFile( const ::rtl::OUString& _helpfile ) throw (uno::RuntimeException) +{ + m_sHelpFile = _helpfile; +} + +::rtl::OUString SAL_CALL +ErrObject::getDescription() throw (uno::RuntimeException) +{ + return m_sDescription; +} + +void SAL_CALL +ErrObject::setDescription( const ::rtl::OUString& _description ) throw (uno::RuntimeException) +{ + m_sDescription = _description; +} + +::rtl::OUString SAL_CALL +ErrObject::getSource() throw (uno::RuntimeException) +{ + return m_sSource; +} + +void SAL_CALL +ErrObject::setSource( const ::rtl::OUString& _source ) throw (uno::RuntimeException) +{ + m_sSource = _source; +} + +// Methods +void SAL_CALL +ErrObject::Clear( ) throw (uno::RuntimeException) +{ + m_sHelpFile = rtl::OUString(); + m_sSource = m_sHelpFile; + m_sDescription = m_sSource; + m_nNumber = 0; + m_nHelpContext = 0; +} + +void SAL_CALL +ErrObject::Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext ) throw (uno::RuntimeException) +{ + setData( Number, Source, Description, HelpFile, HelpContext ); + if ( m_nNumber ) + pINST->ErrorVB( m_nNumber, m_sDescription ); +} + +// XDefaultProperty +::rtl::OUString SAL_CALL +ErrObject::getDefaultPropertyName( ) throw (uno::RuntimeException) +{ + static rtl::OUString sDfltPropName( RTL_CONSTASCII_USTRINGPARAM("Number") ); + return sDfltPropName; +} + +void ErrObject::setData( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext ) + throw (uno::RuntimeException) +{ + if ( !Number.hasValue() ) + throw uno::RuntimeException( rtl::OUString::createFromAscii("Missing Required Paramater"), uno::Reference< uno::XInterface >() ); + Number >>= m_nNumber; + Description >>= m_sDescription; + Source >>= m_sSource; + HelpFile >>= m_sHelpFile; + HelpContext >>= m_nHelpContext; +} + +// SbxErrObject +SbxErrObject::SbxErrObject( const String& rName, const Any& rUnoObj ) + : SbUnoObject( rName, rUnoObj ) + , m_pErrObject( NULL ) +{ + OSL_TRACE("SbxErrObject::SbxErrObject ctor"); + rUnoObj >>= m_xErr; + if ( m_xErr.is() ) + { + SetDfltProperty( uno::Reference< script::XDefaultProperty >( m_xErr, uno::UNO_QUERY_THROW )->getDefaultPropertyName() ) ; + m_pErrObject = static_cast< ErrObject* >( m_xErr.get() ); + } +} + +SbxErrObject::~SbxErrObject() +{ + OSL_TRACE("SbxErrObject::~SbxErrObject dtor"); +} + +uno::Reference< vba::XErrObject > +SbxErrObject::getUnoErrObject() +{ + SbxVariable* pVar = getErrObject(); + SbxErrObject* pGlobErr = static_cast< SbxErrObject* >( pVar ); + return pGlobErr->m_xErr; +} + +SbxVariableRef +SbxErrObject::getErrObject() +{ + static SbxVariableRef pGlobErr = new SbxErrObject( String( RTL_CONSTASCII_USTRINGPARAM("Err")), uno::makeAny( uno::Reference< vba::XErrObject >( new ErrObject() ) ) ); + return pGlobErr; +} + +void SbxErrObject::setNumberAndDescription( ::sal_Int32 _number, const ::rtl::OUString& _description ) + throw (uno::RuntimeException) +{ + if( m_pErrObject != NULL ) + m_pErrObject->setData( uno::makeAny( _number ), uno::Any(), uno::makeAny( _description ), uno::Any(), uno::Any() ); +} + diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index 5c57af5b6ce8..791e9fe5a8c1 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -55,13 +55,17 @@ #include <com/sun/star/awt/XDialogProvider.hpp> #include <com/sun/star/frame/XModel.hpp> - +#include <com/sun/star/frame/XDesktop.hpp> +#include <com/sun/star/container/XEnumerationAccess.hpp> +#include <basic/basicmanagerrepository.hxx> +#include <basic/basmgr.hxx> //================================================================================================== #include <xmlscript/xmldlg_imexp.hxx> #include <sbunoobj.hxx> #include <basic/sbstar.hxx> #include <basic/sbmeth.hxx> +#include <basic/sbuno.hxx> #include <runtime.hxx> #include <sbintern.hxx> @@ -85,11 +89,6 @@ using namespace ::osl; -//=================================================================== -void unoToSbxValue( SbxVariable* pVar, const Any& aValue ); -Any sbxToUnoValue( SbxVariable* pVar ); - - Reference< frame::XModel > getModelFromBasic( SbxObject* pBasic ) { OSL_PRECOND( pBasic != NULL, "getModelFromBasic: illegal call!" ); @@ -450,6 +449,43 @@ Any implFindDialogLibForDialog( const Any& rDlgAny, SbxObject* pBasic ) return aRetDlgLibAny; } +Any implFindDialogLibForDialogBasic( const Any& aAnyISP, SbxObject* pBasic, StarBASIC*& pFoundBasic ) +{ + Any aDlgLibAny; + // Find dialog library for dialog, direct access is not possible here + StarBASIC* pStartedBasic = (StarBASIC*)pBasic; + SbxObject* pParentBasic = pStartedBasic ? pStartedBasic->GetParent() : NULL; + SbxObject* pParentParentBasic = pParentBasic ? pParentBasic->GetParent() : NULL; + + SbxObject* pSearchBasic1 = NULL; + SbxObject* pSearchBasic2 = NULL; + if( pParentParentBasic ) + { + pSearchBasic1 = pParentBasic; + pSearchBasic2 = pParentParentBasic; + } + else + { + pSearchBasic1 = pStartedBasic; + pSearchBasic2 = pParentBasic; + } + if( pSearchBasic1 ) + { + aDlgLibAny = implFindDialogLibForDialog( aAnyISP, pSearchBasic1 ); + + if ( aDlgLibAny.hasValue() ) + pFoundBasic = (StarBASIC*)pSearchBasic1; + + else if( pSearchBasic2 ) + { + aDlgLibAny = implFindDialogLibForDialog( aAnyISP, pSearchBasic2 ); + if ( aDlgLibAny.hasValue() ) + pFoundBasic = (StarBASIC*)pSearchBasic2; + } + } + return aDlgLibAny; +} + static ::rtl::OUString aDecorationPropName = ::rtl::OUString::createFromAscii( "Decoration" ); static ::rtl::OUString aTitlePropName = @@ -529,39 +565,54 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) {} } - // Find dialog library for dialog, direct access is not possible here - StarBASIC* pStartedBasic = pINST->GetBasic(); - SbxObject* pParentBasic = pStartedBasic ? pStartedBasic->GetParent() : NULL; - SbxObject* pParentParentBasic = pParentBasic ? pParentBasic->GetParent() : NULL; - - SbxObject* pSearchBasic1 = NULL; - SbxObject* pSearchBasic2 = NULL; - if( pParentParentBasic ) + Any aDlgLibAny; + bool bDocDialog = false; + StarBASIC* pFoundBasic = NULL; + OSL_TRACE("About to try get a hold of ThisComponent"); + Reference< frame::XModel > xModel = getModelFromBasic( pINST->GetBasic() ) ; + aDlgLibAny = implFindDialogLibForDialogBasic( aAnyISP, pINST->GetBasic(), pFoundBasic ); + // If we found the dialog then it belongs to the Search basic + if ( !pFoundBasic ) { - pSearchBasic1 = pParentBasic; - pSearchBasic2 = pParentParentBasic; - } - else + Reference< frame::XDesktop > xDesktop( xMSF->createInstance + ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ) ), + UNO_QUERY ); + Reference< container::XEnumeration > xModels; + if ( xDesktop.is() ) { - pSearchBasic1 = pStartedBasic; - pSearchBasic2 = pParentBasic; - } - - Any aDlgLibAny; - if( pSearchBasic1 ) + Reference< container::XEnumerationAccess > xComponents( xDesktop->getComponents(), UNO_QUERY ); + if ( xComponents.is() ) + xModels.set( xComponents->createEnumeration(), UNO_QUERY ); + if ( xModels.is() ) + { + while ( xModels->hasMoreElements() ) + { + Reference< frame::XModel > xNextModel( xModels->nextElement(), UNO_QUERY ); + if ( xNextModel.is() ) + { + BasicManager* pMgr = basic::BasicManagerRepository::getDocumentBasicManager( xNextModel ); + if ( pMgr ) + aDlgLibAny = implFindDialogLibForDialogBasic( aAnyISP, pMgr->GetLib(0), pFoundBasic ); + if ( aDlgLibAny.hasValue() ) { - aDlgLibAny = implFindDialogLibForDialog( aAnyISP, pSearchBasic1 ); - if( pSearchBasic2 && aDlgLibAny.getValueType().getTypeClass() == TypeClass_VOID ) - aDlgLibAny = implFindDialogLibForDialog( aAnyISP, pSearchBasic2 ); + bDocDialog = true; + xModel = xNextModel; + break; } - - - OSL_TRACE("About to try get a hold of ThisComponent"); - Reference< frame::XModel > xModel = getModelFromBasic( pStartedBasic ) ; - Reference< XScriptListener > xScriptListener = new BasicScriptListener_Impl( pStartedBasic, xModel ); + } + } + } + } + } + if ( pFoundBasic ) + bDocDialog = pFoundBasic->IsDocBasic(); + Reference< XScriptListener > xScriptListener = new BasicScriptListener_Impl( pINST->GetBasic(), xModel ); Sequence< Any > aArgs( 4 ); - aArgs[ 0 ] <<= xModel; + if( bDocDialog ) + aArgs[ 0 ] <<= xModel; + else + aArgs[ 0 ] <<= uno::Reference< uno::XInterface >(); aArgs[ 1 ] <<= xInput; aArgs[ 2 ] = aDlgLibAny; aArgs[ 3 ] <<= xScriptListener; diff --git a/basic/source/classes/makefile.mk b/basic/source/classes/makefile.mk index eb5486f02abf..e00ed4674cc1 100644 --- a/basic/source/classes/makefile.mk +++ b/basic/source/classes/makefile.mk @@ -37,18 +37,28 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk +ALLTAR .SEQUENTIAL : \ + $(MISC)$/$(TARGET).don \ + $(MISC)$/$(TARGET).slo + +$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb + +$(CPPUMAKER) -O$(OUT)$/inc -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@ + echo $@ + +$(MISC)$/$(TARGET).slo : $(SLOTARGET) + echo $@ + # --- Allgemein ----------------------------------------------------------- -COMMON_SLOFILES= \ +SLOFILES= \ $(SLO)$/sb.obj \ $(SLO)$/sbxmod.obj \ $(SLO)$/image.obj \ $(SLO)$/sbintern.obj \ $(SLO)$/sbunoobj.obj \ $(SLO)$/propacc.obj \ - $(SLO)$/disas.obj - -SLOFILES= $(COMMON_SLOFILES) \ + $(SLO)$/disas.obj \ + $(SLO)$/errobject.obj \ $(SLO)$/eventatt.obj OBJFILES= \ diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 86850d9991c6..4f2f90d5da1f 100644..100755 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -49,11 +49,18 @@ #include "disas.hxx" #include "runtime.hxx" #include <basic/sbuno.hxx> +#include <basic/sbobjmod.hxx> #include "stdobj.hxx" #include "filefmt.hxx" #include "sb.hrc" #include <basrid.hxx> #include <vos/mutex.hxx> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include "errobject.hxx" + +#include <com/sun/star/script/ModuleType.hpp> +#include <com/sun/star/script/ModuleInfo.hpp> +using namespace ::com::sun::star::script; // #pragma SW_SEGMENT_CLASS( SBASIC, SBASIC_CODE ) @@ -63,18 +70,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( ) ) @@ -212,6 +244,7 @@ const SFX_VB_ErrorItem __FAR_DATA SFX_VB_ErrorTab[] = { 1004, SbERR_METHOD_FAILED }, { 1005, SbERR_SETPROP_FAILED }, { 1006, SbERR_GETPROP_FAILED }, + { 1007, SbERR_BASIC_COMPAT }, { 0xFFFF, 0xFFFFFFFFL } // End mark }; @@ -482,6 +515,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) } } } + SetModuleType( ModuleType::CLASS ); } SbClassModuleObject::~SbClassModuleObject() @@ -679,6 +713,7 @@ StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic ) SetParent( p ); pLibInfo = NULL; bNoRtl = bBreak = FALSE; + bVBAEnabled = FALSE; pModules = new SbxArray; if( !GetSbData()->nInst++ ) @@ -779,7 +814,34 @@ SbModule* StarBASIC::MakeModule( const String& rName, const String& rSrc ) SbModule* StarBASIC::MakeModule32( const String& rName, const ::rtl::OUString& rSrc ) { - SbModule* p = new SbModule( rName ); + ModuleInfo mInfo; + mInfo.ModuleType = ModuleType::NORMAL; + return MakeModule32( rName, mInfo, rSrc ); +} +SbModule* StarBASIC::MakeModule32( const String& rName, const ModuleInfo& mInfo, const rtl::OUString& rSrc ) +{ + + OSL_TRACE("create module %s type mInfo %d", rtl::OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr(), mInfo.ModuleType ); + SbModule* p = NULL; + switch ( mInfo.ModuleType ) + { + case ModuleType::DOCUMENT: + // In theory we should be able to create Object modules + // in ordinary basic ( in vba mode thought these are create + // by the application/basic and not by the user ) + p = new SbObjModule( rName, mInfo, isVBAEnabled() ); + break; + case ModuleType::CLASS: + p = new SbModule( rName, isVBAEnabled() ); + p->SetModuleType( ModuleType::CLASS ); + break; + case ModuleType::FORM: + p = new SbUserFormModule( rName, mInfo, isVBAEnabled() ); + break; + default: + p = new SbModule( rName, isVBAEnabled() ); + + } p->SetSource32( rSrc ); p->SetParent( this ); pModules->Insert( p, pModules->Count() ); @@ -955,6 +1017,12 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t ) } pNamed = p; } + // Only variables qualified by the Module Name e.g. Sheet1.foo + // should work for Documant && Class type Modules + INT32 nType = p->GetModuleType(); + if ( nType == ModuleType::DOCUMENT || nType == ModuleType::FORM ) + continue; + // otherwise check if the element is available // unset GBLSEARCH-Flag (due to Rekursion) USHORT nGblFlag = p->GetFlags() & SBX_GBLSEARCH; @@ -1326,6 +1394,7 @@ void StarBASIC::MakeErrorText( SbError nId, const String& aMsg ) } else GetSbData()->aErrMsg = String::EmptyString(); + } BOOL StarBASIC::CError @@ -1382,7 +1451,22 @@ BOOL StarBASIC::RTError( SbError code, const String& rMsg, USHORT l, USHORT c1, // Umsetzung des Codes fuer String-Transport in SFX-Error if( rMsg.Len() ) - code = (ULONG)*new StringErrorInfo( code, String(rMsg) ); + { + // very confusing, even though MakeErrorText sets up the error text + // seems that this is not used ( if rMsg already has content ) + // In the case of VBA MakeErrorText also formats the error to be alittle more + // like vba ( adds an error number etc ) + if ( SbiRuntime::isVBAEnabled() && ( code == SbERR_BASIC_COMPAT ) ) + { + String aTmp = '\''; + aTmp += String::CreateFromInt32( SbxErrObject::getUnoErrObject()->getNumber() ); + aTmp += String( RTL_CONSTASCII_USTRINGPARAM("\'\n") ); + aTmp += GetSbData()->aErrMsg.Len() ? GetSbData()->aErrMsg : rMsg; + code = (ULONG)*new StringErrorInfo( code, aTmp ); + } + else + code = (ULONG)*new StringErrorInfo( code, String(rMsg) ); + } SetErrorData( code, l, c1, c2 ); if( GetSbData()->aErrHdl.IsSet() ) diff --git a/basic/source/classes/sb.src b/basic/source/classes/sb.src index 926da0359d7e..73cc1c3a0b2c 100644 --- a/basic/source/classes/sb.src +++ b/basic/source/classes/sb.src @@ -588,6 +588,10 @@ Resource RID_BASIC_START { Text [ en-US ] = "For loop not initialized." ; }; + String ERRCODE_BASIC_COMPAT & ERRCODE_RES_MASK + { + Text [ en-US ] = "$(ARG1)" ; + }; }; // Hinweis: IDS_SBERR_TERMINATED = IDS_SBERR_START+2000. String IDS_SBERR_TERMINATED diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 0e8928bc6c1a..849fd839bfd1 100644..100755 --- 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; } @@ -564,7 +567,7 @@ SbxDataType unoToSbxType( const Reference< XIdlClass >& xIdlClass ) } return eRetType; } -void unoToSbxValue( SbxVariable* pVar, const Any& aValue ); + static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int32 >& indices, Sequence< sal_Int32 >& sizes, const Any& aValue, sal_Int32& dimension, sal_Bool bIsZeroIndex, Type* pType = NULL ) { Type aType = aValue.getValueType(); @@ -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/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 092ef458041e..4b58942d77aa 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -52,7 +52,13 @@ #include <basic/basrdll.hxx> #include <vos/mutex.hxx> +#include <basic/sbobjmod.hxx> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/script/ModuleType.hpp> +#include <com/sun/star/script/XVBACompat.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +using namespace com::sun::star; // for the bsearch #ifdef WNT @@ -72,6 +78,13 @@ #include <vcl/svapp.hxx> using namespace ::com::sun::star; +#include <com/sun/star/script/XLibraryContainer.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/awt/XDialogProvider.hpp> +#include <com/sun/star/awt/XTopWindow.hpp> +#include <com/sun/star/awt/XControl.hpp> +#include <cppuhelper/implbase1.hxx> +#include <comphelper/anytostring.hxx> TYPEINIT1(SbModule,SbxObject) TYPEINIT1(SbMethod,SbxMethod) @@ -79,6 +92,8 @@ TYPEINIT1(SbProperty,SbxProperty) TYPEINIT1(SbProcedureProperty,SbxProperty) TYPEINIT1(SbJScriptModule,SbModule) TYPEINIT1(SbJScriptMethod,SbMethod) +TYPEINIT1(SbObjModule,SbModule) +TYPEINIT1(SbUserFormModule,SbObjModule) SV_DECL_VARARR(SbiBreakpoints,USHORT,4,4) SV_IMPL_VARARR(SbiBreakpoints,USHORT) @@ -86,6 +101,26 @@ SV_IMPL_VARARR(SbiBreakpoints,USHORT) SV_IMPL_VARARR(HighlightPortions, HighlightPortion) +bool getDefaultVBAMode( StarBASIC* pb ) +{ + bool bResult = false; + if ( pb && pb->IsDocBasic() ) + { + uno::Any aDoc; + if ( pb->GetUNOConstant( "ThisComponent", aDoc ) ) + { + uno::Reference< beans::XPropertySet > xProp( aDoc, uno::UNO_QUERY ); + if ( xProp.is() ) + { + uno::Reference< script::XVBACompat > xVBAMode( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BasicLibraries") ) ), uno::UNO_QUERY ); + if ( xVBAMode.is() ) + bResult = ( xVBAMode->getVBACompatModeOn() == sal_True ); + } + } + } + return bResult; +} + class AsyncQuitHandler { AsyncQuitHandler() {} @@ -148,12 +183,13 @@ bool UnlockControllerHack( StarBASIC* pBasic ) // Ein BASIC-Modul hat EXTSEARCH gesetzt, damit die im Modul enthaltenen // Elemente von anderen Modulen aus gefunden werden koennen. -SbModule::SbModule( const String& rName ) +SbModule::SbModule( const String& rName, BOOL bVBACompat ) : SbxObject( String( RTL_CONSTASCII_USTRINGPARAM("StarBASICModule") ) ), - pImage( NULL ), pBreaks( NULL ), pClassData( NULL ) + pImage( NULL ), pBreaks( NULL ), pClassData( NULL ), mbVBACompat( bVBACompat ), pDocObject( NULL ), bIsProxyModule( false ) { SetName( rName ); SetFlag( SBX_EXTSEARCH | SBX_GBLSEARCH ); + SetModuleType( script::ModuleType::NORMAL ); } SbModule::~SbModule() @@ -328,7 +364,10 @@ void SbModule::Clear() SbxVariable* SbModule::Find( const XubString& rName, SbxClassType t ) { + // make sure a search in an uninstatiated class module will fail SbxVariable* pRes = SbxObject::Find( rName, t ); + if ( bIsProxyModule ) + return NULL; if( !pRes && pImage ) { SbiInstance* pInst = pINST; @@ -427,6 +466,8 @@ void SbModule::SetSource( const String& r ) void SbModule::SetSource32( const ::rtl::OUString& r ) { + // Default basic mode to library container mode, but.. allow Option VBASupport 0/1 override + SetVBACompat( getDefaultVBAMode( static_cast< StarBASIC*>( GetParent() ) ) ); aOUSource = r; StartDefinitions(); SbiTokenizer aTok( r ); @@ -457,9 +498,14 @@ void SbModule::SetSource32( const ::rtl::OUString& r ) if( eCurTok == OPTION ) { eCurTok = aTok.Next(); - if( eCurTok == COMPATIBLE - || ( ( eCurTok == VBASUPPORT ) && ( aTok.Next() == NUMBER ) && ( aTok.GetDbl()== 1 ) ) ) + if( eCurTok == COMPATIBLE ) aTok.SetCompatible( true ); + else if ( ( eCurTok == VBASUPPORT ) && ( aTok.Next() == NUMBER ) ) + { + BOOL bIsVBA = ( aTok.GetDbl()== 1 ); + SetVBACompat( bIsVBA ); + aTok.SetCompatible( bIsVBA ); + } } } eLastTok = eCurTok; @@ -600,7 +646,15 @@ void ClearUnoObjectsInRTL_Impl( StarBASIC* pBasic ) if( ((StarBASIC*)p) != pBasic ) ClearUnoObjectsInRTL_Impl_Rek( (StarBASIC*)p ); } +BOOL SbModule::IsVBACompat() +{ + return mbVBACompat; +} +void SbModule::SetVBACompat( BOOL bCompat ) +{ + mbVBACompat = bCompat; +} // Ausfuehren eines BASIC-Unterprogramms USHORT SbModule::Run( SbMethod* pMeth ) { @@ -695,10 +749,9 @@ USHORT SbModule::Run( SbMethod* pMeth ) if( pRt->pNext ) pRt->pNext->block(); pINST->pRun = pRt; - if ( SbiRuntime ::isVBAEnabled() ) + if ( mbVBACompat ) { pINST->EnableCompatibility( TRUE ); - pRt->SetVBAEnabled( true ); } while( pRt->Step() ) {} if( pRt->pNext ) @@ -1483,6 +1536,389 @@ SbJScriptMethod::~SbJScriptMethod() ///////////////////////////////////////////////////////////////////////// +SbObjModule::SbObjModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible ) + : SbModule( rName, bIsVbaCompatible ) +{ + SetModuleType( mInfo.ModuleType ); + if ( mInfo.ModuleType == script::ModuleType::FORM ) + { + SetClassName( rtl::OUString::createFromAscii( "Form" ) ); + } + else if ( mInfo.ModuleObject.is() ) + SetUnoObject( uno::makeAny( mInfo.ModuleObject ) ); +} +void +SbObjModule::SetUnoObject( const uno::Any& aObj ) throw ( uno::RuntimeException ) +{ + SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,(SbxVariable*)pDocObject); + if ( pUnoObj && pUnoObj->getUnoAny() == aObj ) // object is equal, nothing to do + return; + pDocObject = new SbUnoObject( GetName(), uno::makeAny( aObj ) ); + + com::sun::star::uno::Reference< com::sun::star::lang::XServiceInfo > xServiceInfo( aObj, com::sun::star::uno::UNO_QUERY_THROW ); + if( xServiceInfo->supportsService( rtl::OUString::createFromAscii( "ooo.vba.excel.Worksheet" ) ) ) + { + SetClassName( rtl::OUString::createFromAscii( "Worksheet" ) ); + } + else if( xServiceInfo->supportsService( rtl::OUString::createFromAscii( "ooo.vba.excel.Workbook" ) ) ) + { + SetClassName( rtl::OUString::createFromAscii( "Workbook" ) ); + } +} + +SbxVariable* +SbObjModule::GetObject() +{ + return pDocObject; +} +SbxVariable* +SbObjModule::Find( const XubString& rName, SbxClassType t ) +{ + //OSL_TRACE("SbObjectModule find for %s", rtl::OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr() ); + SbxVariable* pVar = NULL; + if ( pDocObject) + pVar = pDocObject->Find( rName, t ); + if ( !pVar ) + pVar = SbModule::Find( rName, t ); + return pVar; +} + +typedef ::cppu::WeakImplHelper1< awt::XTopWindowListener > EventListener_BASE; + +class FormObjEventListenerImpl : public EventListener_BASE +{ + SbUserFormModule* mpUserForm; + uno::Reference< lang::XComponent > mxComponent; + bool mbDisposed; + sal_Bool mbOpened; + sal_Bool mbActivated; + sal_Bool mbShowing; + FormObjEventListenerImpl(); // not defined + FormObjEventListenerImpl(const FormObjEventListenerImpl&); // not defined +public: + FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent ) : mpUserForm( pUserForm ), mxComponent( xComponent) , mbDisposed( false ), mbOpened( sal_False ), mbActivated( sal_False ), mbShowing( sal_False ) + { + if ( mxComponent.is() ) + { + uno::Reference< awt::XTopWindow > xList( mxComponent, uno::UNO_QUERY_THROW );; + OSL_TRACE("*********** Registering the listener"); + xList->addTopWindowListener( this ); + } + } + + ~FormObjEventListenerImpl() + { + removeListener(); + } + sal_Bool isShowing() { return mbShowing; } + void removeListener() + { + try + { + if ( mxComponent.is() && !mbDisposed ) + { + uno::Reference< awt::XTopWindow > xList( mxComponent, uno::UNO_QUERY_THROW );; + OSL_TRACE("*********** Removing the listener"); + xList->removeTopWindowListener( this ); + mxComponent = NULL; + } + } + catch( uno::Exception& ) {} + } + virtual void SAL_CALL windowOpened( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) + { + if ( mpUserForm ) + { + mbOpened = sal_True; + mbShowing = sal_True; + if ( mbActivated ) + { + mbOpened = mbActivated = sal_False; + mpUserForm->triggerActivateEvent(); + } + } + } + + //liuchen 2009-7-21, support Excel VBA Form_QueryClose event + virtual void SAL_CALL windowClosing( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) + { +#if IN_THE_FUTURE + uno::Reference< awt::XDialog > xDialog( e.Source, uno::UNO_QUERY ); + if ( xDialog.is() ) + { + uno::Reference< awt::XControl > xControl( xDialog, uno::UNO_QUERY ); + if ( xControl->getPeer().is() ) + { + uno::Reference< document::XVbaMethodParameter > xVbaMethodParameter( xControl->getPeer(), uno::UNO_QUERY ); + if ( xVbaMethodParameter.is() ) + { + sal_Int8 nCancel = 0; + sal_Int8 nCloseMode = 0; + + Sequence< Any > aParams; + aParams.realloc(2); + aParams[0] <<= nCancel; + aParams[1] <<= nCloseMode; + + mpUserForm->triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_QueryClose") ), + aParams); + xVbaMethodParameter->setVbaMethodParameter( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Cancel")), aParams[0]); + return; + + } + } + } + + mpUserForm->triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_QueryClose") ) ); +#endif + } + //liuchen 2009-7-21 + + virtual void SAL_CALL windowClosed( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) { mbOpened = sal_False; mbShowing = sal_False; } + virtual void SAL_CALL windowMinimized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) {} + virtual void SAL_CALL windowNormalized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException){} + virtual void SAL_CALL windowActivated( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) + { + if ( mpUserForm ) + { + mbActivated = sal_True; + if ( mbOpened ) + { + mbOpened = mbActivated = sal_False; + mpUserForm->triggerActivateEvent(); + } + } + } + + virtual void SAL_CALL windowDeactivated( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) + { + if ( mpUserForm ) + mpUserForm->triggerDeActivateEvent(); + } + + + virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw (uno::RuntimeException) + { + OSL_TRACE("** Userform/Dialog disposing"); + mbDisposed = true; + uno::Any aSource; + aSource <<= Source; + mxComponent = NULL; + if ( mpUserForm ) + mpUserForm->ResetApiObj(); + } +}; + +SbUserFormModule::SbUserFormModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsCompat ) + :SbObjModule( rName, mInfo, bIsCompat ), mbInit( false ) +{ + m_xModel.set( mInfo.ModuleObject, uno::UNO_QUERY_THROW ); +} + +void SbUserFormModule::ResetApiObj() +{ + if ( m_xDialog.is() ) // probably someone close the dialog window + { + triggerTerminateEvent(); + } + pDocObject = NULL; + m_xDialog = NULL; +} + +void SbUserFormModule::triggerMethod( const String& aMethodToRun ) +{ + Sequence< Any > aArguments; + triggerMethod( aMethodToRun, aArguments ); +} +void SbUserFormModule::triggerMethod( const String& aMethodToRun, Sequence< Any >& /*aArguments*/) +{ + OSL_TRACE("*** trigger %s ***", rtl::OUStringToOString( aMethodToRun, RTL_TEXTENCODING_UTF8 ).getStr() ); + // Search method + SbxVariable* pMeth = SbObjModule::Find( aMethodToRun, SbxCLASS_METHOD ); + if( pMeth ) + { +#if IN_THE_FUTURE + //liuchen 2009-7-21, support Excel VBA UserForm_QueryClose event with parameters + if ( aArguments.getLength() > 0 ) // Setup parameters + { + SbxArrayRef xArray = new SbxArray; + xArray->Put( pMeth, 0 ); // Method as parameter 0 + + for ( sal_Int32 i = 0; i < aArguments.getLength(); ++i ) + { + SbxVariableRef xSbxVar = new SbxVariable( SbxVARIANT ); + unoToSbxValue( static_cast< SbxVariable* >( xSbxVar ), aArguments[i] ); + xArray->Put( xSbxVar, static_cast< USHORT >( i ) + 1 ); + + // Enable passing by ref + if ( xSbxVar->GetType() != SbxVARIANT ) + xSbxVar->SetFlag( SBX_FIXED ); + } + pMeth->SetParameters( xArray ); + + SbxValues aVals; + pMeth->Get( aVals ); + + for ( sal_Int32 i = 0; i < aArguments.getLength(); ++i ) + { + aArguments[i] = sbxToUnoValue( xArray->Get( static_cast< USHORT >(i) + 1) ); + } + pMeth->SetParameters( NULL ); + } + else +//liuchen 2009-7-21 +#endif + { + SbxValues aVals; + pMeth->Get( aVals ); + } + } +} + +void SbUserFormModule::triggerActivateEvent( void ) +{ + OSL_TRACE("**** entering SbUserFormModule::triggerActivate"); + triggerMethod( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UserForm_activate") ) ); + OSL_TRACE("**** leaving SbUserFormModule::triggerActivate"); +} + +void SbUserFormModule::triggerDeActivateEvent( void ) +{ + OSL_TRACE("**** SbUserFormModule::triggerDeActivate"); + triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_DeActivate") ) ); +} + +void SbUserFormModule::triggerInitializeEvent( void ) + +{ + if ( mbInit ) + return; + OSL_TRACE("**** SbUserFormModule::triggerInitializeEvent"); + static String aInitMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Initialize") ); + triggerMethod( aInitMethodName ); + mbInit = true; +} + +void SbUserFormModule::triggerTerminateEvent( void ) +{ + OSL_TRACE("**** SbUserFormModule::triggerTerminateEvent"); + static String aTermMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Terminate") ); + triggerMethod( aTermMethodName ); + mbInit=false; +} + +void SbUserFormModule::load() +{ + OSL_TRACE("** load() "); + // forces a load + if ( !pDocObject ) + InitObject(); +} + +//liuchen 2009-7-21 change to accmordate VBA's beheavior +void SbUserFormModule::Unload() +{ + OSL_TRACE("** Unload() "); + + sal_Int8 nCancel = 0; + sal_Int8 nCloseMode = 1; + + Sequence< Any > aParams; + aParams.realloc(2); + aParams[0] <<= nCancel; + aParams[1] <<= nCloseMode; + + triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_QueryClose") ), aParams); + + aParams[0] >>= nCancel; + if (nCancel == 1) + { + return; + } + + if ( m_xDialog.is() ) + { + triggerTerminateEvent(); + } + // Search method + SbxVariable* pMeth = SbObjModule::Find( String( RTL_CONSTASCII_USTRINGPARAM( "UnloadObject" ) ), SbxCLASS_METHOD ); + if( pMeth ) + { + OSL_TRACE("Attempting too run the UnloadObjectMethod"); + m_xDialog = NULL; //release ref to the uno object + SbxValues aVals; + FormObjEventListenerImpl* pFormListener = dynamic_cast< FormObjEventListenerImpl* >( m_DialogListener.get() ); + bool bWaitForDispose = true; // assume dialog is showing + if ( pFormListener ) + { + bWaitForDispose = pFormListener->isShowing(); + OSL_TRACE("Showing %d", bWaitForDispose ); + } + pMeth->Get( aVals); + if ( !bWaitForDispose ) + { + // we've either already got a dispose or we'er never going to get one + ResetApiObj(); + } // else wait for dispose + OSL_TRACE("UnloadObject completed ( we hope )"); + } +} +//liuchen + +void SbUserFormModule::InitObject() +{ + try + { + + String aHook( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobals" ) ); + SbUnoObject* pGlobs = (SbUnoObject*)GetParent()->Find( aHook, SbxCLASS_DONTCARE ); + if ( m_xModel.is() && pGlobs ) + { + + uno::Reference< lang::XMultiServiceFactory > xVBAFactory( pGlobs->getUnoAny(), uno::UNO_QUERY_THROW ); + uno::Reference< lang::XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory(); + uno::Sequence< uno::Any > aArgs(1); + aArgs[ 0 ] <<= m_xModel; + rtl::OUString sDialogUrl( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.script:" ) ); + rtl::OUString sProjectName( RTL_CONSTASCII_USTRINGPARAM("Standard") ); + if ( this->GetParent()->GetName().Len() ) + sProjectName = this->GetParent()->GetName(); + sDialogUrl = sDialogUrl.concat( sProjectName ).concat( rtl::OUString( '.') ).concat( GetName() ).concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("?location=document") ) ); + + uno::Reference< awt::XDialogProvider > xProvider( xFactory->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.DialogProvider")), aArgs ), uno::UNO_QUERY_THROW ); + m_xDialog = xProvider->createDialog( sDialogUrl ); + + // create vba api object + aArgs.realloc( 4 ); + aArgs[ 0 ] = uno::Any(); + aArgs[ 1 ] <<= m_xDialog; + aArgs[ 2 ] <<= m_xModel; + aArgs[ 3 ] <<= rtl::OUString( GetParent()->GetName() ); + pDocObject = new SbUnoObject( GetName(), uno::makeAny( xVBAFactory->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.UserForm")), aArgs ) ) ); + uno::Reference< lang::XComponent > xComponent( aArgs[ 1 ], uno::UNO_QUERY_THROW ); + // remove old listener if it exists + FormObjEventListenerImpl* pFormListener = dynamic_cast< FormObjEventListenerImpl* >( m_DialogListener.get() ); + if ( pFormListener ) + pFormListener->removeListener(); + m_DialogListener = new FormObjEventListenerImpl( this, xComponent ); + + triggerInitializeEvent(); + } + } + catch( uno::Exception& ) + { + } + +} + +SbxVariable* +SbUserFormModule::Find( const XubString& rName, SbxClassType t ) +{ + if ( !pDocObject && !GetSbData()->bRunInit && pINST ) + InitObject(); + return SbObjModule::Find( rName, t ); +} +///////////////////////////////////////////////////////////////////////// SbProperty::SbProperty( const String& r, SbxDataType t, SbModule* p ) : SbxProperty( r, t ), pMod( p ) diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index c7a63b6d7fbb..46f829b382e8 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -32,6 +32,7 @@ #include "sbcomp.hxx" #include "image.hxx" #include <limits> +#include <com/sun/star/script/ModuleType.hpp> // nInc ist die Inkrementgroesse der Puffer @@ -127,12 +128,12 @@ void SbiCodeGen::Save() // OPTION EXPLICIT-Flag uebernehmen if( pParser->bExplicit ) p->SetFlag( SBIMG_EXPLICIT ); - if( pParser->IsVBASupportOn() ) - p->SetFlag( SBIMG_VBASUPPORT ); int nIfaceCount = 0; - if( pParser->bClassModule ) + if( rMod.mnType == com::sun::star::script::ModuleType::CLASS ) { + OSL_TRACE("COdeGen::save() classmodule processing"); + rMod.bIsProxyModule = true; p->SetFlag( SBIMG_CLASSMODULE ); pCLASSFAC->AddClassModule( &rMod ); @@ -155,6 +156,10 @@ void SbiCodeGen::Save() else { pCLASSFAC->RemoveClassModule( &rMod ); + // Only a ClassModule can revert to Normal + if ( rMod.mnType == com::sun::star::script::ModuleType::CLASS ) + rMod.mnType = com::sun::star::script::ModuleType::NORMAL; + rMod.bIsProxyModule = false; } if( pParser->bText ) p->SetFlag( SBIMG_COMPARETEXT ); diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index 400e77a94b16..8770dc8539f0 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -29,6 +29,7 @@ #include "precompiled_basic.hxx" #include <basic/sbx.hxx> #include "sbcomp.hxx" +#include <com/sun/star/script/ModuleType.hpp> struct SbiParseStack { // "Stack" fuer Statement-Blocks SbiParseStack* pNext; // Chain @@ -140,7 +141,8 @@ SbiParser::SbiParser( StarBASIC* pb, SbModule* pm ) bNewGblDefs = bSingleLineIf = bExplicit = FALSE; - bClassModule = FALSE; + bClassModule = ( pm->GetModuleType() == com::sun::star::script::ModuleType::CLASS ); + OSL_TRACE("Parser - %s, bClassModule %d", rtl::OUStringToOString( pm->GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), bClassModule ); pPool = &aPublics; for( short i = 0; i < 26; i++ ) eDefTypes[ i ] = SbxVARIANT; // Kein expliziter Defaulttyp @@ -153,6 +155,10 @@ SbiParser::SbiParser( StarBASIC* pb, SbModule* pm ) rTypeArray = new SbxArray; // Array fuer Benutzerdefinierte Typen rEnumArray = new SbxArray; // Array for Enum types + bVBASupportOn = pm->IsVBACompat(); + if ( bVBASupportOn ) + EnableCompatibility(); + } @@ -751,6 +757,7 @@ void SbiParser::Option() case CLASSMODULE: bClassModule = TRUE; + aGen.GetModule().SetModuleType( com::sun::star::script::ModuleType::CLASS ); break; case VBASUPPORT: if( Next() == NUMBER ) @@ -760,6 +767,10 @@ void SbiParser::Option() bVBASupportOn = ( nVal == 1 ); if ( bVBASupportOn ) EnableCompatibility(); + // if the module setting is different + // reset it to what the Option tells us + if ( bVBASupportOn != aGen.GetModule().IsVBACompat() ) + aGen.GetModule().SetVBACompat( bVBASupportOn ); break; } } diff --git a/basic/source/inc/codegen.hxx b/basic/source/inc/codegen.hxx index d0a613eabebc..3d90d16bdcbe 100644 --- a/basic/source/inc/codegen.hxx +++ b/basic/source/inc/codegen.hxx @@ -53,6 +53,7 @@ public: void GenStmnt(); // evtl. Statement-Opcode erzeugen UINT32 GetPC(); UINT32 GetOffset() { return GetPC() + 1; } + SbModule& GetModule() { return rMod; } void Save(); // #29955 for-Schleifen-Ebene pflegen diff --git a/basic/source/inc/errobject.hxx b/basic/source/inc/errobject.hxx new file mode 100644 index 000000000000..39e6e319caae --- /dev/null +++ b/basic/source/inc/errobject.hxx @@ -0,0 +1,52 @@ +/************************************************************************* +* +* 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 ERROBJECT_HXX +#define ERROBJECT_HXX +#include "sbunoobj.hxx" +#include <ooo/vba/XErrObject.hpp> + + +class SbxErrObject : public SbUnoObject +{ + class ErrObject* m_pErrObject; + com::sun::star::uno::Reference< ooo::vba::XErrObject > m_xErr; + + SbxErrObject( const String& aName_, const com::sun::star::uno::Any& aUnoObj_ ); + ~SbxErrObject(); + + class ErrObject* getImplErrObject( void ) + { return m_pErrObject; } + +public: + static SbxVariableRef getErrObject(); + static com::sun::star::uno::Reference< ooo::vba::XErrObject > getUnoErrObject(); + + void setNumberAndDescription( ::sal_Int32 _number, const ::rtl::OUString& _description ) + throw (com::sun::star::uno::RuntimeException); +}; +#endif diff --git a/basic/source/inc/image.hxx b/basic/source/inc/image.hxx index 7347efe288f3..d674b91faf71 100644 --- a/basic/source/inc/image.hxx +++ b/basic/source/inc/image.hxx @@ -106,6 +106,5 @@ public: #define SBIMG_COMPARETEXT 0x0002 // OPTION COMPARE TEXT ist aktiv #define SBIMG_INITCODE 0x0004 // Init-Code vorhanden #define SBIMG_CLASSMODULE 0x0008 // OPTION ClassModule is active -#define SBIMG_VBASUPPORT 0x0020 // OPTION VBASupport is 1 #endif diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx index 7cd2de701634..4d31483ab513 100644 --- a/basic/source/inc/namecont.hxx +++ b/basic/source/inc/namecont.hxx @@ -60,6 +60,7 @@ #include <cppuhelper/implbase2.hxx> #include <cppuhelper/compbase7.hxx> #include <cppuhelper/interfacecontainer.hxx> +#include <com/sun/star/script/XVBACompat.hpp> class BasicManager; @@ -73,6 +74,7 @@ typedef ::cppu::WeakComponentImplHelper7< ::com::sun::star::script::XLibraryContainerExport, ::com::sun::star::script::XLibraryContainer3, ::com::sun::star::container::XContainer, + ::com::sun::star::script::XVBACompat, ::com::sun::star::lang::XServiceInfo > LibraryContainerHelper; typedef ::cppu::WeakImplHelper2< ::com::sun::star::container::XNameContainer, @@ -218,6 +220,7 @@ public: class SfxLibraryContainer :public LibraryContainerHelper ,public ::utl::OEventListenerAdapter { + sal_Bool mbVBACompat; protected: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > mxSFI; @@ -501,6 +504,9 @@ public: throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) = 0; + // Methods XVBACompat + virtual ::sal_Bool SAL_CALL getVBACompatModeOn() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setVBACompatModeOn( ::sal_Bool _vbacompatmodeon ) throw (::com::sun::star::uno::RuntimeException); }; class LibraryContainerMethodGuard diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index 4a3f38c51027..c9a41110ad46 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -219,6 +219,8 @@ public: void Error( SbError ); // trappable Error void Error( SbError, const String& rMsg ); // trappable Error mit Message + void ErrorVB( sal_Int32 nVBNumber, const String& rMsg ); + void setErrorVB( sal_Int32 nVBNumber, const String& rMsg ); void FatalError( SbError ); // non-trappable Error void FatalError( SbError, const String& ); // non-trappable Error void Abort(); // Abbruch mit aktuellem Fehlercode @@ -433,7 +435,7 @@ class SbiRuntime void StepFIND_CM( UINT32, UINT32 ); void StepFIND_STATIC( UINT32, UINT32 ); public: - void SetVBAEnabled( bool bEnabled ) { bVBAEnabled = bEnabled; }; + void SetVBAEnabled( bool bEnabled ); USHORT GetImageFlag( USHORT n ) const; USHORT GetBase(); xub_StrLen nLine,nCol1,nCol2; // aktuelle Zeile, Spaltenbereich @@ -441,10 +443,11 @@ public: SbiRuntime( SbModule*, SbMethod*, UINT32 ); ~SbiRuntime(); - void Error( SbError ); // Fehler setzen, falls != 0 + void Error( SbError, bool bVBATranslationAlreadyDone = false ); // Fehler setzen, falls != 0 void Error( SbError, const String& ); // Fehler setzen, falls != 0 void FatalError( SbError ); // Fehlerbehandlung=Standard, Fehler setzen void FatalError( SbError, const String& ); // Fehlerbehandlung=Standard, Fehler setzen + static sal_Int32 translateErrorToVba( SbError nError, String& rMsg ); void DumpPCode(); BOOL Step(); // Einzelschritt (ein Opcode) void Stop() { bRun = FALSE; } diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx index 19b0698d22a9..31025c48c4a4 100644 --- a/basic/source/inc/scriptcont.hxx +++ b/basic/source/inc/scriptcont.hxx @@ -30,6 +30,8 @@ #include "namecont.hxx" #include <basic/basmgr.hxx> +#include <com/sun/star/script/XVBAModuleInfo.hpp> +#include <comphelper/uno3.hxx> class BasicManager; @@ -134,13 +136,19 @@ public: }; //============================================================================ +typedef std::hash_map< ::rtl::OUString, ::com::sun::star::script::ModuleInfo, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ModuleInfoMap; + +typedef ::cppu::ImplHelper1 < ::com::sun::star::script::XVBAModuleInfo + > SfxScriptLibrary_BASE; class SfxScriptLibrary : public SfxLibrary + , public SfxScriptLibrary_BASE { friend class SfxScriptLibraryContainer; sal_Bool mbLoadedSource; sal_Bool mbLoadedBinary; + ModuleInfoMap mModuleInfos; // Provide modify state including resources virtual sal_Bool isModified( void ); @@ -167,6 +175,15 @@ public: const ::rtl::OUString& aLibInfoFileURL, const ::rtl::OUString& aStorageURL, sal_Bool ReadOnly ); + DECLARE_XINTERFACE() + DECLARE_XTYPEPROVIDER() + + // XVBAModuleInfo + virtual ::com::sun::star::script::ModuleInfo SAL_CALL getModuleInfo( const ::rtl::OUString& ModuleName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasModuleInfo( const ::rtl::OUString& ModuleName ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL insertModuleInfo( const ::rtl::OUString& ModuleName, const ::com::sun::star::script::ModuleInfo& ModuleInfo ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeModuleInfo( const ::rtl::OUString& ModuleName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + static bool containsValidModule( const ::com::sun::star::uno::Any& _rElement ); protected: diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 9a21e488d4aa..e963de871c32 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -61,6 +61,7 @@ #else #include <osl/file.hxx> #endif +#include "errobject.hxx" #ifdef _USE_UNO #include <comphelper/processfactory.hxx> @@ -120,6 +121,10 @@ using namespace com::sun::star::io; #include <io.h> #endif +using namespace rtl; + +#include <basic/sbobjmod.hxx> + static void FilterWhiteSpace( String& rStr ) { rStr.EraseAllChars( ' ' ); @@ -256,6 +261,7 @@ RTLFUNC(Error) { String aErrorMsg; SbError nErr = 0L; + INT32 nCode = 0; if( rPar.Count() == 1 ) { nErr = StarBASIC::GetErrBasic(); @@ -263,14 +269,34 @@ RTLFUNC(Error) } else { - INT32 nCode = rPar.Get( 1 )->GetLong(); + nCode = rPar.Get( 1 )->GetLong(); if( nCode > 65535L ) StarBASIC::Error( SbERR_CONVERSION ); else nErr = StarBASIC::GetSfxFromVBError( (USHORT)nCode ); } - pBasic->MakeErrorText( nErr, aErrorMsg ); - rPar.Get( 0 )->PutString( pBasic->GetErrorText() ); + + bool bVBA = SbiRuntime::isVBAEnabled(); + String tmpErrMsg; + if( bVBA && aErrorMsg.Len() > 0 ) + { + tmpErrMsg = aErrorMsg; + } + else + { + pBasic->MakeErrorText( nErr, aErrorMsg ); + tmpErrMsg = pBasic->GetErrorText(); + } + // If this rtlfunc 'Error' passed a errcode the same as the active Err Objects's + // current err then return the description for the error message if it is set + // ( complicated isn't it ? ) + if ( bVBA && rPar.Count() > 1 ) + { + com::sun::star::uno::Reference< ooo::vba::XErrObject > xErrObj( SbxErrObject::getUnoErrObject() ); + if ( xErrObj.is() && xErrObj->getNumber() == nCode && xErrObj->getDescription().getLength() ) + tmpErrMsg = xErrObj->getDescription(); + } + rPar.Get( 0 )->PutString( tmpErrMsg ); } } @@ -4106,12 +4132,20 @@ RTLFUNC(Load) // Diesen Call einfach an das Object weiterreichen SbxBase* pObj = (SbxObject*)rPar.Get(1)->GetObject(); - if( pObj && pObj->IsA( TYPE( SbxObject ) ) ) + if ( pObj ) { - SbxVariable* pVar = ((SbxObject*)pObj)-> - Find( String( RTL_CONSTASCII_USTRINGPARAM("Load") ), SbxCLASS_METHOD ); - if( pVar ) - pVar->GetInteger(); + if( pObj->IsA( TYPE( SbUserFormModule ) ) ) + { + SbUserFormModule* pFormModule = ( SbUserFormModule* )pObj; + pFormModule->load(); + } + else if( pObj->IsA( TYPE( SbxObject ) ) ) + { + SbxVariable* pVar = ((SbxObject*)pObj)-> + Find( String( RTL_CONSTASCII_USTRINGPARAM("Load") ), SbxCLASS_METHOD ); + if( pVar ) + pVar->GetInteger(); + } } } @@ -4129,12 +4163,20 @@ RTLFUNC(Unload) // Diesen Call einfach an das Object weitereichen SbxBase* pObj = (SbxObject*)rPar.Get(1)->GetObject(); - if( pObj && pObj->IsA( TYPE( SbxObject ) ) ) + if ( pObj ) { - SbxVariable* pVar = ((SbxObject*)pObj)-> - Find( String( RTL_CONSTASCII_USTRINGPARAM("Unload") ), SbxCLASS_METHOD ); - if( pVar ) - pVar->GetInteger(); + if( pObj->IsA( TYPE( SbUserFormModule ) ) ) + { + SbUserFormModule* pFormModule = ( SbUserFormModule* )pObj; + pFormModule->Unload(); + } + else if( pObj->IsA( TYPE( SbxObject ) ) ) + { + SbxVariable* pVar = ((SbxObject*)pObj)-> + Find( String( RTL_CONSTASCII_USTRINGPARAM("Unload") ), SbxCLASS_METHOD ); + if( pVar ) + pVar->GetInteger(); + } } } diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index e0501e5c0d94..b25c213a493d 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -61,6 +61,7 @@ #endif #include <vcl/jobset.hxx> +#include <basic/sbobjmod.hxx> #include "sbintern.hxx" #include "runtime.hxx" @@ -2594,14 +2595,16 @@ RTLFUNC(Me) SbModule* pActiveModule = pINST->GetActiveModule(); SbClassModuleObject* pClassModuleObject = PTR_CAST(SbClassModuleObject,pActiveModule); + SbxVariableRef refVar = rPar.Get(0); if( pClassModuleObject == NULL ) { - StarBASIC::Error( SbERR_INVALID_USAGE_OBJECT ); + SbObjModule* pMod = PTR_CAST(SbObjModule,pActiveModule); + if ( pMod ) + refVar->PutObject( pMod ); + else + StarBASIC::Error( SbERR_INVALID_USAGE_OBJECT ); } else - { - SbxVariableRef refVar = rPar.Get(0); refVar->PutObject( pClassModuleObject ); - } } diff --git a/basic/source/runtime/props.cxx b/basic/source/runtime/props.cxx index 9b4b35f551e2..cec74444e7a2 100644 --- a/basic/source/runtime/props.cxx +++ b/basic/source/runtime/props.cxx @@ -31,6 +31,7 @@ #include "runtime.hxx" #include "stdobj.hxx" #include "rtlproto.hxx" +#include "errobject.hxx" // Properties und Methoden legen beim Get (bWrite = FALSE) den Returnwert @@ -50,14 +51,21 @@ RTLFUNC(Err) (void)pBasic; (void)bWrite; - if( bWrite ) + if( SbiRuntime::isVBAEnabled() ) { - INT32 nVal = rPar.Get( 0 )->GetLong(); - if( nVal <= 65535L ) - StarBASIC::Error( StarBASIC::GetSfxFromVBError( (USHORT) nVal ) ); + rPar.Get( 0 )->PutObject( SbxErrObject::getErrObject() ); } else - rPar.Get( 0 )->PutLong( StarBASIC::GetVBErrorCode( StarBASIC::GetErrBasic() ) ); + { + if( bWrite ) + { + INT32 nVal = rPar.Get( 0 )->GetLong(); + if( nVal <= 65535L ) + StarBASIC::Error( StarBASIC::GetSfxFromVBError( (USHORT) nVal ) ); + } + else + rPar.Get( 0 )->PutLong( StarBASIC::GetVBErrorCode( StarBASIC::GetErrBasic() ) ); + } } RTLFUNC(False) diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 52aa76e2f2df..29e49b0ffde8 100644..100755 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -43,13 +43,16 @@ #include <comphelper/processfactory.hxx> #include <com/sun/star/container/XEnumerationAccess.hpp> #include "sbunoobj.hxx" +#include "errobject.hxx" + +using namespace ::com::sun::star; bool SbiRuntime::isVBAEnabled() { bool result = false; SbiInstance* pInst = pINST; if ( pInst && pINST->pRun ) - result = pInst->pRun->GetImageFlag( SBIMG_VBASUPPORT ); + result = pInst->pRun->bVBAEnabled; return result; } @@ -60,6 +63,24 @@ void StarBASIC::StaticEnableReschedule( BOOL bReschedule ) { bStaticGlobalEnableReschedule = bReschedule; } +void StarBASIC::SetVBAEnabled( BOOL bEnabled ) +{ + if ( bDocBasic ) + { + bVBAEnabled = bEnabled; + } +} + +BOOL StarBASIC::isVBAEnabled() +{ + if ( bDocBasic ) + { + if( SbiRuntime::isVBAEnabled() ) + return TRUE; + return bVBAEnabled; + } + return FALSE; +} struct SbiArgvStack { // Argv stack: @@ -422,6 +443,35 @@ void SbiInstance::Error( SbError n, const String& rMsg ) } } +void SbiInstance::ErrorVB( sal_Int32 nVBNumber, const String& rMsg ) +{ + if( !bWatchMode ) + { + SbError n = StarBASIC::GetSfxFromVBError( static_cast< USHORT >( nVBNumber ) ); + if ( !n ) + n = nVBNumber; // force orig number, probably should have a specific table of vb ( localized ) errors + + aErrorMsg = rMsg; + SbiRuntime::translateErrorToVba( n, aErrorMsg ); + + bool bVBATranslationAlreadyDone = true; + pRun->Error( SbERR_BASIC_COMPAT, bVBATranslationAlreadyDone ); + } +} + +void SbiInstance::setErrorVB( sal_Int32 nVBNumber, const String& rMsg ) +{ + SbError n = StarBASIC::GetSfxFromVBError( static_cast< USHORT >( nVBNumber ) ); + if( !n ) + n = nVBNumber; // force orig number, probably should have a specific table of vb ( localized ) errors + + aErrorMsg = rMsg; + SbiRuntime::translateErrorToVba( n, aErrorMsg ); + + nErr = n; +} + + void SbiInstance::FatalError( SbError n ) { pRun->FatalError( n ); @@ -520,6 +570,7 @@ SbiRuntime::SbiRuntime( SbModule* pm, SbMethod* pe, UINT32 nStart ) nForLvl = 0; nOps = 0; refExprStk = new SbxArray; + SetVBAEnabled( pMod->IsVBACompat() ); #if defined GCC SetParameters( pe ? pe->GetParameters() : (class SbxArray *)NULL ); #else @@ -527,7 +578,6 @@ SbiRuntime::SbiRuntime( SbModule* pm, SbMethod* pe, UINT32 nStart ) #endif pRefSaveList = NULL; pItemStoreList = NULL; - bVBAEnabled = isVBAEnabled(); } SbiRuntime::~SbiRuntime() @@ -546,6 +596,11 @@ SbiRuntime::~SbiRuntime() } } +void SbiRuntime::SetVBAEnabled(bool bEnabled ) +{ + bVBAEnabled = bEnabled; +} + // Aufbau der Parameterliste. Alle ByRef-Parameter werden direkt // uebernommen; von ByVal-Parametern werden Kopien angelegt. Falls // ein bestimmter Datentyp verlangt wird, wird konvertiert. @@ -791,10 +846,24 @@ BOOL SbiRuntime::Step() return bRun; } -void SbiRuntime::Error( SbError n ) +void SbiRuntime::Error( SbError n, bool bVBATranslationAlreadyDone ) { if( n ) + { nError = n; + if( isVBAEnabled() && !bVBATranslationAlreadyDone ) + { + String aMsg = pInst->GetErrorMsg(); + sal_Int32 nVBAErrorNumber = translateErrorToVba( nError, aMsg ); + SbxVariable* pSbxErrObjVar = SbxErrObject::getErrObject(); + SbxErrObject* pGlobErr = static_cast< SbxErrObject* >( pSbxErrObjVar ); + if( pGlobErr != NULL ) + pGlobErr->setNumberAndDescription( nVBAErrorNumber, aMsg ); + + pInst->aErrorMsg = aMsg; + nError = SbERR_BASIC_COMPAT; + } + } } void SbiRuntime::Error( SbError _errCode, const String& _details ) @@ -826,6 +895,32 @@ void SbiRuntime::FatalError( SbError _errCode, const String& _details ) Error( _errCode, _details ); } +sal_Int32 SbiRuntime::translateErrorToVba( SbError nError, String& rMsg ) +{ + // If a message is defined use that ( in preference to + // the defined one for the error ) NB #TODO + // if there is an error defined it more than likely + // is not the one you want ( some are the same though ) + // we really need a new vba compatible error list + if ( !rMsg.Len() ) + { + // TEST, has to be vb here always +#ifdef DBG_UTIL + SbError nTmp = StarBASIC::GetSfxFromVBError( nError ); + DBG_ASSERT( nTmp, "No VB error!" ); +#endif + + StarBASIC::MakeErrorText( nError, rMsg ); + rMsg = StarBASIC::GetErrorText(); + if ( !rMsg.Len() ) // no message for err no, need localized resource here + rMsg = String( RTL_CONSTASCII_USTRINGPARAM("Internal Object Error:") ); + } + // no num? most likely then it *is* really a vba err + USHORT nVBErrorCode = StarBASIC::GetVBErrorCode( nError ); + sal_Int32 nVBAErrorNumber = ( nVBErrorCode == 0 ) ? nError : nVBErrorCode; + return nVBAErrorNumber; +} + ////////////////////////////////////////////////////////////////////////// // // Parameter, Locals, Caller diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx index c0b4ffa3cd59..13bc8810144a 100644 --- a/basic/source/runtime/stdobj.cxx +++ b/basic/source/runtime/stdobj.cxx @@ -230,7 +230,7 @@ static Methods aMethods[] = { { "EOF", SbxBOOL, 1 | _FUNCTION, RTLNAME(EOF),0 }, { "Channel", SbxINTEGER, 0,NULL,0 }, { "Erl", SbxLONG, _ROPROP, RTLNAME( Erl ),0 }, -{ "Err", SbxLONG, _RWPROP, RTLNAME( Err ),0 }, +{ "Err", SbxVARIANT, _RWPROP, RTLNAME( Err ),0 }, { "Error", SbxSTRING, 1 | _FUNCTION, RTLNAME( Error ),0 }, { "code", SbxLONG, 0,NULL,0 }, { "Exp", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(Exp),0 }, diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx index 33df854a4499..39af5ea4adc3 100644 --- a/basic/source/runtime/step0.cxx +++ b/basic/source/runtime/step0.cxx @@ -30,6 +30,7 @@ #include <vcl/msgbox.hxx> #include <tools/fsys.hxx> +#include "errobject.hxx" #include "runtime.hxx" #include "sbintern.hxx" #include "iosys.hxx" @@ -1116,6 +1117,7 @@ void SbiRuntime::StepSTDERROR() pInst->nErr = 0L; pInst->nErl = 0; nError = 0L; + SbxErrObject::getUnoErrObject()->Clear(); } void SbiRuntime::StepNOERROR() @@ -1124,6 +1126,7 @@ void SbiRuntime::StepNOERROR() pInst->nErr = 0L; pInst->nErl = 0; nError = 0L; + SbxErrObject::getUnoErrObject()->Clear(); bError = FALSE; } @@ -1132,6 +1135,9 @@ void SbiRuntime::StepNOERROR() void SbiRuntime::StepLEAVE() { bRun = FALSE; + // If VBA and we are leaving an ErrorHandler then clear the error ( it's been processed ) + if ( bInError && pError ) + SbxErrObject::getUnoErrObject()->Clear(); } void SbiRuntime::StepCHANNEL() // TOS = Kanalnummer @@ -1265,6 +1271,9 @@ void SbiRuntime::StepERROR() SbxVariableRef refCode = PopVar(); USHORT n = refCode->GetUShort(); SbError error = StarBASIC::GetSfxFromVBError( n ); - Error( error ); + if ( bVBAEnabled ) + pInst->Error( error ); + else + Error( error ); } diff --git a/basic/source/runtime/step1.cxx b/basic/source/runtime/step1.cxx index 399257cf6ad3..c6f090048bf2 100644 --- a/basic/source/runtime/step1.cxx +++ b/basic/source/runtime/step1.cxx @@ -30,11 +30,13 @@ #include <stdlib.h> #include <rtl/math.hxx> +#include <basic/sbuno.hxx> #include "runtime.hxx" #include "sbintern.hxx" #include "iosys.hxx" #include "image.hxx" #include "sbunoobj.hxx" +#include "errobject.hxx" bool checkUnoObjectType( SbUnoObject* refVal, const String& aClass ); @@ -230,8 +232,6 @@ void SbiRuntime::StepRETURN( UINT32 nOp1 ) // FOR-Variable testen (+Endlabel) -void unoToSbxValue( SbxVariable* pVar, const Any& aValue ); - void SbiRuntime::StepTESTFOR( UINT32 nOp1 ) { if( !pForStk ) @@ -360,6 +360,7 @@ void SbiRuntime::StepERRHDL( UINT32 nOp1 ) pInst->nErr = 0; pInst->nErl = 0; nError = 0; + SbxErrObject::getUnoErrObject()->Clear(); } // Resume nach Fehlern (+0=statement, 1=next or Label) @@ -380,6 +381,8 @@ void SbiRuntime::StepRESUME( UINT32 nOp1 ) } else pCode = pErrStmnt; + if ( pError ) // current in error handler ( and got a Resume Next statment ) + SbxErrObject::getUnoErrObject()->Clear(); if( nOp1 > 1 ) StepJUMP( nOp1 ); diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index e357b0e85f91..de9ced027ce8 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -73,7 +73,6 @@ #include <cppuhelper/exc_hlp.hxx> #include <basic/sbmod.hxx> - namespace basic { @@ -327,6 +326,7 @@ DBG_NAME( SfxLibraryContainer ) // Ctor SfxLibraryContainer::SfxLibraryContainer( void ) : LibraryContainerHelper( maMutex ) + , mbVBACompat( sal_False ) , maModifiable( *this, maMutex ) , maNameContainer( getCppuType( (Reference< XNameAccess >*) NULL ) ) , mbOldInfoFormat( sal_False ) @@ -2789,6 +2789,7 @@ OUString SfxLibraryContainer::expand_url( const OUString& url ) } } + //XLibraryContainer3 OUString SAL_CALL SfxLibraryContainer::getOriginalLibraryLinkURL( const OUString& Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException) @@ -2802,6 +2803,29 @@ OUString SAL_CALL SfxLibraryContainer::getOriginalLibraryLinkURL( const OUString return aRetStr; } + +::sal_Bool SAL_CALL SfxLibraryContainer::getVBACompatModeOn() throw (RuntimeException) +{ + return mbVBACompat; +} + +void SAL_CALL SfxLibraryContainer::setVBACompatModeOn( ::sal_Bool _vbacompatmodeon ) throw (RuntimeException) +{ + BasicManager* pBasMgr = getBasicManager(); + if( pBasMgr ) + { + // get the standard library + String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) ); + if ( pBasMgr->GetName().Len() ) + aLibName = pBasMgr->GetName(); + + StarBASIC* pBasic = pBasMgr->GetLib( aLibName ); + if( pBasic ) + pBasic->SetVBAEnabled( _vbacompatmodeon ); + } + mbVBACompat = _vbacompatmodeon; +} + // Methods XServiceInfo ::sal_Bool SAL_CALL SfxLibraryContainer::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException) diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 096d497a4c50..4185b6f9579c 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -942,7 +942,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary try { xElementRootStorage = ::comphelper::OStorageHelper::GetStorageFromURL( aElementPath, - embed::ElementModes::READWRITE ); + embed::ElementModes::READ ); } catch( uno::Exception& ) { // TODO: error handling @@ -1166,6 +1166,45 @@ bool SAL_CALL SfxScriptLibrary::isLibraryElementValid( ::com::sun::star::uno::An return SfxScriptLibrary::containsValidModule( aElement ); } +IMPLEMENT_FORWARD_XINTERFACE2( SfxScriptLibrary, SfxLibrary, SfxScriptLibrary_BASE ); +IMPLEMENT_FORWARD_XTYPEPROVIDER2( SfxScriptLibrary, SfxLibrary, SfxScriptLibrary_BASE ); + +script::ModuleInfo SAL_CALL +SfxScriptLibrary::getModuleInfo( const ::rtl::OUString& ModuleName ) throw (NoSuchElementException, WrappedTargetException, RuntimeException) +{ + if ( !hasModuleInfo( ModuleName ) ) + throw NoSuchElementException(); + return mModuleInfos[ ModuleName ]; +} + +sal_Bool SAL_CALL +SfxScriptLibrary::hasModuleInfo( const ::rtl::OUString& ModuleName ) throw (RuntimeException) +{ + sal_Bool bRes = sal_False; + ModuleInfoMap::iterator it = mModuleInfos.find( ModuleName ); + + if ( it != mModuleInfos.end() ) + bRes = sal_True; + + return bRes; +} + +void SAL_CALL SfxScriptLibrary::insertModuleInfo( const ::rtl::OUString& ModuleName, const script::ModuleInfo& ModuleInfo ) throw (IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException) +{ + if ( hasModuleInfo( ModuleName ) ) + throw ElementExistException(); + mModuleInfos[ ModuleName ] = ModuleInfo; +} + +void SAL_CALL SfxScriptLibrary::removeModuleInfo( const ::rtl::OUString& ModuleName ) throw (NoSuchElementException, WrappedTargetException, RuntimeException) +{ + // #FIXME add NoSuchElementException to the spec + if ( !hasModuleInfo( ModuleName ) ) + throw NoSuchElementException(); + mModuleInfos.erase( mModuleInfos.find( ModuleName ) ); +} + + //============================================================================ } // namespace basic diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 7af9c1f8d9c0..60f6a4a54e46 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -1917,7 +1917,7 @@ css::uno::Reference< css::uno::XInterface > Access::createInstance() tmplName), static_cast< cppu::OWeakObject * >(this)); } - rtl::Reference< Node > node(tmpl->clone()); + rtl::Reference< Node > node(tmpl->clone(true)); node->setLayer(Data::NO_LAYER); return static_cast< cppu::OWeakObject * >( new ChildAccess(components_, getRootAccess(), node)); diff --git a/configmgr/source/groupnode.cxx b/configmgr/source/groupnode.cxx index 60d825451d69..59c0f89df5d1 100644 --- a/configmgr/source/groupnode.cxx +++ b/configmgr/source/groupnode.cxx @@ -44,8 +44,8 @@ GroupNode::GroupNode( mandatory_(Data::NO_LAYER) {} -rtl::Reference< Node > GroupNode::clone() const { - return new GroupNode(*this); +rtl::Reference< Node > GroupNode::clone(bool keepTemplateName) const { + return new GroupNode(*this, keepTemplateName); } NodeMap & GroupNode::getMembers() { @@ -68,11 +68,13 @@ bool GroupNode::isExtensible() const { return extensible_; } -GroupNode::GroupNode(GroupNode const & other): - Node(other), extensible_(other.extensible_), - templateName_(other.templateName_), mandatory_(other.mandatory_) +GroupNode::GroupNode(GroupNode const & other, bool keepTemplateName): + Node(other), extensible_(other.extensible_), mandatory_(other.mandatory_) { cloneNodeMap(other.members_, &members_); + if (keepTemplateName) { + templateName_ = other.templateName_; + } } GroupNode::~GroupNode() {} diff --git a/configmgr/source/groupnode.hxx b/configmgr/source/groupnode.hxx index be4907b86ce3..9d7bbbafa5b3 100644 --- a/configmgr/source/groupnode.hxx +++ b/configmgr/source/groupnode.hxx @@ -42,7 +42,7 @@ class GroupNode: public Node { public: GroupNode(int layer, bool extensible, rtl::OUString const & templateName); - virtual rtl::Reference< Node > clone() const; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const; virtual NodeMap & getMembers(); @@ -55,7 +55,7 @@ public: bool isExtensible() const; private: - GroupNode(GroupNode const & other); + GroupNode(GroupNode const & other, bool keepTemplateName); virtual ~GroupNode(); diff --git a/configmgr/source/localizedpropertynode.cxx b/configmgr/source/localizedpropertynode.cxx index 9c5fa3328a58..54560d7aded4 100644 --- a/configmgr/source/localizedpropertynode.cxx +++ b/configmgr/source/localizedpropertynode.cxx @@ -51,7 +51,7 @@ LocalizedPropertyNode::LocalizedPropertyNode( Node(layer), staticType_(staticType), nillable_(nillable) {} -rtl::Reference< Node > LocalizedPropertyNode::clone() const { +rtl::Reference< Node > LocalizedPropertyNode::clone(bool) const { return new LocalizedPropertyNode(*this); } diff --git a/configmgr/source/localizedpropertynode.hxx b/configmgr/source/localizedpropertynode.hxx index d5a16af0e54d..4ebcf8e243da 100644 --- a/configmgr/source/localizedpropertynode.hxx +++ b/configmgr/source/localizedpropertynode.hxx @@ -47,7 +47,7 @@ class LocalizedPropertyNode: public Node { public: LocalizedPropertyNode(int layer, Type staticType, bool nillable); - virtual rtl::Reference< Node > clone() const; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const; virtual NodeMap & getMembers(); diff --git a/configmgr/source/localizedvaluenode.cxx b/configmgr/source/localizedvaluenode.cxx index f6246106c8fe..c0e3bc333187 100644 --- a/configmgr/source/localizedvaluenode.cxx +++ b/configmgr/source/localizedvaluenode.cxx @@ -48,7 +48,7 @@ LocalizedValueNode::LocalizedValueNode(int layer, css::uno::Any const & value): Node(layer), value_(value) {} -rtl::Reference< Node > LocalizedValueNode::clone() const { +rtl::Reference< Node > LocalizedValueNode::clone(bool) const { return new LocalizedValueNode(*this); } diff --git a/configmgr/source/localizedvaluenode.hxx b/configmgr/source/localizedvaluenode.hxx index 7f8a5dd987ce..bfcbdea1de51 100644 --- a/configmgr/source/localizedvaluenode.hxx +++ b/configmgr/source/localizedvaluenode.hxx @@ -43,7 +43,7 @@ class LocalizedValueNode: public Node { public: LocalizedValueNode(int layer, com::sun::star::uno::Any const & value); - virtual rtl::Reference< Node > clone() const; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const; virtual rtl::OUString getTemplateName() const; diff --git a/configmgr/source/node.hxx b/configmgr/source/node.hxx index 10f168520595..7c9417e68ea9 100644 --- a/configmgr/source/node.hxx +++ b/configmgr/source/node.hxx @@ -46,7 +46,7 @@ public: virtual Kind kind() const = 0; - virtual rtl::Reference< Node > clone() const = 0; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const = 0; virtual NodeMap & getMembers(); diff --git a/configmgr/source/nodemap.cxx b/configmgr/source/nodemap.cxx index 6b22863b5672..8e4d06030bdf 100644 --- a/configmgr/source/nodemap.cxx +++ b/configmgr/source/nodemap.cxx @@ -42,7 +42,7 @@ void cloneNodeMap(NodeMap const & source, NodeMap * target) { OSL_ASSERT(target != 0 && target->empty()); NodeMap clone(source); for (NodeMap::iterator i(clone.begin()); i != clone.end(); ++i) { - i->second = i->second->clone(); + i->second = i->second->clone(true); } std::swap(clone, *target); } diff --git a/configmgr/source/propertynode.cxx b/configmgr/source/propertynode.cxx index 070b56d9be9a..f3e459998e7e 100644 --- a/configmgr/source/propertynode.cxx +++ b/configmgr/source/propertynode.cxx @@ -55,7 +55,7 @@ PropertyNode::PropertyNode( extension_(extension) {} -rtl::Reference< Node > PropertyNode::clone() const { +rtl::Reference< Node > PropertyNode::clone(bool) const { return new PropertyNode(*this); } diff --git a/configmgr/source/propertynode.hxx b/configmgr/source/propertynode.hxx index 1566cbf72dbe..506526ffcc1e 100644 --- a/configmgr/source/propertynode.hxx +++ b/configmgr/source/propertynode.hxx @@ -48,7 +48,7 @@ public: int layer, Type staticType, bool nillable, com::sun::star::uno::Any const & value, bool extension); - virtual rtl::Reference< Node > clone() const; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const; Type getStaticType() const; diff --git a/configmgr/source/setnode.cxx b/configmgr/source/setnode.cxx index f19c36c0bba5..465345a5f856 100644 --- a/configmgr/source/setnode.cxx +++ b/configmgr/source/setnode.cxx @@ -69,8 +69,8 @@ SetNode::SetNode( templateName_(templateName), mandatory_(Data::NO_LAYER) {} -rtl::Reference< Node > SetNode::clone() const { - return new SetNode(*this); +rtl::Reference< Node > SetNode::clone(bool keepTemplateName) const { + return new SetNode(*this, keepTemplateName); } NodeMap & SetNode::getMembers() { @@ -105,12 +105,15 @@ bool SetNode::isValidTemplate(rtl::OUString const & templateName) const { additionalTemplateNames_.end()); } -SetNode::SetNode(SetNode const & other): +SetNode::SetNode(SetNode const & other, bool keepTemplateName): Node(other), defaultTemplateName_(other.defaultTemplateName_), additionalTemplateNames_(other.additionalTemplateNames_), - templateName_(other.templateName_), mandatory_(other.mandatory_) + mandatory_(other.mandatory_) { cloneNodeMap(other.members_, &members_); + if (keepTemplateName) { + templateName_ = other.templateName_; + } } SetNode::~SetNode() {} diff --git a/configmgr/source/setnode.hxx b/configmgr/source/setnode.hxx index 7bf1ab0a199e..94ce537adda1 100644 --- a/configmgr/source/setnode.hxx +++ b/configmgr/source/setnode.hxx @@ -46,7 +46,7 @@ public: int layer, rtl::OUString const & defaultTemplateName, rtl::OUString const & templateName); - virtual rtl::Reference< Node > clone() const; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const; virtual NodeMap & getMembers(); @@ -63,7 +63,7 @@ public: bool isValidTemplate(rtl::OUString const & templateName) const; private: - SetNode(SetNode const & other); + SetNode(SetNode const & other, bool keepTemplateName); virtual ~SetNode(); diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx index 8bda874cc5b3..79e122759fc8 100644 --- a/configmgr/source/xcsparser.cxx +++ b/configmgr/source/xcsparser.cxx @@ -456,7 +456,7 @@ void XcsParser::handleNodeRef(XmlReader & reader) { reader.getUrl()), css::uno::Reference< css::uno::XInterface >()); } - rtl::Reference< Node > node(tmpl->clone()); + rtl::Reference< Node > node(tmpl->clone(false)); node->setLayer(valueParser_.getLayer()); elements_.push(Element(node, name)); } diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx index 77b0f747f313..f9f439c98916 100644 --- a/configmgr/source/xcuparser.cxx +++ b/configmgr/source/xcuparser.cxx @@ -1056,7 +1056,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) { if (state_.top().locked || finalizedLayer < valueParser_.getLayer()) { state_.push(State(true)); // ignored } else { - rtl::Reference< Node > member(tmpl->clone()); + rtl::Reference< Node > member(tmpl->clone(true)); member->setLayer(valueParser_.getLayer()); member->setFinalized(finalizedLayer); member->setMandatory(mandatoryLayer); @@ -1070,7 +1070,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) { { state_.push(State(true)); // ignored } else { - rtl::Reference< Node > member(tmpl->clone()); + rtl::Reference< Node > member(tmpl->clone(true)); member->setLayer(valueParser_.getLayer()); member->setFinalized(finalizedLayer); member->setMandatory(mandatoryLayer); diff --git a/connectivity/prj/build.lst b/connectivity/prj/build.lst index dd386c7c7161..0b15c06acf15 100644 --- a/connectivity/prj/build.lst +++ b/connectivity/prj/build.lst @@ -1,4 +1,4 @@ -cn connectivity : shell l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb QADEVOOO:qadevOOo officecfg NSS:nss NULL +cn connectivity : shell l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb qadevOOo officecfg NSS:nss NULL cn connectivity usr1 - all cn_mkout NULL cn connectivity\inc nmake - all cn_inc NULL cn connectivity\com\sun\star\sdbcx\comp\hsqldb nmake - all cn_jhsqldbdb cn_hsqldb cn_inc NULL diff --git a/connectivity/qa/connectivity/tools/makefile.mk b/connectivity/qa/connectivity/tools/makefile.mk index 0f3c9c84b92e..07490532a1b1 100644 --- a/connectivity/qa/connectivity/tools/makefile.mk +++ b/connectivity/qa/connectivity/tools/makefile.mk @@ -38,7 +38,6 @@ all: @echo "Java not available. Build skipped" .ELSE -.IF "$(BUILD_QADEVOOO)" == "YES" #----- compile .java files ----------------------------------------- JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunnerLight.jar @@ -61,8 +60,6 @@ ALL : ALLTAR ALL: ALLDEP .ENDIF -.ENDIF - .ENDIF # "$(SOLAR_JAVA)" == "" .INCLUDE : target.mk diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 1d19c05a46c0..d95c6263b7ed 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -347,14 +347,15 @@ void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& xSheet, switch (nType) { case DataType::VARCHAR: - if ( eCellType == CellContentType_TEXT ) + if ( eCellType == CellContentType_EMPTY ) + rValue.setNull(); + else { + // #i25840# still let Calc convert numbers to text const Reference<XText> xText( xCell, UNO_QUERY ); if ( xText.is() ) rValue = xText->getString(); - } // if ( eCellType == CellContentType_TEXT ) - else - rValue.setNull(); + } break; case DataType::DECIMAL: if ( eCellType == CellContentType_VALUE ) diff --git a/desktop/source/app/appfirststart.cxx b/desktop/source/app/appfirststart.cxx index c48805fcfeb7..2f0d4ab9e538 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/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx index bb93f78689b6..4a144f3fdf20 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/migration/migration.cxx b/desktop/source/migration/migration.cxx index 08e49bf048a0..4bcbf250907f 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -231,6 +231,7 @@ static void insertSorted(migrations_available& rAvailableMigrations, supported_m { rAvailableMigrations.insert(pIter, aSupportedMigration ); bInserted = true; + break; // i111193: insert invalidates iterator! } ++pIter; } diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx index c900228cc053..1ef6bad09d9b 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 94981dc32e73..b5a43ae8a948 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -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")), diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 212fb8ff9446..8621f173c250 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/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index ddb82a06661d..569b80639b6b 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -60,6 +60,7 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, const String& rBaseURL, SvKeyValu bWasInPara = FALSE; nInTable = 0; nInCell = 0; + bInTitle = FALSE; nDefListLevel = 0; nBulletLevel = 0; nNumberingLevel = 0; @@ -179,11 +180,14 @@ void EditHTMLParser::NextToken( int nToken ) break; case HTML_TEXTTOKEN: { - if ( !bInPara ) - StartPara( FALSE ); - -// if ( bInPara || pCurAnchor ) + // #i110937# for <title> content, call aImportHdl (no SkipGroup), but don't insert the text into the EditEngine + if (!bInTitle) { + if ( !bInPara ) + StartPara( FALSE ); + + // if ( bInPara || pCurAnchor ) + String aText = aToken; if ( aText.Len() && ( aText.GetChar( 0 ) == ' ' ) && ThrowAwayBlank() && !IsReadPRE() ) @@ -342,6 +346,13 @@ void EditHTMLParser::NextToken( int nToken ) // #58335# kein SkipGroup on/off auf inline markup etc. + case HTML_TITLE_ON: + bInTitle = TRUE; + break; + case HTML_TITLE_OFF: + bInTitle = FALSE; + break; + // globals case HTML_HTML_ON: case HTML_HTML_OFF: @@ -355,8 +366,6 @@ void EditHTMLParser::NextToken( int nToken ) case HTML_THEAD_OFF: case HTML_TBODY_ON: case HTML_TBODY_OFF: - case HTML_TITLE_ON: - case HTML_TITLE_OFF: // inline elements, structural markup // HTML 3.0 case HTML_BANNER_ON: diff --git a/editeng/source/editeng/eehtml.hxx b/editeng/source/editeng/eehtml.hxx index a9b20bcd652f..8d11e743755a 100644 --- a/editeng/source/editeng/eehtml.hxx +++ b/editeng/source/editeng/eehtml.hxx @@ -57,6 +57,7 @@ private: BOOL bFieldsInserted; BYTE nInTable; BYTE nInCell; + BOOL bInTitle; BYTE nDefListLevel; BYTE nBulletLevel; diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 2631c71a6b17..64343517c69f 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/formula/inc/formula/compiler.hrc b/formula/inc/formula/compiler.hrc index e8243482a776..e4dc05aca4e9 100644 --- a/formula/inc/formula/compiler.hrc +++ b/formula/inc/formula/compiler.hrc @@ -393,12 +393,8 @@ #define SC_OPCODE_LAST_OPCODE_ID 394 /* last OpCode */ /*** Interna ***/ -#define SC_OPCODE_INTERNAL_BEGIN 9995 -#define SC_OPCODE_GAME 9995 -#define SC_OPCODE_SPEW 9996 -#define SC_OPCODE_TTT 9997 -#define SC_OPCODE_TEAM 9998 -#define SC_OPCODE_ANSWER 9999 +#define SC_OPCODE_INTERNAL_BEGIN 9999 +#define SC_OPCODE_TTT 9999 #define SC_OPCODE_INTERNAL_END 9999 /*** from here on ExtraData contained ***/ diff --git a/formula/inc/formula/opcode.hxx b/formula/inc/formula/opcode.hxx index 2ec322d29bf7..390ab21048d3 100644 --- a/formula/inc/formula/opcode.hxx +++ b/formula/inc/formula/opcode.hxx @@ -386,11 +386,7 @@ enum OpCodeEnum ocNumberValue = SC_OPCODE_NUMBERVALUE, // internal stuff ocInternalBegin = SC_OPCODE_INTERNAL_BEGIN, - ocGame = SC_OPCODE_GAME, - ocSpew = SC_OPCODE_SPEW, ocTTT = SC_OPCODE_TTT, - ocTeam = SC_OPCODE_TEAM, - ocAnswer = SC_OPCODE_ANSWER, ocInternalEnd = SC_OPCODE_INTERNAL_END, // from here on ExtraData ocDataToken1 = SC_OPCODE_DATA_TOKEN_1, diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 4cc5306fec9f..533ec85358c5 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -46,7 +46,7 @@ namespace formula // ============================================================================= using namespace ::com::sun::star; - static const sal_Char* pInternal[ 5 ] = { "GAME", "SPEW", "TTT", "STARCALCTEAM", "ANTWORT" }; + static const sal_Char* pInternal[ 1 ] = { "TTT" }; // ============================================================================= namespace diff --git a/framework/inc/classes/xmlnamespaces.hxx b/framework/inc/classes/xmlnamespaces.hxx deleted file mode 100644 index 60a3de4b68ba..000000000000 --- 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 e49192aa7c33..eea91edeaa07 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/properties.h b/framework/inc/properties.h index f0358ef6f1a0..5a32a42a28cc 100644 --- a/framework/inc/properties.h +++ b/framework/inc/properties.h @@ -217,6 +217,14 @@ namespace framework{ #define UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDROTATEIMAGELIST "private:resource/image/commandrotateimagelist" #define UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDMIRRORIMAGELIST "private:resource/image/commandmirrorimagelist" +#define UICOMMANDDESCRIPTION_PROPNAME_PROPERTIES "Properties" +#define UICOMMANDDESCRIPTION_PROPNAME_POPUP "Popup" + +#define UICOMMANDDESCRIPTION_PROPERTIES_IMAGE 1 +#define UICOMMANDDESCRIPTION_PROPERTIES_IMAGE_MIRRORED 2 +#define UICOMMANDDESCRIPTION_PROPERTIES_IMAGE_ROTATED 4 +#define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8 + //_______________________________________________ /** properties for "AutoRecovery" class */ diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx index 98894b623aea..1be8579a4112 100644 --- a/framework/inc/uielement/toolbarmanager.hxx +++ b/framework/inc/uielement/toolbarmanager.hxx @@ -179,6 +179,8 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener void RemoveControllers(); rtl::OUString RetrieveLabelFromCommand( const rtl::OUString& aCmdURL ); + sal_Int32 RetrievePropertiesFromCommand( const rtl::OUString& aCmdURL ); + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetPropsForCommand( const ::rtl::OUString& rCmdURL ); void CreateControllers(); void UpdateControllers(); void AddFrameActionListener(); diff --git a/framework/inc/uielement/uicommanddescription.hxx b/framework/inc/uielement/uicommanddescription.hxx index d9f8e461c5b5..dd95981bba90 100644 --- a/framework/inc/uielement/uicommanddescription.hxx +++ b/framework/inc/uielement/uicommanddescription.hxx @@ -109,7 +109,7 @@ public: ModuleToCommandFileMap m_aModuleToCommandFileMap; UICommandsHashMap m_aUICommandsHashMap; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xGenericUICommands; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager; }; } // namespace framework diff --git a/framework/inc/xml/toolboxlayoutdocumenthandler.hxx b/framework/inc/xml/toolboxlayoutdocumenthandler.hxx deleted file mode 100644 index 71a7843a0a9e..000000000000 --- 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/qa/unoapi/knownissues.xcl b/framework/qa/unoapi/knownissues.xcl index f939efcca412..40f1965de639 100755 --- a/framework/qa/unoapi/knownissues.xcl +++ b/framework/qa/unoapi/knownissues.xcl @@ -54,3 +54,6 @@ fwk.Frame ### i90345 ### fwk.URLTransformer::com::sun::star::util::XURLTransformer + +### i111180 ### +fwk.Desktop::com::sun::star::frame::XComponentLoader diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index 21c62fd89a54..e4d37d1fe059 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] ) @@ -733,6 +736,9 @@ void BackingWindow::Resize() 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() ) ); nYPos += nBDelta - nDiff; diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx index 76a12a48b816..c4d4c9b0b76b 100644 --- a/framework/source/services/backingwindow.hxx +++ b/framework/source/services/backingwindow.hxx @@ -121,6 +121,7 @@ namespace framework sal_Int32 mnLayoutStyle; svt::AcceleratorExecute* mpAccExec; long mnBtnPos; + long mnBtnTop; static const int nItemId_Extensions = 1; static const int nItemId_Reg = 2; diff --git a/framework/source/services/fwk_services.src b/framework/source/services/fwk_services.src index 7e2ee3253e71..7ad8b4c3cede 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/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index 9c8e68e24734..f2c905f237e8 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -344,6 +344,9 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup std::map< sal_Int16, ::rtl::OUString > LangTable; const ::rtl::OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); + bool bMultipleLanguages = (eMode != MODE_SetLanguageSelectionMenu) || m_aCurLang.compareToAscii( "*" ) == 0; + bool bNothingSelected = true; + MenuItemBits nItemBits = !bMultipleLanguages ? MIB_RADIOCHECK : 0; for(std::map< ::rtl::OUString, ::rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it) { if(it->first != ::rtl::OUString( aLangTable.GetString( LANGUAGE_NONE ) )&& @@ -351,12 +354,13 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup it->first.getLength()) { ++nItemId; - pPopupMenu->InsertItem( nItemId,it->first); + pPopupMenu->InsertItem( nItemId,it->first,nItemBits ); LangTable[nItemId] = it->first; if(it->first == m_aCurLang && eMode == MODE_SetLanguageSelectionMenu ) { //make a sign for the current language pPopupMenu->CheckItem(nItemId,TRUE); + bNothingSelected = false; } aCmd=aCmd_Language; aCmd+=(String)it->first; @@ -366,7 +370,9 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup //7--none nItemId++; - pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_NONE )) ); + pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_NONE )), nItemBits ); + if (bNothingSelected && !bMultipleLanguages) + pPopupMenu->CheckItem(nItemId,TRUE); aCmd=aCmd_Language; aCmd+=String::CreateFromAscii("LANGUAGE_NONE"); pPopupMenu->SetItemCommand(nItemId,aCmd); diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index 953470314785..544597261852 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -272,6 +272,9 @@ void LangSelectionStatusbarController::LangMenu()throw (::com::sun::star::uno::R } } std::map< sal_Int16, ::rtl::OUString > LangTable; + bool bMultipleLanguages = m_aCurLang.compareToAscii( "*" ) == 0; + bool bNothingSelected = true; + sal_Int16 nMenuItemStyle = !bMultipleLanguages ? css::awt::MenuItemStyle::RADIOCHECK : 0; for( std::set< ::rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it ) { @@ -281,22 +284,26 @@ void LangSelectionStatusbarController::LangMenu()throw (::com::sun::star::uno::R { //nItemId = xPopupMenu->getItemCount()+1; nItemId++; - xPopupMenu->insertItem( nItemId, *it, css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + xPopupMenu->insertItem( nItemId, *it, nMenuItemStyle, nItemId ); LangTable[nItemId]=*it; if( *it == m_aCurLang ) { //make a sign for the current language xPopupMenu->checkItem( nItemId, TRUE ); + bNothingSelected = false; } } } //7--none nItemId++; - xPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + xPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), nMenuItemStyle, nItemId ); + if (bNothingSelected && !bMultipleLanguages) + xPopupMenu->checkItem( nItemId, TRUE ); + //More... nItemId++; - xPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + xPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), 0, nItemId ); for( ::std::set< ::rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it ) { @@ -305,22 +312,22 @@ void LangSelectionStatusbarController::LangMenu()throw (::com::sun::star::uno::R *it != ::rtl::OUString::createFromAscii( "" )) { nItemId++; - subPopupMenu->insertItem( nItemId, *it, css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + subPopupMenu->insertItem( nItemId, *it, 0, nItemId ); LangTable[nItemId]=*it; } } //7--none nItemId++; - subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), 0, nItemId ); //More nItemId++; - subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), 0, nItemId ); nItemId++; xPopupMenu->insertSeparator(nItemId); nItemId++; - xPopupMenu->insertItem( nItemId, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + xPopupMenu->insertItem( nItemId, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), 0, nItemId ); xPopupMenu->setPopupMenu( nItemId, subPopupMenu ); //display the popup menu and execute every command diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 9fbdf87336cc..9d8aa9205c90 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -548,11 +548,14 @@ throw ( RuntimeException ) if ( Event.State >>= bCheckmark ) { - // Checkmark + // Checkmark or RadioButton m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, TRUE ); m_pVCLMenu->CheckItem( pMenuItemHandler->nItemId, bCheckmark ); - m_pVCLMenu->SetItemBits( pMenuItemHandler->nItemId, - m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId ) | MIB_CHECKABLE ); + + MenuItemBits nBits = m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId ); + //If not already designated RadioButton set as CheckMark + if (!(nBits & MIB_RADIOCHECK)) + m_pVCLMenu->SetItemBits( pMenuItemHandler->nItemId, nBits | MIB_CHECKABLE ); } else if ( Event.State >>= aItemText ) { @@ -1805,6 +1808,8 @@ void MenuBarManager::FillMenu( nBits |= MIB_ICON; if ( nStyle & ::com::sun::star::ui::ItemStyle::TEXT ) nBits |= MIB_TEXT; + if ( nStyle & ::com::sun::star::ui::ItemStyle::RADIO_CHECK ) + nBits |= MIB_RADIOCHECK; pMenu->SetItemBits( nId, nBits ); } if ( xIndexContainer.is() ) diff --git a/framework/source/uielement/rootitemcontainer.cxx b/framework/source/uielement/rootitemcontainer.cxx index e67b734730e5..8c81f31f2394 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/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index d89b81c0f9b6..9b0ffa9ce993 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -112,6 +112,7 @@ using namespace ::com::sun::star::util; using namespace ::com::sun::star::container; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::ui; +using namespace ::com::sun::star; namespace framework { @@ -803,17 +804,18 @@ void ToolBarManager::RemoveControllers() m_aControllerMap.clear(); } -::rtl::OUString ToolBarManager::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) +uno::Sequence< beans::PropertyValue > ToolBarManager::GetPropsForCommand( const ::rtl::OUString& rCmdURL ) { - ::rtl::OUString aLabel; + Sequence< PropertyValue > aPropSeq; - // Retrieve popup menu labels - if ( !m_bModuleIdentified ) + // Retrieve properties for command + try { - Reference< XModuleManager > xModuleManager( m_xServiceManager->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY_THROW ); - Reference< XInterface > xIfac( m_xFrame, UNO_QUERY ); - try + if ( !m_bModuleIdentified ) { + Reference< XModuleManager > xModuleManager( m_xServiceManager->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY_THROW ); + Reference< XInterface > xIfac( m_xFrame, UNO_QUERY ); + m_bModuleIdentified = sal_True; m_aModuleIdentifier = xModuleManager->identify( xIfac ); @@ -821,44 +823,57 @@ void ToolBarManager::RemoveControllers() { Reference< XNameAccess > xNameAccess( m_xServiceManager->createInstance( SERVICENAME_UICOMMANDDESCRIPTION ), UNO_QUERY ); if ( xNameAccess.is() ) - { xNameAccess->getByName( m_aModuleIdentifier ) >>= m_xUICommandLabels; - } } } - catch ( Exception& ) + + if ( m_xUICommandLabels.is() ) { + if ( rCmdURL.getLength() > 0 ) + m_xUICommandLabels->getByName( rCmdURL ) >>= aPropSeq; } } + catch ( Exception& ) + { + } - if ( m_xUICommandLabels.is() ) + return aPropSeq; +} + +::rtl::OUString ToolBarManager::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) +{ + ::rtl::OUString aLabel; + Sequence< PropertyValue > aPropSeq; + + // Retrieve popup menu labels + aPropSeq = GetPropsForCommand( aCmdURL ); + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - try + if ( aPropSeq[i].Name.equalsAscii( "Name" )) { - if ( aCmdURL.getLength() > 0 ) - { - rtl::OUString aStr; - Sequence< PropertyValue > aPropSeq; - if ( m_xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq ) - { - for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) - { - if ( aPropSeq[i].Name.equalsAscii( "Name" )) - { - aPropSeq[i].Value >>= aStr; - break; - } - } - } - aLabel = aStr; - } + aPropSeq[i].Value >>= aLabel; + break; } - catch ( com::sun::star::uno::Exception& ) + } + return aLabel; +} + +sal_Int32 ToolBarManager::RetrievePropertiesFromCommand( const ::rtl::OUString& aCmdURL ) +{ + sal_Int32 nProperties(0); + Sequence< PropertyValue > aPropSeq; + + // Retrieve popup menu labels + aPropSeq = GetPropsForCommand( aCmdURL ); + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + { + if ( aPropSeq[i].Name.equalsAscii( "Properties" )) { + aPropSeq[i].Value >>= nProperties; + break; } } - - return aLabel; + return nProperties; } void ToolBarManager::CreateControllers() @@ -969,8 +984,15 @@ void ToolBarManager::CreateControllers() { MenuDescriptionMap::iterator it = m_aMenuMap.find( nId ); if ( it == m_aMenuMap.end() ) - xController = Reference< XStatusListener >( - new GenericToolbarController( m_xServiceManager, m_xFrame, m_pToolBar, nId, aCommandURL )); + { + xController = Reference< XStatusListener >( + new GenericToolbarController( m_xServiceManager, m_xFrame, m_pToolBar, nId, aCommandURL )); + + // Accessibility support: Set toggle button role for specific commands + sal_Int32 nProps = RetrievePropertiesFromCommand( aCommandURL ); + if ( nProps & UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON ) + m_pToolBar->SetItemBits( nId, m_pToolBar->GetItemBits( nId ) | TIB_CHECKABLE ); + } else xController = Reference< XStatusListener >( new MenuToolbarController( m_xServiceManager, m_xFrame, m_pToolBar, nId, aCommandURL, m_aModuleIdentifier, m_aMenuMap[ nId ] )); @@ -1530,7 +1552,11 @@ IMPL_LINK( ToolBarManager, DropdownClick, ToolBox*, EMPTYARG ) Reference< XToolbarController > xController( pIter->second, UNO_QUERY ); if ( xController.is() ) - xController->createPopupWindow(); + { + Reference< XWindow > xWin = xController->createPopupWindow(); + if ( xWin.is() ) + xWin->setFocus(); + } } return 1; } diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index fdcd08f221fd..0d50aa4c36d4 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -340,7 +340,7 @@ Any ConfigurationAccess_UICommand::getSequenceFromCache( const ::rtl::OUString& if ( !pIter->second.bCommandNameCreated ) fillInfoFromResult( pIter->second, pIter->second.aLabel ); - Sequence< PropertyValue > aPropSeq( 3 ); + Sequence< PropertyValue > aPropSeq( 4 ); aPropSeq[0].Name = m_aPropLabel; aPropSeq[0].Value = pIter->second.aContextLabel.getLength() ? makeAny( pIter->second.aContextLabel ): makeAny( pIter->second.aLabel ); @@ -348,6 +348,8 @@ Any ConfigurationAccess_UICommand::getSequenceFromCache( const ::rtl::OUString& aPropSeq[1].Value <<= pIter->second.aCommandName; aPropSeq[2].Name = m_aPropPopup; aPropSeq[2].Value <<= pIter->second.bPopup; + aPropSeq[3].Name = m_aPropProperties; + aPropSeq[3].Value <<= pIter->second.nProperties; return makeAny( aPropSeq ); } diff --git a/framework/source/xml/makefile.mk b/framework/source/xml/makefile.mk index dd40af0cbe05..a4f18a555ab3 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/menudocumenthandler.cxx b/framework/source/xml/menudocumenthandler.cxx index 90f5fb25dec3..3fc5d1775be4 100644 --- a/framework/source/xml/menudocumenthandler.cxx +++ b/framework/source/xml/menudocumenthandler.cxx @@ -94,6 +94,7 @@ #define ATTRIBUTE_ITEMSTYLE_TEXT "text" #define ATTRIBUTE_ITEMSTYLE_IMAGE "image" +#define ATTRIBUTE_ITEMSTYLE_RADIO "radio" // Property names of a menu/menu item ItemDescriptor static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL"; @@ -134,6 +135,7 @@ struct MenuStyleItem MenuStyleItem MenuItemStyles[ ] = { { ::com::sun::star::ui::ItemStyle::ICON, ATTRIBUTE_ITEMSTYLE_IMAGE }, { ::com::sun::star::ui::ItemStyle::TEXT, ATTRIBUTE_ITEMSTYLE_TEXT }, + { ::com::sun::star::ui::ItemStyle::RADIO_CHECK, ATTRIBUTE_ITEMSTYLE_RADIO } }; @@ -437,8 +439,10 @@ throw( SAXException, RuntimeException ) { if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT; - if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::ICON; + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) ) + nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK; } } while ( nIndex >= 0 ); @@ -670,8 +674,10 @@ throw( SAXException, RuntimeException ) { if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT; - if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::ICON; + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) ) + nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK; } } while ( nIndex >= 0 ); @@ -725,8 +731,10 @@ throw( SAXException, RuntimeException ) { if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT; - if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::ICON; + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) ) + nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK; } } while ( nIndex >= 0 ); diff --git a/framework/source/xml/toolboxconfiguration.cxx b/framework/source/xml/toolboxconfiguration.cxx index 9cd1f25c3df5..9d1c91aa6849 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 645750dc3f51..000000000000 --- 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 65edaff42d35..b1b7c691d29f 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/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu index fe1fb92abb0e..03e37b72f9ad 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/SFX.xcu b/officecfg/registry/data/org/openoffice/Office/SFX.xcu index 5a576588c974..1fbf093170cf 100644 --- a/officecfg/registry/data/org/openoffice/Office/SFX.xcu +++ b/officecfg/registry/data/org/openoffice/Office/SFX.xcu @@ -30,27 +30,27 @@ <node oor:name="Help"> <prop oor:name="HelpAgentStarterList"> <value xml:lang="x-no-translate"></value> - <value xml:lang="de">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="en-US">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="zh-CN">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="ja">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="zh-TW">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="el">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="es">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="pl">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="pt">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="ko">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="fr">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="ar">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="ru">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="nl">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="da">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="it">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="tr">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="sv">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="fi">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="pt-BR">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> - <value xml:lang="ca">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946</value> + <value xml:lang="de">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="en-US">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="zh-CN">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="ja">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="zh-TW">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="el">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="es">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="pl">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="pt">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="ko">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="fr">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="ar">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="ru">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="nl">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="da">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="it">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="tr">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="sv">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="fi">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="pt-BR">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> + <value xml:lang="ca">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> </prop> </node> </oor:component-data> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu index 8c76a2dadd9f..d3db05206a6a 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu @@ -134,7 +134,7 @@ <value xml:lang="en-US">~Hyphenation...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ObjectTitleDescription" oor:op="replace"> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ChartWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/ChartWindowState.xcu index 29e26bbf29a9..304ce02282e6 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 553d94fc2fdb..76e6a29003d0 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/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu index 2925c2a97802..b4a2fab23fcd 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu @@ -5,7 +5,6 @@ <node oor:name="Commands"> <node oor:name=".uno:Polygon" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Polygon, filled</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -14,7 +13,6 @@ </node> <node oor:name=".uno:ColorView" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Black & White View</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -23,19 +21,16 @@ </node> <node oor:name=".uno:RenamePage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Rename Slide</value> </prop> </node> <node oor:name=".uno:RenameLayer" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Rename</value> </prop> </node> <node oor:name=".uno:Presentation" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Slide Show</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -44,7 +39,6 @@ </node> <node oor:name=".uno:RehearseTimings" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Rehearse Timings</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -53,7 +47,6 @@ </node> <node oor:name=".uno:Dia" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">SlideTransition</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -62,7 +55,6 @@ </node> <node oor:name=".uno:ShowSlide" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Sho~w Slide</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -71,7 +63,6 @@ </node> <node oor:name=".uno:HideSlide" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Hide Slide</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -80,19 +71,16 @@ </node> <node oor:name=".uno:TextAttributes" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Te~xt...</value> </prop> </node> <node oor:name=".uno:PagesPerRow" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Slides Per Row</value> </prop> </node> <node oor:name=".uno:TextFitToSizeTool" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Fit Text to Frame</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -101,7 +89,6 @@ </node> <node oor:name=".uno:VerticalTextFitToSizeTool" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Fit Vertical Text to Frame</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -110,7 +97,6 @@ </node> <node oor:name=".uno:Objects3DToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">3D Objects</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -119,7 +105,6 @@ </node> <node oor:name=".uno:Cube" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Cube</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -128,7 +113,6 @@ </node> <node oor:name=".uno:Sphere" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Sphere</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -137,7 +121,6 @@ </node> <node oor:name=".uno:Cylinder" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Cylinder</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -146,7 +129,6 @@ </node> <node oor:name=".uno:Cone" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Cone</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -155,7 +137,6 @@ </node> <node oor:name=".uno:Cyramid" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Pyramid</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -164,7 +145,6 @@ </node> <node oor:name=".uno:GlueEditMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Glue Points</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -173,7 +153,6 @@ </node> <node oor:name=".uno:GlueInsertPoint" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Insert Glue Point</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -182,22 +161,19 @@ </node> <node oor:name=".uno:GluePercent" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Glue Point Relative</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:GlueEscapeDirection" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Exit Direction</value> </prop> </node> <node oor:name=".uno:GlueHorzAlignCenter" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Glue Point Horizontal Center</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -206,7 +182,6 @@ </node> <node oor:name=".uno:GlueHorzAlignLeft" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Glue Point Horizontal Left</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -215,7 +190,6 @@ </node> <node oor:name=".uno:GlueHorzAlignRight" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Glue Point Horizontal Right</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -224,7 +198,6 @@ </node> <node oor:name=".uno:GlueVertAlignCenter" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Glue Point Vertical Center</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -233,7 +206,6 @@ </node> <node oor:name=".uno:GlueVertAlignTop" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Glue Point Vertical Top</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -242,7 +214,6 @@ </node> <node oor:name=".uno:GlueVertAlignBottom" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Glue Point Vertical Bottom</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -251,7 +222,6 @@ </node> <node oor:name=".uno:Shell3D" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Shell</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -260,7 +230,6 @@ </node> <node oor:name=".uno:Torus" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Torus</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -269,7 +238,6 @@ </node> <node oor:name=".uno:HalfSphere" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Half-Sphere</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -278,7 +246,6 @@ </node> <node oor:name=".uno:GlueEscapeDirectionLeft" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Exit Direction Left</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -287,7 +254,6 @@ </node> <node oor:name=".uno:GlueEscapeDirectionRight" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Exit Direction Right</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -296,7 +262,6 @@ </node> <node oor:name=".uno:GlueEscapeDirectionTop" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Exit Direction Top</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -305,7 +270,6 @@ </node> <node oor:name=".uno:GlueEscapeDirectionBottom" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Exit Direction Bottom</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -314,7 +278,6 @@ </node> <node oor:name=".uno:InsertToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Insert</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -323,25 +286,21 @@ </node> <node oor:name=".uno:Morphing" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Cross-fading...</value> </prop> </node> <node oor:name=".uno:MeasureAttributes" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Dimen~sions...</value> </prop> </node> <node oor:name=".uno:GridFront" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Grid to ~Front</value> </prop> </node> <node oor:name=".uno:HelplinesVisible" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Display Guides</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -350,13 +309,11 @@ </node> <node oor:name=".uno:HelplinesFront" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Guides to ~Front</value> </prop> </node> <node oor:name=".uno:BeforeObject" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">In Front of ~Object</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -365,13 +322,11 @@ </node> <node oor:name=".uno:PreviewWindow" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Pre~view</value> </prop> </node> <node oor:name=".uno:CustomAnimation" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Custom Animation...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -380,46 +335,39 @@ </node> <node oor:name=".uno:CustomAnimationSchemes" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Animation Schemes...</value> </prop> </node> <node oor:name=".uno:SlideChangeWindow" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Slide Transition...</value> </prop> </node> <node oor:name=".uno:ConnectorAttributes" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Connector...</value> </prop> </node> <node oor:name=".uno:PresentationDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">S~lide Show Settings...</value> </prop> </node> <node oor:name=".uno:Hyphenation" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Hyphenation</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:NewRouting" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Reset Routing</value> </prop> </node> <node oor:name=".uno:DuplicatePage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">D~uplicate Slide</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -428,7 +376,6 @@ </node> <node oor:name=".uno:ExpandPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">E~xpand Slide</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -437,13 +384,11 @@ </node> <node oor:name=".uno:SummaryPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Su~mmary Slide</value> </prop> </node> <node oor:name=".uno:LeaveAllGroups" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Exit All Groups</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -452,7 +397,6 @@ </node> <node oor:name=".uno:ParaspaceIncrease" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Increase Spacing</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -461,7 +405,6 @@ </node> <node oor:name=".uno:ParaspaceDecrease" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Decrease Spacing</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -470,85 +413,71 @@ </node> <node oor:name=".uno:SlideMasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Slide Master</value> </prop> </node> <node oor:name=".uno:HandoutMasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Handout Master</value> </prop> </node> <node oor:name=".uno:NotesMasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Notes Master</value> </prop> </node> <node oor:name=".uno:TitleMasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Title Slide Master</value> </prop> </node> <node oor:name=".uno:InsertPageQuick" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Insert Slide Direct</value> </prop> </node> <node oor:name=".uno:InsertDateFieldVar" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Dat~e (variable)</value> </prop> </node> <node oor:name=".uno:InsertDateFieldFix" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Date (fixed)</value> </prop> </node> <node oor:name=".uno:InsertTimeFieldVar" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">T~ime (variable)</value> </prop> </node> <node oor:name=".uno:InsertTimeFieldFix" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Time (fixed)</value> </prop> </node> <node oor:name=".uno:InsertPageField" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Page Number</value> </prop> </node> <node oor:name=".uno:InsertPagesField" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Page ~Count</value> </prop> </node> <node oor:name=".uno:ModifyField" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">F~ields...</value> </prop> </node> <node oor:name=".uno:InsertFileField" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~File Name</value> </prop> </node> <node oor:name=".uno:InsertAuthorField" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Author</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -557,49 +486,41 @@ </node> <node oor:name=".uno:CustomShowDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Custom Slide Show...</value> </prop> </node> <node oor:name=".uno:OutputQualityColor" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Color</value> </prop> </node> <node oor:name=".uno:OutputQualityGrayscale" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Grayscale</value> </prop> </node> <node oor:name=".uno:OutputQualityBlackWhite" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Black and White</value> </prop> </node> <node oor:name=".uno:PreviewQualityColor" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Color</value> </prop> </node> <node oor:name=".uno:PreviewQualityGrayscale" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Grayscale</value> </prop> </node> <node oor:name=".uno:PreviewQualityBlackWhite" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Black and White</value> </prop> </node> <node oor:name=".uno:ConvertInto3D" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">To 3~D</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -608,7 +529,6 @@ </node> <node oor:name=".uno:ConvertInto3DLatheFast" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">To 3D ~Rotation Object</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -617,61 +537,51 @@ </node> <node oor:name=".uno:ConvertIntoBitmap" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">To ~Bitmap</value> </prop> </node> <node oor:name=".uno:ConvertIntoMetaFile" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">To ~Metafile</value> </prop> </node> <node oor:name=".uno:PackAndGo" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Pack</value> </prop> </node> <node oor:name=".uno:convert_to_contour" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">To C~ontour</value> </prop> </node> <node oor:name=".uno:EditHyperlink" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">H~yperlink...</value> </prop> </node> <node oor:name=".uno:PageSetup" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Page...</value> </prop> </node> - <node oor:name=".uno:PasteSpecial" oor:op="replace"> + <node oor:name=".uno:PasteSpecial" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Paste ~Special...</value> </prop> </node> <node oor:name=".uno:CopyObjects" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Duplicat~e...</value> </prop> </node> <node oor:name=".uno:ManageLinks" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Lin~ks...</value> </prop> </node> <node oor:name=".uno:ConvertInto3DLathe" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">In 3D Rotation Object</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -680,37 +590,31 @@ </node> <node oor:name=".uno:DrawingMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Drawing View</value> </prop> </node> <node oor:name=".uno:OutlineMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Outline</value> </prop> </node> <node oor:name=".uno:OutputQualityContrast" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~High Contrast</value> </prop> </node> <node oor:name=".uno:DiaMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Sli~de Sorter</value> </prop> </node> <node oor:name=".uno:PreviewQualityContrast" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~High Contrast</value> </prop> </node> <node oor:name=".uno:InsertPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Slid~e</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -719,7 +623,6 @@ </node> <node oor:name=".uno:ImportFromFile" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~File...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -728,7 +631,6 @@ </node> <node oor:name=".uno:ZoomPanning" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Shift</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -737,13 +639,11 @@ </node> <node oor:name=".uno:PixelMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Pixel Mode</value> </prop> </node> <node oor:name=".uno:ObjectPosition" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Arrange</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -752,25 +652,21 @@ </node> <node oor:name=".uno:Combine" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Comb~ine</value> </prop> </node> <node oor:name=".uno:ObjectTitleDescription" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Description...</value> </prop> </node> <node oor:name=".uno:NameGroup" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Name...</value> </prop> </node> <node oor:name=".uno:ConnectorToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -779,7 +675,6 @@ </node> <node oor:name=".uno:Forward" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Bring ~Forward</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -788,7 +683,6 @@ </node> <node oor:name=".uno:Backward" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Send Back~ward</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -797,19 +691,16 @@ </node> <node oor:name=".uno:MirrorVert" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Vertically</value> </prop> </node> <node oor:name=".uno:MirrorHorz" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Horizontally</value> </prop> </node> <node oor:name=".uno:ChangeBezier" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">To ~Curve</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -818,7 +709,6 @@ </node> <node oor:name=".uno:ChangePolygon" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">To ~Polygon</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -827,25 +717,21 @@ </node> <node oor:name=".uno:CapturePoint" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Insert Snap Point/Line...</value> </prop> </node> <node oor:name=".uno:ShowRuler" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Ruler</value> </prop> </node> <node oor:name=".uno:InsertLayer" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Layer...</value> </prop> </node> <node oor:name=".uno:ModifyPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Slide ~Layout...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -854,25 +740,21 @@ </node> <node oor:name=".uno:ModifyLayer" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Layer...</value> </prop> </node> <node oor:name=".uno:PageMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Normal</value> </prop> </node> <node oor:name=".uno:LayerMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Layer</value> </prop> </node> <node oor:name=".uno:MeasureLine" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Dimension Line</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -881,13 +763,11 @@ </node> <node oor:name=".uno:MasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Master</value> </prop> </node> <node oor:name=".uno:DiaEffect" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Slide Effects</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -896,7 +776,6 @@ </node> <node oor:name=".uno:DiaSpeed" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Transition Speed</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -905,7 +784,6 @@ </node> <node oor:name=".uno:DiaAuto" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">AutoTransition</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -914,7 +792,6 @@ </node> <node oor:name=".uno:DiaTime" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Time</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -923,7 +800,6 @@ </node> <node oor:name=".uno:Connector" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -932,7 +808,6 @@ </node> <node oor:name=".uno:ActionMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Allow Interaction</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -941,7 +816,6 @@ </node> <node oor:name=".uno:AnimationObjects" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Animated Image...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -950,7 +824,6 @@ </node> <node oor:name=".uno:AnimationEffects" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Interaction...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -959,7 +832,6 @@ </node> <node oor:name=".uno:PresentationLayout" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Slide D~esign...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -968,49 +840,41 @@ </node> <node oor:name=".uno:NotesMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Notes ~Page</value> </prop> </node> <node oor:name=".uno:HandoutMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">H~andout Page</value> </prop> </node> <node oor:name=".uno:DeletePage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">D~elete Slide</value> </prop> </node> <node oor:name=".uno:DeleteLayer" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Delete</value> </prop> </node> <node oor:name=".uno:Dismantle" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Split</value> </prop> </node> <node oor:name=".uno:PageStatus" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Slide/Layer</value> </prop> </node> <node oor:name=".uno:LayoutStatus" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Layout</value> </prop> </node> <node oor:name=".uno:CrookRotate" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Set in Circle (perspective)</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1019,7 +883,6 @@ </node> <node oor:name=".uno:CrookSlant" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Set to circle (slant)</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1028,25 +891,21 @@ </node> <node oor:name=".uno:CrookStretch" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Set in Circle (distort)</value> </prop> </node> <node oor:name=".uno:Connect" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">C~onnect</value> </prop> </node> <node oor:name=".uno:Break" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Break</value> </prop> </node> <node oor:name=".uno:AdvancedMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Effects</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1055,7 +914,6 @@ </node> <node oor:name=".uno:InteractiveTransparence" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Transparency</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1064,7 +922,6 @@ </node> <node oor:name=".uno:InteractiveGradient" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Gradient</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1073,7 +930,6 @@ </node> <node oor:name=".uno:Shear" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Distort</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1082,7 +938,6 @@ </node> <node oor:name=".uno:BehindObject" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Be~hind Object</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1091,7 +946,6 @@ </node> <node oor:name=".uno:ReverseOrder" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Reverse</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1100,7 +954,6 @@ </node> <node oor:name=".uno:ConnectorArrowStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector Starts with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1109,7 +962,6 @@ </node> <node oor:name=".uno:ConnectorArrowEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector Ends with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1118,7 +970,6 @@ </node> <node oor:name=".uno:ConnectorArrows" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector with Arrows</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1127,7 +978,6 @@ </node> <node oor:name=".uno:ConnectorCircleStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector Starts with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1136,7 +986,6 @@ </node> <node oor:name=".uno:ConnectorCircleEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector Ends with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1145,7 +994,6 @@ </node> <node oor:name=".uno:ConnectorCircles" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector with Circles</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1154,7 +1002,6 @@ </node> <node oor:name=".uno:TextToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Text</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1163,7 +1010,6 @@ </node> <node oor:name=".uno:ConnectorLine" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Straight Connector</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1172,7 +1018,6 @@ </node> <node oor:name=".uno:RectangleToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Rectangle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1181,7 +1026,6 @@ </node> <node oor:name=".uno:ConnectorLineArrowStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Straight Connector starts with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1190,7 +1034,6 @@ </node> <node oor:name=".uno:EllipseToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Ellipse</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1199,7 +1042,6 @@ </node> <node oor:name=".uno:ConnectorLineArrowEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Straight Connector ends with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1208,7 +1050,6 @@ </node> <node oor:name=".uno:LineToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curve</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1217,7 +1058,6 @@ </node> <node oor:name=".uno:ConnectorLineArrows" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Straight Connector with Arrows</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1226,7 +1066,6 @@ </node> <node oor:name=".uno:ConnectorLineCircleStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Straight Connector starts with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1235,7 +1074,6 @@ </node> <node oor:name=".uno:ConnectorLineCircleEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Straight Connector ends with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1244,7 +1082,6 @@ </node> <node oor:name=".uno:ConnectorLineCircles" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Straight Connector with Circles</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1253,7 +1090,6 @@ </node> <node oor:name=".uno:ConnectorCurve" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curved Connector</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1262,7 +1098,6 @@ </node> <node oor:name=".uno:ConnectorCurveArrowStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curved Connector Starts with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1271,7 +1106,6 @@ </node> <node oor:name=".uno:ConnectorCurveArrowEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curved Connector Ends with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1280,7 +1114,6 @@ </node> <node oor:name=".uno:ConnectorCurveArrows" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curved Connector with Arrows</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1289,7 +1122,6 @@ </node> <node oor:name=".uno:ConnectorCurveCircleStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curved Connector Starts with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1298,7 +1130,6 @@ </node> <node oor:name=".uno:ConnectorCurveCircleEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curved Connector Ends with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1307,7 +1138,6 @@ </node> <node oor:name=".uno:ConnectorCurveCircles" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curved Connector with Circles</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1316,7 +1146,6 @@ </node> <node oor:name=".uno:ConnectorLines" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Connector</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1325,7 +1154,6 @@ </node> <node oor:name=".uno:ConnectorLinesArrowStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Connector Starts with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1334,7 +1162,6 @@ </node> <node oor:name=".uno:ConnectorLinesArrowEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Connector Ends with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1343,7 +1170,6 @@ </node> <node oor:name=".uno:ConnectorLinesArrows" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Connector with Arrows</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1352,7 +1178,6 @@ </node> <node oor:name=".uno:ConnectorLinesCircleStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Connector Starts with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1361,7 +1186,6 @@ </node> <node oor:name=".uno:ConnectorLinesCircleEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Connector Ends with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1370,7 +1194,6 @@ </node> <node oor:name=".uno:ConnectorLinesCircles" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Connector with Circles</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1379,7 +1202,6 @@ </node> <node oor:name=".uno:GraphicDraft" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Picture Placeholders</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1388,7 +1210,6 @@ </node> <node oor:name=".uno:FillDraft" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Contour Mode</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1397,7 +1218,6 @@ </node> <node oor:name=".uno:TextDraft" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Text Placeholders</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1406,7 +1226,6 @@ </node> <node oor:name=".uno:LineDraft" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Contour Only</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1415,7 +1234,6 @@ </node> <node oor:name=".uno:HandlesDraft" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Simple Handles</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1424,7 +1242,6 @@ </node> <node oor:name=".uno:SolidCreate" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Modify Object with Attributes</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1433,7 +1250,6 @@ </node> <node oor:name=".uno:HelplinesUse" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Snap to Guides</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1442,7 +1258,6 @@ </node> <node oor:name=".uno:SnapBorder" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Snap to Page Margins</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1451,7 +1266,6 @@ </node> <node oor:name=".uno:SnapFrame" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Snap to Object Border</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1460,7 +1274,6 @@ </node> <node oor:name=".uno:SnapPoints" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Snap to Object Points</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1469,7 +1282,6 @@ </node> <node oor:name=".uno:QuickEdit" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Allow Quick Editing</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1478,7 +1290,6 @@ </node> <node oor:name=".uno:PickThrough" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Select Text Area Only</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1487,49 +1298,41 @@ </node> <node oor:name=".uno:ConvertTo1BitThreshold" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">1 Bit Threshold</value> </prop> </node> <node oor:name=".uno:ConvertTo1BitMatrix" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">1 Bit Dithered</value> </prop> </node> <node oor:name=".uno:ConvertTo4BitGrays" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">4 Bit grayscales</value> </prop> </node> <node oor:name=".uno:ConvertTo4BitColors" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">4 Bit color palette</value> </prop> </node> <node oor:name=".uno:ConvertTo8BitGrays" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">8 Bit Grayscales</value> </prop> </node> <node oor:name=".uno:ConvertTo8BitColors" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">8 Bit color palette</value> </prop> </node> <node oor:name=".uno:ConvertToTrueColor" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">24 Bit True Color</value> </prop> </node> <node oor:name=".uno:BigHandles" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Large Handles</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1538,7 +1341,6 @@ </node> <node oor:name=".uno:DoubleClickTextEdit" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Double-click to edit Text</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1547,7 +1349,6 @@ </node> <node oor:name=".uno:ClickChangeRotation" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Rotation Mode after Clicking Object</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1556,7 +1357,6 @@ </node> <node oor:name=".uno:ArrowsToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Lines and Arrows</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1565,7 +1365,6 @@ </node> <node oor:name=".uno:LineArrowStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Starts with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1574,7 +1373,6 @@ </node> <node oor:name=".uno:LineArrowEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Ends with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1583,7 +1381,6 @@ </node> <node oor:name=".uno:LineArrows" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line with Arrows</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1592,7 +1389,6 @@ </node> <node oor:name=".uno:LineArrowCircle" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line with Arrow/Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1601,7 +1397,6 @@ </node> <node oor:name=".uno:LineCircleArrow" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line with Circle/Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1610,7 +1405,6 @@ </node> <node oor:name=".uno:LineArrowSquare" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line with Arrow/Square</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1619,7 +1413,6 @@ </node> <node oor:name=".uno:LineSquareArrow" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line with Square/Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1628,17 +1421,14 @@ </node> <node oor:name=".uno:Mirror" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Flip</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> <value>1</value> </prop> </node> - <node oor:name=".uno:InsertMasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">New Master</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1647,7 +1437,6 @@ </node> <node oor:name=".uno:DeleteMasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Delete Master</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1656,7 +1445,6 @@ </node> <node oor:name=".uno:RenameMasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Rename Master</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1665,19 +1453,16 @@ </node> <node oor:name=".uno:CloseMasterView" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Close Master View</value> </prop> </node> <node oor:name=".uno:SendMailDocAsMS" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">E-mail as ~Microsoft PowerPoint Presentation...</value> </prop> </node> <node oor:name=".uno:SendMailDocAsOOo" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">E-mail as ~OpenDocument Presentation...</value> </prop> </node> @@ -1685,61 +1470,51 @@ <node oor:name="Popups"> <node oor:name=".uno:ModifyMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Modify</value> </prop> </node> <node oor:name=".uno:WorkspaceMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Wor~kspace</value> </prop> </node> <node oor:name=".uno:MirrorMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Flip</value> </prop> </node> <node oor:name=".uno:PreviewDisplayQualityMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Pre~view Mode</value> </prop> </node> <node oor:name=".uno:LayerMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">La~yer</value> </prop> </node> <node oor:name=".uno:GridMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Gr~id</value> </prop> </node> <node oor:name=".uno:ConvertMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Convert</value> </prop> </node> <node oor:name=".uno:ArrangeMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Arrange</value> </prop> </node> <node oor:name=".uno:DisplayQualityMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Color/Grayscale</value> </prop> </node> <node oor:name=".uno:SlideShowMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Slide Show</value> </prop> </node> @@ -1750,107 +1525,89 @@ </node--> <node oor:name=".uno:GroupMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Group</value> </prop> </node> <node oor:name=".uno:SendMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Sen~d</value> </prop> </node> <node oor:name=".uno:TemplatesMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Styl~es</value> </prop> </node> <node oor:name=".uno:SnapLinesMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Guides</value> </prop> </node> <node oor:name=".uno:MasterPageMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Master</value> </prop> </node> <node oor:name=".uno:MasterLayoutsMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Master Lay~outs</value> </prop> </node> <node oor:name=".uno:MasterLayouts" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Master ~Elements...</value> </prop> </node> <node oor:name=".uno:MasterLayoutsNotes" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Notes Master Layout...</value> </prop> </node> <node oor:name=".uno:MasterLayoutsHandouts" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Handout Master Layout...</value> </prop> </node> <node oor:name=".uno:HeaderAndFooter" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Header and Footer...</value> </prop> </node> <node oor:name=".uno:InsertPageNumber" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">P~age Number...</value> </prop> </node> <node oor:name=".uno:InsertDateAndTime" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Date and ~Time...</value> </prop> </node> <node oor:name=".uno:NormalMultiPaneGUI" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Normal</value> </prop> </node> <node oor:name=".uno:SlideSorterMultiPaneGUI" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Sli~de Sorter</value> </prop> </node> <node oor:name=".uno:LeftPaneImpress" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">S~lide Pane</value> </prop> </node> <node oor:name=".uno:LeftPaneDraw" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Page Pane</value> </prop> </node> <node oor:name=".uno:RightPane" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Tas~k Pane</value> </prop> </node> - <node oor:name=".uno:MergeCells" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="de">Zellen verbinden</value> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu index 5373bf31b1fc..53d2ca72cbf4 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/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 4f38244540c2..b2759e4f7dbf 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -45,7 +45,7 @@ <value xml:lang="en-US">Fontwork Gallery</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FontworkShapeType" oor:op="replace"> @@ -1287,7 +1287,7 @@ <value xml:lang="en-US">Scrollbar</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Zoom" oor:op="replace"> @@ -1303,7 +1303,7 @@ <value xml:lang="en-US">Spin Button</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ConvertToScrollBar" oor:op="replace"> @@ -1371,7 +1371,7 @@ <value xml:lang="en-US">Italic</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Bold" oor:op="replace"> @@ -1379,7 +1379,7 @@ <value xml:lang="en-US">Bold</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ModuleDialog" oor:op="replace"> @@ -1395,7 +1395,7 @@ <value xml:lang="en-US">Shadow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ObjectCatalog" oor:op="replace"> @@ -1411,7 +1411,7 @@ <value xml:lang="en-US">Outline</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Strikeout" oor:op="replace"> @@ -1419,7 +1419,7 @@ <value xml:lang="en-US">Strikethrough</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:HelpOnHelp" oor:op="replace"> @@ -1432,7 +1432,7 @@ <value xml:lang="en-US">Underline</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Overline" oor:op="replace"> @@ -1440,7 +1440,7 @@ <value xml:lang="en-US">Overline</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:HelpIndex" oor:op="replace"> @@ -1505,7 +1505,7 @@ <value xml:lang="en-US">Align Left</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>3</value> + <value>11</value> </prop> </node> <node oor:name=".uno:RightPara" oor:op="replace"> @@ -1513,7 +1513,7 @@ <value xml:lang="en-US">Align Right</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>3</value> + <value>11</value> </prop> </node> <node oor:name=".uno:CenterPara" oor:op="replace"> @@ -1521,7 +1521,7 @@ <value xml:lang="en-US">Centered</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>3</value> + <value>11</value> </prop> </node> <node oor:name=".uno:SendFax" oor:op="replace"> @@ -1537,7 +1537,7 @@ <value xml:lang="en-US">Justified</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:HelpChooseFile" oor:op="replace"> @@ -1550,7 +1550,7 @@ <value xml:lang="en-US">Line Spacing: 1</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:SpacePara15" oor:op="replace"> @@ -1558,7 +1558,7 @@ <value xml:lang="en-US">Line Spacing : 1.5</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:SpacePara2" oor:op="replace"> @@ -1566,7 +1566,7 @@ <value xml:lang="en-US">Line Spacing : 2</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:StatusGetPosition" oor:op="replace"> @@ -1717,7 +1717,7 @@ <value xml:lang="en-US">Invert</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Line" oor:op="replace"> @@ -2071,7 +2071,7 @@ <value xml:lang="en-US">Bullets On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:FormatArea" oor:op="replace"> @@ -2150,7 +2150,7 @@ <value xml:lang="en-US">Numbering On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:BezierConvert" oor:op="replace"> @@ -2195,7 +2195,7 @@ <value xml:lang="en-US">Check Box</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ChangeCaseToKatakana" oor:op="replace"> @@ -2309,7 +2309,7 @@ <value xml:lang="en-US">Edit File</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertImageControl" oor:op="replace"> @@ -2423,7 +2423,7 @@ <value xml:lang="en-US">Time Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:StyleNewByExample" oor:op="replace"> @@ -2590,7 +2590,7 @@ <value xml:lang="en-US">Left-To-Right</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>3</value> + <value>11</value> </prop> </node> <node oor:name=".uno:Group" oor:op="replace"> @@ -2606,7 +2606,7 @@ <value xml:lang="en-US">Right-To-Left</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>3</value> + <value>11</value> </prop> </node> <node oor:name=".uno:Ungroup" oor:op="replace"> @@ -2726,7 +2726,7 @@ <value xml:lang="en-US">Combo Box</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Spinbutton" oor:op="replace"> @@ -2891,7 +2891,7 @@ <value xml:lang="en-US">Guides When Moving</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:CloseWin" oor:op="replace"> @@ -2907,7 +2907,7 @@ <value xml:lang="en-US">Snap to Grid</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertTextFrame" oor:op="replace"> @@ -3144,7 +3144,7 @@ <value xml:lang="en-US">HT~ML Source</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertSound" oor:op="replace"> @@ -3168,7 +3168,7 @@ <value xml:lang="en-US">~Hyperlink</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Merge" oor:op="replace"> @@ -3186,7 +3186,7 @@ <value xml:lang="en-US">Superscript</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Intersect" oor:op="replace"> @@ -3199,7 +3199,7 @@ <value xml:lang="en-US">Subscript</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FontDialog" oor:op="replace"> @@ -3228,7 +3228,7 @@ <value xml:lang="en-US">Shadow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:LineEndStyle" oor:op="replace"> @@ -3260,7 +3260,7 @@ <value xml:lang="en-US">Format Paintbrush</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Repeat" oor:op="replace"> @@ -3328,7 +3328,7 @@ <value xml:lang="en-US">~Edit Contour...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SelectAll" oor:op="replace"> @@ -3417,7 +3417,7 @@ <value xml:lang="en-US">Na~vigator</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:RestoreEditingView" oor:op="replace"> @@ -3434,13 +3434,16 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Fit to Frame</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ImageMapDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">ImageMap</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:GoDownSel" oor:op="replace"> @@ -3684,14 +3687,17 @@ <value xml:lang="en-US">~Display Grid</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Flash" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Flash</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ToolsMacroEdit" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Edit Macros</value> @@ -3980,7 +3986,7 @@ <value xml:lang="en-US">~AutoSpellcheck</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:HideSpellMark" oor:op="replace"> @@ -3995,9 +4001,12 @@ </node> <node oor:name=".uno:RubyDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">As~ian phonetic guide...</value> + <value xml:lang="en-US">As~ian phonetic guide...</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:InsertSymbol" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">S~pecial Character...</value> @@ -4011,7 +4020,7 @@ <value xml:lang="en-US">~Data Sources</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:MenuBarVisible" oor:op="replace"> @@ -4094,7 +4103,10 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Status ~Bar</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:MacroBarVisible" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Macro Toolbar On/Off</value> @@ -4220,7 +4232,7 @@ <value xml:lang="en-US">~Gallery</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SearchDialog" oor:op="replace"> @@ -4228,7 +4240,7 @@ <value xml:lang="en-US">~Find & Replace...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:HelperDialog" oor:op="replace"> @@ -4260,7 +4272,7 @@ <value xml:lang="en-US">More Controls</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FormDesignTools" oor:op="replace"> @@ -4268,7 +4280,7 @@ <value xml:lang="en-US">Form Design</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Pushbutton" oor:op="replace"> @@ -4276,7 +4288,7 @@ <value xml:lang="en-US">Push Button</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:RadioButton" oor:op="replace"> @@ -4284,7 +4296,7 @@ <value xml:lang="en-US">Option Button</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:CheckBox" oor:op="replace"> @@ -4300,7 +4312,7 @@ <value xml:lang="en-US">Label Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:GroupBox" oor:op="replace"> @@ -4308,7 +4320,7 @@ <value xml:lang="en-US">Group Box</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Edit" oor:op="replace"> @@ -4316,7 +4328,7 @@ <value xml:lang="en-US">Text Box</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ListBox" oor:op="replace"> @@ -4324,7 +4336,7 @@ <value xml:lang="en-US">List Box</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ComboBox" oor:op="replace"> @@ -4340,7 +4352,7 @@ <value xml:lang="en-US">Table Control</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Imagebutton" oor:op="replace"> @@ -4348,7 +4360,7 @@ <value xml:lang="en-US">Image Button</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FileControl" oor:op="replace"> @@ -4356,7 +4368,7 @@ <value xml:lang="en-US">File Selection</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ControlProperties" oor:op="replace"> @@ -4364,7 +4376,7 @@ <value xml:lang="en-US">Con~trol...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FormProperties" oor:op="replace"> @@ -4372,7 +4384,7 @@ <value xml:lang="en-US">For~m...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:TabDialog" oor:op="replace"> @@ -4475,7 +4487,7 @@ <value xml:lang="en-US">Design Mode On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SwitchXFormsDesignMode" oor:op="replace"> @@ -4508,7 +4520,7 @@ <value xml:lang="pt">Modo Esboço</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:RecUndo" oor:op="replace"> @@ -4529,7 +4541,7 @@ <value xml:lang="en-US">Form Navigator...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ShowDataNavigator" oor:op="replace"> @@ -4537,7 +4549,7 @@ <value xml:lang="en-US">Data Navigator...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Window3D" oor:op="replace"> @@ -4604,7 +4616,7 @@ <value xml:lang="en-US">Date Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:TimeField" oor:op="replace"> @@ -4612,7 +4624,7 @@ <value xml:lang="en-US">Time Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:NumericField" oor:op="replace"> @@ -4620,7 +4632,7 @@ <value xml:lang="en-US">Numerical Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:CurrencyField" oor:op="replace"> @@ -4628,7 +4640,7 @@ <value xml:lang="en-US">Currency Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:PrintPreview" oor:op="replace"> @@ -4636,7 +4648,7 @@ <value xml:lang="en-US">Pa~ge Preview</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:PatternField" oor:op="replace"> @@ -4644,7 +4656,7 @@ <value xml:lang="en-US">Pattern Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:OpenReadOnly" oor:op="replace"> @@ -4652,7 +4664,7 @@ <value xml:lang="en-US">Open in Design Mode</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ImageControl" oor:op="replace"> @@ -4660,7 +4672,7 @@ <value xml:lang="en-US">Image Control</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:RemoveFilterSort" oor:op="replace"> @@ -4732,7 +4744,7 @@ <value xml:lang="en-US">Run SQL command directly</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SbaExecuteSql" oor:op="replace"> @@ -4756,7 +4768,7 @@ <value xml:lang="en-US">Apply Filter</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Refresh" oor:op="replace"> @@ -4788,7 +4800,7 @@ <value xml:lang="en-US">Wizards On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FormattedField" oor:op="replace"> @@ -4796,7 +4808,7 @@ <value xml:lang="en-US">Formatted Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FormFilter" oor:op="replace"> @@ -4934,7 +4946,7 @@ <value xml:lang="en-US">Automatic Control Focus</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:DSBrowserExplorer" oor:op="replace"> @@ -4942,7 +4954,7 @@ <value xml:lang="en-US">Explorer On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ExtrusionToggle" oor:op="replace"> @@ -5292,7 +5304,7 @@ <value xml:lang="en-US">Media Pla~yer</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertAVMedia" oor:op="replace"> @@ -5316,7 +5328,7 @@ <value xml:lang="en-US">~Color</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertHardHyphen" oor:op="replace"> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu index 079855def699..422230b9e0a1 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/UI/MathCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu index e69558fc4ef5..1a3db34f6e6d 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu @@ -164,7 +164,7 @@ <value xml:lang="en-US">Formula Cursor</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> </node> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index fa0611e07041..4fa236666b6b 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -38,12 +38,18 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Hidden Paragraphs</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ShowAnnotations" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Comments</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:InsertScript" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">S~cript...</value> @@ -115,13 +121,16 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Bibliography Entry...</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ShadowCursor" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Direct Cursor On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:StartAutoCorrect" oor:op="replace"> @@ -166,12 +175,18 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Record</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ShowTrackedChanges" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Show</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:GotoPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">To Page</value> @@ -460,7 +475,7 @@ <value xml:lang="en-US">Insert Fields</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertDateField" oor:op="replace"> @@ -539,9 +554,12 @@ </node> <node oor:name=".uno:OnlineAutoFormat" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~While Typing</value> + <value xml:lang="en-US">~While Typing</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:StatePageNumber" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Page Number</value> @@ -573,7 +591,7 @@ <value xml:lang="en-US">Double Underline </value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:AutoFormatRedlineApply" oor:op="replace"> @@ -596,7 +614,7 @@ <value xml:lang="en-US">Superscript</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SubScript" oor:op="replace"> @@ -604,7 +622,7 @@ <value xml:lang="en-US">Subscript</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:CharLeftSel" oor:op="replace"> @@ -866,7 +884,7 @@ <value xml:lang="en-US">Wrap Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:WrapOn" oor:op="replace"> @@ -1723,7 +1741,7 @@ <value xml:lang="en-US">Link Frames</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:AlignCharBottom" oor:op="replace"> @@ -1754,7 +1772,7 @@ <value xml:lang="en-US">Restart Numbering</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:JumpToHeader" oor:op="replace"> @@ -1875,7 +1893,10 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Allow Row to Break Across Pages and Columns</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:SelectText" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Select Paragraph</value> @@ -2024,7 +2045,10 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Font Color Fill</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ViewBounds" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Te~xt Boundaries</value> @@ -2058,7 +2082,10 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Highlight Fill</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:VRuler" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Vertical Ruler</value> @@ -2069,7 +2096,7 @@ <value xml:lang="en-US">~Hyphenation...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:VScroll" oor:op="replace"> @@ -2097,7 +2124,7 @@ <value xml:lang="en-US">~Nonprinting Characters</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SortDialog" oor:op="replace"> @@ -2136,7 +2163,7 @@ <value xml:lang="en-US">Book Preview</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:RemoveDirectCharFormats" oor:op="replace"> @@ -2158,11 +2185,17 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Standard</value> </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> </node> <node oor:name=".uno:SelectionModeBlock" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Block Area</value> </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> </node> </node> <node oor:name="Popups"> diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index b5232c21eb82..913902731f29 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 --> @@ -1206,7 +1206,7 @@ <desc>Specifies the number of decimals to be displayed for the Standard number format.</desc> <label>Decimal places</label> </info> - <value>2</value> + <value>-1</value> </prop> <prop oor:name="RegularExpressions" oor:type="xs:boolean"> <!-- UIHints: Tools - Options Spreadsheet Calculate [Check box] Enable regular expressions in formulas --> diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index a1e203a29366..cb19bb01e1ba 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/Office/UI/Commands.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs index 38ee3a2e4c4f..71efdab1b636 100644 --- a/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs @@ -52,6 +52,7 @@ Bit 0 = Command has an image. Bit 1 = Image must be mirrored (CTL/vertical text). Bit 2 = Image must be rotated (CTL/vertical text). + Bit 3 = Command supports a toggle state (Accessibility). </desc> </info> <value>0</value> diff --git a/oovbaapi/genconstidl/makefile.mk b/oovbaapi/genconstidl/makefile.mk index be9fc931f30a..078f4d09049e 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 a41f6e98a2ba..a731574363be 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/XApplication.idl b/oovbaapi/ooo/vba/excel/XApplication.idl index 1a29a0d0c459..e4c063d161cf 100644 --- a/oovbaapi/ooo/vba/excel/XApplication.idl +++ b/oovbaapi/ooo/vba/excel/XApplication.idl @@ -61,10 +61,6 @@ interface XApplication : com::sun::star::uno::XInterface [attribute, readonly] XWorksheet ActiveSheet; [attribute, readonly] ooo::vba::XAssistant Assistant; [attribute] long Calculation; - //#TODO #FIXME this is more of a placeholder, will return - // the value of activeworkbook, in xl 'ThisWorkbook' should return the - // workbook in which the 'calling' macro is running. Should be possible - // to determine this [attribute, readonly] XWorkbook ThisWorkbook; [attribute, readonly] string Name; [attribute] boolean DisplayAlerts; diff --git a/oovbaapi/ooo/vba/excel/XWorksheet.idl b/oovbaapi/ooo/vba/excel/XWorksheet.idl index 2f66b7d0826f..3620c899de83 100644 --- a/oovbaapi/ooo/vba/excel/XWorksheet.idl +++ b/oovbaapi/ooo/vba/excel/XWorksheet.idl @@ -39,6 +39,9 @@ #include <com/sun/star/script/XInvocation.idl> #endif +#ifndef __com_sun_star_container_XNamed_idl__ +#include <com/sun/star/container/XNamed.idl> +#endif //============================================================================= module ooo { module vba { module excel { @@ -55,8 +58,8 @@ interface XWorksheet { interface ::ooo::vba::XHelperInterface; interface ::com::sun::star::script::XInvocation; + interface ::com::sun::star::container::XNamed; - [attribute] string Name; [attribute] boolean Visible; [attribute, readonly] long StandardHeight; [attribute, readonly] long StandardWidth; diff --git a/oovbaapi/ooo/vba/excel/makefile.mk b/oovbaapi/ooo/vba/excel/makefile.mk index c31531af8349..01e26d4cb19b 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 e79d3481169c..7fc70303d942 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 61d2675af7fc..56ac4caf87cb 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 9c33577abfa9..5100327b4b7d 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 fc332384e047..7d5162173eae 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 fedbce79b218..6c3694ea237d 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 4b9028718a55..85b0bfcd087d 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 455423412784..6c8ec298c760 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 7e4626e31c00..838d89d49c89 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 068a6c4a4544..273eb1afef87 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 17b2dee417cd..8a49fde7b958 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 5fc5a641fd44..d514235cbfa2 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 05dc523d6f8b..a61280c45fe5 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/qa/unoapi/sfx.sce b/sfx2/qa/unoapi/sfx.sce index 2aaf12c25950..6176c0668731 100644 --- a/sfx2/qa/unoapi/sfx.sce +++ b/sfx2/qa/unoapi/sfx.sce @@ -2,4 +2,4 @@ -o sfx.DocumentTemplates -o sfx.FrameLoader -o sfx.SfxMacroLoader --o sfx.StandaloneDocumentInfo +#i111283 -o sfx.StandaloneDocumentInfo diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx index 66d4146d9e62..4635733b934d 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 b1b69e5ac74f..1a51bee5024f 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/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index f46f3583cfd8..14474dd2904d 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -38,7 +38,6 @@ #include "com/sun/star/util/XModifiable.hpp" #include "com/sun/star/xml/sax/XSAXSerializable.hpp" -#include "com/sun/star/lang/NullPointerException.hpp" #include "com/sun/star/lang/WrappedTargetRuntimeException.hpp" #include "com/sun/star/lang/EventObject.hpp" #include "com/sun/star/beans/XPropertySet.hpp" @@ -248,25 +247,21 @@ public: const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::io::WrongFormatException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception); + css::lang::WrappedTargetException, css::io::IOException); virtual void SAL_CALL loadFromMedium(const ::rtl::OUString & URL, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::io::WrongFormatException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception); + css::lang::WrappedTargetException, css::io::IOException); virtual void SAL_CALL storeToStorage( const css::uno::Reference< css::embed::XStorage > & Storage, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception); + css::lang::WrappedTargetException, css::io::IOException); virtual void SAL_CALL storeToMedium(const ::rtl::OUString & URL, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception); + css::lang::WrappedTargetException, css::io::IOException); // ::com::sun::star::lang::XInitialization: virtual void SAL_CALL initialize( @@ -1869,8 +1864,7 @@ SfxDocumentMetaData::loadFromStorage( const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::io::WrongFormatException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception) + css::lang::WrappedTargetException, css::io::IOException) { if (!xStorage.is()) throw css::lang::IllegalArgumentException( ::rtl::OUString::createFromAscii("SfxDocumentMetaData::loadFromStorage:" @@ -1882,10 +1876,10 @@ SfxDocumentMetaData::loadFromStorage( xStorage->openStreamElement( ::rtl::OUString::createFromAscii(s_metaXml), css::embed::ElementModes::READ) ); - if (!xStream.is()) throw css::lang::NullPointerException(); + if (!xStream.is()) throw css::uno::RuntimeException(); css::uno::Reference<css::io::XInputStream> xInStream = xStream->getInputStream(); - if (!xInStream.is()) throw css::lang::NullPointerException(); + if (!xInStream.is()) throw css::uno::RuntimeException(); // create DOM parser service css::uno::Reference<css::lang::XMultiComponentFactory> xMsf ( @@ -1949,8 +1943,7 @@ SfxDocumentMetaData::storeToStorage( const css::uno::Reference< css::embed::XStorage > & xStorage, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception) + css::lang::WrappedTargetException, css::io::IOException) { if (!xStorage.is()) throw css::lang::IllegalArgumentException( ::rtl::OUString::createFromAscii("SfxDocumentMetaData::storeToStorage:" @@ -1966,7 +1959,7 @@ SfxDocumentMetaData::storeToStorage( xStorage->openStreamElement(::rtl::OUString::createFromAscii(s_metaXml), css::embed::ElementModes::WRITE | css::embed::ElementModes::TRUNCATE); - if (!xStream.is()) throw css::lang::NullPointerException(); + if (!xStream.is()) throw css::uno::RuntimeException(); css::uno::Reference< css::beans::XPropertySet > xStreamProps(xStream, css::uno::UNO_QUERY_THROW); xStreamProps->setPropertyValue( @@ -1980,7 +1973,7 @@ SfxDocumentMetaData::storeToStorage( css::uno::makeAny(static_cast<sal_Bool> (sal_False))); css::uno::Reference<css::io::XOutputStream> xOutStream = xStream->getOutputStream(); - if (!xOutStream.is()) throw css::lang::NullPointerException(); + if (!xOutStream.is()) throw css::uno::RuntimeException(); css::uno::Reference<css::lang::XMultiComponentFactory> xMsf ( m_xContext->getServiceManager()); css::uno::Reference<css::io::XActiveDataSource> xSaxWriter( @@ -2028,8 +2021,7 @@ void SAL_CALL SfxDocumentMetaData::loadFromMedium(const ::rtl::OUString & URL, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::io::WrongFormatException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception) + css::lang::WrappedTargetException, css::io::IOException) { css::uno::Reference<css::io::XInputStream> xIn; ::comphelper::MediaDescriptor md(Medium); @@ -2063,7 +2055,7 @@ SfxDocumentMetaData::loadFromMedium(const ::rtl::OUString & URL, css::uno::makeAny(e)); } if (!xStorage.is()) { - throw css::lang::NullPointerException(::rtl::OUString::createFromAscii( + throw css::uno::RuntimeException(::rtl::OUString::createFromAscii( "SfxDocumentMetaData::loadFromMedium: cannot get Storage"), *this); } @@ -2074,8 +2066,7 @@ void SAL_CALL SfxDocumentMetaData::storeToMedium(const ::rtl::OUString & URL, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception) + css::lang::WrappedTargetException, css::io::IOException) { ::comphelper::MediaDescriptor md(Medium); if (!URL.equalsAscii("")) { @@ -2087,7 +2078,7 @@ SfxDocumentMetaData::storeToMedium(const ::rtl::OUString & URL, if (!xStorage.is()) { - throw css::lang::NullPointerException(::rtl::OUString::createFromAscii( + throw css::uno::RuntimeException(::rtl::OUString::createFromAscii( "SfxDocumentMetaData::storeToMedium: cannot get Storage"), *this); } diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index cbd269b41516..24f2f359607f 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -836,9 +836,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 +1245,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 +1267,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 +1281,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 +1308,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 +1428,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 +1579,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 +1593,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 7d931cb6c640..628c3b020c08 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/win32/shlxthandler/makefile.mk b/shell/source/win32/shlxthandler/makefile.mk index 4452cb1a90e6..b6c9a45a9515 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/qa/unoapi/knownissues.xcl b/svx/qa/unoapi/knownissues.xcl index 6d59511b75e0..89369160bb45 100644 --- a/svx/qa/unoapi/knownissues.xcl +++ b/svx/qa/unoapi/knownissues.xcl @@ -78,4 +78,10 @@ svx.GraphicExporter ### i98339 ### svx.AccessibleControlShape -# -> disbaled in svx.sce
\ No newline at end of file +# -> disbaled in svx.sce + +### i111114 ### +svx.AccessiblePresentationOLEShape::com::sun::star::accessibility::XAccessibleComponent + +### i111169 ### +svx.AccessiblePageShape::com::sun::star::accessibility::XAccessibleComponent diff --git a/svx/qa/unoapi/svx.sce b/svx/qa/unoapi/svx.sce index 84237f3c6f4b..82ee2ea6b193 100644 --- a/svx/qa/unoapi/svx.sce +++ b/svx/qa/unoapi/svx.sce @@ -1,11 +1,11 @@ #i98339 -o svx.AccessibleControlShape --o svx.AccessibleEditableTextPara --o svx.AccessibleGraphicShape +#i111278 -o svx.AccessibleEditableTextPara +#i111252 -o svx.AccessibleGraphicShape #i46736 -o svx.AccessibleImageBullet --o svx.AccessibleOLEShape --o svx.AccessiblePageShape --o svx.AccessiblePresentationGraphicShape --o svx.AccessiblePresentationOLEShape +#i111252 -o svx.AccessibleOLEShape +#i111252 -o svx.AccessiblePageShape +#i111216 -o svx.AccessiblePresentationGraphicShape +#i111216 -o svx.AccessiblePresentationOLEShape #i85539 -o svx.AccessiblePresentationShape -o svx.AccessibleShape #i90294 -o svx.GraphicExporter diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 5f3aa24394a3..01dc2c0591cc 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -831,6 +831,18 @@ void SvxSearchDialog::CalculateDelta_Impl() pMoreBtn->AddWindow( &aNoFormatBtn ); } + if (bDrawApp || bImpressApp) + { + // "Find All" button is hidden--align "Find" vertically to the + // search listbox + Point aNewPt(aSearchBtn.GetPosPixel()); + const Size aBtnSz(aSearchBtn.GetSizePixel()); + const Size aLBSz(aSearchLB.GetSizePixel()); + const int nOff((aLBSz.Height() - aBtnSz.Height()) / 2); + aNewPt.Y() = aSearchLB.GetPosPixel().Y() + nOff; + aSearchBtn.SetPosPixel(aNewPt); + } + if ( bDrawApp ) { // Draw App: "Regular expressions" and "Search for Styles" check boxes are hidden @@ -1016,6 +1028,8 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) if ( pSearchItem->GetAppFlag() == SVX_SEARCHAPP_DRAW ) { + aSearchAllBtn.Hide(); + aRegExpBtn.Hide(); aLayoutBtn.Hide(); diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index e22ee66e0ea2..e02e8664c6ac 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 ba7ba492c2fb..e6559850ea5d 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/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 5abd9c4b26f1..0f3325a0027e 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -259,6 +259,8 @@ namespace sdr void AttributeProperties::MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel) { + OSL_ASSERT(pNewModel!=NULL); + if(pSrcPool && pDestPool && (pSrcPool != pDestPool)) { if(mpItemSet) @@ -291,8 +293,24 @@ namespace sdr } else { - // StyleSheet is NOT from the correct pool; use default - ImpAddStyleSheet(pNewModel->GetDefaultStyleSheet(), sal_True); + // StyleSheet is NOT from the correct pool. + // Look one up in the right pool with the same + // name or use the default. + + // Look up the style in the new document. + OSL_ASSERT(pNewModel->GetStyleSheetPool() != NULL); + SfxStyleSheet* pNewStyleSheet = dynamic_cast<SfxStyleSheet*>( + pNewModel->GetStyleSheetPool()->Find( + pStySheet->GetName(), + SFX_STYLE_FAMILY_ALL)); + if (pNewStyleSheet == NULL + || &pNewStyleSheet->GetPool().GetPool() != pDestPool) + { + // There is no copy of the style in the new + // document. Use the default as a fallback. + pNewStyleSheet = pNewModel->GetDefaultStyleSheet(); + } + ImpAddStyleSheet(pNewStyleSheet, sal_True); } } diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 58e0b7bdb425..6ab27c85aaf0 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/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 1e79962736aa..13b8e758ce12 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -577,6 +577,37 @@ void SvxShape::ForceMetricToItemPoolMetric(Pair& rPoint) const throw() } //---------------------------------------------------------------------- +// --> OD 2010-02-19 #i108851# - reintroduction of fix for issue i59051 +void SvxShape::ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) const throw() +{ + DBG_TESTSOLARMUTEX(); + if(mpModel) + { + SfxMapUnit eMapUnit = mpModel->GetItemPool().GetMetric(0); + if(eMapUnit != SFX_MAPUNIT_100TH_MM) + { + switch(eMapUnit) + { + case SFX_MAPUNIT_TWIP : + { + basegfx::B2DHomMatrix aTransform; + const double fMMToTWIPS(72.0 / 127.0); + + aTransform.scale(fMMToTWIPS, fMMToTWIPS); + rPolyPolygon.transform(aTransform); + break; + } + default: + { + DBG_ERROR("Missing unit translation to PoolMetric!"); + } + } + } + } +} +// <-- + +//---------------------------------------------------------------------- void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw() { DBG_TESTSOLARMUTEX(); @@ -604,6 +635,38 @@ void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw() } //---------------------------------------------------------------------- +// --> OD 2010-02-19 #i108851# - reintroduction of fix for issue i59051 +void SvxShape::ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw() +{ + DBG_TESTSOLARMUTEX(); + SfxMapUnit eMapUnit = SFX_MAPUNIT_100TH_MM; + if(mpModel) + { + eMapUnit = mpModel->GetItemPool().GetMetric(0); + if(eMapUnit != SFX_MAPUNIT_100TH_MM) + { + switch(eMapUnit) + { + case SFX_MAPUNIT_TWIP : + { + basegfx::B2DHomMatrix aTransform; + const double fTWIPSToMM(127.0 / 72.0); + aTransform.scale(fTWIPSToMM, fTWIPSToMM); + rPolyPolygon.transform(aTransform); + break; + } + default: + { + DBG_ERROR("Missing unit translation to 100th mm!"); + } + } + } + } +} +// <-- +//---------------------------------------------------------------------- + + //---------------------------------------------------------------------- void SvxItemPropertySet_ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet, SfxItemSet& rSet, uno::Reference< beans::XPropertySet > xSet, const SfxItemPropertyMap* pMap ) @@ -635,7 +698,6 @@ void SvxItemPropertySet_ObtainSettingsFromPropertySet(const SvxItemPropertySet& { if(rSet.GetPool()->IsWhich(pEntry->nWID)) rSet.Put(rSet.GetPool()->GetDefaultItem(pEntry->nWID)); - // setzen SvxItemPropertySet_setPropertyValue(rPropSet, pEntry, *pUsrAny, rSet); } @@ -650,7 +712,6 @@ void SvxItemPropertySet_ObtainSettingsFromPropertySet(const SvxItemPropertySet& } - void SvxShape::ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet) { DBG_TESTSOLARMUTEX(); @@ -2505,10 +2566,15 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper if( rValue >>= aUnoPoint ) { Point aPoint( aUnoPoint.X, aUnoPoint.Y ); + + // --> OD 2010-02-19 #i108851# - reintroduction of fix for issue i59051 + // perform metric change before applying anchor position, + // because the anchor position is in pool metric. + ForceMetricToItemPoolMetric( aPoint ); + // <-- if( mpModel->IsWriter() ) aPoint += mpObj->GetAnchorPos(); - ForceMetricToItemPoolMetric( aPoint ); pEdgeObj->SetTailPoint( pProperty->nWID == OWN_ATTR_EDGE_START_POS, aPoint ); return true; } @@ -2532,6 +2598,9 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper if ( rValue >>= aPolyPoly ) { basegfx::B2DPolyPolygon aNewPolyPolygon( SvxConvertPolyPolygonBezierToB2DPolyPolygon( &aPolyPoly ) ); + // --> OD 2010-02-19 #i108851# - reintroduction of fix for issue i59051 + ForceMetricToItemPoolMetric( aNewPolyPolygon ); + // <-- if( mpModel->IsWriter() ) { Point aPoint( mpObj->GetAnchorPos() ); @@ -2554,6 +2623,9 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper { Point aPoint( aUnoPoint.X, aUnoPoint.Y ); + // --> OD 2010-02-19 #i108851# - reintroduction of fix for issue i59051 + ForceMetricToItemPoolMetric( aPoint ); + // <-- if( mpModel->IsWriter() ) aPoint += mpObj->GetAnchorPos(); @@ -2970,6 +3042,9 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper Point aPoint( mpObj->GetAnchorPos() ); aPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(-aPoint.X(), -aPoint.Y())); } + // --> OD 2010-02-19 #i108851# - reintroduction of fix for issue 59051 + ForceMetricTo100th_mm( aPolyPoly ); + // <-- drawing::PolyPolygonBezierCoords aRetval; SvxConvertB2DPolyPolygonToPolyPolygonBezier( aPolyPoly, aRetval); rValue <<= aRetval; @@ -2990,6 +3065,9 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper if( mpModel->IsWriter() ) aPoint -= mpObj->GetAnchorPos(); + // --> OD 2010-02-19 #i108851# - reintroduction of fix for issue 59051 + ForceMetricTo100th_mm( aPoint ); + // <-- awt::Point aUnoPoint( aPoint.X(), aPoint.Y() ); rValue <<= aUnoPoint; diff --git a/sysui/desktop/freedesktop/freedesktop-menus.spec b/sysui/desktop/freedesktop/freedesktop-menus.spec index 501f8432d940..1649971dad99 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 029e479a3ffc..cf04e8086afe 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 8a4a4705e99d..059b3b87bb46 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 5be889e3924e..4c02c70d90c1 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 795e82871414..80cadae7e9cb 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 e153b55c3fd4..85e0a6a5d72c 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 7280d9dbae8b..14dbcde0f5e2 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 76c33f45a548..c13ec9d367c8 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 12bb730f27bb..0e44c5bc99b5 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/ucb/source/ucp/webdav/DAVAuthListener.hxx b/ucb/source/ucp/webdav/DAVAuthListener.hxx index c092f9fd311f..71bed1c0a14d 100644 --- a/ucb/source/ucp/webdav/DAVAuthListener.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListener.hxx @@ -30,9 +30,7 @@ #include <salhelper/simplereferenceobject.hxx> #include <rtl/ustring.hxx> -#ifndef _COM_SUN_STAR_UCB_XREFERENCE_HPP_ #include <com/sun/star/uno/XReference.hpp> -#endif #include <com/sun/star/ucb/XCommandEnvironment.hpp> namespace webdav_ucp @@ -46,7 +44,6 @@ class DAVAuthListener : public salhelper::SimpleReferenceObject const ::rtl::OUString & inHostName, ::rtl::OUString & inoutUserName, ::rtl::OUString & outPassWord, - sal_Bool bAllowPersistentStoring, sal_Bool bCanUseSystemCredentials ) = 0; }; diff --git a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx index 3d03cc63952b..c0c9968613af 100644 --- a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx @@ -61,7 +61,6 @@ namespace webdav_ucp const ::rtl::OUString & inHostName, ::rtl::OUString & inoutUserName, ::rtl::OUString & outPassWord, - sal_Bool bAllowPersistentStoring, sal_Bool bCanUseSystemCredentials ); private: diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index 4ffc8dd88cf5..872d45405735 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx @@ -57,7 +57,6 @@ int DAVAuthListener_Impl::authenticate( const ::rtl::OUString & inHostName, ::rtl::OUString & inoutUserName, ::rtl::OUString & outPassWord, - sal_Bool bAllowPersistentStoring, sal_Bool bCanUseSystemCredentials ) { if ( m_xEnv.is() ) @@ -79,7 +78,8 @@ int DAVAuthListener_Impl::authenticate( = new ucbhelper::SimpleAuthenticationRequest( m_aURL, inHostName, inRealm, inoutUserName, outPassWord, ::rtl::OUString(), - bAllowPersistentStoring, bCanUseSystemCredentials ); + true /*bAllowPersistentStoring*/, + bCanUseSystemCredentials ); xIH->handle( xRequest.get() ); rtl::Reference< ucbhelper::InteractionContinuation > xSelection diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index 8fc1730ba018..254fae546940 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -60,7 +60,6 @@ #include <com/sun/star/security/CertificateContainerStatus.hpp> #include <com/sun/star/security/CertificateContainer.hpp> #include <com/sun/star/security/XCertificateContainer.hpp> -#include <com/sun/star/task/XMasterPasswordHandling.hpp> #include <com/sun/star/ucb/Lock.hpp> #include <com/sun/star/xml/crypto/XSEInitializer.hpp> @@ -330,31 +329,11 @@ extern "C" int NeonSession_NeonAuth( void * inUserData, ( ne_strcasecmp( inAuthProtocol, "Negotiate" ) == 0 ) ); #endif - // #i97003# (tkr): Ask XMasterPasswordHandling if we should store the - // credentials persistently and give this information to the auth listener - uno::Reference< task::XMasterPasswordHandling > xMasterPasswordHandling; - try - { - xMasterPasswordHandling = - uno::Reference< task::XMasterPasswordHandling >( - theSession->getMSF()->createInstance( - rtl::OUString::createFromAscii( - "com.sun.star.task.PasswordContainer" ) ), - uno::UNO_QUERY ); - } - catch ( uno::Exception const & ) - { - } - int theRetVal = pListener->authenticate( rtl::OUString::createFromAscii( inRealm ), theSession->getHostName(), theUserName, thePassWord, - xMasterPasswordHandling.is() - ? xMasterPasswordHandling-> - isPersistentStoringAllowed() - : sal_False, bCanUseSystemCreds); rtl::OString aUser( diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index f31397f1ef92..4183b852735e 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -67,10 +67,9 @@ executeLoginDialog( { vos::OGuard aGuard(Application::GetSolarMutex()); - bool bAccount = (rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_ACCOUNT) - != 0; - bool bSavePassword = rInfo.GetIsPersistentPassword() - || rInfo.GetIsSavePassword(); + bool bAccount + = (rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_ACCOUNT) != 0; + bool bSavePassword = rInfo.GetCanRememberPassword(); bool bCanUseSysCreds = rInfo.GetCanUseSystemCredentials(); sal_uInt16 nFlags = 0; @@ -109,12 +108,13 @@ executeLoginDialog( if (bSavePassword) { - xDialog-> - SetSavePasswordText(ResId(rInfo.GetIsPersistentPassword() ? - RID_SAVE_PASSWORD : - RID_KEEP_PASSWORD, - *xManager.get())); - xDialog->SetSavePassword(rInfo.GetIsSavePassword()); + xDialog->SetSavePasswordText( + ResId(rInfo.GetIsRememberPersistent() + ? RID_SAVE_PASSWORD + : RID_KEEP_PASSWORD, + *xManager.get())); + + xDialog->SetSavePassword(rInfo.GetIsRememberPassword()); } if ( bCanUseSysCreds ) @@ -126,7 +126,7 @@ executeLoginDialog( rInfo.SetUserName(xDialog->GetName()); rInfo.SetPassword(xDialog->GetPassword()); rInfo.SetAccount(xDialog->GetAccount()); - rInfo.SetSavePassword(xDialog->IsSavePassword()); + rInfo.SetIsRememberPassword(xDialog->IsSavePassword()); if ( bCanUseSysCreds ) rInfo.SetIsUseSystemCredentials( xDialog->IsUseSystemCredentials() ); @@ -139,6 +139,60 @@ executeLoginDialog( } } +void getRememberModes( + uno::Sequence< ucb::RememberAuthentication > const & rRememberModes, + ucb::RememberAuthentication & rPreferredMode, + ucb::RememberAuthentication & rAlternateMode ) +{ + sal_Int32 nCount = rRememberModes.getLength(); + OSL_ENSURE( (nCount > 0) && (nCount < 4), + "ucb::RememberAuthentication sequence size mismatch!" ); + if ( nCount == 1 ) + { + rPreferredMode = rAlternateMode = rRememberModes[ 0 ]; + return; + } + else + { + //bool bHasRememberModeNo = false; + bool bHasRememberModeSession = false; + bool bHasRememberModePersistent = false; + + for (sal_Int32 i = 0; i < nCount; ++i) + { + switch ( rRememberModes[i] ) + { + case ucb::RememberAuthentication_NO: + //bHasRememberModeNo = true; + break; + case ucb::RememberAuthentication_SESSION: + bHasRememberModeSession = true; + break; + case ucb::RememberAuthentication_PERSISTENT: + bHasRememberModePersistent = true; + break; + default: + OSL_TRACE( "Unsupported RememberAuthentication value" ); + break; + } + } + + if (bHasRememberModePersistent) + { + rPreferredMode = ucb::RememberAuthentication_PERSISTENT; + if (bHasRememberModeSession) + rAlternateMode = ucb::RememberAuthentication_SESSION; + else + rAlternateMode = ucb::RememberAuthentication_NO; + } + else + { + rPreferredMode = ucb::RememberAuthentication_SESSION; + rAlternateMode = ucb::RememberAuthentication_NO; + } + } +} + void handleAuthenticationRequest_( Window * pParent, @@ -161,7 +215,7 @@ handleAuthenticationRequest_( xSupplyAuthentication2.set(xSupplyAuthentication, uno::UNO_QUERY); ////////////////////////// - // First, try to obatin credentials from password container service. + // First, try to obtain credentials from password container service. uui::PasswordContainerHelper aPwContainerHelper(xServiceFactory); if (aPwContainerHelper.handleAuthenticationRequest(rRequest, xSupplyAuthentication, @@ -174,26 +228,20 @@ handleAuthenticationRequest_( ////////////////////////// // Second, try to obtain credentials from user via password dialog. - bool bRemember; - bool bRememberPersistent; + ucb::RememberAuthentication eDefaultRememberMode + = ucb::RememberAuthentication_SESSION; + ucb::RememberAuthentication ePreferredRememberMode + = eDefaultRememberMode; + ucb::RememberAuthentication eAlternateRememberMode + = ucb::RememberAuthentication_NO; + if (xSupplyAuthentication.is()) { - ucb::RememberAuthentication eDefault; - uno::Sequence< ucb::RememberAuthentication > - aModes(xSupplyAuthentication->getRememberPasswordModes(eDefault)); - bRemember = eDefault != ucb::RememberAuthentication_NO; - bRememberPersistent = false; - for (sal_Int32 i = 0; i < aModes.getLength(); ++i) - if (aModes[i] == ucb::RememberAuthentication_PERSISTENT) - { - bRememberPersistent = true; - break; - } - } - else - { - bRemember = false; - bRememberPersistent = false; + getRememberModes( + xSupplyAuthentication->getRememberPasswordModes( + eDefaultRememberMode), + ePreferredRememberMode, + eAlternateRememberMode); } sal_Bool bCanUseSystemCredentials; @@ -220,8 +268,14 @@ handleAuthenticationRequest_( if (rRequest.HasPassword) aInfo.SetPassword(rRequest.Password); aInfo.SetErrorText(rRequest.Diagnostic); - aInfo.SetPersistentPassword(bRememberPersistent); - aInfo.SetSavePassword(bRemember); + + aInfo.SetCanRememberPassword( + ePreferredRememberMode != eAlternateRememberMode); + aInfo.SetIsRememberPassword( + eDefaultRememberMode != ucb::RememberAuthentication_NO); + aInfo.SetIsRememberPersistent( + ePreferredRememberMode == ucb::RememberAuthentication_PERSISTENT); + aInfo.SetCanUseSystemCredentials(bCanUseSystemCredentials); aInfo.SetIsUseSystemCredentials( bDefaultUseSystemCredentials ); aInfo.SetModifyAccount(rRequest.HasAccount @@ -242,13 +296,24 @@ handleAuthenticationRequest_( xSupplyAuthentication->setUserName(aInfo.GetUserName()); if (xSupplyAuthentication->canSetPassword()) xSupplyAuthentication->setPassword(aInfo.GetPassword()); - xSupplyAuthentication-> - setRememberPassword( - aInfo.GetIsSavePassword() ? - bRememberPersistent ? - ucb::RememberAuthentication_PERSISTENT : - ucb::RememberAuthentication_SESSION : - ucb::RememberAuthentication_NO); + + if (ePreferredRememberMode != eAlternateRememberMode) + { + // user had te choice. + if (aInfo.GetIsRememberPassword()) + xSupplyAuthentication->setRememberPassword( + ePreferredRememberMode); + else + xSupplyAuthentication->setRememberPassword( + eAlternateRememberMode); + } + else + { + // user had no choice. + xSupplyAuthentication->setRememberPassword( + ePreferredRememberMode); + } + if (rRequest.HasRealm) { if (xSupplyAuthentication->canSetRealm()) @@ -267,38 +332,76 @@ handleAuthenticationRequest_( ////////////////////////// // Third, store credentials in password container. - if ( aInfo.GetIsUseSystemCredentials() ) - { - if (aInfo.GetIsSavePassword()) - { - aPwContainerHelper.addRecord( - rURL.getLength() ? rURL : rRequest.ServerName, - rtl::OUString(), // empty u/p -> sys creds - uno::Sequence< rtl::OUString >(), - xIH, - bRememberPersistent); - } - } - // Empty user name can not be valid: - else if (aInfo.GetUserName().Len() != 0) - { - if (aInfo.GetIsSavePassword()) - { - uno::Sequence< rtl::OUString > - aPassList(aInfo.GetAccount().Len() == 0 ? 1 : 2); - aPassList[0] = aInfo.GetPassword(); - if (aInfo.GetAccount().Len() != 0) - aPassList[1] = aInfo.GetAccount(); - - aPwContainerHelper.addRecord( - rURL.getLength() ? rURL : rRequest.ServerName, - aInfo.GetUserName(), - aPassList, - xIH, - bRememberPersistent); - } - } - break; + if ( aInfo.GetIsUseSystemCredentials() ) + { + if (aInfo.GetIsRememberPassword()) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + rtl::OUString(), // empty u/p -> sys creds + uno::Sequence< rtl::OUString >(), + xIH, + ePreferredRememberMode + == ucb::RememberAuthentication_PERSISTENT)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + else if (eAlternateRememberMode + == ucb::RememberAuthentication_SESSION) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + rtl::OUString(), // empty u/p -> sys creds + uno::Sequence< rtl::OUString >(), + xIH, + false /* SESSION */)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + } + // Empty user name can not be valid: + else if (aInfo.GetUserName().Len() != 0) + { + uno::Sequence< rtl::OUString > + aPassList(aInfo.GetAccount().Len() == 0 ? 1 : 2); + aPassList[0] = aInfo.GetPassword(); + if (aInfo.GetAccount().Len() != 0) + aPassList[1] = aInfo.GetAccount(); + + if (aInfo.GetIsRememberPassword()) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + aInfo.GetUserName(), + aPassList, + xIH, + ePreferredRememberMode + == ucb::RememberAuthentication_PERSISTENT)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + else if (eAlternateRememberMode + == ucb::RememberAuthentication_SESSION) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + aInfo.GetUserName(), + aPassList, + xIH, + false /* SESSION */)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + } + break; case ERRCODE_BUTTON_RETRY: if (xRetry.is()) diff --git a/uui/source/loginerr.hxx b/uui/source/loginerr.hxx index c8cbba96564b..39e5b81caf85 100644 --- a/uui/source/loginerr.hxx +++ b/uui/source/loginerr.hxx @@ -32,12 +32,13 @@ //========================================================================= -#define LOGINERROR_FLAG_SET_SAVE_PASSWORD 1 -#define LOGINERROR_FLAG_MODIFY_ACCOUNT 2 -#define LOGINERROR_FLAG_MODIFY_USER_NAME 4 -#define LOGINERROR_FLAG_PERSISTENT_PASSWORD 8 -#define LOGINERROR_FLAG_CAN_USE_SYSCREDS 16 -#define LOGINERROR_FLAG_IS_USE_SYSCREDS 32 +#define LOGINERROR_FLAG_MODIFY_ACCOUNT 1 +#define LOGINERROR_FLAG_MODIFY_USER_NAME 2 +#define LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD 4 +#define LOGINERROR_FLAG_IS_REMEMBER_PASSWORD 8 +#define LOGINERROR_FLAG_CAN_USE_SYSCREDS 16 +#define LOGINERROR_FLAG_IS_USE_SYSCREDS 32 +#define LOGINERROR_FLAG_REMEMBER_PERSISTENT 64 class LoginErrorInfo { @@ -56,27 +57,30 @@ public: LoginErrorInfo() : _nFlags( LOGINERROR_FLAG_MODIFY_USER_NAME ), _nRet( ERRCODE_BUTTON_CANCEL ) - { - } + {} const String& GetTitle() const { return _aTitle; } - const String& GetServer() const { return _aServer; } + const String& GetServer() const { return _aServer; } const String& GetAccount() const { return _aAccount; } const String& GetUserName() const { return _aUserName; } const String& GetPassword() const { return _aPassword; } const String& GetPath() const { return _aPath; } const String& GetErrorText() const { return _aErrorText; } - BOOL GetIsPersistentPassword() const - { return ( _nFlags & LOGINERROR_FLAG_PERSISTENT_PASSWORD ); } - BOOL GetIsSavePassword() const - { return ( _nFlags & LOGINERROR_FLAG_SET_SAVE_PASSWORD ); } + + BOOL GetCanRememberPassword() const + { return ( _nFlags & LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD ); } + BOOL GetIsRememberPersistent() const + { return ( _nFlags & LOGINERROR_FLAG_REMEMBER_PERSISTENT ); } + BOOL GetIsRememberPassword() const + { return ( _nFlags & LOGINERROR_FLAG_IS_REMEMBER_PASSWORD ); } + BOOL GetCanUseSystemCredentials() const { return ( _nFlags & LOGINERROR_FLAG_CAN_USE_SYSCREDS ); } BOOL GetIsUseSystemCredentials() const { return ( _nFlags & LOGINERROR_FLAG_IS_USE_SYSCREDS ) == LOGINERROR_FLAG_IS_USE_SYSCREDS; } - BYTE GetFlags() const { return _nFlags; } - USHORT GetResult() const { return _nRet; } + BYTE GetFlags() const { return _nFlags; } + USHORT GetResult() const { return _nRet; } void SetTitle( const String& aTitle ) { _aTitle = aTitle; } @@ -94,8 +98,11 @@ public: { _aErrorText = aErrorText; } void SetFlags( BYTE nFlags ) { _nFlags = nFlags; } - inline void SetSavePassword( BOOL bSet ); - inline void SetPersistentPassword( BOOL bSet ); + + inline void SetCanRememberPassword( BOOL bSet ); + inline void SetIsRememberPassword( BOOL bSet ); + inline void SetIsRememberPersistent( BOOL bSet ); + inline void SetCanUseSystemCredentials( BOOL bSet ); inline void SetIsUseSystemCredentials( BOOL bSet ); inline void SetModifyAccount( BOOL bSet ); @@ -104,20 +111,28 @@ public: { _nRet = nRet; } }; -inline void LoginErrorInfo::SetSavePassword( BOOL bSet ) +inline void LoginErrorInfo::SetCanRememberPassword( BOOL bSet ) +{ + if ( bSet ) + _nFlags |= LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD; + else + _nFlags &= ~LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD; +} + +inline void LoginErrorInfo::SetIsRememberPassword( BOOL bSet ) { if ( bSet ) - _nFlags |= LOGINERROR_FLAG_SET_SAVE_PASSWORD; + _nFlags |= LOGINERROR_FLAG_IS_REMEMBER_PASSWORD; else - _nFlags &= ~LOGINERROR_FLAG_SET_SAVE_PASSWORD; + _nFlags &= ~LOGINERROR_FLAG_IS_REMEMBER_PASSWORD; } -inline void LoginErrorInfo::SetPersistentPassword( BOOL bSet ) +inline void LoginErrorInfo::SetIsRememberPersistent( BOOL bSet ) { if ( bSet ) - _nFlags |= LOGINERROR_FLAG_PERSISTENT_PASSWORD; + _nFlags |= LOGINERROR_FLAG_REMEMBER_PERSISTENT; else - _nFlags &= ~LOGINERROR_FLAG_PERSISTENT_PASSWORD; + _nFlags &= ~LOGINERROR_FLAG_REMEMBER_PERSISTENT; } inline void LoginErrorInfo::SetCanUseSystemCredentials( BOOL bSet ) diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx index 26d22b320d8a..0a056289c29d 100644 --- a/uui/source/passwordcontainer.cxx +++ b/uui/source/passwordcontainer.cxx @@ -30,6 +30,7 @@ #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "com/sun/star/task/NoMasterException.hpp" #include "com/sun/star/task/XInteractionHandler.hpp" +#include "com/sun/star/task/XMasterPasswordHandling.hpp" #include "com/sun/star/task/XPasswordContainer.hpp" #include "com/sun/star/task/XUrlContainer.hpp" #include "com/sun/star/ucb/AuthenticationRequest.hpp" @@ -271,10 +272,20 @@ bool PasswordContainerHelper::addRecord( return false; if ( bPersist ) + { + uno::Reference< task::XMasterPasswordHandling > xMPH( + m_xPasswordContainer, uno::UNO_QUERY_THROW ); + + // If persistent storing of passwords is not yet + // allowed, enable it. + if ( !xMPH->isPersistentStoringAllowed() ) + xMPH->allowPersistentStoring( sal_True ); + m_xPasswordContainer->addPersistent( rURL, rUsername, rPasswords, xIH ); + } else m_xPasswordContainer->add( rURL, rUsername, @@ -429,7 +440,7 @@ PasswordContainerInteractionHandler::handle( // @@@ FIXME: this not able to // handle master pw request! // master pw request is never - // solvabe without UI! + // solvable without UI! this ) ) { // successfully handled diff --git a/vbahelper/inc/vbahelper/msvbahelper.hxx b/vbahelper/inc/vbahelper/msvbahelper.hxx deleted file mode 100644 index 898c44c349bc..000000000000 --- a/vbahelper/inc/vbahelper/msvbahelper.hxx +++ /dev/null @@ -1,55 +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 _MSVBAHELPER_HXX -#define _MSVBAHELPER_HXX - -#include <sfx2/objsh.hxx> -#include <vbahelper/vbadllapi.h> - -namespace ooo { namespace vba -{ - class VBAHELPER_DLLPUBLIC VBAMacroResolvedInfo - { - SfxObjectShell* mpDocContext; - bool mbFound; - String msResolvedMacro; - public: - VBAMacroResolvedInfo() : mpDocContext(NULL), mbFound( false ){} - void SetResolved( bool bRes ) { mbFound = bRes; } - bool IsResolved() { return mbFound; } - void SetMacroDocContext(SfxObjectShell* pShell ) { mpDocContext = pShell; } - SfxObjectShell* MacroDocContext() { return mpDocContext; } - String ResolvedMacro() { return msResolvedMacro; } - void SetResolvedMacro(const String& sMacro ) { msResolvedMacro = sMacro; } - }; - - VBAHELPER_DLLPUBLIC String makeMacroURL( const String& sMacroName ); - VBAHELPER_DLLPUBLIC VBAMacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUString& sMod, bool bSearchGlobalTemplates = false ); - VBAHELPER_DLLPUBLIC sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArgs, com::sun::star::uno::Any& aRet, const com::sun::star::uno::Any& aCaller ); -} } - -#endif diff --git a/vbahelper/inc/vbahelper/vbaaccesshelper.hxx b/vbahelper/inc/vbahelper/vbaaccesshelper.hxx new file mode 100644 index 000000000000..79bb44ce30a4 --- /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 315ddb19b7ca..166ad76475d8 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,8 +64,10 @@ 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 > getThisExcelDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); + VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getThisWordDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) 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/build.lst b/vbahelper/prj/build.lst index 0db5274b7ad3..20001db859c8 100644 --- a/vbahelper/prj/build.lst +++ b/vbahelper/prj/build.lst @@ -1,4 +1,4 @@ -vba vbahelper : oovbaapi basic sfx2 svx cppuhelper vcl comphelper svtools tools sal NULL +vba vbahelper : oovbaapi basic sfx2 svx filter cppuhelper vcl comphelper svtools tools sal NULL vba vbahelper usr1 - all vba_mkout NULL #vba vbahelper\inc nmake - all vba_inc NULL vba vbahelper\source\vbahelper nmake - all vba_vbahelper NULL diff --git a/vbahelper/prj/d.lst b/vbahelper/prj/d.lst index d7b61d1e5a61..d683e97c8b90 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 9c24c77f8009..7c61e4302b7f 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 8cf00748c278..2ff12b145824 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 b0db3c476186..1a8ed063548b 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 88f8f53bd5bf..b11b4ffa0a4f 100644 --- a/vbahelper/source/vbahelper/makefile.mk +++ b/vbahelper/source/vbahelper/makefile.mk @@ -33,10 +33,14 @@ ENABLE_EXCEPTIONS := TRUE VISIBILITY_HIDDEN=TRUE # --- Settings ----------------------------------------------------- +.IF "$(ENABLE_VBA)" == "NO" +dummy: + @echo "Nothing to build" +.ENDIF + .INCLUDE : settings.mk SLOFILES=\ - $(SLO)$/msvbahelper.obj \ $(SLO)$/vbahelper.obj \ $(SLO)$/vbapropvalue.obj \ $(SLO)$/vbacommandbars.obj \ diff --git a/vbahelper/source/vbahelper/msvbahelper.cxx b/vbahelper/source/vbahelper/msvbahelper.cxx deleted file mode 100644 index f0d721529b2c..000000000000 --- a/vbahelper/source/vbahelper/msvbahelper.cxx +++ /dev/null @@ -1,381 +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. - * - ************************************************************************/ - -#define VBAHELPER_DLLIMPLEMENTATION -#include <vbahelper/msvbahelper.hxx> -#include <basic/sbx.hxx> -#include <basic/sbstar.hxx> -#include <basic/basmgr.hxx> -#include <basic/sbmod.hxx> -#include <basic/sbmeth.hxx> -#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> -#include <com/sun/star/document/XDocumentProperties.hpp> -#include <com/sun/star/document/XDocumentInfoSupplier.hpp> -#include <tools/urlobj.hxx> -#include <osl/file.hxx> - -using namespace ::com::sun::star; - -const static rtl::OUString sUrlPart0 = rtl::OUString::createFromAscii( "vnd.sun.star.script:"); -const static rtl::OUString sUrlPart1 = rtl::OUString::createFromAscii( "?language=Basic&location=document"); - -namespace ooo { namespace vba { - -String makeMacroURL( const String& sMacroName ) -{ - return sUrlPart0.concat( sMacroName ).concat( sUrlPart1 ) ; -} - -SfxObjectShell* findShellForUrl( const rtl::OUString& sMacroURLOrPath ) -{ - SfxObjectShell* pFoundShell=NULL; - SfxObjectShell* pShell = SfxObjectShell::GetFirst(); - INetURLObject aObj; - aObj.SetURL( sMacroURLOrPath ); - bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID; - rtl::OUString aURL; - if ( bIsURL ) - aURL = sMacroURLOrPath; - else - { - osl::FileBase::getFileURLFromSystemPath( sMacroURLOrPath, aURL ); - aObj.SetURL( aURL ); - } - OSL_TRACE("Trying to find shell for url %s", rtl::OUStringToOString( aURL, RTL_TEXTENCODING_UTF8 ).getStr() ); - while ( pShell ) - { - - uno::Reference< frame::XModel > xModel = pShell->GetModel(); - // are we searching for a template? if so we have to cater for the - // fact that in openoffice a document opened from a template is always - // a new document :/ - if ( xModel.is() ) - { - OSL_TRACE("shell 0x%x has model with url %s and we look for %s", pShell - , rtl::OUStringToOString( xModel->getURL(), RTL_TEXTENCODING_UTF8 ).getStr() - , rtl::OUStringToOString( aURL, RTL_TEXTENCODING_UTF8 ).getStr() - ); - if ( sMacroURLOrPath.endsWithIgnoreAsciiCaseAsciiL( ".dot", 4 ) ) - { - uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( xModel, uno::UNO_QUERY ); - if( xDocInfoSupp.is() ) - { - uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW ); - uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW ); - rtl::OUString sCurrName = xDocProps->getTemplateName(); - if( sMacroURLOrPath.lastIndexOf( sCurrName ) >= 0 ) - { - pFoundShell = pShell; - break; - } - } - } - else - { - if ( aURL.equals( xModel->getURL() ) ) - { - pFoundShell = pShell; - break; - } - } - } - pShell = SfxObjectShell::GetNext( *pShell ); - } - return pFoundShell; -} - -// sMod can be empty ( but we really need the library to search in ) -// if sMod is empty and a macro is found then sMod is updated -bool hasMacro( SfxObjectShell* pShell, const String& sLibrary, String& sMod, const String& sMacro ) -{ - bool bFound = false; - if ( sLibrary.Len() && sMacro.Len() ) - { - OSL_TRACE("** Searching for %s.%s in library %s" - ,rtl::OUStringToOString( sMod, RTL_TEXTENCODING_UTF8 ).getStr() - ,rtl::OUStringToOString( sMacro, RTL_TEXTENCODING_UTF8 ).getStr() - ,rtl::OUStringToOString( sLibrary, RTL_TEXTENCODING_UTF8 ).getStr() ); - BasicManager* pBasicMgr = pShell-> GetBasicManager(); - if ( pBasicMgr ) - { - StarBASIC* pBasic = pBasicMgr->GetLib( sLibrary ); - if ( !pBasic ) - { - USHORT nId = pBasicMgr->GetLibId( sLibrary ); - pBasicMgr->LoadLib( nId ); - pBasic = pBasicMgr->GetLib( sLibrary ); - } - if ( pBasic ) - { - if ( sMod.Len() ) // we wish to find the macro is a specific module - { - SbModule* pModule = pBasic->FindModule( sMod ); - if ( pModule ) - { - SbxArray* pMethods = pModule->GetMethods(); - if ( pMethods ) - { - SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Find( sMacro, SbxCLASS_METHOD ) ); - if ( pMethod ) - bFound = true; - } - } - } - else if( SbMethod* pMethod = dynamic_cast< SbMethod* >( pBasic->Find( sMacro, SbxCLASS_METHOD ) ) ) - { - if( SbModule* pModule = pMethod->GetModule() ) - { - sMod = pModule->GetName(); - bFound = true; - } - } - } - } - } - return bFound; -} -void parseMacro( const rtl::OUString& sMacro, String& sContainer, String& sModule, String& sProcedure ) -{ - sal_Int32 nMacroDot = sMacro.lastIndexOf( '.' ); - - if ( nMacroDot != -1 ) - { - sProcedure = sMacro.copy( nMacroDot + 1 ); - - sal_Int32 nContainerDot = sMacro.lastIndexOf( '.', nMacroDot - 1 ); - if ( nContainerDot != -1 ) - { - sModule = sMacro.copy( nContainerDot + 1, nMacroDot - nContainerDot - 1 ); - sContainer = sMacro.copy( 0, nContainerDot ); - } - else - sModule = sMacro.copy( 0, nMacroDot ); - } - else - sProcedure = sMacro; -} - -VBAMacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUString& MacroName, bool bSearchGlobalTemplates ) -{ - VBAMacroResolvedInfo aRes; - if ( !pShell ) - return aRes; - aRes.SetMacroDocContext( pShell ); - // parse the macro name - sal_Int32 nDocSepIndex = MacroName.indexOfAsciiL( "!", 1 ); - String sMacroUrl = MacroName; - - String sContainer; - String sModule; - String sProcedure; - - if( nDocSepIndex > 0 ) - { - // macro specified by document name - // find document shell for document name and call ourselves - // recursively - - // assume for now that the document name is *this* document - String sDocUrlOrPath = MacroName.copy( 0, nDocSepIndex ); - sMacroUrl = MacroName.copy( nDocSepIndex + 1 ); - OSL_TRACE("doc search, current shell is 0x%x", pShell ); - SfxObjectShell* pFoundShell = findShellForUrl( sDocUrlOrPath ); - OSL_TRACE("doc search, after find, found shell is 0x%x", pFoundShell ); - aRes = resolveVBAMacro( pFoundShell, sMacroUrl ); - } - else - { - // macro is contained in 'this' document ( or code imported from a template - // where that template is a global template or perhaps the template this - // document is created from ) - - // macro format = Container.Module.Procedure - parseMacro( MacroName, sContainer, sModule, sProcedure ); - uno::Reference< lang::XMultiServiceFactory> xSF( pShell->GetModel(), uno::UNO_QUERY); - uno::Reference< container::XNameContainer > xPrjNameCache; - if ( xSF.is() ) - xPrjNameCache.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAProjectNameProvider" ) ) ), uno::UNO_QUERY ); - - std::vector< rtl::OUString > sSearchList; - - if ( sContainer.Len() > 0 ) - { - // get the Project associated with the Container - if ( xPrjNameCache.is() ) - { - if ( xPrjNameCache->hasByName( sContainer ) ) - { - rtl::OUString sProject; - xPrjNameCache->getByName( sContainer ) >>= sProject; - sContainer = sProject; - } - } - sSearchList.push_back( sContainer ); // First Lib to search - } - else - { - // Ok, if we have no Container specified then we need to search them in order, this document, template this document created from, global templates, - // get the name of Project/Library for 'this' document - rtl::OUString sThisProject; - BasicManager* pBasicMgr = pShell-> GetBasicManager(); - if ( pBasicMgr ) - { - if ( pBasicMgr->GetName().Len() ) - sThisProject = pBasicMgr->GetName(); - else // cater for the case where VBA is not enabled - sThisProject = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Standard") ); - } - sSearchList.push_back( sThisProject ); // First Lib to search - if ( xPrjNameCache.is() ) - { - // is this document created from a template? - uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( pShell->GetModel(), uno::UNO_QUERY_THROW ); - uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW ); - uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW ); - - rtl::OUString sCreatedFrom = xDocProps->getTemplateURL(); - if ( sCreatedFrom.getLength() ) - { - INetURLObject aObj; - aObj.SetURL( sCreatedFrom ); - bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID; - rtl::OUString aURL; - if ( bIsURL ) - aURL = sCreatedFrom; - else - { - osl::FileBase::getFileURLFromSystemPath( sCreatedFrom, aURL ); - aObj.SetURL( aURL ); - } - sCreatedFrom = aObj.GetLastName(); - } - - sal_Int32 nIndex = sCreatedFrom.lastIndexOf( '.' ); - if ( nIndex != -1 ) - sCreatedFrom = sCreatedFrom.copy( 0, nIndex ); - - rtl::OUString sPrj; - if ( sCreatedFrom.getLength() && xPrjNameCache->hasByName( sCreatedFrom ) ) - { - xPrjNameCache->getByName( sCreatedFrom ) >>= sPrj; - // Make sure we don't double up with this project - if ( !sPrj.equals( sThisProject ) ) - sSearchList.push_back( sPrj ); - } - - // get list of global template Names - uno::Sequence< rtl::OUString > sTemplateNames = xPrjNameCache->getElementNames(); - sal_Int32 nLen = sTemplateNames.getLength(); - for ( sal_Int32 index = 0; ( bSearchGlobalTemplates && index < nLen ); ++index ) - { - - if ( !sCreatedFrom.equals( sTemplateNames[ index ] ) ) - { - if ( xPrjNameCache->hasByName( sTemplateNames[ index ] ) ) - { - xPrjNameCache->getByName( sTemplateNames[ index ] ) >>= sPrj; - // Make sure we don't double up with this project - if ( !sPrj.equals( sThisProject ) ) - sSearchList.push_back( sPrj ); - } - } - - } - } - } - std::vector< rtl::OUString >::iterator it_end = sSearchList.end(); - for ( std::vector< rtl::OUString >::iterator it = sSearchList.begin(); it != it_end; ++it ) - { - bool bRes = hasMacro( pShell, *it, sModule, sProcedure ); - if ( bRes ) - { - aRes.SetResolved( true ); - aRes.SetMacroDocContext( pShell ); - sContainer = *it; - break; - } - } - } - aRes.SetResolvedMacro( sProcedure.Insert( '.', 0 ).Insert( sModule, 0).Insert( '.', 0 ).Insert( sContainer, 0 ) ); - - return aRes; -} - -// Treat the args as possible inouts ( convertion at bottom of method ) -sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, uno::Sequence< uno::Any >& aArgs, uno::Any& /*aRet*/, const uno::Any& aCaller ) -{ - sal_Bool bRes = sal_False; - if ( !pShell ) - return bRes; - rtl::OUString sUrl = makeMacroURL( sMacroName ); - - uno::Sequence< sal_Int16 > aOutArgsIndex; - uno::Sequence< uno::Any > aOutArgs; - - try - { - uno::Reference< script::provider::XScriptProvider > xScriptProvider; - uno::Reference< script::provider::XScriptProviderSupplier > xSPS( pShell->GetModel(), uno::UNO_QUERY_THROW ); - - xScriptProvider.set( xSPS->getScriptProvider(), uno::UNO_QUERY_THROW ); - - uno::Reference< script::provider::XScript > xScript( xScriptProvider->getScript( sUrl ), uno::UNO_QUERY_THROW ); - - if ( aCaller.hasValue() ) - { - uno::Reference< beans::XPropertySet > xProps( xScript, uno::UNO_QUERY ); - if ( xProps.is() ) - { - uno::Sequence< uno::Any > aCallerHack(1); - aCallerHack[ 0 ] = aCaller; - xProps->setPropertyValue( rtl::OUString::createFromAscii( "Caller" ), uno::makeAny( aCallerHack ) ); - } - } - - - xScript->invoke( aArgs, aOutArgsIndex, aOutArgs ); - - sal_Int32 nLen = aOutArgs.getLength(); - // convert any out params to seem like they were inouts - if ( nLen ) - { - for ( sal_Int32 index=0; index < nLen; ++index ) - { - sal_Int32 nOutIndex = aOutArgsIndex[ index ]; - aArgs[ nOutIndex ] = aOutArgs[ index ]; - } - } - - bRes = sal_True; - } - catch ( uno::Exception& e ) - { - bRes = sal_False; - } - return bRes; -} -} } // vba // ooo diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index 7f8e563cbab6..54b635d2f08d 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -34,7 +34,7 @@ #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> #include "vbacommandbars.hxx" -#include <vbahelper/msvbahelper.hxx> +#include <filter/msfilter/msvbahelper.hxx> // start basic includes #include <basic/sbx.hxx> diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx index e081a723db04..a4bb3adc7dbf 100644 --- a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx +++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx @@ -27,7 +27,7 @@ #include "vbacommandbarcontrol.hxx" #include "vbacommandbarcontrols.hxx" #include <vbahelper/vbahelper.hxx> -#include <vbahelper/msvbahelper.hxx> +#include <filter/msfilter/msvbahelper.hxx> using namespace com::sun::star; using namespace ooo::vba; diff --git a/vbahelper/source/vbahelper/vbaglobalbase.cxx b/vbahelper/source/vbahelper/vbaglobalbase.cxx index 4226a6bfbf53..c7c33b93b1a3 100644 --- a/vbahelper/source/vbahelper/vbaglobalbase.cxx +++ b/vbahelper/source/vbahelper/vbaglobalbase.cxx @@ -85,7 +85,6 @@ VbaGlobalsBase::createInstanceWithArguments( const ::rtl::OUString& ServiceSpeci { uno::Reference< uno::XInterface > xReturn; - if ( hasServiceName( ServiceSpecifier ) ) xReturn = mxContext->getServiceManager()->createInstanceWithArgumentsAndContext( ServiceSpecifier, Arguments, mxContext ); return xReturn; diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index a99b3fd47e00..a9e72318536d 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 ) { @@ -464,6 +448,18 @@ getCurrentDocCtx( const rtl::OUString& ctxName, const uno::Reference< uno::XComp return xModel; } +uno::Reference< frame::XModel > +getThisExcelDoc( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException) +{ + return getCurrentDocCtx( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ExcelDocumentContext" ) ), xContext ); +} + +uno::Reference< frame::XModel > +getThisWordDoc( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException) +{ + return getCurrentDocCtx( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("WordDocumentContext" ) ), xContext ); +} + uno::Reference< frame::XModel > getCurrentExcelDoc( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException) { @@ -475,7 +471,7 @@ getCurrentExcelDoc( const uno::Reference< uno::XComponentContext >& xContext ) t } catch( uno::Exception& e ) { - xModel = getCurrentDocCtx( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ExcelDocumentContext" ) ), xContext ); + xModel = getThisExcelDoc( xContext ); } return xModel; } @@ -491,7 +487,7 @@ getCurrentWordDoc( const uno::Reference< uno::XComponentContext >& xContext ) th } catch( uno::Exception& e ) { - xModel = getCurrentDocCtx( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("WordDocumentContext" ) ), xContext ); + xModel = getThisWordDoc( xContext ); } return xModel; } diff --git a/vbahelper/util/makefile.mk b/vbahelper/util/makefile.mk index 98adae420ed9..dda4be0cbc81 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 @@ -56,6 +60,7 @@ SHL1STDLIBS= \ $(SVLLIB) \ $(VCLLIB) \ $(SVTOOLLIB) \ + $(MSFILTERLIB) \ $(TKLIB) SHL1DEPN= diff --git a/xmloff/inc/RDFaExportHelper.hxx b/xmloff/inc/RDFaExportHelper.hxx index 9dd23e230e01..f8e991060eea 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 600a8a084cf2..030e1a840b9b 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 bce52d875b52..000000000000 --- 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 2cdbaffbbde3..75310d90f0ae 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 @@ -254,11 +262,11 @@ enum XMLTextPAttrTokens XML_TOK_TEXT_P_PROPERTY, XML_TOK_TEXT_P_CONTENT, XML_TOK_TEXT_P_DATATYPE, + XML_TOK_TEXT_P_TEXTID, XML_TOK_TEXT_P_STYLE_NAME, XML_TOK_TEXT_P_COND_STYLE_NAME, XML_TOK_TEXT_P_LEVEL, XML_TOK_TEXT_P_CLASS_NAMES, - XML_TOK_TEXT_P_ID, XML_TOK_TEXT_P_IS_LIST_HEADER, XML_TOK_TEXT_P_RESTART_NUMBERING, XML_TOK_TEXT_P_START_VALUE, @@ -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/xmlexp.hxx b/xmloff/inc/xmloff/xmlexp.hxx index 0459fcc7b13a..03903f38a331 100644 --- a/xmloff/inc/xmloff/xmlexp.hxx +++ b/xmloff/inc/xmloff/xmlexp.hxx @@ -590,6 +590,12 @@ public: /// name of stream in package, e.g., "content.xml" ::rtl::OUString GetStreamName() const; + // FIXME: this is only for legacy stuff that has not yet been adapted + // to implement XMetadatable; this can write duplicate IDs! + /// add xml:id and legacy namespace id + void SAL_DLLPRIVATE AddAttributeIdLegacy( + sal_uInt16 const nLegacyPrefix, ::rtl::OUString const& rValue); + /// add xml:id attribute (for RDF metadata) void AddAttributeXmlId(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> const & i_xIfc); diff --git a/xmloff/inc/xmloff/xmlimp.hxx b/xmloff/inc/xmloff/xmlimp.hxx index 44e5357ebbdd..871703bf9ed7 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 0b51b0dd97cb..7784bca0474f 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/qa/unoapi/xmloff.sce b/xmloff/qa/unoapi/xmloff.sce index aa61a2449680..c73533f4e4e8 100644 --- a/xmloff/qa/unoapi/xmloff.sce +++ b/xmloff/qa/unoapi/xmloff.sce @@ -1,26 +1,26 @@ --o xmloff.Chart.XMLContentExporter --o xmloff.Chart.XMLContentImporter --o xmloff.Chart.XMLExporter --o xmloff.Chart.XMLImporter --o xmloff.Chart.XMLStylesExporter --o xmloff.Chart.XMLStylesImporter +#111102# -o xmloff.Chart.XMLContentExporter +#111102# -o xmloff.Chart.XMLContentImporter +#111102# -o xmloff.Chart.XMLExporter +#111102# -o xmloff.Chart.XMLImporter +#111102# -o xmloff.Chart.XMLStylesExporter +#111102# -o xmloff.Chart.XMLStylesImporter -o xmloff.Draw.XMLContentExporter -o xmloff.Draw.XMLContentImporter -o xmloff.Draw.XMLExporter -o xmloff.Draw.XMLImporter -o xmloff.Draw.XMLMetaExporter --o xmloff.Draw.XMLMetaImporter --o xmloff.Draw.XMLSettingsExporter --o xmloff.Draw.XMLSettingsImporter +#i111200 -o xmloff.Draw.XMLMetaImporter +#i111287 -o xmloff.Draw.XMLSettingsExporter +#i111287 -o xmloff.Draw.XMLSettingsImporter #i87695 -o xmloff.Draw.XMLStylesExporter -o xmloff.Draw.XMLStylesImporter --o xmloff.Impress.XMLContentExporter +#i111224 -o xmloff.Impress.XMLContentExporter -o xmloff.Impress.XMLContentImporter -o xmloff.Impress.XMLExporter --o xmloff.Impress.XMLImporter +#i111111# -o xmloff.Impress.XMLImporter -o xmloff.Impress.XMLMetaExporter -o xmloff.Impress.XMLMetaImporter --o xmloff.Impress.XMLSettingsExporter --o xmloff.Impress.XMLSettingsImporter +#i111287 -o xmloff.Impress.XMLSettingsExporter +#i111287 -o xmloff.Impress.XMLSettingsImporter #i87695 -o xmloff.Impress.XMLStylesExporter -o xmloff.Impress.XMLStylesImporter diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 9940f99d9f7a..ccc400305044 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -41,9 +41,7 @@ #include <tools/globname.hxx> #include <sot/clsids.hxx> -#ifndef _SVTOOLS_NMSPMAP_HXX #include <xmloff/nmspmap.hxx> -#endif #include "xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> #include <xmloff/families.hxx> @@ -649,7 +647,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 +1087,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() ); @@ -1520,8 +1524,11 @@ void SchXMLExportHelper::exportTable() // to allow a correct re-association when copying via clipboard if( !bHasOwnData && aColumnDescriptions_RangeIter != aColumnDescriptions_RangeEnd ) { - if( (*aColumnDescriptions_RangeIter).getLength()) - mrExport.AddAttribute( XML_NAMESPACE_TEXT, XML_ID, *aColumnDescriptions_RangeIter ); + if ((*aColumnDescriptions_RangeIter).getLength()) + { + mrExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT, + *aColumnDescriptions_RangeIter); + } ++aColumnDescriptions_RangeIter; } exportText( *aIt ); @@ -1553,7 +1560,10 @@ void SchXMLExportHelper::exportTable() // write the original range name as id into the local table // to allow a correct re-association when copying via clipboard if( !bHasOwnData && aRowDescriptions_RangeIter != aRowDescriptions_RangeEnd ) - mrExport.AddAttribute( XML_NAMESPACE_TEXT, XML_ID, *aRowDescriptions_RangeIter++ ); + { + mrExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT, + *aRowDescriptions_RangeIter++); + } exportText( *aRowDescriptionsIter ); ++aRowDescriptionsIter; if( nC < nComplexCount ) @@ -1575,8 +1585,11 @@ void SchXMLExportHelper::exportTable() if( ( !bHasOwnData && aDataRangeIter != aDataRangeEndIter ) && ( mbRowSourceColumns || (aColIt == aRowIt->begin())) ) { - if( (*aDataRangeIter).getLength()) - mrExport.AddAttribute( XML_NAMESPACE_TEXT, XML_ID, *aDataRangeIter ); + if ((*aDataRangeIter).getLength()) + { + mrExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT, + *aDataRangeIter); + } ++aDataRangeIter; } exportText( msString, false ); // do not convert tabs and lfs diff --git a/xmloff/source/chart/SchXMLParagraphContext.cxx b/xmloff/source/chart/SchXMLParagraphContext.cxx index 646d82e4ab79..972bc9016d4f 100644 --- a/xmloff/source/chart/SchXMLParagraphContext.cxx +++ b/xmloff/source/chart/SchXMLParagraphContext.cxx @@ -60,6 +60,7 @@ void SchXMLParagraphContext::StartElement( const uno::Reference< xml::sax::XAttr { sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0; rtl::OUString aValue; + bool bHaveXmlId( false ); for( sal_Int16 i = 0; i < nAttrCount; i++ ) { @@ -67,11 +68,20 @@ void SchXMLParagraphContext::StartElement( const uno::Reference< xml::sax::XAttr rtl::OUString aLocalName; USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); - if( nPrefix == XML_NAMESPACE_TEXT && - IsXMLToken( aLocalName, XML_ID ) ) + if (IsXMLToken(aLocalName, XML_ID)) { - (*mpId) = xAttrList->getValueByIndex( i ); - break; // we only need this attribute + if (nPrefix == XML_NAMESPACE_XML) + { + (*mpId) = xAttrList->getValueByIndex( i ); + bHaveXmlId = true; + } + if (nPrefix == XML_NAMESPACE_TEXT) + { // text:id shall be ignored if xml:id exists + if (!bHaveXmlId) + { + (*mpId) = xAttrList->getValueByIndex( i ); + } + } } } } diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 53a32b9193e5..ec5c4b2130c1 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 91c2bc1b9b4a..86e9693ee225 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 6ba9a49e4502..d82970858ebe 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 f5059f979b63..32fe36197a32 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 35ac3ff72f1b..0b77d8e6d38a 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 6e3129f48d71..593e2d1f29e6 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 4dbf840fd343..611889497812 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 b881f9610fbc..4d663d3218d8 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/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 4c52cc2ce4cb..c10ac0a23c03 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -2535,6 +2535,22 @@ SvtSaveOptions::ODFDefaultVersion SvXMLExport::getDefaultVersion() const } void +SvXMLExport::AddAttributeIdLegacy( + sal_uInt16 const nLegacyPrefix, ::rtl::OUString const& rValue) +{ + switch (getDefaultVersion()) { + case SvtSaveOptions::ODFVER_011: // fall thru + case SvtSaveOptions::ODFVER_010: break; + default: // ODF 1.2: xml:id + AddAttribute(XML_NAMESPACE_XML, XML_ID, rValue); + } + // in ODF 1.1 this was form:id, anim:id, draw:id, or text:id + // backward compatibility: in ODF 1.2 write _both_ id attrs + AddAttribute(nLegacyPrefix, XML_ID, rValue); + // FIXME: this function simply assumes that rValue is unique +} + +void SvXMLExport::AddAttributeXmlId(uno::Reference<uno::XInterface> const & i_xIfc) { // check version >= 1.2 diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 6a7dcf496722..597a1d50b0f9 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 87ce105d456e..000000000000 --- 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 c6d63511cbd6..4eb607e0403b 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/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index 7ebcef8ffde4..eaf83444114c 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.cxx @@ -28,24 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#ifndef _COM_SUN_STAR_ANIMATIONS_XAnimateColor_HPP_ #include <com/sun/star/animations/XAnimateColor.hpp> -#endif -#ifndef _COM_SUN_STAR_ANIMATIONS_XAnimateSet_HPP_ #include <com/sun/star/animations/XAnimateSet.hpp> -#endif #include <com/sun/star/animations/XCommand.hpp> #include <com/sun/star/animations/Timing.hpp> #include <com/sun/star/animations/Event.hpp> -#ifndef _COM_SUN_STAR_ANIMATIONS_XAnimateMotion_HPP_ #include <com/sun/star/animations/XAnimateMotion.hpp> -#endif -#ifndef _COM_SUN_STAR_ANIMATIONS_XAnimateTransform_HPP_ #include <com/sun/star/animations/XAnimateTransform.hpp> -#endif -#ifndef _COM_SUN_STAR_ANIMATIONS_XTransitionFilter_HPP_ #include <com/sun/star/animations/XTransitionFilter.hpp> -#endif #include <com/sun/star/animations/XIterateContainer.hpp> #include <com/sun/star/animations/XAudio.hpp> #include <com/sun/star/animations/AnimationColorSpace.hpp> @@ -64,19 +54,12 @@ #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/presentation/EffectNodeType.hpp> -#ifndef _COM_SUN_STAR_PRESENTATION_EffectPresetClass_HPP_ #include <com/sun/star/presentation/EffectPresetClass.hpp> -#endif -#ifndef _COM_SUN_STAR_PRESENTATION_ParagraphTarget_HPP_ #include <com/sun/star/presentation/ParagraphTarget.hpp> -#endif #include <com/sun/star/presentation/TextAnimationType.hpp> #include <com/sun/star/presentation/ShapeAnimationSubType.hpp> #include <com/sun/star/presentation/EffectCommands.hpp> - -#ifndef _COM_SUN_STAR_DRAWING_XShape_HPP_ #include <com/sun/star/drawing/XShape.hpp> -#endif #include <tools/debug.hxx> #include <tools/time.hxx> @@ -780,7 +763,10 @@ void AnimationsExporterImpl::exportNode( const Reference< XAnimationNode >& xNod const OUString& rExportIdentifier = mrExport.getInterfaceToIdentifierMapper().getIdentifier( xNode ); if( rExportIdentifier.getLength() ) - mrExport.AddAttribute( XML_NAMESPACE_ANIMATION, XML_ID, rExportIdentifier ); + { + mrExport.AddAttributeIdLegacy( + XML_NAMESPACE_ANIMATION, rExportIdentifier); + } Any aTemp( xNode->getBegin() ); if( aTemp.hasValue() ) diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 4fc6bc93302b..17bba5170c79 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -47,18 +47,14 @@ #include <com/sun/star/animations/XAudio.hpp> #include <com/sun/star/animations/ValuePair.hpp> #include <com/sun/star/animations/AnimationColorSpace.hpp> -#ifndef _COM_SUN_STAR_PRESENTATION_EffectPresetClass_HPP_ #include <com/sun/star/presentation/EffectPresetClass.hpp> -#endif #include <com/sun/star/animations/Timing.hpp> #include <com/sun/star/animations/Event.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/xml/sax/XAttributeList.hpp> #include <com/sun/star/text/XTextCursor.hpp> #include <com/sun/star/text/XTextRangeCompare.hpp> -#ifndef _COM_SUN_STAR_PRESENTATION_ParagraphTarget_HPP_ #include <com/sun/star/presentation/ParagraphTarget.hpp> -#endif #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/animations/EventTrigger.hpp> @@ -237,7 +233,8 @@ enum AnimationNodeAttributes ANA_IterateType, ANA_IterateInterval, ANA_Formula, - ANA_ID, + ANA_ANIMID, + ANA_XMLID, ANA_Group_Id, ANA_Command, ANA_Volume @@ -294,8 +291,8 @@ const SvXMLTokenMap& AnimationsImportHelperImpl::getAnimationNodeAttributeTokenM { XML_NAMESPACE_ANIMATION, XML_ITERATE_TYPE, (sal_uInt16)ANA_IterateType }, { XML_NAMESPACE_ANIMATION, XML_ITERATE_INTERVAL, (sal_uInt16)ANA_IterateInterval }, { XML_NAMESPACE_ANIMATION, XML_FORMULA, (sal_uInt16)ANA_Formula }, - { XML_NAMESPACE_ANIMATION, XML_ID, (sal_uInt16)ANA_ID }, - { XML_NAMESPACE_XML, XML_ID, (sal_uInt16)ANA_ID }, + { XML_NAMESPACE_ANIMATION, XML_ID, (sal_uInt16)ANA_ANIMID }, + { XML_NAMESPACE_XML, XML_ID, (sal_uInt16)ANA_XMLID }, { XML_NAMESPACE_PRESENTATION, XML_GROUP_ID, (sal_uInt16)ANA_Group_Id }, { XML_NAMESPACE_ANIMATION, XML_AUDIO_LEVEL, (sal_uInt16)ANA_Volume }, { XML_NAMESPACE_ANIMATION, XML_COMMAND, (sal_uInt16)ANA_Command }, @@ -808,6 +805,8 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< : std::list< NamedValue > aUserData; XMLTokenEnum meAttributeName = XML_TOKEN_INVALID; OUString aFrom, aBy, aTo, aValues; + bool bHaveXmlId( false ); + OUString sXmlId; const sal_Int16 nCount = xAttrList.is() ? xAttrList->getLength() : 0; sal_uInt16 nEnum; @@ -1054,13 +1053,15 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< : } break; - case ANA_ID: + case ANA_ANIMID: { - if( rValue.getLength() ) - { - Reference< XInterface > xRef( mxNode, UNO_QUERY ); - GetImport().getInterfaceToIdentifierMapper().registerReference( rValue, xRef ); - } + if (!bHaveXmlId) { sXmlId = rValue; } + } + break; + case ANA_XMLID: + { + sXmlId = rValue; + bHaveXmlId = true; } break; @@ -1251,6 +1252,13 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< : } } + if (sXmlId.getLength()) + { + Reference< XInterface > const xRef( mxNode, UNO_QUERY ); + GetImport().getInterfaceToIdentifierMapper().registerReference( + sXmlId, xRef ); + } + sal_Int32 nUserDataCount = aUserData.size(); if( nUserDataCount ) { diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index eae1925e4105..9dac5b4cd469 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/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index bc6f72abd2b0..249ce18331d9 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -2011,7 +2011,9 @@ void SdXMLExport::_ExportContent() // write draw:id const OUString aPageId = getInterfaceToIdentifierMapper().getIdentifier( xDrawPage ); if( aPageId.getLength() != 0 ) - AddAttribute ( XML_NAMESPACE_DRAW, XML_ID, aPageId ); + { + AddAttributeIdLegacy(XML_NAMESPACE_DRAW, aPageId); + } // write page SvXMLElementExport aDPG(*this, XML_NAMESPACE_DRAW, XML_PAGE, sal_True, sal_True); diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 8ec97697b138..76942cf817db 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -665,8 +665,8 @@ const SvXMLTokenMap& SdXMLImport::GetDrawPageAttrTokenMap() { XML_NAMESPACE_DRAW, XML_STYLE_NAME, XML_TOK_DRAWPAGE_STYLE_NAME }, { XML_NAMESPACE_DRAW, XML_MASTER_PAGE_NAME, XML_TOK_DRAWPAGE_MASTER_PAGE_NAME }, { XML_NAMESPACE_PRESENTATION, XML_PRESENTATION_PAGE_LAYOUT_NAME, XML_TOK_DRAWPAGE_PAGE_LAYOUT_NAME }, - { XML_NAMESPACE_DRAW, XML_ID, XML_TOK_DRAWPAGE_ID }, - { XML_NAMESPACE_XML, XML_ID, XML_TOK_DRAWPAGE_ID }, + { XML_NAMESPACE_DRAW, XML_ID, XML_TOK_DRAWPAGE_DRAWID }, + { XML_NAMESPACE_XML, XML_ID, XML_TOK_DRAWPAGE_XMLID }, { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_DRAWPAGE_HREF }, { XML_NAMESPACE_PRESENTATION, XML_USE_HEADER_NAME, XML_TOK_DRAWPAGE_USE_HEADER_NAME }, { XML_NAMESPACE_PRESENTATION, XML_USE_FOOTER_NAME, XML_TOK_DRAWPAGE_USE_FOOTER_NAME }, diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx index 1c0b883c9b59..d1cd0df80563 100644 --- a/xmloff/source/draw/sdxmlimp_impl.hxx +++ b/xmloff/source/draw/sdxmlimp_impl.hxx @@ -130,7 +130,8 @@ enum SdXMLDrawPageAttrTokenMap XML_TOK_DRAWPAGE_STYLE_NAME, XML_TOK_DRAWPAGE_MASTER_PAGE_NAME, XML_TOK_DRAWPAGE_PAGE_LAYOUT_NAME, - XML_TOK_DRAWPAGE_ID, + XML_TOK_DRAWPAGE_DRAWID, + XML_TOK_DRAWPAGE_XMLID, XML_TOK_DRAWPAGE_HREF, XML_TOK_DRAWPAGE_USE_HEADER_NAME, XML_TOK_DRAWPAGE_USE_FOOTER_NAME, diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 709677c6ae07..c4f398524a2f 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> @@ -43,9 +47,7 @@ #include <xmloff/xmluconv.hxx> #include "PropertySetMerger.hxx" -#ifndef _XMLOFF_SHAPEEXPORT_HXX #include <xmloff/shapeexport.hxx> -#endif #include "sdpropls.hxx" #include "sdxmlexp_impl.hxx" #include <xmloff/families.hxx> @@ -75,6 +77,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 +542,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; @@ -639,7 +675,9 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape uno::Reference< uno::XInterface > xRef( xShape, uno::UNO_QUERY ); const OUString& rShapeId = mrExport.getInterfaceToIdentifierMapper().getIdentifier( xRef ); if( rShapeId.getLength() ) - mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_ID, rShapeId ); + { + mrExport.AddAttributeIdLegacy(XML_NAMESPACE_DRAW, rShapeId); + } } // -------------------------- @@ -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/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx index 9b5290254b46..af5fef0ff9dc 100644 --- a/xmloff/source/draw/ximpbody.cxx +++ b/xmloff/source/draw/ximpbody.cxx @@ -62,6 +62,9 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, : SdXMLGenericPageContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ) , mbHadSMILNodes( false ) { + bool bHaveXmlId( false ); + OUString sXmlId; + sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for(sal_Int16 i=0; i < nAttrCount; i++) @@ -109,13 +112,17 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, maUseDateTimeDeclName = sValue; break; } - - case XML_TOK_DRAWPAGE_ID: + case XML_TOK_DRAWPAGE_DRAWID: { - uno::Reference< uno::XInterface > xRef( rShapes.get() ); - GetImport().getInterfaceToIdentifierMapper().registerReference( sValue, xRef ); - break; + if (!bHaveXmlId) { sXmlId = sValue; } } + break; + case XML_TOK_DRAWPAGE_XMLID: + { + sXmlId = sValue; + bHaveXmlId = true; + } + break; case XML_TOK_DRAWPAGE_HREF: { maHREF = sValue; @@ -124,6 +131,12 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, } } + if (sXmlId.getLength()) + { + uno::Reference< uno::XInterface > const xRef( rShapes.get() ); + GetImport().getInterfaceToIdentifierMapper().registerReference( + sXmlId, xRef ); + } GetImport().GetShapeImport()->startPage( rShapes ); uno::Reference< drawing::XDrawPage > xShapeDrawPage(rShapes, uno::UNO_QUERY); diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index f4e7c1466ecd..dc362136a3fe 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 ); + + 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[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; + aProperties[1].Name = sClickAction; + aProperties[1].Handle = -1; + aProperties[1].Value <<= ::com::sun::star::presentation::ClickAction_DOCUMENT; + aProperties[1].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[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 ) ); + 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() ) @@ -761,6 +776,7 @@ void SdXMLShapeContext::SetThumbnail() // this is called from the parent group for each unparsed attribute in the attribute list void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ) { + bool bHaveXmlId( false ); if( XML_NAMESPACE_DRAW == nPrefix ) { if( IsXMLToken( rLocalName, XML_ZINDEX ) ) @@ -769,7 +785,7 @@ void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUStr } else if( IsXMLToken( rLocalName, XML_ID ) ) { - maShapeId = rValue; + if (!bHaveXmlId) { maShapeId = rValue; }; } else if( IsXMLToken( rLocalName, XML_NAME ) ) { @@ -862,6 +878,7 @@ void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUStr if( IsXMLToken( rLocalName, XML_ID ) ) { maShapeId = rValue; + bHaveXmlId = true; } } } @@ -3668,7 +3685,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/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 9baf402e5ea7..88abf8ad988a 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -313,10 +313,8 @@ namespace xmloff if (CCA_CONTROL_ID & m_nIncludeCommon) { OSL_ENSURE(m_sControlId.getLength(), "OControlExport::exportInnerAttributes: have no control id for the control!"); - AddAttribute( - OAttributeMetaData::getCommonControlAttributeNamespace(CCA_CONTROL_ID), - OAttributeMetaData::getCommonControlAttributeName(CCA_CONTROL_ID), - m_sControlId); + m_rContext.getGlobalContext().AddAttributeIdLegacy( + XML_NAMESPACE_FORM, m_sControlId); #if OSL_DEBUG_LEVEL > 0 // reset the bit for later checking m_nIncludeCommon = m_nIncludeCommon & ~CCA_CONTROL_ID; @@ -693,7 +691,7 @@ namespace xmloff if (m_nIncludeCommon & CCA_TARGET_LOCATION) { - exportTargetLocationAttribute(); + exportTargetLocationAttribute(false); #if OSL_DEBUG_LEVEL > 0 // reset the bit for later checking m_nIncludeCommon = m_nIncludeCommon & ~CCA_TARGET_LOCATION; @@ -2035,6 +2033,12 @@ namespace xmloff OAttributeMetaData::getFormAttributeNamespace(eStringPropertyIds[i]), OAttributeMetaData::getFormAttributeName(eStringPropertyIds[i]), aStringPropertyNames[i]); + + // Since as per ODF 1.2, xlink:href and xlink:type need to exist either both or none, + // we need to write xlink:type, too, even if it carries no information. + // #i111035# / 2010-04-141/ frank.schoenheit@sun.com + AddAttributeASCII( XML_NAMESPACE_XLINK, "type", "simple" ); + // now export the data source name or databaselocation or connection resource ::rtl::OUString sPropValue; m_xProps->getPropertyValue( PROPERTY_DATASOURCENAME ) >>= sPropValue; @@ -2134,7 +2138,7 @@ namespace xmloff // the target frame exportTargetFrameAttribute(); // the target URL - exportTargetLocationAttribute(); + exportTargetLocationAttribute(true); // #i110911# add type attribute (for form, but not for control) // master fields exportStringSequenceAttribute( diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index a39576bd2184..b946c4a20941 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -586,12 +586,21 @@ namespace xmloff //--------------------------------------------------------------------- void OControlImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { - static const sal_Char* pControlIdAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCA_CONTROL_ID); static const sal_Char* pLinkedCellAttributeName = OAttributeMetaData::getBindingAttributeName(BA_LINKED_CELL); - if ( !m_sControlId.getLength() && _rLocalName.equalsAscii( pControlIdAttributeName ) ) + if (IsXMLToken(_rLocalName, XML_ID)) { // it's the control id - m_sControlId = _rValue; + if (XML_NAMESPACE_XML == _nNamespaceKey) + { + m_sControlId = _rValue; + } + else if (XML_NAMESPACE_FORM == _nNamespaceKey) + { + if (!m_sControlId.getLength()) + { + m_sControlId = _rValue; + } + } } else if ( _rLocalName.equalsAscii( pLinkedCellAttributeName ) ) { // it's the address of a spreadsheet cell diff --git a/xmloff/source/forms/formattributes.cxx b/xmloff/source/forms/formattributes.cxx index fbe388a6a81a..0e2ef69ab9f8 100644 --- a/xmloff/source/forms/formattributes.cxx +++ b/xmloff/source/forms/formattributes.cxx @@ -53,7 +53,7 @@ namespace xmloff case CCA_NAME: return "name"; case CCA_SERVICE_NAME: return "control-implementation"; case CCA_BUTTON_TYPE: return "button-type"; - case CCA_CONTROL_ID: return "id"; +// disabled(AddAttributeIdLegacy) case CCA_CONTROL_ID: return "id"; case CCA_CURRENT_SELECTED: return "current-selected"; case CCA_CURRENT_VALUE: return "current-value"; case CCA_DISABLED: return "disabled"; diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index 1586c9a7a439..2a485566cf9d 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -420,7 +420,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void OPropertyExport::exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty) + void OPropertyExport::exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType) { DBG_CHECK_PROPERTY( _sPropertyName, ::rtl::OUString ); @@ -433,6 +433,10 @@ namespace xmloff ,OAttributeMetaData::getCommonControlAttributeName(_nProperty) , sTargetLocation); + // #i110911# add xlink:type="simple" if required + if (_bAddType) + AddAttribute(XML_NAMESPACE_XLINK, token::XML_TYPE, token::XML_SIMPLE); + exportedProperty(_sPropertyName); } //--------------------------------------------------------------------- diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx index 5e1f683e339d..ab17912e4df4 100644 --- a/xmloff/source/forms/propertyexport.hxx +++ b/xmloff/source/forms/propertyexport.hxx @@ -69,7 +69,7 @@ namespace xmloff StringSet m_aRemainingProps; // see examinePersistence - void exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty); + void exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType); protected: IFormsExportContext& m_rContext; @@ -230,8 +230,10 @@ namespace xmloff <p>The value of this attribute is extracted from the TargetURL property of the object given.</p> <p>The property needs a special handling because the URL's need to be made relative</p> + + <p>If _bAddType is set, an additional xlink:type="simple" attribute is also added.</p> */ - inline void exportTargetLocationAttribute() { exportRelativeTargetLocation(PROPERTY_TARGETURL,CCA_TARGET_LOCATION); } + inline void exportTargetLocationAttribute(bool _bAddType) { exportRelativeTargetLocation(PROPERTY_TARGETURL,CCA_TARGET_LOCATION,_bAddType); } /** add the form:image attribute to the export context. @@ -239,7 +241,7 @@ namespace xmloff <p>The property needs a special handling because the URL's need to be made relative</p> */ - inline void exportImageDataAttribute() { exportRelativeTargetLocation(PROPERTY_IMAGEURL,CCA_IMAGE_DATA); } + inline void exportImageDataAttribute() { exportRelativeTargetLocation(PROPERTY_IMAGEURL,CCA_IMAGE_DATA,false); } /** flag the style properties as 'already exported' diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 597798f01ce7..45fa2f5b4744 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -363,7 +363,7 @@ void OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl implPushBackPropertyValue( aNewValue ); } #if OSL_DEBUG_LEVEL > 0 - else + else if (!token::IsXMLToken(_rLocalName, token::XML_TYPE)) // xlink:type is valid but ignored for <form:form> { ::rtl::OString sMessage( "OPropertyImport::handleAttribute: Can't handle the following:\n" ); sMessage += ::rtl::OString( " Attribute name: " ); diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx index 8aa0a4054821..aab4686339ba 100644 --- a/xmloff/source/meta/xmlmetae.cxx +++ b/xmloff/source/meta/xmlmetae.cxx @@ -475,7 +475,9 @@ SvXMLMetaExport::startElement(const ::rtl::OUString & i_rName, } // finally, start the element - mrExport.StartElement(i_rName, sal_True); //FIXME:whitespace? + // #i107240# no whitespace here, because the DOM may already contain + // whitespace, which is not cleared when loading and thus accumulates. + mrExport.StartElement(i_rName, (m_level > 1) ? sal_False : sal_True); ++m_level; } diff --git a/xmloff/source/script/XMLScriptExportHandler.cxx b/xmloff/source/script/XMLScriptExportHandler.cxx index 724b6b0d2337..e04467d1e491 100644 --- a/xmloff/source/script/XMLScriptExportHandler.cxx +++ b/xmloff/source/script/XMLScriptExportHandler.cxx @@ -75,6 +75,9 @@ void XMLScriptExportHandler::Export( OUString sTmp; rValues[i].Value >>= sTmp; rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, sTmp); + + // #i110911# xlink:type="simple" is required + rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE); } // else: disregard } diff --git a/xmloff/source/style/WordWrapPropertyHdl.cxx b/xmloff/source/style/WordWrapPropertyHdl.cxx index 86792847b2c3..f3717b95c9cd 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 35b5c166a991..f90e3346c1ba 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/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index 68f77790ac49..dcc81ccf9f89 100644 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -27,18 +27,19 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" + #include <tools/debug.hxx> #include <svl/cntnrsrt.hxx> #include <tools/fontenum.hxx> + #include "xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> #include <xmloff/xmluconv.hxx> -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include "fonthdl.hxx" -#endif #include <xmloff/xmlexp.hxx> #include <xmloff/XMLFontAutoStylePool.hxx> + using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx index 37b8aa2196f3..49dd6ddac91e 100644 --- a/xmloff/source/style/XMLFontStylesContext.cxx +++ b/xmloff/source/style/XMLFontStylesContext.cxx @@ -28,25 +28,20 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#ifndef _COM_SUN_STAR_AWT_FONTFAMILY_HPP #include <com/sun/star/awt/FontFamily.hpp> -#endif -#ifndef _COM_SUN_STAR_AWT_FONTPITCH_HPP #include <com/sun/star/awt/FontPitch.hpp> -#endif + +#include <rtl/logfile.hxx> + #include <xmloff/nmspmap.hxx> #include "xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include "fonthdl.hxx" -#endif #include <xmloff/xmlimp.hxx> #include <xmloff/maptype.hxx> - -#ifndef _XMLOFF_XMLFONTSTYLESCONTEXT_HXX #include <xmloff/XMLFontStylesContext.hxx> -#endif -#include <rtl/logfile.hxx> + + using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/XMLRectangleMembersHandler.cxx b/xmloff/source/style/XMLRectangleMembersHandler.cxx index 07334f2137db..acd53e2dfd4e 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 7e7ceb961c36..027bebdb8075 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 476a9a0a97e9..df02a6504bac 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 cddf587184b6..5611bbd1f472 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 0ebe3af8a385..d95cd2e5e91a 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 f314a2b813f0..c5f764cf9ac4 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 a3076ca4c864..1a70696583d2 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 b1b0a01d93f8..06778d67576f 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 023153eda552..0a29de364bce 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 337ff5cdbb60..548f867d6606 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 04e0b36609cd..89ad6e9db8b8 100644 --- a/xmloff/source/style/fonthdl.cxx +++ b/xmloff/source/style/fonthdl.cxx @@ -28,18 +28,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include <fonthdl.hxx> -#endif #include <xmloff/xmltoken.hxx> #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> #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/fonthdl.hxx b/xmloff/source/style/fonthdl.hxx index 49d027579af3..18ddae73af14 100644 --- a/xmloff/source/style/fonthdl.hxx +++ b/xmloff/source/style/fonthdl.hxx @@ -25,8 +25,8 @@ * ************************************************************************/ -#ifndef _XMLOFF_PROPERTYHANDLER_FONTYPES_HXX -#define _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX +#ifndef XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX +#define XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include <xmloff/xmlprhdl.hxx> @@ -79,4 +79,4 @@ public: }; -#endif // _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX +#endif // XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX diff --git a/xmloff/source/style/lspachdl.cxx b/xmloff/source/style/lspachdl.cxx index dd47749d205b..6ea6221a0b27 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 28cda4eba8b6..b0885b539d4b 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/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx index af5448040896..27af64469daf 100644 --- a/xmloff/source/style/prhdlfac.cxx +++ b/xmloff/source/style/prhdlfac.cxx @@ -27,10 +27,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" + #include <com/sun/star/drawing/ColorMode.hpp> #include <com/sun/star/text/HorizontalAdjust.hpp> #include <com/sun/star/text/WritingMode2.hpp> + #include <tools/debug.hxx> + #include <xmloff/prhdlfac.hxx> #include <xmloff/xmltypes.hxx> #include <xmloff/xmltoken.hxx> @@ -39,9 +42,7 @@ #include <xmloff/XMLConstantsPropertyHandler.hxx> #include "cdouthdl.hxx" #include "csmaphdl.hxx" -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include "fonthdl.hxx" -#endif #include "kernihdl.hxx" #include <postuhdl.hxx> #include "shadwhdl.hxx" diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index 5292b92d4128..cb666d899fb7 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 bbe9eea647b3..226ae3207e50 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 e81e73cf90b2..812071ff1b03 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/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index 681fff7ea229..5bc581c7af0b 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -27,15 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include <rtl/ustrbuf.hxx> -#include <tools/debug.hxx> -#include <xmloff/nmspmap.hxx> -#include "xmlnmspe.hxx" -#include <xmloff/xmltoken.hxx> -#include <xmloff/xmluconv.hxx> -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX -#include "fonthdl.hxx" -#endif + #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> #include <com/sun/star/style/NumberingType.hpp> #include <com/sun/star/style/XStyle.hpp> @@ -52,11 +44,22 @@ // <-- #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> + +#include <rtl/ustrbuf.hxx> + +#include <tools/debug.hxx> + +#include <xmloff/nmspmap.hxx> +#include "xmlnmspe.hxx" +#include <xmloff/xmltoken.hxx> +#include <xmloff/xmluconv.hxx> +#include "fonthdl.hxx" #include "XMLTextListAutoStylePool.hxx" #include <xmloff/xmlnume.hxx> #include <xmloff/xmlexp.hxx> #include <tools/fontenum.hxx> + using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -294,9 +297,12 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel, OUStringBuffer sTmp; sTmp.append( nLevel + 1 ); GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_LEVEL, sTmp.makeStringAndClear() ); - if( sTextStyleName.getLength() > 0 ) + // #i110694#: no style-name on list-level-style-image + if ((sTextStyleName.getLength() > 0) && (NumberingType::BITMAP != eType)) + { GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME, GetExport().EncodeStyleName( sTextStyleName ) ); + } if( sPrefix.getLength() > 0 ) GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_PREFIX, sPrefix ); if( sSuffix.getLength() > 0 ) diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index d223ba19db05..a192baa2216b 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/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index d64c22be0179..7306c7d5f0de 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -27,16 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include <rtl/ustrbuf.hxx> -#include <tools/urlobj.hxx> -#include <tools/debug.hxx> -#include <tools/fontenum.hxx> -#include <xmloff/xmltkmap.hxx> -#include <xmloff/nmspmap.hxx> -#include "xmlnmspe.hxx" -#include <xmloff/xmlimp.hxx> -#include <xmloff/XMLBase64ImportContext.hxx> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/awt/Size.hpp> @@ -51,26 +42,33 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/style/XStyle.hpp> #include <com/sun/star/io/XOutputStream.hpp> + +#include <rtl/ustrbuf.hxx> + +#include <tools/urlobj.hxx> +#include <tools/debug.hxx> +#include <tools/fontenum.hxx> + +#include <xmloff/xmltkmap.hxx> +#include <xmloff/nmspmap.hxx> +#include "xmlnmspe.hxx" +#include <xmloff/xmlimp.hxx> +#include <xmloff/XMLBase64ImportContext.hxx> #include <xmloff/xmltoken.hxx> #include "i18nmap.hxx" #include <xmloff/xmluconv.hxx> -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include "fonthdl.hxx" -#endif -#ifndef _XMLOFF_XMLFONTSTYLESCONTEXT_HXX #include <xmloff/XMLFontStylesContext.hxx> -#endif -#ifndef _XMLOFF_FAMILIES_HXX #include <xmloff/families.hxx> -#endif #include <xmloff/maptype.hxx> - #include <xmloff/xmlnumi.hxx> #define _SVSTDARR_USHORTS #include <svl/svstdarr.hxx> + + using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/text/XMLChangedRegionImportContext.cxx b/xmloff/source/text/XMLChangedRegionImportContext.cxx index 7e46c66442f4..52e4ccc8e048 100644 --- a/xmloff/source/text/XMLChangedRegionImportContext.cxx +++ b/xmloff/source/text/XMLChangedRegionImportContext.cxx @@ -68,6 +68,7 @@ void XMLChangedRegionImportContext::StartElement( const Reference<XAttributeList> & xAttrList) { // process attributes: id + bool bHaveXmlId( false ); sal_Int16 nLength = xAttrList->getLength(); for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++) { @@ -77,11 +78,19 @@ void XMLChangedRegionImportContext::StartElement( &sLocalName ); const OUString sValue = xAttrList->getValueByIndex(nAttr); - if ( XML_NAMESPACE_TEXT == nPrefix ) + if (XML_NAMESPACE_XML == nPrefix) { - if( IsXMLToken( sLocalName, XML_ID ) ) + if (IsXMLToken(sLocalName, XML_ID)) { sID = sValue; + bHaveXmlId = true; + } + } + else if (XML_NAMESPACE_TEXT == nPrefix) + { + if (IsXMLToken(sLocalName, XML_ID)) + { + if (!bHaveXmlId) { sID = sValue; } } else if( IsXMLToken( sLocalName, XML_MERGE_LAST_PARAGRAPH ) ) { diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index daf0703803d7..ad9f7ce10d7a 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 accaca5a3c53..66f045a5467d 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 45c5f63c6ec7..364096ad8185 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/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx index d4ab361f1688..67970330f3ef 100644 --- a/xmloff/source/text/XMLRedlineExport.cxx +++ b/xmloff/source/text/XMLRedlineExport.cxx @@ -374,7 +374,7 @@ void XMLRedlineExport::ExportChangedRegion( const Reference<XPropertySet> & rPropSet) { // Redline-ID - rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_ID, GetRedlineID(rPropSet) ); + rExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT, GetRedlineID(rPropSet)); // merge-last-paragraph Any aAny = rPropSet->getPropertyValue(sMergeLastPara); diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index 2129c54ad874..0a0437426a3c 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 f31ce783565f..4b9b94b1ced7 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 c15bb1a64055..accaa49d5ea4 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 fdf1da1c9aff..fd2cb58b257f 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 2f26f15c7c5c..b9a6dc1915e5 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 91fe01dfcc3a..af51f5f56d98 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 335276a6865d..579ad91ddfe9 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 cd09ba7f646f..bc01112d9b03 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; @@ -333,11 +343,11 @@ static __FAR_DATA SvXMLTokenMapEntry aTextPAttrTokenMap[] = { XML_NAMESPACE_XHTML, XML_PROPERTY, XML_TOK_TEXT_P_PROPERTY }, { XML_NAMESPACE_XHTML, XML_CONTENT, XML_TOK_TEXT_P_CONTENT }, { XML_NAMESPACE_XHTML, XML_DATATYPE, XML_TOK_TEXT_P_DATATYPE }, + { XML_NAMESPACE_TEXT, XML_ID, XML_TOK_TEXT_P_TEXTID }, { XML_NAMESPACE_TEXT, XML_STYLE_NAME, XML_TOK_TEXT_P_STYLE_NAME }, { XML_NAMESPACE_TEXT, XML_COND_STYLE_NAME, XML_TOK_TEXT_P_COND_STYLE_NAME }, { XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL,XML_TOK_TEXT_P_LEVEL }, - { XML_NAMESPACE_TEXT, XML_ID, XML_TOK_TEXT_P_ID }, { XML_NAMESPACE_TEXT, XML_IS_LIST_HEADER,XML_TOK_TEXT_P_IS_LIST_HEADER }, { XML_NAMESPACE_TEXT, XML_RESTART_NUMBERING,XML_TOK_TEXT_P_RESTART_NUMBERING }, { XML_NAMESPACE_TEXT, XML_START_VALUE,XML_TOK_TEXT_P_START_VALUE }, @@ -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 24c09bde6e7f..ab90e2ae4000 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 f1cf89cb0640..140656fd4298 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> @@ -1999,7 +1998,18 @@ void XMLTextParagraphExport::exportParagraph( { const OUString& rIdentifier = GetExport().getInterfaceToIdentifierMapper().getIdentifier( xRef ); if( rIdentifier.getLength() ) - GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_ID, rIdentifier ); + { + // FIXME: this is just temporary until EditEngine + // paragraphs implement XMetadatable. + // then that must be used and not the mapper, because + // when both can be used we get two xml:id! + uno::Reference<rdf::XMetadatable> const xMeta(xRef, + uno::UNO_QUERY); + OSL_ENSURE(!xMeta.is(), "paragraph that implements " + "XMetadatable used in interfaceToIdentifierMapper?"); + GetExport().AddAttributeIdLegacy(XML_NAMESPACE_TEXT, + rIdentifier); + } } OUString sAutoStyle( sStyle ); diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index d1d7273ddd46..566c94ed166a 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -1917,6 +1917,7 @@ XMLParaContext::XMLParaContext( const SvXMLTokenMap& rTokenMap = GetImport().GetTextImport()->GetTextPAttrTokenMap(); + bool bHaveXmlId( false ); OUString aCondStyleName, sClassNames; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -1933,6 +1934,7 @@ XMLParaContext::XMLParaContext( { case XML_TOK_TEXT_P_XMLID: m_sXmlId = rValue; + bHaveXmlId = true; break; case XML_TOK_TEXT_P_ABOUT: m_sAbout = rValue; @@ -1947,6 +1949,9 @@ XMLParaContext::XMLParaContext( case XML_TOK_TEXT_P_DATATYPE: m_sDatatype = rValue; break; + case XML_TOK_TEXT_P_TEXTID: + if (!bHaveXmlId) { m_sXmlId = rValue; } + break; case XML_TOK_TEXT_P_STYLE_NAME: sStyleName = rValue; break; @@ -1979,9 +1984,6 @@ XMLParaContext::XMLParaContext( } } break; - case XML_TOK_TEXT_P_ID: - sId = rValue; - break; case XML_TOK_TEXT_P_RESTART_NUMBERING: { sal_Bool bBool; @@ -2020,14 +2022,17 @@ XMLParaContext::~XMLParaContext() // if we have an id set for this paragraph, get a cursor for this // paragraph and register it with the given identifier - if( sId.getLength() ) + // FIXME: this is just temporary, and should be removed when + // EditEngine paragraphs implement XMetadatable! + if (m_sXmlId.getLength()) { Reference < XTextCursor > xIdCursor( xTxtImport->GetText()->createTextCursorByRange( xStart ) ); if( xIdCursor.is() ) { xIdCursor->gotoRange( xEnd, sal_True ); Reference< XInterface > xRef( xIdCursor, UNO_QUERY ); - GetImport().getInterfaceToIdentifierMapper().registerReference( sId, xRef ); + GetImport().getInterfaceToIdentifierMapper().registerReference( + m_sXmlId, xRef); } } @@ -2067,7 +2072,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/source/text/txtparai.hxx b/xmloff/source/text/txtparai.hxx index 9c911a5b639c..ecd593ca3d4f 100644 --- a/xmloff/source/text/txtparai.hxx +++ b/xmloff/source/text/txtparai.hxx @@ -46,7 +46,6 @@ class XMLParaContext : public SvXMLImportContext ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextRange > xStart; // xub_StrLen nStart; ::rtl::OUString sStyleName; - ::rtl::OUString sId; ::rtl::OUString m_sXmlId; ::rtl::OUString m_sAbout; ::rtl::OUString m_sProperty; diff --git a/xmloff/util/makefile.mk b/xmloff/util/makefile.mk index a7060d79504c..b8745b6b8fff 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) diff --git a/xmlscript/source/xmldlg_imexp/exp_share.hxx b/xmlscript/source/xmldlg_imexp/exp_share.hxx index d32d46698003..a53d02393ae6 100644 --- a/xmlscript/source/xmldlg_imexp/exp_share.hxx +++ b/xmlscript/source/xmldlg_imexp/exp_share.hxx @@ -117,7 +117,7 @@ public: inline bool readProp( T * ret, ::rtl::OUString const & rPropName ); css::uno::Any readProp( ::rtl::OUString const & rPropName ); // - void readDefaults( bool supportPrintable = true ); + void readDefaults( bool supportPrintable = true, bool supportVisible = true ); // void readStringAttr( ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName ); diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx index 55b46edc1392..b30c24b4b419 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx @@ -1138,7 +1138,7 @@ void ElementDescriptor::readDialogModel( StyleBag * all_styles ) } // collect elements - readDefaults( false ); + readDefaults( false, false ); readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Closeable") ), OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":closeable") ) ); diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx index 088d6e841c94..365355375808 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx @@ -972,7 +972,7 @@ void ElementDescriptor::readSelectionTypeAttr( OUString const & rPropName, OUStr } } //__________________________________________________________________________________________________ -void ElementDescriptor::readDefaults( bool supportPrintable ) +void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible ) { Any a( _xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ) ) ); addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), @@ -995,7 +995,7 @@ void ElementDescriptor::readDefaults( bool supportPrintable ) } sal_Bool bVisible = sal_True; - try + if (supportVisible) try { if (_xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("EnableVisible") ) ) >>= bVisible) { |