From 264c9ed93f3d338f6aee84310135569710705783 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Thu, 26 May 2011 11:04:53 +0200 Subject: remove broken VclStringResourceLoader, add ResourceStringIndexAccess * remove com.sun.star.resource.VclStringResourceLoader, it is broken beyond repair * implement org.libreoffice.resource.ResourceStringIndexAccess * same functionality, better interface * migrate libresXXXX to comphelper/servicedecl.hxx component registration --- .../source/resource/ResourceStringIndexAccess.cxx | 94 ++++ .../source/resource/ResourceStringIndexAccess.hxx | 71 +++ extensions/source/resource/makefile.mk | 8 +- extensions/source/resource/oooresourceloader.cxx | 169 +------- extensions/source/resource/oooresourceloader.hxx | 87 ++++ extensions/source/resource/res.component | 6 +- extensions/source/resource/res_services.cxx | 89 ---- extensions/source/resource/res_services.hxx | 67 --- extensions/source/resource/resource.cxx | 476 --------------------- extensions/source/resource/resourceservices.cxx | 58 +++ 10 files changed, 327 insertions(+), 798 deletions(-) create mode 100644 extensions/source/resource/ResourceStringIndexAccess.cxx create mode 100644 extensions/source/resource/ResourceStringIndexAccess.hxx create mode 100644 extensions/source/resource/oooresourceloader.hxx delete mode 100644 extensions/source/resource/res_services.cxx delete mode 100644 extensions/source/resource/res_services.hxx delete mode 100644 extensions/source/resource/resource.cxx create mode 100644 extensions/source/resource/resourceservices.cxx diff --git a/extensions/source/resource/ResourceStringIndexAccess.cxx b/extensions/source/resource/ResourceStringIndexAccess.cxx new file mode 100644 index 000000000..d48d636bf --- /dev/null +++ b/extensions/source/resource/ResourceStringIndexAccess.cxx @@ -0,0 +1,94 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Initial Developer of the Original Code is + * Bjoern Michaelsen + * Portions created by the Initial Developer are Copyright (C) 2010 the + * Initial Developer. All Rights Reserved. + * + * Major Contributor(s): + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include + +#include +#include +#include +#include +#include + +using namespace ::extensions::resource; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::lang; + +using ::rtl::OUString; +using ::rtl::OString; +using ::rtl::OUStringToOString; + +namespace +{ + static ::std::auto_ptr GetResMgr(Sequence const& rArgs) + { + if(rArgs.getLength()!=1) + return ::std::auto_ptr(); + OUString sFilename; + rArgs[0] >>= sFilename; + SolarMutexGuard aGuard; + const OString sEncName(OUStringToOString(sFilename, osl_getThreadTextEncoding())); + return ::std::auto_ptr(ResMgr::CreateResMgr(sEncName)); + } +} + + +ResourceStringIndexAccess::ResourceStringIndexAccess(Sequence const& rArgs, Reference const&) + : m_pResMgr(GetResMgr(rArgs)) +{}; + +Reference initResourceStringIndexAccess(ResourceStringIndexAccess* pResourceStringIndexAccess) +{ + Reference xResult(static_cast(pResourceStringIndexAccess)); + if(!pResourceStringIndexAccess->hasElements()) + // xResult does not help the client to analyse the problem + // and will crash on getByIndex calls, better just give back an empty Reference + // so that such ResourceStringIndexAccess instances are never release into the wild + throw RuntimeException( + OUString(RTL_CONSTASCII_USTRINGPARAM("ressource manager could not get initialized")), + /* xResult */ Reference()); + return xResult; +} + +Any SAL_CALL ResourceStringIndexAccess::getByIndex(sal_Int32 nIdx) + throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException) +{ + if(nIdx > SAL_MAX_UINT16 || nIdx < 0) + throw IndexOutOfBoundsException(); + SolarMutexGuard aGuard; + const ResId aId(static_cast(nIdx), *m_pResMgr); + aId.SetRT(RSC_STRING); + if(!m_pResMgr->IsAvailable(aId)) + throw RuntimeException( + OUString(RTL_CONSTASCII_USTRINGPARAM("string ressource for id not available")), + Reference()); + return makeAny(OUString(String(aId))); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/resource/ResourceStringIndexAccess.hxx b/extensions/source/resource/ResourceStringIndexAccess.hxx new file mode 100644 index 000000000..e1a01e3a5 --- /dev/null +++ b/extensions/source/resource/ResourceStringIndexAccess.hxx @@ -0,0 +1,71 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Initial Developer of the Original Code is + * Bjoern Michaelsen + * Portions created by the Initial Developer are Copyright (C) 2010 the + * Initial Developer. All Rights Reserved. + * + * Major Contributor(s): + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#ifndef EXTENSIONS_RESOURCE_RESOURCESTRINGINDEXACCESS_HXX +#define EXTENSIONS_RESOURCE_RESOURCESTRINGINDEXACCESS_HXX + +#include "precompiled_extensions.hxx" + +#include +#include +#include +#include +#include +#include + +class ResMgr; + +namespace extensions { namespace resource +{ + class ResourceStringIndexAccess : public cppu::WeakImplHelper1< ::com::sun::star::container::XIndexAccess> + { + public: + ResourceStringIndexAccess(::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> const& rArgs, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> const&); + // XIndexAccess + virtual ::sal_Int32 SAL_CALL getCount( ) throw (::com::sun::star::uno::RuntimeException) + { return m_pResMgr.get() ? SAL_MAX_UINT16 : 0; }; + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException) + { return ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)); }; + virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException) + { return static_cast(m_pResMgr.get()); }; + + private: + // m_pResMgr should never be NULL, see initResourceStringIndexAccess + const ::std::auto_ptr m_pResMgr; + }; + +}} + +::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> initResourceStringIndexAccess(::extensions::resource::ResourceStringIndexAccess*); + +#endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/resource/makefile.mk b/extensions/source/resource/makefile.mk index adeec5fd0..d9143d2d3 100644 --- a/extensions/source/resource/makefile.mk +++ b/extensions/source/resource/makefile.mk @@ -39,9 +39,10 @@ ENABLE_EXCEPTIONS=TRUE # --- Files -------------------------------------------------------- -SLOFILES= $(SLO)$/resource.obj \ - $(SLO)$/oooresourceloader.obj \ - $(SLO)$/res_services.obj +SLOFILES= \ + $(SLO)$/ResourceStringIndexAccess.obj \ + $(SLO)$/oooresourceloader.obj \ + $(SLO)$/resourceservices.obj LIB1TARGET= $(SLB)$/$(TARGET).lib LIB1OBJFILES= $(SLOFILES) @@ -49,6 +50,7 @@ LIB1OBJFILES= $(SLOFILES) SHL1TARGET= $(TARGET)$(DLLPOSTFIX) SHL1STDLIBS= \ + $(COMPHELPERLIB) \ $(CPPULIB) \ $(CPPUHELPERLIB) \ $(SALLIB) \ diff --git a/extensions/source/resource/oooresourceloader.cxx b/extensions/source/resource/oooresourceloader.cxx index bfe299bfd..9488c658e 100644 --- a/extensions/source/resource/oooresourceloader.cxx +++ b/extensions/source/resource/oooresourceloader.cxx @@ -29,15 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_extensions.hxx" -#ifndef EXTENSIONS_SOURCE_RESOURCE_OOORESOURCELOADER_CXX -#define EXTENSIONS_SOURCE_RESOURCE_OOORESOURCELOADER_CXX -#include "res_services.hxx" - -/** === begin UNO includes === **/ -#include -#include -#include -/** === end UNO includes === **/ +#include #include #include #include @@ -47,87 +39,14 @@ #include #include -//........................................................................ -namespace res -{ -//........................................................................ - - /** === begin UNO using === **/ - using ::com::sun::star::uno::Reference; - using ::com::sun::star::resource::XResourceBundleLoader; - using ::com::sun::star::resource::XResourceBundle; - using ::com::sun::star::resource::MissingResourceException; - using ::com::sun::star::uno::XComponentContext; - using ::com::sun::star::uno::Sequence; - using ::com::sun::star::uno::XInterface; - using ::com::sun::star::uno::RuntimeException; - using ::com::sun::star::lang::Locale; - using ::com::sun::star::uno::Any; - using ::com::sun::star::container::NoSuchElementException; - using ::com::sun::star::lang::WrappedTargetException; - using ::com::sun::star::uno::Type; - using ::com::sun::star::uno::WeakReference; - /** === end UNO using === **/ - - //==================================================================== - //= helper - //==================================================================== - typedef ::std::pair< ::rtl::OUString, Locale > ResourceBundleDescriptor; - - struct ResourceBundleDescriptorLess : public ::std::binary_function< ResourceBundleDescriptor, ResourceBundleDescriptor, bool > - { - bool operator()( const ResourceBundleDescriptor& _lhs, const ResourceBundleDescriptor& _rhs ) const - { - if ( _lhs.first < _rhs.first ) - return true; - if ( _lhs.second.Language < _rhs.second.Language ) - return true; - if ( _lhs.second.Country < _rhs.second.Country ) - return true; - if ( _lhs.second.Variant < _rhs.second.Variant ) - return true; - return false; - } - }; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::resource; +using namespace ::com::sun::star::container; +using namespace ::com::sun::star::lang; - //==================================================================== - //= OpenOfficeResourceLoader - //==================================================================== - typedef ::cppu::WeakImplHelper1 < XResourceBundleLoader - > OpenOfficeResourceLoader_Base; - class OpenOfficeResourceLoader : public OpenOfficeResourceLoader_Base - { - private: - typedef ::std::map< ResourceBundleDescriptor, WeakReference< XResourceBundle >, ResourceBundleDescriptorLess > - ResourceBundleCache; - - private: - Reference< XComponentContext > m_xContext; - ::osl::Mutex m_aMutex; - ResourceBundleCache m_aBundleCache; - - protected: - OpenOfficeResourceLoader( const Reference< XComponentContext >& _rxContext ); - - public: - static Sequence< ::rtl::OUString > getSupportedServiceNames_static(); - static ::rtl::OUString getImplementationName_static(); - static ::rtl::OUString getSingletonName_static(); - static Reference< XInterface > Create( const Reference< XComponentContext >& _rxContext ); - // XResourceBundleLoader - virtual Reference< XResourceBundle > SAL_CALL loadBundle_Default( const ::rtl::OUString& aBaseName ) throw (MissingResourceException, RuntimeException); - virtual Reference< XResourceBundle > SAL_CALL loadBundle( const ::rtl::OUString& abaseName, const Locale& aLocale ) throw (MissingResourceException, RuntimeException); - - private: - OpenOfficeResourceLoader(); // never implemented - OpenOfficeResourceLoader( const OpenOfficeResourceLoader& ); // never implemented - OpenOfficeResourceLoader& operator=( const OpenOfficeResourceLoader& ); // never implemented - }; - - //==================================================================== - //= IResourceType - //==================================================================== +namespace extensions { namespace resource +{ /** encapsulates access to a fixed resource type */ class IResourceType @@ -153,9 +72,6 @@ namespace res virtual ~IResourceType() { }; }; - //==================================================================== - //= StringResourceAccess - //==================================================================== class StringResourceAccess : public IResourceType { public: @@ -166,18 +82,15 @@ namespace res virtual Any getResource( SimpleResMgr& _resourceManager, sal_Int32 _resourceId ) const; }; - //-------------------------------------------------------------------- StringResourceAccess::StringResourceAccess() { } - //-------------------------------------------------------------------- RESOURCE_TYPE StringResourceAccess::getResourceType() const { return RSC_STRING; } - //-------------------------------------------------------------------- Any StringResourceAccess::getResource( SimpleResMgr& _resourceManager, sal_Int32 _resourceId ) const { OSL_PRECOND( _resourceManager.IsAvailable( getResourceType(), _resourceId ), "StringResourceAccess::getResource: precondition not met!" ); @@ -186,9 +99,6 @@ namespace res return aResource; } - //==================================================================== - //= OpenOfficeResourceBundle - //==================================================================== typedef ::cppu::WeakImplHelper1 < XResourceBundle > OpenOfficeResourceBundle_Base; class OpenOfficeResourceBundle : public OpenOfficeResourceBundle_Base @@ -257,41 +167,11 @@ namespace res bool impl_getResourceTypeAndId_nothrow( const ::rtl::OUString& _key, ResourceTypePtr& _out_resourceType, sal_Int32& _out_resourceId ) const; }; - //==================================================================== - //= OpenOfficeResourceLoader - //==================================================================== - //-------------------------------------------------------------------- - OpenOfficeResourceLoader::OpenOfficeResourceLoader( const Reference< XComponentContext >& _rxContext ) + OpenOfficeResourceLoader::OpenOfficeResourceLoader( Reference< XComponentContext > const& _rxContext ) :m_xContext( _rxContext ) { } - //-------------------------------------------------------------------- - Sequence< ::rtl::OUString > OpenOfficeResourceLoader::getSupportedServiceNames_static() - { - Sequence< ::rtl::OUString > aServices( 1 ); - aServices[ 0 ] = getSingletonName_static(); - return aServices; - } - - //-------------------------------------------------------------------- - ::rtl::OUString OpenOfficeResourceLoader::getImplementationName_static() - { - return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.resource.OpenOfficeResourceLoader" ) ); - } - - //-------------------------------------------------------------------- - ::rtl::OUString OpenOfficeResourceLoader::getSingletonName_static() - { - return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.resource.OfficeResourceLoader" ) ); - } - - //-------------------------------------------------------------------- - Reference< XInterface > OpenOfficeResourceLoader::Create( const Reference< XComponentContext >& _rxContext ) - { - return *( new OpenOfficeResourceLoader( _rxContext ) ); - } - //-------------------------------------------------------------------- Reference< XResourceBundle > SAL_CALL OpenOfficeResourceLoader::loadBundle_Default( const ::rtl::OUString& _baseName ) throw (MissingResourceException, RuntimeException) { @@ -319,21 +199,6 @@ namespace res return xBundle; } - //-------------------------------------------------------------------- - ComponentInfo getComponentInfo_OpenOfficeResourceLoader() - { - ComponentInfo aInfo; - aInfo.aSupportedServices = OpenOfficeResourceLoader::getSupportedServiceNames_static(); - aInfo.sImplementationName = OpenOfficeResourceLoader::getImplementationName_static(); - aInfo.sSingletonName = OpenOfficeResourceLoader::getSingletonName_static(); - aInfo.pFactory = &OpenOfficeResourceLoader::Create; - return aInfo; - } - - //==================================================================== - //= OpenOfficeResourceBundle - //==================================================================== - //-------------------------------------------------------------------- OpenOfficeResourceBundle::OpenOfficeResourceBundle( const Reference< XComponentContext >& /*_rxContext*/, const ::rtl::OUString& _rBaseName, const Locale& _rLocale ) :m_aLocale( _rLocale ) ,m_pResourceManager( NULL ) @@ -352,34 +217,29 @@ namespace res ResourceTypePtr( new StringResourceAccess ); } - //-------------------------------------------------------------------- OpenOfficeResourceBundle::~OpenOfficeResourceBundle() { delete m_pResourceManager; } - //-------------------------------------------------------------------- Reference< XResourceBundle > SAL_CALL OpenOfficeResourceBundle::getParent() throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return m_xParent; } - //-------------------------------------------------------------------- void SAL_CALL OpenOfficeResourceBundle::setParent( const Reference< XResourceBundle >& _parent ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); m_xParent = _parent; } - //-------------------------------------------------------------------- Locale SAL_CALL OpenOfficeResourceBundle::getLocale( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return m_aLocale; } - //-------------------------------------------------------------------- bool OpenOfficeResourceBundle::impl_getResourceTypeAndId_nothrow( const ::rtl::OUString& _key, ResourceTypePtr& _out_resourceType, sal_Int32& _out_resourceId ) const { sal_Int32 typeSeparatorPos = _key.indexOf( ':' ); @@ -399,7 +259,6 @@ namespace res return true; } - //-------------------------------------------------------------------- bool OpenOfficeResourceBundle::impl_getDirectElement_nothrow( const ::rtl::OUString& _key, Any& _out_Element ) const { ResourceTypePtr resourceType; @@ -415,7 +274,6 @@ namespace res return _out_Element.hasValue(); } - //-------------------------------------------------------------------- Any SAL_CALL OpenOfficeResourceBundle::getDirectElement( const ::rtl::OUString& _key ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -425,7 +283,6 @@ namespace res return aElement; } - //-------------------------------------------------------------------- Any SAL_CALL OpenOfficeResourceBundle::getByName( const ::rtl::OUString& _key ) throw (NoSuchElementException, WrappedTargetException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -443,7 +300,6 @@ namespace res return aElement; } - //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL OpenOfficeResourceBundle::getElementNames( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -452,7 +308,6 @@ namespace res return Sequence< ::rtl::OUString >( ); } - //-------------------------------------------------------------------- ::sal_Bool SAL_CALL OpenOfficeResourceBundle::hasByName( const ::rtl::OUString& _key ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -468,13 +323,11 @@ namespace res return sal_True; } - //-------------------------------------------------------------------- Type SAL_CALL OpenOfficeResourceBundle::getElementType( ) throw (RuntimeException) { return ::cppu::UnoType< Any >::get(); } - //-------------------------------------------------------------------- ::sal_Bool SAL_CALL OpenOfficeResourceBundle::hasElements( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -483,10 +336,6 @@ namespace res return ::sal_Bool( ); } -//........................................................................ -} // namespace res -//........................................................................ - -#endif // EXTENSIONS_SOURCE_RESOURCE_OOORESOURCELOADER_CXX +}} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/resource/oooresourceloader.hxx b/extensions/source/resource/oooresourceloader.hxx new file mode 100644 index 000000000..fd7f526ce --- /dev/null +++ b/extensions/source/resource/oooresourceloader.hxx @@ -0,0 +1,87 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#ifndef EXTENSIONS_RESOURCE_OOORESOURCELOADER_HXX +#define EXTENSIONS_RESOURCE_OOORESOURCELOADER_HXX + +#include +#include +#include +#include + +#include +#include +#include + +namespace extensions { namespace resource +{ + typedef ::std::pair< ::rtl::OUString, ::com::sun::star::lang::Locale> ResourceBundleDescriptor; + + struct ResourceBundleDescriptorLess : public ::std::binary_function + { + bool operator()( const ResourceBundleDescriptor& _lhs, const ResourceBundleDescriptor& _rhs ) const + { + if ( _lhs.first < _rhs.first ) + return true; + if ( _lhs.second.Language < _rhs.second.Language ) + return true; + if ( _lhs.second.Country < _rhs.second.Country ) + return true; + if ( _lhs.second.Variant < _rhs.second.Variant ) + return true; + return false; + } + }; + + class OpenOfficeResourceLoader : public ::cppu::WeakImplHelper1< ::com::sun::star::resource::XResourceBundleLoader> + { + public: + typedef ::std::map< + ResourceBundleDescriptor, + ::com::sun::star::uno::WeakReference< ::com::sun::star::resource::XResourceBundle>, + ResourceBundleDescriptorLess> ResourceBundleCache; + + OpenOfficeResourceLoader(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> const&); + // XResourceBundleLoader + virtual ::com::sun::star::uno::Reference< ::com::sun::star::resource::XResourceBundle> SAL_CALL loadBundle_Default( const ::rtl::OUString& aBaseName ) throw (::com::sun::star::resource::MissingResourceException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::resource::XResourceBundle> SAL_CALL loadBundle( const ::rtl::OUString& abaseName, const ::com::sun::star::lang::Locale& aLocale ) throw (::com::sun::star::resource::MissingResourceException, ::com::sun::star::uno::RuntimeException); + + private: + OpenOfficeResourceLoader(); // never implemented + OpenOfficeResourceLoader( const OpenOfficeResourceLoader& ); // never implemented + OpenOfficeResourceLoader& operator=( const OpenOfficeResourceLoader& ); // never implemented + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xContext; + ::osl::Mutex m_aMutex; + ResourceBundleCache m_aBundleCache; + }; +}} + +#endif // EXTENSIONS_RESOURCE_OOORESOURCELOADER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/resource/res.component b/extensions/source/resource/res.component index 57f96609d..362278742 100644 --- a/extensions/source/resource/res.component +++ b/extensions/source/resource/res.component @@ -28,11 +28,11 @@ - - - + + + diff --git a/extensions/source/resource/res_services.cxx b/extensions/source/resource/res_services.cxx deleted file mode 100644 index 70d4bac12..000000000 --- a/extensions/source/resource/res_services.cxx +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_extensions.hxx" -#include "res_services.hxx" - -/** === begin UNO using === **/ -using ::com::sun::star::uno::Reference; -using ::com::sun::star::uno::Sequence; -using ::com::sun::star::uno::Exception; -using ::com::sun::star::lang::XMultiServiceFactory; -using ::com::sun::star::lang::XSingleServiceFactory; -using ::com::sun::star::uno::UNO_QUERY; -/** === end UNO using === **/ - -#include - -namespace res -{ - ::std::vector< ComponentInfo > getComponentInfos() - { - ::std::vector< ::res::ComponentInfo > aComponentInfos; - aComponentInfos.push_back( getComponentInfo_VclStringResourceLoader() ); - aComponentInfos.push_back( getComponentInfo_OpenOfficeResourceLoader() ); - return aComponentInfos; - } -} - -extern "C" { - -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( - const sal_Char * pImplName, XMultiServiceFactory * /*pServiceManager*/, void * /*pRegistryKey*/ ) -{ - void * pRet = 0; - ::std::vector< ::res::ComponentInfo > aComponentInfos( ::res::getComponentInfos() ); - for ( ::std::vector< ::res::ComponentInfo >::const_iterator loop = aComponentInfos.begin(); - loop != aComponentInfos.end(); - ++loop - ) - { - if ( 0 == loop->sImplementationName.compareToAscii( pImplName ) ) - { - // create the factory - Reference< XSingleServiceFactory > xFactory( ::cppu::createSingleComponentFactory( - loop->pFactory, loop->sImplementationName, loop->aSupportedServices ), - UNO_QUERY ); - // acquire, because we return an interface pointer instead of a reference - xFactory->acquire(); - pRet = xFactory.get(); - } - } - return pRet; -} - -} // extern "C" - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/resource/res_services.hxx b/extensions/source/resource/res_services.hxx deleted file mode 100644 index 3f47764e5..000000000 --- a/extensions/source/resource/res_services.hxx +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef EXTENSIONS_RESOURCE_SERVICES_HXX -#define EXTENSIONS_RESOURCE_SERVICES_HXX - -/** === begin UNO includes === **/ -#include -#include -#include -/** === end UNO includes === **/ -#include - -//........................................................................ -namespace res -{ -//........................................................................ - - struct ComponentInfo - { - /// services supported by the component - ::com::sun::star::uno::Sequence< ::rtl::OUString > aSupportedServices; - /// implementation name of the component - ::rtl::OUString sImplementationName; - /** name of the singleton instance of the component, if it is a singleton, empty otherwise - If the component is a singleton, aSupportedServices must contain exactly one element. - */ - ::rtl::OUString sSingletonName; - /// factory for creating the component - ::cppu::ComponentFactoryFunc pFactory; - }; - - ComponentInfo getComponentInfo_VclStringResourceLoader(); - ComponentInfo getComponentInfo_OpenOfficeResourceLoader(); - -//........................................................................ -} // namespace res -//........................................................................ - -#endif // EXTENSIONS_RESOURCE_SERVICES_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/resource/resource.cxx b/extensions/source/resource/resource.cxx deleted file mode 100644 index 04161f7cb..000000000 --- a/extensions/source/resource/resource.cxx +++ /dev/null @@ -1,476 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_extensions.hxx" -#include "res_services.hxx" - -#include -#include // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type -#include // helper for factories -#include // helper for implementations - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -using namespace com::sun::star::uno; -using namespace com::sun::star::lang; -using namespace com::sun::star::registry; -using namespace com::sun::star::script; -using namespace com::sun::star::beans; -using namespace com::sun::star::reflection; - -using ::rtl::OUString; -using ::rtl::OStringBuffer; -using ::rtl::OUStringToOString; -using ::rtl::OStringToOUString; - -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ -class ResourceService : public cppu::WeakImplHelper3< XInvocation, XExactName, XServiceInfo > -{ -public: - ResourceService( const Reference< XMultiServiceFactory > & ); - ~ResourceService(); - - // XServiceInfo - OUString SAL_CALL getImplementationName() throw(); - sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(); - Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw(); - - static Sequence< OUString > getSupportedServiceNames_Static(void) throw(); - static OUString getImplementationName_Static() throw() - { - return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.extensions.ResourceService")); - } - static Reference< XInterface > Create( const Reference< XComponentContext >& _rxContext ); - - // XExactName - OUString SAL_CALL getExactName( const OUString & ApproximateName ) throw(RuntimeException); - - // XInvokation - Reference< XIntrospectionAccess > SAL_CALL getIntrospection(void) throw(RuntimeException); - Any SAL_CALL invoke(const OUString& FunctionName, const Sequence< Any >& Params, Sequence< sal_Int16 >& OutParamIndex, Sequence< Any >& OutParam) throw(IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException); - void SAL_CALL setValue(const OUString& PropertyName, const Any& Value) throw(UnknownPropertyException, CannotConvertException, InvocationTargetException, RuntimeException); - Any SAL_CALL getValue(const OUString& PropertyName) throw(UnknownPropertyException, RuntimeException); - sal_Bool SAL_CALL hasMethod(const OUString& Name) throw(RuntimeException); - sal_Bool SAL_CALL hasProperty(const OUString& Name) throw(RuntimeException); -private: - Reference< XTypeConverter > getTypeConverter() const; - Reference< XInvocation > getDefaultInvocation() const; - - Reference< XMultiServiceFactory > xSMgr; - Reference< XInvocation > xDefaultInvocation; - Reference< XTypeConverter > xTypeConverter; - OUString aFileName; - ResMgr * pResMgr; -}; - - -//----------------------------------------------------------------------------- -ResourceService::ResourceService( const Reference< XMultiServiceFactory > & rSMgr ) - : xSMgr( rSMgr ) - , pResMgr( NULL ) -{ -} - -//----------------------------------------------------------------------------- -Reference< XInterface > ResourceService::Create( const Reference< XComponentContext >& _rxContext ) -{ - Reference< XMultiServiceFactory > xFactory( _rxContext->getServiceManager(), UNO_QUERY_THROW ); - return *( new ResourceService( xFactory ) ); -} - -//----------------------------------------------------------------------------- -ResourceService::~ResourceService() -{ - delete pResMgr; -} - -// XServiceInfo -OUString ResourceService::getImplementationName() throw() -{ - return getImplementationName_Static(); -} - -// XServiceInfo -sal_Bool SAL_CALL ResourceService::supportsService(const OUString& ServiceName) throw() -{ - Sequence< OUString > aSNL = getSupportedServiceNames(); - const OUString * pArray = aSNL.getConstArray(); - for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) - if( pArray[i] == ServiceName ) - return sal_True; - return sal_False; -} - -// XServiceInfo -Sequence< OUString > SAL_CALL ResourceService::getSupportedServiceNames(void) throw() -{ - return getSupportedServiceNames_Static(); -} - -// ResourceService -Sequence< OUString > ResourceService::getSupportedServiceNames_Static(void) throw() -{ - Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.resource.VclStringResourceLoader")); - return aSNS; -} - -// ResourceService -Reference< XTypeConverter > ResourceService::getTypeConverter() const -{ - SolarMutexGuard aGuard; - if( xSMgr.is() ) - { - Reference< XTypeConverter > xConv( xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter" ))), UNO_QUERY ); - ((ResourceService*)this)->xTypeConverter = xConv; - } - return xTypeConverter; -} - -// ResourceService -Reference< XInvocation > ResourceService::getDefaultInvocation() const -{ - SolarMutexGuard aGuard; - /* f�hrt zur Zeit noch zu einer rekursion - if( xSMgr.is() ) - { - Reference< XSingleServiceFactory > xFact( xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Invocation")) ), UNO_QUERY ); - if( xFact.is() ) - { - Sequence< Any > aArgs( 1 ); - Reference< XInterface > xThis( *this ); - aArgs.getArray()[0].set( &xThis, XInterface_Reference< get >lection() ); - Reference< XInvokation > xI( xFact->createInstanceWithArguments( aArgs ), UNO_QUERY ); - ((ResourceService*)this)->xDefaultInvocation = xI; - } - } - */ - return xDefaultInvocation; -} - -// XExactName -OUString SAL_CALL ResourceService::getExactName( const OUString & ApproximateName ) throw(RuntimeException) -{ - OUString aName( ApproximateName ); - aName = aName.toAsciiLowerCase(); - if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("filename")) ) - return OUString(RTL_CONSTASCII_USTRINGPARAM("FileName")); - else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("getstring" ) )) - return OUString(RTL_CONSTASCII_USTRINGPARAM("getString")); - else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("getstrings" ) )) - return OUString(RTL_CONSTASCII_USTRINGPARAM("getStrings")); - else if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hasstring")) ) - return OUString(RTL_CONSTASCII_USTRINGPARAM("hasString")); - else if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hasstrings")) ) - return OUString(RTL_CONSTASCII_USTRINGPARAM("hasStrings")); - else if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getstringlist")) ) - return OUString(RTL_CONSTASCII_USTRINGPARAM("getStringList")); - else if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hasStringList")) ) - return OUString(RTL_CONSTASCII_USTRINGPARAM("hasStringList")); - Reference< XExactName > xEN( getDefaultInvocation(), UNO_QUERY ); - if( xEN.is() ) - return xEN->getExactName( ApproximateName ); - return OUString(); -} - -// XInvokation -Reference< XIntrospectionAccess > SAL_CALL ResourceService::getIntrospection(void) - throw(RuntimeException) -{ - Reference< XInvocation > xI = getDefaultInvocation(); - if( xI.is() ) - return xI->getIntrospection(); - return Reference< XIntrospectionAccess >(); -} - -// XInvokation -Any SAL_CALL ResourceService::invoke -( - const OUString& FunctionName, - const Sequence< Any >& Params, - Sequence< sal_Int16 >& OutParamIndex, - Sequence< Any >& OutParam -) - throw(IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException) -{ - Any aRet; - if( FunctionName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getString")) - || FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("getStrings" ) ) - || FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("hasString" ) ) - || FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("hasStrings" ) ) - ) - { - sal_Int32 nElements = Params.getLength(); - if( nElements < 1 ) - throw IllegalArgumentException(); - if( nElements > 1 && (FunctionName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getString")) || FunctionName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hasString")) ) ) - throw IllegalArgumentException(); - if( !pResMgr ) - throw IllegalArgumentException(); - - Sequence< OUString > aStrings( Params.getLength() ); - Sequence< sal_Bool > aBools( Params.getLength() ); - const Any* pIn = Params.getConstArray(); - OUString* pOutString = aStrings.getArray(); - sal_Bool* pOutBool = aBools.getArray(); - - Reference< XTypeConverter > xC = getTypeConverter(); - bool bGetBranch = FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getString" ) ) || FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getStrings" ) ); - - SolarMutexGuard aGuard; - for( sal_Int32 n = 0; n < nElements; n++ ) - { - sal_Int32 nId = 0; - if( !(pIn[n] >>= nId) ) - { - if( xC.is() ) - { - xC->convertToSimpleType( pIn[n], TypeClass_LONG ) >>= nId; - } - else - throw CannotConvertException(); - } - if( nId > 0xFFFF || nId < 0 ) - throw IllegalArgumentException(); - - if( bGetBranch ) - { - ResId aId( (sal_uInt16)nId, *pResMgr ); - aId.SetRT( RSC_STRING ); - if( pResMgr->IsAvailable( aId ) ) - { - String aStr( aId ); - pOutString[n] = aStr; - } - else - throw IllegalArgumentException(); - } - else // hasString(s) - { - sal_Bool bRet = sal_False; - if( pResMgr ) - { - ResId aId( (sal_uInt16)nId, *pResMgr ); - aId.SetRT( RSC_STRING ); - bRet = pResMgr->IsAvailable( aId ); - } - pOutBool[n] = bRet; - } - } - if( FunctionName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getString")) ) - aRet <<= pOutString[0]; - else if( FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("getStrings" ) ) ) - aRet <<= aStrings; - else if( FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("hasString" ) ) ) - aRet <<= pOutBool[0]; - else - aRet <<= aBools; - } - else if( FunctionName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getStringList")) || FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("hasStringList" ) ) ) - { - if( Params.getLength() != 1 ) - throw IllegalArgumentException(); - Reference< XTypeConverter > xC = getTypeConverter(); - SolarMutexGuard aGuard; - - sal_Int32 nId = 0; - if( !(Params.getConstArray()[0] >>= nId) ) - { - if( xC.is() ) - { - xC->convertToSimpleType( Params.getConstArray()[0], TypeClass_LONG ) >>= nId; - } - else - throw CannotConvertException(); - } - - if( FunctionName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getStringList")) ) - { - ResId aId( (sal_uInt16)nId, *pResMgr ); - aId.SetRT( RSC_STRINGARRAY ); - if( pResMgr->IsAvailable( aId ) ) - { - ResStringArray aStr( aId ); - int nEntries = aStr.Count(); - Sequence< PropertyValue > aPropSeq( nEntries ); - PropertyValue* pOut = aPropSeq.getArray(); - for( int i = 0; i < nEntries; i++ ) - { - pOut[i].Name = aStr.GetString( i ); - pOut[i].Handle = -1; - pOut[i].Value <<= aStr.GetValue( i ); - pOut[i].State = PropertyState_DIRECT_VALUE; - } - aRet <<= aPropSeq; - } - else - throw IllegalArgumentException(); - } - else // hasStringList - { - sal_Bool bRet = sal_False; - if( pResMgr ) - { - ResId aId( (sal_uInt16)nId, *pResMgr ); - aId.SetRT( RSC_STRINGARRAY ); - bRet = pResMgr->IsAvailable( aId ); - } - aRet <<= bRet; - } - } - else - { - Reference< XInvocation > xI = getDefaultInvocation(); - if( xI.is() ) - return xI->invoke( FunctionName, Params, OutParamIndex, OutParam ); - else - throw IllegalArgumentException(); - } - return aRet; -} - -// XInvokation -void SAL_CALL ResourceService::setValue(const OUString& PropertyName, const Any& Value) - throw(UnknownPropertyException, CannotConvertException, InvocationTargetException, RuntimeException) -{ - if( PropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FileName")) ) - { - OUString aName; - if( !(Value >>= aName) ) - { - Reference< XTypeConverter > xC = getTypeConverter(); - if( xC.is() ) - xC->convertToSimpleType( Value, TypeClass_STRING ) >>= aName; - else - throw CannotConvertException(); - } - - SolarMutexGuard aGuard; - OStringBuffer aBuf( aName.getLength()+8 ); - aBuf.append( OUStringToOString( aName, osl_getThreadTextEncoding() ) ); - ResMgr * pRM = ResMgr::CreateResMgr( aBuf.getStr() ); - if( !pRM ) - throw InvocationTargetException(); - if( pResMgr ) - delete pResMgr; - pResMgr = pRM; - aFileName = OStringToOUString( aBuf.makeStringAndClear(), osl_getThreadTextEncoding() ); - } - else - { - Reference< XInvocation > xI = getDefaultInvocation(); - if( xI.is() ) - xI->setValue( PropertyName, Value ); - else - throw UnknownPropertyException(); - } -} - -// XInvokation -Any SAL_CALL ResourceService::getValue(const OUString& PropertyName) - throw(UnknownPropertyException, RuntimeException) -{ - SolarMutexGuard aGuard; - if( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FileName" ) )) - return makeAny( aFileName ); - - Reference< XInvocation > xI = getDefaultInvocation(); - if( xI.is() ) - return xI->getValue( PropertyName ); - - throw UnknownPropertyException(); -} - -// XInvokation -sal_Bool SAL_CALL ResourceService::hasMethod(const OUString& Name) - throw(RuntimeException) -{ - if( Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getString")) || - Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getStrings")) || - Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hasString")) || - Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hasStrings")) || - Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getStringList")) || - Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hasStringList")) - ) - return sal_True; - else - { - Reference< XInvocation > xI = getDefaultInvocation(); - if( xI.is() ) - return xI->hasMethod( Name ); - else - return sal_False; - } -} - -// XInvokation -sal_Bool SAL_CALL ResourceService::hasProperty(const OUString& Name) - throw(RuntimeException) -{ - if( Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FileName")) ) - return sal_True; - else - { - Reference< XInvocation > xI = getDefaultInvocation(); - if( xI.is() ) - return xI->hasProperty( Name ); - else - return sal_False; - } -} - -namespace res -{ - ComponentInfo getComponentInfo_VclStringResourceLoader() - { - ComponentInfo aInfo; - aInfo.aSupportedServices = ResourceService::getSupportedServiceNames_Static(); - aInfo.sImplementationName = ResourceService::getImplementationName_Static(); - aInfo.pFactory = &ResourceService::Create; - return aInfo; - } -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/resource/resourceservices.cxx b/extensions/source/resource/resourceservices.cxx new file mode 100644 index 000000000..1ed27148a --- /dev/null +++ b/extensions/source/resource/resourceservices.cxx @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Initial Developer of the Original Code is + * Bjoern Michaelsen + * Portions created by the Initial Developer are Copyright (C) 2010 the + * Initial Developer. All Rights Reserved. + * + * Major Contributor(s): + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include "precompiled_extensions.hxx" + +#include +#include +#include +#include + +namespace sdecl = ::comphelper::service_decl; + +sdecl::class_< ::extensions::resource::ResourceStringIndexAccess, sdecl::with_args > ResourceStringIndexAccessServiceImpl; +sdecl::class_< ::extensions::resource::OpenOfficeResourceLoader> OpenOfficeResourceLoaderServiceImpl; + +const sdecl::ServiceDecl ResourceStringIndexAccessDecl( + ResourceStringIndexAccessServiceImpl, + "org.libreoffice.extensions.resource.ResourceStringIndexAccess", + "org.libreoffice.resource.ResourceStringIndexAccess"); + +const sdecl::ServiceDecl OpenOfficeResourceLoaderDecl( + OpenOfficeResourceLoaderServiceImpl, + "com.sun.star.comp.resource.OpenOfficeResourceLoader", + "com.sun.star.resource.OfficeResourceLoader"); + +COMPHELPER_SERVICEDECL_EXPORTS2( + ResourceStringIndexAccessDecl, + OpenOfficeResourceLoaderDecl +); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3 From 52434fa95d0aeefa9a6b561f6b6bcc2857d38e56 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 27 May 2011 19:54:53 +0200 Subject: fdo#37290: allow also access to StringList resources --- extensions/source/resource/ResourceIndexAccess.cxx | 208 +++++++++++++++++++++ extensions/source/resource/ResourceIndexAccess.hxx | 75 ++++++++ .../source/resource/ResourceStringIndexAccess.cxx | 94 ---------- .../source/resource/ResourceStringIndexAccess.hxx | 71 ------- extensions/source/resource/makefile.mk | 2 +- extensions/source/resource/res.component | 4 +- extensions/source/resource/resourceservices.cxx | 14 +- 7 files changed, 293 insertions(+), 175 deletions(-) create mode 100644 extensions/source/resource/ResourceIndexAccess.cxx create mode 100644 extensions/source/resource/ResourceIndexAccess.hxx delete mode 100644 extensions/source/resource/ResourceStringIndexAccess.cxx delete mode 100644 extensions/source/resource/ResourceStringIndexAccess.hxx diff --git a/extensions/source/resource/ResourceIndexAccess.cxx b/extensions/source/resource/ResourceIndexAccess.cxx new file mode 100644 index 000000000..31a244b96 --- /dev/null +++ b/extensions/source/resource/ResourceIndexAccess.cxx @@ -0,0 +1,208 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Initial Developer of the Original Code is + * Bjoern Michaelsen + * Portions created by the Initial Developer are Copyright (C) 2010 the + * Initial Developer. All Rights Reserved. + * + * Major Contributor(s): + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace ::extensions::resource; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::container; + +using ::comphelper::stl_begin; +using ::comphelper::stl_end; +using ::rtl::OString; +using ::rtl::OUString; +using ::rtl::OUStringToOString; + +namespace +{ + static ::boost::shared_ptr GetResMgr(Sequence const& rArgs) + { + if(rArgs.getLength()!=1) + return ::boost::shared_ptr(); + OUString sFilename; + rArgs[0] >>= sFilename; + SolarMutexGuard aGuard; + const OString sEncName(OUStringToOString(sFilename, osl_getThreadTextEncoding())); + return ::boost::shared_ptr(ResMgr::CreateResMgr(sEncName)); + } + + class ResourceIndexAccessBase : public cppu::WeakImplHelper1< ::com::sun::star::container::XIndexAccess> + { + public: + ResourceIndexAccessBase( ::boost::shared_ptr pResMgr) + : m_pResMgr(pResMgr) + { + OSL_ENSURE(m_pResMgr, "no ressource manager given"); + } + + // XIndexAccess + virtual ::sal_Int32 SAL_CALL getCount( ) throw (::com::sun::star::uno::RuntimeException) + { return m_pResMgr.get() ? SAL_MAX_UINT16 : 0; }; + // XElementAccess + virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException) + { return static_cast(m_pResMgr.get()); }; + + protected: + // m_pResMgr should never be NULL + const ::boost::shared_ptr m_pResMgr; + }; + + class ResourceStringIndexAccess : public ResourceIndexAccessBase + { + public: + ResourceStringIndexAccess( ::boost::shared_ptr pResMgr) + : ResourceIndexAccessBase(pResMgr) {} + // XIndexAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + // XElementAccessBase + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException) + { return ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)); }; + }; + + class ResourceStringListIndexAccess : public ResourceIndexAccessBase + { + public: + ResourceStringListIndexAccess( ::boost::shared_ptr pResMgr) + : ResourceIndexAccessBase(pResMgr) {} + // XIndexAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + // XElementAccessBase + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException) + { return ::getCppuType(reinterpret_cast * >(NULL)); }; + }; +} + +ResourceIndexAccess::ResourceIndexAccess(Sequence const& rArgs, Reference const&) + : m_pResMgr(GetResMgr(rArgs)) +{}; + +Reference initResourceIndexAccess(ResourceIndexAccess* pResourceIndexAccess) +{ + Reference xResult(static_cast(pResourceIndexAccess)); + if(!pResourceIndexAccess->hasElements()) + // xResult does not help the client to analyse the problem + // and will crash on getByIndex calls, better just give back an empty Reference + // so that such ResourceStringIndexAccess instances are never release into the wild + throw RuntimeException( + OUString(RTL_CONSTASCII_USTRINGPARAM("ressource manager could not get initialized")), + /* xResult */ Reference()); + return xResult; +} + +Any SAL_CALL ResourceIndexAccess::getByName(const OUString& aName) + throw (NoSuchElementException, WrappedTargetException, RuntimeException) +{ + const Sequence aNames(getElementNames()); + Reference xResult; + switch(::std::find(stl_begin(aNames), stl_end(aNames), aName)-stl_begin(aNames)) + { + case 0: + xResult = Reference(new ResourceStringIndexAccess(m_pResMgr)); + break; + case 1: + xResult = Reference(new ResourceStringListIndexAccess(m_pResMgr)); + break; + default: + throw NoSuchElementException(); + } + return makeAny(xResult); +} + +Sequence SAL_CALL ResourceIndexAccess::getElementNames( ) + throw (RuntimeException) +{ + static Sequence aResult; + if( aResult.getLength() == 0) + { + aResult.realloc(2); + aResult[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("String")); + aResult[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("StringList")); + } + return aResult; +} + +::sal_Bool SAL_CALL ResourceIndexAccess::hasByName(const OUString& aName) + throw (RuntimeException) +{ + const Sequence aNames(getElementNames()); + return (::std::find(stl_begin(aNames), stl_end(aNames), aName) != stl_end(aNames)); +} + +Any SAL_CALL ResourceStringIndexAccess::getByIndex(sal_Int32 nIdx) + throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException) +{ + if(nIdx > SAL_MAX_UINT16 || nIdx < 0) + throw IndexOutOfBoundsException(); + SolarMutexGuard aGuard; + const ResId aId(static_cast(nIdx), *m_pResMgr); + aId.SetRT(RSC_STRING); + if(!m_pResMgr->IsAvailable(aId)) + throw RuntimeException( + OUString(RTL_CONSTASCII_USTRINGPARAM("string ressource for id not available")), + Reference()); + return makeAny(OUString(String(aId))); +} + +Any SAL_CALL ResourceStringListIndexAccess::getByIndex(sal_Int32 nIdx) + throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException) +{ + if(nIdx > SAL_MAX_UINT16 || nIdx < 0) + throw IndexOutOfBoundsException(); + SolarMutexGuard aGuard; + const ResId aId(static_cast(nIdx), *m_pResMgr); + aId.SetRT(RSC_STRINGARRAY); + if(!m_pResMgr->IsAvailable(aId)) + throw RuntimeException( + OUString(RTL_CONSTASCII_USTRINGPARAM("string list ressource for id not available")), + Reference()); + const ResStringArray aStringList(aId); + Sequence aPropList(aStringList.Count()); + for(sal_Int32 nCount = 0; nCount != aPropList.getLength(); ++nCount) + { + aPropList[nCount].Name = aStringList.GetString(nCount); + aPropList[nCount].Handle = -1; + aPropList[nCount].Value <<= aStringList.GetValue(nCount); + aPropList[nCount].State = PropertyState_DIRECT_VALUE; + } + return makeAny(aPropList); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/resource/ResourceIndexAccess.hxx b/extensions/source/resource/ResourceIndexAccess.hxx new file mode 100644 index 000000000..41632591a --- /dev/null +++ b/extensions/source/resource/ResourceIndexAccess.hxx @@ -0,0 +1,75 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Initial Developer of the Original Code is + * Bjoern Michaelsen + * Portions created by the Initial Developer are Copyright (C) 2010 the + * Initial Developer. All Rights Reserved. + * + * Major Contributor(s): + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#ifndef EXTENSIONS_RESOURCE_RESOURCESTRINGINDEXACCESS_HXX +#define EXTENSIONS_RESOURCE_RESOURCESTRINGINDEXACCESS_HXX + +#include "precompiled_extensions.hxx" + +#include +#include +#include +#include +#include +#include + +class ResMgr; + +namespace extensions { namespace resource +{ + /** This class provides access to tools library text resources */ + class ResourceIndexAccess : public cppu::WeakImplHelper1< ::com::sun::star::container::XNameAccess> + { + public: + /** The ctor takes a sequence with one element: the name of the resource, e.g. svt */ + ResourceIndexAccess(::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> const& rArgs, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> const&); + // XNameAccess + // The XNameAccess provides access to two named elements: + // "String" returns a XIndexAccess to String resources + // "StringList" returns a XIndexAccess to StringList/StringArray resources + virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException) + { return ::getCppuType(reinterpret_cast< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*>(NULL)); }; + virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException) + { return static_cast(m_pResMgr.get()); }; + + private: + // m_pResMgr should never be NULL + const ::boost::shared_ptr m_pResMgr; + }; +}} + +::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> initResourceIndexAccess(::extensions::resource::ResourceIndexAccess*); + +#endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/resource/ResourceStringIndexAccess.cxx b/extensions/source/resource/ResourceStringIndexAccess.cxx deleted file mode 100644 index d48d636bf..000000000 --- a/extensions/source/resource/ResourceStringIndexAccess.cxx +++ /dev/null @@ -1,94 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * Version: MPL 1.1 / GPLv3+ / LGPLv3+ - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Initial Developer of the Original Code is - * Bjoern Michaelsen - * Portions created by the Initial Developer are Copyright (C) 2010 the - * Initial Developer. All Rights Reserved. - * - * Major Contributor(s): - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 3 or later (the "GPLv3+"), or - * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), - * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable - * instead of those above. - */ - -#include - -#include -#include -#include -#include -#include - -using namespace ::extensions::resource; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; - -using ::rtl::OUString; -using ::rtl::OString; -using ::rtl::OUStringToOString; - -namespace -{ - static ::std::auto_ptr GetResMgr(Sequence const& rArgs) - { - if(rArgs.getLength()!=1) - return ::std::auto_ptr(); - OUString sFilename; - rArgs[0] >>= sFilename; - SolarMutexGuard aGuard; - const OString sEncName(OUStringToOString(sFilename, osl_getThreadTextEncoding())); - return ::std::auto_ptr(ResMgr::CreateResMgr(sEncName)); - } -} - - -ResourceStringIndexAccess::ResourceStringIndexAccess(Sequence const& rArgs, Reference const&) - : m_pResMgr(GetResMgr(rArgs)) -{}; - -Reference initResourceStringIndexAccess(ResourceStringIndexAccess* pResourceStringIndexAccess) -{ - Reference xResult(static_cast(pResourceStringIndexAccess)); - if(!pResourceStringIndexAccess->hasElements()) - // xResult does not help the client to analyse the problem - // and will crash on getByIndex calls, better just give back an empty Reference - // so that such ResourceStringIndexAccess instances are never release into the wild - throw RuntimeException( - OUString(RTL_CONSTASCII_USTRINGPARAM("ressource manager could not get initialized")), - /* xResult */ Reference()); - return xResult; -} - -Any SAL_CALL ResourceStringIndexAccess::getByIndex(sal_Int32 nIdx) - throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException) -{ - if(nIdx > SAL_MAX_UINT16 || nIdx < 0) - throw IndexOutOfBoundsException(); - SolarMutexGuard aGuard; - const ResId aId(static_cast(nIdx), *m_pResMgr); - aId.SetRT(RSC_STRING); - if(!m_pResMgr->IsAvailable(aId)) - throw RuntimeException( - OUString(RTL_CONSTASCII_USTRINGPARAM("string ressource for id not available")), - Reference()); - return makeAny(OUString(String(aId))); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/resource/ResourceStringIndexAccess.hxx b/extensions/source/resource/ResourceStringIndexAccess.hxx deleted file mode 100644 index e1a01e3a5..000000000 --- a/extensions/source/resource/ResourceStringIndexAccess.hxx +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * Version: MPL 1.1 / GPLv3+ / LGPLv3+ - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Initial Developer of the Original Code is - * Bjoern Michaelsen - * Portions created by the Initial Developer are Copyright (C) 2010 the - * Initial Developer. All Rights Reserved. - * - * Major Contributor(s): - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 3 or later (the "GPLv3+"), or - * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), - * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable - * instead of those above. - */ - -#ifndef EXTENSIONS_RESOURCE_RESOURCESTRINGINDEXACCESS_HXX -#define EXTENSIONS_RESOURCE_RESOURCESTRINGINDEXACCESS_HXX - -#include "precompiled_extensions.hxx" - -#include -#include -#include -#include -#include -#include - -class ResMgr; - -namespace extensions { namespace resource -{ - class ResourceStringIndexAccess : public cppu::WeakImplHelper1< ::com::sun::star::container::XIndexAccess> - { - public: - ResourceStringIndexAccess(::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> const& rArgs, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> const&); - // XIndexAccess - virtual ::sal_Int32 SAL_CALL getCount( ) throw (::com::sun::star::uno::RuntimeException) - { return m_pResMgr.get() ? SAL_MAX_UINT16 : 0; }; - virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - // XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException) - { return ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)); }; - virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException) - { return static_cast(m_pResMgr.get()); }; - - private: - // m_pResMgr should never be NULL, see initResourceStringIndexAccess - const ::std::auto_ptr m_pResMgr; - }; - -}} - -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> initResourceStringIndexAccess(::extensions::resource::ResourceStringIndexAccess*); - -#endif -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/resource/makefile.mk b/extensions/source/resource/makefile.mk index d9143d2d3..4839ec0b7 100644 --- a/extensions/source/resource/makefile.mk +++ b/extensions/source/resource/makefile.mk @@ -40,7 +40,7 @@ ENABLE_EXCEPTIONS=TRUE # --- Files -------------------------------------------------------- SLOFILES= \ - $(SLO)$/ResourceStringIndexAccess.obj \ + $(SLO)$/ResourceIndexAccess.obj \ $(SLO)$/oooresourceloader.obj \ $(SLO)$/resourceservices.obj diff --git a/extensions/source/resource/res.component b/extensions/source/resource/res.component index 362278742..b5df9748e 100644 --- a/extensions/source/resource/res.component +++ b/extensions/source/resource/res.component @@ -32,7 +32,7 @@ - - + + diff --git a/extensions/source/resource/resourceservices.cxx b/extensions/source/resource/resourceservices.cxx index 1ed27148a..0a08bb526 100644 --- a/extensions/source/resource/resourceservices.cxx +++ b/extensions/source/resource/resourceservices.cxx @@ -30,20 +30,20 @@ #include "precompiled_extensions.hxx" -#include +#include #include #include #include namespace sdecl = ::comphelper::service_decl; -sdecl::class_< ::extensions::resource::ResourceStringIndexAccess, sdecl::with_args > ResourceStringIndexAccessServiceImpl; +sdecl::class_< ::extensions::resource::ResourceIndexAccess, sdecl::with_args > ResourceIndexAccessServiceImpl; sdecl::class_< ::extensions::resource::OpenOfficeResourceLoader> OpenOfficeResourceLoaderServiceImpl; -const sdecl::ServiceDecl ResourceStringIndexAccessDecl( - ResourceStringIndexAccessServiceImpl, - "org.libreoffice.extensions.resource.ResourceStringIndexAccess", - "org.libreoffice.resource.ResourceStringIndexAccess"); +const sdecl::ServiceDecl ResourceIndexAccessDecl( + ResourceIndexAccessServiceImpl, + "org.libreoffice.extensions.resource.ResourceIndexAccess", + "org.libreoffice.resource.ResourceIndexAccess"); const sdecl::ServiceDecl OpenOfficeResourceLoaderDecl( OpenOfficeResourceLoaderServiceImpl, @@ -51,7 +51,7 @@ const sdecl::ServiceDecl OpenOfficeResourceLoaderDecl( "com.sun.star.resource.OfficeResourceLoader"); COMPHELPER_SERVICEDECL_EXPORTS2( - ResourceStringIndexAccessDecl, + ResourceIndexAccessDecl, OpenOfficeResourceLoaderDecl ); -- cgit v1.2.3 From 54355514409030e64b37226459a8c6109d70227a Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 27 May 2011 21:57:23 +0200 Subject: fdo#37290: migrate Java to new resource service --- wizards/com/sun/star/wizards/common/Resource.java | 87 +++++++++++------------ 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/Resource.java b/wizards/com/sun/star/wizards/common/Resource.java index 39607a2f8..7d9365b35 100644 --- a/wizards/com/sun/star/wizards/common/Resource.java +++ b/wizards/com/sun/star/wizards/common/Resource.java @@ -27,47 +27,75 @@ package com.sun.star.wizards.common; +import com.sun.star.beans.PropertyValue; +import com.sun.star.container.XIndexAccess; +import com.sun.star.container.XNameAccess; import com.sun.star.lang.IllegalArgumentException; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.script.XInvocation; import com.sun.star.beans.PropertyValue; +import com.sun.star.uno.XInterface; +import com.sun.star.uno.UnoRuntime; public class Resource { - XInvocation xInvocation; XMultiServiceFactory xMSF; - String Unit; String Module; + XIndexAccess xStringIndexAccess; + XIndexAccess xStringListIndexAccess; /** Creates a new instance of Resource * @param _xMSF * @param _Unit * @param _Module */ - public Resource(XMultiServiceFactory _xMSF, String _Unit, String _Module) + public Resource(XMultiServiceFactory _xMSF, String _Unit /* unused */, String _Module) { this.xMSF = _xMSF; - this.Unit = _Unit; this.Module = _Module; - this.xInvocation = initResources(); + try + { + Object[] aArgs = new Object[1]; + aArgs[0] = this.Module; + XInterface xResource = (XInterface) xMSF.createInstanceWithArguments( + "org.libreoffice.resource.ResourceIndexAccess", + aArgs); + if (xResource == null) + throw new Exception("could not initialize ResourceIndexAccess"); + XNameAccess xNameAccess = (XNameAccess)UnoRuntime.queryInterface( + XNameAccess.class, + xResource); + if (xNameAccess == null) + throw new Exception("ResourceIndexAccess is no XNameAccess"); + this.xStringIndexAccess = (XIndexAccess)UnoRuntime.queryInterface( + XIndexAccess.class, + xNameAccess.getByName("String")); + this.xStringListIndexAccess = (XIndexAccess)UnoRuntime.queryInterface( + XIndexAccess.class, + xNameAccess.getByName("StringList")); + if(this.xStringListIndexAccess == null) + throw new Exception("could not initialize xStringListIndexAccess"); + if(this.xStringIndexAccess == null) + throw new Exception("could not initialize xStringIndexAccess"); + } + catch (Exception exception) + { + exception.printStackTrace(); + showCommonResourceError(xMSF); + } } public String getResText(int nID) { try { - short[][] PointerArray = new short[1][]; - Object[][] DummyArray = new Object[1][]; - Object[] nIDArray = new Object[1]; - nIDArray[0] = new Integer(nID); - final String IDString = (String) xInvocation.invoke("getString", nIDArray, PointerArray, DummyArray); - return IDString; + return (String)this.xStringIndexAccess.getByIndex(nID); } catch (Exception exception) { exception.printStackTrace(); - throw new java.lang.IllegalArgumentException("Resource with ID not" + String.valueOf(nID) + "not found"); + throw new java.lang.IllegalArgumentException("Resource with ID not " + String.valueOf(nID) + "not found"); } } @@ -75,18 +103,12 @@ public class Resource { try { - short[][] PointerArray = new short[1][]; - Object[][] DummyArray = new Object[1][]; - Object[] nIDArray = new Object[1]; - nIDArray[0] = new Integer(nID); - //Object bla = xInvocation.invoke("getStringList", nIDArray, PointerArray, DummyArray); - PropertyValue[] ResProp = (PropertyValue[]) xInvocation.invoke("getStringList", nIDArray, PointerArray, DummyArray); - return ResProp; + return (PropertyValue[])this.xStringListIndexAccess.getByIndex(nID); } catch (Exception exception) { exception.printStackTrace(); - throw new java.lang.IllegalArgumentException("Resource with ID not" + String.valueOf(nID) + "not found"); + throw new java.lang.IllegalArgumentException("Resource with ID not " + String.valueOf(nID) + "not found"); } } @@ -108,31 +130,6 @@ public class Resource } } - public XInvocation initResources() - { - try - { - com.sun.star.uno.XInterface xResource = (com.sun.star.uno.XInterface) xMSF.createInstance("com.sun.star.resource.VclStringResourceLoader"); - if (xResource == null) - { - showCommonResourceError(xMSF); - throw new IllegalArgumentException(); - } - else - { - XInvocation xResInvoke = (XInvocation) com.sun.star.uno.UnoRuntime.queryInterface(XInvocation.class, xResource); - xResInvoke.setValue("FileName", Module); - return xResInvoke; - } - } - catch (Exception exception) - { - exception.printStackTrace(System.out); - showCommonResourceError(xMSF); - return null; - } - } - public static void showCommonResourceError(XMultiServiceFactory xMSF) { String ProductName = Configuration.getProductName(xMSF); -- cgit v1.2.3 From e1530212132d2a3388e6d1acedc809ad6dcd6214 Mon Sep 17 00:00:00 2001 From: Xisco Faulí Date: Tue, 7 Jun 2011 16:02:15 +0200 Subject: initial commit with migration of wizards to python --- wizards/com/sun/star/wizards/RemoteFaxWizard | 6 + wizards/com/sun/star/wizards/common/ConfigGroup.py | 73 ++ wizards/com/sun/star/wizards/common/ConfigNode.py | 15 + .../com/sun/star/wizards/common/Configuration.py | 293 ++++++ wizards/com/sun/star/wizards/common/DebugHelper.py | 10 + wizards/com/sun/star/wizards/common/Desktop.py | 293 ++++++ wizards/com/sun/star/wizards/common/FileAccess.py | 789 +++++++++++++++ wizards/com/sun/star/wizards/common/HelpIds.py | 1013 ++++++++++++++++++++ wizards/com/sun/star/wizards/common/Helper.py | 242 +++++ wizards/com/sun/star/wizards/common/Listener.py | 111 +++ .../star/wizards/common/NoValidPathException.py | 9 + .../com/sun/star/wizards/common/PropertyNames.py | 15 + .../sun/star/wizards/common/PropertySetHelper.py | 242 +++++ .../com/sun/star/wizards/common/Resource.java.orig | 140 +++ wizards/com/sun/star/wizards/common/Resource.py | 66 ++ .../com/sun/star/wizards/common/SystemDialog.py | 237 +++++ wizards/com/sun/star/wizards/common/__init__.py | 1 + wizards/com/sun/star/wizards/common/prova.py | 7 + .../sun/star/wizards/document/OfficeDocument.py | 240 +++++ wizards/com/sun/star/wizards/fax/CGFax.py | 31 + wizards/com/sun/star/wizards/fax/CGFaxWizard.py | 10 + wizards/com/sun/star/wizards/fax/CallWizard.py | 144 +++ wizards/com/sun/star/wizards/fax/FaxDocument.py | 109 +++ .../com/sun/star/wizards/fax/FaxWizardDialog.py | 101 ++ .../sun/star/wizards/fax/FaxWizardDialogConst.py | 83 ++ .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 539 +++++++++++ .../star/wizards/fax/FaxWizardDialogResources.py | 96 ++ wizards/com/sun/star/wizards/fax/__init__.py | 1 + wizards/com/sun/star/wizards/text/TextDocument.py | 243 +++++ .../com/sun/star/wizards/text/TextFieldHandler.py | 169 ++++ .../sun/star/wizards/text/TextSectionHandler.py | 121 +++ wizards/com/sun/star/wizards/text/ViewHandler.py | 38 + wizards/com/sun/star/wizards/ui/PathSelection.py | 78 ++ wizards/com/sun/star/wizards/ui/PeerConfig.py | 145 +++ wizards/com/sun/star/wizards/ui/UIConsts.py | 66 ++ wizards/com/sun/star/wizards/ui/UnoDialog.py | 648 +++++++++++++ wizards/com/sun/star/wizards/ui/UnoDialog2.py | 192 ++++ wizards/com/sun/star/wizards/ui/WizardDialog.py | 422 ++++++++ .../sun/star/wizards/ui/XPathSelectionListener.py | 7 + wizards/com/sun/star/wizards/ui/__init__.py | 1 + .../sun/star/wizards/ui/event/AbstractListener.py | 67 ++ .../sun/star/wizards/ui/event/CommonListener.py | 73 ++ wizards/com/sun/star/wizards/ui/event/DataAware.py | 291 ++++++ .../sun/star/wizards/ui/event/DataAwareFields.java | 2 + .../sun/star/wizards/ui/event/DataAwareFields.py | 158 +++ .../com/sun/star/wizards/ui/event/EventNames.py | 15 + .../sun/star/wizards/ui/event/MethodInvocation.py | 34 + .../sun/star/wizards/ui/event/RadioDataAware.py | 45 + .../com/sun/star/wizards/ui/event/UnoDataAware.py | 184 ++++ 49 files changed, 7915 insertions(+) create mode 100644 wizards/com/sun/star/wizards/RemoteFaxWizard create mode 100644 wizards/com/sun/star/wizards/common/ConfigGroup.py create mode 100644 wizards/com/sun/star/wizards/common/ConfigNode.py create mode 100644 wizards/com/sun/star/wizards/common/Configuration.py create mode 100644 wizards/com/sun/star/wizards/common/DebugHelper.py create mode 100644 wizards/com/sun/star/wizards/common/Desktop.py create mode 100644 wizards/com/sun/star/wizards/common/FileAccess.py create mode 100644 wizards/com/sun/star/wizards/common/HelpIds.py create mode 100644 wizards/com/sun/star/wizards/common/Helper.py create mode 100644 wizards/com/sun/star/wizards/common/Listener.py create mode 100644 wizards/com/sun/star/wizards/common/NoValidPathException.py create mode 100644 wizards/com/sun/star/wizards/common/PropertyNames.py create mode 100644 wizards/com/sun/star/wizards/common/PropertySetHelper.py create mode 100644 wizards/com/sun/star/wizards/common/Resource.java.orig create mode 100644 wizards/com/sun/star/wizards/common/Resource.py create mode 100644 wizards/com/sun/star/wizards/common/SystemDialog.py create mode 100644 wizards/com/sun/star/wizards/common/__init__.py create mode 100644 wizards/com/sun/star/wizards/common/prova.py create mode 100644 wizards/com/sun/star/wizards/document/OfficeDocument.py create mode 100644 wizards/com/sun/star/wizards/fax/CGFax.py create mode 100644 wizards/com/sun/star/wizards/fax/CGFaxWizard.py create mode 100644 wizards/com/sun/star/wizards/fax/CallWizard.py create mode 100644 wizards/com/sun/star/wizards/fax/FaxDocument.py create mode 100644 wizards/com/sun/star/wizards/fax/FaxWizardDialog.py create mode 100644 wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py create mode 100644 wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py create mode 100644 wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py create mode 100644 wizards/com/sun/star/wizards/fax/__init__.py create mode 100644 wizards/com/sun/star/wizards/text/TextDocument.py create mode 100644 wizards/com/sun/star/wizards/text/TextFieldHandler.py create mode 100644 wizards/com/sun/star/wizards/text/TextSectionHandler.py create mode 100644 wizards/com/sun/star/wizards/text/ViewHandler.py create mode 100644 wizards/com/sun/star/wizards/ui/PathSelection.py create mode 100644 wizards/com/sun/star/wizards/ui/PeerConfig.py create mode 100644 wizards/com/sun/star/wizards/ui/UIConsts.py create mode 100644 wizards/com/sun/star/wizards/ui/UnoDialog.py create mode 100644 wizards/com/sun/star/wizards/ui/UnoDialog2.py create mode 100644 wizards/com/sun/star/wizards/ui/WizardDialog.py create mode 100644 wizards/com/sun/star/wizards/ui/XPathSelectionListener.py create mode 100644 wizards/com/sun/star/wizards/ui/__init__.py create mode 100644 wizards/com/sun/star/wizards/ui/event/AbstractListener.py create mode 100644 wizards/com/sun/star/wizards/ui/event/CommonListener.py create mode 100644 wizards/com/sun/star/wizards/ui/event/DataAware.py create mode 100644 wizards/com/sun/star/wizards/ui/event/DataAwareFields.py create mode 100644 wizards/com/sun/star/wizards/ui/event/EventNames.py create mode 100644 wizards/com/sun/star/wizards/ui/event/MethodInvocation.py create mode 100644 wizards/com/sun/star/wizards/ui/event/RadioDataAware.py create mode 100644 wizards/com/sun/star/wizards/ui/event/UnoDataAware.py diff --git a/wizards/com/sun/star/wizards/RemoteFaxWizard b/wizards/com/sun/star/wizards/RemoteFaxWizard new file mode 100644 index 000000000..fa3eccf22 --- /dev/null +++ b/wizards/com/sun/star/wizards/RemoteFaxWizard @@ -0,0 +1,6 @@ +#!/usr/bin/env python +from fax.FaxWizardDialogImpl import FaxWizardDialogImpl +import sys + +if __name__ == "__main__": + FaxWizardDialogImpl.main(sys.argv) diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.py b/wizards/com/sun/star/wizards/common/ConfigGroup.py new file mode 100644 index 000000000..02ba16cb6 --- /dev/null +++ b/wizards/com/sun/star/wizards/common/ConfigGroup.py @@ -0,0 +1,73 @@ +from ConfigNode import * +import traceback + +class ConfigGroup(ConfigNode): + + def writeConfiguration(self, configurationView, param): + for i in dir(self): + if i.startswith(param): + try: + self.writeField(i, configurationView, param) + except Exception, ex: + print "Error writing field:" + i + traceback.print_exc() + + def writeField(self, field, configView, prefix): + propertyName = field.getName().substring(prefix.length()) + fieldType = field.getType() + if ConfigNode.isAssignableFrom(fieldType): + childView = Configuration.addConfigNode(configView, propertyName) + child = field.get(this) + child.writeConfiguration(childView, prefix) + elif fieldType.isPrimitive(): + Configuration.set(convertValue(field), propertyName, configView) + elif isinstance(fieldType,str): + Configuration.set(field.get(this), propertyName, configView) + + ''' + convert the primitive type value of the + given Field object to the corresponding + Java Object value. + @param field + @return the value of the field as a Object. + @throws IllegalAccessException + ''' + + def convertValue(self, field): + if field.getType().equals(Boolean.TYPE): + return field.getBoolean(this) + + if field.getType().equals(Integer.TYPE): + return field.getInt(this) + + if field.getType().equals(Short.TYPE): + return field.getShort(this) + + if field.getType().equals(Float.TYPE): + return field.getFloat(this) + + if (field.getType().equals(Double.TYPE)): + return field.getDouble(this) + return None + #and good luck with it :-) ... + + def readConfiguration(self, configurationView, param): + for i in dir(self): + if i.startswith(param): + try: + self.readField( i, configurationView, param) + except Exception, ex: + print "Error reading field: " + i + traceback.print_exc() + + def readField(self, field, configView, prefix): + propertyName = field[len(prefix):] + child = getattr(self, field) + fieldType = type(child) + if type(ConfigNode) == fieldType: + child.setRoot(self.root) + child.readConfiguration(Configuration.getNode(propertyName, configView), prefix) + field.set(this, Configuration.getString(propertyName, configView)) + + def setRoot(self, newRoot): + self.root = newRoot diff --git a/wizards/com/sun/star/wizards/common/ConfigNode.py b/wizards/com/sun/star/wizards/common/ConfigNode.py new file mode 100644 index 000000000..d97ac1b64 --- /dev/null +++ b/wizards/com/sun/star/wizards/common/ConfigNode.py @@ -0,0 +1,15 @@ +from abc import ABCMeta, abstractmethod + +class ConfigNode(object): + + @abstractmethod + def readConfiguration(self, configurationView, param): + pass + + @abstractmethod + def writeConfiguration(self, configurationView, param): + pass + + @abstractmethod + def setRoot(self, root): + pass diff --git a/wizards/com/sun/star/wizards/common/Configuration.py b/wizards/com/sun/star/wizards/common/Configuration.py new file mode 100644 index 000000000..adf7e8a7f --- /dev/null +++ b/wizards/com/sun/star/wizards/common/Configuration.py @@ -0,0 +1,293 @@ +from PropertyNames import PropertyNames +from com.sun.star.uno import Exception as UnoException +from Helper import * +import traceback +import uno +''' +This class gives access to the OO configuration api. +It contains 4 get and 4 set convenience methods for getting and settings properties +in the configuration.
+For the get methods, two parameters must be given: name and parent, where name is the +name of the property, parent is a HierarchyElement (::com::sun::star::configuration::HierarchyElement)
+The get and set methods support hieryrchical property names like "options/gridX".
+NOTE: not yet supported, but sometime later, +If you will ommit the "parent" parameter, then the "name" parameter must be in hierarchy form from +the root of the registry. +''' + +class Configuration(object): + + @classmethod + def getInt(self, name, parent): + o = getNode(name, parent) + if AnyConverter.isVoid(o): + return 0 + + return AnyConverter.toInt(o) + + @classmethod + def getShort(self, name, parent): + o = getNode(name, parent) + if AnyConverter.isVoid(o): + return 0 + + return AnyConverter.toShort(o) + + @classmethod + def getFloat(self, name, parent): + o = getNode(name, parent) + if AnyConverter.isVoid(o): + return 0 + + return AnyConverter.toFloat(o) + + @classmethod + def getDouble(self, name, parent): + o = getNode(name, parent) + if AnyConverter.isVoid(o): + return 0 + + return AnyConverter.toDouble(o) + + @classmethod + def getString(self, name, parent): + o = getNode(name, parent) + if AnyConverter.isVoid(o): + return "" + + return o + + @classmethod + def getBoolean(self, name, parent): + o = getNode(name, parent) + if AnyConverter.isVoid(o): + return False + + return AnyConverter.toBoolean(o) + + @classmethod + def getNode(self, name, parent): + return parent.getByName(name) + + @classmethod + def set(self, value, name, parent): + parent.setHierarchicalPropertyValue(name, value) + + ''' + @param name + @param parent + @return + @throws Exception + ''' + + @classmethod + def getConfigurationNode(self, name, parent): + return parent.getByName(name) + + @classmethod + def getConfigurationRoot(self, xmsf, sPath, updateable): + oConfigProvider = xmsf.createInstance("com.sun.star.configuration.ConfigurationProvider") + if updateable: + sView = "com.sun.star.configuration.ConfigurationUpdateAccess" + else: + sView = "com.sun.star.configuration.ConfigurationAccess" + + aPathArgument = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + aPathArgument.Name = "nodepath" + aPathArgument.Value = sPath + aModeArgument = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + if updateable: + aModeArgument.Name = "lazywrite" + aModeArgument.Value = False + + + return oConfigProvider.createInstanceWithArguments(sView,(aPathArgument,aModeArgument,)) + + @classmethod + def getChildrenNames(self, configView): + return configView.getElementNames() + + @classmethod + def getProductName(self, xMSF): + try: + oProdNameAccess = self.getConfigurationRoot(xMSF, "org.openoffice.Setup/Product", False) + ProductName = Helper.getUnoObjectbyName(oProdNameAccess, "ooName") + return ProductName + except UnoException: + traceback.print_exc() + return None + + @classmethod + def getOfficeLocaleString(self, xMSF): + sLocale = "" + try: + aLocLocale = Locale.Locale() + oMasterKey = self.getConfigurationRoot(xMSF, "org.openoffice.Setup/L10N/", False) + sLocale = (String) + Helper.getUnoObjectbyName(oMasterKey, "ooLocale") + except UnoException, exception: + traceback.print_exc() + + return sLocale + + @classmethod + def getOfficeLocale(self, xMSF): + aLocLocale = Locale.Locale() + sLocale = getOfficeLocaleString(xMSF) + sLocaleList = JavaTools.ArrayoutofString(sLocale, "-") + aLocLocale.Language = sLocaleList[0] + if sLocaleList.length > 1: + aLocLocale.Country = sLocaleList[1] + + return aLocLocale + + @classmethod + def getOfficeLinguistic(self, xMSF): + try: + oMasterKey = self.getConfigurationRoot(xMSF, "org.openoffice.Setup/L10N/", False) + sLinguistic = Helper.getUnoObjectbyName(oMasterKey, "ooLocale") + return sLinguistic + except UnoException, exception: + traceback.print_exc() + return None + + ''' + This method creates a new configuration node and adds it + to the given view. Note that if a node with the given name + already exists it will be completely removed from + the configuration. + @param configView + @param name + @return the new created configuration node. + @throws com.sun.star.lang.WrappedTargetException + @throws ElementExistException + @throws NoSuchElementException + @throws com.sun.star.uno.Exception + ''' + + @classmethod + def addConfigNode(self, configView, name): + if configView == None: + return configView.getByName(name) + else: + # the new element is the result ! + newNode = configView.createInstance() + # insert it - this also names the element + xNameContainer.insertByName(name, newNode) + return newNode + + @classmethod + def removeNode(self, configView, name): + + if configView.hasByName(name): + configView.removeByName(name) + + @classmethod + def commit(self, configView): + configView.commitChanges() + + @classmethod + def updateConfiguration(self, xmsf, path, name, node, param): + view = Configuration.self.getConfigurationRoot(xmsf, path, True) + addConfigNode(path, name) + node.writeConfiguration(view, param) + view.commitChanges() + + @classmethod + def removeNode(self, xmsf, path, name): + view = Configuration.self.getConfigurationRoot(xmsf, path, True) + removeNode(view, name) + view.commitChanges() + + @classmethod + def getNodeDisplayNames(self, _xNameAccessNode): + snames = None + return getNodeChildNames(_xNameAccessNode, PropertyNames.PROPERTY_NAME) + + @classmethod + def getNodeChildNames(self, xNameAccessNode, _schildname): + snames = None + try: + snames = xNameAccessNode.getElementNames() + sdisplaynames = range(snames.length) + i = 0 + while i < snames.length: + oContent = Helper.getUnoPropertyValue(xNameAccessNode.getByName(snames[i]), _schildname) + if not AnyConverter.isVoid(oContent): + sdisplaynames[i] = (String) + Helper.getUnoPropertyValue(xNameAccessNode.getByName(snames[i]), _schildname) + else: + sdisplaynames[i] = snames[i] + + i += 1 + return sdisplaynames + except UnoException, e: + traceback.print_exc() + return snames + + @classmethod + def getChildNodebyIndex(self, _xNameAccess, _index): + try: + snames = _xNameAccess.getElementNames() + oNode = _xNameAccess.getByName(snames[_index]) + return oNode + except UnoException, e: + traceback.print_exc() + return None + + @classmethod + def getChildNodebyName(self, _xNameAccessNode, _SubNodeName): + try: + if _xNameAccessNode.hasByName(_SubNodeName): + return _xNameAccessNode.getByName(_SubNodeName) + + except UnoException, e: + traceback.print_exc() + + return None + + @classmethod + def getChildNodebyDisplayName(self, _xNameAccessNode, _displayname): + snames = None + return getChildNodebyDisplayName(_xNameAccessNode, _displayname, PropertyNames.PROPERTY_NAME) + + @classmethod + def getChildNodebyDisplayName(self, _xNameAccessNode, _displayname, _nodename): + snames = None + try: + snames = _xNameAccessNode.getElementNames() + sdisplaynames = range(snames.length) + i = 0 + while i < snames.length: + curdisplayname = Helper.getUnoPropertyValue(_xNameAccessNode.getByName(snames[i]), _nodename) + if curdisplayname.equals(_displayname): + return _xNameAccessNode.getByName(snames[i]) + + i += 1 + except UnoException, e: + traceback.print_exc() + + return None + + @classmethod + def getChildNodebyDisplayName(self, _xMSF, _aLocale, _xNameAccessNode, _displayname, _nodename, _nmaxcharcount): + snames = None + try: + snames = _xNameAccessNode.getElementNames() + sdisplaynames = range(snames.length) + i = 0 + while i < snames.length: + curdisplayname = Helper.getUnoPropertyValue(_xNameAccessNode.getByName(snames[i]), _nodename) + if (_nmaxcharcount > 0) and (_nmaxcharcount < curdisplayname.length()): + curdisplayname = curdisplayname.substring(0, _nmaxcharcount) + + curdisplayname = Desktop.removeSpecialCharacters(_xMSF, _aLocale, curdisplayname) + if curdisplayname.equals(_displayname): + return _xNameAccessNode.getByName(snames[i]) + + i += 1 + except UnoException, e: + traceback.print_exc() + + return None + diff --git a/wizards/com/sun/star/wizards/common/DebugHelper.py b/wizards/com/sun/star/wizards/common/DebugHelper.py new file mode 100644 index 000000000..75016033a --- /dev/null +++ b/wizards/com/sun/star/wizards/common/DebugHelper.py @@ -0,0 +1,10 @@ +class DebugHelper(object): + + @classmethod + def exception(self, ex): + raise NotImplementedError + + @classmethod + def writeInfo(self, msg): + raise NotImplementedError + diff --git a/wizards/com/sun/star/wizards/common/Desktop.py b/wizards/com/sun/star/wizards/common/Desktop.py new file mode 100644 index 000000000..a08f12c4f --- /dev/null +++ b/wizards/com/sun/star/wizards/common/Desktop.py @@ -0,0 +1,293 @@ +import uno +import traceback +from com.sun.star.frame.FrameSearchFlag import ALL, PARENT +from com.sun.star.util import URL +from com.sun.star.i18n.KParseTokens import ANY_LETTER_OR_NUMBER, ASC_UNDERSCORE +from NoValidPathException import * +from com.sun.star.uno import Exception as UnoException + + +class Desktop(object): + + @classmethod + def getDesktop(self, xMSF): + xDesktop = None + if xMSF is not None: + try: + xDesktop = xMSF.createInstance( "com.sun.star.frame.Desktop") + except UnoException, exception: + traceback.print_exc() + else: + print "Can't create a desktop. null pointer !" + + return xDesktop + + @classmethod + def getActiveFrame(self, xMSF): + xDesktop = self.getDesktop(xMSF) + return xDesktop.getActiveFrame() + + @classmethod + def getActiveComponent(self, _xMSF): + xFrame = self.getActiveFrame(_xMSF) + return xFrame.getController().getModel() + + @classmethod + def getActiveTextDocument(self, _xMSF): + xComponent = getActiveComponent(_xMSF) + return xComponent #Text + + @classmethod + def getActiveSpreadsheetDocument(self, _xMSF): + xComponent = getActiveComponent(_xMSF) + return xComponent + + @classmethod + def getDispatcher(self, xMSF, xFrame, _stargetframe, oURL): + try: + oURLArray = range(1) + oURLArray[0] = oURL + xDispatch = xFrame.queryDispatch(oURLArray[0], _stargetframe, ALL) + return xDispatch + except UnoException, e: + e.printStackTrace(System.out) + + return None + + @classmethod + def getDispatchURL(self, xMSF, _sURL): + try: + oTransformer = xMSF.createInstance("com.sun.star.util.URLTransformer") + oURL = range(1) + oURL[0] = com.sun.star.util.URL.URL() + oURL[0].Complete = _sURL + xTransformer.parseStrict(oURL) + return oURL[0] + except UnoException, e: + e.printStackTrace(System.out) + + return None + + @classmethod + def dispatchURL(self, xMSF, sURL, xFrame, _stargetframe): + oURL = getDispatchURL(xMSF, sURL) + xDispatch = getDispatcher(xMSF, xFrame, _stargetframe, oURL) + dispatchURL(xDispatch, oURL) + + @classmethod + def dispatchURL(self, xMSF, sURL, xFrame): + dispatchURL(xMSF, sURL, xFrame, "") + + @classmethod + def dispatchURL(self, _xDispatch, oURL): + oArg = range(0) + _xDispatch.dispatch(oURL, oArg) + + @classmethod + def connect(self, connectStr): + localContext = uno.getComponentContext() + resolver = localContext.ServiceManager.createInstanceWithContext( + "com.sun.star.bridge.UnoUrlResolver", localContext ) + ctx = resolver.resolve( connectStr ) + orb = ctx.ServiceManager + return orb + + @classmethod + def checkforfirstSpecialCharacter(self, _xMSF, _sString, _aLocale): + try: + nStartFlags = ANY_LETTER_OR_NUMBER + ASC_UNDERSCORE + ocharservice = _xMSF.createInstance("com.sun.star.i18n.CharacterClassification") + aResult = ocharservice.parsePredefinedToken(KParseType.IDENTNAME, _sString, 0, _aLocale, nStartFlags, "", nStartFlags, " ") + return aResult.EndPos + except UnoException, e: + e.printStackTrace(System.out) + return -1 + + @classmethod + def removeSpecialCharacters(self, _xMSF, _aLocale, _sname): + snewname = _sname + i = 0 + while i < snewname.length(): + i = Desktop.checkforfirstSpecialCharacter(_xMSF, snewname, _aLocale) + if i < snewname.length(): + sspecialchar = snewname.substring(i, i + 1) + snewname = JavaTools.replaceSubString(snewname, "", sspecialchar) + + return snewname + + ''' + Checks if the passed Element Name already exists in the ElementContainer. If yes it appends a + suffix to make it unique + @param xElementContainer + @param sElementName + @return a unique Name ready to be added to the container. + ''' + + @classmethod + def getUniqueName(self, xElementContainer, sElementName): + bElementexists = True + i = 1 + sIncSuffix = "" + BaseName = sElementName + while bElementexists == True: + bElementexists = xElementContainer.hasByName(sElementName) + if bElementexists == True: + i += 1 + sElementName = BaseName + str(i) + + if i > 1: + sIncSuffix = str(i) + + return sElementName + sIncSuffix + + ''' + Checks if the passed Element Name already exists in the list If yes it appends a + suffix to make it unique + @param _slist + @param _sElementName + @param _sSuffixSeparator + @return a unique Name not being in the passed list. + ''' + + @classmethod + def getUniqueNameList(self, _slist, _sElementName, _sSuffixSeparator): + a = 2 + scompname = _sElementName + bElementexists = True + if _slist == None: + return _sElementName + + if _slist.length == 0: + return _sElementName + + while bElementexists == True: + i = 0 + while i < _slist.length: + if JavaTools.FieldInList(_slist, scompname) == -1: + return scompname + + i += 1 + scompname = _sElementName + _sSuffixSeparator + (a + 1) + return "" + + ''' + @deprecated use Configuration.getConfigurationRoot() with the same parameters instead + @param xMSF + @param KeyName + @param bForUpdate + @return + ''' + + @classmethod + def getRegistryKeyContent(self, xMSF, KeyName, bForUpdate): + try: + aNodePath = range(1) + oConfigProvider = xMSF.createInstance("com.sun.star.configuration.ConfigurationProvider") + aNodePath[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + aNodePath[0].Name = "nodepath" + aNodePath[0].Value = KeyName + if bForUpdate: + return oConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", aNodePath) + else: + return oConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", aNodePath) + + except UnoException, exception: + exception.printStackTrace(System.out) + return None + +class OfficePathRetriever: + + def OfficePathRetriever(self, xMSF): + try: + TemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard") + UserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", "") + BitmapPath = FileAccess.combinePaths(xMSF, TemplatePath, "/../wizard/bitmap") + WorkPath = FileAccess.getOfficePath(xMSF, "Work", "", "") + except NoValidPathException, nopathexception: + pass + + @classmethod + def getTemplatePath(self, _xMSF): + sTemplatePath = "" + try: + sTemplatePath = FileAccess.getOfficePath(_xMSF, "Template", "share", "/wizard") + except NoValidPathException, nopathexception: + pass + return sTemplatePath + + @classmethod + def getUserTemplatePath(self, _xMSF): + sUserTemplatePath = "" + try: + sUserTemplatePath = FileAccess.getOfficePath(_xMSF, "Template", "user", "") + except NoValidPathException, nopathexception: + pass + return sUserTemplatePath + + @classmethod + def getBitmapPath(self, _xMSF): + sBitmapPath = "" + try: + sBitmapPath = FileAccess.combinePaths(_xMSF, getTemplatePath(_xMSF), "/../wizard/bitmap") + except NoValidPathException, nopathexception: + pass + + return sBitmapPath + + @classmethod + def getWorkPath(self, _xMSF): + sWorkPath = "" + try: + sWorkPath = FileAccess.getOfficePath(_xMSF, "Work", "", "") + + except NoValidPathException, nopathexception: + pass + + return sWorkPath + + @classmethod + def createStringSubstitution(self, xMSF): + xPathSubst = None + try: + xPathSubst = xMSF.createInstance("com.sun.star.util.PathSubstitution") + except com.sun.star.uno.Exception, e: + e.printStackTrace() + + if xPathSubst != None: + return xPathSubst + else: + return None + + '''This method searches (and hopefully finds...) a frame + with a componentWindow. + It does it in three phases: + 1. Check if the given desktop argument has a componentWindow. + If it is null, the myFrame argument is taken. + 2. Go up the tree of frames and search a frame with a component window. + 3. Get from the desktop all the components, and give the first one + which has a frame. + @param xMSF + @param myFrame + @param desktop + @return + @throws NoSuchElementException + @throws WrappedTargetException + ''' + + @classmethod + def findAFrame(self, xMSF, myFrame, desktop): + if desktop == None: + desktop = myFrame + #we go up in the tree... + + while desktop != None and desktop.getComponentWindow() == None: + desktop = desktop.findFrame("_parent", FrameSearchFlag.PARENT) + if desktop == None: + e = Desktop.getDesktop(xMSF).getComponents().createEnumeration() + while e.hasMoreElements(): + xModel = (e.nextElement()).getObject() + xFrame = xModel.getCurrentController().getFrame() + if xFrame != None and xFrame.getComponentWindow() != None: + return xFrame + + return desktop diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py new file mode 100644 index 000000000..95f8646b1 --- /dev/null +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -0,0 +1,789 @@ +import traceback +from NoValidPathException import * +from com.sun.star.ucb import CommandAbortedException +from com.sun.star.uno import Exception as UnoException +import types + +''' +This class delivers static convenience methods +to use with ucb SimpleFileAccess service. +You can also instanciate the class, to encapsulate +some functionality of SimpleFileAccess. The instance +keeps a reference to an XSimpleFileAccess and an +XFileIdentifierConverter, saves the permanent +overhead of quering for those interfaces, and delivers +conveneince methods for using them. +These Convenince methods include mainly Exception-handling. +''' + +class FileAccess(object): + ''' + @param xMSF + @param sPath + @param sAddPath + ''' + + @classmethod + def addOfficePath(self, xMSF, sPath, sAddPath): + xSimpleFileAccess = None + ResultPath = getOfficePath(xMSF, sPath, xSimpleFileAccess) + # As there are several conventions about the look of Url (e.g. with " " or with "%20") you cannot make a + # simple String comparison to find out, if a path is already in "ResultPath" + PathList = JavaTools.ArrayoutofString(ResultPath, ";") + MaxIndex = PathList.length - 1 + CompAddPath = JavaTools.replaceSubString(sAddPath, "", "/") + i = 0 + while i <= MaxIndex: + CurPath = JavaTools.convertfromURLNotation(PathList[i]) + CompCurPath = JavaTools.replaceSubString(CurPath, "", "/") + if CompCurPath.equals(CompAddPath): + return + + i += 1 + ResultPath += ";" + sAddPath + return + + @classmethod + def deleteLastSlashfromUrl(self, _sPath): + if _sPath.endswith("/"): + return _sPath[:-1] + else: + return _sPath + + ''' + Further information on arguments value see in OO Developer Guide, + chapter 6.2.7 + @param xMSF + @param sPath + @param xSimpleFileAccess + @return the respective path of the office application. A probable following "/" at the end is trimmed. + ''' + + @classmethod + def getOfficePath(self, xMSF, sPath, xSimpleFileAccess): + try: + ResultPath = "" + xInterface = xMSF.createInstance("com.sun.star.util.PathSettings") + ResultPath = str(Helper.getUnoPropertyValue(xInterface, sPath)) + ResultPath = self.deleteLastSlashfromUrl(ResultPath) + return ResultPath + except UnoException, exception: + traceback.print_exc() + return "" + + ''' + Further information on arguments value see in OO Developer Guide, + chapter 6.2.7 + @param xMSF + @param sPath + @param sType use "share" or "user". Set to "" if not needed eg for the WorkPath; + In the return Officepath a possible slash at the end is cut off + @param sSearchDir + @return + @throws NoValidPathException + ''' + + @classmethod + def getOfficePath2(self, xMSF, sPath, sType, sSearchDir): + #This method currently only works with sPath="Template" + bexists = False + try: + xPathInterface = xMSF.createInstance("com.sun.star.util.PathSettings") + ResultPath = "" + ReadPaths = () + xUcbInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + Template_writable = xPathInterface.getPropertyValue(sPath + "_writable") + Template_internal = xPathInterface.getPropertyValue(sPath + "_internal") + Template_user = xPathInterface.getPropertyValue(sPath + "_user") + if type(Template_internal) is not types.InstanceType: + if isinstance(Template_internal,tuple): + ReadPaths = ReadPaths + Template_internal + else: + ReadPaths = ReadPaths + (Template_internal,) + if type(Template_user) is not types.InstanceType: + if isinstance(Template_user,tuple): + ReadPaths = ReadPaths + Template_user + else: + ReadPaths = ReadPaths + (Template_internal,) + ReadPaths = ReadPaths + (Template_writable,) + if sType.lower() == "user": + ResultPath = Template_writable + bexists = True + else: + #find right path using the search sub path + for i in ReadPaths: + tmpPath = i + sSearchDir + if xUcbInterface.exists(tmpPath): + ResultPath = i + bexists = True + break + + ResultPath = self.deleteLastSlashfromUrl(ResultPath) + except UnoException, exception: + traceback.print_exc() + ResultPath = "" + + if not bexists: + raise NoValidPathException (xMSF, ""); + + return ResultPath + + @classmethod + def getOfficePaths(self, xMSF, _sPath, sType, sSearchDir): + #This method currently only works with sPath="Template" + aPathList = [] + Template_writable = "" + try: + xPathInterface = xMSF.createInstance("com.sun.star.util.PathSettings") + Template_writable = xPathInterface.getPropertyValue(_sPath + "_writable") + Template_internal = xPathInterface.getPropertyValue(_sPath + "_internal") + Template_user = xPathInterface.getPropertyValue(_sPath + "_user") + i = 0 + while i < len(Template_internal): + sPath = Template_internal[i] + if sPath.startsWith("vnd."): + # if there exists a language in the directory, we try to add the right language + sPathToExpand = sPath.substring("vnd.sun.star.Expand:".length()) + xExpander = Helper.getMacroExpander(xMSF) + sPath = xExpander.expandMacros(sPathToExpand) + + sPath = checkIfLanguagePathExists(xMSF, sPath) + aPathList.add(sPath) + i += 1 + i = 0 + while i < Template_user.length: + aPathList.add(Template_user[i]) + i += 1 + aPathList.add(Template_writable) + + except UnoException, exception: + traceback.print_exc() + return aPathList + + @classmethod + def checkIfLanguagePathExists(self, _xMSF, _sPath): + try: + defaults = _xMSF.createInstance("com.sun.star.text.Defaults") + aLocale = Helper.getUnoStructValue(defaults, "CharLocale") + if aLocale == None: + java.util.Locale.getDefault() + aLocale = com.sun.star.lang.Locale.Locale() + aLocale.Country = java.util.Locale.getDefault().getCountry() + aLocale.Language = java.util.Locale.getDefault().getLanguage() + aLocale.Variant = java.util.Locale.getDefault().getVariant() + + sLanguage = aLocale.Language + sCountry = aLocale.Country + sVariant = aLocale.Variant + # de-DE-Bayrisch + aLocaleAll = StringBuffer.StringBuffer() + aLocaleAll.append(sLanguage).append('-').append(sCountry).append('-').append(sVariant) + sPath = _sPath + "/" + aLocaleAll.toString() + xInterface = _xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + if xInterface.exists(sPath): + # de-DE + return sPath + + aLocaleLang_Country = StringBuffer.StringBuffer() + aLocaleLang_Country.append(sLanguage).append('-').append(sCountry) + sPath = _sPath + "/" + aLocaleLang_Country.toString() + if xInterface.exists(sPath): + # de + return sPath + + aLocaleLang = StringBuffer.StringBuffer() + aLocaleLang.append(sLanguage) + sPath = _sPath + "/" + aLocaleLang.toString() + if xInterface.exists(sPath): + # the absolute default is en-US or en + return sPath + + sPath = _sPath + "/en-US" + if xInterface.exists(sPath): + return sPath + + sPath = _sPath + "/en" + if xInterface.exists(sPath): + return sPath + + except com.sun.star.uno.Exception, e: + pass + + return _sPath + + @classmethod + def combinePaths2(self, xMSF, _aFirstPath, _sSecondPath): + i = 0 + while i < _aFirstPath.size(): + sOnePath = _aFirstPath.get(i) + sOnePath = addPath(sOnePath, _sSecondPath) + if isPathValid(xMSF, sOnePath): + _aFirstPath.add(i, sOnePath) + _aFirstPath.remove(i + 1) + else: + _aFirstPath.remove(i) + i -= 1 + + i += 1 + + @classmethod + def isPathValid(self, xMSF, _sPath): + bExists = False + try: + xUcbInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + bExists = xUcbInterface.exists(_sPath) + except Exception, exception: + traceback.print_exc() + + return bExists + + @classmethod + def combinePaths(self, xMSF, _sFirstPath, _sSecondPath): + bexists = False + ReturnPath = "" + try: + xUcbInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + ReturnPath = _sFirstPath + _sSecondPath + bexists = xUcbInterface.exists(ReturnPath) + except Exception, exception: + traceback.print_exc() + return "" + + if not bexists: + raise NoValidPathException (xMSF, ""); + + return ReturnPath + + @classmethod + def createSubDirectory(self, xMSF, xSimpleFileAccess, Path): + sNoDirCreation = "" + try: + oResource = Resource.Resource_unknown(xMSF, "ImportWizard", "imp") + if oResource != None: + sNoDirCreation = oResource.getResText(1050) + sMsgDirNotThere = oResource.getResText(1051) + sQueryForNewCreation = oResource.getResText(1052) + OSPath = JavaTools.convertfromURLNotation(Path) + sQueryMessage = JavaTools.replaceSubString(sMsgDirNotThere, OSPath, "%1") + sQueryMessage = sQueryMessage + (char) + 13 + sQueryForNewCreation + icreate = SystemDialog.showMessageBox(xMSF, "QueryBox", VclWindowPeerAttribute.YES_NO, sQueryMessage) + if icreate == 2: + xSimpleFileAccess.createFolder(Path) + return True + + return False + except CommandAbortedException, exception: + sMsgNoDir = JavaTools.replaceSubString(sNoDirCreation, Path, "%1") + SystemDialog.showMessageBox(xMSF, "ErrorBox", VclWindowPeerAttribute.OK, sMsgNoDir) + return False + except com.sun.star.uno.Exception, unoexception: + sMsgNoDir = JavaTools.replaceSubString(sNoDirCreation, Path, "%1") + SystemDialog.showMessageBox(xMSF, "ErrorBox", VclWindowPeerAttribute.OK, sMsgNoDir) + return False + + # checks if the root of a path exists. if the parameter xWindowPeer is not null then also the directory is + # created when it does not exists and the user + + @classmethod + def PathisValid(self, xMSF, Path, sMsgFilePathInvalid, baskbeforeOverwrite): + try: + SubDirPath = "" + bSubDirexists = True + NewPath = Path + xInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + if baskbeforeOverwrite: + if xInterface.exists(Path): + oResource = Resource.Resource_unknown(xMSF, "ImportWizard", "imp") + sFileexists = oResource.getResText(1053) + NewString = JavaTools.convertfromURLNotation(Path) + sFileexists = JavaTools.replaceSubString(sFileexists, NewString, "<1>") + sFileexists = JavaTools.replaceSubString(sFileexists, String.valueOf(13), "") + iLeave = SystemDialog.showMessageBox(xMSF, "QueryBox", VclWindowPeerAttribute.YES_NO, sFileexists) + if iLeave == 3: + return False + + DirArray = JavaTools.ArrayoutofString(Path, "/") + MaxIndex = DirArray.length - 1 + if MaxIndex > 0: + i = MaxIndex + while i >= 0: + SubDir = DirArray[i] + SubLen = SubDir.length() + NewLen = NewPath.length() + RestLen = NewLen - SubLen + if RestLen > 0: + NewPath = NewPath.substring(0, NewLen - SubLen - 1) + if i == MaxIndex: + SubDirPath = NewPath + + bexists = xSimpleFileAccess.exists(NewPath) + if bexists: + LowerCasePath = NewPath.toLowerCase() + bexists = (((LowerCasePath.equals("file:#/")) or (LowerCasePath.equals("file:#")) or (LowerCasePath.equals("file:/")) or (LowerCasePath.equals("file:"))) == False) + + if bexists: + if bSubDirexists == False: + bSubDiriscreated = createSubDirectory(xMSF, xSimpleFileAccess, SubDirPath) + return bSubDiriscreated + + return True + else: + bSubDirexists = False + + i -= 1 + + SystemDialog.showMessageBox(xMSF, "ErrorBox", VclWindowPeerAttribute.OK, sMsgFilePathInvalid) + return False + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + SystemDialog.showMessageBox(xMSF, "ErrorBox", VclWindowPeerAttribute.OK, sMsgFilePathInvalid) + return False + + ''' + searches a directory for files which start with a certain + prefix, and returns their URLs and document-titles. + @param xMSF + @param FilterName the prefix of the filename. a "-" is added to the prefix ! + @param FolderName the folder (URL) to look for files... + @return an array with two array members. The first one, with document titles, + the second with the corresponding URLs. + @deprecated please use the getFolderTitles() with ArrayList + ''' + + @classmethod + def getFolderTitles(self, xMSF, FilterName, FolderName): + LocLayoutFiles = [[2],[]] + try: + TitleVector = None + NameVector = None + xDocInterface = xMSF.createInstance("com.sun.star.document.DocumentProperties") + xInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + nameList = xInterface.getFolderContents(FolderName, False) + TitleVector = [] + NameVector = [len(nameList)] + if FilterName == None or FilterName == "": + FilterName = None + else: + FilterName = FilterName + "-" + fileName = "" + for i in nameList: + fileName = self.getFilename(i) + if FilterName == None or fileName.startswith(FilterName): + xDocInterface.loadFromMedium(i, tuple()) + NameVector.append(i) + TitleVector.append(xDocInterface.Title) + + LocLayoutFiles[1] = NameVector + LocLayoutFiles[0] = TitleVector + #COMMENTED + #JavaTools.bubblesortList(LocLayoutFiles) + except Exception, exception: + traceback.print_exc() + + return LocLayoutFiles + + ''' + We search in all given path for a given file + @param _sPath + @param _sPath2 + @return + ''' + + @classmethod + def addPath(self, _sPath, _sPath2): + if not _sPath.endsWith("/"): + _sPath += "/" + + if _sPath2.startsWith("/"): + _sPath2 = _sPath2.substring(1) + + sNewPath = _sPath + _sPath2 + return sNewPath + + @classmethod + def getPathFromList(self, xMSF, _aList, _sFile): + sFoundFile = "" + try: + xInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + i = 0 + while i < _aList.size(): + sPath = _aList.get(i) + sPath = addPath(sPath, _sFile) + if xInterface.exists(sPath): + sFoundFile = sPath + + i += 1 + except com.sun.star.uno.Exception, e: + pass + + return sFoundFile + + @classmethod + def getTitle(self, xMSF, _sFile): + sTitle = "" + try: + xDocInterface = xMSF.createInstance("com.sun.star.document.DocumentProperties") + noArgs = [] + xDocInterface.loadFromMedium(_sFile, noArgs) + sTitle = xDocInterface.getTitle() + except Exception, e: + traceback.print_exc() + + return sTitle + + @classmethod + def getFolderTitles2(self, xMSF, _sStartFilterName, FolderName, _sEndFilterName=""): + LocLayoutFiles = [[2],[]] + if FolderName.size() == 0: + raise NoValidPathException (None, "Path not given."); + + TitleVector = [] + URLVector = [] + xInterface = None + try: + xInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + except com.sun.star.uno.Exception, e: + traceback.print_exc() + raise NoValidPathException (None, "Internal error."); + + j = 0 + while j < FolderName.size(): + sFolderName = FolderName.get(j) + try: + nameList = xInterface.getFolderContents(sFolderName, False) + if _sStartFilterName == None or _sStartFilterName.equals(""): + _sStartFilterName = None + else: + _sStartFilterName = _sStartFilterName + "-" + + fileName = "" + i = 0 + while i < nameList.length: + fileName = self.getFilename(i) + if _sStartFilterName == None or fileName.startsWith(_sStartFilterName): + if _sEndFilterName.equals(""): + sTitle = getTitle(xMSF, nameList[i]) + elif fileName.endsWith(_sEndFilterName): + fileName = fileName.replaceAll(_sEndFilterName + "$", "") + sTitle = fileName + else: + # no or wrong (start|end) filter + continue + + URLVector.add(nameList[i]) + TitleVector.add(sTitle) + + i += 1 + except CommandAbortedException, exception: + traceback.print_exc() + except com.sun.star.uno.Exception, e: + pass + + j += 1 + LocNameList = [URLVector.size()] + LocTitleList = [TitleVector.size()] + # LLA: we have to check if this works + URLVector.toArray(LocNameList) + + TitleVector.toArray(LocTitleList) + + LocLayoutFiles[1] = LocNameList + LocLayoutFiles[0] = LocTitleList + + #COMMENTED + #JavaTools.bubblesortList(LocLayoutFiles); + return LocLayoutFiles + + def __init__(self, xmsf): + #get a simple file access... + self.fileAccess = xmsf.createInstance("com.sun.star.ucb.SimpleFileAccess") + #get the file identifier converter + self.filenameConverter = xmsf.createInstance("com.sun.star.ucb.FileContentProvider") + + def getURL(self, parentPath, childPath): + parent = self.filenameConverter.getSystemPathFromFileURL(parentPath) + f = File.File_unknown(parent, childPath) + r = self.filenameConverter.getFileURLFromSystemPath(parentPath, f.getAbsolutePath()) + return r + + def getURL(self, path): + f = File.File_unknown(path) + r = self.filenameConverter.getFileURLFromSystemPath(path, f.getAbsolutePath()) + return r + + def getPath(self, parentURL, childURL): + string = "" + if childURL is not None and childURL is not "": + string = "/" + childURL + return self.filenameConverter.getSystemPathFromFileURL(parentURL + string) + + ''' + @author rpiterman + @param filename + @return the extension of the given filename. + ''' + + @classmethod + def getExtension(self, filename): + p = filename.indexOf(".") + if p == -1: + return "" + else: + while p > -1: + filename = filename.substring(p + 1) + p = filename.indexOf(".") + + return filename + + ''' + @author rpiterman + @param s + @return + ''' + + def mkdir(self, s): + try: + self.fileAccess.createFolder(s) + return True + except CommandAbortedException, cax: + traceback.print_exc() + except com.sun.star.uno.Exception, ex: + traceback.print_exc() + + return False + + ''' + @author rpiterman + @param filename + @param def what to return in case of an exception + @return true if the given file exists or not. + if an exception accures, returns the def value. + ''' + + def exists(self, filename, defe): + try: + return self.fileAccess.exists(filename) + except CommandAbortedException, cax: + pass + except com.sun.star.uno.Exception, ex: + pass + + return defe + + ''' + @author rpiterman + @param filename + @return + ''' + + def isDirectory(self, filename): + try: + return self.fileAccess.isFolder(filename) + except CommandAbortedException, cax: + pass + except com.sun.star.uno.Exception, ex: + pass + + return False + + ''' + lists the files in a given directory + @author rpiterman + @param dir + @param includeFolders + @return + ''' + + def listFiles(self, dir, includeFolders): + try: + return self.fileAccess.getFolderContents(dir, includeFolders) + except CommandAbortedException, cax: + pass + except com.sun.star.uno.Exception, ex: + pass + + return range(0) + + ''' + @author rpiterman + @param file + @return + ''' + + def delete(self, file): + try: + self.fileAccess.kill(file) + return True + except CommandAbortedException, cax: + traceback.print_exc() + except com.sun.star.uno.Exception, ex: + traceback.print_exc() + + return False + + + ''' + return the filename out of a system-dependent path + @param path + @return + ''' + + @classmethod + def getPathFilename(self, path): + return self.getFilename(path, File.separator) + + ''' + @author rpiterman + @param path + @param pathSeparator + @return + ''' + + @classmethod + def getFilename(self, path, pathSeparator = "/"): + return path.split(pathSeparator)[-1] + + @classmethod + def getBasename(self, path, pathSeparator): + filename = self.getFilename(path, pathSeparator) + sExtension = getExtension(filename) + basename = filename.substring(0, filename.length() - (sExtension.length() + 1)) + return basename + + ''' + @author rpiterman + @param source + @param target + @return + ''' + + def copy(self, source, target): + try: + self.fileAccess.copy(source, target) + return True + except CommandAbortedException, cax: + pass + except com.sun.star.uno.Exception, ex: + pass + + return False + + def getLastModified(self, url): + try: + return self.fileAccess.getDateTimeModified(url) + except CommandAbortedException, cax: + pass + except com.sun.star.uno.Exception, ex: + pass + + return None + + ''' + @param url + @return the parent dir of the given url. + if the path points to file, gives the directory in which the file is. + ''' + + @classmethod + def getParentDir(self, url): + if url.endsWith("/"): + return getParentDir(url.substring(0, url.length() - 1)) + + pos = url.indexOf("/", pos + 1) + lastPos = 0 + while pos > -1: + lastPos = pos + pos = url.indexOf("/", pos + 1) + return url.substring(0, lastPos) + + def createNewDir(self, parentDir, name): + s = getNewFile(parentDir, name, "") + if mkdir(s): + return s + else: + return None + + def getNewFile(self, parentDir, name, extension): + i = 0 + tmp_do_var2 = True + while tmp_do_var2: + filename = filename(name, extension, (i + 1)) + u = getURL(parentDir, filename) + url = u + tmp_do_var2 = exists(url, True) + return url + + @classmethod + def filename(self, name, ext, i): + stringI = "" + stringExt = "" + if i is not 0: + stringI = str(i) + if ext is not "": + stringExt = "." + ext + + return name + stringI + StringExt + + def getSize(self, url): + try: + return self.fileAccess.getSize(url) + except Exception, ex: + return -1 + + @classmethod + def connectURLs(self, urlFolder, urlFilename): + stringFolder = "" + stringFileName = urlFilename + if not urlFolder.endsWith("/"): + stringFolder = "/" + if urlFilename.startsWith("/"): + stringFileName = urlFilename.substring(1) + return urlFolder + stringFolder + stringFileName + + @classmethod + def getDataFromTextFile(self, _xMSF, _filepath): + sFileData = None + try: + oDataVector = [] + oSimpleFileAccess = _xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + if oSimpleFileAccess.exists(_filepath): + xInputStream = oSimpleFileAccess.openFileRead(_filepath) + oTextInputStream = _xMSF.createInstance("com.sun.star.io.TextInputStream") + oTextInputStream.setInputStream(xInputStream) + while not oTextInputStream.isEOF(): + oDataVector.addElement(oTextInputStream.readLine()) + oTextInputStream.closeInput() + sFileData = [oDataVector.size()] + oDataVector.toArray(sFileData) + + except Exception, e: + traceback.print_exc() + + return sFileData + + ''' + shortens a filename to a user displayable representation. + @param path + @param maxLength + @return + ''' + + @classmethod + def getShortFilename(self, path, maxLength): + firstPart = 0 + if path.length() > maxLength: + if path.startsWith("/"): + # unix + nextSlash = path.indexOf("/", 1) + 1 + firstPart = Math.min(nextSlash, (maxLength - 3) / 2) + else: + #windows + firstPart = Math.min(10, (maxLength - 3) / 2) + + s1 = path.substring(0, firstPart) + s2 = path.substring(path.length() - (maxLength - (3 + firstPart))) + return s1 + "..." + s2 + else: + return path + diff --git a/wizards/com/sun/star/wizards/common/HelpIds.py b/wizards/com/sun/star/wizards/common/HelpIds.py new file mode 100644 index 000000000..ff939c3fa --- /dev/null +++ b/wizards/com/sun/star/wizards/common/HelpIds.py @@ -0,0 +1,1013 @@ +class HelpIds: + array1 = [ + "HID:WIZARDS_HID0_WEBWIZARD", # HID:34200 + "HID:WIZARDS_HID0_HELP", # HID:34201 + "HID:WIZARDS_HID0_NEXT", # HID:34202 + "HID:WIZARDS_HID0_PREV", # HID:34203 + "HID:WIZARDS_HID0_CREATE", # HID:34204 + "HID:WIZARDS_HID0_CANCEL", # HID:34205 + "HID:WIZARDS_HID0_STATUS_DIALOG", # HID:34206 + "HID:WIZARDS_HID1_LST_SESSIONS", # HID:34207 + "", + "HID:WIZARDS_HID1_BTN_DEL_SES", # HID:34209 + "HID:WIZARDS_HID2_LST_DOCS", # HID:34210 + "HID:WIZARDS_HID2_BTN_ADD_DOC", # HID:34211 + "HID:WIZARDS_HID2_BTN_REM_DOC", # HID:34212 + "HID:WIZARDS_HID2_BTN_DOC_UP", # HID:34213 + "HID:WIZARDS_HID2_BTN_DOC_DOWN", # HID:34214 + "HID:WIZARDS_HID2_TXT_DOC_TITLE", # HID:34215 + "HID:WIZARDS_HID2_TXT_DOC_DESC", # HID:34216 + "HID:WIZARDS_HID2_TXT_DOC_AUTHOR", # HID:34217 + "HID:WIZARDS_HID2_LST_DOC_EXPORT", # HID:34218 + "HID:WIZARDS_HID2_STATUS_ADD_DOCS", # HID:34219 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG1", # HID:34220 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG2", # HID:34221 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG3", # HID:34222 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG4", # HID:34223 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG5", # HID:34224 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG6", # HID:34225 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG7", # HID:34226 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG8", # HID:34227 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG9", # HID:34228 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG10", # HID:34229 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG11", # HID:34230 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG12", # HID:34231 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG13", # HID:34232 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG14", # HID:34233 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG15", # HID:34234 + "HID:WIZARDS_HID4_CHK_DISPLAY_FILENAME", # HID:34235 + "HID:WIZARDS_HID4_CHK_DISPLAY_DESCRIPTION", # HID:34236 + "HID:WIZARDS_HID4_CHK_DISPLAY_AUTHOR", # HID:34237 + "HID:WIZARDS_HID4_CHK_DISPLAY_CR_DATE", # HID:34238 + "HID:WIZARDS_HID4_CHK_DISPLAY_UP_DATE", # HID:34239 + "HID:WIZARDS_HID4_CHK_DISPLAY_FORMAT", # HID:34240 + "HID:WIZARDS_HID4_CHK_DISPLAY_F_ICON", # HID:34241 + "HID:WIZARDS_HID4_CHK_DISPLAY_PAGES", # HID:34242 + "HID:WIZARDS_HID4_CHK_DISPLAY_SIZE", # HID:34243 + "HID:WIZARDS_HID4_GRP_OPTIMAIZE_640", # HID:34244 + "HID:WIZARDS_HID4_GRP_OPTIMAIZE_800", # HID:34245 + "HID:WIZARDS_HID4_GRP_OPTIMAIZE_1024", # HID:34246 + "HID:WIZARDS_HID5_LST_STYLES", # HID:34247 + "HID:WIZARDS_HID5_BTN_BACKGND", # HID:34248 + "HID:WIZARDS_HID5_BTN_ICONS", # HID:34249 + "HID:WIZARDS_HID6_TXT_SITE_TITLE", # HID:34250 + "", + "", + "HID:WIZARDS_HID6_TXT_SITE_DESC", # HID:34253 + "", + "HID:WIZARDS_HID6_DATE_SITE_CREATED", # HID:34255 + "HID:WIZARDS_HID6_DATE_SITE_UPDATED", # HID:34256 + "", + "HID:WIZARDS_HID6_TXT_SITE_EMAIL", # HID:34258 + "HID:WIZARDS_HID6_TXT_SITE_COPYRIGHT", # HID:34259 + "HID:WIZARDS_HID7_BTN_PREVIEW", # HID:34260 + "HID:WIZARDS_HID7_CHK_PUBLISH_LOCAL", # HID:34261 + "HID:WIZARDS_HID7_TXT_LOCAL", # HID:34262 + "HID:WIZARDS_HID7_BTN_LOCAL", # HID:34263 + "HID:WIZARDS_HID7_CHK_PUBLISH_ZIP", # HID:34264 + "HID:WIZARDS_HID7_TXT_ZIP", # HID:34265 + "HID:WIZARDS_HID7_BTN_ZIP", # HID:34266 + "HID:WIZARDS_HID7_CHK_PUBLISH_FTP", # HID:34267 + "HID:WIZARDS_HID7_TXT_FTP", # HID:34268 + "HID:WIZARDS_HID7_BTN_FTP", # HID:34269 + "HID:WIZARDS_HID7_CHK_SAVE", # HID:34270 + "HID:WIZARDS_HID7_TXT_SAVE", # HID:34271 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_BG", # HID:34290 + "HID:WIZARDS_HID_BG_BTN_OTHER", # HID:34291 + "HID:WIZARDS_HID_BG_BTN_NONE", # HID:34292 + "HID:WIZARDS_HID_BG_BTN_OK", # HID:34293 + "HID:WIZARDS_HID_BG_BTN_CANCEL", # HID:34294 + "HID:WIZARDS_HID_BG_BTN_BACK", # HID:34295 + "HID:WIZARDS_HID_BG_BTN_FW", # HID:34296 + "HID:WIZARDS_HID_BG_BTN_IMG1", # HID:34297 + "HID:WIZARDS_HID_BG_BTN_IMG2", # HID:34298 + "HID:WIZARDS_HID_BG_BTN_IMG3", # HID:34299 + "HID:WIZARDS_HID_BG_BTN_IMG4", # HID:34300 + "HID:WIZARDS_HID_BG_BTN_IMG5", # HID:34301 + "HID:WIZARDS_HID_BG_BTN_IMG6", # HID:34302 + "HID:WIZARDS_HID_BG_BTN_IMG7", # HID:34303 + "HID:WIZARDS_HID_BG_BTN_IMG8", # HID:34304 + "HID:WIZARDS_HID_BG_BTN_IMG9", # HID:34305 + "HID:WIZARDS_HID_BG_BTN_IMG10", # HID:34306 + "HID:WIZARDS_HID_BG_BTN_IMG11", # HID:34307 + "HID:WIZARDS_HID_BG_BTN_IMG12", # HID:34308 + "HID:WIZARDS_HID_BG_BTN_IMG13", # HID:34309 + "HID:WIZARDS_HID_BG_BTN_IMG14", # HID:34300 + "HID:WIZARDS_HID_BG_BTN_IMG15", # HID:34311 + "HID:WIZARDS_HID_BG_BTN_IMG16", # HID:34312 + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGREPORT_DIALOG", # HID:34320 + "", + "HID:WIZARDS_HID_DLGREPORT_0_CMDPREV", # HID:34322 + "HID:WIZARDS_HID_DLGREPORT_0_CMDNEXT", # HID:34323 + "HID:WIZARDS_HID_DLGREPORT_0_CMDFINISH", # HID:34324 + "HID:WIZARDS_HID_DLGREPORT_0_CMDCANCEL", # HID:34325 + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGREPORT_1_LBTABLES", # HID:34330 + "HID:WIZARDS_HID_DLGREPORT_1_FIELDSAVAILABLE", # HID:34331 + "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVESELECTED", # HID:34332 + "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEALL", # HID:34333 + "HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVESELECTED", # HID:34334 + "HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVEALL", # HID:34335 + "HID:WIZARDS_HID_DLGREPORT_1_FIELDSSELECTED", # HID:34336 + "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEUP", # HID:34337 + "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEDOWN", # HID:34338 + "", + "HID:WIZARDS_HID_DLGREPORT_2_GROUPING", # HID:34340 + "HID:WIZARDS_HID_DLGREPORT_2_CMDGROUP", # HID:34341 + "HID:WIZARDS_HID_DLGREPORT_2_CMDUNGROUP", # HID:34342 + "HID:WIZARDS_HID_DLGREPORT_2_PREGROUPINGDEST", # HID:34343 + "HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEUPGROUP", # HID:34344 + "HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEDOWNGROUP", # HID:34345 + "HID:WIZARDS_HID_DLGREPORT_3_SORT1", # HID:34346 + "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND1", # HID:34347 + "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND1", # HID:34348 + "HID:WIZARDS_HID_DLGREPORT_3_SORT2", # HID:34349 + "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND2", # HID:34350 + "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND2", # HID:34351 + "HID:WIZARDS_HID_DLGREPORT_3_SORT3", # HID:34352 + "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND3", # HID:34353 + "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND3", # HID:34354 + "HID:WIZARDS_HID_DLGREPORT_3_SORT4", # HID:34355 + "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND4", # HID:34356 + "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND4", # HID:34357 + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGREPORT_4_TITLE", # HID:34362 + "HID:WIZARDS_HID_DLGREPORT_4_DATALAYOUT", # HID:34363 + "HID:WIZARDS_HID_DLGREPORT_4_PAGELAYOUT", # HID:34364 + "HID:WIZARDS_HID_DLGREPORT_4_LANDSCAPE", # HID:34365 + "HID:WIZARDS_HID_DLGREPORT_4_PORTRAIT", # HID:34366 + "", + "", + "", + "HID:WIZARDS_HID_DLGREPORT_5_OPTDYNTEMPLATE", # HID:34370 + "HID:WIZARDS_HID_DLGREPORT_5_OPTSTATDOCUMENT", # HID:34371 + "HID:WIZARDS_HID_DLGREPORT_5_TXTTEMPLATEPATH", # HID:34372 + "HID:WIZARDS_HID_DLGREPORT_5_CMDTEMPLATEPATH", # HID:34373 + "HID:WIZARDS_HID_DLGREPORT_5_OPTEDITTEMPLATE", # HID:34374 + "HID:WIZARDS_HID_DLGREPORT_5_OPTUSETEMPLATE", # HID:34375 + "HID:WIZARDS_HID_DLGREPORT_5_TXTDOCUMENTPATH", # HID:34376 + "HID:WIZARDS_HID_DLGREPORT_5_CMDDOCUMENTPATH", # HID:34377 + "HID:WIZARDS_HID_DLGREPORT_5_CHKLINKTODB", # HID:34378 + "", + "", + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_1", # HID:34381 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_2", # HID:34382 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_3", # HID:34383 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_4", # HID:34384 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_5", # HID:34385 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_6", # HID:34386 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_7", # HID:34387 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGFORM_DIALOG", # HID:34400 + "", + "HID:WIZARDS_HID_DLGFORM_CMDPREV", # HID:34402 + "HID:WIZARDS_HID_DLGFORM_CMDNEXT", # HID:34403 + "HID:WIZARDS_HID_DLGFORM_CMDFINISH", # HID:34404 + "HID:WIZARDS_HID_DLGFORM_CMDCANCEL", # HID:34405 + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGFORM_MASTER_LBTABLES", # HID:34411 + "HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSAVAILABLE", # HID:34412 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVESELECTED", # HID:34413 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEALL", # HID:34414 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVESELECTED", # HID:34415 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVEALL", # HID:34416 + "HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSSELECTED", # HID:34417 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEUP", # HID:34418 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEDOWN", # HID:34419 + "", + "HID:WIZARDS_HID_DLGFORM_CHKCREATESUBFORM", # HID:34421 + "HID:WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION", # HID:34422 + "HID:WIZARDS_HID_DLGFORM_OPTSELECTMANUALLY", # HID:34423 + "HID:WIZARDS_HID_DLGFORM_lstRELATIONS", # HID:34424 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGFORM_SUB_LBTABLES", # HID:34431 + "HID:WIZARDS_HID_DLGFORM_SUB_FIELDSAVAILABLE", # HID:34432 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVESELECTED", # HID:34433 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEALL", # HID:34434 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVESELECTED", # HID:34435 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVEALL", # HID:34436 + "HID:WIZARDS_HID_DLGFORM_SUB_FIELDSSELECTED", # HID:34437 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEUP", # HID:34438 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEDOWN", # HID:34439 + "", + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK1", # HID:34441 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK1", # HID:34442 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK2", # HID:34443 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK2", # HID:34444 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK3", # HID:34445 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK3", # HID:34446 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK4", # HID:34447 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK4", # HID:34448 + "", + "", + "HID:WIZARDS_HID_DLGFORM_CMDALIGNLEFT", # HID:34451 + "HID:WIZARDS_HID_DLGFORM_CMDALIGNRIGHT", # HID:34452 + "HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED", # HID:34453 + "HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED", # HID:34454 + "HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE", # HID:34455 + "HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED", # HID:34456 + "HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED2", # HID:34457 + "HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED2", # HID:34458 + "HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE2", # HID:34459 + "HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED2", # HID:34460 + "HID:WIZARDS_HID_DLGFORM_OPTNEWDATAONLY", # HID:34461 + "HID:WIZARDS_HID_DLGFORM_OPTDISPLAYALLDATA", # HID:34462 + "HID:WIZARDS_HID_DLGFORM_CHKNOMODIFICATION", # HID:34463 + "HID:WIZARDS_HID_DLGFORM_CHKNODELETION", # HID:34464 + "HID:WIZARDS_HID_DLGFORM_CHKNOADDITION", # HID:34465 + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGFORM_LSTSTYLES", # HID:34471 + "HID:WIZARDS_HID_DLGFORM_CMDNOBORDER", # HID:34472 + "HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", # HID:34473 + "HID:WIZARDS_HID_DLGFORM_CMDSIMPLEBORDER", # HID:34474 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGFORM_TXTPATH", # HID:34481 + "HID:WIZARDS_HID_DLGFORM_OPTWORKWITHFORM", # HID:34482 + "HID:WIZARDS_HID_DLGFORM_OPTMODIFYFORM", # HID:34483 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGNEWSLTR_DIALOG", # HID:34500 + "HID:WIZARDS_HID_DLGNEWSLTR_OPTSTANDARDLAYOUT", # HID:34501 + "HID:WIZARDS_HID_DLGNEWSLTR_OPTPARTYLAYOUT", # HID:34502 + "HID:WIZARDS_HID_DLGNEWSLTR_OPTBROCHURELAYOUT", # HID:34503 + "HID:WIZARDS_HID_DLGNEWSLTR_OPTSINGLESIDED", # HID:34504 + "HID:WIZARDS_HID_DLGNEWSLTR_OPTDOUBLESIDED", # HID:34505 + "HID:WIZARDS_HID_DLGNEWSLTR_CMDGOON", # HID:34506 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGDEPOT_DIALOG_SELLBUY", # HID:34520 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SELLBUY", # HID:34521 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTQUANTITY", # HID:34522 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTRATE", # HID:34523 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTDATE", # HID:34524 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTCOMMISSION", # HID:34525 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTFIX", # HID:34526 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTMINIMUM", # HID:34527 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SELLBUY", # HID:34528 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SELLBUY", # HID:34529 + "HID:WIZARDS_HID_DLGDEPOT_1_LSTSELLSTOCKS", # HID:34530 + "HID:WIZARDS_HID_DLGDEPOT_2_LSTBUYSTOCKS", # HID:34531 + "HID:WIZARDS_HID_DLGDEPOT_DIALOG_SPLIT", # HID:34532 + "HID:WIZARDS_HID_DLGDEPOT_0_LSTSTOCKNAMES", # HID:34533 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SPLIT", # HID:34534 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SPLIT", # HID:34535 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SPLIT", # HID:34536 + "HID:WIZARDS_HID_DLGDEPOT_1_OPTPERSHARE", # HID:34537 + "HID:WIZARDS_HID_DLGDEPOT_1_OPTTOTAL", # HID:34538 + "HID:WIZARDS_HID_DLGDEPOT_1_TXTDIVIDEND", # HID:34539 + "HID:WIZARDS_HID_DLGDEPOT_2_TXTOLDRATE", # HID:34540 + "HID:WIZARDS_HID_DLGDEPOT_2_TXTNEWRATE", # HID:34541 + "HID:WIZARDS_HID_DLGDEPOT_2_TXTDATE", # HID:34542 + "HID:WIZARDS_HID_DLGDEPOT_3_TXTSTARTDATE", # HID:34543 + "HID:WIZARDS_HID_DLGDEPOT_3_TXTENDDATE", # HID:34544 + "HID:WIZARDS_HID_DLGDEPOT_3_OPTDAILY", # HID:34545 + "HID:WIZARDS_HID_DLGDEPOT_3_OPTWEEKLY", # HID:34546 + "HID:WIZARDS_HID_DLGDEPOT_DIALOG_HISTORY", # HID:34547 + "HID:WIZARDS_HID_DLGDEPOT_LSTMARKETS", # HID:34548 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_HISTORY", # HID:34549 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_HISTORY", # HID:34550 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGIMPORT_DIALOG", # HID:34570 + "HID:WIZARDS_HID_DLGIMPORT_0_CMDHELP", # HID:34571 + "HID:WIZARDS_HID_DLGIMPORT_0_CMDCANCEL", # HID:34572 + "HID:WIZARDS_HID_DLGIMPORT_0_CMDPREV", # HID:34573 + "HID:WIZARDS_HID_DLGIMPORT_0_CMDNEXT", # HID:34574 + "HID:WIZARDS_HID_DLGIMPORT_0_OPTSODOCUMENTS", # HID:34575 + "HID:WIZARDS_HID_DLGIMPORT_0_OPTMSDOCUMENTS", # HID:34576 + "HID:WIZARDS_HID_DLGIMPORT_0_CHKLOGFILE", # HID:34577 + "HID:WIZARDS_HID_DLGIMPORT_2_CHKWORD", # HID:34578 + "HID:WIZARDS_HID_DLGIMPORT_2_CHKEXCEL", # HID:34579 + "HID:WIZARDS_HID_DLGIMPORT_2_CHKPOWERPOINT", # HID:34580 + "HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATE", # HID:34581 + "HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATERECURSE", # HID:34582 + "HID:WIZARDS_HID_DLGIMPORT_2_LBTEMPLATEPATH", # HID:34583 + "HID:WIZARDS_HID_DLGIMPORT_2_EDTEMPLATEPATH", # HID:34584 + "HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT", # HID:34585 + "HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENT", # HID:34586 + "HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENTRECURSE", # HID:34587 + "HID:WIZARDS_HID_DLGIMPORT_2_LBDOCUMENTPATH", # HID:34588 + "HID:WIZARDS_HID_DLGIMPORT_2_EDDOCUMENTPATH", # HID:34589 + "HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT", # HID:34590 + "HID:WIZARDS_HID_DLGIMPORT_2_LBEXPORTDOCUMENTPATH", # HID:34591 + "HID:WIZARDS_HID_DLGIMPORT_2_EDEXPORTDOCUMENTPATH", # HID:34592 + "HID:WIZARDS_HID_DLGIMPORT_2_CMDEXPORTPATHSELECT", # HID:34593 + "", + "HID:WIZARDS_HID_DLGIMPORT_3_TBSUMMARY", # HID:34595 + "HID:WIZARDS_HID_DLGIMPORT_0_CHKWRITER", # HID:34596 + "HID:WIZARDS_HID_DLGIMPORT_0_CHKCALC", # HID:34597 + "HID:WIZARDS_HID_DLGIMPORT_0_CHKIMPRESS", # HID:34598 + "HID:WIZARDS_HID_DLGIMPORT_0_CHKMATHGLOBAL", # HID:34599 + "HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT2", # HID:34600 + "HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT2", # HID:34601 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGCORRESPONDENCE_DIALOG", # HID:34630 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_CANCEL", # HID:34631 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA1", # HID:34632 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA2", # HID:34633 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_AGENDAOKAY", # HID:34634 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER1", # HID:34635 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER2", # HID:34636 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_LETTEROKAY", # HID:34637 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGSTYLES_DIALOG", # HID:34650 + "HID:WIZARDS_HID_DLGSTYLES_LISTBOX", # HID:34651 + "HID:WIZARDS_HID_DLGSTYLES_CANCEL", # HID:34652 + "HID:WIZARDS_HID_DLGSTYLES_OKAY", # HID:34653 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGCONVERT_DIALOG", # HID:34660 + "HID:WIZARDS_HID_DLGCONVERT_CHECKBOX1", # HID:34661 + "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON1", # HID:34662 + "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON2", # HID:34663 + "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON3", # HID:34664 + "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON4", # HID:34665 + "HID:WIZARDS_HID_DLGCONVERT_LISTBOX1", # HID:34666 + "HID:WIZARDS_HID_DLGCONVERT_OBFILE", # HID:34667 + "HID:WIZARDS_HID_DLGCONVERT_OBDIR", # HID:34668 + "HID:WIZARDS_HID_DLGCONVERT_COMBOBOX1", # HID:34669 + "HID:WIZARDS_HID_DLGCONVERT_TBSOURCE", # HID:34670 + "HID:WIZARDS_HID_DLGCONVERT_CHECKRECURSIVE", # HID:34671 + "HID:WIZARDS_HID_DLGCONVERT_TBTARGET", # HID:34672 + "HID:WIZARDS_HID_DLGCONVERT_CBCANCEL", # HID:34673 + "HID:WIZARDS_HID_DLGCONVERT_CBHELP", # HID:34674 + "HID:WIZARDS_HID_DLGCONVERT_CBBACK", # HID:34675 + "HID:WIZARDS_HID_DLGCONVERT_CBGOON", # HID:34676 + "HID:WIZARDS_HID_DLGCONVERT_CBSOURCEOPEN", # HID:34677 + "HID:WIZARDS_HID_DLGCONVERT_CBTARGETOPEN", # HID:34678 + "HID:WIZARDS_HID_DLGCONVERT_CHKPROTECT", # HID:34679 + "HID:WIZARDS_HID_DLGCONVERT_CHKTEXTDOCUMENTS", # HID:34680 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGPASSWORD_CMDGOON", # HID:34690 + "HID:WIZARDS_HID_DLGPASSWORD_CMDCANCEL", # HID:34691 + "HID:WIZARDS_HID_DLGPASSWORD_CMDHELP", # HID:34692 + "HID:WIZARDS_HID_DLGPASSWORD_TXTPASSWORD", # HID:34693 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGHOLIDAYCAL_DIALOG", # HID:34700 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_PREVIEW", # HID:34701 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPYEAR", # HID:34702 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPMONTH", # HID:34703 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDYEAR", # HID:34704 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDMONTH", # HID:34705 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINYEAR", # HID:34706 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINMONTH", # HID:34707 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_CMBSTATE", # HID:34708 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_LBOWNDATA", # HID:34709 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDINSERT", # HID:34710 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDDELETE", # HID:34711 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENT", # HID:34712 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CHKEVENT", # HID:34713 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTDAY", # HID:34714 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTDAY", # HID:34715 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTMONTH", # HID:34716 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTMONTH", # HID:34717 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTYEAR", # HID:34718 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTYEAR", # HID:34719 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOWNDATA", # HID:34720 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDCANCEL", # HID:34721 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOK" # HID:34722 + ] + array2 = ["HID:WIZARDS_HID_LTRWIZ_OPTBUSINESSLETTER", # HID:40769 + "HID:WIZARDS_HID_LTRWIZ_OPTPRIVOFFICIALLETTER", # HID:40770 + "HID:WIZARDS_HID_LTRWIZ_OPTPRIVATELETTER", # HID:40771 + "HID:WIZARDS_HID_LTRWIZ_LSTBUSINESSSTYLE", # HID:40772 + "HID:WIZARDS_HID_LTRWIZ_CHKBUSINESSPAPER", # HID:40773 + "HID:WIZARDS_HID_LTRWIZ_LSTPRIVOFFICIALSTYLE", # HID:40774 + "HID:WIZARDS_HID_LTRWIZ_LSTPRIVATESTYLE", # HID:40775 + "HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYLOGO", # HID:40776 + "HID:WIZARDS_HID_LTRWIZ_NUMLOGOHEIGHT", # HID:40777 + "HID:WIZARDS_HID_LTRWIZ_NUMLOGOX", # HID:40778 + "HID:WIZARDS_HID_LTRWIZ_NUMLOGOWIDTH", # HID:40779 + "HID:WIZARDS_HID_LTRWIZ_NUMLOGOY", # HID:40780 + "HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYADDRESS", # HID:40781 + "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSHEIGHT", # HID:40782 + "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSX", # HID:40783 + "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSWIDTH", # HID:40784 + "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSY", # HID:40785 + "HID:WIZARDS_HID_LTRWIZ_CHKCOMPANYRECEIVER", # HID:40786 + "HID:WIZARDS_HID_LTRWIZ_CHKPAPERFOOTER", # HID:40787 + "HID:WIZARDS_HID_LTRWIZ_NUMFOOTERHEIGHT", # HID:40788 + "HID:WIZARDS_HID_LTRWIZ_LSTLETTERNORM", # HID:40789 + "HID:WIZARDS_HID_LTRWIZ_CHKUSELOGO", # HID:40790 + "HID:WIZARDS_HID_LTRWIZ_CHKUSEADDRESSRECEIVER", # HID:40791 + "HID:WIZARDS_HID_LTRWIZ_CHKUSESIGNS", # HID:40792 + "HID:WIZARDS_HID_LTRWIZ_CHKUSESUBJECT", # HID:40793 + "HID:WIZARDS_HID_LTRWIZ_CHKUSESALUTATION", # HID:40794 + "HID:WIZARDS_HID_LTRWIZ_LSTSALUTATION", # HID:40795 + "HID:WIZARDS_HID_LTRWIZ_CHKUSEBENDMARKS", # HID:40796 + "HID:WIZARDS_HID_LTRWIZ_CHKUSEGREETING", # HID:40797 + "HID:WIZARDS_HID_LTRWIZ_LSTGREETING", # HID:40798 + "HID:WIZARDS_HID_LTRWIZ_CHKUSEFOOTER", # HID:40799 + "HID:WIZARDS_HID_LTRWIZ_OPTSENDERPLACEHOLDER", # HID:40800 + "HID:WIZARDS_HID_LTRWIZ_OPTSENDERDEFINE", # HID:40801 + "HID:WIZARDS_HID_LTRWIZ_TXTSENDERNAME", # HID:40802 + "HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTREET", # HID:40803 + "HID:WIZARDS_HID_LTRWIZ_TXTSENDERPOSTCODE", # HID:40804 + "HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTATE_TEXT", # HID:40805 + "HID:WIZARDS_HID_LTRWIZ_TXTSENDERCITY", # HID:40806 + "HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERPLACEHOLDER", # HID:40807 + "HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERDATABASE", # HID:40808 + "HID:WIZARDS_HID_LTRWIZ_TXTFOOTER", # HID:40809 + "HID:WIZARDS_HID_LTRWIZ_CHKFOOTERNEXTPAGES", # HID:40810 + "HID:WIZARDS_HID_LTRWIZ_CHKFOOTERPAGENUMBERS", # HID:40811 + "HID:WIZARDS_HID_LTRWIZ_TXTTEMPLATENAME", # HID:40812 + "HID:WIZARDS_HID_LTRWIZ_OPTCREATELETTER", # HID:40813 + "HID:WIZARDS_HID_LTRWIZ_OPTMAKECHANGES", # HID:40814 + "HID:WIZARDS_HID_LTRWIZ_TXTPATH", # HID:40815 + "HID:WIZARDS_HID_LTRWIZ_CMDPATH", # HID:40816 + "", + "", + "", + "HID:WIZARDS_HID_LTRWIZARD", # HID:40820 + "HID:WIZARDS_HID_LTRWIZARD_HELP", # HID:40821 + "HID:WIZARDS_HID_LTRWIZARD_BACK", # HID:40822 + "HID:WIZARDS_HID_LTRWIZARD_NEXT", # HID:40823 + "HID:WIZARDS_HID_LTRWIZARD_CREATE", # HID:40824 + "HID:WIZARDS_HID_LTRWIZARD_CANCEL", # HID:40825 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_LSTTABLES", # HID:40850 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDS", # HID:40851 + "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVESELECTED", # HID:40852 + "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEALL", # HID:40853 + "HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVESELECTED", # HID:40854 + "HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVEALL", # HID:40855 + "HID:WIZARDS_HID_QUERYWIZARD_LSTSELFIELDS", # HID:40856 + "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEUP", # HID:40857 + "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEDOWN", # HID:40858 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_SORT1", # HID:40865 + "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND1", # HID:40866 + "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND1", # HID:40867 + "HID:WIZARDS_HID_QUERYWIZARD_SORT2", # HID:40868 + "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND2", # HID:40869 + "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND2", # HID:40870 + "HID:WIZARDS_HID_QUERYWIZARD_SORT3", # HID:40871 + "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND3", # HID:40872 + "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND3", # HID:40873 + "HID:WIZARDS_HID_QUERYWIZARD_SORT4", # HID:40874 + "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND4", # HID:40875 + "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND4", # HID:40876 + "", + "HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHALL", # HID:40878 + "HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHANY", # HID:40879 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_1", # HID:40880 + "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_1", # HID:40881 + "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_1", # HID:40882 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_2", # HID:40883 + "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_2", # HID:40884 + "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_2", # HID:40885 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_3", # HID:40886 + "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_3", # HID:40887 + "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_3", # HID:40888 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATEDETAILQUERY", # HID:40895 + "HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATESUMMARYQUERY", # HID:40896 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_1", # HID:40897 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_1", # HID:40898 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_2", # HID:40899 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_2", # HID:40900 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_3", # HID:40901 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_3", # HID:40902 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_4", # HID:40903 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_4", # HID:40904 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_5", # HID:40905 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_5", # HID:40906 + "HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEPLUS", # HID:40907 + "HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEMINUS", # HID:40908 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDS", # HID:40915 + "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVESELECTED", # HID:40916 + "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERREMOVESELECTED", # HID:40917 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERSELFIELDS", # HID:40918 + "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEUP", # HID:40919 + "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEDOWN", # HID:40920 + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHALL", # HID:40923 + "HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHANY", # HID:40924 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_1", # HID:40925 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_1", # HID:40926 + "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_1", # HID:40927 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_2", # HID:40928 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_2", # HID:40929 + "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_2", # HID:40930 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_3", # HID:40931 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_3", # HID:40932 + "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_3", # HID:40933 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_1", # HID:40940 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_2", # HID:40941 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_3", # HID:40942 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_4", # HID:40943 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_5", # HID:40944 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_6", # HID:40945 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_7", # HID:40946 + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_TXTQUERYTITLE", # HID:40955 + "HID:WIZARDS_HID_QUERYWIZARD_OPTDISPLAYQUERY", # HID:40956 + "HID:WIZARDS_HID_QUERYWIZARD_OPTMODIFYQUERY", # HID:40957 + "HID:WIZARDS_HID_QUERYWIZARD_TXTSUMMARY", # HID:40958 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD", # HID:40970 + "", + "HID:WIZARDS_HID_QUERYWIZARD_BACK", # HID:40972 + "HID:WIZARDS_HID_QUERYWIZARD_NEXT", # HID:40973 + "HID:WIZARDS_HID_QUERYWIZARD_CREATE", # HID:40974 + "HID:WIZARDS_HID_QUERYWIZARD_CANCEL", # HID:40975 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_IS", # HID:41000 + "", "HID:WIZARDS_HID_IS_BTN_NONE", # HID:41002 + "HID:WIZARDS_HID_IS_BTN_OK", # HID:41003 + "HID:WIZARDS_HID_IS_BTN_CANCEL", # HID:41004 + "HID:WIZARDS_HID_IS_BTN_IMG1", # HID:41005 + "HID:WIZARDS_HID_IS_BTN_IMG2", # HID:41006 + "HID:WIZARDS_HID_IS_BTN_IMG3", # HID:41007 + "HID:WIZARDS_HID_IS_BTN_IMG4", # HID:41008 + "HID:WIZARDS_HID_IS_BTN_IMG5", # HID:41009 + "HID:WIZARDS_HID_IS_BTN_IMG6", # HID:41010 + "HID:WIZARDS_HID_IS_BTN_IMG7", # HID:41011 + "HID:WIZARDS_HID_IS_BTN_IMG8", # HID:41012 + "HID:WIZARDS_HID_IS_BTN_IMG9", # HID:41013 + "HID:WIZARDS_HID_IS_BTN_IMG10", # HID:41014 + "HID:WIZARDS_HID_IS_BTN_IMG11", # HID:41015 + "HID:WIZARDS_HID_IS_BTN_IMG12", # HID:41016 + "HID:WIZARDS_HID_IS_BTN_IMG13", # HID:41017 + "HID:WIZARDS_HID_IS_BTN_IMG14", # HID:41018 + "HID:WIZARDS_HID_IS_BTN_IMG15", # HID:41019 + "HID:WIZARDS_HID_IS_BTN_IMG16", # HID:41020 + "HID:WIZARDS_HID_IS_BTN_IMG17", # HID:41021 + "HID:WIZARDS_HID_IS_BTN_IMG18", # HID:41022 + "HID:WIZARDS_HID_IS_BTN_IMG19", # HID:41023 + "HID:WIZARDS_HID_IS_BTN_IMG20", # HID:41024 + "HID:WIZARDS_HID_IS_BTN_IMG21", # HID:41025 + "HID:WIZARDS_HID_IS_BTN_IMG22", # HID:41026 + "HID:WIZARDS_HID_IS_BTN_IMG23", # HID:41027 + "HID:WIZARDS_HID_IS_BTN_IMG24", # HID:41028 + "HID:WIZARDS_HID_IS_BTN_IMG25", # HID:41029 + "HID:WIZARDS_HID_IS_BTN_IMG26", # HID:41030 + "HID:WIZARDS_HID_IS_BTN_IMG27", # HID:41031 + "HID:WIZARDS_HID_IS_BTN_IMG28", # HID:41032 + "HID:WIZARDS_HID_IS_BTN_IMG29", # HID:41033 + "HID:WIZARDS_HID_IS_BTN_IMG30", # HID:41034 + "HID:WIZARDS_HID_IS_BTN_IMG31", # HID:41035 + "HID:WIZARDS_HID_IS_BTN_IMG32", # HID:41036 + "", + "", + "", + "HID:WIZARDS_HID_FTP", # HID:41040 + "HID:WIZARDS_HID_FTP_SERVER", # HID:41041 + "HID:WIZARDS_HID_FTP_USERNAME", # HID:41042 + "HID:WIZARDS_HID_FTP_PASS", # HID:41043 + "HID:WIZARDS_HID_FTP_TEST", # HID:41044 + "HID:WIZARDS_HID_FTP_TXT_PATH", # HID:41045 + "HID:WIZARDS_HID_FTP_BTN_PATH", # HID:41046 + "HID:WIZARDS_HID_FTP_OK", # HID:41047 + "HID:WIZARDS_HID_FTP_CANCEL", # HID:41048 + "", + "", + "HID:WIZARDS_HID_AGWIZ", # HID:41051 + "HID:WIZARDS_HID_AGWIZ_HELP", # HID:41052 + "HID:WIZARDS_HID_AGWIZ_NEXT", # HID:41053 + "HID:WIZARDS_HID_AGWIZ_PREV", # HID:41054 + "HID:WIZARDS_HID_AGWIZ_CREATE", # HID:41055 + "HID:WIZARDS_HID_AGWIZ_CANCEL", # HID:41056 + "HID:WIZARDS_HID_AGWIZ_1_LIST_PAGEDESIGN", # HID:41057 + "HID:WIZARDS_HID_AGWIZ_1_CHK_MINUTES", # HID:41058 + "HID:WIZARDS_HID_AGWIZ_2_TXT_TIME", # HID:41059 + "HID:WIZARDS_HID_AGWIZ_2_TXT_DATE", # HID:41060 + "HID:WIZARDS_HID_AGWIZ_2_TXT_TITLE", # HID:41061 + "HID:WIZARDS_HID_AGWIZ_2_TXT_LOCATION", # HID:41062 + "HID:WIZARDS_HID_AGWIZ_3_CHK_MEETING_TYPE", # HID:41063 + "HID:WIZARDS_HID_AGWIZ_3_CHK_READ", # HID:41064 + "HID:WIZARDS_HID_AGWIZ_3_CHK_BRING", # HID:41065 + "HID:WIZARDS_HID_AGWIZ_3_CHK_NOTES", # HID:41066 + "HID:WIZARDS_HID_AGWIZ_4_CHK_CALLED_BY", # HID:41067 + "HID:WIZARDS_HID_AGWIZ_4_CHK_FACILITATOR", # HID:41068 + "HID:WIZARDS_HID_AGWIZ_4_CHK_NOTETAKER", # HID:41069 + "HID:WIZARDS_HID_AGWIZ_4_CHK_TIMEKEEPER", # HID:41070 + "HID:WIZARDS_HID_AGWIZ_4_CHK_ATTENDEES", # HID:41071 + "HID:WIZARDS_HID_AGWIZ_4_CHK_OBSERVERS", # HID:41072 + "HID:WIZARDS_HID_AGWIZ_4_CHK_RESOURCEPERSONS", # HID:41073 + "HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATENAME", # HID:41074 + "HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATEPATH", # HID:41075 + "HID:WIZARDS_HID_AGWIZ_6_BTN_TEMPLATEPATH", # HID:41076 + "HID:WIZARDS_HID_AGWIZ_6_OPT_CREATEAGENDA", # HID:41077 + "HID:WIZARDS_HID_AGWIZ_6_OPT_MAKECHANGES", # HID:41078 + "HID:WIZARDS_HID_AGWIZ_5_BTN_INSERT", # HID:41079 + "HID:WIZARDS_HID_AGWIZ_5_BTN_REMOVE", # HID:41080 + "HID:WIZARDS_HID_AGWIZ_5_BTN_UP", # HID:41081 + "HID:WIZARDS_HID_AGWIZ_5_BTN_DOWN", # HID:41082 + "HID:WIZARDS_HID_AGWIZ_5_SCROLL_BAR", # HID:41083 + "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_1", # HID:41084 + "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_1", # HID:41085 + "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_1", # HID:41086 + "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_2", # HID:41087 + "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_2", # HID:41088 + "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_2", # HID:41089 + "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_3", # HID:41090 + "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_3", # HID:41091 + "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_3", # HID:41092 + "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_4", # HID:41093 + "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_4", # HID:41094 + "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_4", # HID:41095 + "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_5", # HID:41096 + "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_5", # HID:41097 + "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_5", # HID:41098 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_FAXWIZ_OPTBUSINESSFAX", # HID:41120 + "HID:WIZARDS_HID_FAXWIZ_LSTBUSINESSSTYLE", # HID:41121 + "HID:WIZARDS_HID_FAXWIZ_OPTPRIVATEFAX", # HID:41122 + "HID:WIZARDS_HID_LSTPRIVATESTYLE", # HID:41123 + "HID:WIZARDS_HID_IMAGECONTROL3", # HID:41124 + "HID:WIZARDS_HID_CHKUSELOGO", # HID:41125 + "HID:WIZARDS_HID_CHKUSEDATE", # HID:41126 + "HID:WIZARDS_HID_CHKUSECOMMUNICATIONTYPE", # HID:41127 + "HID:WIZARDS_HID_LSTCOMMUNICATIONTYPE", # HID:41128 + "HID:WIZARDS_HID_CHKUSESUBJECT", # HID:41129 + "HID:WIZARDS_HID_CHKUSESALUTATION", # HID:41130 + "HID:WIZARDS_HID_LSTSALUTATION", # HID:41131 + "HID:WIZARDS_HID_CHKUSEGREETING", # HID:41132 + "HID:WIZARDS_HID_LSTGREETING", # HID:41133 + "HID:WIZARDS_HID_CHKUSEFOOTER", # HID:41134 + "HID:WIZARDS_HID_OPTSENDERPLACEHOLDER", # HID:41135 + "HID:WIZARDS_HID_OPTSENDERDEFINE", # HID:41136 + "HID:WIZARDS_HID_TXTSENDERNAME", # HID:41137 + "HID:WIZARDS_HID_TXTSENDERSTREET", # HID:41138 + "HID:WIZARDS_HID_TXTSENDERPOSTCODE", # HID:41139 + "HID:WIZARDS_HID_TXTSENDERSTATE", # HID:41140 + "HID:WIZARDS_HID_TXTSENDERCITY", # HID:41141 + "HID:WIZARDS_HID_TXTSENDERFAX", # HID:41142 + "HID:WIZARDS_HID_OPTRECEIVERPLACEHOLDER", # HID:41143 + "HID:WIZARDS_HID_OPTRECEIVERDATABASE", # HID:41144 + "HID:WIZARDS_HID_TXTFOOTER", # HID:41145 + "HID:WIZARDS_HID_CHKFOOTERNEXTPAGES", # HID:41146 + "HID:WIZARDS_HID_CHKFOOTERPAGENUMBERS", # HID:41147 + "HID:WIZARDS_HID_TXTTEMPLATENAME", # HID:41148 + "HID:WIZARDS_HID_FILETEMPLATEPATH", # HID:41149 + "HID:WIZARDS_HID_OPTCREATEFAX", # HID:41150 + "HID:WIZARDS_HID_OPTMAKECHANGES", # HID:41151 + "HID:WIZARDS_HID_IMAGECONTROL2", # HID:41152 + "HID:WIZARDS_HID_FAXWIZ_TXTPATH", # HID:41153 + "HID:WIZARDS_HID_FAXWIZ_CMDPATH", # HID:41154 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_FAXWIZARD", # HID:41180 + "HID:WIZARDS_HID_FAXWIZARD_HELP", # HID:41181 + "HID:WIZARDS_HID_FAXWIZARD_BACK", # HID:41182 + "HID:WIZARDS_HID_FAXWIZARD_NEXT", # HID:41183 + "HID:WIZARDS_HID_FAXWIZARD_CREATE", # HID:41184 + "HID:WIZARDS_HID_FAXWIZARD_CANCEL", # HID:41185 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGTABLE_DIALOG", # HID:41200 + "", + "HID:WIZARDS_HID_DLGTABLE_CMDPREV", # HID:41202 + "HID:WIZARDS_HID_DLGTABLE_CMDNEXT", # HID:41203 + "HID:WIZARDS_HID_DLGTABLE_CMDFINISH", # HID:41204 + "HID:WIZARDS_HID_DLGTABLE_CMDCANCEL", # HID:41205 + "HID:WIZARDS_HID_DLGTABLE_OPTBUSINESS", # HID:41206 + "HID:WIZARDS_HID_DLGTABLE_OPTPRIVATE", # HID:41207 + "HID:WIZARDS_HID_DLGTABLE_LBTABLES", # HID:41208 + "HID:WIZARDS_HID_DLGTABLE_FIELDSAVAILABLE", # HID:41209 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVESELECTED", # HID:41210 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEALL", # HID:41211 + "HID:WIZARDS_HID_DLGTABLE_CMDREMOVESELECTED", # HID:41212 + "HID:WIZARDS_HID_DLGTABLE_CMDREMOVEALL", # HID:41213 + "HID:WIZARDS_HID_DLGTABLE_FIELDSSELECTED", # HID:41214 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP", # HID:41215 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN", # HID:41216 + "", + "", + "", + "HID:WIZARDS_HID_DLGTABLE_LB_SELFIELDNAMES", # HID:41220 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDUP", # HID:41221 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDDOWN", # HID:41222 + "HID:WIZARDS_HID_DLGTABLE_CMDMINUS", # HID:41223 + "HID:WIZARDS_HID_DLGTABLE_CMDPLUS", # HID:41224 + "HID:WIZARDS_HID_DLGTABLE_COLNAME", # HID:41225 + "HID:WIZARDS_HID_DLGTABLE_COLMODIFIER", # HID:41226 + "HID:WIZARDS_HID_DLGTABLE_CHK_USEPRIMEKEY", # HID:41227 + "HID:WIZARDS_HID_DLGTABLE_OPT_PK_AUTOMATIC", # HID:41228 + "HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE_AUTOMATIC", # HID:41229 + "HID:WIZARDS_HID_DLGTABLE_OPT_PK_SINGLE", # HID:41230 + "HID:WIZARDS_HID_DLGTABLE_LB_PK_FIELDNAME", # HID:41231 + "HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE", # HID:41232 + "HID:WIZARDS_HID_DLGTABLE_OPT_PK_SEVERAL", # HID:41233 + "HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_AVAILABLE", # HID:41234 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVE_PK_SELECTED", # HID:41235 + "HID:WIZARDS_HID_DLGTABLE_CMDREMOVE_PK_SELECTED", # HID:41236 + "HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_SELECTED", # HID:41237 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP_PK_SELECTED", # HID:41238 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN_PK_SELECTED", # HID:41239 + "HID:WIZARDS_HID_DLGTABLE_TXT_NAME", # HID:41240 + "HID:WIZARDS_HID_DLGTABLE_OPT_MODIFYTABLE", # HID:41241 + "HID:WIZARDS_HID_DLGTABLE_OPT_WORKWITHTABLE", # HID:41242 + "HID:WIZARDS_HID_DLGTABLE_OPT_STARTFORMWIZARD", # HID:41243 + "HID:WIZARDS_HID_DLGTABLE_LST_CATALOG", # HID:41244 + "HID:WIZARDS_HID_DLGTABLE_LST_SCHEMA" # HID:41245 + ] + + @classmethod + def getHelpIdString(self, nHelpId): + if nHelpId >= 34200 and nHelpId <= 34722: + return HelpIds.array1[nHelpId - 34200] + elif nHelpId >= 40769 and nHelpId <= 41245: + return HelpIds.array2[nHelpId - 40769] + else: + return None + diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py new file mode 100644 index 000000000..908aa78a1 --- /dev/null +++ b/wizards/com/sun/star/wizards/common/Helper.py @@ -0,0 +1,242 @@ +import uno +import locale +import traceback +from com.sun.star.uno import Exception as UnoException +from com.sun.star.uno import RuntimeException + +#TEMPORAL +import inspect + +class Helper(object): + + DAY_IN_MILLIS = (24 * 60 * 60 * 1000) + + def convertUnoDatetoInteger(self, DateValue): + oCal = java.util.Calendar.getInstance() + oCal.set(DateValue.Year, DateValue.Month, DateValue.Day) + dTime = oCal.getTime() + lTime = dTime.getTime() + lDate = lTime / (3600 * 24000) + return lDate + + @classmethod + def setUnoPropertyValue(self, xPSet, PropertyName, PropertyValue): + try: + if xPSet.getPropertySetInfo().hasPropertyByName(PropertyName): + #xPSet.setPropertyValue(PropertyName, PropertyValue) + uno.invoke(xPSet,"setPropertyValue", (PropertyName,PropertyValue)) + else: + selementnames = xPSet.getPropertySetInfo().getProperties() + raise ValueError("No Such Property: '" + PropertyName + "'"); + + except UnoException, exception: + print type(PropertyValue) + traceback.print_exc() + + @classmethod + def getUnoObjectbyName(self, xName, ElementName): + try: + if xName.hasByName(ElementName) == True: + return xName.getByName(ElementName) + else: + raise RuntimeException(); + + except UnoException, exception: + traceback.print_exc() + return None + + @classmethod + def getPropertyValue(self, CurPropertyValue, PropertyName): + MaxCount = len(CurPropertyValue) + i = 0 + while i < MaxCount: + if CurPropertyValue[i] is not None: + if CurPropertyValue[i].Name.equals(PropertyName): + return CurPropertyValue[i].Value + + i += 1 + raise RuntimeException() + + @classmethod + def getPropertyValuefromAny(self, CurPropertyValue, PropertyName): + try: + if CurPropertyValue is not None: + MaxCount = len(CurPropertyValue) + i = 0 + while i < MaxCount: + if CurPropertyValue[i] is not None: + aValue = CurPropertyValue[i] + if aValue is not None and aValue.Name.equals(PropertyName): + return aValue.Value + + i += 1 + return None + except UnoException, exception: + traceback.print_exc() + return None + + @classmethod + def getUnoPropertyValue(self, xPSet, PropertyName): + try: + if xPSet is not None: + oObject = xPSet.getPropertyValue(PropertyName) + if oObject is not None: + return oObject + return None + + except UnoException, exception: + traceback.print_exc() + return None + + @classmethod + def getUnoArrayPropertyValue(self, xPSet, PropertyName): + try: + if xPSet is not None: + oObject = xPSet.getPropertyValue(PropertyName) + if isinstance(oObject,list): + return getArrayValue(oObject) + + except UnoException, exception: + traceback.print_exc() + + return None + + @classmethod + def getUnoStructValue(self, xPSet, PropertyName): + try: + if xPSet is not None: + if xPSet.getPropertySetInfo().hasPropertyByName(PropertyName) == True: + oObject = xPSet.getPropertyValue(PropertyName) + return oObject + + return None + except UnoException, exception: + traceback.print_exc() + return None + + @classmethod + def setUnoPropertyValues(self, xMultiPSetLst, PropertyNames, PropertyValues): + try: + if xMultiPSetLst is not None: + uno.invoke(xMultiPSetLst, "setPropertyValues", (PropertyNames, PropertyValues)) + else: + i = 0 + while i < len(PropertyNames): + self.setUnoPropertyValue(xMultiPSetLst, PropertyNames[i], PropertyValues[i]) + i += 1 + + except Exception, e: + curframe = inspect.currentframe() + calframe = inspect.getouterframes(curframe, 2) + #print "caller name:", calframe[1][3] + traceback.print_exc() + + ''' + checks if the value of an object that represents an array is null. + check beforehand if the Object is really an array with "AnyConverter.IsArray(oObject) + @param oValue the paramter that has to represent an object + @return a null reference if the array is empty + ''' + + @classmethod + def getArrayValue(self, oValue): + try: + #VetoableChangeSupport Object + oPropList = list(oValue) + nlen = len(oPropList) + if nlen == 0: + return None + else: + return oPropList + + except UnoException, exception: + traceback.print_exc() + return None + + def getComponentContext(_xMSF): + # Get the path to the extension and try to add the path to the class loader + aHelper = PropertySetHelper(_xMSF); + aDefaultContext = aHelper.getPropertyValueAsObject("DefaultContext"); + return aDefaultContext; + + def getMacroExpander(_xMSF): + xComponentContext = self.getComponentContext(_xMSF); + aSingleton = xComponentContext.getValueByName("/singletons/com.sun.star.util.theMacroExpander"); + return aSingleton; + + class DateUtils(object): + + @classmethod + def DateUtils_XMultiServiceFactory_Object(self, xmsf, document): + tmp = DateUtils() + tmp.DateUtils_body_XMultiServiceFactory_Object(xmsf, document) + return tmp + + def DateUtils_body_XMultiServiceFactory_Object(self, xmsf, docMSF): + defaults = docMSF.createInstance("com.sun.star.text.Defaults") + l = Helper.getUnoStructValue(defaults, "CharLocale") + jl = locale.setlocale(l.Language, l.Country, l.Variant) + self.calendar = Calendar.getInstance(jl) + self.formatSupplier = document + formatSettings = self.formatSupplier.getNumberFormatSettings() + date = Helper.getUnoPropertyValue(formatSettings, "NullDate") + self.calendar.set(date.Year, date.Month - 1, date.Day) + self.docNullTime = getTimeInMillis() + self.formatter = NumberFormatter.createNumberFormatter(xmsf, self.formatSupplier) + + ''' + @param format a constant of the enumeration NumberFormatIndex + @return + ''' + + def getFormat(self, format): + return NumberFormatter.getNumberFormatterKey(self.formatSupplier, format) + + def getFormatter(self): + return self.formatter + + def getTimeInMillis(self): + dDate = self.calendar.getTime() + return dDate.getTime() + + ''' + @param date a VCL date in form of 20041231 + @return a document relative date + ''' + + def getDocumentDateAsDouble(self, date): + self.calendar.clear() + self.calendar.set(date / 10000, (date % 10000) / 100 - 1, date % 100) + date1 = getTimeInMillis() + ''' + docNullTime and date1 are in millis, but + I need a day... + ''' + + daysDiff = (date1 - self.docNullTime) / DAY_IN_MILLIS + 1 + return daysDiff + + def getDocumentDateAsDouble(self, date): + return getDocumentDateAsDouble(date.Year * 10000 + date.Month * 100 + date.Day) + + def getDocumentDateAsDouble(self, javaTimeInMillis): + self.calendar.clear() + JavaTools.setTimeInMillis(self.calendar, javaTimeInMillis) + date1 = getTimeInMillis() + + ''' + docNullTime and date1 are in millis, but + I need a day... + ''' + + daysDiff = (date1 - self.docNullTime) / DAY_IN_MILLIS + 1 + return daysDiff + + def format(self, formatIndex, date): + return self.formatter.convertNumberToString(formatIndex, getDocumentDateAsDouble(date)) + + def format(self, formatIndex, date): + return self.formatter.convertNumberToString(formatIndex, getDocumentDateAsDouble(date)) + + def format(self, formatIndex, javaTimeInMillis): + return self.formatter.convertNumberToString(formatIndex, getDocumentDateAsDouble(javaTimeInMillis)) diff --git a/wizards/com/sun/star/wizards/common/Listener.py b/wizards/com/sun/star/wizards/common/Listener.py new file mode 100644 index 000000000..238f22cac --- /dev/null +++ b/wizards/com/sun/star/wizards/common/Listener.py @@ -0,0 +1,111 @@ +#********************************************************************** +# +# Danny.OOo.Listeners.ListenerProcAdapters.py +# +# A module to easily work with OpenOffice.org. +# +#********************************************************************** +# Copyright (c) 2003-2004 Danny Brewer +# d29583@groovegarden.com +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# 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 +# +# See: http://www.gnu.org/licenses/lgpl.html +# +#********************************************************************** +# If you make changes, please append to the change log below. +# +# Change Log +# Danny Brewer Revised 2004-06-05-01 +# +#********************************************************************** + +# OOo's libraries +import uno +import unohelper + +#-------------------------------------------------- +# An ActionListener adapter. +# This object implements com.sun.star.awt.XActionListener. +# When actionPerformed is called, this will call an arbitrary +# python procedure, passing it... +# 1. the oActionEvent +# 2. any other parameters you specified to this object's constructor (as a tuple). +from com.sun.star.awt import XActionListener +class ActionListenerProcAdapter( unohelper.Base, XActionListener ): + def __init__( self, oProcToCall, tParams=() ): + self.oProcToCall = oProcToCall # a python procedure + self.tParams = tParams # a tuple + + # oActionEvent is a com.sun.star.awt.ActionEvent struct. + def actionPerformed( self, oActionEvent ): + if callable( self.oProcToCall ): + apply( self.oProcToCall, (oActionEvent,) + self.tParams ) + + +#-------------------------------------------------- +# An ItemListener adapter. +# This object implements com.sun.star.awt.XItemListener. +# When itemStateChanged is called, this will call an arbitrary +# python procedure, passing it... +# 1. the oItemEvent +# 2. any other parameters you specified to this object's constructor (as a tuple). +from com.sun.star.awt import XItemListener +class ItemListenerProcAdapter( unohelper.Base, XItemListener ): + def __init__( self, oProcToCall, tParams=() ): + self.oProcToCall = oProcToCall # a python procedure + self.tParams = tParams # a tuple + + # oItemEvent is a com.sun.star.awt.ItemEvent struct. + def itemStateChanged( self, oItemEvent ): + if callable( self.oProcToCall ): + apply( self.oProcToCall, (oItemEvent,) + self.tParams ) + + +#-------------------------------------------------- +# An TextListener adapter. +# This object implements com.sun.star.awt.XTextistener. +# When textChanged is called, this will call an arbitrary +# python procedure, passing it... +# 1. the oTextEvent +# 2. any other parameters you specified to this object's constructor (as a tuple). +from com.sun.star.awt import XTextListener +class TextListenerProcAdapter( unohelper.Base, XTextListener ): + def __init__( self, oProcToCall, tParams=() ): + self.oProcToCall = oProcToCall # a python procedure + self.tParams = tParams # a tuple + + # oTextEvent is a com.sun.star.awt.TextEvent struct. + def textChanged( self, oTextEvent ): + if callable( self.oProcToCall ): + apply( self.oProcToCall, (oTextEvent,) + self.tParams ) + +#-------------------------------------------------- +# An Window adapter. +# This object implements com.sun.star.awt.XWindowListener. +# When textChanged is called, this will call an arbitrary +# python procedure, passing it... +# 1. the oTextEvent +# 2. any other parameters you specified to this object's constructor (as a tuple). +from com.sun.star.awt import XWindowListener +class WindowListenerProcAdapter( unohelper.Base, XWindowListener ): + def __init__( self, oProcToCall, tParams=() ): + self.oProcToCall = oProcToCall # a python procedure + self.tParams = tParams # a tuple + + # oTextEvent is a com.sun.star.awt.TextEvent struct. + def windowResized(self, actionEvent): + if callable( self.oProcToCall ): + apply( self.oProcToCall, (actionEvent,) + self.tParams ) diff --git a/wizards/com/sun/star/wizards/common/NoValidPathException.py b/wizards/com/sun/star/wizards/common/NoValidPathException.py new file mode 100644 index 000000000..96902883e --- /dev/null +++ b/wizards/com/sun/star/wizards/common/NoValidPathException.py @@ -0,0 +1,9 @@ +class NoValidPathException(Exception): + + def __init__(self, xMSF, _sText): + super(NoValidPathException,self).__init__(_sText) + # TODO: NEVER open a dialog in an exception + from SystemDialog import SystemDialog + if xMSF: + SystemDialog.showErrorBox(xMSF, "dbwizres", "dbw", 521) #OfficePathnotavailable + diff --git a/wizards/com/sun/star/wizards/common/PropertyNames.py b/wizards/com/sun/star/wizards/common/PropertyNames.py new file mode 100644 index 000000000..c1dde1852 --- /dev/null +++ b/wizards/com/sun/star/wizards/common/PropertyNames.py @@ -0,0 +1,15 @@ +class PropertyNames: + PROPERTY_ENABLED = "Enabled" + PROPERTY_HEIGHT = "Height" + PROPERTY_HELPURL = "HelpURL" + PROPERTY_POSITION_X = "PositionX" + PROPERTY_POSITION_Y = "PositionY" + PROPERTY_LABEL = "Label" + PROPERTY_MULTILINE = "MultiLine" + PROPERTY_NAME = "Name" + PROPERTY_STEP = "Step" + PROPERTY_WIDTH = "Width" + PROPERTY_TABINDEX = "TabIndex" + PROPERTY_STATE = "State" + PROPERTY_IMAGEURL = "ImageURL" + diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.py b/wizards/com/sun/star/wizards/common/PropertySetHelper.py new file mode 100644 index 000000000..4960b5380 --- /dev/null +++ b/wizards/com/sun/star/wizards/common/PropertySetHelper.py @@ -0,0 +1,242 @@ +from DebugHelper import * + +class PropertySetHelper(object): + + @classmethod + def __init__(self, _aObj): + if not _aObj: + return + + self.m_xPropertySet = _aObj + + def getHashMap(self): + if self.m_aHashMap == None: + self.m_aHashMap = HashMap < String, Object >.Object() + + return self.m_aHashMap + + ''' + set a property, don't throw any exceptions, they will only write down as a hint in the helper debug output + @param _sName name of the property to set + @param _aValue property value as object + ''' + + def setPropertyValueDontThrow(self, _sName, _aValue): + try: + setPropertyValue(_sName, _aValue) + except Exception, e: + DebugHelper.writeInfo("Don't throw the exception with property name(" + _sName + " ) : " + e.getMessage()) + + ''' + set a property, + @param _sName name of the property to set + @param _aValue property value as object + @throws java.lang.Exception + ''' + + def setPropertyValue(self, _sName, _aValue): + if self.m_xPropertySet != None: + try: + self.m_xPropertySet.setPropertyValue(_sName, _aValue) + except com.sun.star.beans.UnknownPropertyException, e: + DebugHelper.writeInfo(e.getMessage()) + DebugHelper.exception(e) + except com.sun.star.beans.PropertyVetoException, e: + DebugHelper.writeInfo(e.getMessage()) + DebugHelper.exception(e) + except ValueError, e: + DebugHelper.writeInfo(e.getMessage()) + DebugHelper.exception(e) + except com.sun.star.lang.WrappedTargetException, e: + DebugHelper.writeInfo(e.getMessage()) + DebugHelper.exception(e) + + else: + // DebugHelper.writeInfo("PropertySetHelper.setProperty() can't get XPropertySet"); + getHashMap().put(_sName, _aValue) + + ''' + get a property and convert it to a int value + @param _sName the string name of the property + @param _nDefault if an error occur, return this value + @return the int value of the property + ''' + + def getPropertyValueAsInteger(self, _sName, _nDefault): + aObject = None + nValue = _nDefault + if self.m_xPropertySet != None: + try: + aObject = self.m_xPropertySet.getPropertyValue(_sName) + except com.sun.star.beans.UnknownPropertyException, e: + DebugHelper.writeInfo(e.getMessage()) + except com.sun.star.lang.WrappedTargetException, e: + DebugHelper.writeInfo(e.getMessage()) + + if aObject != None: + try: + nValue = NumericalHelper.toInt(aObject) + except ValueError, e: + DebugHelper.writeInfo("can't convert a object to integer.") + + return nValue + + ''' + get a property and convert it to a short value + @param _sName the string name of the property + @param _nDefault if an error occur, return this value + @return the int value of the property + ''' + + def getPropertyValueAsShort(self, _sName, _nDefault): + aObject = None + nValue = _nDefault + if self.m_xPropertySet != None: + try: + aObject = self.m_xPropertySet.getPropertyValue(_sName) + except com.sun.star.beans.UnknownPropertyException, e: + DebugHelper.writeInfo(e.getMessage()) + except com.sun.star.lang.WrappedTargetException, e: + DebugHelper.writeInfo(e.getMessage()) + + if aObject != None: + try: + nValue = NumericalHelper.toShort(aObject) + except ValueError, e: + DebugHelper.writeInfo("can't convert a object to short.") + + return nValue + + ''' + get a property and convert it to a double value + @param _sName the string name of the property + @param _nDefault if an error occur, return this value + @return the int value of the property + ''' + + def getPropertyValueAsDouble(self, _sName, _nDefault): + aObject = None + nValue = _nDefault + if self.m_xPropertySet != None: + try: + aObject = self.m_xPropertySet.getPropertyValue(_sName) + except com.sun.star.beans.UnknownPropertyException, e: + DebugHelper.writeInfo(e.getMessage()) + except com.sun.star.lang.WrappedTargetException, e: + DebugHelper.writeInfo(e.getMessage()) + + if aObject == None: + if getHashMap().containsKey(_sName): + aObject = getHashMap().get(_sName) + + if aObject != None: + try: + nValue = NumericalHelper.toDouble(aObject) + except ValueError, e: + DebugHelper.writeInfo("can't convert a object to integer.") + + return nValue + + ''' + get a property and convert it to a boolean value + @param _sName the string name of the property + @param _bDefault if an error occur, return this value + @return the boolean value of the property + ''' + + def getPropertyValueAsBoolean(self, _sName, _bDefault): + aObject = None + bValue = _bDefault + if self.m_xPropertySet != None: + try: + aObject = self.m_xPropertySet.getPropertyValue(_sName) + except com.sun.star.beans.UnknownPropertyException, e: + DebugHelper.writeInfo(e.getMessage()) + DebugHelper.writeInfo("UnknownPropertyException caught: Name:=" + _sName) + except com.sun.star.lang.WrappedTargetException, e: + DebugHelper.writeInfo(e.getMessage()) + + if aObject != None: + try: + bValue = NumericalHelper.toBoolean(aObject) + except ValueError, e: + DebugHelper.writeInfo("can't convert a object to boolean.") + + return bValue + + ''' + get a property and convert it to a string value + @param _sName the string name of the property + @param _sDefault if an error occur, return this value + @return the string value of the property + ''' + + def getPropertyValueAsString(self, _sName, _sDefault): + aObject = None + sValue = _sDefault + if self.m_xPropertySet != None: + try: + aObject = self.m_xPropertySet.getPropertyValue(_sName) + except com.sun.star.beans.UnknownPropertyException, e: + DebugHelper.writeInfo(e.getMessage()) + except com.sun.star.lang.WrappedTargetException, e: + DebugHelper.writeInfo(e.getMessage()) + + if aObject != None: + try: + sValue = AnyConverter.toString(aObject) + except ValueError, e: + DebugHelper.writeInfo("can't convert a object to string.") + + return sValue + + ''' + get a property and don't convert it + @param _sName the string name of the property + @return the object value of the property without any conversion + ''' + + def getPropertyValueAsObject(self, _sName): + aObject = None + if self.m_xPropertySet != None: + try: + aObject = self.m_xPropertySet.getPropertyValue(_sName) + except com.sun.star.beans.UnknownPropertyException, e: + DebugHelper.writeInfo(e.getMessage()) + except com.sun.star.lang.WrappedTargetException, e: + DebugHelper.writeInfo(e.getMessage()) + + return aObject + + ''' + Debug helper, to show all properties which are available in the given object. + @param _xObj the object of which the properties should shown + ''' + + @classmethod + def showProperties(self, _xObj): + aHelper = PropertySetHelper.PropertySetHelper_unknown(_xObj) + aHelper.showProperties() + + ''' + Debug helper, to show all properties which are available in the current object. + ''' + + def showProperties(self): + sName = "" + if self.m_xPropertySet != None: + XServiceInfo xServiceInfo = (XServiceInfo) + UnoRuntime.queryInterface(XServiceInfo.class, self.m_xPropertySet) + if xServiceInfo != None: + sName = xServiceInfo.getImplementationName() + + xInfo = self.m_xPropertySet.getPropertySetInfo() + aAllProperties = xInfo.getProperties() + DebugHelper.writeInfo("Show all properties of Implementation of :'" + sName + "'") + i = 0 + while i < aAllProperties.length: + DebugHelper.writeInfo(" - " + aAllProperties[i].Name) + i += 1 + else: + DebugHelper.writeInfo("The given object don't support XPropertySet interface.") + diff --git a/wizards/com/sun/star/wizards/common/Resource.java.orig b/wizards/com/sun/star/wizards/common/Resource.java.orig new file mode 100644 index 000000000..c7eb3e483 --- /dev/null +++ b/wizards/com/sun/star/wizards/common/Resource.java.orig @@ -0,0 +1,140 @@ +/************************************************************************* + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package com.sun.star.wizards.common; + +import com.sun.star.beans.PropertyValue; +import com.sun.star.container.XIndexAccess; +import com.sun.star.container.XNameAccess; +import com.sun.star.lang.IllegalArgumentException; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.script.XInvocation; +import com.sun.star.beans.PropertyValue; +import com.sun.star.uno.XInterface; +import com.sun.star.uno.UnoRuntime; + +public class Resource +{ + + XMultiServiceFactory xMSF; + String Module; + XIndexAccess xStringIndexAccess; + XIndexAccess xStringListIndexAccess; + + /** Creates a new instance of Resource + * @param _xMSF + * @param _Unit + * @param _Module + */ + public Resource(XMultiServiceFactory _xMSF, String _Unit /* unused */, String _Module) + { + this.xMSF = _xMSF; + this.Module = _Module; + try + { + Object[] aArgs = new Object[1]; + aArgs[0] = this.Module; + XInterface xResource = (XInterface) xMSF.createInstanceWithArguments( + "org.libreoffice.resource.ResourceIndexAccess", + aArgs); + if (xResource == null) + throw new Exception("could not initialize ResourceIndexAccess"); + XNameAccess xNameAccess = (XNameAccess)UnoRuntime.queryInterface( + XNameAccess.class, + xResource); + if (xNameAccess == null) + throw new Exception("ResourceIndexAccess is no XNameAccess"); + this.xStringIndexAccess = (XIndexAccess)UnoRuntime.queryInterface( + XIndexAccess.class, + xNameAccess.getByName("String")); + this.xStringListIndexAccess = (XIndexAccess)UnoRuntime.queryInterface( + XIndexAccess.class, + xNameAccess.getByName("StringList")); + if(this.xStringListIndexAccess == null) + throw new Exception("could not initialize xStringListIndexAccess"); + if(this.xStringIndexAccess == null) + throw new Exception("could not initialize xStringIndexAccess"); + } + catch (Exception exception) + { + exception.printStackTrace(); + showCommonResourceError(xMSF); + } + } + + public String getResText(int nID) + { + try + { + return (String)this.xStringIndexAccess.getByIndex(nID); + } + catch (Exception exception) + { + exception.printStackTrace(); + throw new java.lang.IllegalArgumentException("Resource with ID not " + String.valueOf(nID) + "not found"); + } + } + + public PropertyValue[] getStringList(int nID) + { + try + { + return (PropertyValue[])this.xStringListIndexAccess.getByIndex(nID); + } + catch (Exception exception) + { + exception.printStackTrace(); + throw new java.lang.IllegalArgumentException("Resource with ID not " + String.valueOf(nID) + "not found"); + } + } + + public String[] getResArray(int nID, int iCount) + { + try + { + String[] ResArray = new String[iCount]; + for (int i = 0; i < iCount; i++) + { + ResArray[i] = getResText(nID + i); + } + return ResArray; + } + catch (Exception exception) + { + exception.printStackTrace(System.out); + throw new java.lang.IllegalArgumentException("Resource with ID not" + String.valueOf(nID) + "not found"); + } + } + + public static void showCommonResourceError(XMultiServiceFactory xMSF) + { + String ProductName = Configuration.getProductName(xMSF); + String sError = "The files required could not be found.\nPlease start the %PRODUCTNAME Setup and choose 'Repair'."; + sError = JavaTools.replaceSubString(sError, ProductName, "%PRODUCTNAME"); + SystemDialog.showMessageBox(xMSF, "ErrorBox", com.sun.star.awt.VclWindowPeerAttribute.OK, sError); + } +} diff --git a/wizards/com/sun/star/wizards/common/Resource.py b/wizards/com/sun/star/wizards/common/Resource.py new file mode 100644 index 000000000..e6b379992 --- /dev/null +++ b/wizards/com/sun/star/wizards/common/Resource.py @@ -0,0 +1,66 @@ +from com.sun.star.awt.VclWindowPeerAttribute import OK +import traceback + +class Resource(object): + ''' + Creates a new instance of Resource + @param _xMSF + @param _Unit + @param _Module + ''' + + @classmethod + def __init__(self, _xMSF, _Module): + self.xMSF = _xMSF + self.Module = _Module + try: + xResource = self.xMSF.createInstanceWithArguments("org.libreoffice.resource.ResourceIndexAccess", (self.Module,)) + if xResource is None: + raise Exception ("could not initialize ResourceIndexAccess") + + self.xStringIndexAccess = xResource.getByName("String") + self.xStringListIndexAccess = xResource.getByName("StringList") + + if self.xStringListIndexAccess is None: + raise Exception ("could not initialize xStringListIndexAccess") + + if self.xStringIndexAccess is None: + raise Exception ("could not initialize xStringIndexAccess") + + except Exception, exception: + traceback.print_exc() + self.showCommonResourceError(self.xMSF) + + def getResText(self, nID): + try: + return self.xStringIndexAccess.getByIndex(nID) + except Exception, exception: + traceback.print_exc() + raise ValueError("Resource with ID not " + str(nID) + " not found"); + + def getStringList(self, nID): + try: + return self.xStringListIndexAccess.getByIndex(nID) + except Exception, exception: + traceback.print_exc() + raise ValueError("Resource with ID not " + str(nID) + " not found"); + + def getResArray(self, nID, iCount): + try: + ResArray = range(iCount) + i = 0 + while i < iCount: + ResArray[i] = getResText(nID + i) + i += 1 + return ResArray + except Exception, exception: + traceback.print_exc() + raise ValueError("Resource with ID not" + str(nID) + " not found"); + + + def showCommonResourceError(self, xMSF): + ProductName = Configuration.getProductName(xMSF) + sError = "The files required could not be found.\nPlease start the %PRODUCTNAME Setup and choose 'Repair'." + sError = JavaTools.replaceSubString(sError, ProductName, "%PRODUCTNAME") + SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, sError) + diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py b/wizards/com/sun/star/wizards/common/SystemDialog.py new file mode 100644 index 000000000..b88aadfaf --- /dev/null +++ b/wizards/com/sun/star/wizards/common/SystemDialog.py @@ -0,0 +1,237 @@ +import uno +import traceback +from Configuration import Configuration +from Resource import Resource +from Desktop import Desktop + +from com.sun.star.ui.dialogs.TemplateDescription import FILESAVE_AUTOEXTENSION, FILEOPEN_SIMPLE +from com.sun.star.ui.dialogs.ExtendedFilePickerElementIds import CHECKBOX_AUTOEXTENSION +from com.sun.star.awt import WindowDescriptor +from com.sun.star.awt.WindowClass import MODALTOP +from com.sun.star.uno import Exception as UnoException +from com.sun.star.lang import IllegalArgumentException +from com.sun.star.awt.VclWindowPeerAttribute import OK + + +class SystemDialog(object): + + ''' + @param xMSF + @param ServiceName + @param type according to com.sun.star.ui.dialogs.TemplateDescription + ''' + + def __init__(self, xMSF, ServiceName, Type): + try: + self.xMSF = xMSF + self.systemDialog = xMSF.createInstance(ServiceName) + self.xStringSubstitution = self.createStringSubstitution(xMSF) + listAny = [uno.Any("short",Type)] + if self.systemDialog != None: + self.systemDialog.initialize(listAny) + + except UnoException, exception: + traceback.print_exc() + + def createStoreDialog(self, xmsf): + return SystemDialog(xmsf, "com.sun.star.ui.dialogs.FilePicker", FILESAVE_AUTOEXTENSION) + + def createOpenDialog(self, xmsf): + return SystemDialog(xmsf, "com.sun.star.ui.dialogs.FilePicker", FILEOPEN_SIMPLE) + + def createFolderDialog(self, xmsf): + return SystemDialog(xmsf, "com.sun.star.ui.dialogs.FolderPicker", 0) + + def createOfficeFolderDialog(self, xmsf): + return SystemDialog(xmsf, "com.sun.star.ui.dialogs.OfficeFolderPicker", 0) + + def subst(self, path): + try: + s = self.xStringSubstitution.substituteVariables(path, False) + return s + except Exception, ex: + traceback.print_exc() + return path + + ''' + ATTENTION a BUG : TFILESAVE_AUTOEXTENSIONhe extension calculated + here gives the last 3 chars of the filename - what + if the extension is of 4 or more chars? + @param DisplayDirectory + @param DefaultName + @param sDocuType + @return + ''' + + def callStoreDialog(self, DisplayDirectory, DefaultName, sDocuType): + sExtension = DefaultName.substring(DefaultName.length() - 3, DefaultName.length()) + addFilterToDialog(sExtension, sDocuType, True) + return callStoreDialog(DisplayDirectory, DefaultName) + + ''' + @param displayDir + @param defaultName + given url to a local path. + @return + ''' + + def callStoreDialog(self, displayDir, defaultName): + self.sStorePath = None + try: + self.systemDialog.setValue(CHECKBOX_AUTOEXTENSION, 0, True) + self.systemDialog.setDefaultName(defaultName) + self.systemDialog.setDisplayDirectory(subst(displayDir)) + if execute(self.systemDialog): + sPathList = self.systemDialog.getFiles() + self.sStorePath = sPathList[0] + + except UnoException, exception: + traceback.print_exc() + + return self.sStorePath + + def callFolderDialog(self, title, description, displayDir): + try: + self.systemDialog.setDisplayDirectoryxPropertyValue(subst(displayDir)) + except IllegalArgumentException, iae: + traceback.print_exc() + raise AttributeError(iae.getMessage()); + + self.systemDialog.setTitle(title) + self.systemDialog.setDescription(description) + if execute(self.systemDialog): + return self.systemDialog.getDirectory() + else: + return None + + def execute(self, execDialog): + return execDialog.execute() == 1 + + def callOpenDialog(self, multiSelect, displayDirectory): + try: + self.systemDialog.setMultiSelectionMode(multiSelect) + self.systemDialog.setDisplayDirectory(subst(displayDirectory)) + if execute(self.systemDialog): + return self.systemDialog.getFiles() + + except UnoException, exception: + traceback.print_exc() + + return None + + def addFilterToDialog(self, sExtension, filterName, setToDefault): + try: + #get the localized filtername + uiName = getFilterUIName(filterName) + pattern = "*." + sExtension + #add the filter + addFilter(uiName, pattern, setToDefault) + except Exception, exception: + traceback.print_exc() + + def addFilter(self, uiName, pattern, setToDefault): + try: + self.systemDialog.appendFilter(uiName, pattern) + if setToDefault: + self.systemDialog.setCurrentFilter(uiName) + + except Exception, ex: + traceback.print_exc() + + ''' + converts the name returned from getFilterUIName_(...) so the + product name is correct. + @param filterName + @return + ''' + + def getFilterUIName(self, filterName): + prodName = Configuration.getProductName(self.xMSF) + s = [[getFilterUIName_(filterName)]] + s[0][0] = JavaTools.replaceSubString(s[0][0], prodName, "%productname%") + return s[0][0] + + ''' + note the result should go through conversion of the product name. + @param filterName + @return the UI localized name of the given filter name. + ''' + + def getFilterUIName_(self, filterName): + try: + oFactory = self.xMSF.createInstance("com.sun.star.document.FilterFactory") + oObject = Helper.getUnoObjectbyName(oFactory, filterName) + xPropertyValue = list(oObject) + MaxCount = xPropertyValue.length + i = 0 + while i < MaxCount: + aValue = xPropertyValue[i] + if aValue != None and aValue.Name.equals("UIName"): + return str(aValue.Value) + + i += 1 + raise NullPointerException ("UIName property not found for Filter " + filterName); + except UnoException, exception: + traceback.print_exc() + return None + + @classmethod + def showErrorBox(self, xMSF, ResName, ResPrefix, ResID,AddTag=None, AddString=None): + ProductName = Configuration.getProductName(xMSF) + oResource = Resource(xMSF, ResPrefix) + sErrorMessage = oResource.getResText(ResID) + sErrorMessage = sErrorMessage.replace( ProductName, "%PRODUCTNAME") + sErrorMessage = sErrorMessage.replace(str(13), "
") + if AddTag and AddString: + sErrorMessage = sErrorMessage.replace( AddString, AddTag) + return self.showMessageBox(xMSF, "ErrorBox", OK, sErrorMessage) + + ''' + example: + (xMSF, "ErrorBox", com.sun.star.awt.VclWindowPeerAttribute.OK, "message") + + @param windowServiceName one of the following strings: + "ErrorBox", "WarningBox", "MessBox", "InfoBox", "QueryBox". + There are other values possible, look + under src/toolkit/source/awt/vcltoolkit.cxx + @param windowAttribute see com.sun.star.awt.VclWindowPeerAttribute + @return 0 = cancel, 1 = ok, 2 = yes, 3 = no(I'm not sure here) + other values check for yourself ;-) + ''' + @classmethod + def showMessageBox(self, xMSF, windowServiceName, windowAttribute, MessageText, peer=None): + + if MessageText is None: + return 0 + + iMessage = 0 + try: + # If the peer is null we try to get one from the desktop... + if peer is None: + xFrame = Desktop.getActiveFrame(xMSF) + peer = xFrame.getComponentWindow() + + xToolkit = xMSF.createInstance("com.sun.star.awt.Toolkit") + oDescriptor = WindowDescriptor() + oDescriptor.WindowServiceName = windowServiceName + oDescriptor.Parent = peer + oDescriptor.Type = MODALTOP + oDescriptor.WindowAttributes = windowAttribute + xMsgPeer = xToolkit.createWindow(oDescriptor) + xMsgPeer.setMessageText(MessageText) + iMessage = xMsgPeer.execute() + xMsgPeer.dispose() + except Exception: + traceback.print_exc() + + return iMessage + + @classmethod + def createStringSubstitution(self, xMSF): + xPathSubst = None + try: + xPathSubst = xMSF.createInstance("com.sun.star.util.PathSubstitution") + return xPathSubst + except UnoException, e: + traceback.print_exc() + return None diff --git a/wizards/com/sun/star/wizards/common/__init__.py b/wizards/com/sun/star/wizards/common/__init__.py new file mode 100644 index 000000000..1e42b88e4 --- /dev/null +++ b/wizards/com/sun/star/wizards/common/__init__.py @@ -0,0 +1 @@ +"""Common""" diff --git a/wizards/com/sun/star/wizards/common/prova.py b/wizards/com/sun/star/wizards/common/prova.py new file mode 100644 index 000000000..1219ba9af --- /dev/null +++ b/wizards/com/sun/star/wizards/common/prova.py @@ -0,0 +1,7 @@ +from PropertyNames import PropertyNames + +class prova: + + def Imprimir(self): + print PropertyNames.PROPERTY_STEP + diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py new file mode 100644 index 000000000..5692d90f4 --- /dev/null +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py @@ -0,0 +1,240 @@ +from com.sun.star.awt.WindowClass import TOP +import traceback +import uno + +class OfficeDocument(object): + '''Creates a new instance of OfficeDocument ''' + + def __init__(self, _xMSF): + self.xMSF = _xMSF + + @classmethod + def attachEventCall(self, xComponent, EventName, EventType, EventURL): + try: + oEventProperties = range(2) + oEventProperties[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + oEventProperties[0].Name = "EventType" + oEventProperties[0].Value = EventType + # "Service", "StarBasic" + oEventProperties[1] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + oEventProperties[1].Name = "Script" #"URL"; + oEventProperties[1].Value = EventURL + uno.invoke(xComponent.getEvents(), "replaceByName", (EventName, uno.Any( \ + "[]com.sun.star.beans.PropertyValue", tuple(oEventProperties)))) + except Exception, exception: + traceback.print_exc() + + def dispose(self, xMSF, xComponent): + try: + if xComponent != None: + xFrame = xComponent.getCurrentController().getFrame() + if xComponent.isModified(): + xComponent.setModified(False) + + Desktop.dispatchURL(xMSF, ".uno:CloseDoc", xFrame) + + except PropertyVetoException, exception: + traceback.print_exc() + + ''' + Create a new office document, attached to the given frame. + @param desktop + @param frame + @param sDocumentType e.g. swriter, scalc, ( simpress, scalc : not tested) + @return the document Component (implements XComponent) object ( XTextDocument, or XSpreadsheedDocument ) + ''' + + def createNewDocument(self, frame, sDocumentType, preview, readonly): + loadValues = range(2) + loadValues[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[0].Name = "ReadOnly" + if readonly: + loadValues[0].Value = True + else: + loadValues[0].Value = False + + loadValues[1] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[1].Name = "Preview" + if preview: + loadValues[1].Value = True + else: + loadValues[1].Value = False + + sURL = "private:factory/" + sDocumentType + try: + + xComponent = frame.loadComponentFromURL(sURL, "_self", 0, loadValues) + + except Exception, exception: + traceback.print_exc() + + return xComponent + + def createNewFrame(self, xMSF, listener): + return createNewFrame(xMSF, listener, "_blank") + + def createNewFrame(self, xMSF, listener, FrameName): + xFrame = None + if FrameName.equalsIgnoreCase("WIZARD_LIVE_PREVIEW"): + xFrame = createNewPreviewFrame(xMSF, listener) + else: + xF = Desktop.getDesktop(xMSF) + xFrame = xF.findFrame(FrameName, 0) + if listener != None: + xFF = xF.getFrames() + xFF.remove(xFrame) + xF.addTerminateListener(listener) + + return xFrame + + def createNewPreviewFrame(self, xMSF, listener): + xToolkit = None + try: + xToolkit = xMSF.createInstance("com.sun.star.awt.Toolkit") + except Exception, e: + # TODO Auto-generated catch block + traceback.print_exc() + + #describe the window and its properties + aDescriptor = WindowDescriptor.WindowDescriptor() + aDescriptor.Type = TOP + aDescriptor.WindowServiceName = "window" + aDescriptor.ParentIndex = -1 + aDescriptor.Parent = None + aDescriptor.Bounds = Rectangle.Rectangle_unknown(10, 10, 640, 480) + aDescriptor.WindowAttributes = WindowAttribute.BORDER | WindowAttribute.MOVEABLE | WindowAttribute.SIZEABLE | VclWindowPeerAttribute.CLIPCHILDREN + #create a new blank container window + xPeer = None + try: + xPeer = xToolkit.createWindow(aDescriptor) + except IllegalArgumentException, e: + # TODO Auto-generated catch block + traceback.print_exc() + + #define some further properties of the frame window + #if it's needed .-) + #xPeer->setBackground(...); + #create new empty frame and set window on it + xFrame = None + try: + xFrame = xMSF.createInstance("com.sun.star.frame.Frame") + except Exception, e: + # TODO Auto-generated catch block + traceback.print_exc() + + xFrame.initialize(xPeer) + #from now this frame is useable ... + #and not part of the desktop tree. + #You are alone with him .-) + if listener != None: + Desktop.getDesktop(xMSF).addTerminateListener(listener) + + return xFrame + + @classmethod + def load(self, xInterface, sURL, sFrame, xValues): + xComponent = None + try: + xComponent = xInterface.loadComponentFromURL(sURL, sFrame, 0, tuple(xValues)) + except Exception, exception: + traceback.print_exc() + + return xComponent + + @classmethod + def store(self, xMSF, xComponent, StorePath, FilterName, bStoreToUrl): + try: + if FilterName.length() > 0: + oStoreProperties = range(2) + oStoreProperties[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + oStoreProperties[0].Name = "FilterName" + oStoreProperties[0].Value = FilterName + oStoreProperties[1] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + oStoreProperties[1].Name = "InteractionHandler" + oStoreProperties[1].Value = xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler") + else: + oStoreProperties = range(0) + + if bStoreToUrl == True: + xComponent.storeToURL(StorePath, oStoreProperties) + else: + xStoreable.storeAsURL(StorePath, oStoreProperties) + + return True + except Exception, exception: + traceback.print_exc() + return False + + def close(self, xComponent): + bState = False + if xComponent != None: + try: + xComponent.close(True) + bState = True + except com.sun.star.util.CloseVetoException, exCloseVeto: + print "could not close doc" + bState = False + + else: + xComponent.dispose() + bState = True + + return bState + + def ArraytoCellRange(self, datalist, oTable, xpos, ypos): + try: + rowcount = datalist.length + if rowcount > 0: + colcount = datalist[0].length + if colcount > 0: + xNewRange = oTable.getCellRangeByPosition(xpos, ypos, (colcount + xpos) - 1, (rowcount + ypos) - 1) + xNewRange.setDataArray(datalist) + + except Exception, e: + traceback.print_exc() + + def getFileMediaDecriptor(self, xmsf, url): + typeDetect = xmsf.createInstance("com.sun.star.document.TypeDetection") + mediaDescr = range(1) + mediaDescr[0][0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + mediaDescr[0][0].Name = "URL" + mediaDescr[0][0].Value = url + Type = typeDetect.queryTypeByDescriptor(mediaDescr, True) + if Type.equals(""): + return None + else: + return typeDetect.getByName(type) + + def getTypeMediaDescriptor(self, xmsf, type): + typeDetect = xmsf.createInstance("com.sun.star.document.TypeDetection") + return typeDetect.getByName(type) + + ''' + returns the count of slides in a presentation, + or the count of pages in a draw document. + @param model a presentation or a draw document + @return the number of slides/pages in the given document. + ''' + + def getSlideCount(self, model): + return model.getDrawPages().getCount() + + def getDocumentProperties(self, document): + return document.getDocumentProperties() + + def showMessageBox(self, xMSF, windowServiceName, windowAttribute, MessageText): + + return SystemDialog.showMessageBox(xMSF, windowServiceName, windowAttribute, MessageText) + + def getWindowPeer(self): + return self.xWindowPeer + + ''' + @param windowPeer The xWindowPeer to set. + Should be called as soon as a Windowpeer of a wizard dialog is available + The windowpeer is needed to call a Messagebox + ''' + + def setWindowPeer(self, windowPeer): + self.xWindowPeer = windowPeer + diff --git a/wizards/com/sun/star/wizards/fax/CGFax.py b/wizards/com/sun/star/wizards/fax/CGFax.py new file mode 100644 index 000000000..24b5ae067 --- /dev/null +++ b/wizards/com/sun/star/wizards/fax/CGFax.py @@ -0,0 +1,31 @@ +from common.ConfigGroup import * + +class CGFax(ConfigGroup): + + def __init__(self): + + self.cp_Style = int() + self.cp_PrintCompanyLogo = bool() + self.cp_PrintDate = bool() + self.cp_PrintSubjectLine = bool() + self.cp_PrintSalutation = bool() + self.cp_PrintCommunicationType = bool() + self.cp_PrintGreeting = bool() + self.cp_PrintFooter = bool() + self.cp_CommunicationType = str() + self.cp_Salutation = str() + self.cp_Greeting = str() + self.cp_SenderAddressType = int() + self.cp_SenderCompanyName = str() + self.cp_SenderStreet = str() + self.cp_SenderPostCode = str() + self.cp_SenderState = str() + self.cp_SenderCity = str() + self.cp_SenderFax = str() + self.cp_ReceiverAddressType = int() + self.cp_Footer = str() + self.cp_FooterOnlySecondPage = bool() + self.cp_FooterPageNumbers = bool() + self.cp_CreationType = int() + self.cp_TemplateName = str() + self.cp_TemplatePath = str() diff --git a/wizards/com/sun/star/wizards/fax/CGFaxWizard.py b/wizards/com/sun/star/wizards/fax/CGFaxWizard.py new file mode 100644 index 000000000..a6729e4a5 --- /dev/null +++ b/wizards/com/sun/star/wizards/fax/CGFaxWizard.py @@ -0,0 +1,10 @@ +from common.ConfigGroup import * +from CGFax import CGFax + +class CGFaxWizard(ConfigGroup): + + def __init__(self): + self.cp_FaxType = int() + self.cp_BusinessFax = CGFax() + self.cp_PrivateFax = CGFax() + diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.py b/wizards/com/sun/star/wizards/fax/CallWizard.py new file mode 100644 index 000000000..2bd940d82 --- /dev/null +++ b/wizards/com/sun/star/wizards/fax/CallWizard.py @@ -0,0 +1,144 @@ +import traceback + +class CallWizard(object): + + ''' + Gives a factory for creating the service. This method is called by the + JavaLoader +

+ @param stringImplementationName The implementation name of the component. + @param xMSF The service manager, who gives access to every known service. + @param xregistrykey Makes structural information (except regarding tree + structures) of a single registry key accessible. + @return Returns a XSingleServiceFactory for creating the component. + @see com.sun.star.comp.loader.JavaLoader# + ''' + + @classmethod + def __getServiceFactory(self, stringImplementationName, xMSF, xregistrykey): + xsingleservicefactory = None + if stringImplementationName.equals(WizardImplementation.getName()): + xsingleservicefactory = FactoryHelper.getServiceFactory(WizardImplementation, WizardImplementation.__serviceName, xMSF, xregistrykey) + + return xsingleservicefactory + + ''' + This class implements the component. At least the interfaces XServiceInfo, + XTypeProvider, and XInitialization should be provided by the service. + ''' + + class WizardImplementation: + __serviceName = "com.sun.star.wizards.fax.CallWizard" + #private XMultiServiceFactory xmultiservicefactory + + ''' + The constructor of the inner class has a XMultiServiceFactory parameter. + @param xmultiservicefactoryInitialization A special service factory could be + introduced while initializing. + ''' + + @classmethod + def WizardImplementation_XMultiServiceFactory(self, xmultiservicefactoryInitialization): + tmp = WizardImplementation() + tmp.WizardImplementation_body_XMultiServiceFactory(xmultiservicefactoryInitialization) + return tmp + + def WizardImplementation_body_XMultiServiceFactory(self, xmultiservicefactoryInitialization): + self.xmultiservicefactory = xmultiservicefactoryInitialization + if self.xmultiservicefactory != None: + pass + + ''' + Execute Wizard + @param str only valid parameter is 'start' at the moment. + ''' + + def trigger(self, str): + if str.equalsIgnoreCase("start"): + lw = FaxWizardDialogImpl.FaxWizardDialogImpl_unknown(self.xmultiservicefactory) + if not FaxWizardDialogImpl.running: + lw.startWizard(self.xmultiservicefactory, None) + + ''' + The service name, that must be used to get an instance of this service. + The service manager, that gives access to all registered services. + This method is a member of the interface for initializing an object directly + after its creation. + @param object This array of arbitrary objects will be passed to the component + after its creation. + @throws com.sun.star.uno.Exception Every exception will not be handled, but + will be passed to the caller. + ''' + + def initialize(self, object): + pass + + ''' + This method returns an array of all supported service names. + @return Array of supported service names. + ''' + + def getSupportedServiceNames(self): + stringSupportedServiceNames = range(1) + stringSupportedServiceNames[0] = self.__class__.__serviceName + return (stringSupportedServiceNames) + + ''' + This method returns true, if the given service will be supported by the + component. + @param stringService Service name. + @return True, if the given service name will be supported. + ''' + + def supportsService(self, stringService): + booleanSupportsService = False + if stringService.equals(self.__class__.__serviceName): + booleanSupportsService = True + + return (booleanSupportsService) + + ''' + This method returns an array of bytes, that can be used to unambiguously + distinguish between two sets of types, e.g. to realise hashing functionality + when the object is introspected. Two objects that return the same ID also + have to return the same set of types in getTypes(). If an unique + implementation Id cannot be provided this method has to return an empty + sequence. Important: If the object aggregates other objects the ID has to be + unique for the whole combination of objects. + @return Array of bytes, in order to distinguish between two sets. + ''' + + def getImplementationId(self): + byteReturn = [] + try: + byteReturn = ("" + self.hashCode()).getBytes() + except Exception, exception: + traceback.print_exc() + + return (byteReturn) + + ''' + Return the class name of the component. + @return Class name of the component. + ''' + + def getImplementationName(self): + return (WizardImplementation.getName()) + + ''' + Provides a sequence of all types (usually interface types) provided by the + object. + @return Sequence of all types (usually interface types) provided by the + service. + ''' + + def getTypes(self): + typeReturn = [] + try: + #COMMENTED + #typeReturn = [new Type (XPropertyAccess.class), new Type (XJob.class), new Type (XJobExecutor.class), new Type (XTypeProvider.class), new Type (XServiceInfo.class), new Type (XInitialization.class)] + except Exception, exception: + traceback.print_exc() + + return (typeReturn) + diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py new file mode 100644 index 000000000..25db248c8 --- /dev/null +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -0,0 +1,109 @@ +import uno +from text.TextDocument import * +from com.sun.star.uno import Exception as UnoException +from text.TextSectionHandler import TextSectionHandler +from text.TextFieldHandler import TextFieldHandler +from common.Configuration import Configuration +from common.PropertyNames import PropertyNames + +from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK +from com.sun.star.style.ParagraphAdjust import CENTER +from com.sun.star.text.PageNumberType import CURRENT +from com.sun.star.style.NumberingType import ARABIC + +class FaxDocument(TextDocument): + + def __init__(self, xMSF, listener): + super(FaxDocument,self).__init__(xMSF, listener, "WIZARD_LIVE_PREVIEW") + self.keepLogoFrame = True + self.keepTypeFrame = True + + def switchElement(self, sElement, bState): + try: + mySectionHandler = TextSectionHandler(self.xMSF, self.xTextDocument) + oSection = mySectionHandler.xTextDocument.getTextSections().getByName(sElement) + Helper.setUnoPropertyValue(oSection, "IsVisible", bState) + except UnoException, exception: + traceback.print_exc() + + def updateDateFields(self): + FH = TextFieldHandler(self.xTextDocument, self.xTextDocument) + FH.updateDateFields() + + def switchFooter(self, sPageStyle, bState, bPageNumber, sText): + if self.xTextDocument != None: + self.xTextDocument.lockControllers() + try: + + xPageStyleCollection = self.xTextDocument.getStyleFamilies().getByName("PageStyles") + xPageStyle = xPageStyleCollection.getByName(sPageStyle) + + if bState: + xPageStyle.setPropertyValue("FooterIsOn", True) + xFooterText = propertySet.getPropertyValue("FooterText") + xFooterText.setString(sText) + + if bPageNumber: + #Adding the Page Number + myCursor = xFooterText.Text.createTextCursor() + myCursor.gotoEnd(False) + xFooterText.insertControlCharacter(myCursor, PARAGRAPH_BREAK, False) + myCursor.setPropertyValue("ParaAdjust", CENTER ) + + xPageNumberField = xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber") + xPageNumberField.setPropertyValue("NumberingType", uno.Any("short",ARABIC)) + xPageNumberField.setPropertyValue("SubType", CURRENT) + xFooterText.insertTextContent(xFooterText.getEnd(), xPageNumberField, False) + + else: + Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", False) + + self.xTextDocument.unlockControllers() + except UnoException, exception: + traceback.print_exc() + + def hasElement(self, sElement): + if self.xTextDocument != None: + mySectionHandler = TextSectionHandler(self.xMSF, self.xTextDocument) + return mySectionHandler.hasTextSectionByName(sElement) + else: + return False + + def switchUserField(self, sFieldName, sNewContent, bState): + myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) + if bState: + myFieldHandler.changeUserFieldContent(sFieldName, sNewContent) + else: + myFieldHandler.changeUserFieldContent(sFieldName, "") + + def fillSenderWithUserData(self): + try: + myFieldHandler = TextFieldHandler(self.xTextDocument, self.xTextDocument) + oUserDataAccess = Configuration.getConfigurationRoot(self.xMSF, "org.openoffice.UserProfile/Data", False) + myFieldHandler.changeUserFieldContent("Company", Helper.getUnoObjectbyName(oUserDataAccess, "o")) + myFieldHandler.changeUserFieldContent("Street", Helper.getUnoObjectbyName(oUserDataAccess, "street")) + myFieldHandler.changeUserFieldContent("PostCode", Helper.getUnoObjectbyName(oUserDataAccess, "postalcode")) + myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, Helper.getUnoObjectbyName(oUserDataAccess, "st")) + myFieldHandler.changeUserFieldContent("City", Helper.getUnoObjectbyName(oUserDataAccess, "l")) + myFieldHandler.changeUserFieldContent("Fax", Helper.getUnoObjectbyName(oUserDataAccess, "facsimiletelephonenumber")) + except UnoException, exception: + traceback.print_exc() + + def killEmptyUserFields(self): + myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) + myFieldHandler.removeUserFieldByContent("") + + def killEmptyFrames(self): + try: + if not self.keepLogoFrame: + xTF = TextFrameHandler.getFrameByName("Company Logo", self.xTextDocument) + if xTF != None: + xTF.dispose() + + if not self.keepTypeFrame: + xTF = TextFrameHandler.getFrameByName("Communication Type", self.xTextDocument) + if xTF != None: + xTF.dispose() + + except UnoException, e: + traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py new file mode 100644 index 000000000..9ff238354 --- /dev/null +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py @@ -0,0 +1,101 @@ +from ui.WizardDialog import * +from FaxWizardDialogResources import FaxWizardDialogResources +from FaxWizardDialogConst import * +from com.sun.star.awt.FontUnderline import SINGLE + +class FaxWizardDialog(WizardDialog): + #Image Control + #Fixed Line + #File Control + #Image Control + #Font Descriptors as Class members. + #Resources Object + + def __init__(self, xmsf): + super(FaxWizardDialog,self).__init__(xmsf, HIDMAIN ) + + #Load Resources + self.resources = FaxWizardDialogResources(xmsf) + + #set dialog properties... + Helper.setUnoPropertyValues(self.xDialogModel, + ("Closeable", PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH), + (True, 210, True, 104, 52, 1, uno.Any("short",1), self.resources.resFaxWizardDialog_title, 310)) + + self.fontDescriptor1 = uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor2 = uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor4 = uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor5 = uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + #Set member- FontDescriptors... + self.fontDescriptor1.Weight = 150 + self.fontDescriptor1.Underline = SINGLE + self.fontDescriptor2.Weight = 100 + self.fontDescriptor4.Weight = 100 + self.fontDescriptor5.Weight = 150 + + #build components + + def buildStep1(self): + self.optBusinessFax = self.insertRadioButton("optBusinessFax", OPTBUSINESSFAX_ITEM_CHANGED,(PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTBUSINESSFAX_HID, self.resources.resoptBusinessFax_value, 97, 28, 1, uno.Any("short",1), 184)) + self.lstBusinessStyle = self.insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTBUSINESSSTYLE_HID, 180, 40, 1, uno.Any("short",3), 74)) + self.optPrivateFax = self.insertRadioButton("optPrivateFax", OPTPRIVATEFAX_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTPRIVATEFAX_HID, self.resources.resoptPrivateFax_value, 97, 81, 1, uno.Any("short",2), 184)) + self.lstPrivateStyle = self.insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTPRIVATESTYLE_HID, 180, 95, 1, uno.Any("short",4), 74)) + self.lblBusinessStyle = self.insertLabel("lblBusinessStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblBusinessStyle_value, 110, 42, 1, uno.Any("short",32), 60)) + + self.lblTitle1 = self.insertLabel("lblTitle1", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle1_value, True, 91, 8, 1, uno.Any("short",37), 212)) + self.lblPrivateStyle = self.insertLabel("lblPrivateStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPrivateStyle_value, 110, 95, 1, uno.Any("short",50), 60)) + self.lblIntroduction = self.insertLabel("lblIntroduction", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (39, self.resources.reslblIntroduction_value, True, 104, 145, 1, uno.Any("short",55), 199)) + self.ImageControl3 = self.insertInfoImage(92, 145, 1) + def buildStep2(self): + self.chkUseLogo = self.insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSELOGO_HID, self.resources.reschkUseLogo_value, 97, 28, uno.Any("short",0), 2, uno.Any("short",5), 212)) + self.chkUseDate = self.insertCheckBox("chkUseDate", CHKUSEDATE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEDATE_HID, self.resources.reschkUseDate_value, 97, 43, uno.Any("short",0), 2,uno.Any("short",6), 212)) + self.chkUseCommunicationType = self.insertCheckBox("chkUseCommunicationType", CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSECOMMUNICATIONTYPE_HID, self.resources.reschkUseCommunicationType_value, 97, 57, uno.Any("short",0), 2, uno.Any("short",07), 100)) + self.lstCommunicationType = self.insertComboBox("lstCommunicationType", LSTCOMMUNICATIONTYPE_ACTION_PERFORMED, LSTCOMMUNICATIONTYPE_ITEM_CHANGED, LSTCOMMUNICATIONTYPE_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTCOMMUNICATIONTYPE_HID, 105, 68, 2, uno.Any("short",8), 174)) + self.chkUseSubject = self.insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSESUBJECT_HID, self.resources.reschkUseSubject_value, 97, 87, uno.Any("short",0), 2, uno.Any("short",9), 212)) + self.chkUseSalutation = self.insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSESALUTATION_HID, self.resources.reschkUseSalutation_value, 97, 102, uno.Any("short",0), 2, uno.Any("short",10), 100)) + self.lstSalutation = self.insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTSALUTATION_HID, 105, 113, 2, uno.Any("short",11), 174)) + self.chkUseGreeting = self.insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEGREETING_HID, self.resources.reschkUseGreeting_value, 97, 132, uno.Any("short",0), 2, uno.Any("short",12), 100)) + self.lstGreeting = self.insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTGREETING_HID, 105, 143, 2,uno.Any("short",13), 174)) + self.chkUseFooter = self.insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEFOOTER_HID, self.resources.reschkUseFooter_value, 97, 163, uno.Any("short",0), 2, uno.Any("short",14), 212)) + self.lblTitle3 = self.insertLabel("lblTitle3", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle3_value, True, 91, 8, 2, uno.Any("short",59), 212)) + + def buildStep3(self): + self.optSenderPlaceholder = self.insertRadioButton("optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTSENDERPLACEHOLDER_HID, self.resources.resoptSenderPlaceholder_value, 104, 42, 3, uno.Any("short",15), 149)) + self.optSenderDefine = self.insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTSENDERDEFINE_HID, self.resources.resoptSenderDefine_value, 104, 54, 3, uno.Any("short",16), 149)) + self.txtSenderName = self.insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERNAME_HID, 182, 67, 3, uno.Any("short",17), 119)) + self.txtSenderStreet = self.insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERSTREET_HID, 182, 81, 3, uno.Any("short",18), 119)) + self.txtSenderPostCode = self.insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERPOSTCODE_HID, 182, 95, 3, uno.Any("short",19), 25)) + self.txtSenderState = self.insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERSTATE_HID, 211, 95, 3, uno.Any("short",20), 21)) + self.txtSenderCity = self.insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERCITY_HID, 236, 95, 3, uno.Any("short",21), 65)) + self.txtSenderFax = self.insertTextField("txtSenderFax", TXTSENDERFAX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERFAX_HID, 182, 109, 3, uno.Any("short",22), 119)) + self.optReceiverPlaceholder = self.insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTRECEIVERPLACEHOLDER_HID, self.resources.resoptReceiverPlaceholder_value, 104, 148, 3, uno.Any("short",23), 200)) + self.optReceiverDatabase = self.insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTRECEIVERDATABASE_HID, self.resources.resoptReceiverDatabase_value, 104, 160, 3, uno.Any("short",24), 200)) + self.lblSenderAddress = self.insertLabel("lblSenderAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderAddress_value, 97, 28, 3, uno.Any("short",46), 136)) + self.FixedLine2 = self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (5, 90, 126, 3, uno.Any("short",51), 212)) + self.lblSenderName = self.insertLabel("lblSenderName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderName_value, 113, 69, 3, uno.Any("short",52), 68)) + self.lblSenderStreet = self.insertLabel("lblSenderStreet", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderStreet_value, 113, 82, 3, uno.Any("short",53), 68)) + self.lblPostCodeCity = self.insertLabel("lblPostCodeCity", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPostCodeCity_value, 113, 97, 3, uno.Any("short",54), 68)) + self.lblTitle4 = self.insertLabel("lblTitle4", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle4_value, True, 91, 8, 3, uno.Any("short",60), 212)) + self.Label1 = self.insertLabel("lblSenderFax", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.resLabel1_value, 113, 111, 3, uno.Any("short",68), 68)) + self.Label2 = self.insertLabel("Label2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.resLabel2_value, 97, 137, 3, uno.Any("short",69), 136)) + + def buildStep4(self): + self.txtFooter = self.insertTextField("txtFooter", TXTFOOTER_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (47, TXTFOOTER_HID, True, 97, 40, 4, uno.Any("short",25), 203)) + self.chkFooterNextPages = self.insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKFOOTERNEXTPAGES_HID, self.resources.reschkFooterNextPages_value, 97, 92, uno.Any("short",0), 4, uno.Any("short",26), 202)) + self.chkFooterPageNumbers = self.insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKFOOTERPAGENUMBERS_HID, self.resources.reschkFooterPageNumbers_value, 97, 106, uno.Any("short",0), 4, uno.Any("short",27), 201)) + self.lblFooter = self.insertLabel("lblFooter", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor4, 8, self.resources.reslblFooter_value, 97, 28, 4, uno.Any("short",33), 116)) + self.lblTitle5 = self.insertLabel("lblTitle5", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle5_value, True, 91, 8, 4, uno.Any("short",61), 212)) + + def buildStep5(self): + self.txtTemplateName = self.insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH), (12, TXTTEMPLATENAME_HID, 202, 56, 5, uno.Any("short",28), self.resources.restxtTemplateName_value, 100)) + + self.optCreateFax = self.insertRadioButton("optCreateFax", OPTCREATEFAX_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTCREATEFAX_HID, self.resources.resoptCreateFax_value, 104, 111, 5, uno.Any("short",30), 198)) + self.optMakeChanges = self.insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTMAKECHANGES_HID, self.resources.resoptMakeChanges_value, 104, 123, 5, uno.Any("short",31), 198)) + self.lblFinalExplanation1 = self.insertLabel("lblFinalExplanation1", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (28, self.resources.reslblFinalExplanation1_value, True, 97, 28, 5, uno.Any("short",34), 205)) + self.lblProceed = self.insertLabel("lblProceed", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblProceed_value, 97, 100, 5, uno.Any("short",35), 204)) + self.lblFinalExplanation2 = self.insertLabel("lblFinalExplanation2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (33, self.resources.reslblFinalExplanation2_value, True, 104, 145, 5, uno.Any("short",36), 199)) + self.ImageControl2 = self.insertImage("ImageControl2", ("Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (uno.Any("short",0), 10, "private:resource/dbu/image/19205", 92, 145, False, 5, uno.Any("short",47), 10)) + self.lblTemplateName = self.insertLabel("lblTemplateName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblTemplateName_value, 97, 58, 5, uno.Any("short",57), 101)) + + self.lblTitle6 = self.insertLabel("lblTitle6", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle6_value, True, 91, 8, 5, uno.Any("short",62), 212)) + diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py new file mode 100644 index 000000000..05a5ba737 --- /dev/null +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py @@ -0,0 +1,83 @@ +from common.HelpIds import HelpIds + + +OPTBUSINESSFAX_ITEM_CHANGED = "optBusinessFaxItemChanged" +LSTBUSINESSSTYLE_ACTION_PERFORMED = None # "lstBusinessStyleActionPerformed" +LSTBUSINESSSTYLE_ITEM_CHANGED = "lstBusinessStyleItemChanged" +OPTPRIVATEFAX_ITEM_CHANGED = "optPrivateFaxItemChanged" +LSTPRIVATESTYLE_ACTION_PERFORMED = None # "lstPrivateStyleActionPerformed" +LSTPRIVATESTYLE_ITEM_CHANGED = "lstPrivateStyleItemChanged" +CHKUSELOGO_ITEM_CHANGED = "chkUseLogoItemChanged" +CHKUSEDATE_ITEM_CHANGED = "chkUseDateItemChanged" +CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED = "chkUseCommunicationItemChanged" +LSTCOMMUNICATIONTYPE_ACTION_PERFORMED = None # "lstCommunicationActionPerformed" +LSTCOMMUNICATIONTYPE_ITEM_CHANGED = "lstCommunicationItemChanged" +LSTCOMMUNICATIONTYPE_TEXT_CHANGED = "lstCommunicationTextChanged" +CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged" +CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged" +LSTSALUTATION_ACTION_PERFORMED = None # "lstSalutationActionPerformed" +LSTSALUTATION_ITEM_CHANGED = "lstSalutationItemChanged" +LSTSALUTATION_TEXT_CHANGED = "lstSalutationTextChanged" +CHKUSEGREETING_ITEM_CHANGED = "chkUseGreetingItemChanged" +LSTGREETING_ACTION_PERFORMED = None # "lstGreetingActionPerformed" +LSTGREETING_ITEM_CHANGED = "lstGreetingItemChanged" +LSTGREETING_TEXT_CHANGED = "lstGreetingTextChanged" +CHKUSEFOOTER_ITEM_CHANGED = "chkUseFooterItemChanged" +OPTSENDERPLACEHOLDER_ITEM_CHANGED = "optSenderPlaceholderItemChanged" +OPTSENDERDEFINE_ITEM_CHANGED = "optSenderDefineItemChanged" +TXTSENDERNAME_TEXT_CHANGED = "txtSenderNameTextChanged" +TXTSENDERSTREET_TEXT_CHANGED = "txtSenderStreetTextChanged" +TXTSENDERPOSTCODE_TEXT_CHANGED = "txtSenderPostCodeTextChanged" +TXTSENDERSTATE_TEXT_CHANGED = "txtSenderStateTextChanged" +TXTSENDERCITY_TEXT_CHANGED = "txtSenderCityTextChanged" +TXTSENDERFAX_TEXT_CHANGED = "txtSenderFaxTextChanged" +OPTRECEIVERPLACEHOLDER_ITEM_CHANGED = "optReceiverPlaceholderItemChanged" +OPTRECEIVERDATABASE_ITEM_CHANGED = "optReceiverDatabaseItemChanged" +TXTFOOTER_TEXT_CHANGED = "txtFooterTextChanged" +CHKFOOTERNEXTPAGES_ITEM_CHANGED = "chkFooterNextPagesItemChanged" +CHKFOOTERPAGENUMBERS_ITEM_CHANGED = "chkFooterPageNumbersItemChanged" +TXTTEMPLATENAME_TEXT_CHANGED = "txtTemplateNameTextChanged" +FILETEMPLATEPATH_TEXT_CHANGED = None # "fileTemplatePathTextChanged" +OPTCREATEFAX_ITEM_CHANGED = "optCreateFaxItemChanged" +OPTMAKECHANGES_ITEM_CHANGED = "optMakeChangesItemChanged" +imageURLImageControl2 = None #"images/ImageControl2" +imageURLImageControl3 = None #"images/ImageControl3" + +#Help IDs + +HID = 41119 #TODO enter first hid here +HIDMAIN = 41180 +OPTBUSINESSFAX_HID = HelpIds.getHelpIdString(HID + 1) +LSTBUSINESSSTYLE_HID = HelpIds.getHelpIdString(HID + 2) +OPTPRIVATEFAX_HID = HelpIds.getHelpIdString(HID + 3) +LSTPRIVATESTYLE_HID = HelpIds.getHelpIdString(HID + 4) +IMAGECONTROL3_HID = HelpIds.getHelpIdString(HID + 5) +CHKUSELOGO_HID = HelpIds.getHelpIdString(HID + 6) +CHKUSEDATE_HID = HelpIds.getHelpIdString(HID + 7) +CHKUSECOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 8) +LSTCOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 9) +CHKUSESUBJECT_HID = HelpIds.getHelpIdString(HID + 10) +CHKUSESALUTATION_HID = HelpIds.getHelpIdString(HID + 11) +LSTSALUTATION_HID = HelpIds.getHelpIdString(HID + 12) +CHKUSEGREETING_HID = HelpIds.getHelpIdString(HID + 13) +LSTGREETING_HID = HelpIds.getHelpIdString(HID + 14) +CHKUSEFOOTER_HID = HelpIds.getHelpIdString(HID + 15) +OPTSENDERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 16) +OPTSENDERDEFINE_HID = HelpIds.getHelpIdString(HID + 17) +TXTSENDERNAME_HID = HelpIds.getHelpIdString(HID + 18) +TXTSENDERSTREET_HID = HelpIds.getHelpIdString(HID + 19) +TXTSENDERPOSTCODE_HID = HelpIds.getHelpIdString(HID + 20) +TXTSENDERSTATE_HID = HelpIds.getHelpIdString(HID + 21) +TXTSENDERCITY_HID = HelpIds.getHelpIdString(HID + 22) +TXTSENDERFAX_HID = HelpIds.getHelpIdString(HID + 23) +OPTRECEIVERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 24) +OPTRECEIVERDATABASE_HID = HelpIds.getHelpIdString(HID + 25) +TXTFOOTER_HID = HelpIds.getHelpIdString(HID + 26) +CHKFOOTERNEXTPAGES_HID = HelpIds.getHelpIdString(HID + 27) +CHKFOOTERPAGENUMBERS_HID = HelpIds.getHelpIdString(HID + 28) +TXTTEMPLATENAME_HID = HelpIds.getHelpIdString(HID + 29) +FILETEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 30) +OPTCREATEFAX_HID = HelpIds.getHelpIdString(HID + 31) +OPTMAKECHANGES_HID = HelpIds.getHelpIdString(HID + 32) +IMAGECONTROL2_HID = HelpIds.getHelpIdString(HID + 33) + diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py new file mode 100644 index 000000000..b1500b022 --- /dev/null +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -0,0 +1,539 @@ +from FaxWizardDialog import * +from CGFaxWizard import * +from FaxDocument import * +from ui.PathSelection import * +from common.FileAccess import * +from ui.event.UnoDataAware import * +from ui.event.RadioDataAware import * +from ui.XPathSelectionListener import XPathSelectionListener +from common.Configuration import * +from document.OfficeDocument import OfficeDocument +from text.TextFieldHandler import TextFieldHandler + +from common.NoValidPathException import * +from com.sun.star.uno import RuntimeException +from com.sun.star.util import CloseVetoException + +from com.sun.star.view.DocumentZoomType import OPTIMAL +from com.sun.star.document.UpdateDocMode import FULL_UPDATE +from com.sun.star.document.MacroExecMode import ALWAYS_EXECUTE + +class FaxWizardDialogImpl(FaxWizardDialog): + + def leaveStep(self, nOldStep, nNewStep): + pass + + def enterStep(self, nOldStep, nNewStep): + pass + + RM_TYPESTYLE = 1 + RM_ELEMENTS = 2 + RM_SENDERRECEIVER = 3 + RM_FOOTER = 4 + RM_FINALSETTINGS = 5 + + + def __init__(self, xmsf): + super(FaxWizardDialogImpl,self).__init__(xmsf) + self.mainDA = [] + self.faxDA = [] + self.bSaveSuccess = False + self.__filenameChanged = False + self.UserTemplatePath = "" + self.sTemplatePath = "" + + @classmethod + def main(self, args): + #only being called when starting wizard remotely + try: + ConnectStr = "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" + xLocMSF = Desktop.connect(ConnectStr) + lw = FaxWizardDialogImpl(xLocMSF) + print + print "lw.startWizard" + print + lw.startWizard(xLocMSF, None) + except RuntimeException, e: + # TODO Auto-generated catch block + traceback.print_exc() + except UnoException, e: + # TODO Auto-generated catch blocksetMaxStep + traceback.print_exc() + except Exception, e: + # TODO Auto-generated catch blocksetMaxStep + traceback.print_exc() + + def startWizard(self, xMSF, CurPropertyValue): + self.running = True + try: + #Number of steps on WizardDialog: + self.setMaxStep(5) + + #instatiate The Document Frame for the Preview + self.myFaxDoc = FaxDocument(xMSF, self) + + #create the dialog: + self.drawNaviBar() + self.buildStep1() + self.buildStep2() + self.buildStep3() + self.buildStep4() + self.buildStep5() + + self.initializeSalutation() + self.initializeGreeting() + self.initializeCommunication() + self.__initializePaths() + + #special Control fFrameor setting the save Path: + self.insertPathSelectionControl() + + #load the last used settings from the registry and apply listeners to the controls: + self.initConfiguration() + + self.initializeTemplates(xMSF) + + #update the dialog UI according to the loaded Configuration + self.__updateUI() + if self.myPathSelection.xSaveTextBox.getText().lower() == "": + self.myPathSelection.initializePath() + + self.xContainerWindow = self.myFaxDoc.xFrame.getContainerWindow() + self.createWindowPeer(self.xContainerWindow); + + #add the Roadmap to the dialog: + self.insertRoadmap() + + #load the last used document and apply last used settings: + #TODO: + self.setConfiguration() + + #If the configuration does not define Greeting/Salutation/CommunicationType yet choose a default + self.__setDefaultForGreetingAndSalutationAndCommunication() + + #disable funtionality that is not supported by the template: + self.initializeElements() + + #disable the document, so that the user cannot change anything: + self.myFaxDoc.xFrame.getComponentWindow().setEnable(False) + + self.executeDialogFromComponent(self.myFaxDoc.xFrame) + self.removeTerminateListener() + self.closeDocument() + self.running = False + except UnoException, exception: + self.removeTerminateListener() + traceback.print_exc() + self.running = False + return + + def cancelWizard(self): + xDialog.endExecute() + self.running = False + + def finishWizard(self): + switchToStep(getCurrentStep(), getMaxStep()) + self.myFaxDoc.setWizardTemplateDocInfo(self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) + try: + fileAccess = FileAccess(xMSF) + self.sPath = self.myPathSelection.getSelectedPath() + if self.sPath.equals(""): + self.myPathSelection.triggerPathPicker() + self.sPath = self.myPathSelection.getSelectedPath() + + self.sPath = fileAccess.getURL(self.sPath) + #first, if the filename was not changed, thus + #it is coming from a saved session, check if the + # file exists and warn the user. + if not self.__filenameChanged: + if fileAccess.exists(self.sPath, True): + answer = SystemDialog.showMessageBox(xMSF, xControl.getPeer(), "MessBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, self.resources.resOverwriteWarning) + if (answer == 3): # user said: no, do not overwrite.... + return False + + + self.myFaxDoc.setWizardTemplateDocInfo(self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) + self.myFaxDoc.killEmptyUserFields() + self.myFaxDoc.keepLogoFrame = (self.chkUseLogo.getState() != 0); + self.myFaxDoc.keepTypeFrame = (self.chkUseCommunicationType.getState() != 0); + self.myFaxDoc.killEmptyFrames() + self.bSaveSuccess = OfficeDocument.store(xMSF, self.xTextDocument, self.sPath, "writer8_template", False) + if self.bSaveSuccess: + saveConfiguration() + xIH = xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler") + loadValues = range(3) + loadValues[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[0].Name = "AsTemplate"; + loadValues[0].Value = True; + loadValues[1] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[1].Name = "MacroExecutionMode"; + loadValues[1].Value = uno.Any("short",ALWAYS_EXECUTE) + loadValues[2] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[2].Name = "UpdateDocMode"; + loadValues[2].Value = uno.Any("short",FULL_UPDATE) + loadValues[3] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[3].Name = "InteractionHandler" + loadValues[3].Value = xIH + if self.bEditTemplate: + loadValues[0].Value = False + else: + loadValues[0].Value = True + + oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), self.sPath, "_default", loadValues) + myViewHandler = oDoc.getCurrentController().getViewSettings() + myViewHandler.setPropertyValue("ZoomType", uno.Any("short",OPTIMAL)); + else: + pass + #TODO: Error Handling + + except UnoException, e: + traceback.print_exc() + finally: + xDialog.endExecute() + self.running = False + + return True + + def closeDocument(self): + try: + self.myFaxDoc.xFrame.close(False) + except CloseVetoException, e: + traceback.print_exc() + + def insertRoadmap(self): + self.addRoadmap() + i = 0 + i = self.insertRoadmapItem(0, True, self.resources.RoadmapLabels[FaxWizardDialogImpl.RM_TYPESTYLE - 1], FaxWizardDialogImpl.RM_TYPESTYLE) + i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[FaxWizardDialogImpl.RM_ELEMENTS - 1], FaxWizardDialogImpl.RM_ELEMENTS) + i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[FaxWizardDialogImpl.RM_SENDERRECEIVER - 1], FaxWizardDialogImpl.RM_SENDERRECEIVER) + i = self.insertRoadmapItem(i, False, self.resources.RoadmapLabels[FaxWizardDialogImpl.RM_FOOTER - 1], FaxWizardDialogImpl.RM_FOOTER) + i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[FaxWizardDialogImpl.RM_FINALSETTINGS - 1], FaxWizardDialogImpl.RM_FINALSETTINGS) + self.setRoadmapInteractive(True) + self.setRoadmapComplete(True) + self.setCurrentRoadmapItemID(1) + + class __myPathSelectionListener(XPathSelectionListener): + + def validatePath(self): + if self.myPathSelection.usedPathPicker: + self.__filenameChanged = True + + self.myPathSelection.usedPathPicker = False + + def insertPathSelectionControl(self): + self.myPathSelection = PathSelection(self.xMSF, self, PathSelection.TransferMode.SAVE, PathSelection.DialogTypes.FILE) + self.myPathSelection.insert(5, 97, 70, 205, 45, self.resources.reslblTemplatePath_value, True, HelpIds.getHelpIdString(HID + 34), HelpIds.getHelpIdString(HID + 35)) + self.myPathSelection.sDefaultDirectory = self.UserTemplatePath + self.myPathSelection.sDefaultName = "myFaxTemplate.ott" + self.myPathSelection.sDefaultFilter = "writer8_template" + self.myPathSelection.addSelectionListener(self.__myPathSelectionListener()) + + def __updateUI(self): + UnoDataAware.updateUIs(self.mainDA) + UnoDataAware.updateUIs(self.faxDA) + + def __initializePaths(self): + try: + self.sTemplatePath = FileAccess.getOfficePath2(self.xMSF, "Template", "share", "/wizard") + self.UserTemplatePath = FileAccess.getOfficePath2(self.xMSF, "Template", "user", "") + self.sBitmapPath = FileAccess.combinePaths(self.xMSF, self.sTemplatePath, "/../wizard/bitmap") + except NoValidPathException, e: + traceback.print_exc() + + def initializeTemplates(self, xMSF): + try: + self.sFaxPath = FileAccess.combinePaths(xMSF,self.sTemplatePath, "/wizard/fax") + self.sWorkPath = FileAccess.getOfficePath2(xMSF, "Work", "", "") + self.BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", self.sFaxPath) + self.PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", self.sFaxPath) + + self.setControlProperty("lstBusinessStyle", "StringItemList", self.BusinessFiles[0]) + self.setControlProperty("lstPrivateStyle", "StringItemList", self.PrivateFiles[0]) + self.setControlProperty("lstBusinessStyle", "SelectedItems", [0]) + self.setControlProperty("lstPrivateStyle", "SelectedItems" , [0]) + return True + except NoValidPathException, e: + # TODO Auto-generated catch block + traceback.print_exc() + return False + + def initializeElements(self): + self.setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, self.myFaxDoc.hasElement("Company Logo")) + self.setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED,self.myFaxDoc.hasElement("Subject Line")) + self.setControlProperty("chkUseDate", PropertyNames.PROPERTY_ENABLED,self.myFaxDoc.hasElement("Date")) + self.myFaxDoc.updateDateFields() + + def initializeSalutation(self): + self.setControlProperty("lstSalutation", "StringItemList", self.resources.SalutationLabels) + + def initializeGreeting(self): + self.setControlProperty("lstGreeting", "StringItemList", self.resources.GreetingLabels) + + def initializeCommunication(self): + self.setControlProperty("lstCommunicationType", "StringItemList", self.resources.CommunicationLabels) + + def __setDefaultForGreetingAndSalutationAndCommunication(self): + if self.lstSalutation.getText() == "": + self.lstSalutation.setText(self.resources.SalutationLabels[0]) + + if self.lstGreeting.getText() == "": + self.lstGreeting.setText(self.resources.GreetingLabels[0]) + + if self.lstCommunicationType.getText() == "": + self.lstCommunicationType.setText(self.resources.CommunicationLabels[0]) + + def initConfiguration(self): + try: + self.myConfig = CGFaxWizard() + root = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.Office.Writer/Wizards/Fax", False) + self.myConfig.readConfiguration(root, "cp_") + self.mainDA.append(RadioDataAware.attachRadioButtons(self.myConfig, "cp_FaxType", (self.optBusinessFax, self.optPrivateFax), None, True)) + self.mainDA.append(UnoDataAware.attachListBox(self.myConfig.cp_BusinessFax, "cp_Style", self.lstBusinessStyle, None, True)) + self.mainDA.append(UnoDataAware.attachListBox(self.myConfig.cp_PrivateFax, "cp_Style", self.lstPrivateStyle, None, True)) + cgl = self.myConfig.cp_BusinessFax + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintCompanyLogo", self.chkUseLogo, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintSubjectLine", self.chkUseSubject, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintSalutation", self.chkUseSalutation, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintDate", self.chkUseDate, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintCommunicationType", self.chkUseCommunicationType, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintGreeting", self.chkUseGreeting, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintFooter", self.chkUseFooter, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_Salutation", self.lstSalutation, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_Greeting", self.lstGreeting, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_CommunicationType", self.lstCommunicationType, None, True)) + self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_SenderAddressType", (self.optSenderDefine, self.optSenderPlaceholder), None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderCompanyName", self.txtSenderName, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderStreet", self.txtSenderStreet, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderPostCode", self.txtSenderPostCode, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderState", self.txtSenderState, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderCity", self.txtSenderCity, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderFax", self.txtSenderFax, None, True)) + self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_ReceiverAddressType", (self.optReceiverDatabase, self.optReceiverPlaceholder), None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_Footer", self.txtFooter, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_FooterOnlySecondPage", self.chkFooterNextPages, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_FooterPageNumbers", self.chkFooterPageNumbers, None, True)) + self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_CreationType", (self.optCreateFax, self.optMakeChanges), None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_TemplateName", self.txtTemplateName, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_TemplatePath", self.myPathSelection.xSaveTextBox, None, True)) + except UnoException, exception: + traceback.print_exc() + + def saveConfiguration(self): + try: + root = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.Office.Writer/Wizards/Fax", True) + self.myConfig.writeConfiguration(root, "cp_") + Configuration.commit(root) + except UnoException, e: + traceback.print_exc() + + def setConfiguration(self): + #set correct Configuration tree: + if self.optBusinessFax.getState(): + self.optBusinessFaxItemChanged() + if self.optPrivateFax.getState(): + self.optPrivateFaxItemChanged() + + def optBusinessFaxItemChanged(self): + DataAware.setDataObjects(self.faxDA, self.myConfig.cp_BusinessFax, True) + self.setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + self.lstBusinessStyleItemChanged() + self.__enableSenderReceiver() + self.__setPossibleFooter(True) + def lstBusinessStyleItemChanged(self): + self.xTextDocument = self.myFaxDoc.loadAsPreview(self.BusinessFiles[1][self.lstBusinessStyle.getSelectedItemPos()], False) + self.initializeElements() + self.setElements() + + def optPrivateFaxItemChanged(self): + DataAware.setDataObjects(self.faxDA, self.myConfig.cp_PrivateFax, True) + self.setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) + self.lstPrivateStyleItemChanged() + self.__disableSenderReceiver() + self.__setPossibleFooter(False) + + def lstPrivateStyleItemChanged(self): + self.xTextDocument = self.myFaxDoc.loadAsPreview(self.PrivateFiles[1][self.lstPrivateStyle.getSelectedItemPos()], False) + self.initializeElements() + self.setElements() + + def txtTemplateNameTextChanged(self): + xDocProps = self.xTextDocument.getDocumentProperties() + xDocProps.Title = self.txtTemplateName.getText() + + def optSenderPlaceholderItemChanged(self): + self.setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblSenderFax", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderFax", PropertyNames.PROPERTY_ENABLED, False) + self.myFaxDoc.fillSenderWithUserData() + + def optSenderDefineItemChanged(self): + self.setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblSenderFax", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderFax", PropertyNames.PROPERTY_ENABLED, True) + self.txtSenderNameTextChanged() + self.txtSenderStreetTextChanged() + self.txtSenderPostCodeTextChanged() + self.txtSenderStateTextChanged() + self.txtSenderCityTextChanged() + self.txtSenderFaxTextChanged() + + def optReceiverPlaceholderItemChanged(self): + OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", "StarBasic", "macro:#/Template.Correspondence.Placeholder()") + + def optReceiverDatabaseItemChanged(self): + OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", "StarBasic", "macro:#/Template.Correspondence.Database()") + + def optCreateFaxItemChanged(self): + self.bEditTemplate = False + + def optMakeChangesItemChanged(self): + self.bEditTemplate = True + + def txtSenderNameTextChanged(self): + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) + myFieldHandler.changeUserFieldContent("Company", self.txtSenderName.getText()) + + def txtSenderStreetTextChanged(self): + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) + myFieldHandler.changeUserFieldContent("Street", self.txtSenderStreet.getText()) + + def txtSenderCityTextChanged(self): + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) + myFieldHandler.changeUserFieldContent("City", self.txtSenderCity.getText()) + + def txtSenderPostCodeTextChanged(self): + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) + myFieldHandler.changeUserFieldContent("PostCode", self.txtSenderPostCode.getText()) + + def txtSenderStateTextChanged(self): + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) + myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, self.txtSenderState.getText()) + + def txtSenderFaxTextChanged(self): + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) + myFieldHandler.changeUserFieldContent("Fax", self.txtSenderFax.getText()) + + #switch Elements on/off ------------------------------------------------------- + + def setElements(self): + #UI relevant: + if self.optSenderDefine.getState(): + self.optSenderDefineItemChanged() + + if self.optSenderPlaceholder.getState(): + self.optSenderPlaceholderItemChanged() + + self.chkUseLogoItemChanged() + self.chkUseSubjectItemChanged() + self.chkUseSalutationItemChanged() + self.chkUseGreetingItemChanged() + self.chkUseCommunicationItemChanged() + self.chkUseDateItemChanged() + self.chkUseFooterItemChanged() + self.txtTemplateNameTextChanged() + #not UI relevant: + if self.optReceiverDatabase.getState(): + self.optReceiverDatabaseItemChanged() + + if self.optReceiverPlaceholder.getState(): + self.optReceiverPlaceholderItemChanged() + + if self.optCreateFax.getState(): + self.optCreateFaxItemChanged() + + if self.optMakeChanges.getState(): + self.optMakeChangesItemChanged() + + def chkUseLogoItemChanged(self): + if self.myFaxDoc.hasElement("Company Logo"): + self.myFaxDoc.switchElement("Company Logo", (self.chkUseLogo.getState() != 0)) + + def chkUseSubjectItemChanged(self): + if self.myFaxDoc.hasElement("Subject Line"): + self.myFaxDoc.switchElement("Subject Line", (self.chkUseSubject.getState() != 0)) + + def chkUseDateItemChanged(self): + if self.myFaxDoc.hasElement("Date"): + self.myFaxDoc.switchElement("Date", (self.chkUseDate.getState() != 0)) + + def chkUseFooterItemChanged(self): + try: + bFooterPossible = (self.chkUseFooter.getState() != 0) and bool(getControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED)) + if self.chkFooterNextPages.getState() != 0: + self.myFaxDoc.switchFooter("First Page", False, (self.chkFooterPageNumbers.getState() != 0), self.txtFooter.getText()) + self.myFaxDoc.switchFooter("Standard", bFooterPossible, (self.chkFooterPageNumbers.getState() != 0), self.txtFooter.getText()) + else: + self.myFaxDoc.switchFooter("First Page", bFooterPossible, (self.chkFooterPageNumbers.getState() != 0), self.txtFooter.getText()) + self.myFaxDoc.switchFooter("Standard", bFooterPossible, (self.chkFooterPageNumbers.getState() != 0), self.txtFooter.getText()) + + #enable/disable roadmap item for footer page + BPaperItem = self.getRoadmapItemByID(FaxWizardDialogImpl.RM_FOOTER) + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, bFooterPossible) + except UnoException, exception: + traceback.print_exc() + + def chkFooterNextPagesItemChanged(self): + chkUseFooterItemChanged() + + def chkFooterPageNumbersItemChanged(self): + chkUseFooterItemChanged() + + def txtFooterTextChanged(self): + chkUseFooterItemChanged() + + def chkUseSalutationItemChanged(self): + self.myFaxDoc.switchUserField("Salutation", self.lstSalutation.getText(), (self.chkUseSalutation.getState() != 0)) + self.setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, self.chkUseSalutation.getState() != 0) + + def lstSalutationItemChanged(self): + self.myFaxDoc.switchUserField("Salutation", self.lstSalutation.getText(), (self.chkUseSalutation.getState() != 0)) + + def chkUseCommunicationItemChanged(self): + self.myFaxDoc.switchUserField("CommunicationType", self.lstCommunicationType.getText(), (self.chkUseCommunicationType.getState() != 0)) + self.setControlProperty("lstCommunicationType", PropertyNames.PROPERTY_ENABLED, self.chkUseCommunicationType.getState() != 0) + + def lstCommunicationItemChanged(self): + self.myFaxDoc.switchUserField("CommunicationType", self.lstCommunicationType.getText(), (self.chkUseCommunicationType.getState() != 0)) + + def chkUseGreetingItemChanged(self): + self.myFaxDoc.switchUserField("Greeting", self.lstGreeting.getText(), (self.chkUseGreeting.getState() != 0)) + self.setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, (self.chkUseGreeting.getState() != 0)) + + def lstGreetingItemChanged(self): + self.myFaxDoc.switchUserField("Greeting", self.lstGreeting.getText(), (self.chkUseGreeting.getState() != 0)) + + def __setPossibleFooter(self, bState): + self.setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, bState) + if not bState: + self.chkUseFooter.setState(0) + + self.chkUseFooterItemChanged() + + def __enableSenderReceiver(self): + BPaperItem = self.getRoadmapItemByID(FaxWizardDialogImpl.RM_SENDERRECEIVER) + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, True) + + def __disableSenderReceiver(self): + BPaperItem = self.getRoadmapItemByID(FaxWizardDialogImpl.RM_SENDERRECEIVER) + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, False) + diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py new file mode 100644 index 000000000..dcb474ed6 --- /dev/null +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py @@ -0,0 +1,96 @@ +from common.Resource import Resource + +class FaxWizardDialogResources(Resource): + UNIT_NAME = "dbwizres" + MODULE_NAME = "dbw" + RID_FAXWIZARDDIALOG_START = 3200 + RID_FAXWIZARDCOMMUNICATION_START = 3270 + RID_FAXWIZARDGREETING_START = 3280 + RID_FAXWIZARDSALUTATION_START = 3290 + RID_FAXWIZARDROADMAP_START = 3300 + RID_RID_COMMON_START = 500 + + + def __init__(self, xmsf): + super(FaxWizardDialogResources,self).__init__(xmsf, FaxWizardDialogResources.MODULE_NAME) + self.RoadmapLabels = () + self.SalutationLabels = () + self.GreetingLabels = () + self.CommunicationLabels = () + + #Delete the String, uncomment the self.getResText method + + + self.resFaxWizardDialog_title = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 1) + self.resLabel9_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 2) + self.resoptBusinessFax_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 3) + self.resoptPrivateFax_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 4) + self.reschkUseLogo_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 5) + self.reschkUseSubject_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 6) + self.reschkUseSalutation_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 7) + self.reschkUseGreeting_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 8) + self.reschkUseFooter_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 9) + self.resoptSenderPlaceholder_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 10) + self.resoptSenderDefine_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 11) + self.restxtTemplateName_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 12) + self.resoptCreateFax_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 13) + self.resoptMakeChanges_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 14) + self.reslblBusinessStyle_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 15) + self.reslblPrivateStyle_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 16) + self.reslblIntroduction_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 17) + self.reslblSenderAddress_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 18) + self.reslblSenderName_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 19) + self.reslblSenderStreet_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 20) + self.reslblPostCodeCity_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 21) + self.reslblFooter_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 22) + self.reslblFinalExplanation1_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 23) + self.reslblFinalExplanation2_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 24) + self.reslblTemplateName_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 25) + self.reslblTemplatePath_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 26) + self.reslblProceed_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 27) + self.reslblTitle1_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 28) + self.reslblTitle3_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 29) + self.reslblTitle4_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 30) + self.reslblTitle5_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 31) + self.reslblTitle6_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 32) + self.reschkFooterNextPages_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 33) + self.reschkFooterPageNumbers_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 34) + self.reschkUseDate_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 35) + self.reschkUseCommunicationType_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 36) + self.resLabel1_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 37) + self.resoptReceiverPlaceholder_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 38) + self.resoptReceiverDatabase_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 39) + self.resLabel2_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 40) + self.loadRoadmapResources() + self.loadSalutationResources() + self.loadGreetingResources() + self.loadCommunicationResources() + self.loadCommonResources() + + def loadCommonResources(self): + self.resOverwriteWarning = self.getResText(FaxWizardDialogResources.RID_RID_COMMON_START + 19) + self.resTemplateDescription = self.getResText(FaxWizardDialogResources.RID_RID_COMMON_START + 20) + + def loadRoadmapResources(self): + i = 1 + while i < 6: + self.RoadmapLabels = self.RoadmapLabels + ((self.getResText(FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + i)),) + i += 1 + + def loadSalutationResources(self): + i = 1 + while i < 5: + self.SalutationLabels = self.SalutationLabels + ((self.getResText(FaxWizardDialogResources.RID_FAXWIZARDSALUTATION_START + i)),) + i += 1 + + def loadGreetingResources(self): + i = 1 + while i < 5: + self.GreetingLabels = self.GreetingLabels + ((self.getResText(FaxWizardDialogResources.RID_FAXWIZARDGREETING_START + i)),) + i += 1 + + def loadCommunicationResources(self): + i = 1 + while i < 4: + self.CommunicationLabels = self.CommunicationLabels+ ((self.getResText(FaxWizardDialogResources.RID_FAXWIZARDCOMMUNICATION_START + i)),) + i += 1 diff --git a/wizards/com/sun/star/wizards/fax/__init__.py b/wizards/com/sun/star/wizards/fax/__init__.py new file mode 100644 index 000000000..ff5ad269b --- /dev/null +++ b/wizards/com/sun/star/wizards/fax/__init__.py @@ -0,0 +1 @@ +"""fax """ diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py new file mode 100644 index 000000000..1da169d49 --- /dev/null +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -0,0 +1,243 @@ +import uno +from common.Desktop import Desktop +from com.sun.star.view.DocumentZoomType import ENTIRE_PAGE +from com.sun.star.beans.PropertyState import DIRECT_VALUE +from common.Helper import Helper +from document.OfficeDocument import OfficeDocument +import traceback +from text.ViewHandler import ViewHandler +from text.TextFieldHandler import TextFieldHandler + +class TextDocument(object): + + def __init__(self, xMSF,listener=None,bShowStatusIndicator=None, + FrameName=None,_sPreviewURL=None,_moduleIdentifier=None, + _textDocument=None, xArgs=None): + + self.xMSF = xMSF + self.xTextDocument = None + + if listener: + if FrameName: + '''creates an instance of TextDocument and creates a named frame. + No document is actually loaded into this frame.''' + self.xFrame = OfficeDocument.createNewFrame(xMSF, listener, FrameName); + return + + elif _sPreviewURL: + '''creates an instance of TextDocument by loading a given URL as preview''' + self.xFrame = OfficeDocument.createNewFrame(xMSF, listener) + self.xTextDocument = self.loadAsPreview(_sPreviewURL, True) + + elif xArgs: + '''creates an instance of TextDocument and creates a frame and loads a document''' + self.xDesktop = Desktop.getDesktop(xMSF); + self.xFrame = OfficeDocument.createNewFrame(xMSF, listener); + self.xTextDocument = OfficeDocument.load(xFrame, URL, "_self", xArgs); + self.xWindowPeer = xFrame.getComponentWindow() + self.m_xDocProps = self.xTextDocument.getDocumentProperties(); + CharLocale = Helper.getUnoStructValue( self.xTextDocument, "CharLocale"); + return + + else: + '''creates an instance of TextDocument from the desktop's current frame''' + self.xDesktop = Desktop.getDesktop(xMSF); + self.xFrame = self.xDesktop.getActiveFrame() + self.xTextDocument = self.xFrame.getController().getModel() + + elif _moduleIdentifier: + try: + '''create the empty document, and set its module identifier''' + self.xTextDocument = xMSF.createInstance("com.sun.star.text.TextDocument") + self.xTextDocument.initNew() + self.xTextDocument.setIdentifier(_moduleIdentifier.getIdentifier()) + # load the document into a blank frame + xDesktop = Desktop.getDesktop(xMSF) + loadArgs = range(1) + loadArgs[0] = "Model" + loadArgs[0] = -1 + loadArgs[0] = self.xTextDocument + loadArgs[0] = DIRECT_VALUE + xDesktop.loadComponentFromURL("private:object", "_blank", 0, loadArgs) + # remember some things for later usage + self.xFrame = self.xTextDocument.getCurrentController().getFrame() + except Exception, e: + traceback.print_exc() + + elif _textDocument: + '''creates an instance of TextDocument from a given XTextDocument''' + self.xFrame = _textDocument.getCurrentController().getFrame() + self.xTextDocument = _textDocument + if bShowStatusIndicator: + self.showStatusIndicator() + self.init() + + def init(self): + self.xWindowPeer = self.xFrame.getComponentWindow() + self.m_xDocProps = self.xTextDocument.getDocumentProperties() + self.CharLocale = Helper.getUnoStructValue(self.xTextDocument, "CharLocale") + self.xText = self.xTextDocument.getText() + + def showStatusIndicator(self): + self.xProgressBar = self.xFrame.createStatusIndicator() + self.xProgressBar.start("", 100) + self.xProgressBar.setValue(5) + + def loadAsPreview(self, sDefaultTemplate, asTemplate): + loadValues = range(3) + # open document in the Preview mode + loadValues[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[0].Name = "ReadOnly" + loadValues[0].Value = True + loadValues[1] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[1].Name = "AsTemplate" + if asTemplate: + loadValues[1].Value = True + else: + loadValues[1].Value = False + + loadValues[2] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[2].Name = "Preview" + loadValues[2].Value = True + #set the preview document to non-modified mode in order to avoid the 'do u want to save' box + if self.xTextDocument is not None: + try: + self.xTextDocument.setModified(False) + except PropertyVetoException, e1: + traceback.print_exc() + self.xTextDocument = OfficeDocument.load(self.xFrame, sDefaultTemplate, "_self", loadValues) + self.DocSize = self.getPageSize() + myViewHandler = ViewHandler(self.xTextDocument, self.xTextDocument) + try: + myViewHandler.setViewSetting("ZoomType", uno.Any("short",ENTIRE_PAGE)) + except Exception, e: + traceback.print_exc() + myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) + myFieldHandler.updateDocInfoFields() + return self.xTextDocument + + def getPageSize(self): + try: + xNameAccess = self.xTextDocument.getStyleFamilies() + xPageStyleCollection = xNameAccess.getByName("PageStyles") + xPageStyle = xPageStyleCollection.getByName("First Page") + return Helper.getUnoPropertyValue(xPageStyle, "Size") + except Exception, exception: + traceback.print_exc() + return None + + #creates an instance of TextDocument and creates a frame and loads a document + + def createTextCursor(self, oCursorContainer): + xTextCursor = oCursorContainer.createTextCursor() + return xTextCursor + + # Todo: This method is unsecure because the last index is not necessarily the last section + # Todo: This Routine should be modified, because I cannot rely on the last Table in the document to be the last in the TextTables sequence + # to make it really safe you must acquire the Tablenames before the insertion and after the insertion of the new Table. By comparing the + # two sequences of tablenames you can find out the tablename of the last inserted Table + # Todo: This method is unsecure because the last index is not necessarily the last section + + def getCharWidth(self, ScaleString): + iScale = 200 + self.xTextDocument.lockControllers() + iScaleLen = ScaleString.length() + xTextCursor = createTextCursor(self.xTextDocument.getText()) + xTextCursor.gotoStart(False) + com.sun.star.wizards.common.Helper.setUnoPropertyValue(xTextCursor, "PageDescName", "First Page") + xTextCursor.setString(ScaleString) + xViewCursor = self.xTextDocument.getCurrentController() + xTextViewCursor = xViewCursor.getViewCursor() + xTextViewCursor.gotoStart(False) + iFirstPos = xTextViewCursor.getPosition().X + xTextViewCursor.gotoEnd(False) + iLastPos = xTextViewCursor.getPosition().X + iScale = (iLastPos - iFirstPos) / iScaleLen + xTextCursor.gotoStart(False) + xTextCursor.gotoEnd(True) + xTextCursor.setString("") + unlockallControllers() + return iScale + + def unlockallControllers(self): + while self.xTextDocument.hasControllersLocked() == True: + self.xTextDocument.unlockControllers() + + def refresh(self): + self.xTextDocument.refresh() + + ''' + This method sets the Author of a Wizard-generated template correctly + and adds a explanatory sentence to the template description. + @param WizardName The name of the Wizard. + @param TemplateDescription The old Description which is being appended with another sentence. + @return void. + ''' + + def setWizardTemplateDocInfo(self, WizardName, TemplateDescription): + try: + xNA = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.UserProfile/Data", False) + gn = xNA.getByName("givenname") + sn = xNA.getByName("sn") + fullname = str(gn) + " " + str(sn) + cal = GregorianCalendar.GregorianCalendar() + year = cal.get(Calendar.YEAR) + month = cal.get(Calendar.MONTH) + day = cal.get(Calendar.DAY_OF_MONTH) + currentDate = DateTime.DateTime() + currentDate.Day = day + currentDate.Month = month + currentDate.Year = year + du = DateUtils(self.xMSF, self.xTextDocument) + ff = du.getFormat(NumberFormatIndex.DATE_SYS_DDMMYY) + myDate = du.format(ff, currentDate) + xDocProps2 = self.xTextDocument.getDocumentProperties() + xDocProps2.setAuthor(fullname) + xDocProps2.setModifiedBy(fullname) + description = xDocProps2.getDescription() + description = description + " " + TemplateDescription + description = JavaTools.replaceSubString(description, WizardName, "") + description = JavaTools.replaceSubString(description, myDate, "") + xDocProps2.setDescription(description) + except NoSuchElementException, e: + # TODO Auto-generated catch block + traceback.print_exc() + except WrappedTargetException, e: + # TODO Auto-generated catch block + traceback.print_exc() + except Exception, e: + # TODO Auto-generated catch block + traceback.print_exc() + + ''' + removes an arbitrary Object which supports the 'XTextContent' interface + @param oTextContent + @return + ''' + + def removeTextContent(self, oTextContent): + try: + self.xText.removeTextContent(oxTextContent) + return True + except NoSuchElementException, e: + traceback.print_exc() + return False + + ''' + Apparently there is no other way to get the + page count of a text document other than using a cursor and + making it jump to the last page... + @param model the document model. + @return the page count of the document. + ''' + + def getPageCount(self, model): + xController = model.getCurrentController() + xPC = xController.getViewCursor() + xPC.jumpToLastPage() + return xPC.getPage() + + ''' + Possible Values for "OptionString" are: "LoadCellStyles", "LoadTextStyles", "LoadFrameStyles", + "LoadPageStyles", "LoadNumberingStyles", "OverwriteStyles" + ''' diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.py b/wizards/com/sun/star/wizards/text/TextFieldHandler.py new file mode 100644 index 000000000..c318de087 --- /dev/null +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.py @@ -0,0 +1,169 @@ +import traceback +import time +from com.sun.star.util import DateTime +from common.PropertyNames import PropertyNames +import unicodedata + +class TextFieldHandler(object): + ''' + Creates a new instance of TextFieldHandler + @param xMSF + @param xTextDocument + ''' + + def __init__(self, xMSF, xTextDocument): + self.xMSFDoc = xMSF + self.xTextFieldsSupplier = xTextDocument + + def refreshTextFields(self): + xUp = self.xTextFieldsSupplier.getTextFields() + xUp.refresh() + + def getUserFieldContent(self, xTextCursor): + try: + xTextRange = xTextCursor.getEnd() + oTextField = Helper.getUnoPropertyValue(xTextRange, "TextField") + if com.sun.star.uno.AnyConverter.isVoid(oTextField): + return "" + else: + xMaster = oTextField.getTextFieldMaster() + UserFieldContent = xMaster.getPropertyValue("Content") + return UserFieldContent + + except Exception, exception: + traceback.print_exc() + + return "" + + def insertUserField(self, xTextCursor, FieldName, FieldTitle): + try: + xField = self.xMSFDoc.createInstance("com.sun.star.text.TextField.User") + + if self.xTextFieldsSupplier.getTextFieldMasters().hasByName("com.sun.star.text.FieldMaster.User." + FieldName): + oMaster = self.xTextFieldsSupplier.getTextFieldMasters().getByName( \ + "com.sun.star.text.FieldMaster.User." + FieldName) + oMaster.dispose() + + xPSet = createUserField(FieldName, FieldTitle) + xField.attachTextFieldMaster(xPSet) + xTextCursor.getText().insertTextContent(xTextCursor, xField, False) + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + + def createUserField(self, FieldName, FieldTitle): + xPSet = self.xMSFDoc.createInstance("com.sun.star.text.FieldMaster.User") + xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, FieldName) + xPSet.setPropertyValue("Content", FieldTitle) + return xPSet + + def __getTextFieldsByProperty(self, _PropertyName, _aPropertyValue, _TypeName): + try: + xDependentVector = [] + if self.xTextFieldsSupplier.getTextFields().hasElements(): + xEnum = self.xTextFieldsSupplier.getTextFields().createEnumeration() + while xEnum.hasMoreElements(): + oTextField = xEnum.nextElement() + xPropertySet = oTextField.getTextFieldMaster() + if xPropertySet.getPropertySetInfo().hasPropertyByName(_PropertyName): + oValue = xPropertySet.getPropertyValue(_PropertyName) + if isinstance(oValue,unicode): + if _TypeName == "String": + sValue = unicodedata.normalize('NFKD', oValue).encode('ascii','ignore') + if sValue == _aPropertyValue: + xDependentVector.append(oTextField) + #COMMENTED + '''elif AnyConverter.isShort(oValue): + if _TypeName.equals("Short"): + iShortParam = (_aPropertyValue).shortValue() + ishortValue = AnyConverter.toShort(oValue) + if ishortValue == iShortParam: + xDependentVector.append(oTextField) ''' + + if len(xDependentVector) > 0: + return xDependentVector + + except Exception, e: + #TODO Auto-generated catch block + traceback.print_exc() + + return None + + def changeUserFieldContent(self, _FieldName, _FieldContent): + try: + xDependentTextFields = self.__getTextFieldsByProperty(PropertyNames.PROPERTY_NAME, _FieldName, "String") + if xDependentTextFields != None: + for i in xDependentTextFields: + i.getTextFieldMaster().setPropertyValue("Content", _FieldContent) + self.refreshTextFields() + + except Exception, e: + traceback.print_exc() + + def updateDocInfoFields(self): + try: + xEnum = self.xTextFieldsSupplier.getTextFields().createEnumeration() + while xEnum.hasMoreElements(): + oTextField = xEnum.nextElement() + if oTextField.supportsService("com.sun.star.text.TextField.ExtendedUser"): + oTextField.update() + + if oTextField.supportsService("com.sun.star.text.TextField.User"): + oTextField.update() + + except Exception, e: + traceback.print_exc() + + def updateDateFields(self): + try: + xEnum = self.xTextFieldsSupplier.getTextFields().createEnumeration() + now = time.localtime(time.time()) + dt = DateTime() + dt.Day = time.strftime("%d", now) + dt.Year = time.strftime("%Y", now) + dt.Month = time.strftime("%m", now) + dt.Month += 1 + while xEnum.hasMoreElements(): + oTextField = xEnum.nextElement() + if oTextField.supportsService("com.sun.star.text.TextField.DateTime"): + oTextField.setPropertyValue("IsFixed", False) + oTextField.setPropertyValue("DateTimeValue", dt) + + except Exception, e: + traceback.print_exc() + + def fixDateFields(self, _bSetFixed): + try: + xEnum = self.xTextFieldsSupplier.getTextFields().createEnumeration() + while xEnum.hasMoreElements(): + oTextField = xEnum.nextElement() + if oTextField.supportsService("com.sun.star.text.TextField.DateTime"): + oTextField.setPropertyValue("IsFixed", _bSetFixed) + + except Exception, e: + traceback.print_exc() + + def removeUserFieldByContent(self, _FieldContent): + try: + xDependentTextFields = self.__getTextFieldsByProperty("Content", _FieldContent, "String") + if xDependentTextFields != None: + i = 0 + while i < xDependentTextFields.length: + xDependentTextFields[i].dispose() + i += 1 + + except Exception, e: + traceback.print_exc() + + def changeExtendedUserFieldContent(self, UserDataPart, _FieldContent): + try: + xDependentTextFields = self.__getTextFieldsByProperty("UserDataType", uno.Any("short",UserDataPart), "Short") + if xDependentTextFields != None: + i = 0 + while i < xDependentTextFields.length: + xDependentTextFields[i].getTextFieldMaster().setPropertyValue("Content", _FieldContent) + i += 1 + + self.refreshTextFields() + except Exception, e: + traceback.print_exc() + diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.py b/wizards/com/sun/star/wizards/text/TextSectionHandler.py new file mode 100644 index 000000000..f1c40ea56 --- /dev/null +++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.py @@ -0,0 +1,121 @@ +import traceback + +class TextSectionHandler(object): + '''Creates a new instance of TextSectionHandler''' + def __init__(self, xMSF, xTextDocument): + self.xMSFDoc = xMSF + self.xTextDocument = xTextDocument + self.xText = xTextDocument.getText() + + def removeTextSectionbyName(self, SectionName): + try: + xAllTextSections = self.xTextDocument.getTextSections() + if xAllTextSections.hasByName(SectionName) == True: + oTextSection = self.xTextDocument.getTextSections().getByName(SectionName) + removeTextSection(oTextSection) + + except Exception, exception: + traceback.print_exc() + + def hasTextSectionByName(self, SectionName): + xAllTextSections = self.xTextDocument.getTextSections() + return xAllTextSections.hasByName(SectionName) + + def removeLastTextSection(self): + try: + xAllTextSections = self.xTextDocument.getTextSections() + oTextSection = xAllTextSections.getByIndex(xAllTextSections.getCount() - 1) + removeTextSection(oTextSection) + except Exception, exception: + traceback.print_exc() + + def removeTextSection(self, _oTextSection): + try: + self.xText.removeTextContent(_oTextSection) + except Exception, exception: + traceback.print_exc() + + def removeInvisibleTextSections(self): + try: + xAllTextSections = self.xTextDocument.getTextSections() + TextSectionCount = xAllTextSections.getCount() + i = TextSectionCount - 1 + while i >= 0: + xTextContentTextSection = xAllTextSections.getByIndex(i) + bRemoveTextSection = (not AnyConverter.toBoolean(xTextContentTextSection.getPropertyValue("IsVisible"))) + if bRemoveTextSection: + self.xText.removeTextContent(xTextContentTextSection) + + i -= 1 + except Exception, exception: + traceback.print_exc() + + def removeAllTextSections(self): + try: + TextSectionCount = self.xTextDocument.getTextSections().getCount() + i = TextSectionCount - 1 + while i >= 0: + xTextContentTextSection = xAllTextSections.getByIndex(i) + self.xText.removeTextContent(xTextContentTextSection) + i -= 1 + except Exception, exception: + traceback.print_exc() + + def breakLinkofTextSections(self): + try: + iSectionCount = self.xTextDocument.getTextSections().getCount() + oSectionLink = SectionFileLink.SectionFileLink() + oSectionLink.FileURL = "" + i = 0 + while i < iSectionCount: + oTextSection = xAllTextSections.getByIndex(i) + Helper.setUnoPropertyValues(oTextSection, ["FileLink", "LinkRegion"], [oSectionLink, ""]) + i += 1 + except Exception, exception: + traceback.print_exc() + + def breakLinkOfTextSection(self, oTextSection): + oSectionLink = SectionFileLink.SectionFileLink() + oSectionLink.FileURL = "" + Helper.setUnoPropertyValues(oTextSection, ["FileLink", "LinkRegion"],[oSectionLink, ""]) + + def linkSectiontoTemplate(self, TemplateName, SectionName): + try: + oTextSection = self.xTextDocument.getTextSections().getByName(SectionName) + linkSectiontoTemplate(oTextSection, TemplateName, SectionName) + except Exception, e: + traceback.print_exc() + + def linkSectiontoTemplate(self, oTextSection, TemplateName, SectionName): + oSectionLink = SectionFileLink.SectionFileLink() + oSectionLink.FileURL = TemplateName + Helper.setUnoPropertyValues(oTextSection, ["FileLink", "LinkRegion"],[oSectionLink, SectionName]) + NewSectionName = oTextSection.getName() + if NewSectionName.compareTo(SectionName) != 0: + oTextSection.setName(SectionName) + + def insertTextSection(self, GroupName, TemplateName, _bAddParagraph): + try: + if _bAddParagraph: + xTextCursor = self.xText.createTextCursor() + self.xText.insertControlCharacter(xTextCursor, ControlCharacter.PARAGRAPH_BREAK, False) + xTextCursor.collapseToEnd() + + xSecondTextCursor = self.xText.createTextCursor() + xSecondTextCursor.gotoEnd(False) + insertTextSection(GroupName, TemplateName, xSecondTextCursor) + except IllegalArgumentException, e: + traceback.print_exc() + + def insertTextSection(self, sectionName, templateName, position): + try: + if self.xTextDocument.getTextSections().hasByName(sectionName) == True: + xTextSection = self.xTextDocument.getTextSections().getByName(sectionName) + else: + xTextSection = self.xMSFDoc.createInstance("com.sun.star.text.TextSection") + position.getText().insertTextContent(position, xTextSection, False) + + linkSectiontoTemplate(xTextSection, templateName, sectionName) + except Exception, exception: + traceback.print_exc() + diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.py b/wizards/com/sun/star/wizards/text/ViewHandler.py new file mode 100644 index 000000000..73462f871 --- /dev/null +++ b/wizards/com/sun/star/wizards/text/ViewHandler.py @@ -0,0 +1,38 @@ +import uno + +class ViewHandler(object): + '''Creates a new instance of View ''' + + def __init__ (self, xMSF, xTextDocument): + self.xMSFDoc = xMSF + self.xTextDocument = xTextDocument + self.xTextViewCursorSupplier = self.xTextDocument.getCurrentController() + + def selectFirstPage(self, oTextTableHandler): + try: + xPageCursor = self.xTextViewCursorSupplier.getViewCursor() + xPageCursor.jumpToFirstPage() + xPageCursor.jumpToStartOfPage() + Helper.setUnoPropertyValue(xPageCursor, "PageDescName", "First Page") + oPageStyles = self.xTextDocument.getStyleFamilies().getByName("PageStyles") + oPageStyle = oPageStyles.getByName("First Page") + xAllTextTables = oTextTableHandler.xTextTablesSupplier.getTextTables() + xTextTable = xAllTextTables.getByIndex(0) + xRange = xTextTable.getAnchor().getText() + xPageCursor.gotoRange(xRange, False) + if not com.sun.star.uno.AnyConverter.isVoid(XTextRange): + xViewTextCursor.gotoRange(xHeaderRange, False) + xViewTextCursor.collapseToStart() + else: + print "No Headertext available" + + except com.sun.star.uno.Exception, exception: + exception.printStackTrace(System.out) + + def setViewSetting(self, Setting, Value): + uno.invoke(self.xTextViewCursorSupplier.getViewSettings(),"setPropertyValue",(Setting, Value)) + + def collapseViewCursorToStart(self): + xTextViewCursor = self.xTextViewCursorSupplier.getViewCursor() + xTextViewCursor.collapseToStart() + diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py new file mode 100644 index 000000000..a1bdc9511 --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/PathSelection.py @@ -0,0 +1,78 @@ +import traceback +import uno +from common.PropertyNames import * +from common.FileAccess import * +from com.sun.star.uno import Exception as UnoException + +class PathSelection(object): + + class DialogTypes(object): + FOLDER = 0 + FILE = 1 + + class TransferMode(object): + SAVE = 0 + LOAD = 1 + + def __init__(self, xMSF, CurUnoDialog, TransferMode, DialogType): + self.CurUnoDialog = CurUnoDialog + self.xMSF = xMSF + self.iDialogType = DialogType + self.iTransferMode = TransferMode + self.sDefaultDirectory = "" + self.sDefaultName = "" + self.sDefaultFilter = "" + self.usedPathPicker = False + self.CMDSELECTPATH = 1 + self.TXTSAVEPATH = 1 + + def insert(self, DialogStep, XPos, YPos, Width, CurTabIndex, LabelText, Enabled, TxtHelpURL, BtnHelpURL): + self.CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblSaveAs", [PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH], [Enabled, 8, LabelText, XPos, YPos, DialogStep, uno.Any("short",CurTabIndex), Width]) + self.xSaveTextBox = self.CurUnoDialog.insertTextField("txtSavePath", "callXPathSelectionListener", [PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH], [Enabled, 12, TxtHelpURL, XPos, YPos + 10, DialogStep, uno.Any("short",(CurTabIndex + 1)), Width - 26], self) + + self.CurUnoDialog.setControlProperty("txtSavePath", PropertyNames.PROPERTY_ENABLED, False ) + self.CurUnoDialog.insertButton("cmdSelectPath", "triggerPathPicker", [PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH], [Enabled, 14, BtnHelpURL, "...",XPos + Width - 16, YPos + 9, DialogStep, uno.Any("short",(CurTabIndex + 2)), 16], self) + + def addSelectionListener(self, xAction): + self.xAction = xAction + + def getSelectedPath(self): + return self.xSaveTextBox.getText() + + def initializePath(self): + try: + myFA = FileAccess(self.xMSF) + self.xSaveTextBox.setText(myFA.getPath(self.sDefaultDirectory + "/" + self.sDefaultName, None)) + except UnoException, e: + traceback.print_exc() + + def triggerPathPicker(self): + try: + if iTransferMode == TransferMode.SAVE: + if iDialogType == DialogTypes.FOLDER: + #TODO: write code for picking a folder for saving + return + elif iDialogType == DialogTypes.FILE: + usedPathPicker = True + myFilePickerDialog = SystemDialog.createStoreDialog(xMSF) + myFilePickerDialog.callStoreDialog(sDefaultDirectory, sDefaultName, sDefaultFilter); + sStorePath = myFilePickerDialog.sStorePath; + if sStorePath: + myFA = FileAccess(xMSF); + xSaveTextBox.setText(myFA.getPath(sStorePath, None)); + sDefaultDirectory = FileAccess.getParentDir(sStorePath); + sDefaultName = myFA.getFilename(sStorePath); + return + elif iTransferMode == TransferMode.LOAD: + if iDialogType == DialogTypes.FOLDER: + #TODO: write code for picking a folder for loading + return + elif iDialogType == DialogTypes.FILE: + #TODO: write code for picking a file for loading + return + except UnoException, e: + traceback.print_exc() + + def callXPathSelectionListener(self): + if self.xAction != None: + self.xAction.validatePath() diff --git a/wizards/com/sun/star/wizards/ui/PeerConfig.py b/wizards/com/sun/star/wizards/ui/PeerConfig.py new file mode 100644 index 000000000..b06284682 --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/PeerConfig.py @@ -0,0 +1,145 @@ +import traceback +from common.Helper import * + +''' +To change the template for this generated type comment go to +Window>Preferences>Java>Code Generation>Code and Comments +''' + +class PeerConfig(object): + + def __init__(self, _oUnoDialog): + self.oUnoDialog = _oUnoDialog + #self.oUnoDialog.xUnoDialog.addWindowListener(self) + self.m_aPeerTasks = [] + self.aControlTasks = [] + self.aImageUrlTasks = [] + self.oUnoDialog = None + + class PeerTask(object): + + def __init__(self,_xControl, propNames_, propValues_): + self.propnames = propNames_ + self.propvalues = propValues_ + self.xControl = _xControl + + class ControlTask(object): + + def __init__(self, _oModel, _propName, _propValue): + self.propname = _propName + self.propvalue = _propValue + self.oModel = _oModel + + class ImageUrlTask(object): + + def __init__(self, _oModel , _oResource, _oHCResource): + self.oResource = _oResource + self.oHCResource = _oHCResource + self.oModel = _oModel + + def windowShown(self, arg0): + try: + i = 0 + while i < self.m_aPeerTasks.size(): + aPeerTask = self.m_aPeerTasks.elementAt(i) + xVclWindowPeer = aPeerTask.xControl.getPeer() + n = 0 + while n < aPeerTask.propnames.length: + xVclWindowPeer.setProperty(aPeerTask.propnames[n], aPeerTask.propvalues[n]) + n += 1 + i += 1 + i = 0 + while i < self.aControlTasks.size(): + aControlTask = self.aControlTasks.elementAt(i) + Helper.setUnoPropertyValue(aControlTask.oModel, aControlTask.propname, aControlTask.propvalue) + i += 1 + i = 0 + while i < self.aImageUrlTasks.size(): + aImageUrlTask = self.aImageUrlTasks.elementAt(i) + sImageUrl = "" + if isinstance(aImageUrlTask.oResource,int): + sImageUrl = self.oUnoDialog.getWizardImageUrl((aImageUrlTask.oResource).intValue(), (aImageUrlTask.oHCResource).intValue()) + elif isinstance(aImageUrlTask.oResource,str): + sImageUrl = self.oUnoDialog.getImageUrl((aImageUrlTask.oResource), (aImageUrlTask.oHCResource)) + + if not sImageUrl.equals(""): + Helper.setUnoPropertyValue(aImageUrlTask.oModel, PropertyNames.PROPERTY_IMAGEURL, sImageUrl) + + i += 1 + except RuntimeException, re: + traceback.print_exc + raise re; + + ''' + @param oAPIControl an API control that the interface XControl can be derived from + @param _saccessname + ''' + + def setAccessibleName(self, oAPIControl, _saccessname): + setPeerProperties(oAPIControl, ("AccessibleName"), (_saccessname)) + + def setAccessibleName(self, _xControl, _saccessname): + setPeerProperties(_xControl, ("AccessibleName"), (_saccessname)) + + ''' + @param oAPIControl an API control that the interface XControl can be derived from + @param _propnames + @param _propvalues + ''' + + def setPeerProperties(self, oAPIControl, _propnames, _propvalues): + setPeerProperties(oAPIControl, _propnames, _propvalues) + + def setPeerProperties(self, _xControl, propnames, propvalues): + oPeerTask = PeerTask(_xControl, propnames, propvalues) + self.m_aPeerTasks.append(oPeerTask) + + ''' + assigns an arbitrary property to a control as soon as the peer is created + Note: The property 'ImageUrl' should better be assigned with 'setImageurl(...)', to consider the High Contrast Mode + @param _ocontrolmodel + @param _spropname + @param _propvalue + ''' + + def setControlProperty(self, _ocontrolmodel, _spropname, _propvalue): + oControlTask = self.ControlTask.ControlTask_unknown(_ocontrolmodel, _spropname, _propvalue) + self.aControlTasks.append(oControlTask) + + ''' + Assigns an image to the property 'ImageUrl' of a dialog control. The image id must be assigned in a resource file + within the wizards project + wizards project + @param _ocontrolmodel + @param _nResId + @param _nhcResId + ''' + + def setImageUrl(self, _ocontrolmodel, _nResId, _nhcResId): + oImageUrlTask = ImageUrlTask(_ocontrolmodel,_nResId, _nhcResId) + self.aImageUrlTasks.append(oImageUrlTask) + + ''' + Assigns an image to the property 'ImageUrl' of a dialog control. The image ids that the Resource urls point to + may be assigned in a Resource file outside the wizards project + @param _ocontrolmodel + @param _sResourceUrl + @param _sHCResourceUrl + ''' + + def setImageUrl(self, _ocontrolmodel, _sResourceUrl, _sHCResourceUrl): + oImageUrlTask = ImageUrlTask(_ocontrolmodel, _sResourceUrl, _sHCResourceUrl) + self.aImageUrlTasks.append(oImageUrlTask) + + ''' + Assigns an image to the property 'ImageUrl' of a dialog control. The image id must be assigned in a resource file + within the wizards project + wizards project + @param _ocontrolmodel + @param _oResource + @param _oHCResource + ''' + + def setImageUrl(self, _ocontrolmodel, _oResource, _oHCResource): + oImageUrlTask = self.ImageUrlTask(_ocontrolmodel, _oResource, _oHCResource) + self.aImageUrlTasks.append(oImageUrlTask) diff --git a/wizards/com/sun/star/wizards/ui/UIConsts.py b/wizards/com/sun/star/wizards/ui/UIConsts.py new file mode 100644 index 000000000..f64ddedaf --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/UIConsts.py @@ -0,0 +1,66 @@ +''' +To change the template for this generated type comment go to +Window>Preferences>Java>Code Generation>Code and Comments +''' +class UIConsts(): + + RID_COMMON = 500 + RID_DB_COMMON = 1000 + RID_FORM = 2200 + RID_QUERY = 2300 + RID_REPORT = 2400 + RID_TABLE = 2500 + RID_IMG_REPORT = 1000 + RID_IMG_FORM = 1100 + RID_IMG_WEB = 1200 + INVISIBLESTEP = 99 + INFOIMAGEURL = "private:resource/dbu/image/19205" + INFOIMAGEURL_HC = "private:resource/dbu/image/19230" + ''' + The tabindex of the navigation buttons in a wizard must be assigned a very + high tabindex because on every step their taborder must appear at the end + ''' + SOFIRSTWIZARDNAVITABINDEX = 30000 + INTEGER_8 = 8 + INTEGER_12 = 12 + INTEGER_14 = 14 + INTEGER_16 = 16 + INTEGER_40 = 40 + INTEGER_50 = 50 + + #Steps of the QueryWizard + + SOFIELDSELECTIONPAGE = 1 + SOSORTINGPAGE = 2 + SOFILTERPAGE = 3 + SOAGGREGATEPAGE = 4 + SOGROUPSELECTIONPAGE = 5 + SOGROUPFILTERPAGE = 6 + SOTITLESPAGE = 7 + SOSUMMARYPAGE = 8 + INTEGERS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + + class CONTROLTYPE(): + + BUTTON = 1 + IMAGECONTROL = 2 + LISTBOX = 3 + COMBOBOX = 4 + CHECKBOX = 5 + RADIOBUTTON = 6 + DATEFIELD = 7 + EDITCONTROL = 8 + FILECONTROL = 9 + FIXEDLINE = 10 + FIXEDTEXT = 11 + FORMATTEDFIELD = 12 + GROUPBOX = 13 + HYPERTEXT = 14 + NUMERICFIELD = 15 + PATTERNFIELD = 16 + PROGRESSBAR = 17 + ROADMAP = 18 + SCROLLBAR = 19 + TIMEFIELD = 20 + CURRENCYFIELD = 21 + UNKNOWN = -1 diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py new file mode 100644 index 000000000..87a1a5d24 --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -0,0 +1,648 @@ +import uno +import traceback +from common.PropertyNames import PropertyNames +from com.sun.star.awt import Rectangle +from common.Helper import Helper +from PeerConfig import PeerConfig +from common.Listener import * +from com.sun.star.awt import Rectangle +from com.sun.star.awt.PosSize import POS + +class UnoDialog(object): + + def __init__(self, xMSF, PropertyNames, PropertyValues): + try: + self.xMSF = xMSF + self.ControlList = {} + self.xDialogModel = xMSF.createInstance("com.sun.star.awt.UnoControlDialogModel") + self.xDialogModel.setPropertyValues(PropertyNames, PropertyValues) + self.xUnoDialog = xMSF.createInstance("com.sun.star.awt.UnoControlDialog") + self.xUnoDialog.setModel(self.xDialogModel) + self.BisHighContrastModeActivated = None + self.m_oPeerConfig = None + self.xWindowPeer = None + except UnoException, e: + traceback.print_exc() + + def getControlKey(self, EventObject, ControlList): + xControlModel = EventObject.getModel() + try: + sName = xControlModel.getPropertyValue(PropertyNames.PROPERTY_NAME) + iKey = ControlList.get(sName).intValue() + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + iKey = 2000 + + return iKey + + def createPeerConfiguration(self): + self.m_oPeerConfig = PeerConfig(self) + + def getPeerConfiguration(self): + if self.m_oPeerConfig == None: + self.createPeerConfiguration() + return self.m_oPeerConfig + + def setControlProperty(self, ControlName, PropertyName, PropertyValue): + try: + if PropertyValue is not None: + if self.xDialogModel.hasByName(ControlName) == False: + return + xPSet = self.xDialogModel.getByName(ControlName) + if isinstance(PropertyValue,bool): + xPSet.setPropertyValue(PropertyName, PropertyValue) + else: + if isinstance(PropertyValue,list): + methodname = "[]short" + PropertyValue = tuple(PropertyValue) + elif isinstance(PropertyValue,tuple): + methodname = "[]string" + else: + PropertyValue = (PropertyValue,) + methodname = "[]string" + uno.invoke(xPSet, "setPropertyValue", (PropertyName, uno.Any( \ + methodname, PropertyValue))) + + except Exception, exception: + traceback.print_exc() + + def transform( self, struct , propName, value ): + myinv = self.inv.createInstanceWithArguments( (struct,) ) + access = self.insp.inspect( myinv ) + method = access.getMethod( "setValue" , -1 ) + uno.invoke( method, "invoke", ( myinv, ( propName , value ) )) + method = access.getMethod( "getMaterial" , -1 ) + ret,dummy = method.invoke(myinv,() ) + return ret + + def getResource(self): + return self.m_oResource + + def setControlProperties(self, ControlName, PropertyNames, PropertyValues): + self.setControlProperty(ControlName, PropertyNames, PropertyValues) + + def getControlProperty(self, ControlName, PropertyName): + try: + xPSet = self.xDialogModel().getByName(ControlName) + oPropValuezxPSet.getPropertyValue(PropertyName) + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + return None + + + def printControlProperties(self, ControlName): + try: + xControlModel = self.xDialogModel().getByName(ControlName) + allProps = xControlModel.getPropertySetInfo().getProperties() + i = 0 + while i < allProps.length: + sName = allProps[i].Name + i += 1 + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + + def getMAPConversionFactor(self, ControlName): + xControl2 = self.xUnoDialog.getControl(ControlName) + aSize = xControl2.getSize() + dblMAPWidth = ((Helper.getUnoPropertyValue(xControl2.getModel(), PropertyNames.PROPERTY_WIDTH)).intValue()) + dblFactor = (((aSize.Width)) / dblMAPWidth) + return dblFactor + + def getpreferredLabelSize(self, LabelName, sLabel): + xControl2 = self.xUnoDialog.getControl(LabelName) + OldText = xControl2.getText() + xControl2.setText(sLabel) + aSize = xControl2.getPreferredSize() + xControl2.setText(OldText) + return aSize + + def removeSelectedItems(self, xListBox): + SelList = xListBox.getSelectedItemsPos() + Sellen = SelList.length + i = Sellen - 1 + while i >= 0: + xListBox.removeItems(SelList[i], 1) + i -= 1 + + def getListBoxItemCount(self, _xListBox): + # This function may look ugly, but this is the only way to check the count + # of values in the model,which is always right. + # the control is only a view and could be right or not. + fieldnames = Helper.getUnoPropertyValue(getModel(_xListBox), "StringItemList") + return fieldnames.length + + def getSelectedItemPos(self, _xListBox): + ipos = Helper.getUnoPropertyValue(getModel(_xListBox), "SelectedItems") + return ipos[0] + + def isListBoxSelected(self, _xListBox): + ipos = Helper.getUnoPropertyValue(getModel(_xListBox), "SelectedItems") + return ipos.length > 0 + + def addSingleItemtoListbox(self, xListBox, ListItem, iSelIndex): + xListBox.addItem(ListItem, xListBox.getItemCount()) + if iSelIndex != -1: + xListBox.selectItemPos(iSelIndex, True) + + def insertLabel(self, sName, sPropNames, oPropValues): + try: + oFixedText = self.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", sName, sPropNames, oPropValues) + oFixedText.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + oLabel = self.xUnoDialog.getControl(sName) + return oLabel + except Exception, ex: + traceback.print_exc() + return None + + def insertButton(self, sName, iControlKey, xActionListener, sProperties, sValues): + oButtonModel = self.insertControlModel("com.sun.star.awt.UnoControlButtonModel", sName, sProperties, sValues) + xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + xButton = self.xUnoDialog.getControl(sName) + if xActionListener != None: + xButton.addActionListener(ActionListenerProcAdapter(xActionListener)) + + ControlKey = iControlKey + if self.ControlList != None: + self.ControlList.put(sName, ControlKey) + + return xButton + + def insertCheckBox(self, sName, iControlKey, xItemListener, sProperties, sValues): + oButtonModel = self.insertControlModel("com.sun.star.awt.UnoControlCheckBoxModel", sName, sProperties, sValues) + oButtonModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + xCheckBox = self.xUnoDialog.getControl(sName) + if xItemListener != None: + xCheckBox.addItemListener(ItemListenerProcAdapter(xItemListener)) + + ControlKey = iControlKey + if self.ControlList != None: + self.ControlList.put(sName, ControlKey) + + def insertNumericField(self, sName, iControlKey, xTextListener, sProperties, sValues): + oNumericFieldModel = self.insertControlModel("com.sun.star.awt.UnoControlNumericFieldModel", sName, sProperties, sValues) + oNumericFieldModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + xNumericField = self.xUnoDialog.getControl(sName) + if xTextListener != None: + xNumericField.addTextListener(TextListenerProcAdapter(xTextListener)) + + ControlKey = iControlKey + if self.ControlList != None: + self.ControlList.put(sName, ControlKey) + + def insertScrollBar(self, sName, iControlKey, xAdjustmentListener, sProperties, sValues): + try: + oScrollModel = self.insertControlModel("com.sun.star.awt.UnoControlScrollBarModel", sName, sProperties, sValues) + oScrollModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + xScrollBar = self.xUnoDialog.getControl(sName) + if xAdjustmentListener != None: + xScrollBar.addAdjustmentListener(xAdjustmentListener) + + ControlKey = iControlKey + if self.ControlList != None: + self.ControlList.put(sName, ControlKey) + + return xScrollBar + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + return None + + def insertTextField(self, sName, iControlKey, xTextListener, sProperties, sValues): + xTextBox = insertEditField("com.sun.star.awt.UnoControlEditModel", sName, iControlKey, xTextListener, sProperties, sValues) + return xTextBox + + def insertFormattedField(self, sName, iControlKey, xTextListener, sProperties, sValues): + xTextBox = insertEditField("com.sun.star.awt.UnoControlFormattedFieldModel", sName, iControlKey, xTextListener, sProperties, sValues) + return xTextBox + + def insertEditField(self, ServiceName, sName, iControlKey, xTextListener, sProperties, sValues): + try: + xTextModel = self.insertControlModel(ServiceName, sName, sProperties, sValues) + xTextModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + xTextBox = self.xUnoDialog.getControl(sName) + if xTextListener != None: + xTextBox.addTextListener(TextListenerProcAdapter(xTextListener)) + + ControlKey = iControlKey + self.ControlList.put(sName, ControlKey) + return xTextBox + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + return None + + def insertListBox(self, sName, iControlKey, xActionListener, xItemListener, sProperties, sValues): + xListBoxModel = self.insertControlModel("com.sun.star.awt.UnoControlListBoxModel", sName, sProperties, sValues) + xListBoxModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + xListBox = self.xUnoDialog.getControl(sName) + if xItemListener != None: + xListBox.addItemListener(ItemListenerProcAdapter(xItemListener)) + + if xActionListener != None: + xListBox.addActionListener(ActionListenerProcAdapter(xActionListener)) + + ControlKey = iControlKey + self.ControlList.put(sName, ControlKey) + return xListBox + + def insertComboBox(self, sName, iControlKey, xActionListener, xTextListener, xItemListener, sProperties, sValues): + xComboBoxModel = self.insertControlModel("com.sun.star.awt.UnoControlComboBoxModel", sName, sProperties, sValues) + xComboBoxModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + xComboBox = self.xUnoDialog.getControl(sName) + if xItemListener != None: + xComboBox.addItemListener(ItemListenerProcAdapter(xItemListener)) + + if xTextListener != None: + xComboBox.addTextListener(TextListenerProcAdapter(xTextListener)) + + if xActionListener != None: + xComboBox.addActionListener(ActionListenerProcAdapter(xActionListener)) + + ControlKey = iControlKey + self.ControlList.put(sName, ControlKey) + return xComboBox + + def insertRadioButton(self, sName, iControlKey, xItemListener, sProperties, sValues): + try: + xRadioButton = insertRadioButton(sName, iControlKey, sProperties, sValues) + if xItemListener != None: + xRadioButton.addItemListener(ItemListenerProcAdapter(xItemListener)) + + return xRadioButton + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + return None + + def insertRadioButton(self, sName, iControlKey, xActionListener, sProperties, sValues): + try: + xButton = insertRadioButton(sName, iControlKey, sProperties, sValues) + if xActionListener != None: + xButton.addActionListener(ActionListenerProcAdapter(xActionListener)) + + return xButton + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + return None + + def insertRadioButton(self, sName, iControlKey, sProperties, sValues): + xRadioButton = insertRadioButton(sName, sProperties, sValues) + ControlKey = iControlKey + self.ControlList.put(sName, ControlKey) + return xRadioButton + + def insertRadioButton(self, sName, sProperties, sValues): + try: + oRadioButtonModel = self.insertControlModel("com.sun.star.awt.UnoControlRadioButtonModel", sName, sProperties, sValues) + oRadioButtonModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + xRadioButton = self.xUnoDialog.getControl(sName) + return xRadioButton + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + return None + ''' + The problem with setting the visibility of controls is that changing the current step + of a dialog will automatically make all controls visible. The PropertyNames.PROPERTY_STEP property always wins against + the property "visible". Therfor a control meant to be invisible is placed on a step far far away. + @param the name of the control + @param iStep change the step if you want to make the control invisible + ''' + + def setControlVisible(self, controlname, iStep): + try: + iCurStep = int(getControlProperty(controlname, PropertyNames.PROPERTY_STEP)) + setControlProperty(controlname, PropertyNames.PROPERTY_STEP, iStep) + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + + ''' + The problem with setting the visibility of controls is that changing the current step + of a dialog will automatically make all controls visible. The PropertyNames.PROPERTY_STEP property always wins against + the property "visible". Therfor a control meant to be invisible is placed on a step far far away. + Afterwards the step property of the dialog has to be set with "repaintDialogStep". As the performance + of that method is very bad it should be used only once for all controls + @param controlname the name of the control + @param bIsVisible sets the control visible or invisible + ''' + + def setControlVisible(self, controlname, bIsVisible): + try: + iCurControlStep = int(getControlProperty(controlname, PropertyNames.PROPERTY_STEP)) + iCurDialogStep = int(Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP)) + if bIsVisible: + setControlProperty(controlname, PropertyNames.PROPERTY_STEP, iCurDialogStep) + else: + setControlProperty(controlname, PropertyNames.PROPERTY_STEP, UIConsts.INVISIBLESTEP) + + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + + # repaints the currentDialogStep + + + def repaintDialogStep(self): + try: + ncurstep = int(Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP)) + Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP, 99) + Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP, ncurstep) + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + + def insertControlModel(self, ServiceName, sName, sProperties, sValues): + try: + xControlModel = self.xDialogModel.createInstance(ServiceName) + Helper.setUnoPropertyValues(xControlModel, sProperties, sValues) + self.xDialogModel.insertByName(sName, xControlModel) + return xControlModel + except Exception, exception: + traceback.print_exc() + return None + + def setFocus(self, ControlName): + oFocusControl = self.xUnoDialog.getControl(ControlName) + oFocusControl.setFocus() + + def combineListboxList(self, sFirstEntry, MainList): + try: + FirstList = [sFirstEntry] + ResultList = [MainList.length + 1] + System.arraycopy(FirstList, 0, ResultList, 0, 1) + System.arraycopy(MainList, 0, ResultList, 1, MainList.length) + return ResultList + except java.lang.Exception, jexception: + traceback.print_exc() + return None + + def selectListBoxItem(self, xListBox, iFieldsSelIndex): + if iFieldsSelIndex > -1: + FieldCount = xListBox.getItemCount() + if FieldCount > 0: + if iFieldsSelIndex < FieldCount: + xListBox.selectItemPos(iFieldsSelIndex, True) + else: + xListBox.selectItemPos((short)(iFieldsSelIndex - 1), True) + + # deselects a Listbox. MultipleMode is not supported + + def deselectListBox(self, _xBasisListBox): + oListBoxModel = getModel(_xBasisListBox) + sList = Helper.getUnoPropertyValue(oListBoxModel, "StringItemList") + Helper.setUnoPropertyValue(oListBoxModel, "StringItemList", [[],[]]) + Helper.setUnoPropertyValue(oListBoxModel, "StringItemList", sList) + + def calculateDialogPosition(self, FramePosSize): + # Todo: check if it would be useful or possible to create a dialog peer, that can be used for the messageboxes to + # maintain modality when they pop up. + CurPosSize = self.xUnoDialog.getPosSize() + WindowHeight = FramePosSize.Height + WindowWidth = FramePosSize.Width + DialogWidth = CurPosSize.Width + DialogHeight = CurPosSize.Height + iXPos = ((WindowWidth / 2) - (DialogWidth / 2)) + iYPos = ((WindowHeight / 2) - (DialogHeight / 2)) + self.xUnoDialog.setPosSize(iXPos, iYPos, DialogWidth, DialogHeight, POS) + + ''' + @param FramePosSize + @return 0 for cancel, 1 for ok + @throws com.sun.star.uno.Exception + ''' + + def executeDialog(self, FramePosSize): + if self.xUnoDialog.getPeer() == None: + raise AttributeError("Please create a peer, using your own frame"); + + self.calculateDialogPosition(FramePosSize) + + if self.xWindowPeer == None: + self.createWindowPeer() + + self.BisHighContrastModeActivated = self.isHighContrastModeActivated() + return self.xUnoDialog.execute() + + def setVisible(self, parent): + self.calculateDialogPosition(parent.xWindow.getPosSize()) + if self.xWindowPeer == None: + self.createWindowPeer() + + self.xUnoDialog.setVisible(True) + + ''' + @param parent + @return 0 for cancel, 1 for ok + @throws com.sun.star.uno.Exception + ''' + + def executeDialogFromParent(self, parent): + return self.executeDialog(parent.xWindow.getPosSize()) + + ''' + @param XComponent + @return 0 for cancel, 1 for ok + @throws com.sun.star.uno.Exception + ''' + + def executeDialogFromComponent(self, xComponent): + if xComponent != None: + w = xComponent.getComponentWindow() + if w != None: + return self.executeDialog(w.getPosSize()) + + return self.executeDialog( Rectangle (0, 0, 640, 400)) + + def setAutoMnemonic(self, ControlName, bValue): + self.xUnoDialog = self.xUnoDialog.getControl(ControlName) + xVclWindowPedsfer = self.xUnoDialog.getPeer() + self.xContainerWindow.setProperty("AutoMnemonics", bValue) + + def modifyFontWeight(self, ControlName, FontWeight): + oFontDesc = FontDescriptor.FontDescriptor() + oFontDesc.Weight = FontWeight + setControlProperty(ControlName, "FontDescriptor", oFontDesc) + + ''' + create a peer for this + dialog, using the given + peer as a parent. + @param parentPeer + @return + @throws java.lang.Exception + ''' + + def createWindowPeer(self, parentPeer=None): + self.xUnoDialog.setVisible(False) + xToolkit = self.xMSF.createInstance("com.sun.star.awt.Toolkit") + if parentPeer == None: + parentPeer = xToolkit.getDesktopWindow() + + self.xUnoDialog.createPeer(xToolkit, parentPeer) + self.xWindowPeer = self.xUnoDialog.getPeer() + return self.xUnoDialog.getPeer() + + # deletes the first entry when this is equal to "DelEntryName" + # returns true when a new item is selected + + def deletefirstListboxEntry(self, ListBoxName, DelEntryName): + xListBox = self.xUnoDialog.getControl(ListBoxName) + FirstItem = xListBox.getItem(0) + if FirstItem.equals(DelEntryName): + SelPos = xListBox.getSelectedItemPos() + xListBox.removeItems(0, 1) + if SelPos > 0: + setControlProperty(ListBoxName, "SelectedItems", [SelPos]) + xListBox.selectItemPos((short)(SelPos - 1), True) + + def setPeerProperty(self, ControlName, PropertyName, PropertyValue): + xControl = self.xUnoDialog.getControl(ControlName) + xVclWindowPeer = self.xControl.getPeer() + self.xContainerWindow.setProperty(PropertyName, PropertyValue) + + @classmethod + def getModel(self, control): + return control.getModel() + + @classmethod + def setEnabled(self, control, enabled): + setEnabled(control, enabled) + + @classmethod + def setEnabled(self, control, enabled): + Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_ENABLED, enabled) + + ''' + @author bc93774 + @param oControlModel the model of a control + @return the LabelType according to UIConsts.CONTROLTYPE + ''' + + @classmethod + def getControlModelType(self, oControlModel): + if oControlModel.supportsService("com.sun.star.awt.UnoControlFixedTextModel"): + return UIConsts.CONTROLTYPE.FIXEDTEXT + elif oControlModel.supportsService("com.sun.star.awt.UnoControlButtonModel"): + return UIConsts.CONTROLTYPE.BUTTON + elif oControlModel.supportsService("com.sun.star.awt.UnoControlCurrencyFieldModel"): + return UIConsts.CONTROLTYPE.CURRENCYFIELD + elif oControlModel.supportsService("com.sun.star.awt.UnoControlDateFieldModel"): + return UIConsts.CONTROLTYPE.DATEFIELD + elif oControlModel.supportsService("com.sun.star.awt.UnoControlFixedLineModel"): + return UIConsts.CONTROLTYPE.FIXEDLINE + elif oControlModel.supportsService("com.sun.star.awt.UnoControlFormattedFieldModel"): + return UIConsts.CONTROLTYPE.FORMATTEDFIELD + elif oControlModel.supportsService("com.sun.star.awt.UnoControlRoadmapModel"): + return UIConsts.CONTROLTYPE.ROADMAP + elif oControlModel.supportsService("com.sun.star.awt.UnoControlNumericFieldModel"): + return UIConsts.CONTROLTYPE.NUMERICFIELD + elif oControlModel.supportsService("com.sun.star.awt.UnoControlPatternFieldModel"): + return UIConsts.CONTROLTYPE.PATTERNFIELD + elif oControlModel.supportsService("com.sun.star.awt.UnoControlHyperTextModel"): + return UIConsts.CONTROLTYPE.HYPERTEXT + elif oControlModel.supportsService("com.sun.star.awt.UnoControlProgressBarModel"): + return UIConsts.CONTROLTYPE.PROGRESSBAR + elif oControlModel.supportsService("com.sun.star.awt.UnoControlTimeFieldModel"): + return UIConsts.CONTROLTYPE.TIMEFIELD + elif oControlModel.supportsService("com.sun.star.awt.UnoControlImageControlModel"): + return UIConsts.CONTROLTYPE.IMAGECONTROL + elif oControlModel.supportsService("com.sun.star.awt.UnoControlRadioButtonModel"): + return UIConsts.CONTROLTYPE.RADIOBUTTON + elif oControlModel.supportsService("com.sun.star.awt.UnoControlCheckBoxModel"): + return UIConsts.CONTROLTYPE.CHECKBOX + elif oControlModel.supportsService("com.sun.star.awt.UnoControlEditModel"): + return UIConsts.CONTROLTYPE.EDITCONTROL + elif oControlModel.supportsService("com.sun.star.awt.UnoControlComboBoxModel"): + return UIConsts.CONTROLTYPE.COMBOBOX + else: + if (oControlModel.supportsService("com.sun.star.awt.UnoControlListBoxModel")): + return UIConsts.CONTROLTYPE.LISTBOX + else: + return UIConsts.CONTROLTYPE.UNKNOWN + + ''' + @author bc93774 + @param oControlModel + @return the name of the property that contains the value of a controlmodel + ''' + + @classmethod + def getDisplayProperty(self, oControlModel): + itype = getControlModelType(oControlModel) + return getDisplayProperty(itype) + + ''' + @param itype The type of the control conforming to UIConst.ControlType + @return the name of the property that contains the value of a controlmodel + ''' + + ''' + @classmethod + def getDisplayProperty(self, itype): + # String propertyname = ""; + tmp_switch_var1 = itype + if 1: + pass + else: + return "" + ''' + + def addResourceHandler(self, _Unit, _Module): + self.m_oResource = Resource.Resource_unknown(self.xMSF, _Unit, _Module) + + def setInitialTabindex(self, _istep): + return (short)(_istep * 100) + + def isHighContrastModeActivated(self): + if self.xContainerWindow != None: + if self.BisHighContrastModeActivated == None: + try: + nUIColor = int(self.xContainerWindow.getProperty("DisplayBackgroundColor")) + except IllegalArgumentException, e: + traceback.print_exc() + return False + + #TODO: The following methods could be wrapped in an own class implementation + nRed = self.getRedColorShare(nUIColor) + nGreen = self.getGreenColorShare(nUIColor) + nBlue = self.getBlueColorShare(nUIColor) + nLuminance = ((nBlue * 28 + nGreen * 151 + nRed * 77) / 256) + bisactivated = (nLuminance <= 25) + self.BisHighContrastModeActivated = bisactivated + return bisactivated + else: + return self.BisHighContrastModeActivated.booleanValue() + + else: + return False + + def getRedColorShare(self, _nColor): + nRed = _nColor / 65536 + nRedModulo = _nColor % 65536 + nGreen = (int)(nRedModulo / 256) + nGreenModulo = (nRedModulo % 256) + nBlue = nGreenModulo + return nRed + + def getGreenColorShare(self, _nColor): + nRed = _nColor / 65536 + nRedModulo = _nColor % 65536 + nGreen = (int)(nRedModulo / 256) + return nGreen + + def getBlueColorShare(self, _nColor): + nRed = _nColor / 65536 + nRedModulo = _nColor % 65536 + nGreen = (int)(nRedModulo / 256) + nGreenModulo = (nRedModulo % 256) + nBlue = nGreenModulo + return nBlue + + def getWizardImageUrl(self, _nResId, _nHCResId): + if isHighContrastModeActivated(): + return "private:resource/wzi/image/" + _nHCResId + else: + return "private:resource/wzi/image/" + _nResId + + def getImageUrl(self, _surl, _shcurl): + if isHighContrastModeActivated(): + return _shcurl + else: + return _surl + + def getListBoxLineCount(self): + return 20 diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py new file mode 100644 index 000000000..8c2d805a3 --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py @@ -0,0 +1,192 @@ +from UnoDialog import * +from ui.event.CommonListener import * +from common.Desktop import Desktop +from UIConsts import * + +''' +This class contains convenience methods for inserting components to a dialog. +It was created for use with the automatic conversion of Basic XML Dialog +description files to a Java class which builds the same dialog through the UNO API.
+It uses an Event-Listener method, which calls a method through reflection +wenn an event on a component is trigered. +see the classes AbstractListener, CommonListener, MethodInvocation for details. +''' + +class UnoDialog2(UnoDialog): + + ''' + Override this method to return another listener. + @return + ''' + + def __init__(self, xmsf): + super(UnoDialog2,self).__init__(xmsf,(), ()) + self.guiEventListener = CommonListener() + + def insertButton(self, sName, actionPerformed, sPropNames, oPropValues, eventTarget=None): + xButton = self.insertControlModel2("com.sun.star.awt.UnoControlButtonModel", sName, sPropNames, oPropValues) + if actionPerformed != None: + xButton.addActionListener(ActionListenerProcAdapter(self.guiEventListener)) + self.guiEventListener.add(sName, EVENT_ACTION_PERFORMED, actionPerformed, eventTarget) + + return xButton + + def insertImageButton(self, sName, actionPerformed, sPropNames, oPropValues): + xButton = self.insertControlModel2("com.sun.star.awt.UnoControlButtonModel", sName, sPropNames, oPropValues) + if actionPerformed != None: + xButton.addActionListener(ActionListenerProcAdapter(actionPerformed)) + + return xButton + + def insertCheckBox(self, sName, itemChanged, sPropNames, oPropValues, eventTarget=None): + xCheckBox = self.insertControlModel2("com.sun.star.awt.UnoControlCheckBoxModel", sName, sPropNames, oPropValues) + if itemChanged != None: + if eventTarget is None: + eventTarget = self + xCheckBox.addItemListener(ItemListenerProcAdapter(self.guiEventListener)) + self.guiEventListener.add(sName, EVENT_ITEM_CHANGED, itemChanged, eventTarget) + + return xCheckBox + + def insertComboBox(self, sName, actionPerformed, itemChanged, textChanged, sPropNames, oPropValues, eventTarget=None): + xComboBox = self.insertControlModel2("com.sun.star.awt.UnoControlComboBoxModel", sName, sPropNames, oPropValues) + if eventTarget is None: + eventTarget = self + if actionPerformed != None: + xComboBox.addActionListener(self.guiEventListener) + self.guiEventListener.add(sName, EVENT_ACTION_PERFORMED, actionPerformed, eventTarget) + + if itemChanged != None: + xComboBox.addItemListener(ItemListenerProcAdapter(self.guiEventListener)) + self.guiEventListener.add(sName, EVENT_ITEM_CHANGED, itemChanged, eventTarget) + + if textChanged != None: + xComboBox.addTextListener(TextListenerProcAdapter(self.guiEventListener)) + self.guiEventListener.add(sName, EVENT_TEXT_CHANGED, textChanged, eventTarget) + + return xComboBox + + def insertListBox(self, sName, actionPerformed, itemChanged, sPropNames, oPropValues, eventTarget=None): + xListBox = self.insertControlModel2("com.sun.star.awt.UnoControlListBoxModel", + sName, sPropNames, oPropValues) + + if eventTarget is None: + eventTarget = self + + if actionPerformed != None: + xListBox.addActionListener(self.guiEventListener) + self.guiEventListener.add(sName, EVENT_ACTION_PERFORMED, actionPerformed, eventTarget) + + if itemChanged != None: + xListBox.addItemListener(ItemListenerProcAdapter(self.guiEventListener)) + self.guiEventListener.add(sName, EVENT_ITEM_CHANGED, itemChanged, eventTarget) + + return xListBox + + def insertRadioButton(self, sName, itemChanged, sPropNames, oPropValues, eventTarget=None): + xRadioButton = self.insertControlModel2("com.sun.star.awt.UnoControlRadioButtonModel", + sName, sPropNames, oPropValues) + if itemChanged != None: + if eventTarget is None: + eventTarget = self + xRadioButton.addItemListener(ItemListenerProcAdapter(self.guiEventListener)) + self.guiEventListener.add(sName, EVENT_ITEM_CHANGED, itemChanged, eventTarget) + + return xRadioButton + + def insertTitledBox(self, sName, sPropNames, oPropValues): + oTitledBox = self.insertControlModel2("com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues) + return oTitledBox + + def insertTextField(self, sName, sTextChanged, sPropNames, oPropValues, eventTarget=None): + return self.insertEditField(sName, sTextChanged, eventTarget, + "com.sun.star.awt.UnoControlEditModel", sPropNames, oPropValues) + + def insertImage(self, sName, sPropNames, oPropValues): + return self.insertControlModel2("com.sun.star.awt.UnoControlImageControlModel", sName, sPropNames, oPropValues) + + def insertInfoImage(self, _posx, _posy, _iStep): + xImgControl = self.insertImage(Desktop.getUniqueName(self.xDialogModel, "imgHint"),("Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH),(uno.Any("short",0), 10, UIConsts.INFOIMAGEURL, _posx, _posy, False, _iStep, 10)) + self.getPeerConfiguration().setImageUrl(self.getModel(xImgControl), UIConsts.INFOIMAGEURL, UIConsts.INFOIMAGEURL_HC) + return xImgControl + + ''' + This method is used for creating Edit, Currency, Date, Formatted, Pattern, File + and Time edit components. + ''' + + def insertEditField(self, sName, sTextChanged, eventTarget, sModelClass, sPropNames, oPropValues): + xField = self.insertControlModel2(sModelClass, sName, sPropNames, oPropValues) + if sTextChanged != None: + if eventTarget is None: + eventTarget = self + xField.addTextListener(TextListenerProcAdapter(self.guiEventListener)) + self.guiEventListener.add(sName, EVENT_TEXT_CHANGED, sTextChanged, eventTarget) + + return xField + + def insertFileControl(self, sName, sTextChanged, sPropNames, oPropValues, eventTarget=None): + return self.insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlFileControlModel", sPropNames, oPropValues) + + def insertCurrencyField(self, sName, sTextChanged, sPropNames, oPropValues, eventTarget=None): + return self.insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlCurrencyFieldModel", sPropNames, oPropValues) + + def insertDateField(self, sName, sTextChanged, sPropNames, oPropValues, eventTarget=None): + return self.insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlDateFieldModel", sPropNames, oPropValues) + + def insertNumericField(self, sName, sTextChanged, sPropNames, oPropValues, eventTarget=None): + return self.insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlNumericFieldModel", sPropNames, oPropValues) + + def insertTimeField(self, sName, sTextChanged, sPropNames, oPropValues, eventTarget=None): + return self.insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlTimeFieldModel", sPropNames, oPropValues) + + def insertPatternField(self, sName, sTextChanged, oPropValues, eventTarget=None): + return self.insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlPatternFieldModel", sPropNames, oPropValues) + + def insertFormattedField(self, sName, sTextChanged, sPropNames, oPropValues, eventTarget=None): + return self.insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlFormattedFieldModel", sPropNames, oPropValues) + + def insertFixedLine(self, sName, sPropNames, oPropValues): + oLine = self.insertControlModel2("com.sun.star.awt.UnoControlFixedLineModel", sName, sPropNames, oPropValues) + return oLine + + def insertScrollBar(self, sName, sPropNames, oPropValues): + oScrollBar = self.insertControlModel2("com.sun.star.awt.UnoControlScrollBarModel", sName, sPropNames, oPropValues) + return oScrollBar + + def insertProgressBar(self, sName, sPropNames, oPropValues): + oProgressBar = self.insertControlModel2("com.sun.star.awt.UnoControlProgressBarModel", sName, sPropNames, oPropValues) + return oProgressBar + + def insertGroupBox(self, sName, sPropNames, oPropValues): + oGroupBox = self.insertControlModel2("com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues) + return oGroupBox + + def insertControlModel2(self, serviceName, componentName, sPropNames, oPropValues): + try: + xControlModel = self.insertControlModel(serviceName, componentName, (), ()) + Helper.setUnoPropertyValues(xControlModel, sPropNames, oPropValues) + Helper.setUnoPropertyValue(xControlModel, PropertyNames.PROPERTY_NAME, componentName) + except Exception, ex: + traceback.print_exc() + + aObj = self.xUnoDialog.getControl(componentName) + return aObj + + def setControlPropertiesDebug(self, model, names, values): + i = 0 + while i < names.length: + print " Settings: ", names[i] + Helper.setUnoPropertyValue(model, names[i], values[i]) + i += 1 + + def translateURL(self, relativeURL): + return "" + + def getControlModel(self, unoControl): + obj = unoControl.getModel() + return obj + + def showMessageBox(self, windowServiceName, windowAttribute, MessageText): + return SystemDialog.showMessageBox(xMSF, self.xControl.getPeer(), windowServiceName, windowAttribute, MessageText) + diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py new file mode 100644 index 000000000..6dbdf53ce --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -0,0 +1,422 @@ +from UnoDialog2 import * +from common.Resource import Resource +from abc import ABCMeta, abstractmethod +from com.sun.star.lang import NoSuchMethodException +from com.sun.star.uno import Exception as UnoException +from com.sun.star.lang import IllegalArgumentException +from com.sun.star.frame import TerminationVetoException +from common.HelpIds import * +from com.sun.star.awt.PushButtonType import HELP, STANDARD +from event.MethodInvocation import * +from event.EventNames import EVENT_ITEM_CHANGED + +class WizardDialog(UnoDialog2): + + __metaclass__ = ABCMeta + __NEXT_ACTION_PERFORMED = "gotoNextAvailableStep" + __BACK_ACTION_PERFORMED = "gotoPreviousAvailableStep" + __FINISH_ACTION_PERFORMED = "finishWizard_1" + __CANCEL_ACTION_PERFORMED = "cancelWizard_1" + __HELP_ACTION_PERFORMED = "callHelp" + ''' + Creates a new instance of WizardDialog + the hid is used as following : + "HID:(hid)" - the dialog + "HID:(hid+1) - the help button + "HID:(hid+2)" - the back button + "HID:(hid+3)" - the next button + "HID:(hid+4)" - the create button + "HID:(hid+5)" - the cancel button + @param xMSF + @param hid_ + ''' + + def __init__(self, xMSF, hid_): + super(WizardDialog,self).__init__(xMSF) + self.__hid = hid_ + self.__iButtonWidth = 50 + self.__nNewStep = 1 + self.__nOldStep = 1 + self.__nMaxStep = 1 + self.__bTerminateListenermustberemoved = True + self.__oWizardResource = Resource(xMSF, "dbw") + self.sMsgEndAutopilot = self.__oWizardResource.getResText(UIConsts.RID_DB_COMMON + 33) + #self.vetos = VetoableChangeSupport.VetoableChangeSupport_unknown(this) + + def getResource(self): + return self.__oWizardResource + + def activate(self): + try: + if self.xUnoDialog != None: + self.xUnoDialog.toFront() + + except UnoException, ex: + pass + # do nothing; + + def setMaxStep(self, i): + self.__nMaxStep = i + + def getMaxStep(self): + return self.__nMaxStep + + def setOldStep(self, i): + self.__nOldStep = i + + def getOldStep(self): + return self.__nOldStep + + def setNewStep(self, i): + self.__nNewStep = i + + def getNewStep(self): + return self.__nNewStep + + #@see java.beans.VetoableChangeListener#vetoableChange(java.beans.PropertyChangeEvent) + + + def vetoableChange(self, arg0): + self.__nNewStep = self.__nOldStep + + def itemStateChanged(self, itemEvent): + try: + self.__nNewStep = itemEvent.ItemId + self.__nOldStep = int(Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP)) + if self.__nNewStep != self.__nOldStep: + switchToStep() + + except IllegalArgumentException, exception: + traceback.print_exc() + + def setRoadmapInteractive(self, _bInteractive): + Helper.setUnoPropertyValue(self.oRoadmap, "Activated", _bInteractive) + + def setRoadmapComplete(self, bComplete): + Helper.setUnoPropertyValue(self.oRoadmap, "Complete", bComplete) + + def isRoadmapComplete(self): + try: + return bool(Helper.getUnoPropertyValue(self.oRoadmap, "Complete")) + except IllegalArgumentException, exception: + traceback.print_exc() + return False + + def setCurrentRoadmapItemID(self, ID): + if self.oRoadmap != None: + nCurItemID = self.getCurrentRoadmapItemID() + if nCurItemID != ID: + Helper.setUnoPropertyValue(self.oRoadmap, "CurrentItemID", uno.Any("short",ID)) + + def getCurrentRoadmapItemID(self): + try: + return int(Helper.getUnoPropertyValue(self.oRoadmap, "CurrentItemID")) + except UnoException, exception: + traceback.print_exc() + return -1 + + def addRoadmap(self): + try: + iDialogHeight = Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_HEIGHT) + # the roadmap control has got no real TabIndex ever + # that is not correct, but changing this would need time, so it is used + # without TabIndex as before + self.oRoadmap = self.insertControlModel("com.sun.star.awt.UnoControlRoadmapModel", "rdmNavi", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tabstop", PropertyNames.PROPERTY_WIDTH),((iDialogHeight - 26), 0, 0, 0, 0, True, uno.Any("short",85))) + self.oRoadmap.setPropertyValue(PropertyNames.PROPERTY_NAME, "rdmNavi") + + mi = MethodInvocation("itemStateChanged", self) + self.guiEventListener.add("rdmNavi", EVENT_ITEM_CHANGED, mi) + self.xRoadmapControl = self.xUnoDialog.getControl("rdmNavi") + self.xRoadmapControl.addItemListener(ItemListenerProcAdapter(self.guiEventListener)) + + Helper.setUnoPropertyValue(self.oRoadmap, "Text", self.__oWizardResource.getResText(UIConsts.RID_COMMON + 16)) + except NoSuchMethodException, ex: + Resource.showCommonResourceError(xMSF) + except UnoException, jexception: + traceback.print_exc() + + def setRMItemLabels(self, _oResource, StartResID): + self.sRMItemLabels = _oResource.getResArray(StartResID, self.__nMaxStep) + + def getRMItemLabels(self): + return self.sRMItemLabels + + def insertRoadmapItem(self, _Index, _bEnabled, _LabelID, _CurItemID): + return insertRoadmapItem(_Index, _bEnabled, self.sRMItemLabels(_LabelID), _CurItemID) + + def insertRoadmapItem(self, Index, _bEnabled, _sLabel, _CurItemID): + try: + oRoadmapItem = self.oRoadmap.createInstance() + Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_LABEL, _sLabel) + Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_ENABLED, _bEnabled) + Helper.setUnoPropertyValue(oRoadmapItem, "ID", _CurItemID) + self.oRoadmap.insertByIndex(Index, oRoadmapItem) + NextIndex = Index + 1 + return NextIndex + except UnoException, exception: + traceback.print_exc() + return -1 + + def getRMItemCount(self): + return self.oRoadmap.getCount() + + def getRoadmapItemByID(self, _ID): + try: + i = 0 + while i < self.oRoadmap.getCount(): + CurRoadmapItem = self.oRoadmap.getByIndex(i) + CurID = int(Helper.getUnoPropertyValue(CurRoadmapItem, "ID")) + if CurID == _ID: + return CurRoadmapItem + + i += 1 + return None + except UnoException, exception: + traceback.print_exc() + return None + + def switchToStep(self,_nOldStep=None, _nNewStep=None): + if _nOldStep and _nNewStep: + self.__nOldStep = _nOldStep + self.__nNewStep = _nNewStep + + leaveStep(self.__nOldStep, self.__nNewStep) + if self.__nNewStep != self.__nOldStep: + if self.__nNewStep == self.__nMaxStep: + setControlProperty("btnWizardNext", "DefaultButton", False) + setControlProperty("btnWizardFinish", "DefaultButton", True) + else: + setControlProperty("btnWizardNext", "DefaultButton", True) + setControlProperty("btnWizardFinish", "DefaultButton", False) + + changeToStep(self.__nNewStep) + enterStep(self.__nOldStep, self.__nNewStep) + return True + + return False + + @abstractmethod + def leaveStep(self, nOldStep, nNewStep): + pass + + @abstractmethod + def enterStep(self, nOldStep, nNewStep): + pass + + def changeToStep(self, nNewStep): + Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP, nNewStep) + setCurrentRoadmapItemID((short)(nNewStep)) + enableNextButton(getNextAvailableStep() > 0) + enableBackButton(nNewStep != 1) + + + def iscompleted(self, _ndialogpage): + return False + + + def ismodified(self, _ndialogpage): + return False + + def drawNaviBar(self): + try: + curtabindex = UIConsts.SOFIRSTWIZARDNAVITABINDEX + iButtonWidth = self.__iButtonWidth + iButtonHeight = 14 + iCurStep = 0 + iDialogHeight = Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_HEIGHT) + iDialogWidth = Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_WIDTH) + iHelpPosX = 8 + iBtnPosY = iDialogHeight - iButtonHeight - 6 + iCancelPosX = iDialogWidth - self.__iButtonWidth - 6 + iFinishPosX = iCancelPosX - 6 - self.__iButtonWidth + iNextPosX = iFinishPosX - 6 - self.__iButtonWidth + iBackPosX = iNextPosX - 3 - self.__iButtonWidth + self.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnNaviSep", (PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH), (1, 0, 0, iDialogHeight - 26, iCurStep, iDialogWidth)) + self.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnRoadSep",(PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH),(iBtnPosY - 6, 1, 85, 0, iCurStep, 1)) + propNames = (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH) + Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_HELPURL, HelpIds.getHelpIdString(self.__hid)) + self.insertButton("btnWizardHelp", WizardDialog.__HELP_ACTION_PERFORMED,(PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH),(True, iButtonHeight, self.__oWizardResource.getResText(UIConsts.RID_COMMON + 15), iHelpPosX, iBtnPosY, uno.Any("short",HELP), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + self.insertButton("btnWizardBack", WizardDialog.__BACK_ACTION_PERFORMED, propNames,(False, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 2), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 13), iBackPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + self.insertButton("btnWizardNext", WizardDialog.__NEXT_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 3), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 14), iNextPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + self.insertButton("btnWizardFinish", WizardDialog.__FINISH_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 4), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 12), iFinishPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + self.insertButton("btnWizardCancel", WizardDialog.__CANCEL_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 5), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 11), iCancelPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + self.setControlProperty("btnWizardNext", "DefaultButton", True) + # add a window listener, to know + # if the user used "escape" key to + # close the dialog. + windowHidden = MethodInvocation("windowHidden", self) + self.xUnoDialog.addWindowListener(WindowListenerProcAdapter(self.guiEventListener)) + dialogName = Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_NAME) + self.guiEventListener.add(dialogName, EVENT_ACTION_PERFORMED, windowHidden) + except Exception, exception: + traceback.print_exc() + + def insertRoadMapItems(self, items, steps, enabled): + i = 0 + while i < items.length: + insertRoadmapItem(i, enabled(i), items(i), steps(i)) + i += 1 + + def setStepEnabled(self, _nStep, bEnabled, enableNextButton): + setStepEnabled(_nStep, bEnabled) + if getNextAvailableStep() > 0: + enableNextButton(bEnabled) + + def enableNavigationButtons(self, _bEnableBack, _bEnableNext, _bEnableFinish): + enableBackButton(_bEnableBack) + enableNextButton(_bEnableNext) + enableFinishButton(_bEnableFinish) + + def enableBackButton(self, enabled): + setControlProperty("btnWizardBack", PropertyNames.PROPERTY_ENABLED, enabled) + + def enableNextButton(self, enabled): + setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, enabled) + + def enableFinishButton(self, enabled): + setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, enabled) + + def setStepEnabled(self, _nStep, bEnabled): + xRoadmapItem = getRoadmapItemByID(_nStep) + if xRoadmapItem != None: + Helper.setUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED, bEnabled) + + def enablefromStep(self, _iStep, _bDoEnable): + if _iStep <= self.__nMaxStep: + i = _iStep + while i <= self.__nMaxStep: + setStepEnabled(i, _bDoEnable) + i += 1 + enableFinishButton(_bDoEnable) + if not _bDoEnable: + enableNextButton(_iStep > getCurrentStep() + 1) + else: + enableNextButton(not (getCurrentStep() == self.__nMaxStep)) + + def isStepEnabled(self, _nStep): + try: + xRoadmapItem = getRoadmapItemByID(_nStep) + # Todo: In this case an exception should be thrown + if (xRoadmapItem == None): + return False + + bIsEnabled = bool(Helper.getUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED)) + return bIsEnabled + except UnoException, exception: + traceback.print_exc() + return False + + def gotoPreviousAvailableStep(self): + if self.__nNewStep > 1: + self.__nOldStep = self.__nNewStep + self.__nNewStep -= 1 + while self.__nNewStep > 0: + bIsEnabled = isStepEnabled(self.__nNewStep) + if bIsEnabled: + break; + + self.__nNewStep -= 1 + # Exception??? + if (self.__nNewStep == 0): + self.__nNewStep = self.__nOldStep + switchToStep() + + #TODO discuss with rp + + def getNextAvailableStep(self): + if isRoadmapComplete(): + i = self.__nNewStep + 1 + while i <= self.__nMaxStep: + if isStepEnabled(i): + return i + + i += 1 + + return -1 + + def gotoNextAvailableStep(self): + self.__nOldStep = self.__nNewStep + self.__nNewStep = getNextAvailableStep() + if self.__nNewStep > -1: + switchToStep() + + @abstractmethod + def finishWizard(self): + pass + + #This function will call if the finish button is pressed on the UI. + + def finishWizard_1(self): + enableFinishButton(False) + success = False + try: + success = finishWizard() + finally: + if not success: + enableFinishButton(True) + + if success: + removeTerminateListener() + + def getMaximalStep(self): + return self.__nMaxStep + + def getCurrentStep(self): + try: + return int(Helper.getUnoPropertyValue(self.MSFDialogModel, PropertyNames.PROPERTY_STEP)) + except UnoException, exception: + traceback.print_exc() + return -1 + + def setCurrentStep(self, _nNewstep): + self.__nNewStep = _nNewstep + changeToStep(self.__nNewStep) + + def setRightPaneHeaders(self, _oResource, StartResID, _nMaxStep): + self.sRightPaneHeaders = _oResource.getResArray(StartResID, _nMaxStep) + setRightPaneHeaders(self.sRightPaneHeaders) + + def setRightPaneHeaders(self, _sRightPaneHeaders): + self.__nMaxStep = _sRightPaneHeaders.length + self.sRightPaneHeaders = _sRightPaneHeaders + oFontDesc = FontDescriptor.FontDescriptor() + oFontDesc.Weight = com.sun.star.awt.FontWeight.BOLD + i = 0 + while i < self.sRightPaneHeaders.length: + insertLabel("lblQueryTitle" + String.valueOf(i),("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH),(oFontDesc, 16, self.sRightPaneHeaders(i), True, 91, 8, i + 1, uno.Any("short",12), 212)) + i += 1 + + def cancelWizard(self): + #can be overwritten by extending class + xDialog.endExecute() + + def removeTerminateListener(self): + if self.__bTerminateListenermustberemoved: + #COMMENTED + #Desktop.getDesktop(self.xMSF).removeTerminateListener( \ + # ActionListenerProcAdapter(self)) + self.__bTerminateListenermustberemoved = False + + ''' + called by the cancel button and + by the window hidden event. + if this method was not called before, + perform a cancel. + ''' + + def cancelWizard_1(self): + cancelWizard() + removeTerminateListener() + + def windowHidden(self): + cancelWizard_1() + + def notifyTermination(self, arg0): + cancelWizard_1() + + def queryTermination(self, arg0): + activate() + raise TerminationVetoException (); + + def disposing(self, arg0): + cancelWizard_1() diff --git a/wizards/com/sun/star/wizards/ui/XPathSelectionListener.py b/wizards/com/sun/star/wizards/ui/XPathSelectionListener.py new file mode 100644 index 000000000..1f065209d --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/XPathSelectionListener.py @@ -0,0 +1,7 @@ +from abc import ABCMeta, abstractmethod + +class XPathSelectionListener(object): + + @abstractmethod + def validatePath(self): + pass diff --git a/wizards/com/sun/star/wizards/ui/__init__.py b/wizards/com/sun/star/wizards/ui/__init__.py new file mode 100644 index 000000000..51429ce86 --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/__init__.py @@ -0,0 +1 @@ +"""UI""" diff --git a/wizards/com/sun/star/wizards/ui/event/AbstractListener.py b/wizards/com/sun/star/wizards/ui/event/AbstractListener.py new file mode 100644 index 000000000..a3337c66d --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/event/AbstractListener.py @@ -0,0 +1,67 @@ +from MethodInvocation import MethodInvocation +import traceback +''' +This class is a base class for listener classes. +It uses a hashtable to map between a ComponentName, EventName and a MethodInvokation Object. +To use this class do the following:
+ +
  • Write a subclass which implements the needed Listener(s).
  • +in the even methods, use invoke(...). +
  • When instanciating the component, register the subclass as the event listener.
  • +
  • Write the methods which should be performed when the event occures.
  • +
  • call the "add" method, to define a component-event-action mapping.
  • +
    +@author rpiterman +''' + +class AbstractListener(object): + '''Creates a new instance of AbstractListener''' + + mHashtable = {} + + def add(self, componentName, eventName, mi, target=None): + try: + if target is not None: + mi = MethodInvocation(mi, target) + AbstractListener.mHashtable[componentName + eventName] = mi + except Exception, e: + traceback.print_exc() + + + def get(self, componentName, eventName): + return AbstractListener.mHashtable[componentName + eventName] + + @classmethod + def invoke(self, componentName, eventName, param): + try: + mi = self.get(componentName, eventName) + if mi != None: + return mi.invoke(param) + else: + return None + + except InvocationTargetException, ite: + print "=======================================================" + print "=== Note: An Exception was thrown which should have ===" + print "=== caused a crash. I caught it. Please report this ===" + print "=== to libreoffice.org ===" + print "=======================================================" + traceback.print_exc() + except IllegalAccessException, iae: + traceback.print_exc() + except Exception, ex: + print "=======================================================" + print "=== Note: An Exception was thrown which should have ===" + print "=== caused a crash. I Catched it. Please report this ==" + print "=== to libreoffice.org ==" + print "=======================================================" + traceback.print_exc() + + return None + + ''' + Rerurns the property "name" of the Object which is the source of the event. + ''' + def getEventSourceName(self, eventObject): + return Helper.getUnoPropertyValue(eventObject.Source.getModel(), PropertyNames.PROPERTY_NAME) + diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py new file mode 100644 index 000000000..570be2557 --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py @@ -0,0 +1,73 @@ +''' +import com.sun.star.awt.*; + +import com.sun.star.lang.EventObject; +''' +from AbstractListener import AbstractListener +from EventNames import * + +class CommonListener(AbstractListener): + + def __init__(self): + pass + + '''Implementation of com.sun.star.awt.XActionListener''' + def actionPerformed(self, actionEvent): + self.invoke(self.getEventSourceName(actionEvent), EVENT_ACTION_PERFORMED, actionEvent) + + '''Implementation of com.sun.star.awt.XItemListener''' + def itemStateChanged(self, itemEvent): + self.invoke(self.getEventSourceName(itemEvent), EVENT_ITEM_CHANGED, itemEvent) + + '''Implementation of com.sun.star.awt.XTextListener''' + def textChanged(self, textEvent): + self.invoke(self.getEventSourceName(textEvent), EVENT_TEXT_CHANGED, textEvent) + + '''@see com.sun.star.awt.XWindowListener#windowResized(com.sun.star.awt.WindowEvent)''' + def windowResized(self, event): + self.invoke(self.getEventSourceName(event), EVENT_WINDOW_RESIZED, event) + + '''@see com.sun.star.awt.XWindowListener#windowMoved(com.sun.star.awt.WindowEvent)''' + def windowMoved(self, event): + self.invoke(self.getEventSourceName(event), EVENT_WINDOW_MOVED, event) + + '''@see com.sun.star.awt.XWindowListener#windowShown(com.sun.star.lang.EventObject)''' + def windowShown(self, event): + self.invoke(self.getEventSourceName(event), EVENT_WINDOW_SHOWN, event) + + '''@see com.sun.star.awt.XWindowListener#windowHidden(com.sun.star.lang.EventObject)''' + def windowHidden(self, event): + self.invoke(self.getEventSourceName(event), EVENT_WINDOW_HIDDEN, event) + + '''@see com.sun.star.awt.XMouseListener#mousePressed(com.sun.star.awt.MouseEvent)''' + def mousePressed(self, event): + self.invoke(self.getEventSourceName(event), EVENT_MOUSE_PRESSED, event) + + '''@see com.sun.star.awt.XMouseListener#mouseReleased(com.sun.star.awt.MouseEvent)''' + def mouseReleased(self, event): + self.invoke(self.getEventSourceName(event), EVENT_KEY_RELEASED, event) + + '''@see com.sun.star.awt.XMouseListener#mouseEntered(com.sun.star.awt.MouseEvent)''' + def mouseEntered(self, event): + self.invoke(self.getEventSourceName(event), EVENT_MOUSE_ENTERED, event) + + '''@see com.sun.star.awt.XMouseListener#mouseExited(com.sun.star.awt.MouseEvent)''' + def mouseExited(self, event): + self.invoke(self.getEventSourceName(event), EVENT_MOUSE_EXITED, event) + + '''@see com.sun.star.awt.XFocusListener#focusGained(com.sun.star.awt.FocusEvent)''' + def focusGained(self, event): + self.invoke(self.getEventSourceName(event), EVENT_FOCUS_GAINED, event) + + '''@see com.sun.star.awt.XFocusListener#focusLost(com.sun.star.awt.FocusEvent)''' + def focusLost(self, event): + self.invoke(self.getEventSourceName(event), EVENT_FOCUS_LOST, event) + + '''@see com.sun.star.awt.XKeyListener#keyPressed(com.sun.star.awt.KeyEvent)''' + def keyPressed(self, event): + self.invoke(c(event), EVENT_KEY_PRESSED, event) + + '''@see com.sun.star.awt.XKeyListener#keyReleased(com.sun.star.awt.KeyEvent)''' + def keyReleased(self, event): + self.invoke(self.getEventSourceName(event), EVENT_KEY_RELEASED, event) + diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py b/wizards/com/sun/star/wizards/ui/event/DataAware.py new file mode 100644 index 000000000..dfd62438b --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.py @@ -0,0 +1,291 @@ +from common.PropertyNames import * +from abc import ABCMeta, abstractmethod +import traceback + +#TEMPORAL +import inspect + +''' +@author rpiterman +DataAware objects are used to live-synchronize UI and DataModel/DataObject. +It is used as listener on UI events, to keep the DataObject up to date. +This class, as a base abstract class, sets a frame of functionality, +delegating the data Object get/set methods to a Value object, +and leaving the UI get/set methods abstract. +Note that event listenning is *not* a part of this model. +the updateData() or updateUI() methods should be porogramatically called. +in child classes, the updateData() will be binded to UI event calls. +

    +This class holds references to a Data Object and a Value object. +The Value object "knows" how to get and set a value from the +Data Object. +''' + +class DataAware(object): + __metaclass__ = ABCMeta + + ''' + creates a DataAware object for the given data object and Value object. + @param dataObject_ + @param value_ + ''' + + def __init__(self, dataObject_, value_): + self._dataObject = dataObject_ + self._value = value_ + + ''' + Sets the given value to the data object. + this method delegates the job to the + Value object, but can be overwritten if + another kind of Data is needed. + @param newValue the new value to set to the DataObject. + ''' + + def setToData(self, newValue): + self._value.set(newValue, self._dataObject) + + ''' + gets the current value from the data obejct. + this method delegates the job to + the value object. + @return the current value of the data object. + ''' + + def getFromData(self): + return self._value.get(self._dataObject) + + ''' + sets the given value to the UI control + @param newValue the value to set to the ui control. + ''' + @abstractmethod + def setToUI (self,newValue): + pass + + ''' + gets the current value from the UI control. + @return the current value from the UI control. + ''' + + @abstractmethod + def getFromUI (self): + pass + + ''' + updates the UI control according to the + current state of the data object. + ''' + + def updateUI(self): + data = self.getFromData() + ui = self.getFromUI() + if data != ui: + try: + self.setToUI(data) + except Exception, ex: + traceback.print_exc() + #TODO tell user... + + ''' + updates the DataObject according to + the current state of the UI control. + ''' + + def updateData(self): + data = self.getFromData() + ui = self.getFromUI() + if not equals(data, ui): + setToData(ui) + + class Listener(object): + @abstractmethod + def eventPerformed (self, event): + pass + + ''' + compares the two given objects. + This method is null safe and returns true also if both are null... + If both are arrays, treats them as array of short and compares them. + @param a first object to compare + @param b second object to compare. + @return true if both are null or both are equal. + ''' + + def equals(self, a, b): + if not a and not b : + return True + + if not a or not b: + return False + + if a.getClass().isArray(): + if b.getClass().isArray(): + return Arrays.equals(a, b) + else: + return False + + return a.equals(b) + + ''' + given a collection containing DataAware objects, + calls updateUI() on each memebr of the collection. + @param dataAwares a collection containing DataAware objects. + ''' + @classmethod + def updateUIs(self, dataAwares): + for i in dataAwares: + i.updateUI() + + ''' + Given a collection containing DataAware objects, + sets the given DataObject to each DataAware object + in the given collection + @param dataAwares a collection of DataAware objects. + @param dataObject new data object to set to the DataAware objects in the given collection. + @param updateUI if true, calls updateUI() on each DataAware object. + ''' + + def setDataObject(self, dataObject, updateUI): + if dataObject != None and not (type(self._value) is not type(dataObject)): + raise ClassCastException ("can not cast new DataObject to original Class"); + self._dataObject = dataObject + if updateUI: + self.updateUI() + + ''' + Given a collection containing DataAware objects, + sets the given DataObject to each DataAware object + in the given collection + @param dataAwares a collection of DataAware objects. + @param dataObject new data object to set to the DataAware objects in the given collection. + @param updateUI if true, calls updateUI() on each DataAware object. + ''' + + @classmethod + def setDataObjects(self, dataAwares, dataObject, updateUI): + for i in dataAwares: + i.setDataObject(dataObject, updateUI); + + ''' + Value objects read and write a value from and + to an object. Typically using reflection and JavaBeans properties + or directly using memeber reflection API. + DataAware delegates the handling of the DataObject + to a Value object. + 2 implementations currently exist: PropertyValue, + using JavaBeans properties reflection, and DataAwareFields classes + which implement different memeber types. + ''' + class Value (object): + + '''gets a value from the given object. + @param target the object to get the value from. + @return the value from the given object. + ''' + @abstractmethod + def Get (self, target): + pass + + ''' + sets a value to the given object. + @param value the value to set to the object. + @param target the object to set the value to. + ''' + @abstractmethod + def Set (self, value, target): + pass + + ''' + checks if this Value object can handle + the given object type as a target. + @param type the type of a target to check + @return true if the given class is acceptible for + the Value object. False if not. + ''' + @abstractmethod + def isAssifrom(self, Type): + pass + + ''' + implementation of Value, handling JavaBeans properties through + reflection. + This Object gets and sets a value a specific + (JavaBean-style) property on a given object. + @author rp143992 + ''' + class PropertyValue(Value): + + __EMPTY_ARRAY = range(0) + + ''' + creates a PropertyValue for the property with + the given name, of the given JavaBean object. + @param propertyName the property to access. Must be a Cup letter (e.g. PropertyNames.PROPERTY_NAME for getName() and setName("..."). ) + @param propertyOwner the object which "own" or "contains" the property. + ''' + + def __init__(self, propertyName, propertyOwner): + self.getMethod = createGetMethod(propertyName, propertyOwner) + self.setMethod = createSetMethod(propertyName, propertyOwner, self.getMethod.getReturnType()) + + ''' + called from the constructor, and creates a get method reflection object + for the given property and object. + @param propName the property name0 + @param obj the object which contains the property. + @return the get method reflection object. + ''' + + def createGetMethod(self, propName, obj): + m = None + try: + #try to get a "get" method. + m = obj.getClass().getMethod("get" + propName, self.__class__.__EMPTY_ARRAY) + except NoSuchMethodException, ex1: + raise IllegalArgumentException ("get" + propName + "() method does not exist on " + obj.getClass().getName()); + + return m + + def Get(self, target): + try: + return self.getMethod.invoke(target, self.__class__.__EMPTY_ARRAY) + except IllegalAccessException, ex1: + ex1.printStackTrace() + except InvocationTargetException, ex2: + ex2.printStackTrace() + except NullPointerException, npe: + if isinstance(self.getMethod.getReturnType(),str): + return "" + + if isinstance(self.getMethod.getReturnType(),int ): + return 0 + + if isinstance(self.getMethod.getReturnType(),tuple): + return 0 + + if isinstance(self.getMethod.getReturnType(),list ): + return [] + + return None + + def createSetMethod(self, propName, obj, paramClass): + m = None + try: + m = obj.getClass().getMethod("set" + propName, [paramClass]) + except NoSuchMethodException, ex1: + raise IllegalArgumentException ("set" + propName + "(" + self.getMethod.getReturnType().getName() + ") method does not exist on " + obj.getClass().getName()); + + return m + + def Set(self, value, target): + try: + self.setMethod.invoke(target, [value]) + except IllegalAccessException, ex1: + ex1.printStackTrace() + except InvocationTargetException, ex2: + ex2.printStackTrace() + + def isAssignable(self, type): + return self.getMethod.getDeclaringClass().isAssignableFrom(type) and self.setMethod.getDeclaringClass().isAssignableFrom(type) + diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java index f048f9bf0..261f5c2b1 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java +++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java @@ -318,6 +318,7 @@ public class DataAwareFields { if (s == null || s.equals("")) { + System.out.println(Any.VOID); return Any.VOID; } else @@ -329,6 +330,7 @@ public class DataAwareFields { if (s == null || s.equals("")) { + System.out.println(Any.VOID); return Any.VOID; } else diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py new file mode 100644 index 000000000..efa017f55 --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py @@ -0,0 +1,158 @@ +import traceback +from DataAware import * +import uno +''' +This class is a factory for Value objects for different types of +memebers. +Other than some Value implementations classes this class contains static +type conversion methods and factory methods. + +@see com.sun.star.wizards.ui.event.DataAware.Value +''' + +class DataAwareFields(object): + TRUE = "true" + FALSE = "false" + ''' + returns a Value Object which sets and gets values + and converting them to other types, according to the "value" argument. + + @param owner + @param fieldname + @param value + @return + @throws NoSuchFieldException + ''' + + @classmethod + def getFieldValueFor(self, owner, fieldname, value): + try: + f = getattr(owner, fieldname) + if isinstance(f,bool): + return self.__BooleanFieldValue(fieldname, value) + elif isinstance(f,str): + return self.__ConvertedStringValue(fieldname, value) + elif isinstance(f,int): + return self.__IntFieldValue(fieldname, value) + else: + return SimpleFieldValue(f) + + except AttributeError, ex: + traceback.print_exc() + return None + + '''__ConvertedStringValue + an abstract implementation of DataAware.Value to access + object memebers (fields) usign reflection. + ''' + class __FieldValue(DataAware.Value): + __metaclass__ = ABCMeta + + def __init__(self, field_): + self.field = field_ + + def isAssignable(self, type_): + return self.field.getDeclaringClass().isAssignableFrom(type_) + + class __BooleanFieldValue(__FieldValue): + + def __init__(self, f, convertTo_): + super(type(self),self).__init__(f) + self.convertTo = convertTo_ + + def get(self, target): + try: + b = getattr(target, self.field) + + if isinstance(self.convertTo,bool): + if b: + return True + else: + return False + elif isinstance(self.convertTo,int): + return int(b) + elif isinstance(self.convertTo,str): + return str(b) + elif self.convertTo.type == uno.Any("short",0).type: + return uno.Any("short",b) + else: + raise AttributeError("Cannot convert boolean value to given type (" + str(type(self.convertTo)) + ")."); + + except Exception, ex: + traceback.print_exc() + return None + + def set(self, value, target): + try: + self.field.setBoolean(target, toBoolean(value)) + except Exception, ex: + traceback.print_exc() + + class __IntFieldValue(__FieldValue): + + def __init__(self, f, convertTo_): + super(type(self),self).__init__(f) + self.convertTo = convertTo_ + + def get(self, target): + try: + i = getattr(target, self.field) + if isinstance(self.convertTo,bool): + if i: + return True + else: + return False + elif isinstance(self.convertTo, int): + return int(i) + elif isinstance(self.convertTo,str): + return str(i) + else: + raise AttributeError("Cannot convert int value to given type (" + str(type(self.convertTo)) + ")."); + + except Exception, ex: + traceback.print_exc() + #traceback.print_exc__ConvertedStringValue() + return None + + def set(self, value, target): + try: + self.field.setInt(target, toDouble(value)) + except Exception, ex: + traceback.print_exc() + + class __ConvertedStringValue(__FieldValue): + + def __init__(self, f, convertTo_): + super(type(self),self).__init__(f) + self.convertTo = convertTo_ + + def get(self, target): + try: + s = getattr(target, self.field) + if isinstance(self.convertTo,bool): + if s != None and not s == "" and s == "true": + return True + else: + return False + elif isinstance(self.convertTo,str): + if s == None or s == "": + pass + else: + return s + else: + raise AttributeError("Cannot convert int value to given type (" \ + + str(type(self.convertTo)) + ")." ) + + except Exception, ex: + traceback.print_exc() + return None + + def set(self, value, target): + try: + string_aux = "" + #if value is not None or not isinstance(value,uno.Any()): + # string_aux = str(value) + + self.field.set(target, string_aux) + except Exception, ex: + traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/ui/event/EventNames.py b/wizards/com/sun/star/wizards/ui/event/EventNames.py new file mode 100644 index 000000000..49845ceb1 --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/event/EventNames.py @@ -0,0 +1,15 @@ +EVENT_ACTION_PERFORMED = "APR" +EVENT_ITEM_CHANGED = "ICH" +EVENT_TEXT_CHANGED = "TCH" #window events (XWindow) +EVENT_WINDOW_RESIZED = "WRE" +EVENT_WINDOW_MOVED = "WMO" +EVENT_WINDOW_SHOWN = "WSH" +EVENT_WINDOW_HIDDEN = "WHI" #focus events (XWindow) +EVENT_FOCUS_GAINED = "FGA" +EVENT_FOCUS_LOST = "FLO" #keyboard events +EVENT_KEY_PRESSED = "KPR" +EVENT_KEY_RELEASED = "KRE" #mouse events +EVENT_MOUSE_PRESSED = "MPR" +EVENT_MOUSE_RELEASED = "MRE" +EVENT_MOUSE_ENTERED = "MEN" +EVENT_MOUSE_EXITED = "MEX" diff --git a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py new file mode 100644 index 000000000..0a662d2f2 --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py @@ -0,0 +1,34 @@ +'''import java.lang.reflect.InvocationTargetException; + +import java.lang.reflect.Method; + +import com.sun.star.wizards.common.PropertyNames; +''' + +'''Encapsulate a Method invocation. +In the constructor one defines a method, a target object and an optional +Parameter. +Then one calls "invoke", with or without a parameter.
    +Limitations: I do not check anything myself. If the param is not ok, from the +wrong type, or the mothod doesnot exist on the given object. +You can trick this class howmuch you want: it will all throw exceptions +on the java level. i throw no error warnings or my own excceptions... +''' + +class MethodInvocation(object): + + EMPTY_ARRAY = () + + '''Creates a new instance of MethodInvokation''' + def __init__(self, method, obj, paramClass=None): + self.mMethod = method + self.mObject = obj + self.mWithParam = not (paramClass==None) + + '''Returns the result of calling the method on the object, or null, if no result. ''' + + def invoke(self, param=None): + if self.mWithParam: + return self.mMethod.invoke(self.mObject, (param)) + else: + return self.mMethod.invoke(self.mObject, EMPTY_ARRAY) diff --git a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py new file mode 100644 index 000000000..1c33e4d0b --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py @@ -0,0 +1,45 @@ +from DataAware import * +from DataAwareFields import * +from UnoDataAware import * +import time +''' +@author rpiterman +To change the template for this generated type comment go to +Window>Preferences>Java>Code Generation>Code and Comments +''' + +class RadioDataAware(DataAware): + + def __init__(self, data, value, radioButs): + super(RadioDataAware,self).__init__(data, value) + self.radioButtons = radioButs + + def setToUI(self, value): + selected = int(value) + if selected == -1: + i = 0 + while i < self.radioButtons.length: + self.radioButtons[i].setState(False) + i += 1 + else: + self.radioButtons[selected].setState(True) + + def getFromUI(self): + for i in self.radioButtons: + if i.getState(): + return i + + return -1 + + @classmethod + def attachRadioButtons(self, data, dataProp, buttons, listener, field): + if field: + aux = DataAwareFields.getFieldValueFor(data, dataProp, 0) + else: + aux = DataAware.PropertyValue (dataProp, data) + + da = RadioDataAware(data, aux , buttons) + xil = UnoDataAware.ItemListener(da, listener) + for i in da.radioButtons: + i.addItemListener(xil) + return da diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py new file mode 100644 index 000000000..65d22bf61 --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py @@ -0,0 +1,184 @@ +from DataAware import * +import unohelper +from com.sun.star.awt import XItemListener +from com.sun.star.awt import XTextListener +from DataAwareFields import * +from common.Helper import * + +''' +@author rpiterman +This class suppoprts imple cases where a UI control can +be directly synchronized with a data property. +Such controls are: the different text controls +(synchronizing the "Text" , "Value", "Date", "Time" property), +Checkbox controls, Dropdown listbox controls (synchronizing the +SelectedItems[] property. +For those controls, static convenience methods are offered, to simplify use. +''' + +class UnoDataAware(DataAware): + + def __init__(self, dataObject, value, unoObject_, unoPropName_): + super(UnoDataAware,self).__init__(dataObject, value) + self.unoControl = unoObject_ + self.unoModel = self.getModel(self.unoControl) + self.unoPropName = unoPropName_ + self.disableObjects = range(0) + self.inverse = False + + def setInverse(self, i): + self.inverse = i + + def enableControls(self, value): + b = getBoolean(value) + if self.inverse: + if b.booleanValue(): + b = False + else: + b = True + + i = 0 + while i < self.disableObjects.length: + setEnabled(self.disableObjects[i], b) + i += 1 + + def setToUI(self, value): + Helper.setUnoPropertyValue(self.unoModel, self.unoPropName, value) + + def stringof(self, value): + if value.getClass().isArray(): + sb = StringBuffer.StringBuffer_unknown("[") + i = 0 + while i < (value).length: + sb.append((value)[i]).append(" , ") + i += 1 + sb.append("]") + return sb.toString() + else: + return value.toString() + + ''' + Try to get from an arbitrary object a boolean value. + Null returns False; + A Boolean object returns itself. + An Array returns true if it not empty. + An Empty String returns False. + everything else returns a True. + @param value + @return + ''' + + def getBoolean(self, value): + if value == None: + return False + + if isinstance(value, bool): + return value + elif value.getClass().isArray(): + if value.length != 0: + return True + else: + return False + elif value.equals(""): + return False + elif isinstance(value, int): + if value == 0: + return True + else: + return False + else: + return True + + def disableControls(self, controls): + self.disableObjects = controls + + def getFromUI(self): + return Helper.getUnoPropertyValue(self.unoModel, self.unoPropName) + + @classmethod + def __attachTextControl(self, data, prop, unoText, listener, unoProperty, field, value): + if field: + aux = DataAwareFields.getFieldValueFor(data, prop, value) + else: + aux = DataAware.PropertyValue (prop, data) + uda = UnoDataAware(data, aux, unoText, unoProperty) + unoText.addTextListener(self.TextListener(uda,listener)) + return uda + + class TextListener(unohelper.Base, XTextListener): + + def __init__(self, uda,listener): + self.uda = uda + self.listener = listener + + def textChanged(te): + self.uda.updateData() + if self.listener: + self.listener.eventPerformed(te) + + def disposing(self,eo): + pass + + @classmethod + def attachEditControl(self, data, prop, unoControl, listener, field): + return self.__attachTextControl(data, prop, unoControl, listener, "Text", field, "") + + @classmethod + def attachDateControl(self, data, prop, unoControl, listener, field): + return self.__attachTextControl(data, prop, unoControl, listener, "Date", field, 0) + + def attachTimeControl(self, data, prop, unoControl, listener, field): + return self.__attachTextControl(data, prop, unoControl, listener, "Time", field, 0) + + def attachNumericControl(self, data, prop, unoControl, listener, field): + return self.__attachTextControl(data, prop, unoControl, listener, "Value", field, float(0)) + + @classmethod + def attachCheckBox(self, data, prop, checkBox, listener, field): + if field: + aux = DataAwareFields.getFieldValueFor(data, prop, uno.Any("short",0)) + else: + aux = DataAware.PropertyValue (prop, data) + uda = UnoDataAware(data, aux , checkBox, PropertyNames.PROPERTY_STATE) + checkBox.addItemListener(self.ItemListener(uda, listener)) + return uda + + class ItemListener(unohelper.Base, XItemListener): + + def __init__(self, da, listener): + self.da = da + self.listener = listener + + def itemStateChanged(self, ie): + self.da.updateData() + if self.listener != None: + self.listener.eventPerformed(ie) + + def disposing(self, eo): + pass + + def attachLabel(self, data, prop, label, listener, field): + if field: + aux = DataAwareFields.getFieldValueFor(data, prop, "") + else: + aux = DataAware.PropertyValue (prop, data) + return UnoDataAware(data, aux, label, PropertyNames.PROPERTY_LABEL) + + @classmethod + def attachListBox(self, data, prop, listBox, listener, field): + if field: + aux = DataAwareFields.getFieldValueFor(data, prop, 0) + else: + aux = DataAware.PropertyValue (prop, data) + uda = UnoDataAware(data, aux, listBox, "SelectedItems") + listBox.addItemListener(self.ItemListener(uda,listener)) + return uda + + def getModel(self, control): + return control.getModel() + + def setEnabled(self, control, enabled): + setEnabled(control, enabled) + + def setEnabled(self, control, enabled): + Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_ENABLED, enabled) -- cgit v1.2.3 From 91b8d397106e496b80c732d3cceaac734e717ab7 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Mon, 6 Jun 2011 23:23:44 +0200 Subject: replace OOo to TDF or %PRODUCTNAME respectively fdo#37998 Signed-off-by: Jan Holesovsky --- .../source/packinfo/packinfo_extensions.txt | 44 ++++----- setup_native/source/packinfo/packinfo_office.txt | 108 ++++++++++----------- .../source/packinfo/packinfo_office_lang.txt | 4 +- 3 files changed, 78 insertions(+), 78 deletions(-) diff --git a/setup_native/source/packinfo/packinfo_extensions.txt b/setup_native/source/packinfo/packinfo_extensions.txt index 7d76ef7f9..d9948ca0c 100644 --- a/setup_native/source/packinfo/packinfo_extensions.txt +++ b/setup_native/source/packinfo/packinfo_extensions.txt @@ -25,7 +25,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "1999-2008 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Presentation Minimizer extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -40,7 +40,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "1999-2008 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Report Builder extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -55,7 +55,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "1999-2008 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "MediaWiki publisher extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -70,7 +70,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "1999-2008 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Presenter Screen extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -85,7 +85,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "1999-2008 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "PDF import extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -101,7 +101,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "2009 by FSF.hu" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Lightproof extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -116,7 +116,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "2009 by FSF.hu" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Numbertext extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -131,7 +131,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "2009 by FSF.hu" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Hungarian Cross-reference Toolbar extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -146,7 +146,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "2010 by FSF.hu" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Typography Toolbar extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -161,7 +161,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "Copyright (c) 2008 Cor Nouws" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "ConvertTextToNumber extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -176,7 +176,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "2009 by Tibor Hornyák" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Watch Window extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -191,7 +191,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "2010 by OxygenOffice Professional" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Diagram extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -206,7 +206,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "2010 by OxygenOffice Professional" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Validator extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -221,7 +221,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "2010 by EuroOffice Extension Creator" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Barcode extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -236,7 +236,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "2009 by Przemyslaw Rumik" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Google Docs extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -251,7 +251,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "2009 by Sun Microsystems, Inc." solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "NLPSolver extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -266,7 +266,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "2005-2009 by Daniel Naber" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "LanguageTool extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -281,7 +281,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "2008 by Sun Mcrosystems, Inc." solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "MySQL Connector extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -296,7 +296,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "2005 by Caolan McNamara" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "oooblogger extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -311,7 +311,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "1999-2008 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Script provider for BeanShell extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -326,7 +326,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "1999-2008 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Script provider for JavaScript extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" @@ -341,7 +341,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "1999-2008 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Script provider for Python extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" diff --git a/setup_native/source/packinfo/packinfo_office.txt b/setup_native/source/packinfo/packinfo_office.txt index 588487ee4..3d0f68ab7 100755 --- a/setup_native/source/packinfo/packinfo_office.txt +++ b/setup_native/source/packinfo/packinfo_office.txt @@ -27,7 +27,7 @@ findrequires = "find-requires-gnome.sh" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" vendor = "The Document Foundation" -description = "Gnome integration module for LibreOffice %OOOBASEVERSION" +description = "Gnome integration module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -42,7 +42,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" vendor = "The Document Foundation" -description = "KDE integration module for LibreOffice %OOOBASEVERSION" +description = "KDE integration module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -58,7 +58,7 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" vendor = "The Document Foundation" -description = "Core module for LibreOffice %OOOBASEVERSION" +description = "Core module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -74,7 +74,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" vendor = "The Document Foundation" -description = "Writer module for LibreOffice %OOOBASEVERSION" +description = "Writer module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -90,7 +90,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" vendor = "The Document Foundation" -description = "Calc module for LibreOffice %OOOBASEVERSION" +description = "Calc module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -106,7 +106,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" vendor = "The Document Foundation" -description = "Draw module for LibreOffice %OOOBASEVERSION" +description = "Draw module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -122,7 +122,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" vendor = "The Document Foundation" -description = "Impress module for LibreOffice %OOOBASEVERSION" +description = "Impress module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -137,8 +137,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSIONg-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Base module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Base module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -153,8 +153,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Math module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Math module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -168,8 +168,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Legacy filters (e.g. StarOffice 5.2) for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Legacy filters (e.g. StarOffice 5.2) for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -183,8 +183,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Graphic filter module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Graphic filter module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -198,8 +198,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Usage tracking module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Usage tracking module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -213,8 +213,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Testtool module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Testtool module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -228,8 +228,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "English spellchecker module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "English spellchecker module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -243,8 +243,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "XSLT filter samples module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "XSLT filter samples module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -258,8 +258,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Java filter module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Java filter module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -273,8 +273,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "ActiveX control for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "ActiveX control for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -288,7 +288,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2010 by Oracle" solariscopyright = "solariscopyrightfile" vendor = "Oracle" -description = "Online update modul for OpenOffice.org %OOOBASEVERSION" +description = "Online update modul for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -302,8 +302,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Pyuno module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Pyuno module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -317,8 +317,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-pyuno" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Email mailmerge module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Email mailmerge module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -332,8 +332,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Headless display module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Headless display module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -347,8 +347,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Images module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Images module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -362,8 +362,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Mailcap module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Mailcap module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -377,8 +377,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Linguistic module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Linguistic module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -393,8 +393,8 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" freebsdrequires = "" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Office core module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Office core module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -408,8 +408,8 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" freebsdrequires = "" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Office core module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Office core module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -424,8 +424,8 @@ findrequires = "find-requires-x11.sh" freebsdrequires = "" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Office core module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Office core module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -439,8 +439,8 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" freebsdrequires = "" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Office core module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Office core module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -454,8 +454,8 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" freebsdrequires = "" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Office core module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Office core module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -469,8 +469,8 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" freebsdrequires = "" copyright = "1999-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "Office core module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "Office core module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End @@ -1077,8 +1077,8 @@ freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-impress" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-impress" copyright = "1999-2007 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" -description = "OpenGL slide transitions module for OpenOffice.org %OOOBASEVERSION" +vendor = "The Document Foundation" +description = "OpenGL slide transitions module for %PRODUCTNAME %OOOBASEVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" End diff --git a/setup_native/source/packinfo/packinfo_office_lang.txt b/setup_native/source/packinfo/packinfo_office_lang.txt index 69d9e1e62..d004d4f9f 100755 --- a/setup_native/source/packinfo/packinfo_office_lang.txt +++ b/setup_native/source/packinfo/packinfo_office_lang.txt @@ -202,7 +202,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "1999-2008 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "SUN Template Pack (%LANGUAGESTRING) %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" @@ -218,7 +218,7 @@ requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBAS linuxpatchrequires = "" copyright = "1999-2008 by OpenOffice.org" solariscopyright = "solariscopyrightfile" -vendor = "OpenOffice.org" +vendor = "The Document Foundation" description = "Lightproof (%LANGUAGESTRING) %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" -- cgit v1.2.3 From 4ff5556551b14d55f21ac3e0146bf6b12d199b61 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Fri, 10 Jun 2011 01:58:54 +0200 Subject: some changes here and there. - Add listboxes - Create the document preview in a diferent frame - Fix some any.uno errors - Add a listener to some buttons --- wizards/com/sun/star/wizards/common/FileAccess.py | 16 +- wizards/com/sun/star/wizards/common/Helper.py | 17 +- .../com/sun/star/wizards/common/SystemDialog.py | 50 +++--- .../sun/star/wizards/document/OfficeDocument.py | 42 +++-- wizards/com/sun/star/wizards/fax/FaxDocument.py | 2 +- .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 19 +-- wizards/com/sun/star/wizards/text/TextDocument.py | 32 ++-- wizards/com/sun/star/wizards/ui/PathSelection.py | 26 +-- wizards/com/sun/star/wizards/ui/UnoDialog.py | 17 +- wizards/com/sun/star/wizards/ui/UnoDialog2.py | 31 ++-- wizards/com/sun/star/wizards/ui/WizardDialog.py | 151 +++++++++-------- .../sun/star/wizards/ui/event/CommonListener.py | 186 +++++++++++++-------- wizards/com/sun/star/wizards/ui/event/DataAware.py | 3 - .../sun/star/wizards/ui/event/DataAwareFields.py | 2 + .../com/sun/star/wizards/ui/event/UnoDataAware.py | 2 +- 15 files changed, 315 insertions(+), 281 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 95f8646b1..641746adf 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -361,7 +361,7 @@ class FileAccess(object): xInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") nameList = xInterface.getFolderContents(FolderName, False) TitleVector = [] - NameVector = [len(nameList)] + NameVector = [] if FilterName == None or FilterName == "": FilterName = None else: @@ -376,6 +376,7 @@ class FileAccess(object): LocLayoutFiles[1] = NameVector LocLayoutFiles[0] = TitleVector + #COMMENTED #JavaTools.bubblesortList(LocLayoutFiles) except Exception, exception: @@ -501,14 +502,13 @@ class FileAccess(object): #get the file identifier converter self.filenameConverter = xmsf.createInstance("com.sun.star.ucb.FileContentProvider") - def getURL(self, parentPath, childPath): - parent = self.filenameConverter.getSystemPathFromFileURL(parentPath) - f = File.File_unknown(parent, childPath) - r = self.filenameConverter.getFileURLFromSystemPath(parentPath, f.getAbsolutePath()) - return r + def getURL(self, path, childPath=None): + if childPath is not None: + path = self.filenameConverter.getSystemPathFromFileURL(path) + f = open(path,childPath) + else: + f = open(path) - def getURL(self, path): - f = File.File_unknown(path) r = self.filenameConverter.getFileURLFromSystemPath(path, f.getAbsolutePath()) return r diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py index 908aa78a1..3514c4ead 100644 --- a/wizards/com/sun/star/wizards/common/Helper.py +++ b/wizards/com/sun/star/wizards/common/Helper.py @@ -4,9 +4,6 @@ import traceback from com.sun.star.uno import Exception as UnoException from com.sun.star.uno import RuntimeException -#TEMPORAL -import inspect - class Helper(object): DAY_IN_MILLIS = (24 * 60 * 60 * 1000) @@ -23,14 +20,13 @@ class Helper(object): def setUnoPropertyValue(self, xPSet, PropertyName, PropertyValue): try: if xPSet.getPropertySetInfo().hasPropertyByName(PropertyName): - #xPSet.setPropertyValue(PropertyName, PropertyValue) uno.invoke(xPSet,"setPropertyValue", (PropertyName,PropertyValue)) else: selementnames = xPSet.getPropertySetInfo().getProperties() raise ValueError("No Such Property: '" + PropertyName + "'"); except UnoException, exception: - print type(PropertyValue) + print PropertyName traceback.print_exc() @classmethod @@ -126,9 +122,6 @@ class Helper(object): i += 1 except Exception, e: - curframe = inspect.currentframe() - calframe = inspect.getouterframes(curframe, 2) - #print "caller name:", calframe[1][3] traceback.print_exc() ''' @@ -166,13 +159,7 @@ class Helper(object): class DateUtils(object): - @classmethod - def DateUtils_XMultiServiceFactory_Object(self, xmsf, document): - tmp = DateUtils() - tmp.DateUtils_body_XMultiServiceFactory_Object(xmsf, document) - return tmp - - def DateUtils_body_XMultiServiceFactory_Object(self, xmsf, docMSF): + def __init__(self, xmsf, docMSF): defaults = docMSF.createInstance("com.sun.star.text.Defaults") l = Helper.getUnoStructValue(defaults, "CharLocale") jl = locale.setlocale(l.Language, l.Country, l.Variant) diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py b/wizards/com/sun/star/wizards/common/SystemDialog.py index b88aadfaf..c81e9ddaa 100644 --- a/wizards/com/sun/star/wizards/common/SystemDialog.py +++ b/wizards/com/sun/star/wizards/common/SystemDialog.py @@ -3,6 +3,7 @@ import traceback from Configuration import Configuration from Resource import Resource from Desktop import Desktop +from Helper import Helper from com.sun.star.ui.dialogs.TemplateDescription import FILESAVE_AUTOEXTENSION, FILEOPEN_SIMPLE from com.sun.star.ui.dialogs.ExtendedFilePickerElementIds import CHECKBOX_AUTOEXTENSION @@ -26,22 +27,26 @@ class SystemDialog(object): self.xMSF = xMSF self.systemDialog = xMSF.createInstance(ServiceName) self.xStringSubstitution = self.createStringSubstitution(xMSF) - listAny = [uno.Any("short",Type)] if self.systemDialog != None: - self.systemDialog.initialize(listAny) + prova = uno.Any("[]short",(Type,)) + #uno.invoke(prova, "initialize", (uno.Any("short",(Type,)),)) except UnoException, exception: traceback.print_exc() + @classmethod def createStoreDialog(self, xmsf): return SystemDialog(xmsf, "com.sun.star.ui.dialogs.FilePicker", FILESAVE_AUTOEXTENSION) + @classmethod def createOpenDialog(self, xmsf): return SystemDialog(xmsf, "com.sun.star.ui.dialogs.FilePicker", FILEOPEN_SIMPLE) + @classmethod def createFolderDialog(self, xmsf): return SystemDialog(xmsf, "com.sun.star.ui.dialogs.FolderPicker", 0) + @classmethod def createOfficeFolderDialog(self, xmsf): return SystemDialog(xmsf, "com.sun.star.ui.dialogs.OfficeFolderPicker", 0) @@ -53,21 +58,6 @@ class SystemDialog(object): traceback.print_exc() return path - ''' - ATTENTION a BUG : TFILESAVE_AUTOEXTENSIONhe extension calculated - here gives the last 3 chars of the filename - what - if the extension is of 4 or more chars? - @param DisplayDirectory - @param DefaultName - @param sDocuType - @return - ''' - - def callStoreDialog(self, DisplayDirectory, DefaultName, sDocuType): - sExtension = DefaultName.substring(DefaultName.length() - 3, DefaultName.length()) - addFilterToDialog(sExtension, sDocuType, True) - return callStoreDialog(DisplayDirectory, DefaultName) - ''' @param displayDir @param defaultName @@ -75,13 +65,16 @@ class SystemDialog(object): @return ''' - def callStoreDialog(self, displayDir, defaultName): + def callStoreDialog(self, displayDir, defaultName, sDocuType=None): + if sDocuType is not None: + self.addFilterToDialog(defaultName[-3:], sDocuType, True) + self.sStorePath = None try: self.systemDialog.setValue(CHECKBOX_AUTOEXTENSION, 0, True) self.systemDialog.setDefaultName(defaultName) - self.systemDialog.setDisplayDirectory(subst(displayDir)) - if execute(self.systemDialog): + self.systemDialog.setDisplayDirectory(self.subst(displayDir)) + if self.execute(self.systemDialog): sPathList = self.systemDialog.getFiles() self.sStorePath = sPathList[0] @@ -99,7 +92,7 @@ class SystemDialog(object): self.systemDialog.setTitle(title) self.systemDialog.setDescription(description) - if execute(self.systemDialog): + if self.execute(self.systemDialog): return self.systemDialog.getDirectory() else: return None @@ -111,7 +104,7 @@ class SystemDialog(object): try: self.systemDialog.setMultiSelectionMode(multiSelect) self.systemDialog.setDisplayDirectory(subst(displayDirectory)) - if execute(self.systemDialog): + if self.execute(self.systemDialog): return self.systemDialog.getFiles() except UnoException, exception: @@ -122,10 +115,10 @@ class SystemDialog(object): def addFilterToDialog(self, sExtension, filterName, setToDefault): try: #get the localized filtername - uiName = getFilterUIName(filterName) + uiName = self.getFilterUIName(filterName) pattern = "*." + sExtension #add the filter - addFilter(uiName, pattern, setToDefault) + self.addFilter(uiName, pattern, setToDefault) except Exception, exception: traceback.print_exc() @@ -147,8 +140,8 @@ class SystemDialog(object): def getFilterUIName(self, filterName): prodName = Configuration.getProductName(self.xMSF) - s = [[getFilterUIName_(filterName)]] - s[0][0] = JavaTools.replaceSubString(s[0][0], prodName, "%productname%") + s = [[self.getFilterUIName_(filterName)]] + s[0][0] = s[0][0].replace("%productname%", prodName) return s[0][0] ''' @@ -162,11 +155,10 @@ class SystemDialog(object): oFactory = self.xMSF.createInstance("com.sun.star.document.FilterFactory") oObject = Helper.getUnoObjectbyName(oFactory, filterName) xPropertyValue = list(oObject) - MaxCount = xPropertyValue.length i = 0 - while i < MaxCount: + while i < len(xPropertyValue): aValue = xPropertyValue[i] - if aValue != None and aValue.Name.equals("UIName"): + if aValue != None and aValue.Name == "UIName": return str(aValue.Value) i += 1 diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py index 5692d90f4..9d3faeb35 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.py +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py @@ -1,6 +1,19 @@ from com.sun.star.awt.WindowClass import TOP import traceback import uno +from common.Desktop import Desktop +from com.sun.star.awt import WindowDescriptor +from com.sun.star.awt import Rectangle + +#Window Constants +com_sun_star_awt_WindowAttribute_BORDER \ + = uno.getConstantByName( "com.sun.star.awt.WindowAttribute.BORDER" ) +com_sun_star_awt_WindowAttribute_SIZEABLE \ + = uno.getConstantByName( "com.sun.star.awt.WindowAttribute.SIZEABLE" ) +com_sun_star_awt_WindowAttribute_MOVEABLE \ + = uno.getConstantByName( "com.sun.star.awt.WindowAttribute.MOVEABLE" ) +com_sun_star_awt_VclWindowPeerAttribute_CLIPCHILDREN \ + = uno.getConstantByName( "com.sun.star.awt.VclWindowPeerAttribute.CLIPCHILDREN" ) class OfficeDocument(object): '''Creates a new instance of OfficeDocument ''' @@ -70,13 +83,11 @@ class OfficeDocument(object): return xComponent - def createNewFrame(self, xMSF, listener): - return createNewFrame(xMSF, listener, "_blank") - - def createNewFrame(self, xMSF, listener, FrameName): + @classmethod + def createNewFrame(self, xMSF, listener, FrameName="_blank"): xFrame = None - if FrameName.equalsIgnoreCase("WIZARD_LIVE_PREVIEW"): - xFrame = createNewPreviewFrame(xMSF, listener) + if FrameName.lower() == "WIZARD_LIVE_PREVIEW".lower(): + xFrame = self.createNewPreviewFrame(xMSF, listener) else: xF = Desktop.getDesktop(xMSF) xFrame = xF.findFrame(FrameName, 0) @@ -87,6 +98,7 @@ class OfficeDocument(object): return xFrame + @classmethod def createNewPreviewFrame(self, xMSF, listener): xToolkit = None try: @@ -96,13 +108,21 @@ class OfficeDocument(object): traceback.print_exc() #describe the window and its properties - aDescriptor = WindowDescriptor.WindowDescriptor() + aDescriptor = WindowDescriptor() aDescriptor.Type = TOP aDescriptor.WindowServiceName = "window" aDescriptor.ParentIndex = -1 aDescriptor.Parent = None - aDescriptor.Bounds = Rectangle.Rectangle_unknown(10, 10, 640, 480) - aDescriptor.WindowAttributes = WindowAttribute.BORDER | WindowAttribute.MOVEABLE | WindowAttribute.SIZEABLE | VclWindowPeerAttribute.CLIPCHILDREN + aDescriptor.Bounds = Rectangle(10, 10, 640, 480) + + #Set Window Attributes + gnDefaultWindowAttributes = \ + com_sun_star_awt_WindowAttribute_BORDER + \ + com_sun_star_awt_WindowAttribute_MOVEABLE + \ + com_sun_star_awt_WindowAttribute_SIZEABLE + \ + com_sun_star_awt_VclWindowPeerAttribute_CLIPCHILDREN + + aDescriptor.WindowAttributes = gnDefaultWindowAttributes #create a new blank container window xPeer = None try: @@ -127,7 +147,9 @@ class OfficeDocument(object): #and not part of the desktop tree. #You are alone with him .-) if listener != None: - Desktop.getDesktop(xMSF).addTerminateListener(listener) + pass + #COMMENTED + #Desktop.getDesktop(xMSF).addTerminateListener(listener) return xFrame diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py index 25db248c8..691c5effd 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.py +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -14,7 +14,7 @@ from com.sun.star.style.NumberingType import ARABIC class FaxDocument(TextDocument): def __init__(self, xMSF, listener): - super(FaxDocument,self).__init__(xMSF, listener, "WIZARD_LIVE_PREVIEW") + super(FaxDocument,self).__init__(xMSF, listener, None, "WIZARD_LIVE_PREVIEW") self.keepLogoFrame = True self.keepTypeFrame = True diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index b1500b022..62fae01fd 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -49,9 +49,6 @@ class FaxWizardDialogImpl(FaxWizardDialog): ConnectStr = "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" xLocMSF = Desktop.connect(ConnectStr) lw = FaxWizardDialogImpl(xLocMSF) - print - print "lw.startWizard" - print lw.startWizard(xLocMSF, None) except RuntimeException, e: # TODO Auto-generated catch block @@ -128,18 +125,19 @@ class FaxWizardDialogImpl(FaxWizardDialog): return def cancelWizard(self): - xDialog.endExecute() + self.xUnoDialog.endExecute() self.running = False def finishWizard(self): - switchToStep(getCurrentStep(), getMaxStep()) + self.switchToStep(self.getCurrentStep(), self.getMaxStep()) self.myFaxDoc.setWizardTemplateDocInfo(self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) try: - fileAccess = FileAccess(xMSF) + fileAccess = FileAccess(self.xMSF) self.sPath = self.myPathSelection.getSelectedPath() - if self.sPath.equals(""): + if self.sPath == "": self.myPathSelection.triggerPathPicker() self.sPath = self.myPathSelection.getSelectedPath() + print self.sPath self.sPath = fileAccess.getURL(self.sPath) #first, if the filename was not changed, thus @@ -189,7 +187,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): except UnoException, e: traceback.print_exc() finally: - xDialog.endExecute() + self.xUnoDialog.endExecute() self.running = False return True @@ -246,9 +244,8 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.sWorkPath = FileAccess.getOfficePath2(xMSF, "Work", "", "") self.BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", self.sFaxPath) self.PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", self.sFaxPath) - - self.setControlProperty("lstBusinessStyle", "StringItemList", self.BusinessFiles[0]) - self.setControlProperty("lstPrivateStyle", "StringItemList", self.PrivateFiles[0]) + self.setControlProperty("lstBusinessStyle", "StringItemList", tuple(self.BusinessFiles[0])) + self.setControlProperty("lstPrivateStyle", "StringItemList", tuple(self.PrivateFiles[0])) self.setControlProperty("lstBusinessStyle", "SelectedItems", [0]) self.setControlProperty("lstPrivateStyle", "SelectedItems" , [0]) return True diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index 1da169d49..93351c6c0 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -7,6 +7,11 @@ from document.OfficeDocument import OfficeDocument import traceback from text.ViewHandler import ViewHandler from text.TextFieldHandler import TextFieldHandler +from com.sun.star.container import NoSuchElementException +from com.sun.star.lang import WrappedTargetException +from common.Configuration import Configuration +import time +from com.sun.star.util import DateTime class TextDocument(object): @@ -17,19 +22,19 @@ class TextDocument(object): self.xMSF = xMSF self.xTextDocument = None - if listener: - if FrameName: + if listener is not None: + if FrameName is not None: '''creates an instance of TextDocument and creates a named frame. No document is actually loaded into this frame.''' self.xFrame = OfficeDocument.createNewFrame(xMSF, listener, FrameName); return - elif _sPreviewURL: + elif _sPreviewURL is not None: '''creates an instance of TextDocument by loading a given URL as preview''' self.xFrame = OfficeDocument.createNewFrame(xMSF, listener) self.xTextDocument = self.loadAsPreview(_sPreviewURL, True) - elif xArgs: + elif xArgs is not None: '''creates an instance of TextDocument and creates a frame and loads a document''' self.xDesktop = Desktop.getDesktop(xMSF); self.xFrame = OfficeDocument.createNewFrame(xMSF, listener); @@ -45,7 +50,7 @@ class TextDocument(object): self.xFrame = self.xDesktop.getActiveFrame() self.xTextDocument = self.xFrame.getController().getModel() - elif _moduleIdentifier: + elif _moduleIdentifier is not None: try: '''create the empty document, and set its module identifier''' self.xTextDocument = xMSF.createInstance("com.sun.star.text.TextDocument") @@ -64,7 +69,7 @@ class TextDocument(object): except Exception, e: traceback.print_exc() - elif _textDocument: + elif _textDocument is not None: '''creates an instance of TextDocument from a given XTextDocument''' self.xFrame = _textDocument.getCurrentController().getFrame() self.xTextDocument = _textDocument @@ -180,15 +185,12 @@ class TextDocument(object): gn = xNA.getByName("givenname") sn = xNA.getByName("sn") fullname = str(gn) + " " + str(sn) - cal = GregorianCalendar.GregorianCalendar() - year = cal.get(Calendar.YEAR) - month = cal.get(Calendar.MONTH) - day = cal.get(Calendar.DAY_OF_MONTH) - currentDate = DateTime.DateTime() - currentDate.Day = day - currentDate.Month = month - currentDate.Year = year - du = DateUtils(self.xMSF, self.xTextDocument) + currentDate = DateTime() + now = time.localtime(time.time()) + currentDate.Day = time.strftime("%d", now) + currentDate.Year = time.strftime("%Y", now) + currentDate.Month = time.strftime("%m", now) + du = Helper.DateUtils(self.xMSF, self.xTextDocument) ff = du.getFormat(NumberFormatIndex.DATE_SYS_DDMMYY) myDate = du.format(ff, currentDate) xDocProps2 = self.xTextDocument.getDocumentProperties() diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py index a1bdc9511..6c897d20e 100644 --- a/wizards/com/sun/star/wizards/ui/PathSelection.py +++ b/wizards/com/sun/star/wizards/ui/PathSelection.py @@ -3,6 +3,7 @@ import uno from common.PropertyNames import * from common.FileAccess import * from com.sun.star.uno import Exception as UnoException +from common.SystemDialog import SystemDialog class PathSelection(object): @@ -27,11 +28,11 @@ class PathSelection(object): self.TXTSAVEPATH = 1 def insert(self, DialogStep, XPos, YPos, Width, CurTabIndex, LabelText, Enabled, TxtHelpURL, BtnHelpURL): - self.CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblSaveAs", [PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH], [Enabled, 8, LabelText, XPos, YPos, DialogStep, uno.Any("short",CurTabIndex), Width]) - self.xSaveTextBox = self.CurUnoDialog.insertTextField("txtSavePath", "callXPathSelectionListener", [PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH], [Enabled, 12, TxtHelpURL, XPos, YPos + 10, DialogStep, uno.Any("short",(CurTabIndex + 1)), Width - 26], self) + self.CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblSaveAs", (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 8, LabelText, XPos, YPos, DialogStep, uno.Any("short",CurTabIndex), Width)) + self.xSaveTextBox = self.CurUnoDialog.insertTextField("txtSavePath", "callXPathSelectionListener", (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 12, TxtHelpURL, XPos, YPos + 10, DialogStep, uno.Any("short",(CurTabIndex + 1)), Width - 26), self) self.CurUnoDialog.setControlProperty("txtSavePath", PropertyNames.PROPERTY_ENABLED, False ) - self.CurUnoDialog.insertButton("cmdSelectPath", "triggerPathPicker", [PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH], [Enabled, 14, BtnHelpURL, "...",XPos + Width - 16, YPos + 9, DialogStep, uno.Any("short",(CurTabIndex + 2)), 16], self) + self.CurUnoDialog.insertButton("cmdSelectPath", "triggerPathPicker", (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 14, BtnHelpURL, "...",XPos + Width - 16, YPos + 9, DialogStep, uno.Any("short",(CurTabIndex + 2)), 16), self) def addSelectionListener(self, xAction): self.xAction = xAction @@ -48,20 +49,21 @@ class PathSelection(object): def triggerPathPicker(self): try: - if iTransferMode == TransferMode.SAVE: - if iDialogType == DialogTypes.FOLDER: + if self.iTransferMode == self.TransferMode.SAVE: + if self.iDialogType == self.DialogTypes.FOLDER: #TODO: write code for picking a folder for saving return - elif iDialogType == DialogTypes.FILE: - usedPathPicker = True - myFilePickerDialog = SystemDialog.createStoreDialog(xMSF) - myFilePickerDialog.callStoreDialog(sDefaultDirectory, sDefaultName, sDefaultFilter); + elif self.iDialogType == self.DialogTypes.FILE: + self.usedPathPicker = True + myFilePickerDialog = SystemDialog.createStoreDialog(self.xMSF) + myFilePickerDialog.callStoreDialog(self.sDefaultDirectory, self.sDefaultName, self.sDefaultFilter); sStorePath = myFilePickerDialog.sStorePath; - if sStorePath: + if sStorePath is not None: + print "hello" myFA = FileAccess(xMSF); xSaveTextBox.setText(myFA.getPath(sStorePath, None)); - sDefaultDirectory = FileAccess.getParentDir(sStorePath); - sDefaultName = myFA.getFilename(sStorePath); + self.sDefaultDirectory = FileAccess.getParentDir(sStorePath); + self.sDefaultName = myFA.getFilename(sStorePath); return elif iTransferMode == TransferMode.LOAD: if iDialogType == DialogTypes.FOLDER: diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index 87a1a5d24..cfc1c0437 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -4,7 +4,6 @@ from common.PropertyNames import PropertyNames from com.sun.star.awt import Rectangle from common.Helper import Helper from PeerConfig import PeerConfig -from common.Listener import * from com.sun.star.awt import Rectangle from com.sun.star.awt.PosSize import POS @@ -52,14 +51,14 @@ class UnoDialog(object): if isinstance(PropertyValue,bool): xPSet.setPropertyValue(PropertyName, PropertyValue) else: - if isinstance(PropertyValue,list): - methodname = "[]short" - PropertyValue = tuple(PropertyValue) - elif isinstance(PropertyValue,tuple): - methodname = "[]string" - else: - PropertyValue = (PropertyValue,) - methodname = "[]string" + methodname = "[]string" + if not isinstance(PropertyValue,tuple): + if isinstance(PropertyValue,list): + methodname = "[]short" + PropertyValue = tuple(PropertyValue) + else: + PropertyValue = (PropertyValue,) + uno.invoke(xPSet, "setPropertyValue", (PropertyName, uno.Any( \ methodname, PropertyValue))) diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py index 8c2d805a3..1bf696c21 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py @@ -21,13 +21,11 @@ class UnoDialog2(UnoDialog): def __init__(self, xmsf): super(UnoDialog2,self).__init__(xmsf,(), ()) - self.guiEventListener = CommonListener() def insertButton(self, sName, actionPerformed, sPropNames, oPropValues, eventTarget=None): xButton = self.insertControlModel2("com.sun.star.awt.UnoControlButtonModel", sName, sPropNames, oPropValues) - if actionPerformed != None: - xButton.addActionListener(ActionListenerProcAdapter(self.guiEventListener)) - self.guiEventListener.add(sName, EVENT_ACTION_PERFORMED, actionPerformed, eventTarget) + if actionPerformed is not None: + xButton.addActionListener(ActionListenerProcAdapter(actionPerformed)) return xButton @@ -43,8 +41,7 @@ class UnoDialog2(UnoDialog): if itemChanged != None: if eventTarget is None: eventTarget = self - xCheckBox.addItemListener(ItemListenerProcAdapter(self.guiEventListener)) - self.guiEventListener.add(sName, EVENT_ITEM_CHANGED, itemChanged, eventTarget) + xCheckBox.addItemListener(ItemListenerProcAdapter(None)) return xCheckBox @@ -53,16 +50,13 @@ class UnoDialog2(UnoDialog): if eventTarget is None: eventTarget = self if actionPerformed != None: - xComboBox.addActionListener(self.guiEventListener) - self.guiEventListener.add(sName, EVENT_ACTION_PERFORMED, actionPerformed, eventTarget) + xComboBox.addActionListener(None) if itemChanged != None: - xComboBox.addItemListener(ItemListenerProcAdapter(self.guiEventListener)) - self.guiEventListener.add(sName, EVENT_ITEM_CHANGED, itemChanged, eventTarget) + xComboBox.addItemListener(ItemListenerProcAdapter(None)) if textChanged != None: - xComboBox.addTextListener(TextListenerProcAdapter(self.guiEventListener)) - self.guiEventListener.add(sName, EVENT_TEXT_CHANGED, textChanged, eventTarget) + xComboBox.addTextListener(TextListenerProcAdapter(None)) return xComboBox @@ -74,12 +68,10 @@ class UnoDialog2(UnoDialog): eventTarget = self if actionPerformed != None: - xListBox.addActionListener(self.guiEventListener) - self.guiEventListener.add(sName, EVENT_ACTION_PERFORMED, actionPerformed, eventTarget) + xListBox.addActionListener(None) if itemChanged != None: - xListBox.addItemListener(ItemListenerProcAdapter(self.guiEventListener)) - self.guiEventListener.add(sName, EVENT_ITEM_CHANGED, itemChanged, eventTarget) + xListBox.addItemListener(ItemListenerProcAdapter(None)) return xListBox @@ -89,8 +81,8 @@ class UnoDialog2(UnoDialog): if itemChanged != None: if eventTarget is None: eventTarget = self - xRadioButton.addItemListener(ItemListenerProcAdapter(self.guiEventListener)) - self.guiEventListener.add(sName, EVENT_ITEM_CHANGED, itemChanged, eventTarget) + xRadioButton.addItemListener(ItemListenerProcAdapter(None)) + return xRadioButton @@ -120,8 +112,7 @@ class UnoDialog2(UnoDialog): if sTextChanged != None: if eventTarget is None: eventTarget = self - xField.addTextListener(TextListenerProcAdapter(self.guiEventListener)) - self.guiEventListener.add(sName, EVENT_TEXT_CHANGED, sTextChanged, eventTarget) + xField.addTextListener(TextListenerProcAdapter(None)) return xField diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index 6dbdf53ce..e22f2d662 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -13,11 +13,7 @@ from event.EventNames import EVENT_ITEM_CHANGED class WizardDialog(UnoDialog2): __metaclass__ = ABCMeta - __NEXT_ACTION_PERFORMED = "gotoNextAvailableStep" - __BACK_ACTION_PERFORMED = "gotoPreviousAvailableStep" - __FINISH_ACTION_PERFORMED = "finishWizard_1" - __CANCEL_ACTION_PERFORMED = "cancelWizard_1" - __HELP_ACTION_PERFORMED = "callHelp" + ''' Creates a new instance of WizardDialog the hid is used as following : @@ -41,6 +37,7 @@ class WizardDialog(UnoDialog2): self.__bTerminateListenermustberemoved = True self.__oWizardResource = Resource(xMSF, "dbw") self.sMsgEndAutopilot = self.__oWizardResource.getResText(UIConsts.RID_DB_COMMON + 33) + self.oRoadmap = None #self.vetos = VetoableChangeSupport.VetoableChangeSupport_unknown(this) def getResource(self): @@ -121,13 +118,12 @@ class WizardDialog(UnoDialog2): # the roadmap control has got no real TabIndex ever # that is not correct, but changing this would need time, so it is used # without TabIndex as before - self.oRoadmap = self.insertControlModel("com.sun.star.awt.UnoControlRoadmapModel", "rdmNavi", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tabstop", PropertyNames.PROPERTY_WIDTH),((iDialogHeight - 26), 0, 0, 0, 0, True, uno.Any("short",85))) + self.oRoadmap = self.insertControlModel("com.sun.star.awt.UnoControlRoadmapModel", "rdmNavi", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tabstop", PropertyNames.PROPERTY_WIDTH),((iDialogHeight - 26), 0, 0, 0, uno.Any("short",0), True, uno.Any("short",85))) self.oRoadmap.setPropertyValue(PropertyNames.PROPERTY_NAME, "rdmNavi") mi = MethodInvocation("itemStateChanged", self) - self.guiEventListener.add("rdmNavi", EVENT_ITEM_CHANGED, mi) self.xRoadmapControl = self.xUnoDialog.getControl("rdmNavi") - self.xRoadmapControl.addItemListener(ItemListenerProcAdapter(self.guiEventListener)) + self.xRoadmapControl.addItemListener(ItemListenerProcAdapter(None)) Helper.setUnoPropertyValue(self.oRoadmap, "Text", self.__oWizardResource.getResText(UIConsts.RID_COMMON + 16)) except NoSuchMethodException, ex: @@ -176,21 +172,21 @@ class WizardDialog(UnoDialog2): return None def switchToStep(self,_nOldStep=None, _nNewStep=None): - if _nOldStep and _nNewStep: + if _nOldStep is not None and _nNewStep is not None: self.__nOldStep = _nOldStep self.__nNewStep = _nNewStep - leaveStep(self.__nOldStep, self.__nNewStep) + self.leaveStep(self.__nOldStep, self.__nNewStep) if self.__nNewStep != self.__nOldStep: if self.__nNewStep == self.__nMaxStep: - setControlProperty("btnWizardNext", "DefaultButton", False) - setControlProperty("btnWizardFinish", "DefaultButton", True) + self.setControlProperty("btnWizardNext", "DefaultButton", False) + self.setControlProperty("btnWizardFinish", "DefaultButton", True) else: - setControlProperty("btnWizardNext", "DefaultButton", True) - setControlProperty("btnWizardFinish", "DefaultButton", False) + self.setControlProperty("btnWizardNext", "DefaultButton", True) + self.setControlProperty("btnWizardFinish", "DefaultButton", False) - changeToStep(self.__nNewStep) - enterStep(self.__nOldStep, self.__nNewStep) + self.changeToStep(self.__nNewStep) + self.enterStep(self.__nOldStep, self.__nNewStep) return True return False @@ -205,15 +201,13 @@ class WizardDialog(UnoDialog2): def changeToStep(self, nNewStep): Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP, nNewStep) - setCurrentRoadmapItemID((short)(nNewStep)) - enableNextButton(getNextAvailableStep() > 0) - enableBackButton(nNewStep != 1) - + self.setCurrentRoadmapItemID(nNewStep) + self.enableNextButton(self.getNextAvailableStep() > 0) + self.enableBackButton(nNewStep != 1) def iscompleted(self, _ndialogpage): return False - def ismodified(self, _ndialogpage): return False @@ -235,19 +229,18 @@ class WizardDialog(UnoDialog2): self.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnRoadSep",(PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH),(iBtnPosY - 6, 1, 85, 0, iCurStep, 1)) propNames = (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH) Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_HELPURL, HelpIds.getHelpIdString(self.__hid)) - self.insertButton("btnWizardHelp", WizardDialog.__HELP_ACTION_PERFORMED,(PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH),(True, iButtonHeight, self.__oWizardResource.getResText(UIConsts.RID_COMMON + 15), iHelpPosX, iBtnPosY, uno.Any("short",HELP), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) - self.insertButton("btnWizardBack", WizardDialog.__BACK_ACTION_PERFORMED, propNames,(False, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 2), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 13), iBackPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) - self.insertButton("btnWizardNext", WizardDialog.__NEXT_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 3), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 14), iNextPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) - self.insertButton("btnWizardFinish", WizardDialog.__FINISH_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 4), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 12), iFinishPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) - self.insertButton("btnWizardCancel", WizardDialog.__CANCEL_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 5), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 11), iCancelPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + self.insertButton("btnWizardHelp", "",(PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH),(True, iButtonHeight, self.__oWizardResource.getResText(UIConsts.RID_COMMON + 15), iHelpPosX, iBtnPosY, uno.Any("short",HELP), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + self.insertButton("btnWizardBack", self.gotoPreviousAvailableStep, propNames,(False, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 2), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 13), iBackPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + self.insertButton("btnWizardNext", self.gotoNextAvailableStep, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 3), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 14), iNextPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + self.insertButton("btnWizardFinish", self.finishWizard_1, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 4), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 12), iFinishPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + self.insertButton("btnWizardCancel", self.cancelWizard_1, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 5), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 11), iCancelPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) self.setControlProperty("btnWizardNext", "DefaultButton", True) # add a window listener, to know # if the user used "escape" key to # close the dialog. windowHidden = MethodInvocation("windowHidden", self) - self.xUnoDialog.addWindowListener(WindowListenerProcAdapter(self.guiEventListener)) + self.xUnoDialog.addWindowListener(WindowListenerProcAdapter(None)) dialogName = Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_NAME) - self.guiEventListener.add(dialogName, EVENT_ACTION_PERFORMED, windowHidden) except Exception, exception: traceback.print_exc() @@ -259,22 +252,22 @@ class WizardDialog(UnoDialog2): def setStepEnabled(self, _nStep, bEnabled, enableNextButton): setStepEnabled(_nStep, bEnabled) - if getNextAvailableStep() > 0: - enableNextButton(bEnabled) + if self.getNextAvailableStep() > 0: + self.enableNextButton(bEnabled) def enableNavigationButtons(self, _bEnableBack, _bEnableNext, _bEnableFinish): - enableBackButton(_bEnableBack) - enableNextButton(_bEnableNext) - enableFinishButton(_bEnableFinish) + self.enableBackButton(_bEnableBack) + self.enableNextButton(_bEnableNext) + self.enableFinishButton(_bEnableFinish) def enableBackButton(self, enabled): - setControlProperty("btnWizardBack", PropertyNames.PROPERTY_ENABLED, enabled) + self.setControlProperty("btnWizardBack", PropertyNames.PROPERTY_ENABLED, enabled) def enableNextButton(self, enabled): - setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, enabled) + self.setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, enabled) def enableFinishButton(self, enabled): - setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, enabled) + self.setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, enabled) def setStepEnabled(self, _nStep, bEnabled): xRoadmapItem = getRoadmapItemByID(_nStep) @@ -295,75 +288,81 @@ class WizardDialog(UnoDialog2): def isStepEnabled(self, _nStep): try: - xRoadmapItem = getRoadmapItemByID(_nStep) + xRoadmapItem = self.getRoadmapItemByID(_nStep) # Todo: In this case an exception should be thrown if (xRoadmapItem == None): return False - bIsEnabled = bool(Helper.getUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED)) return bIsEnabled except UnoException, exception: traceback.print_exc() return False - def gotoPreviousAvailableStep(self): - if self.__nNewStep > 1: - self.__nOldStep = self.__nNewStep - self.__nNewStep -= 1 - while self.__nNewStep > 0: - bIsEnabled = isStepEnabled(self.__nNewStep) - if bIsEnabled: - break; - + def gotoPreviousAvailableStep(self, oActionEvent): + try: + if self.__nNewStep > 1: + self.__nOldStep = self.__nNewStep self.__nNewStep -= 1 - # Exception??? - if (self.__nNewStep == 0): - self.__nNewStep = self.__nOldStep - switchToStep() + while self.__nNewStep > 0: + bIsEnabled = self.isStepEnabled(self.__nNewStep) + if bIsEnabled: + break; + + self.__nNewStep -= 1 + if (self.__nNewStep == 0): + self.__nNewStep = self.__nOldStep + self.switchToStep() + except Exception, e: + traceback.print_exc() #TODO discuss with rp def getNextAvailableStep(self): - if isRoadmapComplete(): + if self.isRoadmapComplete(): i = self.__nNewStep + 1 while i <= self.__nMaxStep: - if isStepEnabled(i): + if self.isStepEnabled(i): return i i += 1 return -1 - def gotoNextAvailableStep(self): - self.__nOldStep = self.__nNewStep - self.__nNewStep = getNextAvailableStep() - if self.__nNewStep > -1: - switchToStep() + def gotoNextAvailableStep(self, oActionEvent): + try: + self.__nOldStep = self.__nNewStep + self.__nNewStep = self.getNextAvailableStep() + if self.__nNewStep > -1: + self.switchToStep() + except Exception, e: + traceback.print_exc() @abstractmethod def finishWizard(self): pass - #This function will call if the finish button is pressed on the UI. - - def finishWizard_1(self): - enableFinishButton(False) - success = False + def finishWizard_1(self, oActionEvent): + '''This function will call if the finish button is pressed on the UI''' try: - success = finishWizard() - finally: - if not success: - enableFinishButton(True) - - if success: - removeTerminateListener() + self.enableFinishButton(False) + success = False + try: + success = self.finishWizard() + finally: + if not success: + self.enableFinishButton(True) + + if success: + removeTerminateListener() + except Exception, e: + traceback.print_exc() def getMaximalStep(self): return self.__nMaxStep def getCurrentStep(self): try: - return int(Helper.getUnoPropertyValue(self.MSFDialogModel, PropertyNames.PROPERTY_STEP)) + return int(Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP)) except UnoException, exception: traceback.print_exc() return -1 @@ -404,9 +403,13 @@ class WizardDialog(UnoDialog2): perform a cancel. ''' - def cancelWizard_1(self): - cancelWizard() - removeTerminateListener() + def cancelWizard_1(self, oActionEvent): + try: + self.cancelWizard() + self.removeTerminateListener() + except Exception,e: + traceback.print_exc() + def windowHidden(self): cancelWizard_1() diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py index 570be2557..1ab91eb51 100644 --- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py +++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py @@ -1,73 +1,113 @@ -''' -import com.sun.star.awt.*; - -import com.sun.star.lang.EventObject; -''' -from AbstractListener import AbstractListener -from EventNames import * - -class CommonListener(AbstractListener): - - def __init__(self): - pass - - '''Implementation of com.sun.star.awt.XActionListener''' - def actionPerformed(self, actionEvent): - self.invoke(self.getEventSourceName(actionEvent), EVENT_ACTION_PERFORMED, actionEvent) - - '''Implementation of com.sun.star.awt.XItemListener''' - def itemStateChanged(self, itemEvent): - self.invoke(self.getEventSourceName(itemEvent), EVENT_ITEM_CHANGED, itemEvent) - - '''Implementation of com.sun.star.awt.XTextListener''' - def textChanged(self, textEvent): - self.invoke(self.getEventSourceName(textEvent), EVENT_TEXT_CHANGED, textEvent) - - '''@see com.sun.star.awt.XWindowListener#windowResized(com.sun.star.awt.WindowEvent)''' - def windowResized(self, event): - self.invoke(self.getEventSourceName(event), EVENT_WINDOW_RESIZED, event) - - '''@see com.sun.star.awt.XWindowListener#windowMoved(com.sun.star.awt.WindowEvent)''' - def windowMoved(self, event): - self.invoke(self.getEventSourceName(event), EVENT_WINDOW_MOVED, event) - - '''@see com.sun.star.awt.XWindowListener#windowShown(com.sun.star.lang.EventObject)''' - def windowShown(self, event): - self.invoke(self.getEventSourceName(event), EVENT_WINDOW_SHOWN, event) - - '''@see com.sun.star.awt.XWindowListener#windowHidden(com.sun.star.lang.EventObject)''' - def windowHidden(self, event): - self.invoke(self.getEventSourceName(event), EVENT_WINDOW_HIDDEN, event) - - '''@see com.sun.star.awt.XMouseListener#mousePressed(com.sun.star.awt.MouseEvent)''' - def mousePressed(self, event): - self.invoke(self.getEventSourceName(event), EVENT_MOUSE_PRESSED, event) - - '''@see com.sun.star.awt.XMouseListener#mouseReleased(com.sun.star.awt.MouseEvent)''' - def mouseReleased(self, event): - self.invoke(self.getEventSourceName(event), EVENT_KEY_RELEASED, event) - - '''@see com.sun.star.awt.XMouseListener#mouseEntered(com.sun.star.awt.MouseEvent)''' - def mouseEntered(self, event): - self.invoke(self.getEventSourceName(event), EVENT_MOUSE_ENTERED, event) - - '''@see com.sun.star.awt.XMouseListener#mouseExited(com.sun.star.awt.MouseEvent)''' - def mouseExited(self, event): - self.invoke(self.getEventSourceName(event), EVENT_MOUSE_EXITED, event) - - '''@see com.sun.star.awt.XFocusListener#focusGained(com.sun.star.awt.FocusEvent)''' - def focusGained(self, event): - self.invoke(self.getEventSourceName(event), EVENT_FOCUS_GAINED, event) - - '''@see com.sun.star.awt.XFocusListener#focusLost(com.sun.star.awt.FocusEvent)''' - def focusLost(self, event): - self.invoke(self.getEventSourceName(event), EVENT_FOCUS_LOST, event) - - '''@see com.sun.star.awt.XKeyListener#keyPressed(com.sun.star.awt.KeyEvent)''' - def keyPressed(self, event): - self.invoke(c(event), EVENT_KEY_PRESSED, event) - - '''@see com.sun.star.awt.XKeyListener#keyReleased(com.sun.star.awt.KeyEvent)''' - def keyReleased(self, event): - self.invoke(self.getEventSourceName(event), EVENT_KEY_RELEASED, event) - +#********************************************************************** +# +# Danny.OOo.Listeners.ListenerProcAdapters.py +# +# A module to easily work with OpenOffice.org. +# +#********************************************************************** +# Copyright (c) 2003-2004 Danny Brewer +# d29583@groovegarden.com +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# 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 +# +# See: http://www.gnu.org/licenses/lgpl.html +# +#********************************************************************** +# If you make changes, please append to the change log below. +# +# Change Log +# Danny Brewer Revised 2004-06-05-01 +# +#********************************************************************** + +# OOo's libraries +import uno +import unohelper +import inspect + +#-------------------------------------------------- +# An ActionListener adapter. +# This object implements com.sun.star.awt.XActionListener. +# When actionPerformed is called, this will call an arbitrary +# python procedure, passing it... +# 1. the oActionEvent +# 2. any other parameters you specified to this object's constructor (as a tuple). +from com.sun.star.awt import XActionListener +class ActionListenerProcAdapter( unohelper.Base, XActionListener ): + def __init__( self, oProcToCall, tParams=() ): + self.oProcToCall = oProcToCall # a python procedure + self.tParams = tParams # a tuple + + + # oActionEvent is a com.sun.star.awt.ActionEvent struct. + def actionPerformed( self, oActionEvent ): + if callable( self.oProcToCall ): + apply( self.oProcToCall, (oActionEvent,) + self.tParams ) + + +#-------------------------------------------------- +# An ItemListener adapter. +# This object implements com.sun.star.awt.XItemListener. +# When itemStateChanged is called, this will call an arbitrary +# python procedure, passing it... +# 1. the oItemEvent +# 2. any other parameters you specified to this object's constructor (as a tuple). +from com.sun.star.awt import XItemListener +class ItemListenerProcAdapter( unohelper.Base, XItemListener ): + def __init__( self, oProcToCall, tParams=() ): + self.oProcToCall = oProcToCall # a python procedure + self.tParams = tParams # a tuple + + # oItemEvent is a com.sun.star.awt.ItemEvent struct. + def itemStateChanged( self, oItemEvent ): + if callable( self.oProcToCall ): + apply( self.oProcToCall, (oActionEvent,) + self.tParams ) + + +#-------------------------------------------------- +# An TextListener adapter. +# This object implements com.sun.star.awt.XTextistener. +# When textChanged is called, this will call an arbitrary +# python procedure, passing it... +# 1. the oTextEvent +# 2. any other parameters you specified to this object's constructor (as a tuple). +from com.sun.star.awt import XTextListener +class TextListenerProcAdapter( unohelper.Base, XTextListener ): + def __init__( self, oProcToCall, tParams=() ): + self.oProcToCall = oProcToCall # a python procedure + self.tParams = tParams # a tuple + + # oTextEvent is a com.sun.star.awt.TextEvent struct. + def textChanged( self, oTextEvent ): + if callable( self.oProcToCall ): + apply( self.oProcToCall, (oTextEvent,) + self.tParams ) + +#-------------------------------------------------- +# An Window adapter. +# This object implements com.sun.star.awt.XWindowListener. +# When textChanged is called, this will call an arbitrary +# python procedure, passing it... +# 1. the oTextEvent +# 2. any other parameters you specified to this object's constructor (as a tuple). +from com.sun.star.awt import XWindowListener +class WindowListenerProcAdapter( unohelper.Base, XWindowListener ): + def __init__( self, oProcToCall, tParams=() ): + self.oProcToCall = oProcToCall # a python procedure + self.tParams = tParams # a tuple + + # oTextEvent is a com.sun.star.awt.TextEvent struct. + def windowResized(self, actionEvent): + if callable( self.oProcToCall ): + apply( self.oProcToCall, (actionEvent,) + self.tParams ) diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py b/wizards/com/sun/star/wizards/ui/event/DataAware.py index dfd62438b..36f421eca 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.py @@ -2,9 +2,6 @@ from common.PropertyNames import * from abc import ABCMeta, abstractmethod import traceback -#TEMPORAL -import inspect - ''' @author rpiterman DataAware objects are used to live-synchronize UI and DataModel/DataObject. diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py index efa017f55..b23cce2ee 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py +++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py @@ -106,6 +106,8 @@ class DataAwareFields(object): return int(i) elif isinstance(self.convertTo,str): return str(i) + elif self.convertTo.type == uno.Any("short",0).type: + return uno.Any("[]short",(i,)) else: raise AttributeError("Cannot convert int value to given type (" + str(type(self.convertTo)) + ")."); diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py index 65d22bf61..5654eb7d5 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py @@ -167,7 +167,7 @@ class UnoDataAware(DataAware): @classmethod def attachListBox(self, data, prop, listBox, listener, field): if field: - aux = DataAwareFields.getFieldValueFor(data, prop, 0) + aux = DataAwareFields.getFieldValueFor(data, prop, uno.Any("short",0)) else: aux = DataAware.PropertyValue (prop, data) uda = UnoDataAware(data, aux, listBox, "SelectedItems") -- cgit v1.2.3 From 0dadfce9a81a10be58af646fad608176a91d4c7b Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Fri, 10 Jun 2011 02:17:16 +0200 Subject: Remove unused file --- wizards/com/sun/star/wizards/common/Listener.py | 111 --------------------- .../sun/star/wizards/ui/event/DataAwareFields.java | 2 - 2 files changed, 113 deletions(-) delete mode 100644 wizards/com/sun/star/wizards/common/Listener.py diff --git a/wizards/com/sun/star/wizards/common/Listener.py b/wizards/com/sun/star/wizards/common/Listener.py deleted file mode 100644 index 238f22cac..000000000 --- a/wizards/com/sun/star/wizards/common/Listener.py +++ /dev/null @@ -1,111 +0,0 @@ -#********************************************************************** -# -# Danny.OOo.Listeners.ListenerProcAdapters.py -# -# A module to easily work with OpenOffice.org. -# -#********************************************************************** -# Copyright (c) 2003-2004 Danny Brewer -# d29583@groovegarden.com -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# 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 -# -# See: http://www.gnu.org/licenses/lgpl.html -# -#********************************************************************** -# If you make changes, please append to the change log below. -# -# Change Log -# Danny Brewer Revised 2004-06-05-01 -# -#********************************************************************** - -# OOo's libraries -import uno -import unohelper - -#-------------------------------------------------- -# An ActionListener adapter. -# This object implements com.sun.star.awt.XActionListener. -# When actionPerformed is called, this will call an arbitrary -# python procedure, passing it... -# 1. the oActionEvent -# 2. any other parameters you specified to this object's constructor (as a tuple). -from com.sun.star.awt import XActionListener -class ActionListenerProcAdapter( unohelper.Base, XActionListener ): - def __init__( self, oProcToCall, tParams=() ): - self.oProcToCall = oProcToCall # a python procedure - self.tParams = tParams # a tuple - - # oActionEvent is a com.sun.star.awt.ActionEvent struct. - def actionPerformed( self, oActionEvent ): - if callable( self.oProcToCall ): - apply( self.oProcToCall, (oActionEvent,) + self.tParams ) - - -#-------------------------------------------------- -# An ItemListener adapter. -# This object implements com.sun.star.awt.XItemListener. -# When itemStateChanged is called, this will call an arbitrary -# python procedure, passing it... -# 1. the oItemEvent -# 2. any other parameters you specified to this object's constructor (as a tuple). -from com.sun.star.awt import XItemListener -class ItemListenerProcAdapter( unohelper.Base, XItemListener ): - def __init__( self, oProcToCall, tParams=() ): - self.oProcToCall = oProcToCall # a python procedure - self.tParams = tParams # a tuple - - # oItemEvent is a com.sun.star.awt.ItemEvent struct. - def itemStateChanged( self, oItemEvent ): - if callable( self.oProcToCall ): - apply( self.oProcToCall, (oItemEvent,) + self.tParams ) - - -#-------------------------------------------------- -# An TextListener adapter. -# This object implements com.sun.star.awt.XTextistener. -# When textChanged is called, this will call an arbitrary -# python procedure, passing it... -# 1. the oTextEvent -# 2. any other parameters you specified to this object's constructor (as a tuple). -from com.sun.star.awt import XTextListener -class TextListenerProcAdapter( unohelper.Base, XTextListener ): - def __init__( self, oProcToCall, tParams=() ): - self.oProcToCall = oProcToCall # a python procedure - self.tParams = tParams # a tuple - - # oTextEvent is a com.sun.star.awt.TextEvent struct. - def textChanged( self, oTextEvent ): - if callable( self.oProcToCall ): - apply( self.oProcToCall, (oTextEvent,) + self.tParams ) - -#-------------------------------------------------- -# An Window adapter. -# This object implements com.sun.star.awt.XWindowListener. -# When textChanged is called, this will call an arbitrary -# python procedure, passing it... -# 1. the oTextEvent -# 2. any other parameters you specified to this object's constructor (as a tuple). -from com.sun.star.awt import XWindowListener -class WindowListenerProcAdapter( unohelper.Base, XWindowListener ): - def __init__( self, oProcToCall, tParams=() ): - self.oProcToCall = oProcToCall # a python procedure - self.tParams = tParams # a tuple - - # oTextEvent is a com.sun.star.awt.TextEvent struct. - def windowResized(self, actionEvent): - if callable( self.oProcToCall ): - apply( self.oProcToCall, (actionEvent,) + self.tParams ) diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java index 261f5c2b1..f048f9bf0 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java +++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java @@ -318,7 +318,6 @@ public class DataAwareFields { if (s == null || s.equals("")) { - System.out.println(Any.VOID); return Any.VOID; } else @@ -330,7 +329,6 @@ public class DataAwareFields { if (s == null || s.equals("")) { - System.out.println(Any.VOID); return Any.VOID; } else -- cgit v1.2.3 From 9f0562497f8b35504b8a4d2bf9320bf732fb9ad1 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Fri, 10 Jun 2011 20:57:59 +0200 Subject: add some more listeners --- wizards/com/sun/star/wizards/RemoteFaxWizard | 1 + wizards/com/sun/star/wizards/common/HelpIds.py | 2015 ++++++++++---------- wizards/com/sun/star/wizards/common/Helper.py | 1 - .../com/sun/star/wizards/fax/FaxWizardDialog.py | 60 +- .../sun/star/wizards/fax/FaxWizardDialogConst.py | 79 +- .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 5 +- wizards/com/sun/star/wizards/ui/PathSelection.py | 1 - wizards/com/sun/star/wizards/ui/UnoDialog2.py | 108 +- wizards/com/sun/star/wizards/ui/WizardDialog.py | 28 +- .../sun/star/wizards/ui/event/AbstractListener.py | 67 - .../sun/star/wizards/ui/event/CommonListener.py | 8 +- 11 files changed, 1149 insertions(+), 1224 deletions(-) delete mode 100644 wizards/com/sun/star/wizards/ui/event/AbstractListener.py diff --git a/wizards/com/sun/star/wizards/RemoteFaxWizard b/wizards/com/sun/star/wizards/RemoteFaxWizard index fa3eccf22..76144cbfe 100644 --- a/wizards/com/sun/star/wizards/RemoteFaxWizard +++ b/wizards/com/sun/star/wizards/RemoteFaxWizard @@ -3,4 +3,5 @@ from fax.FaxWizardDialogImpl import FaxWizardDialogImpl import sys if __name__ == "__main__": + FaxWizardDialogImpl.main(sys.argv) diff --git a/wizards/com/sun/star/wizards/common/HelpIds.py b/wizards/com/sun/star/wizards/common/HelpIds.py index ff939c3fa..ba8f07566 100644 --- a/wizards/com/sun/star/wizards/common/HelpIds.py +++ b/wizards/com/sun/star/wizards/common/HelpIds.py @@ -1,1013 +1,1002 @@ -class HelpIds: - array1 = [ - "HID:WIZARDS_HID0_WEBWIZARD", # HID:34200 - "HID:WIZARDS_HID0_HELP", # HID:34201 - "HID:WIZARDS_HID0_NEXT", # HID:34202 - "HID:WIZARDS_HID0_PREV", # HID:34203 - "HID:WIZARDS_HID0_CREATE", # HID:34204 - "HID:WIZARDS_HID0_CANCEL", # HID:34205 - "HID:WIZARDS_HID0_STATUS_DIALOG", # HID:34206 - "HID:WIZARDS_HID1_LST_SESSIONS", # HID:34207 - "", - "HID:WIZARDS_HID1_BTN_DEL_SES", # HID:34209 - "HID:WIZARDS_HID2_LST_DOCS", # HID:34210 - "HID:WIZARDS_HID2_BTN_ADD_DOC", # HID:34211 - "HID:WIZARDS_HID2_BTN_REM_DOC", # HID:34212 - "HID:WIZARDS_HID2_BTN_DOC_UP", # HID:34213 - "HID:WIZARDS_HID2_BTN_DOC_DOWN", # HID:34214 - "HID:WIZARDS_HID2_TXT_DOC_TITLE", # HID:34215 - "HID:WIZARDS_HID2_TXT_DOC_DESC", # HID:34216 - "HID:WIZARDS_HID2_TXT_DOC_AUTHOR", # HID:34217 - "HID:WIZARDS_HID2_LST_DOC_EXPORT", # HID:34218 - "HID:WIZARDS_HID2_STATUS_ADD_DOCS", # HID:34219 - "HID:WIZARDS_HID3_IL_LAYOUTS_IMG1", # HID:34220 - "HID:WIZARDS_HID3_IL_LAYOUTS_IMG2", # HID:34221 - "HID:WIZARDS_HID3_IL_LAYOUTS_IMG3", # HID:34222 - "HID:WIZARDS_HID3_IL_LAYOUTS_IMG4", # HID:34223 - "HID:WIZARDS_HID3_IL_LAYOUTS_IMG5", # HID:34224 - "HID:WIZARDS_HID3_IL_LAYOUTS_IMG6", # HID:34225 - "HID:WIZARDS_HID3_IL_LAYOUTS_IMG7", # HID:34226 - "HID:WIZARDS_HID3_IL_LAYOUTS_IMG8", # HID:34227 - "HID:WIZARDS_HID3_IL_LAYOUTS_IMG9", # HID:34228 - "HID:WIZARDS_HID3_IL_LAYOUTS_IMG10", # HID:34229 - "HID:WIZARDS_HID3_IL_LAYOUTS_IMG11", # HID:34230 - "HID:WIZARDS_HID3_IL_LAYOUTS_IMG12", # HID:34231 - "HID:WIZARDS_HID3_IL_LAYOUTS_IMG13", # HID:34232 - "HID:WIZARDS_HID3_IL_LAYOUTS_IMG14", # HID:34233 - "HID:WIZARDS_HID3_IL_LAYOUTS_IMG15", # HID:34234 - "HID:WIZARDS_HID4_CHK_DISPLAY_FILENAME", # HID:34235 - "HID:WIZARDS_HID4_CHK_DISPLAY_DESCRIPTION", # HID:34236 - "HID:WIZARDS_HID4_CHK_DISPLAY_AUTHOR", # HID:34237 - "HID:WIZARDS_HID4_CHK_DISPLAY_CR_DATE", # HID:34238 - "HID:WIZARDS_HID4_CHK_DISPLAY_UP_DATE", # HID:34239 - "HID:WIZARDS_HID4_CHK_DISPLAY_FORMAT", # HID:34240 - "HID:WIZARDS_HID4_CHK_DISPLAY_F_ICON", # HID:34241 - "HID:WIZARDS_HID4_CHK_DISPLAY_PAGES", # HID:34242 - "HID:WIZARDS_HID4_CHK_DISPLAY_SIZE", # HID:34243 - "HID:WIZARDS_HID4_GRP_OPTIMAIZE_640", # HID:34244 - "HID:WIZARDS_HID4_GRP_OPTIMAIZE_800", # HID:34245 - "HID:WIZARDS_HID4_GRP_OPTIMAIZE_1024", # HID:34246 - "HID:WIZARDS_HID5_LST_STYLES", # HID:34247 - "HID:WIZARDS_HID5_BTN_BACKGND", # HID:34248 - "HID:WIZARDS_HID5_BTN_ICONS", # HID:34249 - "HID:WIZARDS_HID6_TXT_SITE_TITLE", # HID:34250 - "", - "", - "HID:WIZARDS_HID6_TXT_SITE_DESC", # HID:34253 - "", - "HID:WIZARDS_HID6_DATE_SITE_CREATED", # HID:34255 - "HID:WIZARDS_HID6_DATE_SITE_UPDATED", # HID:34256 - "", - "HID:WIZARDS_HID6_TXT_SITE_EMAIL", # HID:34258 - "HID:WIZARDS_HID6_TXT_SITE_COPYRIGHT", # HID:34259 - "HID:WIZARDS_HID7_BTN_PREVIEW", # HID:34260 - "HID:WIZARDS_HID7_CHK_PUBLISH_LOCAL", # HID:34261 - "HID:WIZARDS_HID7_TXT_LOCAL", # HID:34262 - "HID:WIZARDS_HID7_BTN_LOCAL", # HID:34263 - "HID:WIZARDS_HID7_CHK_PUBLISH_ZIP", # HID:34264 - "HID:WIZARDS_HID7_TXT_ZIP", # HID:34265 - "HID:WIZARDS_HID7_BTN_ZIP", # HID:34266 - "HID:WIZARDS_HID7_CHK_PUBLISH_FTP", # HID:34267 - "HID:WIZARDS_HID7_TXT_FTP", # HID:34268 - "HID:WIZARDS_HID7_BTN_FTP", # HID:34269 - "HID:WIZARDS_HID7_CHK_SAVE", # HID:34270 - "HID:WIZARDS_HID7_TXT_SAVE", # HID:34271 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_BG", # HID:34290 - "HID:WIZARDS_HID_BG_BTN_OTHER", # HID:34291 - "HID:WIZARDS_HID_BG_BTN_NONE", # HID:34292 - "HID:WIZARDS_HID_BG_BTN_OK", # HID:34293 - "HID:WIZARDS_HID_BG_BTN_CANCEL", # HID:34294 - "HID:WIZARDS_HID_BG_BTN_BACK", # HID:34295 - "HID:WIZARDS_HID_BG_BTN_FW", # HID:34296 - "HID:WIZARDS_HID_BG_BTN_IMG1", # HID:34297 - "HID:WIZARDS_HID_BG_BTN_IMG2", # HID:34298 - "HID:WIZARDS_HID_BG_BTN_IMG3", # HID:34299 - "HID:WIZARDS_HID_BG_BTN_IMG4", # HID:34300 - "HID:WIZARDS_HID_BG_BTN_IMG5", # HID:34301 - "HID:WIZARDS_HID_BG_BTN_IMG6", # HID:34302 - "HID:WIZARDS_HID_BG_BTN_IMG7", # HID:34303 - "HID:WIZARDS_HID_BG_BTN_IMG8", # HID:34304 - "HID:WIZARDS_HID_BG_BTN_IMG9", # HID:34305 - "HID:WIZARDS_HID_BG_BTN_IMG10", # HID:34306 - "HID:WIZARDS_HID_BG_BTN_IMG11", # HID:34307 - "HID:WIZARDS_HID_BG_BTN_IMG12", # HID:34308 - "HID:WIZARDS_HID_BG_BTN_IMG13", # HID:34309 - "HID:WIZARDS_HID_BG_BTN_IMG14", # HID:34300 - "HID:WIZARDS_HID_BG_BTN_IMG15", # HID:34311 - "HID:WIZARDS_HID_BG_BTN_IMG16", # HID:34312 - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGREPORT_DIALOG", # HID:34320 - "", - "HID:WIZARDS_HID_DLGREPORT_0_CMDPREV", # HID:34322 - "HID:WIZARDS_HID_DLGREPORT_0_CMDNEXT", # HID:34323 - "HID:WIZARDS_HID_DLGREPORT_0_CMDFINISH", # HID:34324 - "HID:WIZARDS_HID_DLGREPORT_0_CMDCANCEL", # HID:34325 - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGREPORT_1_LBTABLES", # HID:34330 - "HID:WIZARDS_HID_DLGREPORT_1_FIELDSAVAILABLE", # HID:34331 - "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVESELECTED", # HID:34332 - "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEALL", # HID:34333 - "HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVESELECTED", # HID:34334 - "HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVEALL", # HID:34335 - "HID:WIZARDS_HID_DLGREPORT_1_FIELDSSELECTED", # HID:34336 - "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEUP", # HID:34337 - "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEDOWN", # HID:34338 - "", - "HID:WIZARDS_HID_DLGREPORT_2_GROUPING", # HID:34340 - "HID:WIZARDS_HID_DLGREPORT_2_CMDGROUP", # HID:34341 - "HID:WIZARDS_HID_DLGREPORT_2_CMDUNGROUP", # HID:34342 - "HID:WIZARDS_HID_DLGREPORT_2_PREGROUPINGDEST", # HID:34343 - "HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEUPGROUP", # HID:34344 - "HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEDOWNGROUP", # HID:34345 - "HID:WIZARDS_HID_DLGREPORT_3_SORT1", # HID:34346 - "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND1", # HID:34347 - "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND1", # HID:34348 - "HID:WIZARDS_HID_DLGREPORT_3_SORT2", # HID:34349 - "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND2", # HID:34350 - "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND2", # HID:34351 - "HID:WIZARDS_HID_DLGREPORT_3_SORT3", # HID:34352 - "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND3", # HID:34353 - "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND3", # HID:34354 - "HID:WIZARDS_HID_DLGREPORT_3_SORT4", # HID:34355 - "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND4", # HID:34356 - "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND4", # HID:34357 - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGREPORT_4_TITLE", # HID:34362 - "HID:WIZARDS_HID_DLGREPORT_4_DATALAYOUT", # HID:34363 - "HID:WIZARDS_HID_DLGREPORT_4_PAGELAYOUT", # HID:34364 - "HID:WIZARDS_HID_DLGREPORT_4_LANDSCAPE", # HID:34365 - "HID:WIZARDS_HID_DLGREPORT_4_PORTRAIT", # HID:34366 - "", - "", - "", - "HID:WIZARDS_HID_DLGREPORT_5_OPTDYNTEMPLATE", # HID:34370 - "HID:WIZARDS_HID_DLGREPORT_5_OPTSTATDOCUMENT", # HID:34371 - "HID:WIZARDS_HID_DLGREPORT_5_TXTTEMPLATEPATH", # HID:34372 - "HID:WIZARDS_HID_DLGREPORT_5_CMDTEMPLATEPATH", # HID:34373 - "HID:WIZARDS_HID_DLGREPORT_5_OPTEDITTEMPLATE", # HID:34374 - "HID:WIZARDS_HID_DLGREPORT_5_OPTUSETEMPLATE", # HID:34375 - "HID:WIZARDS_HID_DLGREPORT_5_TXTDOCUMENTPATH", # HID:34376 - "HID:WIZARDS_HID_DLGREPORT_5_CMDDOCUMENTPATH", # HID:34377 - "HID:WIZARDS_HID_DLGREPORT_5_CHKLINKTODB", # HID:34378 - "", - "", - "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_1", # HID:34381 - "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_2", # HID:34382 - "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_3", # HID:34383 - "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_4", # HID:34384 - "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_5", # HID:34385 - "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_6", # HID:34386 - "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_7", # HID:34387 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGFORM_DIALOG", # HID:34400 - "", - "HID:WIZARDS_HID_DLGFORM_CMDPREV", # HID:34402 - "HID:WIZARDS_HID_DLGFORM_CMDNEXT", # HID:34403 - "HID:WIZARDS_HID_DLGFORM_CMDFINISH", # HID:34404 - "HID:WIZARDS_HID_DLGFORM_CMDCANCEL", # HID:34405 - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGFORM_MASTER_LBTABLES", # HID:34411 - "HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSAVAILABLE", # HID:34412 - "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVESELECTED", # HID:34413 - "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEALL", # HID:34414 - "HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVESELECTED", # HID:34415 - "HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVEALL", # HID:34416 - "HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSSELECTED", # HID:34417 - "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEUP", # HID:34418 - "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEDOWN", # HID:34419 - "", - "HID:WIZARDS_HID_DLGFORM_CHKCREATESUBFORM", # HID:34421 - "HID:WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION", # HID:34422 - "HID:WIZARDS_HID_DLGFORM_OPTSELECTMANUALLY", # HID:34423 - "HID:WIZARDS_HID_DLGFORM_lstRELATIONS", # HID:34424 - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGFORM_SUB_LBTABLES", # HID:34431 - "HID:WIZARDS_HID_DLGFORM_SUB_FIELDSAVAILABLE", # HID:34432 - "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVESELECTED", # HID:34433 - "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEALL", # HID:34434 - "HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVESELECTED", # HID:34435 - "HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVEALL", # HID:34436 - "HID:WIZARDS_HID_DLGFORM_SUB_FIELDSSELECTED", # HID:34437 - "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEUP", # HID:34438 - "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEDOWN", # HID:34439 - "", - "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK1", # HID:34441 - "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK1", # HID:34442 - "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK2", # HID:34443 - "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK2", # HID:34444 - "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK3", # HID:34445 - "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK3", # HID:34446 - "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK4", # HID:34447 - "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK4", # HID:34448 - "", - "", - "HID:WIZARDS_HID_DLGFORM_CMDALIGNLEFT", # HID:34451 - "HID:WIZARDS_HID_DLGFORM_CMDALIGNRIGHT", # HID:34452 - "HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED", # HID:34453 - "HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED", # HID:34454 - "HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE", # HID:34455 - "HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED", # HID:34456 - "HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED2", # HID:34457 - "HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED2", # HID:34458 - "HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE2", # HID:34459 - "HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED2", # HID:34460 - "HID:WIZARDS_HID_DLGFORM_OPTNEWDATAONLY", # HID:34461 - "HID:WIZARDS_HID_DLGFORM_OPTDISPLAYALLDATA", # HID:34462 - "HID:WIZARDS_HID_DLGFORM_CHKNOMODIFICATION", # HID:34463 - "HID:WIZARDS_HID_DLGFORM_CHKNODELETION", # HID:34464 - "HID:WIZARDS_HID_DLGFORM_CHKNOADDITION", # HID:34465 - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGFORM_LSTSTYLES", # HID:34471 - "HID:WIZARDS_HID_DLGFORM_CMDNOBORDER", # HID:34472 - "HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", # HID:34473 - "HID:WIZARDS_HID_DLGFORM_CMDSIMPLEBORDER", # HID:34474 - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGFORM_TXTPATH", # HID:34481 - "HID:WIZARDS_HID_DLGFORM_OPTWORKWITHFORM", # HID:34482 - "HID:WIZARDS_HID_DLGFORM_OPTMODIFYFORM", # HID:34483 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGNEWSLTR_DIALOG", # HID:34500 - "HID:WIZARDS_HID_DLGNEWSLTR_OPTSTANDARDLAYOUT", # HID:34501 - "HID:WIZARDS_HID_DLGNEWSLTR_OPTPARTYLAYOUT", # HID:34502 - "HID:WIZARDS_HID_DLGNEWSLTR_OPTBROCHURELAYOUT", # HID:34503 - "HID:WIZARDS_HID_DLGNEWSLTR_OPTSINGLESIDED", # HID:34504 - "HID:WIZARDS_HID_DLGNEWSLTR_OPTDOUBLESIDED", # HID:34505 - "HID:WIZARDS_HID_DLGNEWSLTR_CMDGOON", # HID:34506 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGDEPOT_DIALOG_SELLBUY", # HID:34520 - "HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SELLBUY", # HID:34521 - "HID:WIZARDS_HID_DLGDEPOT_0_TXTQUANTITY", # HID:34522 - "HID:WIZARDS_HID_DLGDEPOT_0_TXTRATE", # HID:34523 - "HID:WIZARDS_HID_DLGDEPOT_0_TXTDATE", # HID:34524 - "HID:WIZARDS_HID_DLGDEPOT_0_TXTCOMMISSION", # HID:34525 - "HID:WIZARDS_HID_DLGDEPOT_0_TXTFIX", # HID:34526 - "HID:WIZARDS_HID_DLGDEPOT_0_TXTMINIMUM", # HID:34527 - "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SELLBUY", # HID:34528 - "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SELLBUY", # HID:34529 - "HID:WIZARDS_HID_DLGDEPOT_1_LSTSELLSTOCKS", # HID:34530 - "HID:WIZARDS_HID_DLGDEPOT_2_LSTBUYSTOCKS", # HID:34531 - "HID:WIZARDS_HID_DLGDEPOT_DIALOG_SPLIT", # HID:34532 - "HID:WIZARDS_HID_DLGDEPOT_0_LSTSTOCKNAMES", # HID:34533 - "HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SPLIT", # HID:34534 - "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SPLIT", # HID:34535 - "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SPLIT", # HID:34536 - "HID:WIZARDS_HID_DLGDEPOT_1_OPTPERSHARE", # HID:34537 - "HID:WIZARDS_HID_DLGDEPOT_1_OPTTOTAL", # HID:34538 - "HID:WIZARDS_HID_DLGDEPOT_1_TXTDIVIDEND", # HID:34539 - "HID:WIZARDS_HID_DLGDEPOT_2_TXTOLDRATE", # HID:34540 - "HID:WIZARDS_HID_DLGDEPOT_2_TXTNEWRATE", # HID:34541 - "HID:WIZARDS_HID_DLGDEPOT_2_TXTDATE", # HID:34542 - "HID:WIZARDS_HID_DLGDEPOT_3_TXTSTARTDATE", # HID:34543 - "HID:WIZARDS_HID_DLGDEPOT_3_TXTENDDATE", # HID:34544 - "HID:WIZARDS_HID_DLGDEPOT_3_OPTDAILY", # HID:34545 - "HID:WIZARDS_HID_DLGDEPOT_3_OPTWEEKLY", # HID:34546 - "HID:WIZARDS_HID_DLGDEPOT_DIALOG_HISTORY", # HID:34547 - "HID:WIZARDS_HID_DLGDEPOT_LSTMARKETS", # HID:34548 - "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_HISTORY", # HID:34549 - "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_HISTORY", # HID:34550 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGIMPORT_DIALOG", # HID:34570 - "HID:WIZARDS_HID_DLGIMPORT_0_CMDHELP", # HID:34571 - "HID:WIZARDS_HID_DLGIMPORT_0_CMDCANCEL", # HID:34572 - "HID:WIZARDS_HID_DLGIMPORT_0_CMDPREV", # HID:34573 - "HID:WIZARDS_HID_DLGIMPORT_0_CMDNEXT", # HID:34574 - "HID:WIZARDS_HID_DLGIMPORT_0_OPTSODOCUMENTS", # HID:34575 - "HID:WIZARDS_HID_DLGIMPORT_0_OPTMSDOCUMENTS", # HID:34576 - "HID:WIZARDS_HID_DLGIMPORT_0_CHKLOGFILE", # HID:34577 - "HID:WIZARDS_HID_DLGIMPORT_2_CHKWORD", # HID:34578 - "HID:WIZARDS_HID_DLGIMPORT_2_CHKEXCEL", # HID:34579 - "HID:WIZARDS_HID_DLGIMPORT_2_CHKPOWERPOINT", # HID:34580 - "HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATE", # HID:34581 - "HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATERECURSE", # HID:34582 - "HID:WIZARDS_HID_DLGIMPORT_2_LBTEMPLATEPATH", # HID:34583 - "HID:WIZARDS_HID_DLGIMPORT_2_EDTEMPLATEPATH", # HID:34584 - "HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT", # HID:34585 - "HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENT", # HID:34586 - "HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENTRECURSE", # HID:34587 - "HID:WIZARDS_HID_DLGIMPORT_2_LBDOCUMENTPATH", # HID:34588 - "HID:WIZARDS_HID_DLGIMPORT_2_EDDOCUMENTPATH", # HID:34589 - "HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT", # HID:34590 - "HID:WIZARDS_HID_DLGIMPORT_2_LBEXPORTDOCUMENTPATH", # HID:34591 - "HID:WIZARDS_HID_DLGIMPORT_2_EDEXPORTDOCUMENTPATH", # HID:34592 - "HID:WIZARDS_HID_DLGIMPORT_2_CMDEXPORTPATHSELECT", # HID:34593 - "", - "HID:WIZARDS_HID_DLGIMPORT_3_TBSUMMARY", # HID:34595 - "HID:WIZARDS_HID_DLGIMPORT_0_CHKWRITER", # HID:34596 - "HID:WIZARDS_HID_DLGIMPORT_0_CHKCALC", # HID:34597 - "HID:WIZARDS_HID_DLGIMPORT_0_CHKIMPRESS", # HID:34598 - "HID:WIZARDS_HID_DLGIMPORT_0_CHKMATHGLOBAL", # HID:34599 - "HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT2", # HID:34600 - "HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT2", # HID:34601 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGCORRESPONDENCE_DIALOG", # HID:34630 - "HID:WIZARDS_HID_DLGCORRESPONDENCE_CANCEL", # HID:34631 - "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA1", # HID:34632 - "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA2", # HID:34633 - "HID:WIZARDS_HID_DLGCORRESPONDENCE_AGENDAOKAY", # HID:34634 - "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER1", # HID:34635 - "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER2", # HID:34636 - "HID:WIZARDS_HID_DLGCORRESPONDENCE_LETTEROKAY", # HID:34637 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGSTYLES_DIALOG", # HID:34650 - "HID:WIZARDS_HID_DLGSTYLES_LISTBOX", # HID:34651 - "HID:WIZARDS_HID_DLGSTYLES_CANCEL", # HID:34652 - "HID:WIZARDS_HID_DLGSTYLES_OKAY", # HID:34653 - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGCONVERT_DIALOG", # HID:34660 - "HID:WIZARDS_HID_DLGCONVERT_CHECKBOX1", # HID:34661 - "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON1", # HID:34662 - "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON2", # HID:34663 - "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON3", # HID:34664 - "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON4", # HID:34665 - "HID:WIZARDS_HID_DLGCONVERT_LISTBOX1", # HID:34666 - "HID:WIZARDS_HID_DLGCONVERT_OBFILE", # HID:34667 - "HID:WIZARDS_HID_DLGCONVERT_OBDIR", # HID:34668 - "HID:WIZARDS_HID_DLGCONVERT_COMBOBOX1", # HID:34669 - "HID:WIZARDS_HID_DLGCONVERT_TBSOURCE", # HID:34670 - "HID:WIZARDS_HID_DLGCONVERT_CHECKRECURSIVE", # HID:34671 - "HID:WIZARDS_HID_DLGCONVERT_TBTARGET", # HID:34672 - "HID:WIZARDS_HID_DLGCONVERT_CBCANCEL", # HID:34673 - "HID:WIZARDS_HID_DLGCONVERT_CBHELP", # HID:34674 - "HID:WIZARDS_HID_DLGCONVERT_CBBACK", # HID:34675 - "HID:WIZARDS_HID_DLGCONVERT_CBGOON", # HID:34676 - "HID:WIZARDS_HID_DLGCONVERT_CBSOURCEOPEN", # HID:34677 - "HID:WIZARDS_HID_DLGCONVERT_CBTARGETOPEN", # HID:34678 - "HID:WIZARDS_HID_DLGCONVERT_CHKPROTECT", # HID:34679 - "HID:WIZARDS_HID_DLGCONVERT_CHKTEXTDOCUMENTS", # HID:34680 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGPASSWORD_CMDGOON", # HID:34690 - "HID:WIZARDS_HID_DLGPASSWORD_CMDCANCEL", # HID:34691 - "HID:WIZARDS_HID_DLGPASSWORD_CMDHELP", # HID:34692 - "HID:WIZARDS_HID_DLGPASSWORD_TXTPASSWORD", # HID:34693 - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGHOLIDAYCAL_DIALOG", # HID:34700 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_PREVIEW", # HID:34701 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPYEAR", # HID:34702 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPMONTH", # HID:34703 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDYEAR", # HID:34704 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDMONTH", # HID:34705 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINYEAR", # HID:34706 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINMONTH", # HID:34707 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_CMBSTATE", # HID:34708 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_LBOWNDATA", # HID:34709 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDINSERT", # HID:34710 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDDELETE", # HID:34711 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENT", # HID:34712 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CHKEVENT", # HID:34713 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTDAY", # HID:34714 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTDAY", # HID:34715 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTMONTH", # HID:34716 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTMONTH", # HID:34717 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTYEAR", # HID:34718 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTYEAR", # HID:34719 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOWNDATA", # HID:34720 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDCANCEL", # HID:34721 - "HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOK" # HID:34722 - ] - array2 = ["HID:WIZARDS_HID_LTRWIZ_OPTBUSINESSLETTER", # HID:40769 - "HID:WIZARDS_HID_LTRWIZ_OPTPRIVOFFICIALLETTER", # HID:40770 - "HID:WIZARDS_HID_LTRWIZ_OPTPRIVATELETTER", # HID:40771 - "HID:WIZARDS_HID_LTRWIZ_LSTBUSINESSSTYLE", # HID:40772 - "HID:WIZARDS_HID_LTRWIZ_CHKBUSINESSPAPER", # HID:40773 - "HID:WIZARDS_HID_LTRWIZ_LSTPRIVOFFICIALSTYLE", # HID:40774 - "HID:WIZARDS_HID_LTRWIZ_LSTPRIVATESTYLE", # HID:40775 - "HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYLOGO", # HID:40776 - "HID:WIZARDS_HID_LTRWIZ_NUMLOGOHEIGHT", # HID:40777 - "HID:WIZARDS_HID_LTRWIZ_NUMLOGOX", # HID:40778 - "HID:WIZARDS_HID_LTRWIZ_NUMLOGOWIDTH", # HID:40779 - "HID:WIZARDS_HID_LTRWIZ_NUMLOGOY", # HID:40780 - "HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYADDRESS", # HID:40781 - "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSHEIGHT", # HID:40782 - "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSX", # HID:40783 - "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSWIDTH", # HID:40784 - "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSY", # HID:40785 - "HID:WIZARDS_HID_LTRWIZ_CHKCOMPANYRECEIVER", # HID:40786 - "HID:WIZARDS_HID_LTRWIZ_CHKPAPERFOOTER", # HID:40787 - "HID:WIZARDS_HID_LTRWIZ_NUMFOOTERHEIGHT", # HID:40788 - "HID:WIZARDS_HID_LTRWIZ_LSTLETTERNORM", # HID:40789 - "HID:WIZARDS_HID_LTRWIZ_CHKUSELOGO", # HID:40790 - "HID:WIZARDS_HID_LTRWIZ_CHKUSEADDRESSRECEIVER", # HID:40791 - "HID:WIZARDS_HID_LTRWIZ_CHKUSESIGNS", # HID:40792 - "HID:WIZARDS_HID_LTRWIZ_CHKUSESUBJECT", # HID:40793 - "HID:WIZARDS_HID_LTRWIZ_CHKUSESALUTATION", # HID:40794 - "HID:WIZARDS_HID_LTRWIZ_LSTSALUTATION", # HID:40795 - "HID:WIZARDS_HID_LTRWIZ_CHKUSEBENDMARKS", # HID:40796 - "HID:WIZARDS_HID_LTRWIZ_CHKUSEGREETING", # HID:40797 - "HID:WIZARDS_HID_LTRWIZ_LSTGREETING", # HID:40798 - "HID:WIZARDS_HID_LTRWIZ_CHKUSEFOOTER", # HID:40799 - "HID:WIZARDS_HID_LTRWIZ_OPTSENDERPLACEHOLDER", # HID:40800 - "HID:WIZARDS_HID_LTRWIZ_OPTSENDERDEFINE", # HID:40801 - "HID:WIZARDS_HID_LTRWIZ_TXTSENDERNAME", # HID:40802 - "HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTREET", # HID:40803 - "HID:WIZARDS_HID_LTRWIZ_TXTSENDERPOSTCODE", # HID:40804 - "HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTATE_TEXT", # HID:40805 - "HID:WIZARDS_HID_LTRWIZ_TXTSENDERCITY", # HID:40806 - "HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERPLACEHOLDER", # HID:40807 - "HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERDATABASE", # HID:40808 - "HID:WIZARDS_HID_LTRWIZ_TXTFOOTER", # HID:40809 - "HID:WIZARDS_HID_LTRWIZ_CHKFOOTERNEXTPAGES", # HID:40810 - "HID:WIZARDS_HID_LTRWIZ_CHKFOOTERPAGENUMBERS", # HID:40811 - "HID:WIZARDS_HID_LTRWIZ_TXTTEMPLATENAME", # HID:40812 - "HID:WIZARDS_HID_LTRWIZ_OPTCREATELETTER", # HID:40813 - "HID:WIZARDS_HID_LTRWIZ_OPTMAKECHANGES", # HID:40814 - "HID:WIZARDS_HID_LTRWIZ_TXTPATH", # HID:40815 - "HID:WIZARDS_HID_LTRWIZ_CMDPATH", # HID:40816 - "", - "", - "", - "HID:WIZARDS_HID_LTRWIZARD", # HID:40820 - "HID:WIZARDS_HID_LTRWIZARD_HELP", # HID:40821 - "HID:WIZARDS_HID_LTRWIZARD_BACK", # HID:40822 - "HID:WIZARDS_HID_LTRWIZARD_NEXT", # HID:40823 - "HID:WIZARDS_HID_LTRWIZARD_CREATE", # HID:40824 - "HID:WIZARDS_HID_LTRWIZARD_CANCEL", # HID:40825 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_QUERYWIZARD_LSTTABLES", # HID:40850 - "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDS", # HID:40851 - "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVESELECTED", # HID:40852 - "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEALL", # HID:40853 - "HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVESELECTED", # HID:40854 - "HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVEALL", # HID:40855 - "HID:WIZARDS_HID_QUERYWIZARD_LSTSELFIELDS", # HID:40856 - "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEUP", # HID:40857 - "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEDOWN", # HID:40858 - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_QUERYWIZARD_SORT1", # HID:40865 - "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND1", # HID:40866 - "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND1", # HID:40867 - "HID:WIZARDS_HID_QUERYWIZARD_SORT2", # HID:40868 - "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND2", # HID:40869 - "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND2", # HID:40870 - "HID:WIZARDS_HID_QUERYWIZARD_SORT3", # HID:40871 - "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND3", # HID:40872 - "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND3", # HID:40873 - "HID:WIZARDS_HID_QUERYWIZARD_SORT4", # HID:40874 - "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND4", # HID:40875 - "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND4", # HID:40876 - "", - "HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHALL", # HID:40878 - "HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHANY", # HID:40879 - "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_1", # HID:40880 - "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_1", # HID:40881 - "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_1", # HID:40882 - "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_2", # HID:40883 - "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_2", # HID:40884 - "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_2", # HID:40885 - "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_3", # HID:40886 - "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_3", # HID:40887 - "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_3", # HID:40888 - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATEDETAILQUERY", # HID:40895 - "HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATESUMMARYQUERY", # HID:40896 - "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_1", # HID:40897 - "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_1", # HID:40898 - "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_2", # HID:40899 - "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_2", # HID:40900 - "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_3", # HID:40901 - "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_3", # HID:40902 - "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_4", # HID:40903 - "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_4", # HID:40904 - "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_5", # HID:40905 - "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_5", # HID:40906 - "HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEPLUS", # HID:40907 - "HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEMINUS", # HID:40908 - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDS", # HID:40915 - "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVESELECTED", # HID:40916 - "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERREMOVESELECTED", # HID:40917 - "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERSELFIELDS", # HID:40918 - "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEUP", # HID:40919 - "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEDOWN", # HID:40920 - "", - "", - "HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHALL", # HID:40923 - "HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHANY", # HID:40924 - "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_1", # HID:40925 - "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_1", # HID:40926 - "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_1", # HID:40927 - "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_2", # HID:40928 - "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_2", # HID:40929 - "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_2", # HID:40930 - "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_3", # HID:40931 - "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_3", # HID:40932 - "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_3", # HID:40933 - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_1", # HID:40940 - "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_2", # HID:40941 - "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_3", # HID:40942 - "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_4", # HID:40943 - "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_5", # HID:40944 - "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_6", # HID:40945 - "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_7", # HID:40946 - "", - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_QUERYWIZARD_TXTQUERYTITLE", # HID:40955 - "HID:WIZARDS_HID_QUERYWIZARD_OPTDISPLAYQUERY", # HID:40956 - "HID:WIZARDS_HID_QUERYWIZARD_OPTMODIFYQUERY", # HID:40957 - "HID:WIZARDS_HID_QUERYWIZARD_TXTSUMMARY", # HID:40958 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_QUERYWIZARD", # HID:40970 - "", - "HID:WIZARDS_HID_QUERYWIZARD_BACK", # HID:40972 - "HID:WIZARDS_HID_QUERYWIZARD_NEXT", # HID:40973 - "HID:WIZARDS_HID_QUERYWIZARD_CREATE", # HID:40974 - "HID:WIZARDS_HID_QUERYWIZARD_CANCEL", # HID:40975 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_IS", # HID:41000 - "", "HID:WIZARDS_HID_IS_BTN_NONE", # HID:41002 - "HID:WIZARDS_HID_IS_BTN_OK", # HID:41003 - "HID:WIZARDS_HID_IS_BTN_CANCEL", # HID:41004 - "HID:WIZARDS_HID_IS_BTN_IMG1", # HID:41005 - "HID:WIZARDS_HID_IS_BTN_IMG2", # HID:41006 - "HID:WIZARDS_HID_IS_BTN_IMG3", # HID:41007 - "HID:WIZARDS_HID_IS_BTN_IMG4", # HID:41008 - "HID:WIZARDS_HID_IS_BTN_IMG5", # HID:41009 - "HID:WIZARDS_HID_IS_BTN_IMG6", # HID:41010 - "HID:WIZARDS_HID_IS_BTN_IMG7", # HID:41011 - "HID:WIZARDS_HID_IS_BTN_IMG8", # HID:41012 - "HID:WIZARDS_HID_IS_BTN_IMG9", # HID:41013 - "HID:WIZARDS_HID_IS_BTN_IMG10", # HID:41014 - "HID:WIZARDS_HID_IS_BTN_IMG11", # HID:41015 - "HID:WIZARDS_HID_IS_BTN_IMG12", # HID:41016 - "HID:WIZARDS_HID_IS_BTN_IMG13", # HID:41017 - "HID:WIZARDS_HID_IS_BTN_IMG14", # HID:41018 - "HID:WIZARDS_HID_IS_BTN_IMG15", # HID:41019 - "HID:WIZARDS_HID_IS_BTN_IMG16", # HID:41020 - "HID:WIZARDS_HID_IS_BTN_IMG17", # HID:41021 - "HID:WIZARDS_HID_IS_BTN_IMG18", # HID:41022 - "HID:WIZARDS_HID_IS_BTN_IMG19", # HID:41023 - "HID:WIZARDS_HID_IS_BTN_IMG20", # HID:41024 - "HID:WIZARDS_HID_IS_BTN_IMG21", # HID:41025 - "HID:WIZARDS_HID_IS_BTN_IMG22", # HID:41026 - "HID:WIZARDS_HID_IS_BTN_IMG23", # HID:41027 - "HID:WIZARDS_HID_IS_BTN_IMG24", # HID:41028 - "HID:WIZARDS_HID_IS_BTN_IMG25", # HID:41029 - "HID:WIZARDS_HID_IS_BTN_IMG26", # HID:41030 - "HID:WIZARDS_HID_IS_BTN_IMG27", # HID:41031 - "HID:WIZARDS_HID_IS_BTN_IMG28", # HID:41032 - "HID:WIZARDS_HID_IS_BTN_IMG29", # HID:41033 - "HID:WIZARDS_HID_IS_BTN_IMG30", # HID:41034 - "HID:WIZARDS_HID_IS_BTN_IMG31", # HID:41035 - "HID:WIZARDS_HID_IS_BTN_IMG32", # HID:41036 - "", - "", - "", - "HID:WIZARDS_HID_FTP", # HID:41040 - "HID:WIZARDS_HID_FTP_SERVER", # HID:41041 - "HID:WIZARDS_HID_FTP_USERNAME", # HID:41042 - "HID:WIZARDS_HID_FTP_PASS", # HID:41043 - "HID:WIZARDS_HID_FTP_TEST", # HID:41044 - "HID:WIZARDS_HID_FTP_TXT_PATH", # HID:41045 - "HID:WIZARDS_HID_FTP_BTN_PATH", # HID:41046 - "HID:WIZARDS_HID_FTP_OK", # HID:41047 - "HID:WIZARDS_HID_FTP_CANCEL", # HID:41048 - "", - "", - "HID:WIZARDS_HID_AGWIZ", # HID:41051 - "HID:WIZARDS_HID_AGWIZ_HELP", # HID:41052 - "HID:WIZARDS_HID_AGWIZ_NEXT", # HID:41053 - "HID:WIZARDS_HID_AGWIZ_PREV", # HID:41054 - "HID:WIZARDS_HID_AGWIZ_CREATE", # HID:41055 - "HID:WIZARDS_HID_AGWIZ_CANCEL", # HID:41056 - "HID:WIZARDS_HID_AGWIZ_1_LIST_PAGEDESIGN", # HID:41057 - "HID:WIZARDS_HID_AGWIZ_1_CHK_MINUTES", # HID:41058 - "HID:WIZARDS_HID_AGWIZ_2_TXT_TIME", # HID:41059 - "HID:WIZARDS_HID_AGWIZ_2_TXT_DATE", # HID:41060 - "HID:WIZARDS_HID_AGWIZ_2_TXT_TITLE", # HID:41061 - "HID:WIZARDS_HID_AGWIZ_2_TXT_LOCATION", # HID:41062 - "HID:WIZARDS_HID_AGWIZ_3_CHK_MEETING_TYPE", # HID:41063 - "HID:WIZARDS_HID_AGWIZ_3_CHK_READ", # HID:41064 - "HID:WIZARDS_HID_AGWIZ_3_CHK_BRING", # HID:41065 - "HID:WIZARDS_HID_AGWIZ_3_CHK_NOTES", # HID:41066 - "HID:WIZARDS_HID_AGWIZ_4_CHK_CALLED_BY", # HID:41067 - "HID:WIZARDS_HID_AGWIZ_4_CHK_FACILITATOR", # HID:41068 - "HID:WIZARDS_HID_AGWIZ_4_CHK_NOTETAKER", # HID:41069 - "HID:WIZARDS_HID_AGWIZ_4_CHK_TIMEKEEPER", # HID:41070 - "HID:WIZARDS_HID_AGWIZ_4_CHK_ATTENDEES", # HID:41071 - "HID:WIZARDS_HID_AGWIZ_4_CHK_OBSERVERS", # HID:41072 - "HID:WIZARDS_HID_AGWIZ_4_CHK_RESOURCEPERSONS", # HID:41073 - "HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATENAME", # HID:41074 - "HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATEPATH", # HID:41075 - "HID:WIZARDS_HID_AGWIZ_6_BTN_TEMPLATEPATH", # HID:41076 - "HID:WIZARDS_HID_AGWIZ_6_OPT_CREATEAGENDA", # HID:41077 - "HID:WIZARDS_HID_AGWIZ_6_OPT_MAKECHANGES", # HID:41078 - "HID:WIZARDS_HID_AGWIZ_5_BTN_INSERT", # HID:41079 - "HID:WIZARDS_HID_AGWIZ_5_BTN_REMOVE", # HID:41080 - "HID:WIZARDS_HID_AGWIZ_5_BTN_UP", # HID:41081 - "HID:WIZARDS_HID_AGWIZ_5_BTN_DOWN", # HID:41082 - "HID:WIZARDS_HID_AGWIZ_5_SCROLL_BAR", # HID:41083 - "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_1", # HID:41084 - "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_1", # HID:41085 - "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_1", # HID:41086 - "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_2", # HID:41087 - "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_2", # HID:41088 - "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_2", # HID:41089 - "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_3", # HID:41090 - "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_3", # HID:41091 - "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_3", # HID:41092 - "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_4", # HID:41093 - "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_4", # HID:41094 - "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_4", # HID:41095 - "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_5", # HID:41096 - "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_5", # HID:41097 - "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_5", # HID:41098 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_FAXWIZ_OPTBUSINESSFAX", # HID:41120 - "HID:WIZARDS_HID_FAXWIZ_LSTBUSINESSSTYLE", # HID:41121 - "HID:WIZARDS_HID_FAXWIZ_OPTPRIVATEFAX", # HID:41122 - "HID:WIZARDS_HID_LSTPRIVATESTYLE", # HID:41123 - "HID:WIZARDS_HID_IMAGECONTROL3", # HID:41124 - "HID:WIZARDS_HID_CHKUSELOGO", # HID:41125 - "HID:WIZARDS_HID_CHKUSEDATE", # HID:41126 - "HID:WIZARDS_HID_CHKUSECOMMUNICATIONTYPE", # HID:41127 - "HID:WIZARDS_HID_LSTCOMMUNICATIONTYPE", # HID:41128 - "HID:WIZARDS_HID_CHKUSESUBJECT", # HID:41129 - "HID:WIZARDS_HID_CHKUSESALUTATION", # HID:41130 - "HID:WIZARDS_HID_LSTSALUTATION", # HID:41131 - "HID:WIZARDS_HID_CHKUSEGREETING", # HID:41132 - "HID:WIZARDS_HID_LSTGREETING", # HID:41133 - "HID:WIZARDS_HID_CHKUSEFOOTER", # HID:41134 - "HID:WIZARDS_HID_OPTSENDERPLACEHOLDER", # HID:41135 - "HID:WIZARDS_HID_OPTSENDERDEFINE", # HID:41136 - "HID:WIZARDS_HID_TXTSENDERNAME", # HID:41137 - "HID:WIZARDS_HID_TXTSENDERSTREET", # HID:41138 - "HID:WIZARDS_HID_TXTSENDERPOSTCODE", # HID:41139 - "HID:WIZARDS_HID_TXTSENDERSTATE", # HID:41140 - "HID:WIZARDS_HID_TXTSENDERCITY", # HID:41141 - "HID:WIZARDS_HID_TXTSENDERFAX", # HID:41142 - "HID:WIZARDS_HID_OPTRECEIVERPLACEHOLDER", # HID:41143 - "HID:WIZARDS_HID_OPTRECEIVERDATABASE", # HID:41144 - "HID:WIZARDS_HID_TXTFOOTER", # HID:41145 - "HID:WIZARDS_HID_CHKFOOTERNEXTPAGES", # HID:41146 - "HID:WIZARDS_HID_CHKFOOTERPAGENUMBERS", # HID:41147 - "HID:WIZARDS_HID_TXTTEMPLATENAME", # HID:41148 - "HID:WIZARDS_HID_FILETEMPLATEPATH", # HID:41149 - "HID:WIZARDS_HID_OPTCREATEFAX", # HID:41150 - "HID:WIZARDS_HID_OPTMAKECHANGES", # HID:41151 - "HID:WIZARDS_HID_IMAGECONTROL2", # HID:41152 - "HID:WIZARDS_HID_FAXWIZ_TXTPATH", # HID:41153 - "HID:WIZARDS_HID_FAXWIZ_CMDPATH", # HID:41154 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_FAXWIZARD", # HID:41180 - "HID:WIZARDS_HID_FAXWIZARD_HELP", # HID:41181 - "HID:WIZARDS_HID_FAXWIZARD_BACK", # HID:41182 - "HID:WIZARDS_HID_FAXWIZARD_NEXT", # HID:41183 - "HID:WIZARDS_HID_FAXWIZARD_CREATE", # HID:41184 - "HID:WIZARDS_HID_FAXWIZARD_CANCEL", # HID:41185 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "HID:WIZARDS_HID_DLGTABLE_DIALOG", # HID:41200 - "", - "HID:WIZARDS_HID_DLGTABLE_CMDPREV", # HID:41202 - "HID:WIZARDS_HID_DLGTABLE_CMDNEXT", # HID:41203 - "HID:WIZARDS_HID_DLGTABLE_CMDFINISH", # HID:41204 - "HID:WIZARDS_HID_DLGTABLE_CMDCANCEL", # HID:41205 - "HID:WIZARDS_HID_DLGTABLE_OPTBUSINESS", # HID:41206 - "HID:WIZARDS_HID_DLGTABLE_OPTPRIVATE", # HID:41207 - "HID:WIZARDS_HID_DLGTABLE_LBTABLES", # HID:41208 - "HID:WIZARDS_HID_DLGTABLE_FIELDSAVAILABLE", # HID:41209 - "HID:WIZARDS_HID_DLGTABLE_CMDMOVESELECTED", # HID:41210 - "HID:WIZARDS_HID_DLGTABLE_CMDMOVEALL", # HID:41211 - "HID:WIZARDS_HID_DLGTABLE_CMDREMOVESELECTED", # HID:41212 - "HID:WIZARDS_HID_DLGTABLE_CMDREMOVEALL", # HID:41213 - "HID:WIZARDS_HID_DLGTABLE_FIELDSSELECTED", # HID:41214 - "HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP", # HID:41215 - "HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN", # HID:41216 - "", - "", - "", - "HID:WIZARDS_HID_DLGTABLE_LB_SELFIELDNAMES", # HID:41220 - "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDUP", # HID:41221 - "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDDOWN", # HID:41222 - "HID:WIZARDS_HID_DLGTABLE_CMDMINUS", # HID:41223 - "HID:WIZARDS_HID_DLGTABLE_CMDPLUS", # HID:41224 - "HID:WIZARDS_HID_DLGTABLE_COLNAME", # HID:41225 - "HID:WIZARDS_HID_DLGTABLE_COLMODIFIER", # HID:41226 - "HID:WIZARDS_HID_DLGTABLE_CHK_USEPRIMEKEY", # HID:41227 - "HID:WIZARDS_HID_DLGTABLE_OPT_PK_AUTOMATIC", # HID:41228 - "HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE_AUTOMATIC", # HID:41229 - "HID:WIZARDS_HID_DLGTABLE_OPT_PK_SINGLE", # HID:41230 - "HID:WIZARDS_HID_DLGTABLE_LB_PK_FIELDNAME", # HID:41231 - "HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE", # HID:41232 - "HID:WIZARDS_HID_DLGTABLE_OPT_PK_SEVERAL", # HID:41233 - "HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_AVAILABLE", # HID:41234 - "HID:WIZARDS_HID_DLGTABLE_CMDMOVE_PK_SELECTED", # HID:41235 - "HID:WIZARDS_HID_DLGTABLE_CMDREMOVE_PK_SELECTED", # HID:41236 - "HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_SELECTED", # HID:41237 - "HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP_PK_SELECTED", # HID:41238 - "HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN_PK_SELECTED", # HID:41239 - "HID:WIZARDS_HID_DLGTABLE_TXT_NAME", # HID:41240 - "HID:WIZARDS_HID_DLGTABLE_OPT_MODIFYTABLE", # HID:41241 - "HID:WIZARDS_HID_DLGTABLE_OPT_WORKWITHTABLE", # HID:41242 - "HID:WIZARDS_HID_DLGTABLE_OPT_STARTFORMWIZARD", # HID:41243 - "HID:WIZARDS_HID_DLGTABLE_LST_CATALOG", # HID:41244 - "HID:WIZARDS_HID_DLGTABLE_LST_SCHEMA" # HID:41245 - ] - - @classmethod - def getHelpIdString(self, nHelpId): - if nHelpId >= 34200 and nHelpId <= 34722: - return HelpIds.array1[nHelpId - 34200] - elif nHelpId >= 40769 and nHelpId <= 41245: - return HelpIds.array2[nHelpId - 40769] - else: - return None - +array1 = [ +"HID:WIZARDS_HID0_WEBWIZARD", # HID:34200 +"HID:WIZARDS_HID0_HELP", # HID:34201 +"HID:WIZARDS_HID0_NEXT", # HID:34202 +"HID:WIZARDS_HID0_PREV", # HID:34203 +"HID:WIZARDS_HID0_CREATE", # HID:34204 +"HID:WIZARDS_HID0_CANCEL", # HID:34205 +"HID:WIZARDS_HID0_STATUS_DIALOG", # HID:34206 +"HID:WIZARDS_HID1_LST_SESSIONS", # HID:34207 +"", +"HID:WIZARDS_HID1_BTN_DEL_SES", # HID:34209 +"HID:WIZARDS_HID2_LST_DOCS", # HID:34210 +"HID:WIZARDS_HID2_BTN_ADD_DOC", # HID:34211 +"HID:WIZARDS_HID2_BTN_REM_DOC", # HID:34212 +"HID:WIZARDS_HID2_BTN_DOC_UP", # HID:34213 +"HID:WIZARDS_HID2_BTN_DOC_DOWN", # HID:34214 +"HID:WIZARDS_HID2_TXT_DOC_TITLE", # HID:34215 +"HID:WIZARDS_HID2_TXT_DOC_DESC", # HID:34216 +"HID:WIZARDS_HID2_TXT_DOC_AUTHOR", # HID:34217 +"HID:WIZARDS_HID2_LST_DOC_EXPORT", # HID:34218 +"HID:WIZARDS_HID2_STATUS_ADD_DOCS", # HID:34219 +"HID:WIZARDS_HID3_IL_LAYOUTS_IMG1", # HID:34220 +"HID:WIZARDS_HID3_IL_LAYOUTS_IMG2", # HID:34221 +"HID:WIZARDS_HID3_IL_LAYOUTS_IMG3", # HID:34222 +"HID:WIZARDS_HID3_IL_LAYOUTS_IMG4", # HID:34223 +"HID:WIZARDS_HID3_IL_LAYOUTS_IMG5", # HID:34224 +"HID:WIZARDS_HID3_IL_LAYOUTS_IMG6", # HID:34225 +"HID:WIZARDS_HID3_IL_LAYOUTS_IMG7", # HID:34226 +"HID:WIZARDS_HID3_IL_LAYOUTS_IMG8", # HID:34227 +"HID:WIZARDS_HID3_IL_LAYOUTS_IMG9", # HID:34228 +"HID:WIZARDS_HID3_IL_LAYOUTS_IMG10", # HID:34229 +"HID:WIZARDS_HID3_IL_LAYOUTS_IMG11", # HID:34230 +"HID:WIZARDS_HID3_IL_LAYOUTS_IMG12", # HID:34231 +"HID:WIZARDS_HID3_IL_LAYOUTS_IMG13", # HID:34232 +"HID:WIZARDS_HID3_IL_LAYOUTS_IMG14", # HID:34233 +"HID:WIZARDS_HID3_IL_LAYOUTS_IMG15", # HID:34234 +"HID:WIZARDS_HID4_CHK_DISPLAY_FILENAME", # HID:34235 +"HID:WIZARDS_HID4_CHK_DISPLAY_DESCRIPTION", # HID:34236 +"HID:WIZARDS_HID4_CHK_DISPLAY_AUTHOR", # HID:34237 +"HID:WIZARDS_HID4_CHK_DISPLAY_CR_DATE", # HID:34238 +"HID:WIZARDS_HID4_CHK_DISPLAY_UP_DATE", # HID:34239 +"HID:WIZARDS_HID4_CHK_DISPLAY_FORMAT", # HID:34240 +"HID:WIZARDS_HID4_CHK_DISPLAY_F_ICON", # HID:34241 +"HID:WIZARDS_HID4_CHK_DISPLAY_PAGES", # HID:34242 +"HID:WIZARDS_HID4_CHK_DISPLAY_SIZE", # HID:34243 +"HID:WIZARDS_HID4_GRP_OPTIMAIZE_640", # HID:34244 +"HID:WIZARDS_HID4_GRP_OPTIMAIZE_800", # HID:34245 +"HID:WIZARDS_HID4_GRP_OPTIMAIZE_1024", # HID:34246 +"HID:WIZARDS_HID5_LST_STYLES", # HID:34247 +"HID:WIZARDS_HID5_BTN_BACKGND", # HID:34248 +"HID:WIZARDS_HID5_BTN_ICONS", # HID:34249 +"HID:WIZARDS_HID6_TXT_SITE_TITLE", # HID:34250 +"", +"", +"HID:WIZARDS_HID6_TXT_SITE_DESC", # HID:34253 +"", +"HID:WIZARDS_HID6_DATE_SITE_CREATED", # HID:34255 +"HID:WIZARDS_HID6_DATE_SITE_UPDATED", # HID:34256 +"", +"HID:WIZARDS_HID6_TXT_SITE_EMAIL", # HID:34258 +"HID:WIZARDS_HID6_TXT_SITE_COPYRIGHT", # HID:34259 +"HID:WIZARDS_HID7_BTN_PREVIEW", # HID:34260 +"HID:WIZARDS_HID7_CHK_PUBLISH_LOCAL", # HID:34261 +"HID:WIZARDS_HID7_TXT_LOCAL", # HID:34262 +"HID:WIZARDS_HID7_BTN_LOCAL", # HID:34263 +"HID:WIZARDS_HID7_CHK_PUBLISH_ZIP", # HID:34264 +"HID:WIZARDS_HID7_TXT_ZIP", # HID:34265 +"HID:WIZARDS_HID7_BTN_ZIP", # HID:34266 +"HID:WIZARDS_HID7_CHK_PUBLISH_FTP", # HID:34267 +"HID:WIZARDS_HID7_TXT_FTP", # HID:34268 +"HID:WIZARDS_HID7_BTN_FTP", # HID:34269 +"HID:WIZARDS_HID7_CHK_SAVE", # HID:34270 +"HID:WIZARDS_HID7_TXT_SAVE", # HID:34271 +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_BG", # HID:34290 +"HID:WIZARDS_HID_BG_BTN_OTHER", # HID:34291 +"HID:WIZARDS_HID_BG_BTN_NONE", # HID:34292 +"HID:WIZARDS_HID_BG_BTN_OK", # HID:34293 +"HID:WIZARDS_HID_BG_BTN_CANCEL", # HID:34294 +"HID:WIZARDS_HID_BG_BTN_BACK", # HID:34295 +"HID:WIZARDS_HID_BG_BTN_FW", # HID:34296 +"HID:WIZARDS_HID_BG_BTN_IMG1", # HID:34297 +"HID:WIZARDS_HID_BG_BTN_IMG2", # HID:34298 +"HID:WIZARDS_HID_BG_BTN_IMG3", # HID:34299 +"HID:WIZARDS_HID_BG_BTN_IMG4", # HID:34300 +"HID:WIZARDS_HID_BG_BTN_IMG5", # HID:34301 +"HID:WIZARDS_HID_BG_BTN_IMG6", # HID:34302 +"HID:WIZARDS_HID_BG_BTN_IMG7", # HID:34303 +"HID:WIZARDS_HID_BG_BTN_IMG8", # HID:34304 +"HID:WIZARDS_HID_BG_BTN_IMG9", # HID:34305 +"HID:WIZARDS_HID_BG_BTN_IMG10", # HID:34306 +"HID:WIZARDS_HID_BG_BTN_IMG11", # HID:34307 +"HID:WIZARDS_HID_BG_BTN_IMG12", # HID:34308 +"HID:WIZARDS_HID_BG_BTN_IMG13", # HID:34309 +"HID:WIZARDS_HID_BG_BTN_IMG14", # HID:34300 +"HID:WIZARDS_HID_BG_BTN_IMG15", # HID:34311 +"HID:WIZARDS_HID_BG_BTN_IMG16", # HID:34312 +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGREPORT_DIALOG", # HID:34320 +"", +"HID:WIZARDS_HID_DLGREPORT_0_CMDPREV", # HID:34322 +"HID:WIZARDS_HID_DLGREPORT_0_CMDNEXT", # HID:34323 +"HID:WIZARDS_HID_DLGREPORT_0_CMDFINISH", # HID:34324 +"HID:WIZARDS_HID_DLGREPORT_0_CMDCANCEL", # HID:34325 +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGREPORT_1_LBTABLES", # HID:34330 +"HID:WIZARDS_HID_DLGREPORT_1_FIELDSAVAILABLE", # HID:34331 +"HID:WIZARDS_HID_DLGREPORT_1_CMDMOVESELECTED", # HID:34332 +"HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEALL", # HID:34333 +"HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVESELECTED", # HID:34334 +"HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVEALL", # HID:34335 +"HID:WIZARDS_HID_DLGREPORT_1_FIELDSSELECTED", # HID:34336 +"HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEUP", # HID:34337 +"HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEDOWN", # HID:34338 +"", +"HID:WIZARDS_HID_DLGREPORT_2_GROUPING", # HID:34340 +"HID:WIZARDS_HID_DLGREPORT_2_CMDGROUP", # HID:34341 +"HID:WIZARDS_HID_DLGREPORT_2_CMDUNGROUP", # HID:34342 +"HID:WIZARDS_HID_DLGREPORT_2_PREGROUPINGDEST", # HID:34343 +"HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEUPGROUP", # HID:34344 +"HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEDOWNGROUP", # HID:34345 +"HID:WIZARDS_HID_DLGREPORT_3_SORT1", # HID:34346 +"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND1", # HID:34347 +"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND1", # HID:34348 +"HID:WIZARDS_HID_DLGREPORT_3_SORT2", # HID:34349 +"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND2", # HID:34350 +"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND2", # HID:34351 +"HID:WIZARDS_HID_DLGREPORT_3_SORT3", # HID:34352 +"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND3", # HID:34353 +"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND3", # HID:34354 +"HID:WIZARDS_HID_DLGREPORT_3_SORT4", # HID:34355 +"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND4", # HID:34356 +"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND4", # HID:34357 +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGREPORT_4_TITLE", # HID:34362 +"HID:WIZARDS_HID_DLGREPORT_4_DATALAYOUT", # HID:34363 +"HID:WIZARDS_HID_DLGREPORT_4_PAGELAYOUT", # HID:34364 +"HID:WIZARDS_HID_DLGREPORT_4_LANDSCAPE", # HID:34365 +"HID:WIZARDS_HID_DLGREPORT_4_PORTRAIT", # HID:34366 +"", +"", +"", +"HID:WIZARDS_HID_DLGREPORT_5_OPTDYNTEMPLATE", # HID:34370 +"HID:WIZARDS_HID_DLGREPORT_5_OPTSTATDOCUMENT", # HID:34371 +"HID:WIZARDS_HID_DLGREPORT_5_TXTTEMPLATEPATH", # HID:34372 +"HID:WIZARDS_HID_DLGREPORT_5_CMDTEMPLATEPATH", # HID:34373 +"HID:WIZARDS_HID_DLGREPORT_5_OPTEDITTEMPLATE", # HID:34374 +"HID:WIZARDS_HID_DLGREPORT_5_OPTUSETEMPLATE", # HID:34375 +"HID:WIZARDS_HID_DLGREPORT_5_TXTDOCUMENTPATH", # HID:34376 +"HID:WIZARDS_HID_DLGREPORT_5_CMDDOCUMENTPATH", # HID:34377 +"HID:WIZARDS_HID_DLGREPORT_5_CHKLINKTODB", # HID:34378 +"", +"", +"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_1", # HID:34381 +"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_2", # HID:34382 +"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_3", # HID:34383 +"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_4", # HID:34384 +"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_5", # HID:34385 +"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_6", # HID:34386 +"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_7", # HID:34387 +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGFORM_DIALOG", # HID:34400 +"", +"HID:WIZARDS_HID_DLGFORM_CMDPREV", # HID:34402 +"HID:WIZARDS_HID_DLGFORM_CMDNEXT", # HID:34403 +"HID:WIZARDS_HID_DLGFORM_CMDFINISH", # HID:34404 +"HID:WIZARDS_HID_DLGFORM_CMDCANCEL", # HID:34405 +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGFORM_MASTER_LBTABLES", # HID:34411 +"HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSAVAILABLE", # HID:34412 +"HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVESELECTED", # HID:34413 +"HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEALL", # HID:34414 +"HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVESELECTED", # HID:34415 +"HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVEALL", # HID:34416 +"HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSSELECTED", # HID:34417 +"HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEUP", # HID:34418 +"HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEDOWN", # HID:34419 +"", +"HID:WIZARDS_HID_DLGFORM_CHKCREATESUBFORM", # HID:34421 +"HID:WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION", # HID:34422 +"HID:WIZARDS_HID_DLGFORM_OPTSELECTMANUALLY", # HID:34423 +"HID:WIZARDS_HID_DLGFORM_lstRELATIONS", # HID:34424 +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGFORM_SUB_LBTABLES", # HID:34431 +"HID:WIZARDS_HID_DLGFORM_SUB_FIELDSAVAILABLE", # HID:34432 +"HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVESELECTED", # HID:34433 +"HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEALL", # HID:34434 +"HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVESELECTED", # HID:34435 +"HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVEALL", # HID:34436 +"HID:WIZARDS_HID_DLGFORM_SUB_FIELDSSELECTED", # HID:34437 +"HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEUP", # HID:34438 +"HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEDOWN", # HID:34439 +"", +"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK1", # HID:34441 +"HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK1", # HID:34442 +"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK2", # HID:34443 +"HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK2", # HID:34444 +"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK3", # HID:34445 +"HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK3", # HID:34446 +"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK4", # HID:34447 +"HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK4", # HID:34448 +"", +"", +"HID:WIZARDS_HID_DLGFORM_CMDALIGNLEFT", # HID:34451 +"HID:WIZARDS_HID_DLGFORM_CMDALIGNRIGHT", # HID:34452 +"HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED", # HID:34453 +"HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED", # HID:34454 +"HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE", # HID:34455 +"HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED", # HID:34456 +"HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED2", # HID:34457 +"HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED2", # HID:34458 +"HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE2", # HID:34459 +"HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED2", # HID:34460 +"HID:WIZARDS_HID_DLGFORM_OPTNEWDATAONLY", # HID:34461 +"HID:WIZARDS_HID_DLGFORM_OPTDISPLAYALLDATA", # HID:34462 +"HID:WIZARDS_HID_DLGFORM_CHKNOMODIFICATION", # HID:34463 +"HID:WIZARDS_HID_DLGFORM_CHKNODELETION", # HID:34464 +"HID:WIZARDS_HID_DLGFORM_CHKNOADDITION", # HID:34465 +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGFORM_LSTSTYLES", # HID:34471 +"HID:WIZARDS_HID_DLGFORM_CMDNOBORDER", # HID:34472 +"HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", # HID:34473 +"HID:WIZARDS_HID_DLGFORM_CMDSIMPLEBORDER", # HID:34474 +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGFORM_TXTPATH", # HID:34481 +"HID:WIZARDS_HID_DLGFORM_OPTWORKWITHFORM", # HID:34482 +"HID:WIZARDS_HID_DLGFORM_OPTMODIFYFORM", # HID:34483 +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGNEWSLTR_DIALOG", # HID:34500 +"HID:WIZARDS_HID_DLGNEWSLTR_OPTSTANDARDLAYOUT", # HID:34501 +"HID:WIZARDS_HID_DLGNEWSLTR_OPTPARTYLAYOUT", # HID:34502 +"HID:WIZARDS_HID_DLGNEWSLTR_OPTBROCHURELAYOUT", # HID:34503 +"HID:WIZARDS_HID_DLGNEWSLTR_OPTSINGLESIDED", # HID:34504 +"HID:WIZARDS_HID_DLGNEWSLTR_OPTDOUBLESIDED", # HID:34505 +"HID:WIZARDS_HID_DLGNEWSLTR_CMDGOON", # HID:34506 +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGDEPOT_DIALOG_SELLBUY", # HID:34520 +"HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SELLBUY", # HID:34521 +"HID:WIZARDS_HID_DLGDEPOT_0_TXTQUANTITY", # HID:34522 +"HID:WIZARDS_HID_DLGDEPOT_0_TXTRATE", # HID:34523 +"HID:WIZARDS_HID_DLGDEPOT_0_TXTDATE", # HID:34524 +"HID:WIZARDS_HID_DLGDEPOT_0_TXTCOMMISSION", # HID:34525 +"HID:WIZARDS_HID_DLGDEPOT_0_TXTFIX", # HID:34526 +"HID:WIZARDS_HID_DLGDEPOT_0_TXTMINIMUM", # HID:34527 +"HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SELLBUY", # HID:34528 +"HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SELLBUY", # HID:34529 +"HID:WIZARDS_HID_DLGDEPOT_1_LSTSELLSTOCKS", # HID:34530 +"HID:WIZARDS_HID_DLGDEPOT_2_LSTBUYSTOCKS", # HID:34531 +"HID:WIZARDS_HID_DLGDEPOT_DIALOG_SPLIT", # HID:34532 +"HID:WIZARDS_HID_DLGDEPOT_0_LSTSTOCKNAMES", # HID:34533 +"HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SPLIT", # HID:34534 +"HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SPLIT", # HID:34535 +"HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SPLIT", # HID:34536 +"HID:WIZARDS_HID_DLGDEPOT_1_OPTPERSHARE", # HID:34537 +"HID:WIZARDS_HID_DLGDEPOT_1_OPTTOTAL", # HID:34538 +"HID:WIZARDS_HID_DLGDEPOT_1_TXTDIVIDEND", # HID:34539 +"HID:WIZARDS_HID_DLGDEPOT_2_TXTOLDRATE", # HID:34540 +"HID:WIZARDS_HID_DLGDEPOT_2_TXTNEWRATE", # HID:34541 +"HID:WIZARDS_HID_DLGDEPOT_2_TXTDATE", # HID:34542 +"HID:WIZARDS_HID_DLGDEPOT_3_TXTSTARTDATE", # HID:34543 +"HID:WIZARDS_HID_DLGDEPOT_3_TXTENDDATE", # HID:34544 +"HID:WIZARDS_HID_DLGDEPOT_3_OPTDAILY", # HID:34545 +"HID:WIZARDS_HID_DLGDEPOT_3_OPTWEEKLY", # HID:34546 +"HID:WIZARDS_HID_DLGDEPOT_DIALOG_HISTORY", # HID:34547 +"HID:WIZARDS_HID_DLGDEPOT_LSTMARKETS", # HID:34548 +"HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_HISTORY", # HID:34549 +"HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_HISTORY", # HID:34550 +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGIMPORT_DIALOG", # HID:34570 +"HID:WIZARDS_HID_DLGIMPORT_0_CMDHELP", # HID:34571 +"HID:WIZARDS_HID_DLGIMPORT_0_CMDCANCEL", # HID:34572 +"HID:WIZARDS_HID_DLGIMPORT_0_CMDPREV", # HID:34573 +"HID:WIZARDS_HID_DLGIMPORT_0_CMDNEXT", # HID:34574 +"HID:WIZARDS_HID_DLGIMPORT_0_OPTSODOCUMENTS", # HID:34575 +"HID:WIZARDS_HID_DLGIMPORT_0_OPTMSDOCUMENTS", # HID:34576 +"HID:WIZARDS_HID_DLGIMPORT_0_CHKLOGFILE", # HID:34577 +"HID:WIZARDS_HID_DLGIMPORT_2_CHKWORD", # HID:34578 +"HID:WIZARDS_HID_DLGIMPORT_2_CHKEXCEL", # HID:34579 +"HID:WIZARDS_HID_DLGIMPORT_2_CHKPOWERPOINT", # HID:34580 +"HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATE", # HID:34581 +"HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATERECURSE", # HID:34582 +"HID:WIZARDS_HID_DLGIMPORT_2_LBTEMPLATEPATH", # HID:34583 +"HID:WIZARDS_HID_DLGIMPORT_2_EDTEMPLATEPATH", # HID:34584 +"HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT", # HID:34585 +"HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENT", # HID:34586 +"HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENTRECURSE", # HID:34587 +"HID:WIZARDS_HID_DLGIMPORT_2_LBDOCUMENTPATH", # HID:34588 +"HID:WIZARDS_HID_DLGIMPORT_2_EDDOCUMENTPATH", # HID:34589 +"HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT", # HID:34590 +"HID:WIZARDS_HID_DLGIMPORT_2_LBEXPORTDOCUMENTPATH", # HID:34591 +"HID:WIZARDS_HID_DLGIMPORT_2_EDEXPORTDOCUMENTPATH", # HID:34592 +"HID:WIZARDS_HID_DLGIMPORT_2_CMDEXPORTPATHSELECT", # HID:34593 +"", +"HID:WIZARDS_HID_DLGIMPORT_3_TBSUMMARY", # HID:34595 +"HID:WIZARDS_HID_DLGIMPORT_0_CHKWRITER", # HID:34596 +"HID:WIZARDS_HID_DLGIMPORT_0_CHKCALC", # HID:34597 +"HID:WIZARDS_HID_DLGIMPORT_0_CHKIMPRESS", # HID:34598 +"HID:WIZARDS_HID_DLGIMPORT_0_CHKMATHGLOBAL", # HID:34599 +"HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT2", # HID:34600 +"HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT2", # HID:34601 +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGCORRESPONDENCE_DIALOG", # HID:34630 +"HID:WIZARDS_HID_DLGCORRESPONDENCE_CANCEL", # HID:34631 +"HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA1", # HID:34632 +"HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA2", # HID:34633 +"HID:WIZARDS_HID_DLGCORRESPONDENCE_AGENDAOKAY", # HID:34634 +"HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER1", # HID:34635 +"HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER2", # HID:34636 +"HID:WIZARDS_HID_DLGCORRESPONDENCE_LETTEROKAY", # HID:34637 +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGSTYLES_DIALOG", # HID:34650 +"HID:WIZARDS_HID_DLGSTYLES_LISTBOX", # HID:34651 +"HID:WIZARDS_HID_DLGSTYLES_CANCEL", # HID:34652 +"HID:WIZARDS_HID_DLGSTYLES_OKAY", # HID:34653 +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGCONVERT_DIALOG", # HID:34660 +"HID:WIZARDS_HID_DLGCONVERT_CHECKBOX1", # HID:34661 +"HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON1", # HID:34662 +"HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON2", # HID:34663 +"HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON3", # HID:34664 +"HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON4", # HID:34665 +"HID:WIZARDS_HID_DLGCONVERT_LISTBOX1", # HID:34666 +"HID:WIZARDS_HID_DLGCONVERT_OBFILE", # HID:34667 +"HID:WIZARDS_HID_DLGCONVERT_OBDIR", # HID:34668 +"HID:WIZARDS_HID_DLGCONVERT_COMBOBOX1", # HID:34669 +"HID:WIZARDS_HID_DLGCONVERT_TBSOURCE", # HID:34670 +"HID:WIZARDS_HID_DLGCONVERT_CHECKRECURSIVE", # HID:34671 +"HID:WIZARDS_HID_DLGCONVERT_TBTARGET", # HID:34672 +"HID:WIZARDS_HID_DLGCONVERT_CBCANCEL", # HID:34673 +"HID:WIZARDS_HID_DLGCONVERT_CBHELP", # HID:34674 +"HID:WIZARDS_HID_DLGCONVERT_CBBACK", # HID:34675 +"HID:WIZARDS_HID_DLGCONVERT_CBGOON", # HID:34676 +"HID:WIZARDS_HID_DLGCONVERT_CBSOURCEOPEN", # HID:34677 +"HID:WIZARDS_HID_DLGCONVERT_CBTARGETOPEN", # HID:34678 +"HID:WIZARDS_HID_DLGCONVERT_CHKPROTECT", # HID:34679 +"HID:WIZARDS_HID_DLGCONVERT_CHKTEXTDOCUMENTS", # HID:34680 +"", +"", +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGPASSWORD_CMDGOON", # HID:34690 +"HID:WIZARDS_HID_DLGPASSWORD_CMDCANCEL", # HID:34691 +"HID:WIZARDS_HID_DLGPASSWORD_CMDHELP", # HID:34692 +"HID:WIZARDS_HID_DLGPASSWORD_TXTPASSWORD", # HID:34693 +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGHOLIDAYCAL_DIALOG", # HID:34700 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_PREVIEW", # HID:34701 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPYEAR", # HID:34702 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPMONTH", # HID:34703 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDYEAR", # HID:34704 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDMONTH", # HID:34705 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINYEAR", # HID:34706 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINMONTH", # HID:34707 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_CMBSTATE", # HID:34708 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_LBOWNDATA", # HID:34709 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDINSERT", # HID:34710 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDDELETE", # HID:34711 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENT", # HID:34712 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CHKEVENT", # HID:34713 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTDAY", # HID:34714 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTDAY", # HID:34715 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTMONTH", # HID:34716 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTMONTH", # HID:34717 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTYEAR", # HID:34718 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTYEAR", # HID:34719 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOWNDATA", # HID:34720 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDCANCEL", # HID:34721 +"HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOK" # HID:34722 +] +array2 = ["HID:WIZARDS_HID_LTRWIZ_OPTBUSINESSLETTER", # HID:40769 +"HID:WIZARDS_HID_LTRWIZ_OPTPRIVOFFICIALLETTER", # HID:40770 +"HID:WIZARDS_HID_LTRWIZ_OPTPRIVATELETTER", # HID:40771 +"HID:WIZARDS_HID_LTRWIZ_LSTBUSINESSSTYLE", # HID:40772 +"HID:WIZARDS_HID_LTRWIZ_CHKBUSINESSPAPER", # HID:40773 +"HID:WIZARDS_HID_LTRWIZ_LSTPRIVOFFICIALSTYLE", # HID:40774 +"HID:WIZARDS_HID_LTRWIZ_LSTPRIVATESTYLE", # HID:40775 +"HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYLOGO", # HID:40776 +"HID:WIZARDS_HID_LTRWIZ_NUMLOGOHEIGHT", # HID:40777 +"HID:WIZARDS_HID_LTRWIZ_NUMLOGOX", # HID:40778 +"HID:WIZARDS_HID_LTRWIZ_NUMLOGOWIDTH", # HID:40779 +"HID:WIZARDS_HID_LTRWIZ_NUMLOGOY", # HID:40780 +"HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYADDRESS", # HID:40781 +"HID:WIZARDS_HID_LTRWIZ_NUMADDRESSHEIGHT", # HID:40782 +"HID:WIZARDS_HID_LTRWIZ_NUMADDRESSX", # HID:40783 +"HID:WIZARDS_HID_LTRWIZ_NUMADDRESSWIDTH", # HID:40784 +"HID:WIZARDS_HID_LTRWIZ_NUMADDRESSY", # HID:40785 +"HID:WIZARDS_HID_LTRWIZ_CHKCOMPANYRECEIVER", # HID:40786 +"HID:WIZARDS_HID_LTRWIZ_CHKPAPERFOOTER", # HID:40787 +"HID:WIZARDS_HID_LTRWIZ_NUMFOOTERHEIGHT", # HID:40788 +"HID:WIZARDS_HID_LTRWIZ_LSTLETTERNORM", # HID:40789 +"HID:WIZARDS_HID_LTRWIZ_CHKUSELOGO", # HID:40790 +"HID:WIZARDS_HID_LTRWIZ_CHKUSEADDRESSRECEIVER", # HID:40791 +"HID:WIZARDS_HID_LTRWIZ_CHKUSESIGNS", # HID:40792 +"HID:WIZARDS_HID_LTRWIZ_CHKUSESUBJECT", # HID:40793 +"HID:WIZARDS_HID_LTRWIZ_CHKUSESALUTATION", # HID:40794 +"HID:WIZARDS_HID_LTRWIZ_LSTSALUTATION", # HID:40795 +"HID:WIZARDS_HID_LTRWIZ_CHKUSEBENDMARKS", # HID:40796 +"HID:WIZARDS_HID_LTRWIZ_CHKUSEGREETING", # HID:40797 +"HID:WIZARDS_HID_LTRWIZ_LSTGREETING", # HID:40798 +"HID:WIZARDS_HID_LTRWIZ_CHKUSEFOOTER", # HID:40799 +"HID:WIZARDS_HID_LTRWIZ_OPTSENDERPLACEHOLDER", # HID:40800 +"HID:WIZARDS_HID_LTRWIZ_OPTSENDERDEFINE", # HID:40801 +"HID:WIZARDS_HID_LTRWIZ_TXTSENDERNAME", # HID:40802 +"HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTREET", # HID:40803 +"HID:WIZARDS_HID_LTRWIZ_TXTSENDERPOSTCODE", # HID:40804 +"HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTATE_TEXT", # HID:40805 +"HID:WIZARDS_HID_LTRWIZ_TXTSENDERCITY", # HID:40806 +"HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERPLACEHOLDER", # HID:40807 +"HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERDATABASE", # HID:40808 +"HID:WIZARDS_HID_LTRWIZ_TXTFOOTER", # HID:40809 +"HID:WIZARDS_HID_LTRWIZ_CHKFOOTERNEXTPAGES", # HID:40810 +"HID:WIZARDS_HID_LTRWIZ_CHKFOOTERPAGENUMBERS", # HID:40811 +"HID:WIZARDS_HID_LTRWIZ_TXTTEMPLATENAME", # HID:40812 +"HID:WIZARDS_HID_LTRWIZ_OPTCREATELETTER", # HID:40813 +"HID:WIZARDS_HID_LTRWIZ_OPTMAKECHANGES", # HID:40814 +"HID:WIZARDS_HID_LTRWIZ_TXTPATH", # HID:40815 +"HID:WIZARDS_HID_LTRWIZ_CMDPATH", # HID:40816 +"", +"", +"", +"HID:WIZARDS_HID_LTRWIZARD", # HID:40820 +"HID:WIZARDS_HID_LTRWIZARD_HELP", # HID:40821 +"HID:WIZARDS_HID_LTRWIZARD_BACK", # HID:40822 +"HID:WIZARDS_HID_LTRWIZARD_NEXT", # HID:40823 +"HID:WIZARDS_HID_LTRWIZARD_CREATE", # HID:40824 +"HID:WIZARDS_HID_LTRWIZARD_CANCEL", # HID:40825 +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_QUERYWIZARD_LSTTABLES", # HID:40850 +"HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDS", # HID:40851 +"HID:WIZARDS_HID_QUERYWIZARD_CMDMOVESELECTED", # HID:40852 +"HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEALL", # HID:40853 +"HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVESELECTED", # HID:40854 +"HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVEALL", # HID:40855 +"HID:WIZARDS_HID_QUERYWIZARD_LSTSELFIELDS", # HID:40856 +"HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEUP", # HID:40857 +"HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEDOWN", # HID:40858 +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_QUERYWIZARD_SORT1", # HID:40865 +"HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND1", # HID:40866 +"HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND1", # HID:40867 +"HID:WIZARDS_HID_QUERYWIZARD_SORT2", # HID:40868 +"HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND2", # HID:40869 +"HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND2", # HID:40870 +"HID:WIZARDS_HID_QUERYWIZARD_SORT3", # HID:40871 +"HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND3", # HID:40872 +"HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND3", # HID:40873 +"HID:WIZARDS_HID_QUERYWIZARD_SORT4", # HID:40874 +"HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND4", # HID:40875 +"HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND4", # HID:40876 +"", +"HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHALL", # HID:40878 +"HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHANY", # HID:40879 +"HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_1", # HID:40880 +"HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_1", # HID:40881 +"HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_1", # HID:40882 +"HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_2", # HID:40883 +"HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_2", # HID:40884 +"HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_2", # HID:40885 +"HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_3", # HID:40886 +"HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_3", # HID:40887 +"HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_3", # HID:40888 +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATEDETAILQUERY", # HID:40895 +"HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATESUMMARYQUERY", # HID:40896 +"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_1", # HID:40897 +"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_1", # HID:40898 +"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_2", # HID:40899 +"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_2", # HID:40900 +"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_3", # HID:40901 +"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_3", # HID:40902 +"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_4", # HID:40903 +"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_4", # HID:40904 +"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_5", # HID:40905 +"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_5", # HID:40906 +"HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEPLUS", # HID:40907 +"HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEMINUS", # HID:40908 +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDS", # HID:40915 +"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVESELECTED", # HID:40916 +"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERREMOVESELECTED", # HID:40917 +"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERSELFIELDS", # HID:40918 +"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEUP", # HID:40919 +"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEDOWN", # HID:40920 +"", +"", +"HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHALL", # HID:40923 +"HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHANY", # HID:40924 +"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_1", # HID:40925 +"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_1", # HID:40926 +"HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_1", # HID:40927 +"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_2", # HID:40928 +"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_2", # HID:40929 +"HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_2", # HID:40930 +"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_3", # HID:40931 +"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_3", # HID:40932 +"HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_3", # HID:40933 +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_1", # HID:40940 +"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_2", # HID:40941 +"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_3", # HID:40942 +"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_4", # HID:40943 +"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_5", # HID:40944 +"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_6", # HID:40945 +"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_7", # HID:40946 +"", +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_QUERYWIZARD_TXTQUERYTITLE", # HID:40955 +"HID:WIZARDS_HID_QUERYWIZARD_OPTDISPLAYQUERY", # HID:40956 +"HID:WIZARDS_HID_QUERYWIZARD_OPTMODIFYQUERY", # HID:40957 +"HID:WIZARDS_HID_QUERYWIZARD_TXTSUMMARY", # HID:40958 +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_QUERYWIZARD", # HID:40970 +"", +"HID:WIZARDS_HID_QUERYWIZARD_BACK", # HID:40972 +"HID:WIZARDS_HID_QUERYWIZARD_NEXT", # HID:40973 +"HID:WIZARDS_HID_QUERYWIZARD_CREATE", # HID:40974 +"HID:WIZARDS_HID_QUERYWIZARD_CANCEL", # HID:40975 +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_IS", # HID:41000 +"", "HID:WIZARDS_HID_IS_BTN_NONE", # HID:41002 +"HID:WIZARDS_HID_IS_BTN_OK", # HID:41003 +"HID:WIZARDS_HID_IS_BTN_CANCEL", # HID:41004 +"HID:WIZARDS_HID_IS_BTN_IMG1", # HID:41005 +"HID:WIZARDS_HID_IS_BTN_IMG2", # HID:41006 +"HID:WIZARDS_HID_IS_BTN_IMG3", # HID:41007 +"HID:WIZARDS_HID_IS_BTN_IMG4", # HID:41008 +"HID:WIZARDS_HID_IS_BTN_IMG5", # HID:41009 +"HID:WIZARDS_HID_IS_BTN_IMG6", # HID:41010 +"HID:WIZARDS_HID_IS_BTN_IMG7", # HID:41011 +"HID:WIZARDS_HID_IS_BTN_IMG8", # HID:41012 +"HID:WIZARDS_HID_IS_BTN_IMG9", # HID:41013 +"HID:WIZARDS_HID_IS_BTN_IMG10", # HID:41014 +"HID:WIZARDS_HID_IS_BTN_IMG11", # HID:41015 +"HID:WIZARDS_HID_IS_BTN_IMG12", # HID:41016 +"HID:WIZARDS_HID_IS_BTN_IMG13", # HID:41017 +"HID:WIZARDS_HID_IS_BTN_IMG14", # HID:41018 +"HID:WIZARDS_HID_IS_BTN_IMG15", # HID:41019 +"HID:WIZARDS_HID_IS_BTN_IMG16", # HID:41020 +"HID:WIZARDS_HID_IS_BTN_IMG17", # HID:41021 +"HID:WIZARDS_HID_IS_BTN_IMG18", # HID:41022 +"HID:WIZARDS_HID_IS_BTN_IMG19", # HID:41023 +"HID:WIZARDS_HID_IS_BTN_IMG20", # HID:41024 +"HID:WIZARDS_HID_IS_BTN_IMG21", # HID:41025 +"HID:WIZARDS_HID_IS_BTN_IMG22", # HID:41026 +"HID:WIZARDS_HID_IS_BTN_IMG23", # HID:41027 +"HID:WIZARDS_HID_IS_BTN_IMG24", # HID:41028 +"HID:WIZARDS_HID_IS_BTN_IMG25", # HID:41029 +"HID:WIZARDS_HID_IS_BTN_IMG26", # HID:41030 +"HID:WIZARDS_HID_IS_BTN_IMG27", # HID:41031 +"HID:WIZARDS_HID_IS_BTN_IMG28", # HID:41032 +"HID:WIZARDS_HID_IS_BTN_IMG29", # HID:41033 +"HID:WIZARDS_HID_IS_BTN_IMG30", # HID:41034 +"HID:WIZARDS_HID_IS_BTN_IMG31", # HID:41035 +"HID:WIZARDS_HID_IS_BTN_IMG32", # HID:41036 +"", +"", +"", +"HID:WIZARDS_HID_FTP", # HID:41040 +"HID:WIZARDS_HID_FTP_SERVER", # HID:41041 +"HID:WIZARDS_HID_FTP_USERNAME", # HID:41042 +"HID:WIZARDS_HID_FTP_PASS", # HID:41043 +"HID:WIZARDS_HID_FTP_TEST", # HID:41044 +"HID:WIZARDS_HID_FTP_TXT_PATH", # HID:41045 +"HID:WIZARDS_HID_FTP_BTN_PATH", # HID:41046 +"HID:WIZARDS_HID_FTP_OK", # HID:41047 +"HID:WIZARDS_HID_FTP_CANCEL", # HID:41048 +"", +"", +"HID:WIZARDS_HID_AGWIZ", # HID:41051 +"HID:WIZARDS_HID_AGWIZ_HELP", # HID:41052 +"HID:WIZARDS_HID_AGWIZ_NEXT", # HID:41053 +"HID:WIZARDS_HID_AGWIZ_PREV", # HID:41054 +"HID:WIZARDS_HID_AGWIZ_CREATE", # HID:41055 +"HID:WIZARDS_HID_AGWIZ_CANCEL", # HID:41056 +"HID:WIZARDS_HID_AGWIZ_1_LIST_PAGEDESIGN", # HID:41057 +"HID:WIZARDS_HID_AGWIZ_1_CHK_MINUTES", # HID:41058 +"HID:WIZARDS_HID_AGWIZ_2_TXT_TIME", # HID:41059 +"HID:WIZARDS_HID_AGWIZ_2_TXT_DATE", # HID:41060 +"HID:WIZARDS_HID_AGWIZ_2_TXT_TITLE", # HID:41061 +"HID:WIZARDS_HID_AGWIZ_2_TXT_LOCATION", # HID:41062 +"HID:WIZARDS_HID_AGWIZ_3_CHK_MEETING_TYPE", # HID:41063 +"HID:WIZARDS_HID_AGWIZ_3_CHK_READ", # HID:41064 +"HID:WIZARDS_HID_AGWIZ_3_CHK_BRING", # HID:41065 +"HID:WIZARDS_HID_AGWIZ_3_CHK_NOTES", # HID:41066 +"HID:WIZARDS_HID_AGWIZ_4_CHK_CALLED_BY", # HID:41067 +"HID:WIZARDS_HID_AGWIZ_4_CHK_FACILITATOR", # HID:41068 +"HID:WIZARDS_HID_AGWIZ_4_CHK_NOTETAKER", # HID:41069 +"HID:WIZARDS_HID_AGWIZ_4_CHK_TIMEKEEPER", # HID:41070 +"HID:WIZARDS_HID_AGWIZ_4_CHK_ATTENDEES", # HID:41071 +"HID:WIZARDS_HID_AGWIZ_4_CHK_OBSERVERS", # HID:41072 +"HID:WIZARDS_HID_AGWIZ_4_CHK_RESOURCEPERSONS", # HID:41073 +"HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATENAME", # HID:41074 +"HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATEPATH", # HID:41075 +"HID:WIZARDS_HID_AGWIZ_6_BTN_TEMPLATEPATH", # HID:41076 +"HID:WIZARDS_HID_AGWIZ_6_OPT_CREATEAGENDA", # HID:41077 +"HID:WIZARDS_HID_AGWIZ_6_OPT_MAKECHANGES", # HID:41078 +"HID:WIZARDS_HID_AGWIZ_5_BTN_INSERT", # HID:41079 +"HID:WIZARDS_HID_AGWIZ_5_BTN_REMOVE", # HID:41080 +"HID:WIZARDS_HID_AGWIZ_5_BTN_UP", # HID:41081 +"HID:WIZARDS_HID_AGWIZ_5_BTN_DOWN", # HID:41082 +"HID:WIZARDS_HID_AGWIZ_5_SCROLL_BAR", # HID:41083 +"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_1", # HID:41084 +"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_1", # HID:41085 +"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_1", # HID:41086 +"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_2", # HID:41087 +"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_2", # HID:41088 +"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_2", # HID:41089 +"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_3", # HID:41090 +"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_3", # HID:41091 +"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_3", # HID:41092 +"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_4", # HID:41093 +"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_4", # HID:41094 +"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_4", # HID:41095 +"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_5", # HID:41096 +"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_5", # HID:41097 +"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_5", # HID:41098 +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_FAXWIZ_OPTBUSINESSFAX", # HID:41120 +"HID:WIZARDS_HID_FAXWIZ_LSTBUSINESSSTYLE", # HID:41121 +"HID:WIZARDS_HID_FAXWIZ_OPTPRIVATEFAX", # HID:41122 +"HID:WIZARDS_HID_LSTPRIVATESTYLE", # HID:41123 +"HID:WIZARDS_HID_IMAGECONTROL3", # HID:41124 +"HID:WIZARDS_HID_CHKUSELOGO", # HID:41125 +"HID:WIZARDS_HID_CHKUSEDATE", # HID:41126 +"HID:WIZARDS_HID_CHKUSECOMMUNICATIONTYPE", # HID:41127 +"HID:WIZARDS_HID_LSTCOMMUNICATIONTYPE", # HID:41128 +"HID:WIZARDS_HID_CHKUSESUBJECT", # HID:41129 +"HID:WIZARDS_HID_CHKUSESALUTATION", # HID:41130 +"HID:WIZARDS_HID_LSTSALUTATION", # HID:41131 +"HID:WIZARDS_HID_CHKUSEGREETING", # HID:41132 +"HID:WIZARDS_HID_LSTGREETING", # HID:41133 +"HID:WIZARDS_HID_CHKUSEFOOTER", # HID:41134 +"HID:WIZARDS_HID_OPTSENDERPLACEHOLDER", # HID:41135 +"HID:WIZARDS_HID_OPTSENDERDEFINE", # HID:41136 +"HID:WIZARDS_HID_TXTSENDERNAME", # HID:41137 +"HID:WIZARDS_HID_TXTSENDERSTREET", # HID:41138 +"HID:WIZARDS_HID_TXTSENDERPOSTCODE", # HID:41139 +"HID:WIZARDS_HID_TXTSENDERSTATE", # HID:41140 +"HID:WIZARDS_HID_TXTSENDERCITY", # HID:41141 +"HID:WIZARDS_HID_TXTSENDERFAX", # HID:41142 +"HID:WIZARDS_HID_OPTRECEIVERPLACEHOLDER", # HID:41143 +"HID:WIZARDS_HID_OPTRECEIVERDATABASE", # HID:41144 +"HID:WIZARDS_HID_TXTFOOTER", # HID:41145 +"HID:WIZARDS_HID_CHKFOOTERNEXTPAGES", # HID:41146 +"HID:WIZARDS_HID_CHKFOOTERPAGENUMBERS", # HID:41147 +"HID:WIZARDS_HID_TXTTEMPLATENAME", # HID:41148 +"HID:WIZARDS_HID_FILETEMPLATEPATH", # HID:41149 +"HID:WIZARDS_HID_OPTCREATEFAX", # HID:41150 +"HID:WIZARDS_HID_OPTMAKECHANGES", # HID:41151 +"HID:WIZARDS_HID_IMAGECONTROL2", # HID:41152 +"HID:WIZARDS_HID_FAXWIZ_TXTPATH", # HID:41153 +"HID:WIZARDS_HID_FAXWIZ_CMDPATH", # HID:41154 +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_FAXWIZARD", # HID:41180 +"HID:WIZARDS_HID_FAXWIZARD_HELP", # HID:41181 +"HID:WIZARDS_HID_FAXWIZARD_BACK", # HID:41182 +"HID:WIZARDS_HID_FAXWIZARD_NEXT", # HID:41183 +"HID:WIZARDS_HID_FAXWIZARD_CREATE", # HID:41184 +"HID:WIZARDS_HID_FAXWIZARD_CANCEL", # HID:41185 +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"HID:WIZARDS_HID_DLGTABLE_DIALOG", # HID:41200 +"", +"HID:WIZARDS_HID_DLGTABLE_CMDPREV", # HID:41202 +"HID:WIZARDS_HID_DLGTABLE_CMDNEXT", # HID:41203 +"HID:WIZARDS_HID_DLGTABLE_CMDFINISH", # HID:41204 +"HID:WIZARDS_HID_DLGTABLE_CMDCANCEL", # HID:41205 +"HID:WIZARDS_HID_DLGTABLE_OPTBUSINESS", # HID:41206 +"HID:WIZARDS_HID_DLGTABLE_OPTPRIVATE", # HID:41207 +"HID:WIZARDS_HID_DLGTABLE_LBTABLES", # HID:41208 +"HID:WIZARDS_HID_DLGTABLE_FIELDSAVAILABLE", # HID:41209 +"HID:WIZARDS_HID_DLGTABLE_CMDMOVESELECTED", # HID:41210 +"HID:WIZARDS_HID_DLGTABLE_CMDMOVEALL", # HID:41211 +"HID:WIZARDS_HID_DLGTABLE_CMDREMOVESELECTED", # HID:41212 +"HID:WIZARDS_HID_DLGTABLE_CMDREMOVEALL", # HID:41213 +"HID:WIZARDS_HID_DLGTABLE_FIELDSSELECTED", # HID:41214 +"HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP", # HID:41215 +"HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN", # HID:41216 +"", +"", +"", +"HID:WIZARDS_HID_DLGTABLE_LB_SELFIELDNAMES", # HID:41220 +"HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDUP", # HID:41221 +"HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDDOWN", # HID:41222 +"HID:WIZARDS_HID_DLGTABLE_CMDMINUS", # HID:41223 +"HID:WIZARDS_HID_DLGTABLE_CMDPLUS", # HID:41224 +"HID:WIZARDS_HID_DLGTABLE_COLNAME", # HID:41225 +"HID:WIZARDS_HID_DLGTABLE_COLMODIFIER", # HID:41226 +"HID:WIZARDS_HID_DLGTABLE_CHK_USEPRIMEKEY", # HID:41227 +"HID:WIZARDS_HID_DLGTABLE_OPT_PK_AUTOMATIC", # HID:41228 +"HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE_AUTOMATIC", # HID:41229 +"HID:WIZARDS_HID_DLGTABLE_OPT_PK_SINGLE", # HID:41230 +"HID:WIZARDS_HID_DLGTABLE_LB_PK_FIELDNAME", # HID:41231 +"HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE", # HID:41232 +"HID:WIZARDS_HID_DLGTABLE_OPT_PK_SEVERAL", # HID:41233 +"HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_AVAILABLE", # HID:41234 +"HID:WIZARDS_HID_DLGTABLE_CMDMOVE_PK_SELECTED", # HID:41235 +"HID:WIZARDS_HID_DLGTABLE_CMDREMOVE_PK_SELECTED", # HID:41236 +"HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_SELECTED", # HID:41237 +"HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP_PK_SELECTED", # HID:41238 +"HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN_PK_SELECTED", # HID:41239 +"HID:WIZARDS_HID_DLGTABLE_TXT_NAME", # HID:41240 +"HID:WIZARDS_HID_DLGTABLE_OPT_MODIFYTABLE", # HID:41241 +"HID:WIZARDS_HID_DLGTABLE_OPT_WORKWITHTABLE", # HID:41242 +"HID:WIZARDS_HID_DLGTABLE_OPT_STARTFORMWIZARD", # HID:41243 +"HID:WIZARDS_HID_DLGTABLE_LST_CATALOG", # HID:41244 +"HID:WIZARDS_HID_DLGTABLE_LST_SCHEMA" # HID:41245 +] diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py index 3514c4ead..393c1b4c1 100644 --- a/wizards/com/sun/star/wizards/common/Helper.py +++ b/wizards/com/sun/star/wizards/common/Helper.py @@ -26,7 +26,6 @@ class Helper(object): raise ValueError("No Such Property: '" + PropertyName + "'"); except UnoException, exception: - print PropertyName traceback.print_exc() @classmethod diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py index 9ff238354..513331fb3 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py @@ -36,10 +36,10 @@ class FaxWizardDialog(WizardDialog): #build components def buildStep1(self): - self.optBusinessFax = self.insertRadioButton("optBusinessFax", OPTBUSINESSFAX_ITEM_CHANGED,(PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTBUSINESSFAX_HID, self.resources.resoptBusinessFax_value, 97, 28, 1, uno.Any("short",1), 184)) - self.lstBusinessStyle = self.insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTBUSINESSSTYLE_HID, 180, 40, 1, uno.Any("short",3), 74)) - self.optPrivateFax = self.insertRadioButton("optPrivateFax", OPTPRIVATEFAX_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTPRIVATEFAX_HID, self.resources.resoptPrivateFax_value, 97, 81, 1, uno.Any("short",2), 184)) - self.lstPrivateStyle = self.insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTPRIVATESTYLE_HID, 180, 95, 1, uno.Any("short",4), 74)) + self.optBusinessFax = self.insertRadioButton("optBusinessFax", OPTBUSINESSFAX_ITEM_CHANGED,(PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTBUSINESSFAX_HID, self.resources.resoptBusinessFax_value, 97, 28, 1, uno.Any("short",1), 184), self) + self.lstBusinessStyle = self.insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTBUSINESSSTYLE_HID, 180, 40, 1, uno.Any("short",3), 74), self) + self.optPrivateFax = self.insertRadioButton("optPrivateFax", OPTPRIVATEFAX_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTPRIVATEFAX_HID, self.resources.resoptPrivateFax_value, 97, 81, 1, uno.Any("short",2), 184), self) + self.lstPrivateStyle = self.insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTPRIVATESTYLE_HID, 180, 95, 1, uno.Any("short",4), 74), self) self.lblBusinessStyle = self.insertLabel("lblBusinessStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblBusinessStyle_value, 110, 42, 1, uno.Any("short",32), 60)) self.lblTitle1 = self.insertLabel("lblTitle1", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle1_value, True, 91, 8, 1, uno.Any("short",37), 212)) @@ -47,29 +47,29 @@ class FaxWizardDialog(WizardDialog): self.lblIntroduction = self.insertLabel("lblIntroduction", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (39, self.resources.reslblIntroduction_value, True, 104, 145, 1, uno.Any("short",55), 199)) self.ImageControl3 = self.insertInfoImage(92, 145, 1) def buildStep2(self): - self.chkUseLogo = self.insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSELOGO_HID, self.resources.reschkUseLogo_value, 97, 28, uno.Any("short",0), 2, uno.Any("short",5), 212)) - self.chkUseDate = self.insertCheckBox("chkUseDate", CHKUSEDATE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEDATE_HID, self.resources.reschkUseDate_value, 97, 43, uno.Any("short",0), 2,uno.Any("short",6), 212)) - self.chkUseCommunicationType = self.insertCheckBox("chkUseCommunicationType", CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSECOMMUNICATIONTYPE_HID, self.resources.reschkUseCommunicationType_value, 97, 57, uno.Any("short",0), 2, uno.Any("short",07), 100)) - self.lstCommunicationType = self.insertComboBox("lstCommunicationType", LSTCOMMUNICATIONTYPE_ACTION_PERFORMED, LSTCOMMUNICATIONTYPE_ITEM_CHANGED, LSTCOMMUNICATIONTYPE_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTCOMMUNICATIONTYPE_HID, 105, 68, 2, uno.Any("short",8), 174)) - self.chkUseSubject = self.insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSESUBJECT_HID, self.resources.reschkUseSubject_value, 97, 87, uno.Any("short",0), 2, uno.Any("short",9), 212)) - self.chkUseSalutation = self.insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSESALUTATION_HID, self.resources.reschkUseSalutation_value, 97, 102, uno.Any("short",0), 2, uno.Any("short",10), 100)) - self.lstSalutation = self.insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTSALUTATION_HID, 105, 113, 2, uno.Any("short",11), 174)) - self.chkUseGreeting = self.insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEGREETING_HID, self.resources.reschkUseGreeting_value, 97, 132, uno.Any("short",0), 2, uno.Any("short",12), 100)) - self.lstGreeting = self.insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTGREETING_HID, 105, 143, 2,uno.Any("short",13), 174)) - self.chkUseFooter = self.insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEFOOTER_HID, self.resources.reschkUseFooter_value, 97, 163, uno.Any("short",0), 2, uno.Any("short",14), 212)) + self.chkUseLogo = self.insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSELOGO_HID, self.resources.reschkUseLogo_value, 97, 28, uno.Any("short",0), 2, uno.Any("short",5), 212), self) + self.chkUseDate = self.insertCheckBox("chkUseDate", CHKUSEDATE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEDATE_HID, self.resources.reschkUseDate_value, 97, 43, uno.Any("short",0), 2,uno.Any("short",6), 212), self) + self.chkUseCommunicationType = self.insertCheckBox("chkUseCommunicationType", CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSECOMMUNICATIONTYPE_HID, self.resources.reschkUseCommunicationType_value, 97, 57, uno.Any("short",0), 2, uno.Any("short",07), 100), self) + self.lstCommunicationType = self.insertComboBox("lstCommunicationType", LSTCOMMUNICATIONTYPE_ACTION_PERFORMED, LSTCOMMUNICATIONTYPE_ITEM_CHANGED, LSTCOMMUNICATIONTYPE_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTCOMMUNICATIONTYPE_HID, 105, 68, 2, uno.Any("short",8), 174), self) + self.chkUseSubject = self.insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSESUBJECT_HID, self.resources.reschkUseSubject_value, 97, 87, uno.Any("short",0), 2, uno.Any("short",9), 212), self) + self.chkUseSalutation = self.insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSESALUTATION_HID, self.resources.reschkUseSalutation_value, 97, 102, uno.Any("short",0), 2, uno.Any("short",10), 100), self) + self.lstSalutation = self.insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTSALUTATION_HID, 105, 113, 2, uno.Any("short",11), 174), self) + self.chkUseGreeting = self.insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEGREETING_HID, self.resources.reschkUseGreeting_value, 97, 132, uno.Any("short",0), 2, uno.Any("short",12), 100), self) + self.lstGreeting = self.insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTGREETING_HID, 105, 143, 2,uno.Any("short",13), 174), self) + self.chkUseFooter = self.insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEFOOTER_HID, self.resources.reschkUseFooter_value, 97, 163, uno.Any("short",0), 2, uno.Any("short",14), 212), self) self.lblTitle3 = self.insertLabel("lblTitle3", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle3_value, True, 91, 8, 2, uno.Any("short",59), 212)) def buildStep3(self): - self.optSenderPlaceholder = self.insertRadioButton("optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTSENDERPLACEHOLDER_HID, self.resources.resoptSenderPlaceholder_value, 104, 42, 3, uno.Any("short",15), 149)) - self.optSenderDefine = self.insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTSENDERDEFINE_HID, self.resources.resoptSenderDefine_value, 104, 54, 3, uno.Any("short",16), 149)) - self.txtSenderName = self.insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERNAME_HID, 182, 67, 3, uno.Any("short",17), 119)) - self.txtSenderStreet = self.insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERSTREET_HID, 182, 81, 3, uno.Any("short",18), 119)) - self.txtSenderPostCode = self.insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERPOSTCODE_HID, 182, 95, 3, uno.Any("short",19), 25)) - self.txtSenderState = self.insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERSTATE_HID, 211, 95, 3, uno.Any("short",20), 21)) - self.txtSenderCity = self.insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERCITY_HID, 236, 95, 3, uno.Any("short",21), 65)) - self.txtSenderFax = self.insertTextField("txtSenderFax", TXTSENDERFAX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERFAX_HID, 182, 109, 3, uno.Any("short",22), 119)) - self.optReceiverPlaceholder = self.insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTRECEIVERPLACEHOLDER_HID, self.resources.resoptReceiverPlaceholder_value, 104, 148, 3, uno.Any("short",23), 200)) - self.optReceiverDatabase = self.insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTRECEIVERDATABASE_HID, self.resources.resoptReceiverDatabase_value, 104, 160, 3, uno.Any("short",24), 200)) + self.optSenderPlaceholder = self.insertRadioButton("optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTSENDERPLACEHOLDER_HID, self.resources.resoptSenderPlaceholder_value, 104, 42, 3, uno.Any("short",15), 149), self) + self.optSenderDefine = self.insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTSENDERDEFINE_HID, self.resources.resoptSenderDefine_value, 104, 54, 3, uno.Any("short",16), 149), self) + self.txtSenderName = self.insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERNAME_HID, 182, 67, 3, uno.Any("short",17), 119), self) + self.txtSenderStreet = self.insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERSTREET_HID, 182, 81, 3, uno.Any("short",18), 119), self) + self.txtSenderPostCode = self.insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERPOSTCODE_HID, 182, 95, 3, uno.Any("short",19), 25), self) + self.txtSenderState = self.insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERSTATE_HID, 211, 95, 3, uno.Any("short",20), 21), self) + self.txtSenderCity = self.insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERCITY_HID, 236, 95, 3, uno.Any("short",21), 65), self) + self.txtSenderFax = self.insertTextField("txtSenderFax", TXTSENDERFAX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERFAX_HID, 182, 109, 3, uno.Any("short",22), 119), self) + self.optReceiverPlaceholder = self.insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTRECEIVERPLACEHOLDER_HID, self.resources.resoptReceiverPlaceholder_value, 104, 148, 3, uno.Any("short",23), 200), self) + self.optReceiverDatabase = self.insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTRECEIVERDATABASE_HID, self.resources.resoptReceiverDatabase_value, 104, 160, 3, uno.Any("short",24), 200), self) self.lblSenderAddress = self.insertLabel("lblSenderAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderAddress_value, 97, 28, 3, uno.Any("short",46), 136)) self.FixedLine2 = self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (5, 90, 126, 3, uno.Any("short",51), 212)) self.lblSenderName = self.insertLabel("lblSenderName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderName_value, 113, 69, 3, uno.Any("short",52), 68)) @@ -80,17 +80,17 @@ class FaxWizardDialog(WizardDialog): self.Label2 = self.insertLabel("Label2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.resLabel2_value, 97, 137, 3, uno.Any("short",69), 136)) def buildStep4(self): - self.txtFooter = self.insertTextField("txtFooter", TXTFOOTER_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (47, TXTFOOTER_HID, True, 97, 40, 4, uno.Any("short",25), 203)) - self.chkFooterNextPages = self.insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKFOOTERNEXTPAGES_HID, self.resources.reschkFooterNextPages_value, 97, 92, uno.Any("short",0), 4, uno.Any("short",26), 202)) - self.chkFooterPageNumbers = self.insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKFOOTERPAGENUMBERS_HID, self.resources.reschkFooterPageNumbers_value, 97, 106, uno.Any("short",0), 4, uno.Any("short",27), 201)) + self.txtFooter = self.insertTextField("txtFooter", TXTFOOTER_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (47, TXTFOOTER_HID, True, 97, 40, 4, uno.Any("short",25), 203), self) + self.chkFooterNextPages = self.insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKFOOTERNEXTPAGES_HID, self.resources.reschkFooterNextPages_value, 97, 92, uno.Any("short",0), 4, uno.Any("short",26), 202), self) + self.chkFooterPageNumbers = self.insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKFOOTERPAGENUMBERS_HID, self.resources.reschkFooterPageNumbers_value, 97, 106, uno.Any("short",0), 4, uno.Any("short",27), 201), self) self.lblFooter = self.insertLabel("lblFooter", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor4, 8, self.resources.reslblFooter_value, 97, 28, 4, uno.Any("short",33), 116)) self.lblTitle5 = self.insertLabel("lblTitle5", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle5_value, True, 91, 8, 4, uno.Any("short",61), 212)) def buildStep5(self): - self.txtTemplateName = self.insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH), (12, TXTTEMPLATENAME_HID, 202, 56, 5, uno.Any("short",28), self.resources.restxtTemplateName_value, 100)) + self.txtTemplateName = self.insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH), (12, TXTTEMPLATENAME_HID, 202, 56, 5, uno.Any("short",28), self.resources.restxtTemplateName_value, 100), self) - self.optCreateFax = self.insertRadioButton("optCreateFax", OPTCREATEFAX_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTCREATEFAX_HID, self.resources.resoptCreateFax_value, 104, 111, 5, uno.Any("short",30), 198)) - self.optMakeChanges = self.insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTMAKECHANGES_HID, self.resources.resoptMakeChanges_value, 104, 123, 5, uno.Any("short",31), 198)) + self.optCreateFax = self.insertRadioButton("optCreateFax", OPTCREATEFAX_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTCREATEFAX_HID, self.resources.resoptCreateFax_value, 104, 111, 5, uno.Any("short",30), 198), self) + self.optMakeChanges = self.insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTMAKECHANGES_HID, self.resources.resoptMakeChanges_value, 104, 123, 5, uno.Any("short",31), 198), self) self.lblFinalExplanation1 = self.insertLabel("lblFinalExplanation1", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (28, self.resources.reslblFinalExplanation1_value, True, 97, 28, 5, uno.Any("short",34), 205)) self.lblProceed = self.insertLabel("lblProceed", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblProceed_value, 97, 100, 5, uno.Any("short",35), 204)) self.lblFinalExplanation2 = self.insertLabel("lblFinalExplanation2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (33, self.resources.reslblFinalExplanation2_value, True, 104, 145, 5, uno.Any("short",36), 199)) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py index 05a5ba737..191d60dfd 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py @@ -1,5 +1,4 @@ -from common.HelpIds import HelpIds - +import common.HelpIds as HelpIds OPTBUSINESSFAX_ITEM_CHANGED = "optBusinessFaxItemChanged" LSTBUSINESSSTYLE_ACTION_PERFORMED = None # "lstBusinessStyleActionPerformed" @@ -12,16 +11,16 @@ CHKUSEDATE_ITEM_CHANGED = "chkUseDateItemChanged" CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED = "chkUseCommunicationItemChanged" LSTCOMMUNICATIONTYPE_ACTION_PERFORMED = None # "lstCommunicationActionPerformed" LSTCOMMUNICATIONTYPE_ITEM_CHANGED = "lstCommunicationItemChanged" -LSTCOMMUNICATIONTYPE_TEXT_CHANGED = "lstCommunicationTextChanged" +LSTCOMMUNICATIONTYPE_TEXT_CHANGED = None # "lstCommunicationTextChanged" CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged" CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged" LSTSALUTATION_ACTION_PERFORMED = None # "lstSalutationActionPerformed" LSTSALUTATION_ITEM_CHANGED = "lstSalutationItemChanged" -LSTSALUTATION_TEXT_CHANGED = "lstSalutationTextChanged" +LSTSALUTATION_TEXT_CHANGED = None #"lstSalutationTextChanged" CHKUSEGREETING_ITEM_CHANGED = "chkUseGreetingItemChanged" LSTGREETING_ACTION_PERFORMED = None # "lstGreetingActionPerformed" LSTGREETING_ITEM_CHANGED = "lstGreetingItemChanged" -LSTGREETING_TEXT_CHANGED = "lstGreetingTextChanged" +LSTGREETING_TEXT_CHANGED = None #"lstGreetingTextChanged" CHKUSEFOOTER_ITEM_CHANGED = "chkUseFooterItemChanged" OPTSENDERPLACEHOLDER_ITEM_CHANGED = "optSenderPlaceholderItemChanged" OPTSENDERDEFINE_ITEM_CHANGED = "optSenderDefineItemChanged" @@ -45,39 +44,39 @@ imageURLImageControl3 = None #"images/ImageControl3" #Help IDs -HID = 41119 #TODO enter first hid here -HIDMAIN = 41180 -OPTBUSINESSFAX_HID = HelpIds.getHelpIdString(HID + 1) -LSTBUSINESSSTYLE_HID = HelpIds.getHelpIdString(HID + 2) -OPTPRIVATEFAX_HID = HelpIds.getHelpIdString(HID + 3) -LSTPRIVATESTYLE_HID = HelpIds.getHelpIdString(HID + 4) -IMAGECONTROL3_HID = HelpIds.getHelpIdString(HID + 5) -CHKUSELOGO_HID = HelpIds.getHelpIdString(HID + 6) -CHKUSEDATE_HID = HelpIds.getHelpIdString(HID + 7) -CHKUSECOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 8) -LSTCOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 9) -CHKUSESUBJECT_HID = HelpIds.getHelpIdString(HID + 10) -CHKUSESALUTATION_HID = HelpIds.getHelpIdString(HID + 11) -LSTSALUTATION_HID = HelpIds.getHelpIdString(HID + 12) -CHKUSEGREETING_HID = HelpIds.getHelpIdString(HID + 13) -LSTGREETING_HID = HelpIds.getHelpIdString(HID + 14) -CHKUSEFOOTER_HID = HelpIds.getHelpIdString(HID + 15) -OPTSENDERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 16) -OPTSENDERDEFINE_HID = HelpIds.getHelpIdString(HID + 17) -TXTSENDERNAME_HID = HelpIds.getHelpIdString(HID + 18) -TXTSENDERSTREET_HID = HelpIds.getHelpIdString(HID + 19) -TXTSENDERPOSTCODE_HID = HelpIds.getHelpIdString(HID + 20) -TXTSENDERSTATE_HID = HelpIds.getHelpIdString(HID + 21) -TXTSENDERCITY_HID = HelpIds.getHelpIdString(HID + 22) -TXTSENDERFAX_HID = HelpIds.getHelpIdString(HID + 23) -OPTRECEIVERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 24) -OPTRECEIVERDATABASE_HID = HelpIds.getHelpIdString(HID + 25) -TXTFOOTER_HID = HelpIds.getHelpIdString(HID + 26) -CHKFOOTERNEXTPAGES_HID = HelpIds.getHelpIdString(HID + 27) -CHKFOOTERPAGENUMBERS_HID = HelpIds.getHelpIdString(HID + 28) -TXTTEMPLATENAME_HID = HelpIds.getHelpIdString(HID + 29) -FILETEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 30) -OPTCREATEFAX_HID = HelpIds.getHelpIdString(HID + 31) -OPTMAKECHANGES_HID = HelpIds.getHelpIdString(HID + 32) -IMAGECONTROL2_HID = HelpIds.getHelpIdString(HID + 33) +HID = 349 +HIDMAIN = 411 +OPTBUSINESSFAX_HID = HelpIds.array2[HID + 1] +LSTBUSINESSSTYLE_HID = HelpIds.array2[HID + 2] +OPTPRIVATEFAX_HID = HelpIds.array2[HID + 3] +LSTPRIVATESTYLE_HID = HelpIds.array2[HID + 4] +IMAGECONTROL3_HID = HelpIds.array2[HID + 5] +CHKUSELOGO_HID = HelpIds.array2[HID + 6] +CHKUSEDATE_HID = HelpIds.array2[HID + 7] +CHKUSECOMMUNICATIONTYPE_HID = HelpIds.array2[HID + 8] +LSTCOMMUNICATIONTYPE_HID = HelpIds.array2[HID + 9] +CHKUSESUBJECT_HID = HelpIds.array2[HID + 10] +CHKUSESALUTATION_HID = HelpIds.array2[HID + 11] +LSTSALUTATION_HID = HelpIds.array2[HID + 12] +CHKUSEGREETING_HID = HelpIds.array2[HID + 13] +LSTGREETING_HID = HelpIds.array2[HID + 14] +CHKUSEFOOTER_HID = HelpIds.array2[HID + 15] +OPTSENDERPLACEHOLDER_HID = HelpIds.array2[HID + 16] +OPTSENDERDEFINE_HID = HelpIds.array2[HID + 17] +TXTSENDERNAME_HID = HelpIds.array2[HID + 18] +TXTSENDERSTREET_HID = HelpIds.array2[HID + 19] +TXTSENDERPOSTCODE_HID = HelpIds.array2[HID + 20] +TXTSENDERSTATE_HID = HelpIds.array2[HID + 21] +TXTSENDERCITY_HID = HelpIds.array2[HID + 22] +TXTSENDERFAX_HID = HelpIds.array2[HID + 23] +OPTRECEIVERPLACEHOLDER_HID = HelpIds.array2[HID + 24] +OPTRECEIVERDATABASE_HID = HelpIds.array2[HID + 25] +TXTFOOTER_HID = HelpIds.array2[HID + 26] +CHKFOOTERNEXTPAGES_HID = HelpIds.array2[HID + 27] +CHKFOOTERPAGENUMBERS_HID = HelpIds.array2[HID + 28] +TXTTEMPLATENAME_HID = HelpIds.array2[HID + 29] +FILETEMPLATEPATH_HID = HelpIds.array2[HID + 30] +OPTCREATEFAX_HID = HelpIds.array2[HID + 31] +OPTMAKECHANGES_HID = HelpIds.array2[HID + 32] +IMAGECONTROL2_HID = HelpIds.array2[HID + 33] diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 62fae01fd..94e696539 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -18,6 +18,8 @@ from com.sun.star.view.DocumentZoomType import OPTIMAL from com.sun.star.document.UpdateDocMode import FULL_UPDATE from com.sun.star.document.MacroExecMode import ALWAYS_EXECUTE +import timeit + class FaxWizardDialogImpl(FaxWizardDialog): def leaveStep(self, nOldStep, nNewStep): @@ -71,6 +73,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): #create the dialog: self.drawNaviBar() + self.buildStep1() self.buildStep2() self.buildStep3() @@ -220,7 +223,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): def insertPathSelectionControl(self): self.myPathSelection = PathSelection(self.xMSF, self, PathSelection.TransferMode.SAVE, PathSelection.DialogTypes.FILE) - self.myPathSelection.insert(5, 97, 70, 205, 45, self.resources.reslblTemplatePath_value, True, HelpIds.getHelpIdString(HID + 34), HelpIds.getHelpIdString(HID + 35)) + self.myPathSelection.insert(5, 97, 70, 205, 45, self.resources.reslblTemplatePath_value, True, HelpIds.array2[HID + 34], HelpIds.array2[HID + 35]) self.myPathSelection.sDefaultDirectory = self.UserTemplatePath self.myPathSelection.sDefaultName = "myFaxTemplate.ott" self.myPathSelection.sDefaultFilter = "writer8_template" diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py index 6c897d20e..c2335547c 100644 --- a/wizards/com/sun/star/wizards/ui/PathSelection.py +++ b/wizards/com/sun/star/wizards/ui/PathSelection.py @@ -59,7 +59,6 @@ class PathSelection(object): myFilePickerDialog.callStoreDialog(self.sDefaultDirectory, self.sDefaultName, self.sDefaultFilter); sStorePath = myFilePickerDialog.sStorePath; if sStorePath is not None: - print "hello" myFA = FileAccess(xMSF); xSaveTextBox.setText(myFA.getPath(sStorePath, None)); self.sDefaultDirectory = FileAccess.getParentDir(sStorePath); diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py index 1bf696c21..ff1a2510a 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py @@ -22,66 +22,66 @@ class UnoDialog2(UnoDialog): def __init__(self, xmsf): super(UnoDialog2,self).__init__(xmsf,(), ()) - def insertButton(self, sName, actionPerformed, sPropNames, oPropValues, eventTarget=None): + def insertButton(self, sName, actionPerformed, sPropNames, oPropValues, listener): xButton = self.insertControlModel2("com.sun.star.awt.UnoControlButtonModel", sName, sPropNames, oPropValues) if actionPerformed is not None: + actionPerformed = getattr(listener, actionPerformed) xButton.addActionListener(ActionListenerProcAdapter(actionPerformed)) return xButton - def insertImageButton(self, sName, actionPerformed, sPropNames, oPropValues): + def insertImageButton(self, sName, actionPerformed, sPropNames, oPropValues, listener): xButton = self.insertControlModel2("com.sun.star.awt.UnoControlButtonModel", sName, sPropNames, oPropValues) - if actionPerformed != None: + if actionPerformed is not None: + actionPerformed = getattr(listener, actionPerformed) xButton.addActionListener(ActionListenerProcAdapter(actionPerformed)) return xButton - def insertCheckBox(self, sName, itemChanged, sPropNames, oPropValues, eventTarget=None): + def insertCheckBox(self, sName, itemChanged, sPropNames, oPropValues, listener): xCheckBox = self.insertControlModel2("com.sun.star.awt.UnoControlCheckBoxModel", sName, sPropNames, oPropValues) - if itemChanged != None: - if eventTarget is None: - eventTarget = self - xCheckBox.addItemListener(ItemListenerProcAdapter(None)) + if itemChanged is not None: + itemChanged = getattr(listener, itemChanged) + xCheckBox.addItemListener(ItemListenerProcAdapter(itemChanged)) return xCheckBox - def insertComboBox(self, sName, actionPerformed, itemChanged, textChanged, sPropNames, oPropValues, eventTarget=None): + def insertComboBox(self, sName, actionPerformed, itemChanged, textChanged, sPropNames, oPropValues, listener): xComboBox = self.insertControlModel2("com.sun.star.awt.UnoControlComboBoxModel", sName, sPropNames, oPropValues) - if eventTarget is None: - eventTarget = self - if actionPerformed != None: - xComboBox.addActionListener(None) + if actionPerformed is not None: + actionPerformed = getattr(listener, actionPerformed) + xComboBox.addActionListener(ActionListenerProcAdapter(actionPerformed)) - if itemChanged != None: - xComboBox.addItemListener(ItemListenerProcAdapter(None)) + if itemChanged is not None: + itemChanged = getattr(listener, itemChanged) + xComboBox.addItemListener(ItemListenerProcAdapter(itemChanged)) - if textChanged != None: - xComboBox.addTextListener(TextListenerProcAdapter(None)) + if textChanged is not None: + textChanged = getattr(listener, textChanged) + xComboBox.addTextListener(TextListenerProcAdapter(textChanged)) return xComboBox - def insertListBox(self, sName, actionPerformed, itemChanged, sPropNames, oPropValues, eventTarget=None): + def insertListBox(self, sName, actionPerformed, itemChanged, sPropNames, oPropValues, listener): xListBox = self.insertControlModel2("com.sun.star.awt.UnoControlListBoxModel", sName, sPropNames, oPropValues) - if eventTarget is None: - eventTarget = self - - if actionPerformed != None: - xListBox.addActionListener(None) + if actionPerformed is not None: + actionPerformed = getattr(listener, actionPerformed) + xListBox.addActionListener(actionPerformed) - if itemChanged != None: - xListBox.addItemListener(ItemListenerProcAdapter(None)) + if itemChanged is not None: + itemChanged = getattr(listener, itemChanged) + xListBox.addItemListener(ItemListenerProcAdapter(itemChanged)) return xListBox - def insertRadioButton(self, sName, itemChanged, sPropNames, oPropValues, eventTarget=None): + def insertRadioButton(self, sName, itemChanged, sPropNames, oPropValues, listener): xRadioButton = self.insertControlModel2("com.sun.star.awt.UnoControlRadioButtonModel", sName, sPropNames, oPropValues) - if itemChanged != None: - if eventTarget is None: - eventTarget = self - xRadioButton.addItemListener(ItemListenerProcAdapter(None)) + if itemChanged is not None: + itemChanged = getattr(listener, itemChanged) + xRadioButton.addItemListener(ItemListenerProcAdapter(itemChanged)) return xRadioButton @@ -90,9 +90,9 @@ class UnoDialog2(UnoDialog): oTitledBox = self.insertControlModel2("com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues) return oTitledBox - def insertTextField(self, sName, sTextChanged, sPropNames, oPropValues, eventTarget=None): - return self.insertEditField(sName, sTextChanged, eventTarget, - "com.sun.star.awt.UnoControlEditModel", sPropNames, oPropValues) + def insertTextField(self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField(sName, sTextChanged, + "com.sun.star.awt.UnoControlEditModel", sPropNames, oPropValues, listener) def insertImage(self, sName, sPropNames, oPropValues): return self.insertControlModel2("com.sun.star.awt.UnoControlImageControlModel", sName, sPropNames, oPropValues) @@ -107,35 +107,34 @@ class UnoDialog2(UnoDialog): and Time edit components. ''' - def insertEditField(self, sName, sTextChanged, eventTarget, sModelClass, sPropNames, oPropValues): + def insertEditField(self, sName, sTextChanged, sModelClass, sPropNames, oPropValues, listener): xField = self.insertControlModel2(sModelClass, sName, sPropNames, oPropValues) - if sTextChanged != None: - if eventTarget is None: - eventTarget = self - xField.addTextListener(TextListenerProcAdapter(None)) + if sTextChanged is not None: + sTextChanged = getattr(listener, sTextChanged) + xField.addTextListener(TextListenerProcAdapter(sTextChanged)) return xField - def insertFileControl(self, sName, sTextChanged, sPropNames, oPropValues, eventTarget=None): - return self.insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlFileControlModel", sPropNames, oPropValues) + def insertFileControl(self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlFileControlModel", sPropNames, oPropValues, listener) - def insertCurrencyField(self, sName, sTextChanged, sPropNames, oPropValues, eventTarget=None): - return self.insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlCurrencyFieldModel", sPropNames, oPropValues) + def insertCurrencyField(self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlCurrencyFieldModel", sPropNames, oPropValues, listener) - def insertDateField(self, sName, sTextChanged, sPropNames, oPropValues, eventTarget=None): - return self.insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlDateFieldModel", sPropNames, oPropValues) + def insertDateField(self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlDateFieldModel", sPropNames, oPropValues, listener) - def insertNumericField(self, sName, sTextChanged, sPropNames, oPropValues, eventTarget=None): - return self.insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlNumericFieldModel", sPropNames, oPropValues) + def insertNumericField(self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlNumericFieldModel", sPropNames, oPropValues, listener) - def insertTimeField(self, sName, sTextChanged, sPropNames, oPropValues, eventTarget=None): - return self.insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlTimeFieldModel", sPropNames, oPropValues) + def insertTimeField(self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlTimeFieldModel", sPropNames, oPropValues, listener) - def insertPatternField(self, sName, sTextChanged, oPropValues, eventTarget=None): - return self.insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlPatternFieldModel", sPropNames, oPropValues) + def insertPatternField(self, sName, sTextChanged, oPropValues, listener): + return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlPatternFieldModel", sPropNames, oPropValues, listener) - def insertFormattedField(self, sName, sTextChanged, sPropNames, oPropValues, eventTarget=None): - return self.insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlFormattedFieldModel", sPropNames, oPropValues) + def insertFormattedField(self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlFormattedFieldModel", sPropNames, oPropValues, listener) def insertFixedLine(self, sName, sPropNames, oPropValues): oLine = self.insertControlModel2("com.sun.star.awt.UnoControlFixedLineModel", sName, sPropNames, oPropValues) @@ -166,14 +165,11 @@ class UnoDialog2(UnoDialog): def setControlPropertiesDebug(self, model, names, values): i = 0 - while i < names.length: + while i < len(names): print " Settings: ", names[i] Helper.setUnoPropertyValue(model, names[i], values[i]) i += 1 - def translateURL(self, relativeURL): - return "" - def getControlModel(self, unoControl): obj = unoControl.getModel() return obj diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index e22f2d662..6cdd7363e 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -5,7 +5,7 @@ from com.sun.star.lang import NoSuchMethodException from com.sun.star.uno import Exception as UnoException from com.sun.star.lang import IllegalArgumentException from com.sun.star.frame import TerminationVetoException -from common.HelpIds import * +import common.HelpIds as HelpIds from com.sun.star.awt.PushButtonType import HELP, STANDARD from event.MethodInvocation import * from event.EventNames import EVENT_ITEM_CHANGED @@ -14,6 +14,12 @@ class WizardDialog(UnoDialog2): __metaclass__ = ABCMeta + __NEXT_ACTION_PERFORMED = "gotoNextAvailableStep" + __BACK_ACTION_PERFORMED = "gotoPreviousAvailableStep" + __FINISH_ACTION_PERFORMED = "finishWizard_1" + __CANCEL_ACTION_PERFORMED = "cancelWizard_1" + __HELP_ACTION_PERFORMED = None + ''' Creates a new instance of WizardDialog the hid is used as following : @@ -228,12 +234,12 @@ class WizardDialog(UnoDialog2): self.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnNaviSep", (PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH), (1, 0, 0, iDialogHeight - 26, iCurStep, iDialogWidth)) self.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnRoadSep",(PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH),(iBtnPosY - 6, 1, 85, 0, iCurStep, 1)) propNames = (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH) - Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_HELPURL, HelpIds.getHelpIdString(self.__hid)) - self.insertButton("btnWizardHelp", "",(PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH),(True, iButtonHeight, self.__oWizardResource.getResText(UIConsts.RID_COMMON + 15), iHelpPosX, iBtnPosY, uno.Any("short",HELP), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) - self.insertButton("btnWizardBack", self.gotoPreviousAvailableStep, propNames,(False, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 2), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 13), iBackPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) - self.insertButton("btnWizardNext", self.gotoNextAvailableStep, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 3), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 14), iNextPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) - self.insertButton("btnWizardFinish", self.finishWizard_1, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 4), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 12), iFinishPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) - self.insertButton("btnWizardCancel", self.cancelWizard_1, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 5), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 11), iCancelPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_HELPURL, HelpIds.array2[self.__hid]) + self.insertButton("btnWizardHelp", WizardDialog.__HELP_ACTION_PERFORMED,(PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH),(True, iButtonHeight, self.__oWizardResource.getResText(UIConsts.RID_COMMON + 15), iHelpPosX, iBtnPosY, uno.Any("short",HELP), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth), self) + self.insertButton("btnWizardBack", WizardDialog.__BACK_ACTION_PERFORMED, propNames,(False, iButtonHeight, HelpIds.array2[self.__hid + 2], self.__oWizardResource.getResText(UIConsts.RID_COMMON + 13), iBackPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth), self) + self.insertButton("btnWizardNext", WizardDialog.__NEXT_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.array2[self.__hid + 3], self.__oWizardResource.getResText(UIConsts.RID_COMMON + 14), iNextPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth), self) + self.insertButton("btnWizardFinish", WizardDialog.__FINISH_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.array2[self.__hid + 4], self.__oWizardResource.getResText(UIConsts.RID_COMMON + 12), iFinishPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth), self) + self.insertButton("btnWizardCancel", WizardDialog.__CANCEL_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.array2[self.__hid + 5], self.__oWizardResource.getResText(UIConsts.RID_COMMON + 11), iCancelPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth), self) self.setControlProperty("btnWizardNext", "DefaultButton", True) # add a window listener, to know # if the user used "escape" key to @@ -298,7 +304,7 @@ class WizardDialog(UnoDialog2): traceback.print_exc() return False - def gotoPreviousAvailableStep(self, oActionEvent): + def gotoPreviousAvailableStep(self): try: if self.__nNewStep > 1: self.__nOldStep = self.__nNewStep @@ -328,7 +334,7 @@ class WizardDialog(UnoDialog2): return -1 - def gotoNextAvailableStep(self, oActionEvent): + def gotoNextAvailableStep(self): try: self.__nOldStep = self.__nNewStep self.__nNewStep = self.getNextAvailableStep() @@ -341,7 +347,7 @@ class WizardDialog(UnoDialog2): def finishWizard(self): pass - def finishWizard_1(self, oActionEvent): + def finishWizard_1(self): '''This function will call if the finish button is pressed on the UI''' try: self.enableFinishButton(False) @@ -403,7 +409,7 @@ class WizardDialog(UnoDialog2): perform a cancel. ''' - def cancelWizard_1(self, oActionEvent): + def cancelWizard_1(self): try: self.cancelWizard() self.removeTerminateListener() diff --git a/wizards/com/sun/star/wizards/ui/event/AbstractListener.py b/wizards/com/sun/star/wizards/ui/event/AbstractListener.py deleted file mode 100644 index a3337c66d..000000000 --- a/wizards/com/sun/star/wizards/ui/event/AbstractListener.py +++ /dev/null @@ -1,67 +0,0 @@ -from MethodInvocation import MethodInvocation -import traceback -''' -This class is a base class for listener classes. -It uses a hashtable to map between a ComponentName, EventName and a MethodInvokation Object. -To use this class do the following:
    - -
  • Write a subclass which implements the needed Listener(s).
  • -in the even methods, use invoke(...). -
  • When instanciating the component, register the subclass as the event listener.
  • -
  • Write the methods which should be performed when the event occures.
  • -
  • call the "add" method, to define a component-event-action mapping.
  • -
    -@author rpiterman -''' - -class AbstractListener(object): - '''Creates a new instance of AbstractListener''' - - mHashtable = {} - - def add(self, componentName, eventName, mi, target=None): - try: - if target is not None: - mi = MethodInvocation(mi, target) - AbstractListener.mHashtable[componentName + eventName] = mi - except Exception, e: - traceback.print_exc() - - - def get(self, componentName, eventName): - return AbstractListener.mHashtable[componentName + eventName] - - @classmethod - def invoke(self, componentName, eventName, param): - try: - mi = self.get(componentName, eventName) - if mi != None: - return mi.invoke(param) - else: - return None - - except InvocationTargetException, ite: - print "=======================================================" - print "=== Note: An Exception was thrown which should have ===" - print "=== caused a crash. I caught it. Please report this ===" - print "=== to libreoffice.org ===" - print "=======================================================" - traceback.print_exc() - except IllegalAccessException, iae: - traceback.print_exc() - except Exception, ex: - print "=======================================================" - print "=== Note: An Exception was thrown which should have ===" - print "=== caused a crash. I Catched it. Please report this ==" - print "=== to libreoffice.org ==" - print "=======================================================" - traceback.print_exc() - - return None - - ''' - Rerurns the property "name" of the Object which is the source of the event. - ''' - def getEventSourceName(self, eventObject): - return Helper.getUnoPropertyValue(eventObject.Source.getModel(), PropertyNames.PROPERTY_NAME) - diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py index 1ab91eb51..b03bf3fbd 100644 --- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py +++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py @@ -54,7 +54,7 @@ class ActionListenerProcAdapter( unohelper.Base, XActionListener ): # oActionEvent is a com.sun.star.awt.ActionEvent struct. def actionPerformed( self, oActionEvent ): if callable( self.oProcToCall ): - apply( self.oProcToCall, (oActionEvent,) + self.tParams ) + apply( self.oProcToCall ) #-------------------------------------------------- @@ -73,7 +73,7 @@ class ItemListenerProcAdapter( unohelper.Base, XItemListener ): # oItemEvent is a com.sun.star.awt.ItemEvent struct. def itemStateChanged( self, oItemEvent ): if callable( self.oProcToCall ): - apply( self.oProcToCall, (oActionEvent,) + self.tParams ) + apply( self.oProcToCall ) #-------------------------------------------------- @@ -92,7 +92,7 @@ class TextListenerProcAdapter( unohelper.Base, XTextListener ): # oTextEvent is a com.sun.star.awt.TextEvent struct. def textChanged( self, oTextEvent ): if callable( self.oProcToCall ): - apply( self.oProcToCall, (oTextEvent,) + self.tParams ) + apply( self.oProcToCall ) #-------------------------------------------------- # An Window adapter. @@ -110,4 +110,4 @@ class WindowListenerProcAdapter( unohelper.Base, XWindowListener ): # oTextEvent is a com.sun.star.awt.TextEvent struct. def windowResized(self, actionEvent): if callable( self.oProcToCall ): - apply( self.oProcToCall, (actionEvent,) + self.tParams ) + apply( self.oProcToCall ) -- cgit v1.2.3 -- cgit v1.2.3 From 51623a1b496fc8247daaaaa43eda35e8ab8e4af6 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 15 Jun 2011 19:09:17 +0200 Subject: Line length <= 80 --- wizards/com/sun/star/wizards/__init__.py | 0 wizards/com/sun/star/wizards/common/ConfigGroup.py | 3 +- .../com/sun/star/wizards/common/Configuration.py | 74 +- wizards/com/sun/star/wizards/common/Desktop.py | 66 +- wizards/com/sun/star/wizards/common/FileAccess.py | 154 +- wizards/com/sun/star/wizards/common/HelpIds.py | 2014 ++++++++++---------- wizards/com/sun/star/wizards/common/Helper.py | 50 +- .../star/wizards/common/NoValidPathException.py | 3 +- .../sun/star/wizards/common/PropertySetHelper.py | 26 +- wizards/com/sun/star/wizards/common/Resource.py | 18 +- .../com/sun/star/wizards/common/SystemDialog.py | 33 +- .../sun/star/wizards/document/OfficeDocument.py | 60 +- wizards/com/sun/star/wizards/document/__init__.py | 0 wizards/com/sun/star/wizards/fax/CallWizard.py | 72 +- wizards/com/sun/star/wizards/fax/FaxDocument.py | 62 +- .../com/sun/star/wizards/fax/FaxWizardDialog.py | 672 ++++++- .../sun/star/wizards/fax/FaxWizardDialogConst.py | 75 +- .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 509 +++-- .../star/wizards/fax/FaxWizardDialogResources.py | 161 +- wizards/com/sun/star/wizards/text/TextDocument.py | 90 +- .../com/sun/star/wizards/text/TextFieldHandler.py | 72 +- .../sun/star/wizards/text/TextSectionHandler.py | 51 +- wizards/com/sun/star/wizards/text/ViewHandler.py | 17 +- wizards/com/sun/star/wizards/text/__init__.py | 0 wizards/com/sun/star/wizards/ui/PathSelection.py | 70 +- wizards/com/sun/star/wizards/ui/PeerConfig.py | 50 +- wizards/com/sun/star/wizards/ui/UnoDialog.py | 285 ++- wizards/com/sun/star/wizards/ui/UnoDialog2.py | 201 +- wizards/com/sun/star/wizards/ui/WizardDialog.py | 204 +- .../sun/star/wizards/ui/event/CommonListener.py | 12 +- wizards/com/sun/star/wizards/ui/event/DataAware.py | 37 +- .../sun/star/wizards/ui/event/DataAwareFields.py | 13 +- .../sun/star/wizards/ui/event/MethodInvocation.py | 3 +- .../sun/star/wizards/ui/event/RadioDataAware.py | 2 +- .../com/sun/star/wizards/ui/event/UnoDataAware.py | 24 +- wizards/com/sun/star/wizards/ui/event/__init__.py | 0 36 files changed, 3296 insertions(+), 1887 deletions(-) create mode 100644 wizards/com/sun/star/wizards/__init__.py create mode 100644 wizards/com/sun/star/wizards/document/__init__.py create mode 100644 wizards/com/sun/star/wizards/text/__init__.py create mode 100644 wizards/com/sun/star/wizards/ui/event/__init__.py diff --git a/wizards/com/sun/star/wizards/__init__.py b/wizards/com/sun/star/wizards/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.py b/wizards/com/sun/star/wizards/common/ConfigGroup.py index 02ba16cb6..d8675f4aa 100644 --- a/wizards/com/sun/star/wizards/common/ConfigGroup.py +++ b/wizards/com/sun/star/wizards/common/ConfigGroup.py @@ -66,7 +66,8 @@ class ConfigGroup(ConfigNode): fieldType = type(child) if type(ConfigNode) == fieldType: child.setRoot(self.root) - child.readConfiguration(Configuration.getNode(propertyName, configView), prefix) + child.readConfiguration(Configuration.getNode(propertyName, configView), + prefix) field.set(this, Configuration.getString(propertyName, configView)) def setRoot(self, newRoot): diff --git a/wizards/com/sun/star/wizards/common/Configuration.py b/wizards/com/sun/star/wizards/common/Configuration.py index adf7e8a7f..c73dec9d8 100644 --- a/wizards/com/sun/star/wizards/common/Configuration.py +++ b/wizards/com/sun/star/wizards/common/Configuration.py @@ -5,14 +5,16 @@ import traceback import uno ''' This class gives access to the OO configuration api. -It contains 4 get and 4 set convenience methods for getting and settings properties -in the configuration.
    -For the get methods, two parameters must be given: name and parent, where name is the -name of the property, parent is a HierarchyElement (::com::sun::star::configuration::HierarchyElement)
    -The get and set methods support hieryrchical property names like "options/gridX".
    +It contains 4 get and 4 set convenience methods for getting and settings +properties in the configuration.
    +For the get methods, two parameters must be given: name and parent, where +name is the name of the property, parent is a HierarchyElement +(::com::sun::star::configuration::HierarchyElement)
    +The get and set methods support hieryrchical property names like +"options/gridX".
    NOTE: not yet supported, but sometime later, -If you will ommit the "parent" parameter, then the "name" parameter must be in hierarchy form from -the root of the registry. +If you will ommit the "parent" parameter, then the "name" parameter must be +in hierarchy form from the root of the registry. ''' class Configuration(object): @@ -86,22 +88,26 @@ class Configuration(object): @classmethod def getConfigurationRoot(self, xmsf, sPath, updateable): - oConfigProvider = xmsf.createInstance("com.sun.star.configuration.ConfigurationProvider") + oConfigProvider = xmsf.createInstance( + "com.sun.star.configuration.ConfigurationProvider") if updateable: sView = "com.sun.star.configuration.ConfigurationUpdateAccess" else: sView = "com.sun.star.configuration.ConfigurationAccess" - aPathArgument = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + aPathArgument = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') aPathArgument.Name = "nodepath" aPathArgument.Value = sPath - aModeArgument = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + aModeArgument = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') if updateable: aModeArgument.Name = "lazywrite" aModeArgument.Value = False - return oConfigProvider.createInstanceWithArguments(sView,(aPathArgument,aModeArgument,)) + return oConfigProvider.createInstanceWithArguments(sView, + (aPathArgument,aModeArgument,)) @classmethod def getChildrenNames(self, configView): @@ -110,7 +116,8 @@ class Configuration(object): @classmethod def getProductName(self, xMSF): try: - oProdNameAccess = self.getConfigurationRoot(xMSF, "org.openoffice.Setup/Product", False) + oProdNameAccess = self.getConfigurationRoot(xMSF, + "org.openoffice.Setup/Product", False) ProductName = Helper.getUnoObjectbyName(oProdNameAccess, "ooName") return ProductName except UnoException: @@ -122,7 +129,8 @@ class Configuration(object): sLocale = "" try: aLocLocale = Locale.Locale() - oMasterKey = self.getConfigurationRoot(xMSF, "org.openoffice.Setup/L10N/", False) + oMasterKey = self.getConfigurationRoot(xMSF, + "org.openoffice.Setup/L10N/", False) sLocale = (String) Helper.getUnoObjectbyName(oMasterKey, "ooLocale") except UnoException, exception: @@ -144,7 +152,8 @@ class Configuration(object): @classmethod def getOfficeLinguistic(self, xMSF): try: - oMasterKey = self.getConfigurationRoot(xMSF, "org.openoffice.Setup/L10N/", False) + oMasterKey = self.getConfigurationRoot(xMSF, + "org.openoffice.Setup/L10N/", False) sLinguistic = Helper.getUnoObjectbyName(oMasterKey, "ooLocale") return sLinguistic except UnoException, exception: @@ -202,7 +211,8 @@ class Configuration(object): @classmethod def getNodeDisplayNames(self, _xNameAccessNode): snames = None - return getNodeChildNames(_xNameAccessNode, PropertyNames.PROPERTY_NAME) + return getNodeChildNames(_xNameAccessNode, + PropertyNames.PROPERTY_NAME) @classmethod def getNodeChildNames(self, xNameAccessNode, _schildname): @@ -212,10 +222,12 @@ class Configuration(object): sdisplaynames = range(snames.length) i = 0 while i < snames.length: - oContent = Helper.getUnoPropertyValue(xNameAccessNode.getByName(snames[i]), _schildname) + oContent = Helper.getUnoPropertyValue( + xNameAccessNode.getByName(snames[i]), _schildname) if not AnyConverter.isVoid(oContent): sdisplaynames[i] = (String) - Helper.getUnoPropertyValue(xNameAccessNode.getByName(snames[i]), _schildname) + Helper.getUnoPropertyValue(xNameAccessNode.getByName( + snames[i]), _schildname) else: sdisplaynames[i] = snames[i] @@ -249,17 +261,21 @@ class Configuration(object): @classmethod def getChildNodebyDisplayName(self, _xNameAccessNode, _displayname): snames = None - return getChildNodebyDisplayName(_xNameAccessNode, _displayname, PropertyNames.PROPERTY_NAME) + return getChildNodebyDisplayName(_xNameAccessNode, _displayname, + PropertyNames.PROPERTY_NAME) @classmethod - def getChildNodebyDisplayName(self, _xNameAccessNode, _displayname, _nodename): + def getChildNodebyDisplayName(self, _xNameAccessNode, _displayname, + _nodename): + snames = None try: snames = _xNameAccessNode.getElementNames() sdisplaynames = range(snames.length) i = 0 while i < snames.length: - curdisplayname = Helper.getUnoPropertyValue(_xNameAccessNode.getByName(snames[i]), _nodename) + curdisplayname = Helper.getUnoPropertyValue( + _xNameAccessNode.getByName(snames[i]), _nodename) if curdisplayname.equals(_displayname): return _xNameAccessNode.getByName(snames[i]) @@ -270,18 +286,24 @@ class Configuration(object): return None @classmethod - def getChildNodebyDisplayName(self, _xMSF, _aLocale, _xNameAccessNode, _displayname, _nodename, _nmaxcharcount): + def getChildNodebyDisplayName(self, _xMSF, _aLocale, _xNameAccessNode, + _displayname, _nodename, _nmaxcharcount): + snames = None try: snames = _xNameAccessNode.getElementNames() sdisplaynames = range(snames.length) i = 0 while i < snames.length: - curdisplayname = Helper.getUnoPropertyValue(_xNameAccessNode.getByName(snames[i]), _nodename) - if (_nmaxcharcount > 0) and (_nmaxcharcount < curdisplayname.length()): - curdisplayname = curdisplayname.substring(0, _nmaxcharcount) - - curdisplayname = Desktop.removeSpecialCharacters(_xMSF, _aLocale, curdisplayname) + curdisplayname = Helper.getUnoPropertyValue( + _xNameAccessNode.getByName(snames[i]), _nodename) + if (_nmaxcharcount > 0) and (_nmaxcharcount < \ + curdisplayname.length()): + curdisplayname = curdisplayname.substring(0, + _nmaxcharcount) + + curdisplayname = Desktop.removeSpecialCharacters(_xMSF, + _aLocale, curdisplayname) if curdisplayname.equals(_displayname): return _xNameAccessNode.getByName(snames[i]) diff --git a/wizards/com/sun/star/wizards/common/Desktop.py b/wizards/com/sun/star/wizards/common/Desktop.py index a08f12c4f..81dab1687 100644 --- a/wizards/com/sun/star/wizards/common/Desktop.py +++ b/wizards/com/sun/star/wizards/common/Desktop.py @@ -57,7 +57,8 @@ class Desktop(object): @classmethod def getDispatchURL(self, xMSF, _sURL): try: - oTransformer = xMSF.createInstance("com.sun.star.util.URLTransformer") + oTransformer = xMSF.createInstance( + "com.sun.star.util.URLTransformer") oURL = range(1) oURL[0] = com.sun.star.util.URL.URL() oURL[0].Complete = _sURL @@ -87,7 +88,7 @@ class Desktop(object): def connect(self, connectStr): localContext = uno.getComponentContext() resolver = localContext.ServiceManager.createInstanceWithContext( - "com.sun.star.bridge.UnoUrlResolver", localContext ) + "com.sun.star.bridge.UnoUrlResolver", localContext) ctx = resolver.resolve( connectStr ) orb = ctx.ServiceManager return orb @@ -96,8 +97,10 @@ class Desktop(object): def checkforfirstSpecialCharacter(self, _xMSF, _sString, _aLocale): try: nStartFlags = ANY_LETTER_OR_NUMBER + ASC_UNDERSCORE - ocharservice = _xMSF.createInstance("com.sun.star.i18n.CharacterClassification") - aResult = ocharservice.parsePredefinedToken(KParseType.IDENTNAME, _sString, 0, _aLocale, nStartFlags, "", nStartFlags, " ") + ocharservice = _xMSF.createInstance( + "com.sun.star.i18n.CharacterClassification") + aResult = ocharservice.parsePredefinedToken(KParseType.IDENTNAME, + _sString, 0, _aLocale, nStartFlags, "", nStartFlags, " ") return aResult.EndPos except UnoException, e: e.printStackTrace(System.out) @@ -108,16 +111,18 @@ class Desktop(object): snewname = _sname i = 0 while i < snewname.length(): - i = Desktop.checkforfirstSpecialCharacter(_xMSF, snewname, _aLocale) + i = Desktop.checkforfirstSpecialCharacter(_xMSF, snewname, + _aLocale) if i < snewname.length(): sspecialchar = snewname.substring(i, i + 1) - snewname = JavaTools.replaceSubString(snewname, "", sspecialchar) + snewname = JavaTools.replaceSubString(snewname, "", + sspecialchar) return snewname ''' - Checks if the passed Element Name already exists in the ElementContainer. If yes it appends a - suffix to make it unique + Checks if the passed Element Name already exists in the ElementContainer. + If yes it appends a suffix to make it unique @param xElementContainer @param sElementName @return a unique Name ready to be added to the container. @@ -141,8 +146,8 @@ class Desktop(object): return sElementName + sIncSuffix ''' - Checks if the passed Element Name already exists in the list If yes it appends a - suffix to make it unique + Checks if the passed Element Name already exists in the list If yes it + ppends a suffix to make it unique @param _slist @param _sElementName @param _sSuffixSeparator @@ -171,7 +176,8 @@ class Desktop(object): return "" ''' - @deprecated use Configuration.getConfigurationRoot() with the same parameters instead + @deprecated use Configuration.getConfigurationRoot() with the same + arameters instead @param xMSF @param KeyName @param bForUpdate @@ -182,14 +188,20 @@ class Desktop(object): def getRegistryKeyContent(self, xMSF, KeyName, bForUpdate): try: aNodePath = range(1) - oConfigProvider = xMSF.createInstance("com.sun.star.configuration.ConfigurationProvider") - aNodePath[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + oConfigProvider = xMSF.createInstance( + "com.sun.star.configuration.ConfigurationProvider") + aNodePath[0] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') aNodePath[0].Name = "nodepath" aNodePath[0].Value = KeyName if bForUpdate: - return oConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", aNodePath) + return oConfigProvider.createInstanceWithArguments( + "com.sun.star.configuration.ConfigurationUpdateAccess", + aNodePath) else: - return oConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", aNodePath) + return oConfigProvider.createInstanceWithArguments( + "com.sun.star.configuration.ConfigurationAccess", + aNodePath) except UnoException, exception: exception.printStackTrace(System.out) @@ -199,10 +211,14 @@ class OfficePathRetriever: def OfficePathRetriever(self, xMSF): try: - TemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard") - UserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", "") - BitmapPath = FileAccess.combinePaths(xMSF, TemplatePath, "/../wizard/bitmap") - WorkPath = FileAccess.getOfficePath(xMSF, "Work", "", "") + TemplatePath = FileAccess.getOfficePath(xMSF, + "Template", "share", "/wizard") + UserTemplatePath = FileAccess.getOfficePath(xMSF, + "Template", "user", "") + BitmapPath = FileAccess.combinePaths(xMSF, TemplatePath, + "/../wizard/bitmap") + WorkPath = FileAccess.getOfficePath(xMSF, + "Work", "", "") except NoValidPathException, nopathexception: pass @@ -210,7 +226,8 @@ class OfficePathRetriever: def getTemplatePath(self, _xMSF): sTemplatePath = "" try: - sTemplatePath = FileAccess.getOfficePath(_xMSF, "Template", "share", "/wizard") + sTemplatePath = FileAccess.getOfficePath(_xMSF, + "Template", "share", "/wizard") except NoValidPathException, nopathexception: pass return sTemplatePath @@ -219,7 +236,8 @@ class OfficePathRetriever: def getUserTemplatePath(self, _xMSF): sUserTemplatePath = "" try: - sUserTemplatePath = FileAccess.getOfficePath(_xMSF, "Template", "user", "") + sUserTemplatePath = FileAccess.getOfficePath(_xMSF, + "Template", "user", "") except NoValidPathException, nopathexception: pass return sUserTemplatePath @@ -228,7 +246,8 @@ class OfficePathRetriever: def getBitmapPath(self, _xMSF): sBitmapPath = "" try: - sBitmapPath = FileAccess.combinePaths(_xMSF, getTemplatePath(_xMSF), "/../wizard/bitmap") + sBitmapPath = FileAccess.combinePaths(_xMSF, + getTemplatePath(_xMSF), "/../wizard/bitmap") except NoValidPathException, nopathexception: pass @@ -249,7 +268,8 @@ class OfficePathRetriever: def createStringSubstitution(self, xMSF): xPathSubst = None try: - xPathSubst = xMSF.createInstance("com.sun.star.util.PathSubstitution") + xPathSubst = xMSF.createInstance( + "com.sun.star.util.PathSubstitution") except com.sun.star.uno.Exception, e: e.printStackTrace() diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 641746adf..c129b6b84 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -2,6 +2,7 @@ import traceback from NoValidPathException import * from com.sun.star.ucb import CommandAbortedException from com.sun.star.uno import Exception as UnoException +from com.sun.star.awt.VclWindowPeerAttribute import OK, YES_NO import types ''' @@ -27,8 +28,12 @@ class FileAccess(object): def addOfficePath(self, xMSF, sPath, sAddPath): xSimpleFileAccess = None ResultPath = getOfficePath(xMSF, sPath, xSimpleFileAccess) - # As there are several conventions about the look of Url (e.g. with " " or with "%20") you cannot make a - # simple String comparison to find out, if a path is already in "ResultPath" + ''' + As there are several conventions about the look of Url + (e.g. with " " or with "%20") you cannot make a + simple String comparison to find out, if a path + is already in "ResultPath + ''' PathList = JavaTools.ArrayoutofString(ResultPath, ";") MaxIndex = PathList.length - 1 CompAddPath = JavaTools.replaceSubString(sAddPath, "", "/") @@ -56,7 +61,8 @@ class FileAccess(object): @param xMSF @param sPath @param xSimpleFileAccess - @return the respective path of the office application. A probable following "/" at the end is trimmed. + @return the respective path of the office application. + A probable following "/" at the end is trimmed. ''' @classmethod @@ -76,7 +82,8 @@ class FileAccess(object): chapter 6.2.7 @param xMSF @param sPath - @param sType use "share" or "user". Set to "" if not needed eg for the WorkPath; + @param sType use "share" or "user". Set to "" + f not needed eg for the WorkPath; In the return Officepath a possible slash at the end is cut off @param sSearchDir @return @@ -88,13 +95,18 @@ class FileAccess(object): #This method currently only works with sPath="Template" bexists = False try: - xPathInterface = xMSF.createInstance("com.sun.star.util.PathSettings") + xPathInterface = xMSF.createInstance( + "com.sun.star.util.PathSettings") ResultPath = "" ReadPaths = () - xUcbInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") - Template_writable = xPathInterface.getPropertyValue(sPath + "_writable") - Template_internal = xPathInterface.getPropertyValue(sPath + "_internal") - Template_user = xPathInterface.getPropertyValue(sPath + "_user") + xUcbInterface = xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") + Template_writable = xPathInterface.getPropertyValue( + sPath + "_writable") + Template_internal = xPathInterface.getPropertyValue( + sPath + "_internal") + Template_user = xPathInterface.getPropertyValue( + sPath + "_user") if type(Template_internal) is not types.InstanceType: if isinstance(Template_internal,tuple): ReadPaths = ReadPaths + Template_internal @@ -134,16 +146,20 @@ class FileAccess(object): aPathList = [] Template_writable = "" try: - xPathInterface = xMSF.createInstance("com.sun.star.util.PathSettings") - Template_writable = xPathInterface.getPropertyValue(_sPath + "_writable") - Template_internal = xPathInterface.getPropertyValue(_sPath + "_internal") + xPathInterface = xMSF.createInstance( + "com.sun.star.util.PathSettings") + Template_writable = xPathInterface.getPropertyValue( + _sPath + "_writable") + Template_internal = xPathInterface.getPropertyValue( + _sPath + "_internal") Template_user = xPathInterface.getPropertyValue(_sPath + "_user") i = 0 while i < len(Template_internal): sPath = Template_internal[i] if sPath.startsWith("vnd."): - # if there exists a language in the directory, we try to add the right language - sPathToExpand = sPath.substring("vnd.sun.star.Expand:".length()) + # if there exists a language in the directory, + # we try to add the right language + sPathToExpand = sPath.substring(len("vnd.sun.star.Expand:")) xExpander = Helper.getMacroExpander(xMSF) sPath = xExpander.expandMacros(sPathToExpand) @@ -179,7 +195,8 @@ class FileAccess(object): aLocaleAll = StringBuffer.StringBuffer() aLocaleAll.append(sLanguage).append('-').append(sCountry).append('-').append(sVariant) sPath = _sPath + "/" + aLocaleAll.toString() - xInterface = _xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + xInterface = _xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") if xInterface.exists(sPath): # de-DE return sPath @@ -230,7 +247,8 @@ class FileAccess(object): def isPathValid(self, xMSF, _sPath): bExists = False try: - xUcbInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + xUcbInterface = xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") bExists = xUcbInterface.exists(_sPath) except Exception, exception: traceback.print_exc() @@ -242,7 +260,8 @@ class FileAccess(object): bexists = False ReturnPath = "" try: - xUcbInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + xUcbInterface = xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") ReturnPath = _sFirstPath + _sSecondPath bexists = xUcbInterface.exists(ReturnPath) except Exception, exception: @@ -264,10 +283,12 @@ class FileAccess(object): sMsgDirNotThere = oResource.getResText(1051) sQueryForNewCreation = oResource.getResText(1052) OSPath = JavaTools.convertfromURLNotation(Path) - sQueryMessage = JavaTools.replaceSubString(sMsgDirNotThere, OSPath, "%1") + sQueryMessage = JavaTools.replaceSubString(sMsgDirNotThere, + OSPath, "%1") sQueryMessage = sQueryMessage + (char) 13 + sQueryForNewCreation - icreate = SystemDialog.showMessageBox(xMSF, "QueryBox", VclWindowPeerAttribute.YES_NO, sQueryMessage) + icreate = SystemDialog.showMessageBox(xMSF, "QueryBox", + YES_NO, sQueryMessage) if icreate == 2: xSimpleFileAccess.createFolder(Path) return True @@ -275,31 +296,40 @@ class FileAccess(object): return False except CommandAbortedException, exception: sMsgNoDir = JavaTools.replaceSubString(sNoDirCreation, Path, "%1") - SystemDialog.showMessageBox(xMSF, "ErrorBox", VclWindowPeerAttribute.OK, sMsgNoDir) + SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, sMsgNoDir) return False except com.sun.star.uno.Exception, unoexception: sMsgNoDir = JavaTools.replaceSubString(sNoDirCreation, Path, "%1") - SystemDialog.showMessageBox(xMSF, "ErrorBox", VclWindowPeerAttribute.OK, sMsgNoDir) + SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, sMsgNoDir) return False - # checks if the root of a path exists. if the parameter xWindowPeer is not null then also the directory is - # created when it does not exists and the user + ''' + checks if the root of a path exists. if the parameter + xWindowPeer is not null then also the directory is + created when it does not exists and the user + ''' @classmethod - def PathisValid(self, xMSF, Path, sMsgFilePathInvalid, baskbeforeOverwrite): + def PathisValid(self, xMSF, Path, sMsgFilePathInvalid, + baskbeforeOverwrite): try: SubDirPath = "" bSubDirexists = True NewPath = Path - xInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + xInterface = xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") if baskbeforeOverwrite: if xInterface.exists(Path): - oResource = Resource.Resource_unknown(xMSF, "ImportWizard", "imp") + oResource = Resource.Resource_unknown(xMSF, + "ImportWizard", "imp") sFileexists = oResource.getResText(1053) NewString = JavaTools.convertfromURLNotation(Path) - sFileexists = JavaTools.replaceSubString(sFileexists, NewString, "<1>") - sFileexists = JavaTools.replaceSubString(sFileexists, String.valueOf(13), "") - iLeave = SystemDialog.showMessageBox(xMSF, "QueryBox", VclWindowPeerAttribute.YES_NO, sFileexists) + sFileexists = JavaTools.replaceSubString(sFileexists, + NewString, "<1>") + sFileexists = JavaTools.replaceSubString(sFileexists, + str(13), "") + iLeave = SystemDialog.showMessageBox(xMSF, "QueryBox", + YES_NO, sFileexists) if iLeave == 3: return False @@ -320,11 +350,15 @@ class FileAccess(object): bexists = xSimpleFileAccess.exists(NewPath) if bexists: LowerCasePath = NewPath.toLowerCase() - bexists = (((LowerCasePath.equals("file:#/")) or (LowerCasePath.equals("file:#")) or (LowerCasePath.equals("file:/")) or (LowerCasePath.equals("file:"))) == False) + bexists = (((LowerCasePath.equals("file:#/")) or + (LowerCasePath.equals("file:#")) or + (LowerCasePath.equals("file:/")) or + (LowerCasePath.equals("file:"))) == False) if bexists: if bSubDirexists == False: - bSubDiriscreated = createSubDirectory(xMSF, xSimpleFileAccess, SubDirPath) + bSubDiriscreated = createSubDirectory(xMSF, + xSimpleFileAccess, SubDirPath) return bSubDiriscreated return True @@ -333,21 +367,23 @@ class FileAccess(object): i -= 1 - SystemDialog.showMessageBox(xMSF, "ErrorBox", VclWindowPeerAttribute.OK, sMsgFilePathInvalid) + SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, + sMsgFilePathInvalid) return False except com.sun.star.uno.Exception, exception: traceback.print_exc() - SystemDialog.showMessageBox(xMSF, "ErrorBox", VclWindowPeerAttribute.OK, sMsgFilePathInvalid) + SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, + sMsgFilePathInvalid) return False ''' searches a directory for files which start with a certain prefix, and returns their URLs and document-titles. @param xMSF - @param FilterName the prefix of the filename. a "-" is added to the prefix ! + @param FilterName the prefix of the filename. a "-" is added to the prefix @param FolderName the folder (URL) to look for files... - @return an array with two array members. The first one, with document titles, - the second with the corresponding URLs. + @return an array with two array members. The first one, with document + titles, the second with the corresponding URLs. @deprecated please use the getFolderTitles() with ArrayList ''' @@ -357,8 +393,10 @@ class FileAccess(object): try: TitleVector = None NameVector = None - xDocInterface = xMSF.createInstance("com.sun.star.document.DocumentProperties") - xInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + xDocInterface = xMSF.createInstance( + "com.sun.star.document.DocumentProperties") + xInterface = xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") nameList = xInterface.getFolderContents(FolderName, False) TitleVector = [] NameVector = [] @@ -406,7 +444,8 @@ class FileAccess(object): def getPathFromList(self, xMSF, _aList, _sFile): sFoundFile = "" try: - xInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + xInterface = xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") i = 0 while i < _aList.size(): sPath = _aList.get(i) @@ -424,7 +463,8 @@ class FileAccess(object): def getTitle(self, xMSF, _sFile): sTitle = "" try: - xDocInterface = xMSF.createInstance("com.sun.star.document.DocumentProperties") + xDocInterface = xMSF.createInstance( + "com.sun.star.document.DocumentProperties") noArgs = [] xDocInterface.loadFromMedium(_sFile, noArgs) sTitle = xDocInterface.getTitle() @@ -434,7 +474,9 @@ class FileAccess(object): return sTitle @classmethod - def getFolderTitles2(self, xMSF, _sStartFilterName, FolderName, _sEndFilterName=""): + def getFolderTitles2(self, xMSF, _sStartFilterName, FolderName, + _sEndFilterName=""): + LocLayoutFiles = [[2],[]] if FolderName.size() == 0: raise NoValidPathException (None, "Path not given."); @@ -443,7 +485,8 @@ class FileAccess(object): URLVector = [] xInterface = None try: - xInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + xInterface = xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") except com.sun.star.uno.Exception, e: traceback.print_exc() raise NoValidPathException (None, "Internal error."); @@ -462,11 +505,13 @@ class FileAccess(object): i = 0 while i < nameList.length: fileName = self.getFilename(i) - if _sStartFilterName == None or fileName.startsWith(_sStartFilterName): + if _sStartFilterName == None or \ + fileName.startsWith(_sStartFilterName): if _sEndFilterName.equals(""): sTitle = getTitle(xMSF, nameList[i]) elif fileName.endsWith(_sEndFilterName): - fileName = fileName.replaceAll(_sEndFilterName + "$", "") + fileName = fileName.replaceAll( + _sEndFilterName + "$", "") sTitle = fileName else: # no or wrong (start|end) filter @@ -498,9 +543,11 @@ class FileAccess(object): def __init__(self, xmsf): #get a simple file access... - self.fileAccess = xmsf.createInstance("com.sun.star.ucb.SimpleFileAccess") + self.fileAccess = xmsf.createInstance( + "com.sun.star.ucb.SimpleFileAccess") #get the file identifier converter - self.filenameConverter = xmsf.createInstance("com.sun.star.ucb.FileContentProvider") + self.filenameConverter = xmsf.createInstance( + "com.sun.star.ucb.FileContentProvider") def getURL(self, path, childPath=None): if childPath is not None: @@ -509,14 +556,16 @@ class FileAccess(object): else: f = open(path) - r = self.filenameConverter.getFileURLFromSystemPath(path, f.getAbsolutePath()) + r = self.filenameConverter.getFileURLFromSystemPath(path, + f.getAbsolutePath()) return r def getPath(self, parentURL, childURL): string = "" if childURL is not None and childURL is not "": string = "/" + childURL - return self.filenameConverter.getSystemPathFromFileURL(parentURL + string) + return self.filenameConverter.getSystemPathFromFileURL( + parentURL + string) ''' @author rpiterman @@ -648,7 +697,8 @@ class FileAccess(object): def getBasename(self, path, pathSeparator): filename = self.getFilename(path, pathSeparator) sExtension = getExtension(filename) - basename = filename.substring(0, filename.length() - (sExtension.length() + 1)) + basename = filename.substring(0, filename.length() - \ + (sExtension.length() + 1)) return basename ''' @@ -746,10 +796,12 @@ class FileAccess(object): sFileData = None try: oDataVector = [] - oSimpleFileAccess = _xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + oSimpleFileAccess = _xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") if oSimpleFileAccess.exists(_filepath): xInputStream = oSimpleFileAccess.openFileRead(_filepath) - oTextInputStream = _xMSF.createInstance("com.sun.star.io.TextInputStream") + oTextInputStream = _xMSF.createInstance( + "com.sun.star.io.TextInputStream") oTextInputStream.setInputStream(xInputStream) while not oTextInputStream.isEOF(): oDataVector.addElement(oTextInputStream.readLine()) diff --git a/wizards/com/sun/star/wizards/common/HelpIds.py b/wizards/com/sun/star/wizards/common/HelpIds.py index ba8f07566..c6bd1b78c 100644 --- a/wizards/com/sun/star/wizards/common/HelpIds.py +++ b/wizards/com/sun/star/wizards/common/HelpIds.py @@ -1,1002 +1,1012 @@ -array1 = [ -"HID:WIZARDS_HID0_WEBWIZARD", # HID:34200 -"HID:WIZARDS_HID0_HELP", # HID:34201 -"HID:WIZARDS_HID0_NEXT", # HID:34202 -"HID:WIZARDS_HID0_PREV", # HID:34203 -"HID:WIZARDS_HID0_CREATE", # HID:34204 -"HID:WIZARDS_HID0_CANCEL", # HID:34205 -"HID:WIZARDS_HID0_STATUS_DIALOG", # HID:34206 -"HID:WIZARDS_HID1_LST_SESSIONS", # HID:34207 -"", -"HID:WIZARDS_HID1_BTN_DEL_SES", # HID:34209 -"HID:WIZARDS_HID2_LST_DOCS", # HID:34210 -"HID:WIZARDS_HID2_BTN_ADD_DOC", # HID:34211 -"HID:WIZARDS_HID2_BTN_REM_DOC", # HID:34212 -"HID:WIZARDS_HID2_BTN_DOC_UP", # HID:34213 -"HID:WIZARDS_HID2_BTN_DOC_DOWN", # HID:34214 -"HID:WIZARDS_HID2_TXT_DOC_TITLE", # HID:34215 -"HID:WIZARDS_HID2_TXT_DOC_DESC", # HID:34216 -"HID:WIZARDS_HID2_TXT_DOC_AUTHOR", # HID:34217 -"HID:WIZARDS_HID2_LST_DOC_EXPORT", # HID:34218 -"HID:WIZARDS_HID2_STATUS_ADD_DOCS", # HID:34219 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG1", # HID:34220 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG2", # HID:34221 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG3", # HID:34222 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG4", # HID:34223 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG5", # HID:34224 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG6", # HID:34225 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG7", # HID:34226 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG8", # HID:34227 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG9", # HID:34228 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG10", # HID:34229 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG11", # HID:34230 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG12", # HID:34231 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG13", # HID:34232 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG14", # HID:34233 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG15", # HID:34234 -"HID:WIZARDS_HID4_CHK_DISPLAY_FILENAME", # HID:34235 -"HID:WIZARDS_HID4_CHK_DISPLAY_DESCRIPTION", # HID:34236 -"HID:WIZARDS_HID4_CHK_DISPLAY_AUTHOR", # HID:34237 -"HID:WIZARDS_HID4_CHK_DISPLAY_CR_DATE", # HID:34238 -"HID:WIZARDS_HID4_CHK_DISPLAY_UP_DATE", # HID:34239 -"HID:WIZARDS_HID4_CHK_DISPLAY_FORMAT", # HID:34240 -"HID:WIZARDS_HID4_CHK_DISPLAY_F_ICON", # HID:34241 -"HID:WIZARDS_HID4_CHK_DISPLAY_PAGES", # HID:34242 -"HID:WIZARDS_HID4_CHK_DISPLAY_SIZE", # HID:34243 -"HID:WIZARDS_HID4_GRP_OPTIMAIZE_640", # HID:34244 -"HID:WIZARDS_HID4_GRP_OPTIMAIZE_800", # HID:34245 -"HID:WIZARDS_HID4_GRP_OPTIMAIZE_1024", # HID:34246 -"HID:WIZARDS_HID5_LST_STYLES", # HID:34247 -"HID:WIZARDS_HID5_BTN_BACKGND", # HID:34248 -"HID:WIZARDS_HID5_BTN_ICONS", # HID:34249 -"HID:WIZARDS_HID6_TXT_SITE_TITLE", # HID:34250 -"", -"", -"HID:WIZARDS_HID6_TXT_SITE_DESC", # HID:34253 -"", -"HID:WIZARDS_HID6_DATE_SITE_CREATED", # HID:34255 -"HID:WIZARDS_HID6_DATE_SITE_UPDATED", # HID:34256 -"", -"HID:WIZARDS_HID6_TXT_SITE_EMAIL", # HID:34258 -"HID:WIZARDS_HID6_TXT_SITE_COPYRIGHT", # HID:34259 -"HID:WIZARDS_HID7_BTN_PREVIEW", # HID:34260 -"HID:WIZARDS_HID7_CHK_PUBLISH_LOCAL", # HID:34261 -"HID:WIZARDS_HID7_TXT_LOCAL", # HID:34262 -"HID:WIZARDS_HID7_BTN_LOCAL", # HID:34263 -"HID:WIZARDS_HID7_CHK_PUBLISH_ZIP", # HID:34264 -"HID:WIZARDS_HID7_TXT_ZIP", # HID:34265 -"HID:WIZARDS_HID7_BTN_ZIP", # HID:34266 -"HID:WIZARDS_HID7_CHK_PUBLISH_FTP", # HID:34267 -"HID:WIZARDS_HID7_TXT_FTP", # HID:34268 -"HID:WIZARDS_HID7_BTN_FTP", # HID:34269 -"HID:WIZARDS_HID7_CHK_SAVE", # HID:34270 -"HID:WIZARDS_HID7_TXT_SAVE", # HID:34271 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_BG", # HID:34290 -"HID:WIZARDS_HID_BG_BTN_OTHER", # HID:34291 -"HID:WIZARDS_HID_BG_BTN_NONE", # HID:34292 -"HID:WIZARDS_HID_BG_BTN_OK", # HID:34293 -"HID:WIZARDS_HID_BG_BTN_CANCEL", # HID:34294 -"HID:WIZARDS_HID_BG_BTN_BACK", # HID:34295 -"HID:WIZARDS_HID_BG_BTN_FW", # HID:34296 -"HID:WIZARDS_HID_BG_BTN_IMG1", # HID:34297 -"HID:WIZARDS_HID_BG_BTN_IMG2", # HID:34298 -"HID:WIZARDS_HID_BG_BTN_IMG3", # HID:34299 -"HID:WIZARDS_HID_BG_BTN_IMG4", # HID:34300 -"HID:WIZARDS_HID_BG_BTN_IMG5", # HID:34301 -"HID:WIZARDS_HID_BG_BTN_IMG6", # HID:34302 -"HID:WIZARDS_HID_BG_BTN_IMG7", # HID:34303 -"HID:WIZARDS_HID_BG_BTN_IMG8", # HID:34304 -"HID:WIZARDS_HID_BG_BTN_IMG9", # HID:34305 -"HID:WIZARDS_HID_BG_BTN_IMG10", # HID:34306 -"HID:WIZARDS_HID_BG_BTN_IMG11", # HID:34307 -"HID:WIZARDS_HID_BG_BTN_IMG12", # HID:34308 -"HID:WIZARDS_HID_BG_BTN_IMG13", # HID:34309 -"HID:WIZARDS_HID_BG_BTN_IMG14", # HID:34300 -"HID:WIZARDS_HID_BG_BTN_IMG15", # HID:34311 -"HID:WIZARDS_HID_BG_BTN_IMG16", # HID:34312 -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGREPORT_DIALOG", # HID:34320 -"", -"HID:WIZARDS_HID_DLGREPORT_0_CMDPREV", # HID:34322 -"HID:WIZARDS_HID_DLGREPORT_0_CMDNEXT", # HID:34323 -"HID:WIZARDS_HID_DLGREPORT_0_CMDFINISH", # HID:34324 -"HID:WIZARDS_HID_DLGREPORT_0_CMDCANCEL", # HID:34325 -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGREPORT_1_LBTABLES", # HID:34330 -"HID:WIZARDS_HID_DLGREPORT_1_FIELDSAVAILABLE", # HID:34331 -"HID:WIZARDS_HID_DLGREPORT_1_CMDMOVESELECTED", # HID:34332 -"HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEALL", # HID:34333 -"HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVESELECTED", # HID:34334 -"HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVEALL", # HID:34335 -"HID:WIZARDS_HID_DLGREPORT_1_FIELDSSELECTED", # HID:34336 -"HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEUP", # HID:34337 -"HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEDOWN", # HID:34338 -"", -"HID:WIZARDS_HID_DLGREPORT_2_GROUPING", # HID:34340 -"HID:WIZARDS_HID_DLGREPORT_2_CMDGROUP", # HID:34341 -"HID:WIZARDS_HID_DLGREPORT_2_CMDUNGROUP", # HID:34342 -"HID:WIZARDS_HID_DLGREPORT_2_PREGROUPINGDEST", # HID:34343 -"HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEUPGROUP", # HID:34344 -"HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEDOWNGROUP", # HID:34345 -"HID:WIZARDS_HID_DLGREPORT_3_SORT1", # HID:34346 -"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND1", # HID:34347 -"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND1", # HID:34348 -"HID:WIZARDS_HID_DLGREPORT_3_SORT2", # HID:34349 -"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND2", # HID:34350 -"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND2", # HID:34351 -"HID:WIZARDS_HID_DLGREPORT_3_SORT3", # HID:34352 -"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND3", # HID:34353 -"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND3", # HID:34354 -"HID:WIZARDS_HID_DLGREPORT_3_SORT4", # HID:34355 -"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND4", # HID:34356 -"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND4", # HID:34357 -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGREPORT_4_TITLE", # HID:34362 -"HID:WIZARDS_HID_DLGREPORT_4_DATALAYOUT", # HID:34363 -"HID:WIZARDS_HID_DLGREPORT_4_PAGELAYOUT", # HID:34364 -"HID:WIZARDS_HID_DLGREPORT_4_LANDSCAPE", # HID:34365 -"HID:WIZARDS_HID_DLGREPORT_4_PORTRAIT", # HID:34366 -"", -"", -"", -"HID:WIZARDS_HID_DLGREPORT_5_OPTDYNTEMPLATE", # HID:34370 -"HID:WIZARDS_HID_DLGREPORT_5_OPTSTATDOCUMENT", # HID:34371 -"HID:WIZARDS_HID_DLGREPORT_5_TXTTEMPLATEPATH", # HID:34372 -"HID:WIZARDS_HID_DLGREPORT_5_CMDTEMPLATEPATH", # HID:34373 -"HID:WIZARDS_HID_DLGREPORT_5_OPTEDITTEMPLATE", # HID:34374 -"HID:WIZARDS_HID_DLGREPORT_5_OPTUSETEMPLATE", # HID:34375 -"HID:WIZARDS_HID_DLGREPORT_5_TXTDOCUMENTPATH", # HID:34376 -"HID:WIZARDS_HID_DLGREPORT_5_CMDDOCUMENTPATH", # HID:34377 -"HID:WIZARDS_HID_DLGREPORT_5_CHKLINKTODB", # HID:34378 -"", -"", -"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_1", # HID:34381 -"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_2", # HID:34382 -"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_3", # HID:34383 -"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_4", # HID:34384 -"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_5", # HID:34385 -"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_6", # HID:34386 -"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_7", # HID:34387 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGFORM_DIALOG", # HID:34400 -"", -"HID:WIZARDS_HID_DLGFORM_CMDPREV", # HID:34402 -"HID:WIZARDS_HID_DLGFORM_CMDNEXT", # HID:34403 -"HID:WIZARDS_HID_DLGFORM_CMDFINISH", # HID:34404 -"HID:WIZARDS_HID_DLGFORM_CMDCANCEL", # HID:34405 -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGFORM_MASTER_LBTABLES", # HID:34411 -"HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSAVAILABLE", # HID:34412 -"HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVESELECTED", # HID:34413 -"HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEALL", # HID:34414 -"HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVESELECTED", # HID:34415 -"HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVEALL", # HID:34416 -"HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSSELECTED", # HID:34417 -"HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEUP", # HID:34418 -"HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEDOWN", # HID:34419 -"", -"HID:WIZARDS_HID_DLGFORM_CHKCREATESUBFORM", # HID:34421 -"HID:WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION", # HID:34422 -"HID:WIZARDS_HID_DLGFORM_OPTSELECTMANUALLY", # HID:34423 -"HID:WIZARDS_HID_DLGFORM_lstRELATIONS", # HID:34424 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGFORM_SUB_LBTABLES", # HID:34431 -"HID:WIZARDS_HID_DLGFORM_SUB_FIELDSAVAILABLE", # HID:34432 -"HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVESELECTED", # HID:34433 -"HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEALL", # HID:34434 -"HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVESELECTED", # HID:34435 -"HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVEALL", # HID:34436 -"HID:WIZARDS_HID_DLGFORM_SUB_FIELDSSELECTED", # HID:34437 -"HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEUP", # HID:34438 -"HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEDOWN", # HID:34439 -"", -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK1", # HID:34441 -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK1", # HID:34442 -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK2", # HID:34443 -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK2", # HID:34444 -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK3", # HID:34445 -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK3", # HID:34446 -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK4", # HID:34447 -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK4", # HID:34448 -"", -"", -"HID:WIZARDS_HID_DLGFORM_CMDALIGNLEFT", # HID:34451 -"HID:WIZARDS_HID_DLGFORM_CMDALIGNRIGHT", # HID:34452 -"HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED", # HID:34453 -"HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED", # HID:34454 -"HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE", # HID:34455 -"HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED", # HID:34456 -"HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED2", # HID:34457 -"HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED2", # HID:34458 -"HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE2", # HID:34459 -"HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED2", # HID:34460 -"HID:WIZARDS_HID_DLGFORM_OPTNEWDATAONLY", # HID:34461 -"HID:WIZARDS_HID_DLGFORM_OPTDISPLAYALLDATA", # HID:34462 -"HID:WIZARDS_HID_DLGFORM_CHKNOMODIFICATION", # HID:34463 -"HID:WIZARDS_HID_DLGFORM_CHKNODELETION", # HID:34464 -"HID:WIZARDS_HID_DLGFORM_CHKNOADDITION", # HID:34465 -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGFORM_LSTSTYLES", # HID:34471 -"HID:WIZARDS_HID_DLGFORM_CMDNOBORDER", # HID:34472 -"HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", # HID:34473 -"HID:WIZARDS_HID_DLGFORM_CMDSIMPLEBORDER", # HID:34474 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGFORM_TXTPATH", # HID:34481 -"HID:WIZARDS_HID_DLGFORM_OPTWORKWITHFORM", # HID:34482 -"HID:WIZARDS_HID_DLGFORM_OPTMODIFYFORM", # HID:34483 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGNEWSLTR_DIALOG", # HID:34500 -"HID:WIZARDS_HID_DLGNEWSLTR_OPTSTANDARDLAYOUT", # HID:34501 -"HID:WIZARDS_HID_DLGNEWSLTR_OPTPARTYLAYOUT", # HID:34502 -"HID:WIZARDS_HID_DLGNEWSLTR_OPTBROCHURELAYOUT", # HID:34503 -"HID:WIZARDS_HID_DLGNEWSLTR_OPTSINGLESIDED", # HID:34504 -"HID:WIZARDS_HID_DLGNEWSLTR_OPTDOUBLESIDED", # HID:34505 -"HID:WIZARDS_HID_DLGNEWSLTR_CMDGOON", # HID:34506 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGDEPOT_DIALOG_SELLBUY", # HID:34520 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SELLBUY", # HID:34521 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTQUANTITY", # HID:34522 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTRATE", # HID:34523 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTDATE", # HID:34524 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTCOMMISSION", # HID:34525 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTFIX", # HID:34526 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTMINIMUM", # HID:34527 -"HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SELLBUY", # HID:34528 -"HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SELLBUY", # HID:34529 -"HID:WIZARDS_HID_DLGDEPOT_1_LSTSELLSTOCKS", # HID:34530 -"HID:WIZARDS_HID_DLGDEPOT_2_LSTBUYSTOCKS", # HID:34531 -"HID:WIZARDS_HID_DLGDEPOT_DIALOG_SPLIT", # HID:34532 -"HID:WIZARDS_HID_DLGDEPOT_0_LSTSTOCKNAMES", # HID:34533 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SPLIT", # HID:34534 -"HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SPLIT", # HID:34535 -"HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SPLIT", # HID:34536 -"HID:WIZARDS_HID_DLGDEPOT_1_OPTPERSHARE", # HID:34537 -"HID:WIZARDS_HID_DLGDEPOT_1_OPTTOTAL", # HID:34538 -"HID:WIZARDS_HID_DLGDEPOT_1_TXTDIVIDEND", # HID:34539 -"HID:WIZARDS_HID_DLGDEPOT_2_TXTOLDRATE", # HID:34540 -"HID:WIZARDS_HID_DLGDEPOT_2_TXTNEWRATE", # HID:34541 -"HID:WIZARDS_HID_DLGDEPOT_2_TXTDATE", # HID:34542 -"HID:WIZARDS_HID_DLGDEPOT_3_TXTSTARTDATE", # HID:34543 -"HID:WIZARDS_HID_DLGDEPOT_3_TXTENDDATE", # HID:34544 -"HID:WIZARDS_HID_DLGDEPOT_3_OPTDAILY", # HID:34545 -"HID:WIZARDS_HID_DLGDEPOT_3_OPTWEEKLY", # HID:34546 -"HID:WIZARDS_HID_DLGDEPOT_DIALOG_HISTORY", # HID:34547 -"HID:WIZARDS_HID_DLGDEPOT_LSTMARKETS", # HID:34548 -"HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_HISTORY", # HID:34549 -"HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_HISTORY", # HID:34550 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGIMPORT_DIALOG", # HID:34570 -"HID:WIZARDS_HID_DLGIMPORT_0_CMDHELP", # HID:34571 -"HID:WIZARDS_HID_DLGIMPORT_0_CMDCANCEL", # HID:34572 -"HID:WIZARDS_HID_DLGIMPORT_0_CMDPREV", # HID:34573 -"HID:WIZARDS_HID_DLGIMPORT_0_CMDNEXT", # HID:34574 -"HID:WIZARDS_HID_DLGIMPORT_0_OPTSODOCUMENTS", # HID:34575 -"HID:WIZARDS_HID_DLGIMPORT_0_OPTMSDOCUMENTS", # HID:34576 -"HID:WIZARDS_HID_DLGIMPORT_0_CHKLOGFILE", # HID:34577 -"HID:WIZARDS_HID_DLGIMPORT_2_CHKWORD", # HID:34578 -"HID:WIZARDS_HID_DLGIMPORT_2_CHKEXCEL", # HID:34579 -"HID:WIZARDS_HID_DLGIMPORT_2_CHKPOWERPOINT", # HID:34580 -"HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATE", # HID:34581 -"HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATERECURSE", # HID:34582 -"HID:WIZARDS_HID_DLGIMPORT_2_LBTEMPLATEPATH", # HID:34583 -"HID:WIZARDS_HID_DLGIMPORT_2_EDTEMPLATEPATH", # HID:34584 -"HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT", # HID:34585 -"HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENT", # HID:34586 -"HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENTRECURSE", # HID:34587 -"HID:WIZARDS_HID_DLGIMPORT_2_LBDOCUMENTPATH", # HID:34588 -"HID:WIZARDS_HID_DLGIMPORT_2_EDDOCUMENTPATH", # HID:34589 -"HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT", # HID:34590 -"HID:WIZARDS_HID_DLGIMPORT_2_LBEXPORTDOCUMENTPATH", # HID:34591 -"HID:WIZARDS_HID_DLGIMPORT_2_EDEXPORTDOCUMENTPATH", # HID:34592 -"HID:WIZARDS_HID_DLGIMPORT_2_CMDEXPORTPATHSELECT", # HID:34593 -"", -"HID:WIZARDS_HID_DLGIMPORT_3_TBSUMMARY", # HID:34595 -"HID:WIZARDS_HID_DLGIMPORT_0_CHKWRITER", # HID:34596 -"HID:WIZARDS_HID_DLGIMPORT_0_CHKCALC", # HID:34597 -"HID:WIZARDS_HID_DLGIMPORT_0_CHKIMPRESS", # HID:34598 -"HID:WIZARDS_HID_DLGIMPORT_0_CHKMATHGLOBAL", # HID:34599 -"HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT2", # HID:34600 -"HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT2", # HID:34601 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGCORRESPONDENCE_DIALOG", # HID:34630 -"HID:WIZARDS_HID_DLGCORRESPONDENCE_CANCEL", # HID:34631 -"HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA1", # HID:34632 -"HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA2", # HID:34633 -"HID:WIZARDS_HID_DLGCORRESPONDENCE_AGENDAOKAY", # HID:34634 -"HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER1", # HID:34635 -"HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER2", # HID:34636 -"HID:WIZARDS_HID_DLGCORRESPONDENCE_LETTEROKAY", # HID:34637 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGSTYLES_DIALOG", # HID:34650 -"HID:WIZARDS_HID_DLGSTYLES_LISTBOX", # HID:34651 -"HID:WIZARDS_HID_DLGSTYLES_CANCEL", # HID:34652 -"HID:WIZARDS_HID_DLGSTYLES_OKAY", # HID:34653 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGCONVERT_DIALOG", # HID:34660 -"HID:WIZARDS_HID_DLGCONVERT_CHECKBOX1", # HID:34661 -"HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON1", # HID:34662 -"HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON2", # HID:34663 -"HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON3", # HID:34664 -"HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON4", # HID:34665 -"HID:WIZARDS_HID_DLGCONVERT_LISTBOX1", # HID:34666 -"HID:WIZARDS_HID_DLGCONVERT_OBFILE", # HID:34667 -"HID:WIZARDS_HID_DLGCONVERT_OBDIR", # HID:34668 -"HID:WIZARDS_HID_DLGCONVERT_COMBOBOX1", # HID:34669 -"HID:WIZARDS_HID_DLGCONVERT_TBSOURCE", # HID:34670 -"HID:WIZARDS_HID_DLGCONVERT_CHECKRECURSIVE", # HID:34671 -"HID:WIZARDS_HID_DLGCONVERT_TBTARGET", # HID:34672 -"HID:WIZARDS_HID_DLGCONVERT_CBCANCEL", # HID:34673 -"HID:WIZARDS_HID_DLGCONVERT_CBHELP", # HID:34674 -"HID:WIZARDS_HID_DLGCONVERT_CBBACK", # HID:34675 -"HID:WIZARDS_HID_DLGCONVERT_CBGOON", # HID:34676 -"HID:WIZARDS_HID_DLGCONVERT_CBSOURCEOPEN", # HID:34677 -"HID:WIZARDS_HID_DLGCONVERT_CBTARGETOPEN", # HID:34678 -"HID:WIZARDS_HID_DLGCONVERT_CHKPROTECT", # HID:34679 -"HID:WIZARDS_HID_DLGCONVERT_CHKTEXTDOCUMENTS", # HID:34680 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGPASSWORD_CMDGOON", # HID:34690 -"HID:WIZARDS_HID_DLGPASSWORD_CMDCANCEL", # HID:34691 -"HID:WIZARDS_HID_DLGPASSWORD_CMDHELP", # HID:34692 -"HID:WIZARDS_HID_DLGPASSWORD_TXTPASSWORD", # HID:34693 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGHOLIDAYCAL_DIALOG", # HID:34700 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_PREVIEW", # HID:34701 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPYEAR", # HID:34702 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPMONTH", # HID:34703 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDYEAR", # HID:34704 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDMONTH", # HID:34705 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINYEAR", # HID:34706 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINMONTH", # HID:34707 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_CMBSTATE", # HID:34708 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_LBOWNDATA", # HID:34709 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDINSERT", # HID:34710 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDDELETE", # HID:34711 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENT", # HID:34712 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CHKEVENT", # HID:34713 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTDAY", # HID:34714 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTDAY", # HID:34715 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTMONTH", # HID:34716 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTMONTH", # HID:34717 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTYEAR", # HID:34718 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTYEAR", # HID:34719 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOWNDATA", # HID:34720 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDCANCEL", # HID:34721 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOK" # HID:34722 -] -array2 = ["HID:WIZARDS_HID_LTRWIZ_OPTBUSINESSLETTER", # HID:40769 -"HID:WIZARDS_HID_LTRWIZ_OPTPRIVOFFICIALLETTER", # HID:40770 -"HID:WIZARDS_HID_LTRWIZ_OPTPRIVATELETTER", # HID:40771 -"HID:WIZARDS_HID_LTRWIZ_LSTBUSINESSSTYLE", # HID:40772 -"HID:WIZARDS_HID_LTRWIZ_CHKBUSINESSPAPER", # HID:40773 -"HID:WIZARDS_HID_LTRWIZ_LSTPRIVOFFICIALSTYLE", # HID:40774 -"HID:WIZARDS_HID_LTRWIZ_LSTPRIVATESTYLE", # HID:40775 -"HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYLOGO", # HID:40776 -"HID:WIZARDS_HID_LTRWIZ_NUMLOGOHEIGHT", # HID:40777 -"HID:WIZARDS_HID_LTRWIZ_NUMLOGOX", # HID:40778 -"HID:WIZARDS_HID_LTRWIZ_NUMLOGOWIDTH", # HID:40779 -"HID:WIZARDS_HID_LTRWIZ_NUMLOGOY", # HID:40780 -"HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYADDRESS", # HID:40781 -"HID:WIZARDS_HID_LTRWIZ_NUMADDRESSHEIGHT", # HID:40782 -"HID:WIZARDS_HID_LTRWIZ_NUMADDRESSX", # HID:40783 -"HID:WIZARDS_HID_LTRWIZ_NUMADDRESSWIDTH", # HID:40784 -"HID:WIZARDS_HID_LTRWIZ_NUMADDRESSY", # HID:40785 -"HID:WIZARDS_HID_LTRWIZ_CHKCOMPANYRECEIVER", # HID:40786 -"HID:WIZARDS_HID_LTRWIZ_CHKPAPERFOOTER", # HID:40787 -"HID:WIZARDS_HID_LTRWIZ_NUMFOOTERHEIGHT", # HID:40788 -"HID:WIZARDS_HID_LTRWIZ_LSTLETTERNORM", # HID:40789 -"HID:WIZARDS_HID_LTRWIZ_CHKUSELOGO", # HID:40790 -"HID:WIZARDS_HID_LTRWIZ_CHKUSEADDRESSRECEIVER", # HID:40791 -"HID:WIZARDS_HID_LTRWIZ_CHKUSESIGNS", # HID:40792 -"HID:WIZARDS_HID_LTRWIZ_CHKUSESUBJECT", # HID:40793 -"HID:WIZARDS_HID_LTRWIZ_CHKUSESALUTATION", # HID:40794 -"HID:WIZARDS_HID_LTRWIZ_LSTSALUTATION", # HID:40795 -"HID:WIZARDS_HID_LTRWIZ_CHKUSEBENDMARKS", # HID:40796 -"HID:WIZARDS_HID_LTRWIZ_CHKUSEGREETING", # HID:40797 -"HID:WIZARDS_HID_LTRWIZ_LSTGREETING", # HID:40798 -"HID:WIZARDS_HID_LTRWIZ_CHKUSEFOOTER", # HID:40799 -"HID:WIZARDS_HID_LTRWIZ_OPTSENDERPLACEHOLDER", # HID:40800 -"HID:WIZARDS_HID_LTRWIZ_OPTSENDERDEFINE", # HID:40801 -"HID:WIZARDS_HID_LTRWIZ_TXTSENDERNAME", # HID:40802 -"HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTREET", # HID:40803 -"HID:WIZARDS_HID_LTRWIZ_TXTSENDERPOSTCODE", # HID:40804 -"HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTATE_TEXT", # HID:40805 -"HID:WIZARDS_HID_LTRWIZ_TXTSENDERCITY", # HID:40806 -"HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERPLACEHOLDER", # HID:40807 -"HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERDATABASE", # HID:40808 -"HID:WIZARDS_HID_LTRWIZ_TXTFOOTER", # HID:40809 -"HID:WIZARDS_HID_LTRWIZ_CHKFOOTERNEXTPAGES", # HID:40810 -"HID:WIZARDS_HID_LTRWIZ_CHKFOOTERPAGENUMBERS", # HID:40811 -"HID:WIZARDS_HID_LTRWIZ_TXTTEMPLATENAME", # HID:40812 -"HID:WIZARDS_HID_LTRWIZ_OPTCREATELETTER", # HID:40813 -"HID:WIZARDS_HID_LTRWIZ_OPTMAKECHANGES", # HID:40814 -"HID:WIZARDS_HID_LTRWIZ_TXTPATH", # HID:40815 -"HID:WIZARDS_HID_LTRWIZ_CMDPATH", # HID:40816 -"", -"", -"", -"HID:WIZARDS_HID_LTRWIZARD", # HID:40820 -"HID:WIZARDS_HID_LTRWIZARD_HELP", # HID:40821 -"HID:WIZARDS_HID_LTRWIZARD_BACK", # HID:40822 -"HID:WIZARDS_HID_LTRWIZARD_NEXT", # HID:40823 -"HID:WIZARDS_HID_LTRWIZARD_CREATE", # HID:40824 -"HID:WIZARDS_HID_LTRWIZARD_CANCEL", # HID:40825 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD_LSTTABLES", # HID:40850 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDS", # HID:40851 -"HID:WIZARDS_HID_QUERYWIZARD_CMDMOVESELECTED", # HID:40852 -"HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEALL", # HID:40853 -"HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVESELECTED", # HID:40854 -"HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVEALL", # HID:40855 -"HID:WIZARDS_HID_QUERYWIZARD_LSTSELFIELDS", # HID:40856 -"HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEUP", # HID:40857 -"HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEDOWN", # HID:40858 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD_SORT1", # HID:40865 -"HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND1", # HID:40866 -"HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND1", # HID:40867 -"HID:WIZARDS_HID_QUERYWIZARD_SORT2", # HID:40868 -"HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND2", # HID:40869 -"HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND2", # HID:40870 -"HID:WIZARDS_HID_QUERYWIZARD_SORT3", # HID:40871 -"HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND3", # HID:40872 -"HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND3", # HID:40873 -"HID:WIZARDS_HID_QUERYWIZARD_SORT4", # HID:40874 -"HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND4", # HID:40875 -"HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND4", # HID:40876 -"", -"HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHALL", # HID:40878 -"HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHANY", # HID:40879 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_1", # HID:40880 -"HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_1", # HID:40881 -"HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_1", # HID:40882 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_2", # HID:40883 -"HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_2", # HID:40884 -"HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_2", # HID:40885 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_3", # HID:40886 -"HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_3", # HID:40887 -"HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_3", # HID:40888 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATEDETAILQUERY", # HID:40895 -"HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATESUMMARYQUERY", # HID:40896 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_1", # HID:40897 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_1", # HID:40898 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_2", # HID:40899 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_2", # HID:40900 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_3", # HID:40901 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_3", # HID:40902 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_4", # HID:40903 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_4", # HID:40904 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_5", # HID:40905 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_5", # HID:40906 -"HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEPLUS", # HID:40907 -"HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEMINUS", # HID:40908 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDS", # HID:40915 -"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVESELECTED", # HID:40916 -"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERREMOVESELECTED", # HID:40917 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERSELFIELDS", # HID:40918 -"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEUP", # HID:40919 -"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEDOWN", # HID:40920 -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHALL", # HID:40923 -"HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHANY", # HID:40924 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_1", # HID:40925 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_1", # HID:40926 -"HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_1", # HID:40927 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_2", # HID:40928 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_2", # HID:40929 -"HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_2", # HID:40930 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_3", # HID:40931 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_3", # HID:40932 -"HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_3", # HID:40933 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_1", # HID:40940 -"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_2", # HID:40941 -"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_3", # HID:40942 -"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_4", # HID:40943 -"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_5", # HID:40944 -"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_6", # HID:40945 -"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_7", # HID:40946 -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD_TXTQUERYTITLE", # HID:40955 -"HID:WIZARDS_HID_QUERYWIZARD_OPTDISPLAYQUERY", # HID:40956 -"HID:WIZARDS_HID_QUERYWIZARD_OPTMODIFYQUERY", # HID:40957 -"HID:WIZARDS_HID_QUERYWIZARD_TXTSUMMARY", # HID:40958 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD", # HID:40970 -"", -"HID:WIZARDS_HID_QUERYWIZARD_BACK", # HID:40972 -"HID:WIZARDS_HID_QUERYWIZARD_NEXT", # HID:40973 -"HID:WIZARDS_HID_QUERYWIZARD_CREATE", # HID:40974 -"HID:WIZARDS_HID_QUERYWIZARD_CANCEL", # HID:40975 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_IS", # HID:41000 -"", "HID:WIZARDS_HID_IS_BTN_NONE", # HID:41002 -"HID:WIZARDS_HID_IS_BTN_OK", # HID:41003 -"HID:WIZARDS_HID_IS_BTN_CANCEL", # HID:41004 -"HID:WIZARDS_HID_IS_BTN_IMG1", # HID:41005 -"HID:WIZARDS_HID_IS_BTN_IMG2", # HID:41006 -"HID:WIZARDS_HID_IS_BTN_IMG3", # HID:41007 -"HID:WIZARDS_HID_IS_BTN_IMG4", # HID:41008 -"HID:WIZARDS_HID_IS_BTN_IMG5", # HID:41009 -"HID:WIZARDS_HID_IS_BTN_IMG6", # HID:41010 -"HID:WIZARDS_HID_IS_BTN_IMG7", # HID:41011 -"HID:WIZARDS_HID_IS_BTN_IMG8", # HID:41012 -"HID:WIZARDS_HID_IS_BTN_IMG9", # HID:41013 -"HID:WIZARDS_HID_IS_BTN_IMG10", # HID:41014 -"HID:WIZARDS_HID_IS_BTN_IMG11", # HID:41015 -"HID:WIZARDS_HID_IS_BTN_IMG12", # HID:41016 -"HID:WIZARDS_HID_IS_BTN_IMG13", # HID:41017 -"HID:WIZARDS_HID_IS_BTN_IMG14", # HID:41018 -"HID:WIZARDS_HID_IS_BTN_IMG15", # HID:41019 -"HID:WIZARDS_HID_IS_BTN_IMG16", # HID:41020 -"HID:WIZARDS_HID_IS_BTN_IMG17", # HID:41021 -"HID:WIZARDS_HID_IS_BTN_IMG18", # HID:41022 -"HID:WIZARDS_HID_IS_BTN_IMG19", # HID:41023 -"HID:WIZARDS_HID_IS_BTN_IMG20", # HID:41024 -"HID:WIZARDS_HID_IS_BTN_IMG21", # HID:41025 -"HID:WIZARDS_HID_IS_BTN_IMG22", # HID:41026 -"HID:WIZARDS_HID_IS_BTN_IMG23", # HID:41027 -"HID:WIZARDS_HID_IS_BTN_IMG24", # HID:41028 -"HID:WIZARDS_HID_IS_BTN_IMG25", # HID:41029 -"HID:WIZARDS_HID_IS_BTN_IMG26", # HID:41030 -"HID:WIZARDS_HID_IS_BTN_IMG27", # HID:41031 -"HID:WIZARDS_HID_IS_BTN_IMG28", # HID:41032 -"HID:WIZARDS_HID_IS_BTN_IMG29", # HID:41033 -"HID:WIZARDS_HID_IS_BTN_IMG30", # HID:41034 -"HID:WIZARDS_HID_IS_BTN_IMG31", # HID:41035 -"HID:WIZARDS_HID_IS_BTN_IMG32", # HID:41036 -"", -"", -"", -"HID:WIZARDS_HID_FTP", # HID:41040 -"HID:WIZARDS_HID_FTP_SERVER", # HID:41041 -"HID:WIZARDS_HID_FTP_USERNAME", # HID:41042 -"HID:WIZARDS_HID_FTP_PASS", # HID:41043 -"HID:WIZARDS_HID_FTP_TEST", # HID:41044 -"HID:WIZARDS_HID_FTP_TXT_PATH", # HID:41045 -"HID:WIZARDS_HID_FTP_BTN_PATH", # HID:41046 -"HID:WIZARDS_HID_FTP_OK", # HID:41047 -"HID:WIZARDS_HID_FTP_CANCEL", # HID:41048 -"", -"", -"HID:WIZARDS_HID_AGWIZ", # HID:41051 -"HID:WIZARDS_HID_AGWIZ_HELP", # HID:41052 -"HID:WIZARDS_HID_AGWIZ_NEXT", # HID:41053 -"HID:WIZARDS_HID_AGWIZ_PREV", # HID:41054 -"HID:WIZARDS_HID_AGWIZ_CREATE", # HID:41055 -"HID:WIZARDS_HID_AGWIZ_CANCEL", # HID:41056 -"HID:WIZARDS_HID_AGWIZ_1_LIST_PAGEDESIGN", # HID:41057 -"HID:WIZARDS_HID_AGWIZ_1_CHK_MINUTES", # HID:41058 -"HID:WIZARDS_HID_AGWIZ_2_TXT_TIME", # HID:41059 -"HID:WIZARDS_HID_AGWIZ_2_TXT_DATE", # HID:41060 -"HID:WIZARDS_HID_AGWIZ_2_TXT_TITLE", # HID:41061 -"HID:WIZARDS_HID_AGWIZ_2_TXT_LOCATION", # HID:41062 -"HID:WIZARDS_HID_AGWIZ_3_CHK_MEETING_TYPE", # HID:41063 -"HID:WIZARDS_HID_AGWIZ_3_CHK_READ", # HID:41064 -"HID:WIZARDS_HID_AGWIZ_3_CHK_BRING", # HID:41065 -"HID:WIZARDS_HID_AGWIZ_3_CHK_NOTES", # HID:41066 -"HID:WIZARDS_HID_AGWIZ_4_CHK_CALLED_BY", # HID:41067 -"HID:WIZARDS_HID_AGWIZ_4_CHK_FACILITATOR", # HID:41068 -"HID:WIZARDS_HID_AGWIZ_4_CHK_NOTETAKER", # HID:41069 -"HID:WIZARDS_HID_AGWIZ_4_CHK_TIMEKEEPER", # HID:41070 -"HID:WIZARDS_HID_AGWIZ_4_CHK_ATTENDEES", # HID:41071 -"HID:WIZARDS_HID_AGWIZ_4_CHK_OBSERVERS", # HID:41072 -"HID:WIZARDS_HID_AGWIZ_4_CHK_RESOURCEPERSONS", # HID:41073 -"HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATENAME", # HID:41074 -"HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATEPATH", # HID:41075 -"HID:WIZARDS_HID_AGWIZ_6_BTN_TEMPLATEPATH", # HID:41076 -"HID:WIZARDS_HID_AGWIZ_6_OPT_CREATEAGENDA", # HID:41077 -"HID:WIZARDS_HID_AGWIZ_6_OPT_MAKECHANGES", # HID:41078 -"HID:WIZARDS_HID_AGWIZ_5_BTN_INSERT", # HID:41079 -"HID:WIZARDS_HID_AGWIZ_5_BTN_REMOVE", # HID:41080 -"HID:WIZARDS_HID_AGWIZ_5_BTN_UP", # HID:41081 -"HID:WIZARDS_HID_AGWIZ_5_BTN_DOWN", # HID:41082 -"HID:WIZARDS_HID_AGWIZ_5_SCROLL_BAR", # HID:41083 -"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_1", # HID:41084 -"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_1", # HID:41085 -"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_1", # HID:41086 -"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_2", # HID:41087 -"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_2", # HID:41088 -"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_2", # HID:41089 -"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_3", # HID:41090 -"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_3", # HID:41091 -"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_3", # HID:41092 -"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_4", # HID:41093 -"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_4", # HID:41094 -"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_4", # HID:41095 -"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_5", # HID:41096 -"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_5", # HID:41097 -"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_5", # HID:41098 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_FAXWIZ_OPTBUSINESSFAX", # HID:41120 -"HID:WIZARDS_HID_FAXWIZ_LSTBUSINESSSTYLE", # HID:41121 -"HID:WIZARDS_HID_FAXWIZ_OPTPRIVATEFAX", # HID:41122 -"HID:WIZARDS_HID_LSTPRIVATESTYLE", # HID:41123 -"HID:WIZARDS_HID_IMAGECONTROL3", # HID:41124 -"HID:WIZARDS_HID_CHKUSELOGO", # HID:41125 -"HID:WIZARDS_HID_CHKUSEDATE", # HID:41126 -"HID:WIZARDS_HID_CHKUSECOMMUNICATIONTYPE", # HID:41127 -"HID:WIZARDS_HID_LSTCOMMUNICATIONTYPE", # HID:41128 -"HID:WIZARDS_HID_CHKUSESUBJECT", # HID:41129 -"HID:WIZARDS_HID_CHKUSESALUTATION", # HID:41130 -"HID:WIZARDS_HID_LSTSALUTATION", # HID:41131 -"HID:WIZARDS_HID_CHKUSEGREETING", # HID:41132 -"HID:WIZARDS_HID_LSTGREETING", # HID:41133 -"HID:WIZARDS_HID_CHKUSEFOOTER", # HID:41134 -"HID:WIZARDS_HID_OPTSENDERPLACEHOLDER", # HID:41135 -"HID:WIZARDS_HID_OPTSENDERDEFINE", # HID:41136 -"HID:WIZARDS_HID_TXTSENDERNAME", # HID:41137 -"HID:WIZARDS_HID_TXTSENDERSTREET", # HID:41138 -"HID:WIZARDS_HID_TXTSENDERPOSTCODE", # HID:41139 -"HID:WIZARDS_HID_TXTSENDERSTATE", # HID:41140 -"HID:WIZARDS_HID_TXTSENDERCITY", # HID:41141 -"HID:WIZARDS_HID_TXTSENDERFAX", # HID:41142 -"HID:WIZARDS_HID_OPTRECEIVERPLACEHOLDER", # HID:41143 -"HID:WIZARDS_HID_OPTRECEIVERDATABASE", # HID:41144 -"HID:WIZARDS_HID_TXTFOOTER", # HID:41145 -"HID:WIZARDS_HID_CHKFOOTERNEXTPAGES", # HID:41146 -"HID:WIZARDS_HID_CHKFOOTERPAGENUMBERS", # HID:41147 -"HID:WIZARDS_HID_TXTTEMPLATENAME", # HID:41148 -"HID:WIZARDS_HID_FILETEMPLATEPATH", # HID:41149 -"HID:WIZARDS_HID_OPTCREATEFAX", # HID:41150 -"HID:WIZARDS_HID_OPTMAKECHANGES", # HID:41151 -"HID:WIZARDS_HID_IMAGECONTROL2", # HID:41152 -"HID:WIZARDS_HID_FAXWIZ_TXTPATH", # HID:41153 -"HID:WIZARDS_HID_FAXWIZ_CMDPATH", # HID:41154 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_FAXWIZARD", # HID:41180 -"HID:WIZARDS_HID_FAXWIZARD_HELP", # HID:41181 -"HID:WIZARDS_HID_FAXWIZARD_BACK", # HID:41182 -"HID:WIZARDS_HID_FAXWIZARD_NEXT", # HID:41183 -"HID:WIZARDS_HID_FAXWIZARD_CREATE", # HID:41184 -"HID:WIZARDS_HID_FAXWIZARD_CANCEL", # HID:41185 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGTABLE_DIALOG", # HID:41200 -"", -"HID:WIZARDS_HID_DLGTABLE_CMDPREV", # HID:41202 -"HID:WIZARDS_HID_DLGTABLE_CMDNEXT", # HID:41203 -"HID:WIZARDS_HID_DLGTABLE_CMDFINISH", # HID:41204 -"HID:WIZARDS_HID_DLGTABLE_CMDCANCEL", # HID:41205 -"HID:WIZARDS_HID_DLGTABLE_OPTBUSINESS", # HID:41206 -"HID:WIZARDS_HID_DLGTABLE_OPTPRIVATE", # HID:41207 -"HID:WIZARDS_HID_DLGTABLE_LBTABLES", # HID:41208 -"HID:WIZARDS_HID_DLGTABLE_FIELDSAVAILABLE", # HID:41209 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVESELECTED", # HID:41210 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVEALL", # HID:41211 -"HID:WIZARDS_HID_DLGTABLE_CMDREMOVESELECTED", # HID:41212 -"HID:WIZARDS_HID_DLGTABLE_CMDREMOVEALL", # HID:41213 -"HID:WIZARDS_HID_DLGTABLE_FIELDSSELECTED", # HID:41214 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP", # HID:41215 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN", # HID:41216 -"", -"", -"", -"HID:WIZARDS_HID_DLGTABLE_LB_SELFIELDNAMES", # HID:41220 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDUP", # HID:41221 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDDOWN", # HID:41222 -"HID:WIZARDS_HID_DLGTABLE_CMDMINUS", # HID:41223 -"HID:WIZARDS_HID_DLGTABLE_CMDPLUS", # HID:41224 -"HID:WIZARDS_HID_DLGTABLE_COLNAME", # HID:41225 -"HID:WIZARDS_HID_DLGTABLE_COLMODIFIER", # HID:41226 -"HID:WIZARDS_HID_DLGTABLE_CHK_USEPRIMEKEY", # HID:41227 -"HID:WIZARDS_HID_DLGTABLE_OPT_PK_AUTOMATIC", # HID:41228 -"HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE_AUTOMATIC", # HID:41229 -"HID:WIZARDS_HID_DLGTABLE_OPT_PK_SINGLE", # HID:41230 -"HID:WIZARDS_HID_DLGTABLE_LB_PK_FIELDNAME", # HID:41231 -"HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE", # HID:41232 -"HID:WIZARDS_HID_DLGTABLE_OPT_PK_SEVERAL", # HID:41233 -"HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_AVAILABLE", # HID:41234 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVE_PK_SELECTED", # HID:41235 -"HID:WIZARDS_HID_DLGTABLE_CMDREMOVE_PK_SELECTED", # HID:41236 -"HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_SELECTED", # HID:41237 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP_PK_SELECTED", # HID:41238 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN_PK_SELECTED", # HID:41239 -"HID:WIZARDS_HID_DLGTABLE_TXT_NAME", # HID:41240 -"HID:WIZARDS_HID_DLGTABLE_OPT_MODIFYTABLE", # HID:41241 -"HID:WIZARDS_HID_DLGTABLE_OPT_WORKWITHTABLE", # HID:41242 -"HID:WIZARDS_HID_DLGTABLE_OPT_STARTFORMWIZARD", # HID:41243 -"HID:WIZARDS_HID_DLGTABLE_LST_CATALOG", # HID:41244 -"HID:WIZARDS_HID_DLGTABLE_LST_SCHEMA" # HID:41245 -] +class HelpIds: + array1 = [ + "HID:WIZARDS_HID0_WEBWIZARD", # HID:34200 + "HID:WIZARDS_HID0_HELP", # HID:34201 + "HID:WIZARDS_HID0_NEXT", # HID:34202 + "HID:WIZARDS_HID0_PREV", # HID:34203 + "HID:WIZARDS_HID0_CREATE", # HID:34204 + "HID:WIZARDS_HID0_CANCEL", # HID:34205 + "HID:WIZARDS_HID0_STATUS_DIALOG", # HID:34206 + "HID:WIZARDS_HID1_LST_SESSIONS", # HID:34207 + "", + "HID:WIZARDS_HID1_BTN_DEL_SES", # HID:34209 + "HID:WIZARDS_HID2_LST_DOCS", # HID:34210 + "HID:WIZARDS_HID2_BTN_ADD_DOC", # HID:34211 + "HID:WIZARDS_HID2_BTN_REM_DOC", # HID:34212 + "HID:WIZARDS_HID2_BTN_DOC_UP", # HID:34213 + "HID:WIZARDS_HID2_BTN_DOC_DOWN", # HID:34214 + "HID:WIZARDS_HID2_TXT_DOC_TITLE", # HID:34215 + "HID:WIZARDS_HID2_TXT_DOC_DESC", # HID:34216 + "HID:WIZARDS_HID2_TXT_DOC_AUTHOR", # HID:34217 + "HID:WIZARDS_HID2_LST_DOC_EXPORT", # HID:34218 + "HID:WIZARDS_HID2_STATUS_ADD_DOCS", # HID:34219 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG1", # HID:34220 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG2", # HID:34221 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG3", # HID:34222 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG4", # HID:34223 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG5", # HID:34224 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG6", # HID:34225 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG7", # HID:34226 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG8", # HID:34227 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG9", # HID:34228 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG10", # HID:34229 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG11", # HID:34230 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG12", # HID:34231 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG13", # HID:34232 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG14", # HID:34233 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG15", # HID:34234 + "HID:WIZARDS_HID4_CHK_DISPLAY_FILENAME", # HID:34235 + "HID:WIZARDS_HID4_CHK_DISPLAY_DESCRIPTION", # HID:34236 + "HID:WIZARDS_HID4_CHK_DISPLAY_AUTHOR", # HID:34237 + "HID:WIZARDS_HID4_CHK_DISPLAY_CR_DATE", # HID:34238 + "HID:WIZARDS_HID4_CHK_DISPLAY_UP_DATE", # HID:34239 + "HID:WIZARDS_HID4_CHK_DISPLAY_FORMAT", # HID:34240 + "HID:WIZARDS_HID4_CHK_DISPLAY_F_ICON", # HID:34241 + "HID:WIZARDS_HID4_CHK_DISPLAY_PAGES", # HID:34242 + "HID:WIZARDS_HID4_CHK_DISPLAY_SIZE", # HID:34243 + "HID:WIZARDS_HID4_GRP_OPTIMAIZE_640", # HID:34244 + "HID:WIZARDS_HID4_GRP_OPTIMAIZE_800", # HID:34245 + "HID:WIZARDS_HID4_GRP_OPTIMAIZE_1024", # HID:34246 + "HID:WIZARDS_HID5_LST_STYLES", # HID:34247 + "HID:WIZARDS_HID5_BTN_BACKGND", # HID:34248 + "HID:WIZARDS_HID5_BTN_ICONS", # HID:34249 + "HID:WIZARDS_HID6_TXT_SITE_TITLE", # HID:34250 + "", + "", + "HID:WIZARDS_HID6_TXT_SITE_DESC", # HID:34253 + "", + "HID:WIZARDS_HID6_DATE_SITE_CREATED", # HID:34255 + "HID:WIZARDS_HID6_DATE_SITE_UPDATED", # HID:34256 + "", + "HID:WIZARDS_HID6_TXT_SITE_EMAIL", # HID:34258 + "HID:WIZARDS_HID6_TXT_SITE_COPYRIGHT", # HID:34259 + "HID:WIZARDS_HID7_BTN_PREVIEW", # HID:34260 + "HID:WIZARDS_HID7_CHK_PUBLISH_LOCAL", # HID:34261 + "HID:WIZARDS_HID7_TXT_LOCAL", # HID:34262 + "HID:WIZARDS_HID7_BTN_LOCAL", # HID:34263 + "HID:WIZARDS_HID7_CHK_PUBLISH_ZIP", # HID:34264 + "HID:WIZARDS_HID7_TXT_ZIP", # HID:34265 + "HID:WIZARDS_HID7_BTN_ZIP", # HID:34266 + "HID:WIZARDS_HID7_CHK_PUBLISH_FTP", # HID:34267 + "HID:WIZARDS_HID7_TXT_FTP", # HID:34268 + "HID:WIZARDS_HID7_BTN_FTP", # HID:34269 + "HID:WIZARDS_HID7_CHK_SAVE", # HID:34270 + "HID:WIZARDS_HID7_TXT_SAVE", # HID:34271 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_BG", # HID:34290 + "HID:WIZARDS_HID_BG_BTN_OTHER", # HID:34291 + "HID:WIZARDS_HID_BG_BTN_NONE", # HID:34292 + "HID:WIZARDS_HID_BG_BTN_OK", # HID:34293 + "HID:WIZARDS_HID_BG_BTN_CANCEL", # HID:34294 + "HID:WIZARDS_HID_BG_BTN_BACK", # HID:34295 + "HID:WIZARDS_HID_BG_BTN_FW", # HID:34296 + "HID:WIZARDS_HID_BG_BTN_IMG1", # HID:34297 + "HID:WIZARDS_HID_BG_BTN_IMG2", # HID:34298 + "HID:WIZARDS_HID_BG_BTN_IMG3", # HID:34299 + "HID:WIZARDS_HID_BG_BTN_IMG4", # HID:34300 + "HID:WIZARDS_HID_BG_BTN_IMG5", # HID:34301 + "HID:WIZARDS_HID_BG_BTN_IMG6", # HID:34302 + "HID:WIZARDS_HID_BG_BTN_IMG7", # HID:34303 + "HID:WIZARDS_HID_BG_BTN_IMG8", # HID:34304 + "HID:WIZARDS_HID_BG_BTN_IMG9", # HID:34305 + "HID:WIZARDS_HID_BG_BTN_IMG10", # HID:34306 + "HID:WIZARDS_HID_BG_BTN_IMG11", # HID:34307 + "HID:WIZARDS_HID_BG_BTN_IMG12", # HID:34308 + "HID:WIZARDS_HID_BG_BTN_IMG13", # HID:34309 + "HID:WIZARDS_HID_BG_BTN_IMG14", # HID:34300 + "HID:WIZARDS_HID_BG_BTN_IMG15", # HID:34311 + "HID:WIZARDS_HID_BG_BTN_IMG16", # HID:34312 + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGREPORT_DIALOG", # HID:34320 + "", + "HID:WIZARDS_HID_DLGREPORT_0_CMDPREV", # HID:34322 + "HID:WIZARDS_HID_DLGREPORT_0_CMDNEXT", # HID:34323 + "HID:WIZARDS_HID_DLGREPORT_0_CMDFINISH", # HID:34324 + "HID:WIZARDS_HID_DLGREPORT_0_CMDCANCEL", # HID:34325 + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGREPORT_1_LBTABLES", # HID:34330 + "HID:WIZARDS_HID_DLGREPORT_1_FIELDSAVAILABLE", # HID:34331 + "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVESELECTED", # HID:34332 + "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEALL", # HID:34333 + "HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVESELECTED", # HID:34334 + "HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVEALL", # HID:34335 + "HID:WIZARDS_HID_DLGREPORT_1_FIELDSSELECTED", # HID:34336 + "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEUP", # HID:34337 + "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEDOWN", # HID:34338 + "", + "HID:WIZARDS_HID_DLGREPORT_2_GROUPING", # HID:34340 + "HID:WIZARDS_HID_DLGREPORT_2_CMDGROUP", # HID:34341 + "HID:WIZARDS_HID_DLGREPORT_2_CMDUNGROUP", # HID:34342 + "HID:WIZARDS_HID_DLGREPORT_2_PREGROUPINGDEST", # HID:34343 + "HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEUPGROUP", # HID:34344 + "HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEDOWNGROUP", # HID:34345 + "HID:WIZARDS_HID_DLGREPORT_3_SORT1", # HID:34346 + "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND1", # HID:34347 + "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND1", # HID:34348 + "HID:WIZARDS_HID_DLGREPORT_3_SORT2", # HID:34349 + "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND2", # HID:34350 + "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND2", # HID:34351 + "HID:WIZARDS_HID_DLGREPORT_3_SORT3", # HID:34352 + "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND3", # HID:34353 + "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND3", # HID:34354 + "HID:WIZARDS_HID_DLGREPORT_3_SORT4", # HID:34355 + "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND4", # HID:34356 + "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND4", # HID:34357 + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGREPORT_4_TITLE", # HID:34362 + "HID:WIZARDS_HID_DLGREPORT_4_DATALAYOUT", # HID:34363 + "HID:WIZARDS_HID_DLGREPORT_4_PAGELAYOUT", # HID:34364 + "HID:WIZARDS_HID_DLGREPORT_4_LANDSCAPE", # HID:34365 + "HID:WIZARDS_HID_DLGREPORT_4_PORTRAIT", # HID:34366 + "", + "", + "", + "HID:WIZARDS_HID_DLGREPORT_5_OPTDYNTEMPLATE", # HID:34370 + "HID:WIZARDS_HID_DLGREPORT_5_OPTSTATDOCUMENT", # HID:34371 + "HID:WIZARDS_HID_DLGREPORT_5_TXTTEMPLATEPATH", # HID:34372 + "HID:WIZARDS_HID_DLGREPORT_5_CMDTEMPLATEPATH", # HID:34373 + "HID:WIZARDS_HID_DLGREPORT_5_OPTEDITTEMPLATE", # HID:34374 + "HID:WIZARDS_HID_DLGREPORT_5_OPTUSETEMPLATE", # HID:34375 + "HID:WIZARDS_HID_DLGREPORT_5_TXTDOCUMENTPATH", # HID:34376 + "HID:WIZARDS_HID_DLGREPORT_5_CMDDOCUMENTPATH", # HID:34377 + "HID:WIZARDS_HID_DLGREPORT_5_CHKLINKTODB", # HID:34378 + "", + "", + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_1", # HID:34381 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_2", # HID:34382 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_3", # HID:34383 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_4", # HID:34384 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_5", # HID:34385 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_6", # HID:34386 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_7", # HID:34387 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGFORM_DIALOG", # HID:34400 + "", + "HID:WIZARDS_HID_DLGFORM_CMDPREV", # HID:34402 + "HID:WIZARDS_HID_DLGFORM_CMDNEXT", # HID:34403 + "HID:WIZARDS_HID_DLGFORM_CMDFINISH", # HID:34404 + "HID:WIZARDS_HID_DLGFORM_CMDCANCEL", # HID:34405 + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGFORM_MASTER_LBTABLES", # HID:34411 + "HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSAVAILABLE", # HID:34412 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVESELECTED", # HID:34413 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEALL", # HID:34414 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVESELECTED", # HID:34415 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVEALL", # HID:34416 + "HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSSELECTED", # HID:34417 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEUP", # HID:34418 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEDOWN", # HID:34419 + "", + "HID:WIZARDS_HID_DLGFORM_CHKCREATESUBFORM", # HID:34421 + "HID:WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION", # HID:34422 + "HID:WIZARDS_HID_DLGFORM_OPTSELECTMANUALLY", # HID:34423 + "HID:WIZARDS_HID_DLGFORM_lstRELATIONS", # HID:34424 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGFORM_SUB_LBTABLES", # HID:34431 + "HID:WIZARDS_HID_DLGFORM_SUB_FIELDSAVAILABLE", # HID:34432 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVESELECTED", # HID:34433 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEALL", # HID:34434 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVESELECTED", # HID:34435 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVEALL", # HID:34436 + "HID:WIZARDS_HID_DLGFORM_SUB_FIELDSSELECTED", # HID:34437 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEUP", # HID:34438 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEDOWN", # HID:34439 + "", + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK1", # HID:34441 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK1", # HID:34442 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK2", # HID:34443 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK2", # HID:34444 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK3", # HID:34445 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK3", # HID:34446 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK4", # HID:34447 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK4", # HID:34448 + "", + "", + "HID:WIZARDS_HID_DLGFORM_CMDALIGNLEFT", # HID:34451 + "HID:WIZARDS_HID_DLGFORM_CMDALIGNRIGHT", # HID:34452 + "HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED", # HID:34453 + "HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED", # HID:34454 + "HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE", # HID:34455 + "HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED", # HID:34456 + "HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED2", # HID:34457 + "HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED2", # HID:34458 + "HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE2", # HID:34459 + "HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED2", # HID:34460 + "HID:WIZARDS_HID_DLGFORM_OPTNEWDATAONLY", # HID:34461 + "HID:WIZARDS_HID_DLGFORM_OPTDISPLAYALLDATA", # HID:34462 + "HID:WIZARDS_HID_DLGFORM_CHKNOMODIFICATION", # HID:34463 + "HID:WIZARDS_HID_DLGFORM_CHKNODELETION", # HID:34464 + "HID:WIZARDS_HID_DLGFORM_CHKNOADDITION", # HID:34465 + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGFORM_LSTSTYLES", # HID:34471 + "HID:WIZARDS_HID_DLGFORM_CMDNOBORDER", # HID:34472 + "HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", # HID:34473 + "HID:WIZARDS_HID_DLGFORM_CMDSIMPLEBORDER", # HID:34474 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGFORM_TXTPATH", # HID:34481 + "HID:WIZARDS_HID_DLGFORM_OPTWORKWITHFORM", # HID:34482 + "HID:WIZARDS_HID_DLGFORM_OPTMODIFYFORM", # HID:34483 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGNEWSLTR_DIALOG", # HID:34500 + "HID:WIZARDS_HID_DLGNEWSLTR_OPTSTANDARDLAYOUT", # HID:34501 + "HID:WIZARDS_HID_DLGNEWSLTR_OPTPARTYLAYOUT", # HID:34502 + "HID:WIZARDS_HID_DLGNEWSLTR_OPTBROCHURELAYOUT", # HID:34503 + "HID:WIZARDS_HID_DLGNEWSLTR_OPTSINGLESIDED", # HID:34504 + "HID:WIZARDS_HID_DLGNEWSLTR_OPTDOUBLESIDED", # HID:34505 + "HID:WIZARDS_HID_DLGNEWSLTR_CMDGOON", # HID:34506 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGDEPOT_DIALOG_SELLBUY", # HID:34520 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SELLBUY", # HID:34521 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTQUANTITY", # HID:34522 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTRATE", # HID:34523 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTDATE", # HID:34524 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTCOMMISSION", # HID:34525 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTFIX", # HID:34526 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTMINIMUM", # HID:34527 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SELLBUY", # HID:34528 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SELLBUY", # HID:34529 + "HID:WIZARDS_HID_DLGDEPOT_1_LSTSELLSTOCKS", # HID:34530 + "HID:WIZARDS_HID_DLGDEPOT_2_LSTBUYSTOCKS", # HID:34531 + "HID:WIZARDS_HID_DLGDEPOT_DIALOG_SPLIT", # HID:34532 + "HID:WIZARDS_HID_DLGDEPOT_0_LSTSTOCKNAMES", # HID:34533 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SPLIT", # HID:34534 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SPLIT", # HID:34535 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SPLIT", # HID:34536 + "HID:WIZARDS_HID_DLGDEPOT_1_OPTPERSHARE", # HID:34537 + "HID:WIZARDS_HID_DLGDEPOT_1_OPTTOTAL", # HID:34538 + "HID:WIZARDS_HID_DLGDEPOT_1_TXTDIVIDEND", # HID:34539 + "HID:WIZARDS_HID_DLGDEPOT_2_TXTOLDRATE", # HID:34540 + "HID:WIZARDS_HID_DLGDEPOT_2_TXTNEWRATE", # HID:34541 + "HID:WIZARDS_HID_DLGDEPOT_2_TXTDATE", # HID:34542 + "HID:WIZARDS_HID_DLGDEPOT_3_TXTSTARTDATE", # HID:34543 + "HID:WIZARDS_HID_DLGDEPOT_3_TXTENDDATE", # HID:34544 + "HID:WIZARDS_HID_DLGDEPOT_3_OPTDAILY", # HID:34545 + "HID:WIZARDS_HID_DLGDEPOT_3_OPTWEEKLY", # HID:34546 + "HID:WIZARDS_HID_DLGDEPOT_DIALOG_HISTORY", # HID:34547 + "HID:WIZARDS_HID_DLGDEPOT_LSTMARKETS", # HID:34548 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_HISTORY", # HID:34549 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_HISTORY", # HID:34550 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGIMPORT_DIALOG", # HID:34570 + "HID:WIZARDS_HID_DLGIMPORT_0_CMDHELP", # HID:34571 + "HID:WIZARDS_HID_DLGIMPORT_0_CMDCANCEL", # HID:34572 + "HID:WIZARDS_HID_DLGIMPORT_0_CMDPREV", # HID:34573 + "HID:WIZARDS_HID_DLGIMPORT_0_CMDNEXT", # HID:34574 + "HID:WIZARDS_HID_DLGIMPORT_0_OPTSODOCUMENTS", # HID:34575 + "HID:WIZARDS_HID_DLGIMPORT_0_OPTMSDOCUMENTS", # HID:34576 + "HID:WIZARDS_HID_DLGIMPORT_0_CHKLOGFILE", # HID:34577 + "HID:WIZARDS_HID_DLGIMPORT_2_CHKWORD", # HID:34578 + "HID:WIZARDS_HID_DLGIMPORT_2_CHKEXCEL", # HID:34579 + "HID:WIZARDS_HID_DLGIMPORT_2_CHKPOWERPOINT", # HID:34580 + "HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATE", # HID:34581 + "HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATERECURSE", # HID:34582 + "HID:WIZARDS_HID_DLGIMPORT_2_LBTEMPLATEPATH", # HID:34583 + "HID:WIZARDS_HID_DLGIMPORT_2_EDTEMPLATEPATH", # HID:34584 + "HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT", # HID:34585 + "HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENT", # HID:34586 + "HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENTRECURSE", # HID:34587 + "HID:WIZARDS_HID_DLGIMPORT_2_LBDOCUMENTPATH", # HID:34588 + "HID:WIZARDS_HID_DLGIMPORT_2_EDDOCUMENTPATH", # HID:34589 + "HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT", # HID:34590 + "HID:WIZARDS_HID_DLGIMPORT_2_LBEXPORTDOCUMENTPATH", # HID:34591 + "HID:WIZARDS_HID_DLGIMPORT_2_EDEXPORTDOCUMENTPATH", # HID:34592 + "HID:WIZARDS_HID_DLGIMPORT_2_CMDEXPORTPATHSELECT", # HID:34593 + "", + "HID:WIZARDS_HID_DLGIMPORT_3_TBSUMMARY", # HID:34595 + "HID:WIZARDS_HID_DLGIMPORT_0_CHKWRITER", # HID:34596 + "HID:WIZARDS_HID_DLGIMPORT_0_CHKCALC", # HID:34597 + "HID:WIZARDS_HID_DLGIMPORT_0_CHKIMPRESS", # HID:34598 + "HID:WIZARDS_HID_DLGIMPORT_0_CHKMATHGLOBAL", # HID:34599 + "HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT2", # HID:34600 + "HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT2", # HID:34601 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGCORRESPONDENCE_DIALOG", # HID:34630 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_CANCEL", # HID:34631 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA1", # HID:34632 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA2", # HID:34633 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_AGENDAOKAY", # HID:34634 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER1", # HID:34635 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER2", # HID:34636 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_LETTEROKAY", # HID:34637 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGSTYLES_DIALOG", # HID:34650 + "HID:WIZARDS_HID_DLGSTYLES_LISTBOX", # HID:34651 + "HID:WIZARDS_HID_DLGSTYLES_CANCEL", # HID:34652 + "HID:WIZARDS_HID_DLGSTYLES_OKAY", # HID:34653 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGCONVERT_DIALOG", # HID:34660 + "HID:WIZARDS_HID_DLGCONVERT_CHECKBOX1", # HID:34661 + "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON1", # HID:34662 + "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON2", # HID:34663 + "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON3", # HID:34664 + "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON4", # HID:34665 + "HID:WIZARDS_HID_DLGCONVERT_LISTBOX1", # HID:34666 + "HID:WIZARDS_HID_DLGCONVERT_OBFILE", # HID:34667 + "HID:WIZARDS_HID_DLGCONVERT_OBDIR", # HID:34668 + "HID:WIZARDS_HID_DLGCONVERT_COMBOBOX1", # HID:34669 + "HID:WIZARDS_HID_DLGCONVERT_TBSOURCE", # HID:34670 + "HID:WIZARDS_HID_DLGCONVERT_CHECKRECURSIVE", # HID:34671 + "HID:WIZARDS_HID_DLGCONVERT_TBTARGET", # HID:34672 + "HID:WIZARDS_HID_DLGCONVERT_CBCANCEL", # HID:34673 + "HID:WIZARDS_HID_DLGCONVERT_CBHELP", # HID:34674 + "HID:WIZARDS_HID_DLGCONVERT_CBBACK", # HID:34675 + "HID:WIZARDS_HID_DLGCONVERT_CBGOON", # HID:34676 + "HID:WIZARDS_HID_DLGCONVERT_CBSOURCEOPEN", # HID:34677 + "HID:WIZARDS_HID_DLGCONVERT_CBTARGETOPEN", # HID:34678 + "HID:WIZARDS_HID_DLGCONVERT_CHKPROTECT", # HID:34679 + "HID:WIZARDS_HID_DLGCONVERT_CHKTEXTDOCUMENTS", # HID:34680 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGPASSWORD_CMDGOON", # HID:34690 + "HID:WIZARDS_HID_DLGPASSWORD_CMDCANCEL", # HID:34691 + "HID:WIZARDS_HID_DLGPASSWORD_CMDHELP", # HID:34692 + "HID:WIZARDS_HID_DLGPASSWORD_TXTPASSWORD", # HID:34693 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGHOLIDAYCAL_DIALOG", # HID:34700 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_PREVIEW", # HID:34701 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPYEAR", # HID:34702 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPMONTH", # HID:34703 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDYEAR", # HID:34704 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDMONTH", # HID:34705 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINYEAR", # HID:34706 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINMONTH", # HID:34707 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_CMBSTATE", # HID:34708 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_LBOWNDATA", # HID:34709 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDINSERT", # HID:34710 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDDELETE", # HID:34711 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENT", # HID:34712 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CHKEVENT", # HID:34713 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTDAY", # HID:34714 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTDAY", # HID:34715 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTMONTH", # HID:34716 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTMONTH", # HID:34717 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTYEAR", # HID:34718 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTYEAR", # HID:34719 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOWNDATA", # HID:34720 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDCANCEL", # HID:34721 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOK" # HID:34722 + ] + array2 = ["HID:WIZARDS_HID_LTRWIZ_OPTBUSINESSLETTER", # HID:40769 + "HID:WIZARDS_HID_LTRWIZ_OPTPRIVOFFICIALLETTER", # HID:40770 + "HID:WIZARDS_HID_LTRWIZ_OPTPRIVATELETTER", # HID:40771 + "HID:WIZARDS_HID_LTRWIZ_LSTBUSINESSSTYLE", # HID:40772 + "HID:WIZARDS_HID_LTRWIZ_CHKBUSINESSPAPER", # HID:40773 + "HID:WIZARDS_HID_LTRWIZ_LSTPRIVOFFICIALSTYLE", # HID:40774 + "HID:WIZARDS_HID_LTRWIZ_LSTPRIVATESTYLE", # HID:40775 + "HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYLOGO", # HID:40776 + "HID:WIZARDS_HID_LTRWIZ_NUMLOGOHEIGHT", # HID:40777 + "HID:WIZARDS_HID_LTRWIZ_NUMLOGOX", # HID:40778 + "HID:WIZARDS_HID_LTRWIZ_NUMLOGOWIDTH", # HID:40779 + "HID:WIZARDS_HID_LTRWIZ_NUMLOGOY", # HID:40780 + "HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYADDRESS", # HID:40781 + "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSHEIGHT", # HID:40782 + "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSX", # HID:40783 + "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSWIDTH", # HID:40784 + "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSY", # HID:40785 + "HID:WIZARDS_HID_LTRWIZ_CHKCOMPANYRECEIVER", # HID:40786 + "HID:WIZARDS_HID_LTRWIZ_CHKPAPERFOOTER", # HID:40787 + "HID:WIZARDS_HID_LTRWIZ_NUMFOOTERHEIGHT", # HID:40788 + "HID:WIZARDS_HID_LTRWIZ_LSTLETTERNORM", # HID:40789 + "HID:WIZARDS_HID_LTRWIZ_CHKUSELOGO", # HID:40790 + "HID:WIZARDS_HID_LTRWIZ_CHKUSEADDRESSRECEIVER", # HID:40791 + "HID:WIZARDS_HID_LTRWIZ_CHKUSESIGNS", # HID:40792 + "HID:WIZARDS_HID_LTRWIZ_CHKUSESUBJECT", # HID:40793 + "HID:WIZARDS_HID_LTRWIZ_CHKUSESALUTATION", # HID:40794 + "HID:WIZARDS_HID_LTRWIZ_LSTSALUTATION", # HID:40795 + "HID:WIZARDS_HID_LTRWIZ_CHKUSEBENDMARKS", # HID:40796 + "HID:WIZARDS_HID_LTRWIZ_CHKUSEGREETING", # HID:40797 + "HID:WIZARDS_HID_LTRWIZ_LSTGREETING", # HID:40798 + "HID:WIZARDS_HID_LTRWIZ_CHKUSEFOOTER", # HID:40799 + "HID:WIZARDS_HID_LTRWIZ_OPTSENDERPLACEHOLDER", # HID:40800 + "HID:WIZARDS_HID_LTRWIZ_OPTSENDERDEFINE", # HID:40801 + "HID:WIZARDS_HID_LTRWIZ_TXTSENDERNAME", # HID:40802 + "HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTREET", # HID:40803 + "HID:WIZARDS_HID_LTRWIZ_TXTSENDERPOSTCODE", # HID:40804 + "HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTATE_TEXT", # HID:40805 + "HID:WIZARDS_HID_LTRWIZ_TXTSENDERCITY", # HID:40806 + "HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERPLACEHOLDER", # HID:40807 + "HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERDATABASE", # HID:40808 + "HID:WIZARDS_HID_LTRWIZ_TXTFOOTER", # HID:40809 + "HID:WIZARDS_HID_LTRWIZ_CHKFOOTERNEXTPAGES", # HID:40810 + "HID:WIZARDS_HID_LTRWIZ_CHKFOOTERPAGENUMBERS", # HID:40811 + "HID:WIZARDS_HID_LTRWIZ_TXTTEMPLATENAME", # HID:40812 + "HID:WIZARDS_HID_LTRWIZ_OPTCREATELETTER", # HID:40813 + "HID:WIZARDS_HID_LTRWIZ_OPTMAKECHANGES", # HID:40814 + "HID:WIZARDS_HID_LTRWIZ_TXTPATH", # HID:40815 + "HID:WIZARDS_HID_LTRWIZ_CMDPATH", # HID:40816 + "", + "", + "", + "HID:WIZARDS_HID_LTRWIZARD", # HID:40820 + "HID:WIZARDS_HID_LTRWIZARD_HELP", # HID:40821 + "HID:WIZARDS_HID_LTRWIZARD_BACK", # HID:40822 + "HID:WIZARDS_HID_LTRWIZARD_NEXT", # HID:40823 + "HID:WIZARDS_HID_LTRWIZARD_CREATE", # HID:40824 + "HID:WIZARDS_HID_LTRWIZARD_CANCEL", # HID:40825 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_LSTTABLES", # HID:40850 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDS", # HID:40851 + "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVESELECTED", # HID:40852 + "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEALL", # HID:40853 + "HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVESELECTED", # HID:40854 + "HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVEALL", # HID:40855 + "HID:WIZARDS_HID_QUERYWIZARD_LSTSELFIELDS", # HID:40856 + "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEUP", # HID:40857 + "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEDOWN", # HID:40858 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_SORT1", # HID:40865 + "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND1", # HID:40866 + "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND1", # HID:40867 + "HID:WIZARDS_HID_QUERYWIZARD_SORT2", # HID:40868 + "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND2", # HID:40869 + "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND2", # HID:40870 + "HID:WIZARDS_HID_QUERYWIZARD_SORT3", # HID:40871 + "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND3", # HID:40872 + "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND3", # HID:40873 + "HID:WIZARDS_HID_QUERYWIZARD_SORT4", # HID:40874 + "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND4", # HID:40875 + "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND4", # HID:40876 + "", + "HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHALL", # HID:40878 + "HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHANY", # HID:40879 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_1", # HID:40880 + "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_1", # HID:40881 + "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_1", # HID:40882 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_2", # HID:40883 + "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_2", # HID:40884 + "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_2", # HID:40885 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_3", # HID:40886 + "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_3", # HID:40887 + "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_3", # HID:40888 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATEDETAILQUERY", # HID:40895 + "HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATESUMMARYQUERY", # HID:40896 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_1", # HID:40897 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_1", # HID:40898 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_2", # HID:40899 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_2", # HID:40900 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_3", # HID:40901 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_3", # HID:40902 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_4", # HID:40903 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_4", # HID:40904 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_5", # HID:40905 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_5", # HID:40906 + "HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEPLUS", # HID:40907 + "HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEMINUS", # HID:40908 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDS", # HID:40915 + "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVESELECTED", # HID:40916 + "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERREMOVESELECTED", # HID:40917 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERSELFIELDS", # HID:40918 + "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEUP", # HID:40919 + "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEDOWN", # HID:40920 + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHALL", # HID:40923 + "HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHANY", # HID:40924 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_1", # HID:40925 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_1", # HID:40926 + "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_1", # HID:40927 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_2", # HID:40928 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_2", # HID:40929 + "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_2", # HID:40930 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_3", # HID:40931 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_3", # HID:40932 + "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_3", # HID:40933 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_1", # HID:40940 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_2", # HID:40941 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_3", # HID:40942 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_4", # HID:40943 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_5", # HID:40944 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_6", # HID:40945 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_7", # HID:40946 + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_TXTQUERYTITLE", # HID:40955 + "HID:WIZARDS_HID_QUERYWIZARD_OPTDISPLAYQUERY", # HID:40956 + "HID:WIZARDS_HID_QUERYWIZARD_OPTMODIFYQUERY", # HID:40957 + "HID:WIZARDS_HID_QUERYWIZARD_TXTSUMMARY", # HID:40958 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD", # HID:40970 + "", + "HID:WIZARDS_HID_QUERYWIZARD_BACK", # HID:40972 + "HID:WIZARDS_HID_QUERYWIZARD_NEXT", # HID:40973 + "HID:WIZARDS_HID_QUERYWIZARD_CREATE", # HID:40974 + "HID:WIZARDS_HID_QUERYWIZARD_CANCEL", # HID:40975 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_IS", # HID:41000 + "", "HID:WIZARDS_HID_IS_BTN_NONE", # HID:41002 + "HID:WIZARDS_HID_IS_BTN_OK", # HID:41003 + "HID:WIZARDS_HID_IS_BTN_CANCEL", # HID:41004 + "HID:WIZARDS_HID_IS_BTN_IMG1", # HID:41005 + "HID:WIZARDS_HID_IS_BTN_IMG2", # HID:41006 + "HID:WIZARDS_HID_IS_BTN_IMG3", # HID:41007 + "HID:WIZARDS_HID_IS_BTN_IMG4", # HID:41008 + "HID:WIZARDS_HID_IS_BTN_IMG5", # HID:41009 + "HID:WIZARDS_HID_IS_BTN_IMG6", # HID:41010 + "HID:WIZARDS_HID_IS_BTN_IMG7", # HID:41011 + "HID:WIZARDS_HID_IS_BTN_IMG8", # HID:41012 + "HID:WIZARDS_HID_IS_BTN_IMG9", # HID:41013 + "HID:WIZARDS_HID_IS_BTN_IMG10", # HID:41014 + "HID:WIZARDS_HID_IS_BTN_IMG11", # HID:41015 + "HID:WIZARDS_HID_IS_BTN_IMG12", # HID:41016 + "HID:WIZARDS_HID_IS_BTN_IMG13", # HID:41017 + "HID:WIZARDS_HID_IS_BTN_IMG14", # HID:41018 + "HID:WIZARDS_HID_IS_BTN_IMG15", # HID:41019 + "HID:WIZARDS_HID_IS_BTN_IMG16", # HID:41020 + "HID:WIZARDS_HID_IS_BTN_IMG17", # HID:41021 + "HID:WIZARDS_HID_IS_BTN_IMG18", # HID:41022 + "HID:WIZARDS_HID_IS_BTN_IMG19", # HID:41023 + "HID:WIZARDS_HID_IS_BTN_IMG20", # HID:41024 + "HID:WIZARDS_HID_IS_BTN_IMG21", # HID:41025 + "HID:WIZARDS_HID_IS_BTN_IMG22", # HID:41026 + "HID:WIZARDS_HID_IS_BTN_IMG23", # HID:41027 + "HID:WIZARDS_HID_IS_BTN_IMG24", # HID:41028 + "HID:WIZARDS_HID_IS_BTN_IMG25", # HID:41029 + "HID:WIZARDS_HID_IS_BTN_IMG26", # HID:41030 + "HID:WIZARDS_HID_IS_BTN_IMG27", # HID:41031 + "HID:WIZARDS_HID_IS_BTN_IMG28", # HID:41032 + "HID:WIZARDS_HID_IS_BTN_IMG29", # HID:41033 + "HID:WIZARDS_HID_IS_BTN_IMG30", # HID:41034 + "HID:WIZARDS_HID_IS_BTN_IMG31", # HID:41035 + "HID:WIZARDS_HID_IS_BTN_IMG32", # HID:41036 + "", + "", + "", + "HID:WIZARDS_HID_FTP", # HID:41040 + "HID:WIZARDS_HID_FTP_SERVER", # HID:41041 + "HID:WIZARDS_HID_FTP_USERNAME", # HID:41042 + "HID:WIZARDS_HID_FTP_PASS", # HID:41043 + "HID:WIZARDS_HID_FTP_TEST", # HID:41044 + "HID:WIZARDS_HID_FTP_TXT_PATH", # HID:41045 + "HID:WIZARDS_HID_FTP_BTN_PATH", # HID:41046 + "HID:WIZARDS_HID_FTP_OK", # HID:41047 + "HID:WIZARDS_HID_FTP_CANCEL", # HID:41048 + "", + "", + "HID:WIZARDS_HID_AGWIZ", # HID:41051 + "HID:WIZARDS_HID_AGWIZ_HELP", # HID:41052 + "HID:WIZARDS_HID_AGWIZ_NEXT", # HID:41053 + "HID:WIZARDS_HID_AGWIZ_PREV", # HID:41054 + "HID:WIZARDS_HID_AGWIZ_CREATE", # HID:41055 + "HID:WIZARDS_HID_AGWIZ_CANCEL", # HID:41056 + "HID:WIZARDS_HID_AGWIZ_1_LIST_PAGEDESIGN", # HID:41057 + "HID:WIZARDS_HID_AGWIZ_1_CHK_MINUTES", # HID:41058 + "HID:WIZARDS_HID_AGWIZ_2_TXT_TIME", # HID:41059 + "HID:WIZARDS_HID_AGWIZ_2_TXT_DATE", # HID:41060 + "HID:WIZARDS_HID_AGWIZ_2_TXT_TITLE", # HID:41061 + "HID:WIZARDS_HID_AGWIZ_2_TXT_LOCATION", # HID:41062 + "HID:WIZARDS_HID_AGWIZ_3_CHK_MEETING_TYPE", # HID:41063 + "HID:WIZARDS_HID_AGWIZ_3_CHK_READ", # HID:41064 + "HID:WIZARDS_HID_AGWIZ_3_CHK_BRING", # HID:41065 + "HID:WIZARDS_HID_AGWIZ_3_CHK_NOTES", # HID:41066 + "HID:WIZARDS_HID_AGWIZ_4_CHK_CALLED_BY", # HID:41067 + "HID:WIZARDS_HID_AGWIZ_4_CHK_FACILITATOR", # HID:41068 + "HID:WIZARDS_HID_AGWIZ_4_CHK_NOTETAKER", # HID:41069 + "HID:WIZARDS_HID_AGWIZ_4_CHK_TIMEKEEPER", # HID:41070 + "HID:WIZARDS_HID_AGWIZ_4_CHK_ATTENDEES", # HID:41071 + "HID:WIZARDS_HID_AGWIZ_4_CHK_OBSERVERS", # HID:41072 + "HID:WIZARDS_HID_AGWIZ_4_CHK_RESOURCEPERSONS", # HID:41073 + "HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATENAME", # HID:41074 + "HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATEPATH", # HID:41075 + "HID:WIZARDS_HID_AGWIZ_6_BTN_TEMPLATEPATH", # HID:41076 + "HID:WIZARDS_HID_AGWIZ_6_OPT_CREATEAGENDA", # HID:41077 + "HID:WIZARDS_HID_AGWIZ_6_OPT_MAKECHANGES", # HID:41078 + "HID:WIZARDS_HID_AGWIZ_5_BTN_INSERT", # HID:41079 + "HID:WIZARDS_HID_AGWIZ_5_BTN_REMOVE", # HID:41080 + "HID:WIZARDS_HID_AGWIZ_5_BTN_UP", # HID:41081 + "HID:WIZARDS_HID_AGWIZ_5_BTN_DOWN", # HID:41082 + "HID:WIZARDS_HID_AGWIZ_5_SCROLL_BAR", # HID:41083 + "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_1", # HID:41084 + "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_1", # HID:41085 + "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_1", # HID:41086 + "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_2", # HID:41087 + "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_2", # HID:41088 + "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_2", # HID:41089 + "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_3", # HID:41090 + "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_3", # HID:41091 + "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_3", # HID:41092 + "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_4", # HID:41093 + "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_4", # HID:41094 + "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_4", # HID:41095 + "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_5", # HID:41096 + "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_5", # HID:41097 + "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_5", # HID:41098 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_FAXWIZ_OPTBUSINESSFAX", # HID:41120 + "HID:WIZARDS_HID_FAXWIZ_LSTBUSINESSSTYLE", # HID:41121 + "HID:WIZARDS_HID_FAXWIZ_OPTPRIVATEFAX", # HID:41122 + "HID:WIZARDS_HID_LSTPRIVATESTYLE", # HID:41123 + "HID:WIZARDS_HID_IMAGECONTROL3", # HID:41124 + "HID:WIZARDS_HID_CHKUSELOGO", # HID:41125 + "HID:WIZARDS_HID_CHKUSEDATE", # HID:41126 + "HID:WIZARDS_HID_CHKUSECOMMUNICATIONTYPE", # HID:41127 + "HID:WIZARDS_HID_LSTCOMMUNICATIONTYPE", # HID:41128 + "HID:WIZARDS_HID_CHKUSESUBJECT", # HID:41129 + "HID:WIZARDS_HID_CHKUSESALUTATION", # HID:41130 + "HID:WIZARDS_HID_LSTSALUTATION", # HID:41131 + "HID:WIZARDS_HID_CHKUSEGREETING", # HID:41132 + "HID:WIZARDS_HID_LSTGREETING", # HID:41133 + "HID:WIZARDS_HID_CHKUSEFOOTER", # HID:41134 + "HID:WIZARDS_HID_OPTSENDERPLACEHOLDER", # HID:41135 + "HID:WIZARDS_HID_OPTSENDERDEFINE", # HID:41136 + "HID:WIZARDS_HID_TXTSENDERNAME", # HID:41137 + "HID:WIZARDS_HID_TXTSENDERSTREET", # HID:41138 + "HID:WIZARDS_HID_TXTSENDERPOSTCODE", # HID:41139 + "HID:WIZARDS_HID_TXTSENDERSTATE", # HID:41140 + "HID:WIZARDS_HID_TXTSENDERCITY", # HID:41141 + "HID:WIZARDS_HID_TXTSENDERFAX", # HID:41142 + "HID:WIZARDS_HID_OPTRECEIVERPLACEHOLDER", # HID:41143 + "HID:WIZARDS_HID_OPTRECEIVERDATABASE", # HID:41144 + "HID:WIZARDS_HID_TXTFOOTER", # HID:41145 + "HID:WIZARDS_HID_CHKFOOTERNEXTPAGES", # HID:41146 + "HID:WIZARDS_HID_CHKFOOTERPAGENUMBERS", # HID:41147 + "HID:WIZARDS_HID_TXTTEMPLATENAME", # HID:41148 + "HID:WIZARDS_HID_FILETEMPLATEPATH", # HID:41149 + "HID:WIZARDS_HID_OPTCREATEFAX", # HID:41150 + "HID:WIZARDS_HID_OPTMAKECHANGES", # HID:41151 + "HID:WIZARDS_HID_IMAGECONTROL2", # HID:41152 + "HID:WIZARDS_HID_FAXWIZ_TXTPATH", # HID:41153 + "HID:WIZARDS_HID_FAXWIZ_CMDPATH", # HID:41154 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_FAXWIZARD", # HID:41180 + "HID:WIZARDS_HID_FAXWIZARD_HELP", # HID:41181 + "HID:WIZARDS_HID_FAXWIZARD_BACK", # HID:41182 + "HID:WIZARDS_HID_FAXWIZARD_NEXT", # HID:41183 + "HID:WIZARDS_HID_FAXWIZARD_CREATE", # HID:41184 + "HID:WIZARDS_HID_FAXWIZARD_CANCEL", # HID:41185 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGTABLE_DIALOG", # HID:41200 + "", + "HID:WIZARDS_HID_DLGTABLE_CMDPREV", # HID:41202 + "HID:WIZARDS_HID_DLGTABLE_CMDNEXT", # HID:41203 + "HID:WIZARDS_HID_DLGTABLE_CMDFINISH", # HID:41204 + "HID:WIZARDS_HID_DLGTABLE_CMDCANCEL", # HID:41205 + "HID:WIZARDS_HID_DLGTABLE_OPTBUSINESS", # HID:41206 + "HID:WIZARDS_HID_DLGTABLE_OPTPRIVATE", # HID:41207 + "HID:WIZARDS_HID_DLGTABLE_LBTABLES", # HID:41208 + "HID:WIZARDS_HID_DLGTABLE_FIELDSAVAILABLE", # HID:41209 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVESELECTED", # HID:41210 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEALL", # HID:41211 + "HID:WIZARDS_HID_DLGTABLE_CMDREMOVESELECTED", # HID:41212 + "HID:WIZARDS_HID_DLGTABLE_CMDREMOVEALL", # HID:41213 + "HID:WIZARDS_HID_DLGTABLE_FIELDSSELECTED", # HID:41214 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP", # HID:41215 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN", # HID:41216 + "", + "", + "", + "HID:WIZARDS_HID_DLGTABLE_LB_SELFIELDNAMES", # HID:41220 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDUP", # HID:41221 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDDOWN", # HID:41222 + "HID:WIZARDS_HID_DLGTABLE_CMDMINUS", # HID:41223 + "HID:WIZARDS_HID_DLGTABLE_CMDPLUS", # HID:41224 + "HID:WIZARDS_HID_DLGTABLE_COLNAME", # HID:41225 + "HID:WIZARDS_HID_DLGTABLE_COLMODIFIER", # HID:41226 + "HID:WIZARDS_HID_DLGTABLE_CHK_USEPRIMEKEY", # HID:41227 + "HID:WIZARDS_HID_DLGTABLE_OPT_PK_AUTOMATIC", # HID:41228 + "HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE_AUTOMATIC", # HID:41229 + "HID:WIZARDS_HID_DLGTABLE_OPT_PK_SINGLE", # HID:41230 + "HID:WIZARDS_HID_DLGTABLE_LB_PK_FIELDNAME", # HID:41231 + "HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE", # HID:41232 + "HID:WIZARDS_HID_DLGTABLE_OPT_PK_SEVERAL", # HID:41233 + "HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_AVAILABLE", # HID:41234 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVE_PK_SELECTED", # HID:41235 + "HID:WIZARDS_HID_DLGTABLE_CMDREMOVE_PK_SELECTED", # HID:41236 + "HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_SELECTED", # HID:41237 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP_PK_SELECTED", # HID:41238 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN_PK_SELECTED", # HID:41239 + "HID:WIZARDS_HID_DLGTABLE_TXT_NAME", # HID:41240 + "HID:WIZARDS_HID_DLGTABLE_OPT_MODIFYTABLE", # HID:41241 + "HID:WIZARDS_HID_DLGTABLE_OPT_WORKWITHTABLE", # HID:41242 + "HID:WIZARDS_HID_DLGTABLE_OPT_STARTFORMWIZARD", # HID:41243 + "HID:WIZARDS_HID_DLGTABLE_LST_CATALOG", # HID:41244 + "HID:WIZARDS_HID_DLGTABLE_LST_SCHEMA" # HID:41245 + ] + + @classmethod + def getHelpIdString(self, nHelpId): + if nHelpId >= 34200 and nHelpId <= 34722: + return HelpIds.array1[nHelpId - 34200] + elif nHelpId >= 40769 and nHelpId <= 41245: + return HelpIds.array2[nHelpId - 40769] + else: + return None diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py index 393c1b4c1..5e52a0c28 100644 --- a/wizards/com/sun/star/wizards/common/Helper.py +++ b/wizards/com/sun/star/wizards/common/Helper.py @@ -20,10 +20,11 @@ class Helper(object): def setUnoPropertyValue(self, xPSet, PropertyName, PropertyValue): try: if xPSet.getPropertySetInfo().hasPropertyByName(PropertyName): - uno.invoke(xPSet,"setPropertyValue", (PropertyName,PropertyValue)) + uno.invoke(xPSet,"setPropertyValue", + (PropertyName,PropertyValue)) else: selementnames = xPSet.getPropertySetInfo().getProperties() - raise ValueError("No Such Property: '" + PropertyName + "'"); + raise ValueError("No Such Property: '" + PropertyName + "'") except UnoException, exception: traceback.print_exc() @@ -61,7 +62,7 @@ class Helper(object): while i < MaxCount: if CurPropertyValue[i] is not None: aValue = CurPropertyValue[i] - if aValue is not None and aValue.Name.equals(PropertyName): + if aValue is not None and aValue.Name == PropertyName: return aValue.Value i += 1 @@ -100,7 +101,7 @@ class Helper(object): def getUnoStructValue(self, xPSet, PropertyName): try: if xPSet is not None: - if xPSet.getPropertySetInfo().hasPropertyByName(PropertyName) == True: + if xPSet.getPropertySetInfo().hasPropertyByName(PropertyName): oObject = xPSet.getPropertyValue(PropertyName) return oObject @@ -110,14 +111,17 @@ class Helper(object): return None @classmethod - def setUnoPropertyValues(self, xMultiPSetLst, PropertyNames, PropertyValues): + def setUnoPropertyValues(self, xMultiPSetLst, PropertyNames, + PropertyValues): try: if xMultiPSetLst is not None: - uno.invoke(xMultiPSetLst, "setPropertyValues", (PropertyNames, PropertyValues)) + uno.invoke(xMultiPSetLst, "setPropertyValues", + (PropertyNames, PropertyValues)) else: i = 0 while i < len(PropertyNames): - self.setUnoPropertyValue(xMultiPSetLst, PropertyNames[i], PropertyValues[i]) + self.setUnoPropertyValue(xMultiPSetLst, PropertyNames[i], + PropertyValues[i]) i += 1 except Exception, e: @@ -125,7 +129,8 @@ class Helper(object): ''' checks if the value of an object that represents an array is null. - check beforehand if the Object is really an array with "AnyConverter.IsArray(oObject) + check beforehand if the Object is really an array with + "AnyConverter.IsArray(oObject) @param oValue the paramter that has to represent an object @return a null reference if the array is empty ''' @@ -146,14 +151,16 @@ class Helper(object): return None def getComponentContext(_xMSF): - # Get the path to the extension and try to add the path to the class loader + #Get the path to the extension and + #try to add the path to the class loader aHelper = PropertySetHelper(_xMSF); - aDefaultContext = aHelper.getPropertyValueAsObject("DefaultContext"); + aDefaultContext = aHelper.getPropertyValueAsObject("DefaultContext") return aDefaultContext; def getMacroExpander(_xMSF): xComponentContext = self.getComponentContext(_xMSF); - aSingleton = xComponentContext.getValueByName("/singletons/com.sun.star.util.theMacroExpander"); + aSingleton = xComponentContext.getValueByName( + "/singletons/com.sun.star.util.theMacroExpander") return aSingleton; class DateUtils(object): @@ -168,7 +175,8 @@ class Helper(object): date = Helper.getUnoPropertyValue(formatSettings, "NullDate") self.calendar.set(date.Year, date.Month - 1, date.Day) self.docNullTime = getTimeInMillis() - self.formatter = NumberFormatter.createNumberFormatter(xmsf, self.formatSupplier) + self.formatter = NumberFormatter.createNumberFormatter(xmsf, + self.formatSupplier) ''' @param format a constant of the enumeration NumberFormatIndex @@ -176,7 +184,8 @@ class Helper(object): ''' def getFormat(self, format): - return NumberFormatter.getNumberFormatterKey(self.formatSupplier, format) + return NumberFormatter.getNumberFormatterKey( + self.formatSupplier, format) def getFormatter(self): return self.formatter @@ -192,7 +201,8 @@ class Helper(object): def getDocumentDateAsDouble(self, date): self.calendar.clear() - self.calendar.set(date / 10000, (date % 10000) / 100 - 1, date % 100) + self.calendar.set( + date / 10000, (date % 10000) / 100 - 1, date % 100) date1 = getTimeInMillis() ''' docNullTime and date1 are in millis, but @@ -203,7 +213,8 @@ class Helper(object): return daysDiff def getDocumentDateAsDouble(self, date): - return getDocumentDateAsDouble(date.Year * 10000 + date.Month * 100 + date.Day) + return getDocumentDateAsDouble( + date.Year * 10000 + date.Month * 100 + date.Day) def getDocumentDateAsDouble(self, javaTimeInMillis): self.calendar.clear() @@ -219,10 +230,13 @@ class Helper(object): return daysDiff def format(self, formatIndex, date): - return self.formatter.convertNumberToString(formatIndex, getDocumentDateAsDouble(date)) + return self.formatter.convertNumberToString(formatIndex, + getDocumentDateAsDouble(date)) def format(self, formatIndex, date): - return self.formatter.convertNumberToString(formatIndex, getDocumentDateAsDouble(date)) + return self.formatter.convertNumberToString(formatIndex, + getDocumentDateAsDouble(date)) def format(self, formatIndex, javaTimeInMillis): - return self.formatter.convertNumberToString(formatIndex, getDocumentDateAsDouble(javaTimeInMillis)) + return self.formatter.convertNumberToString(formatIndex, + getDocumentDateAsDouble(javaTimeInMillis)) diff --git a/wizards/com/sun/star/wizards/common/NoValidPathException.py b/wizards/com/sun/star/wizards/common/NoValidPathException.py index 96902883e..53db155e2 100644 --- a/wizards/com/sun/star/wizards/common/NoValidPathException.py +++ b/wizards/com/sun/star/wizards/common/NoValidPathException.py @@ -5,5 +5,6 @@ class NoValidPathException(Exception): # TODO: NEVER open a dialog in an exception from SystemDialog import SystemDialog if xMSF: - SystemDialog.showErrorBox(xMSF, "dbwizres", "dbw", 521) #OfficePathnotavailable + SystemDialog.showErrorBox(xMSF, + "dbwizres", "dbw", 521) #OfficePathnotavailable diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.py b/wizards/com/sun/star/wizards/common/PropertySetHelper.py index 4960b5380..2fce42abc 100644 --- a/wizards/com/sun/star/wizards/common/PropertySetHelper.py +++ b/wizards/com/sun/star/wizards/common/PropertySetHelper.py @@ -16,7 +16,8 @@ class PropertySetHelper(object): return self.m_aHashMap ''' - set a property, don't throw any exceptions, they will only write down as a hint in the helper debug output + set a property, don't throw any exceptions, + they will only write down as a hint in the helper debug output @param _sName name of the property to set @param _aValue property value as object ''' @@ -25,7 +26,9 @@ class PropertySetHelper(object): try: setPropertyValue(_sName, _aValue) except Exception, e: - DebugHelper.writeInfo("Don't throw the exception with property name(" + _sName + " ) : " + e.getMessage()) + DebugHelper.writeInfo( + "Don't throw the exception with property name(" \ + + _sName + " ) : " + e.getMessage()) ''' set a property, @@ -52,7 +55,6 @@ class PropertySetHelper(object): DebugHelper.exception(e) else: - // DebugHelper.writeInfo("PropertySetHelper.setProperty() can't get XPropertySet"); getHashMap().put(_sName, _aValue) ''' @@ -77,7 +79,8 @@ class PropertySetHelper(object): try: nValue = NumericalHelper.toInt(aObject) except ValueError, e: - DebugHelper.writeInfo("can't convert a object to integer.") + DebugHelper.writeInfo( + "can't convert a object to integer.") return nValue @@ -152,7 +155,8 @@ class PropertySetHelper(object): aObject = self.m_xPropertySet.getPropertyValue(_sName) except com.sun.star.beans.UnknownPropertyException, e: DebugHelper.writeInfo(e.getMessage()) - DebugHelper.writeInfo("UnknownPropertyException caught: Name:=" + _sName) + DebugHelper.writeInfo( + "UnknownPropertyException caught: Name:=" + _sName) except com.sun.star.lang.WrappedTargetException, e: DebugHelper.writeInfo(e.getMessage()) @@ -209,7 +213,8 @@ class PropertySetHelper(object): return aObject ''' - Debug helper, to show all properties which are available in the given object. + Debug helper, to show all properties + which are available in the given object. @param _xObj the object of which the properties should shown ''' @@ -219,7 +224,8 @@ class PropertySetHelper(object): aHelper.showProperties() ''' - Debug helper, to show all properties which are available in the current object. + Debug helper, to show all properties which are available + in the current object. ''' def showProperties(self): @@ -232,11 +238,13 @@ class PropertySetHelper(object): xInfo = self.m_xPropertySet.getPropertySetInfo() aAllProperties = xInfo.getProperties() - DebugHelper.writeInfo("Show all properties of Implementation of :'" + sName + "'") + DebugHelper.writeInfo( + "Show all properties of Implementation of :'" + sName + "'") i = 0 while i < aAllProperties.length: DebugHelper.writeInfo(" - " + aAllProperties[i].Name) i += 1 else: - DebugHelper.writeInfo("The given object don't support XPropertySet interface.") + DebugHelper.writeInfo( + "The given object don't support XPropertySet interface.") diff --git a/wizards/com/sun/star/wizards/common/Resource.py b/wizards/com/sun/star/wizards/common/Resource.py index e6b379992..c6afce217 100644 --- a/wizards/com/sun/star/wizards/common/Resource.py +++ b/wizards/com/sun/star/wizards/common/Resource.py @@ -1,4 +1,6 @@ from com.sun.star.awt.VclWindowPeerAttribute import OK +from Configuration import Configuration +from SystemDialog import SystemDialog import traceback class Resource(object): @@ -14,7 +16,8 @@ class Resource(object): self.xMSF = _xMSF self.Module = _Module try: - xResource = self.xMSF.createInstanceWithArguments("org.libreoffice.resource.ResourceIndexAccess", (self.Module,)) + xResource = self.xMSF.createInstanceWithArguments( + "org.libreoffice.resource.ResourceIndexAccess", (self.Module,)) if xResource is None: raise Exception ("could not initialize ResourceIndexAccess") @@ -36,14 +39,14 @@ class Resource(object): return self.xStringIndexAccess.getByIndex(nID) except Exception, exception: traceback.print_exc() - raise ValueError("Resource with ID not " + str(nID) + " not found"); + raise ValueError("Resource with ID not " + str(nID) + " not found") def getStringList(self, nID): try: return self.xStringListIndexAccess.getByIndex(nID) except Exception, exception: traceback.print_exc() - raise ValueError("Resource with ID not " + str(nID) + " not found"); + raise ValueError("Resource with ID not " + str(nID) + " not found") def getResArray(self, nID, iCount): try: @@ -55,12 +58,13 @@ class Resource(object): return ResArray except Exception, exception: traceback.print_exc() - raise ValueError("Resource with ID not" + str(nID) + " not found"); - + raise ValueError("Resource with ID not" + str(nID) + " not found") + @classmethod def showCommonResourceError(self, xMSF): ProductName = Configuration.getProductName(xMSF) - sError = "The files required could not be found.\nPlease start the %PRODUCTNAME Setup and choose 'Repair'." - sError = JavaTools.replaceSubString(sError, ProductName, "%PRODUCTNAME") + sError = "The files required could not be found.\n" + \ + "Please start the %PRODUCTNAME Setup and choose 'Repair'." + sError = sError.replace("%PRODUCTNAME", ProductName) SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, sError) diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py b/wizards/com/sun/star/wizards/common/SystemDialog.py index c81e9ddaa..2da851dd9 100644 --- a/wizards/com/sun/star/wizards/common/SystemDialog.py +++ b/wizards/com/sun/star/wizards/common/SystemDialog.py @@ -1,7 +1,7 @@ import uno import traceback from Configuration import Configuration -from Resource import Resource + from Desktop import Desktop from Helper import Helper @@ -13,7 +13,6 @@ from com.sun.star.uno import Exception as UnoException from com.sun.star.lang import IllegalArgumentException from com.sun.star.awt.VclWindowPeerAttribute import OK - class SystemDialog(object): ''' @@ -36,19 +35,23 @@ class SystemDialog(object): @classmethod def createStoreDialog(self, xmsf): - return SystemDialog(xmsf, "com.sun.star.ui.dialogs.FilePicker", FILESAVE_AUTOEXTENSION) + return SystemDialog( + xmsf, "com.sun.star.ui.dialogs.FilePicker",FILESAVE_AUTOEXTENSION) @classmethod def createOpenDialog(self, xmsf): - return SystemDialog(xmsf, "com.sun.star.ui.dialogs.FilePicker", FILEOPEN_SIMPLE) + return SystemDialog( + xmsf, "com.sun.star.ui.dialogs.FilePicker", FILEOPEN_SIMPLE) @classmethod def createFolderDialog(self, xmsf): - return SystemDialog(xmsf, "com.sun.star.ui.dialogs.FolderPicker", 0) + return SystemDialog( + xmsf, "com.sun.star.ui.dialogs.FolderPicker", 0) @classmethod def createOfficeFolderDialog(self, xmsf): - return SystemDialog(xmsf, "com.sun.star.ui.dialogs.OfficeFolderPicker", 0) + return SystemDialog( + xmsf, "com.sun.star.ui.dialogs.OfficeFolderPicker", 0) def subst(self, path): try: @@ -85,7 +88,8 @@ class SystemDialog(object): def callFolderDialog(self, title, description, displayDir): try: - self.systemDialog.setDisplayDirectoryxPropertyValue(subst(displayDir)) + self.systemDialog.setDisplayDirectoryxPropertyValue( + subst(displayDir)) except IllegalArgumentException, iae: traceback.print_exc() raise AttributeError(iae.getMessage()); @@ -152,7 +156,8 @@ class SystemDialog(object): def getFilterUIName_(self, filterName): try: - oFactory = self.xMSF.createInstance("com.sun.star.document.FilterFactory") + oFactory = self.xMSF.createInstance( + "com.sun.star.document.FilterFactory") oObject = Helper.getUnoObjectbyName(oFactory, filterName) xPropertyValue = list(oObject) i = 0 @@ -162,13 +167,15 @@ class SystemDialog(object): return str(aValue.Value) i += 1 - raise NullPointerException ("UIName property not found for Filter " + filterName); + raise NullPointerException( + "UIName property not found for Filter " + filterName); except UnoException, exception: traceback.print_exc() return None @classmethod - def showErrorBox(self, xMSF, ResName, ResPrefix, ResID,AddTag=None, AddString=None): + def showErrorBox(self, xMSF, ResName, ResPrefix, + ResID,AddTag=None, AddString=None): ProductName = Configuration.getProductName(xMSF) oResource = Resource(xMSF, ResPrefix) sErrorMessage = oResource.getResText(ResID) @@ -191,7 +198,8 @@ class SystemDialog(object): other values check for yourself ;-) ''' @classmethod - def showMessageBox(self, xMSF, windowServiceName, windowAttribute, MessageText, peer=None): + def showMessageBox(self, xMSF, windowServiceName, windowAttribute, + MessageText, peer=None): if MessageText is None: return 0 @@ -222,7 +230,8 @@ class SystemDialog(object): def createStringSubstitution(self, xMSF): xPathSubst = None try: - xPathSubst = xMSF.createInstance("com.sun.star.util.PathSubstitution") + xPathSubst = xMSF.createInstance( + "com.sun.star.util.PathSubstitution") return xPathSubst except UnoException, e: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py index 9d3faeb35..69a537d3a 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.py +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py @@ -13,7 +13,8 @@ com_sun_star_awt_WindowAttribute_SIZEABLE \ com_sun_star_awt_WindowAttribute_MOVEABLE \ = uno.getConstantByName( "com.sun.star.awt.WindowAttribute.MOVEABLE" ) com_sun_star_awt_VclWindowPeerAttribute_CLIPCHILDREN \ - = uno.getConstantByName( "com.sun.star.awt.VclWindowPeerAttribute.CLIPCHILDREN" ) + = uno.getConstantByName( + "com.sun.star.awt.VclWindowPeerAttribute.CLIPCHILDREN" ) class OfficeDocument(object): '''Creates a new instance of OfficeDocument ''' @@ -25,22 +26,25 @@ class OfficeDocument(object): def attachEventCall(self, xComponent, EventName, EventType, EventURL): try: oEventProperties = range(2) - oEventProperties[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + oEventProperties[0] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') oEventProperties[0].Name = "EventType" oEventProperties[0].Value = EventType # "Service", "StarBasic" - oEventProperties[1] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + oEventProperties[1] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') oEventProperties[1].Name = "Script" #"URL"; oEventProperties[1].Value = EventURL - uno.invoke(xComponent.getEvents(), "replaceByName", (EventName, uno.Any( \ - "[]com.sun.star.beans.PropertyValue", tuple(oEventProperties)))) + uno.invoke(xComponent.Events, "replaceByName", + (EventName, uno.Any("[]com.sun.star.beans.PropertyValue", + tuple(oEventProperties)))) except Exception, exception: traceback.print_exc() def dispose(self, xMSF, xComponent): try: if xComponent != None: - xFrame = xComponent.getCurrentController().getFrame() + xFrame = xComponent.CurrentController.Frame if xComponent.isModified(): xComponent.setModified(False) @@ -54,19 +58,22 @@ class OfficeDocument(object): @param desktop @param frame @param sDocumentType e.g. swriter, scalc, ( simpress, scalc : not tested) - @return the document Component (implements XComponent) object ( XTextDocument, or XSpreadsheedDocument ) + @return the document Component + (implements XComponent) object ( XTextDocument, or XSpreadsheedDocument ) ''' def createNewDocument(self, frame, sDocumentType, preview, readonly): loadValues = range(2) - loadValues[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[0] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') loadValues[0].Name = "ReadOnly" if readonly: loadValues[0].Value = True else: loadValues[0].Value = False - loadValues[1] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[1] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') loadValues[1].Name = "Preview" if preview: loadValues[1].Value = True @@ -75,8 +82,8 @@ class OfficeDocument(object): sURL = "private:factory/" + sDocumentType try: - - xComponent = frame.loadComponentFromURL(sURL, "_self", 0, loadValues) + xComponent = frame.loadComponentFromURL( + sURL, "_self", 0, loadValues) except Exception, exception: traceback.print_exc() @@ -157,7 +164,8 @@ class OfficeDocument(object): def load(self, xInterface, sURL, sFrame, xValues): xComponent = None try: - xComponent = xInterface.loadComponentFromURL(sURL, sFrame, 0, tuple(xValues)) + xComponent = xInterface.loadComponentFromURL( + sURL, sFrame, 0, tuple(xValues)) except Exception, exception: traceback.print_exc() @@ -168,12 +176,15 @@ class OfficeDocument(object): try: if FilterName.length() > 0: oStoreProperties = range(2) - oStoreProperties[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + oStoreProperties[0] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') oStoreProperties[0].Name = "FilterName" oStoreProperties[0].Value = FilterName - oStoreProperties[1] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + oStoreProperties[1] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') oStoreProperties[1].Name = "InteractionHandler" - oStoreProperties[1].Value = xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler") + oStoreProperties[1].Value = xMSF.createInstance( + "com.sun.star.comp.uui.UUIInteractionHandler") else: oStoreProperties = range(0) @@ -209,16 +220,20 @@ class OfficeDocument(object): if rowcount > 0: colcount = datalist[0].length if colcount > 0: - xNewRange = oTable.getCellRangeByPosition(xpos, ypos, (colcount + xpos) - 1, (rowcount + ypos) - 1) + xNewRange = oTable.getCellRangeByPosition( + xpos, ypos, (colcount + xpos) - 1, + (rowcount + ypos) - 1) xNewRange.setDataArray(datalist) except Exception, e: traceback.print_exc() def getFileMediaDecriptor(self, xmsf, url): - typeDetect = xmsf.createInstance("com.sun.star.document.TypeDetection") + typeDetect = xmsf.createInstance( + "com.sun.star.document.TypeDetection") mediaDescr = range(1) - mediaDescr[0][0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + mediaDescr[0][0] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') mediaDescr[0][0].Name = "URL" mediaDescr[0][0].Value = url Type = typeDetect.queryTypeByDescriptor(mediaDescr, True) @@ -228,7 +243,8 @@ class OfficeDocument(object): return typeDetect.getByName(type) def getTypeMediaDescriptor(self, xmsf, type): - typeDetect = xmsf.createInstance("com.sun.star.document.TypeDetection") + typeDetect = xmsf.createInstance( + "com.sun.star.document.TypeDetection") return typeDetect.getByName(type) ''' @@ -244,9 +260,11 @@ class OfficeDocument(object): def getDocumentProperties(self, document): return document.getDocumentProperties() - def showMessageBox(self, xMSF, windowServiceName, windowAttribute, MessageText): + def showMessageBox( + self, xMSF, windowServiceName, windowAttribute, MessageText): - return SystemDialog.showMessageBox(xMSF, windowServiceName, windowAttribute, MessageText) + return SystemDialog.showMessageBox( + xMSF, windowServiceName, windowAttribute, MessageText) def getWindowPeer(self): return self.xWindowPeer diff --git a/wizards/com/sun/star/wizards/document/__init__.py b/wizards/com/sun/star/wizards/document/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.py b/wizards/com/sun/star/wizards/fax/CallWizard.py index 2bd940d82..6faa3490d 100644 --- a/wizards/com/sun/star/wizards/fax/CallWizard.py +++ b/wizards/com/sun/star/wizards/fax/CallWizard.py @@ -10,15 +10,20 @@ class CallWizard(object): @param xMSF The service manager, who gives access to every known service. @param xregistrykey Makes structural information (except regarding tree structures) of a single registry key accessible. - @return Returns a XSingleServiceFactory for creating the component. + @return Returns a XSingleServiceFactory + for creating the component. @see com.sun.star.comp.loader.JavaLoader# ''' @classmethod - def __getServiceFactory(self, stringImplementationName, xMSF, xregistrykey): + def __getServiceFactory(self, stringImplementationName, xMSF, \ + xregistrykey): + xsingleservicefactory = None if stringImplementationName.equals(WizardImplementation.getName()): - xsingleservicefactory = FactoryHelper.getServiceFactory(WizardImplementation, WizardImplementation.__serviceName, xMSF, xregistrykey) + xsingleservicefactory = FactoryHelper.getServiceFactory( \ + WizardImplementation, WizardImplementation.__serviceName, + xMSF, xregistrykey) return xsingleservicefactory @@ -32,18 +37,24 @@ class CallWizard(object): #private XMultiServiceFactory xmultiservicefactory ''' - The constructor of the inner class has a XMultiServiceFactory parameter. - @param xmultiservicefactoryInitialization A special service factory could be - introduced while initializing. + The constructor of the inner class has a XMultiServiceFactory + parameter. + @param xmultiservicefactoryInitialization A special service factory + could be introduced while initializing. ''' @classmethod - def WizardImplementation_XMultiServiceFactory(self, xmultiservicefactoryInitialization): + def WizardImplementation_XMultiServiceFactory(self, \ + xmultiservicefactoryInitialization): + tmp = WizardImplementation() - tmp.WizardImplementation_body_XMultiServiceFactory(xmultiservicefactoryInitialization) + tmp.WizardImplementation_body_XMultiServiceFactory( \ + xmultiservicefactoryInitialization) return tmp - def WizardImplementation_body_XMultiServiceFactory(self, xmultiservicefactoryInitialization): + def WizardImplementation_body_XMultiServiceFactory(self, \ + xmultiservicefactoryInitialization): + self.xmultiservicefactory = xmultiservicefactoryInitialization if self.xmultiservicefactory != None: pass @@ -55,19 +66,19 @@ class CallWizard(object): def trigger(self, str): if str.equalsIgnoreCase("start"): - lw = FaxWizardDialogImpl.FaxWizardDialogImpl_unknown(self.xmultiservicefactory) + lw = FaxWizardDialogImpl(self.xmultiservicefactory) if not FaxWizardDialogImpl.running: lw.startWizard(self.xmultiservicefactory, None) ''' - The service name, that must be used to get an instance of this service. + The service name, that must be used to get an instance of this service The service manager, that gives access to all registered services. - This method is a member of the interface for initializing an object directly - after its creation. - @param object This array of arbitrary objects will be passed to the component - after its creation. - @throws com.sun.star.uno.Exception Every exception will not be handled, but - will be passed to the caller. + This method is a member of the interface for initializing an object + directly after its creation. + @param object This array of arbitrary objects will be passed to the + component after its creation. + @throws com.sun.star.uno.Exception Every exception will not be + handled, but will be passed to the caller. ''' def initialize(self, object): @@ -84,8 +95,8 @@ class CallWizard(object): return (stringSupportedServiceNames) ''' - This method returns true, if the given service will be supported by the - component. + This method returns true, if the given service will be supported by + the component. @param stringService Service name. @return True, if the given service name will be supported. ''' @@ -98,13 +109,14 @@ class CallWizard(object): return (booleanSupportsService) ''' - This method returns an array of bytes, that can be used to unambiguously - distinguish between two sets of types, e.g. to realise hashing functionality - when the object is introspected. Two objects that return the same ID also - have to return the same set of types in getTypes(). If an unique - implementation Id cannot be provided this method has to return an empty - sequence. Important: If the object aggregates other objects the ID has to be - unique for the whole combination of objects. + This method returns an array of bytes, that can be used to + unambiguously distinguish between two sets of types, + e.g. to realise hashing functionality when the object is introspected. + Two objects that return the same ID also have to return the same + set of types in getTypes(). If an unique implementation Id cannot be + provided this method has to return an empty sequence. Important: + If the object aggregates other objects the ID has to be unique for + the whole combination of objects. @return Array of bytes, in order to distinguish between two sets. ''' @@ -126,10 +138,10 @@ class CallWizard(object): return (WizardImplementation.getName()) ''' - Provides a sequence of all types (usually interface types) provided by the - object. - @return Sequence of all types (usually interface types) provided by the - service. + Provides a sequence of all types (usually interface types) provided + by the object. + @return Sequence of all types (usually interface types) provided + by the service. ''' def getTypes(self): diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py index 691c5effd..8c0f0c458 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.py +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -14,14 +14,17 @@ from com.sun.star.style.NumberingType import ARABIC class FaxDocument(TextDocument): def __init__(self, xMSF, listener): - super(FaxDocument,self).__init__(xMSF, listener, None, "WIZARD_LIVE_PREVIEW") + super(FaxDocument,self).__init__(xMSF, listener, None, + "WIZARD_LIVE_PREVIEW") self.keepLogoFrame = True self.keepTypeFrame = True def switchElement(self, sElement, bState): try: - mySectionHandler = TextSectionHandler(self.xMSF, self.xTextDocument) - oSection = mySectionHandler.xTextDocument.getTextSections().getByName(sElement) + mySectionHandler = TextSectionHandler(self.xMSF, + self.xTextDocument) + oSection = \ + mySectionHandler.xTextDocument.TextSections.getByName(sElement) Helper.setUnoPropertyValue(oSection, "IsVisible", bState) except UnoException, exception: traceback.print_exc() @@ -35,7 +38,8 @@ class FaxDocument(TextDocument): self.xTextDocument.lockControllers() try: - xPageStyleCollection = self.xTextDocument.getStyleFamilies().getByName("PageStyles") + xPageStyleCollection = \ + self.xTextDocument.StyleFamilies.getByName("PageStyles") xPageStyle = xPageStyleCollection.getByName(sPageStyle) if bState: @@ -47,16 +51,21 @@ class FaxDocument(TextDocument): #Adding the Page Number myCursor = xFooterText.Text.createTextCursor() myCursor.gotoEnd(False) - xFooterText.insertControlCharacter(myCursor, PARAGRAPH_BREAK, False) + xFooterText.insertControlCharacter(myCursor, + PARAGRAPH_BREAK, False) myCursor.setPropertyValue("ParaAdjust", CENTER ) - xPageNumberField = xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber") - xPageNumberField.setPropertyValue("NumberingType", uno.Any("short",ARABIC)) + xPageNumberField = xMSFDoc.createInstance( + "com.sun.star.text.TextField.PageNumber") + xPageNumberField.setPropertyValue( + "NumberingType", uno.Any("short",ARABIC)) xPageNumberField.setPropertyValue("SubType", CURRENT) - xFooterText.insertTextContent(xFooterText.getEnd(), xPageNumberField, False) + xFooterText.insertTextContent(xFooterText.getEnd(), + xPageNumberField, False) else: - Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", False) + Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", + False) self.xTextDocument.unlockControllers() except UnoException, exception: @@ -64,7 +73,8 @@ class FaxDocument(TextDocument): def hasElement(self, sElement): if self.xTextDocument != None: - mySectionHandler = TextSectionHandler(self.xMSF, self.xTextDocument) + mySectionHandler = TextSectionHandler(self.xMSF, + self.xTextDocument) return mySectionHandler.hasTextSectionByName(sElement) else: return False @@ -78,14 +88,24 @@ class FaxDocument(TextDocument): def fillSenderWithUserData(self): try: - myFieldHandler = TextFieldHandler(self.xTextDocument, self.xTextDocument) - oUserDataAccess = Configuration.getConfigurationRoot(self.xMSF, "org.openoffice.UserProfile/Data", False) - myFieldHandler.changeUserFieldContent("Company", Helper.getUnoObjectbyName(oUserDataAccess, "o")) - myFieldHandler.changeUserFieldContent("Street", Helper.getUnoObjectbyName(oUserDataAccess, "street")) - myFieldHandler.changeUserFieldContent("PostCode", Helper.getUnoObjectbyName(oUserDataAccess, "postalcode")) - myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, Helper.getUnoObjectbyName(oUserDataAccess, "st")) - myFieldHandler.changeUserFieldContent("City", Helper.getUnoObjectbyName(oUserDataAccess, "l")) - myFieldHandler.changeUserFieldContent("Fax", Helper.getUnoObjectbyName(oUserDataAccess, "facsimiletelephonenumber")) + myFieldHandler = TextFieldHandler(self.xTextDocument, + self.xTextDocument) + oUserDataAccess = Configuration.getConfigurationRoot( + self.xMSF, "org.openoffice.UserProfile/Data", False) + myFieldHandler.changeUserFieldContent("Company", + Helper.getUnoObjectbyName(oUserDataAccess, "o")) + myFieldHandler.changeUserFieldContent("Street", + Helper.getUnoObjectbyName(oUserDataAccess, "street")) + myFieldHandler.changeUserFieldContent("PostCode", + Helper.getUnoObjectbyName(oUserDataAccess, "postalcode")) + myFieldHandler.changeUserFieldContent( + PropertyNames.PROPERTY_STATE, + Helper.getUnoObjectbyName(oUserDataAccess, "st")) + myFieldHandler.changeUserFieldContent("City", + Helper.getUnoObjectbyName(oUserDataAccess, "l")) + myFieldHandler.changeUserFieldContent("Fax", + Helper.getUnoObjectbyName(oUserDataAccess, + "facsimiletelephonenumber")) except UnoException, exception: traceback.print_exc() @@ -96,12 +116,14 @@ class FaxDocument(TextDocument): def killEmptyFrames(self): try: if not self.keepLogoFrame: - xTF = TextFrameHandler.getFrameByName("Company Logo", self.xTextDocument) + xTF = TextFrameHandler.getFrameByName("Company Logo", + self.xTextDocument) if xTF != None: xTF.dispose() if not self.keepTypeFrame: - xTF = TextFrameHandler.getFrameByName("Communication Type", self.xTextDocument) + xTF = TextFrameHandler.getFrameByName("Communication Type", + self.xTextDocument) if xTF != None: xTF.dispose() diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py index 513331fb3..5b178cb75 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py @@ -19,13 +19,22 @@ class FaxWizardDialog(WizardDialog): #set dialog properties... Helper.setUnoPropertyValues(self.xDialogModel, - ("Closeable", PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH), - (True, 210, True, 104, 52, 1, uno.Any("short",1), self.resources.resFaxWizardDialog_title, 310)) + ("Closeable", PropertyNames.PROPERTY_HEIGHT, "Moveable", + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, + "Title", PropertyNames.PROPERTY_WIDTH), + (True, 210, True, 104, 52, 1, uno.Any("short",1), + self.resources.resFaxWizardDialog_title, 310)) - self.fontDescriptor1 = uno.createUnoStruct('com.sun.star.awt.FontDescriptor') - self.fontDescriptor2 = uno.createUnoStruct('com.sun.star.awt.FontDescriptor') - self.fontDescriptor4 = uno.createUnoStruct('com.sun.star.awt.FontDescriptor') - self.fontDescriptor5 = uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor1 = \ + uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor2 = \ + uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor4 = \ + uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor5 = \ + uno.createUnoStruct('com.sun.star.awt.FontDescriptor') #Set member- FontDescriptors... self.fontDescriptor1.Weight = 150 self.fontDescriptor1.Underline = SINGLE @@ -36,66 +45,613 @@ class FaxWizardDialog(WizardDialog): #build components def buildStep1(self): - self.optBusinessFax = self.insertRadioButton("optBusinessFax", OPTBUSINESSFAX_ITEM_CHANGED,(PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTBUSINESSFAX_HID, self.resources.resoptBusinessFax_value, 97, 28, 1, uno.Any("short",1), 184), self) - self.lstBusinessStyle = self.insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTBUSINESSSTYLE_HID, 180, 40, 1, uno.Any("short",3), 74), self) - self.optPrivateFax = self.insertRadioButton("optPrivateFax", OPTPRIVATEFAX_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTPRIVATEFAX_HID, self.resources.resoptPrivateFax_value, 97, 81, 1, uno.Any("short",2), 184), self) - self.lstPrivateStyle = self.insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTPRIVATESTYLE_HID, 180, 95, 1, uno.Any("short",4), 74), self) - self.lblBusinessStyle = self.insertLabel("lblBusinessStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblBusinessStyle_value, 110, 42, 1, uno.Any("short",32), 60)) + self.optBusinessFax = self.insertRadioButton("optBusinessFax", + OPTBUSINESSFAX_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTBUSINESSFAX_HID, self.resources.resoptBusinessFax_value, + 97, 28, 1, uno.Any("short",1), 184), self) + self.lstBusinessStyle = self.insertListBox("lstBusinessStyle", + LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, + ("Dropdown", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, LSTBUSINESSSTYLE_HID, 180, 40, 1, + uno.Any("short",3), 74), self) + self.optPrivateFax = self.insertRadioButton("optPrivateFax", + OPTPRIVATEFAX_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTPRIVATEFAX_HID, self.resources.resoptPrivateFax_value, + 97, 81, 1, uno.Any("short",2), 184), self) + self.lstPrivateStyle = self.insertListBox("lstPrivateStyle", + LSTPRIVATESTYLE_ACTION_PERFORMED, + LSTPRIVATESTYLE_ITEM_CHANGED, + ("Dropdown", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, LSTPRIVATESTYLE_HID, 180, 95, 1, + uno.Any("short",4), 74), self) + self.lblBusinessStyle = self.insertLabel("lblBusinessStyle", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblBusinessStyle_value, + 110, 42, 1, uno.Any("short",32), 60)) - self.lblTitle1 = self.insertLabel("lblTitle1", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle1_value, True, 91, 8, 1, uno.Any("short",37), 212)) - self.lblPrivateStyle = self.insertLabel("lblPrivateStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPrivateStyle_value, 110, 95, 1, uno.Any("short",50), 60)) - self.lblIntroduction = self.insertLabel("lblIntroduction", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (39, self.resources.reslblIntroduction_value, True, 104, 145, 1, uno.Any("short",55), 199)) + self.lblTitle1 = self.insertLabel("lblTitle1", + ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor5, 16, self.resources.reslblTitle1_value, + True, 91, 8, 1, uno.Any("short",37), 212)) + self.lblPrivateStyle = self.insertLabel("lblPrivateStyle", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblPrivateStyle_value, 110, 95, 1, + uno.Any("short",50), 60)) + self.lblIntroduction = self.insertLabel("lblIntroduction", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (39, self.resources.reslblIntroduction_value, True, 104, 145, 1, + uno.Any("short",55), 199)) self.ImageControl3 = self.insertInfoImage(92, 145, 1) def buildStep2(self): - self.chkUseLogo = self.insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSELOGO_HID, self.resources.reschkUseLogo_value, 97, 28, uno.Any("short",0), 2, uno.Any("short",5), 212), self) - self.chkUseDate = self.insertCheckBox("chkUseDate", CHKUSEDATE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEDATE_HID, self.resources.reschkUseDate_value, 97, 43, uno.Any("short",0), 2,uno.Any("short",6), 212), self) - self.chkUseCommunicationType = self.insertCheckBox("chkUseCommunicationType", CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSECOMMUNICATIONTYPE_HID, self.resources.reschkUseCommunicationType_value, 97, 57, uno.Any("short",0), 2, uno.Any("short",07), 100), self) - self.lstCommunicationType = self.insertComboBox("lstCommunicationType", LSTCOMMUNICATIONTYPE_ACTION_PERFORMED, LSTCOMMUNICATIONTYPE_ITEM_CHANGED, LSTCOMMUNICATIONTYPE_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTCOMMUNICATIONTYPE_HID, 105, 68, 2, uno.Any("short",8), 174), self) - self.chkUseSubject = self.insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSESUBJECT_HID, self.resources.reschkUseSubject_value, 97, 87, uno.Any("short",0), 2, uno.Any("short",9), 212), self) - self.chkUseSalutation = self.insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSESALUTATION_HID, self.resources.reschkUseSalutation_value, 97, 102, uno.Any("short",0), 2, uno.Any("short",10), 100), self) - self.lstSalutation = self.insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTSALUTATION_HID, 105, 113, 2, uno.Any("short",11), 174), self) - self.chkUseGreeting = self.insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEGREETING_HID, self.resources.reschkUseGreeting_value, 97, 132, uno.Any("short",0), 2, uno.Any("short",12), 100), self) - self.lstGreeting = self.insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTGREETING_HID, 105, 143, 2,uno.Any("short",13), 174), self) - self.chkUseFooter = self.insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEFOOTER_HID, self.resources.reschkUseFooter_value, 97, 163, uno.Any("short",0), 2, uno.Any("short",14), 212), self) - self.lblTitle3 = self.insertLabel("lblTitle3", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle3_value, True, 91, 8, 2, uno.Any("short",59), 212)) + self.chkUseLogo = self.insertCheckBox("chkUseLogo", + CHKUSELOGO_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKUSELOGO_HID, self.resources.reschkUseLogo_value, 97, 28, + uno.Any("short",0), 2, uno.Any("short",5), 212), self) + self.chkUseDate = self.insertCheckBox("chkUseDate", + CHKUSEDATE_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKUSEDATE_HID, self.resources.reschkUseDate_value, 97, 43, + uno.Any("short",0), 2,uno.Any("short",6), 212), self) + self.chkUseCommunicationType = self.insertCheckBox( + "chkUseCommunicationType", + CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKUSECOMMUNICATIONTYPE_HID, + self.resources.reschkUseCommunicationType_value, 97, 57, + uno.Any("short",0), 2, uno.Any("short",07), 100), self) + self.lstCommunicationType = self.insertComboBox( + "lstCommunicationType", + LSTCOMMUNICATIONTYPE_ACTION_PERFORMED, + LSTCOMMUNICATIONTYPE_ITEM_CHANGED, + LSTCOMMUNICATIONTYPE_TEXT_CHANGED, + ("Dropdown", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, LSTCOMMUNICATIONTYPE_HID, 105, 68, 2, + uno.Any("short",8), 174), self) + self.chkUseSubject = self.insertCheckBox("chkUseSubject", + CHKUSESUBJECT_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKUSESUBJECT_HID, self.resources.reschkUseSubject_value, + 97, 87, uno.Any("short",0), 2, uno.Any("short",9), 212), self) + self.chkUseSalutation = self.insertCheckBox("chkUseSalutation", + CHKUSESALUTATION_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKUSESALUTATION_HID, + self.resources.reschkUseSalutation_value, 97, 102, + uno.Any("short",0), 2, uno.Any("short",10), 100), self) + self.lstSalutation = self.insertComboBox("lstSalutation", + LSTSALUTATION_ACTION_PERFORMED, + LSTSALUTATION_ITEM_CHANGED, + LSTSALUTATION_TEXT_CHANGED, + ("Dropdown", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, LSTSALUTATION_HID, 105, 113, 2, + uno.Any("short",11), 174), self) + self.chkUseGreeting = self.insertCheckBox("chkUseGreeting", + CHKUSEGREETING_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKUSEGREETING_HID, + self.resources.reschkUseGreeting_value, 97, 132, + uno.Any("short",0), 2, uno.Any("short",12), 100), self) + self.lstGreeting = self.insertComboBox("lstGreeting", + LSTGREETING_ACTION_PERFORMED, + LSTGREETING_ITEM_CHANGED, + LSTGREETING_TEXT_CHANGED, + ("Dropdown", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, LSTGREETING_HID, 105, 143, 2, + uno.Any("short",13), 174), self) + self.chkUseFooter = self.insertCheckBox("chkUseFooter", + CHKUSEFOOTER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKUSEFOOTER_HID, + self.resources.reschkUseFooter_value, 97, 163, + uno.Any("short",0), 2, uno.Any("short",14), 212), self) + self.lblTitle3 = self.insertLabel("lblTitle3", + ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor5, 16, self.resources.reslblTitle3_value, + True, 91, 8, 2, uno.Any("short",59), 212)) def buildStep3(self): - self.optSenderPlaceholder = self.insertRadioButton("optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTSENDERPLACEHOLDER_HID, self.resources.resoptSenderPlaceholder_value, 104, 42, 3, uno.Any("short",15), 149), self) - self.optSenderDefine = self.insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTSENDERDEFINE_HID, self.resources.resoptSenderDefine_value, 104, 54, 3, uno.Any("short",16), 149), self) - self.txtSenderName = self.insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERNAME_HID, 182, 67, 3, uno.Any("short",17), 119), self) - self.txtSenderStreet = self.insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERSTREET_HID, 182, 81, 3, uno.Any("short",18), 119), self) - self.txtSenderPostCode = self.insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERPOSTCODE_HID, 182, 95, 3, uno.Any("short",19), 25), self) - self.txtSenderState = self.insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERSTATE_HID, 211, 95, 3, uno.Any("short",20), 21), self) - self.txtSenderCity = self.insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERCITY_HID, 236, 95, 3, uno.Any("short",21), 65), self) - self.txtSenderFax = self.insertTextField("txtSenderFax", TXTSENDERFAX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERFAX_HID, 182, 109, 3, uno.Any("short",22), 119), self) - self.optReceiverPlaceholder = self.insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTRECEIVERPLACEHOLDER_HID, self.resources.resoptReceiverPlaceholder_value, 104, 148, 3, uno.Any("short",23), 200), self) - self.optReceiverDatabase = self.insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTRECEIVERDATABASE_HID, self.resources.resoptReceiverDatabase_value, 104, 160, 3, uno.Any("short",24), 200), self) - self.lblSenderAddress = self.insertLabel("lblSenderAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderAddress_value, 97, 28, 3, uno.Any("short",46), 136)) - self.FixedLine2 = self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (5, 90, 126, 3, uno.Any("short",51), 212)) - self.lblSenderName = self.insertLabel("lblSenderName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderName_value, 113, 69, 3, uno.Any("short",52), 68)) - self.lblSenderStreet = self.insertLabel("lblSenderStreet", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderStreet_value, 113, 82, 3, uno.Any("short",53), 68)) - self.lblPostCodeCity = self.insertLabel("lblPostCodeCity", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPostCodeCity_value, 113, 97, 3, uno.Any("short",54), 68)) - self.lblTitle4 = self.insertLabel("lblTitle4", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle4_value, True, 91, 8, 3, uno.Any("short",60), 212)) - self.Label1 = self.insertLabel("lblSenderFax", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.resLabel1_value, 113, 111, 3, uno.Any("short",68), 68)) - self.Label2 = self.insertLabel("Label2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.resLabel2_value, 97, 137, 3, uno.Any("short",69), 136)) + self.optSenderPlaceholder = self.insertRadioButton( + "optSenderPlaceholder", + OPTSENDERPLACEHOLDER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTSENDERPLACEHOLDER_HID, + self.resources.resoptSenderPlaceholder_value, + 104, 42, 3, uno.Any("short",15), 149), self) + self.optSenderDefine = self.insertRadioButton("optSenderDefine", + OPTSENDERDEFINE_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTSENDERDEFINE_HID, self.resources.resoptSenderDefine_value, + 104, 54, 3, uno.Any("short",16), 149), self) + self.txtSenderName = self.insertTextField("txtSenderName", + TXTSENDERNAME_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, TXTSENDERNAME_HID, 182, 67, 3, + uno.Any("short",17), 119), self) + self.txtSenderStreet = self.insertTextField("txtSenderStreet", + TXTSENDERSTREET_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, TXTSENDERSTREET_HID, 182, 81, 3, + uno.Any("short",18), 119), self) + self.txtSenderPostCode = self.insertTextField("txtSenderPostCode", + TXTSENDERPOSTCODE_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, TXTSENDERPOSTCODE_HID, 182, 95, 3, + uno.Any("short",19), 25), self) + self.txtSenderState = self.insertTextField("txtSenderState", + TXTSENDERSTATE_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, TXTSENDERSTATE_HID, 211, 95, 3, + uno.Any("short",20), 21), self) + self.txtSenderCity = self.insertTextField("txtSenderCity", + TXTSENDERCITY_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, TXTSENDERCITY_HID, 236, 95, 3, + uno.Any("short",21), 65), self) + self.txtSenderFax = self.insertTextField("txtSenderFax", + TXTSENDERFAX_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, TXTSENDERFAX_HID, 182, 109, 3, + uno.Any("short",22), 119), self) + self.optReceiverPlaceholder = self.insertRadioButton( + "optReceiverPlaceholder", + OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTRECEIVERPLACEHOLDER_HID, + self.resources.resoptReceiverPlaceholder_value, + 104, 148, 3, uno.Any("short",23), 200), self) + self.optReceiverDatabase = self.insertRadioButton( + "optReceiverDatabase", + OPTRECEIVERDATABASE_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTRECEIVERDATABASE_HID, + self.resources.resoptReceiverDatabase_value, 104, 160, 3, + uno.Any("short",24), 200), self) + self.lblSenderAddress = self.insertLabel("lblSenderAddress", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblSenderAddress_value, 97, 28, 3, uno.Any("short",46), 136)) + self.FixedLine2 = self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (5, 90, 126, 3, uno.Any("short",51), 212)) + self.lblSenderName = self.insertLabel("lblSenderName", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblSenderName_value, 113, 69, 3, + uno.Any("short",52), 68)) + self.lblSenderStreet = self.insertLabel("lblSenderStreet", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblSenderStreet_value, 113, 82, 3, + uno.Any("short",53), 68)) + self.lblPostCodeCity = self.insertLabel("lblPostCodeCity", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblPostCodeCity_value, + 113, 97, 3, uno.Any("short",54), 68)) + self.lblTitle4 = self.insertLabel("lblTitle4", + ("FontDescriptor", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor5, 16, self.resources.reslblTitle4_value, + True, 91, 8, 3, uno.Any("short",60), 212)) + self.Label1 = self.insertLabel("lblSenderFax", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.resLabel1_value, 113, 111, 3, + uno.Any("short",68), 68)) + self.Label2 = self.insertLabel("Label2", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.resLabel2_value, 97, 137, 3, + uno.Any("short",69), 136)) def buildStep4(self): - self.txtFooter = self.insertTextField("txtFooter", TXTFOOTER_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (47, TXTFOOTER_HID, True, 97, 40, 4, uno.Any("short",25), 203), self) - self.chkFooterNextPages = self.insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKFOOTERNEXTPAGES_HID, self.resources.reschkFooterNextPages_value, 97, 92, uno.Any("short",0), 4, uno.Any("short",26), 202), self) - self.chkFooterPageNumbers = self.insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKFOOTERPAGENUMBERS_HID, self.resources.reschkFooterPageNumbers_value, 97, 106, uno.Any("short",0), 4, uno.Any("short",27), 201), self) - self.lblFooter = self.insertLabel("lblFooter", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor4, 8, self.resources.reslblFooter_value, 97, 28, 4, uno.Any("short",33), 116)) - self.lblTitle5 = self.insertLabel("lblTitle5", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle5_value, True, 91, 8, 4, uno.Any("short",61), 212)) + self.txtFooter = self.insertTextField("txtFooter", + TXTFOOTER_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (47, TXTFOOTER_HID, True, 97, 40, 4, + uno.Any("short",25), 203), self) + self.chkFooterNextPages = self.insertCheckBox("chkFooterNextPages", + CHKFOOTERNEXTPAGES_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKFOOTERNEXTPAGES_HID, + self.resources.reschkFooterNextPages_value, 97, 92, + uno.Any("short",0), 4, uno.Any("short",26), 202), self) + self.chkFooterPageNumbers = self.insertCheckBox("chkFooterPageNumbers", + CHKFOOTERPAGENUMBERS_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKFOOTERPAGENUMBERS_HID, + self.resources.reschkFooterPageNumbers_value, 97, 106, + uno.Any("short",0), 4, uno.Any("short",27), 201), self) + self.lblFooter = self.insertLabel("lblFooter", + ("FontDescriptor", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor4, 8, self.resources.reslblFooter_value, + 97, 28, 4, uno.Any("short",33), 116)) + self.lblTitle5 = self.insertLabel("lblTitle5", + ("FontDescriptor", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor5, 16, self.resources.reslblTitle5_value, + True, 91, 8, 4, uno.Any("short",61), 212)) def buildStep5(self): - self.txtTemplateName = self.insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH), (12, TXTTEMPLATENAME_HID, 202, 56, 5, uno.Any("short",28), self.resources.restxtTemplateName_value, 100), self) + self.txtTemplateName = self.insertTextField("txtTemplateName", + TXTTEMPLATENAME_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Text", + PropertyNames.PROPERTY_WIDTH), + (12, TXTTEMPLATENAME_HID, 202, 56, 5, uno.Any("short",28), + self.resources.restxtTemplateName_value, 100), self) - self.optCreateFax = self.insertRadioButton("optCreateFax", OPTCREATEFAX_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTCREATEFAX_HID, self.resources.resoptCreateFax_value, 104, 111, 5, uno.Any("short",30), 198), self) - self.optMakeChanges = self.insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTMAKECHANGES_HID, self.resources.resoptMakeChanges_value, 104, 123, 5, uno.Any("short",31), 198), self) - self.lblFinalExplanation1 = self.insertLabel("lblFinalExplanation1", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (28, self.resources.reslblFinalExplanation1_value, True, 97, 28, 5, uno.Any("short",34), 205)) - self.lblProceed = self.insertLabel("lblProceed", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblProceed_value, 97, 100, 5, uno.Any("short",35), 204)) - self.lblFinalExplanation2 = self.insertLabel("lblFinalExplanation2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (33, self.resources.reslblFinalExplanation2_value, True, 104, 145, 5, uno.Any("short",36), 199)) - self.ImageControl2 = self.insertImage("ImageControl2", ("Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (uno.Any("short",0), 10, "private:resource/dbu/image/19205", 92, 145, False, 5, uno.Any("short",47), 10)) - self.lblTemplateName = self.insertLabel("lblTemplateName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblTemplateName_value, 97, 58, 5, uno.Any("short",57), 101)) - - self.lblTitle6 = self.insertLabel("lblTitle6", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle6_value, True, 91, 8, 5, uno.Any("short",62), 212)) + self.optCreateFax = self.insertRadioButton("optCreateFax", + OPTCREATEFAX_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTCREATEFAX_HID, self.resources.resoptCreateFax_value, + 104, 111, 5, uno.Any("short",30), 198), self) + self.optMakeChanges = self.insertRadioButton("optMakeChanges", + OPTMAKECHANGES_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTMAKECHANGES_HID, self.resources.resoptMakeChanges_value, + 104, 123, 5, uno.Any("short",31), 198), self) + self.lblFinalExplanation1 = self.insertLabel("lblFinalExplanation1", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (28, self.resources.reslblFinalExplanation1_value, + True, 97, 28, 5, uno.Any("short",34), 205)) + self.lblProceed = self.insertLabel("lblProceed", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblProceed_value, 97, 100, 5, + uno.Any("short",35), 204)) + self.lblFinalExplanation2 = self.insertLabel("lblFinalExplanation2", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (33, self.resources.reslblFinalExplanation2_value, True, 104, 145, 5, + uno.Any("short",36), 199)) + self.ImageControl2 = self.insertImage("ImageControl2", + ("Border", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_IMAGEURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "ScaleImage", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (uno.Any("short",0), 10, "private:resource/dbu/image/19205", 92, 145, + False, 5, uno.Any("short",47), 10)) + self.lblTemplateName = self.insertLabel("lblTemplateName", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblTemplateName_value, 97, 58, 5, + uno.Any("short",57), 101)) + self.lblTitle6 = self.insertLabel("lblTitle6", + ("FontDescriptor", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor5, 16, self.resources.reslblTitle6_value, + True, 91, 8, 5, uno.Any("short",62), 212)) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py index 191d60dfd..b87a3af54 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py @@ -1,4 +1,5 @@ -import common.HelpIds as HelpIds +from common.HelpIds import HelpIds + OPTBUSINESSFAX_ITEM_CHANGED = "optBusinessFaxItemChanged" LSTBUSINESSSTYLE_ACTION_PERFORMED = None # "lstBusinessStyleActionPerformed" @@ -11,7 +12,7 @@ CHKUSEDATE_ITEM_CHANGED = "chkUseDateItemChanged" CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED = "chkUseCommunicationItemChanged" LSTCOMMUNICATIONTYPE_ACTION_PERFORMED = None # "lstCommunicationActionPerformed" LSTCOMMUNICATIONTYPE_ITEM_CHANGED = "lstCommunicationItemChanged" -LSTCOMMUNICATIONTYPE_TEXT_CHANGED = None # "lstCommunicationTextChanged" +LSTCOMMUNICATIONTYPE_TEXT_CHANGED = None #"lstCommunicationTextChanged" CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged" CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged" LSTSALUTATION_ACTION_PERFORMED = None # "lstSalutationActionPerformed" @@ -44,39 +45,39 @@ imageURLImageControl3 = None #"images/ImageControl3" #Help IDs -HID = 349 -HIDMAIN = 411 -OPTBUSINESSFAX_HID = HelpIds.array2[HID + 1] -LSTBUSINESSSTYLE_HID = HelpIds.array2[HID + 2] -OPTPRIVATEFAX_HID = HelpIds.array2[HID + 3] -LSTPRIVATESTYLE_HID = HelpIds.array2[HID + 4] -IMAGECONTROL3_HID = HelpIds.array2[HID + 5] -CHKUSELOGO_HID = HelpIds.array2[HID + 6] -CHKUSEDATE_HID = HelpIds.array2[HID + 7] -CHKUSECOMMUNICATIONTYPE_HID = HelpIds.array2[HID + 8] -LSTCOMMUNICATIONTYPE_HID = HelpIds.array2[HID + 9] -CHKUSESUBJECT_HID = HelpIds.array2[HID + 10] -CHKUSESALUTATION_HID = HelpIds.array2[HID + 11] -LSTSALUTATION_HID = HelpIds.array2[HID + 12] -CHKUSEGREETING_HID = HelpIds.array2[HID + 13] -LSTGREETING_HID = HelpIds.array2[HID + 14] -CHKUSEFOOTER_HID = HelpIds.array2[HID + 15] -OPTSENDERPLACEHOLDER_HID = HelpIds.array2[HID + 16] -OPTSENDERDEFINE_HID = HelpIds.array2[HID + 17] -TXTSENDERNAME_HID = HelpIds.array2[HID + 18] -TXTSENDERSTREET_HID = HelpIds.array2[HID + 19] -TXTSENDERPOSTCODE_HID = HelpIds.array2[HID + 20] -TXTSENDERSTATE_HID = HelpIds.array2[HID + 21] -TXTSENDERCITY_HID = HelpIds.array2[HID + 22] -TXTSENDERFAX_HID = HelpIds.array2[HID + 23] -OPTRECEIVERPLACEHOLDER_HID = HelpIds.array2[HID + 24] -OPTRECEIVERDATABASE_HID = HelpIds.array2[HID + 25] -TXTFOOTER_HID = HelpIds.array2[HID + 26] -CHKFOOTERNEXTPAGES_HID = HelpIds.array2[HID + 27] -CHKFOOTERPAGENUMBERS_HID = HelpIds.array2[HID + 28] -TXTTEMPLATENAME_HID = HelpIds.array2[HID + 29] -FILETEMPLATEPATH_HID = HelpIds.array2[HID + 30] -OPTCREATEFAX_HID = HelpIds.array2[HID + 31] -OPTMAKECHANGES_HID = HelpIds.array2[HID + 32] -IMAGECONTROL2_HID = HelpIds.array2[HID + 33] +HID = 41119 #TODO enter first hid here +HIDMAIN = 41180 +OPTBUSINESSFAX_HID = HelpIds.getHelpIdString(HID + 1) +LSTBUSINESSSTYLE_HID = HelpIds.getHelpIdString(HID + 2) +OPTPRIVATEFAX_HID = HelpIds.getHelpIdString(HID + 3) +LSTPRIVATESTYLE_HID = HelpIds.getHelpIdString(HID + 4) +IMAGECONTROL3_HID = HelpIds.getHelpIdString(HID + 5) +CHKUSELOGO_HID = HelpIds.getHelpIdString(HID + 6) +CHKUSEDATE_HID = HelpIds.getHelpIdString(HID + 7) +CHKUSECOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 8) +LSTCOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 9) +CHKUSESUBJECT_HID = HelpIds.getHelpIdString(HID + 10) +CHKUSESALUTATION_HID = HelpIds.getHelpIdString(HID + 11) +LSTSALUTATION_HID = HelpIds.getHelpIdString(HID + 12) +CHKUSEGREETING_HID = HelpIds.getHelpIdString(HID + 13) +LSTGREETING_HID = HelpIds.getHelpIdString(HID + 14) +CHKUSEFOOTER_HID = HelpIds.getHelpIdString(HID + 15) +OPTSENDERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 16) +OPTSENDERDEFINE_HID = HelpIds.getHelpIdString(HID + 17) +TXTSENDERNAME_HID = HelpIds.getHelpIdString(HID + 18) +TXTSENDERSTREET_HID = HelpIds.getHelpIdString(HID + 19) +TXTSENDERPOSTCODE_HID = HelpIds.getHelpIdString(HID + 20) +TXTSENDERSTATE_HID = HelpIds.getHelpIdString(HID + 21) +TXTSENDERCITY_HID = HelpIds.getHelpIdString(HID + 22) +TXTSENDERFAX_HID = HelpIds.getHelpIdString(HID + 23) +OPTRECEIVERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 24) +OPTRECEIVERDATABASE_HID = HelpIds.getHelpIdString(HID + 25) +TXTFOOTER_HID = HelpIds.getHelpIdString(HID + 26) +CHKFOOTERNEXTPAGES_HID = HelpIds.getHelpIdString(HID + 27) +CHKFOOTERPAGENUMBERS_HID = HelpIds.getHelpIdString(HID + 28) +TXTTEMPLATENAME_HID = HelpIds.getHelpIdString(HID + 29) +FILETEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 30) +OPTCREATEFAX_HID = HelpIds.getHelpIdString(HID + 31) +OPTMAKECHANGES_HID = HelpIds.getHelpIdString(HID + 32) +IMAGECONTROL2_HID = HelpIds.getHelpIdString(HID + 33) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 94e696539..9ffade4bf 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -18,8 +18,6 @@ from com.sun.star.view.DocumentZoomType import OPTIMAL from com.sun.star.document.UpdateDocMode import FULL_UPDATE from com.sun.star.document.MacroExecMode import ALWAYS_EXECUTE -import timeit - class FaxWizardDialogImpl(FaxWizardDialog): def leaveStep(self, nOldStep, nNewStep): @@ -36,7 +34,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): def __init__(self, xmsf): - super(FaxWizardDialogImpl,self).__init__(xmsf) + super(FaxWizardDialogImpl, self).__init__(xmsf) self.mainDA = [] self.faxDA = [] self.bSaveSuccess = False @@ -48,7 +46,8 @@ class FaxWizardDialogImpl(FaxWizardDialog): def main(self, args): #only being called when starting wizard remotely try: - ConnectStr = "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" + ConnectStr = \ + "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" xLocMSF = Desktop.connect(ConnectStr) lw = FaxWizardDialogImpl(xLocMSF) lw.startWizard(xLocMSF, None) @@ -88,18 +87,19 @@ class FaxWizardDialogImpl(FaxWizardDialog): #special Control fFrameor setting the save Path: self.insertPathSelectionControl() - #load the last used settings from the registry and apply listeners to the controls: + #load the last used settings + #from the registry and apply listeners to the controls: self.initConfiguration() self.initializeTemplates(xMSF) #update the dialog UI according to the loaded Configuration self.__updateUI() - if self.myPathSelection.xSaveTextBox.getText().lower() == "": + if self.myPathSelection.xSaveTextBox.Text.lower() == "": self.myPathSelection.initializePath() self.xContainerWindow = self.myFaxDoc.xFrame.getContainerWindow() - self.createWindowPeer(self.xContainerWindow); + self.createWindowPeer(self.xContainerWindow) #add the Roadmap to the dialog: self.insertRoadmap() @@ -108,14 +108,15 @@ class FaxWizardDialogImpl(FaxWizardDialog): #TODO: self.setConfiguration() - #If the configuration does not define Greeting/Salutation/CommunicationType yet choose a default + #If the configuration does not define + #Greeting/Salutation/CommunicationType yet choose a default self.__setDefaultForGreetingAndSalutationAndCommunication() #disable funtionality that is not supported by the template: self.initializeElements() #disable the document, so that the user cannot change anything: - self.myFaxDoc.xFrame.getComponentWindow().setEnable(False) + self.myFaxDoc.xFrame.getComponentWindow().Enable = False self.executeDialogFromComponent(self.myFaxDoc.xFrame) self.removeTerminateListener() @@ -133,7 +134,9 @@ class FaxWizardDialogImpl(FaxWizardDialog): def finishWizard(self): self.switchToStep(self.getCurrentStep(), self.getMaxStep()) - self.myFaxDoc.setWizardTemplateDocInfo(self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) + self.myFaxDoc.setWizardTemplateDocInfo( \ + self.resources.resFaxWizardDialog_title, + self.resources.resTemplateDescription) try: fileAccess = FileAccess(self.xMSF) self.sPath = self.myPathSelection.getSelectedPath() @@ -148,31 +151,44 @@ class FaxWizardDialogImpl(FaxWizardDialog): # file exists and warn the user. if not self.__filenameChanged: if fileAccess.exists(self.sPath, True): - answer = SystemDialog.showMessageBox(xMSF, xControl.getPeer(), "MessBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, self.resources.resOverwriteWarning) - if (answer == 3): # user said: no, do not overwrite.... + answer = SystemDialog.showMessageBox( \ + xMSF, xControl.getPeer(), "MessBox", + VclWindowPeerAttribute.YES_NO + \ + VclWindowPeerAttribute.DEF_NO, + self.resources.resOverwriteWarning) + if (answer == 3): # user said: no, do not overwrite... return False - self.myFaxDoc.setWizardTemplateDocInfo(self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) + self.myFaxDoc.setWizardTemplateDocInfo( \ + self.resources.resFaxWizardDialog_title, + self.resources.resTemplateDescription) self.myFaxDoc.killEmptyUserFields() - self.myFaxDoc.keepLogoFrame = (self.chkUseLogo.getState() != 0); - self.myFaxDoc.keepTypeFrame = (self.chkUseCommunicationType.getState() != 0); + self.myFaxDoc.keepLogoFrame = (self.chkUseLogo.State is not 0) + self.myFaxDoc.keepTypeFrame = \ + (self.chkUseCommunicationType.State is not 0) self.myFaxDoc.killEmptyFrames() - self.bSaveSuccess = OfficeDocument.store(xMSF, self.xTextDocument, self.sPath, "writer8_template", False) + self.bSaveSuccess = OfficeDocument.store(xMSF, self.xTextDocument, + self.sPath, "writer8_template", False) if self.bSaveSuccess: saveConfiguration() - xIH = xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler") + xIH = xMSF.createInstance( \ + "com.sun.star.comp.uui.UUIInteractionHandler") loadValues = range(3) - loadValues[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') - loadValues[0].Name = "AsTemplate"; - loadValues[0].Value = True; - loadValues[1] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') - loadValues[1].Name = "MacroExecutionMode"; - loadValues[1].Value = uno.Any("short",ALWAYS_EXECUTE) - loadValues[2] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') - loadValues[2].Name = "UpdateDocMode"; - loadValues[2].Value = uno.Any("short",FULL_UPDATE) - loadValues[3] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[0] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') + loadValues[0].Name = "AsTemplate" + loadValues[0].Value = True + loadValues[1] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') + loadValues[1].Name = "MacroExecutionMode" + loadValues[1].Value = uno.Any("short", ALWAYS_EXECUTE) + loadValues[2] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') + loadValues[2].Name = "UpdateDocMode" + loadValues[2].Value = uno.Any("short", FULL_UPDATE) + loadValues[3] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') loadValues[3].Name = "InteractionHandler" loadValues[3].Value = xIH if self.bEditTemplate: @@ -180,9 +196,11 @@ class FaxWizardDialogImpl(FaxWizardDialog): else: loadValues[0].Value = True - oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), self.sPath, "_default", loadValues) + oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), + self.sPath, "_default", loadValues) myViewHandler = oDoc.getCurrentController().getViewSettings() - myViewHandler.setPropertyValue("ZoomType", uno.Any("short",OPTIMAL)); + myViewHandler.setPropertyValue("ZoomType", + uno.Any("short",OPTIMAL)) else: pass #TODO: Error Handling @@ -204,11 +222,25 @@ class FaxWizardDialogImpl(FaxWizardDialog): def insertRoadmap(self): self.addRoadmap() i = 0 - i = self.insertRoadmapItem(0, True, self.resources.RoadmapLabels[FaxWizardDialogImpl.RM_TYPESTYLE - 1], FaxWizardDialogImpl.RM_TYPESTYLE) - i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[FaxWizardDialogImpl.RM_ELEMENTS - 1], FaxWizardDialogImpl.RM_ELEMENTS) - i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[FaxWizardDialogImpl.RM_SENDERRECEIVER - 1], FaxWizardDialogImpl.RM_SENDERRECEIVER) - i = self.insertRoadmapItem(i, False, self.resources.RoadmapLabels[FaxWizardDialogImpl.RM_FOOTER - 1], FaxWizardDialogImpl.RM_FOOTER) - i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[FaxWizardDialogImpl.RM_FINALSETTINGS - 1], FaxWizardDialogImpl.RM_FINALSETTINGS) + i = self.insertRoadmapItem( + 0, True, self.resources.RoadmapLabels[ + FaxWizardDialogImpl.RM_TYPESTYLE - 1], + FaxWizardDialogImpl.RM_TYPESTYLE) + i = self.insertRoadmapItem( + i, True, self.resources.RoadmapLabels[ + FaxWizardDialogImpl.RM_ELEMENTS - 1], + FaxWizardDialogImpl.RM_ELEMENTS) + i = self.insertRoadmapItem( + i, True, self.resources.RoadmapLabels[ + FaxWizardDialogImpl.RM_SENDERRECEIVER - 1], + FaxWizardDialogImpl.RM_SENDERRECEIVER) + i = self.insertRoadmapItem( + i, False, self.resources.RoadmapLabels[ + FaxWizardDialogImpl.RM_FOOTER - 1], FaxWizardDialogImpl.RM_FOOTER) + i = self.insertRoadmapItem(i, True, + self.resources.RoadmapLabels[ + FaxWizardDialogImpl.RM_FINALSETTINGS - 1], + FaxWizardDialogImpl.RM_FINALSETTINGS) self.setRoadmapInteractive(True) self.setRoadmapComplete(True) self.setCurrentRoadmapItemID(1) @@ -222,12 +254,18 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.myPathSelection.usedPathPicker = False def insertPathSelectionControl(self): - self.myPathSelection = PathSelection(self.xMSF, self, PathSelection.TransferMode.SAVE, PathSelection.DialogTypes.FILE) - self.myPathSelection.insert(5, 97, 70, 205, 45, self.resources.reslblTemplatePath_value, True, HelpIds.array2[HID + 34], HelpIds.array2[HID + 35]) + self.myPathSelection = PathSelection(self.xMSF, + self, PathSelection.TransferMode.SAVE, + PathSelection.DialogTypes.FILE) + self.myPathSelection.insert( + 5, 97, 70, 205, 45, self.resources.reslblTemplatePath_value, + True, HelpIds.getHelpIdString(HID + 34), + HelpIds.getHelpIdString(HID + 35)) self.myPathSelection.sDefaultDirectory = self.UserTemplatePath self.myPathSelection.sDefaultName = "myFaxTemplate.ott" self.myPathSelection.sDefaultFilter = "writer8_template" - self.myPathSelection.addSelectionListener(self.__myPathSelectionListener()) + self.myPathSelection.addSelectionListener( \ + self.__myPathSelectionListener()) def __updateUI(self): UnoDataAware.updateUIs(self.mainDA) @@ -235,20 +273,28 @@ class FaxWizardDialogImpl(FaxWizardDialog): def __initializePaths(self): try: - self.sTemplatePath = FileAccess.getOfficePath2(self.xMSF, "Template", "share", "/wizard") - self.UserTemplatePath = FileAccess.getOfficePath2(self.xMSF, "Template", "user", "") - self.sBitmapPath = FileAccess.combinePaths(self.xMSF, self.sTemplatePath, "/../wizard/bitmap") + self.sTemplatePath = FileAccess.getOfficePath2(self.xMSF, + "Template", "share", "/wizard") + self.UserTemplatePath = FileAccess.getOfficePath2(self.xMSF, + "Template", "user", "") + self.sBitmapPath = FileAccess.combinePaths(self.xMSF, + self.sTemplatePath, "/../wizard/bitmap") except NoValidPathException, e: traceback.print_exc() def initializeTemplates(self, xMSF): try: - self.sFaxPath = FileAccess.combinePaths(xMSF,self.sTemplatePath, "/wizard/fax") + self.sFaxPath = FileAccess.combinePaths(xMSF, self.sTemplatePath, + "/wizard/fax") self.sWorkPath = FileAccess.getOfficePath2(xMSF, "Work", "", "") - self.BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", self.sFaxPath) - self.PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", self.sFaxPath) - self.setControlProperty("lstBusinessStyle", "StringItemList", tuple(self.BusinessFiles[0])) - self.setControlProperty("lstPrivateStyle", "StringItemList", tuple(self.PrivateFiles[0])) + self.BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", + self.sFaxPath) + self.PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", + self.sFaxPath) + self.setControlProperty("lstBusinessStyle", "StringItemList", + tuple(self.BusinessFiles[0])) + self.setControlProperty("lstPrivateStyle", "StringItemList", + tuple(self.PrivateFiles[0])) self.setControlProperty("lstBusinessStyle", "SelectedItems", [0]) self.setControlProperty("lstPrivateStyle", "SelectedItems" , [0]) return True @@ -258,69 +304,119 @@ class FaxWizardDialogImpl(FaxWizardDialog): return False def initializeElements(self): - self.setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, self.myFaxDoc.hasElement("Company Logo")) - self.setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED,self.myFaxDoc.hasElement("Subject Line")) - self.setControlProperty("chkUseDate", PropertyNames.PROPERTY_ENABLED,self.myFaxDoc.hasElement("Date")) + self.setControlProperty("chkUseLogo", + PropertyNames.PROPERTY_ENABLED, + self.myFaxDoc.hasElement("Company Logo")) + self.setControlProperty("chkUseSubject", + PropertyNames.PROPERTY_ENABLED, + self.myFaxDoc.hasElement("Subject Line")) + self.setControlProperty("chkUseDate", + PropertyNames.PROPERTY_ENABLED, + self.myFaxDoc.hasElement("Date")) self.myFaxDoc.updateDateFields() def initializeSalutation(self): - self.setControlProperty("lstSalutation", "StringItemList", self.resources.SalutationLabels) + self.setControlProperty("lstSalutation", "StringItemList", + self.resources.SalutationLabels) def initializeGreeting(self): - self.setControlProperty("lstGreeting", "StringItemList", self.resources.GreetingLabels) + self.setControlProperty("lstGreeting", "StringItemList", + self.resources.GreetingLabels) def initializeCommunication(self): - self.setControlProperty("lstCommunicationType", "StringItemList", self.resources.CommunicationLabels) + self.setControlProperty("lstCommunicationType", "StringItemList", + self.resources.CommunicationLabels) def __setDefaultForGreetingAndSalutationAndCommunication(self): - if self.lstSalutation.getText() == "": + if self.lstSalutation.Text == "": self.lstSalutation.setText(self.resources.SalutationLabels[0]) - if self.lstGreeting.getText() == "": + if self.lstGreeting.Text == "": self.lstGreeting.setText(self.resources.GreetingLabels[0]) - if self.lstCommunicationType.getText() == "": - self.lstCommunicationType.setText(self.resources.CommunicationLabels[0]) + if self.lstCommunicationType.Text == "": + self.lstCommunicationType.setText( \ + self.resources.CommunicationLabels[0]) def initConfiguration(self): try: self.myConfig = CGFaxWizard() - root = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.Office.Writer/Wizards/Fax", False) + root = Configuration.getConfigurationRoot(self.xMSF, + "/org.openoffice.Office.Writer/Wizards/Fax", False) self.myConfig.readConfiguration(root, "cp_") - self.mainDA.append(RadioDataAware.attachRadioButtons(self.myConfig, "cp_FaxType", (self.optBusinessFax, self.optPrivateFax), None, True)) - self.mainDA.append(UnoDataAware.attachListBox(self.myConfig.cp_BusinessFax, "cp_Style", self.lstBusinessStyle, None, True)) - self.mainDA.append(UnoDataAware.attachListBox(self.myConfig.cp_PrivateFax, "cp_Style", self.lstPrivateStyle, None, True)) + self.mainDA.append(RadioDataAware.attachRadioButtons( + self.myConfig, "cp_FaxType", + (self.optBusinessFax, self.optPrivateFax), None, True)) + self.mainDA.append(UnoDataAware.attachListBox( + self.myConfig.cp_BusinessFax, "cp_Style", + self.lstBusinessStyle, None, True)) + self.mainDA.append(UnoDataAware.attachListBox( + self.myConfig.cp_PrivateFax, "cp_Style", self.lstPrivateStyle, + None, True)) cgl = self.myConfig.cp_BusinessFax - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintCompanyLogo", self.chkUseLogo, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintSubjectLine", self.chkUseSubject, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintSalutation", self.chkUseSalutation, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintDate", self.chkUseDate, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintCommunicationType", self.chkUseCommunicationType, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintGreeting", self.chkUseGreeting, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintFooter", self.chkUseFooter, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_Salutation", self.lstSalutation, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_Greeting", self.lstGreeting, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_CommunicationType", self.lstCommunicationType, None, True)) - self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_SenderAddressType", (self.optSenderDefine, self.optSenderPlaceholder), None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderCompanyName", self.txtSenderName, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderStreet", self.txtSenderStreet, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderPostCode", self.txtSenderPostCode, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderState", self.txtSenderState, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderCity", self.txtSenderCity, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderFax", self.txtSenderFax, None, True)) - self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_ReceiverAddressType", (self.optReceiverDatabase, self.optReceiverPlaceholder), None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_Footer", self.txtFooter, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_FooterOnlySecondPage", self.chkFooterNextPages, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_FooterPageNumbers", self.chkFooterPageNumbers, None, True)) - self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_CreationType", (self.optCreateFax, self.optMakeChanges), None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_TemplateName", self.txtTemplateName, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_TemplatePath", self.myPathSelection.xSaveTextBox, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_PrintCompanyLogo", self.chkUseLogo, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_PrintSubjectLine", self.chkUseSubject, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_PrintSalutation", self.chkUseSalutation, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_PrintDate", self.chkUseDate, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_PrintCommunicationType", self.chkUseCommunicationType, + None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_PrintGreeting", self.chkUseGreeting, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_PrintFooter", self.chkUseFooter, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_Salutation", self.lstSalutation, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_Greeting", self.lstGreeting, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_CommunicationType", self.lstCommunicationType, + None, True)) + self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, + "cp_SenderAddressType", (self.optSenderDefine, \ + self.optSenderPlaceholder), None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_SenderCompanyName", self.txtSenderName, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_SenderStreet", self.txtSenderStreet, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_SenderPostCode", self.txtSenderPostCode, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_SenderState", self.txtSenderState, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_SenderCity", self.txtSenderCity, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_SenderFax", self.txtSenderFax, None, True)) + self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, + "cp_ReceiverAddressType", (self.optReceiverDatabase, + self.optReceiverPlaceholder), None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_Footer", self.txtFooter, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_FooterOnlySecondPage", self.chkFooterNextPages, + None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_FooterPageNumbers", self.chkFooterPageNumbers, + None, True)) + self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, + "cp_CreationType", (self.optCreateFax, self.optMakeChanges), + None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_TemplateName", self.txtTemplateName, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_TemplatePath", self.myPathSelection.xSaveTextBox, + None, True)) except UnoException, exception: traceback.print_exc() def saveConfiguration(self): try: - root = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.Office.Writer/Wizards/Fax", True) + root = Configuration.getConfigurationRoot(xMSF, + "/org.openoffice.Office.Writer/Wizards/Fax", True) self.myConfig.writeConfiguration(root, "cp_") Configuration.commit(root) except UnoException, e: @@ -328,68 +424,102 @@ class FaxWizardDialogImpl(FaxWizardDialog): def setConfiguration(self): #set correct Configuration tree: - if self.optBusinessFax.getState(): + if self.optBusinessFax.State: self.optBusinessFaxItemChanged() - if self.optPrivateFax.getState(): + if self.optPrivateFax.State: self.optPrivateFaxItemChanged() def optBusinessFaxItemChanged(self): - DataAware.setDataObjects(self.faxDA, self.myConfig.cp_BusinessFax, True) - self.setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + DataAware.setDataObjects(self.faxDA, + self.myConfig.cp_BusinessFax, True) + self.setControlProperty("lblBusinessStyle", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lstBusinessStyle", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblPrivateStyle", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lstPrivateStyle", + PropertyNames.PROPERTY_ENABLED, False) self.lstBusinessStyleItemChanged() self.__enableSenderReceiver() self.__setPossibleFooter(True) def lstBusinessStyleItemChanged(self): - self.xTextDocument = self.myFaxDoc.loadAsPreview(self.BusinessFiles[1][self.lstBusinessStyle.getSelectedItemPos()], False) + self.xTextDocument = self.myFaxDoc.loadAsPreview( \ + self.BusinessFiles[1][self.lstBusinessStyle.getSelectedItemPos()], + False) self.initializeElements() self.setElements() def optPrivateFaxItemChanged(self): - DataAware.setDataObjects(self.faxDA, self.myConfig.cp_PrivateFax, True) - self.setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) + DataAware.setDataObjects(self.faxDA, + self.myConfig.cp_PrivateFax, True) + self.setControlProperty("lblBusinessStyle", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lstBusinessStyle", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblPrivateStyle", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lstPrivateStyle", + PropertyNames.PROPERTY_ENABLED, True) self.lstPrivateStyleItemChanged() self.__disableSenderReceiver() self.__setPossibleFooter(False) def lstPrivateStyleItemChanged(self): - self.xTextDocument = self.myFaxDoc.loadAsPreview(self.PrivateFiles[1][self.lstPrivateStyle.getSelectedItemPos()], False) + self.xTextDocument = self.myFaxDoc.loadAsPreview( \ + self.PrivateFiles[1][self.lstPrivateStyle.getSelectedItemPos()], + False) self.initializeElements() self.setElements() def txtTemplateNameTextChanged(self): xDocProps = self.xTextDocument.getDocumentProperties() - xDocProps.Title = self.txtTemplateName.getText() + xDocProps.Title = self.txtTemplateName.Text def optSenderPlaceholderItemChanged(self): - self.setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblSenderFax", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderFax", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblSenderName", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblSenderStreet", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblPostCodeCity", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblSenderFax", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderName", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderStreet", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderPostCode", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderState", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderCity", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderFax", + PropertyNames.PROPERTY_ENABLED, False) self.myFaxDoc.fillSenderWithUserData() def optSenderDefineItemChanged(self): - self.setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblSenderFax", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderFax", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblSenderName", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblSenderStreet", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblPostCodeCity", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblSenderFax", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderName", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderStreet", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderPostCode", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderState", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderCity", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderFax", + PropertyNames.PROPERTY_ENABLED, True) self.txtSenderNameTextChanged() self.txtSenderStreetTextChanged() self.txtSenderPostCodeTextChanged() @@ -398,10 +528,12 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.txtSenderFaxTextChanged() def optReceiverPlaceholderItemChanged(self): - OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", "StarBasic", "macro:#/Template.Correspondence.Placeholder()") + OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", + "StarBasic", "macro:#/Template.Correspondence.Placeholder()") def optReceiverDatabaseItemChanged(self): - OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", "StarBasic", "macro:#/Template.Correspondence.Database()") + OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", + "StarBasic", "macro:#/Template.Correspondence.Database()") def optCreateFaxItemChanged(self): self.bEditTemplate = False @@ -410,37 +542,48 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.bEditTemplate = True def txtSenderNameTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("Company", self.txtSenderName.getText()) + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, + self.xTextDocument) + myFieldHandler.changeUserFieldContent("Company", + self.txtSenderName.Text) def txtSenderStreetTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("Street", self.txtSenderStreet.getText()) + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, + self.xTextDocument) + myFieldHandler.changeUserFieldContent("Street", + self.txtSenderStreet.Text) def txtSenderCityTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("City", self.txtSenderCity.getText()) + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, + self.xTextDocument) + myFieldHandler.changeUserFieldContent("City", + self.txtSenderCity.Text) def txtSenderPostCodeTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("PostCode", self.txtSenderPostCode.getText()) + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, + self.xTextDocument) + myFieldHandler.changeUserFieldContent("PostCode", + self.txtSenderPostCode.Text) def txtSenderStateTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, self.txtSenderState.getText()) + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, + self.xTextDocument) + myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, + self.txtSenderState.Text) def txtSenderFaxTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("Fax", self.txtSenderFax.getText()) + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, + self.xTextDocument) + myFieldHandler.changeUserFieldContent("Fax", self.txtSenderFax.Text) - #switch Elements on/off ------------------------------------------------------- + #switch Elements on/off -------------------------------------------------- def setElements(self): #UI relevant: - if self.optSenderDefine.getState(): + if self.optSenderDefine.State: self.optSenderDefineItemChanged() - if self.optSenderPlaceholder.getState(): + if self.optSenderPlaceholder.State: self.optSenderPlaceholderItemChanged() self.chkUseLogoItemChanged() @@ -452,43 +595,58 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.chkUseFooterItemChanged() self.txtTemplateNameTextChanged() #not UI relevant: - if self.optReceiverDatabase.getState(): + if self.optReceiverDatabase.State: self.optReceiverDatabaseItemChanged() - if self.optReceiverPlaceholder.getState(): + if self.optReceiverPlaceholder.State: self.optReceiverPlaceholderItemChanged() - if self.optCreateFax.getState(): + if self.optCreateFax.State: self.optCreateFaxItemChanged() - if self.optMakeChanges.getState(): + if self.optMakeChanges.State: self.optMakeChangesItemChanged() def chkUseLogoItemChanged(self): if self.myFaxDoc.hasElement("Company Logo"): - self.myFaxDoc.switchElement("Company Logo", (self.chkUseLogo.getState() != 0)) + self.myFaxDoc.switchElement("Company Logo", + (self.chkUseLogo.State is not 0)) def chkUseSubjectItemChanged(self): if self.myFaxDoc.hasElement("Subject Line"): - self.myFaxDoc.switchElement("Subject Line", (self.chkUseSubject.getState() != 0)) + self.myFaxDoc.switchElement("Subject Line", + (self.chkUseSubject.State is not 0)) def chkUseDateItemChanged(self): if self.myFaxDoc.hasElement("Date"): - self.myFaxDoc.switchElement("Date", (self.chkUseDate.getState() != 0)) + self.myFaxDoc.switchElement("Date", + (self.chkUseDate.State is not 0)) def chkUseFooterItemChanged(self): try: - bFooterPossible = (self.chkUseFooter.getState() != 0) and bool(getControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED)) - if self.chkFooterNextPages.getState() != 0: - self.myFaxDoc.switchFooter("First Page", False, (self.chkFooterPageNumbers.getState() != 0), self.txtFooter.getText()) - self.myFaxDoc.switchFooter("Standard", bFooterPossible, (self.chkFooterPageNumbers.getState() != 0), self.txtFooter.getText()) + bFooterPossible = (self.chkUseFooter.State is not 0) \ + and bool(getControlProperty("chkUseFooter", + PropertyNames.PROPERTY_ENABLED)) + if self.chkFooterNextPages.State is not 0: + self.myFaxDoc.switchFooter("First Page", False, + (self.chkFooterPageNumbers.State is not 0), + self.txtFooter.Text) + self.myFaxDoc.switchFooter("Standard", bFooterPossible, + (self.chkFooterPageNumbers.State is not 0), + self.txtFooter.Text) else: - self.myFaxDoc.switchFooter("First Page", bFooterPossible, (self.chkFooterPageNumbers.getState() != 0), self.txtFooter.getText()) - self.myFaxDoc.switchFooter("Standard", bFooterPossible, (self.chkFooterPageNumbers.getState() != 0), self.txtFooter.getText()) + self.myFaxDoc.switchFooter("First Page", bFooterPossible, + (self.chkFooterPageNumbers.State is not 0), + self.txtFooter.Text) + self.myFaxDoc.switchFooter("Standard", bFooterPossible, + (self.chkFooterPageNumbers.State is not 0), + self.txtFooter.Text) #enable/disable roadmap item for footer page - BPaperItem = self.getRoadmapItemByID(FaxWizardDialogImpl.RM_FOOTER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, bFooterPossible) + BPaperItem = self.getRoadmapItemByID( \ + FaxWizardDialogImpl.RM_FOOTER) + Helper.setUnoPropertyValue(BPaperItem, + PropertyNames.PROPERTY_ENABLED, bFooterPossible) except UnoException, exception: traceback.print_exc() @@ -502,38 +660,57 @@ class FaxWizardDialogImpl(FaxWizardDialog): chkUseFooterItemChanged() def chkUseSalutationItemChanged(self): - self.myFaxDoc.switchUserField("Salutation", self.lstSalutation.getText(), (self.chkUseSalutation.getState() != 0)) - self.setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, self.chkUseSalutation.getState() != 0) + self.myFaxDoc.switchUserField("Salutation", + self.lstSalutation.Text, (self.chkUseSalutation.State is not 0)) + self.setControlProperty("lstSalutation", + PropertyNames.PROPERTY_ENABLED, + self.chkUseSalutation.State is not 0) def lstSalutationItemChanged(self): - self.myFaxDoc.switchUserField("Salutation", self.lstSalutation.getText(), (self.chkUseSalutation.getState() != 0)) + self.myFaxDoc.switchUserField("Salutation", + self.lstSalutation.Text, (self.chkUseSalutation.State is not 0)) def chkUseCommunicationItemChanged(self): - self.myFaxDoc.switchUserField("CommunicationType", self.lstCommunicationType.getText(), (self.chkUseCommunicationType.getState() != 0)) - self.setControlProperty("lstCommunicationType", PropertyNames.PROPERTY_ENABLED, self.chkUseCommunicationType.getState() != 0) + self.myFaxDoc.switchUserField("CommunicationType", + self.lstCommunicationType.Text, + (self.chkUseCommunicationType.State is not 0)) + self.setControlProperty("lstCommunicationType", + PropertyNames.PROPERTY_ENABLED, + self.chkUseCommunicationType.State is not 0) def lstCommunicationItemChanged(self): - self.myFaxDoc.switchUserField("CommunicationType", self.lstCommunicationType.getText(), (self.chkUseCommunicationType.getState() != 0)) + self.myFaxDoc.switchUserField("CommunicationType", + self.lstCommunicationType.Text, + (self.chkUseCommunicationType.State is not 0)) def chkUseGreetingItemChanged(self): - self.myFaxDoc.switchUserField("Greeting", self.lstGreeting.getText(), (self.chkUseGreeting.getState() != 0)) - self.setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, (self.chkUseGreeting.getState() != 0)) + self.myFaxDoc.switchUserField("Greeting", + self.lstGreeting.Text, (self.chkUseGreeting.State is not 0)) + self.setControlProperty("lstGreeting", + PropertyNames.PROPERTY_ENABLED, + (self.chkUseGreeting.State is not 0)) def lstGreetingItemChanged(self): - self.myFaxDoc.switchUserField("Greeting", self.lstGreeting.getText(), (self.chkUseGreeting.getState() != 0)) + self.myFaxDoc.switchUserField("Greeting", self.lstGreeting.Text, + (self.chkUseGreeting.State is not 0)) def __setPossibleFooter(self, bState): - self.setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty("chkUseFooter", + PropertyNames.PROPERTY_ENABLED, bState) if not bState: - self.chkUseFooter.setState(0) + self.chkUseFooter.State = 0 self.chkUseFooterItemChanged() def __enableSenderReceiver(self): - BPaperItem = self.getRoadmapItemByID(FaxWizardDialogImpl.RM_SENDERRECEIVER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, True) + BPaperItem = self.getRoadmapItemByID( \ + FaxWizardDialogImpl.RM_SENDERRECEIVER) + Helper.setUnoPropertyValue(BPaperItem, + PropertyNames.PROPERTY_ENABLED, True) def __disableSenderReceiver(self): - BPaperItem = self.getRoadmapItemByID(FaxWizardDialogImpl.RM_SENDERRECEIVER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, False) + BPaperItem = self.getRoadmapItemByID( \ + FaxWizardDialogImpl.RM_SENDERRECEIVER) + Helper.setUnoPropertyValue(BPaperItem, + PropertyNames.PROPERTY_ENABLED, False) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py index dcb474ed6..864112fed 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py @@ -12,7 +12,8 @@ class FaxWizardDialogResources(Resource): def __init__(self, xmsf): - super(FaxWizardDialogResources,self).__init__(xmsf, FaxWizardDialogResources.MODULE_NAME) + super(FaxWizardDialogResources,self).__init__(xmsf, + FaxWizardDialogResources.MODULE_NAME) self.RoadmapLabels = () self.SalutationLabels = () self.GreetingLabels = () @@ -21,46 +22,86 @@ class FaxWizardDialogResources(Resource): #Delete the String, uncomment the self.getResText method - self.resFaxWizardDialog_title = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 1) - self.resLabel9_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 2) - self.resoptBusinessFax_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 3) - self.resoptPrivateFax_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 4) - self.reschkUseLogo_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 5) - self.reschkUseSubject_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 6) - self.reschkUseSalutation_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 7) - self.reschkUseGreeting_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 8) - self.reschkUseFooter_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 9) - self.resoptSenderPlaceholder_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 10) - self.resoptSenderDefine_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 11) - self.restxtTemplateName_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 12) - self.resoptCreateFax_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 13) - self.resoptMakeChanges_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 14) - self.reslblBusinessStyle_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 15) - self.reslblPrivateStyle_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 16) - self.reslblIntroduction_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 17) - self.reslblSenderAddress_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 18) - self.reslblSenderName_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 19) - self.reslblSenderStreet_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 20) - self.reslblPostCodeCity_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 21) - self.reslblFooter_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 22) - self.reslblFinalExplanation1_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 23) - self.reslblFinalExplanation2_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 24) - self.reslblTemplateName_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 25) - self.reslblTemplatePath_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 26) - self.reslblProceed_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 27) - self.reslblTitle1_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 28) - self.reslblTitle3_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 29) - self.reslblTitle4_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 30) - self.reslblTitle5_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 31) - self.reslblTitle6_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 32) - self.reschkFooterNextPages_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 33) - self.reschkFooterPageNumbers_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 34) - self.reschkUseDate_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 35) - self.reschkUseCommunicationType_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 36) - self.resLabel1_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 37) - self.resoptReceiverPlaceholder_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 38) - self.resoptReceiverDatabase_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 39) - self.resLabel2_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 40) + self.resFaxWizardDialog_title = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 1) + self.resLabel9_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 2) + self.resoptBusinessFax_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 3) + self.resoptPrivateFax_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 4) + self.reschkUseLogo_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 5) + self.reschkUseSubject_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 6) + self.reschkUseSalutation_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 7) + self.reschkUseGreeting_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 8) + self.reschkUseFooter_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 9) + self.resoptSenderPlaceholder_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 10) + self.resoptSenderDefine_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 11) + self.restxtTemplateName_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 12) + self.resoptCreateFax_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 13) + self.resoptMakeChanges_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 14) + self.reslblBusinessStyle_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 15) + self.reslblPrivateStyle_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 16) + self.reslblIntroduction_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 17) + self.reslblSenderAddress_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 18) + self.reslblSenderName_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 19) + self.reslblSenderStreet_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 20) + self.reslblPostCodeCity_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 21) + self.reslblFooter_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 22) + self.reslblFinalExplanation1_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 23) + self.reslblFinalExplanation2_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 24) + self.reslblTemplateName_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 25) + self.reslblTemplatePath_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 26) + self.reslblProceed_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 27) + self.reslblTitle1_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 28) + self.reslblTitle3_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 29) + self.reslblTitle4_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 30) + self.reslblTitle5_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 31) + self.reslblTitle6_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 32) + self.reschkFooterNextPages_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 33) + self.reschkFooterPageNumbers_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 34) + self.reschkUseDate_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 35) + self.reschkUseCommunicationType_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 36) + self.resLabel1_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 37) + self.resoptReceiverPlaceholder_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 38) + self.resoptReceiverDatabase_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 39) + self.resLabel2_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 40) self.loadRoadmapResources() self.loadSalutationResources() self.loadGreetingResources() @@ -68,29 +109,33 @@ class FaxWizardDialogResources(Resource): self.loadCommonResources() def loadCommonResources(self): - self.resOverwriteWarning = self.getResText(FaxWizardDialogResources.RID_RID_COMMON_START + 19) - self.resTemplateDescription = self.getResText(FaxWizardDialogResources.RID_RID_COMMON_START + 20) + self.resOverwriteWarning = self.getResText( + FaxWizardDialogResources.RID_RID_COMMON_START + 19) + self.resTemplateDescription = self.getResText( + FaxWizardDialogResources.RID_RID_COMMON_START + 20) def loadRoadmapResources(self): - i = 1 - while i < 6: - self.RoadmapLabels = self.RoadmapLabels + ((self.getResText(FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + i)),) - i += 1 + for i in xrange(5): + self.RoadmapLabels = self.RoadmapLabels + ((self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + \ + + i + 1)),) def loadSalutationResources(self): i = 1 - while i < 5: - self.SalutationLabels = self.SalutationLabels + ((self.getResText(FaxWizardDialogResources.RID_FAXWIZARDSALUTATION_START + i)),) - i += 1 + for i in xrange(4): + self.SalutationLabels = self.SalutationLabels + ((self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDSALUTATION_START + \ + i + 1)),) def loadGreetingResources(self): - i = 1 - while i < 5: - self.GreetingLabels = self.GreetingLabels + ((self.getResText(FaxWizardDialogResources.RID_FAXWIZARDGREETING_START + i)),) - i += 1 + for i in xrange(4): + self.GreetingLabels = self.GreetingLabels + ((self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDGREETING_START + \ + i +1 )),) def loadCommunicationResources(self): - i = 1 - while i < 4: - self.CommunicationLabels = self.CommunicationLabels+ ((self.getResText(FaxWizardDialogResources.RID_FAXWIZARDCOMMUNICATION_START + i)),) - i += 1 + for i in xrange(3): + self.CommunicationLabels = \ + self.CommunicationLabels + ((self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDCOMMUNICATION_START + \ + i + 1)),) diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index 93351c6c0..fed93fccb 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -24,38 +24,46 @@ class TextDocument(object): if listener is not None: if FrameName is not None: - '''creates an instance of TextDocument and creates a named frame. + '''creates an instance of TextDocument + and creates a named frame. No document is actually loaded into this frame.''' - self.xFrame = OfficeDocument.createNewFrame(xMSF, listener, FrameName); + self.xFrame = OfficeDocument.createNewFrame( + xMSF, listener, FrameName) return elif _sPreviewURL is not None: - '''creates an instance of TextDocument by loading a given URL as preview''' + '''creates an instance of TextDocument by + loading a given URL as preview''' self.xFrame = OfficeDocument.createNewFrame(xMSF, listener) self.xTextDocument = self.loadAsPreview(_sPreviewURL, True) elif xArgs is not None: - '''creates an instance of TextDocument and creates a frame and loads a document''' + '''creates an instance of TextDocument + and creates a frame and loads a document''' self.xDesktop = Desktop.getDesktop(xMSF); - self.xFrame = OfficeDocument.createNewFrame(xMSF, listener); - self.xTextDocument = OfficeDocument.load(xFrame, URL, "_self", xArgs); + self.xFrame = OfficeDocument.createNewFrame(xMSF, listener) + self.xTextDocument = OfficeDocument.load( + xFrame, URL, "_self", xArgs); self.xWindowPeer = xFrame.getComponentWindow() - self.m_xDocProps = self.xTextDocument.getDocumentProperties(); - CharLocale = Helper.getUnoStructValue( self.xTextDocument, "CharLocale"); + self.m_xDocProps = self.xTextDocument.DocumentProperties + CharLocale = Helper.getUnoStructValue( + self.xTextDocument, "CharLocale"); return else: - '''creates an instance of TextDocument from the desktop's current frame''' + '''creates an instance of TextDocument from + the desktop's current frame''' self.xDesktop = Desktop.getDesktop(xMSF); self.xFrame = self.xDesktop.getActiveFrame() - self.xTextDocument = self.xFrame.getController().getModel() + self.xTextDocument = self.xFrame.getController().Model elif _moduleIdentifier is not None: try: '''create the empty document, and set its module identifier''' - self.xTextDocument = xMSF.createInstance("com.sun.star.text.TextDocument") + self.xTextDocument = xMSF.createInstance( + "com.sun.star.text.TextDocument") self.xTextDocument.initNew() - self.xTextDocument.setIdentifier(_moduleIdentifier.getIdentifier()) + self.xTextDocument.setIdentifier(_moduleIdentifier.Identifier) # load the document into a blank frame xDesktop = Desktop.getDesktop(xMSF) loadArgs = range(1) @@ -63,15 +71,17 @@ class TextDocument(object): loadArgs[0] = -1 loadArgs[0] = self.xTextDocument loadArgs[0] = DIRECT_VALUE - xDesktop.loadComponentFromURL("private:object", "_blank", 0, loadArgs) + xDesktop.loadComponentFromURL( + "private:object", "_blank", 0, loadArgs) # remember some things for later usage - self.xFrame = self.xTextDocument.getCurrentController().getFrame() + self.xFrame = self.xTextDocument.CurrentController.Frame except Exception, e: traceback.print_exc() elif _textDocument is not None: - '''creates an instance of TextDocument from a given XTextDocument''' - self.xFrame = _textDocument.getCurrentController().getFrame() + '''creates an instance of TextDocument + from a given XTextDocument''' + self.xFrame = _textDocument.CurrentController.Frame self.xTextDocument = _textDocument if bShowStatusIndicator: self.showStatusIndicator() @@ -80,8 +90,9 @@ class TextDocument(object): def init(self): self.xWindowPeer = self.xFrame.getComponentWindow() self.m_xDocProps = self.xTextDocument.getDocumentProperties() - self.CharLocale = Helper.getUnoStructValue(self.xTextDocument, "CharLocale") - self.xText = self.xTextDocument.getText() + self.CharLocale = Helper.getUnoStructValue( + self.xTextDocument, "CharLocale") + self.xText = self.xTextDocument.Text def showStatusIndicator(self): self.xProgressBar = self.xFrame.createStatusIndicator() @@ -91,30 +102,36 @@ class TextDocument(object): def loadAsPreview(self, sDefaultTemplate, asTemplate): loadValues = range(3) # open document in the Preview mode - loadValues[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[0] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') loadValues[0].Name = "ReadOnly" loadValues[0].Value = True - loadValues[1] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[1] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') loadValues[1].Name = "AsTemplate" if asTemplate: loadValues[1].Value = True else: loadValues[1].Value = False - loadValues[2] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[2] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') loadValues[2].Name = "Preview" loadValues[2].Value = True - #set the preview document to non-modified mode in order to avoid the 'do u want to save' box + '''set the preview document to non-modified + mode in order to avoid the 'do u want to save' box''' if self.xTextDocument is not None: try: self.xTextDocument.setModified(False) except PropertyVetoException, e1: traceback.print_exc() - self.xTextDocument = OfficeDocument.load(self.xFrame, sDefaultTemplate, "_self", loadValues) + self.xTextDocument = OfficeDocument.load( + self.xFrame, sDefaultTemplate, "_self", loadValues) self.DocSize = self.getPageSize() myViewHandler = ViewHandler(self.xTextDocument, self.xTextDocument) try: - myViewHandler.setViewSetting("ZoomType", uno.Any("short",ENTIRE_PAGE)) + myViewHandler.setViewSetting( + "ZoomType", uno.Any("short",ENTIRE_PAGE)) except Exception, e: traceback.print_exc() myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) @@ -131,7 +148,8 @@ class TextDocument(object): traceback.print_exc() return None - #creates an instance of TextDocument and creates a frame and loads a document + '''creates an instance of TextDocument and creates a + frame and loads a document''' def createTextCursor(self, oCursorContainer): xTextCursor = oCursorContainer.createTextCursor() @@ -147,11 +165,12 @@ class TextDocument(object): iScale = 200 self.xTextDocument.lockControllers() iScaleLen = ScaleString.length() - xTextCursor = createTextCursor(self.xTextDocument.getText()) + xTextCursor = createTextCursor(self.xTextDocument.Text) xTextCursor.gotoStart(False) - com.sun.star.wizards.common.Helper.setUnoPropertyValue(xTextCursor, "PageDescName", "First Page") + com.sun.star.wizards.common.Helper.setUnoPropertyValue( + xTextCursor, "PageDescName", "First Page") xTextCursor.setString(ScaleString) - xViewCursor = self.xTextDocument.getCurrentController() + xViewCursor = self.xTextDocument.CurrentController xTextViewCursor = xViewCursor.getViewCursor() xTextViewCursor.gotoStart(False) iFirstPos = xTextViewCursor.getPosition().X @@ -175,13 +194,15 @@ class TextDocument(object): This method sets the Author of a Wizard-generated template correctly and adds a explanatory sentence to the template description. @param WizardName The name of the Wizard. - @param TemplateDescription The old Description which is being appended with another sentence. + @param TemplateDescription The old Description which is being + appended with another sentence. @return void. ''' def setWizardTemplateDocInfo(self, WizardName, TemplateDescription): try: - xNA = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.UserProfile/Data", False) + xNA = Configuration.getConfigurationRoot( + self.xMSF, "/org.openoffice.UserProfile/Data", False) gn = xNA.getByName("givenname") sn = xNA.getByName("sn") fullname = str(gn) + " " + str(sn) @@ -198,8 +219,10 @@ class TextDocument(object): xDocProps2.setModifiedBy(fullname) description = xDocProps2.getDescription() description = description + " " + TemplateDescription - description = JavaTools.replaceSubString(description, WizardName, "") - description = JavaTools.replaceSubString(description, myDate, "") + description = JavaTools.replaceSubString( + description, WizardName, "") + description = JavaTools.replaceSubString( + description, myDate, "") xDocProps2.setDescription(description) except NoSuchElementException, e: # TODO Auto-generated catch block @@ -240,6 +263,7 @@ class TextDocument(object): return xPC.getPage() ''' - Possible Values for "OptionString" are: "LoadCellStyles", "LoadTextStyles", "LoadFrameStyles", + Possible Values for "OptionString" are: "LoadCellStyles", + "LoadTextStyles", "LoadFrameStyles", "LoadPageStyles", "LoadNumberingStyles", "OverwriteStyles" ''' diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.py b/wizards/com/sun/star/wizards/text/TextFieldHandler.py index c318de087..c49267429 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.py +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.py @@ -16,7 +16,7 @@ class TextFieldHandler(object): self.xTextFieldsSupplier = xTextDocument def refreshTextFields(self): - xUp = self.xTextFieldsSupplier.getTextFields() + xUp = self.xTextFieldsSupplier.TextFields xUp.refresh() def getUserFieldContent(self, xTextCursor): @@ -37,38 +37,46 @@ class TextFieldHandler(object): def insertUserField(self, xTextCursor, FieldName, FieldTitle): try: - xField = self.xMSFDoc.createInstance("com.sun.star.text.TextField.User") + xField = self.xMSFDoc.createInstance( + "com.sun.star.text.TextField.User") - if self.xTextFieldsSupplier.getTextFieldMasters().hasByName("com.sun.star.text.FieldMaster.User." + FieldName): + if self.xTextFieldsSupplier.getTextFieldMasters().hasByName( + "com.sun.star.text.FieldMaster.User." + FieldName): oMaster = self.xTextFieldsSupplier.getTextFieldMasters().getByName( \ "com.sun.star.text.FieldMaster.User." + FieldName) oMaster.dispose() xPSet = createUserField(FieldName, FieldTitle) xField.attachTextFieldMaster(xPSet) - xTextCursor.getText().insertTextContent(xTextCursor, xField, False) + xTextCursor.getText().insertTextContent( + xTextCursor, xField, False) except com.sun.star.uno.Exception, exception: traceback.print_exc() def createUserField(self, FieldName, FieldTitle): - xPSet = self.xMSFDoc.createInstance("com.sun.star.text.FieldMaster.User") + xPSet = self.xMSFDoc.createInstance( + "com.sun.star.text.FieldMaster.User") xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, FieldName) xPSet.setPropertyValue("Content", FieldTitle) return xPSet - def __getTextFieldsByProperty(self, _PropertyName, _aPropertyValue, _TypeName): + def __getTextFieldsByProperty( + self, _PropertyName, _aPropertyValue, _TypeName): try: - xDependentVector = [] - if self.xTextFieldsSupplier.getTextFields().hasElements(): - xEnum = self.xTextFieldsSupplier.getTextFields().createEnumeration() + if self.xTextFieldsSupplier.TextFields.hasElements(): + xEnum = \ + self.xTextFieldsSupplier.TextFields.createEnumeration() + xDependentVector = [] while xEnum.hasMoreElements(): oTextField = xEnum.nextElement() - xPropertySet = oTextField.getTextFieldMaster() - if xPropertySet.getPropertySetInfo().hasPropertyByName(_PropertyName): + xPropertySet = oTextField.TextFieldMaster + if xPropertySet.PropertySetInfo.hasPropertyByName( + _PropertyName): oValue = xPropertySet.getPropertyValue(_PropertyName) if isinstance(oValue,unicode): if _TypeName == "String": - sValue = unicodedata.normalize('NFKD', oValue).encode('ascii','ignore') + sValue = unicodedata.normalize( + 'NFKD', oValue).encode('ascii','ignore') if sValue == _aPropertyValue: xDependentVector.append(oTextField) #COMMENTED @@ -78,9 +86,10 @@ class TextFieldHandler(object): ishortValue = AnyConverter.toShort(oValue) if ishortValue == iShortParam: xDependentVector.append(oTextField) ''' - - if len(xDependentVector) > 0: - return xDependentVector + if xDependentVector: + return xDependentVector + else: + return None except Exception, e: #TODO Auto-generated catch block @@ -90,10 +99,12 @@ class TextFieldHandler(object): def changeUserFieldContent(self, _FieldName, _FieldContent): try: - xDependentTextFields = self.__getTextFieldsByProperty(PropertyNames.PROPERTY_NAME, _FieldName, "String") + xDependentTextFields = self.__getTextFieldsByProperty( + PropertyNames.PROPERTY_NAME, _FieldName, "String") if xDependentTextFields != None: for i in xDependentTextFields: - i.getTextFieldMaster().setPropertyValue("Content", _FieldContent) + i.getTextFieldMaster().setPropertyValue( + "Content", _FieldContent) self.refreshTextFields() except Exception, e: @@ -101,13 +112,15 @@ class TextFieldHandler(object): def updateDocInfoFields(self): try: - xEnum = self.xTextFieldsSupplier.getTextFields().createEnumeration() + xEnum = self.xTextFieldsSupplier.TextFields.createEnumeration() while xEnum.hasMoreElements(): oTextField = xEnum.nextElement() - if oTextField.supportsService("com.sun.star.text.TextField.ExtendedUser"): + if oTextField.supportsService( + "com.sun.star.text.TextField.ExtendedUser"): oTextField.update() - if oTextField.supportsService("com.sun.star.text.TextField.User"): + if oTextField.supportsService( + "com.sun.star.text.TextField.User"): oTextField.update() except Exception, e: @@ -115,7 +128,7 @@ class TextFieldHandler(object): def updateDateFields(self): try: - xEnum = self.xTextFieldsSupplier.getTextFields().createEnumeration() + xEnum = self.xTextFieldsSupplier.TextFields.createEnumeration() now = time.localtime(time.time()) dt = DateTime() dt.Day = time.strftime("%d", now) @@ -124,7 +137,8 @@ class TextFieldHandler(object): dt.Month += 1 while xEnum.hasMoreElements(): oTextField = xEnum.nextElement() - if oTextField.supportsService("com.sun.star.text.TextField.DateTime"): + if oTextField.supportsService( + "com.sun.star.text.TextField.DateTime"): oTextField.setPropertyValue("IsFixed", False) oTextField.setPropertyValue("DateTimeValue", dt) @@ -133,10 +147,11 @@ class TextFieldHandler(object): def fixDateFields(self, _bSetFixed): try: - xEnum = self.xTextFieldsSupplier.getTextFields().createEnumeration() + xEnum = self.xTextFieldsSupplier.TextFields.createEnumeration() while xEnum.hasMoreElements(): oTextField = xEnum.nextElement() - if oTextField.supportsService("com.sun.star.text.TextField.DateTime"): + if oTextField.supportsService( + "com.sun.star.text.TextField.DateTime"): oTextField.setPropertyValue("IsFixed", _bSetFixed) except Exception, e: @@ -144,7 +159,8 @@ class TextFieldHandler(object): def removeUserFieldByContent(self, _FieldContent): try: - xDependentTextFields = self.__getTextFieldsByProperty("Content", _FieldContent, "String") + xDependentTextFields = self.__getTextFieldsByProperty( + "Content", _FieldContent, "String") if xDependentTextFields != None: i = 0 while i < xDependentTextFields.length: @@ -156,11 +172,13 @@ class TextFieldHandler(object): def changeExtendedUserFieldContent(self, UserDataPart, _FieldContent): try: - xDependentTextFields = self.__getTextFieldsByProperty("UserDataType", uno.Any("short",UserDataPart), "Short") + xDependentTextFields = self.__getTextFieldsByProperty( + "UserDataType", uno.Any("short",UserDataPart), "Short") if xDependentTextFields != None: i = 0 while i < xDependentTextFields.length: - xDependentTextFields[i].getTextFieldMaster().setPropertyValue("Content", _FieldContent) + xDependentTextFields[i].getTextFieldMaster().setPropertyValue( + "Content", _FieldContent) i += 1 self.refreshTextFields() diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.py b/wizards/com/sun/star/wizards/text/TextSectionHandler.py index f1c40ea56..98a19ab4a 100644 --- a/wizards/com/sun/star/wizards/text/TextSectionHandler.py +++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.py @@ -5,26 +5,28 @@ class TextSectionHandler(object): def __init__(self, xMSF, xTextDocument): self.xMSFDoc = xMSF self.xTextDocument = xTextDocument - self.xText = xTextDocument.getText() + self.xText = xTextDocument.Text def removeTextSectionbyName(self, SectionName): try: - xAllTextSections = self.xTextDocument.getTextSections() + xAllTextSections = self.xTextDocument.TextSections if xAllTextSections.hasByName(SectionName) == True: - oTextSection = self.xTextDocument.getTextSections().getByName(SectionName) + oTextSection = self.xTextDocument.TextSections.getByName( + SectionName) removeTextSection(oTextSection) except Exception, exception: traceback.print_exc() def hasTextSectionByName(self, SectionName): - xAllTextSections = self.xTextDocument.getTextSections() + xAllTextSections = self.xTextDocument.TextSections return xAllTextSections.hasByName(SectionName) def removeLastTextSection(self): try: - xAllTextSections = self.xTextDocument.getTextSections() - oTextSection = xAllTextSections.getByIndex(xAllTextSections.getCount() - 1) + xAllTextSections = self.xTextDocument.TextSections + oTextSection = xAllTextSections.getByIndex( + xAllTextSections.getCount() - 1) removeTextSection(oTextSection) except Exception, exception: traceback.print_exc() @@ -37,13 +39,12 @@ class TextSectionHandler(object): def removeInvisibleTextSections(self): try: - xAllTextSections = self.xTextDocument.getTextSections() + xAllTextSections = self.xTextDocument.TextSections TextSectionCount = xAllTextSections.getCount() i = TextSectionCount - 1 while i >= 0: xTextContentTextSection = xAllTextSections.getByIndex(i) - bRemoveTextSection = (not AnyConverter.toBoolean(xTextContentTextSection.getPropertyValue("IsVisible"))) - if bRemoveTextSection: + if not bool(xTextContentTextSection.getPropertyValue("IsVisible")): self.xText.removeTextContent(xTextContentTextSection) i -= 1 @@ -52,7 +53,7 @@ class TextSectionHandler(object): def removeAllTextSections(self): try: - TextSectionCount = self.xTextDocument.getTextSections().getCount() + TextSectionCount = self.xTextDocument.TextSections.getCount() i = TextSectionCount - 1 while i >= 0: xTextContentTextSection = xAllTextSections.getByIndex(i) @@ -63,13 +64,15 @@ class TextSectionHandler(object): def breakLinkofTextSections(self): try: - iSectionCount = self.xTextDocument.getTextSections().getCount() + iSectionCount = self.xTextDocument.TextSections.getCount() oSectionLink = SectionFileLink.SectionFileLink() oSectionLink.FileURL = "" i = 0 while i < iSectionCount: oTextSection = xAllTextSections.getByIndex(i) - Helper.setUnoPropertyValues(oTextSection, ["FileLink", "LinkRegion"], [oSectionLink, ""]) + Helper.setUnoPropertyValues( + oTextSection, ["FileLink", "LinkRegion"], + [oSectionLink, ""]) i += 1 except Exception, exception: traceback.print_exc() @@ -77,11 +80,13 @@ class TextSectionHandler(object): def breakLinkOfTextSection(self, oTextSection): oSectionLink = SectionFileLink.SectionFileLink() oSectionLink.FileURL = "" - Helper.setUnoPropertyValues(oTextSection, ["FileLink", "LinkRegion"],[oSectionLink, ""]) + Helper.setUnoPropertyValues( + oTextSection, ["FileLink", "LinkRegion"],[oSectionLink, ""]) def linkSectiontoTemplate(self, TemplateName, SectionName): try: - oTextSection = self.xTextDocument.getTextSections().getByName(SectionName) + oTextSection = self.xTextDocument.TextSections.getByName( + SectionName) linkSectiontoTemplate(oTextSection, TemplateName, SectionName) except Exception, e: traceback.print_exc() @@ -89,7 +94,9 @@ class TextSectionHandler(object): def linkSectiontoTemplate(self, oTextSection, TemplateName, SectionName): oSectionLink = SectionFileLink.SectionFileLink() oSectionLink.FileURL = TemplateName - Helper.setUnoPropertyValues(oTextSection, ["FileLink", "LinkRegion"],[oSectionLink, SectionName]) + Helper.setUnoPropertyValues( + oTextSection, ["FileLink", "LinkRegion"], + [oSectionLink, SectionName]) NewSectionName = oTextSection.getName() if NewSectionName.compareTo(SectionName) != 0: oTextSection.setName(SectionName) @@ -98,7 +105,8 @@ class TextSectionHandler(object): try: if _bAddParagraph: xTextCursor = self.xText.createTextCursor() - self.xText.insertControlCharacter(xTextCursor, ControlCharacter.PARAGRAPH_BREAK, False) + self.xText.insertControlCharacter( + xTextCursor, ControlCharacter.PARAGRAPH_BREAK, False) xTextCursor.collapseToEnd() xSecondTextCursor = self.xText.createTextCursor() @@ -109,11 +117,14 @@ class TextSectionHandler(object): def insertTextSection(self, sectionName, templateName, position): try: - if self.xTextDocument.getTextSections().hasByName(sectionName) == True: - xTextSection = self.xTextDocument.getTextSections().getByName(sectionName) + if self.xTextDocument.TextSections.hasByName(sectionName): + xTextSection = \ + self.xTextDocument.TextSections.getByName(sectionName) else: - xTextSection = self.xMSFDoc.createInstance("com.sun.star.text.TextSection") - position.getText().insertTextContent(position, xTextSection, False) + xTextSection = self.xMSFDoc.createInstance( + "com.sun.star.text.TextSection") + position.getText().insertTextContent( + position, xTextSection, False) linkSectiontoTemplate(xTextSection, templateName, sectionName) except Exception, exception: diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.py b/wizards/com/sun/star/wizards/text/ViewHandler.py index 73462f871..9a646da05 100644 --- a/wizards/com/sun/star/wizards/text/ViewHandler.py +++ b/wizards/com/sun/star/wizards/text/ViewHandler.py @@ -6,17 +6,19 @@ class ViewHandler(object): def __init__ (self, xMSF, xTextDocument): self.xMSFDoc = xMSF self.xTextDocument = xTextDocument - self.xTextViewCursorSupplier = self.xTextDocument.getCurrentController() + self.xTextViewCursorSupplier = self.xTextDocument.CurrentController def selectFirstPage(self, oTextTableHandler): try: - xPageCursor = self.xTextViewCursorSupplier.getViewCursor() + xPageCursor = self.xTextViewCursorSupplier.ViewCursor xPageCursor.jumpToFirstPage() xPageCursor.jumpToStartOfPage() - Helper.setUnoPropertyValue(xPageCursor, "PageDescName", "First Page") - oPageStyles = self.xTextDocument.getStyleFamilies().getByName("PageStyles") + Helper.setUnoPropertyValue( + xPageCursor, "PageDescName", "First Page") + oPageStyles = self.xTextDocument.StyleFamilies.getByName( + "PageStyles") oPageStyle = oPageStyles.getByName("First Page") - xAllTextTables = oTextTableHandler.xTextTablesSupplier.getTextTables() + xAllTextTables = oTextTableHandler.xTextTablesSupplier.TextTables xTextTable = xAllTextTables.getByIndex(0) xRange = xTextTable.getAnchor().getText() xPageCursor.gotoRange(xRange, False) @@ -30,9 +32,10 @@ class ViewHandler(object): exception.printStackTrace(System.out) def setViewSetting(self, Setting, Value): - uno.invoke(self.xTextViewCursorSupplier.getViewSettings(),"setPropertyValue",(Setting, Value)) + uno.invoke(self.xTextViewCursorSupplier.ViewSettings,"setPropertyValue",( + Setting, Value)) def collapseViewCursorToStart(self): - xTextViewCursor = self.xTextViewCursorSupplier.getViewCursor() + xTextViewCursor = self.xTextViewCursorSupplier.ViewCursor xTextViewCursor.collapseToStart() diff --git a/wizards/com/sun/star/wizards/text/__init__.py b/wizards/com/sun/star/wizards/text/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py index c2335547c..aa7231e19 100644 --- a/wizards/com/sun/star/wizards/ui/PathSelection.py +++ b/wizards/com/sun/star/wizards/ui/PathSelection.py @@ -27,23 +27,63 @@ class PathSelection(object): self.CMDSELECTPATH = 1 self.TXTSAVEPATH = 1 - def insert(self, DialogStep, XPos, YPos, Width, CurTabIndex, LabelText, Enabled, TxtHelpURL, BtnHelpURL): - self.CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblSaveAs", (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 8, LabelText, XPos, YPos, DialogStep, uno.Any("short",CurTabIndex), Width)) - self.xSaveTextBox = self.CurUnoDialog.insertTextField("txtSavePath", "callXPathSelectionListener", (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 12, TxtHelpURL, XPos, YPos + 10, DialogStep, uno.Any("short",(CurTabIndex + 1)), Width - 26), self) + def insert( + self, DialogStep, XPos, YPos, Width, + CurTabIndex, LabelText, Enabled, TxtHelpURL, BtnHelpURL): - self.CurUnoDialog.setControlProperty("txtSavePath", PropertyNames.PROPERTY_ENABLED, False ) - self.CurUnoDialog.insertButton("cmdSelectPath", "triggerPathPicker", (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 14, BtnHelpURL, "...",XPos + Width - 16, YPos + 9, DialogStep, uno.Any("short",(CurTabIndex + 2)), 16), self) + self.CurUnoDialog.insertControlModel( + "com.sun.star.awt.UnoControlFixedTextModel", "lblSaveAs", + (PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (Enabled, 8, LabelText, XPos, YPos, DialogStep, + uno.Any("short",CurTabIndex), Width)) + self.xSaveTextBox = self.CurUnoDialog.insertTextField( + "txtSavePath", "callXPathSelectionListener", + (PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (Enabled, 12, TxtHelpURL, XPos, YPos + 10, DialogStep, + uno.Any("short",(CurTabIndex + 1)), Width - 26), self) + + self.CurUnoDialog.setControlProperty("txtSavePath", + PropertyNames.PROPERTY_ENABLED, False ) + self.CurUnoDialog.insertButton("cmdSelectPath", "triggerPathPicker", + (PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (Enabled, 14, BtnHelpURL, "...",XPos + Width - 16, YPos + 9, + DialogStep, uno.Any("short",(CurTabIndex + 2)), 16), self) def addSelectionListener(self, xAction): self.xAction = xAction def getSelectedPath(self): - return self.xSaveTextBox.getText() + return self.xSaveTextBox.Text def initializePath(self): try: myFA = FileAccess(self.xMSF) - self.xSaveTextBox.setText(myFA.getPath(self.sDefaultDirectory + "/" + self.sDefaultName, None)) + self.xSaveTextBox.setText( + myFA.getPath(self.sDefaultDirectory + \ + "/" + \ + self.sDefaultName, None)) except UnoException, e: traceback.print_exc() @@ -55,14 +95,18 @@ class PathSelection(object): return elif self.iDialogType == self.DialogTypes.FILE: self.usedPathPicker = True - myFilePickerDialog = SystemDialog.createStoreDialog(self.xMSF) - myFilePickerDialog.callStoreDialog(self.sDefaultDirectory, self.sDefaultName, self.sDefaultFilter); - sStorePath = myFilePickerDialog.sStorePath; + myFilePickerDialog = \ + SystemDialog.createStoreDialog(self.xMSF) + myFilePickerDialog.callStoreDialog( + self.sDefaultDirectory, + self.sDefaultName, self.sDefaultFilter) + sStorePath = myFilePickerDialog.sStorePath if sStorePath is not None: myFA = FileAccess(xMSF); - xSaveTextBox.setText(myFA.getPath(sStorePath, None)); - self.sDefaultDirectory = FileAccess.getParentDir(sStorePath); - self.sDefaultName = myFA.getFilename(sStorePath); + xSaveTextBox.setText(myFA.getPath(sStorePath, None)) + self.sDefaultDirectory = \ + FileAccess.getParentDir(sStorePath) + self.sDefaultName = myFA.getFilename(sStorePath) return elif iTransferMode == TransferMode.LOAD: if iDialogType == DialogTypes.FOLDER: diff --git a/wizards/com/sun/star/wizards/ui/PeerConfig.py b/wizards/com/sun/star/wizards/ui/PeerConfig.py index b06284682..7f0dba4b3 100644 --- a/wizards/com/sun/star/wizards/ui/PeerConfig.py +++ b/wizards/com/sun/star/wizards/ui/PeerConfig.py @@ -45,25 +45,33 @@ class PeerConfig(object): xVclWindowPeer = aPeerTask.xControl.getPeer() n = 0 while n < aPeerTask.propnames.length: - xVclWindowPeer.setProperty(aPeerTask.propnames[n], aPeerTask.propvalues[n]) + xVclWindowPeer.setProperty(aPeerTask.propnames[n], + aPeerTask.propvalues[n]) n += 1 i += 1 i = 0 while i < self.aControlTasks.size(): aControlTask = self.aControlTasks.elementAt(i) - Helper.setUnoPropertyValue(aControlTask.oModel, aControlTask.propname, aControlTask.propvalue) + Helper.setUnoPropertyValue(aControlTask.oModel, + aControlTask.propname, aControlTask.propvalue) i += 1 i = 0 while i < self.aImageUrlTasks.size(): aImageUrlTask = self.aImageUrlTasks.elementAt(i) sImageUrl = "" if isinstance(aImageUrlTask.oResource,int): - sImageUrl = self.oUnoDialog.getWizardImageUrl((aImageUrlTask.oResource).intValue(), (aImageUrlTask.oHCResource).intValue()) + sImageUrl = self.oUnoDialog.getWizardImageUrl( + (aImageUrlTask.oResource).intValue(), + (aImageUrlTask.oHCResource).intValue()) elif isinstance(aImageUrlTask.oResource,str): - sImageUrl = self.oUnoDialog.getImageUrl((aImageUrlTask.oResource), (aImageUrlTask.oHCResource)) + sImageUrl = self.oUnoDialog.getImageUrl( + (aImageUrlTask.oResource), + (aImageUrlTask.oHCResource)) if not sImageUrl.equals(""): - Helper.setUnoPropertyValue(aImageUrlTask.oModel, PropertyNames.PROPERTY_IMAGEURL, sImageUrl) + Helper.setUnoPropertyValue( + aImageUrlTask.oModel, + PropertyNames.PROPERTY_IMAGEURL, sImageUrl) i += 1 except RuntimeException, re: @@ -71,7 +79,8 @@ class PeerConfig(object): raise re; ''' - @param oAPIControl an API control that the interface XControl can be derived from + @param oAPIControl an API control that the interface XControl + can be derived from @param _saccessname ''' @@ -82,7 +91,8 @@ class PeerConfig(object): setPeerProperties(_xControl, ("AccessibleName"), (_saccessname)) ''' - @param oAPIControl an API control that the interface XControl can be derived from + @param oAPIControl an API control that the interface XControl + can be derived from @param _propnames @param _propvalues ''' @@ -96,20 +106,21 @@ class PeerConfig(object): ''' assigns an arbitrary property to a control as soon as the peer is created - Note: The property 'ImageUrl' should better be assigned with 'setImageurl(...)', to consider the High Contrast Mode + Note: The property 'ImageUrl' should better be assigned with + 'setImageurl(...)', to consider the High Contrast Mode @param _ocontrolmodel @param _spropname @param _propvalue ''' def setControlProperty(self, _ocontrolmodel, _spropname, _propvalue): - oControlTask = self.ControlTask.ControlTask_unknown(_ocontrolmodel, _spropname, _propvalue) + oControlTask = self.ControlTask(_ocontrolmodel, _spropname, _propvalue) self.aControlTasks.append(oControlTask) ''' - Assigns an image to the property 'ImageUrl' of a dialog control. The image id must be assigned in a resource file - within the wizards project - wizards project + Assigns an image to the property 'ImageUrl' of a dialog control. + The image id must be assigned in a resource file within the wizards + project wizards project @param _ocontrolmodel @param _nResId @param _nhcResId @@ -120,7 +131,8 @@ class PeerConfig(object): self.aImageUrlTasks.append(oImageUrlTask) ''' - Assigns an image to the property 'ImageUrl' of a dialog control. The image ids that the Resource urls point to + Assigns an image to the property 'ImageUrl' of a dialog control. + The image ids that the Resource urls point to may be assigned in a Resource file outside the wizards project @param _ocontrolmodel @param _sResourceUrl @@ -128,18 +140,20 @@ class PeerConfig(object): ''' def setImageUrl(self, _ocontrolmodel, _sResourceUrl, _sHCResourceUrl): - oImageUrlTask = ImageUrlTask(_ocontrolmodel, _sResourceUrl, _sHCResourceUrl) + oImageUrlTask = ImageUrlTask( + _ocontrolmodel, _sResourceUrl, _sHCResourceUrl) self.aImageUrlTasks.append(oImageUrlTask) ''' - Assigns an image to the property 'ImageUrl' of a dialog control. The image id must be assigned in a resource file - within the wizards project - wizards project + Assigns an image to the property 'ImageUrl' of a dialog control. + The image id must be assigned in a resource file within the wizards + project wizards project @param _ocontrolmodel @param _oResource @param _oHCResource ''' def setImageUrl(self, _ocontrolmodel, _oResource, _oHCResource): - oImageUrlTask = self.ImageUrlTask(_ocontrolmodel, _oResource, _oHCResource) + oImageUrlTask = self.ImageUrlTask( + _ocontrolmodel, _oResource, _oHCResource) self.aImageUrlTasks.append(oImageUrlTask) diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index cfc1c0437..32ac6e51b 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -13,9 +13,11 @@ class UnoDialog(object): try: self.xMSF = xMSF self.ControlList = {} - self.xDialogModel = xMSF.createInstance("com.sun.star.awt.UnoControlDialogModel") + self.xDialogModel = xMSF.createInstance( + "com.sun.star.awt.UnoControlDialogModel") self.xDialogModel.setPropertyValues(PropertyNames, PropertyValues) - self.xUnoDialog = xMSF.createInstance("com.sun.star.awt.UnoControlDialog") + self.xUnoDialog = xMSF.createInstance( + "com.sun.star.awt.UnoControlDialog") self.xUnoDialog.setModel(self.xDialogModel) self.BisHighContrastModeActivated = None self.m_oPeerConfig = None @@ -26,7 +28,8 @@ class UnoDialog(object): def getControlKey(self, EventObject, ControlList): xControlModel = EventObject.getModel() try: - sName = xControlModel.getPropertyValue(PropertyNames.PROPERTY_NAME) + sName = xControlModel.getPropertyValue( + PropertyNames.PROPERTY_NAME) iKey = ControlList.get(sName).intValue() except com.sun.star.uno.Exception, exception: traceback.print_exc() @@ -59,8 +62,8 @@ class UnoDialog(object): else: PropertyValue = (PropertyValue,) - uno.invoke(xPSet, "setPropertyValue", (PropertyName, uno.Any( \ - methodname, PropertyValue))) + uno.invoke(xPSet, "setPropertyValue", (PropertyName, + uno.Any( methodname, PropertyValue))) except Exception, exception: traceback.print_exc() @@ -77,7 +80,8 @@ class UnoDialog(object): def getResource(self): return self.m_oResource - def setControlProperties(self, ControlName, PropertyNames, PropertyValues): + def setControlProperties( + self, ControlName, PropertyNames, PropertyValues): self.setControlProperty(ControlName, PropertyNames, PropertyValues) def getControlProperty(self, ControlName, PropertyName): @@ -92,31 +96,31 @@ class UnoDialog(object): def printControlProperties(self, ControlName): try: xControlModel = self.xDialogModel().getByName(ControlName) - allProps = xControlModel.getPropertySetInfo().getProperties() + allProps = xControlModel.PropertySetInfo.Properties i = 0 while i < allProps.length: sName = allProps[i].Name i += 1 - except com.sun.star.uno.Exception, exception: + except UnoException, exception: traceback.print_exc() def getMAPConversionFactor(self, ControlName): xControl2 = self.xUnoDialog.getControl(ControlName) - aSize = xControl2.getSize() - dblMAPWidth = ((Helper.getUnoPropertyValue(xControl2.getModel(), PropertyNames.PROPERTY_WIDTH)).intValue()) - dblFactor = (((aSize.Width)) / dblMAPWidth) - return dblFactor + aSize = xControl2.Size + dblMAPWidth = Helper.getUnoPropertyValue(xControl2.Model, + int(PropertyNames.PROPERTY_WIDTH)) + return (aSize.Width / dblMAPWidth) def getpreferredLabelSize(self, LabelName, sLabel): xControl2 = self.xUnoDialog.getControl(LabelName) - OldText = xControl2.getText() + OldText = xControl2.Text xControl2.setText(sLabel) - aSize = xControl2.getPreferredSize() + aSize = xControl2.PreferredSize xControl2.setText(OldText) return aSize def removeSelectedItems(self, xListBox): - SelList = xListBox.getSelectedItemsPos() + SelList = xListBox.SelectedItemsPos Sellen = SelList.length i = Sellen - 1 while i >= 0: @@ -124,18 +128,21 @@ class UnoDialog(object): i -= 1 def getListBoxItemCount(self, _xListBox): - # This function may look ugly, but this is the only way to check the count - # of values in the model,which is always right. + # This function may look ugly, but this is the only way to check + # the count of values in the model,which is always right. # the control is only a view and could be right or not. - fieldnames = Helper.getUnoPropertyValue(getModel(_xListBox), "StringItemList") + fieldnames = Helper.getUnoPropertyValue(getModel(_xListBox), + "StringItemList") return fieldnames.length def getSelectedItemPos(self, _xListBox): - ipos = Helper.getUnoPropertyValue(getModel(_xListBox), "SelectedItems") + ipos = Helper.getUnoPropertyValue(getModel(_xListBox), + "SelectedItems") return ipos[0] def isListBoxSelected(self, _xListBox): - ipos = Helper.getUnoPropertyValue(getModel(_xListBox), "SelectedItems") + ipos = Helper.getUnoPropertyValue(getModel(_xListBox), + "SelectedItems") return ipos.length > 0 def addSingleItemtoListbox(self, xListBox, ListItem, iSelIndex): @@ -145,7 +152,9 @@ class UnoDialog(object): def insertLabel(self, sName, sPropNames, oPropValues): try: - oFixedText = self.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", sName, sPropNames, oPropValues) + oFixedText = self.insertControlModel( + "com.sun.star.awt.UnoControlFixedTextModel", + sName, sPropNames, oPropValues) oFixedText.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) oLabel = self.xUnoDialog.getControl(sName) return oLabel @@ -153,12 +162,16 @@ class UnoDialog(object): traceback.print_exc() return None - def insertButton(self, sName, iControlKey, xActionListener, sProperties, sValues): - oButtonModel = self.insertControlModel("com.sun.star.awt.UnoControlButtonModel", sName, sProperties, sValues) + def insertButton( + self, sName, iControlKey, xActionListener, sProperties, sValues): + oButtonModel = self.insertControlModel( + "com.sun.star.awt.UnoControlButtonModel", + sName, sProperties, sValues) xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) xButton = self.xUnoDialog.getControl(sName) if xActionListener != None: - xButton.addActionListener(ActionListenerProcAdapter(xActionListener)) + xButton.addActionListener( + ActionListenerProcAdapter(xActionListener)) ControlKey = iControlKey if self.ControlList != None: @@ -166,31 +179,43 @@ class UnoDialog(object): return xButton - def insertCheckBox(self, sName, iControlKey, xItemListener, sProperties, sValues): - oButtonModel = self.insertControlModel("com.sun.star.awt.UnoControlCheckBoxModel", sName, sProperties, sValues) + def insertCheckBox( + self, sName, iControlKey, xItemListener, sProperties, sValues): + oButtonModel = self.insertControlModel( + "com.sun.star.awt.UnoControlCheckBoxModel", + sName, sProperties, sValues) oButtonModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) xCheckBox = self.xUnoDialog.getControl(sName) if xItemListener != None: - xCheckBox.addItemListener(ItemListenerProcAdapter(xItemListener)) + xCheckBox.addItemListener( + ItemListenerProcAdapter(xItemListener)) ControlKey = iControlKey if self.ControlList != None: self.ControlList.put(sName, ControlKey) - def insertNumericField(self, sName, iControlKey, xTextListener, sProperties, sValues): - oNumericFieldModel = self.insertControlModel("com.sun.star.awt.UnoControlNumericFieldModel", sName, sProperties, sValues) - oNumericFieldModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + def insertNumericField( + self, sName, iControlKey, xTextListener, sProperties, sValues): + oNumericFieldModel = self.insertControlModel( + "com.sun.star.awt.UnoControlNumericFieldModel", + sName, sProperties, sValues) + oNumericFieldModel.setPropertyValue( + PropertyNames.PROPERTY_NAME, sName) xNumericField = self.xUnoDialog.getControl(sName) if xTextListener != None: - xNumericField.addTextListener(TextListenerProcAdapter(xTextListener)) + xNumericField.addTextListener( + TextListenerProcAdapter(xTextListener)) ControlKey = iControlKey if self.ControlList != None: self.ControlList.put(sName, ControlKey) - def insertScrollBar(self, sName, iControlKey, xAdjustmentListener, sProperties, sValues): + def insertScrollBar( + self, sName, iControlKey, xAdjustmentListener, sProperties, sValues): try: - oScrollModel = self.insertControlModel("com.sun.star.awt.UnoControlScrollBarModel", sName, sProperties, sValues) + oScrollModel = self.insertControlModel( + "com.sun.star.awt.UnoControlScrollBarModel", + sName, sProperties, sValues) oScrollModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) xScrollBar = self.xUnoDialog.getControl(sName) if xAdjustmentListener != None: @@ -205,17 +230,27 @@ class UnoDialog(object): traceback.print_exc() return None - def insertTextField(self, sName, iControlKey, xTextListener, sProperties, sValues): - xTextBox = insertEditField("com.sun.star.awt.UnoControlEditModel", sName, iControlKey, xTextListener, sProperties, sValues) + def insertTextField( + self, sName, iControlKey, xTextListener, sProperties, sValues): + xTextBox = insertEditField( + "com.sun.star.awt.UnoControlEditModel", sName, iControlKey, + xTextListener, sProperties, sValues) return xTextBox - def insertFormattedField(self, sName, iControlKey, xTextListener, sProperties, sValues): - xTextBox = insertEditField("com.sun.star.awt.UnoControlFormattedFieldModel", sName, iControlKey, xTextListener, sProperties, sValues) + def insertFormattedField( + self, sName, iControlKey, xTextListener, sProperties, sValues): + xTextBox = insertEditField( + "com.sun.star.awt.UnoControlFormattedFieldModel", sName, + iControlKey, xTextListener, sProperties, sValues) return xTextBox - def insertEditField(self, ServiceName, sName, iControlKey, xTextListener, sProperties, sValues): + def insertEditField( + self, ServiceName, sName, iControlKey, + xTextListener, sProperties, sValues): + try: - xTextModel = self.insertControlModel(ServiceName, sName, sProperties, sValues) + xTextModel = self.insertControlModel( + ServiceName, sName, sProperties, sValues) xTextModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) xTextBox = self.xUnoDialog.getControl(sName) if xTextListener != None: @@ -228,22 +263,31 @@ class UnoDialog(object): traceback.print_exc() return None - def insertListBox(self, sName, iControlKey, xActionListener, xItemListener, sProperties, sValues): - xListBoxModel = self.insertControlModel("com.sun.star.awt.UnoControlListBoxModel", sName, sProperties, sValues) + def insertListBox( + self, sName, iControlKey, xActionListener, + xItemListener, sProperties, sValues): + xListBoxModel = self.insertControlModel( + "com.sun.star.awt.UnoControlListBoxModel", + sName, sProperties, sValues) xListBoxModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) xListBox = self.xUnoDialog.getControl(sName) if xItemListener != None: xListBox.addItemListener(ItemListenerProcAdapter(xItemListener)) if xActionListener != None: - xListBox.addActionListener(ActionListenerProcAdapter(xActionListener)) + xListBox.addActionListener( + ActionListenerProcAdapter(xActionListener)) ControlKey = iControlKey self.ControlList.put(sName, ControlKey) return xListBox - def insertComboBox(self, sName, iControlKey, xActionListener, xTextListener, xItemListener, sProperties, sValues): - xComboBoxModel = self.insertControlModel("com.sun.star.awt.UnoControlComboBoxModel", sName, sProperties, sValues) + def insertComboBox( + self, sName, iControlKey, xActionListener, xTextListener, + xItemListener, sProperties, sValues): + xComboBoxModel = self.insertControlModel( + "com.sun.star.awt.UnoControlComboBoxModel", + sName, sProperties, sValues) xComboBoxModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) xComboBox = self.xUnoDialog.getControl(sName) if xItemListener != None: @@ -253,28 +297,35 @@ class UnoDialog(object): xComboBox.addTextListener(TextListenerProcAdapter(xTextListener)) if xActionListener != None: - xComboBox.addActionListener(ActionListenerProcAdapter(xActionListener)) + xComboBox.addActionListener( + ActionListenerProcAdapter(xActionListener)) ControlKey = iControlKey self.ControlList.put(sName, ControlKey) return xComboBox - def insertRadioButton(self, sName, iControlKey, xItemListener, sProperties, sValues): + def insertRadioButton( + self, sName, iControlKey, xItemListener, sProperties, sValues): try: - xRadioButton = insertRadioButton(sName, iControlKey, sProperties, sValues) + xRadioButton = insertRadioButton( + sName, iControlKey, sProperties, sValues) if xItemListener != None: - xRadioButton.addItemListener(ItemListenerProcAdapter(xItemListener)) + xRadioButton.addItemListener( + ItemListenerProcAdapter(xItemListener)) return xRadioButton except com.sun.star.uno.Exception, exception: traceback.print_exc() return None - def insertRadioButton(self, sName, iControlKey, xActionListener, sProperties, sValues): + def insertRadioButton( + self, sName, iControlKey, xActionListener, sProperties, sValues): try: - xButton = insertRadioButton(sName, iControlKey, sProperties, sValues) + xButton = insertRadioButton( + sName, iControlKey, sProperties, sValues) if xActionListener != None: - xButton.addActionListener(ActionListenerProcAdapter(xActionListener)) + xButton.addActionListener( + ActionListenerProcAdapter(xActionListener)) return xButton except com.sun.star.uno.Exception, exception: @@ -289,46 +340,61 @@ class UnoDialog(object): def insertRadioButton(self, sName, sProperties, sValues): try: - oRadioButtonModel = self.insertControlModel("com.sun.star.awt.UnoControlRadioButtonModel", sName, sProperties, sValues) - oRadioButtonModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + oRadioButtonModel = self.insertControlModel( + "com.sun.star.awt.UnoControlRadioButtonModel", + sName, sProperties, sValues) + oRadioButtonModel.setPropertyValue( + PropertyNames.PROPERTY_NAME, sName) xRadioButton = self.xUnoDialog.getControl(sName) return xRadioButton except com.sun.star.uno.Exception, exception: traceback.print_exc() return None ''' - The problem with setting the visibility of controls is that changing the current step - of a dialog will automatically make all controls visible. The PropertyNames.PROPERTY_STEP property always wins against - the property "visible". Therfor a control meant to be invisible is placed on a step far far away. + The problem with setting the visibility of controls + is that changing the current step of a dialog will automatically + make all controls visible. The PropertyNames.PROPERTY_STEP property + always wins against the property "visible". Therfor a control meant + to be invisible is placed on a step far far away. @param the name of the control @param iStep change the step if you want to make the control invisible ''' def setControlVisible(self, controlname, iStep): try: - iCurStep = int(getControlProperty(controlname, PropertyNames.PROPERTY_STEP)) - setControlProperty(controlname, PropertyNames.PROPERTY_STEP, iStep) + iCurStep = int(getControlProperty( + controlname, PropertyNames.PROPERTY_STEP)) + setControlProperty( + controlname, PropertyNames.PROPERTY_STEP, iStep) except com.sun.star.uno.Exception, exception: traceback.print_exc() ''' - The problem with setting the visibility of controls is that changing the current step - of a dialog will automatically make all controls visible. The PropertyNames.PROPERTY_STEP property always wins against - the property "visible". Therfor a control meant to be invisible is placed on a step far far away. - Afterwards the step property of the dialog has to be set with "repaintDialogStep". As the performance - of that method is very bad it should be used only once for all controls + The problem with setting the visibility of controls is that + changing the current step of a dialog will automatically make + all controls visible. The PropertyNames.PROPERTY_STEP property + always wins against the property "visible". + Therfor a control meant to be invisible is placed on a step far far away. + Afterwards the step property of the dialog has to be set with + "repaintDialogStep". As the performance of that method is very bad it + should be used only once for all controls @param controlname the name of the control @param bIsVisible sets the control visible or invisible ''' def setControlVisible(self, controlname, bIsVisible): try: - iCurControlStep = int(getControlProperty(controlname, PropertyNames.PROPERTY_STEP)) - iCurDialogStep = int(Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP)) + iCurControlStep = int(getControlProperty( + controlname, PropertyNames.PROPERTY_STEP)) + iCurDialogStep = int(Helper.getUnoPropertyValue( + self.xDialogModel, PropertyNames.PROPERTY_STEP)) if bIsVisible: - setControlProperty(controlname, PropertyNames.PROPERTY_STEP, iCurDialogStep) + setControlProperty( + controlname, PropertyNames.PROPERTY_STEP, iCurDialogStep) else: - setControlProperty(controlname, PropertyNames.PROPERTY_STEP, UIConsts.INVISIBLESTEP) + setControlProperty( + controlname, PropertyNames.PROPERTY_STEP, + UIConsts.INVISIBLESTEP) except com.sun.star.uno.Exception, exception: traceback.print_exc() @@ -338,9 +404,12 @@ class UnoDialog(object): def repaintDialogStep(self): try: - ncurstep = int(Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP)) - Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP, 99) - Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP, ncurstep) + ncurstep = int(Helper.getUnoPropertyValue( + self.xDialogModel, PropertyNames.PROPERTY_STEP)) + Helper.setUnoPropertyValue( + self.xDialogModel, PropertyNames.PROPERTY_STEP, 99) + Helper.setUnoPropertyValue( + self.xDialogModel, PropertyNames.PROPERTY_STEP, ncurstep) except com.sun.star.uno.Exception, exception: traceback.print_exc() @@ -363,7 +432,7 @@ class UnoDialog(object): FirstList = [sFirstEntry] ResultList = [MainList.length + 1] System.arraycopy(FirstList, 0, ResultList, 0, 1) - System.arraycopy(MainList, 0, ResultList, 1, MainList.length) + System.arraycopy(MainList, 0, ResultList, 1, len(MainList)) return ResultList except java.lang.Exception, jexception: traceback.print_exc() @@ -387,7 +456,8 @@ class UnoDialog(object): Helper.setUnoPropertyValue(oListBoxModel, "StringItemList", sList) def calculateDialogPosition(self, FramePosSize): - # Todo: check if it would be useful or possible to create a dialog peer, that can be used for the messageboxes to + # Todo:check if it would be useful or possible to create a dialog peer + # that can be used for the messageboxes to # maintain modality when they pop up. CurPosSize = self.xUnoDialog.getPosSize() WindowHeight = FramePosSize.Height @@ -396,7 +466,8 @@ class UnoDialog(object): DialogHeight = CurPosSize.Height iXPos = ((WindowWidth / 2) - (DialogWidth / 2)) iYPos = ((WindowHeight / 2) - (DialogHeight / 2)) - self.xUnoDialog.setPosSize(iXPos, iYPos, DialogWidth, DialogHeight, POS) + self.xUnoDialog.setPosSize( + iXPos, iYPos, DialogWidth, DialogHeight, POS) ''' @param FramePosSize @@ -406,7 +477,8 @@ class UnoDialog(object): def executeDialog(self, FramePosSize): if self.xUnoDialog.getPeer() == None: - raise AttributeError("Please create a peer, using your own frame"); + raise AttributeError( + "Please create a peer, using your own frame"); self.calculateDialogPosition(FramePosSize) @@ -503,7 +575,8 @@ class UnoDialog(object): @classmethod def setEnabled(self, control, enabled): - Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_ENABLED, enabled) + Helper.setUnoPropertyValue( + getModel(control), PropertyNames.PROPERTY_ENABLED, enabled) ''' @author bc93774 @@ -513,42 +586,60 @@ class UnoDialog(object): @classmethod def getControlModelType(self, oControlModel): - if oControlModel.supportsService("com.sun.star.awt.UnoControlFixedTextModel"): + if oControlModel.supportsService( + "com.sun.star.awt.UnoControlFixedTextModel"): return UIConsts.CONTROLTYPE.FIXEDTEXT - elif oControlModel.supportsService("com.sun.star.awt.UnoControlButtonModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlButtonModel"): return UIConsts.CONTROLTYPE.BUTTON - elif oControlModel.supportsService("com.sun.star.awt.UnoControlCurrencyFieldModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlCurrencyFieldModel"): return UIConsts.CONTROLTYPE.CURRENCYFIELD - elif oControlModel.supportsService("com.sun.star.awt.UnoControlDateFieldModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlDateFieldModel"): return UIConsts.CONTROLTYPE.DATEFIELD - elif oControlModel.supportsService("com.sun.star.awt.UnoControlFixedLineModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlFixedLineModel"): return UIConsts.CONTROLTYPE.FIXEDLINE - elif oControlModel.supportsService("com.sun.star.awt.UnoControlFormattedFieldModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlFormattedFieldModel"): return UIConsts.CONTROLTYPE.FORMATTEDFIELD - elif oControlModel.supportsService("com.sun.star.awt.UnoControlRoadmapModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlRoadmapModel"): return UIConsts.CONTROLTYPE.ROADMAP - elif oControlModel.supportsService("com.sun.star.awt.UnoControlNumericFieldModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlNumericFieldModel"): return UIConsts.CONTROLTYPE.NUMERICFIELD - elif oControlModel.supportsService("com.sun.star.awt.UnoControlPatternFieldModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlPatternFieldModel"): return UIConsts.CONTROLTYPE.PATTERNFIELD - elif oControlModel.supportsService("com.sun.star.awt.UnoControlHyperTextModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlHyperTextModel"): return UIConsts.CONTROLTYPE.HYPERTEXT - elif oControlModel.supportsService("com.sun.star.awt.UnoControlProgressBarModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlProgressBarModel"): return UIConsts.CONTROLTYPE.PROGRESSBAR - elif oControlModel.supportsService("com.sun.star.awt.UnoControlTimeFieldModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlTimeFieldModel"): return UIConsts.CONTROLTYPE.TIMEFIELD - elif oControlModel.supportsService("com.sun.star.awt.UnoControlImageControlModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlImageControlModel"): return UIConsts.CONTROLTYPE.IMAGECONTROL - elif oControlModel.supportsService("com.sun.star.awt.UnoControlRadioButtonModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlRadioButtonModel"): return UIConsts.CONTROLTYPE.RADIOBUTTON - elif oControlModel.supportsService("com.sun.star.awt.UnoControlCheckBoxModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlCheckBoxModel"): return UIConsts.CONTROLTYPE.CHECKBOX - elif oControlModel.supportsService("com.sun.star.awt.UnoControlEditModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlEditModel"): return UIConsts.CONTROLTYPE.EDITCONTROL - elif oControlModel.supportsService("com.sun.star.awt.UnoControlComboBoxModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlComboBoxModel"): return UIConsts.CONTROLTYPE.COMBOBOX else: - if (oControlModel.supportsService("com.sun.star.awt.UnoControlListBoxModel")): + if (oControlModel.supportsService( + "com.sun.star.awt.UnoControlListBoxModel")): return UIConsts.CONTROLTYPE.LISTBOX else: return UIConsts.CONTROLTYPE.UNKNOWN @@ -581,7 +672,7 @@ class UnoDialog(object): ''' def addResourceHandler(self, _Unit, _Module): - self.m_oResource = Resource.Resource_unknown(self.xMSF, _Unit, _Module) + self.m_oResource = Resource(self.xMSF, _Unit, _Module) def setInitialTabindex(self, _istep): return (short)(_istep * 100) @@ -590,12 +681,14 @@ class UnoDialog(object): if self.xContainerWindow != None: if self.BisHighContrastModeActivated == None: try: - nUIColor = int(self.xContainerWindow.getProperty("DisplayBackgroundColor")) + nUIColor = int(self.xContainerWindow.getProperty( + "DisplayBackgroundColor")) except IllegalArgumentException, e: traceback.print_exc() return False - #TODO: The following methods could be wrapped in an own class implementation + #TODO: The following methods could be wrapped + # in an own class implementation nRed = self.getRedColorShare(nUIColor) nGreen = self.getGreenColorShare(nUIColor) nBlue = self.getBlueColorShare(nUIColor) diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py index ff1a2510a..cc9ec652f 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py @@ -6,10 +6,11 @@ from UIConsts import * ''' This class contains convenience methods for inserting components to a dialog. It was created for use with the automatic conversion of Basic XML Dialog -description files to a Java class which builds the same dialog through the UNO API.
    +description files to a Java class which builds +the same dialog through the UNO API.
    It uses an Event-Listener method, which calls a method through reflection wenn an event on a component is trigered. -see the classes AbstractListener, CommonListener, MethodInvocation for details. +see the classes AbstractListener, CommonListener, MethodInvocation for details ''' class UnoDialog2(UnoDialog): @@ -22,35 +23,51 @@ class UnoDialog2(UnoDialog): def __init__(self, xmsf): super(UnoDialog2,self).__init__(xmsf,(), ()) - def insertButton(self, sName, actionPerformed, sPropNames, oPropValues, listener): - xButton = self.insertControlModel2("com.sun.star.awt.UnoControlButtonModel", sName, sPropNames, oPropValues) + def insertButton( + self, sName, actionPerformed, sPropNames, oPropValues, listener): + xButton = self.insertControlModel2( + "com.sun.star.awt.UnoControlButtonModel", + sName, sPropNames, oPropValues) if actionPerformed is not None: actionPerformed = getattr(listener, actionPerformed) - xButton.addActionListener(ActionListenerProcAdapter(actionPerformed)) + xButton.addActionListener( + ActionListenerProcAdapter(actionPerformed)) return xButton - def insertImageButton(self, sName, actionPerformed, sPropNames, oPropValues, listener): - xButton = self.insertControlModel2("com.sun.star.awt.UnoControlButtonModel", sName, sPropNames, oPropValues) + def insertImageButton( + self, sName, actionPerformed, sPropNames, oPropValues, listener): + xButton = self.insertControlModel2( + "com.sun.star.awt.UnoControlButtonModel", + sName, sPropNames, oPropValues) if actionPerformed is not None: actionPerformed = getattr(listener, actionPerformed) - xButton.addActionListener(ActionListenerProcAdapter(actionPerformed)) + xButton.addActionListener( + ActionListenerProcAdapter(actionPerformed)) return xButton - def insertCheckBox(self, sName, itemChanged, sPropNames, oPropValues, listener): - xCheckBox = self.insertControlModel2("com.sun.star.awt.UnoControlCheckBoxModel", sName, sPropNames, oPropValues) + def insertCheckBox( + self, sName, itemChanged, sPropNames, oPropValues, listener): + xCheckBox = self.insertControlModel2( + "com.sun.star.awt.UnoControlCheckBoxModel", + sName, sPropNames, oPropValues) if itemChanged is not None: itemChanged = getattr(listener, itemChanged) xCheckBox.addItemListener(ItemListenerProcAdapter(itemChanged)) return xCheckBox - def insertComboBox(self, sName, actionPerformed, itemChanged, textChanged, sPropNames, oPropValues, listener): - xComboBox = self.insertControlModel2("com.sun.star.awt.UnoControlComboBoxModel", sName, sPropNames, oPropValues) + def insertComboBox( + self, sName, actionPerformed, itemChanged, + textChanged, sPropNames, oPropValues, listener): + xComboBox = self.insertControlModel2( + "com.sun.star.awt.UnoControlComboBoxModel", + sName, sPropNames, oPropValues) if actionPerformed is not None: actionPerformed = getattr(listener, actionPerformed) - xComboBox.addActionListener(ActionListenerProcAdapter(actionPerformed)) + xComboBox.addActionListener( + ActionListenerProcAdapter(actionPerformed)) if itemChanged is not None: itemChanged = getattr(listener, itemChanged) @@ -62,8 +79,11 @@ class UnoDialog2(UnoDialog): return xComboBox - def insertListBox(self, sName, actionPerformed, itemChanged, sPropNames, oPropValues, listener): - xListBox = self.insertControlModel2("com.sun.star.awt.UnoControlListBoxModel", + def insertListBox( + self, sName, actionPerformed, itemChanged, + sPropNames, oPropValues, listener): + xListBox = self.insertControlModel2( + "com.sun.star.awt.UnoControlListBoxModel", sName, sPropNames, oPropValues) if actionPerformed is not None: @@ -76,87 +96,150 @@ class UnoDialog2(UnoDialog): return xListBox - def insertRadioButton(self, sName, itemChanged, sPropNames, oPropValues, listener): - xRadioButton = self.insertControlModel2("com.sun.star.awt.UnoControlRadioButtonModel", + def insertRadioButton( + self, sName, itemChanged, sPropNames, oPropValues, listener): + xRadioButton = self.insertControlModel2( + "com.sun.star.awt.UnoControlRadioButtonModel", sName, sPropNames, oPropValues) if itemChanged is not None: itemChanged = getattr(listener, itemChanged) - xRadioButton.addItemListener(ItemListenerProcAdapter(itemChanged)) + xRadioButton.addItemListener( + ItemListenerProcAdapter(itemChanged)) return xRadioButton def insertTitledBox(self, sName, sPropNames, oPropValues): - oTitledBox = self.insertControlModel2("com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues) + oTitledBox = self.insertControlModel2( + "com.sun.star.awt.UnoControlGroupBoxModel", + sName, sPropNames, oPropValues) return oTitledBox - def insertTextField(self, sName, sTextChanged, sPropNames, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, - "com.sun.star.awt.UnoControlEditModel", sPropNames, oPropValues, listener) + def insertTextField( + self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField( + sName, sTextChanged, "com.sun.star.awt.UnoControlEditModel", + sPropNames, oPropValues, listener) def insertImage(self, sName, sPropNames, oPropValues): - return self.insertControlModel2("com.sun.star.awt.UnoControlImageControlModel", sName, sPropNames, oPropValues) + return self.insertControlModel2( + "com.sun.star.awt.UnoControlImageControlModel", + sName, sPropNames, oPropValues) def insertInfoImage(self, _posx, _posy, _iStep): - xImgControl = self.insertImage(Desktop.getUniqueName(self.xDialogModel, "imgHint"),("Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH),(uno.Any("short",0), 10, UIConsts.INFOIMAGEURL, _posx, _posy, False, _iStep, 10)) - self.getPeerConfiguration().setImageUrl(self.getModel(xImgControl), UIConsts.INFOIMAGEURL, UIConsts.INFOIMAGEURL_HC) + xImgControl = self.insertImage( + Desktop.getUniqueName(self.xDialogModel, "imgHint"), + ("Border", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_IMAGEURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_WIDTH), + (uno.Any("short",0), 10, + UIConsts.INFOIMAGEURL, _posx, _posy, False, _iStep, 10)) + self.getPeerConfiguration().setImageUrl( + self.getModel(xImgControl), + UIConsts.INFOIMAGEURL, + UIConsts.INFOIMAGEURL_HC) return xImgControl ''' - This method is used for creating Edit, Currency, Date, Formatted, Pattern, File - and Time edit components. + This method is used for creating Edit, Currency, Date, Formatted, + Pattern, File and Time edit components. ''' - def insertEditField(self, sName, sTextChanged, sModelClass, sPropNames, oPropValues, listener): - xField = self.insertControlModel2(sModelClass, sName, sPropNames, oPropValues) + def insertEditField( + self, sName, sTextChanged, sModelClass, + sPropNames, oPropValues, listener): + xField = self.insertControlModel2(sModelClass, + sName, sPropNames, oPropValues) if sTextChanged is not None: sTextChanged = getattr(listener, sTextChanged) xField.addTextListener(TextListenerProcAdapter(sTextChanged)) return xField - def insertFileControl(self, sName, sTextChanged, sPropNames, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlFileControlModel", sPropNames, oPropValues, listener) - - def insertCurrencyField(self, sName, sTextChanged, sPropNames, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlCurrencyFieldModel", sPropNames, oPropValues, listener) - - def insertDateField(self, sName, sTextChanged, sPropNames, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlDateFieldModel", sPropNames, oPropValues, listener) - - def insertNumericField(self, sName, sTextChanged, sPropNames, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlNumericFieldModel", sPropNames, oPropValues, listener) - - def insertTimeField(self, sName, sTextChanged, sPropNames, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlTimeFieldModel", sPropNames, oPropValues, listener) - - def insertPatternField(self, sName, sTextChanged, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlPatternFieldModel", sPropNames, oPropValues, listener) + def insertFileControl( + self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField(sName, sTextChanged, + "com.sun.star.awt.UnoControlFileControlModel", + sPropNames, oPropValues, listener) + + def insertCurrencyField( + self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField( + sName, sTextChanged, + "com.sun.star.awt.UnoControlCurrencyFieldModel", + sPropNames, oPropValues, listener) + + def insertDateField( + self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField( + sName, sTextChanged, + "com.sun.star.awt.UnoControlDateFieldModel", + sPropNames, oPropValues, listener) + + def insertNumericField( + self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField( + sName, sTextChanged, + "com.sun.star.awt.UnoControlNumericFieldModel", + sPropNames, oPropValues, listener) + + def insertTimeField( + self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField( + sName, sTextChanged, + "com.sun.star.awt.UnoControlTimeFieldModel", + sPropNames, oPropValues, listener) + + def insertPatternField( + self, sName, sTextChanged, oPropValues, listener): + return self.insertEditField(sName, sTextChanged, + "com.sun.star.awt.UnoControlPatternFieldModel", + sPropNames, oPropValues, listener) - def insertFormattedField(self, sName, sTextChanged, sPropNames, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlFormattedFieldModel", sPropNames, oPropValues, listener) + def insertFormattedField( + self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField( + sName, sTextChanged, + "com.sun.star.awt.UnoControlFormattedFieldModel", + sPropNames, oPropValues, listener) def insertFixedLine(self, sName, sPropNames, oPropValues): - oLine = self.insertControlModel2("com.sun.star.awt.UnoControlFixedLineModel", sName, sPropNames, oPropValues) + oLine = self.insertControlModel2( + "com.sun.star.awt.UnoControlFixedLineModel", + sName, sPropNames, oPropValues) return oLine def insertScrollBar(self, sName, sPropNames, oPropValues): - oScrollBar = self.insertControlModel2("com.sun.star.awt.UnoControlScrollBarModel", sName, sPropNames, oPropValues) + oScrollBar = self.insertControlModel2( + "com.sun.star.awt.UnoControlScrollBarModel", + sName, sPropNames, oPropValues) return oScrollBar def insertProgressBar(self, sName, sPropNames, oPropValues): - oProgressBar = self.insertControlModel2("com.sun.star.awt.UnoControlProgressBarModel", sName, sPropNames, oPropValues) + oProgressBar = self.insertControlModel2( + "com.sun.star.awt.UnoControlProgressBarModel", + sName, sPropNames, oPropValues) return oProgressBar def insertGroupBox(self, sName, sPropNames, oPropValues): - oGroupBox = self.insertControlModel2("com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues) + oGroupBox = self.insertControlModel2( + "com.sun.star.awt.UnoControlGroupBoxModel", + sName, sPropNames, oPropValues) return oGroupBox - def insertControlModel2(self, serviceName, componentName, sPropNames, oPropValues): + def insertControlModel2( + self, serviceName, componentName, sPropNames, oPropValues): try: - xControlModel = self.insertControlModel(serviceName, componentName, (), ()) - Helper.setUnoPropertyValues(xControlModel, sPropNames, oPropValues) - Helper.setUnoPropertyValue(xControlModel, PropertyNames.PROPERTY_NAME, componentName) + xControlModel = self.insertControlModel( + serviceName, componentName, (), ()) + Helper.setUnoPropertyValues( + xControlModel, sPropNames, oPropValues) + Helper.setUnoPropertyValue(xControlModel, + PropertyNames.PROPERTY_NAME, componentName) except Exception, ex: traceback.print_exc() @@ -171,9 +254,11 @@ class UnoDialog2(UnoDialog): i += 1 def getControlModel(self, unoControl): - obj = unoControl.getModel() + obj = unoControl.Model return obj def showMessageBox(self, windowServiceName, windowAttribute, MessageText): - return SystemDialog.showMessageBox(xMSF, self.xControl.getPeer(), windowServiceName, windowAttribute, MessageText) + return SystemDialog.showMessageBox( + xMSF, self.xControl.Peer, + windowServiceName, windowAttribute, MessageText) diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index 6cdd7363e..23c099efd 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -5,7 +5,7 @@ from com.sun.star.lang import NoSuchMethodException from com.sun.star.uno import Exception as UnoException from com.sun.star.lang import IllegalArgumentException from com.sun.star.frame import TerminationVetoException -import common.HelpIds as HelpIds +from common.HelpIds import * from com.sun.star.awt.PushButtonType import HELP, STANDARD from event.MethodInvocation import * from event.EventNames import EVENT_ITEM_CHANGED @@ -42,7 +42,8 @@ class WizardDialog(UnoDialog2): self.__nMaxStep = 1 self.__bTerminateListenermustberemoved = True self.__oWizardResource = Resource(xMSF, "dbw") - self.sMsgEndAutopilot = self.__oWizardResource.getResText(UIConsts.RID_DB_COMMON + 33) + self.sMsgEndAutopilot = self.__oWizardResource.getResText( + UIConsts.RID_DB_COMMON + 33) self.oRoadmap = None #self.vetos = VetoableChangeSupport.VetoableChangeSupport_unknown(this) @@ -76,16 +77,15 @@ class WizardDialog(UnoDialog2): def getNewStep(self): return self.__nNewStep - #@see java.beans.VetoableChangeListener#vetoableChange(java.beans.PropertyChangeEvent) - - def vetoableChange(self, arg0): self.__nNewStep = self.__nOldStep def itemStateChanged(self, itemEvent): try: self.__nNewStep = itemEvent.ItemId - self.__nOldStep = int(Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP)) + self.__nOldStep = int(Helper.getUnoPropertyValue( + self.xDialogModel, + PropertyNames.PROPERTY_STEP)) if self.__nNewStep != self.__nOldStep: switchToStep() @@ -109,48 +109,70 @@ class WizardDialog(UnoDialog2): if self.oRoadmap != None: nCurItemID = self.getCurrentRoadmapItemID() if nCurItemID != ID: - Helper.setUnoPropertyValue(self.oRoadmap, "CurrentItemID", uno.Any("short",ID)) + Helper.setUnoPropertyValue(self.oRoadmap, "CurrentItemID", + uno.Any("short",ID)) def getCurrentRoadmapItemID(self): try: - return int(Helper.getUnoPropertyValue(self.oRoadmap, "CurrentItemID")) + return int(Helper.getUnoPropertyValue( + self.oRoadmap, "CurrentItemID")) except UnoException, exception: traceback.print_exc() return -1 def addRoadmap(self): try: - iDialogHeight = Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_HEIGHT) + iDialogHeight = Helper.getUnoPropertyValue( + self.xDialogModel, + PropertyNames.PROPERTY_HEIGHT) # the roadmap control has got no real TabIndex ever - # that is not correct, but changing this would need time, so it is used - # without TabIndex as before - self.oRoadmap = self.insertControlModel("com.sun.star.awt.UnoControlRoadmapModel", "rdmNavi", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tabstop", PropertyNames.PROPERTY_WIDTH),((iDialogHeight - 26), 0, 0, 0, uno.Any("short",0), True, uno.Any("short",85))) - self.oRoadmap.setPropertyValue(PropertyNames.PROPERTY_NAME, "rdmNavi") + # that is not correct, but changing this would need time, + # so it is used without TabIndex as before + self.oRoadmap = self.insertControlModel( + "com.sun.star.awt.UnoControlRoadmapModel", + "rdmNavi", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, "Tabstop", + PropertyNames.PROPERTY_WIDTH), + ((iDialogHeight - 26), 0, 0, 0, + uno.Any("short",0), True, uno.Any("short",85))) + self.oRoadmap.setPropertyValue( + PropertyNames.PROPERTY_NAME, "rdmNavi") mi = MethodInvocation("itemStateChanged", self) self.xRoadmapControl = self.xUnoDialog.getControl("rdmNavi") - self.xRoadmapControl.addItemListener(ItemListenerProcAdapter(None)) + self.xRoadmapControl.addItemListener( + ItemListenerProcAdapter(None)) - Helper.setUnoPropertyValue(self.oRoadmap, "Text", self.__oWizardResource.getResText(UIConsts.RID_COMMON + 16)) + Helper.setUnoPropertyValue( + self.oRoadmap, "Text", + self.__oWizardResource.getResText(UIConsts.RID_COMMON + 16)) except NoSuchMethodException, ex: Resource.showCommonResourceError(xMSF) except UnoException, jexception: traceback.print_exc() def setRMItemLabels(self, _oResource, StartResID): - self.sRMItemLabels = _oResource.getResArray(StartResID, self.__nMaxStep) + self.sRMItemLabels = _oResource.getResArray( + StartResID, self.__nMaxStep) def getRMItemLabels(self): return self.sRMItemLabels def insertRoadmapItem(self, _Index, _bEnabled, _LabelID, _CurItemID): - return insertRoadmapItem(_Index, _bEnabled, self.sRMItemLabels(_LabelID), _CurItemID) + return insertRoadmapItem( + _Index, _bEnabled, self.sRMItemLabels(_LabelID), _CurItemID) def insertRoadmapItem(self, Index, _bEnabled, _sLabel, _CurItemID): try: oRoadmapItem = self.oRoadmap.createInstance() - Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_LABEL, _sLabel) - Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_ENABLED, _bEnabled) + Helper.setUnoPropertyValue(oRoadmapItem, + PropertyNames.PROPERTY_LABEL, _sLabel) + Helper.setUnoPropertyValue(oRoadmapItem, + PropertyNames.PROPERTY_ENABLED, _bEnabled) Helper.setUnoPropertyValue(oRoadmapItem, "ID", _CurItemID) self.oRoadmap.insertByIndex(Index, oRoadmapItem) NextIndex = Index + 1 @@ -185,11 +207,15 @@ class WizardDialog(UnoDialog2): self.leaveStep(self.__nOldStep, self.__nNewStep) if self.__nNewStep != self.__nOldStep: if self.__nNewStep == self.__nMaxStep: - self.setControlProperty("btnWizardNext", "DefaultButton", False) - self.setControlProperty("btnWizardFinish", "DefaultButton", True) + self.setControlProperty( + "btnWizardNext", "DefaultButton", False) + self.setControlProperty( + "btnWizardFinish", "DefaultButton", True) else: - self.setControlProperty("btnWizardNext", "DefaultButton", True) - self.setControlProperty("btnWizardFinish", "DefaultButton", False) + self.setControlProperty( + "btnWizardNext", "DefaultButton", True) + self.setControlProperty( + "btnWizardFinish", "DefaultButton", False) self.changeToStep(self.__nNewStep) self.enterStep(self.__nOldStep, self.__nNewStep) @@ -206,7 +232,8 @@ class WizardDialog(UnoDialog2): pass def changeToStep(self, nNewStep): - Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP, nNewStep) + Helper.setUnoPropertyValue(self.xDialogModel, + PropertyNames.PROPERTY_STEP, nNewStep) self.setCurrentRoadmapItemID(nNewStep) self.enableNextButton(self.getNextAvailableStep() > 0) self.enableBackButton(nNewStep != 1) @@ -223,30 +250,99 @@ class WizardDialog(UnoDialog2): iButtonWidth = self.__iButtonWidth iButtonHeight = 14 iCurStep = 0 - iDialogHeight = Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_HEIGHT) - iDialogWidth = Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_WIDTH) + iDialogHeight = Helper.getUnoPropertyValue(self.xDialogModel, + PropertyNames.PROPERTY_HEIGHT) + iDialogWidth = Helper.getUnoPropertyValue(self.xDialogModel, + PropertyNames.PROPERTY_WIDTH) iHelpPosX = 8 iBtnPosY = iDialogHeight - iButtonHeight - 6 iCancelPosX = iDialogWidth - self.__iButtonWidth - 6 iFinishPosX = iCancelPosX - 6 - self.__iButtonWidth iNextPosX = iFinishPosX - 6 - self.__iButtonWidth iBackPosX = iNextPosX - 3 - self.__iButtonWidth - self.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnNaviSep", (PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH), (1, 0, 0, iDialogHeight - 26, iCurStep, iDialogWidth)) - self.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnRoadSep",(PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH),(iBtnPosY - 6, 1, 85, 0, iCurStep, 1)) - propNames = (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH) - Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_HELPURL, HelpIds.array2[self.__hid]) - self.insertButton("btnWizardHelp", WizardDialog.__HELP_ACTION_PERFORMED,(PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH),(True, iButtonHeight, self.__oWizardResource.getResText(UIConsts.RID_COMMON + 15), iHelpPosX, iBtnPosY, uno.Any("short",HELP), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth), self) - self.insertButton("btnWizardBack", WizardDialog.__BACK_ACTION_PERFORMED, propNames,(False, iButtonHeight, HelpIds.array2[self.__hid + 2], self.__oWizardResource.getResText(UIConsts.RID_COMMON + 13), iBackPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth), self) - self.insertButton("btnWizardNext", WizardDialog.__NEXT_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.array2[self.__hid + 3], self.__oWizardResource.getResText(UIConsts.RID_COMMON + 14), iNextPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth), self) - self.insertButton("btnWizardFinish", WizardDialog.__FINISH_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.array2[self.__hid + 4], self.__oWizardResource.getResText(UIConsts.RID_COMMON + 12), iFinishPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth), self) - self.insertButton("btnWizardCancel", WizardDialog.__CANCEL_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.array2[self.__hid + 5], self.__oWizardResource.getResText(UIConsts.RID_COMMON + 11), iCancelPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth), self) + self.insertControlModel( + "com.sun.star.awt.UnoControlFixedLineModel", + "lnNaviSep", + (PropertyNames.PROPERTY_HEIGHT, "Orientation", + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_WIDTH), + (1, 0, 0, iDialogHeight - 26, iCurStep, iDialogWidth)) + self.insertControlModel( + "com.sun.star.awt.UnoControlFixedLineModel", + "lnRoadSep", + (PropertyNames.PROPERTY_HEIGHT, + "Orientation", + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_WIDTH), + (iBtnPosY - 6, 1, 85, 0, iCurStep, 1)) + propNames = (PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "PushButtonType", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH) + Helper.setUnoPropertyValue( + self.xDialogModel, PropertyNames.PROPERTY_HELPURL, + HelpIds.getHelpIdString(self.__hid)) + self.insertButton("btnWizardHelp", + WizardDialog.__HELP_ACTION_PERFORMED, + (PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "PushButtonType", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, iButtonHeight, + self.__oWizardResource.getResText(UIConsts.RID_COMMON + 15), + iHelpPosX, iBtnPosY, + uno.Any("short",HELP), iCurStep, + uno.Any("short",(curtabindex + 1)), iButtonWidth), self) + self.insertButton("btnWizardBack", + WizardDialog.__BACK_ACTION_PERFORMED, propNames, + (False, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 2), + self.__oWizardResource.getResText(UIConsts.RID_COMMON + 13), + iBackPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, + uno.Any("short",(curtabindex + 1)), iButtonWidth), self) + self.insertButton("btnWizardNext", + WizardDialog.__NEXT_ACTION_PERFORMED, propNames, + (True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 3), + self.__oWizardResource.getResText(UIConsts.RID_COMMON + 14), + iNextPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, + uno.Any("short",(curtabindex + 1)), iButtonWidth), self) + self.insertButton("btnWizardFinish", + WizardDialog.__FINISH_ACTION_PERFORMED, propNames, + (True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 4), + self.__oWizardResource.getResText(UIConsts.RID_COMMON + 12), + iFinishPosX, iBtnPosY, uno.Any("short",STANDARD), + iCurStep, + uno.Any("short",(curtabindex + 1)), + iButtonWidth), self) + self.insertButton("btnWizardCancel", + WizardDialog.__CANCEL_ACTION_PERFORMED, propNames, + (True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 5), + self.__oWizardResource.getResText(UIConsts.RID_COMMON + 11), + iCancelPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, + uno.Any("short",(curtabindex + 1)), + iButtonWidth), self) self.setControlProperty("btnWizardNext", "DefaultButton", True) # add a window listener, to know # if the user used "escape" key to # close the dialog. windowHidden = MethodInvocation("windowHidden", self) self.xUnoDialog.addWindowListener(WindowListenerProcAdapter(None)) - dialogName = Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_NAME) + dialogName = Helper.getUnoPropertyValue(self.xDialogModel, + PropertyNames.PROPERTY_NAME) except Exception, exception: traceback.print_exc() @@ -261,24 +357,29 @@ class WizardDialog(UnoDialog2): if self.getNextAvailableStep() > 0: self.enableNextButton(bEnabled) - def enableNavigationButtons(self, _bEnableBack, _bEnableNext, _bEnableFinish): + def enableNavigationButtons( + self, _bEnableBack, _bEnableNext, _bEnableFinish): self.enableBackButton(_bEnableBack) self.enableNextButton(_bEnableNext) self.enableFinishButton(_bEnableFinish) def enableBackButton(self, enabled): - self.setControlProperty("btnWizardBack", PropertyNames.PROPERTY_ENABLED, enabled) + self.setControlProperty("btnWizardBack", + PropertyNames.PROPERTY_ENABLED, enabled) def enableNextButton(self, enabled): - self.setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, enabled) + self.setControlProperty("btnWizardNext", + PropertyNames.PROPERTY_ENABLED, enabled) def enableFinishButton(self, enabled): - self.setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, enabled) + self.setControlProperty("btnWizardFinish", + PropertyNames.PROPERTY_ENABLED, enabled) def setStepEnabled(self, _nStep, bEnabled): xRoadmapItem = getRoadmapItemByID(_nStep) if xRoadmapItem != None: - Helper.setUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED, bEnabled) + Helper.setUnoPropertyValue(xRoadmapItem, + PropertyNames.PROPERTY_ENABLED, bEnabled) def enablefromStep(self, _iStep, _bDoEnable): if _iStep <= self.__nMaxStep: @@ -298,7 +399,8 @@ class WizardDialog(UnoDialog2): # Todo: In this case an exception should be thrown if (xRoadmapItem == None): return False - bIsEnabled = bool(Helper.getUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED)) + bIsEnabled = bool(Helper.getUnoPropertyValue(xRoadmapItem, + PropertyNames.PROPERTY_ENABLED)) return bIsEnabled except UnoException, exception: traceback.print_exc() @@ -348,7 +450,8 @@ class WizardDialog(UnoDialog2): pass def finishWizard_1(self): - '''This function will call if the finish button is pressed on the UI''' + '''This function will call + if the finish button is pressed on the UI''' try: self.enableFinishButton(False) success = False @@ -368,7 +471,8 @@ class WizardDialog(UnoDialog2): def getCurrentStep(self): try: - return int(Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP)) + return int(Helper.getUnoPropertyValue(self.xDialogModel, + PropertyNames.PROPERTY_STEP)) except UnoException, exception: traceback.print_exc() return -1 @@ -388,7 +492,17 @@ class WizardDialog(UnoDialog2): oFontDesc.Weight = com.sun.star.awt.FontWeight.BOLD i = 0 while i < self.sRightPaneHeaders.length: - insertLabel("lblQueryTitle" + String.valueOf(i),("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH),(oFontDesc, 16, self.sRightPaneHeaders(i), True, 91, 8, i + 1, uno.Any("short",12), 212)) + insertLabel("lblQueryTitle" + String.valueOf(i),("FontDescriptor", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH),( + oFontDesc, 16, self.sRightPaneHeaders(i), + True, 91, 8, i + 1, uno.Any("short",12), 212)) i += 1 def cancelWizard(self): diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py index b03bf3fbd..24ff52172 100644 --- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py +++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py @@ -43,7 +43,8 @@ import inspect # When actionPerformed is called, this will call an arbitrary # python procedure, passing it... # 1. the oActionEvent -# 2. any other parameters you specified to this object's constructor (as a tuple). +# 2. any other parameters you specified to this object's +# constructor (as a tuple). from com.sun.star.awt import XActionListener class ActionListenerProcAdapter( unohelper.Base, XActionListener ): def __init__( self, oProcToCall, tParams=() ): @@ -63,7 +64,8 @@ class ActionListenerProcAdapter( unohelper.Base, XActionListener ): # When itemStateChanged is called, this will call an arbitrary # python procedure, passing it... # 1. the oItemEvent -# 2. any other parameters you specified to this object's constructor (as a tuple). +# 2. any other parameters you specified to this object's +# constructor (as a tuple). from com.sun.star.awt import XItemListener class ItemListenerProcAdapter( unohelper.Base, XItemListener ): def __init__( self, oProcToCall, tParams=() ): @@ -82,7 +84,8 @@ class ItemListenerProcAdapter( unohelper.Base, XItemListener ): # When textChanged is called, this will call an arbitrary # python procedure, passing it... # 1. the oTextEvent -# 2. any other parameters you specified to this object's constructor (as a tuple). +# 2. any other parameters you specified to this object's +# constructor (as a tuple). from com.sun.star.awt import XTextListener class TextListenerProcAdapter( unohelper.Base, XTextListener ): def __init__( self, oProcToCall, tParams=() ): @@ -100,7 +103,8 @@ class TextListenerProcAdapter( unohelper.Base, XTextListener ): # When textChanged is called, this will call an arbitrary # python procedure, passing it... # 1. the oTextEvent -# 2. any other parameters you specified to this object's constructor (as a tuple). +# 2. any other parameters you specified to this object's +# constructor (as a tuple). from com.sun.star.awt import XWindowListener class WindowListenerProcAdapter( unohelper.Base, XWindowListener ): def __init__( self, oProcToCall, tParams=() ): diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py b/wizards/com/sun/star/wizards/ui/event/DataAware.py index 36f421eca..2e7c3e323 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.py @@ -139,13 +139,16 @@ class DataAware(object): sets the given DataObject to each DataAware object in the given collection @param dataAwares a collection of DataAware objects. - @param dataObject new data object to set to the DataAware objects in the given collection. + @param dataObject new data object to set to the DataAware + objects in the given collection. @param updateUI if true, calls updateUI() on each DataAware object. ''' def setDataObject(self, dataObject, updateUI): - if dataObject != None and not (type(self._value) is not type(dataObject)): - raise ClassCastException ("can not cast new DataObject to original Class"); + if dataObject != None and not (type(self._value) is not + type(dataObject)): + raise ClassCastException ( + "can not cast new DataObject to original Class") self._dataObject = dataObject if updateUI: self.updateUI() @@ -155,7 +158,8 @@ class DataAware(object): sets the given DataObject to each DataAware object in the given collection @param dataAwares a collection of DataAware objects. - @param dataObject new data object to set to the DataAware objects in the given collection. + @param dataObject new data object to set to the DataAware objects + in the given collection. @param updateUI if true, calls updateUI() on each DataAware object. ''' @@ -218,13 +222,15 @@ class DataAware(object): ''' creates a PropertyValue for the property with the given name, of the given JavaBean object. - @param propertyName the property to access. Must be a Cup letter (e.g. PropertyNames.PROPERTY_NAME for getName() and setName("..."). ) - @param propertyOwner the object which "own" or "contains" the property. + @param propertyName the property to access. Must be a Cup letter + (e.g. PropertyNames.PROPERTY_NAME for getName() and setName("..."). ) + @param propertyOwner the object which "own" or "contains" the property ''' def __init__(self, propertyName, propertyOwner): self.getMethod = createGetMethod(propertyName, propertyOwner) - self.setMethod = createSetMethod(propertyName, propertyOwner, self.getMethod.getReturnType()) + self.setMethod = createSetMethod( + propertyName, propertyOwner, self.getMethod.getReturnType()) ''' called from the constructor, and creates a get method reflection object @@ -238,15 +244,19 @@ class DataAware(object): m = None try: #try to get a "get" method. - m = obj.getClass().getMethod("get" + propName, self.__class__.__EMPTY_ARRAY) + m = obj.getClass().getMethod( + "get" + propName, self.__class__.__EMPTY_ARRAY) except NoSuchMethodException, ex1: - raise IllegalArgumentException ("get" + propName + "() method does not exist on " + obj.getClass().getName()); + raise IllegalArgumentException ( + "get" + propName + "() method does not exist on " + \ + obj.Class.Name) return m def Get(self, target): try: - return self.getMethod.invoke(target, self.__class__.__EMPTY_ARRAY) + return self.getMethod.invoke( + target, self.__class__.__EMPTY_ARRAY) except IllegalAccessException, ex1: ex1.printStackTrace() except InvocationTargetException, ex2: @@ -271,7 +281,9 @@ class DataAware(object): try: m = obj.getClass().getMethod("set" + propName, [paramClass]) except NoSuchMethodException, ex1: - raise IllegalArgumentException ("set" + propName + "(" + self.getMethod.getReturnType().getName() + ") method does not exist on " + obj.getClass().getName()); + raise IllegalArgumentException ("set" + propName + "(" + \ + self.getMethod.getReturnType().getName() + \ + ") method does not exist on " + obj.Class.Name); return m @@ -284,5 +296,6 @@ class DataAware(object): ex2.printStackTrace() def isAssignable(self, type): - return self.getMethod.getDeclaringClass().isAssignableFrom(type) and self.setMethod.getDeclaringClass().isAssignableFrom(type) + return self.getMethod.getDeclaringClass().isAssignableFrom(type) \ + and self.setMethod.getDeclaringClass().isAssignableFrom(type) diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py index b23cce2ee..80f400ded 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py +++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py @@ -76,7 +76,9 @@ class DataAwareFields(object): elif self.convertTo.type == uno.Any("short",0).type: return uno.Any("short",b) else: - raise AttributeError("Cannot convert boolean value to given type (" + str(type(self.convertTo)) + ")."); + raise AttributeError( + "Cannot convert boolean value to given type (" + \ + str(type(self.convertTo)) + ").") except Exception, ex: traceback.print_exc() @@ -109,7 +111,9 @@ class DataAwareFields(object): elif self.convertTo.type == uno.Any("short",0).type: return uno.Any("[]short",(i,)) else: - raise AttributeError("Cannot convert int value to given type (" + str(type(self.convertTo)) + ")."); + raise AttributeError( + "Cannot convert int value to given type (" + \ + str(type(self.convertTo)) + ")."); except Exception, ex: traceback.print_exc() @@ -142,8 +146,9 @@ class DataAwareFields(object): else: return s else: - raise AttributeError("Cannot convert int value to given type (" \ - + str(type(self.convertTo)) + ")." ) + raise AttributeError( + "Cannot convert int value to given type (" + \ + str(type(self.convertTo)) + ")." ) except Exception, ex: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py index 0a662d2f2..2bdbcc6be 100644 --- a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py +++ b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py @@ -25,7 +25,8 @@ class MethodInvocation(object): self.mObject = obj self.mWithParam = not (paramClass==None) - '''Returns the result of calling the method on the object, or null, if no result. ''' + '''Returns the result of calling the method on the object, or null, + if no result. ''' def invoke(self, param=None): if self.mWithParam: diff --git a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py index 1c33e4d0b..95df5c7ef 100644 --- a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py @@ -26,7 +26,7 @@ class RadioDataAware(DataAware): def getFromUI(self): for i in self.radioButtons: - if i.getState(): + if i.State: return i return -1 diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py index 5654eb7d5..2564b88f1 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py @@ -96,7 +96,8 @@ class UnoDataAware(DataAware): return Helper.getUnoPropertyValue(self.unoModel, self.unoPropName) @classmethod - def __attachTextControl(self, data, prop, unoText, listener, unoProperty, field, value): + def __attachTextControl( + self, data, prop, unoText, listener, unoProperty, field, value): if field: aux = DataAwareFields.getFieldValueFor(data, prop, value) else: @@ -121,22 +122,27 @@ class UnoDataAware(DataAware): @classmethod def attachEditControl(self, data, prop, unoControl, listener, field): - return self.__attachTextControl(data, prop, unoControl, listener, "Text", field, "") + return self.__attachTextControl( + data, prop, unoControl, listener, "Text", field, "") @classmethod def attachDateControl(self, data, prop, unoControl, listener, field): - return self.__attachTextControl(data, prop, unoControl, listener, "Date", field, 0) + return self.__attachTextControl( + data, prop, unoControl, listener, "Date", field, 0) def attachTimeControl(self, data, prop, unoControl, listener, field): - return self.__attachTextControl(data, prop, unoControl, listener, "Time", field, 0) + return self.__attachTextControl( + data, prop, unoControl, listener, "Time", field, 0) def attachNumericControl(self, data, prop, unoControl, listener, field): - return self.__attachTextControl(data, prop, unoControl, listener, "Value", field, float(0)) + return self.__attachTextControl( + data, prop, unoControl, listener, "Value", field, float(0)) @classmethod def attachCheckBox(self, data, prop, checkBox, listener, field): if field: - aux = DataAwareFields.getFieldValueFor(data, prop, uno.Any("short",0)) + aux = DataAwareFields.getFieldValueFor( + data, prop, uno.Any("short",0)) else: aux = DataAware.PropertyValue (prop, data) uda = UnoDataAware(data, aux , checkBox, PropertyNames.PROPERTY_STATE) @@ -167,7 +173,8 @@ class UnoDataAware(DataAware): @classmethod def attachListBox(self, data, prop, listBox, listener, field): if field: - aux = DataAwareFields.getFieldValueFor(data, prop, uno.Any("short",0)) + aux = DataAwareFields.getFieldValueFor( + data, prop, uno.Any("short",0)) else: aux = DataAware.PropertyValue (prop, data) uda = UnoDataAware(data, aux, listBox, "SelectedItems") @@ -181,4 +188,5 @@ class UnoDataAware(DataAware): setEnabled(control, enabled) def setEnabled(self, control, enabled): - Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_ENABLED, enabled) + Helper.setUnoPropertyValue( + getModel(control), PropertyNames.PROPERTY_ENABLED, enabled) diff --git a/wizards/com/sun/star/wizards/ui/event/__init__.py b/wizards/com/sun/star/wizards/ui/event/__init__.py new file mode 100644 index 000000000..e69de29bb -- cgit v1.2.3 From e64f2c88bde72cec12df88478f20e59495141052 Mon Sep 17 00:00:00 2001 From: Samuel Cantrell Date: Thu, 16 Jun 2011 09:57:53 +0200 Subject: remove Search Options page from Internet group on Options dialog fdo#38146 --- cui/source/options/optinet2.cxx | 407 ---------------------------------------- cui/source/options/optinet2.hrc | 23 --- cui/source/options/optinet2.hxx | 65 ------- cui/source/options/optinet2.src | 166 ---------------- cui/source/options/treeopt.cxx | 2 - cui/source/options/treeopt.src | 3 +- 6 files changed, 1 insertion(+), 665 deletions(-) diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index b61a72d84..d897fb822 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -635,413 +635,6 @@ IMPL_LINK( SvxProxyTabPage, LoseFocusHdl_Impl, Edit *, pEdit ) } -/********************************************************************/ -/* */ -/* SvxSearchTabPage */ -/* */ -/********************************************************************/ - -SvxSearchTabPage::SvxSearchTabPage(Window* pParent, const SfxItemSet& rSet ) : - - SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_INET_SEARCH ), rSet ), - - aSearchGB ( this, CUI_RES( GB_SEARCH ) ), - aSearchLB ( this, CUI_RES( LB_SEARCH ) ), - aSearchNameFT ( this, CUI_RES( FT_SEARCH_NAME ) ), - aSearchNameED ( this, CUI_RES( ED_SEARCH_NAME ) ), - aSearchFT ( this, CUI_RES( FT_SEARCH ) ), - aAndRB ( this, CUI_RES( RB_AND ) ), - aOrRB ( this, CUI_RES( RB_OR ) ), - aExactRB ( this, CUI_RES( RB_EXACT ) ), - - aURLFT ( this, CUI_RES( FT_URL ) ), - aURLED ( this, CUI_RES( ED_URL ) ), - - aPostFixFT ( this, CUI_RES( FT_POSTFIX ) ), - aPostFixED ( this, CUI_RES( ED_POSTFIX ) ), - aSeparatorFT ( this, CUI_RES( FT_SEPARATOR ) ), - aSeparatorED ( this, CUI_RES( ED_SEPARATOR ) ), - aCaseFT ( this, CUI_RES( FT_CASE ) ), - aCaseED ( this, CUI_RES( ED_CASE ) ), - - aNewPB ( this, CUI_RES( PB_NEW ) ), - aAddPB ( this, CUI_RES( PB_ADD ) ), - aChangePB ( this, CUI_RES( PB_CHANGE ) ), - aDeletePB ( this, CUI_RES( PB_DELETE ) ), - - sModifyMsg(CUI_RES(MSG_MODIFY)) -{ - FreeResource(); - - SetExchangeSupport(); - aCaseED.SelectEntryPos(0); // falls kein Eintrag vorhanden ist, kann es sonst "Arger geben - - aNewPB.SetClickHdl(LINK( this, SvxSearchTabPage, NewSearchHdl_Impl ) ); - aAddPB.SetClickHdl(LINK( this, SvxSearchTabPage, AddSearchHdl_Impl ) ); - aChangePB.SetClickHdl(LINK( this, SvxSearchTabPage, ChangeSearchHdl_Impl ) ); - aDeletePB.SetClickHdl(LINK( this, SvxSearchTabPage, DeleteSearchHdl_Impl ) ); - aSearchLB.SetSelectHdl(LINK( this, SvxSearchTabPage, SearchEntryHdl_Impl ) ); - - Link aLink = LINK( this, SvxSearchTabPage, SearchModifyHdl_Impl ); - aSearchNameED.SetModifyHdl( aLink ); - aURLED.SetModifyHdl( aLink ); - aSeparatorED.SetModifyHdl( aLink ); - aPostFixED.SetModifyHdl( aLink ); - aCaseED.SetSelectHdl( aLink ); - - aLink = LINK( this, SvxSearchTabPage, SearchPartHdl_Impl ); - aAndRB.SetClickHdl( aLink ); - aOrRB.SetClickHdl( aLink ); - aExactRB.SetClickHdl( aLink ); - - InitControls_Impl(); -} - -// ----------------------------------------------------------------------- -SvxSearchTabPage::~SvxSearchTabPage() -{ -} -// ----------------------------------------------------------------------- - -SfxTabPage* SvxSearchTabPage::Create(Window* pParent, const SfxItemSet& rAttrSet ) -{ - return new SvxSearchTabPage(pParent, rAttrSet); -} - -// ----------------------------------------------------------------------- - -void SvxSearchTabPage::Reset( const SfxItemSet& ) -{ - //The two lines below are moved here from the last part of this method - aChangePB.Disable(); - aAddPB.Disable(); - - sal_uInt16 nCount = aSearchConfig.Count(); - aSearchLB.Clear(); - for(sal_uInt16 i = 0; i < nCount; i++) - { - const SvxSearchEngineData& rData = aSearchConfig.GetData(i); - aSearchLB.InsertEntry(rData.sEngineName); - } - - if ( nCount ) - { - aSearchLB.SelectEntryPos(0); - SearchEntryHdl_Impl( &aSearchLB ); - } - else - aDeletePB.Disable(); -} - -// ----------------------------------------------------------------------- - -sal_Bool SvxSearchTabPage::FillItemSet( SfxItemSet& ) -{ - if(aSearchConfig.IsModified()) - aSearchConfig.Commit(); - return sal_True; -} -/*--------------------------------------------------------------------*/ - -void SvxSearchTabPage::ActivatePage( const SfxItemSet& ) -{ -} - -/*--------------------------------------------------------------------*/ - -int SvxSearchTabPage::DeactivatePage( SfxItemSet* _pSet ) -{ - if(!ConfirmLeave(String())) - return KEEP_PAGE; - - if ( _pSet ) - FillItemSet( *_pSet ); - return LEAVE_PAGE; -} - -// ----------------------------------------------------------------------- - -sal_Bool SvxSearchTabPage::ConfirmLeave( const String& rStringSelection) -{ - if(aChangePB.IsEnabled()) - { - QueryBox aQuery(this, WB_YES_NO_CANCEL|WB_DEF_YES, sModifyMsg); - sal_uInt16 nRet = aQuery.Execute(); - if(RET_CANCEL == nRet) - { - if(rStringSelection.Len()) - aSearchLB.SelectEntry(sLastSelectedEntry); - return sal_False; - } - else if(RET_YES == nRet) - { - sal_uInt16 nEntryPos = aSearchLB.GetEntryPos( aSearchNameED.GetText() ); - if ( nEntryPos != LISTBOX_ENTRY_NOTFOUND ) - aSearchLB.SelectEntryPos(nEntryPos); - else - aSearchLB.SetNoSelection(); - ChangeSearchHdl_Impl(0); - if(rStringSelection.Len()) - aSearchLB.SelectEntry(rStringSelection); - } - else if(RET_NO == nRet) - { - aChangePB.Enable(sal_False); - aAddPB.Enable(sal_False); - SearchEntryHdl_Impl(&aSearchLB); - } - } - if(aAddPB.IsEnabled()) - { - QueryBox aQuery(this, WB_YES_NO_CANCEL|WB_DEF_YES, sModifyMsg); - sal_uInt16 nRet = aQuery.Execute(); - if(RET_CANCEL == nRet) - { - aSearchLB.SetNoSelection(); - return sal_False; - } - else if(RET_YES == nRet) - { - aSearchLB.SetNoSelection(); - AddSearchHdl_Impl(0); - if(rStringSelection.Len()) - aSearchLB.SelectEntry(rStringSelection); - } - else if(RET_NO == nRet) - { - aAddPB.Enable(sal_False); - aChangePB.Enable(sal_False); - NewSearchHdl_Impl(0); - } - - } - return sal_True; -} - -// ----------------------------------------------------------------------- - -void SvxSearchTabPage::InitControls_Impl() -{ - // detect longest label text - sal_Int32 i = 0; - long nLabelTextWidth = 0; - Window* pLabels[] = { &aSearchNameFT, &aSearchFT, &aURLFT, &aPostFixFT, &aSeparatorFT, &aCaseFT }; - Window** pLabel = pLabels; - const sal_Int32 nLabelCount = SAL_N_ELEMENTS( pLabels ); - for ( ; i < nLabelCount; ++i, ++pLabel ) - { - long nTemp = (*pLabel)->GetCtrlTextWidth( (*pLabel)->GetText() ); - if ( nTemp > nLabelTextWidth ) - nLabelTextWidth = nTemp; - } - - // resize all labels - nLabelTextWidth = nLabelTextWidth * 120 / 100; // additional space looks better - const long nLabelWidth = aSearchNameFT.GetSizePixel().Width(); - const long nDelta = nLabelWidth - nLabelTextWidth; - pLabel = pLabels; - for ( i = 0; i < nLabelCount; ++i, ++pLabel ) - { - Size aNewSize = (*pLabel)->GetSizePixel(); - aNewSize.Width() += nDelta; - (*pLabel)->SetSizePixel( aNewSize ); - } - - // resize and move the edits - Window* pEdits[] = { &aSearchNameED, &aAndRB, &aOrRB, - &aExactRB, &aURLED, &aPostFixED, &aSeparatorED, &aCaseED }; - Window** pEdit = pEdits; - const sal_Int32 nCCount = SAL_N_ELEMENTS( pEdits ); - for ( i = 0; i < nCCount; ++i, ++pEdit ) - { - Point aNewPos = (*pEdit)->GetPosPixel(); - aNewPos.X() -= nDelta; - Size aNewSize = (*pEdit)->GetSizePixel(); - if ( (*pEdit) != &aSeparatorED && (*pEdit) != &aCaseED ) - aNewSize.Width() += nDelta; - (*pEdit)->SetPosSizePixel( aNewPos, aNewSize ); - } -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SvxSearchTabPage, NewSearchHdl_Impl, PushButton *, EMPTYARG ) -{ - SearchEntryHdl_Impl(&aSearchLB); - if(aChangePB.IsEnabled() || aAddPB.IsEnabled()) - return 0; - aSearchNameED.SetText( String() ); - aSearchLB.SetNoSelection(); - aCurrentSrchData = SvxSearchEngineData(); - aAndRB.Check( sal_True ); - SearchEntryHdl_Impl( &aSearchLB ); - SearchPartHdl_Impl( &aAndRB ); - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SvxSearchTabPage, AddSearchHdl_Impl, PushButton *, EMPTYARG ) -{ - aAddPB.Enable(sal_False); - aChangePB.Enable(sal_False); - aCurrentSrchData.sEngineName = aSearchNameED.GetText(); - aSearchConfig.SetData(aCurrentSrchData); - aSearchLB.InsertEntry( aCurrentSrchData.sEngineName ); - aSearchLB.SelectEntry( aCurrentSrchData.sEngineName ); - SearchEntryHdl_Impl( &aSearchLB ); - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SvxSearchTabPage, ChangeSearchHdl_Impl, PushButton *, EMPTYARG ) -{ - aChangePB.Enable(sal_False); - aAddPB.Enable(sal_False); - sal_uInt16 nPos = aSearchLB.GetSelectEntryPos(); - if ( nPos != LISTBOX_ENTRY_NOTFOUND ) - { - String sEngine = aSearchLB.GetSelectEntry(); - aCurrentSrchData.sEngineName = sEngine; - aSearchConfig.SetData(aCurrentSrchData); - aSearchLB.SelectEntry(sEngine); - SearchEntryHdl_Impl(&aSearchLB); - } - else - { - SetUpdateMode(sal_False); - String sEntry = aSearchNameED.GetText(); - // im AddHdl wird sLastSelectedEntry umgesetzt - String sTemp(sLastSelectedEntry); - AddSearchHdl_Impl(0); - aSearchLB.SelectEntry(sTemp); - DeleteSearchHdl_Impl(0); - aSearchLB.SelectEntry(sEntry); - SearchEntryHdl_Impl(&aSearchLB); - SetUpdateMode(sal_True); - } - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SvxSearchTabPage, DeleteSearchHdl_Impl, PushButton *, EMPTYARG) -{ - aChangePB.Enable(sal_False); - sal_uInt16 nPos = aSearchLB.GetSelectEntryPos(); - DBG_ASSERT(nPos != LISTBOX_ENTRY_NOTFOUND, "kein Eintrag selektiert!"); - aSearchConfig.RemoveData(aSearchLB.GetSelectEntry()); - aSearchLB.RemoveEntry(nPos); - aSearchLB.SelectEntryPos(0); - SearchEntryHdl_Impl(&aSearchLB); - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SvxSearchTabPage, SearchEntryHdl_Impl, ListBox*, pBox ) -{ - sal_uInt16 nEntryPos = pBox->GetSelectEntryPos(); - if ( nEntryPos != LISTBOX_ENTRY_NOTFOUND ) - { - String sSelection(pBox->GetSelectEntry()); - if(!ConfirmLeave(sSelection)) - return 0; - - const SvxSearchEngineData* pData = aSearchConfig.GetData(sSelection); - DBG_ASSERT(pData, "SearchEngine not available"); - if(pData) - { - aSearchNameED.SetText(sSelection); - sLastSelectedEntry = sSelection; - sal_Bool bAnd = aAndRB.IsChecked(); - sal_Bool bOr = aOrRB.IsChecked(); - - aURLED.SetText(bAnd ? pData->sAndPrefix : bOr ? pData->sOrPrefix : pData->sExactPrefix); - aSeparatorED.SetText( bAnd ? pData->sAndSeparator : bOr ? pData->sOrSeparator : pData->sExactSeparator); - aPostFixED.SetText(bAnd ? pData->sAndSuffix : bOr ? pData->sOrSuffix : pData->sExactSuffix ); - sal_Int32 nCase = bAnd ? pData->nAndCaseMatch : bOr ? pData->nOrCaseMatch : pData->nExactCaseMatch; - aCaseED.SelectEntryPos( (sal_uInt16)nCase ); - aCurrentSrchData = *pData; - } - aDeletePB.Enable(); - } - else - { - aDeletePB.Enable(sal_False); - sLastSelectedEntry.Erase(); - } - aChangePB.Enable(sal_False); - aAddPB.Enable(sal_False); - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SvxSearchTabPage, SearchModifyHdl_Impl, SvxNoSpaceEdit*, pEdit ) -{ - if ( pEdit == &aSearchNameED ) - { - sal_Bool bTextLen = ( 0 != pEdit->GetText().Len() ); - sal_Bool bFound = sal_False; - if ( bTextLen ) - { - sal_uInt16 nEntryPos = aSearchLB.GetEntryPos( pEdit->GetText() ); - bFound = ( nEntryPos != LISTBOX_ENTRY_NOTFOUND ); - if ( bFound ) - aSearchLB.SelectEntryPos(nEntryPos); - else - aSearchLB.SetNoSelection(); - } - aChangePB.Enable( sLastSelectedEntry.Len() > 0 ); - aDeletePB.Enable(bFound); - aAddPB.Enable(bTextLen && !bFound); - } - else - { - if ( aSearchLB.GetSelectEntryCount() && sLastSelectedEntry.Len() > 0 ) - aChangePB.Enable(); - - if(aAndRB.IsChecked()) - { - aCurrentSrchData.sAndPrefix = aURLED.GetText(); - aCurrentSrchData.sAndSeparator = aSeparatorED.GetText(); - aCurrentSrchData.sAndSuffix = aPostFixED.GetText(); - aCurrentSrchData.nAndCaseMatch = aCaseED.GetSelectEntryPos(); - } - else if(aOrRB.IsChecked()) - { - aCurrentSrchData.sOrPrefix = aURLED.GetText(); - aCurrentSrchData.sOrSeparator = aSeparatorED.GetText(); - aCurrentSrchData.sOrSuffix = aPostFixED.GetText(); - aCurrentSrchData.nOrCaseMatch = aCaseED.GetSelectEntryPos(); - } - else - { - aCurrentSrchData.sExactPrefix = aURLED.GetText(); - aCurrentSrchData.sExactSeparator = aSeparatorED.GetText(); - aCurrentSrchData.sExactSuffix = aPostFixED.GetText(); - aCurrentSrchData.nExactCaseMatch = aCaseED.GetSelectEntryPos(); - } - } - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SvxSearchTabPage, SearchPartHdl_Impl, RadioButton *, EMPTYARG ) -{ - sal_Bool bAnd = aAndRB.IsChecked(); - sal_Bool bOr = aOrRB.IsChecked(); - - aURLED.SetText(bAnd ? aCurrentSrchData.sAndPrefix : bOr ? aCurrentSrchData.sOrPrefix : aCurrentSrchData.sExactPrefix); - aSeparatorED.SetText( bAnd ? aCurrentSrchData.sAndSeparator : bOr ? aCurrentSrchData.sOrSeparator : aCurrentSrchData.sExactSeparator); - aPostFixED.SetText(bAnd ? aCurrentSrchData.sAndSuffix : bOr ? aCurrentSrchData.sOrSuffix : aCurrentSrchData.sExactSuffix ); - sal_Int32 nCase = bAnd ? aCurrentSrchData.nAndCaseMatch : bOr ? aCurrentSrchData.nOrCaseMatch : aCurrentSrchData.nExactCaseMatch; - aCaseED.SelectEntryPos( (sal_uInt16)nCase ); - return 0; -} //#98647#---------------------------------------------- void SvxScriptExecListBox::RequestHelp( const HelpEvent& rHEvt ) diff --git a/cui/source/options/optinet2.hrc b/cui/source/options/optinet2.hrc index 75f9445eb..2ccee079f 100755 --- a/cui/source/options/optinet2.hrc +++ b/cui/source/options/optinet2.hrc @@ -56,29 +56,6 @@ #define FT_HTTPS_PORT 15 #define ED_HTTPS_PORT 15 -// Search ------------------------------------------------------------------ -#define GB_SEARCH 40 -#define LB_SEARCH 40 -#define FT_SEARCH_NAME 41 -#define ED_SEARCH_NAME 41 -#define FT_SEARCH 42 -#define RB_AND 43 -#define RB_OR 44 -#define RB_EXACT 45 -#define FT_URL 46 -#define ED_URL 46 -#define FT_POSTFIX 47 -#define ED_POSTFIX 47 -#define FT_SEPARATOR 48 -#define ED_SEPARATOR 48 -#define FT_CASE 49 -#define ED_CASE 49 -#define PB_CHANGE 53 -#define PB_DELETE 54 -#define PB_ADD 55 -#define PB_NEW 56 -#define MSG_MODIFY 57 - // Protocols -------------------------------------------------------------- #define GB_DNS 105 #define RB_DNS_AUTO 106 diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx index ff9d67bef..cbad0be3a 100644 --- a/cui/source/options/optinet2.hxx +++ b/cui/source/options/optinet2.hxx @@ -51,7 +51,6 @@ class SvtInetOptions; #ifndef SV_NODIALOG #define PROXY_CONTROLS 23 #define CACHE_CONTROLS 20 -#define INET_SEARCH 19 #define TYPE_CONTROLS 18 @@ -143,70 +142,6 @@ public: virtual void Reset( const SfxItemSet& rSet ); }; -// class SvxSearchTabPage ------------------------------------------------ -class SvxSearchConfig; -class SvxSearchTabPage : public SfxTabPage -{ - using TabPage::ActivatePage; - using TabPage::DeactivatePage; - -private: - FixedLine aSearchGB; - ListBox aSearchLB; - FixedText aSearchNameFT; - SvxNoSpaceEdit aSearchNameED; - - FixedText aSearchFT; - RadioButton aAndRB; - RadioButton aOrRB; - RadioButton aExactRB; - - FixedText aURLFT; - SvxNoSpaceEdit aURLED; - - FixedText aPostFixFT; - SvxNoSpaceEdit aPostFixED; - FixedText aSeparatorFT; - SvxNoSpaceEdit aSeparatorED; - FixedText aCaseFT; - ListBox aCaseED; - - PushButton aNewPB; - PushButton aAddPB; - PushButton aChangePB; - PushButton aDeletePB; - - String sLastSelectedEntry; - String sModifyMsg; - - SvxSearchConfig aSearchConfig; - SvxSearchEngineData aCurrentSrchData; - -#ifdef _SVX_OPTINET2_CXX - void InitControls_Impl(); - - DECL_LINK( NewSearchHdl_Impl, PushButton * ); - DECL_LINK( AddSearchHdl_Impl, PushButton * ); - DECL_LINK( ChangeSearchHdl_Impl, PushButton * ); - DECL_LINK( DeleteSearchHdl_Impl, PushButton * ); - DECL_LINK( SearchEntryHdl_Impl, ListBox * ); - DECL_LINK( SearchModifyHdl_Impl, SvxNoSpaceEdit * ); - DECL_LINK( SearchPartHdl_Impl, RadioButton * ); -#endif - - virtual void ActivatePage( const SfxItemSet& rSet ); - virtual int DeactivatePage( SfxItemSet* pSet = 0 ); - sal_Bool ConfirmLeave( const String& rStringSelection ); - - SvxSearchTabPage( Window* pParent, const SfxItemSet& rSet ); - virtual ~SvxSearchTabPage(); - -public: - static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual sal_Bool FillItemSet( SfxItemSet& rSet ); - virtual void Reset( const SfxItemSet& rSet ); -}; - // #98647# class SvxScriptExecListBox ------------------------------------ class SvxScriptExecListBox : public ListBox { // for adding tooltips to ListBox diff --git a/cui/source/options/optinet2.src b/cui/source/options/optinet2.src index 72eaafdcc..80543f8ec 100644 --- a/cui/source/options/optinet2.src +++ b/cui/source/options/optinet2.src @@ -274,172 +274,6 @@ TabPage RID_SVXPAGE_INET_PROXY Text [ en-US ] = "is not a valid entry for this field. Please specify a value between 1 and 255." ; }; }; -/************************************************************************/ -/* */ -/* Suche */ -/* */ -/************************************************************************/ -TabPage RID_SVXPAGE_INET_SEARCH -{ - HelpId = HID_OPTIONS_SEARCH ; - OutputSize = TRUE ; - Size = MAP_APPFONT ( 260 , 185 ) ; - SVLook = TRUE ; - Hide = TRUE ; - Text [ en-US ] = "Search" ; - - #define GB_SEARCH_LEFT 6 - #define GB_SEARCH_TOP 3 - FixedLine GB_SEARCH - { - Pos = MAP_APPFONT ( GB_SEARCH_LEFT , GB_SEARCH_TOP ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Search in" ; - }; - ListBox LB_SEARCH - { - HelpID = "cui:ListBox:RID_SVXPAGE_INET_SEARCH:LB_SEARCH"; - Pos = MAP_APPFONT ( 12 , GB_SEARCH_TOP + 11 ) ; - Size = MAP_APPFONT ( 39 , 120 ) ; - Border = TRUE ; - AutoHScroll = TRUE; - }; - #define LABEL_START_XPOS (GB_SEARCH_LEFT + 6 + 39 + 5 ) - #define LABEL_LEN 64 - #define EDIT_START_XPOS (LABEL_START_XPOS + LABEL_LEN + 3) - FixedText FT_SEARCH_NAME - { - Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 13 ) ; - Size = MAP_APPFONT ( LABEL_LEN , 8 ) ; - Text [ en-US ] = "~Name" ; - }; - Edit ED_SEARCH_NAME - { - HelpID = "cui:Edit:RID_SVXPAGE_INET_SEARCH:ED_SEARCH_NAME"; - Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 11 ) ; - Size = MAP_APPFONT ( 125 , 12 ) ; - Border = TRUE ; - }; - FixedText FT_SEARCH - { - Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 27 ) ; - Size = MAP_APPFONT ( LABEL_LEN , 8 ) ; - Text [ en-US ] = "Type" ; - }; - RadioButton RB_AND - { - HelpID = "cui:RadioButton:RID_SVXPAGE_INET_SEARCH:RB_AND"; - Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 26 ) ; - Size = MAP_APPFONT ( 125 , 10 ) ; - Check = TRUE ; - Text [ en-US ] = "And" ; - }; - RadioButton RB_OR - { - HelpID = "cui:RadioButton:RID_SVXPAGE_INET_SEARCH:RB_OR"; - Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 39 ) ; - Size = MAP_APPFONT ( 125 , 10 ) ; - Text [ en-US ] = "~Or" ; - }; - RadioButton RB_EXACT - { - HelpID = "cui:RadioButton:RID_SVXPAGE_INET_SEARCH:RB_EXACT"; - Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 52 ) ; - Size = MAP_APPFONT ( 125 , 10 ) ; - Text [ en-US ] = "E~xact" ; - }; - FixedText FT_URL - { - Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 67 ) ; - Size = MAP_APPFONT ( LABEL_LEN , 8 ) ; - Text [ en-US ] = "~Prefix" ; - }; - Edit ED_URL - { - HelpID = "cui:Edit:RID_SVXPAGE_INET_SEARCH:ED_URL"; - Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 65 ) ; - Size = MAP_APPFONT ( 125 , 12 ) ; - Border = TRUE ; - }; - FixedText FT_POSTFIX - { - Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 82 ) ; - Size = MAP_APPFONT ( LABEL_LEN , 8 ) ; - Text [ en-US ] = "Su~ffix" ; - }; - Edit ED_POSTFIX - { - HelpID = "cui:Edit:RID_SVXPAGE_INET_SEARCH:ED_POSTFIX"; - Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 80 ) ; - Size = MAP_APPFONT ( 125 , 12 ) ; - Border = TRUE ; - }; - FixedText FT_SEPARATOR - { - Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 97 ) ; - Size = MAP_APPFONT ( LABEL_LEN , 8 ) ; - Text [ en-US ] = "~Separator" ; - }; - Edit ED_SEPARATOR - { - HelpID = "cui:Edit:RID_SVXPAGE_INET_SEARCH:ED_SEPARATOR"; - Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 95 ) ; - Size = MAP_APPFONT ( 42 , 12 ) ; - Border = TRUE ; - }; - FixedText FT_CASE - { - Pos = MAP_APPFONT ( LABEL_START_XPOS, GB_SEARCH_TOP + 112 ) ; - Size = MAP_APPFONT ( LABEL_LEN , 8 ) ; - Text [ en-US ] = "~Case match" ; - }; - ListBox ED_CASE - { - HelpID = "cui:ListBox:RID_SVXPAGE_INET_SEARCH:ED_CASE"; - Pos = MAP_APPFONT ( EDIT_START_XPOS, GB_SEARCH_TOP + 110 ) ; - Size = MAP_APPFONT ( 42 , 48 ) ; - Border = TRUE ; - DropDown = TRUE ; - StringList [ en-US ] = - { - < "None" ; > ; - < "Upper" ; > ; - < "Lower" ; > ; - }; - }; - PushButton PB_NEW - { - HelpID = "cui:PushButton:RID_SVXPAGE_INET_SEARCH:PB_NEW"; - Pos = MAP_APPFONT ( 39 , GB_SEARCH_TOP + 131 + 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "N~ew"; - }; - PushButton PB_ADD - { - HelpID = "cui:PushButton:RID_SVXPAGE_INET_SEARCH:PB_ADD"; - Pos = MAP_APPFONT ( 92 , GB_SEARCH_TOP + 131 + 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Add" ; - }; - PushButton PB_CHANGE - { - HelpID = "cui:PushButton:RID_SVXPAGE_INET_SEARCH:PB_CHANGE"; - Pos = MAP_APPFONT ( 145 , GB_SEARCH_TOP + 131 + 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Modify" ; - }; - PushButton PB_DELETE - { - HelpID = "cui:PushButton:RID_SVXPAGE_INET_SEARCH:PB_DELETE"; - Pos = MAP_APPFONT ( 198 , GB_SEARCH_TOP + 131 + 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Delete" ; - }; - String MSG_MODIFY - { - Text [ en-US ] = "Do you want to accept the current modification?"; - }; -}; /************************************************************************/ diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 410d229c2..a6ae33454 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -346,7 +346,6 @@ SfxTabPage* CreateGeneralTabPage( sal_uInt16 nId, Window* pParent, const SfxItem case RID_SVXPAGE_ASIAN_LAYOUT: fnCreate = &SvxAsianLayoutPage::Create; break; case RID_SVX_FONT_SUBSTITUTION: fnCreate = &SvxFontSubstTabPage::Create; break; case RID_SVXPAGE_INET_PROXY: fnCreate = &SvxProxyTabPage::Create; break; - case RID_SVXPAGE_INET_SEARCH: fnCreate = &SvxSearchTabPage::Create; break; case RID_SVXPAGE_INET_SECURITY: fnCreate = &SvxSecurityTabPage::Create; break; case RID_SVXPAGE_INET_MAIL: fnCreate = &SvxEMailTabPage::Create; break; case RID_SVXPAGE_COLORCONFIG: fnCreate = &SvxColorOptionsTabPage::Create; break; @@ -405,7 +404,6 @@ static OptionsMapping_Impl const OptionsMap_Impl[] = { "LanguageSettings", "ComplexTextLayout", RID_SVXPAGE_OPTIONS_CTL }, { "Internet", NULL, SID_INET_DLG }, { "Internet", "Proxy", RID_SVXPAGE_INET_PROXY }, - { "Internet", "Search", RID_SVXPAGE_INET_SEARCH }, { "Internet", "Email", RID_SVXPAGE_INET_MAIL }, { "Internet", "MozillaPlugin", RID_SVXPAGE_INET_MOZPLUGIN }, { "LoadSave", NULL, SID_FILTER_DLG }, diff --git a/cui/source/options/treeopt.src b/cui/source/options/treeopt.src index 55eaf83e8..ff7d70fa1 100644 --- a/cui/source/options/treeopt.src +++ b/cui/source/options/treeopt.src @@ -119,7 +119,7 @@ ModalDialog RID_OFADLG_OPTIONS_TREE { < "This dialog is used to define general settings when working with %PRODUCTNAME. Enter your personal data, the defaults to be used when saving documents, and paths to important files. These settings will be saved automatically and used in later sessions as well."; SID_GENERAL_OPTIONS; > ; < "This is where you make settings concerning language and writing aids for your work with %PRODUCTNAME."; SID_LANGUAGE_OPTIONS; > ; - < "This is where you configure %PRODUCTNAME for the Internet. You can define search engines or save your proxy settings." ; SID_INET_DLG; > ; + < "This is where you configure %PRODUCTNAME for the Internet. You can save your proxy settings." ; SID_INET_DLG; > ; < "This is where you specify various settings for text documents. These settings determine how your text documents are handled in %PRODUCTNAME and are valid for all new %PRODUCTNAME Writer documents. You can also define a few settings for the active text document if you save it afterwards." ; SID_SW_EDITOPTIONS; > ; < "This is where you define the basic settings for %PRODUCTNAME documents in HTML format. For example, you decide which contents should be displayed on the screen or printed, how the pages are scrolled on the screen, in which color keywords are highlighted in the source text and much more." ; SID_SW_ONLINEOPTIONS; > ; < "This is where you define various global settings for spreadsheets. For example, you can define which contents should be displayed and in which direction the cursor will move after you enter data in a cell. You also define sort lists, the number of the decimal places displayed, etc." ; SID_SC_EDITOPTIONS; > ; @@ -184,7 +184,6 @@ Resource RID_OFADLG_OPTIONS_TREE_PAGES { < "Internet" ; 0; > ; < "Proxy" ; RID_SVXPAGE_INET_PROXY; > ; - < "Search" ; RID_SVXPAGE_INET_SEARCH; > ; < "E-mail" ; RID_SVXPAGE_INET_MAIL; > ; < "Browser Plug-in" ; RID_SVXPAGE_INET_MOZPLUGIN; > ; }; -- cgit v1.2.3 From e5f3f5716db2db1b8e489ce16fbd0a533cb9414f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 15 Jun 2011 23:58:28 +0100 Subject: fix comment typo --- bean/com/sun/star/comp/beans/HasConnectionException.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bean/com/sun/star/comp/beans/HasConnectionException.java b/bean/com/sun/star/comp/beans/HasConnectionException.java index 475e4c69c..d78b23cb7 100644 --- a/bean/com/sun/star/comp/beans/HasConnectionException.java +++ b/bean/com/sun/star/comp/beans/HasConnectionException.java @@ -27,7 +27,7 @@ package com.sun.star.comp.beans; -/** This expception is thrown when a method is called which +/** This exception is thrown when a method is called which is only defined for not already having an established connection. -- cgit v1.2.3 From c4068532c4053e9c5b0291ce01abdac66bbdd09d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 16 Jun 2011 00:49:32 +0100 Subject: catch by const reference --- forms/source/component/DatabaseForm.cxx | 89 +++++++++++++++++---------------- forms/source/component/Edit.cxx | 4 +- 2 files changed, 49 insertions(+), 44 deletions(-) diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index b66a20f9b..7ad4bf53d 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -163,7 +163,7 @@ private: if ( m_xDocumentModify.is() ) _enable ? m_xDocumentModify->enableSetModified() : m_xDocumentModify->disableSetModified(); } - catch( const Exception& ) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -410,7 +410,7 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource ) setPropertyValue( pSourceProperty->Name, xSourceProps->getPropertyValue( pSourceProperty->Name ) ); } } - catch( const Exception& ) + catch(const Exception&) { throw WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Could not clone the given database form." ) ), @@ -1173,7 +1173,7 @@ bool ODatabaseForm::hasValidParent() const // the parent form is loaded and on a "virtual" row -> not valid return false; } - catch(Exception&) + catch(const Exception&) { // parent could be forwardonly? return false; @@ -1261,11 +1261,10 @@ sal_Bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNot m_xAggregateAsRowSet->execute(); bSuccess = sal_True; } - catch( const RowSetVetoException& eVeto ) + catch(const RowSetVetoException&) { - (void)eVeto; } - catch(SQLException& eDb) + catch(const SQLException& eDb) { _rClearForNotifies.clear(); if (m_sCurrentErrorContext.getLength()) @@ -1307,7 +1306,7 @@ sal_Bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNot xUpdate->moveToInsertRow(); } } - catch(SQLException& eDB) + catch(const SQLException& eDB) { _rClearForNotifies.clear(); if (m_sCurrentErrorContext.getLength()) @@ -1750,7 +1749,9 @@ void ODatabaseForm::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const A { m_xAggregateSet->setPropertyValue(PROPERTY_DATASOURCE, rValue); } - catch(Exception&) { } + catch(const Exception&) + { + } } break; case PROPERTY_ID_TARGET_URL: @@ -2051,7 +2052,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners) if ( aDefault.hasValue() ) xColUpdate->updateObject( aDefault ); } - catch(Exception&) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -2059,7 +2060,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners) } } } - catch(Exception&) + catch(const Exception&) { } @@ -2419,7 +2420,7 @@ void SAL_CALL ODatabaseForm::setParent(const InterfaceRef& Parent) throw ( ::com Reference< XPropertySet > xParentProperties( xParentForm, UNO_QUERY_THROW ); xParentProperties->removePropertyChangeListener( PROPERTY_ISNEW, this ); } - catch( const Exception& ) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -2441,7 +2442,7 @@ void SAL_CALL ODatabaseForm::setParent(const InterfaceRef& Parent) throw ( ::com Reference< XPropertySet > xParentProperties( xParentForm, UNO_QUERY_THROW ); xParentProperties->addPropertyChangeListener( PROPERTY_ISNEW, this ); } - catch( const Exception& ) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -2871,11 +2872,11 @@ sal_Bool ODatabaseForm::implEnsureConnection() return xConnection.is(); } } - catch(SQLException& eDB) + catch(const SQLException& eDB) { onError(eDB, FRM_RES_STRING(RID_STR_CONNECTERROR)); } - catch( Exception ) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -2962,9 +2963,8 @@ void SAL_CALL ODatabaseForm::unload() throw( RuntimeException ) if (xCloseable.is()) xCloseable->close(); } - catch( const SQLException& e ) + catch(const SQLException&) { - (void)e; } aGuard.reset(); } @@ -3020,10 +3020,9 @@ void ODatabaseForm::reload_impl(sal_Bool bMoveToFirst, const Reference< XInterac m_sCurrentErrorContext = FRM_RES_STRING(RID_ERR_REFRESHING_FORM); bSuccess = executeRowSet(aGuard, bMoveToFirst, _rxCompletionHandler); } - catch( const SQLException& e ) + catch(const SQLException&) { OSL_FAIL("ODatabaseForm::reload_impl : shouldn't executeRowSet catch this exception?"); - (void)e; } if (bSuccess) @@ -3122,19 +3121,22 @@ bool ODatabaseForm::impl_approveRowChange_throw( const EventObject& _rEvent, con if ( !xListener->approveRowSetChange( _rEvent ) ) return false; } - catch ( const DisposedException& e ) + catch (const DisposedException& e) { if ( e.Context == xListener ) aIter.remove(); } - catch ( const RuntimeException& ) { throw; } - catch ( const SQLException& ) + catch (const RuntimeException&) + { + throw; + } + catch (const SQLException&) { if ( _bAllowSQLException ) throw; DBG_UNHANDLED_EXCEPTION(); } - catch ( const Exception& ) + catch (const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -3163,13 +3165,16 @@ sal_Bool SAL_CALL ODatabaseForm::approveCursorMove(const EventObject& event) thr if ( !xListener->approveCursorMove( event ) ) return sal_False; } - catch ( const DisposedException& e ) + catch (const DisposedException& e) { if ( e.Context == xListener ) aIter.remove(); } - catch ( const RuntimeException& ) { throw; } - catch ( const Exception& ) + catch (const RuntimeException&) + { + throw; + } + catch (const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -3209,13 +3214,16 @@ sal_Bool SAL_CALL ODatabaseForm::approveRowChange(const RowChangeEvent& event) t if ( !xListener->approveRowChange( event ) ) return false; } - catch ( const DisposedException& e ) + catch (const DisposedException& e) { if ( e.Context == xListener ) aIter.remove(); } - catch ( const RuntimeException& ) { throw; } - catch ( const Exception& ) + catch (const RuntimeException&) + { + throw; + } + catch (const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -3499,12 +3507,11 @@ void SAL_CALL ODatabaseForm::insertRow() throw( SQLException, RuntimeException ) if (query_aggregation( m_xAggregate, xUpdate)) xUpdate->insertRow(); } - catch( const RowSetVetoException& eVeto ) + catch(const RowSetVetoException&) { - (void)eVeto; throw; } - catch(SQLException& eDb) + catch(const SQLException& eDb) { onError(eDb, FRM_RES_STRING(RID_STR_ERR_INSERTRECORD)); throw; @@ -3520,12 +3527,11 @@ void SAL_CALL ODatabaseForm::updateRow() throw( SQLException, RuntimeException ) if (query_aggregation( m_xAggregate, xUpdate)) xUpdate->updateRow(); } - catch( const RowSetVetoException& eVeto ) + catch(const RowSetVetoException&) { - (void)eVeto; throw; } - catch(SQLException& eDb) + catch(const SQLException& eDb) { onError(eDb, FRM_RES_STRING(RID_STR_ERR_UPDATERECORD)); throw; @@ -3541,12 +3547,11 @@ void SAL_CALL ODatabaseForm::deleteRow() throw( SQLException, RuntimeException ) if (query_aggregation( m_xAggregate, xUpdate)) xUpdate->deleteRow(); } - catch( const RowSetVetoException& eVeto ) + catch(const RowSetVetoException&) { - (void)eVeto; throw; } - catch(SQLException& eDb) + catch(const SQLException& eDb) { onError(eDb, FRM_RES_STRING(RID_STR_ERR_DELETERECORD)); throw; @@ -3562,12 +3567,11 @@ void SAL_CALL ODatabaseForm::cancelRowUpdates() throw( SQLException, RuntimeExce if (query_aggregation( m_xAggregate, xUpdate)) xUpdate->cancelRowUpdates(); } - catch( const RowSetVetoException& eVeto ) + catch(const RowSetVetoException&) { - (void)eVeto; throw; } - catch(SQLException& eDb) + catch(const SQLException& eDb) { onError(eDb, FRM_RES_STRING(RID_STR_ERR_INSERTRECORD)); throw; @@ -3627,12 +3631,11 @@ Sequence SAL_CALL ODatabaseForm::deleteRows(const Sequence& rows if (query_aggregation( m_xAggregate, xDelete)) return xDelete->deleteRows(rows); } - catch( const RowSetVetoException& eVeto ) + catch(const RowSetVetoException&) { - (void)eVeto; // make compiler happy throw; } - catch(SQLException& eDb) + catch(const SQLException& eDb) { onError(eDb, FRM_RES_STRING(RID_STR_ERR_DELETERECORDS)); throw; diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index a88646c36..5a2097a71 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -485,7 +485,7 @@ namespace { _rxDest->setPropertyValue( pSourceProps->Name, _rxSource->getPropertyValue( pSourceProps->Name ) ); } - catch( IllegalArgumentException e ) + catch(const IllegalArgumentException& e) { #if OSL_DEBUG_LEVEL > 0 ::rtl::OString sMessage( "could not transfer the property named '" ); @@ -497,6 +497,8 @@ namespace sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US ); } OSL_FAIL( sMessage.getStr() ); +#else + (void)e; #endif } -- cgit v1.2.3 From 8e92cfae4c351bdeca6cad3f3756882f02c602fe Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Thu, 16 Jun 2011 11:00:08 +0200 Subject: remove Telnet option from Insert Hyperlink dialog --- cui/source/dialogs/cuihyperdlg.cxx | 1 - cui/source/dialogs/hlinettp.cxx | 21 +++------------------ cui/source/dialogs/hltpbase.cxx | 4 ---- cui/source/dialogs/hyperdlg.hrc | 1 - cui/source/dialogs/hyperdlg.src | 9 +-------- cui/source/inc/hlinettp.hxx | 7 +++---- cui/source/inc/hltpbase.hxx | 2 -- 7 files changed, 7 insertions(+), 38 deletions(-) diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 64be609e5..1e15f89f5 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -290,7 +290,6 @@ sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem ) { case INET_PROT_HTTP : case INET_PROT_FTP : - case INET_PROT_TELNET : nPageId = RID_SVXPAGE_HYPERLINK_INTERNET; break; case INET_PROT_FILE : diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index a887388b8..2e2b58d13 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -41,7 +41,6 @@ sal_Char const sAnonymous[] = "anonymous"; sal_Char const sHTTPScheme[] = INET_HTTP_SCHEME; sal_Char const sHTTPSScheme[] = INET_HTTPS_SCHEME; sal_Char const sFTPScheme[] = INET_FTP_SCHEME; -sal_Char const sTelnetScheme[] = INET_TELNET_SCHEME; /************************************************************************* |* @@ -56,7 +55,6 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent, maGrpLinkTyp ( this, CUI_RES (GRP_LINKTYPE) ), maRbtLinktypInternet ( this, CUI_RES (RB_LINKTYP_INTERNET) ), maRbtLinktypFTP ( this, CUI_RES (RB_LINKTYP_FTP) ), - maRbtLinktypTelnet ( this, CUI_RES (RB_LINKTYP_TELNET) ), maFtTarget ( this, CUI_RES (FT_TARGET_HTML) ), maCbbTarget ( this, INET_PROT_HTTP ), maBtBrowse ( this, CUI_RES (BTN_BROWSE) ), @@ -112,7 +110,6 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent, Link aLink( LINK ( this, SvxHyperlinkInternetTp, Click_SmartProtocol_Impl ) ); maRbtLinktypInternet.SetClickHdl( aLink ); maRbtLinktypFTP.SetClickHdl ( aLink ); - maRbtLinktypTelnet.SetClickHdl ( aLink ); maCbAnonymous.SetClickHdl ( LINK ( this, SvxHyperlinkInternetTp, ClickAnonymousHdl_Impl ) ); maBtBrowse.SetClickHdl ( LINK ( this, SvxHyperlinkInternetTp, ClickBrowseHdl_Impl ) ); maBtTarget.SetClickHdl ( LINK ( this, SvxHyperlinkInternetTp, ClickTargetHdl_Impl ) ); @@ -308,14 +305,10 @@ void SvxHyperlinkInternetTp::SetScheme( const String& aScheme ) //if aScheme is empty or unknown the default beaviour is like it where HTTP sal_Bool bFTP = aScheme.SearchAscii( sFTPScheme ) == 0; - sal_Bool bTelnet = sal_False; - if( !bFTP ) - bTelnet = aScheme.SearchAscii( sTelnetScheme ) == 0; - sal_Bool bInternet = !(bFTP || bTelnet); + sal_Bool bInternet = !(bFTP); //update protocol button selection: maRbtLinktypFTP.Check(bFTP); - maRbtLinktypTelnet.Check(bTelnet); maRbtLinktypInternet.Check(bInternet); //update target: @@ -338,7 +331,7 @@ void SvxHyperlinkInternetTp::SetScheme( const String& aScheme ) } else { - //disable for https, ftp and telnet + //disable for https and ftp maBtTarget.Disable(); if ( mbMarkWndOpen ) HideMarkWnd (); @@ -371,10 +364,6 @@ String SvxHyperlinkInternetTp::GetSchemeFromButtons() const { return String::CreateFromAscii( INET_FTP_SCHEME ); } - else if( maRbtLinktypTelnet.IsChecked() ) - { - return String::CreateFromAscii( INET_TELNET_SCHEME ); - } return String::CreateFromAscii( INET_HTTP_SCHEME ); } @@ -384,16 +373,12 @@ INetProtocol SvxHyperlinkInternetTp::GetSmartProtocolFromButtons() const { return INET_PROT_FTP; } - else if( maRbtLinktypTelnet.IsChecked() ) - { - return INET_PROT_TELNET; - } return INET_PROT_HTTP; } /************************************************************************* |* -|* Click on Radiobutton : Internet, FTP or Telnet +|* Click on Radiobutton : Internet or FTP |* |************************************************************************/ diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 846c112ef..963bb2aea 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -578,10 +578,6 @@ String SvxHyperlinkTabPageBase::GetSchemeFromURL( String aStrURL ) { aStrScheme = String::CreateFromAscii( INET_NEWS_SCHEME ); } - else if ( aStrURL.EqualsIgnoreCaseAscii( INET_TELNET_SCHEME, 0, 9 ) ) - { - aStrScheme = String::CreateFromAscii( INET_TELNET_SCHEME ); - } } else aStrScheme = INetURLObject::GetScheme( aProtocol ); diff --git a/cui/source/dialogs/hyperdlg.hrc b/cui/source/dialogs/hyperdlg.hrc index 9fed5576a..7c2c08109 100644 --- a/cui/source/dialogs/hyperdlg.hrc +++ b/cui/source/dialogs/hyperdlg.hrc @@ -30,7 +30,6 @@ #define GRP_LINKTYPE 1 #define RB_LINKTYP_INTERNET 2 #define RB_LINKTYP_FTP 3 -#define RB_LINKTYP_TELNET 4 #define FT_TARGET_HTML 5 #define CB_TARGET_HTML 6 #define FT_LOGIN 7 diff --git a/cui/source/dialogs/hyperdlg.src b/cui/source/dialogs/hyperdlg.src index 47b11b34f..d98659310 100644 --- a/cui/source/dialogs/hyperdlg.src +++ b/cui/source/dialogs/hyperdlg.src @@ -68,13 +68,6 @@ TabPage RID_SVXPAGE_HYPERLINK_INTERNET Size = MAP_APPFONT( 56 - COL_DIFF, 10 ); Text [ en-US ] = "~FTP"; }; - RadioButton RB_LINKTYP_TELNET - { - HelpID = "cui:RadioButton:RID_SVXPAGE_HYPERLINK_INTERNET:RB_LINKTYP_TELNET"; - Pos = MAP_APPFONT( 173, 13 ); - Size = MAP_APPFONT( 56, 10 ); - Text [ en-US ] = "~Telnet"; - }; FixedText FT_TARGET_HTML { Pos = MAP_APPFONT ( 12 , 26 ) ; @@ -783,7 +776,7 @@ String RID_SVXSTR_HYPERDLG_HLINETTP }; String RID_SVXSTR_HYPERDLG_HLINETTP_HELP { - Text [ en-US ] = "This is where you create a hyperlink to a Web page, FTP server or Telnet connection." ; + Text [ en-US ] = "This is where you create a hyperlink to a Web page or FTP server connection." ; }; String RID_SVXSTR_HYPERDLG_HLMAILTP diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx index 1f3efbfcb..73f99df89 100644 --- a/cui/source/inc/hlinettp.hxx +++ b/cui/source/inc/hlinettp.hxx @@ -44,7 +44,6 @@ private: FixedLine maGrpLinkTyp; RadioButton maRbtLinktypInternet; RadioButton maRbtLinktypFTP; - RadioButton maRbtLinktypTelnet; FixedText maFtTarget; SvxHyperURLBox maCbbTarget; ImageButton maBtBrowse; @@ -62,10 +61,10 @@ private: String maStrStdDocURL; - DECL_LINK (Click_SmartProtocol_Impl , void * ); // Radiobutton clicked: Type Internet, FTP or Telnet - DECL_LINK (ClickAnonymousHdl_Impl , void * ); // Checkbox : Anonymer Benutzer + DECL_LINK (Click_SmartProtocol_Impl , void * ); // Radiobutton clicked: Type HTTP or FTP + DECL_LINK (ClickAnonymousHdl_Impl , void * ); // Checkbox : Anonymous User DECL_LINK (ClickBrowseHdl_Impl , void * ); // Button : Browse - DECL_LINK (ClickTargetHdl_Impl , void * ); // Button : Ziel + DECL_LINK (ClickTargetHdl_Impl , void * ); // Button : Target DECL_LINK (ModifiedLoginHdl_Impl , void * ); // Contens of editfield "Login" modified DECL_LINK (LostFocusTargetHdl_Impl , void * ); // Combobox "Target" lost its focus DECL_LINK (ModifiedTargetHdl_Impl , void * ); // Contens of editfield "Target" modified diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx index 97aa97492..e90ba1495 100644 --- a/cui/source/inc/hltpbase.hxx +++ b/cui/source/inc/hltpbase.hxx @@ -28,8 +28,6 @@ #ifndef _SVX_TABBASE_HYPERLINK_HXX #define _SVX_TABBASE_HYPERLINK_HXX -#define INET_TELNET_SCHEME "telnet://" - #include #include #include -- cgit v1.2.3 From 8e94dc8172af22a86ddbb52c8c9504eca0575ae0 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 16 Jun 2011 17:41:29 +0200 Subject: Add listeners and optimize. - Add listeners to the steps on the left. - The wizard dialog is loaded much faster ( ~5 second faster than before ) --- wizards/com/sun/star/wizards/RemoteFaxWizard | 0 .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 4 +- .../com/sun/star/wizards/text/TextFieldHandler.py | 80 ++++++++-------- wizards/com/sun/star/wizards/ui/UnoDialog.py | 10 +- wizards/com/sun/star/wizards/ui/WizardDialog.py | 101 ++++++++------------- .../sun/star/wizards/ui/event/CommonListener.py | 5 +- .../com/sun/star/wizards/ui/event/EventNames.py | 15 --- 7 files changed, 93 insertions(+), 122 deletions(-) mode change 100644 => 100755 wizards/com/sun/star/wizards/RemoteFaxWizard delete mode 100644 wizards/com/sun/star/wizards/ui/event/EventNames.py diff --git a/wizards/com/sun/star/wizards/RemoteFaxWizard b/wizards/com/sun/star/wizards/RemoteFaxWizard old mode 100644 new mode 100755 diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 9ffade4bf..1905ae610 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -65,7 +65,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.running = True try: #Number of steps on WizardDialog: - self.setMaxStep(5) + self.nMaxStep = 5 #instatiate The Document Frame for the Preview self.myFaxDoc = FaxDocument(xMSF, self) @@ -133,7 +133,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.running = False def finishWizard(self): - self.switchToStep(self.getCurrentStep(), self.getMaxStep()) + self.switchToStep(self.getCurrentStep(), self.nMaxStep) self.myFaxDoc.setWizardTemplateDocInfo( \ self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.py b/wizards/com/sun/star/wizards/text/TextFieldHandler.py index c49267429..d9e3ed842 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.py +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.py @@ -4,6 +4,8 @@ from com.sun.star.util import DateTime from common.PropertyNames import PropertyNames import unicodedata +import inspect + class TextFieldHandler(object): ''' Creates a new instance of TextFieldHandler @@ -11,9 +13,16 @@ class TextFieldHandler(object): @param xTextDocument ''' + xTextFieldsSupplierAux = None + dictTextFields = None + def __init__(self, xMSF, xTextDocument): self.xMSFDoc = xMSF self.xTextFieldsSupplier = xTextDocument + if TextFieldHandler.xTextFieldsSupplierAux is not \ + self.xTextFieldsSupplier: + self.__getTextFields() + TextFieldHandler.xTextFieldsSupplierAux = self.xTextFieldsSupplier def refreshTextFields(self): xUp = self.xTextFieldsSupplier.TextFields @@ -40,9 +49,9 @@ class TextFieldHandler(object): xField = self.xMSFDoc.createInstance( "com.sun.star.text.TextField.User") - if self.xTextFieldsSupplier.getTextFieldMasters().hasByName( + if self.xTextFieldsSupplier.TextFieldMasters.hasByName( "com.sun.star.text.FieldMaster.User." + FieldName): - oMaster = self.xTextFieldsSupplier.getTextFieldMasters().getByName( \ + oMaster = self.xTextFieldsSupplier.TextFieldMasters.getByName( \ "com.sun.star.text.FieldMaster.User." + FieldName) oMaster.dispose() @@ -60,55 +69,52 @@ class TextFieldHandler(object): xPSet.setPropertyValue("Content", FieldTitle) return xPSet - def __getTextFieldsByProperty( - self, _PropertyName, _aPropertyValue, _TypeName): + def __getTextFields(self): try: if self.xTextFieldsSupplier.TextFields.hasElements(): + TextFieldHandler.dictTextFields = {} xEnum = \ self.xTextFieldsSupplier.TextFields.createEnumeration() - xDependentVector = [] while xEnum.hasMoreElements(): oTextField = xEnum.nextElement() xPropertySet = oTextField.TextFieldMaster - if xPropertySet.PropertySetInfo.hasPropertyByName( - _PropertyName): - oValue = xPropertySet.getPropertyValue(_PropertyName) - if isinstance(oValue,unicode): - if _TypeName == "String": - sValue = unicodedata.normalize( - 'NFKD', oValue).encode('ascii','ignore') - if sValue == _aPropertyValue: - xDependentVector.append(oTextField) - #COMMENTED - '''elif AnyConverter.isShort(oValue): - if _TypeName.equals("Short"): - iShortParam = (_aPropertyValue).shortValue() - ishortValue = AnyConverter.toShort(oValue) - if ishortValue == iShortParam: - xDependentVector.append(oTextField) ''' - if xDependentVector: - return xDependentVector - else: - return None - + if len(xPropertySet.Name) is not 0: + TextFieldHandler.dictTextFields[xPropertySet.Name] = \ + oTextField except Exception, e: #TODO Auto-generated catch block traceback.print_exc() - return None + def __getTextFieldsByProperty( + self, _PropertyName, _aPropertyValue, _TypeName): + try: + xProperty = TextFieldHandler.dictTextFields[_aPropertyValue] + xPropertySet = xProperty.TextFieldMaster + if xPropertySet.PropertySetInfo.hasPropertyByName( + _PropertyName): + oValue = xPropertySet.getPropertyValue(_PropertyName) + if _TypeName == "String": + sValue = unicodedata.normalize( + 'NFKD', oValue).encode('ascii','ignore') + if sValue == _aPropertyValue: + return xProperty + #COMMENTED + '''elif AnyConverter.isShort(oValue): + if _TypeName.equals("Short"): + iShortParam = (_aPropertyValue).shortValue() + ishortValue = AnyConverter.toShort(oValue) + if ishortValue == iShortParam: + xDependentVector.append(oTextField) ''' + return None + except KeyError, e: + return None def changeUserFieldContent(self, _FieldName, _FieldContent): - try: - xDependentTextFields = self.__getTextFieldsByProperty( + DependentTextFields = self.__getTextFieldsByProperty( PropertyNames.PROPERTY_NAME, _FieldName, "String") - if xDependentTextFields != None: - for i in xDependentTextFields: - i.getTextFieldMaster().setPropertyValue( - "Content", _FieldContent) - self.refreshTextFields() - - except Exception, e: - traceback.print_exc() + if DependentTextFields is not None: + DependentTextFields.TextFieldMaster.setPropertyValue("Content", _FieldContent) + self.refreshTextFields() def updateDocInfoFields(self): try: diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index 32ac6e51b..551d0e39e 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -502,7 +502,7 @@ class UnoDialog(object): ''' def executeDialogFromParent(self, parent): - return self.executeDialog(parent.xWindow.getPosSize()) + return self.executeDialog(parent.xWindow.PosSize) ''' @param XComponent @@ -511,10 +511,10 @@ class UnoDialog(object): ''' def executeDialogFromComponent(self, xComponent): - if xComponent != None: - w = xComponent.getComponentWindow() - if w != None: - return self.executeDialog(w.getPosSize()) + if xComponent is not None: + w = xComponent.ComponentWindow + if w is not None: + return self.executeDialog(w.PosSize) return self.executeDialog( Rectangle (0, 0, 640, 400)) diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index 23c099efd..4ed4fe35f 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -37,9 +37,9 @@ class WizardDialog(UnoDialog2): super(WizardDialog,self).__init__(xMSF) self.__hid = hid_ self.__iButtonWidth = 50 - self.__nNewStep = 1 - self.__nOldStep = 1 - self.__nMaxStep = 1 + self.nNewStep = 1 + self.nOldStep = 1 + self.nMaxStep = 1 self.__bTerminateListenermustberemoved = True self.__oWizardResource = Resource(xMSF, "dbw") self.sMsgEndAutopilot = self.__oWizardResource.getResText( @@ -59,35 +59,14 @@ class WizardDialog(UnoDialog2): pass # do nothing; - def setMaxStep(self, i): - self.__nMaxStep = i - - def getMaxStep(self): - return self.__nMaxStep - - def setOldStep(self, i): - self.__nOldStep = i - - def getOldStep(self): - return self.__nOldStep - - def setNewStep(self, i): - self.__nNewStep = i - - def getNewStep(self): - return self.__nNewStep - - def vetoableChange(self, arg0): - self.__nNewStep = self.__nOldStep - def itemStateChanged(self, itemEvent): try: - self.__nNewStep = itemEvent.ItemId - self.__nOldStep = int(Helper.getUnoPropertyValue( + self.nNewStep = itemEvent.ItemId + self.nOldStep = int(Helper.getUnoPropertyValue( self.xDialogModel, PropertyNames.PROPERTY_STEP)) - if self.__nNewStep != self.__nOldStep: - switchToStep() + if self.nNewStep != self.nOldStep: + self.switchToStep() except IllegalArgumentException, exception: traceback.print_exc() @@ -142,10 +121,10 @@ class WizardDialog(UnoDialog2): self.oRoadmap.setPropertyValue( PropertyNames.PROPERTY_NAME, "rdmNavi") - mi = MethodInvocation("itemStateChanged", self) self.xRoadmapControl = self.xUnoDialog.getControl("rdmNavi") + method = getattr(self, "itemStateChanged") self.xRoadmapControl.addItemListener( - ItemListenerProcAdapter(None)) + ItemListenerProcAdapter(method)) Helper.setUnoPropertyValue( self.oRoadmap, "Text", @@ -157,17 +136,15 @@ class WizardDialog(UnoDialog2): def setRMItemLabels(self, _oResource, StartResID): self.sRMItemLabels = _oResource.getResArray( - StartResID, self.__nMaxStep) + StartResID, self.nMaxStep) def getRMItemLabels(self): return self.sRMItemLabels - def insertRoadmapItem(self, _Index, _bEnabled, _LabelID, _CurItemID): - return insertRoadmapItem( - _Index, _bEnabled, self.sRMItemLabels(_LabelID), _CurItemID) - def insertRoadmapItem(self, Index, _bEnabled, _sLabel, _CurItemID): try: + if isinstance(_sLabel, int): + _sLabel = self.sRMItemLabels(_sLabel) oRoadmapItem = self.oRoadmap.createInstance() Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_LABEL, _sLabel) @@ -201,12 +178,12 @@ class WizardDialog(UnoDialog2): def switchToStep(self,_nOldStep=None, _nNewStep=None): if _nOldStep is not None and _nNewStep is not None: - self.__nOldStep = _nOldStep - self.__nNewStep = _nNewStep + self.nOldStep = _nOldStep + self.nNewStep = _nNewStep - self.leaveStep(self.__nOldStep, self.__nNewStep) - if self.__nNewStep != self.__nOldStep: - if self.__nNewStep == self.__nMaxStep: + self.leaveStep(self.nOldStep, self.nNewStep) + if self.nNewStep != self.nOldStep: + if self.nNewStep == self.nMaxStep: self.setControlProperty( "btnWizardNext", "DefaultButton", False) self.setControlProperty( @@ -217,8 +194,8 @@ class WizardDialog(UnoDialog2): self.setControlProperty( "btnWizardFinish", "DefaultButton", False) - self.changeToStep(self.__nNewStep) - self.enterStep(self.__nOldStep, self.__nNewStep) + self.changeToStep(self.nNewStep) + self.enterStep(self.nOldStep, self.nNewStep) return True return False @@ -382,16 +359,16 @@ class WizardDialog(UnoDialog2): PropertyNames.PROPERTY_ENABLED, bEnabled) def enablefromStep(self, _iStep, _bDoEnable): - if _iStep <= self.__nMaxStep: + if _iStep <= self.nMaxStep: i = _iStep - while i <= self.__nMaxStep: + while i <= self.nMaxStep: setStepEnabled(i, _bDoEnable) i += 1 enableFinishButton(_bDoEnable) if not _bDoEnable: enableNextButton(_iStep > getCurrentStep() + 1) else: - enableNextButton(not (getCurrentStep() == self.__nMaxStep)) + enableNextButton(not (getCurrentStep() == self.nMaxStep)) def isStepEnabled(self, _nStep): try: @@ -408,17 +385,17 @@ class WizardDialog(UnoDialog2): def gotoPreviousAvailableStep(self): try: - if self.__nNewStep > 1: - self.__nOldStep = self.__nNewStep - self.__nNewStep -= 1 - while self.__nNewStep > 0: - bIsEnabled = self.isStepEnabled(self.__nNewStep) + if self.nNewStep > 1: + self.nOldStep = self.nNewStep + self.nNewStep -= 1 + while self.nNewStep > 0: + bIsEnabled = self.isStepEnabled(self.nNewStep) if bIsEnabled: break; - self.__nNewStep -= 1 - if (self.__nNewStep == 0): - self.__nNewStep = self.__nOldStep + self.nNewStep -= 1 + if (self.nNewStep == 0): + self.nNewStep = self.nOldStep self.switchToStep() except Exception, e: traceback.print_exc() @@ -427,8 +404,8 @@ class WizardDialog(UnoDialog2): def getNextAvailableStep(self): if self.isRoadmapComplete(): - i = self.__nNewStep + 1 - while i <= self.__nMaxStep: + i = self.nNewStep + 1 + while i <= self.nMaxStep: if self.isStepEnabled(i): return i @@ -438,9 +415,9 @@ class WizardDialog(UnoDialog2): def gotoNextAvailableStep(self): try: - self.__nOldStep = self.__nNewStep - self.__nNewStep = self.getNextAvailableStep() - if self.__nNewStep > -1: + self.nOldStep = self.nNewStep + self.nNewStep = self.getNextAvailableStep() + if self.nNewStep > -1: self.switchToStep() except Exception, e: traceback.print_exc() @@ -467,7 +444,7 @@ class WizardDialog(UnoDialog2): traceback.print_exc() def getMaximalStep(self): - return self.__nMaxStep + return self.nMaxStep def getCurrentStep(self): try: @@ -478,15 +455,15 @@ class WizardDialog(UnoDialog2): return -1 def setCurrentStep(self, _nNewstep): - self.__nNewStep = _nNewstep - changeToStep(self.__nNewStep) + self.nNewStep = _nNewstep + changeToStep(self.nNewStep) def setRightPaneHeaders(self, _oResource, StartResID, _nMaxStep): self.sRightPaneHeaders = _oResource.getResArray(StartResID, _nMaxStep) setRightPaneHeaders(self.sRightPaneHeaders) def setRightPaneHeaders(self, _sRightPaneHeaders): - self.__nMaxStep = _sRightPaneHeaders.length + self.nMaxStep = _sRightPaneHeaders.length self.sRightPaneHeaders = _sRightPaneHeaders oFontDesc = FontDescriptor.FontDescriptor() oFontDesc.Weight = com.sun.star.awt.FontWeight.BOLD diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py index 24ff52172..73a52c961 100644 --- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py +++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py @@ -75,7 +75,10 @@ class ItemListenerProcAdapter( unohelper.Base, XItemListener ): # oItemEvent is a com.sun.star.awt.ItemEvent struct. def itemStateChanged( self, oItemEvent ): if callable( self.oProcToCall ): - apply( self.oProcToCall ) + try: + apply( self.oProcToCall) + except: + apply( self.oProcToCall, (oItemEvent,) + self.tParams ) #-------------------------------------------------- diff --git a/wizards/com/sun/star/wizards/ui/event/EventNames.py b/wizards/com/sun/star/wizards/ui/event/EventNames.py deleted file mode 100644 index 49845ceb1..000000000 --- a/wizards/com/sun/star/wizards/ui/event/EventNames.py +++ /dev/null @@ -1,15 +0,0 @@ -EVENT_ACTION_PERFORMED = "APR" -EVENT_ITEM_CHANGED = "ICH" -EVENT_TEXT_CHANGED = "TCH" #window events (XWindow) -EVENT_WINDOW_RESIZED = "WRE" -EVENT_WINDOW_MOVED = "WMO" -EVENT_WINDOW_SHOWN = "WSH" -EVENT_WINDOW_HIDDEN = "WHI" #focus events (XWindow) -EVENT_FOCUS_GAINED = "FGA" -EVENT_FOCUS_LOST = "FLO" #keyboard events -EVENT_KEY_PRESSED = "KPR" -EVENT_KEY_RELEASED = "KRE" #mouse events -EVENT_MOUSE_PRESSED = "MPR" -EVENT_MOUSE_RELEASED = "MRE" -EVENT_MOUSE_ENTERED = "MEN" -EVENT_MOUSE_EXITED = "MEX" -- cgit v1.2.3 From 3bb9d47fa675ae9e16f0452af04ad0c9191f62b2 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 16 Jun 2011 19:47:04 +0200 Subject: Remove unused class --- wizards/com/sun/star/wizards/common/FileAccess.py | 12 ++++---- wizards/com/sun/star/wizards/fax/CallWizard.py | 6 ++-- wizards/com/sun/star/wizards/fax/FaxDocument.py | 13 ++++---- .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 20 ++++++------- wizards/com/sun/star/wizards/text/TextDocument.py | 10 +++---- wizards/com/sun/star/wizards/ui/PeerConfig.py | 2 +- wizards/com/sun/star/wizards/ui/WizardDialog.py | 4 +-- wizards/com/sun/star/wizards/ui/event/DataAware.py | 13 ++++---- .../sun/star/wizards/ui/event/MethodInvocation.py | 35 ---------------------- 9 files changed, 40 insertions(+), 75 deletions(-) delete mode 100644 wizards/com/sun/star/wizards/ui/event/MethodInvocation.py diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index c129b6b84..83a447257 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -391,8 +391,6 @@ class FileAccess(object): def getFolderTitles(self, xMSF, FilterName, FolderName): LocLayoutFiles = [[2],[]] try: - TitleVector = None - NameVector = None xDocInterface = xMSF.createInstance( "com.sun.star.document.DocumentProperties") xInterface = xMSF.createInstance( @@ -400,17 +398,19 @@ class FileAccess(object): nameList = xInterface.getFolderContents(FolderName, False) TitleVector = [] NameVector = [] - if FilterName == None or FilterName == "": + if FilterName is None or FilterName == "": FilterName = None else: FilterName = FilterName + "-" fileName = "" + NameVectorAppend = NameVector.append + TitleVectoAppend = TitleVector.append for i in nameList: fileName = self.getFilename(i) - if FilterName == None or fileName.startswith(FilterName): + if FilterName is None or fileName.startswith(FilterName): xDocInterface.loadFromMedium(i, tuple()) - NameVector.append(i) - TitleVector.append(xDocInterface.Title) + NameVectorAppend(i) + TitleVectoAppend(xDocInterface.Title) LocLayoutFiles[1] = NameVector LocLayoutFiles[0] = TitleVector diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.py b/wizards/com/sun/star/wizards/fax/CallWizard.py index 6faa3490d..21414507e 100644 --- a/wizards/com/sun/star/wizards/fax/CallWizard.py +++ b/wizards/com/sun/star/wizards/fax/CallWizard.py @@ -20,7 +20,7 @@ class CallWizard(object): xregistrykey): xsingleservicefactory = None - if stringImplementationName.equals(WizardImplementation.getName()): + if stringImplementationName.equals(WizardImplementation.Name): xsingleservicefactory = FactoryHelper.getServiceFactory( \ WizardImplementation, WizardImplementation.__serviceName, xMSF, xregistrykey) @@ -123,7 +123,7 @@ class CallWizard(object): def getImplementationId(self): byteReturn = [] try: - byteReturn = ("" + self.hashCode()).getBytes() + byteReturn = ("" + self.hashCode()).Bytes except Exception, exception: traceback.print_exc() @@ -135,7 +135,7 @@ class CallWizard(object): ''' def getImplementationName(self): - return (WizardImplementation.getName()) + return (WizardImplementation.Name) ''' Provides a sequence of all types (usually interface types) provided diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py index 8c0f0c458..f07917dd8 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.py +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -34,7 +34,7 @@ class FaxDocument(TextDocument): FH.updateDateFields() def switchFooter(self, sPageStyle, bState, bPageNumber, sText): - if self.xTextDocument != None: + if self.xTextDocument is not None: self.xTextDocument.lockControllers() try: @@ -45,7 +45,7 @@ class FaxDocument(TextDocument): if bState: xPageStyle.setPropertyValue("FooterIsOn", True) xFooterText = propertySet.getPropertyValue("FooterText") - xFooterText.setString(sText) + xFooterText.String = sText if bPageNumber: #Adding the Page Number @@ -60,9 +60,8 @@ class FaxDocument(TextDocument): xPageNumberField.setPropertyValue( "NumberingType", uno.Any("short",ARABIC)) xPageNumberField.setPropertyValue("SubType", CURRENT) - xFooterText.insertTextContent(xFooterText.getEnd(), + xFooterText.insertTextContent(xFooterText.End, xPageNumberField, False) - else: Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", False) @@ -72,7 +71,7 @@ class FaxDocument(TextDocument): traceback.print_exc() def hasElement(self, sElement): - if self.xTextDocument != None: + if self.xTextDocument is not None: mySectionHandler = TextSectionHandler(self.xMSF, self.xTextDocument) return mySectionHandler.hasTextSectionByName(sElement) @@ -118,13 +117,13 @@ class FaxDocument(TextDocument): if not self.keepLogoFrame: xTF = TextFrameHandler.getFrameByName("Company Logo", self.xTextDocument) - if xTF != None: + if xTF is not None: xTF.dispose() if not self.keepTypeFrame: xTF = TextFrameHandler.getFrameByName("Communication Type", self.xTextDocument) - if xTF != None: + if xTF is not None: xTF.dispose() except UnoException, e: diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 1905ae610..5cae6d6b8 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -98,7 +98,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): if self.myPathSelection.xSaveTextBox.Text.lower() == "": self.myPathSelection.initializePath() - self.xContainerWindow = self.myFaxDoc.xFrame.getContainerWindow() + self.xContainerWindow = self.myFaxDoc.xFrame.ContainerWindow self.createWindowPeer(self.xContainerWindow) #add the Roadmap to the dialog: @@ -116,7 +116,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.initializeElements() #disable the document, so that the user cannot change anything: - self.myFaxDoc.xFrame.getComponentWindow().Enable = False + self.myFaxDoc.xFrame.ComponentWindow.Enable = False self.executeDialogFromComponent(self.myFaxDoc.xFrame) self.removeTerminateListener() @@ -133,16 +133,16 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.running = False def finishWizard(self): - self.switchToStep(self.getCurrentStep(), self.nMaxStep) + self.switchToStep(self.CurrentStep, self.nMaxStep) self.myFaxDoc.setWizardTemplateDocInfo( \ self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) try: fileAccess = FileAccess(self.xMSF) - self.sPath = self.myPathSelection.getSelectedPath() + self.sPath = self.myPathSelection.SelectedPath if self.sPath == "": self.myPathSelection.triggerPathPicker() - self.sPath = self.myPathSelection.getSelectedPath() + self.sPath = self.myPathSelection.SelectedPath print self.sPath self.sPath = fileAccess.getURL(self.sPath) @@ -152,7 +152,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): if not self.__filenameChanged: if fileAccess.exists(self.sPath, True): answer = SystemDialog.showMessageBox( \ - xMSF, xControl.getPeer(), "MessBox", + xMSF, xControl.Peer, "MessBox", VclWindowPeerAttribute.YES_NO + \ VclWindowPeerAttribute.DEF_NO, self.resources.resOverwriteWarning) @@ -198,7 +198,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), self.sPath, "_default", loadValues) - myViewHandler = oDoc.getCurrentController().getViewSettings() + myViewHandler = oDoc.CurrentController.ViewSettings myViewHandler.setPropertyValue("ZoomType", uno.Any("short",OPTIMAL)) else: @@ -445,7 +445,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.__setPossibleFooter(True) def lstBusinessStyleItemChanged(self): self.xTextDocument = self.myFaxDoc.loadAsPreview( \ - self.BusinessFiles[1][self.lstBusinessStyle.getSelectedItemPos()], + self.BusinessFiles[1][self.lstBusinessStyle.SelectedItemPos], False) self.initializeElements() self.setElements() @@ -467,13 +467,13 @@ class FaxWizardDialogImpl(FaxWizardDialog): def lstPrivateStyleItemChanged(self): self.xTextDocument = self.myFaxDoc.loadAsPreview( \ - self.PrivateFiles[1][self.lstPrivateStyle.getSelectedItemPos()], + self.PrivateFiles[1][self.lstPrivateStyle.SelectedItemPos], False) self.initializeElements() self.setElements() def txtTemplateNameTextChanged(self): - xDocProps = self.xTextDocument.getDocumentProperties() + xDocProps = self.xTextDocument.DocumentProperties xDocProps.Title = self.txtTemplateName.Text def optSenderPlaceholderItemChanged(self): diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index fed93fccb..7c564d5a2 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -169,17 +169,17 @@ class TextDocument(object): xTextCursor.gotoStart(False) com.sun.star.wizards.common.Helper.setUnoPropertyValue( xTextCursor, "PageDescName", "First Page") - xTextCursor.setString(ScaleString) + xTextCursor.String = ScaleString xViewCursor = self.xTextDocument.CurrentController - xTextViewCursor = xViewCursor.getViewCursor() + xTextViewCursor = xViewCursor.ViewCursor xTextViewCursor.gotoStart(False) - iFirstPos = xTextViewCursor.getPosition().X + iFirstPos = xTextViewCursor.Position.X xTextViewCursor.gotoEnd(False) - iLastPos = xTextViewCursor.getPosition().X + iLastPos = xTextViewCursor.Position.X iScale = (iLastPos - iFirstPos) / iScaleLen xTextCursor.gotoStart(False) xTextCursor.gotoEnd(True) - xTextCursor.setString("") + xTextCursor.String = "" unlockallControllers() return iScale diff --git a/wizards/com/sun/star/wizards/ui/PeerConfig.py b/wizards/com/sun/star/wizards/ui/PeerConfig.py index 7f0dba4b3..4647ad172 100644 --- a/wizards/com/sun/star/wizards/ui/PeerConfig.py +++ b/wizards/com/sun/star/wizards/ui/PeerConfig.py @@ -42,7 +42,7 @@ class PeerConfig(object): i = 0 while i < self.m_aPeerTasks.size(): aPeerTask = self.m_aPeerTasks.elementAt(i) - xVclWindowPeer = aPeerTask.xControl.getPeer() + xVclWindowPeer = aPeerTask.xControl.Peer n = 0 while n < aPeerTask.propnames.length: xVclWindowPeer.setProperty(aPeerTask.propnames[n], diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index 4ed4fe35f..ad46e2dbc 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -159,12 +159,12 @@ class WizardDialog(UnoDialog2): return -1 def getRMItemCount(self): - return self.oRoadmap.getCount() + return self.oRoadmap.Count def getRoadmapItemByID(self, _ID): try: i = 0 - while i < self.oRoadmap.getCount(): + while i < self.oRoadmap.Count: CurRoadmapItem = self.oRoadmap.getByIndex(i) CurID = int(Helper.getUnoPropertyValue(CurRoadmapItem, "ID")) if CurID == _ID: diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py b/wizards/com/sun/star/wizards/ui/event/DataAware.py index 2e7c3e323..f21b86b76 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.py @@ -77,7 +77,7 @@ class DataAware(object): def updateUI(self): data = self.getFromData() ui = self.getFromUI() - if data != ui: + if data is not ui: try: self.setToUI(data) except Exception, ex: @@ -145,10 +145,11 @@ class DataAware(object): ''' def setDataObject(self, dataObject, updateUI): - if dataObject != None and not (type(self._value) is not - type(dataObject)): - raise ClassCastException ( - "can not cast new DataObject to original Class") + if dataObject is not None: + if not (type(self._value) is not + type(dataObject)): + raise ClassCastException ( + "can not cast new DataObject to original Class") self._dataObject = dataObject if updateUI: self.updateUI() @@ -166,7 +167,7 @@ class DataAware(object): @classmethod def setDataObjects(self, dataAwares, dataObject, updateUI): for i in dataAwares: - i.setDataObject(dataObject, updateUI); + i.setDataObject(dataObject, updateUI) ''' Value objects read and write a value from and diff --git a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py deleted file mode 100644 index 2bdbcc6be..000000000 --- a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py +++ /dev/null @@ -1,35 +0,0 @@ -'''import java.lang.reflect.InvocationTargetException; - -import java.lang.reflect.Method; - -import com.sun.star.wizards.common.PropertyNames; -''' - -'''Encapsulate a Method invocation. -In the constructor one defines a method, a target object and an optional -Parameter. -Then one calls "invoke", with or without a parameter.
    -Limitations: I do not check anything myself. If the param is not ok, from the -wrong type, or the mothod doesnot exist on the given object. -You can trick this class howmuch you want: it will all throw exceptions -on the java level. i throw no error warnings or my own excceptions... -''' - -class MethodInvocation(object): - - EMPTY_ARRAY = () - - '''Creates a new instance of MethodInvokation''' - def __init__(self, method, obj, paramClass=None): - self.mMethod = method - self.mObject = obj - self.mWithParam = not (paramClass==None) - - '''Returns the result of calling the method on the object, or null, - if no result. ''' - - def invoke(self, param=None): - if self.mWithParam: - return self.mMethod.invoke(self.mObject, (param)) - else: - return self.mMethod.invoke(self.mObject, EMPTY_ARRAY) -- cgit v1.2.3 From e9d206d6407083b7c8fe24792f6e17f2bf2d6746 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 16 Jun 2011 01:15:41 +0300 Subject: Use DESKTOP and NATIVE where appropriate --- extensions/prj/build.lst | 2 +- wizards/prj/build.lst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/prj/build.lst b/extensions/prj/build.lst index 9e31422bc..f39f66560 100644 --- a/extensions/prj/build.lst +++ b/extensions/prj/build.lst @@ -1,4 +1,4 @@ -ex extensions : officecfg TRANSLATIONS:translations rdbmaker svx SANE:sane TWAIN:twain np_sdk offuh stoc ZLIB:zlib CURL:curl LIBXSLT:libxslt NULL +ex extensions : officecfg TRANSLATIONS:translations DESKTOP:rdbmaker svx SANE:sane TWAIN:twain np_sdk offuh stoc ZLIB:zlib CURL:curl LIBXSLT:libxslt NULL ex extensions usr1 - all ex_mkout NULL ex extensions\inc nmake - all ex_inc NULL diff --git a/wizards/prj/build.lst b/wizards/prj/build.lst index 0b8b1e0fc..09c8333ba 100644 --- a/wizards/prj/build.lst +++ b/wizards/prj/build.lst @@ -1,4 +1,4 @@ -wz wizards : TRANSLATIONS:translations rsc javaunohelper unoil LIBXSLT:libxslt NULL +wz wizards : TRANSLATIONS:translations DESKTOP:rsc javaunohelper unoil LIBXSLT:libxslt NULL wz wizards\util nmake - all wz_util NULL wz wizards\source\config nmake - all wz_config NULL wz wizards\source\configshare nmake - all wz_configshare NULL -- cgit v1.2.3 From 436ae0a64241f0c2bc134aa674a7937d98187fb2 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 16 Jun 2011 20:53:01 +0300 Subject: Add numbers for iOS and Android --- automation/source/testtool/objtest.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx index b55e062f5..7ad2778ce 100644 --- a/automation/source/testtool/objtest.cxx +++ b/automation/source/testtool/objtest.cxx @@ -462,6 +462,10 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die durch den abGP.Append( "27" ); // DragonFly/i386 #elif defined DRAGONFLY && defined X86_64 abGP.Append( "28" ); // DragonFly/x86-64 +#elif defined IOS && defined ARM + abGP.Append( "29" ); // iOS +#elif defined ANDROID && defined ARM + abGP.Append( "30" ); // Android #else #error ("unknown platform. please request an ID for your platform on qa/dev") #endif -- cgit v1.2.3 From 2a56106f507ae0e13c08e9776f567f71335c0f0b Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Thu, 16 Jun 2011 19:11:02 +0200 Subject: Check for updates by default. Signed-off-by: Petr Mladek --- extensions/source/update/check/Jobs.xcu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/source/update/check/Jobs.xcu b/extensions/source/update/check/Jobs.xcu index ed324650c..840d63069 100644 --- a/extensions/source/update/check/Jobs.xcu +++ b/extensions/source/update/check/Jobs.xcu @@ -8,7 +8,7 @@ - false + true 0 -- cgit v1.2.3 From 9930cdf8438ab280d2eeff0d615702aa4b53967c Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Fri, 17 Jun 2011 18:28:23 +0200 Subject: Let's delete it for now and see if we need it in the future --- wizards/com/sun/star/wizards/common/FileAccess.py | 4 +- .../sun/star/wizards/document/OfficeDocument.py | 12 +- .../com/sun/star/wizards/fax/FaxWizardDialog.py | 2 +- wizards/com/sun/star/wizards/ui/PeerConfig.py | 159 --------------------- wizards/com/sun/star/wizards/ui/UIConsts.py | 107 ++++++-------- wizards/com/sun/star/wizards/ui/UnoDialog.py | 1 - wizards/com/sun/star/wizards/ui/UnoDialog2.py | 8 +- wizards/com/sun/star/wizards/ui/WizardDialog.py | 31 +--- .../sun/star/wizards/ui/event/CommonListener.py | 41 +----- 9 files changed, 68 insertions(+), 297 deletions(-) delete mode 100644 wizards/com/sun/star/wizards/ui/PeerConfig.py diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 83a447257..5af66d826 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -404,13 +404,13 @@ class FileAccess(object): FilterName = FilterName + "-" fileName = "" NameVectorAppend = NameVector.append - TitleVectoAppend = TitleVector.append + TitleVectorAppend = TitleVector.append for i in nameList: fileName = self.getFilename(i) if FilterName is None or fileName.startswith(FilterName): xDocInterface.loadFromMedium(i, tuple()) NameVectorAppend(i) - TitleVectoAppend(xDocInterface.Title) + TitleVectorAppend(xDocInterface.Title) LocLayoutFiles[1] = NameVector LocLayoutFiles[0] = TitleVector diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py index 69a537d3a..0647d328a 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.py +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py @@ -1,6 +1,7 @@ from com.sun.star.awt.WindowClass import TOP import traceback import uno +from ui.event.CommonListener import TerminateListenerProcAdapter from common.Desktop import Desktop from com.sun.star.awt import WindowDescriptor from com.sun.star.awt import Rectangle @@ -98,10 +99,10 @@ class OfficeDocument(object): else: xF = Desktop.getDesktop(xMSF) xFrame = xF.findFrame(FrameName, 0) - if listener != None: + if listener is not None: xFF = xF.getFrames() xFF.remove(xFrame) - xF.addTerminateListener(listener) + xF.addTerminateListener(TerminateListenerProcAdapter(listener)) return xFrame @@ -153,10 +154,9 @@ class OfficeDocument(object): #from now this frame is useable ... #and not part of the desktop tree. #You are alone with him .-) - if listener != None: - pass - #COMMENTED - #Desktop.getDesktop(xMSF).addTerminateListener(listener) + if listener is not None: + Desktop.getDesktop(xMSF).addTerminateListener( + TerminateListenerProcAdapter(listener)) return xFrame diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py index 5b178cb75..c3c2bd7d8 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py @@ -630,7 +630,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (uno.Any("short",0), 10, "private:resource/dbu/image/19205", 92, 145, + (uno.Any("short",0), 10, UIConsts.INFOIMAGEURL, 92, 145, False, 5, uno.Any("short",47), 10)) self.lblTemplateName = self.insertLabel("lblTemplateName", (PropertyNames.PROPERTY_HEIGHT, diff --git a/wizards/com/sun/star/wizards/ui/PeerConfig.py b/wizards/com/sun/star/wizards/ui/PeerConfig.py deleted file mode 100644 index 4647ad172..000000000 --- a/wizards/com/sun/star/wizards/ui/PeerConfig.py +++ /dev/null @@ -1,159 +0,0 @@ -import traceback -from common.Helper import * - -''' -To change the template for this generated type comment go to -Window>Preferences>Java>Code Generation>Code and Comments -''' - -class PeerConfig(object): - - def __init__(self, _oUnoDialog): - self.oUnoDialog = _oUnoDialog - #self.oUnoDialog.xUnoDialog.addWindowListener(self) - self.m_aPeerTasks = [] - self.aControlTasks = [] - self.aImageUrlTasks = [] - self.oUnoDialog = None - - class PeerTask(object): - - def __init__(self,_xControl, propNames_, propValues_): - self.propnames = propNames_ - self.propvalues = propValues_ - self.xControl = _xControl - - class ControlTask(object): - - def __init__(self, _oModel, _propName, _propValue): - self.propname = _propName - self.propvalue = _propValue - self.oModel = _oModel - - class ImageUrlTask(object): - - def __init__(self, _oModel , _oResource, _oHCResource): - self.oResource = _oResource - self.oHCResource = _oHCResource - self.oModel = _oModel - - def windowShown(self, arg0): - try: - i = 0 - while i < self.m_aPeerTasks.size(): - aPeerTask = self.m_aPeerTasks.elementAt(i) - xVclWindowPeer = aPeerTask.xControl.Peer - n = 0 - while n < aPeerTask.propnames.length: - xVclWindowPeer.setProperty(aPeerTask.propnames[n], - aPeerTask.propvalues[n]) - n += 1 - i += 1 - i = 0 - while i < self.aControlTasks.size(): - aControlTask = self.aControlTasks.elementAt(i) - Helper.setUnoPropertyValue(aControlTask.oModel, - aControlTask.propname, aControlTask.propvalue) - i += 1 - i = 0 - while i < self.aImageUrlTasks.size(): - aImageUrlTask = self.aImageUrlTasks.elementAt(i) - sImageUrl = "" - if isinstance(aImageUrlTask.oResource,int): - sImageUrl = self.oUnoDialog.getWizardImageUrl( - (aImageUrlTask.oResource).intValue(), - (aImageUrlTask.oHCResource).intValue()) - elif isinstance(aImageUrlTask.oResource,str): - sImageUrl = self.oUnoDialog.getImageUrl( - (aImageUrlTask.oResource), - (aImageUrlTask.oHCResource)) - - if not sImageUrl.equals(""): - Helper.setUnoPropertyValue( - aImageUrlTask.oModel, - PropertyNames.PROPERTY_IMAGEURL, sImageUrl) - - i += 1 - except RuntimeException, re: - traceback.print_exc - raise re; - - ''' - @param oAPIControl an API control that the interface XControl - can be derived from - @param _saccessname - ''' - - def setAccessibleName(self, oAPIControl, _saccessname): - setPeerProperties(oAPIControl, ("AccessibleName"), (_saccessname)) - - def setAccessibleName(self, _xControl, _saccessname): - setPeerProperties(_xControl, ("AccessibleName"), (_saccessname)) - - ''' - @param oAPIControl an API control that the interface XControl - can be derived from - @param _propnames - @param _propvalues - ''' - - def setPeerProperties(self, oAPIControl, _propnames, _propvalues): - setPeerProperties(oAPIControl, _propnames, _propvalues) - - def setPeerProperties(self, _xControl, propnames, propvalues): - oPeerTask = PeerTask(_xControl, propnames, propvalues) - self.m_aPeerTasks.append(oPeerTask) - - ''' - assigns an arbitrary property to a control as soon as the peer is created - Note: The property 'ImageUrl' should better be assigned with - 'setImageurl(...)', to consider the High Contrast Mode - @param _ocontrolmodel - @param _spropname - @param _propvalue - ''' - - def setControlProperty(self, _ocontrolmodel, _spropname, _propvalue): - oControlTask = self.ControlTask(_ocontrolmodel, _spropname, _propvalue) - self.aControlTasks.append(oControlTask) - - ''' - Assigns an image to the property 'ImageUrl' of a dialog control. - The image id must be assigned in a resource file within the wizards - project wizards project - @param _ocontrolmodel - @param _nResId - @param _nhcResId - ''' - - def setImageUrl(self, _ocontrolmodel, _nResId, _nhcResId): - oImageUrlTask = ImageUrlTask(_ocontrolmodel,_nResId, _nhcResId) - self.aImageUrlTasks.append(oImageUrlTask) - - ''' - Assigns an image to the property 'ImageUrl' of a dialog control. - The image ids that the Resource urls point to - may be assigned in a Resource file outside the wizards project - @param _ocontrolmodel - @param _sResourceUrl - @param _sHCResourceUrl - ''' - - def setImageUrl(self, _ocontrolmodel, _sResourceUrl, _sHCResourceUrl): - oImageUrlTask = ImageUrlTask( - _ocontrolmodel, _sResourceUrl, _sHCResourceUrl) - self.aImageUrlTasks.append(oImageUrlTask) - - ''' - Assigns an image to the property 'ImageUrl' of a dialog control. - The image id must be assigned in a resource file within the wizards - project wizards project - @param _ocontrolmodel - @param _oResource - @param _oHCResource - ''' - - def setImageUrl(self, _ocontrolmodel, _oResource, _oHCResource): - oImageUrlTask = self.ImageUrlTask( - _ocontrolmodel, _oResource, _oHCResource) - self.aImageUrlTasks.append(oImageUrlTask) diff --git a/wizards/com/sun/star/wizards/ui/UIConsts.py b/wizards/com/sun/star/wizards/ui/UIConsts.py index f64ddedaf..a975ff490 100644 --- a/wizards/com/sun/star/wizards/ui/UIConsts.py +++ b/wizards/com/sun/star/wizards/ui/UIConsts.py @@ -1,66 +1,53 @@ +RID_COMMON = 500 +RID_DB_COMMON = 1000 +RID_FORM = 2200 +RID_QUERY = 2300 +RID_REPORT = 2400 +RID_TABLE = 2500 +RID_IMG_REPORT = 1000 +RID_IMG_FORM = 1100 +RID_IMG_WEB = 1200 +INVISIBLESTEP = 99 +INFOIMAGEURL = "private:resource/dbu/image/19205" + ''' -To change the template for this generated type comment go to -Window>Preferences>Java>Code Generation>Code and Comments +The tabindex of the navigation buttons in a wizard must be assigned a very +high tabindex because on every step their taborder must appear at the end ''' -class UIConsts(): - - RID_COMMON = 500 - RID_DB_COMMON = 1000 - RID_FORM = 2200 - RID_QUERY = 2300 - RID_REPORT = 2400 - RID_TABLE = 2500 - RID_IMG_REPORT = 1000 - RID_IMG_FORM = 1100 - RID_IMG_WEB = 1200 - INVISIBLESTEP = 99 - INFOIMAGEURL = "private:resource/dbu/image/19205" - INFOIMAGEURL_HC = "private:resource/dbu/image/19230" - ''' - The tabindex of the navigation buttons in a wizard must be assigned a very - high tabindex because on every step their taborder must appear at the end - ''' - SOFIRSTWIZARDNAVITABINDEX = 30000 - INTEGER_8 = 8 - INTEGER_12 = 12 - INTEGER_14 = 14 - INTEGER_16 = 16 - INTEGER_40 = 40 - INTEGER_50 = 50 +SOFIRSTWIZARDNAVITABINDEX = 30000 - #Steps of the QueryWizard +#Steps of the QueryWizard - SOFIELDSELECTIONPAGE = 1 - SOSORTINGPAGE = 2 - SOFILTERPAGE = 3 - SOAGGREGATEPAGE = 4 - SOGROUPSELECTIONPAGE = 5 - SOGROUPFILTERPAGE = 6 - SOTITLESPAGE = 7 - SOSUMMARYPAGE = 8 - INTEGERS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +SOFIELDSELECTIONPAGE = 1 +SOSORTINGPAGE = 2 +SOFILTERPAGE = 3 +SOAGGREGATEPAGE = 4 +SOGROUPSELECTIONPAGE = 5 +SOGROUPFILTERPAGE = 6 +SOTITLESPAGE = 7 +SOSUMMARYPAGE = 8 - class CONTROLTYPE(): +class CONTROLTYPE(): - BUTTON = 1 - IMAGECONTROL = 2 - LISTBOX = 3 - COMBOBOX = 4 - CHECKBOX = 5 - RADIOBUTTON = 6 - DATEFIELD = 7 - EDITCONTROL = 8 - FILECONTROL = 9 - FIXEDLINE = 10 - FIXEDTEXT = 11 - FORMATTEDFIELD = 12 - GROUPBOX = 13 - HYPERTEXT = 14 - NUMERICFIELD = 15 - PATTERNFIELD = 16 - PROGRESSBAR = 17 - ROADMAP = 18 - SCROLLBAR = 19 - TIMEFIELD = 20 - CURRENCYFIELD = 21 - UNKNOWN = -1 + BUTTON = 1 + IMAGECONTROL = 2 + LISTBOX = 3 + COMBOBOX = 4 + CHECKBOX = 5 + RADIOBUTTON = 6 + DATEFIELD = 7 + EDITCONTROL = 8 + FILECONTROL = 9 + FIXEDLINE = 10 + FIXEDTEXT = 11 + FORMATTEDFIELD = 12 + GROUPBOX = 13 + HYPERTEXT = 14 + NUMERICFIELD = 15 + PATTERNFIELD = 16 + PROGRESSBAR = 17 + ROADMAP = 18 + SCROLLBAR = 19 + TIMEFIELD = 20 + CURRENCYFIELD = 21 + UNKNOWN = -1 diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index 551d0e39e..baacd58c5 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -3,7 +3,6 @@ import traceback from common.PropertyNames import PropertyNames from com.sun.star.awt import Rectangle from common.Helper import Helper -from PeerConfig import PeerConfig from com.sun.star.awt import Rectangle from com.sun.star.awt.PosSize import POS diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py index cc9ec652f..4fcdadb6b 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py @@ -1,7 +1,7 @@ from UnoDialog import * from ui.event.CommonListener import * from common.Desktop import Desktop -from UIConsts import * +import UIConsts ''' This class contains convenience methods for inserting components to a dialog. @@ -10,7 +10,7 @@ description files to a Java class which builds the same dialog through the UNO API.
    It uses an Event-Listener method, which calls a method through reflection wenn an event on a component is trigered. -see the classes AbstractListener, CommonListener, MethodInvocation for details +see the classes CommonListener for details ''' class UnoDialog2(UnoDialog): @@ -138,10 +138,6 @@ class UnoDialog2(UnoDialog): PropertyNames.PROPERTY_WIDTH), (uno.Any("short",0), 10, UIConsts.INFOIMAGEURL, _posx, _posy, False, _iStep, 10)) - self.getPeerConfiguration().setImageUrl( - self.getModel(xImgControl), - UIConsts.INFOIMAGEURL, - UIConsts.INFOIMAGEURL_HC) return xImgControl ''' diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index ad46e2dbc..b8f123642 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -7,7 +7,6 @@ from com.sun.star.lang import IllegalArgumentException from com.sun.star.frame import TerminationVetoException from common.HelpIds import * from com.sun.star.awt.PushButtonType import HELP, STANDARD -from event.MethodInvocation import * from event.EventNames import EVENT_ITEM_CHANGED class WizardDialog(UnoDialog2): @@ -52,7 +51,7 @@ class WizardDialog(UnoDialog2): def activate(self): try: - if self.xUnoDialog != None: + if self.xUnoDialog is not None: self.xUnoDialog.toFront() except UnoException, ex: @@ -313,13 +312,6 @@ class WizardDialog(UnoDialog2): uno.Any("short",(curtabindex + 1)), iButtonWidth), self) self.setControlProperty("btnWizardNext", "DefaultButton", True) - # add a window listener, to know - # if the user used "escape" key to - # close the dialog. - windowHidden = MethodInvocation("windowHidden", self) - self.xUnoDialog.addWindowListener(WindowListenerProcAdapter(None)) - dialogName = Helper.getUnoPropertyValue(self.xDialogModel, - PropertyNames.PROPERTY_NAME) except Exception, exception: traceback.print_exc() @@ -488,9 +480,8 @@ class WizardDialog(UnoDialog2): def removeTerminateListener(self): if self.__bTerminateListenermustberemoved: - #COMMENTED - #Desktop.getDesktop(self.xMSF).removeTerminateListener( \ - # ActionListenerProcAdapter(self)) + Desktop.getDesktop(self.xMSF).removeTerminateListener( \ + TerminateListenerProcAdapter(self)) self.__bTerminateListenermustberemoved = False ''' @@ -507,16 +498,6 @@ class WizardDialog(UnoDialog2): except Exception,e: traceback.print_exc() - - def windowHidden(self): - cancelWizard_1() - - def notifyTermination(self, arg0): - cancelWizard_1() - - def queryTermination(self, arg0): - activate() - raise TerminationVetoException (); - - def disposing(self, arg0): - cancelWizard_1() + def queryTermination(self): + self.activate() + raise TerminationVetoException() diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py index 73a52c961..1ab35e395 100644 --- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py +++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py @@ -37,14 +37,6 @@ import uno import unohelper import inspect -#-------------------------------------------------- -# An ActionListener adapter. -# This object implements com.sun.star.awt.XActionListener. -# When actionPerformed is called, this will call an arbitrary -# python procedure, passing it... -# 1. the oActionEvent -# 2. any other parameters you specified to this object's -# constructor (as a tuple). from com.sun.star.awt import XActionListener class ActionListenerProcAdapter( unohelper.Base, XActionListener ): def __init__( self, oProcToCall, tParams=() ): @@ -57,15 +49,6 @@ class ActionListenerProcAdapter( unohelper.Base, XActionListener ): if callable( self.oProcToCall ): apply( self.oProcToCall ) - -#-------------------------------------------------- -# An ItemListener adapter. -# This object implements com.sun.star.awt.XItemListener. -# When itemStateChanged is called, this will call an arbitrary -# python procedure, passing it... -# 1. the oItemEvent -# 2. any other parameters you specified to this object's -# constructor (as a tuple). from com.sun.star.awt import XItemListener class ItemListenerProcAdapter( unohelper.Base, XItemListener ): def __init__( self, oProcToCall, tParams=() ): @@ -80,15 +63,6 @@ class ItemListenerProcAdapter( unohelper.Base, XItemListener ): except: apply( self.oProcToCall, (oItemEvent,) + self.tParams ) - -#-------------------------------------------------- -# An TextListener adapter. -# This object implements com.sun.star.awt.XTextistener. -# When textChanged is called, this will call an arbitrary -# python procedure, passing it... -# 1. the oTextEvent -# 2. any other parameters you specified to this object's -# constructor (as a tuple). from com.sun.star.awt import XTextListener class TextListenerProcAdapter( unohelper.Base, XTextListener ): def __init__( self, oProcToCall, tParams=() ): @@ -100,21 +74,14 @@ class TextListenerProcAdapter( unohelper.Base, XTextListener ): if callable( self.oProcToCall ): apply( self.oProcToCall ) -#-------------------------------------------------- -# An Window adapter. -# This object implements com.sun.star.awt.XWindowListener. -# When textChanged is called, this will call an arbitrary -# python procedure, passing it... -# 1. the oTextEvent -# 2. any other parameters you specified to this object's -# constructor (as a tuple). -from com.sun.star.awt import XWindowListener -class WindowListenerProcAdapter( unohelper.Base, XWindowListener ): +from com.sun.star.frame import XTerminateListener +class TerminateListenerProcAdapter( unohelper.Base, XTerminateListener ): def __init__( self, oProcToCall, tParams=() ): self.oProcToCall = oProcToCall # a python procedure self.tParams = tParams # a tuple # oTextEvent is a com.sun.star.awt.TextEvent struct. - def windowResized(self, actionEvent): + def queryTermination(self, TerminateEvent): + self.oProcToCall = getattr(self.oProcToCall,"queryTermination") if callable( self.oProcToCall ): apply( self.oProcToCall ) -- cgit v1.2.3 From 739af17084c662747f84820bbd7a30a6c88d46dd Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Fri, 17 Jun 2011 21:47:57 +0200 Subject: small improvement of Insert -> Hyperlink -> Internet dialog --- cui/source/dialogs/hlinettp.cxx | 29 +++++++---------------------- cui/source/dialogs/hyperdlg.src | 18 +----------------- cui/source/inc/hlinettp.hxx | 2 -- 3 files changed, 8 insertions(+), 41 deletions(-) diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 2e2b58d13..4926b6699 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -34,9 +34,6 @@ #include "hyperdlg.hrc" #include "hlmarkwn_def.hxx" -#define STD_DOC_SUBPATH "internal" -#define STD_DOC_NAME "url_transfer.htm" - sal_Char const sAnonymous[] = "anonymous"; sal_Char const sHTTPScheme[] = INET_HTTP_SCHEME; sal_Char const sHTTPSScheme[] = INET_HTTPS_SCHEME; @@ -44,7 +41,7 @@ sal_Char const sFTPScheme[] = INET_FTP_SCHEME; /************************************************************************* |* -|* Contructor / Destructor +|* Constructor / Destructor |* |************************************************************************/ @@ -79,19 +76,6 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent, maCbbTarget.Show(); maCbbTarget.SetHelpId( HID_HYPERDLG_INET_PATH ); - // Find Path to Std-Doc - String aStrBasePaths( SvtPathOptions().GetTemplatePath() ); - for( xub_StrLen n = 0; n < aStrBasePaths.GetTokenCount(); n++ ) - { - INetURLObject aURL( aStrBasePaths.GetToken( n ) ); - aURL.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( STD_DOC_SUBPATH ) ) ); - aURL.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( STD_DOC_NAME ) ) ); - if ( FileExists( aURL ) ) - { - maStrStdDocURL = aURL.GetMainURL( INetURLObject::NO_DECODE ); - break; - } - } SetExchangeSupport (); /////////////////////////////////////// @@ -103,7 +87,7 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent, maEdPassword.Show( sal_False ); maCbAnonymous.Show( sal_False ); maBtTarget.Enable( sal_False ); - maBtBrowse.Enable( maStrStdDocURL != aEmptyStr ); + maBtBrowse.Enable( sal_True ); /////////////////////////////////////// // overload handlers @@ -250,7 +234,7 @@ void SvxHyperlinkInternetTp::SetInitFocus() /************************************************************************* |* -|* Contens of editfield "Taregt" modified +|* Contents of editfield "Target" modified |* |************************************************************************/ @@ -269,7 +253,7 @@ IMPL_LINK ( SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl, void *, EMPTYARG ) /************************************************************************* |* -|* If target-field was modify, to browse the new doc afeter timeout +|* If target-field was modify, to browse the new doc after timeout |* |************************************************************************/ @@ -281,7 +265,7 @@ IMPL_LINK ( SvxHyperlinkInternetTp, TimeoutHdl_Impl, Timer *, EMPTYARG ) /************************************************************************* |* -|* Contens of editfield "Login" modified +|* Contents of editfield "Login" modified |* |************************************************************************/ @@ -442,7 +426,8 @@ IMPL_LINK ( SvxHyperlinkInternetTp, ClickBrowseHdl_Impl, void *, EMPTYARG ) ///////////////////////////////////////////////// // Open URL if available - SfxStringItem aName( SID_FILE_NAME, maStrStdDocURL ); + SfxStringItem aName( SID_FILE_NAME, UniString::CreateFromAscii( + RTL_CONSTASCII_STRINGPARAM( "http://" ) ) ); SfxStringItem aRefererItem( SID_REFERER, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "private:user" ) ) ); SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, sal_True ); diff --git a/cui/source/dialogs/hyperdlg.src b/cui/source/dialogs/hyperdlg.src index d98659310..d52257bc2 100644 --- a/cui/source/dialogs/hyperdlg.src +++ b/cui/source/dialogs/hyperdlg.src @@ -117,7 +117,7 @@ TabPage RID_SVXPAGE_HYPERLINK_INTERNET TabStop = TRUE ; Text [ en-US ] = "WWW Browser"; - QuickHelpText [ en-US ] = "WWW Browser" ; + QuickHelpText [ en-US ] = "Open web browser, copy an URL, and paste it to Target field" ; ButtonImage = Image { ImageBitmap = Bitmap { File = "browse.bmp" ; }; @@ -125,22 +125,6 @@ TabPage RID_SVXPAGE_HYPERLINK_INTERNET }; }; - ImageButton BTN_TARGET - { - HelpID = "cui:ImageButton:RID_SVXPAGE_HYPERLINK_INTERNET:BTN_TARGET"; - Pos = MAP_APPFONT ( 235, 40+2 ) ; - Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_HEIGHT, HYPERDLG_IMGBUTTON_HEIGHT ); - TabStop = TRUE ; - Text [ en-US ] = "Target in Document"; - - QuickHelpText [ en-US ] = "Target in Document" ; - ButtonImage = Image - { - ImageBitmap = Bitmap { File = "target.bmp" ; }; - MASKCOLOR - }; - }; - FixedLine GRP_MORE { Pos = MAP_APPFONT ( 6 , 92 ) ; diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx index 73f99df89..f1888b3dc 100644 --- a/cui/source/inc/hlinettp.hxx +++ b/cui/source/inc/hlinettp.hxx @@ -59,8 +59,6 @@ private: sal_Bool mbMarkWndOpen; - String maStrStdDocURL; - DECL_LINK (Click_SmartProtocol_Impl , void * ); // Radiobutton clicked: Type HTTP or FTP DECL_LINK (ClickAnonymousHdl_Impl , void * ); // Checkbox : Anonymous User DECL_LINK (ClickBrowseHdl_Impl , void * ); // Button : Browse -- cgit v1.2.3 From f97b301d2df41b4347cc058bfcd00847b91839eb Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Sat, 18 Jun 2011 01:16:37 +0200 Subject: First attempt to create the document --- wizards/com/sun/star/wizards/common/ConfigGroup.py | 49 ++++++------- .../com/sun/star/wizards/common/Configuration.py | 85 +++++----------------- wizards/com/sun/star/wizards/common/FileAccess.py | 21 ++---- .../sun/star/wizards/document/OfficeDocument.py | 8 +- wizards/com/sun/star/wizards/fax/FaxDocument.py | 4 +- .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 36 +++++---- wizards/com/sun/star/wizards/text/TextDocument.py | 6 ++ wizards/com/sun/star/wizards/ui/PathSelection.py | 6 +- wizards/com/sun/star/wizards/ui/WizardDialog.py | 2 +- 9 files changed, 84 insertions(+), 133 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.py b/wizards/com/sun/star/wizards/common/ConfigGroup.py index d8675f4aa..2cd261831 100644 --- a/wizards/com/sun/star/wizards/common/ConfigGroup.py +++ b/wizards/com/sun/star/wizards/common/ConfigGroup.py @@ -1,4 +1,5 @@ from ConfigNode import * +from Configuration import Configuration import traceback class ConfigGroup(ConfigNode): @@ -13,16 +14,17 @@ class ConfigGroup(ConfigNode): traceback.print_exc() def writeField(self, field, configView, prefix): - propertyName = field.getName().substring(prefix.length()) - fieldType = field.getType() - if ConfigNode.isAssignableFrom(fieldType): - childView = Configuration.addConfigNode(configView, propertyName) - child = field.get(this) - child.writeConfiguration(childView, prefix) - elif fieldType.isPrimitive(): - Configuration.set(convertValue(field), propertyName, configView) - elif isinstance(fieldType,str): - Configuration.set(field.get(this), propertyName, configView) + propertyName = field[len(prefix):] + field = getattr(self,field) + fieldType = type(field) + if isinstance(field, ConfigNode): + pass + #COMMENTED + #childView = Configuration.addConfigNode(configView, propertyName) + #self.writeConfiguration(childView, prefix) + else: + Configuration.Set(self.convertValue(field), propertyName, + configView) ''' convert the primitive type value of the @@ -34,22 +36,19 @@ class ConfigGroup(ConfigNode): ''' def convertValue(self, field): - if field.getType().equals(Boolean.TYPE): - return field.getBoolean(this) - - if field.getType().equals(Integer.TYPE): - return field.getInt(this) - - if field.getType().equals(Short.TYPE): - return field.getShort(this) + if isinstance(field,bool): + return bool(field) + elif isinstance(field,int): + return int(field) - if field.getType().equals(Float.TYPE): - return field.getFloat(this) - - if (field.getType().equals(Double.TYPE)): - return field.getDouble(this) - return None - #and good luck with it :-) ... + def readConfiguration(self, configurationView, param): + for i in dir(self): + if i.startswith(param): + try: + self.readField( i, configurationView, param) + except Exception, ex: + print "Error reading field: " + i + traceback.print_exc() def readConfiguration(self, configurationView, param): for i in dir(self): diff --git a/wizards/com/sun/star/wizards/common/Configuration.py b/wizards/com/sun/star/wizards/common/Configuration.py index c73dec9d8..88f853bba 100644 --- a/wizards/com/sun/star/wizards/common/Configuration.py +++ b/wizards/com/sun/star/wizards/common/Configuration.py @@ -19,60 +19,12 @@ in hierarchy form from the root of the registry. class Configuration(object): - @classmethod - def getInt(self, name, parent): - o = getNode(name, parent) - if AnyConverter.isVoid(o): - return 0 - - return AnyConverter.toInt(o) - - @classmethod - def getShort(self, name, parent): - o = getNode(name, parent) - if AnyConverter.isVoid(o): - return 0 - - return AnyConverter.toShort(o) - - @classmethod - def getFloat(self, name, parent): - o = getNode(name, parent) - if AnyConverter.isVoid(o): - return 0 - - return AnyConverter.toFloat(o) - - @classmethod - def getDouble(self, name, parent): - o = getNode(name, parent) - if AnyConverter.isVoid(o): - return 0 - - return AnyConverter.toDouble(o) - - @classmethod - def getString(self, name, parent): - o = getNode(name, parent) - if AnyConverter.isVoid(o): - return "" - - return o - - @classmethod - def getBoolean(self, name, parent): - o = getNode(name, parent) - if AnyConverter.isVoid(o): - return False - - return AnyConverter.toBoolean(o) - @classmethod def getNode(self, name, parent): return parent.getByName(name) @classmethod - def set(self, value, name, parent): + def Set(self, value, name, parent): parent.setHierarchicalPropertyValue(name, value) ''' @@ -90,24 +42,25 @@ class Configuration(object): def getConfigurationRoot(self, xmsf, sPath, updateable): oConfigProvider = xmsf.createInstance( "com.sun.star.configuration.ConfigurationProvider") - if updateable: - sView = "com.sun.star.configuration.ConfigurationUpdateAccess" - else: - sView = "com.sun.star.configuration.ConfigurationAccess" + args = [] aPathArgument = uno.createUnoStruct( 'com.sun.star.beans.PropertyValue') aPathArgument.Name = "nodepath" aPathArgument.Value = sPath - aModeArgument = uno.createUnoStruct( - 'com.sun.star.beans.PropertyValue') + + args.append(aPathArgument) if updateable: + sView = "com.sun.star.configuration.ConfigurationUpdateAccess" + aModeArgument = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') aModeArgument.Name = "lazywrite" aModeArgument.Value = False + args.append(aModeArgument) + else: + sView = "com.sun.star.configuration.ConfigurationAccess" - - return oConfigProvider.createInstanceWithArguments(sView, - (aPathArgument,aModeArgument,)) + return oConfigProvider.createInstanceWithArguments(sView, tuple(args)) @classmethod def getChildrenNames(self, configView): @@ -176,14 +129,16 @@ class Configuration(object): @classmethod def addConfigNode(self, configView, name): - if configView == None: + if configView is None: return configView.getByName(name) else: - # the new element is the result ! - newNode = configView.createInstance() + print configView # insert it - this also names the element - xNameContainer.insertByName(name, newNode) - return newNode + try: + configView.insertByName(name, configView.createInstance()) + except Exception,e: + traceback.print_exc() + #return newNode @classmethod def removeNode(self, configView, name): @@ -197,14 +152,14 @@ class Configuration(object): @classmethod def updateConfiguration(self, xmsf, path, name, node, param): - view = Configuration.self.getConfigurationRoot(xmsf, path, True) + view = self.getConfigurationRoot(xmsf, path, True) addConfigNode(path, name) node.writeConfiguration(view, param) view.commitChanges() @classmethod def removeNode(self, xmsf, path, name): - view = Configuration.self.getConfigurationRoot(xmsf, path, True) + view = self.getConfigurationRoot(xmsf, path, True) removeNode(view, name) view.commitChanges() diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 5af66d826..6f8e16bb2 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -4,6 +4,7 @@ from com.sun.star.ucb import CommandAbortedException from com.sun.star.uno import Exception as UnoException from com.sun.star.awt.VclWindowPeerAttribute import OK, YES_NO import types +from os import path as osPath ''' This class delivers static convenience methods @@ -412,11 +413,9 @@ class FileAccess(object): NameVectorAppend(i) TitleVectorAppend(xDocInterface.Title) - LocLayoutFiles[1] = NameVector - LocLayoutFiles[0] = TitleVector + LocLayoutFiles[1] = sorted(NameVector) + LocLayoutFiles[0] = sorted(TitleVector) - #COMMENTED - #JavaTools.bubblesortList(LocLayoutFiles) except Exception, exception: traceback.print_exc() @@ -557,7 +556,7 @@ class FileAccess(object): f = open(path) r = self.filenameConverter.getFileURLFromSystemPath(path, - f.getAbsolutePath()) + osPath.abspath(path)) return r def getPath(self, parentURL, childURL): @@ -737,15 +736,9 @@ class FileAccess(object): @classmethod def getParentDir(self, url): - if url.endsWith("/"): - return getParentDir(url.substring(0, url.length() - 1)) - - pos = url.indexOf("/", pos + 1) - lastPos = 0 - while pos > -1: - lastPos = pos - pos = url.indexOf("/", pos + 1) - return url.substring(0, lastPos) + while url[-1] == "/": + url = hello[:-1] + return url[:url.rfind("/")] def createNewDir(self, parentDir, name): s = getNewFile(parentDir, name, "") diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py index 0647d328a..a14f42ba9 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.py +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py @@ -174,7 +174,7 @@ class OfficeDocument(object): @classmethod def store(self, xMSF, xComponent, StorePath, FilterName, bStoreToUrl): try: - if FilterName.length() > 0: + if len(FilterName): oStoreProperties = range(2) oStoreProperties[0] = uno.createUnoStruct( 'com.sun.star.beans.PropertyValue') @@ -188,10 +188,10 @@ class OfficeDocument(object): else: oStoreProperties = range(0) - if bStoreToUrl == True: - xComponent.storeToURL(StorePath, oStoreProperties) + if bStoreToUrl: + xComponent.storeToURL(StorePath, tuple(oStoreProperties)) else: - xStoreable.storeAsURL(StorePath, oStoreProperties) + xComponent.storeAsURL(StorePath, tuple(oStoreProperties)) return True except Exception, exception: diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py index f07917dd8..8ff2e648b 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.py +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -115,13 +115,13 @@ class FaxDocument(TextDocument): def killEmptyFrames(self): try: if not self.keepLogoFrame: - xTF = TextFrameHandler.getFrameByName("Company Logo", + xTF = self.getFrameByName("Company Logo", self.xTextDocument) if xTF is not None: xTF.dispose() if not self.keepTypeFrame: - xTF = TextFrameHandler.getFrameByName("Communication Type", + xTF = self.getFrameByName("Communication Type", self.xTextDocument) if xTF is not None: xTF.dispose() diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 5cae6d6b8..4d1119dee 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -9,6 +9,7 @@ from ui.XPathSelectionListener import XPathSelectionListener from common.Configuration import * from document.OfficeDocument import OfficeDocument from text.TextFieldHandler import TextFieldHandler +from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO from common.NoValidPathException import * from com.sun.star.uno import RuntimeException @@ -133,17 +134,16 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.running = False def finishWizard(self): - self.switchToStep(self.CurrentStep, self.nMaxStep) + self.switchToStep(self.getCurrentStep(), self.nMaxStep) self.myFaxDoc.setWizardTemplateDocInfo( \ self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) try: fileAccess = FileAccess(self.xMSF) - self.sPath = self.myPathSelection.SelectedPath - if self.sPath == "": + self.sPath = self.myPathSelection.getSelectedPath() + if self.sPath is "": self.myPathSelection.triggerPathPicker() - self.sPath = self.myPathSelection.SelectedPath - print self.sPath + self.sPath = self.myPathSelection.getSelectedPath() self.sPath = fileAccess.getURL(self.sPath) #first, if the filename was not changed, thus @@ -151,12 +151,10 @@ class FaxWizardDialogImpl(FaxWizardDialog): # file exists and warn the user. if not self.__filenameChanged: if fileAccess.exists(self.sPath, True): - answer = SystemDialog.showMessageBox( \ - xMSF, xControl.Peer, "MessBox", - VclWindowPeerAttribute.YES_NO + \ - VclWindowPeerAttribute.DEF_NO, - self.resources.resOverwriteWarning) - if (answer == 3): # user said: no, do not overwrite... + answer = SystemDialog.showMessageBox( + self.xMSF, self.xUnoDialog.Peer, "MessBox", + YES_NO + DEF_NO, self.resources.resOverwriteWarning) + if answer == 3: # user said: no, do not overwrite... return False @@ -168,13 +166,13 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.myFaxDoc.keepTypeFrame = \ (self.chkUseCommunicationType.State is not 0) self.myFaxDoc.killEmptyFrames() - self.bSaveSuccess = OfficeDocument.store(xMSF, self.xTextDocument, + self.bSaveSuccess = OfficeDocument.store(self.xMSF, self.xTextDocument, self.sPath, "writer8_template", False) if self.bSaveSuccess: - saveConfiguration() - xIH = xMSF.createInstance( \ + self.saveConfiguration() + xIH = self.xMSF.createInstance( \ "com.sun.star.comp.uui.UUIInteractionHandler") - loadValues = range(3) + loadValues = range(4) loadValues[0] = uno.createUnoStruct( \ 'com.sun.star.beans.PropertyValue') loadValues[0].Name = "AsTemplate" @@ -196,10 +194,10 @@ class FaxWizardDialogImpl(FaxWizardDialog): else: loadValues[0].Value = True - oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), + oDoc = OfficeDocument.load(Desktop.getDesktop(self.xMSF), self.sPath, "_default", loadValues) - myViewHandler = oDoc.CurrentController.ViewSettings - myViewHandler.setPropertyValue("ZoomType", + myViewHandler = ViewHandler(self.xMSF, oDoc) + myViewHandler.setViewSetting("ZoomType", uno.Any("short",OPTIMAL)) else: pass @@ -415,7 +413,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): def saveConfiguration(self): try: - root = Configuration.getConfigurationRoot(xMSF, + root = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.Office.Writer/Wizards/Fax", True) self.myConfig.writeConfiguration(root, "cp_") Configuration.commit(root) diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index 7c564d5a2..c6ff21144 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -262,6 +262,12 @@ class TextDocument(object): xPC.jumpToLastPage() return xPC.getPage() + def getFrameByName(self, sFrameName, xTD): + if xTD.TextFrames.hasByName(sFrameName): + return xTD.TextFrames.getByName(sFrameName) + + return None + ''' Possible Values for "OptionString" are: "LoadCellStyles", "LoadTextStyles", "LoadFrameStyles", diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py index aa7231e19..ef5f6e447 100644 --- a/wizards/com/sun/star/wizards/ui/PathSelection.py +++ b/wizards/com/sun/star/wizards/ui/PathSelection.py @@ -102,11 +102,11 @@ class PathSelection(object): self.sDefaultName, self.sDefaultFilter) sStorePath = myFilePickerDialog.sStorePath if sStorePath is not None: - myFA = FileAccess(xMSF); - xSaveTextBox.setText(myFA.getPath(sStorePath, None)) + myFA = FileAccess(self.xMSF); + self.xSaveTextBox.Text = myFA.getPath(sStorePath, None) self.sDefaultDirectory = \ FileAccess.getParentDir(sStorePath) - self.sDefaultName = myFA.getFilename(sStorePath) + self.sDefaultName = myFA.getFilename(self.sStorePath) return elif iTransferMode == TransferMode.LOAD: if iDialogType == DialogTypes.FOLDER: diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index b8f123642..d39e6d11e 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -431,7 +431,7 @@ class WizardDialog(UnoDialog2): self.enableFinishButton(True) if success: - removeTerminateListener() + self.removeTerminateListener() except Exception, e: traceback.print_exc() -- cgit v1.2.3 From 6355b99e4f86bdec14e93e8ceba52c1b151b16f0 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Mon, 30 May 2011 18:05:15 +0200 Subject: ause130: #i117218# change .idl handling to gnu make --- UnoControls/prj/build.lst | 2 +- accessibility/prj/build.lst | 2 +- embedserv/prj/build.lst | 2 +- extensions/prj/build.lst | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/UnoControls/prj/build.lst b/UnoControls/prj/build.lst index 775cb902f..473776ffb 100644 --- a/UnoControls/prj/build.lst +++ b/UnoControls/prj/build.lst @@ -1,4 +1,4 @@ -us UnoControls : LIBXSLT:libxslt cppuhelper offuh tools NULL +us UnoControls : LIBXSLT:libxslt cppuhelper offapi tools NULL us UnoControls usr1 - all us_mkout NULL us UnoControls\source\base nmake - all us_base NULL us UnoControls\source\controls nmake - all us_ctrls NULL diff --git a/accessibility/prj/build.lst b/accessibility/prj/build.lst index 469a59e79..61692214b 100644 --- a/accessibility/prj/build.lst +++ b/accessibility/prj/build.lst @@ -1,4 +1,4 @@ -ac accessibility : TRANSLATIONS:translations tools jurt offuh unoil vcl javaunohelper jvmaccess cppu sal toolkit svtools LIBXSLT:libxslt NULL +ac accessibility : TRANSLATIONS:translations tools jurt offapi unoil vcl javaunohelper jvmaccess cppu sal toolkit svtools LIBXSLT:libxslt NULL ac accessibility usr1 - all ac_mkout NULL ac accessibility\inc nmake - all ac_inc NULL ac accessibility\bridge\org\openoffice\java\accessibility nmake - w ac_ooja ac_inc NULL diff --git a/embedserv/prj/build.lst b/embedserv/prj/build.lst index 189479e4b..a6cfd10ea 100644 --- a/embedserv/prj/build.lst +++ b/embedserv/prj/build.lst @@ -1,4 +1,4 @@ -es embedserv : offuh sal cppu cppuhelper comphelper LIBXSLT:libxslt NULL +es embedserv : offapi sal cppu cppuhelper comphelper LIBXSLT:libxslt NULL es embedserv usr1 - w es_mkout NULL es embedserv\source\embed nmake - w es_embed NULL es embedserv\source\inprocserv nmake - w es_inproc NULL diff --git a/extensions/prj/build.lst b/extensions/prj/build.lst index f39f66560..b3e7b2294 100644 --- a/extensions/prj/build.lst +++ b/extensions/prj/build.lst @@ -1,4 +1,4 @@ -ex extensions : officecfg TRANSLATIONS:translations DESKTOP:rdbmaker svx SANE:sane TWAIN:twain np_sdk offuh stoc ZLIB:zlib CURL:curl LIBXSLT:libxslt NULL +ex extensions : officecfg TRANSLATIONS:translations DESKTOP:rdbmaker svx SANE:sane TWAIN:twain np_sdk offapi stoc ZLIB:zlib CURL:curl LIBXSLT:libxslt NULL ex extensions usr1 - all ex_mkout NULL ex extensions\inc nmake - all ex_inc NULL -- cgit v1.2.3 From 2d8a0392abbf90c13510cb2992be490f56e066c0 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Mon, 30 May 2011 18:19:32 +0200 Subject: ause130: #i117218# don't export INCLUDE in a local makefile.mk --- setup_native/source/win32/customactions/reg64/makefile.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/setup_native/source/win32/customactions/reg64/makefile.mk b/setup_native/source/win32/customactions/reg64/makefile.mk index 4cb5a5ca2..023aee50e 100644 --- a/setup_native/source/win32/customactions/reg64/makefile.mk +++ b/setup_native/source/win32/customactions/reg64/makefile.mk @@ -74,4 +74,3 @@ DEF1EXPORTFILE=exports.dxp .INCLUDE : target.mk INCLUDE!:=$(subst,/stl, $(INCLUDE)) -.EXPORT : INCLUDE -- cgit v1.2.3 From f327755e3e1f3aad075c49981f35b04d7df2ac24 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 30 May 2011 18:47:52 +0200 Subject: remove all traces of offuh from makefiles --- cui/Library_cui.mk | 6 +++++- forms/Library_frm.mk | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index 6e3bf195b..556765018 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -35,7 +35,6 @@ $(eval $(call gb_Library_set_include,cui,\ $$(INCLUDE) \ -I$(realpath $(SRCDIR)/cui/source/inc) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ )) $(eval $(call gb_Library_set_defs,cui,\ @@ -45,6 +44,11 @@ $(eval $(call gb_Library_set_defs,cui,\ $(if $(filter TRUE,$(ENABLE_KDE4)),-DENABLE_KDE4) \ )) +$(eval $(call gb_Library_add_api,cui,\ + offapi \ + udkapi \ +)) + # .IF "$(ENABLE_LAYOUT)" == "TRUE" # CFLAGS+= -DENABLE_LAYOUT=1 -I../$(PRJ)/layout/inc -I../$(PRJ)/layout/$(INPATH)/inc # .ENDIF # ENABLE_LAYOUT == TRUE diff --git a/forms/Library_frm.mk b/forms/Library_frm.mk index 1208fa5c5..72d064221 100644 --- a/forms/Library_frm.mk +++ b/forms/Library_frm.mk @@ -35,7 +35,6 @@ $(eval $(call gb_Library_set_include,frm,\ -I$(realpath $(SRCDIR)/forms/source/inc) \ -I$(realpath $(SRCDIR)/forms/source/solar/inc) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter -I%,$(LIBXML_CFLAGS))) \ )) @@ -44,6 +43,11 @@ $(eval $(call gb_Library_set_defs,frm,\ $(if $(filter YES,$(SYSTEM_LIBXML)),-DSYSTEM_LIBXML $(filter-out -I%,$(LIBXML_CFLAGS))) \ )) +$(eval $(call gb_Library_add_api,frm,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_Library_add_linked_libs,frm,\ comphelper \ cppu \ -- cgit v1.2.3 From 7a90746dcd2db06fc641d6c0cb0bc97e3f0f4bb9 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Tue, 31 May 2011 19:39:01 +0200 Subject: needs oovbaapi too --- forms/Library_frm.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/forms/Library_frm.mk b/forms/Library_frm.mk index 72d064221..be649b458 100644 --- a/forms/Library_frm.mk +++ b/forms/Library_frm.mk @@ -45,6 +45,7 @@ $(eval $(call gb_Library_set_defs,frm,\ $(eval $(call gb_Library_add_api,frm,\ offapi \ + oovbaapi \ udkapi \ )) -- cgit v1.2.3 From fcffa0809350131a254c3e05eddbf35b3d626d8d Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Sat, 18 Jun 2011 15:45:57 +0200 Subject: Set current data to the file --- wizards/com/sun/star/wizards/common/Helper.py | 63 +----- .../com/sun/star/wizards/common/NumberFormatter.py | 232 +++++++++++++++++++++ wizards/com/sun/star/wizards/text/TextDocument.py | 32 +-- 3 files changed, 258 insertions(+), 69 deletions(-) create mode 100644 wizards/com/sun/star/wizards/common/NumberFormatter.py diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py index 5e52a0c28..d1ebdfcb7 100644 --- a/wizards/com/sun/star/wizards/common/Helper.py +++ b/wizards/com/sun/star/wizards/common/Helper.py @@ -1,13 +1,13 @@ import uno -import locale +import calendar import traceback +from datetime import date as DateTime from com.sun.star.uno import Exception as UnoException from com.sun.star.uno import RuntimeException +from NumberFormatter import NumberFormatter class Helper(object): - DAY_IN_MILLIS = (24 * 60 * 60 * 1000) - def convertUnoDatetoInteger(self, DateValue): oCal = java.util.Calendar.getInstance() oCal.set(DateValue.Year, DateValue.Month, DateValue.Day) @@ -165,16 +165,13 @@ class Helper(object): class DateUtils(object): - def __init__(self, xmsf, docMSF): - defaults = docMSF.createInstance("com.sun.star.text.Defaults") + def __init__(self, xmsf, document): + defaults = document.createInstance("com.sun.star.text.Defaults") l = Helper.getUnoStructValue(defaults, "CharLocale") - jl = locale.setlocale(l.Language, l.Country, l.Variant) - self.calendar = Calendar.getInstance(jl) self.formatSupplier = document formatSettings = self.formatSupplier.getNumberFormatSettings() date = Helper.getUnoPropertyValue(formatSettings, "NullDate") - self.calendar.set(date.Year, date.Month - 1, date.Day) - self.docNullTime = getTimeInMillis() + self.calendar = DateTime(date.Year, date.Month, date.Day) self.formatter = NumberFormatter.createNumberFormatter(xmsf, self.formatSupplier) @@ -187,56 +184,12 @@ class Helper(object): return NumberFormatter.getNumberFormatterKey( self.formatSupplier, format) - def getFormatter(self): - return self.formatter - - def getTimeInMillis(self): - dDate = self.calendar.getTime() - return dDate.getTime() - ''' @param date a VCL date in form of 20041231 @return a document relative date ''' - def getDocumentDateAsDouble(self, date): - self.calendar.clear() - self.calendar.set( - date / 10000, (date % 10000) / 100 - 1, date % 100) - date1 = getTimeInMillis() - ''' - docNullTime and date1 are in millis, but - I need a day... - ''' - - daysDiff = (date1 - self.docNullTime) / DAY_IN_MILLIS + 1 - return daysDiff - - def getDocumentDateAsDouble(self, date): - return getDocumentDateAsDouble( - date.Year * 10000 + date.Month * 100 + date.Day) - - def getDocumentDateAsDouble(self, javaTimeInMillis): - self.calendar.clear() - JavaTools.setTimeInMillis(self.calendar, javaTimeInMillis) - date1 = getTimeInMillis() - - ''' - docNullTime and date1 are in millis, but - I need a day... - ''' - - daysDiff = (date1 - self.docNullTime) / DAY_IN_MILLIS + 1 - return daysDiff - def format(self, formatIndex, date): + difference = date - self.calendar return self.formatter.convertNumberToString(formatIndex, - getDocumentDateAsDouble(date)) - - def format(self, formatIndex, date): - return self.formatter.convertNumberToString(formatIndex, - getDocumentDateAsDouble(date)) - - def format(self, formatIndex, javaTimeInMillis): - return self.formatter.convertNumberToString(formatIndex, - getDocumentDateAsDouble(javaTimeInMillis)) + difference.days) diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.py b/wizards/com/sun/star/wizards/common/NumberFormatter.py new file mode 100644 index 000000000..eff9f16c2 --- /dev/null +++ b/wizards/com/sun/star/wizards/common/NumberFormatter.py @@ -0,0 +1,232 @@ +import traceback +from com.sun.star.lang import Locale +from com.sun.star.util.NumberFormat import DATE, LOGICAL, DATETIME, TEXT, NUMBER + +class NumberFormatter(object): + + def __init__(self, _xNumberFormatsSupplier, _aLocale, _xMSF=None): + self.iDateFormatKey = -1 + self.iDateTimeFormatKey = -1 + self.iNumberFormatKey = -1 + self.iTextFormatKey = -1 + self.iTimeFormatKey = -1 + self.iLogicalFormatKey = -1 + self.bNullDateCorrectionIsDefined = False + self.aLocale = _aLocale + if _xMSF is not None: + self.xNumberFormatter = _xMSF.createInstance( + "com.sun.star.util.NumberFormatter") + self.xNumberFormats = _xNumberFormatsSupplier.NumberFormats + self.xNumberFormatSettings = \ + _xNumberFormatsSupplier.NumberFormatSettings + self.xNumberFormatter.attachNumberFormatsSupplier( + _xNumberFormatsSupplier) + + ''' + @param _xMSF + @param _xNumberFormatsSupplier + @return + @throws Exception + @deprecated + ''' + + @classmethod + def createNumberFormatter(self, _xMSF, _xNumberFormatsSupplier): + oNumberFormatter = _xMSF.createInstance( + "com.sun.star.util.NumberFormatter") + oNumberFormatter.attachNumberFormatsSupplier(_xNumberFormatsSupplier) + return oNumberFormatter + + ''' + gives a key to pass to a NumberFormat object.
    + example:
    +
    +    XNumberFormatsSupplier nsf =
    +        (XNumberFormatsSupplier)UnoRuntime.queryInterface(...,document)
    +    int key = Desktop.getNumberFormatterKey(
    +        nsf, ...star.i18n.NumberFormatIndex.DATE...)
    +    XNumberFormatter nf = Desktop.createNumberFormatter(xmsf, nsf);
    +    nf.convertNumberToString( key, 1972 );
    +    
    + @param numberFormatsSupplier + @param type - a constant out of i18n.NumberFormatIndex enumeration. + @return a key to use with a util.NumberFormat instance. + ''' + + @classmethod + def getNumberFormatterKey(self, numberFormatsSupplier, Type): + return numberFormatsSupplier.NumberFormats.getFormatIndex( + Type, Locale()) + + def convertNumberToString(self, _nkey, _dblValue, _xNumberFormatter=None): + print "yepa" + if _xNumberFormatter is None: + return self.xNumberFormatter.convertNumberToString( + _nkey, _dblValue) + else: + return _xNumberFormatter.convertNumberToString(_nkey, _dblValue) + + def convertStringToNumber(self, _nkey, _sString): + return self.xNumberFormatter.convertStringToNumber(_nkey, _sString) + + ''' + @param dateCorrection The lDateCorrection to set. + ''' + + def setNullDateCorrection(self, dateCorrection): + self.lDateCorrection = dateCorrection + + def defineNumberFormat(self, _FormatString): + try: + NewFormatKey = self.xNumberFormats.queryKey( + _FormatString, self.aLocale, True) + if NewFormatKey is -1: + NewFormatKey = self.xNumberFormats.addNew( + _FormatString, self.aLocale) + + return NewFormatKey + except Exception, e: + traceback.print_exc() + return -1 + + ''' + returns a numberformat for a FormatString. + @param _FormatString + @param _aLocale + @return + ''' + + def defineNumberFormat(self, _FormatString, _aLocale): + try: + NewFormatKey = self.xNumberFormats.queryKey( + _FormatString, _aLocale, True) + if NewFormatKey == -1: + NewFormatKey = self.xNumberFormats.addNew( + _FormatString, _aLocale) + + return NewFormatKey + except Exception, e: + traceback.print_exc() + return -1 + + def setNumberFormat(self, _xFormatObject, _FormatKey, _oNumberFormatter): + try: + xNumberFormat = _oNumberFormatter.xNumberFormats.getByKey( + _FormatKey) + FormatString = str(Helper.getUnoPropertyValue( + xNumberFormat, "FormatString")) + oLocale = Helper.getUnoPropertyValue(xNumberFormat, "Locale") + NewFormatKey = defineNumberFormat(FormatString, oLocale) + _xFormatObject.setPropertyValue( + "FormatsSupplier", + _oNumberFormatter.xNumberFormatter.getNumberFormatsSupplier()) + if _xFormatObject.getPropertySetInfo().hasPropertyByName( + "NumberFormat"): + _xFormatObject.setPropertyValue("NumberFormat", NewFormatKey) + elif _xFormatObject.getPropertySetInfo().hasPropertyByName( + "FormatKey"): + _xFormatObject.setPropertyValue("FormatKey", NewFormatKey) + else: + # TODO: throws a exception in a try catch environment, very helpful? + raise Exception + + except Exception, exception: + traceback.print_exc() + + def getNullDateCorrection(self): + if not self.bNullDateCorrectionIsDefined: + dNullDate = Helper.getUnoStructValue( + self.xNumberFormatSettings, "NullDate") + lNullDate = Helper.convertUnoDatetoInteger(dNullDate) + oCal = java.util.Calendar.getInstance() + oCal.set(1900, 1, 1) + dTime = oCal.getTime() + lTime = dTime.getTime() + lDBNullDate = lTime / (3600 * 24000) + self.lDateCorrection = lDBNullDate - lNullDate + return self.lDateCorrection + else: + return self.lDateCorrection + + def setBooleanReportDisplayNumberFormat(self): + FormatString = "[=1]" + str(9745) + ";[=0]" + str(58480) + ";0" + self.iLogicalFormatKey = self.xNumberFormats.queryKey( + FormatString, self.aLocale, True) + try: + if self.iLogicalFormatKey == -1: + self.iLogicalFormatKey = self.xNumberFormats.addNew( + FormatString, self.aLocale) + + except Exception, e: + #MalformedNumberFormat + traceback.print_exc() + self.iLogicalFormatKey = self.xNumberFormats.getStandardFormat( + NumberFormat.LOGICAL, self.aLocale) + + return self.iLogicalFormatKey + + ''' + @return Returns the iDateFormatKey. + ''' + + def getDateFormatKey(self): + if self.iDateFormatKey == -1: + self.iDateFormatKey = self.xNumberFormats.getStandardFormat( + NumberFormat.DATE, self.aLocale) + + return self.iDateFormatKey + + ''' + @return Returns the iDateTimeFormatKey. + ''' + + def getDateTimeFormatKey(self): + if self.iDateTimeFormatKey == -1: + self.iDateTimeFormatKey = self.xNumberFormats.getStandardFormat( + NumberFormat.DATETIME, self.aLocale) + + return self.iDateTimeFormatKey + + ''' + @return Returns the iLogicalFormatKey. + ''' + + def getLogicalFormatKey(self): + if self.iLogicalFormatKey == -1: + self.iLogicalFormatKey = self.xNumberFormats.getStandardFormat( + NumberFormat.LOGICAL, self.aLocale) + + return self.iLogicalFormatKey + + ''' + @return Returns the iNumberFormatKey. + ''' + + def getNumberFormatKey(self): + if self.iNumberFormatKey == -1: + self.iNumberFormatKey = self.xNumberFormats.getStandardFormat( + NumberFormat.NUMBER, self.aLocale) + + return self.iNumberFormatKey + + ''' + @return Returns the iTextFormatKey. + ''' + + def getTextFormatKey(self): + if self.iTextFormatKey == -1: + self.iTextFormatKey = self.xNumberFormats.getStandardFormat( + NumberFormat.TEXT, self.aLocale) + + return self.iTextFormatKey + + ''' + @return Returns the iTimeFormatKey. + ''' + + def getTimeFormatKey(self): + if self.iTimeFormatKey == -1: + self.iTimeFormatKey = self.xNumberFormats.getStandardFormat( + NumberFormat.TIME, self.aLocale) + + return self.iTimeFormatKey diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index c6ff21144..c432ee7a1 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -11,7 +11,9 @@ from com.sun.star.container import NoSuchElementException from com.sun.star.lang import WrappedTargetException from common.Configuration import Configuration import time +from datetime import date as dateTimeObject from com.sun.star.util import DateTime +from com.sun.star.i18n.NumberFormatIndex import DATE_SYS_DDMMYY class TextDocument(object): @@ -208,22 +210,24 @@ class TextDocument(object): fullname = str(gn) + " " + str(sn) currentDate = DateTime() now = time.localtime(time.time()) - currentDate.Day = time.strftime("%d", now) - currentDate.Year = time.strftime("%Y", now) - currentDate.Month = time.strftime("%m", now) + year = time.strftime("%Y", now) + month = time.strftime("%m", now) + day = time.strftime("%d", now) + currentDate.Day = day + currentDate.Year = year + currentDate.Month = month + dateObject = dateTimeObject(int(year), int(month), int(day)) du = Helper.DateUtils(self.xMSF, self.xTextDocument) - ff = du.getFormat(NumberFormatIndex.DATE_SYS_DDMMYY) - myDate = du.format(ff, currentDate) - xDocProps2 = self.xTextDocument.getDocumentProperties() - xDocProps2.setAuthor(fullname) - xDocProps2.setModifiedBy(fullname) - description = xDocProps2.getDescription() + ff = du.getFormat(DATE_SYS_DDMMYY) + myDate = du.format(ff, dateObject) + xDocProps2 = self.xTextDocument.DocumentProperties + xDocProps2.Author = fullname + xDocProps2.ModifiedBy = fullname + description = xDocProps2.Description description = description + " " + TemplateDescription - description = JavaTools.replaceSubString( - description, WizardName, "") - description = JavaTools.replaceSubString( - description, myDate, "") - xDocProps2.setDescription(description) + description = description.replace("", WizardName) + description = description.replace("", myDate) + xDocProps2.Description = description except NoSuchElementException, e: # TODO Auto-generated catch block traceback.print_exc() -- cgit v1.2.3 From 41d2d7394366ba1ca1f2c15421923d23d635c48d Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Sat, 18 Jun 2011 15:53:37 +0200 Subject: Remove imports --- wizards/com/sun/star/wizards/common/Helper.py | 1 - wizards/com/sun/star/wizards/ui/WizardDialog.py | 1 - 2 files changed, 2 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py index d1ebdfcb7..32cdb72a2 100644 --- a/wizards/com/sun/star/wizards/common/Helper.py +++ b/wizards/com/sun/star/wizards/common/Helper.py @@ -1,5 +1,4 @@ import uno -import calendar import traceback from datetime import date as DateTime from com.sun.star.uno import Exception as UnoException diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index d39e6d11e..874f5407e 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -7,7 +7,6 @@ from com.sun.star.lang import IllegalArgumentException from com.sun.star.frame import TerminationVetoException from common.HelpIds import * from com.sun.star.awt.PushButtonType import HELP, STANDARD -from event.EventNames import EVENT_ITEM_CHANGED class WizardDialog(UnoDialog2): -- cgit v1.2.3 From 98aeeaa61d2e57e3e4b874570e1da5035bedc2b2 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Sun, 19 Jun 2011 15:32:48 +0200 Subject: Avoid crashing after finnish button is clicked --- wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py | 11 ++++++++--- wizards/com/sun/star/wizards/ui/PathSelection.py | 4 +++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 4d1119dee..58ee5ac8a 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -138,12 +138,16 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.myFaxDoc.setWizardTemplateDocInfo( \ self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) + endWizard = True try: fileAccess = FileAccess(self.xMSF) self.sPath = self.myPathSelection.getSelectedPath() - if self.sPath is "": + if self.sPath == "": self.myPathSelection.triggerPathPicker() self.sPath = self.myPathSelection.getSelectedPath() + if self.sPath == "": + endWizard = False + return self.sPath = fileAccess.getURL(self.sPath) #first, if the filename was not changed, thus @@ -206,8 +210,9 @@ class FaxWizardDialogImpl(FaxWizardDialog): except UnoException, e: traceback.print_exc() finally: - self.xUnoDialog.endExecute() - self.running = False + if endWizard: + self.xUnoDialog.endExecute() + self.running = False return True diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py index ef5f6e447..b8487990c 100644 --- a/wizards/com/sun/star/wizards/ui/PathSelection.py +++ b/wizards/com/sun/star/wizards/ui/PathSelection.py @@ -89,6 +89,8 @@ class PathSelection(object): def triggerPathPicker(self): try: + print self.iTransferMode + print self.TransferMode.SAVE if self.iTransferMode == self.TransferMode.SAVE: if self.iDialogType == self.DialogTypes.FOLDER: #TODO: write code for picking a folder for saving @@ -106,7 +108,7 @@ class PathSelection(object): self.xSaveTextBox.Text = myFA.getPath(sStorePath, None) self.sDefaultDirectory = \ FileAccess.getParentDir(sStorePath) - self.sDefaultName = myFA.getFilename(self.sStorePath) + self.sDefaultName = myFA.getFilename(sStorePath) return elif iTransferMode == TransferMode.LOAD: if iDialogType == DialogTypes.FOLDER: -- cgit v1.2.3 From 1b10ca272fee3f956d3126b5a02136c2c700f7fb Mon Sep 17 00:00:00 2001 From: Joseph Powers Date: Sun, 19 Jun 2011 06:59:30 -0700 Subject: Replace List with std::vector< FilterEntry* > --- cui/source/dialogs/cuigaldlg.cxx | 47 ++++++++++++++++++++++++++++++---------- cui/source/inc/cuigaldlg.hxx | 15 +++++++------ 2 files changed, 43 insertions(+), 19 deletions(-) diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index d39e95ac7..07a11c45b 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -116,7 +116,7 @@ void SAL_CALL SearchThread::run() nBeginFormat = nEndFormat = nFileNumber; for( sal_uInt16 i = nBeginFormat; i <= nEndFormat; ++i ) - aFormats.push_back( ( (FilterEntry*) mpBrowser->aFilterEntryList.GetObject( i ) )->aFilterName.ToLowerAscii() ); + aFormats.push_back( mpBrowser->aFilterEntryList[ i ]->aFilterName.ToLowerAscii() ); ImplSearch( maStartURL, aFormats, mpBrowser->bSearchRecursive ); } @@ -830,8 +830,9 @@ TPGalleryThemeProperties::~TPGalleryThemeProperties() for ( size_t i = 0, n = aFoundList.size(); i < n; ++i ) delete aFoundList[ i ]; - for( void* pEntry = aFilterEntryList.First(); pEntry; pEntry = aFilterEntryList.Next() ) - delete (FilterEntry*) pEntry; + for ( size_t i = 0, n = aFilterEntryList.size(); i < n; ++i ) { + delete aFilterEntryList[ i ]; + } } // ------------------------------------------------------------------------ @@ -877,7 +878,8 @@ void TPGalleryThemeProperties::FillFilterList() { aExt = rFilter.GetImportFormatShortName( i ); aName = rFilter.GetImportFormatName( i ); - pTestEntry = (FilterEntry*) aFilterEntryList.First(); + size_t entryIndex = 0; + pTestEntry = aFilterEntryList.empty() ? NULL : aFilterEntryList[ entryIndex ]; bInList = sal_False; String aExtensions; @@ -904,18 +906,24 @@ void TPGalleryThemeProperties::FillFilterList() bInList = sal_True; break; } - pTestEntry = (FilterEntry*) aFilterEntryList.Next(); + pTestEntry = ( ++entryIndex < aFilterEntryList.size() ) + ? aFilterEntryList[ entryIndex ] : NULL; } if ( !bInList ) { pFilterEntry = new FilterEntry; pFilterEntry->aFilterName = aExt; - aFilterEntryList.Insert( pFilterEntry, aCbbFileType.InsertEntry( aName ) ); + size_t pos = aCbbFileType.InsertEntry( aName ); + if ( pos < aFilterEntryList.size() ) { + aFilterEntryList.insert( aFilterEntryList.begin() + pos, pFilterEntry ); + } else { + aFilterEntryList.push_back( pFilterEntry ); + } } } // media filters - static const ::rtl::OUString aWildcard( RTL_CONSTASCII_USTRINGPARAM( "*." ) ); + static const ::rtl::OUString aWildcard( RTL_CONSTASCII_USTRINGPARAM( "*." ) ); ::avmedia::FilterNameVector aFilters; const ::rtl::OUString aSeparator( RTL_CONSTASCII_USTRINGPARAM( ";" ) ); ::rtl::OUString aAllTypes; @@ -930,9 +938,20 @@ void TPGalleryThemeProperties::FillFilterList() pFilterEntry = new FilterEntry; pFilterEntry->aFilterName = aFilters[ l ].second.getToken( 0, ';', nIndex ); - nFirstExtFilterPos = aCbbFileType.InsertEntry( addExtension( aFilters[ l ].first, - aFilterWildcard += pFilterEntry->aFilterName ) ); - aFilterEntryList.Insert( pFilterEntry, nFirstExtFilterPos ); + nFirstExtFilterPos = aCbbFileType.InsertEntry( + addExtension( + aFilters[ l ].first, + aFilterWildcard += pFilterEntry->aFilterName + ) + ); + if ( nFirstExtFilterPos < aFilterEntryList.size() ) { + aFilterEntryList.insert( + aFilterEntryList.begin() + nFirstExtFilterPos, + pFilterEntry + ); + } else { + aFilterEntryList.push_back( pFilterEntry ); + } } } @@ -978,8 +997,12 @@ void TPGalleryThemeProperties::FillFilterList() pFilterEntry = new FilterEntry; pFilterEntry->aFilterName = String( CUI_RES( RID_SVXSTR_GALLERY_ALLFILES ) ); pFilterEntry->aFilterName = addExtension( pFilterEntry->aFilterName, aExtensions ); - aFilterEntryList.Insert(pFilterEntry, aCbbFileType. InsertEntry( pFilterEntry->aFilterName, 0 ) ); - + size_t pos = aCbbFileType.InsertEntry( pFilterEntry->aFilterName, 0 ); + if ( pos < aFilterEntryList.size() ) { + aFilterEntryList.insert( aFilterEntryList.begin() + pos, pFilterEntry ); + } else { + aFilterEntryList.push_back( pFilterEntry ); + } aCbbFileType.SetText( pFilterEntry->aFilterName ); } diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 0d82fd0d2..1009ce0e7 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -309,6 +309,7 @@ public: // ---------------------------- // - TPGalleryThemeProperties - // ---------------------------- +typedef ::std::vector< FilterEntry* > FilterEntryList_impl; class TPGalleryThemeProperties : public SfxTabPage { @@ -325,13 +326,13 @@ class TPGalleryThemeProperties : public SfxTabPage CheckBox aCbxPreview; GalleryPreview aWndPreview; - ExchangeData* pData; - StringList aFoundList; - List aFilterEntryList; - Timer aPreviewTimer; - String aLastFilterName; - String aPreviewString; - INetURLObject aURL; + ExchangeData* pData; + StringList aFoundList; + FilterEntryList_impl aFilterEntryList; + Timer aPreviewTimer; + String aLastFilterName; + String aPreviewString; + INetURLObject aURL; sal_uInt16 nCurFilterPos; sal_uInt16 nFirstExtFilterPos; sal_Bool bEntriesFound; -- cgit v1.2.3 From cf6868c5064ef9adce34e45c9653ac138e790e6f Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 20 Jun 2011 02:42:24 +0200 Subject: a bit of optimitation --- wizards/com/sun/star/wizards/common/ConfigGroup.py | 5 +-- wizards/com/sun/star/wizards/common/FileAccess.py | 10 ++---- wizards/com/sun/star/wizards/common/Helper.py | 17 ++++------ .../com/sun/star/wizards/common/NumberFormatter.py | 1 - .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 38 +++++++++------------- wizards/com/sun/star/wizards/text/TextDocument.py | 7 ++-- .../com/sun/star/wizards/text/TextFieldHandler.py | 33 +++++++++---------- wizards/com/sun/star/wizards/ui/PathSelection.py | 2 -- wizards/com/sun/star/wizards/ui/UnoDialog.py | 2 +- wizards/com/sun/star/wizards/ui/WizardDialog.py | 7 ++-- 10 files changed, 50 insertions(+), 72 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.py b/wizards/com/sun/star/wizards/common/ConfigGroup.py index 2cd261831..a5824e803 100644 --- a/wizards/com/sun/star/wizards/common/ConfigGroup.py +++ b/wizards/com/sun/star/wizards/common/ConfigGroup.py @@ -16,13 +16,14 @@ class ConfigGroup(ConfigNode): def writeField(self, field, configView, prefix): propertyName = field[len(prefix):] field = getattr(self,field) - fieldType = type(field) + if isinstance(field, ConfigNode): pass - #COMMENTED + #print configView #childView = Configuration.addConfigNode(configView, propertyName) #self.writeConfiguration(childView, prefix) else: + #print type(field) Configuration.Set(self.convertValue(field), propertyName, configView) diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 6f8e16bb2..8c58091c7 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -109,15 +109,9 @@ class FileAccess(object): Template_user = xPathInterface.getPropertyValue( sPath + "_user") if type(Template_internal) is not types.InstanceType: - if isinstance(Template_internal,tuple): - ReadPaths = ReadPaths + Template_internal - else: - ReadPaths = ReadPaths + (Template_internal,) + ReadPaths = ReadPaths + Template_internal if type(Template_user) is not types.InstanceType: - if isinstance(Template_user,tuple): - ReadPaths = ReadPaths + Template_user - else: - ReadPaths = ReadPaths + (Template_internal,) + ReadPaths = ReadPaths + Template_user ReadPaths = ReadPaths + (Template_writable,) if sType.lower() == "user": ResultPath = Template_writable diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py index 32cdb72a2..f2c6d6944 100644 --- a/wizards/com/sun/star/wizards/common/Helper.py +++ b/wizards/com/sun/star/wizards/common/Helper.py @@ -42,14 +42,11 @@ class Helper(object): @classmethod def getPropertyValue(self, CurPropertyValue, PropertyName): - MaxCount = len(CurPropertyValue) - i = 0 - while i < MaxCount: - if CurPropertyValue[i] is not None: - if CurPropertyValue[i].Name.equals(PropertyName): - return CurPropertyValue[i].Value - - i += 1 + for i in CurPropertyValue: + if i is not None: + if i.Name == PropertyName: + return i.Value + raise RuntimeException() @classmethod @@ -117,11 +114,9 @@ class Helper(object): uno.invoke(xMultiPSetLst, "setPropertyValues", (PropertyNames, PropertyValues)) else: - i = 0 - while i < len(PropertyNames): + for i in xrange(len(PropertyNames)): self.setUnoPropertyValue(xMultiPSetLst, PropertyNames[i], PropertyValues[i]) - i += 1 except Exception, e: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.py b/wizards/com/sun/star/wizards/common/NumberFormatter.py index eff9f16c2..a3deb1730 100644 --- a/wizards/com/sun/star/wizards/common/NumberFormatter.py +++ b/wizards/com/sun/star/wizards/common/NumberFormatter.py @@ -59,7 +59,6 @@ class NumberFormatter(object): Type, Locale()) def convertNumberToString(self, _nkey, _dblValue, _xNumberFormatter=None): - print "yepa" if _xNumberFormatter is None: return self.xNumberFormatter.convertNumberToString( _nkey, _dblValue) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 58ee5ac8a..32ce4b808 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -523,6 +523,9 @@ class FaxWizardDialogImpl(FaxWizardDialog): PropertyNames.PROPERTY_ENABLED, True) self.setControlProperty("txtSenderFax", PropertyNames.PROPERTY_ENABLED, True) + + self.myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, + self.xTextDocument) self.txtSenderNameTextChanged() self.txtSenderStreetTextChanged() self.txtSenderPostCodeTextChanged() @@ -545,39 +548,28 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.bEditTemplate = True def txtSenderNameTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, - self.xTextDocument) - myFieldHandler.changeUserFieldContent("Company", - self.txtSenderName.Text) + self.myFieldHandler.changeUserFieldContent( + "Company", self.txtSenderName.Text) def txtSenderStreetTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, - self.xTextDocument) - myFieldHandler.changeUserFieldContent("Street", - self.txtSenderStreet.Text) + self.myFieldHandler.changeUserFieldContent( + "Street", self.txtSenderStreet.Text) def txtSenderCityTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, - self.xTextDocument) - myFieldHandler.changeUserFieldContent("City", - self.txtSenderCity.Text) + self.myFieldHandler.changeUserFieldContent( + "City", self.txtSenderCity.Text) def txtSenderPostCodeTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, - self.xTextDocument) - myFieldHandler.changeUserFieldContent("PostCode", - self.txtSenderPostCode.Text) + self.myFieldHandler.changeUserFieldContent( + "PostCode", self.txtSenderPostCode.Text) def txtSenderStateTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, - self.xTextDocument) - myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, - self.txtSenderState.Text) + self.myFieldHandler.changeUserFieldContent( + PropertyNames.PROPERTY_STATE, self.txtSenderState.Text) def txtSenderFaxTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, - self.xTextDocument) - myFieldHandler.changeUserFieldContent("Fax", self.txtSenderFax.Text) + self.myFieldHandler.changeUserFieldContent( + "Fax", self.txtSenderFax.Text) #switch Elements on/off -------------------------------------------------- diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index c432ee7a1..fb97048d6 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -124,12 +124,15 @@ class TextDocument(object): mode in order to avoid the 'do u want to save' box''' if self.xTextDocument is not None: try: - self.xTextDocument.setModified(False) + self.xTextDocument.Modified = False except PropertyVetoException, e1: traceback.print_exc() + self.xTextDocument = OfficeDocument.load( self.xFrame, sDefaultTemplate, "_self", loadValues) + self.DocSize = self.getPageSize() + myViewHandler = ViewHandler(self.xTextDocument, self.xTextDocument) try: myViewHandler.setViewSetting( @@ -142,7 +145,7 @@ class TextDocument(object): def getPageSize(self): try: - xNameAccess = self.xTextDocument.getStyleFamilies() + xNameAccess = self.xTextDocument.StyleFamilies xPageStyleCollection = xNameAccess.getByName("PageStyles") xPageStyle = xPageStyleCollection.getByName("First Page") return Helper.getUnoPropertyValue(xPageStyle, "Size") diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.py b/wizards/com/sun/star/wizards/text/TextFieldHandler.py index d9e3ed842..22f94a386 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.py +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.py @@ -14,6 +14,7 @@ class TextFieldHandler(object): ''' xTextFieldsSupplierAux = None + arrayTextFields = None dictTextFields = None def __init__(self, xMSF, xTextDocument): @@ -73,10 +74,12 @@ class TextFieldHandler(object): try: if self.xTextFieldsSupplier.TextFields.hasElements(): TextFieldHandler.dictTextFields = {} + TextFieldHandler.arrayTextFields = [] xEnum = \ self.xTextFieldsSupplier.TextFields.createEnumeration() while xEnum.hasMoreElements(): oTextField = xEnum.nextElement() + TextFieldHandler.arrayTextFields.append(oTextField) xPropertySet = oTextField.TextFieldMaster if len(xPropertySet.Name) is not 0: TextFieldHandler.dictTextFields[xPropertySet.Name] = \ @@ -118,47 +121,41 @@ class TextFieldHandler(object): def updateDocInfoFields(self): try: - xEnum = self.xTextFieldsSupplier.TextFields.createEnumeration() - while xEnum.hasMoreElements(): - oTextField = xEnum.nextElement() - if oTextField.supportsService( + for i in TextFieldHandler.arrayTextFields: + if i.supportsService( "com.sun.star.text.TextField.ExtendedUser"): - oTextField.update() + i.update() - if oTextField.supportsService( + if i.supportsService( "com.sun.star.text.TextField.User"): - oTextField.update() + i.update() except Exception, e: traceback.print_exc() def updateDateFields(self): try: - xEnum = self.xTextFieldsSupplier.TextFields.createEnumeration() now = time.localtime(time.time()) dt = DateTime() dt.Day = time.strftime("%d", now) dt.Year = time.strftime("%Y", now) dt.Month = time.strftime("%m", now) dt.Month += 1 - while xEnum.hasMoreElements(): - oTextField = xEnum.nextElement() - if oTextField.supportsService( + for i in TextFieldHandler.arrayTextFields: + if i.supportsService( "com.sun.star.text.TextField.DateTime"): - oTextField.setPropertyValue("IsFixed", False) - oTextField.setPropertyValue("DateTimeValue", dt) + i.setPropertyValue("IsFixed", False) + i.setPropertyValue("DateTimeValue", dt) except Exception, e: traceback.print_exc() def fixDateFields(self, _bSetFixed): try: - xEnum = self.xTextFieldsSupplier.TextFields.createEnumeration() - while xEnum.hasMoreElements(): - oTextField = xEnum.nextElement() - if oTextField.supportsService( + for i in TextFieldHandler.arrayTextFields: + if i.supportsService( "com.sun.star.text.TextField.DateTime"): - oTextField.setPropertyValue("IsFixed", _bSetFixed) + i.setPropertyValue("IsFixed", _bSetFixed) except Exception, e: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py index b8487990c..b7ea23c48 100644 --- a/wizards/com/sun/star/wizards/ui/PathSelection.py +++ b/wizards/com/sun/star/wizards/ui/PathSelection.py @@ -89,8 +89,6 @@ class PathSelection(object): def triggerPathPicker(self): try: - print self.iTransferMode - print self.TransferMode.SAVE if self.iTransferMode == self.TransferMode.SAVE: if self.iDialogType == self.DialogTypes.FOLDER: #TODO: write code for picking a folder for saving diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index baacd58c5..fc63ddbc4 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -47,7 +47,7 @@ class UnoDialog(object): def setControlProperty(self, ControlName, PropertyName, PropertyValue): try: if PropertyValue is not None: - if self.xDialogModel.hasByName(ControlName) == False: + if not self.xDialogModel.hasByName(ControlName): return xPSet = self.xDialogModel.getByName(ControlName) if isinstance(PropertyValue,bool): diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index 874f5407e..377cffd7a 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -161,14 +161,13 @@ class WizardDialog(UnoDialog2): def getRoadmapItemByID(self, _ID): try: - i = 0 - while i < self.oRoadmap.Count: - CurRoadmapItem = self.oRoadmap.getByIndex(i) + getByIndex = self.oRoadmap.getByIndex + for i in xrange(self.oRoadmap.Count): + CurRoadmapItem = getByIndex(i) CurID = int(Helper.getUnoPropertyValue(CurRoadmapItem, "ID")) if CurID == _ID: return CurRoadmapItem - i += 1 return None except UnoException, exception: traceback.print_exc() -- cgit v1.2.3 From b7795f55ccf3971c0f7afb5f74153a0eec7c88fc Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 18 Jun 2011 00:05:06 +0100 Subject: catch by const reference --- cui/source/customize/macropg.cxx | 18 ++++++++++-------- cui/source/dialogs/cuigaldlg.cxx | 8 ++++---- cui/source/dialogs/hldocntp.cxx | 2 +- cui/source/options/optgdlg.cxx | 22 +++++++++++++--------- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 90c6765fa..944d6d0cb 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -344,7 +344,7 @@ sal_Bool _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) { m_xAppEvents->replaceByName( eventName, GetPropsByName( eventName, m_appEventsHash ) ); } - catch( const Exception& ) + catch (const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -361,7 +361,7 @@ sal_Bool _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) { m_xDocEvents->replaceByName( eventName, GetPropsByName( eventName, m_docEventsHash ) ); } - catch( const Exception& ) + catch (const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -375,7 +375,7 @@ sal_Bool _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) } } } - catch(Exception&) + catch (const Exception&) { } // what is the return value about?? @@ -420,7 +420,7 @@ void _SvxMacroTabPage::Reset() } } } - catch(Exception&) + catch (const Exception&) { } DisplayAppEvents(bAppEvents); @@ -763,8 +763,9 @@ void _SvxMacroTabPage::InitAndSetHandler( Reference< container::XNameReplace> xA { m_appEventsHash[ eventNames[nEvent] ] = GetPairFromAny( m_xAppEvents->getByName( eventNames[nEvent] ) ); } - catch (Exception e) - {} + catch (const Exception&) + { + } } if(m_xDocEvents.is()) { @@ -776,8 +777,9 @@ void _SvxMacroTabPage::InitAndSetHandler( Reference< container::XNameReplace> xA { m_docEventsHash[ eventNames[nEvent] ] = GetPairFromAny( m_xDocEvents->getByName( eventNames[nEvent] ) ); } - catch (Exception e) - {} + catch (const Exception&) + { + } } } } diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 07a11c45b..c09912899 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -205,13 +205,13 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, } } } - catch( const ContentCreationException& ) + catch (const ContentCreationException&) { } - catch( const ::com::sun::star::uno::RuntimeException& ) + catch (const ::com::sun::star::uno::RuntimeException&) { } - catch( const ::com::sun::star::uno::Exception& ) + catch (const ::com::sun::star::uno::Exception&) { } } @@ -1091,7 +1091,7 @@ IMPL_LINK( TPGalleryThemeProperties, ClickSearchHdl, void *, EMPTYARG ) } } } - catch(IllegalArgumentException) + catch (const IllegalArgumentException&) { OSL_FAIL( "Folder picker failed with illegal arguments" ); } diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 7bd15f793..212416c64 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -395,7 +395,7 @@ void SvxHyperlinkNewDocTp::DoApply () } } } - catch( uno::Exception ) + catch (const uno::Exception&) { } diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 7cab00aeb..018049c40 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -180,9 +180,12 @@ namespace if ( xEnum.is() && xEnum->hasMoreElements() ) bRet = sal_True; } - - catch( IllegalArgumentException ) {} - catch( ElementExistException ) {} + catch (const IllegalArgumentException&) + { + } + catch (const ElementExistException&) + { + } return bRet; } } @@ -639,7 +642,7 @@ CanvasSettings::CanvasSettings() : ++pCurr; } } - catch( Exception& ) + catch (const Exception&) { } } @@ -677,8 +680,9 @@ sal_Bool CanvasSettings::IsHardwareAccelerationAvailable() const return mbHWAccelAvailable; } } - catch (Exception &) - {} + catch (const Exception&) + { + } ++pCurrImpl; } @@ -1339,7 +1343,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe } } - catch (Exception &e) + catch (const Exception &e) { // we'll just leave the box in it's default setting and won't // even give it event handler... @@ -1522,7 +1526,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) } } } - catch (Exception& e) + catch (const Exception& e) { // we'll just leave the box in it's default setting and won't // even give it event handler... @@ -1757,7 +1761,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) aCTLLang >>= aLocale; eCurLangCTL = MsLangId::convertLocaleToLanguage( aLocale ); } - catch(Exception&) + catch (const Exception&) { } //overwrite them by the values provided by the DocShell -- cgit v1.2.3 From 1c6664a66120a666f21ae9339a65d410e309178c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 20 Jun 2011 00:13:33 +0100 Subject: totally pointless intermediate object --- accessibility/source/helper/accresmgr.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/accessibility/source/helper/accresmgr.cxx b/accessibility/source/helper/accresmgr.cxx index a448c4000..f81231156 100644 --- a/accessibility/source/helper/accresmgr.cxx +++ b/accessibility/source/helper/accresmgr.cxx @@ -56,9 +56,7 @@ void TkResMgr::ensureImplExists() ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); - ByteString sResMgrName( "acc" ); - - m_pImpl = SimpleResMgr::Create( sResMgrName.GetBuffer(), aLocale ); + m_pImpl = SimpleResMgr::Create("acc", aLocale ); if (m_pImpl) { -- cgit v1.2.3 From 7185dab5af6ca5b9c32288d269d160520bf9ba2f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 20 Jun 2011 00:15:51 +0100 Subject: totally pointless intermediate object --- basctl/source/basicide/iderdll.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx index b9d9a69b1..7e2bbd5ae 100644 --- a/basctl/source/basicide/iderdll.cxx +++ b/basctl/source/basicide/iderdll.cxx @@ -97,9 +97,8 @@ void BasicIDEDLL::Init() SfxObjectFactory* pFact = &BasicDocShell::Factory(); (void)pFact; - ByteString aResMgrName( "basctl" ); ResMgr* pMgr = ResMgr::CreateResMgr( - aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + "basctl", Application::GetSettings().GetUILocale() ); BASIC_MOD() = new BasicIDEModule( pMgr, &BasicDocShell::Factory() ); -- cgit v1.2.3 From ccaf8c8f08fd94581b87493569ec2f9e60e95593 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 20 Jun 2011 00:20:17 +0100 Subject: totally pointless intermediate object --- cui/source/factory/cuiresmgr.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cui/source/factory/cuiresmgr.cxx b/cui/source/factory/cuiresmgr.cxx index c04206ccb..8e3bc3140 100644 --- a/cui/source/factory/cuiresmgr.cxx +++ b/cui/source/factory/cuiresmgr.cxx @@ -33,15 +33,14 @@ #include #include -static ResMgr* pResMgr=0; - // struct DialogsResMgr -------------------------------------------------- ResMgr* CuiResMgr::GetResMgr() { + static ResMgr* pResMgr=0; + if ( !pResMgr ) { - ByteString aName( "cui" ); - pResMgr = ResMgr::CreateResMgr( aName.GetBuffer(), Application::GetSettings().GetUILocale() ); + pResMgr = ResMgr::CreateResMgr("cui", Application::GetSettings().GetUILocale()); } return pResMgr; -- cgit v1.2.3 From 7032e992fdc6ba3560c233a21e3bbb8d00a98894 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 20 Jun 2011 00:27:58 +0100 Subject: sFontGroup unused --- cui/source/options/fontsubs.cxx | 1 - cui/source/options/fontsubs.hxx | 1 - 2 files changed, 2 deletions(-) diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index 6a05a00cc..e8bb7af50 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -77,7 +77,6 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent, sHeader3 (CUI_RES( STR_HEADER3 )), sHeader4 (CUI_RES( STR_HEADER4 )), - sFontGroup ("FontSubstitution"), pCheckButtonData(0) { FreeResource(); diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx index 2be4d3cf6..0c60f4a14 100644 --- a/cui/source/options/fontsubs.hxx +++ b/cui/source/options/fontsubs.hxx @@ -99,7 +99,6 @@ class SvxFontSubstTabPage : public SfxTabPage String sHeader4; Color aTextColor; - ByteString sFontGroup; SvLBoxButtonData* pCheckButtonData; -- cgit v1.2.3 From 6f889198695ef3aef966098fee7a68f3e4d68c6e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 20 Jun 2011 00:29:10 +0100 Subject: ByteString -> rtl::OStringBuffer --- cui/source/dialogs/iconcdlg.cxx | 2 +- cui/source/dialogs/srchxtra.cxx | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 5dd9edc7a..f8a558b33 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -1106,7 +1106,7 @@ void IconChoiceDialog::Start_Impl() if ( aTabDlgOpt.Exists() ) { // ggf. Position aus Konfig - SetWindowState( ByteString( aTabDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) ); + SetWindowState(rtl::OUStringToOString(aTabDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US)); // initiale TabPage aus Programm/Hilfe/Konfig nActPage = (sal_uInt16)aTabDlgOpt.GetPageID(); diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index db8028a11..780233c4d 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -45,6 +45,7 @@ #include "backgrnd.hxx" #include // RID_SVXPAGE_... #include +#include // class SvxSearchFormatDialog ------------------------------------------- @@ -186,9 +187,10 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent, pEntry = aAttrLB.SvTreeListBox::InsertEntry( aAttrNames.GetString(nId) ); else { - ByteString sError( "no resource for slot id\nslot = " ); - sError += ByteString::CreateFromInt32( nSlot ); - DBG_ERRORFILE( sError.GetBuffer() ); + rtl::OStringBuffer sError( + RTL_CONSTASCII_STRINGPARAM("no resource for slot id\nslot = ")); + sError.append(nSlot); + DBG_ERRORFILE(sError.getStr()); } if ( pEntry ) -- cgit v1.2.3 From 538f670a79b6bb86b63bab8b7e758b717ab2f7b8 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 20 Jun 2011 00:32:38 +0100 Subject: totally pointless intermediate object --- forms/source/resource/frm_resource.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/forms/source/resource/frm_resource.cxx b/forms/source/resource/frm_resource.cxx index c8d65eb91..87d2f9c10 100644 --- a/forms/source/resource/frm_resource.cxx +++ b/forms/source/resource/frm_resource.cxx @@ -59,9 +59,7 @@ namespace frm if (m_pImpl) return; - ByteString sFileName("frm"); - - m_pImpl = SimpleResMgr::Create(sFileName.GetBuffer(), Application::GetSettings().GetUILocale()); + m_pImpl = SimpleResMgr::Create("frm", Application::GetSettings().GetUILocale()); if (m_pImpl) { -- cgit v1.2.3 From 13e247576fed353f99ad8380f844ae6476e11400 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 20 Jun 2011 11:44:37 +0100 Subject: fix ambiguity --- cui/source/dialogs/srchxtra.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index 780233c4d..b67fdadfc 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -189,7 +189,7 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent, { rtl::OStringBuffer sError( RTL_CONSTASCII_STRINGPARAM("no resource for slot id\nslot = ")); - sError.append(nSlot); + sError.append(static_cast(nSlot)); DBG_ERRORFILE(sError.getStr()); } -- cgit v1.2.3 From 411c7344aaba2949f738cfe6e5cee318fe3d8be3 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 20 Jun 2011 14:20:37 +0200 Subject: Footer checkbox works correctly now. Others: - Replace all UnoException by python Exception --- .../com/sun/star/wizards/common/Configuration.py | 17 ++++++++--------- wizards/com/sun/star/wizards/common/Desktop.py | 11 +++++------ wizards/com/sun/star/wizards/common/FileAccess.py | 9 ++++----- wizards/com/sun/star/wizards/common/Helper.py | 15 +++++++-------- wizards/com/sun/star/wizards/common/SystemDialog.py | 11 +++++------ wizards/com/sun/star/wizards/fax/FaxDocument.py | 17 ++++++++--------- .../com/sun/star/wizards/fax/FaxWizardDialogImpl.py | 21 +++++++++------------ wizards/com/sun/star/wizards/ui/PathSelection.py | 5 ++--- wizards/com/sun/star/wizards/ui/UnoDialog.py | 10 +++++----- wizards/com/sun/star/wizards/ui/WizardDialog.py | 15 +++++++-------- 10 files changed, 60 insertions(+), 71 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/Configuration.py b/wizards/com/sun/star/wizards/common/Configuration.py index 88f853bba..96385bfab 100644 --- a/wizards/com/sun/star/wizards/common/Configuration.py +++ b/wizards/com/sun/star/wizards/common/Configuration.py @@ -1,5 +1,4 @@ from PropertyNames import PropertyNames -from com.sun.star.uno import Exception as UnoException from Helper import * import traceback import uno @@ -73,7 +72,7 @@ class Configuration(object): "org.openoffice.Setup/Product", False) ProductName = Helper.getUnoObjectbyName(oProdNameAccess, "ooName") return ProductName - except UnoException: + except Exception: traceback.print_exc() return None @@ -86,7 +85,7 @@ class Configuration(object): "org.openoffice.Setup/L10N/", False) sLocale = (String) Helper.getUnoObjectbyName(oMasterKey, "ooLocale") - except UnoException, exception: + except Exception, exception: traceback.print_exc() return sLocale @@ -109,7 +108,7 @@ class Configuration(object): "org.openoffice.Setup/L10N/", False) sLinguistic = Helper.getUnoObjectbyName(oMasterKey, "ooLocale") return sLinguistic - except UnoException, exception: + except Exception, exception: traceback.print_exc() return None @@ -188,7 +187,7 @@ class Configuration(object): i += 1 return sdisplaynames - except UnoException, e: + except Exception, e: traceback.print_exc() return snames @@ -198,7 +197,7 @@ class Configuration(object): snames = _xNameAccess.getElementNames() oNode = _xNameAccess.getByName(snames[_index]) return oNode - except UnoException, e: + except Exception, e: traceback.print_exc() return None @@ -208,7 +207,7 @@ class Configuration(object): if _xNameAccessNode.hasByName(_SubNodeName): return _xNameAccessNode.getByName(_SubNodeName) - except UnoException, e: + except Exception, e: traceback.print_exc() return None @@ -235,7 +234,7 @@ class Configuration(object): return _xNameAccessNode.getByName(snames[i]) i += 1 - except UnoException, e: + except Exception, e: traceback.print_exc() return None @@ -263,7 +262,7 @@ class Configuration(object): return _xNameAccessNode.getByName(snames[i]) i += 1 - except UnoException, e: + except Exception, e: traceback.print_exc() return None diff --git a/wizards/com/sun/star/wizards/common/Desktop.py b/wizards/com/sun/star/wizards/common/Desktop.py index 81dab1687..0bdf9617e 100644 --- a/wizards/com/sun/star/wizards/common/Desktop.py +++ b/wizards/com/sun/star/wizards/common/Desktop.py @@ -4,7 +4,6 @@ from com.sun.star.frame.FrameSearchFlag import ALL, PARENT from com.sun.star.util import URL from com.sun.star.i18n.KParseTokens import ANY_LETTER_OR_NUMBER, ASC_UNDERSCORE from NoValidPathException import * -from com.sun.star.uno import Exception as UnoException class Desktop(object): @@ -15,7 +14,7 @@ class Desktop(object): if xMSF is not None: try: xDesktop = xMSF.createInstance( "com.sun.star.frame.Desktop") - except UnoException, exception: + except Exception, exception: traceback.print_exc() else: print "Can't create a desktop. null pointer !" @@ -49,7 +48,7 @@ class Desktop(object): oURLArray[0] = oURL xDispatch = xFrame.queryDispatch(oURLArray[0], _stargetframe, ALL) return xDispatch - except UnoException, e: + except Exception, e: e.printStackTrace(System.out) return None @@ -64,7 +63,7 @@ class Desktop(object): oURL[0].Complete = _sURL xTransformer.parseStrict(oURL) return oURL[0] - except UnoException, e: + except Exception, e: e.printStackTrace(System.out) return None @@ -102,7 +101,7 @@ class Desktop(object): aResult = ocharservice.parsePredefinedToken(KParseType.IDENTNAME, _sString, 0, _aLocale, nStartFlags, "", nStartFlags, " ") return aResult.EndPos - except UnoException, e: + except Exception, e: e.printStackTrace(System.out) return -1 @@ -203,7 +202,7 @@ class Desktop(object): "com.sun.star.configuration.ConfigurationAccess", aNodePath) - except UnoException, exception: + except Exception, exception: exception.printStackTrace(System.out) return None diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 8c58091c7..8ac514ab6 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -1,7 +1,6 @@ import traceback from NoValidPathException import * from com.sun.star.ucb import CommandAbortedException -from com.sun.star.uno import Exception as UnoException from com.sun.star.awt.VclWindowPeerAttribute import OK, YES_NO import types from os import path as osPath @@ -74,7 +73,7 @@ class FileAccess(object): ResultPath = str(Helper.getUnoPropertyValue(xInterface, sPath)) ResultPath = self.deleteLastSlashfromUrl(ResultPath) return ResultPath - except UnoException, exception: + except Exception, exception: traceback.print_exc() return "" @@ -126,7 +125,7 @@ class FileAccess(object): break ResultPath = self.deleteLastSlashfromUrl(ResultPath) - except UnoException, exception: + except Exception, exception: traceback.print_exc() ResultPath = "" @@ -167,7 +166,7 @@ class FileAccess(object): i += 1 aPathList.add(Template_writable) - except UnoException, exception: + except Exception, exception: traceback.print_exc() return aPathList @@ -293,7 +292,7 @@ class FileAccess(object): sMsgNoDir = JavaTools.replaceSubString(sNoDirCreation, Path, "%1") SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, sMsgNoDir) return False - except com.sun.star.uno.Exception, unoexception: + except com.sun.star.uno.Exception, Exception: sMsgNoDir = JavaTools.replaceSubString(sNoDirCreation, Path, "%1") SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, sMsgNoDir) return False diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py index f2c6d6944..727f3f077 100644 --- a/wizards/com/sun/star/wizards/common/Helper.py +++ b/wizards/com/sun/star/wizards/common/Helper.py @@ -1,7 +1,6 @@ import uno import traceback from datetime import date as DateTime -from com.sun.star.uno import Exception as UnoException from com.sun.star.uno import RuntimeException from NumberFormatter import NumberFormatter @@ -25,7 +24,7 @@ class Helper(object): selementnames = xPSet.getPropertySetInfo().getProperties() raise ValueError("No Such Property: '" + PropertyName + "'") - except UnoException, exception: + except Exception, exception: traceback.print_exc() @classmethod @@ -36,7 +35,7 @@ class Helper(object): else: raise RuntimeException(); - except UnoException, exception: + except Exception, exception: traceback.print_exc() return None @@ -63,7 +62,7 @@ class Helper(object): i += 1 return None - except UnoException, exception: + except Exception, exception: traceback.print_exc() return None @@ -76,7 +75,7 @@ class Helper(object): return oObject return None - except UnoException, exception: + except Exception, exception: traceback.print_exc() return None @@ -88,7 +87,7 @@ class Helper(object): if isinstance(oObject,list): return getArrayValue(oObject) - except UnoException, exception: + except Exception, exception: traceback.print_exc() return None @@ -102,7 +101,7 @@ class Helper(object): return oObject return None - except UnoException, exception: + except Exception, exception: traceback.print_exc() return None @@ -140,7 +139,7 @@ class Helper(object): else: return oPropList - except UnoException, exception: + except Exception, exception: traceback.print_exc() return None diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py b/wizards/com/sun/star/wizards/common/SystemDialog.py index 2da851dd9..324242674 100644 --- a/wizards/com/sun/star/wizards/common/SystemDialog.py +++ b/wizards/com/sun/star/wizards/common/SystemDialog.py @@ -9,7 +9,6 @@ from com.sun.star.ui.dialogs.TemplateDescription import FILESAVE_AUTOEXTENSION, from com.sun.star.ui.dialogs.ExtendedFilePickerElementIds import CHECKBOX_AUTOEXTENSION from com.sun.star.awt import WindowDescriptor from com.sun.star.awt.WindowClass import MODALTOP -from com.sun.star.uno import Exception as UnoException from com.sun.star.lang import IllegalArgumentException from com.sun.star.awt.VclWindowPeerAttribute import OK @@ -30,7 +29,7 @@ class SystemDialog(object): prova = uno.Any("[]short",(Type,)) #uno.invoke(prova, "initialize", (uno.Any("short",(Type,)),)) - except UnoException, exception: + except Exception, exception: traceback.print_exc() @classmethod @@ -81,7 +80,7 @@ class SystemDialog(object): sPathList = self.systemDialog.getFiles() self.sStorePath = sPathList[0] - except UnoException, exception: + except Exception, exception: traceback.print_exc() return self.sStorePath @@ -111,7 +110,7 @@ class SystemDialog(object): if self.execute(self.systemDialog): return self.systemDialog.getFiles() - except UnoException, exception: + except Exception, exception: traceback.print_exc() return None @@ -169,7 +168,7 @@ class SystemDialog(object): i += 1 raise NullPointerException( "UIName property not found for Filter " + filterName); - except UnoException, exception: + except Exception, exception: traceback.print_exc() return None @@ -233,6 +232,6 @@ class SystemDialog(object): xPathSubst = xMSF.createInstance( "com.sun.star.util.PathSubstitution") return xPathSubst - except UnoException, e: + except Exception, e: traceback.print_exc() return None diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py index 8ff2e648b..581b8e7ee 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.py +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -1,6 +1,5 @@ import uno from text.TextDocument import * -from com.sun.star.uno import Exception as UnoException from text.TextSectionHandler import TextSectionHandler from text.TextFieldHandler import TextFieldHandler from common.Configuration import Configuration @@ -26,7 +25,7 @@ class FaxDocument(TextDocument): oSection = \ mySectionHandler.xTextDocument.TextSections.getByName(sElement) Helper.setUnoPropertyValue(oSection, "IsVisible", bState) - except UnoException, exception: + except Exception, exception: traceback.print_exc() def updateDateFields(self): @@ -44,7 +43,7 @@ class FaxDocument(TextDocument): if bState: xPageStyle.setPropertyValue("FooterIsOn", True) - xFooterText = propertySet.getPropertyValue("FooterText") + xFooterText = Helper.getUnoPropertyValue(xPageStyle, "FooterText") xFooterText.String = sText if bPageNumber: @@ -55,11 +54,11 @@ class FaxDocument(TextDocument): PARAGRAPH_BREAK, False) myCursor.setPropertyValue("ParaAdjust", CENTER ) - xPageNumberField = xMSFDoc.createInstance( + xPageNumberField = self.xTextDocument.createInstance( "com.sun.star.text.TextField.PageNumber") - xPageNumberField.setPropertyValue( - "NumberingType", uno.Any("short",ARABIC)) xPageNumberField.setPropertyValue("SubType", CURRENT) + uno.invoke(xPageNumberField, "setPropertyValue", + ("NumberingType", uno.Any("short",ARABIC))) xFooterText.insertTextContent(xFooterText.End, xPageNumberField, False) else: @@ -67,7 +66,7 @@ class FaxDocument(TextDocument): False) self.xTextDocument.unlockControllers() - except UnoException, exception: + except Exception, exception: traceback.print_exc() def hasElement(self, sElement): @@ -105,7 +104,7 @@ class FaxDocument(TextDocument): myFieldHandler.changeUserFieldContent("Fax", Helper.getUnoObjectbyName(oUserDataAccess, "facsimiletelephonenumber")) - except UnoException, exception: + except Exception, exception: traceback.print_exc() def killEmptyUserFields(self): @@ -126,5 +125,5 @@ class FaxDocument(TextDocument): if xTF is not None: xTF.dispose() - except UnoException, e: + except Exception, e: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 32ce4b808..5abc8c03f 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -55,9 +55,6 @@ class FaxWizardDialogImpl(FaxWizardDialog): except RuntimeException, e: # TODO Auto-generated catch block traceback.print_exc() - except UnoException, e: - # TODO Auto-generated catch blocksetMaxStep - traceback.print_exc() except Exception, e: # TODO Auto-generated catch blocksetMaxStep traceback.print_exc() @@ -123,7 +120,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.removeTerminateListener() self.closeDocument() self.running = False - except UnoException, exception: + except Exception, exception: self.removeTerminateListener() traceback.print_exc() self.running = False @@ -207,7 +204,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): pass #TODO: Error Handling - except UnoException, e: + except Exception, e: traceback.print_exc() finally: if endWizard: @@ -413,7 +410,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_TemplatePath", self.myPathSelection.xSaveTextBox, None, True)) - except UnoException, exception: + except Exception, exception: traceback.print_exc() def saveConfiguration(self): @@ -422,7 +419,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): "/org.openoffice.Office.Writer/Wizards/Fax", True) self.myConfig.writeConfiguration(root, "cp_") Configuration.commit(root) - except UnoException, e: + except Exception, e: traceback.print_exc() def setConfiguration(self): @@ -620,7 +617,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): def chkUseFooterItemChanged(self): try: bFooterPossible = (self.chkUseFooter.State is not 0) \ - and bool(getControlProperty("chkUseFooter", + and bool(self.getControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED)) if self.chkFooterNextPages.State is not 0: self.myFaxDoc.switchFooter("First Page", False, @@ -642,17 +639,17 @@ class FaxWizardDialogImpl(FaxWizardDialog): FaxWizardDialogImpl.RM_FOOTER) Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, bFooterPossible) - except UnoException, exception: + except Exception, exception: traceback.print_exc() def chkFooterNextPagesItemChanged(self): - chkUseFooterItemChanged() + self.chkUseFooterItemChanged() def chkFooterPageNumbersItemChanged(self): - chkUseFooterItemChanged() + self.chkUseFooterItemChanged() def txtFooterTextChanged(self): - chkUseFooterItemChanged() + self.chkUseFooterItemChanged() def chkUseSalutationItemChanged(self): self.myFaxDoc.switchUserField("Salutation", diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py index b7ea23c48..bc2685431 100644 --- a/wizards/com/sun/star/wizards/ui/PathSelection.py +++ b/wizards/com/sun/star/wizards/ui/PathSelection.py @@ -2,7 +2,6 @@ import traceback import uno from common.PropertyNames import * from common.FileAccess import * -from com.sun.star.uno import Exception as UnoException from common.SystemDialog import SystemDialog class PathSelection(object): @@ -84,7 +83,7 @@ class PathSelection(object): myFA.getPath(self.sDefaultDirectory + \ "/" + \ self.sDefaultName, None)) - except UnoException, e: + except Exception, e: traceback.print_exc() def triggerPathPicker(self): @@ -115,7 +114,7 @@ class PathSelection(object): elif iDialogType == DialogTypes.FILE: #TODO: write code for picking a file for loading return - except UnoException, e: + except Exception, e: traceback.print_exc() def callXPathSelectionListener(self): diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index fc63ddbc4..6a79746f7 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -21,7 +21,7 @@ class UnoDialog(object): self.BisHighContrastModeActivated = None self.m_oPeerConfig = None self.xWindowPeer = None - except UnoException, e: + except Exception, e: traceback.print_exc() def getControlKey(self, EventObject, ControlList): @@ -85,9 +85,9 @@ class UnoDialog(object): def getControlProperty(self, ControlName, PropertyName): try: - xPSet = self.xDialogModel().getByName(ControlName) - oPropValuezxPSet.getPropertyValue(PropertyName) - except com.sun.star.uno.Exception, exception: + xPSet = self.xDialogModel.getByName(ControlName) + return xPSet.getPropertyValue(PropertyName) + except Exception, exception: traceback.print_exc() return None @@ -100,7 +100,7 @@ class UnoDialog(object): while i < allProps.length: sName = allProps[i].Name i += 1 - except UnoException, exception: + except Exception, exception: traceback.print_exc() def getMAPConversionFactor(self, ControlName): diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index 377cffd7a..18e3dc9ae 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -2,7 +2,6 @@ from UnoDialog2 import * from common.Resource import Resource from abc import ABCMeta, abstractmethod from com.sun.star.lang import NoSuchMethodException -from com.sun.star.uno import Exception as UnoException from com.sun.star.lang import IllegalArgumentException from com.sun.star.frame import TerminationVetoException from common.HelpIds import * @@ -53,7 +52,7 @@ class WizardDialog(UnoDialog2): if self.xUnoDialog is not None: self.xUnoDialog.toFront() - except UnoException, ex: + except Exception, ex: pass # do nothing; @@ -93,7 +92,7 @@ class WizardDialog(UnoDialog2): try: return int(Helper.getUnoPropertyValue( self.oRoadmap, "CurrentItemID")) - except UnoException, exception: + except Exception, exception: traceback.print_exc() return -1 @@ -129,7 +128,7 @@ class WizardDialog(UnoDialog2): self.__oWizardResource.getResText(UIConsts.RID_COMMON + 16)) except NoSuchMethodException, ex: Resource.showCommonResourceError(xMSF) - except UnoException, jexception: + except Exception, jexception: traceback.print_exc() def setRMItemLabels(self, _oResource, StartResID): @@ -152,7 +151,7 @@ class WizardDialog(UnoDialog2): self.oRoadmap.insertByIndex(Index, oRoadmapItem) NextIndex = Index + 1 return NextIndex - except UnoException, exception: + except Exception, exception: traceback.print_exc() return -1 @@ -169,7 +168,7 @@ class WizardDialog(UnoDialog2): return CurRoadmapItem return None - except UnoException, exception: + except Exception, exception: traceback.print_exc() return None @@ -369,7 +368,7 @@ class WizardDialog(UnoDialog2): bIsEnabled = bool(Helper.getUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED)) return bIsEnabled - except UnoException, exception: + except Exception, exception: traceback.print_exc() return False @@ -440,7 +439,7 @@ class WizardDialog(UnoDialog2): try: return int(Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP)) - except UnoException, exception: + except Exception, exception: traceback.print_exc() return -1 -- cgit v1.2.3 From 289e3167c9790aa1bdfffff19774cdda8b7c7409 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 20 Jun 2011 14:54:18 +0200 Subject: Fix message, salutation and grettings textbox --- wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py index b87a3af54..680a9e3de 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py @@ -12,16 +12,16 @@ CHKUSEDATE_ITEM_CHANGED = "chkUseDateItemChanged" CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED = "chkUseCommunicationItemChanged" LSTCOMMUNICATIONTYPE_ACTION_PERFORMED = None # "lstCommunicationActionPerformed" LSTCOMMUNICATIONTYPE_ITEM_CHANGED = "lstCommunicationItemChanged" -LSTCOMMUNICATIONTYPE_TEXT_CHANGED = None #"lstCommunicationTextChanged" +LSTCOMMUNICATIONTYPE_TEXT_CHANGED = "lstCommunicationItemChanged" CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged" CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged" LSTSALUTATION_ACTION_PERFORMED = None # "lstSalutationActionPerformed" LSTSALUTATION_ITEM_CHANGED = "lstSalutationItemChanged" -LSTSALUTATION_TEXT_CHANGED = None #"lstSalutationTextChanged" +LSTSALUTATION_TEXT_CHANGED = "lstSalutationItemChanged" CHKUSEGREETING_ITEM_CHANGED = "chkUseGreetingItemChanged" LSTGREETING_ACTION_PERFORMED = None # "lstGreetingActionPerformed" LSTGREETING_ITEM_CHANGED = "lstGreetingItemChanged" -LSTGREETING_TEXT_CHANGED = None #"lstGreetingTextChanged" +LSTGREETING_TEXT_CHANGED = "lstGreetingItemChanged" CHKUSEFOOTER_ITEM_CHANGED = "chkUseFooterItemChanged" OPTSENDERPLACEHOLDER_ITEM_CHANGED = "optSenderPlaceholderItemChanged" OPTSENDERDEFINE_ITEM_CHANGED = "optSenderDefineItemChanged" -- cgit v1.2.3 From 7ff71cbed32ad2b7c99022cd8f579acb53ab246c Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Mon, 20 Jun 2011 17:07:43 +0200 Subject: add missing newline to the end of file to silence the compiler --- package/source/zipapi/sha1context.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/source/zipapi/sha1context.hxx b/package/source/zipapi/sha1context.hxx index c8f6068f7..6d9374db8 100644 --- a/package/source/zipapi/sha1context.hxx +++ b/package/source/zipapi/sha1context.hxx @@ -56,4 +56,4 @@ public: #endif -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3 From 027e97dbb079897c6e344d6885f6b1f82cb09fae Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 20 Jun 2011 23:33:53 +0300 Subject: Include instad of defines INITGUID (both in the Windows SDK and MinGW) and then includes . We want to define INITGUID ourselves, in just one place (dllentry.cxx). --- embedserv/source/inc/embservconst.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedserv/source/inc/embservconst.h b/embedserv/source/inc/embservconst.h index ac4cdcf70..a952c56be 100644 --- a/embedserv/source/inc/embservconst.h +++ b/embedserv/source/inc/embservconst.h @@ -29,7 +29,7 @@ #ifndef _EMBSERVCONST_H_ #define _EMBSERVCONST_H_ -#include +#include #ifndef _COMPHELPER_CLASSIDS_HXX #include -- cgit v1.2.3 From 8a7592cc36019d6d6d81e1a53dd2785213368591 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Tue, 21 Jun 2011 14:34:12 +0200 Subject: fix label of Save Keyboard Configuration dialog fdo#31353 --- cui/source/customize/acccfg.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index a35ace809..fa46fb429 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -1041,7 +1041,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, Load, Button*, EMPTYARG ) //----------------------------------------------- IMPL_LINK( SfxAcceleratorConfigPage, Save, Button*, EMPTYARG ) { - StartFileDialog( WB_SAVEAS | WB_STDMODAL | WB_3DLOOK, aLoadAccelConfigStr ); + StartFileDialog( WB_SAVEAS | WB_STDMODAL | WB_3DLOOK, aSaveAccelConfigStr ); return 0; } -- cgit v1.2.3 From 566a61085c0dd4629cf75774a3f098cab599b688 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 21 Jun 2011 16:14:25 +0200 Subject: Replace some uno.invoke(now it loads faster) --- wizards/com/sun/star/wizards/common/FileAccess.py | 21 ++-- wizards/com/sun/star/wizards/common/Helper.py | 12 +-- .../com/sun/star/wizards/common/SystemDialog.py | 6 +- wizards/com/sun/star/wizards/fax/FaxDocument.py | 6 +- .../com/sun/star/wizards/fax/FaxWizardDialog.py | 113 ++++++++++----------- .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 14 +-- wizards/com/sun/star/wizards/text/TextDocument.py | 2 +- .../com/sun/star/wizards/text/TextFieldHandler.py | 2 +- .../sun/star/wizards/text/TextSectionHandler.py | 7 +- wizards/com/sun/star/wizards/text/ViewHandler.py | 5 +- wizards/com/sun/star/wizards/ui/PathSelection.py | 7 +- wizards/com/sun/star/wizards/ui/UnoDialog.py | 26 +---- wizards/com/sun/star/wizards/ui/UnoDialog2.py | 3 +- wizards/com/sun/star/wizards/ui/WizardDialog.py | 7 +- .../sun/star/wizards/ui/event/CommonListener.py | 1 - .../com/sun/star/wizards/ui/event/UnoDataAware.py | 3 +- 16 files changed, 98 insertions(+), 137 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 8ac514ab6..dfa5d8032 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -542,15 +542,18 @@ class FileAccess(object): "com.sun.star.ucb.FileContentProvider") def getURL(self, path, childPath=None): - if childPath is not None: - path = self.filenameConverter.getSystemPathFromFileURL(path) - f = open(path,childPath) - else: - f = open(path) + try: + if childPath is not None: + path = self.filenameConverter.getSystemPathFromFileURL(path) + f = open(path,childPath) + else: + f = open(path) - r = self.filenameConverter.getFileURLFromSystemPath(path, - osPath.abspath(path)) - return r + r = self.filenameConverter.getFileURLFromSystemPath(path, + osPath.abspath(path)) + return r + except Exception: + return None def getPath(self, parentURL, childURL): string = "" @@ -607,7 +610,7 @@ class FileAccess(object): return self.fileAccess.exists(filename) except CommandAbortedException, cax: pass - except com.sun.star.uno.Exception, ex: + except Exception: pass return defe diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py index 727f3f077..45923cfe8 100644 --- a/wizards/com/sun/star/wizards/common/Helper.py +++ b/wizards/com/sun/star/wizards/common/Helper.py @@ -17,14 +17,12 @@ class Helper(object): @classmethod def setUnoPropertyValue(self, xPSet, PropertyName, PropertyValue): try: - if xPSet.getPropertySetInfo().hasPropertyByName(PropertyName): - uno.invoke(xPSet,"setPropertyValue", - (PropertyName,PropertyValue)) - else: - selementnames = xPSet.getPropertySetInfo().getProperties() - raise ValueError("No Such Property: '" + PropertyName + "'") + if PropertyValue is not None: + setattr(xPSet, PropertyName, PropertyValue) - except Exception, exception: + except AttributeError: + raise AttributeError, "No Such Property: '%s'" % PropertyName + except Exception: traceback.print_exc() @classmethod diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py b/wizards/com/sun/star/wizards/common/SystemDialog.py index 324242674..f6bca5b64 100644 --- a/wizards/com/sun/star/wizards/common/SystemDialog.py +++ b/wizards/com/sun/star/wizards/common/SystemDialog.py @@ -25,9 +25,9 @@ class SystemDialog(object): self.xMSF = xMSF self.systemDialog = xMSF.createInstance(ServiceName) self.xStringSubstitution = self.createStringSubstitution(xMSF) - if self.systemDialog != None: - prova = uno.Any("[]short",(Type,)) - #uno.invoke(prova, "initialize", (uno.Any("short",(Type,)),)) + #if self.systemDialog != None: + #COMMENTED + #self.systemDialog.initialize(Type) except Exception, exception: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py index 581b8e7ee..a744a7cd3 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.py +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -1,4 +1,3 @@ -import uno from text.TextDocument import * from text.TextSectionHandler import TextSectionHandler from text.TextFieldHandler import TextFieldHandler @@ -24,7 +23,7 @@ class FaxDocument(TextDocument): self.xTextDocument) oSection = \ mySectionHandler.xTextDocument.TextSections.getByName(sElement) - Helper.setUnoPropertyValue(oSection, "IsVisible", bState) + Helper.setUnoPropertyValue(oSection,"IsVisible",bState) except Exception, exception: traceback.print_exc() @@ -57,8 +56,7 @@ class FaxDocument(TextDocument): xPageNumberField = self.xTextDocument.createInstance( "com.sun.star.text.TextField.PageNumber") xPageNumberField.setPropertyValue("SubType", CURRENT) - uno.invoke(xPageNumberField, "setPropertyValue", - ("NumberingType", uno.Any("short",ARABIC))) + xPageNumberField.NumberingType = ARABIC xFooterText.insertTextContent(xFooterText.End, xPageNumberField, False) else: diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py index c3c2bd7d8..9323215e1 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py @@ -24,7 +24,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH), - (True, 210, True, 104, 52, 1, uno.Any("short",1), + (True, 210, True, 104, 52, 1, 1, self.resources.resFaxWizardDialog_title, 310)) self.fontDescriptor1 = \ @@ -56,7 +56,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTBUSINESSFAX_HID, self.resources.resoptBusinessFax_value, - 97, 28, 1, uno.Any("short",1), 184), self) + 97, 28, 1, 1, 184), self) self.lstBusinessStyle = self.insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, @@ -66,8 +66,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (True, 12, LSTBUSINESSSTYLE_HID, 180, 40, 1, - uno.Any("short",3), 74), self) + (True, 12, LSTBUSINESSSTYLE_HID, 180, 40, 1, 3, 74), self) self.optPrivateFax = self.insertRadioButton("optPrivateFax", OPTPRIVATEFAX_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -79,7 +78,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTPRIVATEFAX_HID, self.resources.resoptPrivateFax_value, - 97, 81, 1, uno.Any("short",2), 184), self) + 97, 81, 1, 2, 184), self) self.lstPrivateStyle = self.insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED, @@ -91,7 +90,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTPRIVATESTYLE_HID, 180, 95, 1, - uno.Any("short",4), 74), self) + 4, 74), self) self.lblBusinessStyle = self.insertLabel("lblBusinessStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -101,7 +100,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblBusinessStyle_value, - 110, 42, 1, uno.Any("short",32), 60)) + 110, 42, 1, 32, 60)) self.lblTitle1 = self.insertLabel("lblTitle1", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, @@ -113,7 +112,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle1_value, - True, 91, 8, 1, uno.Any("short",37), 212)) + True, 91, 8, 1, 37, 212)) self.lblPrivateStyle = self.insertLabel("lblPrivateStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -122,8 +121,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, self.resources.reslblPrivateStyle_value, 110, 95, 1, - uno.Any("short",50), 60)) + (8, self.resources.reslblPrivateStyle_value, 110, 95, 1, 50, 60)) self.lblIntroduction = self.insertLabel("lblIntroduction", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -133,8 +131,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (39, self.resources.reslblIntroduction_value, True, 104, 145, 1, - uno.Any("short",55), 199)) + (39, self.resources.reslblIntroduction_value, True, 104, 145, 1, 55, 199)) self.ImageControl3 = self.insertInfoImage(92, 145, 1) def buildStep2(self): self.chkUseLogo = self.insertCheckBox("chkUseLogo", @@ -149,7 +146,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSELOGO_HID, self.resources.reschkUseLogo_value, 97, 28, - uno.Any("short",0), 2, uno.Any("short",5), 212), self) + 0, 2, 5, 212), self) self.chkUseDate = self.insertCheckBox("chkUseDate", CHKUSEDATE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -162,7 +159,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEDATE_HID, self.resources.reschkUseDate_value, 97, 43, - uno.Any("short",0), 2,uno.Any("short",6), 212), self) + 0, 2, 6, 212), self) self.chkUseCommunicationType = self.insertCheckBox( "chkUseCommunicationType", CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED, @@ -177,7 +174,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, CHKUSECOMMUNICATIONTYPE_HID, self.resources.reschkUseCommunicationType_value, 97, 57, - uno.Any("short",0), 2, uno.Any("short",07), 100), self) + 0, 2, 7, 100), self) self.lstCommunicationType = self.insertComboBox( "lstCommunicationType", LSTCOMMUNICATIONTYPE_ACTION_PERFORMED, @@ -191,7 +188,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTCOMMUNICATIONTYPE_HID, 105, 68, 2, - uno.Any("short",8), 174), self) + 8, 174), self) self.chkUseSubject = self.insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -204,7 +201,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSESUBJECT_HID, self.resources.reschkUseSubject_value, - 97, 87, uno.Any("short",0), 2, uno.Any("short",9), 212), self) + 97, 87, 0, 2, 9, 212), self) self.chkUseSalutation = self.insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -218,7 +215,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, CHKUSESALUTATION_HID, self.resources.reschkUseSalutation_value, 97, 102, - uno.Any("short",0), 2, uno.Any("short",10), 100), self) + 0, 2, 10, 100), self) self.lstSalutation = self.insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, @@ -231,7 +228,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTSALUTATION_HID, 105, 113, 2, - uno.Any("short",11), 174), self) + 11, 174), self) self.chkUseGreeting = self.insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -245,7 +242,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, CHKUSEGREETING_HID, self.resources.reschkUseGreeting_value, 97, 132, - uno.Any("short",0), 2, uno.Any("short",12), 100), self) + 0, 2, 12, 100), self) self.lstGreeting = self.insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, @@ -257,8 +254,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (True, 12, LSTGREETING_HID, 105, 143, 2, - uno.Any("short",13), 174), self) + (True, 12, LSTGREETING_HID, 105, 143, 2, 13, 174), self) self.chkUseFooter = self.insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -272,7 +268,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, CHKUSEFOOTER_HID, self.resources.reschkUseFooter_value, 97, 163, - uno.Any("short",0), 2, uno.Any("short",14), 212), self) + 0, 2, 14, 212), self) self.lblTitle3 = self.insertLabel("lblTitle3", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -283,7 +279,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle3_value, - True, 91, 8, 2, uno.Any("short",59), 212)) + True, 91, 8, 2, 59, 212)) def buildStep3(self): self.optSenderPlaceholder = self.insertRadioButton( @@ -299,7 +295,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, OPTSENDERPLACEHOLDER_HID, self.resources.resoptSenderPlaceholder_value, - 104, 42, 3, uno.Any("short",15), 149), self) + 104, 42, 3, 15, 149), self) self.optSenderDefine = self.insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -311,7 +307,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTSENDERDEFINE_HID, self.resources.resoptSenderDefine_value, - 104, 54, 3, uno.Any("short",16), 149), self) + 104, 54, 3, 16, 149), self) self.txtSenderName = self.insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -322,7 +318,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERNAME_HID, 182, 67, 3, - uno.Any("short",17), 119), self) + 17, 119), self) self.txtSenderStreet = self.insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -333,7 +329,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERSTREET_HID, 182, 81, 3, - uno.Any("short",18), 119), self) + 18, 119), self) self.txtSenderPostCode = self.insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -344,7 +340,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERPOSTCODE_HID, 182, 95, 3, - uno.Any("short",19), 25), self) + 19, 25), self) self.txtSenderState = self.insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -355,7 +351,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERSTATE_HID, 211, 95, 3, - uno.Any("short",20), 21), self) + 20, 21), self) self.txtSenderCity = self.insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -366,7 +362,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERCITY_HID, 236, 95, 3, - uno.Any("short",21), 65), self) + 21, 65), self) self.txtSenderFax = self.insertTextField("txtSenderFax", TXTSENDERFAX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -377,7 +373,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERFAX_HID, 182, 109, 3, - uno.Any("short",22), 119), self) + 22, 119), self) self.optReceiverPlaceholder = self.insertRadioButton( "optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, @@ -391,7 +387,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, OPTRECEIVERPLACEHOLDER_HID, self.resources.resoptReceiverPlaceholder_value, - 104, 148, 3, uno.Any("short",23), 200), self) + 104, 148, 3, 23, 200), self) self.optReceiverDatabase = self.insertRadioButton( "optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, @@ -405,7 +401,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, OPTRECEIVERDATABASE_HID, self.resources.resoptReceiverDatabase_value, 104, 160, 3, - uno.Any("short",24), 200), self) + 24, 200), self) self.lblSenderAddress = self.insertLabel("lblSenderAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -414,14 +410,14 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, self.resources.reslblSenderAddress_value, 97, 28, 3, uno.Any("short",46), 136)) + (8, self.resources.reslblSenderAddress_value, 97, 28, 3, 46, 136)) self.FixedLine2 = self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (5, 90, 126, 3, uno.Any("short",51), 212)) + (5, 90, 126, 3, 51, 212)) self.lblSenderName = self.insertLabel("lblSenderName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -431,7 +427,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderName_value, 113, 69, 3, - uno.Any("short",52), 68)) + 52, 68)) self.lblSenderStreet = self.insertLabel("lblSenderStreet", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -441,7 +437,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderStreet_value, 113, 82, 3, - uno.Any("short",53), 68)) + 53, 68)) self.lblPostCodeCity = self.insertLabel("lblPostCodeCity", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -451,7 +447,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPostCodeCity_value, - 113, 97, 3, uno.Any("short",54), 68)) + 113, 97, 3, 54, 68)) self.lblTitle4 = self.insertLabel("lblTitle4", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, @@ -463,7 +459,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle4_value, - True, 91, 8, 3, uno.Any("short",60), 212)) + True, 91, 8, 3, 60, 212)) self.Label1 = self.insertLabel("lblSenderFax", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -472,8 +468,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, self.resources.resLabel1_value, 113, 111, 3, - uno.Any("short",68), 68)) + (8, self.resources.resLabel1_value, 113, 111, 3, 68, 68)) self.Label2 = self.insertLabel("Label2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -482,8 +477,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, self.resources.resLabel2_value, 97, 137, 3, - uno.Any("short",69), 136)) + (8, self.resources.resLabel2_value, 97, 137, 3, 69, 136)) def buildStep4(self): self.txtFooter = self.insertTextField("txtFooter", @@ -496,8 +490,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (47, TXTFOOTER_HID, True, 97, 40, 4, - uno.Any("short",25), 203), self) + (47, TXTFOOTER_HID, True, 97, 40, 4, 25, 203), self) self.chkFooterNextPages = self.insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -511,7 +504,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, CHKFOOTERNEXTPAGES_HID, self.resources.reschkFooterNextPages_value, 97, 92, - uno.Any("short",0), 4, uno.Any("short",26), 202), self) + 0, 4, 26, 202), self) self.chkFooterPageNumbers = self.insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -525,7 +518,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, CHKFOOTERPAGENUMBERS_HID, self.resources.reschkFooterPageNumbers_value, 97, 106, - uno.Any("short",0), 4, uno.Any("short",27), 201), self) + 0, 4, 27, 201), self) self.lblFooter = self.insertLabel("lblFooter", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, @@ -536,7 +529,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor4, 8, self.resources.reslblFooter_value, - 97, 28, 4, uno.Any("short",33), 116)) + 97, 28, 4, 33, 116)) self.lblTitle5 = self.insertLabel("lblTitle5", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, @@ -548,7 +541,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle5_value, - True, 91, 8, 4, uno.Any("short",61), 212)) + True, 91, 8, 4, 61, 212)) def buildStep5(self): self.txtTemplateName = self.insertTextField("txtTemplateName", @@ -561,7 +554,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH), - (12, TXTTEMPLATENAME_HID, 202, 56, 5, uno.Any("short",28), + (12, TXTTEMPLATENAME_HID, 202, 56, 5, 28, self.resources.restxtTemplateName_value, 100), self) self.optCreateFax = self.insertRadioButton("optCreateFax", @@ -575,7 +568,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTCREATEFAX_HID, self.resources.resoptCreateFax_value, - 104, 111, 5, uno.Any("short",30), 198), self) + 104, 111, 5, 30, 198), self) self.optMakeChanges = self.insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -587,7 +580,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTMAKECHANGES_HID, self.resources.resoptMakeChanges_value, - 104, 123, 5, uno.Any("short",31), 198), self) + 104, 123, 5, 31, 198), self) self.lblFinalExplanation1 = self.insertLabel("lblFinalExplanation1", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -598,7 +591,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (28, self.resources.reslblFinalExplanation1_value, - True, 97, 28, 5, uno.Any("short",34), 205)) + True, 97, 28, 5, 34, 205)) self.lblProceed = self.insertLabel("lblProceed", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -608,7 +601,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblProceed_value, 97, 100, 5, - uno.Any("short",35), 204)) + 35, 204)) self.lblFinalExplanation2 = self.insertLabel("lblFinalExplanation2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -619,7 +612,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (33, self.resources.reslblFinalExplanation2_value, True, 104, 145, 5, - uno.Any("short",36), 199)) + 36, 199)) self.ImageControl2 = self.insertImage("ImageControl2", ("Border", PropertyNames.PROPERTY_HEIGHT, @@ -630,8 +623,8 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (uno.Any("short",0), 10, UIConsts.INFOIMAGEURL, 92, 145, - False, 5, uno.Any("short",47), 10)) + (0, 10, UIConsts.INFOIMAGEURL, 92, 145, + False, 5, 47, 10)) self.lblTemplateName = self.insertLabel("lblTemplateName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -641,7 +634,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblTemplateName_value, 97, 58, 5, - uno.Any("short",57), 101)) + 57, 101)) self.lblTitle6 = self.insertLabel("lblTitle6", ("FontDescriptor", @@ -654,4 +647,4 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle6_value, - True, 91, 8, 5, uno.Any("short",62), 212)) + True, 91, 8, 5, 62, 212)) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 5abc8c03f..615e0cdc1 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -181,11 +181,11 @@ class FaxWizardDialogImpl(FaxWizardDialog): loadValues[1] = uno.createUnoStruct( \ 'com.sun.star.beans.PropertyValue') loadValues[1].Name = "MacroExecutionMode" - loadValues[1].Value = uno.Any("short", ALWAYS_EXECUTE) + loadValues[1].Value = ALWAYS_EXECUTE loadValues[2] = uno.createUnoStruct( \ 'com.sun.star.beans.PropertyValue') loadValues[2].Name = "UpdateDocMode" - loadValues[2].Value = uno.Any("short", FULL_UPDATE) + loadValues[2].Value = FULL_UPDATE loadValues[3] = uno.createUnoStruct( \ 'com.sun.star.beans.PropertyValue') loadValues[3].Name = "InteractionHandler" @@ -198,8 +198,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): oDoc = OfficeDocument.load(Desktop.getDesktop(self.xMSF), self.sPath, "_default", loadValues) myViewHandler = ViewHandler(self.xMSF, oDoc) - myViewHandler.setViewSetting("ZoomType", - uno.Any("short",OPTIMAL)) + myViewHandler.setViewSetting("ZoomType", OPTIMAL) else: pass #TODO: Error Handling @@ -295,8 +294,8 @@ class FaxWizardDialogImpl(FaxWizardDialog): tuple(self.BusinessFiles[0])) self.setControlProperty("lstPrivateStyle", "StringItemList", tuple(self.PrivateFiles[0])) - self.setControlProperty("lstBusinessStyle", "SelectedItems", [0]) - self.setControlProperty("lstPrivateStyle", "SelectedItems" , [0]) + self.setControlProperty("lstBusinessStyle", "SelectedItems", (0,)) + self.setControlProperty("lstPrivateStyle", "SelectedItems" , (0,)) return True except NoValidPathException, e: # TODO Auto-generated catch block @@ -313,7 +312,8 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.setControlProperty("chkUseDate", PropertyNames.PROPERTY_ENABLED, self.myFaxDoc.hasElement("Date")) - self.myFaxDoc.updateDateFields() + #COMMENTED + #self.myFaxDoc.updateDateFields() def initializeSalutation(self): self.setControlProperty("lstSalutation", "StringItemList", diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index fb97048d6..09cae9536 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -136,7 +136,7 @@ class TextDocument(object): myViewHandler = ViewHandler(self.xTextDocument, self.xTextDocument) try: myViewHandler.setViewSetting( - "ZoomType", uno.Any("short",ENTIRE_PAGE)) + "ZoomType", ENTIRE_PAGE) except Exception, e: traceback.print_exc() myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.py b/wizards/com/sun/star/wizards/text/TextFieldHandler.py index 22f94a386..97d578dd2 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.py +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.py @@ -176,7 +176,7 @@ class TextFieldHandler(object): def changeExtendedUserFieldContent(self, UserDataPart, _FieldContent): try: xDependentTextFields = self.__getTextFieldsByProperty( - "UserDataType", uno.Any("short",UserDataPart), "Short") + "UserDataType", UserDataPart, "Short") if xDependentTextFields != None: i = 0 while i < xDependentTextFields.length: diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.py b/wizards/com/sun/star/wizards/text/TextSectionHandler.py index 98a19ab4a..67eee12e2 100644 --- a/wizards/com/sun/star/wizards/text/TextSectionHandler.py +++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.py @@ -10,10 +10,11 @@ class TextSectionHandler(object): def removeTextSectionbyName(self, SectionName): try: xAllTextSections = self.xTextDocument.TextSections - if xAllTextSections.hasByName(SectionName) == True: + if xAllTextSections.hasByName(SectionName): oTextSection = self.xTextDocument.TextSections.getByName( SectionName) - removeTextSection(oTextSection) + self.removeTextSection(oTextSection) + except Exception, exception: traceback.print_exc() @@ -27,7 +28,7 @@ class TextSectionHandler(object): xAllTextSections = self.xTextDocument.TextSections oTextSection = xAllTextSections.getByIndex( xAllTextSections.getCount() - 1) - removeTextSection(oTextSection) + self.removeTextSection(oTextSection) except Exception, exception: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.py b/wizards/com/sun/star/wizards/text/ViewHandler.py index 9a646da05..32533aabc 100644 --- a/wizards/com/sun/star/wizards/text/ViewHandler.py +++ b/wizards/com/sun/star/wizards/text/ViewHandler.py @@ -1,5 +1,3 @@ -import uno - class ViewHandler(object): '''Creates a new instance of View ''' @@ -32,8 +30,7 @@ class ViewHandler(object): exception.printStackTrace(System.out) def setViewSetting(self, Setting, Value): - uno.invoke(self.xTextViewCursorSupplier.ViewSettings,"setPropertyValue",( - Setting, Value)) + setattr(self.xTextViewCursorSupplier.ViewSettings, Setting, Value) def collapseViewCursorToStart(self): xTextViewCursor = self.xTextViewCursorSupplier.ViewCursor diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py index bc2685431..2be27ac83 100644 --- a/wizards/com/sun/star/wizards/ui/PathSelection.py +++ b/wizards/com/sun/star/wizards/ui/PathSelection.py @@ -1,5 +1,4 @@ import traceback -import uno from common.PropertyNames import * from common.FileAccess import * from common.SystemDialog import SystemDialog @@ -41,7 +40,7 @@ class PathSelection(object): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 8, LabelText, XPos, YPos, DialogStep, - uno.Any("short",CurTabIndex), Width)) + CurTabIndex, Width)) self.xSaveTextBox = self.CurUnoDialog.insertTextField( "txtSavePath", "callXPathSelectionListener", (PropertyNames.PROPERTY_ENABLED, @@ -53,7 +52,7 @@ class PathSelection(object): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 12, TxtHelpURL, XPos, YPos + 10, DialogStep, - uno.Any("short",(CurTabIndex + 1)), Width - 26), self) + (CurTabIndex + 1), Width - 26), self) self.CurUnoDialog.setControlProperty("txtSavePath", PropertyNames.PROPERTY_ENABLED, False ) @@ -68,7 +67,7 @@ class PathSelection(object): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 14, BtnHelpURL, "...",XPos + Width - 16, YPos + 9, - DialogStep, uno.Any("short",(CurTabIndex + 2)), 16), self) + DialogStep, (CurTabIndex + 2), 16), self) def addSelectionListener(self, xAction): self.xAction = xAction diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index 6a79746f7..15412dbb4 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -50,35 +50,11 @@ class UnoDialog(object): if not self.xDialogModel.hasByName(ControlName): return xPSet = self.xDialogModel.getByName(ControlName) - if isinstance(PropertyValue,bool): - xPSet.setPropertyValue(PropertyName, PropertyValue) - else: - methodname = "[]string" - if not isinstance(PropertyValue,tuple): - if isinstance(PropertyValue,list): - methodname = "[]short" - PropertyValue = tuple(PropertyValue) - else: - PropertyValue = (PropertyValue,) - - uno.invoke(xPSet, "setPropertyValue", (PropertyName, - uno.Any( methodname, PropertyValue))) + setattr(xPSet,PropertyName, PropertyValue) except Exception, exception: traceback.print_exc() - def transform( self, struct , propName, value ): - myinv = self.inv.createInstanceWithArguments( (struct,) ) - access = self.insp.inspect( myinv ) - method = access.getMethod( "setValue" , -1 ) - uno.invoke( method, "invoke", ( myinv, ( propName , value ) )) - method = access.getMethod( "getMaterial" , -1 ) - ret,dummy = method.invoke(myinv,() ) - return ret - - def getResource(self): - return self.m_oResource - def setControlProperties( self, ControlName, PropertyNames, PropertyValues): self.setControlProperty(ControlName, PropertyNames, PropertyValues) diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py index 4fcdadb6b..0bf868687 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py @@ -136,8 +136,7 @@ class UnoDialog2(UnoDialog): PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH), - (uno.Any("short",0), 10, - UIConsts.INFOIMAGEURL, _posx, _posy, False, _iStep, 10)) + (0, 10, UIConsts.INFOIMAGEURL, _posx, _posy, False, _iStep, 10)) return xImgControl ''' diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index 18e3dc9ae..f32f01a3d 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -85,8 +85,7 @@ class WizardDialog(UnoDialog2): if self.oRoadmap != None: nCurItemID = self.getCurrentRoadmapItemID() if nCurItemID != ID: - Helper.setUnoPropertyValue(self.oRoadmap, "CurrentItemID", - uno.Any("short",ID)) + Helper.setUnoPropertyValue(self.oRoadmap, "CurrentItemID",ID) def getCurrentRoadmapItemID(self): try: @@ -114,7 +113,7 @@ class WizardDialog(UnoDialog2): PropertyNames.PROPERTY_TABINDEX, "Tabstop", PropertyNames.PROPERTY_WIDTH), ((iDialogHeight - 26), 0, 0, 0, - uno.Any("short",0), True, uno.Any("short",85))) + 0, True, 85)) self.oRoadmap.setPropertyValue( PropertyNames.PROPERTY_NAME, "rdmNavi") @@ -468,7 +467,7 @@ class WizardDialog(UnoDialog2): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH),( oFontDesc, 16, self.sRightPaneHeaders(i), - True, 91, 8, i + 1, uno.Any("short",12), 212)) + True, 91, 8, i + 1, 12, 212)) i += 1 def cancelWizard(self): diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py index 1ab35e395..6ff03667d 100644 --- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py +++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py @@ -33,7 +33,6 @@ #********************************************************************** # OOo's libraries -import uno import unohelper import inspect diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py index 2564b88f1..cca27ae5f 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py @@ -141,8 +141,7 @@ class UnoDataAware(DataAware): @classmethod def attachCheckBox(self, data, prop, checkBox, listener, field): if field: - aux = DataAwareFields.getFieldValueFor( - data, prop, uno.Any("short",0)) + aux = DataAwareFields.getFieldValueFor(data, prop, 0) else: aux = DataAware.PropertyValue (prop, data) uda = UnoDataAware(data, aux , checkBox, PropertyNames.PROPERTY_STATE) -- cgit v1.2.3 From ede834f501b9e6320644b5e272c95763f13703f8 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 21 Jun 2011 17:56:03 +0200 Subject: Sort listboxes properly --- wizards/com/sun/star/wizards/common/FileAccess.py | 26 +++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index dfa5d8032..8a6b14559 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -3,7 +3,6 @@ from NoValidPathException import * from com.sun.star.ucb import CommandAbortedException from com.sun.star.awt.VclWindowPeerAttribute import OK, YES_NO import types -from os import path as osPath ''' This class delivers static convenience methods @@ -406,15 +405,34 @@ class FileAccess(object): NameVectorAppend(i) TitleVectorAppend(xDocInterface.Title) - LocLayoutFiles[1] = sorted(NameVector) - LocLayoutFiles[0] = sorted(TitleVector) + LocLayoutFiles[1] = NameVector + LocLayoutFiles[0] = TitleVector except Exception, exception: traceback.print_exc() - return LocLayoutFiles + return self.__bubblesortList(LocLayoutFiles) ''' + This function bubble sorts an array of with 2 dimensions. + The default sorting order is the first dimension + Only if sort2ndValue is True the second dimension is + the relevant for the sorting order + ''' + + @classmethod + def __bubblesortList(self, SortList): + SortCount = len(SortList[0]) + DimCount = len(SortList) + for i in xrange(SortCount): + for t in xrange(SortCount - i - 1): + if SortList[0][t] > SortList[0][t + 1]: + for k in xrange(DimCount): + DisplayDummy = SortList[k][t]; + SortList[k][t] = SortList[k][t + 1]; + SortList[k][t + 1] = DisplayDummy + return SortList + ''' We search in all given path for a given file @param _sPath @param _sPath2 -- cgit v1.2.3 From 1a18c889b4022471f33bfc6f85c2b052880a6672 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 21 Jun 2011 21:11:36 +0200 Subject: Add an import I deleted by mistake --- wizards/com/sun/star/wizards/common/FileAccess.py | 2 ++ wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py | 9 ++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 8a6b14559..7506336fc 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -3,6 +3,7 @@ from NoValidPathException import * from com.sun.star.ucb import CommandAbortedException from com.sun.star.awt.VclWindowPeerAttribute import OK, YES_NO import types +from os import path as osPath ''' This class delivers static convenience methods @@ -571,6 +572,7 @@ class FileAccess(object): osPath.abspath(path)) return r except Exception: + traceback.print_exc() return None def getPath(self, parentURL, childURL): diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 615e0cdc1..2d49456f9 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -135,16 +135,12 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.myFaxDoc.setWizardTemplateDocInfo( \ self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) - endWizard = True try: fileAccess = FileAccess(self.xMSF) self.sPath = self.myPathSelection.getSelectedPath() if self.sPath == "": self.myPathSelection.triggerPathPicker() self.sPath = self.myPathSelection.getSelectedPath() - if self.sPath == "": - endWizard = False - return self.sPath = fileAccess.getURL(self.sPath) #first, if the filename was not changed, thus @@ -206,9 +202,8 @@ class FaxWizardDialogImpl(FaxWizardDialog): except Exception, e: traceback.print_exc() finally: - if endWizard: - self.xUnoDialog.endExecute() - self.running = False + self.xUnoDialog.endExecute() + self.running = False return True -- cgit v1.2.3 From b55b7751fe868cda980f7a69e7846848a4e35311 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 21 Jun 2011 14:58:37 +0300 Subject: Bypass these if we don't have the Windows SDK I.e. mainly when cross-compiling with MinGW. We can't build an MSI installer when cross-compiling anyway, so that we can't build the installer custom actions is fairly irrelevant. --- .../win32/customactions/javafilter/makefile.mk | 4 ++-- .../win32/customactions/languagepacks/makefile.mk | 2 +- .../source/win32/customactions/patch/makefile.mk | 3 +-- .../win32/customactions/quickstarter/makefile.mk | 3 +-- .../source/win32/customactions/rebase/makefile.mk | 2 +- .../win32/customactions/reg4allmsdoc/makefile.mk | 2 +- .../source/win32/customactions/reg64/makefile.mk | 2 +- .../win32/customactions/regactivex/makefile.mk | 3 +-- .../win32/customactions/regpatchactivex/makefile.mk | 10 ++++------ .../source/win32/customactions/sellang/makefile.mk | 20 ++++++++++---------- .../win32/customactions/shellextensions/makefile.mk | 4 +--- .../source/win32/customactions/thesaurus/makefile.mk | 9 ++++----- .../source/win32/customactions/tools/makefile.mk | 4 +--- 13 files changed, 29 insertions(+), 39 deletions(-) diff --git a/setup_native/source/win32/customactions/javafilter/makefile.mk b/setup_native/source/win32/customactions/javafilter/makefile.mk index 3ee19cff5..3039ef4cc 100644 --- a/setup_native/source/win32/customactions/javafilter/makefile.mk +++ b/setup_native/source/win32/customactions/javafilter/makefile.mk @@ -40,7 +40,7 @@ DYNAMIC_CRT= # --- Files -------------------------------------------------------- -.IF "$(GUI)"=="WNT" +.IF "$(GUI)"=="WNT" && "$(WINDOWS_SDK_HOME)"!="" UWINAPILIB= @@ -62,9 +62,9 @@ DEF1NAME=$(SHL1TARGET) DEF1EXPORTFILE=exports.dxp .ENDIF + # --- Targets -------------------------------------------------------------- .INCLUDE : target.mk # ------------------------------------------------------------------------- - diff --git a/setup_native/source/win32/customactions/languagepacks/makefile.mk b/setup_native/source/win32/customactions/languagepacks/makefile.mk index 365772ca8..94eab3a01 100644 --- a/setup_native/source/win32/customactions/languagepacks/makefile.mk +++ b/setup_native/source/win32/customactions/languagepacks/makefile.mk @@ -44,7 +44,7 @@ CDEFS+=-Dnot_used_define_to_disable_pch # --- Files -------------------------------------------------------- -.IF "$(GUI)"=="WNT" +.IF "$(GUI)"=="WNT" && "$(WINDOWS_SDK_HOME)"!="" UWINAPILIB= diff --git a/setup_native/source/win32/customactions/patch/makefile.mk b/setup_native/source/win32/customactions/patch/makefile.mk index 77cd11e03..641f48ab6 100755 --- a/setup_native/source/win32/customactions/patch/makefile.mk +++ b/setup_native/source/win32/customactions/patch/makefile.mk @@ -43,7 +43,7 @@ CDEFS+=-Dnot_used_define_to_disable_pch # --- Files -------------------------------------------------------- -.IF "$(GUI)"=="WNT" +.IF "$(GUI)"=="WNT" && "$(WINDOWS_SDK_HOME)"!="" UWINAPILIB= @@ -86,4 +86,3 @@ DEF1EXPORTFILE=exports.dxp .INCLUDE : target.mk # ------------------------------------------------------------------------- - diff --git a/setup_native/source/win32/customactions/quickstarter/makefile.mk b/setup_native/source/win32/customactions/quickstarter/makefile.mk index 870571578..57b53d262 100644 --- a/setup_native/source/win32/customactions/quickstarter/makefile.mk +++ b/setup_native/source/win32/customactions/quickstarter/makefile.mk @@ -45,7 +45,7 @@ UWINAPILIB= # --- Files -------------------------------------------------------- -.IF "$(GUI)"=="WNT" +.IF "$(GUI)"=="WNT" && "$(WINDOWS_SDK_HOME)"!="" STDSHL += \ $(ADVAPI32LIB)\ @@ -91,4 +91,3 @@ DEF2EXPORTFILE=$(TARGET2).dxp .INCLUDE : target.mk # ------------------------------------------------------------------------- - diff --git a/setup_native/source/win32/customactions/rebase/makefile.mk b/setup_native/source/win32/customactions/rebase/makefile.mk index cb9e29db1..fb1fc22a8 100644 --- a/setup_native/source/win32/customactions/rebase/makefile.mk +++ b/setup_native/source/win32/customactions/rebase/makefile.mk @@ -44,7 +44,7 @@ UWINAPILIB= # --- Files -------------------------------------------------------- -.IF "$(GUI)"=="WNT" +.IF "$(GUI)"=="WNT" && "$(WINDOWS_SDK_HOME)"!="" STDSHL += \ $(ADVAPI32LIB)\ diff --git a/setup_native/source/win32/customactions/reg4allmsdoc/makefile.mk b/setup_native/source/win32/customactions/reg4allmsdoc/makefile.mk index 24037f0c0..0f162fa6c 100644 --- a/setup_native/source/win32/customactions/reg4allmsdoc/makefile.mk +++ b/setup_native/source/win32/customactions/reg4allmsdoc/makefile.mk @@ -42,7 +42,7 @@ CFLAGS+=-DUNICODE -D_UNICODE # --- Files -------------------------------------------------------- -.IF "$(GUI)"=="WNT" +.IF "$(GUI)"=="WNT" && "$(WINDOWS_SDK_HOME)"!="" UWINAPILIB= diff --git a/setup_native/source/win32/customactions/reg64/makefile.mk b/setup_native/source/win32/customactions/reg64/makefile.mk index 023aee50e..a0d7fbaef 100644 --- a/setup_native/source/win32/customactions/reg64/makefile.mk +++ b/setup_native/source/win32/customactions/reg64/makefile.mk @@ -44,7 +44,7 @@ CDEFS+=-Dnot_used_define_to_disable_pch # --- Files -------------------------------------------------------- -.IF "$(GUI)"=="WNT" +.IF "$(GUI)"=="WNT" && "$(WINDOWS_SDK_HOME)"!="" UWINAPILIB= diff --git a/setup_native/source/win32/customactions/regactivex/makefile.mk b/setup_native/source/win32/customactions/regactivex/makefile.mk index cc71dc39a..22eb1c89f 100644 --- a/setup_native/source/win32/customactions/regactivex/makefile.mk +++ b/setup_native/source/win32/customactions/regactivex/makefile.mk @@ -40,7 +40,7 @@ USE_DEFFILE=TRUE # --- Files -------------------------------------------------------- -.IF "$(GUI)"=="WNT" +.IF "$(GUI)"=="WNT" && "$(WINDOWS_SDK_HOME)"!="" UWINAPILIB= @@ -67,4 +67,3 @@ DEF1EXPORTFILE=exports.dxp .INCLUDE : target.mk # ------------------------------------------------------------------------- - diff --git a/setup_native/source/win32/customactions/regpatchactivex/makefile.mk b/setup_native/source/win32/customactions/regpatchactivex/makefile.mk index 4c6668db2..9641c8ba0 100644 --- a/setup_native/source/win32/customactions/regpatchactivex/makefile.mk +++ b/setup_native/source/win32/customactions/regpatchactivex/makefile.mk @@ -30,14 +30,14 @@ PRJNAME=setup_native TARGET=regpatchactivex USE_DEFFILE=TRUE -.IF "$(GUI)"=="WNT" - # --- Settings ----------------------------------------------------- ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk +.IF "$(GUI)"=="WNT" && "$(WINDOWS_SDK_HOME)"!="" + STDSHL= # --- Files -------------------------------------------------------- @@ -78,12 +78,10 @@ SHL1BASE = 0x1c000000 DEF1NAME=$(SHL1TARGET) DEF1EXPORTFILE=exports.dxp +.ENDIF + # --- Targets -------------------------------------------------------------- .INCLUDE : target.mk # ------------------------------------------------------------------------- - - -.ENDIF - diff --git a/setup_native/source/win32/customactions/sellang/makefile.mk b/setup_native/source/win32/customactions/sellang/makefile.mk index a75c994ff..ffad814e3 100644 --- a/setup_native/source/win32/customactions/sellang/makefile.mk +++ b/setup_native/source/win32/customactions/sellang/makefile.mk @@ -31,8 +31,6 @@ PRJ=..$/..$/..$/.. PRJNAME=setup_native TARGET=sellangmsi -.IF "$(GUI)"=="WNT" - # --- Settings ----------------------------------------------------- ENABLE_EXCEPTIONS=TRUE @@ -42,6 +40,8 @@ USE_DEFFILE=TRUE .INCLUDE : settings.mk +.IF "$(GUI)"=="WNT" && "$(WINDOWS_SDK_HOME)"!="" + CFLAGS+=-D_STLP_USE_STATIC_LIB # --- Files -------------------------------------------------------- @@ -51,11 +51,12 @@ UWINAPILIB= SLOFILES = \ $(SLO)$/sellang.obj -SHL1STDLIBS= kernel32.lib\ - user32.lib\ - advapi32.lib\ - shell32.lib\ - msi.lib +SHL1STDLIBS= \ + $(KERNEL32LIB)\ + $(USER32LIB)\ + $(ADVAPI32LIB)\ + $(SHELL32LIB)\ + $(MSILIB) SHL1LIBS = $(SLB)$/$(TARGET).lib @@ -68,11 +69,10 @@ SHL1BASE = 0x1c000000 DEF1NAME=$(SHL1TARGET) DEF1EXPORTFILE=exports.dxp +.ENDIF + # --- Targets -------------------------------------------------------------- .INCLUDE : target.mk # ------------------------------------------------------------------------- - - -.ENDIF diff --git a/setup_native/source/win32/customactions/shellextensions/makefile.mk b/setup_native/source/win32/customactions/shellextensions/makefile.mk index de8f94332..e0950d992 100644 --- a/setup_native/source/win32/customactions/shellextensions/makefile.mk +++ b/setup_native/source/win32/customactions/shellextensions/makefile.mk @@ -43,7 +43,7 @@ CDEFS+=-Dnot_used_define_to_disable_pch # --- Files -------------------------------------------------------- -.IF "$(GUI)"=="WNT" +.IF "$(GUI)"=="WNT" && "$(WINDOWS_SDK_HOME)"!="" UWINAPILIB= @@ -96,5 +96,3 @@ DEF1EXPORTFILE=exports.dxp .INCLUDE : target.mk # ------------------------------------------------------------------------- - - diff --git a/setup_native/source/win32/customactions/thesaurus/makefile.mk b/setup_native/source/win32/customactions/thesaurus/makefile.mk index c353341bf..3041f8759 100755 --- a/setup_native/source/win32/customactions/thesaurus/makefile.mk +++ b/setup_native/source/win32/customactions/thesaurus/makefile.mk @@ -31,8 +31,6 @@ PRJ=..$/..$/..$/.. PRJNAME=setup_native TARGET=thidxmsi -.IF "$(GUI)"=="WNT" - # --- Settings ----------------------------------------------------- ENABLE_EXCEPTIONS=TRUE @@ -42,6 +40,8 @@ USE_DEFFILE=TRUE .INCLUDE : settings.mk +.IF "$(GUI)"=="WNT" && "$(WINDOWS_SDK_HOME)"!="" + CFLAGS+=-D_STLP_USE_STATIC_LIB # --- Files -------------------------------------------------------- @@ -68,11 +68,10 @@ SHL1BASE = 0x1c000000 DEF1NAME=$(SHL1TARGET) DEF1EXPORTFILE=exports.dxp +.ENDIF + # --- Targets -------------------------------------------------------------- .INCLUDE : target.mk # ------------------------------------------------------------------------- - - -.ENDIF diff --git a/setup_native/source/win32/customactions/tools/makefile.mk b/setup_native/source/win32/customactions/tools/makefile.mk index 24e14861b..61c58036b 100644 --- a/setup_native/source/win32/customactions/tools/makefile.mk +++ b/setup_native/source/win32/customactions/tools/makefile.mk @@ -41,7 +41,7 @@ USE_DEFFILE=TRUE # --- Files -------------------------------------------------------- -.IF "$(GUI)"=="WNT" +.IF "$(GUI)"=="WNT" && "$(WINDOWS_SDK_HOME)"!="" UWINAPILIB= @@ -70,5 +70,3 @@ DEF1EXPORTFILE=exports.dxp .INCLUDE : target.mk # ------------------------------------------------------------------------- - - -- cgit v1.2.3 From 29749aae3d06a7c68d2d86c4031a8a8e6f19f0d0 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 22 Jun 2011 10:09:44 +0200 Subject: Remove deprecated method --- wizards/com/sun/star/wizards/common/FileAccess.py | 68 ----------------------- 1 file changed, 68 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 7506336fc..3a1797e4e 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -484,74 +484,6 @@ class FileAccess(object): return sTitle - @classmethod - def getFolderTitles2(self, xMSF, _sStartFilterName, FolderName, - _sEndFilterName=""): - - LocLayoutFiles = [[2],[]] - if FolderName.size() == 0: - raise NoValidPathException (None, "Path not given."); - - TitleVector = [] - URLVector = [] - xInterface = None - try: - xInterface = xMSF.createInstance( - "com.sun.star.ucb.SimpleFileAccess") - except com.sun.star.uno.Exception, e: - traceback.print_exc() - raise NoValidPathException (None, "Internal error."); - - j = 0 - while j < FolderName.size(): - sFolderName = FolderName.get(j) - try: - nameList = xInterface.getFolderContents(sFolderName, False) - if _sStartFilterName == None or _sStartFilterName.equals(""): - _sStartFilterName = None - else: - _sStartFilterName = _sStartFilterName + "-" - - fileName = "" - i = 0 - while i < nameList.length: - fileName = self.getFilename(i) - if _sStartFilterName == None or \ - fileName.startsWith(_sStartFilterName): - if _sEndFilterName.equals(""): - sTitle = getTitle(xMSF, nameList[i]) - elif fileName.endsWith(_sEndFilterName): - fileName = fileName.replaceAll( - _sEndFilterName + "$", "") - sTitle = fileName - else: - # no or wrong (start|end) filter - continue - - URLVector.add(nameList[i]) - TitleVector.add(sTitle) - - i += 1 - except CommandAbortedException, exception: - traceback.print_exc() - except com.sun.star.uno.Exception, e: - pass - - j += 1 - LocNameList = [URLVector.size()] - LocTitleList = [TitleVector.size()] - # LLA: we have to check if this works - URLVector.toArray(LocNameList) - - TitleVector.toArray(LocTitleList) - - LocLayoutFiles[1] = LocNameList - LocLayoutFiles[0] = LocTitleList - - #COMMENTED - #JavaTools.bubblesortList(LocLayoutFiles); - return LocLayoutFiles - def __init__(self, xmsf): #get a simple file access... self.fileAccess = xmsf.createInstance( -- cgit v1.2.3 From c1a08bbb5a081d4890f8beab647e01f648baf51d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 22 Jun 2011 00:57:35 +0100 Subject: adapt for new api --- cui/source/dialogs/iconcdlg.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index f8a558b33..f5846d340 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -271,7 +271,7 @@ IconChoiceDialog ::~IconChoiceDialog () // save configuration at INI-Manager // and remove pages SvtViewOptions aTabDlgOpt( E_TABDIALOG, String::CreateFromInt32( nResId ) ); - aTabDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)).GetBuffer() ) ); + aTabDlgOpt.SetWindowState(::rtl::OStringToOUString(GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)), RTL_TEXTENCODING_ASCII_US)); aTabDlgOpt.SetPageID( mnCurrentPageId ); for ( size_t i = 0, nCount = maPageList.size(); i < nCount; ++i ) -- cgit v1.2.3 From 48947778966b7964733a2dde8b0bf056a24c1363 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 22 Jun 2011 13:31:19 +0200 Subject: Show warning: Do you want to overwrite the file? --- wizards/com/sun/star/wizards/common/SystemDialog.py | 5 ++--- .../com/sun/star/wizards/document/OfficeDocument.py | 18 +++++++++++++----- .../com/sun/star/wizards/fax/FaxWizardDialogImpl.py | 19 +++++++++++-------- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py b/wizards/com/sun/star/wizards/common/SystemDialog.py index f6bca5b64..d0e8400b7 100644 --- a/wizards/com/sun/star/wizards/common/SystemDialog.py +++ b/wizards/com/sun/star/wizards/common/SystemDialog.py @@ -25,9 +25,8 @@ class SystemDialog(object): self.xMSF = xMSF self.systemDialog = xMSF.createInstance(ServiceName) self.xStringSubstitution = self.createStringSubstitution(xMSF) - #if self.systemDialog != None: - #COMMENTED - #self.systemDialog.initialize(Type) + if self.systemDialog != None: + self.systemDialog.initialize(Type) except Exception, exception: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py index a14f42ba9..e2636d026 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.py +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py @@ -5,6 +5,7 @@ from ui.event.CommonListener import TerminateListenerProcAdapter from common.Desktop import Desktop from com.sun.star.awt import WindowDescriptor from com.sun.star.awt import Rectangle +import unohelper #Window Constants com_sun_star_awt_WindowAttribute_BORDER \ @@ -172,7 +173,7 @@ class OfficeDocument(object): return xComponent @classmethod - def store(self, xMSF, xComponent, StorePath, FilterName, bStoreToUrl): + def store(self, xMSF, xComponent, StorePath, FilterName): try: if len(FilterName): oStoreProperties = range(2) @@ -188,10 +189,17 @@ class OfficeDocument(object): else: oStoreProperties = range(0) - if bStoreToUrl: - xComponent.storeToURL(StorePath, tuple(oStoreProperties)) - else: - xComponent.storeAsURL(StorePath, tuple(oStoreProperties)) + if StorePath.startswith("file://"): + #Unix + StorePath = StorePath[7:] + + sPath = StorePath[:(StorePath.rfind("/") + 1)] + sFile = StorePath[(StorePath.rfind("/") + 1):] + xComponent.storeToURL( + unohelper.absolutize( + unohelper.systemPathToFileUrl(sPath), + unohelper.systemPathToFileUrl(sFile)), + tuple(oStoreProperties)) return True except Exception, exception: diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 2d49456f9..0ba6064e4 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -135,6 +135,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.myFaxDoc.setWizardTemplateDocInfo( \ self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) + endWizard = True try: fileAccess = FileAccess(self.xMSF) self.sPath = self.myPathSelection.getSelectedPath() @@ -149,9 +150,11 @@ class FaxWizardDialogImpl(FaxWizardDialog): if not self.__filenameChanged: if fileAccess.exists(self.sPath, True): answer = SystemDialog.showMessageBox( - self.xMSF, self.xUnoDialog.Peer, "MessBox", - YES_NO + DEF_NO, self.resources.resOverwriteWarning) - if answer == 3: # user said: no, do not overwrite... + self.xMSF, "MessBox", YES_NO + DEF_NO, + self.resources.resOverwriteWarning, self.xUnoDialog.Peer) + if answer == 3: + # user said: no, do not overwrite... + endWizard = False return False @@ -164,7 +167,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): (self.chkUseCommunicationType.State is not 0) self.myFaxDoc.killEmptyFrames() self.bSaveSuccess = OfficeDocument.store(self.xMSF, self.xTextDocument, - self.sPath, "writer8_template", False) + self.sPath, "writer8_template") if self.bSaveSuccess: self.saveConfiguration() xIH = self.xMSF.createInstance( \ @@ -202,8 +205,9 @@ class FaxWizardDialogImpl(FaxWizardDialog): except Exception, e: traceback.print_exc() finally: - self.xUnoDialog.endExecute() - self.running = False + if endWizard: + self.xUnoDialog.endExecute() + self.running = False return True @@ -307,8 +311,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.setControlProperty("chkUseDate", PropertyNames.PROPERTY_ENABLED, self.myFaxDoc.hasElement("Date")) - #COMMENTED - #self.myFaxDoc.updateDateFields() + self.myFaxDoc.updateDateFields() def initializeSalutation(self): self.setControlProperty("lstSalutation", "StringItemList", -- cgit v1.2.3 From f09cc2981eaf054cdb2450576ae6b435ea6f4cfb Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 22 Jun 2011 14:35:22 +0200 Subject: Remove deprecated method --- wizards/com/sun/star/wizards/common/Desktop.py | 32 ----------------------- wizards/com/sun/star/wizards/common/FileAccess.py | 11 -------- 2 files changed, 43 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/Desktop.py b/wizards/com/sun/star/wizards/common/Desktop.py index 0bdf9617e..3a64ecee8 100644 --- a/wizards/com/sun/star/wizards/common/Desktop.py +++ b/wizards/com/sun/star/wizards/common/Desktop.py @@ -174,38 +174,6 @@ class Desktop(object): scompname = _sElementName + _sSuffixSeparator + (a + 1) return "" - ''' - @deprecated use Configuration.getConfigurationRoot() with the same - arameters instead - @param xMSF - @param KeyName - @param bForUpdate - @return - ''' - - @classmethod - def getRegistryKeyContent(self, xMSF, KeyName, bForUpdate): - try: - aNodePath = range(1) - oConfigProvider = xMSF.createInstance( - "com.sun.star.configuration.ConfigurationProvider") - aNodePath[0] = uno.createUnoStruct( - 'com.sun.star.beans.PropertyValue') - aNodePath[0].Name = "nodepath" - aNodePath[0].Value = KeyName - if bForUpdate: - return oConfigProvider.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", - aNodePath) - else: - return oConfigProvider.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", - aNodePath) - - except Exception, exception: - exception.printStackTrace(System.out) - return None - class OfficePathRetriever: def OfficePathRetriever(self, xMSF): diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 3a1797e4e..384582b71 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -370,17 +370,6 @@ class FileAccess(object): sMsgFilePathInvalid) return False - ''' - searches a directory for files which start with a certain - prefix, and returns their URLs and document-titles. - @param xMSF - @param FilterName the prefix of the filename. a "-" is added to the prefix - @param FolderName the folder (URL) to look for files... - @return an array with two array members. The first one, with document - titles, the second with the corresponding URLs. - @deprecated please use the getFolderTitles() with ArrayList - ''' - @classmethod def getFolderTitles(self, xMSF, FilterName, FolderName): LocLayoutFiles = [[2],[]] -- cgit v1.2.3 From 18254f78635847446604183ec73ca526ff9f7d12 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 23 Jun 2011 00:48:52 +0100 Subject: use OString::equalsL --- automation/source/server/cmdbasestream.cxx | 8 ++++---- automation/source/server/sta_list.cxx | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/automation/source/server/cmdbasestream.cxx b/automation/source/server/cmdbasestream.cxx index b5a48e06a..4d8dfe844 100644 --- a/automation/source/server/cmdbasestream.cxx +++ b/automation/source/server/cmdbasestream.cxx @@ -70,7 +70,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, rtl::OString *pUId, comm_UINT32 { Write(comm_UINT16(SIReturn)); Write(nRet); - if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) ) + if (pUId->equalsL(RTL_CONSTASCII_STRINGPARAM("UID_ACTIVE"))) Write(comm_UINT32(0)); else Write(pUId); @@ -82,7 +82,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, rtl::OString *pUId, comm_String { Write(comm_UINT16(SIReturn)); Write(nRet); - if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) ) + if (pUId->equalsL(RTL_CONSTASCII_STRINGPARAM("UID_ACTIVE"))) Write(comm_UINT32(0)); else Write(pUId); @@ -94,7 +94,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, rtl::OString *pUId, comm_BOOL b { Write(comm_UINT16(SIReturn)); Write(nRet); - if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) ) + if (pUId->equalsL(RTL_CONSTASCII_STRINGPARAM("UID_ACTIVE"))) Write(comm_UINT32(0)); else Write(pUId); @@ -106,7 +106,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, rtl::OString *pUId, comm_UINT32 { Write(comm_UINT16(SIReturn)); Write(nRet); - if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) ) + if (pUId->equalsL(RTL_CONSTASCII_STRINGPARAM("UID_ACTIVE"))) Write(comm_UINT32(0)); else Write(pUId); diff --git a/automation/source/server/sta_list.cxx b/automation/source/server/sta_list.cxx index 69a021240..163c8e3dd 100644 --- a/automation/source/server/sta_list.cxx +++ b/automation/source/server/sta_list.cxx @@ -124,11 +124,10 @@ TTSettings* GetTTSettings() return pTTSettings; } - - - // FIXME: HELPID -#define IS_WINP_CLOSING(pWin) (pWin->GetHelpId().equals( "TT_Win_is_closing_HID" ) && pWin->GetUniqueId().equals( "TT_Win_is_closing_UID" )) +#define IS_WINP_CLOSING(pWin) \ + (pWin->GetHelpId().equalsL(RTL_CONSTASCII_STRINGPARAM("TT_Win_is_closing_HID")) && \ + pWin->GetUniqueId().equalsL(RTL_CONSTASCII_STRINGPARAM("TT_Win_is_closing_UID"))) StatementList::StatementList() : nRetryCount(MAX_RETRIES) -- cgit v1.2.3 From 66636d6f5637e381994b85549e41c8803e9918e0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 28 Jun 2011 10:40:04 +0100 Subject: throw out CWS_WORK_STAMP stuff --- cui/source/dialogs/about.cxx | 56 -------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index cd2e416e7..3759bba2c 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -76,65 +76,9 @@ Image SfxApplication::GetApplicationLogo() static String GetBuildId() { - const String sCWSSchema( String::CreateFromAscii( "[CWS:" ) ); rtl::OUString sDefault; String sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) ); OSL_ENSURE( sBuildId.Len() > 0, "No BUILDID in bootstrap file" ); - if ( sBuildId.Len() > 0 && sBuildId.Search( sCWSSchema ) == STRING_NOTFOUND ) - { - // no cws part in brand buildid -> try basis buildid - rtl::OUString sBasisBuildId( DEFINE_CONST_OUSTRING("${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":buildid}" ) ); - rtl::Bootstrap::expandMacros( sBasisBuildId ); - sal_Int32 nIndex = sBasisBuildId.indexOf( sCWSSchema ); - if ( nIndex != -1 ) - sBuildId += String( sBasisBuildId.copy( nIndex ) ); - } - - String sProductSource( utl::Bootstrap::getProductSource( sDefault ) ); - OSL_ENSURE( sProductSource.Len() > 0, "No ProductSource in bootstrap file" ); - - // the product source is something like "DEV300", where the - // build id is something like "300m12(Build:12345)". For better readability, - // strip the duplicate UPD ("300"). - if ( sProductSource.Len() ) - { - bool bMatchingUPD = - ( sProductSource.Len() >= 3 ) - && ( sBuildId.Len() >= 3 ) - && ( sProductSource.Copy( sProductSource.Len() - 3 ) == sBuildId.Copy( 0, 3 ) ); - OSL_ENSURE( bMatchingUPD, "BUILDID and ProductSource do not match in their UPD" ); - if ( bMatchingUPD ) - sProductSource = sProductSource.Copy( 0, sProductSource.Len() - 3 ); - - // prepend the product source - sBuildId.Insert( sProductSource, 0 ); - } - - // Version information (in about box) (#i94693#) - /* if the build ids of the basis or ure layer are different from the build id - * of the brand layer then show them */ - rtl::OUString aBasisProductBuildId( DEFINE_CONST_OUSTRING("${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) ); - rtl::Bootstrap::expandMacros( aBasisProductBuildId ); - rtl::OUString aUREProductBuildId( DEFINE_CONST_OUSTRING("${$URE_BIN_DIR/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) ); - rtl::Bootstrap::expandMacros( aUREProductBuildId ); - if ( sBuildId.Search( String( aBasisProductBuildId ) ) == STRING_NOTFOUND - || sBuildId.Search( String( aUREProductBuildId ) ) == STRING_NOTFOUND ) - { - String sTemp( '-' ); - sTemp += String( aBasisProductBuildId ); - sTemp += '-'; - sTemp += String( aUREProductBuildId ); - sBuildId.Insert( sTemp, sBuildId.Search( ')' ) ); - } - - // the build id format is "milestone(build)[cwsname]". For readability, it would - // be nice to have some more spaces in there. - xub_StrLen nPos = 0; - if ( ( nPos = sBuildId.Search( sal_Unicode( '(' ) ) ) != STRING_NOTFOUND ) - sBuildId.Insert( sal_Unicode( ' ' ), nPos ); - if ( ( nPos = sBuildId.Search( sal_Unicode( '[' ) ) ) != STRING_NOTFOUND ) - sBuildId.Insert( sal_Unicode( ' ' ), nPos ); - return sBuildId; } -- cgit v1.2.3 From 49adde14ef614cb9503537137a0a2b9efcb1718e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 28 Jun 2011 11:57:55 +0100 Subject: ditch used stuff, and make it less horrifically ugly --- cui/source/dialogs/about.cxx | 122 +++++++++---------------------------------- cui/source/dialogs/about.hrc | 12 ++--- cui/source/dialogs/about.src | 6 +-- cui/source/inc/about.hxx | 12 ----- 4 files changed, 32 insertions(+), 120 deletions(-) diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 3759bba2c..debe809ed 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -90,14 +90,9 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : aVersionText ( this, ResId( ABOUT_FTXT_VERSION, *rId.GetResMgr() ) ), aCopyrightText ( this, ResId( ABOUT_FTXT_COPYRIGHT, *rId.GetResMgr() ) ), aInfoLink ( this, ResId( ABOUT_FTXT_LINK, *rId.GetResMgr() ) ), - aAccelStr ( ResId( ABOUT_STR_ACCEL, *rId.GetResMgr() ) ), aVersionTextStr( ResId( ABOUT_STR_VERSION, *rId.GetResMgr() ) ), aCopyrightTextStr( ResId( ABOUT_STR_COPYRIGHT, *rId.GetResMgr() ) ), - aLinkStr ( ResId( ABOUT_STR_LINK, *rId.GetResMgr() ) ), - aTimer (), - nOff ( 0 ), - m_nDeltaWidth ( 0 ), - m_nPendingScrolls( 0 ) + aLinkStr ( ResId( ABOUT_STR_LINK, *rId.GetResMgr() ) ) { rtl::OUString sProduct; utl::ConfigManager::GetDirectConfigProperty(utl::ConfigManager::PRODUCTNAME) >>= sProduct; @@ -122,28 +117,6 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : #endif aVersionText.SetText( sVersion ); - // Initialization call for developers - if ( aAccelStr.Len() && ByteString(U2S(aAccelStr)).IsAlphaAscii() ) - { - Accelerator *pAccel = 0, *pPrevAccel = 0, *pFirstAccel = 0; - aAccelStr.ToUpperAscii(); - - for ( sal_uInt16 i = 0; i < aAccelStr.Len(); ++i ) - { - pPrevAccel = pAccel; - pAccel = new Accelerator; - aAccelList.push_back( pAccel ); - sal_uInt16 nKey = aAccelStr.GetChar(i) - 'A' + KEY_A; - pAccel->InsertItem( 1, KeyCode( nKey, KEY_MOD1 ) ); - if ( i > 0 ) - pPrevAccel->SetAccel( 1, pAccel ); - if ( i == 0 ) - pFirstAccel = pAccel; - } - pAccel->SetSelectHdl( LINK( this, AboutDialog, AccelSelectHdl ) ); - GetpApp()->InsertAccel( pFirstAccel ); - } - // set for background and text the correct system color const StyleSettings& rSettings = GetSettings().GetStyleSettings(); Color aWhiteCol( rSettings.GetWindowColor() ); @@ -183,51 +156,55 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : Size aVTSize = aVersionText.CalcMinimumSize(); long nY = aAppLogoSiz.Height() + ( a6Size.Height() * 2 ); long nDlgMargin = a6Size.Width() * 3 ; - long nCtrlMargin = aVTSize.Height() + ( a6Size.Height() * 2 ); + long nCtrlMargin = a6Size.Height() * 2; long nTextWidth = aOutSiz.Width() - nDlgMargin; // finally set the aVersionText widget position and size Size aVTCopySize = aVTSize; Point aVTCopyPnt; - aVTCopySize.Width() = nTextWidth; + aVTCopySize.Width() = nTextWidth; aVTCopyPnt.X() = ( aOutSiz.Width() - aVTCopySize.Width() ) / 2; aVTCopyPnt.Y() = nY; aVersionText.SetPosSizePixel( aVTCopyPnt, aVTCopySize ); + nY += aVTSize.Height(); nY += nCtrlMargin; - - // OK-Button-Position (at the bottom and centered) - Size aOKSiz = aOKButton.GetSizePixel(); - Point aOKPnt = aOKButton.GetPosPixel(); - - // FixedHyperlink with more info link - Point aLinkPnt = aInfoLink.GetPosPixel(); - Size aLinkSize = aInfoLink.GetSizePixel(); // Multiline edit with Copyright-Text - Point aCopyPnt = aCopyrightText.GetPosPixel(); - Size aCopySize = aCopyrightText.GetSizePixel(); - aCopySize.Width() = nTextWidth; - aCopySize.Height() = aOutSiz.Height() - nY - ( aOKSiz.Height() * 2 ) - 3*aLinkSize.Height() - nCtrlMargin; + // preferred Version widget size + Size aCTSize = aCopyrightText.CalcMinimumSize(); - aCopyPnt.X() = ( aOutSiz.Width() - aCopySize.Width() ) / 2; - aCopyPnt.Y() = nY; - aCopyrightText.SetPosSizePixel( aCopyPnt, aCopySize ); + Size aCTCopySize = aCTSize; + Point aCTCopyPnt; + aCTCopySize.Width() = nTextWidth; + aCTCopyPnt.X() = ( aOutSiz.Width() - aCTCopySize.Width() ) / 2; + aCTCopyPnt.Y() = nY; + aCopyrightText.SetPosSizePixel( aCTCopyPnt, aCTCopySize ); - nY += aCopySize.Height() + aLinkSize.Height(); + nY += aCTSize.Height(); + nY += nCtrlMargin; - aLinkSize.Width() = aInfoLink.CalcMinimumSize().Width(); + // FixedHyperlink with more info link + Size aLinkSize = aInfoLink.CalcMinimumSize(); + Point aLinkPnt; aLinkPnt.X() = ( aOutSiz.Width() - aLinkSize.Width() ) / 2; aLinkPnt.Y() = nY; aInfoLink.SetPosSizePixel( aLinkPnt, aLinkSize ); nY += aLinkSize.Height() + nCtrlMargin; + // OK-Button-Position (at the bottom and centered) + Size aOKSiz = aOKButton.GetSizePixel(); + Point aOKPnt; aOKPnt.X() = ( aOutSiz.Width() - aOKSiz.Width() ) / 2; aOKPnt.Y() = nY; aOKButton.SetPosPixel( aOKPnt ); - // Change the width of the dialog + nY += aOKSiz.Height() + nCtrlMargin; + + aOutSiz.Height() = nY; + + // Change the size of the dialog SetOutputSizePixel( aOutSiz ); FreeResource(); @@ -238,50 +215,6 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : // ----------------------------------------------------------------------- -AboutDialog::~AboutDialog() -{ - // Clearing the developers call - if ( !aAccelList.empty() ) - { - GetpApp()->RemoveAccel( aAccelList.front() ); - - for ( size_t i = 0, n = aAccelList.size(); i < n; ++i ) - delete aAccelList[ i ]; - aAccelList.clear(); - } -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( AboutDialog, TimerHdl, Timer *, pTimer ) -{ - (void)pTimer; //unused - ++m_nPendingScrolls; - Invalidate( INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN ); - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( AboutDialog, AccelSelectHdl, Accelerator *, pAccelerator ) -{ - (void)pAccelerator; //unused - // init Timer - aTimer.SetTimeoutHdl( LINK( this, AboutDialog, TimerHdl ) ); - - // init scroll mode - nOff = GetOutputSizePixel().Height(); - MapMode aMapMode( MAP_PIXEL ); - SetMapMode( aMapMode ); - - // start scroll Timer - aTimer.SetTimeout( SCROLL_TIMER ); - aTimer.Start(); - return 0; -} - -// ----------------------------------------------------------------------- - IMPL_LINK( AboutDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink ) { rtl::OUString sURL=pHyperlink->GetURL(); @@ -312,15 +245,12 @@ IMPL_LINK( AboutDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink ) void AboutDialog::Paint( const Rectangle& rRect ) { SetClipRegion( rRect ); - - Point aPos( m_nDeltaWidth / 2, 0 ); + Point aPos( 0, 0 ); DrawImage( aPos, aAppLogo ); } sal_Bool AboutDialog::Close() { - // stop Timer and finish the dialog - aTimer.Stop(); EndDialog( RET_OK ); return sal_False; } diff --git a/cui/source/dialogs/about.hrc b/cui/source/dialogs/about.hrc index 7a74954c1..f10ee8f36 100644 --- a/cui/source/dialogs/about.hrc +++ b/cui/source/dialogs/about.hrc @@ -29,10 +29,8 @@ #define ABOUT_BTN_OK 1 #define ABOUT_FTXT_VERSION 2 -#define ABOUT_STR_ACCEL 3 -#define ABOUT_FTXT_COPYRIGHT 4 - -#define ABOUT_FTXT_LINK 5 -#define ABOUT_STR_VERSION 6 -#define ABOUT_STR_COPYRIGHT 7 -#define ABOUT_STR_LINK 8 +#define ABOUT_FTXT_COPYRIGHT 3 +#define ABOUT_FTXT_LINK 4 +#define ABOUT_STR_VERSION 5 +#define ABOUT_STR_COPYRIGHT 6 +#define ABOUT_STR_LINK 7 diff --git a/cui/source/dialogs/about.src b/cui/source/dialogs/about.src index 1bea54530..56a28be1f 100644 --- a/cui/source/dialogs/about.src +++ b/cui/source/dialogs/about.src @@ -72,14 +72,10 @@ ModalDialog RID_DEFAULTABOUT }; String ABOUT_STR_COPYRIGHT { - Text[ en-US ] = "Copyright © 2000, 2010 LibreOffice contributors and/or their affiliates. All rights reserved.\nThis product was created by %OOOVENDOR, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.\n%OOOVENDOR acknowledges all community members, please find more info at the link below:"; + Text[ en-US ] = "Copyright © 2000, 2010 LibreOffice contributors and/or their affiliates. All rights reserved.\n\nThis product was created by %OOOVENDOR, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.\n\n%OOOVENDOR acknowledges all community members, please find more info at the link below:"; }; String ABOUT_STR_LINK { Text[ en-US ] = "http://www.libreoffice.org/credits.html"; }; - String ABOUT_STR_ACCEL - { - Text = "SDT" ; - }; }; diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx index 86ead1dde..c5f2a0232 100644 --- a/cui/source/inc/about.hxx +++ b/cui/source/inc/about.hxx @@ -53,30 +53,18 @@ private: MultiLineEdit aCopyrightText; svt::FixedHyperlink aInfoLink; -// ResStringArray aDeveloperAry; // RIP ... - String aAccelStr; String aVersionData; String aVersionTextStr; String aCopyrightTextStr; String aLinkStr; - AccelList aAccelList; - - AutoTimer aTimer; - long nOff; - long m_nDeltaWidth; - int m_nPendingScrolls; - protected: virtual sal_Bool Close(); virtual void Paint( const Rectangle& rRect ); public: AboutDialog( Window* pParent, const ResId& rId); - ~AboutDialog(); - DECL_LINK( TimerHdl, Timer * ); - DECL_LINK( AccelSelectHdl, Accelerator * ); DECL_LINK( HandleHyperlink, svt::FixedHyperlink * ); }; -- cgit v1.2.3 From 82f0228a9158410f4a20f59e28d8060c1aca2036 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 28 Jun 2011 12:15:44 +0100 Subject: center text inside edit box --- cui/source/dialogs/about.src | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cui/source/dialogs/about.src b/cui/source/dialogs/about.src index 56a28be1f..f2542c61b 100644 --- a/cui/source/dialogs/about.src +++ b/cui/source/dialogs/about.src @@ -33,7 +33,6 @@ ModalDialog RID_DEFAULTABOUT Size = MAP_APPFONT ( 245 , 280 ) ; Moveable = TRUE ; SVLook = TRUE ; -// TEXT_DEFAULTABOUT OKButton ABOUT_BTN_OK { DefButton = TRUE ; @@ -57,6 +56,9 @@ ModalDialog RID_DEFAULTABOUT IgnoreTab = TRUE ; ReadOnly = TRUE ; AutoVScroll = TRUE ; + LEFT = FALSE ; + CENTER = TRUE ; + RIGHT = FALSE ; }; FixedText ABOUT_FTXT_LINK { -- cgit v1.2.3 From ec9c985bfdb84d6c4feeae0ab21e0214d79d8d7a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 28 Jun 2011 13:00:24 +0100 Subject: add Build Id: string and fix size calculations --- cui/source/dialogs/about.cxx | 58 +++++++++++++++++++++++--------------------- cui/source/dialogs/about.hrc | 7 +++--- cui/source/dialogs/about.src | 4 +++ cui/source/inc/about.hxx | 1 + 4 files changed, 39 insertions(+), 31 deletions(-) diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index debe809ed..455690497 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -92,7 +92,8 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : aInfoLink ( this, ResId( ABOUT_FTXT_LINK, *rId.GetResMgr() ) ), aVersionTextStr( ResId( ABOUT_STR_VERSION, *rId.GetResMgr() ) ), aCopyrightTextStr( ResId( ABOUT_STR_COPYRIGHT, *rId.GetResMgr() ) ), - aLinkStr ( ResId( ABOUT_STR_LINK, *rId.GetResMgr() ) ) + aLinkStr ( ResId( ABOUT_STR_LINK, *rId.GetResMgr() ) ), + m_sBuildStr(ResId(ABOUT_STR_BUILD, *rId.GetResMgr())) { rtl::OUString sProduct; utl::ConfigManager::GetDirectConfigProperty(utl::ConfigManager::PRODUCTNAME) >>= sProduct; @@ -109,6 +110,8 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : String sVersion = aVersionTextStr; sVersion.SearchAndReplaceAscii( "$(VER)", Application::GetDisplayName() ); sVersion += '\n'; + sVersion += m_sBuildStr; + sVersion += ' '; sVersion += GetBuildId(); #ifdef BUILD_VER_STRING String aBuildString( DEFINE_CONST_UNICODE( BUILD_VER_STRING ) ); @@ -146,52 +149,51 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : if (aAppLogoSiz.Width() < 300) aAppLogoSiz.Width() = 300; - Size aOutSiz = GetOutputSizePixel(); - aOutSiz.Width() = aAppLogoSiz.Width(); + Size aOutSiz = GetOutputSizePixel(); + aOutSiz.Width() = aAppLogoSiz.Width(); // analyze size of the aVersionText widget // character size Size a6Size = aVersionText.LogicToPixel( Size( 6, 6 ), MAP_APPFONT ); // preferred Version widget size - Size aVTSize = aVersionText.CalcMinimumSize(); long nY = aAppLogoSiz.Height() + ( a6Size.Height() * 2 ); long nDlgMargin = a6Size.Width() * 3 ; long nCtrlMargin = a6Size.Height() * 2; long nTextWidth = aOutSiz.Width() - nDlgMargin; // finally set the aVersionText widget position and size - Size aVTCopySize = aVTSize; - Point aVTCopyPnt; - aVTCopySize.Width() = nTextWidth; - aVTCopyPnt.X() = ( aOutSiz.Width() - aVTCopySize.Width() ) / 2; - aVTCopyPnt.Y() = nY; - aVersionText.SetPosSizePixel( aVTCopyPnt, aVTCopySize ); + Size aVTSize = aVersionText.GetSizePixel(); + aVTSize.Width() = nTextWidth; + aVersionText.SetSizePixel(aVTSize); + aVTSize = aVersionText.CalcMinimumSize(); + Point aVTPnt; + aVTPnt.X() = ( aOutSiz.Width() - aVTSize.Width() ) / 2; + aVTPnt.Y() = nY; + aVersionText.SetPosSizePixel( aVTPnt, aVTSize ); - nY += aVTSize.Height(); - nY += nCtrlMargin; + nY += aVTSize.Height() + nCtrlMargin; // Multiline edit with Copyright-Text // preferred Version widget size - Size aCTSize = aCopyrightText.CalcMinimumSize(); + Size aCTSize = aCopyrightText.GetSizePixel(); + aCTSize.Width() = nTextWidth; + aCopyrightText.SetSizePixel(aCTSize); + aCTSize = aCopyrightText.CalcMinimumSize(); + Point aCTPnt; + aCTPnt.X() = ( aOutSiz.Width() - aCTSize.Width() ) / 2; + aCTPnt.Y() = nY; + aCopyrightText.SetPosSizePixel( aCTPnt, aCTSize ); - Size aCTCopySize = aCTSize; - Point aCTCopyPnt; - aCTCopySize.Width() = nTextWidth; - aCTCopyPnt.X() = ( aOutSiz.Width() - aCTCopySize.Width() ) / 2; - aCTCopyPnt.Y() = nY; - aCopyrightText.SetPosSizePixel( aCTCopyPnt, aCTCopySize ); - - nY += aCTSize.Height(); - nY += nCtrlMargin; + nY += aCTSize.Height() + nCtrlMargin; // FixedHyperlink with more info link - Size aLinkSize = aInfoLink.CalcMinimumSize(); - Point aLinkPnt; - aLinkPnt.X() = ( aOutSiz.Width() - aLinkSize.Width() ) / 2; - aLinkPnt.Y() = nY; - aInfoLink.SetPosSizePixel( aLinkPnt, aLinkSize ); + Size aLTSize = aInfoLink.CalcMinimumSize(); + Point aLTPnt; + aLTPnt.X() = ( aOutSiz.Width() - aLTSize.Width() ) / 2; + aLTPnt.Y() = nY; + aInfoLink.SetPosSizePixel( aLTPnt, aLTSize ); - nY += aLinkSize.Height() + nCtrlMargin; + nY += aLTSize.Height() + nCtrlMargin; // OK-Button-Position (at the bottom and centered) Size aOKSiz = aOKButton.GetSizePixel(); diff --git a/cui/source/dialogs/about.hrc b/cui/source/dialogs/about.hrc index f10ee8f36..dfc71c4cc 100644 --- a/cui/source/dialogs/about.hrc +++ b/cui/source/dialogs/about.hrc @@ -31,6 +31,7 @@ #define ABOUT_FTXT_VERSION 2 #define ABOUT_FTXT_COPYRIGHT 3 #define ABOUT_FTXT_LINK 4 -#define ABOUT_STR_VERSION 5 -#define ABOUT_STR_COPYRIGHT 6 -#define ABOUT_STR_LINK 7 +#define ABOUT_STR_BUILD 5 +#define ABOUT_STR_VERSION 6 +#define ABOUT_STR_COPYRIGHT 7 +#define ABOUT_STR_LINK 8 diff --git a/cui/source/dialogs/about.src b/cui/source/dialogs/about.src index f2542c61b..383fc293a 100644 --- a/cui/source/dialogs/about.src +++ b/cui/source/dialogs/about.src @@ -80,4 +80,8 @@ ModalDialog RID_DEFAULTABOUT { Text[ en-US ] = "http://www.libreoffice.org/credits.html"; }; + String ABOUT_STR_BUILD + { + Text[ en-US ] = "Build ID:"; + }; }; diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx index c5f2a0232..2643f460d 100644 --- a/cui/source/inc/about.hxx +++ b/cui/source/inc/about.hxx @@ -57,6 +57,7 @@ private: String aVersionTextStr; String aCopyrightTextStr; String aLinkStr; + String m_sBuildStr; protected: virtual sal_Bool Close(); -- cgit v1.2.3 From a8f702693090d15c1f8d71ae78b68698d64a427d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 28 Jun 2011 13:00:51 +0100 Subject: break build id into multiple lines if using g log --- cui/source/dialogs/about.cxx | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 455690497..3241a47c6 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -72,13 +72,34 @@ Image SfxApplication::GetApplicationLogo() return Image( aBitmap ); } -/* intense magic to get strong version information */ +/* get good version information */ static String GetBuildId() { rtl::OUString sDefault; - String sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) ); - OSL_ENSURE( sBuildId.Len() > 0, "No BUILDID in bootstrap file" ); + rtl::OUString sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) ); + //strip trailing - from ./g log + if (!sBuildId.isEmpty() && sBuildId.getStr()[sBuildId.getLength()-1] == '-') + { + rtl::OUStringBuffer aBuffer; + sal_Int32 nIndex = 0; + do + { + rtl::OUString aToken = sBuildId.getToken( 0, '-', nIndex ); + if (!aToken.isEmpty()) + { + aBuffer.append(aToken); + if (nIndex % 5) + aBuffer.append(static_cast('-')); + else + aBuffer.append(static_cast('\n')); + } + } + while ( nIndex >= 0 ); + sBuildId = aBuffer.makeStringAndClear(); + } + + OSL_ENSURE( sBuildId.getLength() > 0, "No BUILDID in bootstrap file" ); return sBuildId; } -- cgit v1.2.3 From b6180157870d2b2dbde9c3624e466e582c17f48f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 28 Jun 2011 13:26:48 +0100 Subject: pretty this up a bit --- cui/source/dialogs/about.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 3241a47c6..8ef7a32eb 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -81,6 +81,7 @@ GetBuildId() //strip trailing - from ./g log if (!sBuildId.isEmpty() && sBuildId.getStr()[sBuildId.getLength()-1] == '-') { + sBuildId = sBuildId.copy(0, sBuildId.getLength()-1); rtl::OUStringBuffer aBuffer; sal_Int32 nIndex = 0; do @@ -89,10 +90,13 @@ GetBuildId() if (!aToken.isEmpty()) { aBuffer.append(aToken); - if (nIndex % 5) - aBuffer.append(static_cast('-')); - else - aBuffer.append(static_cast('\n')); + if (nIndex >= 0) + { + if (nIndex % 5) + aBuffer.append(static_cast('-')); + else + aBuffer.append(static_cast('\n')); + } } } while ( nIndex >= 0 ); -- cgit v1.2.3 From 6747e454f04db5ee60475d2d1b101094b5a089c0 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 28 Jun 2011 21:23:50 +0200 Subject: Load preview configuration --- wizards/com/sun/star/wizards/common/ConfigGroup.py | 73 ++++++---------------- .../com/sun/star/wizards/common/Configuration.py | 13 ++-- .../sun/star/wizards/document/OfficeDocument.py | 9 ++- .../sun/star/wizards/ui/event/DataAwareFields.py | 5 +- .../com/sun/star/wizards/ui/event/UnoDataAware.py | 1 + 5 files changed, 37 insertions(+), 64 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.py b/wizards/com/sun/star/wizards/common/ConfigGroup.py index a5824e803..b7715ac0e 100644 --- a/wizards/com/sun/star/wizards/common/ConfigGroup.py +++ b/wizards/com/sun/star/wizards/common/ConfigGroup.py @@ -1,74 +1,39 @@ from ConfigNode import * from Configuration import Configuration import traceback +import inspect class ConfigGroup(ConfigNode): + root = None + def writeConfiguration(self, configurationView, param): - for i in dir(self): - if i.startswith(param): - try: - self.writeField(i, configurationView, param) - except Exception, ex: - print "Error writing field:" + i - traceback.print_exc() + for name,data in inspect.getmembers(self): + if name.startswith(param): + self.writeField( name, configurationView, param) def writeField(self, field, configView, prefix): propertyName = field[len(prefix):] - field = getattr(self,field) - - if isinstance(field, ConfigNode): - pass - #print configView - #childView = Configuration.addConfigNode(configView, propertyName) - #self.writeConfiguration(childView, prefix) + child = getattr(self, field) + if isinstance(child, ConfigNode): + child.setRoot(self.root) + child.writeConfiguration(configView.getByName(propertyName), + prefix) else: - #print type(field) - Configuration.Set(self.convertValue(field), propertyName, - configView) + configView.setHierarchicalPropertyValue(propertyName,getattr(self,field)) - ''' - convert the primitive type value of the - given Field object to the corresponding - Java Object value. - @param field - @return the value of the field as a Object. - @throws IllegalAccessException - ''' - - def convertValue(self, field): - if isinstance(field,bool): - return bool(field) - elif isinstance(field,int): - return int(field) - - def readConfiguration(self, configurationView, param): - for i in dir(self): - if i.startswith(param): - try: - self.readField( i, configurationView, param) - except Exception, ex: - print "Error reading field: " + i - traceback.print_exc() def readConfiguration(self, configurationView, param): - for i in dir(self): - if i.startswith(param): - try: - self.readField( i, configurationView, param) - except Exception, ex: - print "Error reading field: " + i - traceback.print_exc() + for name,data in inspect.getmembers(self): + if name.startswith(param): + self.readField( name, configurationView, param) def readField(self, field, configView, prefix): propertyName = field[len(prefix):] child = getattr(self, field) - fieldType = type(child) - if type(ConfigNode) == fieldType: + if isinstance(child, ConfigNode): child.setRoot(self.root) - child.readConfiguration(Configuration.getNode(propertyName, configView), + child.readConfiguration(configView.getByName(propertyName), prefix) - field.set(this, Configuration.getString(propertyName, configView)) - - def setRoot(self, newRoot): - self.root = newRoot + else: + setattr(self,field,configView.getByName(propertyName)) diff --git a/wizards/com/sun/star/wizards/common/Configuration.py b/wizards/com/sun/star/wizards/common/Configuration.py index 96385bfab..d11f1c5ce 100644 --- a/wizards/com/sun/star/wizards/common/Configuration.py +++ b/wizards/com/sun/star/wizards/common/Configuration.py @@ -24,7 +24,7 @@ class Configuration(object): @classmethod def Set(self, value, name, parent): - parent.setHierarchicalPropertyValue(name, value) + setattr(parent, name, value) ''' @param name @@ -131,13 +131,12 @@ class Configuration(object): if configView is None: return configView.getByName(name) else: - print configView + # the new element is the result ! + print type(configView) + newNode = configView.createInstance() # insert it - this also names the element - try: - configView.insertByName(name, configView.createInstance()) - except Exception,e: - traceback.print_exc() - #return newNode + configView.insertByName(name, newNode) + return newNode @classmethod def removeNode(self, configView, name): diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py index e2636d026..f053baebe 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.py +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py @@ -7,6 +7,8 @@ from com.sun.star.awt import WindowDescriptor from com.sun.star.awt import Rectangle import unohelper +from com.sun.star.task import ErrorCodeIOException + #Window Constants com_sun_star_awt_WindowAttribute_BORDER \ = uno.getConstantByName( "com.sun.star.awt.WindowAttribute.BORDER" ) @@ -199,9 +201,12 @@ class OfficeDocument(object): unohelper.absolutize( unohelper.systemPathToFileUrl(sPath), unohelper.systemPathToFileUrl(sFile)), - tuple(oStoreProperties)) - + tuple(oStoreProperties)) + return True + except ErrorCodeIOException: return True + #There's a bug here, fix later + pass except Exception, exception: traceback.print_exc() return False diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py index 80f400ded..4a8e04b6b 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py +++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py @@ -34,8 +34,11 @@ class DataAwareFields(object): return self.__ConvertedStringValue(fieldname, value) elif isinstance(f,int): return self.__IntFieldValue(fieldname, value) + elif isinstance(f,float): + pass + #return self.__IntFieldValue(fieldname, value) else: - return SimpleFieldValue(f) + return self.__IntFieldValue(fieldname, value) except AttributeError, ex: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py index cca27ae5f..9e4a456a9 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py @@ -134,6 +134,7 @@ class UnoDataAware(DataAware): return self.__attachTextControl( data, prop, unoControl, listener, "Time", field, 0) + @classmethod def attachNumericControl(self, data, prop, unoControl, listener, field): return self.__attachTextControl( data, prop, unoControl, listener, "Value", field, float(0)) -- cgit v1.2.3 From 8aa177e48129b7f2f0a706eaf6eaa65d0802e8e1 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 28 Jun 2011 23:11:17 +0200 Subject: we won't need it --- wizards/com/sun/star/wizards/common/ConfigGroup.py | 1 + .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 54 +++++++-------- .../sun/star/wizards/ui/event/DataAwareFields.py | 6 +- .../sun/star/wizards/ui/event/RadioDataAware.java | 1 + .../sun/star/wizards/ui/event/RadioDataAware.py | 13 ++-- .../com/sun/star/wizards/ui/event/UnoDataAware.py | 78 ++++------------------ 6 files changed, 52 insertions(+), 101 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.py b/wizards/com/sun/star/wizards/common/ConfigGroup.py index b7715ac0e..89e6c834c 100644 --- a/wizards/com/sun/star/wizards/common/ConfigGroup.py +++ b/wizards/com/sun/star/wizards/common/ConfigGroup.py @@ -20,6 +20,7 @@ class ConfigGroup(ConfigNode): child.writeConfiguration(configView.getByName(propertyName), prefix) else: + print getattr(self,field) configView.setHierarchicalPropertyValue(propertyName,getattr(self,field)) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 0ba6064e4..6af702606 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -344,70 +344,70 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.myConfig.readConfiguration(root, "cp_") self.mainDA.append(RadioDataAware.attachRadioButtons( self.myConfig, "cp_FaxType", - (self.optBusinessFax, self.optPrivateFax), None, True)) + (self.optBusinessFax, self.optPrivateFax), True)) self.mainDA.append(UnoDataAware.attachListBox( self.myConfig.cp_BusinessFax, "cp_Style", - self.lstBusinessStyle, None, True)) + self.lstBusinessStyle, True)) self.mainDA.append(UnoDataAware.attachListBox( self.myConfig.cp_PrivateFax, "cp_Style", self.lstPrivateStyle, - None, True)) + True)) cgl = self.myConfig.cp_BusinessFax self.faxDA.append(UnoDataAware.attachCheckBox(cgl, - "cp_PrintCompanyLogo", self.chkUseLogo, None, True)) + "cp_PrintCompanyLogo", self.chkUseLogo, True)) self.faxDA.append(UnoDataAware.attachCheckBox(cgl, - "cp_PrintSubjectLine", self.chkUseSubject, None, True)) + "cp_PrintSubjectLine", self.chkUseSubject, True)) self.faxDA.append(UnoDataAware.attachCheckBox(cgl, - "cp_PrintSalutation", self.chkUseSalutation, None, True)) + "cp_PrintSalutation", self.chkUseSalutation, True)) self.faxDA.append(UnoDataAware.attachCheckBox(cgl, - "cp_PrintDate", self.chkUseDate, None, True)) + "cp_PrintDate", self.chkUseDate, True)) self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintCommunicationType", self.chkUseCommunicationType, - None, True)) + True)) self.faxDA.append(UnoDataAware.attachCheckBox(cgl, - "cp_PrintGreeting", self.chkUseGreeting, None, True)) + "cp_PrintGreeting", self.chkUseGreeting, True)) self.faxDA.append(UnoDataAware.attachCheckBox(cgl, - "cp_PrintFooter", self.chkUseFooter, None, True)) + "cp_PrintFooter", self.chkUseFooter, True)) self.faxDA.append(UnoDataAware.attachEditControl(cgl, - "cp_Salutation", self.lstSalutation, None, True)) + "cp_Salutation", self.lstSalutation, True)) self.faxDA.append(UnoDataAware.attachEditControl(cgl, - "cp_Greeting", self.lstGreeting, None, True)) + "cp_Greeting", self.lstGreeting, True)) self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_CommunicationType", self.lstCommunicationType, - None, True)) + True)) self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_SenderAddressType", (self.optSenderDefine, \ - self.optSenderPlaceholder), None, True)) + self.optSenderPlaceholder), True)) self.faxDA.append(UnoDataAware.attachEditControl(cgl, - "cp_SenderCompanyName", self.txtSenderName, None, True)) + "cp_SenderCompanyName", self.txtSenderName, True)) self.faxDA.append(UnoDataAware.attachEditControl(cgl, - "cp_SenderStreet", self.txtSenderStreet, None, True)) + "cp_SenderStreet", self.txtSenderStreet, True)) self.faxDA.append(UnoDataAware.attachEditControl(cgl, - "cp_SenderPostCode", self.txtSenderPostCode, None, True)) + "cp_SenderPostCode", self.txtSenderPostCode, True)) self.faxDA.append(UnoDataAware.attachEditControl(cgl, - "cp_SenderState", self.txtSenderState, None, True)) + "cp_SenderState", self.txtSenderState, True)) self.faxDA.append(UnoDataAware.attachEditControl(cgl, - "cp_SenderCity", self.txtSenderCity, None, True)) + "cp_SenderCity", self.txtSenderCity, True)) self.faxDA.append(UnoDataAware.attachEditControl(cgl, - "cp_SenderFax", self.txtSenderFax, None, True)) + "cp_SenderFax", self.txtSenderFax, True)) self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_ReceiverAddressType", (self.optReceiverDatabase, - self.optReceiverPlaceholder), None, True)) + self.optReceiverPlaceholder), True)) self.faxDA.append(UnoDataAware.attachEditControl(cgl, - "cp_Footer", self.txtFooter, None, True)) + "cp_Footer", self.txtFooter, True)) self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_FooterOnlySecondPage", self.chkFooterNextPages, - None, True)) + True)) self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_FooterPageNumbers", self.chkFooterPageNumbers, - None, True)) + True)) self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_CreationType", (self.optCreateFax, self.optMakeChanges), - None, True)) + True)) self.faxDA.append(UnoDataAware.attachEditControl(cgl, - "cp_TemplateName", self.txtTemplateName, None, True)) + "cp_TemplateName", self.txtTemplateName, True)) self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_TemplatePath", self.myPathSelection.xSaveTextBox, - None, True)) + True)) except Exception, exception: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py index 4a8e04b6b..95f4ea175 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py +++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py @@ -29,15 +29,19 @@ class DataAwareFields(object): try: f = getattr(owner, fieldname) if isinstance(f,bool): + pass return self.__BooleanFieldValue(fieldname, value) elif isinstance(f,str): + pass return self.__ConvertedStringValue(fieldname, value) elif isinstance(f,int): + pass return self.__IntFieldValue(fieldname, value) elif isinstance(f,float): pass - #return self.__IntFieldValue(fieldname, value) + return self.__IntFieldValue(fieldname, value) else: + pass return self.__IntFieldValue(fieldname, value) except AttributeError, ex: diff --git a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java index 3954b2eea..ceaeaa031 100644 --- a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java @@ -92,6 +92,7 @@ public class RadioDataAware extends DataAware ? DataAwareFields.getFieldValueFor(data, dataProp, new Integer(0)) : new DataAware.PropertyValue(dataProp, data), buttons); XItemListener xil = UnoDataAware.itemListener(da, listener); + System.out.println(listener); for (int i = 0; i < da.radioButtons.length; i++) { da.radioButtons[i].addItemListener(xil); diff --git a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py index 95df5c7ef..0eb4678f6 100644 --- a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py @@ -10,19 +10,19 @@ Window>Preferences>Java>Code Generation>Code and Comments class RadioDataAware(DataAware): - def __init__(self, data, value, radioButs): + def __init__(self, data, value, radioButtons): super(RadioDataAware,self).__init__(data, value) - self.radioButtons = radioButs + self.radioButtons = radioButtons def setToUI(self, value): selected = int(value) if selected == -1: i = 0 while i < self.radioButtons.length: - self.radioButtons[i].setState(False) + self.radioButtons[i].State = False i += 1 else: - self.radioButtons[selected].setState(True) + self.radioButtons[selected].State = True def getFromUI(self): for i in self.radioButtons: @@ -32,14 +32,11 @@ class RadioDataAware(DataAware): return -1 @classmethod - def attachRadioButtons(self, data, dataProp, buttons, listener, field): + def attachRadioButtons(self, data, dataProp, buttons, field): if field: aux = DataAwareFields.getFieldValueFor(data, dataProp, 0) else: aux = DataAware.PropertyValue (dataProp, data) da = RadioDataAware(data, aux , buttons) - xil = UnoDataAware.ItemListener(da, listener) - for i in da.radioButtons: - i.addItemListener(xil) return da diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py index 9e4a456a9..c2ed02723 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py @@ -1,7 +1,4 @@ from DataAware import * -import unohelper -from com.sun.star.awt import XItemListener -from com.sun.star.awt import XTextListener from DataAwareFields import * from common.Helper import * @@ -21,7 +18,7 @@ class UnoDataAware(DataAware): def __init__(self, dataObject, value, unoObject_, unoPropName_): super(UnoDataAware,self).__init__(dataObject, value) self.unoControl = unoObject_ - self.unoModel = self.getModel(self.unoControl) + self.unoModel = self.unoControl.Model self.unoPropName = unoPropName_ self.disableObjects = range(0) self.inverse = False @@ -45,18 +42,6 @@ class UnoDataAware(DataAware): def setToUI(self, value): Helper.setUnoPropertyValue(self.unoModel, self.unoPropName, value) - def stringof(self, value): - if value.getClass().isArray(): - sb = StringBuffer.StringBuffer_unknown("[") - i = 0 - while i < (value).length: - sb.append((value)[i]).append(" , ") - i += 1 - sb.append("]") - return sb.toString() - else: - return value.toString() - ''' Try to get from an arbitrary object a boolean value. Null returns False; @@ -97,73 +82,43 @@ class UnoDataAware(DataAware): @classmethod def __attachTextControl( - self, data, prop, unoText, listener, unoProperty, field, value): + self, data, prop, unoText, unoProperty, field, value): if field: aux = DataAwareFields.getFieldValueFor(data, prop, value) else: aux = DataAware.PropertyValue (prop, data) uda = UnoDataAware(data, aux, unoText, unoProperty) - unoText.addTextListener(self.TextListener(uda,listener)) return uda - class TextListener(unohelper.Base, XTextListener): - - def __init__(self, uda,listener): - self.uda = uda - self.listener = listener - - def textChanged(te): - self.uda.updateData() - if self.listener: - self.listener.eventPerformed(te) - - def disposing(self,eo): - pass - @classmethod - def attachEditControl(self, data, prop, unoControl, listener, field): + def attachEditControl(self, data, prop, unoControl, field): return self.__attachTextControl( - data, prop, unoControl, listener, "Text", field, "") + data, prop, unoControl, "Text", field, "") @classmethod - def attachDateControl(self, data, prop, unoControl, listener, field): + def attachDateControl(self, data, prop, unoControl, field): return self.__attachTextControl( - data, prop, unoControl, listener, "Date", field, 0) + data, prop, unoControl, "Date", field, 0) - def attachTimeControl(self, data, prop, unoControl, listener, field): + def attachTimeControl(self, data, prop, unoControl, field): return self.__attachTextControl( - data, prop, unoControl, listener, "Time", field, 0) + data, prop, unoControl, "Time", field, 0) @classmethod - def attachNumericControl(self, data, prop, unoControl, listener, field): + def attachNumericControl(self, data, prop, unoControl, field): return self.__attachTextControl( - data, prop, unoControl, listener, "Value", field, float(0)) + data, prop, unoControl, "Value", field, float(0)) @classmethod - def attachCheckBox(self, data, prop, checkBox, listener, field): + def attachCheckBox(self, data, prop, checkBox, field): if field: aux = DataAwareFields.getFieldValueFor(data, prop, 0) else: aux = DataAware.PropertyValue (prop, data) uda = UnoDataAware(data, aux , checkBox, PropertyNames.PROPERTY_STATE) - checkBox.addItemListener(self.ItemListener(uda, listener)) return uda - class ItemListener(unohelper.Base, XItemListener): - - def __init__(self, da, listener): - self.da = da - self.listener = listener - - def itemStateChanged(self, ie): - self.da.updateData() - if self.listener != None: - self.listener.eventPerformed(ie) - - def disposing(self, eo): - pass - - def attachLabel(self, data, prop, label, listener, field): + def attachLabel(self, data, prop, label, field): if field: aux = DataAwareFields.getFieldValueFor(data, prop, "") else: @@ -171,22 +126,15 @@ class UnoDataAware(DataAware): return UnoDataAware(data, aux, label, PropertyNames.PROPERTY_LABEL) @classmethod - def attachListBox(self, data, prop, listBox, listener, field): + def attachListBox(self, data, prop, listBox, field): if field: aux = DataAwareFields.getFieldValueFor( data, prop, uno.Any("short",0)) else: aux = DataAware.PropertyValue (prop, data) uda = UnoDataAware(data, aux, listBox, "SelectedItems") - listBox.addItemListener(self.ItemListener(uda,listener)) return uda - def getModel(self, control): - return control.getModel() - - def setEnabled(self, control, enabled): - setEnabled(control, enabled) - def setEnabled(self, control, enabled): Helper.setUnoPropertyValue( getModel(control), PropertyNames.PROPERTY_ENABLED, enabled) -- cgit v1.2.3 From 8b6b868301967e0c8690281c37099fe743da9016 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 29 Jun 2011 12:37:20 +0300 Subject: jawt_md.h is not needed in this file --- bean/native/win32/com_sun_star_beans_LocalOfficeWindow.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bean/native/win32/com_sun_star_beans_LocalOfficeWindow.c b/bean/native/win32/com_sun_star_beans_LocalOfficeWindow.c index 26074c57f..ea3761239 100644 --- a/bean/native/win32/com_sun_star_beans_LocalOfficeWindow.c +++ b/bean/native/win32/com_sun_star_beans_LocalOfficeWindow.c @@ -36,14 +36,6 @@ #include "jawt.h" -#if defined _MSC_VER -#pragma warning(push, 1) -#endif -#include "jawt_md.h" -#if defined _MSC_VER -#pragma warning(pop) -#endif - #if defined assert #undef assert #endif -- cgit v1.2.3 From 2c48643deb0ca265742be52c9f9a546bd3b3253f Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 29 Jun 2011 12:39:08 +0300 Subject: Don't use the (win32) jawt_md.h as we don't have that when cross-compiling Just insert the trivial JAWT_GetAWT declaration and JAWT_Win32DrawingSurfaceInfo struct definition. --- .../com_sun_star_comp_beans_LocalOfficeWindow.c | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c b/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c index 0f7b0d8d4..3707566b9 100644 --- a/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c +++ b/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c @@ -34,12 +34,33 @@ #pragma warning(pop) #endif +#include +#define JAWT_GetAWT hidden_JAWT_GetAWT #include "jawt.h" +#undef JAWT_GetAWT #if defined _MSC_VER #pragma warning(push, 1) #endif -#include "jawt_md.h" +/* When cross-compiling to Windows we don't have any Windows JDK + * available. Copying this short snippet from win32/jawt_md.h can + * surely not be against its license. The intent is to enable + * interoperation with real Oracle Java after all. We leave out the + * informative comments that might have "artistic merit" and be more + * copyrightable. Use this also for native Windows compilation for + * simplicity. + */ +typedef struct jawt_Win32DrawingSurfaceInfo { + union { + HWND hwnd; + HBITMAP hbitmap; + void* pbits; + }; + HDC hdc; + HPALETTE hpalette; +} JAWT_Win32DrawingSurfaceInfo; + +extern __declspec(dllimport) unsigned char __stdcall JAWT_GetAWT(JNIEnv *, JAWT *); #if defined _MSC_VER #pragma warning(pop) #endif -- cgit v1.2.3 From 176e1402b2407777c84796a7e2ef695acbd2d1da Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 29 Jun 2011 09:00:20 +0100 Subject: remove deprecated ByteString::CreateFromInt64 --- automation/source/miniapp/testapp.cxx | 2 +- automation/source/testtool/objtest.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/automation/source/miniapp/testapp.cxx b/automation/source/miniapp/testapp.cxx index ef5d3565b..2fb5ef843 100644 --- a/automation/source/miniapp/testapp.cxx +++ b/automation/source/miniapp/testapp.cxx @@ -209,7 +209,7 @@ sal_uInt16 MyDispatcher::ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** ppArgs, case IDM_SYS_DLG: pMainWin->SysDlg(); break; default: { - OSL_TRACE("Dispatcher kennt Funktion nicht %s",ByteString::CreateFromInt64(nSID).GetBuffer()); + OSL_TRACE("Dispatcher kennt Funktion nicht %s", rtl::OString::valueOf(static_cast(nSID)).getStr()); return EXECUTE_NO; } diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx index 7ad2778ce..0b4255346 100644 --- a/automation/source/testtool/objtest.cxx +++ b/automation/source/testtool/objtest.cxx @@ -402,7 +402,7 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die durch den aConf.SetGroup("Misc"); String aST; - GETSET( aST, "ServerTimeout", ByteString::CreateFromInt64(Time(0,0,45).GetTime()) ); // 45 Sekunden Initial + GETSET( aST, "ServerTimeout", rtl::OString::valueOf(Time(0,0,45).GetTime()) ); // 45 Sekunden Initial pImpl->aServerTimeout = Time(sal_uLong(aST.ToInt64())); String aSOSE; -- cgit v1.2.3 From 07fa97d8a10db2e8789d9b725359e3bd8be10db5 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 29 Jun 2011 18:47:40 +0200 Subject: Save Configuration --- wizards/com/sun/star/wizards/common/ConfigGroup.py | 7 +- .../com/sun/star/wizards/common/Configuration.py | 1 - .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 1 - .../sun/star/wizards/ui/event/CommonListener.py | 1 - wizards/com/sun/star/wizards/ui/event/DataAware.py | 172 ++------------------- .../sun/star/wizards/ui/event/DataAwareField.py | 35 +++++ .../sun/star/wizards/ui/event/RadioDataAware.java | 1 - .../sun/star/wizards/ui/event/RadioDataAware.py | 9 +- .../com/sun/star/wizards/ui/event/UnoDataAware.py | 17 +- 9 files changed, 65 insertions(+), 179 deletions(-) create mode 100644 wizards/com/sun/star/wizards/ui/event/DataAwareField.py diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.py b/wizards/com/sun/star/wizards/common/ConfigGroup.py index 89e6c834c..9019ffe63 100644 --- a/wizards/com/sun/star/wizards/common/ConfigGroup.py +++ b/wizards/com/sun/star/wizards/common/ConfigGroup.py @@ -20,9 +20,10 @@ class ConfigGroup(ConfigNode): child.writeConfiguration(configView.getByName(propertyName), prefix) else: - print getattr(self,field) - configView.setHierarchicalPropertyValue(propertyName,getattr(self,field)) - + try: + setattr(configView,propertyName,getattr(self,field)) + except Exception: + pass def readConfiguration(self, configurationView, param): for name,data in inspect.getmembers(self): diff --git a/wizards/com/sun/star/wizards/common/Configuration.py b/wizards/com/sun/star/wizards/common/Configuration.py index d11f1c5ce..20f4bd374 100644 --- a/wizards/com/sun/star/wizards/common/Configuration.py +++ b/wizards/com/sun/star/wizards/common/Configuration.py @@ -132,7 +132,6 @@ class Configuration(object): return configView.getByName(name) else: # the new element is the result ! - print type(configView) newNode = configView.createInstance() # insert it - this also names the element configView.insertByName(name, newNode) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 6af702606..4b48e57e6 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -157,7 +157,6 @@ class FaxWizardDialogImpl(FaxWizardDialog): endWizard = False return False - self.myFaxDoc.setWizardTemplateDocInfo( \ self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py index 6ff03667d..3bd486240 100644 --- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py +++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py @@ -34,7 +34,6 @@ # OOo's libraries import unohelper -import inspect from com.sun.star.awt import XActionListener class ActionListenerProcAdapter( unohelper.Base, XActionListener ): diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py b/wizards/com/sun/star/wizards/ui/event/DataAware.py index f21b86b76..b0360ebe7 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.py @@ -1,6 +1,7 @@ from common.PropertyNames import * from abc import ABCMeta, abstractmethod import traceback +from ui.event.CommonListener import * ''' @author rpiterman @@ -31,27 +32,6 @@ class DataAware(object): self._dataObject = dataObject_ self._value = value_ - ''' - Sets the given value to the data object. - this method delegates the job to the - Value object, but can be overwritten if - another kind of Data is needed. - @param newValue the new value to set to the DataObject. - ''' - - def setToData(self, newValue): - self._value.set(newValue, self._dataObject) - - ''' - gets the current value from the data obejct. - this method delegates the job to - the value object. - @return the current value of the data object. - ''' - - def getFromData(self): - return self._value.get(self._dataObject) - ''' sets the given value to the UI control @param newValue the value to set to the ui control. @@ -75,7 +55,7 @@ class DataAware(object): ''' def updateUI(self): - data = self.getFromData() + data = self._value.get(self._dataObject) ui = self.getFromUI() if data is not ui: try: @@ -90,15 +70,13 @@ class DataAware(object): ''' def updateData(self): - data = self.getFromData() - ui = self.getFromUI() - if not equals(data, ui): - setToData(ui) - - class Listener(object): - @abstractmethod - def eventPerformed (self, event): - pass + try: + data = self._value.get(self._dataObject) + ui = self.getFromUI() + if data is not ui: + self._value.Set(ui, self._dataObject) + except Exception: + traceback.print_exc() ''' compares the two given objects. @@ -168,135 +146,3 @@ class DataAware(object): def setDataObjects(self, dataAwares, dataObject, updateUI): for i in dataAwares: i.setDataObject(dataObject, updateUI) - - ''' - Value objects read and write a value from and - to an object. Typically using reflection and JavaBeans properties - or directly using memeber reflection API. - DataAware delegates the handling of the DataObject - to a Value object. - 2 implementations currently exist: PropertyValue, - using JavaBeans properties reflection, and DataAwareFields classes - which implement different memeber types. - ''' - class Value (object): - - '''gets a value from the given object. - @param target the object to get the value from. - @return the value from the given object. - ''' - @abstractmethod - def Get (self, target): - pass - - ''' - sets a value to the given object. - @param value the value to set to the object. - @param target the object to set the value to. - ''' - @abstractmethod - def Set (self, value, target): - pass - - ''' - checks if this Value object can handle - the given object type as a target. - @param type the type of a target to check - @return true if the given class is acceptible for - the Value object. False if not. - ''' - @abstractmethod - def isAssifrom(self, Type): - pass - - ''' - implementation of Value, handling JavaBeans properties through - reflection. - This Object gets and sets a value a specific - (JavaBean-style) property on a given object. - @author rp143992 - ''' - class PropertyValue(Value): - - __EMPTY_ARRAY = range(0) - - ''' - creates a PropertyValue for the property with - the given name, of the given JavaBean object. - @param propertyName the property to access. Must be a Cup letter - (e.g. PropertyNames.PROPERTY_NAME for getName() and setName("..."). ) - @param propertyOwner the object which "own" or "contains" the property - ''' - - def __init__(self, propertyName, propertyOwner): - self.getMethod = createGetMethod(propertyName, propertyOwner) - self.setMethod = createSetMethod( - propertyName, propertyOwner, self.getMethod.getReturnType()) - - ''' - called from the constructor, and creates a get method reflection object - for the given property and object. - @param propName the property name0 - @param obj the object which contains the property. - @return the get method reflection object. - ''' - - def createGetMethod(self, propName, obj): - m = None - try: - #try to get a "get" method. - m = obj.getClass().getMethod( - "get" + propName, self.__class__.__EMPTY_ARRAY) - except NoSuchMethodException, ex1: - raise IllegalArgumentException ( - "get" + propName + "() method does not exist on " + \ - obj.Class.Name) - - return m - - def Get(self, target): - try: - return self.getMethod.invoke( - target, self.__class__.__EMPTY_ARRAY) - except IllegalAccessException, ex1: - ex1.printStackTrace() - except InvocationTargetException, ex2: - ex2.printStackTrace() - except NullPointerException, npe: - if isinstance(self.getMethod.getReturnType(),str): - return "" - - if isinstance(self.getMethod.getReturnType(),int ): - return 0 - - if isinstance(self.getMethod.getReturnType(),tuple): - return 0 - - if isinstance(self.getMethod.getReturnType(),list ): - return [] - - return None - - def createSetMethod(self, propName, obj, paramClass): - m = None - try: - m = obj.getClass().getMethod("set" + propName, [paramClass]) - except NoSuchMethodException, ex1: - raise IllegalArgumentException ("set" + propName + "(" + \ - self.getMethod.getReturnType().getName() + \ - ") method does not exist on " + obj.Class.Name); - - return m - - def Set(self, value, target): - try: - self.setMethod.invoke(target, [value]) - except IllegalAccessException, ex1: - ex1.printStackTrace() - except InvocationTargetException, ex2: - ex2.printStackTrace() - - def isAssignable(self, type): - return self.getMethod.getDeclaringClass().isAssignableFrom(type) \ - and self.setMethod.getDeclaringClass().isAssignableFrom(type) - diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareField.py b/wizards/com/sun/star/wizards/ui/event/DataAwareField.py new file mode 100644 index 000000000..8f8b64fed --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/event/DataAwareField.py @@ -0,0 +1,35 @@ +import traceback +from DataAware import * +import uno + +class DataAwareField(object): + + def __init__(self, field, convertTo): + self.convertTo = convertTo + self.field = field + + def get(self, target): + try: + i = getattr(target, self.field) + if isinstance(self.convertTo, bool): + if i: + return True + else: + return False + elif isinstance(self.convertTo,int): + return int(i) + elif isinstance(self.convertTo,str): + return str(i) + elif self.convertTo.type == uno.Any("short",0).type: + return uno.Any("[]short",(i,)) + else: + raise AttributeError( + "Cannot convert int value to given type (" + \ + str(type(self.convertTo)) + ").") + + except AttributeError, ex: + traceback.print_exc() + return None + + def Set(self, value, target): + setattr(target, self.field, value) diff --git a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java index ceaeaa031..3954b2eea 100644 --- a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java @@ -92,7 +92,6 @@ public class RadioDataAware extends DataAware ? DataAwareFields.getFieldValueFor(data, dataProp, new Integer(0)) : new DataAware.PropertyValue(dataProp, data), buttons); XItemListener xil = UnoDataAware.itemListener(da, listener); - System.out.println(listener); for (int i = 0; i < da.radioButtons.length; i++) { da.radioButtons[i].addItemListener(xil); diff --git a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py index 0eb4678f6..12f6e94f7 100644 --- a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py @@ -1,5 +1,5 @@ from DataAware import * -from DataAwareFields import * +from DataAwareField import DataAwareField from UnoDataAware import * import time ''' @@ -34,9 +34,12 @@ class RadioDataAware(DataAware): @classmethod def attachRadioButtons(self, data, dataProp, buttons, field): if field: - aux = DataAwareFields.getFieldValueFor(data, dataProp, 0) + aux = DataAwareField(dataProp, 0) else: - aux = DataAware.PropertyValue (dataProp, data) + aux = DataAware.PropertyValue(dataProp, data) da = RadioDataAware(data, aux , buttons) + method = getattr(da,"updateData") + for i in da.radioButtons: + i.addItemListener(ItemListenerProcAdapter(method)) return da diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py index c2ed02723..c12a81c33 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py @@ -1,5 +1,5 @@ from DataAware import * -from DataAwareFields import * +from DataAwareField import DataAwareField from common.Helper import * ''' @@ -84,10 +84,12 @@ class UnoDataAware(DataAware): def __attachTextControl( self, data, prop, unoText, unoProperty, field, value): if field: - aux = DataAwareFields.getFieldValueFor(data, prop, value) + aux = DataAwareField(prop, value) else: aux = DataAware.PropertyValue (prop, data) uda = UnoDataAware(data, aux, unoText, unoProperty) + method = getattr(uda,"updateData") + unoText.addTextListener(TextListenerProcAdapter(method)) return uda @classmethod @@ -112,15 +114,17 @@ class UnoDataAware(DataAware): @classmethod def attachCheckBox(self, data, prop, checkBox, field): if field: - aux = DataAwareFields.getFieldValueFor(data, prop, 0) + aux = DataAwareField(prop, 0) else: aux = DataAware.PropertyValue (prop, data) uda = UnoDataAware(data, aux , checkBox, PropertyNames.PROPERTY_STATE) + method = getattr(uda,"updateData") + checkBox.addItemListener(ItemListenerProcAdapter(method)) return uda def attachLabel(self, data, prop, label, field): if field: - aux = DataAwareFields.getFieldValueFor(data, prop, "") + aux = DataAwareField(prop, "") else: aux = DataAware.PropertyValue (prop, data) return UnoDataAware(data, aux, label, PropertyNames.PROPERTY_LABEL) @@ -128,11 +132,12 @@ class UnoDataAware(DataAware): @classmethod def attachListBox(self, data, prop, listBox, field): if field: - aux = DataAwareFields.getFieldValueFor( - data, prop, uno.Any("short",0)) + aux = DataAwareField(prop, uno.Any("short",0)) else: aux = DataAware.PropertyValue (prop, data) uda = UnoDataAware(data, aux, listBox, "SelectedItems") + method = getattr(uda,"updateData") + listBox.addItemListener(ItemListenerProcAdapter(method)) return uda def setEnabled(self, control, enabled): -- cgit v1.2.3 From b5fe44b928105cc89767f4d560ba0dcfa4b05844 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 29 Jun 2011 18:51:50 +0200 Subject: I forgot to delete it --- .../sun/star/wizards/ui/event/DataAwareFields.py | 172 --------------------- 1 file changed, 172 deletions(-) delete mode 100644 wizards/com/sun/star/wizards/ui/event/DataAwareFields.py diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py deleted file mode 100644 index 95f4ea175..000000000 --- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py +++ /dev/null @@ -1,172 +0,0 @@ -import traceback -from DataAware import * -import uno -''' -This class is a factory for Value objects for different types of -memebers. -Other than some Value implementations classes this class contains static -type conversion methods and factory methods. - -@see com.sun.star.wizards.ui.event.DataAware.Value -''' - -class DataAwareFields(object): - TRUE = "true" - FALSE = "false" - ''' - returns a Value Object which sets and gets values - and converting them to other types, according to the "value" argument. - - @param owner - @param fieldname - @param value - @return - @throws NoSuchFieldException - ''' - - @classmethod - def getFieldValueFor(self, owner, fieldname, value): - try: - f = getattr(owner, fieldname) - if isinstance(f,bool): - pass - return self.__BooleanFieldValue(fieldname, value) - elif isinstance(f,str): - pass - return self.__ConvertedStringValue(fieldname, value) - elif isinstance(f,int): - pass - return self.__IntFieldValue(fieldname, value) - elif isinstance(f,float): - pass - return self.__IntFieldValue(fieldname, value) - else: - pass - return self.__IntFieldValue(fieldname, value) - - except AttributeError, ex: - traceback.print_exc() - return None - - '''__ConvertedStringValue - an abstract implementation of DataAware.Value to access - object memebers (fields) usign reflection. - ''' - class __FieldValue(DataAware.Value): - __metaclass__ = ABCMeta - - def __init__(self, field_): - self.field = field_ - - def isAssignable(self, type_): - return self.field.getDeclaringClass().isAssignableFrom(type_) - - class __BooleanFieldValue(__FieldValue): - - def __init__(self, f, convertTo_): - super(type(self),self).__init__(f) - self.convertTo = convertTo_ - - def get(self, target): - try: - b = getattr(target, self.field) - - if isinstance(self.convertTo,bool): - if b: - return True - else: - return False - elif isinstance(self.convertTo,int): - return int(b) - elif isinstance(self.convertTo,str): - return str(b) - elif self.convertTo.type == uno.Any("short",0).type: - return uno.Any("short",b) - else: - raise AttributeError( - "Cannot convert boolean value to given type (" + \ - str(type(self.convertTo)) + ").") - - except Exception, ex: - traceback.print_exc() - return None - - def set(self, value, target): - try: - self.field.setBoolean(target, toBoolean(value)) - except Exception, ex: - traceback.print_exc() - - class __IntFieldValue(__FieldValue): - - def __init__(self, f, convertTo_): - super(type(self),self).__init__(f) - self.convertTo = convertTo_ - - def get(self, target): - try: - i = getattr(target, self.field) - if isinstance(self.convertTo,bool): - if i: - return True - else: - return False - elif isinstance(self.convertTo, int): - return int(i) - elif isinstance(self.convertTo,str): - return str(i) - elif self.convertTo.type == uno.Any("short",0).type: - return uno.Any("[]short",(i,)) - else: - raise AttributeError( - "Cannot convert int value to given type (" + \ - str(type(self.convertTo)) + ")."); - - except Exception, ex: - traceback.print_exc() - #traceback.print_exc__ConvertedStringValue() - return None - - def set(self, value, target): - try: - self.field.setInt(target, toDouble(value)) - except Exception, ex: - traceback.print_exc() - - class __ConvertedStringValue(__FieldValue): - - def __init__(self, f, convertTo_): - super(type(self),self).__init__(f) - self.convertTo = convertTo_ - - def get(self, target): - try: - s = getattr(target, self.field) - if isinstance(self.convertTo,bool): - if s != None and not s == "" and s == "true": - return True - else: - return False - elif isinstance(self.convertTo,str): - if s == None or s == "": - pass - else: - return s - else: - raise AttributeError( - "Cannot convert int value to given type (" + \ - str(type(self.convertTo)) + ")." ) - - except Exception, ex: - traceback.print_exc() - return None - - def set(self, value, target): - try: - string_aux = "" - #if value is not None or not isinstance(value,uno.Any()): - # string_aux = str(value) - - self.field.set(target, string_aux) - except Exception, ex: - traceback.print_exc() -- cgit v1.2.3 From ce0ce6023647e12085445a87b086d3254178401b Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 30 Jun 2011 01:56:32 +0200 Subject: Remember last template and clean ui/event/ --- wizards/com/sun/star/wizards/ui/event/DataAware.py | 39 +++------- .../sun/star/wizards/ui/event/DataAwareField.py | 35 --------- .../sun/star/wizards/ui/event/RadioDataAware.py | 10 +-- .../com/sun/star/wizards/ui/event/UnoDataAware.py | 89 +++------------------- 4 files changed, 20 insertions(+), 153 deletions(-) delete mode 100644 wizards/com/sun/star/wizards/ui/event/DataAwareField.py diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py b/wizards/com/sun/star/wizards/ui/event/DataAware.py index b0360ebe7..c2771d5a4 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.py @@ -28,9 +28,9 @@ class DataAware(object): @param value_ ''' - def __init__(self, dataObject_, value_): + def __init__(self, dataObject_, field_): self._dataObject = dataObject_ - self._value = value_ + self._field = field_ ''' sets the given value to the UI control @@ -55,7 +55,7 @@ class DataAware(object): ''' def updateUI(self): - data = self._value.get(self._dataObject) + data = getattr(self._dataObject, self._field) ui = self.getFromUI() if data is not ui: try: @@ -71,37 +71,16 @@ class DataAware(object): def updateData(self): try: - data = self._value.get(self._dataObject) + data = getattr(self._dataObject, self._field) ui = self.getFromUI() if data is not ui: - self._value.Set(ui, self._dataObject) + if isinstance(ui,tuple): + #Selected Element listbox + ui = ui[0] + setattr(self._dataObject, self._field, ui) except Exception: traceback.print_exc() - ''' - compares the two given objects. - This method is null safe and returns true also if both are null... - If both are arrays, treats them as array of short and compares them. - @param a first object to compare - @param b second object to compare. - @return true if both are null or both are equal. - ''' - - def equals(self, a, b): - if not a and not b : - return True - - if not a or not b: - return False - - if a.getClass().isArray(): - if b.getClass().isArray(): - return Arrays.equals(a, b) - else: - return False - - return a.equals(b) - ''' given a collection containing DataAware objects, calls updateUI() on each memebr of the collection. @@ -124,7 +103,7 @@ class DataAware(object): def setDataObject(self, dataObject, updateUI): if dataObject is not None: - if not (type(self._value) is not + if not (type(self._field) is not type(dataObject)): raise ClassCastException ( "can not cast new DataObject to original Class") diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareField.py b/wizards/com/sun/star/wizards/ui/event/DataAwareField.py deleted file mode 100644 index 8f8b64fed..000000000 --- a/wizards/com/sun/star/wizards/ui/event/DataAwareField.py +++ /dev/null @@ -1,35 +0,0 @@ -import traceback -from DataAware import * -import uno - -class DataAwareField(object): - - def __init__(self, field, convertTo): - self.convertTo = convertTo - self.field = field - - def get(self, target): - try: - i = getattr(target, self.field) - if isinstance(self.convertTo, bool): - if i: - return True - else: - return False - elif isinstance(self.convertTo,int): - return int(i) - elif isinstance(self.convertTo,str): - return str(i) - elif self.convertTo.type == uno.Any("short",0).type: - return uno.Any("[]short",(i,)) - else: - raise AttributeError( - "Cannot convert int value to given type (" + \ - str(type(self.convertTo)) + ").") - - except AttributeError, ex: - traceback.print_exc() - return None - - def Set(self, value, target): - setattr(target, self.field, value) diff --git a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py index 12f6e94f7..457f7580b 100644 --- a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py @@ -1,5 +1,4 @@ from DataAware import * -from DataAwareField import DataAwareField from UnoDataAware import * import time ''' @@ -32,13 +31,8 @@ class RadioDataAware(DataAware): return -1 @classmethod - def attachRadioButtons(self, data, dataProp, buttons, field): - if field: - aux = DataAwareField(dataProp, 0) - else: - aux = DataAware.PropertyValue(dataProp, data) - - da = RadioDataAware(data, aux , buttons) + def attachRadioButtons(self, data, prop, buttons, field): + da = RadioDataAware(data, prop, buttons) method = getattr(da,"updateData") for i in da.radioButtons: i.addItemListener(ItemListenerProcAdapter(method)) diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py index c12a81c33..7c3436caa 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py @@ -1,5 +1,4 @@ from DataAware import * -from DataAwareField import DataAwareField from common.Helper import * ''' @@ -15,79 +14,25 @@ For those controls, static convenience methods are offered, to simplify use. class UnoDataAware(DataAware): - def __init__(self, dataObject, value, unoObject_, unoPropName_): - super(UnoDataAware,self).__init__(dataObject, value) + def __init__(self, dataObject, field, unoObject_, unoPropName_, isShort=False): + super(UnoDataAware,self).__init__(dataObject, field) self.unoControl = unoObject_ self.unoModel = self.unoControl.Model self.unoPropName = unoPropName_ - self.disableObjects = range(0) - self.inverse = False - - def setInverse(self, i): - self.inverse = i - - def enableControls(self, value): - b = getBoolean(value) - if self.inverse: - if b.booleanValue(): - b = False - else: - b = True - - i = 0 - while i < self.disableObjects.length: - setEnabled(self.disableObjects[i], b) - i += 1 + self.isShort = isShort def setToUI(self, value): + if self.isShort: + value = uno.Any("[]short", (value,)) Helper.setUnoPropertyValue(self.unoModel, self.unoPropName, value) - ''' - Try to get from an arbitrary object a boolean value. - Null returns False; - A Boolean object returns itself. - An Array returns true if it not empty. - An Empty String returns False. - everything else returns a True. - @param value - @return - ''' - - def getBoolean(self, value): - if value == None: - return False - - if isinstance(value, bool): - return value - elif value.getClass().isArray(): - if value.length != 0: - return True - else: - return False - elif value.equals(""): - return False - elif isinstance(value, int): - if value == 0: - return True - else: - return False - else: - return True - - def disableControls(self, controls): - self.disableObjects = controls - def getFromUI(self): return Helper.getUnoPropertyValue(self.unoModel, self.unoPropName) @classmethod def __attachTextControl( self, data, prop, unoText, unoProperty, field, value): - if field: - aux = DataAwareField(prop, value) - else: - aux = DataAware.PropertyValue (prop, data) - uda = UnoDataAware(data, aux, unoText, unoProperty) + uda = UnoDataAware(data, prop, unoText, unoProperty) method = getattr(uda,"updateData") unoText.addTextListener(TextListenerProcAdapter(method)) return uda @@ -113,33 +58,17 @@ class UnoDataAware(DataAware): @classmethod def attachCheckBox(self, data, prop, checkBox, field): - if field: - aux = DataAwareField(prop, 0) - else: - aux = DataAware.PropertyValue (prop, data) - uda = UnoDataAware(data, aux , checkBox, PropertyNames.PROPERTY_STATE) + uda = UnoDataAware(data, prop, checkBox, PropertyNames.PROPERTY_STATE) method = getattr(uda,"updateData") checkBox.addItemListener(ItemListenerProcAdapter(method)) return uda def attachLabel(self, data, prop, label, field): - if field: - aux = DataAwareField(prop, "") - else: - aux = DataAware.PropertyValue (prop, data) - return UnoDataAware(data, aux, label, PropertyNames.PROPERTY_LABEL) + return UnoDataAware(data, prop, label, PropertyNames.PROPERTY_LABEL) @classmethod def attachListBox(self, data, prop, listBox, field): - if field: - aux = DataAwareField(prop, uno.Any("short",0)) - else: - aux = DataAware.PropertyValue (prop, data) - uda = UnoDataAware(data, aux, listBox, "SelectedItems") + uda = UnoDataAware(data, prop, listBox, "SelectedItems", True) method = getattr(uda,"updateData") listBox.addItemListener(ItemListenerProcAdapter(method)) return uda - - def setEnabled(self, control, enabled): - Helper.setUnoPropertyValue( - getModel(control), PropertyNames.PROPERTY_ENABLED, enabled) -- cgit v1.2.3 From 4f40b0f6f9a500f2da83f5cf862d531927556304 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 30 Jun 2011 08:52:39 +0100 Subject: center a long build string, and align normally a short one --- cui/source/dialogs/about.cxx | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 8ef7a32eb..94b359d9a 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -78,11 +78,10 @@ GetBuildId() { rtl::OUString sDefault; rtl::OUString sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) ); - //strip trailing - from ./g log - if (!sBuildId.isEmpty() && sBuildId.getStr()[sBuildId.getLength()-1] == '-') + if (!sBuildId.isEmpty() && sBuildId.getLength() > 50) { - sBuildId = sBuildId.copy(0, sBuildId.getLength()-1); rtl::OUStringBuffer aBuffer; + aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n\t")); sal_Int32 nIndex = 0; do { @@ -95,7 +94,7 @@ GetBuildId() if (nIndex % 5) aBuffer.append(static_cast('-')); else - aBuffer.append(static_cast('\n')); + aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n\t")); } } } @@ -171,19 +170,27 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : // determine size and position of the dialog & elements Size aAppLogoSiz = aAppLogo.GetSizePixel(); - if (aAppLogoSiz.Width() < 300) - aAppLogoSiz.Width() = 300; - - Size aOutSiz = GetOutputSizePixel(); - aOutSiz.Width() = aAppLogoSiz.Width(); - // analyze size of the aVersionText widget // character size Size a6Size = aVersionText.LogicToPixel( Size( 6, 6 ), MAP_APPFONT ); // preferred Version widget size long nY = aAppLogoSiz.Height() + ( a6Size.Height() * 2 ); - long nDlgMargin = a6Size.Width() * 3 ; + long nDlgMargin = a6Size.Width() * 2; long nCtrlMargin = a6Size.Height() * 2; + + aVersionText.SetSizePixel(Size(800,600)); + Size aVersionTextSize = aVersionText.CalcMinimumSize(); + aVersionTextSize.Width() += nDlgMargin; + + Size aOutSiz = GetOutputSizePixel(); + aOutSiz.Width() = aAppLogoSiz.Width(); + + if (aOutSiz.Width() < aVersionTextSize.Width()) + aOutSiz.Width() = aVersionTextSize.Width(); + + if (aOutSiz.Width() < 300) + aOutSiz.Width() = 300; + long nTextWidth = aOutSiz.Width() - nDlgMargin; // finally set the aVersionText widget position and size -- cgit v1.2.3 From d827b879432833e7de7aa8767af8238a8a1d9f82 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 30 Jun 2011 10:41:47 +0100 Subject: callcatcher: unused AdjustPosAndSize --- xmlsecurity/source/dialogs/certificateviewer.cxx | 9 --------- 1 file changed, 9 deletions(-) diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index e39540eae..3bc33bcdd 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -53,19 +53,10 @@ namespace css = ::com::sun::star; namespace { - void ShrinkToFit( FixedImage& _rImage ); - void AdjustPosAndSize( Control& _rCtrl, Point& _rStartIn_EndOut, long _nXOffset = 0 ); - void ShrinkToFit( FixedImage& _rImg ) { _rImg.SetSizePixel( _rImg.GetImage().GetSizePixel() ); } - - void AdjustPosAndSize( Control& _rCtrl, Point& _rStartIn_EndOut, long _nOffs ) - { - _rCtrl.SetPosPixel( _rStartIn_EndOut ); - _rStartIn_EndOut.X() += XmlSec::ShrinkToFitWidth( _rCtrl, _nOffs ); - } } CertificateViewer::CertificateViewer( -- cgit v1.2.3 From 76f0d09185da6dc9cccc6983cdced4478588a9e8 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 30 Jun 2011 11:30:44 +0100 Subject: better sizing of copyright-text --- cui/source/dialogs/about.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 94b359d9a..9dc0312ce 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -207,10 +207,9 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : // Multiline edit with Copyright-Text // preferred Version widget size - Size aCTSize = aCopyrightText.GetSizePixel(); - aCTSize.Width() = nTextWidth; - aCopyrightText.SetSizePixel(aCTSize); - aCTSize = aCopyrightText.CalcMinimumSize(); + aCopyrightText.SetSizePixel(Size(nTextWidth,600)); + Size aCTSize = aCopyrightText.CalcMinimumSize(); + aCTSize.Width()= nTextWidth; Point aCTPnt; aCTPnt.X() = ( aOutSiz.Width() - aCTSize.Width() ) / 2; aCTPnt.Y() = nY; -- cgit v1.2.3 From 289f9ed24f1efd398f6ae4f2a82fbd1f5f5005a3 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 30 Jun 2011 14:49:54 +0200 Subject: First attempt to create the letter wizard --- wizards/com/sun/star/wizards/RemoteLetterWizard | 7 + .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 1 - wizards/com/sun/star/wizards/letter/CGLetter.py | 37 + .../com/sun/star/wizards/letter/CGLetterWizard.py | 10 + .../star/wizards/letter/CGPaperElementLocation.py | 10 + .../com/sun/star/wizards/letter/LetterDocument.py | 180 ++++ .../sun/star/wizards/letter/LetterWizardDialog.py | 119 +++ .../star/wizards/letter/LetterWizardDialogConst.py | 60 ++ .../star/wizards/letter/LetterWizardDialogImpl.py | 908 +++++++++++++++++++++ .../wizards/letter/LetterWizardDialogResources.py | 98 +++ wizards/com/sun/star/wizards/letter/LocaleCodes.py | 154 ++++ wizards/com/sun/star/wizards/letter/__init__.py | 0 wizards/com/sun/star/wizards/ui/UnoDialog.py | 12 +- 13 files changed, 1585 insertions(+), 11 deletions(-) create mode 100755 wizards/com/sun/star/wizards/RemoteLetterWizard create mode 100644 wizards/com/sun/star/wizards/letter/CGLetter.py create mode 100644 wizards/com/sun/star/wizards/letter/CGLetterWizard.py create mode 100644 wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py create mode 100644 wizards/com/sun/star/wizards/letter/LetterDocument.py create mode 100644 wizards/com/sun/star/wizards/letter/LetterWizardDialog.py create mode 100644 wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py create mode 100644 wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py create mode 100644 wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py create mode 100644 wizards/com/sun/star/wizards/letter/LocaleCodes.py create mode 100644 wizards/com/sun/star/wizards/letter/__init__.py diff --git a/wizards/com/sun/star/wizards/RemoteLetterWizard b/wizards/com/sun/star/wizards/RemoteLetterWizard new file mode 100755 index 000000000..9928625f6 --- /dev/null +++ b/wizards/com/sun/star/wizards/RemoteLetterWizard @@ -0,0 +1,7 @@ +#!/usr/bin/env python +from letter.LetterWizardDialogImpl import LetterWizardDialogImpl +import sys + +if __name__ == "__main__": + + LetterWizardDialogImpl.main(sys.argv) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 4b48e57e6..72933af51 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -115,7 +115,6 @@ class FaxWizardDialogImpl(FaxWizardDialog): #disable the document, so that the user cannot change anything: self.myFaxDoc.xFrame.ComponentWindow.Enable = False - self.executeDialogFromComponent(self.myFaxDoc.xFrame) self.removeTerminateListener() self.closeDocument() diff --git a/wizards/com/sun/star/wizards/letter/CGLetter.py b/wizards/com/sun/star/wizards/letter/CGLetter.py new file mode 100644 index 000000000..b95502837 --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/CGLetter.py @@ -0,0 +1,37 @@ +from common.ConfigGroup import * +from CGPaperElementLocation import CGPaperElementLocation + +class CGLetter(ConfigGroup): + + def __init__(self): + self.cp_Style = int() + self.cp_BusinessPaper = bool() + self.cp_CompanyLogo = CGPaperElementLocation() + self.cp_CompanyAddress = CGPaperElementLocation() + self.cp_PaperCompanyAddressReceiverField = bool() + self.cp_PaperFooter = bool() + self.cp_PaperFooterHeight = float() + self.cp_Norm = int() + self.cp_PrintCompanyLogo = bool() + self.cp_PrintCompanyAddressReceiverField = bool() + self.cp_PrintLetterSigns = bool() + self.cp_PrintSubjectLine = bool() + self.cp_PrintSalutation = bool() + self.cp_PrintBendMarks = bool() + self.cp_PrintGreeting = bool() + self.cp_PrintFooter = bool() + self.cp_Salutation = str() + self.cp_Greeting = str() + self.cp_SenderAddressType = int() + self.cp_SenderCompanyName = str() + self.cp_SenderStreet = str() + self.cp_SenderPostCode = str() + self.cp_SenderState = str() + self.cp_SenderCity = str() + self.cp_ReceiverAddressType = int() + self.cp_Footer = str() + self.cp_FooterOnlySecondPage = bool() + self.cp_FooterPageNumbers = bool() + self.cp_CreationType = int() + self.cp_TemplateName = str() + self.cp_TemplatePath = str() diff --git a/wizards/com/sun/star/wizards/letter/CGLetterWizard.py b/wizards/com/sun/star/wizards/letter/CGLetterWizard.py new file mode 100644 index 000000000..3df1ee17b --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/CGLetterWizard.py @@ -0,0 +1,10 @@ +from common.ConfigGroup import * +from CGLetter import CGLetter + +class CGLetterWizard (ConfigGroup): + + def __init__(self): + self.cp_LetterType = int() + self.cp_BusinessLetter = CGLetter() + self.cp_PrivateOfficialLetter = CGLetter() + self.cp_PrivateLetter = CGLetter() diff --git a/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py b/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py new file mode 100644 index 000000000..901fbae82 --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py @@ -0,0 +1,10 @@ +from common.ConfigGroup import * + +class CGPaperElementLocation(ConfigGroup): + + def __init__(self): + self.cp_Display = bool() + self.cp_Width = float() + self.cp_Height = float() + self.cp_X = float() + self.cp_Y = float() diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.py b/wizards/com/sun/star/wizards/letter/LetterDocument.py new file mode 100644 index 000000000..2d630ae64 --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/LetterDocument.py @@ -0,0 +1,180 @@ +from text.TextDocument import * +from text.TextSectionHandler import TextSectionHandler +from common.PropertyNames import PropertyNames + +from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK +from com.sun.star.style.ParagraphAdjust import CENTER +from com.sun.star.text.PageNumberType import CURRENT +from com.sun.star.style.NumberingType import ARABIC + +class LetterDocument(TextDocument): + + def __init__(self, xMSF, listener): + super(LetterDocument,self).__init__(xMSF, listener, None, + "WIZARD_LIVE_PREVIEW") + self.keepLogoFrame = True + self.keepBendMarksFrame = True + self.keepLetterSignsFrame = True + self.keepSenderAddressRepeatedFrame = True + self.keepAddressFrame = True + + def switchElement(self, sElement, bState): + try: + mySectionHandler = TextSectionHandler(self.xMSF, self.xTextDocument) + oSection = mySectionHandler.xTextDocument.TextSections.getByName(sElement) + Helper.setUnoPropertyValue(oSection, "IsVisible", bState) + except Exception, exception: + traceback.print_exc() + + def updateDateFields(self): + FH = TextFieldHandler(self.xTextDocument, self.xTextDocument) + FH.updateDateFields() + + def switchFooter(self, sPageStyle, bState, bPageNumber, sText): + if self.xTextDocument is not None: + self.xTextDocument.lockControllers() + try: + xNameAccess = self.xTextDocument.StyleFamilies + xPageStyleCollection = xNameAccess.getByName("PageStyles") + xPageStyle = xPageStyleCollection.getByName(sPageStyle) + if bState: + Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn",True) + xFooterText = Helper.getUnoPropertyValue(xPageStyle, "FooterText") + xFooterText.String = sText + if bPageNumber: + #Adding the Page Number + myCursor = xFooterText.createTextCursor() + myCursor.gotoEnd(False) + xFooterText.insertControlCharacter(myCursor, PARAGRAPH_BREAK, False) + myCursor.setPropertyValue("ParaAdjust", CENTER) + xPageNumberField = self.xTextDocument.createInstance("com.sun.star.text.TextField.PageNumber") + xPageNumberField.setPropertyValue("SubType", CURRENT) + xPageNumberField.setPropertyValue("NumberingType", ARABIC) + xFooterText.insertTextContent(xFooterText.getEnd(), xPageNumberField, False) + else: + Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", False) + + self.xTextDocument.unlockControllers() + except Exception, exception: + traceback.print_exc() + + def hasElement(self, sElement): + if self.xTextDocument is not None: + SH = TextSectionHandler(self.xMSF, self.xTextDocument) + return SH.hasTextSectionByName(sElement) + else: + return False + + def switchUserField(self, sFieldName, sNewContent, bState): + myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) + if bState: + myFieldHandler.changeUserFieldContent(sFieldName, sNewContent) + else: + myFieldHandler.changeUserFieldContent(sFieldName, "") + + def fillSenderWithUserData(self): + try: + myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) + oUserDataAccess = Configuration.getConfigurationRoot(self.xMSF, "org.openoffice.UserProfile/Data", False) + myFieldHandler.changeUserFieldContent("Company", Helper.getUnoObjectbyName(oUserDataAccess, "o")) + myFieldHandler.changeUserFieldContent("Street", Helper.getUnoObjectbyName(oUserDataAccess, "street")) + myFieldHandler.changeUserFieldContent("PostCode", Helper.getUnoObjectbyName(oUserDataAccess, "postalcode")) + myFieldHandler.changeUserFieldContent("City", Helper.getUnoObjectbyName(oUserDataAccess, "l")) + myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, Helper.getUnoObjectbyName(oUserDataAccess, "st")) + except Exception, exception: + traceback.print_exc() + + def killEmptyUserFields(self): + myFieldHandler = TextFieldHandle(self.xMSF, self.xTextDocument) + myFieldHandler.removeUserFieldByContent("") + + def killEmptyFrames(self): + try: + if not self.keepLogoFrame: + xTF = TextFrameHandler.getFrameByName("Company Logo", self.xTextDocument) + if xTF is not None: + xTF.dispose() + + if not self.keepBendMarksFrame: + xTF = TextFrameHandler.getFrameByName("Bend Marks", self.xTextDocument) + if xTF is not None: + xTF.dispose() + + if not self.keepLetterSignsFrame: + xTF = TextFrameHandler.getFrameByName("Letter Signs", self.xTextDocument) + if xTF is not None: + xTF.dispose() + + if not self.keepSenderAddressRepeatedFrame: + xTF = TextFrameHandler.getFrameByName("Sender Address Repeated", self.xTextDocument) + if xTF is not None: + xTF.dispose() + + if not self.keepAddressFrame: + xTF = TextFrameHandler.getFrameByName("Sender Address", self.xTextDocument) + if xTF is not None: + xTF.dispose() + + except Exception, e: + traceback.print_exc() + +class BusinessPaperObject(object): + + def __init__(self, FrameText, Width, Height, XPos, YPos): + self.iWidth = Width + self.iHeight = Height + self.iXPos = XPos + self.iYPos = YPos + + try: + xFrame = self.xTextDocument.createInstance("com.sun.star.text.TextFrame") + self.setFramePosition() + Helper.setUnoPropertyValue(xFrame, "AnchorType", TextContentAnchorType.AT_PAGE) + Helper.setUnoPropertyValue(xFrame, "SizeType", SizeType.FIX) + + Helper.setUnoPropertyValue(xFrame, "TextWrap", WrapTextMode.THROUGHT) + Helper.setUnoPropertyValue(xFrame, "Opaque", Boolean.TRUE) + Helper.setUnoPropertyValue(xFrame, "BackColor", 15790320) + + myBorder = BorderLine() + myBorder.OuterLineWidth = 0 + Helper.setUnoPropertyValue(xFrame, "LeftBorder", myBorder) + Helper.setUnoPropertyValue(xFrame, "RightBorder", myBorder) + Helper.setUnoPropertyValue(xFrame, "TopBorder", myBorder) + Helper.setUnoPropertyValue(xFrame, "BottomBorder", myBorder) + Helper.setUnoPropertyValue(xFrame, "Print", False) + + xTextCursor = self.xTextDocument.Text.createTextCursor() + xTextCursor.gotoEnd(True) + xText = self.xTextDocument.Text + xText.insertTextContent(xTextCursor, xFrame, False) + + xFrameText = xFrame.Text + xFrameCursor = xFrameText.createTextCursor() + xFrameCursor.setPropertyValue("CharWeight", com.sun.star.awt.FontWeight.BOLD) + xFrameCursor.setPropertyValue("CharColor", 16777215) + xFrameCursor.setPropertyValue("CharFontName", "Albany") + xFrameCursor.setPropertyValue("CharHeight", 18) + + xFrameText.insertString(xFrameCursor, FrameText, False) + + except Exception: + traceback.print_exc() + + def setFramePosition(self): + Helper.setUnoPropertyValue(xFrame, "HoriOrient", HoriOrientation.NONE) + Helper.setUnoPropertyValue(xFrame, "VertOrient", VertOrientation.NONE) + Helper.setUnoPropertyValue(xFrame, PropertyNames.PROPERTY_HEIGHT, iHeight) + Helper.setUnoPropertyValue(xFrame, PropertyNames.PROPERTY_WIDTH, iWidth) + Helper.setUnoPropertyValue(xFrame, "HoriOrientPosition", iXPos) + Helper.setUnoPropertyValue(xFrame, "VertOrientPosition", iYPos) + Helper.setUnoPropertyValue(xFrame, "HoriOrientRelation", RelOrientation.PAGE_FRAME) + Helper.setUnoPropertyValue(xFrame, "VertOrientRelation", RelOrientation.PAGE_FRAME) + + def removeFrame(self): + if xFrame is not None: + try: + self.xTextDocument.Text.removeTextContent(xFrame) + except Exception: + traceback.print_exc() + diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py new file mode 100644 index 000000000..f2fa2f593 --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py @@ -0,0 +1,119 @@ +from ui.WizardDialog import * +from LetterWizardDialogConst import * +from LetterWizardDialogResources import LetterWizardDialogResources + +from com.sun.star.awt.FontUnderline import SINGLE + +class LetterWizardDialog(WizardDialog): + + def __init__(self, xmsf): + super(LetterWizardDialog, self).__init__(xmsf, HIDMAIN ) + + self.resources = LetterWizardDialogResources(xmsf) + Helper.setUnoPropertyValues(self.xDialogModel, ("Closeable", PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH), (True, 210, True, "LetterWizardDialog", 104, 52, 1, 1, self.resources.resLetterWizardDialog_title, 310)) + self.fontDescriptor1 = \ + uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor2 = \ + uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor5 = \ + uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor6 = \ + uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor1.Weight = 150 + self.fontDescriptor1.Underline = SINGLE + self.fontDescriptor2.Weight = 100 + self.fontDescriptor5.Weight = 100 + self.fontDescriptor6.Weight = 150 + + def buildStep1(self): + self.optBusinessLetter = self.insertRadioButton("optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 1), self.resources.resoptBusinessLetter_value, "optBusinessLetter", 97, 28, 1, 1, 184), self) + self.optPrivOfficialLetter = self.insertRadioButton("optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 2), self.resources.resoptPrivOfficialLetter_value, "optPrivOfficialLetter", 97, 74, 1, 2, 184), self) + self.optPrivateLetter = self.insertRadioButton("optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 3), self.resources.resoptPrivateLetter_value, "optPrivateLetter", 97, 106, 1, 3, 184), self) + self.lstBusinessStyle = self.insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 4), "lstBusinessStyle", 180, 40, 1, 4, 74), self) + self.chkBusinessPaper = self.insertCheckBox("chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 5), self.resources.reschkBusinessPaper_value, "chkBusinessPaper", 110, 56, 0, 1, 5, 168), self) + self.lstPrivOfficialStyle = self.insertListBox("lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, LSTPRIVOFFICIALSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 6), "lstPrivOfficialStyle", 180, 86, 1, 6, 74), self) + self.lstPrivateStyle = self.insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 7), "lstPrivateStyle", 180, 118, 1, 7, 74), self) + self.lblBusinessStyle = self.insertLabel("lblBusinessStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblBusinessStyle_value, "lblBusinessStyle", 110, 42, 1, 48, 60)) + self.lblPrivOfficialStyle = self.insertLabel("lblPrivOfficialStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPrivOfficialStyle_value, "lblPrivOfficialStyle", 110, 88, 1, 49, 60)) + self.lblTitle1 = self.insertLabel("lblTitle1", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle1_value, True, "lblTitle1", 91, 8, 1, 55, 212)) + self.lblPrivateStyle = self.insertLabel("lblPrivateStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPrivateStyle_value, "lblPrivateStyle", 110, 120, 1, 74, 60)) + self.lblIntroduction = self.insertLabel("lblIntroduction", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (39, self.resources.reslblIntroduction_value, True, "lblIntroduction", 104, 145, 1, 80, 199)) + self.ImageControl3 = self.insertInfoImage(92, 145, 1) + + def buildStep2(self): + self.chkPaperCompanyLogo = self.insertCheckBox("chkPaperCompanyLogo", CHKPAPERCOMPANYLOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 8), self.resources.reschkPaperCompanyLogo_value, "chkPaperCompanyLogo", 97, 28, 0, 2, 8, 68), self) + self.numLogoHeight = self.insertNumericField("numLogoHeight", NUMLOGOHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, "StrictFormat", PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 9), "numLogoHeight", 138, 40, True, 2, True, 9, 3, 30), self) + self.numLogoX = self.insertNumericField("numLogoX", NUMLOGOX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 10), "numLogoX", 266, 40, True, 2, 10, 0, 30), self) + self.numLogoWidth = self.insertNumericField("numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 11), "numLogoWidth", 138, 56, True, 2, 11, 3.8, 30), self) + self.numLogoY = self.insertNumericField("numLogoY", NUMLOGOY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 12), "numLogoY", 266, 56, True, 2, 12, -3.4, 30), self) + self.chkPaperCompanyAddress = self.insertCheckBox("chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 13), self.resources.reschkPaperCompanyAddress_value, "chkPaperCompanyAddress", 98, 84, 0, 2, 13, 68), self) + self.numAddressHeight = self.insertNumericField("numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, "StrictFormat", PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 14), "numAddressHeight", 138, 96, True, 2, True, 14, 3, 30), self) + self.numAddressX = self.insertNumericField("numAddressX", NUMADDRESSX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 15), "numAddressX", 266, 96, True, 2, 15, 3.8, 30), self) + self.numAddressWidth = self.insertNumericField("numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 16), "numAddressWidth", 138, 112, True, 2, 16, 13.8, 30), self) + self.numAddressY = self.insertNumericField("numAddressY", NUMADDRESSY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 17), "numAddressY", 266, 112, True, 2, 17, -3.4, 30), self) + self.chkCompanyReceiver = self.insertCheckBox("chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 18), self.resources.reschkCompanyReceiver_value, "chkCompanyReceiver", 103, 131, 0, 2, 18, 185), self) + self.chkPaperFooter = self.insertCheckBox("chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 19), self.resources.reschkPaperFooter_value, "chkPaperFooter", 97, 158, 0, 2, 19, 68), self) + self.numFooterHeight = self.insertNumericField("numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 20), "numFooterHeight", 236, 156, True, 2, 20, 5, 30), self) + self.lblLogoHeight = self.insertLabel("lblLogoHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoHeight_value, "lblLogoHeight", 103, 42, 2, 68, 32)) + self.lblLogoWidth = self.insertLabel("lblLogoWidth", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoWidth_value, "lblLogoWidth", 103, 58, 2, 69, 32)) + self.FixedLine5 = self.insertFixedLine("FixedLine5", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (2, "FixedLine5", 90, 78, 2, 70, 215)) + self.FixedLine6 = self.insertFixedLine("FixedLine6", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (2, "FixedLine6", 90, 150, 2, 71, 215)) + self.lblFooterHeight = self.insertLabel("lblFooterHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblFooterHeight_value, "lblFooterHeight", 200, 158, 2, 72, 32)) + self.lblLogoX = self.insertLabel("lblLogoX", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoX_value, "lblLogoX", 170, 42, 2, 84, 94)) + self.lblLogoY = self.insertLabel("lblLogoY", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoY_value, "lblLogoY", 170, 58, 2, 85, 94)) + self.lblAddressHeight = self.insertLabel("lblAddressHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressHeight_value, "lblAddressHeight", 103, 98, 2, 86, 32)) + self.lblAddressWidth = self.insertLabel("lblAddressWidth", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressWidth_value, "lblAddressWidth", 103, 114, 2, 87, 32)) + self.lblAddressX = self.insertLabel("lblAddressX", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressX_value, "lblAddressX", 170, 98, 2, 88, 94)) + self.lblAddressY = self.insertLabel("lblAddressY", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressY_value, "lblAddressY", 170, 114, 2, 89, 94)) + self.lblTitle2 = self.insertLabel("lblTitle2", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle2_value, True, "lblTitle2", 91, 8, 2, 91, 212)) + + def buildStep3(self): + self.lstLetterNorm = self.insertListBox("lstLetterNorm", LSTLETTERNORM_ACTION_PERFORMED, LSTLETTERNORM_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 21), "lstLetterNorm", 210, 34, 3, 21, 74), self) + self.chkUseLogo = self.insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 22), self.resources.reschkUseLogo_value, "chkUseLogo", 97, 54, 0, 3, 22, 212), self) + self.chkUseAddressReceiver = self.insertCheckBox("chkUseAddressReceiver", CHKUSEADDRESSRECEIVER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 23), self.resources.reschkUseAddressReceiver_value, "chkUseAddressReceiver", 97, 69, 0, 3, 23, 212), self) + self.chkUseSigns = self.insertCheckBox("chkUseSigns", CHKUSESIGNS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 24), self.resources.reschkUseSigns_value, "chkUseSigns", 97, 82, 0, 3, 24, 212), self) + self.chkUseSubject = self.insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 25), self.resources.reschkUseSubject_value, "chkUseSubject", 97, 98, 0, 3, 25, 212), self) + self.chkUseSalutation = self.insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 26), self.resources.reschkUseSalutation_value, "chkUseSalutation", 97, 113, 0, 3, 26, 66), self) + self.lstSalutation = self.insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 27), "lstSalutation", 210, 110, 3, 27, 74), self) + self.chkUseBendMarks = self.insertCheckBox("chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 28), self.resources.reschkUseBendMarks_value, "chkUseBendMarks", 97, 127, 0, 3, 28, 212), self) + self.chkUseGreeting = self.insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 29), self.resources.reschkUseGreeting_value, "chkUseGreeting", 97, 142, 0, 3, 29, 66), self) + self.lstGreeting = self.insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 30), "lstGreeting", 210, 141, 3, 30, 74), self) + self.chkUseFooter = self.insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 31), self.resources.reschkUseFooter_value, "chkUseFooter", 97, 158, 0, 3, 31, 212), self) + self.lblLetterNorm = self.insertLabel("lblLetterNorm", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (16, self.resources.reslblLetterNorm_value, True, "lblLetterNorm", 97, 28, 3, 50, 109)) + self.lblTitle3 = self.insertLabel("lblTitle3", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle3_value, True, "lblTitle3", 91, 8, 3, 90, 212)) + + def buildStep4(self): + self.optSenderPlaceholder = self.insertRadioButton("optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 32), self.resources.resoptSenderPlaceholder_value, "optSenderPlaceholder", 104, 42, 4, 32, 149), self) + self.optSenderDefine = self.insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 33), self.resources.resoptSenderDefine_value, "optSenderDefine", 104, 54, 4, 33, 149), self) + self.txtSenderName = self.insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 34), "txtSenderName", 182, 67, 4, 34, 119), self) + self.txtSenderStreet = self.insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 35), "txtSenderStreet", 182, 81, 4, 35, 119), self) + self.txtSenderPostCode = self.insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 36), "txtSenderPostCode", 182, 95, 4, 36, 25), self) + self.txtSenderState = self.insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 37), "txtSenderState", 211, 95, 4, 37, 21), self) + self.txtSenderCity = self.insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 38), "txtSenderCity", 236, 95, 4, 38, 65), self) + self.optReceiverPlaceholder = self.insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 39), self.resources.resoptReceiverPlaceholder_value, "optReceiverPlaceholder", 104, 145, 4, 39, 200), self) + self.optReceiverDatabase = self.insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 40), self.resources.resoptReceiverDatabase_value, "optReceiverDatabase", 104, 157, 4, 40, 200), self) + self.lblSenderAddress = self.insertLabel("lblSenderAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderAddress_value, "lblSenderAddress", 97, 28, 4, 64, 136)) + self.FixedLine2 = self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (5, "FixedLine2", 90, 126, 4, 75, 212)) + self.lblReceiverAddress = self.insertLabel("lblReceiverAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblReceiverAddress_value, "lblReceiverAddress", 97, 134, 4, 76, 136)) + self.lblSenderName = self.insertLabel("lblSenderName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderName_value, "lblSenderName", 113, 69, 4, 77, 68)) + self.lblSenderStreet = self.insertLabel("lblSenderStreet", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderStreet_value, "lblSenderStreet", 113, 82, 4, 78, 68)) + self.lblPostCodeCity = self.insertLabel("lblPostCodeCity", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPostCodeCity_value, "lblPostCodeCity", 113, 97, 4, 79, 68)) + self.lblTitle4 = self.insertLabel("lblTitle4", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle4_value, True, "lblTitle4", 91, 8, 4, 92, 212)) + + def buildStep5(self): + self.txtFooter = self.insertTextField("txtFooter", TXTFOOTER_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (47, HelpIds.getHelpIdString(HID + 41), True, "txtFooter", 97, 40, 5, 41, 203), self) + self.chkFooterNextPages = self.insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 42), self.resources.reschkFooterNextPages_value, "chkFooterNextPages", 97, 92, 0, 5, 42, 202), self) + self.chkFooterPageNumbers = self.insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 43), self.resources.reschkFooterPageNumbers_value, "chkFooterPageNumbers", 97, 106, 0, 5, 43, 201), self) + self.lblFooter = self.insertLabel("lblFooter", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 8, self.resources.reslblFooter_value, "lblFooter", 97, 28, 5, 52, 116)) + self.lblTitle5 = self.insertLabel("lblTitle5", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle5_value, True, "lblTitle5", 91, 8, 5, 93, 212)) + + def buildStep6(self): + self.txtTemplateName = self.insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 44), "txtTemplateName", 202, 56, 6, 44, self.resources.restxtTemplateName_value, 100), self) + self.optCreateLetter = self.insertRadioButton("optCreateLetter", OPTCREATELETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 45), self.resources.resoptCreateLetter_value, "optCreateLetter", 104, 111, 6, 50, 198), self) + self.optMakeChanges = self.insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 46), self.resources.resoptMakeChanges_value, "optMakeChanges", 104, 123, 6, 51, 198), self) + self.lblFinalExplanation1 = self.insertLabel("lblFinalExplanation1", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (26, self.resources.reslblFinalExplanation1_value, True, "lblFinalExplanation1", 97, 28, 6, 52, 205)) + self.lblProceed = self.insertLabel("lblProceed", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblProceed_value, "lblProceed", 97, 100, 6, 53, 204)) + self.lblFinalExplanation2 = self.insertLabel("lblFinalExplanation2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (33, self.resources.reslblFinalExplanation2_value, True, "lblFinalExplanation2", 104, 145, 6, 54, 199)) + self.ImageControl2 = self.insertImage("ImageControl2", ("Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (0, 10, "private:resource/dbu/image/19205", "ImageControl2", 92, 145, False, 6, 66, 10)) + self.lblTemplateName = self.insertLabel("lblTemplateName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblTemplateName_value, "lblTemplateName", 97, 58, 6, 82, 101)) + self.lblTitle6 = self.insertLabel("lblTitle6", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle6_value, True, "lblTitle6", 91, 8, 6, 94, 212)) diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py new file mode 100644 index 000000000..5efa78eea --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py @@ -0,0 +1,60 @@ +OPTBUSINESSLETTER_ITEM_CHANGED = "optBusinessLetterItemChanged" +OPTPRIVOFFICIALLETTER_ITEM_CHANGED = "optPrivOfficialLetterItemChanged" +OPTPRIVATELETTER_ITEM_CHANGED = "optPrivateLetterItemChanged" +LSTBUSINESSSTYLE_ACTION_PERFORMED = None +LSTBUSINESSSTYLE_ITEM_CHANGED = "lstBusinessStyleItemChanged" +LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED = None +LSTPRIVOFFICIALSTYLE_ITEM_CHANGED = "lstPrivOfficialStyleItemChanged" +CHKBUSINESSPAPER_ITEM_CHANGED = "chkBusinessPaperItemChanged" +LSTPRIVATESTYLE_ACTION_PERFORMED = None +LSTPRIVATESTYLE_ITEM_CHANGED = "lstPrivateStyleItemChanged" +CHKPAPERCOMPANYLOGO_ITEM_CHANGED = "chkPaperCompanyLogoItemChanged" +NUMLOGOHEIGHT_TEXT_CHANGED = "numLogoHeightTextChanged" +NUMLOGOX_TEXT_CHANGED = "numLogoXTextChanged" +NUMLOGOWIDTH_TEXT_CHANGED = "numLogoWidthTextChanged" +NUMLOGOY_TEXT_CHANGED = "numLogoYTextChanged" +CHKCOMPANYRECEIVER_ITEM_CHANGED = "chkCompanyReceiverItemChanged" +CHKPAPERFOOTER_ITEM_CHANGED = "chkPaperFooterItemChanged" +NUMFOOTERHEIGHT_TEXT_CHANGED = "numFooterHeightTextChanged" +CHKPAPERCOMPANYADDRESS_ITEM_CHANGED = "chkPaperCompanyAddressItemChanged" +NUMADDRESSHEIGHT_TEXT_CHANGED = "numAddressHeightTextChanged" +NUMADDRESSX_TEXT_CHANGED = "numAddressXTextChanged" +NUMADDRESSWIDTH_TEXT_CHANGED = "numAddressWidthTextChanged" +NUMADDRESSY_TEXT_CHANGED = "numAddressYTextChanged" +LSTLETTERNORM_ACTION_PERFORMED = None +LSTLETTERNORM_ITEM_CHANGED = "lstLetterNormItemChanged" +CHKUSELOGO_ITEM_CHANGED = "chkUseLogoItemChanged" +CHKUSEADDRESSRECEIVER_ITEM_CHANGED = "chkUseAddressReceiverItemChanged" +CHKUSESIGNS_ITEM_CHANGED = "chkUseSignsItemChanged" +CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged" +CHKUSEBENDMARKS_ITEM_CHANGED = "chkUseBendMarksItemChanged" +CHKUSEFOOTER_ITEM_CHANGED = "chkUseFooterItemChanged" +CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged" +CHKUSEGREETING_ITEM_CHANGED = "chkUseGreetingItemChanged" +LSTSALUTATION_ACTION_PERFORMED = None +LSTSALUTATION_ITEM_CHANGED = "lstSalutationItemChanged" +LSTSALUTATION_TEXT_CHANGED = "lstSalutationItemChanged" +LSTGREETING_ACTION_PERFORMED = None +LSTGREETING_ITEM_CHANGED = "lstGreetingItemChanged" +LSTGREETING_TEXT_CHANGED = "lstGreetingItemChanged" +OPTSENDERPLACEHOLDER_ITEM_CHANGED = "optSenderPlaceholderItemChanged" +OPTSENDERDEFINE_ITEM_CHANGED = "optSenderDefineItemChanged" +OPTRECEIVERPLACEHOLDER_ITEM_CHANGED = "optReceiverPlaceholderItemChanged" +OPTRECEIVERDATABASE_ITEM_CHANGED = "optReceiverDatabaseItemChanged" +TXTSENDERNAME_TEXT_CHANGED = "txtSenderNameTextChanged" +TXTSENDERSTREET_TEXT_CHANGED = "txtSenderStreetTextChanged" +TXTSENDERCITY_TEXT_CHANGED = "txtSenderCityTextChanged" +TXTSENDERPOSTCODE_TEXT_CHANGED = "txtSenderPostCodeTextChanged" +TXTSENDERSTATE_TEXT_CHANGED = "txtSenderStateTextChanged" +TXTFOOTER_TEXT_CHANGED = "txtFooterTextChanged" +CHKFOOTERNEXTPAGES_ITEM_CHANGED = "chkFooterNextPagesItemChanged" +CHKFOOTERPAGENUMBERS_ITEM_CHANGED = "chkFooterPageNumbersItemChanged" +TXTTEMPLATENAME_TEXT_CHANGED = "txtTemplateNameTextChanged" +OPTCREATELETTER_ITEM_CHANGED = "optCreateLetterItemChanged" +OPTMAKECHANGES_ITEM_CHANGED = "optMakeChangesItemChanged" +FILETEMPLATEPATH_TEXT_CHANGED = None +imageURLImageControl1 = None +imageURLImageControl2 = None +imageURLImageControl3 = None +HID = 40768 +HIDMAIN = 40820 diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py new file mode 100644 index 000000000..cbd3b1208 --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py @@ -0,0 +1,908 @@ +import traceback +from LetterWizardDialog import * +from LetterDocument import LetterDocument +from common.NoValidPathException import * +from common.FileAccess import * +from LocaleCodes import LocaleCodes +from ui.PathSelection import * +from common.Configuration import * +from CGLetterWizard import CGLetterWizard +from ui.event.UnoDataAware import * +from ui.event.RadioDataAware import * +from document.OfficeDocument import OfficeDocument + +class LetterWizardDialogImpl(LetterWizardDialog): + RM_TYPESTYLE = 1 + RM_BUSINESSPAPER = 2 + RM_ELEMENTS = 3 + RM_SENDERRECEIVER = 4 + RM_FOOTER = 5 + RM_FINALSETTINGS = 6 + + def enterStep(self, OldStep, NewStep): + pass + + def leaveStep(self, OldStep, NewStep): + pass + + def __init__(self, xmsf): + super(LetterWizardDialogImpl, self).__init__(xmsf) + self.xmsf = xmsf + self.mainDA = [] + self.letterDA = [] + self.businessDA = [] + self.bSaveSuccess = False + self.filenameChanged = False + self.BusCompanyLogo = None + self.BusCompanyAddress = None + self.BusCompanyAddressReceiver = None + self.BusFooter = None + self.Norms = [] + self.NormPaths = [] + + @classmethod + def main(self, args): + ConnectStr = \ + "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" + xLocMSF = None + try: + xLocMSF = Desktop.connect(ConnectStr) + except Exception, e: + traceback.print_exc() + + lw = LetterWizardDialogImpl(xLocMSF) + lw.startWizard(xLocMSF, None) + + def startWizard(self, xMSF, CurPropertyValue): + LetterWizardDialogImpl.running = True + try: + #Number of steps on WizardDialog + self.nMaxStep = 6 + + #instatiate The Document Frame for the Preview + self.myLetterDoc = LetterDocument(xMSF, self) + + #create the dialog + self.drawNaviBar() + self.buildStep1() + self.buildStep2() + self.buildStep3() + self.buildStep4() + self.buildStep5() + self.buildStep6() + + self.__initializePaths() + self.initializeNorms() + self.initializeSalutation() + self.initializeGreeting() + + #special Control fFrameor setting the save Path: + self.insertPathSelectionControl() + + #load the last used settings + #from the registry and apply listeners to the controls: + self.initConfiguration() + + oL = self.getOfficeLinguistic() + self.myConfig.cp_BusinessLetter.cp_Norm = oL + self.myConfig.cp_PrivateOfficialLetter.cp_Norm = oL + self.myConfig.cp_PrivateLetter.cp_Norm = oL + self.initializeTemplates(xMSF) + if self.myConfig.cp_BusinessLetter.cp_Greeting == "": + self.myConfig.cp_BusinessLetter.cp_Greeting = self.resources.GreetingLabels[0] + + if self.myConfig.cp_BusinessLetter.cp_Salutation == "": + self.myConfig.cp_BusinessLetter.cp_Salutation = self.resources.SalutationLabels[0] + + if self.myConfig.cp_PrivateOfficialLetter.cp_Greeting == "": + self.myConfig.cp_PrivateOfficialLetter.cp_Greeting = self.resources.GreetingLabels[1] + + if self.myConfig.cp_PrivateOfficialLetter.cp_Salutation == "": + self.myConfig.cp_PrivateOfficialLetter.cp_Salutation = self.resources.SalutationLabels[1] + + if self.myConfig.cp_PrivateLetter.cp_Greeting == "": + self.myConfig.cp_PrivateLetter.cp_Greeting = self.resources.GreetingLabels[2] + + if self.myConfig.cp_PrivateLetter.cp_Salutation == "": + self.myConfig.cp_PrivateLetter.cp_Salutation = self.resources.SalutationLabels[2] + + self.updateUI() + if self.myPathSelection.xSaveTextBox.Text.lower() == "": + self.myPathSelection.initializePath() + + xContainerWindow = self.myLetterDoc.xFrame.ContainerWindow + self.createWindowPeer(xContainerWindow) + self.insertRoadmap() + self.setConfiguration() + self.setDefaultForGreetingAndSalutation() + self.initializeElements() + self.myLetterDoc.xFrame.ComponentWindow.Enable = False + self.executeDialogFromComponent(self.myLetterDoc.xFrame) + self.removeTerminateListener() + self.closeDocument() + LetterWizardDialogImpl.running = False + except Exception, exception: + self.removeTerminateListener() + traceback.print_exc() + LetterWizardDialogImpl.running = False + return + + def cancelWizard(self): + xDialog.endExecute() + LetterWizardDialogImpl.running = False + + def finishWizard(self): + switchToStep(getCurrentStep(), getMaxStep()) + try: + fileAccess = FileAccess.FileAccess_unknown(xMSF) + self.sPath = self.myPathSelection.getSelectedPath() + if self.sPath.equals(""): + self.myPathSelection.triggerPathPicker() + self.sPath = self.myPathSelection.getSelectedPath() + + self.sPath = fileAccess.getURL(self.sPath) + if not self.filenameChanged: + if fileAccess.exists(self.sPath, True): + answer = SystemDialog.showMessageBox(xMSF, xControl.getPeer(), "MessBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, self.resources.resOverwriteWarning) + if answer == 3: + return False; + + self.myLetterDoc.setWizardTemplateDocInfo(self.resources.resLetterWizardDialog_title, self.resources.resTemplateDescription) + self.myLetterDoc.killEmptyUserFields() + self.myLetterDoc.keepLogoFrame = (chkUseLogo.State != 0) + if (chkBusinessPaper.State != 0) and (chkPaperCompanyLogo.State != 0): + self.myLetterDoc.keepLogoFrame = False + + self.myLetterDoc.keepBendMarksFrame = (chkUseBendMarks.State != 0) + self.myLetterDoc.keepLetterSignsFrame = (chkUseSigns.State != 0) + self.myLetterDoc.keepSenderAddressRepeatedFrame = (chkUseAddressReceiver.State != 0) + if optBusinessLetter.State: + if (chkBusinessPaper.State != 0) and (self.chkCompanyReceiver.State != 0): + self.myLetterDoc.keepSenderAddressRepeatedFrame = False + + if (chkBusinessPaper.State != 0) and (chkPaperCompanyAddress.State != 0): + self.myLetterDoc.keepAddressFrame = False + + self.myLetterDoc.killEmptyFrames() + self.bSaveSuccess = OfficeDocument.store(xMSF, self.xTextDocument, self.sPath, "writer8_template", False) + if self.bSaveSuccess: + saveConfiguration() + xIH = xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler") + loadValues = range(4) + loadValues[0] = PropertyValue.PropertyValue() + loadValues[0].Name = "AsTemplate" + loadValues[1] = PropertyValue.PropertyValue() + loadValues[1].Name = "MacroExecutionMode" + loadValues[1].Value = Short.Short_unknown(MacroExecMode.ALWAYS_EXECUTE) + loadValues[2] = PropertyValue.PropertyValue() + loadValues[2].Name = "UpdateDocMode" + loadValues[2].Value = Short.Short_unknown(com.sun.star.document.UpdateDocMode.FULL_UPDATE) + loadValues[3] = PropertyValue.PropertyValue() + loadValues[3].Name = "InteractionHandler" + loadValues[3].Value = xIH + if self.bEditTemplate: + loadValues[0].Value = False + else: + loadValues[0].Value = True + + oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), self.sPath, "_default", loadValues) + myViewHandler = ViewHandler(xDocMSF, oDoc) + myViewHandler.setViewSetting("ZoomType", com.sun.star.view.DocumentZoomType.OPTIMAL) + else: + pass + + except Exception, e: + traceback.print_exc() + finally: + xDialog.endExecute() + LetterWizardDialogImpl.running = False + + return True; + + def closeDocument(self): + try: + xCloseable = self.myLetterDoc.xFrame + xCloseable.close(False) + except CloseVetoException, e: + traceback.print_exc() + + def optBusinessLetterItemChanged(self): + DataAware.setDataObjects(self.letterDA, self.myConfig.cp_BusinessLetter, True) + self.setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + self.lstBusinessStyleItemChanged() + self.enableSenderReceiver() + self.setPossibleFooter(True) + if self.myPathSelection.xSaveTextBox.Text.lower() == "": + self.myPathSelection.initializePath() + + def optPrivOfficialLetterItemChanged(self): + DataAware.setDataObjects(self.letterDA, self.myConfig.cp_PrivateOfficialLetter, True) + self.setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + self.lstPrivOfficialStyleItemChanged() + self.disableBusinessPaper() + self.enableSenderReceiver() + self.setPossibleFooter(True) + if self.myPathSelection.xSaveTextBox.Text.lower() == "": + self.myPathSelection.initializePath() + + def optPrivateLetterItemChanged(self): + DataAware.setDataObjects(self.letterDA, self.myConfig.cp_PrivateLetter, True) + self.setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) + lstPrivateStyleItemChanged() + disableBusinessPaper() + disableSenderReceiver() + setPossibleFooter(False) + if self.myPathSelection.xSaveTextBox.Text.equalsIgnoreCase(""): + self.myPathSelection.initializePath() + + def optSenderPlaceholderItemChanged(self): + self.setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, False) + self.myLetterDoc.fillSenderWithUserData() + + def optSenderDefineItemChanged(self): + self.setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, True) + txtSenderNameTextChanged() + txtSenderStreetTextChanged() + txtSenderPostCodeTextChanged() + txtSenderStateTextChanged() + txtSenderCityTextChanged() + + def optCreateLetterItemChanged(self): + self.bEditTemplate = False + + def optMakeChangesItemChanged(self): + self.bEditTemplate = True + + def optReceiverPlaceholderItemChanged(self): + OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Placeholder()") + + def optReceiverDatabaseItemChanged(self): + OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Database()") + + def lstBusinessStyleItemChanged(self): + self.xTextDocument = self.myLetterDoc.loadAsPreview(self.BusinessFiles[1][self.lstBusinessStyle.SelectedItemPos], False) + self.myLetterDoc.xTextDocument.lockControllers() + self.initializeElements() + self.chkBusinessPaperItemChanged() + self.setElements(False) + self.myLetterDoc.xTextDocument.unlockControllers() + self.activate() + + def lstPrivOfficialStyleItemChanged(self): + self.xTextDocument = self.myLetterDoc.loadAsPreview(self.OfficialFiles[1][self.lstPrivOfficialStyle.SelectedItemPos], False) + self.myLetterDoc.xTextDocument.lockControllers() + self.initializeElements() + self.setPossibleSenderData(True) + self.setElements(False) + self.myLetterDoc.xTextDocument.unlockControllers() + self.activate() + + def lstPrivateStyleItemChanged(self): + self.xTextDocument = self.myLetterDoc.loadAsPreview(self.PrivateFiles[1][self.lstPrivateStyle.getSelectedItemPos()], False) + self.myLetterDoc.xTextDocument.lockControllers() + self.initializeElements() + self.setElements(True) + self.myLetterDoc.xTextDocument.unlockControllers() + self.activate() + + def numLogoHeightTextChanged(self): + self.BusCompanyLogo.iHeight = (int)(numLogoHeight.getValue() * 1000) + self.BusCompanyLogo.setFramePosition() + + def numLogoWidthTextChanged(self): + self.BusCompanyLogo.iWidth = (int)(numLogoWidth.getValue() * 1000) + self.BusCompanyLogo.setFramePosition() + + def numLogoXTextChanged(self): + self.BusCompanyLogo.iXPos = (int)(numLogoX.getValue() * 1000) + self.BusCompanyLogo.setFramePosition() + + def numLogoYTextChanged(self): + self.BusCompanyLogo.iYPos = (int)(numLogoY.getValue() * 1000) + self.BusCompanyLogo.setFramePosition() + + def numAddressWidthTextChanged(self): + self.BusCompanyAddress.iWidth = (int)(self.numAddressWidth.getValue() * 1000) + self.BusCompanyAddress.setFramePosition() + + def numAddressXTextChanged(self): + self.BusCompanyAddress.iXPos = (int)(self.numAddressX.getValue() * 1000) + self.BusCompanyAddress.setFramePosition() + + def numAddressYTextChanged(self): + self.BusCompanyAddress.iYPos = (int)(self.numAddressY.getValue() * 1000) + self.BusCompanyAddress.setFramePosition() + + def numAddressHeightTextChanged(self): + self.BusCompanyAddress.iHeight = (int)(self.numAddressHeight.getValue() * 1000) + self.BusCompanyAddress.setFramePosition() + + def numFooterHeightTextChanged(self): + self.BusFooter.iHeight = (int)(self.numFooterHeight.getValue() * 1000) + self.BusFooter.iYPos = self.myLetterDoc.DocSize.Height - self.BusFooter.iHeight + self.BusFooter.setFramePosition() + + def chkPaperCompanyLogoItemChanged(self): + if chkPaperCompanyLogo.State != 0: + if numLogoWidth.getValue() == 0: + numLogoWidth.setValue(0.1) + + if numLogoHeight.getValue() == 0: + numLogoHeight.setValue(0.1) + + self.BusCompanyLogo = BusinessPaperObject("Company Logo", (int)(numLogoWidth.getValue() * 1000), (int)(numLogoHeight.getValue() * 1000), (int)(numLogoX.getValue() * 1000), (int)(numLogoY.getValue() * 1000)) + self.setControlProperty("numLogoHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("numLogoWidth", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("numLogoX", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("numLogoY", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, True) + setPossibleLogo(False) + else: + if self.BusCompanyLogo != None: + self.BusCompanyLogo.removeFrame() + + self.setControlProperty("numLogoHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("numLogoWidth", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("numLogoX", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("numLogoY", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, False) + setPossibleLogo(True) + + def chkPaperCompanyAddressItemChanged(self): + if chkPaperCompanyAddress.State != 0: + if self.numAddressWidth.getValue() == 0: + self.numAddressWidth.setValue(0.1) + + if self.numAddressHeight.getValue() == 0: + self.numAddressHeight.setValue(0.1) + + self.BusCompanyAddress = BusinessPaperObject("Company Address", (int)(self.numAddressWidth.getValue() * 1000), (int)(self.numAddressHeight.getValue() * 1000), (int)(self.numAddressX.getValue() * 1000), (int)(self.numAddressY.getValue() * 1000)) + self.setControlProperty("self.numAddressHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("self.numAddressWidth", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("self.numAddressX", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("self.numAddressY", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, True) + if self.myLetterDoc.hasElement("Sender Address"): + self.myLetterDoc.switchElement("Sender Address", (False)) + + if self.chkCompanyReceiver.State != 0: + setPossibleSenderData(False) + + else: + if self.BusCompanyAddress != None: + self.BusCompanyAddress.removeFrame() + + self.setControlProperty("self.numAddressHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("self.numAddressWidth", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("self.numAddressX", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("self.numAddressY", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, False) + if self.myLetterDoc.hasElement("Sender Address"): + self.myLetterDoc.switchElement("Sender Address", (True)) + + setPossibleSenderData(True) + if optSenderDefine.State: + optSenderDefineItemChanged() + + if optSenderPlaceholder.State: + optSenderPlaceholderItemChanged() + + def chkCompanyReceiverItemChanged(self): + xReceiverFrame = None + if self.chkCompanyReceiver.State != 0: + try: + xReceiverFrame = TextFrameHandler.getFrameByName("Receiver Address", self.xTextDocument) + iFrameWidth = int(Helper.getUnoPropertyValue(xReceiverFrame, PropertyNames.PROPERTY_WIDTH)) + iFrameX = int(Helper.getUnoPropertyValue(xReceiverFrame, "HoriOrientPosition")) + iFrameY = int(Helper.getUnoPropertyValue(xReceiverFrame, "VertOrientPosition")) + iReceiverHeight = int(0.5 * 1000) + self.BusCompanyAddressReceiver = BusinessPaperObject(" ", iFrameWidth, iReceiverHeight, iFrameX, (iFrameY - iReceiverHeight)) + setPossibleAddressReceiver(False) + except NoSuchElementException, e: + traceback.print_exc() + except WrappedTargetException, e: + traceback.print_exc() + + if chkPaperCompanyAddress.State != 0: + setPossibleSenderData(False) + + else: + if self.BusCompanyAddressReceiver != None: + self.BusCompanyAddressReceiver.removeFrame() + + setPossibleAddressReceiver(True) + setPossibleSenderData(True) + if optSenderDefine.State: + optSenderDefineItemChanged() + + if optSenderPlaceholder.State: + optSenderPlaceholderItemChanged() + + def chkPaperFooterItemChanged(self): + if self.chkPaperFooter.State != 0: + if self.numFooterHeight.getValue() == 0: + self.numFooterHeight.setValue(0.1) + + self.BusFooter = BusinessPaperObject("Footer", self.myLetterDoc.DocSize.Width, (int)(self.numFooterHeight.getValue() * 1000), 0, (int)(self.myLetterDoc.DocSize.Height - (self.numFooterHeight.getValue() * 1000))) + self.setControlProperty("self.numFooterHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblFooterHeight", PropertyNames.PROPERTY_ENABLED, True) + setPossibleFooter(False) + else: + if self.BusFooter != None: + self.BusFooter.removeFrame() + + self.setControlProperty("self.numFooterHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblFooterHeight", PropertyNames.PROPERTY_ENABLED, False) + setPossibleFooter(True) + + def chkUseLogoItemChanged(self): + try: + if self.myLetterDoc.hasElement("Company Logo"): + logostatus = bool(self.getControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED)) and (self.chkUseLogo.State != 0) + self.myLetterDoc.switchElement("Company Logo", logostatus) + + except IllegalArgumentException, e: + traceback.print_exc() + + def chkUseAddressReceiverItemChanged(self): + try: + if self.myLetterDoc.hasElement("Sender Address Repeated"): + rstatus = bool(self.getControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED)) and (self.chkUseAddressReceiver.State != 0) + self.myLetterDoc.switchElement("Sender Address Repeated", rstatus) + + except IllegalArgumentException, e: + traceback.print_exc() + + def chkUseSignsItemChanged(self): + if self.myLetterDoc.hasElement("Letter Signs"): + self.myLetterDoc.switchElement("Letter Signs", (self.chkUseSigns.State != 0)) + + def chkUseSubjectItemChanged(self): + if self.myLetterDoc.hasElement("Subject Line"): + self.myLetterDoc.switchElement("Subject Line", (self.chkUseSubject.State != 0)) + + def chkUseBendMarksItemChanged(self): + if self.myLetterDoc.hasElement("Bend Marks"): + self.myLetterDoc.switchElement("Bend Marks", (self.chkUseBendMarks.State != 0)) + + def chkUseFooterItemChanged(self): + try: + bFooterPossible = (self.chkUseFooter.State != 0) and bool(self.getControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED)) + if self.chkFooterNextPages.State != 0: + self.myLetterDoc.switchFooter("First Page", False, (self.chkFooterPageNumbers.State != 0), txtFooter.Text) + self.myLetterDoc.switchFooter("Standard", bFooterPossible, (self.chkFooterPageNumbers.State != 0), self.txtFooter.Text) + else: + self.myLetterDoc.switchFooter("First Page", bFooterPossible, (self.chkFooterPageNumbers.State != 0), self.txtFooter.Text) + self.myLetterDoc.switchFooter("Standard", bFooterPossible, (self.chkFooterPageNumbers.State != 0), self.txtFooter.Text) + + BPaperItem = self.getRoadmapItemByID(LetterWizardDialogImpl.RM_FOOTER) + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, bFooterPossible) + except Exception, exception: + traceback.print_exc() + + def chkFooterNextPagesItemChanged(self): + self.chkUseFooterItemChanged() + + def chkFooterPageNumbersItemChanged(self): + self.chkUseFooterItemChanged() + + def setPossibleFooter(self, bState): + self.setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, bState) + self.chkUseFooterItemChanged() + + def setPossibleAddressReceiver(self, bState): + if self.myLetterDoc.hasElement("Sender Address Repeated"): + self.setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, bState) + self.chkUseAddressReceiverItemChanged() + + def setPossibleLogo(self, bState): + if self.myLetterDoc.hasElement("Company Logo"): + self.setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, bState) + self.chkUseLogoItemChanged() + + def txtFooterTextChanged(self): + self.chkUseFooterItemChanged() + + def txtSenderNameTextChanged(self): + myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) + myFieldHandler.changeUserFieldContent("Company", txtSenderName.Text) + + def txtSenderStreetTextChanged(self): + myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) + myFieldHandler.changeUserFieldContent("Street", txtSenderStreet.Text) + + def txtSenderCityTextChanged(self): + myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) + myFieldHandler.changeUserFieldContent("City", txtSenderCity.Text) + + def txtSenderPostCodeTextChanged(self): + myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) + myFieldHandler.changeUserFieldContent("PostCode", txtSenderPostCode.Text) + + def txtSenderStateTextChanged(self): + myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) + myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, txtSenderState.Text) + + def txtTemplateNameTextChanged(self): + xDocProps = self.xTextDocument.DocumentProperties + TitleName = self.txtTemplateName.Text + xDocProps.Title = TitleName + + def chkUseSalutationItemChanged(self): + self.myLetterDoc.switchUserField("Salutation", self.lstSalutation.Text, (self.chkUseSalutation.State != 0)) + self.setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, self.chkUseSalutation.State != 0) + + def lstSalutationItemChanged(self): + self.myLetterDoc.switchUserField("Salutation", self.lstSalutation.Text, (self.chkUseSalutation.State != 0)) + + def chkUseGreetingItemChanged(self): + self.myLetterDoc.switchUserField("Greeting", self.lstGreeting.Text, (self.chkUseGreeting.State != 0)) + self.setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, self.chkUseGreeting.State != 0) + + def setDefaultForGreetingAndSalutation(self): + if self.lstSalutation.Text == "": + self.lstSalutation.Text = self.resources.SalutationLabels[0] + + if self.lstGreeting.Text == "": + self.lstGreeting.Text = self.resources.GreetingLabels[0] + + def lstGreetingItemChanged(self): + self.myLetterDoc.switchUserField("Greeting", self.lstGreeting.Text, (self.chkUseGreeting.State != 0)) + + def chkBusinessPaperItemChanged(self): + if self.chkBusinessPaper.State != 0: + self.enableBusinessPaper() + else: + self.disableBusinessPaper() + self.setPossibleSenderData(True) + + def getOfficeLinguistic(self): + oL = 0 + found = False + OfficeLinguistic = Configuration.getOfficeLinguistic(self.xMSF) + i = 0 + for i in xrange(len(self.Norms)): + if self.Norms[i].lower() == OfficeLinguistic.lower(): + oL = i + found = True + break; + + if not found: + for i in xrange(len(self.Norms)): + if self.Norms[i].lower() == "en-US".lower(): + oL = i + found = True + break + return oL; + + def setPossibleSenderData(self, bState): + self.setControlProperty("optSenderDefine", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty("optSenderPlaceholder", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty("lblSenderAddress", PropertyNames.PROPERTY_ENABLED, bState) + if not bState: + self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, bState) + + def enableSenderReceiver(self): + BPaperItem = self.getRoadmapItemByID(LetterWizardDialogImpl.RM_SENDERRECEIVER) + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, True) + + def disableSenderReceiver(self): + BPaperItem = self.getRoadmapItemByID(LetterWizardDialogImpl.RM_SENDERRECEIVER) + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, False) + + def enableBusinessPaper(self): + BPaperItem = self.getRoadmapItemByID(LetterWizardDialogImpl.RM_BUSINESSPAPER) + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, True) + self.chkPaperCompanyLogoItemChanged() + self.chkPaperCompanyAddressItemChanged() + self.chkPaperFooterItemChanged() + self.chkCompanyReceiverItemChanged() + + def disableBusinessPaper(self): + BPaperItem = self.getRoadmapItemByID(LetterWizardDialogImpl.RM_BUSINESSPAPER) + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, False) + if self.BusCompanyLogo != None: + self.BusCompanyLogo.removeFrame() + + if self.BusCompanyAddress != None: + self.BusCompanyAddress.removeFrame() + + if self.BusFooter != None: + self.BusFooter.removeFrame() + + if self.BusCompanyAddressReceiver != None: + self.BusCompanyAddressReceiver.removeFrame() + + self.setPossibleAddressReceiver(True) + self.setPossibleFooter(True) + self.setPossibleLogo(True) + if self.myLetterDoc.hasElement("Sender Address"): + self.myLetterDoc.switchElement("Sender Address", True) + + def lstLetterNormItemChanged(self): + sCurrentNorm = self.Norms[getCurrentLetter().cp_Norm] + initializeTemplates(xMSF) + if self.optBusinessLetter.State: + self.lstBusinessStyleItemChanged() + + if optPrivOfficialLetter.State: + self.lstPrivOfficialStyleItemChanged() + + if optPrivateLetter.State: + self.lstPrivateStyleItemChanged() + + def initializeSalutation(self): + self.setControlProperty("lstSalutation", "StringItemList", self.resources.SalutationLabels) + + def initializeGreeting(self): + self.setControlProperty("lstGreeting", "StringItemList", self.resources.GreetingLabels) + + def initializeNorms(self): + lc = LocaleCodes(self.xmsf) + allLocales = lc.getIDs() + nameList = [] + sLetterSubPath = "/wizard/letter/" + try: + self.sTemplatePath = FileAccess.deleteLastSlashfromUrl(self.sTemplatePath) + nuString = self.sTemplatePath[:self.sTemplatePath.rfind("/")] + "/" + sMainPath = FileAccess.deleteLastSlashfromUrl(nuString) + self.sLetterPath = sMainPath + sLetterSubPath + xInterface = self.xmsf.createInstance("com.sun.star.ucb.SimpleFileAccess") + nameList = xInterface.getFolderContents(self.sLetterPath, True) + except Exception, e: + traceback.print_exc() + + found = False + cIsoCode = "" + MSID = "" + + for i in nameList: + found = False + cIsoCode = FileAccess.getFilename(i) + for j in allLocales: + aLang = j.split(";") + if cIsoCode.lower() == aLang[1].lower(): + MSID = aLang[2] + found = True + break + + if not found: + for j in allLocales: + aLang = j.split(";") + if cIsoCode.lower() == aLang[1][:2]: + MSID = aLang[2] + found = True + break + + if found: + self.Norms.append(cIsoCode) + self.NormPaths.append(i) + #LanguageLabelsVector.add(lc.getLanguageString(MSID)) + + #COMMENTED + #LanguageLabels = [LanguageLabelsVector.size()] + #LanguageLabelsVector.toArray(LanguageLabels) + #self.setControlProperty("lstLetterNorm", "StringItemList", LanguageLabels) + + def getCurrentLetter(self): + if self.myConfig.cp_LetterType == 0: + return self.myConfig.cp_BusinessLetter + elif self.myConfig.cp_LetterType == 1: + return self.myConfig.cp_PrivateOfficialLetter + elif self.myConfig.cp_LetterType == 2: + return self.myConfig.cp_PrivateLetter + else: + return None + + def __initializePaths(self): + try: + self.sTemplatePath = FileAccess.getOfficePath2(self.xMSF, "Template", "share", "/wizard") + self.sUserTemplatePath = FileAccess.getOfficePath2(self.xMSF, "Template", "user", "") + self.sBitmapPath = FileAccess.combinePaths(self.xMSF, self.sTemplatePath, "/../wizard/bitmap") + except NoValidPathException, e: + traceback.print_exc() + + def initializeTemplates(self, xMSF): + self.sCurrentNorm = self.Norms[self.getCurrentLetter().cp_Norm] + sLetterPath = self.NormPaths[self.getCurrentLetter().cp_Norm] + self.BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", sLetterPath) + self.OfficialFiles = FileAccess.getFolderTitles(xMSF, "off", sLetterPath) + self.PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", sLetterPath) + self.setControlProperty("lstBusinessStyle", "StringItemList", tuple(self.BusinessFiles[0])) + self.setControlProperty("lstPrivOfficialStyle", "StringItemList", tuple(self.OfficialFiles[0])) + self.setControlProperty("lstPrivateStyle", "StringItemList", tuple(self.PrivateFiles[0])) + self.setControlProperty("lstBusinessStyle", "SelectedItems", (0,)) + self.setControlProperty("lstPrivOfficialStyle", "SelectedItems", (0,)) + self.setControlProperty("lstPrivateStyle", "SelectedItems", (0,)) + return True + + def initializeElements(self): + self.setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Company Logo")) + self.setControlProperty("chkUseBendMarks", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Bend Marks")) + self.setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Sender Address Repeated")) + self.setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Subject Line")) + self.setControlProperty("chkUseSigns", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Letter Signs")) + self.myLetterDoc.updateDateFields() + + def setConfiguration(self): + if self.optBusinessLetter.State: + self.optBusinessLetterItemChanged() + + if self.optPrivOfficialLetter.State: + self.optPrivOfficialLetterItemChanged() + + if self.optPrivateLetter.State: + self.optPrivateLetterItemChanged() + + def setElements(self, privLetter): + if self.optSenderDefine.State: + self.optSenderDefineItemChanged() + + if self.optSenderPlaceholder.State: + self.optSenderPlaceholderItemChanged() + + self.chkUseSignsItemChanged() + self.chkUseSubjectItemChanged() + self.chkUseSalutationItemChanged() + self.chkUseGreetingItemChanged() + self.chkUseBendMarksItemChanged() + self.chkUseAddressReceiverItemChanged() + self.txtTemplateNameTextChanged() + if self.optReceiverDatabase.State and not privLetter: + self.optReceiverDatabaseItemChanged() + + if self.optReceiverPlaceholder.State and not privLetter: + self.optReceiverPlaceholderItemChanged() + + if self.optCreateLetter.State: + self.optCreateLetterItemChanged() + + if self.optMakeChanges.State: + self.optMakeChangesItemChanged() + + def insertRoadmap(self): + self.addRoadmap() + i = 0 + i = self.insertRoadmapItem(0, True, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_TYPESTYLE -1], LetterWizardDialogImpl.RM_TYPESTYLE) + i = self.insertRoadmapItem(i, False, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_BUSINESSPAPER - 1], LetterWizardDialogImpl.RM_BUSINESSPAPER) + i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_ELEMENTS - 1], LetterWizardDialogImpl.RM_ELEMENTS) + i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_SENDERRECEIVER - 1], LetterWizardDialogImpl.RM_SENDERRECEIVER) + i = self.insertRoadmapItem(i, False, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_FOOTER -1], LetterWizardDialogImpl.RM_FOOTER) + i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_FINALSETTINGS - 1], LetterWizardDialogImpl.RM_FINALSETTINGS) + self.setRoadmapInteractive(True) + self.setRoadmapComplete(True) + self.setCurrentRoadmapItemID(1) + + class myPathSelectionListener: + + def validatePath(self): + if self.myPathSelection.usedPathPicker: + self.filenameChanged = True + + self.myPathSelection.usedPathPicker = False + + def insertPathSelectionControl(self): + self.myPathSelection = PathSelection(self.xMSF, self, PathSelection.TransferMode.SAVE, PathSelection.DialogTypes.FILE) + self.myPathSelection.insert(6, 97, 70, 205, 45, self.resources.reslblTemplatePath_value, True, HelpIds.getHelpIdString(HID + 47), HelpIds.getHelpIdString(HID + 48)) + self.myPathSelection.sDefaultDirectory = self.sUserTemplatePath + self.myPathSelection.sDefaultName = "myLetterTemplate.ott" + self.myPathSelection.sDefaultFilter = "writer8_template" + self.myPathSelection.addSelectionListener(None) + + def initConfiguration(self): + try: + self.myConfig = CGLetterWizard() + root = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", False) + self.myConfig.readConfiguration(root, "cp_") + self.mainDA.append(RadioDataAware.attachRadioButtons(self.myConfig, "cp_LetterType", (self.optBusinessLetter, self.optPrivOfficialLetter, self.optPrivateLetter), True)) + self.mainDA.append(UnoDataAware.attachListBox(self.myConfig.cp_BusinessLetter, "cp_Style", self.lstBusinessStyle, True)) + self.mainDA.append(UnoDataAware.attachListBox(self.myConfig.cp_PrivateOfficialLetter, "cp_Style", self.lstPrivOfficialStyle, True)) + self.mainDA.append(UnoDataAware.attachListBox(self.myConfig.cp_PrivateLetter, "cp_Style", self.lstPrivateStyle, True)) + self.mainDA.append(UnoDataAware.attachCheckBox(self.myConfig.cp_BusinessLetter, "cp_BusinessPaper", self.chkBusinessPaper, True)) + cgl = self.myConfig.cp_BusinessLetter + cgpl = self.myConfig.cp_BusinessLetter.cp_CompanyLogo + cgpa = self.myConfig.cp_BusinessLetter.cp_CompanyAddress + self.businessDA.append(UnoDataAware.attachCheckBox(cgpl, "cp_Display", self.chkPaperCompanyLogo, True)) + self.businessDA.append(UnoDataAware.attachNumericControl(cgpl, "cp_Width", self.numLogoWidth, True)) + self.businessDA.append(UnoDataAware.attachNumericControl(cgpl, "cp_Height", self.numLogoHeight, True)) + self.businessDA.append(UnoDataAware.attachNumericControl(cgpl, "cp_X", self.numLogoX, True)) + self.businessDA.append(UnoDataAware.attachNumericControl(cgpl, "cp_Y", self.numLogoY, True)) + self.businessDA.append(UnoDataAware.attachCheckBox(cgpa, "cp_Display", self.chkPaperCompanyAddress, True)) + self.businessDA.append(UnoDataAware.attachNumericControl(cgpa, "cp_Width", self.numAddressWidth, True)) + self.businessDA.append(UnoDataAware.attachNumericControl(cgpa, "cp_Height", self.numAddressHeight, True)) + self.businessDA.append(UnoDataAware.attachNumericControl(cgpa, "cp_X", self.numAddressX, True)) + self.businessDA.append(UnoDataAware.attachNumericControl(cgpa, "cp_Y", self.numAddressY, True)) + self.businessDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PaperCompanyAddressReceiverField", self.chkCompanyReceiver, True)) + self.businessDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PaperFooter", self.chkPaperFooter, True)) + self.businessDA.append(UnoDataAware.attachNumericControl(cgl, "cp_PaperFooterHeight", self.numFooterHeight, True)) + self.letterDA.append(UnoDataAware.attachListBox(cgl, "cp_Norm", self.lstLetterNorm, True)) + self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintCompanyLogo", self.chkUseLogo, True)) + self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintCompanyAddressReceiverField", self.chkUseAddressReceiver, True)) + self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintLetterSigns", self.chkUseSigns, True)) + self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintSubjectLine", self.chkUseSubject, True)) + self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintSalutation", self.chkUseSalutation, True)) + self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintBendMarks", self.chkUseBendMarks, True)) + self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintGreeting", self.chkUseGreeting, True)) + self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintFooter", self.chkUseFooter, True)) + self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_Salutation", self.lstSalutation, True)) + self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_Greeting", self.lstGreeting, True)) + self.letterDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_SenderAddressType", [self.optSenderDefine, self.optSenderPlaceholder], True)) + self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderCompanyName", self.txtSenderName, True)) + self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderStreet", self.txtSenderStreet, True)) + self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderPostCode", self.txtSenderPostCode, True)) + self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderState", self.txtSenderState, True)) + self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderCity", self.txtSenderCity, True)) + self.letterDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_ReceiverAddressType", [self.optReceiverDatabase, self.optReceiverPlaceholder], True)) + self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_Footer", self.txtFooter, True)) + self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_FooterOnlySecondPage", self.chkFooterNextPages, True)) + self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_FooterPageNumbers", self.chkFooterPageNumbers, True)) + self.letterDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_CreationType", [self.optCreateLetter, self.optMakeChanges], True)) + self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_TemplateName", self.txtTemplateName, True)) + self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_TemplatePath", self.myPathSelection.xSaveTextBox, True)) + except Exception, exception: + traceback.print_exc() + + def updateUI(self): + UnoDataAware.updateUIs(self.mainDA) + UnoDataAware.updateUIs(self.letterDA) + UnoDataAware.updateUIs(self.businessDA) + + def saveConfiguration(self): + try: + root = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", True) + self.myConfig.writeConfiguration(root, "cp_") + Configuration.commit(root) + except Exception, e: + traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py new file mode 100644 index 000000000..439f9ba6a --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py @@ -0,0 +1,98 @@ +from common.Resource import Resource + +class LetterWizardDialogResources(Resource): + UNIT_NAME = "dbwizres" + MODULE_NAME = "dbw" + RID_LETTERWIZARDDIALOG_START = 3000 + RID_LETTERWIZARDGREETING_START = 3080 + RID_LETTERWIZARDSALUTATION_START = 3090 + RID_LETTERWIZARDROADMAP_START = 3100 + RID_LETTERWIZARDLANGUAGE_START = 3110 + RID_RID_COMMON_START = 500 + + def __init__(self, xmsf): + super(LetterWizardDialogResources,self).__init__(xmsf, LetterWizardDialogResources.MODULE_NAME) + + self.RoadmapLabels = () + self.SalutationLabels = () + self.GreetingLabels = () + self.LanguageLabels = () + self.resLetterWizardDialog_title = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 1) + self.resLabel9_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 2) + self.resoptBusinessLetter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 3) + self.resoptPrivOfficialLetter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 4) + self.resoptPrivateLetter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 5) + self.reschkBusinessPaper_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 6) + self.reschkPaperCompanyLogo_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 7) + self.reschkPaperCompanyAddress_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 8) + self.reschkPaperFooter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 9) + self.reschkCompanyReceiver_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 10) + self.reschkUseLogo_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 11) + self.reschkUseAddressReceiver_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 12) + self.reschkUseSigns_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 13) + self.reschkUseSubject_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 14) + self.reschkUseSalutation_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 15) + self.reschkUseBendMarks_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 16) + self.reschkUseGreeting_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 17) + self.reschkUseFooter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 18) + self.resoptSenderPlaceholder_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 19) + self.resoptSenderDefine_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 20) + self.resoptReceiverPlaceholder_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 21) + self.resoptReceiverDatabase_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 22) + self.reschkFooterNextPages_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 23) + self.reschkFooterPageNumbers_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 24) + self.restxtTemplateName_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 25) + self.resoptCreateLetter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 26) + self.resoptMakeChanges_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 27) + self.reslblBusinessStyle_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 28) + self.reslblPrivOfficialStyle_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 29) + self.reslblPrivateStyle_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 30) + self.reslblIntroduction_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 31) + self.reslblLogoHeight_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 32) + self.reslblLogoWidth_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 33) + self.reslblLogoX_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 34) + self.reslblLogoY_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 35) + self.reslblAddressHeight_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 36) + self.reslblAddressWidth_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 37) + self.reslblAddressX_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 38) + self.reslblAddressY_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 39) + self.reslblFooterHeight_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 40) + self.reslblLetterNorm_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 41) + self.reslblSenderAddress_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 42) + self.reslblSenderName_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 43) + self.reslblSenderStreet_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 44) + self.reslblPostCodeCity_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 45) + self.reslblReceiverAddress_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 46) + self.reslblFooter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 47) + self.reslblFinalExplanation1_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 48) + self.reslblFinalExplanation2_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 49) + self.reslblTemplateName_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 50) + self.reslblTemplatePath_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 51) + self.reslblProceed_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 52) + self.reslblTitle1_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 53) + self.reslblTitle3_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 54) + self.reslblTitle2_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 55) + self.reslblTitle4_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 56) + self.reslblTitle5_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 57) + self.reslblTitle6_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 58) + self.loadRoadmapResources() + self.loadSalutationResources() + self.loadGreetingResources() + self.loadCommonResources() + + def loadCommonResources(self): + self.resOverwriteWarning = self.getResText(LetterWizardDialogResources.RID_RID_COMMON_START + 19) + self.resTemplateDescription = self.getResText(LetterWizardDialogResources.RID_RID_COMMON_START + 20) + + def loadRoadmapResources(self): + i = 1 + for i in xrange(6): + self.RoadmapLabels = self.RoadmapLabels + (self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDROADMAP_START + i + 1),) + + def loadSalutationResources(self): + for i in xrange(3): + self.SalutationLabels = self.SalutationLabels + (self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDSALUTATION_START + i + 1),) + + def loadGreetingResources(self): + for i in xrange(3): + self.GreetingLabels = self.GreetingLabels + (self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDGREETING_START + i + 1),) diff --git a/wizards/com/sun/star/wizards/letter/LocaleCodes.py b/wizards/com/sun/star/wizards/letter/LocaleCodes.py new file mode 100644 index 000000000..ef376c575 --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/LocaleCodes.py @@ -0,0 +1,154 @@ +from common.Resource import Resource + +class LocaleCodes(Resource): + UNIT_NAME = "svtres", + MODULE_NAME = "svt", + + def __init__(self, xmsf): + super(LocaleCodes, self).__init__(xmsf, LocaleCodes.MODULE_NAME) + #self.allLanguageStrings = self.getStringList(16633) + + def getLanguageString(self, MSID): + LS = "unknown Language", + for i in self.allLanguageStrings: + if str(i.Value).lower() == MSID.lower(): + LS = i.Name + return LS + + def getIDs(self): + Ids = ("Afrikaans;af;1078", + "Albanian;sq;1052", + "Arabic - United Arab Emirates;ar-ae;14337", + "Arabic - Bahrain;ar-bh;15361", + "Arabic - Algeria;ar-dz;5121", + "Arabic - Egypt;ar-eg;3073", + "Arabic - Iraq;ar-iq;2049", + "Arabic - Jordan;ar-jo;11265", + "Arabic - Kuwait;ar-kw;13313", + "Arabic - Lebanon;ar-lb;12289", + "Arabic - Libya;ar-ly;4097", + "Arabic - Morocco;ar-ma;6145", + "Arabic - Oman;ar-om;8193", + "Arabic - Qatar;ar-qa;16385", + "Arabic - Saudi Arabia;ar-sa;1025", + "Arabic - Syria;ar-sy;10241", + "Arabic - Tunisia;ar-tn;7169", + "Arabic - Yemen;ar-ye;9217", + "Armenian;hy;1067", + "Azeri - Latin;az-az;1068", + "Azeri - Cyrillic;az-az;2092", + "Basque;eu;1069", + "Belarusian;be;1059", + "Bulgarian;bg;1026", + "Catalan;ca;1027", + "Chinese - China;zh-cn;2052", + "Chinese - Hong Kong SAR;zh-hk;3076", + "Chinese - Macau SAR;zh-mo;5124", + "Chinese - Singapore;zh-sg;4100", + "Chinese - Taiwan;zh-tw;1028", + "Croatian;hr;1050", + "Czech;cs;1029", + "Danish;da;1030", + "Dutch - The Netherlands;nl-nl;1043", + "Dutch - Belgium;nl-be;2067", + "English - Australia;en-au;3081", + "English - Belize;en-bz;10249", + "English - Canada;en-ca;4105", + "English - Caribbean;en-cb;9225", + "English - Ireland;en-ie;6153", + "English - Jamaica;en-jm;8201", + "English - New Zealand;en-nz;5129", + "English - Phillippines;en-ph;13321", + "English - South Africa;en-za;7177", + "English - Trinidad;en-tt;11273", + "English - United Kingdom;en-gb;2057", + "English - United States;en-us;1033", + "Estonian;et;1061", + "Farsi;fa;1065", + "Finnish;fi;1035", + "Faroese;fo;1080", + "French - France;fr-fr;1036", + "French - Belgium;fr-be;2060", + "French - Canada;fr-ca;3084", + "French - Luxembourg;fr-lu;5132", + "French - Switzerland;fr-ch;4108", + "Gaelic - Ireland;gd-ie;2108", + "Gaelic - Scotland;gd;1084", + "German - Germany;de-de;1031", + "German - Austria;de-at;3079", + "German - Liechtenstein;de-li;5127", + "German - Luxembourg;de-lu;4103", + "German - Switzerland;de-ch;2055", + "Greek;el;1032", + "Hebrew;he;1037", + "Hindi;hi;1081", + "Hungarian;hu;1038", + "Icelandic;is;1039", + "Indonesian;id;1057", + "Italian - Italy;it-it;1040", + "Italian - Switzerland;it-ch;2064", + "Japanese;ja;1041", + "Korean;ko;1042", + "Latvian;lv;1062", + "Lithuanian;lt;1063", + "FYRO Macedonian;mk;1071", + "Malay - Malaysia;ms-my;1086", + "Malay - Brunei;ms-bn;2110", + "Maltese;mt;1082", + "Marathi;mr;1102", + "Norwegian - Bokm?l;no-no;1044", + "Norwegian - Nynorsk;no-no;2068", + "Polish;pl;1045", + "Portuguese - Portugal;pt-pt;2070", + "Portuguese - Brazil;pt-br;1046", + "Raeto-Romance;rm;1047", + "Romanian - Romania;ro;1048", + "Romanian - Moldova;ro-mo;2072", + "Russian;ru;1049", + "Russian - Moldova;ru-mo;2073", + "Sanskrit;sa;1103", + "Serbian - Cyrillic;sr-sp;3098", + "Serbian - Latin;sr-sp;2074", + "Setsuana;tn;1074", + "Slovenian;sl;1060", + "Slovak;sk;1051", + "Sorbian;sb;1070", + "Spanish - Spain;es-es;3082", + "Spanish - Argentina;es-ar;11274", + "Spanish - Bolivia;es-bo;16394", + "Spanish - Chile;es-cl;13322", + "Spanish - Colombia;es-co;9226", + "Spanish - Costa Rica;es-cr;5130", + "Spanish - Dominican Republic;es-do;7178", + "Spanish - Ecuador;es-ec;12298", + "Spanish - Guatemala;es-gt;4106", + "Spanish - Honduras;es-hn;18442", + "Spanish - Mexico;es-mx;2058", + "Spanish - Nicaragua;es-ni;19466", + "Spanish - Panama;es-pa;6154", + "Spanish - Peru;es-pe;10250", + "Spanish - Puerto Rico;es-pr;20490", + "Spanish - Paraguay;es-py;15370", + "Spanish - El Salvador;es-sv;17418", + "Spanish - Uruguay;es-uy;14346", + "Spanish - Venezuela;es-ve;8202", + "Sutu;sx;1072", + "Swahili;sw;1089", + "Swedish - Sweden;sv-se;1053", + "Swedish - Finland;sv-fi;2077", + "Tamil;ta;1097", + "Tatar;tt;1092", + "Thai;th;1054", + "Turkish;tr;1055", + "Tsonga;ts;1073", + "Ukrainian;uk;1058", + "Urdu;ur;1056", + "Uzbek - Cyrillic;uz-uz;2115", + "Uzbek - Latin;uz-uz;1091", + "Vietnamese;vi;1066", + "Xhosa;xh;1076", + "Yiddish;yi;1085", + "Zulu;zu;1077", + "Khmer;km-kh;1107", + "Burmese;my-mm;1109") + return Ids diff --git a/wizards/com/sun/star/wizards/letter/__init__.py b/wizards/com/sun/star/wizards/letter/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index 15412dbb4..a0a124920 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -459,8 +459,8 @@ class UnoDialog(object): if self.xWindowPeer == None: self.createWindowPeer() - - self.BisHighContrastModeActivated = self.isHighContrastModeActivated() + #COMMENTED + #self.BisHighContrastModeActivated = self.isHighContrastModeActivated() return self.xUnoDialog.execute() def setVisible(self, parent): @@ -540,14 +540,6 @@ class UnoDialog(object): xVclWindowPeer = self.xControl.getPeer() self.xContainerWindow.setProperty(PropertyName, PropertyValue) - @classmethod - def getModel(self, control): - return control.getModel() - - @classmethod - def setEnabled(self, control, enabled): - setEnabled(control, enabled) - @classmethod def setEnabled(self, control, enabled): Helper.setUnoPropertyValue( -- cgit v1.2.3 From ef1f718736649734fe48cf7c25c0cd8369e14ad5 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 30 Jun 2011 16:30:35 +0200 Subject: Cancel button works now --- .../com/sun/star/wizards/letter/LetterWizardDialogImpl.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py index cbd3b1208..6f1a22717 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py @@ -54,7 +54,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): lw.startWizard(xLocMSF, None) def startWizard(self, xMSF, CurPropertyValue): - LetterWizardDialogImpl.running = True + self.running = True try: #Number of steps on WizardDialog self.nMaxStep = 6 @@ -120,16 +120,16 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.executeDialogFromComponent(self.myLetterDoc.xFrame) self.removeTerminateListener() self.closeDocument() - LetterWizardDialogImpl.running = False + self.running = False except Exception, exception: self.removeTerminateListener() traceback.print_exc() - LetterWizardDialogImpl.running = False + self.running = False return def cancelWizard(self): - xDialog.endExecute() - LetterWizardDialogImpl.running = False + self.xUnoDialog.endExecute() + self.running = False def finishWizard(self): switchToStep(getCurrentStep(), getMaxStep()) @@ -195,7 +195,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): traceback.print_exc() finally: xDialog.endExecute() - LetterWizardDialogImpl.running = False + self.running = False return True; -- cgit v1.2.3 From 883476ef5edb2ccee7848f3399179acbe3f0e991 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 30 Jun 2011 18:10:37 +0200 Subject: unused functions --- wizards/com/sun/star/wizards/ui/UnoDialog.py | 155 --------------------------- 1 file changed, 155 deletions(-) diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index a0a124920..fbc1984a3 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -18,7 +18,6 @@ class UnoDialog(object): self.xUnoDialog = xMSF.createInstance( "com.sun.star.awt.UnoControlDialog") self.xUnoDialog.setModel(self.xDialogModel) - self.BisHighContrastModeActivated = None self.m_oPeerConfig = None self.xWindowPeer = None except Exception, e: @@ -459,8 +458,6 @@ class UnoDialog(object): if self.xWindowPeer == None: self.createWindowPeer() - #COMMENTED - #self.BisHighContrastModeActivated = self.isHighContrastModeActivated() return self.xUnoDialog.execute() def setVisible(self, parent): @@ -545,163 +542,11 @@ class UnoDialog(object): Helper.setUnoPropertyValue( getModel(control), PropertyNames.PROPERTY_ENABLED, enabled) - ''' - @author bc93774 - @param oControlModel the model of a control - @return the LabelType according to UIConsts.CONTROLTYPE - ''' - - @classmethod - def getControlModelType(self, oControlModel): - if oControlModel.supportsService( - "com.sun.star.awt.UnoControlFixedTextModel"): - return UIConsts.CONTROLTYPE.FIXEDTEXT - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlButtonModel"): - return UIConsts.CONTROLTYPE.BUTTON - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlCurrencyFieldModel"): - return UIConsts.CONTROLTYPE.CURRENCYFIELD - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlDateFieldModel"): - return UIConsts.CONTROLTYPE.DATEFIELD - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlFixedLineModel"): - return UIConsts.CONTROLTYPE.FIXEDLINE - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlFormattedFieldModel"): - return UIConsts.CONTROLTYPE.FORMATTEDFIELD - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlRoadmapModel"): - return UIConsts.CONTROLTYPE.ROADMAP - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlNumericFieldModel"): - return UIConsts.CONTROLTYPE.NUMERICFIELD - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlPatternFieldModel"): - return UIConsts.CONTROLTYPE.PATTERNFIELD - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlHyperTextModel"): - return UIConsts.CONTROLTYPE.HYPERTEXT - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlProgressBarModel"): - return UIConsts.CONTROLTYPE.PROGRESSBAR - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlTimeFieldModel"): - return UIConsts.CONTROLTYPE.TIMEFIELD - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlImageControlModel"): - return UIConsts.CONTROLTYPE.IMAGECONTROL - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlRadioButtonModel"): - return UIConsts.CONTROLTYPE.RADIOBUTTON - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlCheckBoxModel"): - return UIConsts.CONTROLTYPE.CHECKBOX - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlEditModel"): - return UIConsts.CONTROLTYPE.EDITCONTROL - elif oControlModel.supportsService( - "com.sun.star.awt.UnoControlComboBoxModel"): - return UIConsts.CONTROLTYPE.COMBOBOX - else: - if (oControlModel.supportsService( - "com.sun.star.awt.UnoControlListBoxModel")): - return UIConsts.CONTROLTYPE.LISTBOX - else: - return UIConsts.CONTROLTYPE.UNKNOWN - - ''' - @author bc93774 - @param oControlModel - @return the name of the property that contains the value of a controlmodel - ''' - - @classmethod - def getDisplayProperty(self, oControlModel): - itype = getControlModelType(oControlModel) - return getDisplayProperty(itype) - - ''' - @param itype The type of the control conforming to UIConst.ControlType - @return the name of the property that contains the value of a controlmodel - ''' - - ''' - @classmethod - def getDisplayProperty(self, itype): - # String propertyname = ""; - tmp_switch_var1 = itype - if 1: - pass - else: - return "" - ''' - def addResourceHandler(self, _Unit, _Module): self.m_oResource = Resource(self.xMSF, _Unit, _Module) def setInitialTabindex(self, _istep): return (short)(_istep * 100) - def isHighContrastModeActivated(self): - if self.xContainerWindow != None: - if self.BisHighContrastModeActivated == None: - try: - nUIColor = int(self.xContainerWindow.getProperty( - "DisplayBackgroundColor")) - except IllegalArgumentException, e: - traceback.print_exc() - return False - - #TODO: The following methods could be wrapped - # in an own class implementation - nRed = self.getRedColorShare(nUIColor) - nGreen = self.getGreenColorShare(nUIColor) - nBlue = self.getBlueColorShare(nUIColor) - nLuminance = ((nBlue * 28 + nGreen * 151 + nRed * 77) / 256) - bisactivated = (nLuminance <= 25) - self.BisHighContrastModeActivated = bisactivated - return bisactivated - else: - return self.BisHighContrastModeActivated.booleanValue() - - else: - return False - - def getRedColorShare(self, _nColor): - nRed = _nColor / 65536 - nRedModulo = _nColor % 65536 - nGreen = (int)(nRedModulo / 256) - nGreenModulo = (nRedModulo % 256) - nBlue = nGreenModulo - return nRed - - def getGreenColorShare(self, _nColor): - nRed = _nColor / 65536 - nRedModulo = _nColor % 65536 - nGreen = (int)(nRedModulo / 256) - return nGreen - - def getBlueColorShare(self, _nColor): - nRed = _nColor / 65536 - nRedModulo = _nColor % 65536 - nGreen = (int)(nRedModulo / 256) - nGreenModulo = (nRedModulo % 256) - nBlue = nGreenModulo - return nBlue - - def getWizardImageUrl(self, _nResId, _nHCResId): - if isHighContrastModeActivated(): - return "private:resource/wzi/image/" + _nHCResId - else: - return "private:resource/wzi/image/" + _nResId - - def getImageUrl(self, _surl, _shcurl): - if isHighContrastModeActivated(): - return _shcurl - else: - return _surl - def getListBoxLineCount(self): return 20 -- cgit v1.2.3 From 38184d85f75e5d1cefeab5930039c6fe1363f8e2 Mon Sep 17 00:00:00 2001 From: Francois Tigeot Date: Fri, 1 Jul 2011 07:20:12 +0200 Subject: Do not include filedlg.hxx when not necessary --- basctl/source/basicide/moduldl2.cxx | 2 -- cui/source/options/optpath.cxx | 1 - 2 files changed, 3 deletions(-) diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index b963f0bd8..f1759d633 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -33,8 +33,6 @@ #include -#include - #include #include diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index a3b00fb63..ddf4d6170 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3 From c6b937f953622ed18aac2e9940eb33a526e20449 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Fri, 1 Jul 2011 15:52:37 +0200 Subject: save RadioButtons too --- wizards/com/sun/star/wizards/common/ConfigGroup.py | 5 +- .../com/sun/star/wizards/common/Configuration.py | 54 ---------------------- .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 6 ++- .../sun/star/wizards/ui/event/RadioDataAware.py | 4 +- 4 files changed, 7 insertions(+), 62 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.py b/wizards/com/sun/star/wizards/common/ConfigGroup.py index 9019ffe63..ca1b60a4d 100644 --- a/wizards/com/sun/star/wizards/common/ConfigGroup.py +++ b/wizards/com/sun/star/wizards/common/ConfigGroup.py @@ -20,10 +20,7 @@ class ConfigGroup(ConfigNode): child.writeConfiguration(configView.getByName(propertyName), prefix) else: - try: - setattr(configView,propertyName,getattr(self,field)) - except Exception: - pass + setattr(configView,propertyName,getattr(self,field)) def readConfiguration(self, configurationView, param): for name,data in inspect.getmembers(self): diff --git a/wizards/com/sun/star/wizards/common/Configuration.py b/wizards/com/sun/star/wizards/common/Configuration.py index 20f4bd374..0e3abe128 100644 --- a/wizards/com/sun/star/wizards/common/Configuration.py +++ b/wizards/com/sun/star/wizards/common/Configuration.py @@ -18,25 +18,6 @@ in hierarchy form from the root of the registry. class Configuration(object): - @classmethod - def getNode(self, name, parent): - return parent.getByName(name) - - @classmethod - def Set(self, value, name, parent): - setattr(parent, name, value) - - ''' - @param name - @param parent - @return - @throws Exception - ''' - - @classmethod - def getConfigurationNode(self, name, parent): - return parent.getByName(name) - @classmethod def getConfigurationRoot(self, xmsf, sPath, updateable): oConfigProvider = xmsf.createInstance( @@ -61,10 +42,6 @@ class Configuration(object): return oConfigProvider.createInstanceWithArguments(sView, tuple(args)) - @classmethod - def getChildrenNames(self, configView): - return configView.getElementNames() - @classmethod def getProductName(self, xMSF): try: @@ -112,41 +89,12 @@ class Configuration(object): traceback.print_exc() return None - ''' - This method creates a new configuration node and adds it - to the given view. Note that if a node with the given name - already exists it will be completely removed from - the configuration. - @param configView - @param name - @return the new created configuration node. - @throws com.sun.star.lang.WrappedTargetException - @throws ElementExistException - @throws NoSuchElementException - @throws com.sun.star.uno.Exception - ''' - - @classmethod - def addConfigNode(self, configView, name): - if configView is None: - return configView.getByName(name) - else: - # the new element is the result ! - newNode = configView.createInstance() - # insert it - this also names the element - configView.insertByName(name, newNode) - return newNode - @classmethod def removeNode(self, configView, name): if configView.hasByName(name): configView.removeByName(name) - @classmethod - def commit(self, configView): - configView.commitChanges() - @classmethod def updateConfiguration(self, xmsf, path, name, node, param): view = self.getConfigurationRoot(xmsf, path, True) @@ -262,6 +210,4 @@ class Configuration(object): i += 1 except Exception, e: traceback.print_exc() - return None - diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 72933af51..5564283d7 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -414,7 +414,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): root = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.Office.Writer/Wizards/Fax", True) self.myConfig.writeConfiguration(root, "cp_") - Configuration.commit(root) + root.commitChanges() except Exception, e: traceback.print_exc() @@ -645,7 +645,9 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.chkUseFooterItemChanged() def txtFooterTextChanged(self): - self.chkUseFooterItemChanged() + self.myFaxDoc.switchFooter("First Page", True, + (self.chkFooterPageNumbers.State is not 0), + self.txtFooter.Text) def chkUseSalutationItemChanged(self): self.myFaxDoc.switchUserField("Salutation", diff --git a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py index 457f7580b..41ce307a0 100644 --- a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py @@ -24,8 +24,8 @@ class RadioDataAware(DataAware): self.radioButtons[selected].State = True def getFromUI(self): - for i in self.radioButtons: - if i.State: + for i in xrange(len(self.radioButtons)): + if self.radioButtons[i].State: return i return -1 -- cgit v1.2.3 From 29c608d92b5c7f3e46d234a2cf455ba0b2743a35 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Fri, 1 Jul 2011 21:37:05 +0200 Subject: small changes --- .../star/wizards/letter/LetterWizardDialogImpl.py | 36 ++++++++++++---------- wizards/com/sun/star/wizards/text/ViewHandler.py | 3 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py index 6f1a22717..f6b61e77a 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py @@ -10,6 +10,8 @@ from CGLetterWizard import CGLetterWizard from ui.event.UnoDataAware import * from ui.event.RadioDataAware import * from document.OfficeDocument import OfficeDocument +from ui.XPathSelectionListener import XPathSelectionListener +from text.TextFieldHandler import TextFieldHandler class LetterWizardDialogImpl(LetterWizardDialog): RM_TYPESTYLE = 1 @@ -246,11 +248,11 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) - lstPrivateStyleItemChanged() - disableBusinessPaper() - disableSenderReceiver() - setPossibleFooter(False) - if self.myPathSelection.xSaveTextBox.Text.equalsIgnoreCase(""): + self.lstPrivateStyleItemChanged() + self.disableBusinessPaper() + self.disableSenderReceiver() + self.setPossibleFooter(False) + if self.myPathSelection.xSaveTextBox.Text.lower() == "": self.myPathSelection.initializePath() def optSenderPlaceholderItemChanged(self): @@ -273,11 +275,11 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, True) self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, True) self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, True) - txtSenderNameTextChanged() - txtSenderStreetTextChanged() - txtSenderPostCodeTextChanged() - txtSenderStateTextChanged() - txtSenderCityTextChanged() + self.txtSenderNameTextChanged() + self.txtSenderStreetTextChanged() + self.txtSenderPostCodeTextChanged() + self.txtSenderStateTextChanged() + self.txtSenderCityTextChanged() def optCreateLetterItemChanged(self): self.bEditTemplate = False @@ -549,23 +551,23 @@ class LetterWizardDialogImpl(LetterWizardDialog): def txtSenderNameTextChanged(self): myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("Company", txtSenderName.Text) + myFieldHandler.changeUserFieldContent("Company", self.txtSenderName.Text) def txtSenderStreetTextChanged(self): myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("Street", txtSenderStreet.Text) + myFieldHandler.changeUserFieldContent("Street", self.txtSenderStreet.Text) def txtSenderCityTextChanged(self): myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("City", txtSenderCity.Text) + myFieldHandler.changeUserFieldContent("City", self.txtSenderCity.Text) def txtSenderPostCodeTextChanged(self): myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("PostCode", txtSenderPostCode.Text) + myFieldHandler.changeUserFieldContent("PostCode", self.txtSenderPostCode.Text) def txtSenderStateTextChanged(self): myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, txtSenderState.Text) + myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, self.txtSenderState.Text) def txtTemplateNameTextChanged(self): xDocProps = self.xTextDocument.DocumentProperties @@ -825,7 +827,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.setRoadmapComplete(True) self.setCurrentRoadmapItemID(1) - class myPathSelectionListener: + class myPathSelectionListener(XPathSelectionListener): def validatePath(self): if self.myPathSelection.usedPathPicker: @@ -839,7 +841,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.myPathSelection.sDefaultDirectory = self.sUserTemplatePath self.myPathSelection.sDefaultName = "myLetterTemplate.ott" self.myPathSelection.sDefaultFilter = "writer8_template" - self.myPathSelection.addSelectionListener(None) + self.myPathSelection.addSelectionListener(self.myPathSelectionListener()) def initConfiguration(self): try: diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.py b/wizards/com/sun/star/wizards/text/ViewHandler.py index 32533aabc..d449f3cd4 100644 --- a/wizards/com/sun/star/wizards/text/ViewHandler.py +++ b/wizards/com/sun/star/wizards/text/ViewHandler.py @@ -30,9 +30,8 @@ class ViewHandler(object): exception.printStackTrace(System.out) def setViewSetting(self, Setting, Value): - setattr(self.xTextViewCursorSupplier.ViewSettings, Setting, Value) + self.xTextViewCursorSupplier.ViewSettings.setPropertyValue(Setting, Value) def collapseViewCursorToStart(self): xTextViewCursor = self.xTextViewCursorSupplier.ViewCursor xTextViewCursor.collapseToStart() - -- cgit v1.2.3 From 5eb1d4e5bb4be75299323e94b07c0a694297e1d9 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 3 Jul 2011 00:55:52 +0100 Subject: callcatcher: unused xmlstr_to_ous --- xmlsecurity/source/xmlsec/saxhelper.cxx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx index dab28ff9e..1af8b9e79 100644 --- a/xmlsecurity/source/xmlsec/saxhelper.cxx +++ b/xmlsecurity/source/xmlsec/saxhelper.cxx @@ -79,21 +79,6 @@ rtl::OUString xmlchar_to_ous( const xmlChar* pChar, int length ) } } -/** - * The input parameter is NULL terminated - */ -rtl::OUString xmlstr_to_ous( const xmlChar* pStr ) -{ - if( pStr != NULL ) - { - return xmlchar_to_ous( pStr , xmlStrlen( pStr ) ) ; - } - else - { - return rtl::OUString() ; - } -} - /** * The return value and the referenced value must be NULL terminated. * The application has the responsibilty to deallocte the return value. -- cgit v1.2.3 From 3b4fe490441f9f77829bc6c1ae30d79a4d50255b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 3 Jul 2011 01:09:39 +0100 Subject: callcatcher: unused MenuMENU_CLIENT --- automation/source/miniapp/servres.cxx | 6 ------ automation/source/miniapp/servres.hxx | 7 ------- 2 files changed, 13 deletions(-) diff --git a/automation/source/miniapp/servres.cxx b/automation/source/miniapp/servres.cxx index 5e10e805d..a4b7a5df3 100644 --- a/automation/source/miniapp/servres.cxx +++ b/automation/source/miniapp/servres.cxx @@ -53,10 +53,4 @@ ModalDialogGROSSER_TEST_DLG::ModalDialogGROSSER_TEST_DLG( Window * pParent, cons if( bFreeRes ) FreeResource(); } -MenuMENU_CLIENT::MenuMENU_CLIENT( const ResId & rResId, sal_Bool ) - : MenuBar( rResId ) -{ - // No subresources, automatic free resource -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/miniapp/servres.hxx b/automation/source/miniapp/servres.hxx index f000dffd2..318ffd885 100644 --- a/automation/source/miniapp/servres.hxx +++ b/automation/source/miniapp/servres.hxx @@ -55,11 +55,4 @@ public: ModalDialogGROSSER_TEST_DLG( Window * pParent, const ResId & rResId, sal_Bool bFreeRes = sal_True ); }; -class MenuMENU_CLIENT : public MenuBar -{ -protected: -public: - MenuMENU_CLIENT( const ResId & rResId, sal_Bool bFreeRes = sal_True ); -}; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3 From 6ae4e4b6445c186e1591d413008596a702dd3aaa Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 4 Jul 2011 12:01:08 +0200 Subject: apply python style and fix some minor things --- wizards/com/sun/star/wizards/fax/FaxDocument.py | 48 +- .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 14 +- .../com/sun/star/wizards/letter/LetterDocument.py | 277 +++-- .../sun/star/wizards/letter/LetterWizardDialog.py | 1184 ++++++++++++++++++-- .../star/wizards/letter/LetterWizardDialogImpl.py | 1015 +++++++++++------ .../wizards/letter/LetterWizardDialogResources.py | 243 +++- wizards/com/sun/star/wizards/text/TextDocument.py | 62 +- wizards/com/sun/star/wizards/text/ViewHandler.py | 2 +- 8 files changed, 2220 insertions(+), 625 deletions(-) diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py index a744a7cd3..9ee53cd43 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.py +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -20,29 +20,30 @@ class FaxDocument(TextDocument): def switchElement(self, sElement, bState): try: mySectionHandler = TextSectionHandler(self.xMSF, - self.xTextDocument) + TextDocument.xTextDocument) oSection = \ mySectionHandler.xTextDocument.TextSections.getByName(sElement) Helper.setUnoPropertyValue(oSection,"IsVisible",bState) - except Exception, exception: + except Exception: traceback.print_exc() def updateDateFields(self): - FH = TextFieldHandler(self.xTextDocument, self.xTextDocument) + FH = TextFieldHandler( + TextDocument.xTextDocument, TextDocument.xTextDocument) FH.updateDateFields() def switchFooter(self, sPageStyle, bState, bPageNumber, sText): - if self.xTextDocument is not None: - self.xTextDocument.lockControllers() + if TextDocument.xTextDocument is not None: + TextDocument.xTextDocument.lockControllers() try: - xPageStyleCollection = \ - self.xTextDocument.StyleFamilies.getByName("PageStyles") + TextDocument.xTextDocument.StyleFamilies.getByName("PageStyles") xPageStyle = xPageStyleCollection.getByName(sPageStyle) if bState: xPageStyle.setPropertyValue("FooterIsOn", True) - xFooterText = Helper.getUnoPropertyValue(xPageStyle, "FooterText") + xFooterText = \ + Helper.getUnoPropertyValue(xPageStyle, "FooterText") xFooterText.String = sText if bPageNumber: @@ -53,8 +54,9 @@ class FaxDocument(TextDocument): PARAGRAPH_BREAK, False) myCursor.setPropertyValue("ParaAdjust", CENTER ) - xPageNumberField = self.xTextDocument.createInstance( - "com.sun.star.text.TextField.PageNumber") + xPageNumberField = \ + TextDocument.xTextDocument.createInstance( + "com.sun.star.text.TextField.PageNumber") xPageNumberField.setPropertyValue("SubType", CURRENT) xPageNumberField.NumberingType = ARABIC xFooterText.insertTextContent(xFooterText.End, @@ -63,20 +65,21 @@ class FaxDocument(TextDocument): Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", False) - self.xTextDocument.unlockControllers() - except Exception, exception: + TextDocument.xTextDocument.unlockControllers() + except Exception: traceback.print_exc() def hasElement(self, sElement): - if self.xTextDocument is not None: + if TextDocument.xTextDocument is not None: mySectionHandler = TextSectionHandler(self.xMSF, - self.xTextDocument) + TextDocument.xTextDocument) return mySectionHandler.hasTextSectionByName(sElement) else: return False def switchUserField(self, sFieldName, sNewContent, bState): - myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) + myFieldHandler = TextFieldHandler( + self.xMSF, TextDocument.xTextDocument) if bState: myFieldHandler.changeUserFieldContent(sFieldName, sNewContent) else: @@ -84,8 +87,8 @@ class FaxDocument(TextDocument): def fillSenderWithUserData(self): try: - myFieldHandler = TextFieldHandler(self.xTextDocument, - self.xTextDocument) + myFieldHandler = TextFieldHandler(TextDocument.xTextDocument, + TextDocument.xTextDocument) oUserDataAccess = Configuration.getConfigurationRoot( self.xMSF, "org.openoffice.UserProfile/Data", False) myFieldHandler.changeUserFieldContent("Company", @@ -102,26 +105,27 @@ class FaxDocument(TextDocument): myFieldHandler.changeUserFieldContent("Fax", Helper.getUnoObjectbyName(oUserDataAccess, "facsimiletelephonenumber")) - except Exception, exception: + except Exception: traceback.print_exc() def killEmptyUserFields(self): - myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) + myFieldHandler = TextFieldHandler( + self.xMSF, TextDocument.xTextDocument) myFieldHandler.removeUserFieldByContent("") def killEmptyFrames(self): try: if not self.keepLogoFrame: xTF = self.getFrameByName("Company Logo", - self.xTextDocument) + TextDocument.xTextDocument) if xTF is not None: xTF.dispose() if not self.keepTypeFrame: xTF = self.getFrameByName("Communication Type", - self.xTextDocument) + TextDocument.xTextDocument) if xTF is not None: xTF.dispose() - except Exception, e: + except Exception: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 5564283d7..f4495e255 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -164,7 +164,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.myFaxDoc.keepTypeFrame = \ (self.chkUseCommunicationType.State is not 0) self.myFaxDoc.killEmptyFrames() - self.bSaveSuccess = OfficeDocument.store(self.xMSF, self.xTextDocument, + self.bSaveSuccess = OfficeDocument.store(self.xMSF, TextDocument.xTextDocument, self.sPath, "writer8_template") if self.bSaveSuccess: self.saveConfiguration() @@ -440,7 +440,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.__enableSenderReceiver() self.__setPossibleFooter(True) def lstBusinessStyleItemChanged(self): - self.xTextDocument = self.myFaxDoc.loadAsPreview( \ + TextDocument.xTextDocument = self.myFaxDoc.loadAsPreview( \ self.BusinessFiles[1][self.lstBusinessStyle.SelectedItemPos], False) self.initializeElements() @@ -462,14 +462,14 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.__setPossibleFooter(False) def lstPrivateStyleItemChanged(self): - self.xTextDocument = self.myFaxDoc.loadAsPreview( \ + TextDocument.xTextDocument = self.myFaxDoc.loadAsPreview( \ self.PrivateFiles[1][self.lstPrivateStyle.SelectedItemPos], False) self.initializeElements() self.setElements() def txtTemplateNameTextChanged(self): - xDocProps = self.xTextDocument.DocumentProperties + xDocProps = TextDocument.xTextDocument.DocumentProperties xDocProps.Title = self.txtTemplateName.Text def optSenderPlaceholderItemChanged(self): @@ -518,7 +518,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): PropertyNames.PROPERTY_ENABLED, True) self.myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, - self.xTextDocument) + TextDocument.xTextDocument) self.txtSenderNameTextChanged() self.txtSenderStreetTextChanged() self.txtSenderPostCodeTextChanged() @@ -527,11 +527,11 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.txtSenderFaxTextChanged() def optReceiverPlaceholderItemChanged(self): - OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", + OfficeDocument.attachEventCall(TextDocument.xTextDocument, "OnNew", "StarBasic", "macro:#/Template.Correspondence.Placeholder()") def optReceiverDatabaseItemChanged(self): - OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", + OfficeDocument.attachEventCall(TextDocument.xTextDocument, "OnNew", "StarBasic", "macro:#/Template.Correspondence.Database()") def optCreateFaxItemChanged(self): diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.py b/wizards/com/sun/star/wizards/letter/LetterDocument.py index 2d630ae64..b5a172f88 100644 --- a/wizards/com/sun/star/wizards/letter/LetterDocument.py +++ b/wizards/com/sun/star/wizards/letter/LetterDocument.py @@ -1,14 +1,25 @@ from text.TextDocument import * from text.TextSectionHandler import TextSectionHandler +from text.TextFieldHandler import TextFieldHandler +from com.sun.star.table import BorderLine from common.PropertyNames import PropertyNames from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK from com.sun.star.style.ParagraphAdjust import CENTER from com.sun.star.text.PageNumberType import CURRENT from com.sun.star.style.NumberingType import ARABIC +from com.sun.star.text.HoriOrientation import NONE as NONEHORI +from com.sun.star.text.VertOrientation import NONE as NONEVERT +from com.sun.star.text.RelOrientation import PAGE_FRAME +from com.sun.star.text.TextContentAnchorType import AT_PAGE +from com.sun.star.text.SizeType import FIX +from com.sun.star.text.WrapTextMode import THROUGHT +from com.sun.star.awt.FontWeight import BOLD class LetterDocument(TextDocument): + TextDocument = None + def __init__(self, xMSF, listener): super(LetterDocument,self).__init__(xMSF, listener, None, "WIZARD_LIVE_PREVIEW") @@ -20,53 +31,65 @@ class LetterDocument(TextDocument): def switchElement(self, sElement, bState): try: - mySectionHandler = TextSectionHandler(self.xMSF, self.xTextDocument) - oSection = mySectionHandler.xTextDocument.TextSections.getByName(sElement) + mySectionHandler = TextSectionHandler( + self.xMSF, TextDocument.xTextDocument) + oSection = \ + mySectionHandler.xTextDocument.TextSections.getByName(sElement) Helper.setUnoPropertyValue(oSection, "IsVisible", bState) - except Exception, exception: + except Exception: traceback.print_exc() def updateDateFields(self): - FH = TextFieldHandler(self.xTextDocument, self.xTextDocument) + FH = TextFieldHandler( + TextDocument.xTextDocument, TextDocument.xTextDocument) FH.updateDateFields() def switchFooter(self, sPageStyle, bState, bPageNumber, sText): - if self.xTextDocument is not None: - self.xTextDocument.lockControllers() + if TextDocument.xTextDocument != None: try: - xNameAccess = self.xTextDocument.StyleFamilies + TextDocument.xTextDocument.lockControllers() + xNameAccess = TextDocument.xTextDocument.StyleFamilies xPageStyleCollection = xNameAccess.getByName("PageStyles") xPageStyle = xPageStyleCollection.getByName(sPageStyle) if bState: - Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn",True) - xFooterText = Helper.getUnoPropertyValue(xPageStyle, "FooterText") + Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", True) + xFooterText = \ + Helper.getUnoPropertyValue(xPageStyle, "FooterText") xFooterText.String = sText if bPageNumber: #Adding the Page Number - myCursor = xFooterText.createTextCursor() + myCursor = xFooterText.Text.createTextCursor() myCursor.gotoEnd(False) - xFooterText.insertControlCharacter(myCursor, PARAGRAPH_BREAK, False) - myCursor.setPropertyValue("ParaAdjust", CENTER) - xPageNumberField = self.xTextDocument.createInstance("com.sun.star.text.TextField.PageNumber") + xFooterText.insertControlCharacter(myCursor, + PARAGRAPH_BREAK, False) + myCursor.setPropertyValue("ParaAdjust", CENTER ) + + xPageNumberField = \ + TextDocument.xTextDocument.createInstance( + "com.sun.star.text.TextField.PageNumber") xPageNumberField.setPropertyValue("SubType", CURRENT) - xPageNumberField.setPropertyValue("NumberingType", ARABIC) - xFooterText.insertTextContent(xFooterText.getEnd(), xPageNumberField, False) + xPageNumberField.NumberingType = ARABIC + xFooterText.insertTextContent(xFooterText.End, + xPageNumberField, False) + else: - Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", False) + Helper.setUnoPropertyValue( + xPageStyle, "FooterIsOn", False) - self.xTextDocument.unlockControllers() - except Exception, exception: + TextDocument.xTextDocument.unlockControllers() + except Exception: traceback.print_exc() def hasElement(self, sElement): - if self.xTextDocument is not None: - SH = TextSectionHandler(self.xMSF, self.xTextDocument) + if TextDocument.xTextDocument != None: + SH = TextSectionHandler(self.xMSF, TextDocument.xTextDocument) return SH.hasTextSectionByName(sElement) else: return False def switchUserField(self, sFieldName, sNewContent, bState): - myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) + myFieldHandler = TextFieldHandler( + self.xMSF, TextDocument.xTextDocument) if bState: myFieldHandler.changeUserFieldContent(sFieldName, sNewContent) else: @@ -74,107 +97,163 @@ class LetterDocument(TextDocument): def fillSenderWithUserData(self): try: - myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) - oUserDataAccess = Configuration.getConfigurationRoot(self.xMSF, "org.openoffice.UserProfile/Data", False) - myFieldHandler.changeUserFieldContent("Company", Helper.getUnoObjectbyName(oUserDataAccess, "o")) - myFieldHandler.changeUserFieldContent("Street", Helper.getUnoObjectbyName(oUserDataAccess, "street")) - myFieldHandler.changeUserFieldContent("PostCode", Helper.getUnoObjectbyName(oUserDataAccess, "postalcode")) - myFieldHandler.changeUserFieldContent("City", Helper.getUnoObjectbyName(oUserDataAccess, "l")) - myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, Helper.getUnoObjectbyName(oUserDataAccess, "st")) - except Exception, exception: + myFieldHandler = TextFieldHandler( + TextDocument.xTextDocument, TextDocument.xTextDocument) + oUserDataAccess = Configuration.getConfigurationRoot( + self.xMSF, "org.openoffice.UserProfile/Data", False) + myFieldHandler.changeUserFieldContent( + "Company", Helper.getUnoObjectbyName(oUserDataAccess, "o")) + myFieldHandler.changeUserFieldContent( + "Street", Helper.getUnoObjectbyName(oUserDataAccess, "street")) + myFieldHandler.changeUserFieldContent( + "PostCode", + Helper.getUnoObjectbyName(oUserDataAccess, "postalcode")) + myFieldHandler.changeUserFieldContent( + "City", Helper.getUnoObjectbyName(oUserDataAccess, "l")) + myFieldHandler.changeUserFieldContent( + PropertyNames.PROPERTY_STATE, + Helper.getUnoObjectbyName(oUserDataAccess, "st")) + except Exception: traceback.print_exc() def killEmptyUserFields(self): - myFieldHandler = TextFieldHandle(self.xMSF, self.xTextDocument) + myFieldHandler = TextFieldHandler( + self.xMSF, TextDocument.xTextDocument) myFieldHandler.removeUserFieldByContent("") def killEmptyFrames(self): try: if not self.keepLogoFrame: - xTF = TextFrameHandler.getFrameByName("Company Logo", self.xTextDocument) - if xTF is not None: - xTF.dispose() + xTF = self.getFrameByName( + "Company Logo", TextDocument.xTextDocument) + if xTF != None: + xTF.dispose() if not self.keepBendMarksFrame: - xTF = TextFrameHandler.getFrameByName("Bend Marks", self.xTextDocument) - if xTF is not None: - xTF.dispose() + xTF = self.getFrameByName( + "Bend Marks", TextDocument.xTextDocument) + if xTF != None: + xTF.dispose() if not self.keepLetterSignsFrame: - xTF = TextFrameHandler.getFrameByName("Letter Signs", self.xTextDocument) - if xTF is not None: - xTF.dispose() + xTF = self.getFrameByName( + "Letter Signs", TextDocument.xTextDocument) + if xTF != None: + xTF.dispose() if not self.keepSenderAddressRepeatedFrame: - xTF = TextFrameHandler.getFrameByName("Sender Address Repeated", self.xTextDocument) - if xTF is not None: - xTF.dispose() + xTF = self.getFrameByName( + "Sender Address Repeated", TextDocument.xTextDocument) + if xTF != None: + xTF.dispose() if not self.keepAddressFrame: - xTF = TextFrameHandler.getFrameByName("Sender Address", self.xTextDocument) - if xTF is not None: - xTF.dispose() + xTF = self.getFrameByName( + "Sender Address", TextDocument.xTextDocument) + if xTF != None: + xTF.dispose() - except Exception, e: + except Exception: traceback.print_exc() -class BusinessPaperObject(object): + class BusinessPaperObject(object): - def __init__(self, FrameText, Width, Height, XPos, YPos): - self.iWidth = Width - self.iHeight = Height - self.iXPos = XPos - self.iYPos = YPos + xFrame = None - try: - xFrame = self.xTextDocument.createInstance("com.sun.star.text.TextFrame") - self.setFramePosition() - Helper.setUnoPropertyValue(xFrame, "AnchorType", TextContentAnchorType.AT_PAGE) - Helper.setUnoPropertyValue(xFrame, "SizeType", SizeType.FIX) - - Helper.setUnoPropertyValue(xFrame, "TextWrap", WrapTextMode.THROUGHT) - Helper.setUnoPropertyValue(xFrame, "Opaque", Boolean.TRUE) - Helper.setUnoPropertyValue(xFrame, "BackColor", 15790320) - - myBorder = BorderLine() - myBorder.OuterLineWidth = 0 - Helper.setUnoPropertyValue(xFrame, "LeftBorder", myBorder) - Helper.setUnoPropertyValue(xFrame, "RightBorder", myBorder) - Helper.setUnoPropertyValue(xFrame, "TopBorder", myBorder) - Helper.setUnoPropertyValue(xFrame, "BottomBorder", myBorder) - Helper.setUnoPropertyValue(xFrame, "Print", False) - - xTextCursor = self.xTextDocument.Text.createTextCursor() - xTextCursor.gotoEnd(True) - xText = self.xTextDocument.Text - xText.insertTextContent(xTextCursor, xFrame, False) - - xFrameText = xFrame.Text - xFrameCursor = xFrameText.createTextCursor() - xFrameCursor.setPropertyValue("CharWeight", com.sun.star.awt.FontWeight.BOLD) - xFrameCursor.setPropertyValue("CharColor", 16777215) - xFrameCursor.setPropertyValue("CharFontName", "Albany") - xFrameCursor.setPropertyValue("CharHeight", 18) - - xFrameText.insertString(xFrameCursor, FrameText, False) + def __init__(self, FrameText, Width, Height, XPos, YPos): + self.iWidth = Width + self.iHeight = Height + self.iXPos = XPos + self.iYPos = YPos + try: + LetterDocument.BusinessPaperObject.xFrame = \ + TextDocument.xTextDocument.createInstance( + "com.sun.star.text.TextFrame") + self.setFramePosition() + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "AnchorType", AT_PAGE) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "SizeType", FIX) - except Exception: - traceback.print_exc() + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "TextWrap", THROUGHT) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "Opaque", True); + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "BackColor", 15790320) - def setFramePosition(self): - Helper.setUnoPropertyValue(xFrame, "HoriOrient", HoriOrientation.NONE) - Helper.setUnoPropertyValue(xFrame, "VertOrient", VertOrientation.NONE) - Helper.setUnoPropertyValue(xFrame, PropertyNames.PROPERTY_HEIGHT, iHeight) - Helper.setUnoPropertyValue(xFrame, PropertyNames.PROPERTY_WIDTH, iWidth) - Helper.setUnoPropertyValue(xFrame, "HoriOrientPosition", iXPos) - Helper.setUnoPropertyValue(xFrame, "VertOrientPosition", iYPos) - Helper.setUnoPropertyValue(xFrame, "HoriOrientRelation", RelOrientation.PAGE_FRAME) - Helper.setUnoPropertyValue(xFrame, "VertOrientRelation", RelOrientation.PAGE_FRAME) - - def removeFrame(self): - if xFrame is not None: - try: - self.xTextDocument.Text.removeTextContent(xFrame) + myBorder = BorderLine() + myBorder.OuterLineWidth = 0 + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "LeftBorder", myBorder) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "RightBorder", myBorder) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "TopBorder", myBorder) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "BottomBorder", myBorder) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "Print", False) + + xTextCursor = \ + TextDocument.xTextDocument.Text.createTextCursor() + xTextCursor.gotoEnd(True) + xText = TextDocument.xTextDocument.Text + xText.insertTextContent( + xTextCursor, LetterDocument.BusinessPaperObject.xFrame, + False) + + xFrameText = LetterDocument.BusinessPaperObject.xFrame.Text + xFrameCursor = xFrameText.createTextCursor() + xFrameCursor.setPropertyValue("CharWeight", BOLD) + xFrameCursor.setPropertyValue("CharColor", 16777215) + xFrameCursor.setPropertyValue("CharFontName", "Albany") + xFrameCursor.setPropertyValue("CharHeight", 18) + + xFrameText.insertString(xFrameCursor, FrameText, False) except Exception: traceback.print_exc() + def setFramePosition(self): + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "HoriOrient", NONEHORI) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "VertOrient", NONEVERT) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + PropertyNames.PROPERTY_HEIGHT, self.iHeight) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + PropertyNames.PROPERTY_WIDTH, self.iWidth) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "HoriOrientPosition", self.iXPos) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "VertOrientPosition", self.iYPos) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "HoriOrientRelation", PAGE_FRAME) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "VertOrientRelation", PAGE_FRAME) + + def removeFrame(self): + if LetterDocument.BusinessPaperObject.xFrame is not None: + try: + TextDocument.xTextDocument.Text.removeTextContent( + LetterDocument.BusinessPaperObject.xFrame) + except Exception: + traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py index f2fa2f593..ac87206f2 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py @@ -10,7 +10,21 @@ class LetterWizardDialog(WizardDialog): super(LetterWizardDialog, self).__init__(xmsf, HIDMAIN ) self.resources = LetterWizardDialogResources(xmsf) - Helper.setUnoPropertyValues(self.xDialogModel, ("Closeable", PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH), (True, 210, True, "LetterWizardDialog", 104, 52, 1, 1, self.resources.resLetterWizardDialog_title, 310)) + Helper.setUnoPropertyValues( + self.xDialogModel, + ("Closeable", + PropertyNames.PROPERTY_HEIGHT, + "Moveable", + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Title", + PropertyNames.PROPERTY_WIDTH), + (True, 210, True, + "LetterWizardDialog", 104, 52, 1, 1, + self.resources.resLetterWizardDialog_title, 310)) self.fontDescriptor1 = \ uno.createUnoStruct('com.sun.star.awt.FontDescriptor') self.fontDescriptor2 = \ @@ -26,94 +40,1102 @@ class LetterWizardDialog(WizardDialog): self.fontDescriptor6.Weight = 150 def buildStep1(self): - self.optBusinessLetter = self.insertRadioButton("optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 1), self.resources.resoptBusinessLetter_value, "optBusinessLetter", 97, 28, 1, 1, 184), self) - self.optPrivOfficialLetter = self.insertRadioButton("optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 2), self.resources.resoptPrivOfficialLetter_value, "optPrivOfficialLetter", 97, 74, 1, 2, 184), self) - self.optPrivateLetter = self.insertRadioButton("optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 3), self.resources.resoptPrivateLetter_value, "optPrivateLetter", 97, 106, 1, 3, 184), self) - self.lstBusinessStyle = self.insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 4), "lstBusinessStyle", 180, 40, 1, 4, 74), self) - self.chkBusinessPaper = self.insertCheckBox("chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 5), self.resources.reschkBusinessPaper_value, "chkBusinessPaper", 110, 56, 0, 1, 5, 168), self) - self.lstPrivOfficialStyle = self.insertListBox("lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, LSTPRIVOFFICIALSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 6), "lstPrivOfficialStyle", 180, 86, 1, 6, 74), self) - self.lstPrivateStyle = self.insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 7), "lstPrivateStyle", 180, 118, 1, 7, 74), self) - self.lblBusinessStyle = self.insertLabel("lblBusinessStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblBusinessStyle_value, "lblBusinessStyle", 110, 42, 1, 48, 60)) - self.lblPrivOfficialStyle = self.insertLabel("lblPrivOfficialStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPrivOfficialStyle_value, "lblPrivOfficialStyle", 110, 88, 1, 49, 60)) - self.lblTitle1 = self.insertLabel("lblTitle1", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle1_value, True, "lblTitle1", 91, 8, 1, 55, 212)) - self.lblPrivateStyle = self.insertLabel("lblPrivateStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPrivateStyle_value, "lblPrivateStyle", 110, 120, 1, 74, 60)) - self.lblIntroduction = self.insertLabel("lblIntroduction", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (39, self.resources.reslblIntroduction_value, True, "lblIntroduction", 104, 145, 1, 80, 199)) + self.optBusinessLetter = self.insertRadioButton( + "optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 1), + self.resources.resoptBusinessLetter_value, + "optBusinessLetter", 97, 28, 1, 1, 184), self) + self.optPrivOfficialLetter = self.insertRadioButton( + "optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 2), + self.resources.resoptPrivOfficialLetter_value, + "optPrivOfficialLetter", 97, 74, 1, 2, 184), self) + self.optPrivateLetter = self.insertRadioButton( + "optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 3), + self.resources.resoptPrivateLetter_value, + "optPrivateLetter", 97, 106, 1, 3, 184), self) + self.lstBusinessStyle = self.insertListBox( + "lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, + LSTBUSINESSSTYLE_ITEM_CHANGED, + ("Dropdown", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, HelpIds.getHelpIdString(HID + 4), + "lstBusinessStyle", + 180, 40, 1, 4, 74), self) + self.chkBusinessPaper = self.insertCheckBox( + "chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 5), + self.resources.reschkBusinessPaper_value, + "chkBusinessPaper", 110, 56, 0, 1, 5, 168), self) + self.lstPrivOfficialStyle = self.insertListBox( + "lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, + LSTPRIVOFFICIALSTYLE_ITEM_CHANGED, + ("Dropdown", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, HelpIds.getHelpIdString(HID + 6), + "lstPrivOfficialStyle", 180, 86, 1, 6, 74), self) + self.lstPrivateStyle = self.insertListBox( + "lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, + LSTPRIVATESTYLE_ITEM_CHANGED, + ("Dropdown", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, HelpIds.getHelpIdString(HID + 7), + "lstPrivateStyle", 180, 118, 1, 7, 74), self) + self.lblBusinessStyle = self.insertLabel( + "lblBusinessStyle", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblBusinessStyle_value, + "lblBusinessStyle", 110, 42, 1, 48, 60)) + self.lblPrivOfficialStyle = self.insertLabel( + "lblPrivOfficialStyle", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblPrivOfficialStyle_value, + "lblPrivOfficialStyle", 110, 88, 1, 49, 60)) + self.lblTitle1 = self.insertLabel( + "lblTitle1", + ("FontDescriptor", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor6, 16, + self.resources.reslblTitle1_value, True, + "lblTitle1", 91, 8, 1, 55, 212)) + self.lblPrivateStyle = self.insertLabel( + "lblPrivateStyle", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblPrivateStyle_value, + "lblPrivateStyle", 110, 120, 1, 74, 60)) + self.lblIntroduction = self.insertLabel( + "lblIntroduction", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (39, self.resources.reslblIntroduction_value, + True, + "lblIntroduction", 104, 145, 1, 80, 199)) self.ImageControl3 = self.insertInfoImage(92, 145, 1) def buildStep2(self): - self.chkPaperCompanyLogo = self.insertCheckBox("chkPaperCompanyLogo", CHKPAPERCOMPANYLOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 8), self.resources.reschkPaperCompanyLogo_value, "chkPaperCompanyLogo", 97, 28, 0, 2, 8, 68), self) - self.numLogoHeight = self.insertNumericField("numLogoHeight", NUMLOGOHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, "StrictFormat", PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 9), "numLogoHeight", 138, 40, True, 2, True, 9, 3, 30), self) - self.numLogoX = self.insertNumericField("numLogoX", NUMLOGOX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 10), "numLogoX", 266, 40, True, 2, 10, 0, 30), self) - self.numLogoWidth = self.insertNumericField("numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 11), "numLogoWidth", 138, 56, True, 2, 11, 3.8, 30), self) - self.numLogoY = self.insertNumericField("numLogoY", NUMLOGOY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 12), "numLogoY", 266, 56, True, 2, 12, -3.4, 30), self) - self.chkPaperCompanyAddress = self.insertCheckBox("chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 13), self.resources.reschkPaperCompanyAddress_value, "chkPaperCompanyAddress", 98, 84, 0, 2, 13, 68), self) - self.numAddressHeight = self.insertNumericField("numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, "StrictFormat", PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 14), "numAddressHeight", 138, 96, True, 2, True, 14, 3, 30), self) - self.numAddressX = self.insertNumericField("numAddressX", NUMADDRESSX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 15), "numAddressX", 266, 96, True, 2, 15, 3.8, 30), self) - self.numAddressWidth = self.insertNumericField("numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 16), "numAddressWidth", 138, 112, True, 2, 16, 13.8, 30), self) - self.numAddressY = self.insertNumericField("numAddressY", NUMADDRESSY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 17), "numAddressY", 266, 112, True, 2, 17, -3.4, 30), self) - self.chkCompanyReceiver = self.insertCheckBox("chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 18), self.resources.reschkCompanyReceiver_value, "chkCompanyReceiver", 103, 131, 0, 2, 18, 185), self) - self.chkPaperFooter = self.insertCheckBox("chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 19), self.resources.reschkPaperFooter_value, "chkPaperFooter", 97, 158, 0, 2, 19, 68), self) - self.numFooterHeight = self.insertNumericField("numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 20), "numFooterHeight", 236, 156, True, 2, 20, 5, 30), self) - self.lblLogoHeight = self.insertLabel("lblLogoHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoHeight_value, "lblLogoHeight", 103, 42, 2, 68, 32)) - self.lblLogoWidth = self.insertLabel("lblLogoWidth", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoWidth_value, "lblLogoWidth", 103, 58, 2, 69, 32)) - self.FixedLine5 = self.insertFixedLine("FixedLine5", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (2, "FixedLine5", 90, 78, 2, 70, 215)) - self.FixedLine6 = self.insertFixedLine("FixedLine6", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (2, "FixedLine6", 90, 150, 2, 71, 215)) - self.lblFooterHeight = self.insertLabel("lblFooterHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblFooterHeight_value, "lblFooterHeight", 200, 158, 2, 72, 32)) - self.lblLogoX = self.insertLabel("lblLogoX", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoX_value, "lblLogoX", 170, 42, 2, 84, 94)) - self.lblLogoY = self.insertLabel("lblLogoY", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoY_value, "lblLogoY", 170, 58, 2, 85, 94)) - self.lblAddressHeight = self.insertLabel("lblAddressHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressHeight_value, "lblAddressHeight", 103, 98, 2, 86, 32)) - self.lblAddressWidth = self.insertLabel("lblAddressWidth", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressWidth_value, "lblAddressWidth", 103, 114, 2, 87, 32)) - self.lblAddressX = self.insertLabel("lblAddressX", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressX_value, "lblAddressX", 170, 98, 2, 88, 94)) - self.lblAddressY = self.insertLabel("lblAddressY", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressY_value, "lblAddressY", 170, 114, 2, 89, 94)) - self.lblTitle2 = self.insertLabel("lblTitle2", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle2_value, True, "lblTitle2", 91, 8, 2, 91, 212)) + self.chkPaperCompanyLogo = self.insertCheckBox( + "chkPaperCompanyLogo", + CHKPAPERCOMPANYLOGO_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 8), + self.resources.reschkPaperCompanyLogo_value, + "chkPaperCompanyLogo", 97, 28, 0, 2, 8, 68), self) + self.numLogoHeight = self.insertNumericField( + "numLogoHeight", + NUMLOGOHEIGHT_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + "StrictFormat", + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 9), + "numLogoHeight", 138, 40, True, 2, True, 9, 3, 30), self) + self.numLogoX = self.insertNumericField( + "numLogoX", NUMLOGOX_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 10), + "numLogoX", 266, 40, True, 2, 10, 0, 30), self) + self.numLogoWidth = self.insertNumericField( + "numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 11), + "numLogoWidth", 138, 56, True, 2, 11, 3.8, 30), self) + self.numLogoY = self.insertNumericField( + "numLogoY", NUMLOGOY_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 12), + "numLogoY", 266, 56, True, 2, 12, -3.4, 30), self) + self.chkPaperCompanyAddress = self.insertCheckBox( + "chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 13), + self.resources.reschkPaperCompanyAddress_value, + "chkPaperCompanyAddress", 98, 84, 0, 2, 13, 68), self) + self.numAddressHeight = self.insertNumericField( + "numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + "StrictFormat", + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 14), + "numAddressHeight", 138, 96, True, 2, True, 14, 3, 30), self) + self.numAddressX = self.insertNumericField( + "numAddressX", NUMADDRESSX_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 15), + "numAddressX", 266, 96, True, 2, 15, 3.8, 30), self) + self.numAddressWidth = self.insertNumericField( + "numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 16), + "numAddressWidth", 138, 112, True, 2, 16, 13.8, 30), self) + self.numAddressY = self.insertNumericField( + "numAddressY", NUMADDRESSY_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 17), + "numAddressY", 266, 112, True, 2, 17, -3.4, 30), self) + self.chkCompanyReceiver = self.insertCheckBox( + "chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 18), + self.resources.reschkCompanyReceiver_value, + "chkCompanyReceiver", 103, 131, 0, 2, 18, 185), self) + self.chkPaperFooter = self.insertCheckBox( + "chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 19), + self.resources.reschkPaperFooter_value, + "chkPaperFooter", 97, 158, 0, 2, 19, 68), self) + self.numFooterHeight = self.insertNumericField( + "numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 20), + "numFooterHeight", 236, 156, True, 2, 20, 5, 30), self) + self.lblLogoHeight = self.insertLabel( + "lblLogoHeight", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblLogoHeight_value, + "lblLogoHeight", 103, 42, 2, 68, 32)) + self.lblLogoWidth = self.insertLabel( + "lblLogoWidth", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblLogoWidth_value, + "lblLogoWidth", 103, 58, 2, 69, 32)) + self.FixedLine5 = self.insertFixedLine( + "FixedLine5", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (2, + "FixedLine5", 90, 78, 2, 70, 215)) + self.FixedLine6 = self.insertFixedLine( + "FixedLine6", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (2, + "FixedLine6", 90, 150, 2, 71, 215)) + self.lblFooterHeight = self.insertLabel( + "lblFooterHeight", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblFooterHeight_value, + "lblFooterHeight", 200, 158, 2, 72, 32)) + self.lblLogoX = self.insertLabel( + "lblLogoX", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblLogoX_value, + "lblLogoX", 170, 42, 2, 84, 94)) + self.lblLogoY = self.insertLabel( + "lblLogoY", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblLogoY_value, + "lblLogoY", 170, 58, 2, 85, 94)) + self.lblAddressHeight = self.insertLabel( + "lblAddressHeight", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblAddressHeight_value, + "lblAddressHeight", 103, 98, 2, 86, 32)) + self.lblAddressWidth = self.insertLabel( + "lblAddressWidth", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblAddressWidth_value, + "lblAddressWidth", 103, 114, 2, 87, 32)) + self.lblAddressX = self.insertLabel( + "lblAddressX", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblAddressX_value, + "lblAddressX", 170, 98, 2, 88, 94)) + self.lblAddressY = self.insertLabel( + "lblAddressY", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblAddressY_value, + "lblAddressY", 170, 114, 2, 89, 94)) + self.lblTitle2 = self.insertLabel( + "lblTitle2", + ("FontDescriptor", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor6, 16, + self.resources.reslblTitle2_value, True, + "lblTitle2", 91, 8, 2, 91, 212)) def buildStep3(self): - self.lstLetterNorm = self.insertListBox("lstLetterNorm", LSTLETTERNORM_ACTION_PERFORMED, LSTLETTERNORM_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 21), "lstLetterNorm", 210, 34, 3, 21, 74), self) - self.chkUseLogo = self.insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 22), self.resources.reschkUseLogo_value, "chkUseLogo", 97, 54, 0, 3, 22, 212), self) - self.chkUseAddressReceiver = self.insertCheckBox("chkUseAddressReceiver", CHKUSEADDRESSRECEIVER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 23), self.resources.reschkUseAddressReceiver_value, "chkUseAddressReceiver", 97, 69, 0, 3, 23, 212), self) - self.chkUseSigns = self.insertCheckBox("chkUseSigns", CHKUSESIGNS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 24), self.resources.reschkUseSigns_value, "chkUseSigns", 97, 82, 0, 3, 24, 212), self) - self.chkUseSubject = self.insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 25), self.resources.reschkUseSubject_value, "chkUseSubject", 97, 98, 0, 3, 25, 212), self) - self.chkUseSalutation = self.insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 26), self.resources.reschkUseSalutation_value, "chkUseSalutation", 97, 113, 0, 3, 26, 66), self) - self.lstSalutation = self.insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 27), "lstSalutation", 210, 110, 3, 27, 74), self) - self.chkUseBendMarks = self.insertCheckBox("chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 28), self.resources.reschkUseBendMarks_value, "chkUseBendMarks", 97, 127, 0, 3, 28, 212), self) - self.chkUseGreeting = self.insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 29), self.resources.reschkUseGreeting_value, "chkUseGreeting", 97, 142, 0, 3, 29, 66), self) - self.lstGreeting = self.insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 30), "lstGreeting", 210, 141, 3, 30, 74), self) - self.chkUseFooter = self.insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 31), self.resources.reschkUseFooter_value, "chkUseFooter", 97, 158, 0, 3, 31, 212), self) - self.lblLetterNorm = self.insertLabel("lblLetterNorm", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (16, self.resources.reslblLetterNorm_value, True, "lblLetterNorm", 97, 28, 3, 50, 109)) - self.lblTitle3 = self.insertLabel("lblTitle3", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle3_value, True, "lblTitle3", 91, 8, 3, 90, 212)) + self.lstLetterNorm = self.insertListBox( + "lstLetterNorm", + LSTLETTERNORM_ACTION_PERFORMED, + LSTLETTERNORM_ITEM_CHANGED, + ("Dropdown", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, HelpIds.getHelpIdString(HID + 21), + "lstLetterNorm", 210, 34, 3, 21, 74), self) + self.chkUseLogo = self.insertCheckBox( + "chkUseLogo", CHKUSELOGO_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 22), + self.resources.reschkUseLogo_value, + "chkUseLogo", 97, 54, 0, 3, 22, 212), self) + self.chkUseAddressReceiver = self.insertCheckBox( + "chkUseAddressReceiver", + CHKUSEADDRESSRECEIVER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 23), + self.resources.reschkUseAddressReceiver_value, + "chkUseAddressReceiver", 97, 69, 0, 3, 23, 212), self) + self.chkUseSigns = self.insertCheckBox( + "chkUseSigns", CHKUSESIGNS_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 24), + self.resources.reschkUseSigns_value, + "chkUseSigns", 97, 82, 0, 3, 24, 212), self) + self.chkUseSubject = self.insertCheckBox( + "chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 25), + self.resources.reschkUseSubject_value, + "chkUseSubject", 97, 98, 0, 3, 25, 212), self) + self.chkUseSalutation = self.insertCheckBox( + "chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 26), + self.resources.reschkUseSalutation_value, + "chkUseSalutation", 97, 113, 0, 3, 26, 66), self) + self.lstSalutation = self.insertComboBox( + "lstSalutation", + LSTSALUTATION_ACTION_PERFORMED, + LSTSALUTATION_ITEM_CHANGED, + LSTSALUTATION_TEXT_CHANGED, + ("Dropdown", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, HelpIds.getHelpIdString(HID + 27), + "lstSalutation", 210, 110, 3, 27, 74), self) + self.chkUseBendMarks = self.insertCheckBox( + "chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 28), + self.resources.reschkUseBendMarks_value, + "chkUseBendMarks", 97, 127, 0, 3, 28, 212), self) + self.chkUseGreeting = self.insertCheckBox( + "chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 29), + self.resources.reschkUseGreeting_value, + "chkUseGreeting", 97, 142, 0, 3, 29, 66), self) + self.lstGreeting = self.insertComboBox( + "lstGreeting", LSTGREETING_ACTION_PERFORMED, + LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED, + ("Dropdown", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, HelpIds.getHelpIdString(HID + 30), + "lstGreeting", 210, 141, 3, 30, 74), self) + self.chkUseFooter = self.insertCheckBox( + "chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 31), + self.resources.reschkUseFooter_value, + "chkUseFooter", 97, 158, 0, 3, 31, 212), self) + self.lblLetterNorm = self.insertLabel( + "lblLetterNorm", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (16, self.resources.reslblLetterNorm_value, True, + "lblLetterNorm", 97, 28, 3, 50, 109)) + self.lblTitle3 = self.insertLabel( + "lblTitle3", + ( + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor6, 16, + self.resources.reslblTitle3_value, True, + "lblTitle3", 91, 8, 3, 90, 212)) def buildStep4(self): - self.optSenderPlaceholder = self.insertRadioButton("optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 32), self.resources.resoptSenderPlaceholder_value, "optSenderPlaceholder", 104, 42, 4, 32, 149), self) - self.optSenderDefine = self.insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 33), self.resources.resoptSenderDefine_value, "optSenderDefine", 104, 54, 4, 33, 149), self) - self.txtSenderName = self.insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 34), "txtSenderName", 182, 67, 4, 34, 119), self) - self.txtSenderStreet = self.insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 35), "txtSenderStreet", 182, 81, 4, 35, 119), self) - self.txtSenderPostCode = self.insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 36), "txtSenderPostCode", 182, 95, 4, 36, 25), self) - self.txtSenderState = self.insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 37), "txtSenderState", 211, 95, 4, 37, 21), self) - self.txtSenderCity = self.insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 38), "txtSenderCity", 236, 95, 4, 38, 65), self) - self.optReceiverPlaceholder = self.insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 39), self.resources.resoptReceiverPlaceholder_value, "optReceiverPlaceholder", 104, 145, 4, 39, 200), self) - self.optReceiverDatabase = self.insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 40), self.resources.resoptReceiverDatabase_value, "optReceiverDatabase", 104, 157, 4, 40, 200), self) - self.lblSenderAddress = self.insertLabel("lblSenderAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderAddress_value, "lblSenderAddress", 97, 28, 4, 64, 136)) - self.FixedLine2 = self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (5, "FixedLine2", 90, 126, 4, 75, 212)) - self.lblReceiverAddress = self.insertLabel("lblReceiverAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblReceiverAddress_value, "lblReceiverAddress", 97, 134, 4, 76, 136)) - self.lblSenderName = self.insertLabel("lblSenderName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderName_value, "lblSenderName", 113, 69, 4, 77, 68)) - self.lblSenderStreet = self.insertLabel("lblSenderStreet", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderStreet_value, "lblSenderStreet", 113, 82, 4, 78, 68)) - self.lblPostCodeCity = self.insertLabel("lblPostCodeCity", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPostCodeCity_value, "lblPostCodeCity", 113, 97, 4, 79, 68)) - self.lblTitle4 = self.insertLabel("lblTitle4", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle4_value, True, "lblTitle4", 91, 8, 4, 92, 212)) + self.optSenderPlaceholder = self.insertRadioButton( + "optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 32), + self.resources.resoptSenderPlaceholder_value, + "optSenderPlaceholder", 104, 42, 4, 32, 149), self) + self.optSenderDefine = self.insertRadioButton( + "optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 33), + self.resources.resoptSenderDefine_value, + "optSenderDefine", 104, 54, 4, 33, 149), self) + self.txtSenderName = self.insertTextField( + "txtSenderName", TXTSENDERNAME_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 34), + "txtSenderName", 182, 67, 4, 34, 119), self) + self.txtSenderStreet = self.insertTextField( + "txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 35), + "txtSenderStreet", 182, 81, 4, 35, 119), self) + self.txtSenderPostCode = self.insertTextField( + "txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 36), + "txtSenderPostCode", 182, 95, 4, 36, 25), self) + self.txtSenderState = self.insertTextField( + "txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 37), + "txtSenderState", 211, 95, 4, 37, 21), self) + self.txtSenderCity = self.insertTextField( + "txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 38), + "txtSenderCity", 236, 95, 4, 38, 65), self) + self.optReceiverPlaceholder = self.insertRadioButton( + "optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 39), + self.resources.resoptReceiverPlaceholder_value, + "optReceiverPlaceholder", 104, 145, 4, 39, 200), self) + self.optReceiverDatabase = self.insertRadioButton( + "optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 40), + self.resources.resoptReceiverDatabase_value, + "optReceiverDatabase", 104, 157, 4, 40, 200), self) + self.lblSenderAddress = self.insertLabel( + "lblSenderAddress", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblSenderAddress_value, + "lblSenderAddress", 97, 28, 4, 64, 136)) + self.FixedLine2 = self.insertFixedLine( + "FixedLine2", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (5, + "FixedLine2", 90, 126, 4, 75, 212)) + self.lblReceiverAddress = self.insertLabel( + "lblReceiverAddress", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblReceiverAddress_value, + "lblReceiverAddress", 97, 134, 4, 76, 136)) + self.lblSenderName = self.insertLabel( + "lblSenderName", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblSenderName_value, + "lblSenderName", 113, 69, 4, 77, 68)) + self.lblSenderStreet = self.insertLabel( + "lblSenderStreet", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblSenderStreet_value, + "lblSenderStreet", 113, 82, 4, 78, 68)) + self.lblPostCodeCity = self.insertLabel( + "lblPostCodeCity", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblPostCodeCity_value, + "lblPostCodeCity", 113, 97, 4, 79, 68)) + self.lblTitle4 = self.insertLabel( + "lblTitle4", + ( + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor6, 16, + self.resources.reslblTitle4_value, True, + "lblTitle4", 91, 8, 4, 92, 212)) def buildStep5(self): - self.txtFooter = self.insertTextField("txtFooter", TXTFOOTER_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (47, HelpIds.getHelpIdString(HID + 41), True, "txtFooter", 97, 40, 5, 41, 203), self) - self.chkFooterNextPages = self.insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 42), self.resources.reschkFooterNextPages_value, "chkFooterNextPages", 97, 92, 0, 5, 42, 202), self) - self.chkFooterPageNumbers = self.insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 43), self.resources.reschkFooterPageNumbers_value, "chkFooterPageNumbers", 97, 106, 0, 5, 43, 201), self) - self.lblFooter = self.insertLabel("lblFooter", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 8, self.resources.reslblFooter_value, "lblFooter", 97, 28, 5, 52, 116)) - self.lblTitle5 = self.insertLabel("lblTitle5", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle5_value, True, "lblTitle5", 91, 8, 5, 93, 212)) + self.txtFooter = self.insertTextField( + "txtFooter", TXTFOOTER_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (47, HelpIds.getHelpIdString(HID + 41), True, + "txtFooter", 97, 40, 5, 41, 203), self) + self.chkFooterNextPages = self.insertCheckBox( + "chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 42), + self.resources.reschkFooterNextPages_value, + "chkFooterNextPages", 97, 92, 0, 5, 42, 202), self) + self.chkFooterPageNumbers = self.insertCheckBox( + "chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 43), + self.resources.reschkFooterPageNumbers_value, + "chkFooterPageNumbers", 97, 106, 0, 5, 43, 201), self) + self.lblFooter = self.insertLabel( + "lblFooter", + ( + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor5, 8, self.resources.reslblFooter_value, + "lblFooter", 97, 28, 5, 52, 116)) + self.lblTitle5 = self.insertLabel( + "lblTitle5", + ( + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor6, 16, + self.resources.reslblTitle5_value, True, + "lblTitle5", 91, 8, 5, 93, 212)) def buildStep6(self): - self.txtTemplateName = self.insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 44), "txtTemplateName", 202, 56, 6, 44, self.resources.restxtTemplateName_value, 100), self) - self.optCreateLetter = self.insertRadioButton("optCreateLetter", OPTCREATELETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 45), self.resources.resoptCreateLetter_value, "optCreateLetter", 104, 111, 6, 50, 198), self) - self.optMakeChanges = self.insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 46), self.resources.resoptMakeChanges_value, "optMakeChanges", 104, 123, 6, 51, 198), self) - self.lblFinalExplanation1 = self.insertLabel("lblFinalExplanation1", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (26, self.resources.reslblFinalExplanation1_value, True, "lblFinalExplanation1", 97, 28, 6, 52, 205)) - self.lblProceed = self.insertLabel("lblProceed", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblProceed_value, "lblProceed", 97, 100, 6, 53, 204)) - self.lblFinalExplanation2 = self.insertLabel("lblFinalExplanation2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (33, self.resources.reslblFinalExplanation2_value, True, "lblFinalExplanation2", 104, 145, 6, 54, 199)) - self.ImageControl2 = self.insertImage("ImageControl2", ("Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (0, 10, "private:resource/dbu/image/19205", "ImageControl2", 92, 145, False, 6, 66, 10)) - self.lblTemplateName = self.insertLabel("lblTemplateName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblTemplateName_value, "lblTemplateName", 97, 58, 6, 82, 101)) - self.lblTitle6 = self.insertLabel("lblTitle6", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle6_value, True, "lblTitle6", 91, 8, 6, 94, 212)) + self.txtTemplateName = self.insertTextField( + "txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Text", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 44), + "txtTemplateName", 202, 56, 6, 44, + self.resources.restxtTemplateName_value, 100), self) + self.optCreateLetter = self.insertRadioButton( + "optCreateLetter", OPTCREATELETTER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 45), + self.resources.resoptCreateLetter_value, + "optCreateLetter", 104, 111, 6, 50, 198), self) + self.optMakeChanges = self.insertRadioButton( + "optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 46), + self.resources.resoptMakeChanges_value, + "optMakeChanges", 104, 123, 6, 51, 198), self) + self.lblFinalExplanation1 = self.insertLabel( + "lblFinalExplanation1", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (26, self.resources.reslblFinalExplanation1_value, True, + "lblFinalExplanation1", 97, 28, 6, 52, 205)) + self.lblProceed = self.insertLabel( + "lblProceed", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblProceed_value, + "lblProceed", 97, 100, 6, 53, 204)) + self.lblFinalExplanation2 = self.insertLabel( + "lblFinalExplanation2", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (33, self.resources.reslblFinalExplanation2_value, True, + "lblFinalExplanation2", 104, 145, 6, 54, 199)) + self.ImageControl2 = self.insertImage( + "ImageControl2", + ( + "Border", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_IMAGEURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "ScaleImage", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (0, 10, + "private:resource/dbu/image/19205", + "ImageControl2", 92, 145, False, 6, 66, 10)) + self.lblTemplateName = self.insertLabel( + "lblTemplateName", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblTemplateName_value, + "lblTemplateName", 97, 58, 6, 82, 101)) + self.lblTitle6 = self.insertLabel( + "lblTitle6", + ( + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor6, 16, + self.resources.reslblTitle6_value, True, + "lblTitle6", 91, 8, 6, 94, 212)) diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py index f6b61e77a..f1eb6af81 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py @@ -1,6 +1,6 @@ import traceback from LetterWizardDialog import * -from LetterDocument import LetterDocument +from LetterDocument import * from common.NoValidPathException import * from common.FileAccess import * from LocaleCodes import LocaleCodes @@ -12,6 +12,11 @@ from ui.event.RadioDataAware import * from document.OfficeDocument import OfficeDocument from ui.XPathSelectionListener import XPathSelectionListener from text.TextFieldHandler import TextFieldHandler +from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO + +from com.sun.star.view.DocumentZoomType import OPTIMAL +from com.sun.star.document.UpdateDocMode import FULL_UPDATE +from com.sun.star.document.MacroExecMode import ALWAYS_EXECUTE class LetterWizardDialogImpl(LetterWizardDialog): RM_TYPESTYLE = 1 @@ -91,22 +96,28 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.myConfig.cp_PrivateLetter.cp_Norm = oL self.initializeTemplates(xMSF) if self.myConfig.cp_BusinessLetter.cp_Greeting == "": - self.myConfig.cp_BusinessLetter.cp_Greeting = self.resources.GreetingLabels[0] + self.myConfig.cp_BusinessLetter.cp_Greeting = \ + self.resources.GreetingLabels[0] if self.myConfig.cp_BusinessLetter.cp_Salutation == "": - self.myConfig.cp_BusinessLetter.cp_Salutation = self.resources.SalutationLabels[0] + self.myConfig.cp_BusinessLetter.cp_Salutation = \ + self.resources.SalutationLabels[0] if self.myConfig.cp_PrivateOfficialLetter.cp_Greeting == "": - self.myConfig.cp_PrivateOfficialLetter.cp_Greeting = self.resources.GreetingLabels[1] + self.myConfig.cp_PrivateOfficialLetter.cp_Greeting = \ + self.resources.GreetingLabels[1] if self.myConfig.cp_PrivateOfficialLetter.cp_Salutation == "": - self.myConfig.cp_PrivateOfficialLetter.cp_Salutation = self.resources.SalutationLabels[1] + self.myConfig.cp_PrivateOfficialLetter.cp_Salutation = \ + self.resources.SalutationLabels[1] if self.myConfig.cp_PrivateLetter.cp_Greeting == "": - self.myConfig.cp_PrivateLetter.cp_Greeting = self.resources.GreetingLabels[2] + self.myConfig.cp_PrivateLetter.cp_Greeting = \ + self.resources.GreetingLabels[2] if self.myConfig.cp_PrivateLetter.cp_Salutation == "": - self.myConfig.cp_PrivateLetter.cp_Salutation = self.resources.SalutationLabels[2] + self.myConfig.cp_PrivateLetter.cp_Salutation = \ + self.resources.SalutationLabels[2] self.updateUI() if self.myPathSelection.xSaveTextBox.Text.lower() == "": @@ -134,52 +145,71 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.running = False def finishWizard(self): - switchToStep(getCurrentStep(), getMaxStep()) + self.switchToStep(self.getCurrentStep(), self.nMaxStep) try: - fileAccess = FileAccess.FileAccess_unknown(xMSF) + fileAccess = FileAccess(self.xMSF) self.sPath = self.myPathSelection.getSelectedPath() - if self.sPath.equals(""): + if self.sPath == "": self.myPathSelection.triggerPathPicker() self.sPath = self.myPathSelection.getSelectedPath() self.sPath = fileAccess.getURL(self.sPath) if not self.filenameChanged: if fileAccess.exists(self.sPath, True): - answer = SystemDialog.showMessageBox(xMSF, xControl.getPeer(), "MessBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, self.resources.resOverwriteWarning) + answer = SystemDialog.showMessageBox( + self.xMSF, "MessBox", YES_NO + DEF_NO, + self.resources.resOverwriteWarning, + self.xUnoDialog.Peer) if answer == 3: - return False; + return False - self.myLetterDoc.setWizardTemplateDocInfo(self.resources.resLetterWizardDialog_title, self.resources.resTemplateDescription) + self.myLetterDoc.setWizardTemplateDocInfo( + self.resources.resLetterWizardDialog_title, + self.resources.resTemplateDescription) self.myLetterDoc.killEmptyUserFields() - self.myLetterDoc.keepLogoFrame = (chkUseLogo.State != 0) - if (chkBusinessPaper.State != 0) and (chkPaperCompanyLogo.State != 0): + self.myLetterDoc.keepLogoFrame = self.chkUseLogo.State != 0 + if self.chkBusinessPaper.State != 0 \ + and self.chkPaperCompanyLogo.State != 0: self.myLetterDoc.keepLogoFrame = False - self.myLetterDoc.keepBendMarksFrame = (chkUseBendMarks.State != 0) - self.myLetterDoc.keepLetterSignsFrame = (chkUseSigns.State != 0) - self.myLetterDoc.keepSenderAddressRepeatedFrame = (chkUseAddressReceiver.State != 0) - if optBusinessLetter.State: - if (chkBusinessPaper.State != 0) and (self.chkCompanyReceiver.State != 0): + self.myLetterDoc.keepBendMarksFrame = \ + self.chkUseBendMarks.State != 0 + self.myLetterDoc.keepLetterSignsFrame = \ + self.chkUseSigns.State != 0 + self.myLetterDoc.keepSenderAddressRepeatedFrame = \ + self.chkUseAddressReceiver.State != 0 + if self.optBusinessLetter.State: + if self.chkBusinessPaper.State != 0 \ + and self.chkCompanyReceiver.State != 0: self.myLetterDoc.keepSenderAddressRepeatedFrame = False - if (chkBusinessPaper.State != 0) and (chkPaperCompanyAddress.State != 0): + if self.chkBusinessPaper.State != 0 \ + and self.chkPaperCompanyAddress.State != 0: self.myLetterDoc.keepAddressFrame = False self.myLetterDoc.killEmptyFrames() - self.bSaveSuccess = OfficeDocument.store(xMSF, self.xTextDocument, self.sPath, "writer8_template", False) + self.bSaveSuccess = \ + OfficeDocument.store( + self.xMSF, TextDocument.xTextDocument, + self.sPath, "writer8_template") if self.bSaveSuccess: - saveConfiguration() - xIH = xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler") + self.saveConfiguration() + xIH = self.xMSF.createInstance( + "com.sun.star.comp.uui.UUIInteractionHandler") loadValues = range(4) - loadValues[0] = PropertyValue.PropertyValue() + loadValues[0] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') loadValues[0].Name = "AsTemplate" - loadValues[1] = PropertyValue.PropertyValue() + loadValues[1] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') loadValues[1].Name = "MacroExecutionMode" - loadValues[1].Value = Short.Short_unknown(MacroExecMode.ALWAYS_EXECUTE) - loadValues[2] = PropertyValue.PropertyValue() + loadValues[1].Value = ALWAYS_EXECUTE + loadValues[2] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') loadValues[2].Name = "UpdateDocMode" - loadValues[2].Value = Short.Short_unknown(com.sun.star.document.UpdateDocMode.FULL_UPDATE) - loadValues[3] = PropertyValue.PropertyValue() + loadValues[2].Value = FULL_UPDATE + loadValues[3] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') loadValues[3].Name = "InteractionHandler" loadValues[3].Value = xIH if self.bEditTemplate: @@ -187,16 +217,18 @@ class LetterWizardDialogImpl(LetterWizardDialog): else: loadValues[0].Value = True - oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), self.sPath, "_default", loadValues) - myViewHandler = ViewHandler(xDocMSF, oDoc) - myViewHandler.setViewSetting("ZoomType", com.sun.star.view.DocumentZoomType.OPTIMAL) + oDoc = OfficeDocument.load( + Desktop.getDesktop(self.xMSF), + self.sPath, "_default", loadValues) + myViewHandler = ViewHandler(self.xMSF, oDoc) + myViewHandler.setViewSetting("ZoomType", OPTIMAL) else: pass except Exception, e: traceback.print_exc() finally: - xDialog.endExecute() + self.xUnoDialog.endExecute() self.running = False return True; @@ -209,14 +241,22 @@ class LetterWizardDialogImpl(LetterWizardDialog): traceback.print_exc() def optBusinessLetterItemChanged(self): - DataAware.setDataObjects(self.letterDA, self.myConfig.cp_BusinessLetter, True) - self.setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + DataAware.setDataObjects( + self.letterDA, self.myConfig.cp_BusinessLetter, True) + self.setControlProperty( + "lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) self.lstBusinessStyleItemChanged() self.enableSenderReceiver() self.setPossibleFooter(True) @@ -224,14 +264,22 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.myPathSelection.initializePath() def optPrivOfficialLetterItemChanged(self): - DataAware.setDataObjects(self.letterDA, self.myConfig.cp_PrivateOfficialLetter, True) - self.setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + DataAware.setDataObjects( + self.letterDA, self.myConfig.cp_PrivateOfficialLetter, True) + self.setControlProperty( + "lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) self.lstPrivOfficialStyleItemChanged() self.disableBusinessPaper() self.enableSenderReceiver() @@ -240,14 +288,22 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.myPathSelection.initializePath() def optPrivateLetterItemChanged(self): - DataAware.setDataObjects(self.letterDA, self.myConfig.cp_PrivateLetter, True) - self.setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) + DataAware.setDataObjects( + self.letterDA, self.myConfig.cp_PrivateLetter, True) + self.setControlProperty( + "lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) self.lstPrivateStyleItemChanged() self.disableBusinessPaper() self.disableSenderReceiver() @@ -256,25 +312,41 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.myPathSelection.initializePath() def optSenderPlaceholderItemChanged(self): - self.setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblSenderName", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblSenderStreet", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "txtSenderName", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "txtSenderStreet", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "txtSenderState", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "txtSenderCity", PropertyNames.PROPERTY_ENABLED, False) self.myLetterDoc.fillSenderWithUserData() def optSenderDefineItemChanged(self): - self.setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblSenderName", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblSenderStreet", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "txtSenderName", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "txtSenderStreet", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "txtSenderState", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "txtSenderCity", PropertyNames.PROPERTY_ENABLED, True) self.txtSenderNameTextChanged() self.txtSenderStreetTextChanged() self.txtSenderPostCodeTextChanged() @@ -288,13 +360,20 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.bEditTemplate = True def optReceiverPlaceholderItemChanged(self): - OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Placeholder()") + OfficeDocument.attachEventCall( + TextDocument.xTextDocument, "OnNew", "StarBasic", + "macro:///Template.Correspondence.Placeholder()") def optReceiverDatabaseItemChanged(self): - OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Database()") + OfficeDocument.attachEventCall( + TextDocument.xTextDocument, "OnNew", "StarBasic", + "macro:///Template.Correspondence.Database()") def lstBusinessStyleItemChanged(self): - self.xTextDocument = self.myLetterDoc.loadAsPreview(self.BusinessFiles[1][self.lstBusinessStyle.SelectedItemPos], False) + TextDocument.xTextDocument = \ + self.myLetterDoc.loadAsPreview( + self.BusinessFiles[1][self.lstBusinessStyle.SelectedItemPos], + False) self.myLetterDoc.xTextDocument.lockControllers() self.initializeElements() self.chkBusinessPaperItemChanged() @@ -303,7 +382,10 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.activate() def lstPrivOfficialStyleItemChanged(self): - self.xTextDocument = self.myLetterDoc.loadAsPreview(self.OfficialFiles[1][self.lstPrivOfficialStyle.SelectedItemPos], False) + TextDocument.xTextDocument = \ + self.myLetterDoc.loadAsPreview( + self.OfficialFiles[1][self.lstPrivOfficialStyle.SelectedItemPos], + False) self.myLetterDoc.xTextDocument.lockControllers() self.initializeElements() self.setPossibleSenderData(True) @@ -312,7 +394,10 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.activate() def lstPrivateStyleItemChanged(self): - self.xTextDocument = self.myLetterDoc.loadAsPreview(self.PrivateFiles[1][self.lstPrivateStyle.getSelectedItemPos()], False) + TextDocument.xTextDocument = \ + self.myLetterDoc.loadAsPreview( + self.PrivateFiles[1][self.lstPrivateStyle.getSelectedItemPos()], + False) self.myLetterDoc.xTextDocument.lockControllers() self.initializeElements() self.setElements(True) @@ -320,209 +405,286 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.activate() def numLogoHeightTextChanged(self): - self.BusCompanyLogo.iHeight = (int)(numLogoHeight.getValue() * 1000) + self.BusCompanyLogo.iHeight = numLogoHeight.Value * 1000 self.BusCompanyLogo.setFramePosition() def numLogoWidthTextChanged(self): - self.BusCompanyLogo.iWidth = (int)(numLogoWidth.getValue() * 1000) + self.BusCompanyLogo.iWidth = numLogoWidth.Value * 1000 self.BusCompanyLogo.setFramePosition() def numLogoXTextChanged(self): - self.BusCompanyLogo.iXPos = (int)(numLogoX.getValue() * 1000) + self.BusCompanyLogo.iXPos = numLogoX.Value * 1000 self.BusCompanyLogo.setFramePosition() def numLogoYTextChanged(self): - self.BusCompanyLogo.iYPos = (int)(numLogoY.getValue() * 1000) + self.BusCompanyLogo.iYPos = numLogoY.Value * 1000 self.BusCompanyLogo.setFramePosition() def numAddressWidthTextChanged(self): - self.BusCompanyAddress.iWidth = (int)(self.numAddressWidth.getValue() * 1000) + self.BusCompanyAddress.iWidth = self.numAddressWidth.Value * 1000 self.BusCompanyAddress.setFramePosition() def numAddressXTextChanged(self): - self.BusCompanyAddress.iXPos = (int)(self.numAddressX.getValue() * 1000) + self.BusCompanyAddress.iXPos = self.numAddressX.Value * 1000 self.BusCompanyAddress.setFramePosition() def numAddressYTextChanged(self): - self.BusCompanyAddress.iYPos = (int)(self.numAddressY.getValue() * 1000) + self.BusCompanyAddress.iYPos = self.numAddressY.Value * 1000 self.BusCompanyAddress.setFramePosition() def numAddressHeightTextChanged(self): - self.BusCompanyAddress.iHeight = (int)(self.numAddressHeight.getValue() * 1000) + self.BusCompanyAddress.iHeight = self.numAddressHeight.Value * 1000 self.BusCompanyAddress.setFramePosition() def numFooterHeightTextChanged(self): - self.BusFooter.iHeight = (int)(self.numFooterHeight.getValue() * 1000) - self.BusFooter.iYPos = self.myLetterDoc.DocSize.Height - self.BusFooter.iHeight + self.BusFooter.iHeight = self.numFooterHeight.Value * 1000 + self.BusFooter.iYPos = \ + self.myLetterDoc.DocSize.Height - self.BusFooter.iHeight self.BusFooter.setFramePosition() def chkPaperCompanyLogoItemChanged(self): - if chkPaperCompanyLogo.State != 0: - if numLogoWidth.getValue() == 0: - numLogoWidth.setValue(0.1) - - if numLogoHeight.getValue() == 0: - numLogoHeight.setValue(0.1) - - self.BusCompanyLogo = BusinessPaperObject("Company Logo", (int)(numLogoWidth.getValue() * 1000), (int)(numLogoHeight.getValue() * 1000), (int)(numLogoX.getValue() * 1000), (int)(numLogoY.getValue() * 1000)) - self.setControlProperty("numLogoHeight", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("numLogoWidth", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("numLogoX", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("numLogoY", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, True) - setPossibleLogo(False) + if self.chkPaperCompanyLogo.State != 0: + if self.numLogoWidth.Value == 0: + self.numLogoWidth.Value = 0.1 + + if self.numLogoHeight.Value == 0: + self.numLogoHeight.Value = 0.1 + self.BusCompanyLogo = LetterDocument.BusinessPaperObject( + "Company Logo", self.numLogoWidth.Value * 1000, + self.numLogoHeight.Value * 1000, self.numLogoX.Value * 1000, + self.numLogoY.Value * 1000) + self.setControlProperty( + "numLogoHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "numLogoWidth", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "numLogoX", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "numLogoY", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, True) + self.setPossibleLogo(False) else: if self.BusCompanyLogo != None: self.BusCompanyLogo.removeFrame() - self.setControlProperty("numLogoHeight", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("numLogoWidth", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("numLogoX", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("numLogoY", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, False) - setPossibleLogo(True) + self.setControlProperty( + "numLogoHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "numLogoWidth", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "numLogoX", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "numLogoY", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, False) + self.setPossibleLogo(True) def chkPaperCompanyAddressItemChanged(self): - if chkPaperCompanyAddress.State != 0: - if self.numAddressWidth.getValue() == 0: - self.numAddressWidth.setValue(0.1) - - if self.numAddressHeight.getValue() == 0: - self.numAddressHeight.setValue(0.1) - - self.BusCompanyAddress = BusinessPaperObject("Company Address", (int)(self.numAddressWidth.getValue() * 1000), (int)(self.numAddressHeight.getValue() * 1000), (int)(self.numAddressX.getValue() * 1000), (int)(self.numAddressY.getValue() * 1000)) - self.setControlProperty("self.numAddressHeight", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("self.numAddressWidth", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("self.numAddressX", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("self.numAddressY", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, True) + if self.chkPaperCompanyAddress.State != 0: + if self.numAddressWidth.Value == 0: + self.numAddressWidth.Value = 0.1 + + if self.numAddressHeight.Value == 0: + self.numAddressHeight.Value = 0.1 + + self.BusCompanyAddress = LetterDocument.BusinessPaperObject( + "Company Address", self.numAddressWidth.Value * 1000, + self.numAddressHeight.Value * 1000, + self.numAddressX.Value * 1000, self.numAddressY.Value * 1000) + self.setControlProperty( + "self.numAddressHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "self.numAddressWidth", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "self.numAddressX", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "self.numAddressY", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, True) if self.myLetterDoc.hasElement("Sender Address"): - self.myLetterDoc.switchElement("Sender Address", (False)) + self.myLetterDoc.switchElement( + "Sender Address", False) if self.chkCompanyReceiver.State != 0: - setPossibleSenderData(False) + self.setPossibleSenderData(False) else: if self.BusCompanyAddress != None: self.BusCompanyAddress.removeFrame() - self.setControlProperty("self.numAddressHeight", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("self.numAddressWidth", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("self.numAddressX", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("self.numAddressY", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "self.numAddressHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "self.numAddressWidth", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "self.numAddressX", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "self.numAddressY", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, False) if self.myLetterDoc.hasElement("Sender Address"): - self.myLetterDoc.switchElement("Sender Address", (True)) + self.myLetterDoc.switchElement( + "Sender Address", (True)) - setPossibleSenderData(True) - if optSenderDefine.State: - optSenderDefineItemChanged() + self.setPossibleSenderData(True) + if self.optSenderDefine.State: + self.optSenderDefineItemChanged() - if optSenderPlaceholder.State: - optSenderPlaceholderItemChanged() + if self.optSenderPlaceholder.State: + self.optSenderPlaceholderItemChanged() def chkCompanyReceiverItemChanged(self): xReceiverFrame = None if self.chkCompanyReceiver.State != 0: try: - xReceiverFrame = TextFrameHandler.getFrameByName("Receiver Address", self.xTextDocument) - iFrameWidth = int(Helper.getUnoPropertyValue(xReceiverFrame, PropertyNames.PROPERTY_WIDTH)) - iFrameX = int(Helper.getUnoPropertyValue(xReceiverFrame, "HoriOrientPosition")) - iFrameY = int(Helper.getUnoPropertyValue(xReceiverFrame, "VertOrientPosition")) + xReceiverFrame = TextDocument.getFrameByName( + "Receiver Address", TextDocument.xTextDocument) + iFrameWidth = int(Helper.getUnoPropertyValue( + xReceiverFrame, PropertyNames.PROPERTY_WIDTH)) + iFrameX = int(Helper.getUnoPropertyValue( + xReceiverFrame, "HoriOrientPosition")) + iFrameY = int(Helper.getUnoPropertyValue( + xReceiverFrame, "VertOrientPosition")) iReceiverHeight = int(0.5 * 1000) - self.BusCompanyAddressReceiver = BusinessPaperObject(" ", iFrameWidth, iReceiverHeight, iFrameX, (iFrameY - iReceiverHeight)) - setPossibleAddressReceiver(False) - except NoSuchElementException, e: + self.BusCompanyAddressReceiver = \ + LetterDocument.BusinessPaperObject( + " ", iFrameWidth, iReceiverHeight, iFrameX, + iFrameY - iReceiverHeight) + self.setPossibleAddressReceiver(False) + except NoSuchElementException: traceback.print_exc() - except WrappedTargetException, e: + except WrappedTargetException: traceback.print_exc() - if chkPaperCompanyAddress.State != 0: - setPossibleSenderData(False) + if self.chkPaperCompanyAddress.State != 0: + self.setPossibleSenderData(False) else: if self.BusCompanyAddressReceiver != None: self.BusCompanyAddressReceiver.removeFrame() - setPossibleAddressReceiver(True) - setPossibleSenderData(True) - if optSenderDefine.State: - optSenderDefineItemChanged() + self.setPossibleAddressReceiver(True) + self.setPossibleSenderData(True) + if self.optSenderDefine.State: + self.optSenderDefineItemChanged() - if optSenderPlaceholder.State: - optSenderPlaceholderItemChanged() + if self.optSenderPlaceholder.State: + self.optSenderPlaceholderItemChanged() def chkPaperFooterItemChanged(self): if self.chkPaperFooter.State != 0: - if self.numFooterHeight.getValue() == 0: - self.numFooterHeight.setValue(0.1) - - self.BusFooter = BusinessPaperObject("Footer", self.myLetterDoc.DocSize.Width, (int)(self.numFooterHeight.getValue() * 1000), 0, (int)(self.myLetterDoc.DocSize.Height - (self.numFooterHeight.getValue() * 1000))) - self.setControlProperty("self.numFooterHeight", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblFooterHeight", PropertyNames.PROPERTY_ENABLED, True) - setPossibleFooter(False) + if self.numFooterHeight.Value == 0: + self.numFooterHeight.Value = 0.1 + + self.BusFooter = LetterDocument.BusinessPaperObject( + "Footer", self.myLetterDoc.DocSize.Width, + self.numFooterHeight.Value * 1000, 0, + self.myLetterDoc.DocSize.Height - \ + (self.numFooterHeight.Value * 1000)) + self.setControlProperty( + "self.numFooterHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblFooterHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setPossibleFooter(False) else: if self.BusFooter != None: self.BusFooter.removeFrame() - self.setControlProperty("self.numFooterHeight", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblFooterHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "self.numFooterHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblFooterHeight", PropertyNames.PROPERTY_ENABLED, False) setPossibleFooter(True) def chkUseLogoItemChanged(self): try: if self.myLetterDoc.hasElement("Company Logo"): - logostatus = bool(self.getControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED)) and (self.chkUseLogo.State != 0) - self.myLetterDoc.switchElement("Company Logo", logostatus) - + logostatus = \ + bool(self.getControlProperty( + "chkUseLogo", PropertyNames.PROPERTY_ENABLED)) \ + and (self.chkUseLogo.State != 0) + self.myLetterDoc.switchElement( + "Company Logo", logostatus) except IllegalArgumentException, e: traceback.print_exc() def chkUseAddressReceiverItemChanged(self): try: if self.myLetterDoc.hasElement("Sender Address Repeated"): - rstatus = bool(self.getControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED)) and (self.chkUseAddressReceiver.State != 0) - self.myLetterDoc.switchElement("Sender Address Repeated", rstatus) + rstatus = \ + bool(self.getControlProperty( + "chkUseAddressReceiver", + PropertyNames.PROPERTY_ENABLED)) \ + and (self.chkUseAddressReceiver.State != 0) + self.myLetterDoc.switchElement( + "Sender Address Repeated", rstatus) except IllegalArgumentException, e: traceback.print_exc() def chkUseSignsItemChanged(self): if self.myLetterDoc.hasElement("Letter Signs"): - self.myLetterDoc.switchElement("Letter Signs", (self.chkUseSigns.State != 0)) + self.myLetterDoc.switchElement( + "Letter Signs", self.chkUseSigns.State != 0) def chkUseSubjectItemChanged(self): if self.myLetterDoc.hasElement("Subject Line"): - self.myLetterDoc.switchElement("Subject Line", (self.chkUseSubject.State != 0)) + self.myLetterDoc.switchElement( + "Subject Line", self.chkUseSubject.State != 0) def chkUseBendMarksItemChanged(self): if self.myLetterDoc.hasElement("Bend Marks"): - self.myLetterDoc.switchElement("Bend Marks", (self.chkUseBendMarks.State != 0)) + self.myLetterDoc.switchElement( + "Bend Marks", self.chkUseBendMarks.State != 0) def chkUseFooterItemChanged(self): try: - bFooterPossible = (self.chkUseFooter.State != 0) and bool(self.getControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED)) + bFooterPossible = (self.chkUseFooter.State != 0) \ + and bool(self.getControlProperty( + "chkUseFooter", PropertyNames.PROPERTY_ENABLED)) if self.chkFooterNextPages.State != 0: - self.myLetterDoc.switchFooter("First Page", False, (self.chkFooterPageNumbers.State != 0), txtFooter.Text) - self.myLetterDoc.switchFooter("Standard", bFooterPossible, (self.chkFooterPageNumbers.State != 0), self.txtFooter.Text) + self.myLetterDoc.switchFooter( + "First Page", False, self.chkFooterPageNumbers.State != 0, + txtFooter.Text) + self.myLetterDoc.switchFooter("Standard", bFooterPossible, + self.chkFooterPageNumbers.State != 0, self.txtFooter.Text) else: - self.myLetterDoc.switchFooter("First Page", bFooterPossible, (self.chkFooterPageNumbers.State != 0), self.txtFooter.Text) - self.myLetterDoc.switchFooter("Standard", bFooterPossible, (self.chkFooterPageNumbers.State != 0), self.txtFooter.Text) - - BPaperItem = self.getRoadmapItemByID(LetterWizardDialogImpl.RM_FOOTER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, bFooterPossible) + self.myLetterDoc.switchFooter( + "First Page", bFooterPossible, + self.chkFooterPageNumbers.State != 0, self.txtFooter.Text) + self.myLetterDoc.switchFooter( + "Standard", bFooterPossible, + self.chkFooterPageNumbers.State != 0, self.txtFooter.Text) + + BPaperItem = \ + self.getRoadmapItemByID(LetterWizardDialogImpl.RM_FOOTER) + Helper.setUnoPropertyValue( + BPaperItem, PropertyNames.PROPERTY_ENABLED, bFooterPossible) except Exception, exception: traceback.print_exc() @@ -533,57 +695,79 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.chkUseFooterItemChanged() def setPossibleFooter(self, bState): - self.setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "chkUseFooter", PropertyNames.PROPERTY_ENABLED, bState) self.chkUseFooterItemChanged() def setPossibleAddressReceiver(self, bState): if self.myLetterDoc.hasElement("Sender Address Repeated"): - self.setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, bState) self.chkUseAddressReceiverItemChanged() def setPossibleLogo(self, bState): if self.myLetterDoc.hasElement("Company Logo"): - self.setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "chkUseLogo", PropertyNames.PROPERTY_ENABLED, bState) self.chkUseLogoItemChanged() def txtFooterTextChanged(self): self.chkUseFooterItemChanged() def txtSenderNameTextChanged(self): - myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("Company", self.txtSenderName.Text) + myFieldHandler = TextFieldHandler( + self.myLetterDoc.xMSF, TextDocument.xTextDocument) + myFieldHandler.changeUserFieldContent( + "Company", self.txtSenderName.Text) def txtSenderStreetTextChanged(self): - myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("Street", self.txtSenderStreet.Text) + myFieldHandler = TextFieldHandler( + self.myLetterDoc.xMSF, TextDocument.xTextDocument) + myFieldHandler.changeUserFieldContent( + "Street", self.txtSenderStreet.Text) def txtSenderCityTextChanged(self): - myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("City", self.txtSenderCity.Text) + myFieldHandler = TextFieldHandler( + self.myLetterDoc.xMSF, TextDocument.xTextDocument) + myFieldHandler.changeUserFieldContent( + "City", self.txtSenderCity.Text) def txtSenderPostCodeTextChanged(self): - myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("PostCode", self.txtSenderPostCode.Text) + myFieldHandler = TextFieldHandler( + self.myLetterDoc.xMSF, TextDocument.xTextDocument) + myFieldHandler.changeUserFieldContent( + "PostCode", self.txtSenderPostCode.Text) def txtSenderStateTextChanged(self): - myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, self.txtSenderState.Text) + myFieldHandler = TextFieldHandler( + self.myLetterDoc.xMSF, TextDocument.xTextDocument) + myFieldHandler.changeUserFieldContent( + PropertyNames.PROPERTY_STATE, self.txtSenderState.Text) def txtTemplateNameTextChanged(self): - xDocProps = self.xTextDocument.DocumentProperties + xDocProps = TextDocument.xTextDocument.DocumentProperties TitleName = self.txtTemplateName.Text xDocProps.Title = TitleName def chkUseSalutationItemChanged(self): - self.myLetterDoc.switchUserField("Salutation", self.lstSalutation.Text, (self.chkUseSalutation.State != 0)) - self.setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, self.chkUseSalutation.State != 0) + self.myLetterDoc.switchUserField( + "Salutation", self.lstSalutation.Text, + self.chkUseSalutation.State != 0) + self.setControlProperty( + "lstSalutation", PropertyNames.PROPERTY_ENABLED, + self.chkUseSalutation.State != 0) def lstSalutationItemChanged(self): - self.myLetterDoc.switchUserField("Salutation", self.lstSalutation.Text, (self.chkUseSalutation.State != 0)) + self.myLetterDoc.switchUserField( + "Salutation", self.lstSalutation.Text, + self.chkUseSalutation.State != 0) def chkUseGreetingItemChanged(self): - self.myLetterDoc.switchUserField("Greeting", self.lstGreeting.Text, (self.chkUseGreeting.State != 0)) - self.setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, self.chkUseGreeting.State != 0) + self.myLetterDoc.switchUserField( + "Greeting", self.lstGreeting.Text, self.chkUseGreeting.State != 0) + self.setControlProperty( + "lstGreeting", PropertyNames.PROPERTY_ENABLED, + self.chkUseGreeting.State != 0) def setDefaultForGreetingAndSalutation(self): if self.lstSalutation.Text == "": @@ -593,7 +777,8 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.lstGreeting.Text = self.resources.GreetingLabels[0] def lstGreetingItemChanged(self): - self.myLetterDoc.switchUserField("Greeting", self.lstGreeting.Text, (self.chkUseGreeting.State != 0)) + self.myLetterDoc.switchUserField( + "Greeting", self.lstGreeting.Text, self.chkUseGreeting.State != 0) def chkBusinessPaperItemChanged(self): if self.chkBusinessPaper.State != 0: @@ -611,7 +796,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): if self.Norms[i].lower() == OfficeLinguistic.lower(): oL = i found = True - break; + break if not found: for i in xrange(len(self.Norms)): @@ -619,59 +804,86 @@ class LetterWizardDialogImpl(LetterWizardDialog): oL = i found = True break - return oL; + return oL def setPossibleSenderData(self, bState): - self.setControlProperty("optSenderDefine", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("optSenderPlaceholder", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("lblSenderAddress", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "optSenderDefine", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "optSenderPlaceholder", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "lblSenderAddress", PropertyNames.PROPERTY_ENABLED, bState) if not bState: - self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "txtSenderCity", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "txtSenderName", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "txtSenderStreet", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "txtSenderCity", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "txtSenderState", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "lblSenderName", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "lblSenderStreet", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, bState) def enableSenderReceiver(self): - BPaperItem = self.getRoadmapItemByID(LetterWizardDialogImpl.RM_SENDERRECEIVER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, True) + BPaperItem = self.getRoadmapItemByID( + LetterWizardDialogImpl.RM_SENDERRECEIVER) + Helper.setUnoPropertyValue( + BPaperItem, PropertyNames.PROPERTY_ENABLED, True) def disableSenderReceiver(self): - BPaperItem = self.getRoadmapItemByID(LetterWizardDialogImpl.RM_SENDERRECEIVER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, False) + BPaperItem = self.getRoadmapItemByID( + LetterWizardDialogImpl.RM_SENDERRECEIVER) + Helper.setUnoPropertyValue( + BPaperItem, PropertyNames.PROPERTY_ENABLED, False) def enableBusinessPaper(self): - BPaperItem = self.getRoadmapItemByID(LetterWizardDialogImpl.RM_BUSINESSPAPER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, True) - self.chkPaperCompanyLogoItemChanged() - self.chkPaperCompanyAddressItemChanged() - self.chkPaperFooterItemChanged() - self.chkCompanyReceiverItemChanged() + try: + BPaperItem = self.getRoadmapItemByID( + LetterWizardDialogImpl.RM_BUSINESSPAPER) + Helper.setUnoPropertyValue( + BPaperItem, PropertyNames.PROPERTY_ENABLED, True) + self.chkPaperCompanyLogoItemChanged() + self.chkPaperCompanyAddressItemChanged() + self.chkPaperFooterItemChanged() + self.chkCompanyReceiverItemChanged() + except Exception: + traceback.print_exc() def disableBusinessPaper(self): - BPaperItem = self.getRoadmapItemByID(LetterWizardDialogImpl.RM_BUSINESSPAPER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, False) - if self.BusCompanyLogo != None: - self.BusCompanyLogo.removeFrame() + try: + BPaperItem = self.getRoadmapItemByID( + LetterWizardDialogImpl.RM_BUSINESSPAPER) + Helper.setUnoPropertyValue( + BPaperItem, PropertyNames.PROPERTY_ENABLED, False) + if self.BusCompanyLogo != None: + self.BusCompanyLogo.removeFrame() - if self.BusCompanyAddress != None: - self.BusCompanyAddress.removeFrame() + if self.BusCompanyAddress != None: + self.BusCompanyAddress.removeFrame() - if self.BusFooter != None: - self.BusFooter.removeFrame() + if self.BusFooter != None: + self.BusFooter.removeFrame() - if self.BusCompanyAddressReceiver != None: - self.BusCompanyAddressReceiver.removeFrame() + if self.BusCompanyAddressReceiver != None: + self.BusCompanyAddressReceiver.removeFrame() - self.setPossibleAddressReceiver(True) - self.setPossibleFooter(True) - self.setPossibleLogo(True) - if self.myLetterDoc.hasElement("Sender Address"): - self.myLetterDoc.switchElement("Sender Address", True) + self.setPossibleAddressReceiver(True) + self.setPossibleFooter(True) + self.setPossibleLogo(True) + if self.myLetterDoc.hasElement("Sender Address"): + self.myLetterDoc.switchElement( + "Sender Address", True) + except Exception: + traceback.print_exc() def lstLetterNormItemChanged(self): sCurrentNorm = self.Norms[getCurrentLetter().cp_Norm] @@ -686,10 +898,13 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.lstPrivateStyleItemChanged() def initializeSalutation(self): - self.setControlProperty("lstSalutation", "StringItemList", self.resources.SalutationLabels) + self.setControlProperty( + "lstSalutation", "StringItemList", + self.resources.SalutationLabels) def initializeGreeting(self): - self.setControlProperty("lstGreeting", "StringItemList", self.resources.GreetingLabels) + self.setControlProperty( + "lstGreeting", "StringItemList", self.resources.GreetingLabels) def initializeNorms(self): lc = LocaleCodes(self.xmsf) @@ -697,11 +912,14 @@ class LetterWizardDialogImpl(LetterWizardDialog): nameList = [] sLetterSubPath = "/wizard/letter/" try: - self.sTemplatePath = FileAccess.deleteLastSlashfromUrl(self.sTemplatePath) - nuString = self.sTemplatePath[:self.sTemplatePath.rfind("/")] + "/" + self.sTemplatePath = \ + FileAccess.deleteLastSlashfromUrl(self.sTemplatePath) + nuString = \ + self.sTemplatePath[:self.sTemplatePath.rfind("/")] + "/" sMainPath = FileAccess.deleteLastSlashfromUrl(nuString) self.sLetterPath = sMainPath + sLetterSubPath - xInterface = self.xmsf.createInstance("com.sun.star.ucb.SimpleFileAccess") + xInterface = \ + self.xmsf.createInstance("com.sun.star.ucb.SimpleFileAccess") nameList = xInterface.getFolderContents(self.sLetterPath, True) except Exception, e: traceback.print_exc() @@ -736,7 +954,8 @@ class LetterWizardDialogImpl(LetterWizardDialog): #COMMENTED #LanguageLabels = [LanguageLabelsVector.size()] #LanguageLabelsVector.toArray(LanguageLabels) - #self.setControlProperty("lstLetterNorm", "StringItemList", LanguageLabels) + #self.setControlProperty( + # "lstLetterNorm", "StringItemList", LanguageLabels) def getCurrentLetter(self): if self.myConfig.cp_LetterType == 0: @@ -750,32 +969,59 @@ class LetterWizardDialogImpl(LetterWizardDialog): def __initializePaths(self): try: - self.sTemplatePath = FileAccess.getOfficePath2(self.xMSF, "Template", "share", "/wizard") - self.sUserTemplatePath = FileAccess.getOfficePath2(self.xMSF, "Template", "user", "") - self.sBitmapPath = FileAccess.combinePaths(self.xMSF, self.sTemplatePath, "/../wizard/bitmap") + self.sTemplatePath = \ + FileAccess.getOfficePath2( + self.xMSF, "Template", "share", "/wizard") + self.sUserTemplatePath = \ + FileAccess.getOfficePath2(self.xMSF, "Template", "user", "") + self.sBitmapPath = \ + FileAccess.combinePaths( + self.xMSF, self.sTemplatePath, "/../wizard/bitmap") except NoValidPathException, e: traceback.print_exc() def initializeTemplates(self, xMSF): self.sCurrentNorm = self.Norms[self.getCurrentLetter().cp_Norm] sLetterPath = self.NormPaths[self.getCurrentLetter().cp_Norm] - self.BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", sLetterPath) - self.OfficialFiles = FileAccess.getFolderTitles(xMSF, "off", sLetterPath) - self.PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", sLetterPath) - self.setControlProperty("lstBusinessStyle", "StringItemList", tuple(self.BusinessFiles[0])) - self.setControlProperty("lstPrivOfficialStyle", "StringItemList", tuple(self.OfficialFiles[0])) - self.setControlProperty("lstPrivateStyle", "StringItemList", tuple(self.PrivateFiles[0])) - self.setControlProperty("lstBusinessStyle", "SelectedItems", (0,)) - self.setControlProperty("lstPrivOfficialStyle", "SelectedItems", (0,)) - self.setControlProperty("lstPrivateStyle", "SelectedItems", (0,)) + self.BusinessFiles = \ + FileAccess.getFolderTitles(xMSF, "bus", sLetterPath) + self.OfficialFiles = \ + FileAccess.getFolderTitles(xMSF, "off", sLetterPath) + self.PrivateFiles = \ + FileAccess.getFolderTitles(xMSF, "pri", sLetterPath) + self.setControlProperty( + "lstBusinessStyle", "StringItemList", + tuple(self.BusinessFiles[0])) + self.setControlProperty( + "lstPrivOfficialStyle", "StringItemList", + tuple(self.OfficialFiles[0])) + self.setControlProperty( + "lstPrivateStyle", "StringItemList", + tuple(self.PrivateFiles[0])) + self.setControlProperty( + "lstBusinessStyle", "SelectedItems", (0,)) + self.setControlProperty( + "lstPrivOfficialStyle", "SelectedItems", (0,)) + self.setControlProperty( + "lstPrivateStyle", "SelectedItems", (0,)) return True def initializeElements(self): - self.setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Company Logo")) - self.setControlProperty("chkUseBendMarks", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Bend Marks")) - self.setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Sender Address Repeated")) - self.setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Subject Line")) - self.setControlProperty("chkUseSigns", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Letter Signs")) + self.setControlProperty( + "chkUseLogo", PropertyNames.PROPERTY_ENABLED, + self.myLetterDoc.hasElement("Company Logo")) + self.setControlProperty( + "chkUseBendMarks", PropertyNames.PROPERTY_ENABLED, + self.myLetterDoc.hasElement("Bend Marks")) + self.setControlProperty( + "chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, + self.myLetterDoc.hasElement("Sender Address Repeated")) + self.setControlProperty( + "chkUseSubject", PropertyNames.PROPERTY_ENABLED, + self.myLetterDoc.hasElement("Subject Line")) + self.setControlProperty( + "chkUseSigns", PropertyNames.PROPERTY_ENABLED, + self.myLetterDoc.hasElement("Letter Signs")) self.myLetterDoc.updateDateFields() def setConfiguration(self): @@ -817,12 +1063,30 @@ class LetterWizardDialogImpl(LetterWizardDialog): def insertRoadmap(self): self.addRoadmap() i = 0 - i = self.insertRoadmapItem(0, True, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_TYPESTYLE -1], LetterWizardDialogImpl.RM_TYPESTYLE) - i = self.insertRoadmapItem(i, False, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_BUSINESSPAPER - 1], LetterWizardDialogImpl.RM_BUSINESSPAPER) - i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_ELEMENTS - 1], LetterWizardDialogImpl.RM_ELEMENTS) - i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_SENDERRECEIVER - 1], LetterWizardDialogImpl.RM_SENDERRECEIVER) - i = self.insertRoadmapItem(i, False, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_FOOTER -1], LetterWizardDialogImpl.RM_FOOTER) - i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_FINALSETTINGS - 1], LetterWizardDialogImpl.RM_FINALSETTINGS) + i = self.insertRoadmapItem( + 0, True, + self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_TYPESTYLE -1], + LetterWizardDialogImpl.RM_TYPESTYLE) + i = self.insertRoadmapItem( + i, False, + self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_BUSINESSPAPER - 1], + LetterWizardDialogImpl.RM_BUSINESSPAPER) + i = self.insertRoadmapItem( + i, True, + self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_ELEMENTS - 1], + LetterWizardDialogImpl.RM_ELEMENTS) + i = self.insertRoadmapItem( + i, True, + self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_SENDERRECEIVER - 1], + LetterWizardDialogImpl.RM_SENDERRECEIVER) + i = self.insertRoadmapItem( + i, False, + self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_FOOTER -1], + LetterWizardDialogImpl.RM_FOOTER) + i = self.insertRoadmapItem( + i, True, + self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_FINALSETTINGS - 1], + LetterWizardDialogImpl.RM_FINALSETTINGS) self.setRoadmapInteractive(True) self.setRoadmapComplete(True) self.setCurrentRoadmapItemID(1) @@ -836,63 +1100,166 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.myPathSelection.usedPathPicker = False def insertPathSelectionControl(self): - self.myPathSelection = PathSelection(self.xMSF, self, PathSelection.TransferMode.SAVE, PathSelection.DialogTypes.FILE) - self.myPathSelection.insert(6, 97, 70, 205, 45, self.resources.reslblTemplatePath_value, True, HelpIds.getHelpIdString(HID + 47), HelpIds.getHelpIdString(HID + 48)) + self.myPathSelection = \ + PathSelection(self.xMSF, self, PathSelection.TransferMode.SAVE, + PathSelection.DialogTypes.FILE) + self.myPathSelection.insert( + 6, 97, 70, 205, 45, self.resources.reslblTemplatePath_value, + True, HelpIds.getHelpIdString(HID + 47), + HelpIds.getHelpIdString(HID + 48)) self.myPathSelection.sDefaultDirectory = self.sUserTemplatePath self.myPathSelection.sDefaultName = "myLetterTemplate.ott" self.myPathSelection.sDefaultFilter = "writer8_template" - self.myPathSelection.addSelectionListener(self.myPathSelectionListener()) + self.myPathSelection.addSelectionListener( + self.myPathSelectionListener()) def initConfiguration(self): try: self.myConfig = CGLetterWizard() - root = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", False) + root = Configuration.getConfigurationRoot( + self.xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", + False) self.myConfig.readConfiguration(root, "cp_") - self.mainDA.append(RadioDataAware.attachRadioButtons(self.myConfig, "cp_LetterType", (self.optBusinessLetter, self.optPrivOfficialLetter, self.optPrivateLetter), True)) - self.mainDA.append(UnoDataAware.attachListBox(self.myConfig.cp_BusinessLetter, "cp_Style", self.lstBusinessStyle, True)) - self.mainDA.append(UnoDataAware.attachListBox(self.myConfig.cp_PrivateOfficialLetter, "cp_Style", self.lstPrivOfficialStyle, True)) - self.mainDA.append(UnoDataAware.attachListBox(self.myConfig.cp_PrivateLetter, "cp_Style", self.lstPrivateStyle, True)) - self.mainDA.append(UnoDataAware.attachCheckBox(self.myConfig.cp_BusinessLetter, "cp_BusinessPaper", self.chkBusinessPaper, True)) + self.mainDA.append( + RadioDataAware.attachRadioButtons( + self.myConfig, "cp_LetterType", + (self.optBusinessLetter, self.optPrivOfficialLetter, + self.optPrivateLetter), True)) + self.mainDA.append( + UnoDataAware.attachListBox( + self.myConfig.cp_BusinessLetter, "cp_Style", + self.lstBusinessStyle, True)) + self.mainDA.append( + UnoDataAware.attachListBox( + self.myConfig.cp_PrivateOfficialLetter, "cp_Style", + self.lstPrivOfficialStyle, True)) + self.mainDA.append( + UnoDataAware.attachListBox( + self.myConfig.cp_PrivateLetter, "cp_Style", + self.lstPrivateStyle, True)) + self.mainDA.append( + UnoDataAware.attachCheckBox( + self.myConfig.cp_BusinessLetter, "cp_BusinessPaper", + self.chkBusinessPaper, True)) cgl = self.myConfig.cp_BusinessLetter cgpl = self.myConfig.cp_BusinessLetter.cp_CompanyLogo cgpa = self.myConfig.cp_BusinessLetter.cp_CompanyAddress - self.businessDA.append(UnoDataAware.attachCheckBox(cgpl, "cp_Display", self.chkPaperCompanyLogo, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpl, "cp_Width", self.numLogoWidth, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpl, "cp_Height", self.numLogoHeight, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpl, "cp_X", self.numLogoX, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpl, "cp_Y", self.numLogoY, True)) - self.businessDA.append(UnoDataAware.attachCheckBox(cgpa, "cp_Display", self.chkPaperCompanyAddress, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpa, "cp_Width", self.numAddressWidth, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpa, "cp_Height", self.numAddressHeight, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpa, "cp_X", self.numAddressX, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpa, "cp_Y", self.numAddressY, True)) - self.businessDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PaperCompanyAddressReceiverField", self.chkCompanyReceiver, True)) - self.businessDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PaperFooter", self.chkPaperFooter, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgl, "cp_PaperFooterHeight", self.numFooterHeight, True)) - self.letterDA.append(UnoDataAware.attachListBox(cgl, "cp_Norm", self.lstLetterNorm, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintCompanyLogo", self.chkUseLogo, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintCompanyAddressReceiverField", self.chkUseAddressReceiver, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintLetterSigns", self.chkUseSigns, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintSubjectLine", self.chkUseSubject, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintSalutation", self.chkUseSalutation, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintBendMarks", self.chkUseBendMarks, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintGreeting", self.chkUseGreeting, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintFooter", self.chkUseFooter, True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_Salutation", self.lstSalutation, True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_Greeting", self.lstGreeting, True)) - self.letterDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_SenderAddressType", [self.optSenderDefine, self.optSenderPlaceholder], True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderCompanyName", self.txtSenderName, True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderStreet", self.txtSenderStreet, True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderPostCode", self.txtSenderPostCode, True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderState", self.txtSenderState, True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderCity", self.txtSenderCity, True)) - self.letterDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_ReceiverAddressType", [self.optReceiverDatabase, self.optReceiverPlaceholder], True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_Footer", self.txtFooter, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_FooterOnlySecondPage", self.chkFooterNextPages, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_FooterPageNumbers", self.chkFooterPageNumbers, True)) - self.letterDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_CreationType", [self.optCreateLetter, self.optMakeChanges], True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_TemplateName", self.txtTemplateName, True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_TemplatePath", self.myPathSelection.xSaveTextBox, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgpl, "cp_Display", self.chkPaperCompanyLogo, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpl, "cp_Width", self.numLogoWidth, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpl, "cp_Height", self.numLogoHeight, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpl, "cp_X", self.numLogoX, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpl, "cp_Y", self.numLogoY, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgpa, "cp_Display", self.chkPaperCompanyAddress, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpa, "cp_Width", self.numAddressWidth, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpa, "cp_Height", self.numAddressHeight, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpa, "cp_X", self.numAddressX, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpa, "cp_Y", self.numAddressY, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PaperCompanyAddressReceiverField", + self.chkCompanyReceiver, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PaperFooter", self.chkPaperFooter, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgl, "cp_PaperFooterHeight", self.numFooterHeight, True)) + self.businessDA.append( + UnoDataAware.attachListBox( + cgl, "cp_Norm", self.lstLetterNorm, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintCompanyLogo", self.chkUseLogo, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintCompanyAddressReceiverField", + self.chkUseAddressReceiver, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintLetterSigns", self.chkUseSigns, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintSubjectLine", self.chkUseSubject, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintSalutation", self.chkUseSalutation, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintBendMarks", self.chkUseBendMarks, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintGreeting", self.chkUseGreeting, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintFooter", self.chkUseFooter, True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_Salutation", self.lstSalutation, True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_Greeting", self.lstGreeting, True)) + self.letterDA.append(RadioDataAware.attachRadioButtons( + cgl, "cp_SenderAddressType", + (self.optSenderDefine, self.optSenderPlaceholder), True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_SenderCompanyName", self.txtSenderName, True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_SenderStreet", self.txtSenderStreet, True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_SenderPostCode", self.txtSenderPostCode, True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_SenderState", self.txtSenderState, True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_SenderCity", self.txtSenderCity, True)) + self.letterDA.append(RadioDataAware.attachRadioButtons( + cgl, "cp_ReceiverAddressType", + (self.optReceiverDatabase, self.optReceiverPlaceholder), + True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_Footer", self.txtFooter, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_FooterOnlySecondPage", + self.chkFooterNextPages, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_FooterPageNumbers", + self.chkFooterPageNumbers, True)) + self.letterDA.append(RadioDataAware.attachRadioButtons( + cgl, "cp_CreationType", + (self.optCreateLetter, self.optMakeChanges), True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_TemplateName", self.txtTemplateName, True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_TemplatePath", self.myPathSelection.xSaveTextBox, True)) except Exception, exception: traceback.print_exc() @@ -903,8 +1270,8 @@ class LetterWizardDialogImpl(LetterWizardDialog): def saveConfiguration(self): try: - root = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", True) + root = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", True) self.myConfig.writeConfiguration(root, "cp_") - Configuration.commit(root) + root.commitChanges() except Exception, e: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py index 439f9ba6a..d25c0c265 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py @@ -11,78 +11,199 @@ class LetterWizardDialogResources(Resource): RID_RID_COMMON_START = 500 def __init__(self, xmsf): - super(LetterWizardDialogResources,self).__init__(xmsf, LetterWizardDialogResources.MODULE_NAME) + super(LetterWizardDialogResources,self).__init__( + xmsf, LetterWizardDialogResources.MODULE_NAME) self.RoadmapLabels = () self.SalutationLabels = () self.GreetingLabels = () self.LanguageLabels = () - self.resLetterWizardDialog_title = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 1) - self.resLabel9_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 2) - self.resoptBusinessLetter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 3) - self.resoptPrivOfficialLetter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 4) - self.resoptPrivateLetter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 5) - self.reschkBusinessPaper_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 6) - self.reschkPaperCompanyLogo_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 7) - self.reschkPaperCompanyAddress_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 8) - self.reschkPaperFooter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 9) - self.reschkCompanyReceiver_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 10) - self.reschkUseLogo_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 11) - self.reschkUseAddressReceiver_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 12) - self.reschkUseSigns_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 13) - self.reschkUseSubject_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 14) - self.reschkUseSalutation_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 15) - self.reschkUseBendMarks_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 16) - self.reschkUseGreeting_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 17) - self.reschkUseFooter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 18) - self.resoptSenderPlaceholder_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 19) - self.resoptSenderDefine_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 20) - self.resoptReceiverPlaceholder_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 21) - self.resoptReceiverDatabase_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 22) - self.reschkFooterNextPages_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 23) - self.reschkFooterPageNumbers_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 24) - self.restxtTemplateName_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 25) - self.resoptCreateLetter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 26) - self.resoptMakeChanges_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 27) - self.reslblBusinessStyle_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 28) - self.reslblPrivOfficialStyle_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 29) - self.reslblPrivateStyle_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 30) - self.reslblIntroduction_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 31) - self.reslblLogoHeight_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 32) - self.reslblLogoWidth_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 33) - self.reslblLogoX_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 34) - self.reslblLogoY_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 35) - self.reslblAddressHeight_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 36) - self.reslblAddressWidth_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 37) - self.reslblAddressX_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 38) - self.reslblAddressY_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 39) - self.reslblFooterHeight_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 40) - self.reslblLetterNorm_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 41) - self.reslblSenderAddress_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 42) - self.reslblSenderName_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 43) - self.reslblSenderStreet_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 44) - self.reslblPostCodeCity_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 45) - self.reslblReceiverAddress_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 46) - self.reslblFooter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 47) - self.reslblFinalExplanation1_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 48) - self.reslblFinalExplanation2_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 49) - self.reslblTemplateName_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 50) - self.reslblTemplatePath_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 51) - self.reslblProceed_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 52) - self.reslblTitle1_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 53) - self.reslblTitle3_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 54) - self.reslblTitle2_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 55) - self.reslblTitle4_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 56) - self.reslblTitle5_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 57) - self.reslblTitle6_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 58) + self.resLetterWizardDialog_title = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 1) + self.resLabel9_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 2) + self.resoptBusinessLetter_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 3) + self.resoptPrivOfficialLetter_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 4) + self.resoptPrivateLetter_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 5) + self.reschkBusinessPaper_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 6) + self.reschkPaperCompanyLogo_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 7) + self.reschkPaperCompanyAddress_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 8) + self.reschkPaperFooter_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 9) + self.reschkCompanyReceiver_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 10) + self.reschkUseLogo_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 11) + self.reschkUseAddressReceiver_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 12) + self.reschkUseSigns_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 13) + self.reschkUseSubject_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 14) + self.reschkUseSalutation_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 15) + self.reschkUseBendMarks_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 16) + self.reschkUseGreeting_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 17) + self.reschkUseFooter_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 18) + self.resoptSenderPlaceholder_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 19) + self.resoptSenderDefine_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 20) + self.resoptReceiverPlaceholder_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 21) + self.resoptReceiverDatabase_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 22) + self.reschkFooterNextPages_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 23) + self.reschkFooterPageNumbers_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 24) + self.restxtTemplateName_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 25) + self.resoptCreateLetter_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 26) + self.resoptMakeChanges_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 27) + self.reslblBusinessStyle_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 28) + self.reslblPrivOfficialStyle_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 29) + self.reslblPrivateStyle_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 30) + self.reslblIntroduction_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 31) + self.reslblLogoHeight_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 32) + self.reslblLogoWidth_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 33) + self.reslblLogoX_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 34) + self.reslblLogoY_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 35) + self.reslblAddressHeight_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 36) + self.reslblAddressWidth_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 37) + self.reslblAddressX_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 38) + self.reslblAddressY_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 39) + self.reslblFooterHeight_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 40) + self.reslblLetterNorm_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 41) + self.reslblSenderAddress_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 42) + self.reslblSenderName_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 43) + self.reslblSenderStreet_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 44) + self.reslblPostCodeCity_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 45) + self.reslblReceiverAddress_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 46) + self.reslblFooter_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 47) + self.reslblFinalExplanation1_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 48) + self.reslblFinalExplanation2_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 49) + self.reslblTemplateName_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 50) + self.reslblTemplatePath_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 51) + self.reslblProceed_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 52) + self.reslblTitle1_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 53) + self.reslblTitle3_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 54) + self.reslblTitle2_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 55) + self.reslblTitle4_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 56) + self.reslblTitle5_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 57) + self.reslblTitle6_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 58) self.loadRoadmapResources() self.loadSalutationResources() self.loadGreetingResources() self.loadCommonResources() def loadCommonResources(self): - self.resOverwriteWarning = self.getResText(LetterWizardDialogResources.RID_RID_COMMON_START + 19) - self.resTemplateDescription = self.getResText(LetterWizardDialogResources.RID_RID_COMMON_START + 20) + self.resOverwriteWarning = \ + self.getResText( + LetterWizardDialogResources.RID_RID_COMMON_START + 19) + self.resTemplateDescription = \ + self.getResText( + LetterWizardDialogResources.RID_RID_COMMON_START + 20) def loadRoadmapResources(self): i = 1 diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index 09cae9536..ebff4a4c1 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -17,12 +17,13 @@ from com.sun.star.i18n.NumberFormatIndex import DATE_SYS_DDMMYY class TextDocument(object): + xTextDocument = None + def __init__(self, xMSF,listener=None,bShowStatusIndicator=None, FrameName=None,_sPreviewURL=None,_moduleIdentifier=None, _textDocument=None, xArgs=None): self.xMSF = xMSF - self.xTextDocument = None if listener is not None: if FrameName is not None: @@ -37,19 +38,19 @@ class TextDocument(object): '''creates an instance of TextDocument by loading a given URL as preview''' self.xFrame = OfficeDocument.createNewFrame(xMSF, listener) - self.xTextDocument = self.loadAsPreview(_sPreviewURL, True) + TextDocument.xTextDocument = self.loadAsPreview(_sPreviewURL, True) elif xArgs is not None: '''creates an instance of TextDocument and creates a frame and loads a document''' self.xDesktop = Desktop.getDesktop(xMSF); self.xFrame = OfficeDocument.createNewFrame(xMSF, listener) - self.xTextDocument = OfficeDocument.load( + TextDocument.xTextDocument = OfficeDocument.load( xFrame, URL, "_self", xArgs); self.xWindowPeer = xFrame.getComponentWindow() - self.m_xDocProps = self.xTextDocument.DocumentProperties + self.m_xDocProps = TextDocument.xTextDocument.DocumentProperties CharLocale = Helper.getUnoStructValue( - self.xTextDocument, "CharLocale"); + TextDocument.xTextDocument, "CharLocale"); return else: @@ -57,26 +58,26 @@ class TextDocument(object): the desktop's current frame''' self.xDesktop = Desktop.getDesktop(xMSF); self.xFrame = self.xDesktop.getActiveFrame() - self.xTextDocument = self.xFrame.getController().Model + TextDocument.xTextDocument = self.xFrame.getController().Model elif _moduleIdentifier is not None: try: '''create the empty document, and set its module identifier''' - self.xTextDocument = xMSF.createInstance( + TextDocument.xTextDocument = xMSF.createInstance( "com.sun.star.text.TextDocument") - self.xTextDocument.initNew() - self.xTextDocument.setIdentifier(_moduleIdentifier.Identifier) + TextDocument.xTextDocument.initNew() + TextDocument.xTextDocument.setIdentifier(_moduleIdentifier.Identifier) # load the document into a blank frame xDesktop = Desktop.getDesktop(xMSF) loadArgs = range(1) loadArgs[0] = "Model" loadArgs[0] = -1 - loadArgs[0] = self.xTextDocument + loadArgs[0] = TextDocument.xTextDocument loadArgs[0] = DIRECT_VALUE xDesktop.loadComponentFromURL( "private:object", "_blank", 0, loadArgs) # remember some things for later usage - self.xFrame = self.xTextDocument.CurrentController.Frame + self.xFrame = TextDocument.xTextDocument.CurrentController.Frame except Exception, e: traceback.print_exc() @@ -84,17 +85,17 @@ class TextDocument(object): '''creates an instance of TextDocument from a given XTextDocument''' self.xFrame = _textDocument.CurrentController.Frame - self.xTextDocument = _textDocument + TextDocument.xTextDocument = _textDocument if bShowStatusIndicator: self.showStatusIndicator() self.init() def init(self): self.xWindowPeer = self.xFrame.getComponentWindow() - self.m_xDocProps = self.xTextDocument.getDocumentProperties() + self.m_xDocProps = TextDocument.xTextDocument.getDocumentProperties() self.CharLocale = Helper.getUnoStructValue( - self.xTextDocument, "CharLocale") - self.xText = self.xTextDocument.Text + TextDocument.xTextDocument, "CharLocale") + self.xText = TextDocument.xTextDocument.Text def showStatusIndicator(self): self.xProgressBar = self.xFrame.createStatusIndicator() @@ -122,30 +123,30 @@ class TextDocument(object): loadValues[2].Value = True '''set the preview document to non-modified mode in order to avoid the 'do u want to save' box''' - if self.xTextDocument is not None: + if TextDocument.xTextDocument is not None: try: - self.xTextDocument.Modified = False + TextDocument.xTextDocument.Modified = False except PropertyVetoException, e1: traceback.print_exc() - self.xTextDocument = OfficeDocument.load( + TextDocument.xTextDocument = OfficeDocument.load( self.xFrame, sDefaultTemplate, "_self", loadValues) self.DocSize = self.getPageSize() - myViewHandler = ViewHandler(self.xTextDocument, self.xTextDocument) + myViewHandler = ViewHandler(TextDocument.xTextDocument, TextDocument.xTextDocument) try: myViewHandler.setViewSetting( "ZoomType", ENTIRE_PAGE) except Exception, e: traceback.print_exc() - myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) + myFieldHandler = TextFieldHandler(self.xMSF, TextDocument.xTextDocument) myFieldHandler.updateDocInfoFields() - return self.xTextDocument + return TextDocument.xTextDocument def getPageSize(self): try: - xNameAccess = self.xTextDocument.StyleFamilies + xNameAccess = TextDocument.xTextDocument.StyleFamilies xPageStyleCollection = xNameAccess.getByName("PageStyles") xPageStyle = xPageStyleCollection.getByName("First Page") return Helper.getUnoPropertyValue(xPageStyle, "Size") @@ -168,14 +169,14 @@ class TextDocument(object): def getCharWidth(self, ScaleString): iScale = 200 - self.xTextDocument.lockControllers() + TextDocument.xTextDocument.lockControllers() iScaleLen = ScaleString.length() - xTextCursor = createTextCursor(self.xTextDocument.Text) + xTextCursor = createTextCursor(TextDocument.xTextDocument.Text) xTextCursor.gotoStart(False) com.sun.star.wizards.common.Helper.setUnoPropertyValue( xTextCursor, "PageDescName", "First Page") xTextCursor.String = ScaleString - xViewCursor = self.xTextDocument.CurrentController + xViewCursor = TextDocument.xTextDocument.CurrentController xTextViewCursor = xViewCursor.ViewCursor xTextViewCursor.gotoStart(False) iFirstPos = xTextViewCursor.Position.X @@ -189,11 +190,11 @@ class TextDocument(object): return iScale def unlockallControllers(self): - while self.xTextDocument.hasControllersLocked() == True: - self.xTextDocument.unlockControllers() + while TextDocument.xTextDocument.hasControllersLocked() == True: + TextDocument.xTextDocument.unlockControllers() def refresh(self): - self.xTextDocument.refresh() + TextDocument.xTextDocument.refresh() ''' This method sets the Author of a Wizard-generated template correctly @@ -220,10 +221,10 @@ class TextDocument(object): currentDate.Year = year currentDate.Month = month dateObject = dateTimeObject(int(year), int(month), int(day)) - du = Helper.DateUtils(self.xMSF, self.xTextDocument) + du = Helper.DateUtils(self.xMSF, TextDocument.xTextDocument) ff = du.getFormat(DATE_SYS_DDMMYY) myDate = du.format(ff, dateObject) - xDocProps2 = self.xTextDocument.DocumentProperties + xDocProps2 = TextDocument.xTextDocument.DocumentProperties xDocProps2.Author = fullname xDocProps2.ModifiedBy = fullname description = xDocProps2.Description @@ -269,6 +270,7 @@ class TextDocument(object): xPC.jumpToLastPage() return xPC.getPage() + @classmethod def getFrameByName(self, sFrameName, xTD): if xTD.TextFrames.hasByName(sFrameName): return xTD.TextFrames.getByName(sFrameName) diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.py b/wizards/com/sun/star/wizards/text/ViewHandler.py index d449f3cd4..cf5401efb 100644 --- a/wizards/com/sun/star/wizards/text/ViewHandler.py +++ b/wizards/com/sun/star/wizards/text/ViewHandler.py @@ -4,7 +4,7 @@ class ViewHandler(object): def __init__ (self, xMSF, xTextDocument): self.xMSFDoc = xMSF self.xTextDocument = xTextDocument - self.xTextViewCursorSupplier = self.xTextDocument.CurrentController + self.xTextViewCursorSupplier = xTextDocument.CurrentController def selectFirstPage(self, oTextTableHandler): try: -- cgit v1.2.3 From 3c235ae20e5907f674212b46163792ee3df43270 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 4 Jul 2011 15:10:53 +0200 Subject: Handle the letterhead layouts properly --- .../com/sun/star/wizards/letter/LetterDocument.py | 156 +++++++++++---------- .../star/wizards/letter/LetterWizardDialogImpl.py | 51 +++---- wizards/com/sun/star/wizards/text/TextDocument.py | 1 + 3 files changed, 106 insertions(+), 102 deletions(-) diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.py b/wizards/com/sun/star/wizards/letter/LetterDocument.py index b5a172f88..517d0c669 100644 --- a/wizards/com/sun/star/wizards/letter/LetterDocument.py +++ b/wizards/com/sun/star/wizards/letter/LetterDocument.py @@ -156,104 +156,106 @@ class LetterDocument(TextDocument): except Exception: traceback.print_exc() - class BusinessPaperObject(object): +class BusinessPaperObject(object): - xFrame = None - - def __init__(self, FrameText, Width, Height, XPos, YPos): - self.iWidth = Width - self.iHeight = Height - self.iXPos = XPos - self.iYPos = YPos - try: - LetterDocument.BusinessPaperObject.xFrame = \ - TextDocument.xTextDocument.createInstance( - "com.sun.star.text.TextFrame") - self.setFramePosition() - Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, - "AnchorType", AT_PAGE) - Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, - "SizeType", FIX) + def __init__(self, FrameText, Width, Height, XPos, YPos): + self.iWidth = Width + self.iHeight = Height + self.iXPos = XPos + self.iYPos = YPos + self.xFrame = None + try: + self.xFrame = \ + TextDocument.xTextDocument.createInstance( + "com.sun.star.text.TextFrame") + self.setFramePosition() + Helper.setUnoPropertyValue( + self.xFrame, + "AnchorType", AT_PAGE) + Helper.setUnoPropertyValue( + self.xFrame, + "SizeType", FIX) - Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, - "TextWrap", THROUGHT) - Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, - "Opaque", True); - Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, - "BackColor", 15790320) + Helper.setUnoPropertyValue( + self.xFrame, + "TextWrap", THROUGHT) + Helper.setUnoPropertyValue( + self.xFrame, + "Opaque", True); + Helper.setUnoPropertyValue( + self.xFrame, + "BackColor", 15790320) - myBorder = BorderLine() - myBorder.OuterLineWidth = 0 - Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, - "LeftBorder", myBorder) - Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, - "RightBorder", myBorder) - Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, - "TopBorder", myBorder) - Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, - "BottomBorder", myBorder) - Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, - "Print", False) + myBorder = BorderLine() + myBorder.OuterLineWidth = 0 + Helper.setUnoPropertyValue( + self.xFrame, + "LeftBorder", myBorder) + Helper.setUnoPropertyValue( + self.xFrame, + "RightBorder", myBorder) + Helper.setUnoPropertyValue( + self.xFrame, + "TopBorder", myBorder) + Helper.setUnoPropertyValue( + self.xFrame, + "BottomBorder", myBorder) + Helper.setUnoPropertyValue( + self.xFrame, + "Print", False) - xTextCursor = \ - TextDocument.xTextDocument.Text.createTextCursor() - xTextCursor.gotoEnd(True) - xText = TextDocument.xTextDocument.Text - xText.insertTextContent( - xTextCursor, LetterDocument.BusinessPaperObject.xFrame, - False) + xTextCursor = \ + TextDocument.xTextDocument.Text.createTextCursor() + xTextCursor.gotoEnd(True) + xText = TextDocument.xTextDocument.Text + xText.insertTextContent( + xTextCursor, self.xFrame, + False) - xFrameText = LetterDocument.BusinessPaperObject.xFrame.Text - xFrameCursor = xFrameText.createTextCursor() - xFrameCursor.setPropertyValue("CharWeight", BOLD) - xFrameCursor.setPropertyValue("CharColor", 16777215) - xFrameCursor.setPropertyValue("CharFontName", "Albany") - xFrameCursor.setPropertyValue("CharHeight", 18) + xFrameText = self.xFrame.Text + xFrameCursor = xFrameText.createTextCursor() + xFrameCursor.setPropertyValue("CharWeight", BOLD) + xFrameCursor.setPropertyValue("CharColor", 16777215) + xFrameCursor.setPropertyValue("CharFontName", "Albany") + xFrameCursor.setPropertyValue("CharHeight", 18) - xFrameText.insertString(xFrameCursor, FrameText, False) - except Exception: - traceback.print_exc() + xFrameText.insertString(xFrameCursor, FrameText, False) + except Exception: + traceback.print_exc() - def setFramePosition(self): + def setFramePosition(self): + try: Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, + self.xFrame, "HoriOrient", NONEHORI) Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, + self.xFrame, "VertOrient", NONEVERT) Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, + self.xFrame, PropertyNames.PROPERTY_HEIGHT, self.iHeight) Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, + self.xFrame, PropertyNames.PROPERTY_WIDTH, self.iWidth) Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, + self.xFrame, "HoriOrientPosition", self.iXPos) Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, + self.xFrame, "VertOrientPosition", self.iYPos) Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, + self.xFrame, "HoriOrientRelation", PAGE_FRAME) Helper.setUnoPropertyValue( - LetterDocument.BusinessPaperObject.xFrame, + self.xFrame, "VertOrientRelation", PAGE_FRAME) + except Exception: + traceback.print_exc() - def removeFrame(self): - if LetterDocument.BusinessPaperObject.xFrame is not None: - try: - TextDocument.xTextDocument.Text.removeTextContent( - LetterDocument.BusinessPaperObject.xFrame) - except Exception: - traceback.print_exc() + def removeFrame(self): + if self.xFrame is not None: + try: + TextDocument.xTextDocument.Text.removeTextContent( + self.xFrame) + except Exception: + traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py index f1eb6af81..d24728612 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py @@ -405,39 +405,39 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.activate() def numLogoHeightTextChanged(self): - self.BusCompanyLogo.iHeight = numLogoHeight.Value * 1000 + self.BusCompanyLogo.iHeight = int(self.numLogoHeight.Value * 1000) self.BusCompanyLogo.setFramePosition() def numLogoWidthTextChanged(self): - self.BusCompanyLogo.iWidth = numLogoWidth.Value * 1000 + self.BusCompanyLogo.iWidth = int(self.numLogoWidth.Value * 1000) self.BusCompanyLogo.setFramePosition() def numLogoXTextChanged(self): - self.BusCompanyLogo.iXPos = numLogoX.Value * 1000 + self.BusCompanyLogo.iXPos = int(self.numLogoX.Value * 1000) self.BusCompanyLogo.setFramePosition() def numLogoYTextChanged(self): - self.BusCompanyLogo.iYPos = numLogoY.Value * 1000 + self.BusCompanyLogo.iYPos = int(self.numLogoY.Value * 1000) self.BusCompanyLogo.setFramePosition() def numAddressWidthTextChanged(self): - self.BusCompanyAddress.iWidth = self.numAddressWidth.Value * 1000 + self.BusCompanyAddress.iWidth = int(self.numAddressWidth.Value * 1000) self.BusCompanyAddress.setFramePosition() def numAddressXTextChanged(self): - self.BusCompanyAddress.iXPos = self.numAddressX.Value * 1000 + self.BusCompanyAddress.iXPos = int(self.numAddressX.Value * 1000) self.BusCompanyAddress.setFramePosition() def numAddressYTextChanged(self): - self.BusCompanyAddress.iYPos = self.numAddressY.Value * 1000 + self.BusCompanyAddress.iYPos = int(self.numAddressY.Value * 1000) self.BusCompanyAddress.setFramePosition() def numAddressHeightTextChanged(self): - self.BusCompanyAddress.iHeight = self.numAddressHeight.Value * 1000 + self.BusCompanyAddress.iHeight = int(self.numAddressHeight.Value * 1000) self.BusCompanyAddress.setFramePosition() def numFooterHeightTextChanged(self): - self.BusFooter.iHeight = self.numFooterHeight.Value * 1000 + self.BusFooter.iHeight = int(self.numFooterHeight.Value * 1000) self.BusFooter.iYPos = \ self.myLetterDoc.DocSize.Height - self.BusFooter.iHeight self.BusFooter.setFramePosition() @@ -449,9 +449,10 @@ class LetterWizardDialogImpl(LetterWizardDialog): if self.numLogoHeight.Value == 0: self.numLogoHeight.Value = 0.1 - self.BusCompanyLogo = LetterDocument.BusinessPaperObject( - "Company Logo", self.numLogoWidth.Value * 1000, - self.numLogoHeight.Value * 1000, self.numLogoX.Value * 1000, + self.BusCompanyLogo = BusinessPaperObject( + "Company Logo", int(self.numLogoWidth.Value * 1000), + int(self.numLogoHeight.Value * 1000), + int(self.numLogoX.Value * 1000), self.numLogoY.Value * 1000) self.setControlProperty( "numLogoHeight", PropertyNames.PROPERTY_ENABLED, True) @@ -500,10 +501,11 @@ class LetterWizardDialogImpl(LetterWizardDialog): if self.numAddressHeight.Value == 0: self.numAddressHeight.Value = 0.1 - self.BusCompanyAddress = LetterDocument.BusinessPaperObject( - "Company Address", self.numAddressWidth.Value * 1000, - self.numAddressHeight.Value * 1000, - self.numAddressX.Value * 1000, self.numAddressY.Value * 1000) + self.BusCompanyAddress = BusinessPaperObject( + "Company Address", int(self.numAddressWidth.Value * 1000), + int(self.numAddressHeight.Value * 1000), + int(self.numAddressX.Value * 1000), + int(self.numAddressY.Value * 1000)) self.setControlProperty( "self.numAddressHeight", PropertyNames.PROPERTY_ENABLED, True) self.setControlProperty( @@ -571,10 +573,9 @@ class LetterWizardDialogImpl(LetterWizardDialog): iFrameY = int(Helper.getUnoPropertyValue( xReceiverFrame, "VertOrientPosition")) iReceiverHeight = int(0.5 * 1000) - self.BusCompanyAddressReceiver = \ - LetterDocument.BusinessPaperObject( - " ", iFrameWidth, iReceiverHeight, iFrameX, - iFrameY - iReceiverHeight) + self.BusCompanyAddressReceiver = BusinessPaperObject( + " ", iFrameWidth, iReceiverHeight, iFrameX, + iFrameY - iReceiverHeight) self.setPossibleAddressReceiver(False) except NoSuchElementException: traceback.print_exc() @@ -601,11 +602,11 @@ class LetterWizardDialogImpl(LetterWizardDialog): if self.numFooterHeight.Value == 0: self.numFooterHeight.Value = 0.1 - self.BusFooter = LetterDocument.BusinessPaperObject( + self.BusFooter = BusinessPaperObject( "Footer", self.myLetterDoc.DocSize.Width, - self.numFooterHeight.Value * 1000, 0, - self.myLetterDoc.DocSize.Height - \ - (self.numFooterHeight.Value * 1000)) + int(self.numFooterHeight.Value * 1000), 0, + int(self.myLetterDoc.DocSize.Height - \ + (self.numFooterHeight.Value * 1000))) self.setControlProperty( "self.numFooterHeight", PropertyNames.PROPERTY_ENABLED, True) self.setControlProperty( @@ -619,7 +620,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): "self.numFooterHeight", PropertyNames.PROPERTY_ENABLED, False) self.setControlProperty( "lblFooterHeight", PropertyNames.PROPERTY_ENABLED, False) - setPossibleFooter(True) + self.setPossibleFooter(True) def chkUseLogoItemChanged(self): try: diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index ebff4a4c1..9a4e741cb 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -251,6 +251,7 @@ class TextDocument(object): def removeTextContent(self, oTextContent): try: self.xText.removeTextContent(oxTextContent) + print "remove" return True except NoSuchElementException, e: traceback.print_exc() -- cgit v1.2.3 From 002da0a3abe9e60f5c07105839b53008182f171a Mon Sep 17 00:00:00 2001 From: Christina Rossmanith Date: Wed, 29 Jun 2011 22:52:41 +0200 Subject: Replace ByteString with rtl::OString --- automation/source/testtool/httprequest.cxx | 41 ++++++++++++++++-------------- automation/source/testtool/httprequest.hxx | 24 ++++++++--------- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/automation/source/testtool/httprequest.cxx b/automation/source/testtool/httprequest.cxx index 99d1aee8c..6fc3478ea 100644 --- a/automation/source/testtool/httprequest.cxx +++ b/automation/source/testtool/httprequest.cxx @@ -38,8 +38,8 @@ void HttpRequest::Init() { nResultId = 0; - aHeader.Erase(); - aContentType.Erase(); + aHeader = rtl::OString(); + aContentType = rtl::OString(); delete pStream; pStream = NULL; } @@ -59,7 +59,7 @@ HttpRequest::~HttpRequest() pOutSocket = NULL; } -void HttpRequest::SetRequest( ByteString aHost, ByteString aPath, sal_uInt16 nPort ) +void HttpRequest::SetRequest( rtl::OString aHost, rtl::OString aPath, sal_uInt16 nPort ) { nStatus = HTTP_REQUEST_SET; Init(); @@ -68,7 +68,7 @@ void HttpRequest::SetRequest( ByteString aHost, ByteString aPath, sal_uInt16 nPo nRequestPort = nPort; } -void HttpRequest::SetProxy( ByteString aHost, sal_uInt16 nPort ) +void HttpRequest::SetProxy( rtl::OString aHost, sal_uInt16 nPort ) { nStatus = HTTP_REQUEST_SET; Init(); @@ -84,13 +84,13 @@ sal_Bool HttpRequest::Execute() // Open channel to standard redir host osl::SocketAddr aConnectAddr; - if ( aProxyHost.Len() ) + if ( aProxyHost.getLength() ) { - aConnectAddr = osl::SocketAddr( rtl::OUString( UniString( aProxyHost, RTL_TEXTENCODING_UTF8 ) ), nProxyPort ); + aConnectAddr = osl::SocketAddr( rtl::OStringToOUString( aProxyHost, RTL_TEXTENCODING_UTF8 ), nProxyPort ); } else { - aConnectAddr = osl::SocketAddr( rtl::OUString( UniString( aRequestHost, RTL_TEXTENCODING_UTF8 ) ), nRequestPort ); + aConnectAddr = osl::SocketAddr( rtl::OStringToOUString( aRequestHost, RTL_TEXTENCODING_UTF8 ), nRequestPort ); } TimeValue aTV; @@ -107,13 +107,13 @@ sal_Bool HttpRequest::Execute() } SendString( pOutSocket, "GET " ); - if ( aProxyHost.Len() ) + if ( aProxyHost.getLength() ) { //GET http://staroffice-doc.germany.sun.com/cgi-bin/htdig/binarycopy.sh?CopyIt=++CopyIt++ HTTP/1.0 SendString( pOutSocket, "http://" ); SendString( pOutSocket, aRequestHost ); SendString( pOutSocket, ":" ); - SendString( pOutSocket, ByteString::CreateFromInt32( nRequestPort ) ); + SendString( pOutSocket, rtl::OString::valueOf( (sal_Int32) nRequestPort ) ); SendString( pOutSocket, aRequestPath ); SendString( pOutSocket, " HTTP/1.0\n" ); @@ -156,21 +156,24 @@ sal_Bool HttpRequest::Execute() pStream->Seek( 0 ); - ByteString aLine; + rtl::OString aLine; sal_Bool bInsideHeader = sal_True; + sal_Int32 nIndex; while ( bInsideHeader ) { pStream->ReadLine( aLine ); - if ( !aLine.Len() ) + if ( !aLine.getLength() ) bInsideHeader = sal_False; else { - if ( IsItem( "HTTP/", aLine ) ) - nResultId = (sal_uInt16)aLine.GetToken( 1, ' ' ).ToInt32(); + if ( IsItem( "HTTP/", aLine ) ) { + nIndex = 0; + nResultId = (sal_uInt16)aLine.getToken( (sal_Int32)1, ' ', nIndex ).toInt32(); + } if ( IsItem( "Content-Type:", aLine ) ) { - aContentType = aLine.Copy( 13 ); - aContentType.EraseLeadingAndTrailingChars(); + aContentType = aLine.copy( 13 ); + aContentType.trim(); } aHeader += aLine; aHeader += "\n"; @@ -200,15 +203,15 @@ Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java 1.3.0; Linux Connection: close Content-Type: text/xml; charset=ISO-8859-1 */ -void HttpRequest::SendString( osl::StreamSocket* pSocket , ByteString aText ) +void HttpRequest::SendString( osl::StreamSocket* pSocket , rtl::OString aText ) { if ( nStatus == HTTP_REQUEST_PENDING ) - pSocket->write( aText.GetBuffer(), aText.Len() ); + pSocket->write( aText.getStr(), aText.getLength() ); } -sal_Bool HttpRequest::IsItem( ByteString aItem, ByteString aLine ) +sal_Bool HttpRequest::IsItem( rtl::OString aItem, rtl::OString aLine ) { - return aItem.Match( aLine ) == STRING_MATCH; + return aItem.match( aLine ); } diff --git a/automation/source/testtool/httprequest.hxx b/automation/source/testtool/httprequest.hxx index 3996a9c62..d4f0a722f 100644 --- a/automation/source/testtool/httprequest.hxx +++ b/automation/source/testtool/httprequest.hxx @@ -35,8 +35,8 @@ #define HTTP_REQUEST_DONE 3 #define HTTP_REQUEST_ERROR 4 -#include #include +#include namespace osl { @@ -46,37 +46,37 @@ namespace osl class HttpRequest { - ByteString aRequestPath; - ByteString aRequestHost; + rtl::OString aRequestPath; + rtl::OString aRequestHost; sal_uInt16 nRequestPort; - ByteString aProxyHost; + rtl::OString aProxyHost; sal_uInt16 nProxyPort; sal_uInt16 nStatus; osl::ConnectorSocket *pOutSocket; - ByteString aHeader; + rtl::OString aHeader; sal_uInt16 nResultId; - ByteString aContentType; + rtl::OString aContentType; SvMemoryStream* pStream; - void SendString( osl::StreamSocket* pSocket, ByteString aText ); - sal_Bool IsItem( ByteString aItem, ByteString aLine ); + void SendString( osl::StreamSocket* pSocket, ::rtl::OString aText ); + sal_Bool IsItem( rtl::OString aItem, rtl::OString aLine ); void Init(); public: HttpRequest(); ~HttpRequest(); - void SetRequest( ByteString aHost, ByteString aPath, sal_uInt16 nPort ); - void SetProxy( ByteString aHost, sal_uInt16 nPort ); + void SetRequest( rtl::OString aHost, rtl::OString aPath, sal_uInt16 nPort ); + void SetProxy( rtl::OString aHost, sal_uInt16 nPort ); sal_Bool Execute(); void Abort(); - ByteString GetHeader() const { return aHeader; } + rtl::OString GetHeader() const { return aHeader; } SvMemoryStream* GetBody(); - ByteString GetContentType() const { return aContentType; } + rtl::OString GetContentType() const { return aContentType; } sal_uInt16 GetResultId() const { return nResultId; } sal_uInt16 GetStatus(); -- cgit v1.2.3 From 7192970704ba274fc7ed1224db8a2bbca054bbff Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 6 Jul 2011 17:49:00 +0200 Subject: create file when it doesn't exist --- wizards/com/sun/star/wizards/common/FileAccess.py | 4 +- .../sun/star/wizards/document/OfficeDocument.py | 4 +- .../com/sun/star/wizards/letter/LetterDocument.py | 56 +++--- .../sun/star/wizards/letter/LetterWizardDialog.py | 204 ++++++++++----------- .../star/wizards/letter/LetterWizardDialogImpl.py | 92 +++++----- wizards/com/sun/star/wizards/ui/event/DataAware.py | 2 +- .../com/sun/star/wizards/ui/event/UnoDataAware.py | 2 +- 7 files changed, 182 insertions(+), 182 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 384582b71..3397d7138 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -485,9 +485,9 @@ class FileAccess(object): try: if childPath is not None: path = self.filenameConverter.getSystemPathFromFileURL(path) - f = open(path,childPath) + f = open(path,childPath, 'w') else: - f = open(path) + f = open(path, 'w') r = self.filenameConverter.getFileURLFromSystemPath(path, osPath.abspath(path)) diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py index f053baebe..f2fc2cb76 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.py +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py @@ -188,7 +188,7 @@ class OfficeDocument(object): oStoreProperties[1].Name = "InteractionHandler" oStoreProperties[1].Value = xMSF.createInstance( "com.sun.star.comp.uui.UUIInteractionHandler") - else: + else: oStoreProperties = range(0) if StorePath.startswith("file://"): @@ -200,7 +200,7 @@ class OfficeDocument(object): xComponent.storeToURL( unohelper.absolutize( unohelper.systemPathToFileUrl(sPath), - unohelper.systemPathToFileUrl(sFile)), + unohelper.systemPathToFileUrl(sFile)), tuple(oStoreProperties)) return True except ErrorCodeIOException: diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.py b/wizards/com/sun/star/wizards/letter/LetterDocument.py index 517d0c669..ea797210b 100644 --- a/wizards/com/sun/star/wizards/letter/LetterDocument.py +++ b/wizards/com/sun/star/wizards/letter/LetterDocument.py @@ -106,12 +106,12 @@ class LetterDocument(TextDocument): myFieldHandler.changeUserFieldContent( "Street", Helper.getUnoObjectbyName(oUserDataAccess, "street")) myFieldHandler.changeUserFieldContent( - "PostCode", + "PostCode", Helper.getUnoObjectbyName(oUserDataAccess, "postalcode")) myFieldHandler.changeUserFieldContent( "City", Helper.getUnoObjectbyName(oUserDataAccess, "l")) myFieldHandler.changeUserFieldContent( - PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STATE, Helper.getUnoObjectbyName(oUserDataAccess, "st")) except Exception: traceback.print_exc() @@ -167,91 +167,91 @@ class BusinessPaperObject(object): try: self.xFrame = \ TextDocument.xTextDocument.createInstance( - "com.sun.star.text.TextFrame") + "com.sun.star.text.TextFrame") self.setFramePosition() Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, "AnchorType", AT_PAGE) Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, "SizeType", FIX) - + Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, "TextWrap", THROUGHT) Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, "Opaque", True); Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, "BackColor", 15790320) - + myBorder = BorderLine() myBorder.OuterLineWidth = 0 Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, "LeftBorder", myBorder) Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, "RightBorder", myBorder) Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, "TopBorder", myBorder) Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, "BottomBorder", myBorder) Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, "Print", False) - + xTextCursor = \ TextDocument.xTextDocument.Text.createTextCursor() xTextCursor.gotoEnd(True) xText = TextDocument.xTextDocument.Text xText.insertTextContent( - xTextCursor, self.xFrame, + xTextCursor, self.xFrame, False) - + xFrameText = self.xFrame.Text xFrameCursor = xFrameText.createTextCursor() xFrameCursor.setPropertyValue("CharWeight", BOLD) xFrameCursor.setPropertyValue("CharColor", 16777215) xFrameCursor.setPropertyValue("CharFontName", "Albany") xFrameCursor.setPropertyValue("CharHeight", 18) - + xFrameText.insertString(xFrameCursor, FrameText, False) except Exception: traceback.print_exc() - + def setFramePosition(self): try: Helper.setUnoPropertyValue( self.xFrame, "HoriOrient", NONEHORI) Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, "VertOrient", NONEVERT) Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, PropertyNames.PROPERTY_HEIGHT, self.iHeight) Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, PropertyNames.PROPERTY_WIDTH, self.iWidth) Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, "HoriOrientPosition", self.iXPos) Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, "VertOrientPosition", self.iYPos) Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, "HoriOrientRelation", PAGE_FRAME) Helper.setUnoPropertyValue( - self.xFrame, + self.xFrame, "VertOrientRelation", PAGE_FRAME) except Exception: traceback.print_exc() - + def removeFrame(self): if self.xFrame is not None: try: diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py index ac87206f2..35158a3ea 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py @@ -12,18 +12,18 @@ class LetterWizardDialog(WizardDialog): self.resources = LetterWizardDialogResources(xmsf) Helper.setUnoPropertyValues( self.xDialogModel, - ("Closeable", + ("Closeable", PropertyNames.PROPERTY_HEIGHT, - "Moveable", - PropertyNames.PROPERTY_NAME, - PropertyNames.PROPERTY_POSITION_X, - PropertyNames.PROPERTY_POSITION_Y, - PropertyNames.PROPERTY_STEP, - PropertyNames.PROPERTY_TABINDEX, - "Title", - PropertyNames.PROPERTY_WIDTH), + "Moveable", + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Title", + PropertyNames.PROPERTY_WIDTH), (True, 210, True, - "LetterWizardDialog", 104, 52, 1, 1, + "LetterWizardDialog", 104, 52, 1, 1, self.resources.resLetterWizardDialog_title, 310)) self.fontDescriptor1 = \ uno.createUnoStruct('com.sun.star.awt.FontDescriptor') @@ -41,7 +41,7 @@ class LetterWizardDialog(WizardDialog): def buildStep1(self): self.optBusinessLetter = self.insertRadioButton( - "optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED, + "optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -51,11 +51,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, HelpIds.getHelpIdString(HID + 1), + (8, HelpIds.getHelpIdString(HID + 1), self.resources.resoptBusinessLetter_value, "optBusinessLetter", 97, 28, 1, 1, 184), self) self.optPrivOfficialLetter = self.insertRadioButton( - "optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED, + "optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -65,11 +65,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, HelpIds.getHelpIdString(HID + 2), - self.resources.resoptPrivOfficialLetter_value, + (8, HelpIds.getHelpIdString(HID + 2), + self.resources.resoptPrivOfficialLetter_value, "optPrivOfficialLetter", 97, 74, 1, 2, 184), self) self.optPrivateLetter = self.insertRadioButton( - "optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED, + "optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -79,11 +79,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, HelpIds.getHelpIdString(HID + 3), - self.resources.resoptPrivateLetter_value, + (8, HelpIds.getHelpIdString(HID + 3), + self.resources.resoptPrivateLetter_value, "optPrivateLetter", 97, 106, 1, 3, 184), self) self.lstBusinessStyle = self.insertListBox( - "lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, + "lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, @@ -98,7 +98,7 @@ class LetterWizardDialog(WizardDialog): "lstBusinessStyle", 180, 40, 1, 4, 74), self) self.chkBusinessPaper = self.insertCheckBox( - "chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED, + "chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -109,11 +109,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, HelpIds.getHelpIdString(HID + 5), - self.resources.reschkBusinessPaper_value, + (8, HelpIds.getHelpIdString(HID + 5), + self.resources.reschkBusinessPaper_value, "chkBusinessPaper", 110, 56, 0, 1, 5, 168), self) self.lstPrivOfficialStyle = self.insertListBox( - "lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, + "lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, LSTPRIVOFFICIALSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, @@ -124,7 +124,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (True, 12, HelpIds.getHelpIdString(HID + 6), + (True, 12, HelpIds.getHelpIdString(HID + 6), "lstPrivOfficialStyle", 180, 86, 1, 6, 74), self) self.lstPrivateStyle = self.insertListBox( "lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, @@ -138,10 +138,10 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (True, 12, HelpIds.getHelpIdString(HID + 7), + (True, 12, HelpIds.getHelpIdString(HID + 7), "lstPrivateStyle", 180, 118, 1, 7, 74), self) self.lblBusinessStyle = self.insertLabel( - "lblBusinessStyle", + "lblBusinessStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -150,10 +150,10 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, self.resources.reslblBusinessStyle_value, + (8, self.resources.reslblBusinessStyle_value, "lblBusinessStyle", 110, 42, 1, 48, 60)) self.lblPrivOfficialStyle = self.insertLabel( - "lblPrivOfficialStyle", + "lblPrivOfficialStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -168,7 +168,7 @@ class LetterWizardDialog(WizardDialog): "lblTitle1", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, - PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, @@ -176,11 +176,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (self.fontDescriptor6, 16, - self.resources.reslblTitle1_value, True, + (self.fontDescriptor6, 16, + self.resources.reslblTitle1_value, True, "lblTitle1", 91, 8, 1, 55, 212)) self.lblPrivateStyle = self.insertLabel( - "lblPrivateStyle", + "lblPrivateStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -192,7 +192,7 @@ class LetterWizardDialog(WizardDialog): (8, self.resources.reslblPrivateStyle_value, "lblPrivateStyle", 110, 120, 1, 74, 60)) self.lblIntroduction = self.insertLabel( - "lblIntroduction", + "lblIntroduction", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -202,7 +202,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (39, self.resources.reslblIntroduction_value, + (39, self.resources.reslblIntroduction_value, True, "lblIntroduction", 104, 145, 1, 80, 199)) self.ImageControl3 = self.insertInfoImage(92, 145, 1) @@ -210,7 +210,7 @@ class LetterWizardDialog(WizardDialog): def buildStep2(self): self.chkPaperCompanyLogo = self.insertCheckBox( "chkPaperCompanyLogo", - CHKPAPERCOMPANYLOGO_ITEM_CHANGED, + CHKPAPERCOMPANYLOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -222,11 +222,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 8), - self.resources.reschkPaperCompanyLogo_value, + self.resources.reschkPaperCompanyLogo_value, "chkPaperCompanyLogo", 97, 28, 0, 2, 8, 68), self) self.numLogoHeight = self.insertNumericField( "numLogoHeight", - NUMLOGOHEIGHT_TEXT_CHANGED, + NUMLOGOHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -241,7 +241,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 9), "numLogoHeight", 138, 40, True, 2, True, 9, 3, 30), self) self.numLogoX = self.insertNumericField( - "numLogoX", NUMLOGOX_TEXT_CHANGED, + "numLogoX", NUMLOGOX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -255,7 +255,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 10), "numLogoX", 266, 40, True, 2, 10, 0, 30), self) self.numLogoWidth = self.insertNumericField( - "numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED, + "numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -269,7 +269,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 11), "numLogoWidth", 138, 56, True, 2, 11, 3.8, 30), self) self.numLogoY = self.insertNumericField( - "numLogoY", NUMLOGOY_TEXT_CHANGED, + "numLogoY", NUMLOGOY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -280,10 +280,10 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), - (12, HelpIds.getHelpIdString(HID + 12), + (12, HelpIds.getHelpIdString(HID + 12), "numLogoY", 266, 56, True, 2, 12, -3.4, 30), self) self.chkPaperCompanyAddress = self.insertCheckBox( - "chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED, + "chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -298,7 +298,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkPaperCompanyAddress_value, "chkPaperCompanyAddress", 98, 84, 0, 2, 13, 68), self) self.numAddressHeight = self.insertNumericField( - "numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED, + "numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -313,7 +313,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 14), "numAddressHeight", 138, 96, True, 2, True, 14, 3, 30), self) self.numAddressX = self.insertNumericField( - "numAddressX", NUMADDRESSX_TEXT_CHANGED, + "numAddressX", NUMADDRESSX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -327,7 +327,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 15), "numAddressX", 266, 96, True, 2, 15, 3.8, 30), self) self.numAddressWidth = self.insertNumericField( - "numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED, + "numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -341,7 +341,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 16), "numAddressWidth", 138, 112, True, 2, 16, 13.8, 30), self) self.numAddressY = self.insertNumericField( - "numAddressY", NUMADDRESSY_TEXT_CHANGED, + "numAddressY", NUMADDRESSY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -355,7 +355,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 17), "numAddressY", 266, 112, True, 2, 17, -3.4, 30), self) self.chkCompanyReceiver = self.insertCheckBox( - "chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED, + "chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -369,7 +369,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkCompanyReceiver_value, "chkCompanyReceiver", 103, 131, 0, 2, 18, 185), self) self.chkPaperFooter = self.insertCheckBox( - "chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED, + "chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -380,11 +380,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, HelpIds.getHelpIdString(HID + 19), + (8, HelpIds.getHelpIdString(HID + 19), self.resources.reschkPaperFooter_value, "chkPaperFooter", 97, 158, 0, 2, 19, 68), self) self.numFooterHeight = self.insertNumericField( - "numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED, + "numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -398,7 +398,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 20), "numFooterHeight", 236, 156, True, 2, 20, 5, 30), self) self.lblLogoHeight = self.insertLabel( - "lblLogoHeight", + "lblLogoHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -410,7 +410,7 @@ class LetterWizardDialog(WizardDialog): (8, self.resources.reslblLogoHeight_value, "lblLogoHeight", 103, 42, 2, 68, 32)) self.lblLogoWidth = self.insertLabel( - "lblLogoWidth", + "lblLogoWidth", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -422,7 +422,7 @@ class LetterWizardDialog(WizardDialog): (8, self.resources.reslblLogoWidth_value, "lblLogoWidth", 103, 58, 2, 69, 32)) self.FixedLine5 = self.insertFixedLine( - "FixedLine5", + "FixedLine5", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, @@ -433,7 +433,7 @@ class LetterWizardDialog(WizardDialog): (2, "FixedLine5", 90, 78, 2, 70, 215)) self.FixedLine6 = self.insertFixedLine( - "FixedLine6", + "FixedLine6", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, @@ -444,7 +444,7 @@ class LetterWizardDialog(WizardDialog): (2, "FixedLine6", 90, 150, 2, 71, 215)) self.lblFooterHeight = self.insertLabel( - "lblFooterHeight", + "lblFooterHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -456,7 +456,7 @@ class LetterWizardDialog(WizardDialog): (8, self.resources.reslblFooterHeight_value, "lblFooterHeight", 200, 158, 2, 72, 32)) self.lblLogoX = self.insertLabel( - "lblLogoX", + "lblLogoX", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -468,7 +468,7 @@ class LetterWizardDialog(WizardDialog): (8, self.resources.reslblLogoX_value, "lblLogoX", 170, 42, 2, 84, 94)) self.lblLogoY = self.insertLabel( - "lblLogoY", + "lblLogoY", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -480,7 +480,7 @@ class LetterWizardDialog(WizardDialog): (8, self.resources.reslblLogoY_value, "lblLogoY", 170, 58, 2, 85, 94)) self.lblAddressHeight = self.insertLabel( - "lblAddressHeight", + "lblAddressHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -492,7 +492,7 @@ class LetterWizardDialog(WizardDialog): (8, self.resources.reslblAddressHeight_value, "lblAddressHeight", 103, 98, 2, 86, 32)) self.lblAddressWidth = self.insertLabel( - "lblAddressWidth", + "lblAddressWidth", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -504,7 +504,7 @@ class LetterWizardDialog(WizardDialog): (8, self.resources.reslblAddressWidth_value, "lblAddressWidth", 103, 114, 2, 87, 32)) self.lblAddressX = self.insertLabel( - "lblAddressX", + "lblAddressX", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -516,7 +516,7 @@ class LetterWizardDialog(WizardDialog): (8, self.resources.reslblAddressX_value, "lblAddressX", 170, 98, 2, 88, 94)) self.lblAddressY = self.insertLabel( - "lblAddressY", + "lblAddressY", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -529,7 +529,7 @@ class LetterWizardDialog(WizardDialog): "lblAddressY", 170, 114, 2, 89, 94)) self.lblTitle2 = self.insertLabel( "lblTitle2", - ("FontDescriptor", + ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -545,8 +545,8 @@ class LetterWizardDialog(WizardDialog): def buildStep3(self): self.lstLetterNorm = self.insertListBox( - "lstLetterNorm", - LSTLETTERNORM_ACTION_PERFORMED, + "lstLetterNorm", + LSTLETTERNORM_ACTION_PERFORMED, LSTLETTERNORM_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, @@ -560,13 +560,13 @@ class LetterWizardDialog(WizardDialog): (True, 12, HelpIds.getHelpIdString(HID + 21), "lstLetterNorm", 210, 34, 3, 21, 74), self) self.chkUseLogo = self.insertCheckBox( - "chkUseLogo", CHKUSELOGO_ITEM_CHANGED, + "chkUseLogo", CHKUSELOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, - PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, @@ -575,14 +575,14 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseLogo_value, "chkUseLogo", 97, 54, 0, 3, 22, 212), self) self.chkUseAddressReceiver = self.insertCheckBox( - "chkUseAddressReceiver", - CHKUSEADDRESSRECEIVER_ITEM_CHANGED, + "chkUseAddressReceiver", + CHKUSEADDRESSRECEIVER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, - PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, @@ -591,7 +591,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseAddressReceiver_value, "chkUseAddressReceiver", 97, 69, 0, 3, 23, 212), self) self.chkUseSigns = self.insertCheckBox( - "chkUseSigns", CHKUSESIGNS_ITEM_CHANGED, + "chkUseSigns", CHKUSESIGNS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -606,7 +606,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseSigns_value, "chkUseSigns", 97, 82, 0, 3, 24, 212), self) self.chkUseSubject = self.insertCheckBox( - "chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, + "chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -621,7 +621,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseSubject_value, "chkUseSubject", 97, 98, 0, 3, 25, 212), self) self.chkUseSalutation = self.insertCheckBox( - "chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, + "chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -652,7 +652,7 @@ class LetterWizardDialog(WizardDialog): (True, 12, HelpIds.getHelpIdString(HID + 27), "lstSalutation", 210, 110, 3, 27, 74), self) self.chkUseBendMarks = self.insertCheckBox( - "chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED, + "chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -667,7 +667,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseBendMarks_value, "chkUseBendMarks", 97, 127, 0, 3, 28, 212), self) self.chkUseGreeting = self.insertCheckBox( - "chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, + "chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -696,13 +696,13 @@ class LetterWizardDialog(WizardDialog): (True, 12, HelpIds.getHelpIdString(HID + 30), "lstGreeting", 210, 141, 3, 30, 74), self) self.chkUseFooter = self.insertCheckBox( - "chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, + "chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, - PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, @@ -711,7 +711,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseFooter_value, "chkUseFooter", 97, 158, 0, 3, 31, 212), self) self.lblLetterNorm = self.insertLabel( - "lblLetterNorm", + "lblLetterNorm", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -741,7 +741,7 @@ class LetterWizardDialog(WizardDialog): def buildStep4(self): self.optSenderPlaceholder = self.insertRadioButton( - "optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, + "optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -755,7 +755,7 @@ class LetterWizardDialog(WizardDialog): self.resources.resoptSenderPlaceholder_value, "optSenderPlaceholder", 104, 42, 4, 32, 149), self) self.optSenderDefine = self.insertRadioButton( - "optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, + "optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -769,7 +769,7 @@ class LetterWizardDialog(WizardDialog): self.resources.resoptSenderDefine_value, "optSenderDefine", 104, 54, 4, 33, 149), self) self.txtSenderName = self.insertTextField( - "txtSenderName", TXTSENDERNAME_TEXT_CHANGED, + "txtSenderName", TXTSENDERNAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -781,7 +781,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 34), "txtSenderName", 182, 67, 4, 34, 119), self) self.txtSenderStreet = self.insertTextField( - "txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, + "txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -793,7 +793,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 35), "txtSenderStreet", 182, 81, 4, 35, 119), self) self.txtSenderPostCode = self.insertTextField( - "txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, + "txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -805,7 +805,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 36), "txtSenderPostCode", 182, 95, 4, 36, 25), self) self.txtSenderState = self.insertTextField( - "txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, + "txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -817,7 +817,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 37), "txtSenderState", 211, 95, 4, 37, 21), self) self.txtSenderCity = self.insertTextField( - "txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, + "txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -829,7 +829,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 38), "txtSenderCity", 236, 95, 4, 38, 65), self) self.optReceiverPlaceholder = self.insertRadioButton( - "optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, + "optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -843,7 +843,7 @@ class LetterWizardDialog(WizardDialog): self.resources.resoptReceiverPlaceholder_value, "optReceiverPlaceholder", 104, 145, 4, 39, 200), self) self.optReceiverDatabase = self.insertRadioButton( - "optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, + "optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -857,7 +857,7 @@ class LetterWizardDialog(WizardDialog): self.resources.resoptReceiverDatabase_value, "optReceiverDatabase", 104, 157, 4, 40, 200), self) self.lblSenderAddress = self.insertLabel( - "lblSenderAddress", + "lblSenderAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -869,7 +869,7 @@ class LetterWizardDialog(WizardDialog): (8, self.resources.reslblSenderAddress_value, "lblSenderAddress", 97, 28, 4, 64, 136)) self.FixedLine2 = self.insertFixedLine( - "FixedLine2", + "FixedLine2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, @@ -880,7 +880,7 @@ class LetterWizardDialog(WizardDialog): (5, "FixedLine2", 90, 126, 4, 75, 212)) self.lblReceiverAddress = self.insertLabel( - "lblReceiverAddress", + "lblReceiverAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -892,7 +892,7 @@ class LetterWizardDialog(WizardDialog): (8, self.resources.reslblReceiverAddress_value, "lblReceiverAddress", 97, 134, 4, 76, 136)) self.lblSenderName = self.insertLabel( - "lblSenderName", + "lblSenderName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -904,7 +904,7 @@ class LetterWizardDialog(WizardDialog): (8, self.resources.reslblSenderName_value, "lblSenderName", 113, 69, 4, 77, 68)) self.lblSenderStreet = self.insertLabel( - "lblSenderStreet", + "lblSenderStreet", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -916,7 +916,7 @@ class LetterWizardDialog(WizardDialog): (8, self.resources.reslblSenderStreet_value, "lblSenderStreet", 113, 82, 4, 78, 68)) self.lblPostCodeCity = self.insertLabel( - "lblPostCodeCity", + "lblPostCodeCity", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -945,7 +945,7 @@ class LetterWizardDialog(WizardDialog): def buildStep5(self): self.txtFooter = self.insertTextField( - "txtFooter", TXTFOOTER_TEXT_CHANGED, + "txtFooter", TXTFOOTER_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, @@ -958,7 +958,7 @@ class LetterWizardDialog(WizardDialog): (47, HelpIds.getHelpIdString(HID + 41), True, "txtFooter", 97, 40, 5, 41, 203), self) self.chkFooterNextPages = self.insertCheckBox( - "chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, + "chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -973,7 +973,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkFooterNextPages_value, "chkFooterNextPages", 97, 92, 0, 5, 42, 202), self) self.chkFooterPageNumbers = self.insertCheckBox( - "chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, + "chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -1018,7 +1018,7 @@ class LetterWizardDialog(WizardDialog): def buildStep6(self): self.txtTemplateName = self.insertTextField( - "txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, + "txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -1032,7 +1032,7 @@ class LetterWizardDialog(WizardDialog): "txtTemplateName", 202, 56, 6, 44, self.resources.restxtTemplateName_value, 100), self) self.optCreateLetter = self.insertRadioButton( - "optCreateLetter", OPTCREATELETTER_ITEM_CHANGED, + "optCreateLetter", OPTCREATELETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -1046,7 +1046,7 @@ class LetterWizardDialog(WizardDialog): self.resources.resoptCreateLetter_value, "optCreateLetter", 104, 111, 6, 50, 198), self) self.optMakeChanges = self.insertRadioButton( - "optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, + "optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -1060,7 +1060,7 @@ class LetterWizardDialog(WizardDialog): self.resources.resoptMakeChanges_value, "optMakeChanges", 104, 123, 6, 51, 198), self) self.lblFinalExplanation1 = self.insertLabel( - "lblFinalExplanation1", + "lblFinalExplanation1", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -1073,7 +1073,7 @@ class LetterWizardDialog(WizardDialog): (26, self.resources.reslblFinalExplanation1_value, True, "lblFinalExplanation1", 97, 28, 6, 52, 205)) self.lblProceed = self.insertLabel( - "lblProceed", + "lblProceed", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -1085,7 +1085,7 @@ class LetterWizardDialog(WizardDialog): (8, self.resources.reslblProceed_value, "lblProceed", 97, 100, 6, 53, 204)) self.lblFinalExplanation2 = self.insertLabel( - "lblFinalExplanation2", + "lblFinalExplanation2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -1113,7 +1113,7 @@ class LetterWizardDialog(WizardDialog): "private:resource/dbu/image/19205", "ImageControl2", 92, 145, False, 6, 66, 10)) self.lblTemplateName = self.insertLabel( - "lblTemplateName", + "lblTemplateName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py index d24728612..bc1e3ec1f 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py @@ -157,14 +157,14 @@ class LetterWizardDialogImpl(LetterWizardDialog): if not self.filenameChanged: if fileAccess.exists(self.sPath, True): answer = SystemDialog.showMessageBox( - self.xMSF, "MessBox", YES_NO + DEF_NO, - self.resources.resOverwriteWarning, + self.xMSF, "MessBox", YES_NO + DEF_NO, + self.resources.resOverwriteWarning, self.xUnoDialog.Peer) if answer == 3: return False self.myLetterDoc.setWizardTemplateDocInfo( - self.resources.resLetterWizardDialog_title, + self.resources.resLetterWizardDialog_title, self.resources.resTemplateDescription) self.myLetterDoc.killEmptyUserFields() self.myLetterDoc.keepLogoFrame = self.chkUseLogo.State != 0 @@ -190,7 +190,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.myLetterDoc.killEmptyFrames() self.bSaveSuccess = \ OfficeDocument.store( - self.xMSF, TextDocument.xTextDocument, + self.xMSF, TextDocument.xTextDocument, self.sPath, "writer8_template") if self.bSaveSuccess: self.saveConfiguration() @@ -218,7 +218,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): loadValues[0].Value = True oDoc = OfficeDocument.load( - Desktop.getDesktop(self.xMSF), + Desktop.getDesktop(self.xMSF), self.sPath, "_default", loadValues) myViewHandler = ViewHandler(self.xMSF, oDoc) myViewHandler.setViewSetting("ZoomType", OPTIMAL) @@ -361,18 +361,18 @@ class LetterWizardDialogImpl(LetterWizardDialog): def optReceiverPlaceholderItemChanged(self): OfficeDocument.attachEventCall( - TextDocument.xTextDocument, "OnNew", "StarBasic", + TextDocument.xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Placeholder()") def optReceiverDatabaseItemChanged(self): OfficeDocument.attachEventCall( - TextDocument.xTextDocument, "OnNew", "StarBasic", + TextDocument.xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Database()") def lstBusinessStyleItemChanged(self): TextDocument.xTextDocument = \ self.myLetterDoc.loadAsPreview( - self.BusinessFiles[1][self.lstBusinessStyle.SelectedItemPos], + self.BusinessFiles[1][self.lstBusinessStyle.SelectedItemPos], False) self.myLetterDoc.xTextDocument.lockControllers() self.initializeElements() @@ -384,7 +384,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): def lstPrivOfficialStyleItemChanged(self): TextDocument.xTextDocument = \ self.myLetterDoc.loadAsPreview( - self.OfficialFiles[1][self.lstPrivOfficialStyle.SelectedItemPos], + self.OfficialFiles[1][self.lstPrivOfficialStyle.SelectedItemPos], False) self.myLetterDoc.xTextDocument.lockControllers() self.initializeElements() @@ -396,7 +396,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): def lstPrivateStyleItemChanged(self): TextDocument.xTextDocument = \ self.myLetterDoc.loadAsPreview( - self.PrivateFiles[1][self.lstPrivateStyle.getSelectedItemPos()], + self.PrivateFiles[1][self.lstPrivateStyle.getSelectedItemPos()], False) self.myLetterDoc.xTextDocument.lockControllers() self.initializeElements() @@ -450,9 +450,9 @@ class LetterWizardDialogImpl(LetterWizardDialog): if self.numLogoHeight.Value == 0: self.numLogoHeight.Value = 0.1 self.BusCompanyLogo = BusinessPaperObject( - "Company Logo", int(self.numLogoWidth.Value * 1000), + "Company Logo", int(self.numLogoWidth.Value * 1000), int(self.numLogoHeight.Value * 1000), - int(self.numLogoX.Value * 1000), + int(self.numLogoX.Value * 1000), self.numLogoY.Value * 1000) self.setControlProperty( "numLogoHeight", PropertyNames.PROPERTY_ENABLED, True) @@ -502,8 +502,8 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.numAddressHeight.Value = 0.1 self.BusCompanyAddress = BusinessPaperObject( - "Company Address", int(self.numAddressWidth.Value * 1000), - int(self.numAddressHeight.Value * 1000), + "Company Address", int(self.numAddressWidth.Value * 1000), + int(self.numAddressHeight.Value * 1000), int(self.numAddressX.Value * 1000), int(self.numAddressY.Value * 1000)) self.setControlProperty( @@ -574,7 +574,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): xReceiverFrame, "VertOrientPosition")) iReceiverHeight = int(0.5 * 1000) self.BusCompanyAddressReceiver = BusinessPaperObject( - " ", iFrameWidth, iReceiverHeight, iFrameX, + " ", iFrameWidth, iReceiverHeight, iFrameX, iFrameY - iReceiverHeight) self.setPossibleAddressReceiver(False) except NoSuchElementException: @@ -603,8 +603,8 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.numFooterHeight.Value = 0.1 self.BusFooter = BusinessPaperObject( - "Footer", self.myLetterDoc.DocSize.Width, - int(self.numFooterHeight.Value * 1000), 0, + "Footer", self.myLetterDoc.DocSize.Width, + int(self.numFooterHeight.Value * 1000), 0, int(self.myLetterDoc.DocSize.Height - \ (self.numFooterHeight.Value * 1000))) self.setControlProperty( @@ -639,7 +639,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): if self.myLetterDoc.hasElement("Sender Address Repeated"): rstatus = \ bool(self.getControlProperty( - "chkUseAddressReceiver", + "chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED)) \ and (self.chkUseAddressReceiver.State != 0) self.myLetterDoc.switchElement( @@ -679,7 +679,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): "First Page", bFooterPossible, self.chkFooterPageNumbers.State != 0, self.txtFooter.Text) self.myLetterDoc.switchFooter( - "Standard", bFooterPossible, + "Standard", bFooterPossible, self.chkFooterPageNumbers.State != 0, self.txtFooter.Text) BPaperItem = \ @@ -755,7 +755,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): "Salutation", self.lstSalutation.Text, self.chkUseSalutation.State != 0) self.setControlProperty( - "lstSalutation", PropertyNames.PROPERTY_ENABLED, + "lstSalutation", PropertyNames.PROPERTY_ENABLED, self.chkUseSalutation.State != 0) def lstSalutationItemChanged(self): @@ -767,7 +767,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.myLetterDoc.switchUserField( "Greeting", self.lstGreeting.Text, self.chkUseGreeting.State != 0) self.setControlProperty( - "lstGreeting", PropertyNames.PROPERTY_ENABLED, + "lstGreeting", PropertyNames.PROPERTY_ENABLED, self.chkUseGreeting.State != 0) def setDefaultForGreetingAndSalutation(self): @@ -884,7 +884,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.myLetterDoc.switchElement( "Sender Address", True) except Exception: - traceback.print_exc() + traceback.print_exc() def lstLetterNormItemChanged(self): sCurrentNorm = self.Norms[getCurrentLetter().cp_Norm] @@ -900,7 +900,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): def initializeSalutation(self): self.setControlProperty( - "lstSalutation", "StringItemList", + "lstSalutation", "StringItemList", self.resources.SalutationLabels) def initializeGreeting(self): @@ -991,13 +991,13 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.PrivateFiles = \ FileAccess.getFolderTitles(xMSF, "pri", sLetterPath) self.setControlProperty( - "lstBusinessStyle", "StringItemList", + "lstBusinessStyle", "StringItemList", tuple(self.BusinessFiles[0])) self.setControlProperty( - "lstPrivOfficialStyle", "StringItemList", + "lstPrivOfficialStyle", "StringItemList", tuple(self.OfficialFiles[0])) self.setControlProperty( - "lstPrivateStyle", "StringItemList", + "lstPrivateStyle", "StringItemList", tuple(self.PrivateFiles[0])) self.setControlProperty( "lstBusinessStyle", "SelectedItems", (0,)) @@ -1009,19 +1009,19 @@ class LetterWizardDialogImpl(LetterWizardDialog): def initializeElements(self): self.setControlProperty( - "chkUseLogo", PropertyNames.PROPERTY_ENABLED, + "chkUseLogo", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Company Logo")) self.setControlProperty( - "chkUseBendMarks", PropertyNames.PROPERTY_ENABLED, + "chkUseBendMarks", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Bend Marks")) self.setControlProperty( - "chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, + "chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Sender Address Repeated")) self.setControlProperty( - "chkUseSubject", PropertyNames.PROPERTY_ENABLED, + "chkUseSubject", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Subject Line")) self.setControlProperty( - "chkUseSigns", PropertyNames.PROPERTY_ENABLED, + "chkUseSigns", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Letter Signs")) self.myLetterDoc.updateDateFields() @@ -1065,28 +1065,28 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.addRoadmap() i = 0 i = self.insertRoadmapItem( - 0, True, + 0, True, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_TYPESTYLE -1], LetterWizardDialogImpl.RM_TYPESTYLE) i = self.insertRoadmapItem( - i, False, + i, False, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_BUSINESSPAPER - 1], LetterWizardDialogImpl.RM_BUSINESSPAPER) i = self.insertRoadmapItem( - i, True, + i, True, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_ELEMENTS - 1], LetterWizardDialogImpl.RM_ELEMENTS) i = self.insertRoadmapItem( - i, True, - self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_SENDERRECEIVER - 1], + i, True, + self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_SENDERRECEIVER - 1], LetterWizardDialogImpl.RM_SENDERRECEIVER) i = self.insertRoadmapItem( i, False, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_FOOTER -1], LetterWizardDialogImpl.RM_FOOTER) i = self.insertRoadmapItem( - i, True, - self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_FINALSETTINGS - 1], + i, True, + self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_FINALSETTINGS - 1], LetterWizardDialogImpl.RM_FINALSETTINGS) self.setRoadmapInteractive(True) self.setRoadmapComplete(True) @@ -1105,8 +1105,8 @@ class LetterWizardDialogImpl(LetterWizardDialog): PathSelection(self.xMSF, self, PathSelection.TransferMode.SAVE, PathSelection.DialogTypes.FILE) self.myPathSelection.insert( - 6, 97, 70, 205, 45, self.resources.reslblTemplatePath_value, - True, HelpIds.getHelpIdString(HID + 47), + 6, 97, 70, 205, 45, self.resources.reslblTemplatePath_value, + True, HelpIds.getHelpIdString(HID + 47), HelpIds.getHelpIdString(HID + 48)) self.myPathSelection.sDefaultDirectory = self.sUserTemplatePath self.myPathSelection.sDefaultName = "myLetterTemplate.ott" @@ -1123,12 +1123,12 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.myConfig.readConfiguration(root, "cp_") self.mainDA.append( RadioDataAware.attachRadioButtons( - self.myConfig, "cp_LetterType", - (self.optBusinessLetter, self.optPrivOfficialLetter, + self.myConfig, "cp_LetterType", + (self.optBusinessLetter, self.optPrivOfficialLetter, self.optPrivateLetter), True)) self.mainDA.append( UnoDataAware.attachListBox( - self.myConfig.cp_BusinessLetter, "cp_Style", + self.myConfig.cp_BusinessLetter, "cp_Style", self.lstBusinessStyle, True)) self.mainDA.append( UnoDataAware.attachListBox( @@ -1136,7 +1136,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.lstPrivOfficialStyle, True)) self.mainDA.append( UnoDataAware.attachListBox( - self.myConfig.cp_PrivateLetter, "cp_Style", + self.myConfig.cp_PrivateLetter, "cp_Style", self.lstPrivateStyle, True)) self.mainDA.append( UnoDataAware.attachCheckBox( @@ -1193,7 +1193,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): cgl, "cp_PrintCompanyLogo", self.chkUseLogo, True)) self.businessDA.append( UnoDataAware.attachCheckBox( - cgl, "cp_PrintCompanyAddressReceiverField", + cgl, "cp_PrintCompanyAddressReceiverField", self.chkUseAddressReceiver, True)) self.businessDA.append( UnoDataAware.attachCheckBox( @@ -1220,7 +1220,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): UnoDataAware.attachEditControl( cgl, "cp_Greeting", self.lstGreeting, True)) self.letterDA.append(RadioDataAware.attachRadioButtons( - cgl, "cp_SenderAddressType", + cgl, "cp_SenderAddressType", (self.optSenderDefine, self.optSenderPlaceholder), True)) self.businessDA.append( UnoDataAware.attachEditControl( diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py b/wizards/com/sun/star/wizards/ui/event/DataAware.py index c2771d5a4..450d6f753 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.py @@ -30,7 +30,7 @@ class DataAware(object): def __init__(self, dataObject_, field_): self._dataObject = dataObject_ - self._field = field_ + self._field = field_ ''' sets the given value to the UI control diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py index 7c3436caa..b117dcb4f 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py @@ -67,7 +67,7 @@ class UnoDataAware(DataAware): return UnoDataAware(data, prop, label, PropertyNames.PROPERTY_LABEL) @classmethod - def attachListBox(self, data, prop, listBox, field): + def attachListBox(self, data, prop, listBox, field): uda = UnoDataAware(data, prop, listBox, "SelectedItems", True) method = getattr(uda,"updateData") listBox.addItemListener(ItemListenerProcAdapter(method)) -- cgit v1.2.3 From 811df4a1faed5f6b6527c6cbd34f3dd720ecfcfc Mon Sep 17 00:00:00 2001 From: Matus Kukan Date: Sat, 2 Jul 2011 18:10:01 +0200 Subject: Remove preload library related code --- extensions/prj/build.lst | 3 +- extensions/prj/d.lst | 1 - extensions/source/preload/makefile.mk | 93 ------ extensions/source/preload/modulepreload.cxx | 34 -- extensions/source/preload/oemwiz.cxx | 445 -------------------------- extensions/source/preload/oemwiz.hxx | 156 --------- extensions/source/preload/preload.component | 34 -- extensions/source/preload/preload.hrc | 58 ---- extensions/source/preload/preload.src | 290 ----------------- extensions/source/preload/preloadservices.cxx | 73 ----- extensions/source/preload/preloadservices.hxx | 57 ---- extensions/source/preload/services.cxx | 87 ----- extensions/source/preload/unoautopilot.hxx | 109 ------- extensions/source/preload/unoautopilot.inl | 128 -------- 14 files changed, 1 insertion(+), 1567 deletions(-) delete mode 100644 extensions/source/preload/makefile.mk delete mode 100644 extensions/source/preload/modulepreload.cxx delete mode 100644 extensions/source/preload/oemwiz.cxx delete mode 100644 extensions/source/preload/oemwiz.hxx delete mode 100644 extensions/source/preload/preload.component delete mode 100644 extensions/source/preload/preload.hrc delete mode 100644 extensions/source/preload/preload.src delete mode 100644 extensions/source/preload/preloadservices.cxx delete mode 100644 extensions/source/preload/preloadservices.hxx delete mode 100644 extensions/source/preload/services.cxx delete mode 100644 extensions/source/preload/unoautopilot.hxx delete mode 100644 extensions/source/preload/unoautopilot.inl diff --git a/extensions/prj/build.lst b/extensions/prj/build.lst index b3e7b2294..fd883a262 100644 --- a/extensions/prj/build.lst +++ b/extensions/prj/build.lst @@ -25,14 +25,13 @@ ex extensions\source\abpilot nmake - all ex_abpilot ex_in ex extensions\source\logging nmake - all ex_logging ex_inc NULL ex extensions\source\oooimprovecore nmake - all ex_oooimprovecore ex_inc NULL ex extensions\source\oooimprovement nmake - all ex_oooimprovement ex_inc NULL -ex extensions\source\preload nmake - all ex_preload ex_inc NULL ex extensions\source\config\ldap nmake - all ex_ldap ex_inc NULL ex extensions\source\nsplugin\source nmake - u ex_nsplugin ex_inc NULL ex extensions\source\nsplugin\source nmake - w ex_nsplugin ex_inc NULL ex extensions\source\update\feed nmake - all ex_updchkfeed ex_inc NULL ex extensions\source\update\check nmake - all ex_updchk ex_inc NULL ex extensions\source\update\ui nmake - all ex_updchkui ex_inc NULL -ex extensions\util nmake - all ex_util ex_preload ex_abpilot ex_dbpilots ex_logging ex_ldap ex_propctrlr ex_bib ex_plutil ex_oooimprovecore NULL +ex extensions\util nmake - all ex_util ex_abpilot ex_dbpilots ex_logging ex_ldap ex_propctrlr ex_bib ex_plutil ex_oooimprovecore NULL # Fails at the moment # ex extensions\qa\complex\extensions nmake - all ex_complex ex_util NULL diff --git a/extensions/prj/d.lst b/extensions/prj/d.lst index 9d7b7de91..8f726eb87 100644 --- a/extensions/prj/d.lst +++ b/extensions/prj/d.lst @@ -49,7 +49,6 @@ mkdir: %_DEST%\xml\registry\spool\org\openoffice\Office\Logging ..\%__SRC%\misc\oooimprovement.component %_DEST%\xml\oooimprovement.component ..\%__SRC%\misc\pcr.component %_DEST%\xml\pcr.component ..\%__SRC%\misc\pl.component %_DEST%\xml\pl.component -..\%__SRC%\misc\preload.component %_DEST%\xml\preload.component ..\%__SRC%\misc\res.component %_DEST%\xml\res.component ..\%__SRC%\misc\scn.component %_DEST%\xml\scn.component ..\%__SRC%\misc\updatefeed.component %_DEST%\xml\updatefeed.component diff --git a/extensions/source/preload/makefile.mk b/extensions/source/preload/makefile.mk deleted file mode 100644 index 8bd622661..000000000 --- a/extensions/source/preload/makefile.mk +++ /dev/null @@ -1,93 +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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. -PRJINC=..$/inc - -PRJNAME=extensions -TARGET=preload -ENABLE_EXCEPTIONS=TRUE -VISIBILITY_HIDDEN=TRUE -USE_DEFFILE=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- defines ------------------------------------------------------ - -CDEFS+=-DCOMPMOD_NAMESPACE=preload -CDEFS+=-DCOMPMOD_RESPREFIX=preload - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/services.obj\ - $(SLO)$/modulepreload.obj\ - $(SLO)$/preloadservices.obj\ - $(SLO)$/oemwiz.obj - -SRS1NAME=$(TARGET) -SRC1FILES= preload.src - -RESLIB1NAME=preload -RESLIB1IMAGES=$(PRJ)$/res -RESLIB1SRSFILES= $(SRS)$/preload.srs - -SHL1TARGET= $(TARGET)$(DLLPOSTFIX) -SHL1VERSIONMAP=$(SOLARENV)/src/component.map - -SHL1STDLIBS= \ - $(SFXLIB) \ - $(SVTOOLLIB)\ - $(VCLLIB) \ - $(SVLLIB) \ - $(TOOLSLIB) \ - $(UNOTOOLSLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - - -SHL1LIBS= $(SLB)$/$(TARGET).lib -SHL1IMPLIB= i$(TARGET) -SHL1DEPN= $(SHL1LIBS) -SHL1DEF= $(MISC)$/$(SHL1TARGET).def - -DEF1NAME= $(SHL1TARGET) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - - -ALLTAR : $(MISC)/preload.component - -$(MISC)/preload.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - preload.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt preload.component diff --git a/extensions/source/preload/modulepreload.cxx b/extensions/source/preload/modulepreload.cxx deleted file mode 100644 index ead975319..000000000 --- a/extensions/source/preload/modulepreload.cxx +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_extensions.hxx" - -#include "componentmodule.cxx" - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/preload/oemwiz.cxx b/extensions/source/preload/oemwiz.cxx deleted file mode 100644 index a41acf0f5..000000000 --- a/extensions/source/preload/oemwiz.cxx +++ /dev/null @@ -1,445 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_extensions.hxx" -#include "oemwiz.hxx" -#include "componentmodule.hxx" -#include -#include -#include -#include -#include -#include -#include "preload.hrc" -#include -#include -#include -#include "osl/diagnose.h" -#include "tools/urlobj.hxx" - -#include -#include -#include - -//......................................................................... -namespace preload -{ -//......................................................................... - - using namespace ::com::sun::star::uno; - using namespace ::com::sun::star::lang; - using namespace ::com::sun::star::beans; -//......................................................................... - - struct OEMPreloadDialog_Impl - { - SfxItemSet* pSet; - TabPage* pWelcomePage; - TabPage* pLicensePage; - TabPage* pUserDataPage; - - OEMPreloadDialog_Impl(OEMPreloadDialog* pDialog); - ~OEMPreloadDialog_Impl() - { - delete pWelcomePage; - delete pLicensePage; - delete pUserDataPage; - delete pSet; - } - void WriteUserData(); - }; - - OEMPreloadDialog_Impl::OEMPreloadDialog_Impl(OEMPreloadDialog* pDialog) - { - SfxItemPool& rPool = SFX_APP()->GetPool(); - pSet = new SfxItemSet(rPool, SID_FIELD_GRABFOCUS, SID_FIELD_GRABFOCUS); - SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - if ( pFact ) - { - CreateTabPage pFunc = pFact->GetTabPageCreatorFunc(RID_SFXPAGE_GENERAL); - pUserDataPage = (*pFunc)(pDialog, *pSet); - ((SfxTabPage*)pUserDataPage)->Reset(*pSet); - } - else - pUserDataPage = NULL; - pWelcomePage = new OEMWelcomeTabPage(pDialog); - pLicensePage = new OEMLicenseTabPage(pDialog); - } - - void OEMPreloadDialog_Impl::WriteUserData() - { - if ( pUserDataPage ) - ((SfxTabPage*)pUserDataPage)->FillItemSet(*pSet); - } - - //===================================================================== - //= OEMPreloadDialog - //===================================================================== - //--------------------------------------------------------------------- - OEMPreloadDialog::OEMPreloadDialog( Window* _pParent, - const Reference< XPropertySet >& /*_rxObjectModel*/, const Reference< XMultiServiceFactory >& /*_rxORB*/ ) - :WizardDialog(_pParent, ModuleRes(RID_DLG_OEMWIZARD)/*, _rxObjectModel, _rxORB*/) - ,aPrevPB(this, ModuleRes(PB_PREV )) - ,aNextPB(this, ModuleRes(PB_NEXT )) - ,aCancelPB(this, ModuleRes(PB_CANCEL )) - ,aAcceptST(ModuleRes(ST_ACCEPT)) - ,aFinishST(ModuleRes(ST_FINISH)) - ,aLicense(ModuleRes(ST_LICENSE_AGREEMENT)) - ,aUserData(ModuleRes(ST_INSERT_USER_DATA)) - ,pImpl(new OEMPreloadDialog_Impl(this)) - { - FreeResource(); - aDlgTitle = GetText(); - aPrevPB.Enable(sal_False); - aNextST = aNextPB.GetText(); - aPrevPB.SetClickHdl(LINK(this, OEMPreloadDialog, NextPrevPageHdl)); - aNextPB.SetClickHdl(LINK(this, OEMPreloadDialog, NextPrevPageHdl)); - AddButton( &aPrevPB, WIZARDDIALOG_BUTTON_STDOFFSET_X ); - AddButton( &aNextPB, WIZARDDIALOG_BUTTON_STDOFFSET_X ); - AddButton( &aCancelPB, WIZARDDIALOG_BUTTON_STDOFFSET_X ); - - SetPrevButton(&aPrevPB); - SetNextButton(&aNextPB); - - AddPage( pImpl->pWelcomePage ); - AddPage( pImpl->pLicensePage ); - if ( pImpl->pUserDataPage ) - AddPage( pImpl->pUserDataPage ); - SetPage( OEM_WELCOME, pImpl->pWelcomePage ); - SetPage( OEM_LICENSE, pImpl->pLicensePage ); - if ( pImpl->pUserDataPage ) - SetPage( OEM_USERDATA, pImpl->pUserDataPage ); - ShowPage( OEM_WELCOME ); - } - - OEMPreloadDialog::~OEMPreloadDialog( ) - { - delete pImpl; - } - - IMPL_LINK(OEMPreloadDialog, NextPrevPageHdl, PushButton*, pButton) - { - if(pButton == &aPrevPB) - { - if(GetCurLevel()) - ShowPage(GetCurLevel() - 1); - } - else if(OEM_USERDATA > GetCurLevel()) - ShowPage(GetCurLevel() + 1); - else - { - pImpl->WriteUserData(); - Finnish(RET_OK); - } - - String sTitle(aDlgTitle); - - switch(GetCurLevel()) - { - case OEM_WELCOME: - aNextPB.SetText(aNextST); - aNextPB.Enable(sal_True); - break; - case OEM_LICENSE: - sTitle += aLicense; - aNextPB.SetText(aNextST); - aCancelPB.GrabFocus(); - break; - case OEM_USERDATA: - sTitle += aUserData; - aNextPB.SetText(aFinishST); - break; - } - SetText(sTitle); - aPrevPB.Enable(GetCurLevel() != OEM_WELCOME); - return 0; - } - - sal_Bool OEMPreloadDialog::LoadFromLocalFile(const String& rFileName, String& rContent) - { - SvtPathOptions aPathOpt; - String sFileName = aPathOpt.GetUserConfigPath();//GetModulePath(); - INetURLObject aURLObject(sFileName); - OSL_ASSERT(aURLObject.getSegmentCount() >= 2); - aURLObject.removeSegment(); //remove '/config' - aURLObject.removeSegment(); //remove '/user' - sFileName = aURLObject.GetMainURL(INetURLObject::DECODE_TO_IURI); - sFileName += rFileName; - - SfxMedium aMedium( sFileName,STREAM_READ, sal_True ); - SvStream* pInStream = aMedium.GetInStream(); - if( !pInStream ) - return sal_False; - - pInStream->ReadCString( rContent, RTL_TEXTENCODING_UTF8 ); - - xub_StrLen nPos; - while ( ( nPos = rContent.Search( 12 )) != STRING_NOTFOUND ) - rContent.Erase( nPos, 1 ); - return sal_True; - } - - - void OEMPreloadDialog::SetCancelString( const String& rText ) - { - aCancelPB.SetText(rText); - } - - OEMWelcomeTabPage::OEMWelcomeTabPage(Window* pParent) : - TabPage(pParent, ModuleRes(RID_TP_WELCOME)), - aInfoFT(this, ModuleRes(FT_INFO)) - { - FreeResource(); - } - - OEMWelcomeTabPage::~OEMWelcomeTabPage() - { - } - - OEMLicenseTabPage::OEMLicenseTabPage(OEMPreloadDialog* pParent) : - TabPage(pParent, ModuleRes(RID_TP_LICENSE)), - aLicenseML(this, ModuleRes(ML_LICENSE)), - aInfo1FT(this, ModuleRes(FT_INFO1)), - aInfo2FT(this, ModuleRes(FT_INFO2)), - aInfo3FT(this, ModuleRes(FT_INFO3)), - aInfo2_1FT(this, ModuleRes(FT_INFO2_1)), - aInfo3_1FT(this, ModuleRes(FT_INFO3_1)), - aCBAccept(this, ModuleRes(CB_ACCEPT)), - aPBPageDown(this, ModuleRes(PB_PAGEDOWN)), - aArrow(this, ModuleRes(IMG_ARROW)), - aStrAccept( ModuleRes(LICENCE_ACCEPT) ), - aStrNotAccept( ModuleRes(LICENCE_NOTACCEPT) ), - bEndReached(sal_False), - pPreloadDialog(pParent) - { - FreeResource(); - - aLicenseML.SetEndReachedHdl( LINK(this, OEMLicenseTabPage, EndReachedHdl) ); - aLicenseML.SetScrolledHdl( LINK(this, OEMLicenseTabPage, ScrolledHdl) ); - - aPBPageDown.SetClickHdl( LINK(this, OEMLicenseTabPage, PageDownHdl) ); - aCBAccept.SetClickHdl( LINK(this, OEMLicenseTabPage, AcceptHdl) ); - - // We want a automatic repeating page down button - WinBits aStyle = aPBPageDown.GetStyle(); - aStyle |= WB_REPEAT; - aPBPageDown.SetStyle( aStyle ); - - aOldCancelText = pPreloadDialog->GetCancelString(); - pPreloadDialog->SetCancelString( aStrNotAccept ); - - String aText = aInfo2FT.GetText(); - aText.SearchAndReplaceAll( UniString::CreateFromAscii("%PAGEDOWN"), aPBPageDown.GetText() ); - aInfo2FT.SetText( aText ); - } - - OEMLicenseTabPage::~OEMLicenseTabPage() - { - } - - void OEMLicenseTabPage::ActivatePage() - { - if(!aLicenseML.GetText().Len()) - { - aLicenseML.SetLeftMargin( 5 ); - String sLicense; -#ifdef UNX - OEMPreloadDialog::LoadFromLocalFile(String::CreateFromAscii("LICENSE"), sLicense); -#else - OEMPreloadDialog::LoadFromLocalFile(String::CreateFromAscii("license.txt"), sLicense); -#endif - aLicenseML.SetText( sLicense ); - } - - EnableControls(); - } - - //------------------------------------------------------------------------ - IMPL_LINK( OEMLicenseTabPage, AcceptHdl, CheckBox *, EMPTYARG ) - { - EnableControls(); - return 0; - } - - //------------------------------------------------------------------------ - IMPL_LINK( OEMLicenseTabPage, PageDownHdl, PushButton *, EMPTYARG ) - { - aLicenseML.ScrollDown( SCROLL_PAGEDOWN ); - return 0; - } - - //------------------------------------------------------------------------ - IMPL_LINK( OEMLicenseTabPage, EndReachedHdl, LicenceView *, EMPTYARG ) - { - bEndReached = sal_True; - - EnableControls(); - aCBAccept.GrabFocus(); - - return 0; - } - - //------------------------------------------------------------------------ - IMPL_LINK( OEMLicenseTabPage, ScrolledHdl, LicenceView *, EMPTYARG ) - { - EnableControls(); - - return 0; - } - - //------------------------------------------------------------------------ - void OEMLicenseTabPage::EnableControls() - { - if( !bEndReached && - ( aLicenseML.IsEndReached() || !aLicenseML.GetText().Len() ) ) - bEndReached = sal_True; - - if ( bEndReached ) - { - Point aPos( 0, aInfo3_1FT.GetPosPixel().Y() ); - aArrow.SetPosPixel( aPos ); - aCBAccept.Enable(); - } - else - { - Point aPos( 0, aInfo2_1FT.GetPosPixel().Y() ); - aArrow.SetPosPixel( aPos ); - aCBAccept.Disable(); - } - - if ( aLicenseML.IsEndReached() ) - aPBPageDown.Disable(); - else - aPBPageDown.Enable(); - - if ( aCBAccept.IsChecked() ) - { - PushButton *pNext = pPreloadDialog->GetNextButton(); - if ( ! pNext->IsEnabled() ) - { - pPreloadDialog->SetCancelString( aOldCancelText ); - pNext->Enable(sal_True); - } - } - else - { - PushButton *pNext = pPreloadDialog->GetNextButton(); - if ( pNext->IsEnabled() ) - { - pPreloadDialog->SetCancelString( aStrNotAccept ); - pNext->Enable(sal_False); - } - } - } - - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - LicenceView::LicenceView( Window* pParent, const ResId& rResId ) - : MultiLineEdit( pParent, rResId ) - { - SetLeftMargin( 5 ); - - mbEndReached = IsEndReached(); - - StartListening( *GetTextEngine() ); - } - - //------------------------------------------------------------------------ - LicenceView::~LicenceView() - { - maEndReachedHdl = Link(); - maScrolledHdl = Link(); - - EndListeningAll(); - } - - //------------------------------------------------------------------------ - void LicenceView::ScrollDown( ScrollType eScroll ) - { - ScrollBar* pScroll = GetVScrollBar(); - - if ( pScroll ) - pScroll->DoScrollAction( eScroll ); - } - - //------------------------------------------------------------------------ - sal_Bool LicenceView::IsEndReached() const - { - sal_Bool bEndReached; - - ExtTextView* pView = GetTextView(); - ExtTextEngine* pEdit = GetTextEngine(); - sal_uLong nHeight = pEdit->GetTextHeight(); - Size aOutSize = pView->GetWindow()->GetOutputSizePixel(); - Point aBottom( 0, aOutSize.Height() ); - - if ( (sal_uLong) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 ) - bEndReached = sal_True; - else - bEndReached = sal_False; - - return bEndReached; - } - - //------------------------------------------------------------------------ - void LicenceView::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) - { - if ( rHint.IsA( TYPE(TextHint) ) ) - { - sal_Bool bLastVal = EndReached(); - sal_uLong nId = ((const TextHint&)rHint).GetId(); - - if ( nId == TEXT_HINT_PARAINSERTED ) - { - if ( bLastVal ) - mbEndReached = IsEndReached(); - } - else if ( nId == TEXT_HINT_VIEWSCROLLED ) - { - if ( ! mbEndReached ) - mbEndReached = IsEndReached(); - maScrolledHdl.Call( this ); - } - - if ( EndReached() && !bLastVal ) - { - maEndReachedHdl.Call( this ); - } - } - } - - //------------------------------------------------------------------------ - -//......................................................................... -} // namespace preload -//......................................................................... - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/preload/oemwiz.hxx b/extensions/source/preload/oemwiz.hxx deleted file mode 100644 index ab74b5e8e..000000000 --- a/extensions/source/preload/oemwiz.hxx +++ /dev/null @@ -1,156 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _EXTENSIONS_PRELOAD_OEMWIZ_HXX_ -#define _EXTENSIONS_PRELOAD_OEMWIZ_HXX_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//......................................................................... -namespace preload -{ - #define OEM_WELCOME 0 - #define OEM_LICENSE 1 - #define OEM_USERDATA 2 - -//......................................................................... - //===================================================================== - //= OEMPreloadDialog - //===================================================================== - struct OEMPreloadDialog_Impl; - class OEMPreloadDialog : public WizardDialog - { - PushButton aPrevPB; - PushButton aNextPB; - CancelButton aCancelPB; - - String aNextST; - String aAcceptST; - String aFinishST; - String aDlgTitle; - String aLicense; - String aUserData; - OEMPreloadDialog_Impl* pImpl; - - DECL_LINK(NextPrevPageHdl, PushButton*); - protected: - - public: - OEMPreloadDialog( - Window* _pParent, - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObjectModel, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB - ); - ~OEMPreloadDialog(); - - const String& GetAcceptString()const {return aAcceptST;} - const String GetCancelString() const {return aCancelPB.GetText();} - void SetCancelString( const String& rText ); - - static sal_Bool LoadFromLocalFile(const String& rFileName, String& rContent); - }; - class OEMWelcomeTabPage : public TabPage - { - FixedText aInfoFT; - public: - OEMWelcomeTabPage(Window* pParent); - ~OEMWelcomeTabPage(); - }; - class LicenceView : public MultiLineEdit, public SfxListener - { - sal_Bool mbEndReached; - Link maEndReachedHdl; - Link maScrolledHdl; - - public: - LicenceView( Window* pParent, const ResId& rResId ); - ~LicenceView(); - - void ScrollDown( ScrollType eScroll ); - - sal_Bool IsEndReached() const; - sal_Bool EndReached() const { return mbEndReached; } - void SetEndReached( sal_Bool bEnd ) { mbEndReached = bEnd; } - - void SetEndReachedHdl( const Link& rHdl ) { maEndReachedHdl = rHdl; } - const Link& GetAutocompleteHdl() const { return maEndReachedHdl; } - - void SetScrolledHdl( const Link& rHdl ) { maScrolledHdl = rHdl; } - const Link& GetScrolledHdl() const { return maScrolledHdl; } - - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - private: - using MultiLineEdit::Notify; - }; - class OEMLicenseTabPage : public TabPage - { - LicenceView aLicenseML; - FixedText aInfo1FT; - FixedText aInfo2FT; - FixedText aInfo3FT; - FixedText aInfo2_1FT; - FixedText aInfo3_1FT; - CheckBox aCBAccept; - PushButton aPBPageDown; - FixedImage aArrow; - String aStrAccept; - String aStrNotAccept; - String aOldCancelText; - sal_Bool bEndReached; - - OEMPreloadDialog* pPreloadDialog; - - void EnableControls(); - - DECL_LINK( AcceptHdl, CheckBox * ); - DECL_LINK( PageDownHdl, PushButton * ); - DECL_LINK( EndReachedHdl, LicenceView * ); - DECL_LINK( ScrolledHdl, LicenceView * ); - - public: - OEMLicenseTabPage(OEMPreloadDialog* pParent); - ~OEMLicenseTabPage(); - - virtual void ActivatePage(); - }; - -//......................................................................... -} // namespace preload -//......................................................................... - -#endif // _EXTENSIONS_PRELOAD_OEMWIZ_HXX_ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/preload/preload.component b/extensions/source/preload/preload.component deleted file mode 100644 index 56a8a0d7a..000000000 --- a/extensions/source/preload/preload.component +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - diff --git a/extensions/source/preload/preload.hrc b/extensions/source/preload/preload.hrc deleted file mode 100644 index a7d9725bd..000000000 --- a/extensions/source/preload/preload.hrc +++ /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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _EXTENSIONS_PRELOAD_PRELOAD_HRC_ -#define _EXTENSIONS_PRELOAD_PRELOAD_HRC_ - -#define RID_DLG_OEMWIZARD 1024 -#define RID_TP_LICENSE 1025 -#define RID_TP_WELCOME 1027 - - -#define PB_PREV 1 -#define PB_NEXT 2 -#define PB_CANCEL 3 - -#define ST_ACCEPT 5 -#define ST_FINISH 6 -#define FT_INFO 7 -#define ML_README 8 -#define FT_INFO1 9 -#define FT_INFO2 10 -#define ML_LICENSE 11 -#define ST_LICENSE_AGREEMENT 12 -#define ST_INSERT_USER_DATA 13 -#define IMG_ARROW 14 -#define FT_INFO2_1 15 -#define FT_INFO3_1 16 -#define FT_INFO3 17 -#define PB_PAGEDOWN 18 -#define CB_ACCEPT 19 -#define LICENCE_ACCEPT 20 -#define LICENCE_NOTACCEPT 21 - -#endif diff --git a/extensions/source/preload/preload.src b/extensions/source/preload/preload.src deleted file mode 100644 index 17ccbf8b4..000000000 --- a/extensions/source/preload/preload.src +++ /dev/null @@ -1,290 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _EXTENSIONS_PRELOAD_PRELOAD_HRC_ -#include "preload.hrc" -#endif - -ModalDialog RID_DLG_OEMWIZARD -{ - HelpID = "extensions:ModalDialog:RID_DLG_OEMWIZARD"; - Text = "%PRODUCTNAME %PRODUCTVERSION"; - - OutputSize = TRUE ; - SVLook = TRUE ; - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE; - PushButton PB_PREV - { - HelpID = "extensions:PushButton:RID_DLG_OEMWIZARD:PB_PREV"; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "<< Back" ; - }; - PushButton PB_NEXT - { - HelpID = "extensions:PushButton:RID_DLG_OEMWIZARD:PB_NEXT"; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "Next >>" ; - }; - CancelButton PB_CANCEL - { - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - String ST_ACCEPT - { - Text [ en-US ] = "Accept"; - }; - String ST_FINISH - { - Text [ en-US ] = "Finish"; - }; - String ST_LICENSE_AGREEMENT - { - Text [ en-US ] = " - Software License Agreement"; - }; - - String ST_INSERT_USER_DATA - { - Text [ en-US ] = "- User Data"; - }; -}; -TabPage RID_TP_WELCOME -{ - HelpID = "extensions:TabPage:RID_TP_WELCOME"; -// HelpId = ; - OutputSize = TRUE ; - SVLook = TRUE ; - Hide = TRUE ; - Size = MAP_APPFONT ( 260 , 185 ) ; - Text [ en-US ] = "Welcome"; - FixedText FT_INFO - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 248 , 174 ) ; - WordBreak = TRUE ; - Text [ en-US ] = "Welcome to %PRODUCTNAME %PRODUCTVERSION OEM\n\nTo start the %PRODUCTNAME %PRODUCTVERSION OEM, " - "please enter your personal data in the dialog following the license text. Important information is contained " - "in the readme files which are located in the %PRODUCTNAME product directory. Please read these files carefully. " - "You can also find detailed information at the Oracle website \n\n" - "http://www.oracle.com/us/products/applications/open-office."; - }; -}; - -#define LICENSE_DIALOG_WIDTH 260 -#define LICENSE_DIALOG_HEIGTH 185 -#define LICENSE_RIGHT_BORDER 7 -#define LICENSE_BOTTOM_BORDER 0 -#define LICENSE_ROW_1 (7) -#define LICENSE_COL_1 (7) - -#define OFFSET 2 -#define COL2_WIDTH 10 -#define OFFSET_IMG 10 -#define FT_HEIGHT 8 -#define PB_HEIGHT 14 -#define PD_WIDTH 40 - -#define LICENCE_HEIGHT 102 -#define LICENSE_ROW_2 (LICENSE_ROW_1 + OFFSET + LICENCE_HEIGHT) -#define LICENSE_ROW_3 (LICENSE_ROW_2 + OFFSET + FT_HEIGHT) -#define LICENSE_ROW_4 (LICENSE_ROW_3 + OFFSET + 3*FT_HEIGHT ) -#define LICENSE_ROW_5 (LICENSE_ROW_4 + OFFSET + FT_HEIGHT) - -/* -#define LICENSE_ROW_5 (LICENSE_DIALOG_HEIGTH - LICENSE_BOTTOM_BORDER - OFFSET - FT_HEIGHT) -#define LICENSE_ROW_4 (LICENSE_ROW_5 - OFFSET - FT_HEIGHT) -#define LICENSE_ROW_3 (LICENSE_ROW_4 - OFFSET - 3*FT_HEIGHT) -#define LICENSE_ROW_2 (LICENSE_ROW_3 - OFFSET - FT_HEIGHT) -#define LICENCE_HEIGHT (LICENSE_ROW_2-LICENSE_ROW_1-OFFSET) -*/ - - -#define LICENSE_COL_2 (LICENSE_COL_1 + OFFSET_IMG) -#define LICENSE_COL_3 (LICENSE_COL_2 + COL2_WIDTH +1) -#define LICENSE_COL_4 (LICENSE_DIALOG_WIDTH - LICENSE_RIGHT_BORDER - PD_WIDTH) - -#define LICENSE_WIDTH (LICENSE_DIALOG_WIDTH - LICENSE_RIGHT_BORDER - LICENSE_ROW_1) -#define COL3_WIDTH (LICENSE_COL_4 - LICENSE_COL_3) - - -TabPage RID_TP_LICENSE -{ - HelpID = "extensions:TabPage:RID_TP_LICENSE"; - OutputSize = TRUE ; - SVLook = TRUE ; - Hide = TRUE ; - Size = MAP_APPFONT ( LICENSE_DIALOG_WIDTH , LICENSE_DIALOG_HEIGTH ) ; - Text [ en-US ] = "License Agreement"; - - MultiLineEdit ML_LICENSE - { - HelpID = "extensions:MultiLineEdit:RID_TP_LICENSE:ML_LICENSE"; - PosSize = MAP_APPFONT ( LICENSE_COL_1 , LICENSE_ROW_1 , LICENSE_WIDTH , LICENCE_HEIGHT ) ; - Border = TRUE ; - VScroll = TRUE ; - ReadOnly = TRUE ; - }; - - FixedText FT_INFO1 - { - WordBreak = TRUE ; - Pos = MAP_APPFONT ( LICENSE_COL_1 , LICENSE_ROW_2 ) ; - Size = MAP_APPFONT ( LICENSE_WIDTH , FT_HEIGHT ) ; - Text [ en-US ] = "Please follow these steps to proceed with the installation:" ; - }; - - FixedImage IMG_ARROW - { - Pos = MAP_APPFONT ( LICENSE_COL_1 , LICENSE_ROW_3 ) ; - Size = MAP_PIXEL ( 16 , 16 ) ; - Fixed = Image - { - ImageBitmap = Bitmap - { - File = "arrow.bmp" ; - File[ ar ] = "m_arrow.bmp" ; - }; - MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; - }; - }; - - FixedText FT_INFO2_1 - { - WordBreak = TRUE ; - Pos = MAP_APPFONT ( LICENSE_COL_2 , LICENSE_ROW_3 ) ; - Size = MAP_APPFONT ( COL2_WIDTH , FT_HEIGHT ) ; - Text [ en-US ] = "1." ; - }; - - FixedText FT_INFO2 - { - WordBreak = TRUE ; - Pos = MAP_APPFONT ( LICENSE_COL_3 , LICENSE_ROW_3 ) ; - Size = MAP_APPFONT ( COL3_WIDTH, 3*FT_HEIGHT ) ; - Text [ en-US ] = "View the complete License Agreement. Please use the scroll bar or the '%PAGEDOWN' button in this dialog to view the entire license text." ; - }; - - PushButton PB_PAGEDOWN - { - HelpID = "extensions:PushButton:RID_TP_LICENSE:PB_PAGEDOWN"; - TabStop = TRUE ; - Pos = MAP_APPFONT ( LICENSE_COL_4 , LICENSE_ROW_3 ) ; - Size = MAP_APPFONT ( PD_WIDTH , PB_HEIGHT ) ; - Text [ en-US ] = "Page Down" ; - }; - - FixedText FT_INFO3_1 - { - WordBreak = TRUE ; - Pos = MAP_APPFONT ( LICENSE_COL_2 , LICENSE_ROW_4 ) ; - Size = MAP_APPFONT ( COL2_WIDTH, FT_HEIGHT ) ; - Text [ en-US ] = "2." ; - }; - - FixedText FT_INFO3 - { - WordBreak = TRUE ; - Pos = MAP_APPFONT ( LICENSE_COL_3, LICENSE_ROW_4 ) ; - Size = MAP_APPFONT ( COL3_WIDTH, FT_HEIGHT ) ; - Text [ en-US ] = "Accept the License Agreement." ; - }; - - CheckBox CB_ACCEPT - { - HelpID = "extensions:CheckBox:RID_TP_LICENSE:CB_ACCEPT"; - TabStop = TRUE ; - Pos = MAP_APPFONT ( LICENSE_COL_3, LICENSE_ROW_5 ) ; - Size = MAP_APPFONT ( COL3_WIDTH, FT_HEIGHT ) ; - Text [ en-US ] = "I accept the terms of the Agreement." ; - }; - - String LICENCE_ACCEPT - { - Text [ en-US ] = "~Accept" ; - }; - - String LICENCE_NOTACCEPT - { - Text [ en-US ] = "Decline" ; - }; - -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extensions/source/preload/preloadservices.cxx b/extensions/source/preload/preloadservices.cxx deleted file mode 100644 index f23d65310..000000000 --- a/extensions/source/preload/preloadservices.cxx +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_extensions.hxx" -#include "preloadservices.hxx" -#include "componentmodule.hxx" -#include "unoautopilot.hxx" -#include "oemwiz.hxx" - -// the registration methods -extern "C" void SAL_CALL createRegistryInfo_OEMPreloadDialog() -{ - static ::preload::OMultiInstanceAutoRegistration< - ::preload::OUnoAutoPilot< ::preload::OEMPreloadDialog, ::preload::OEMPreloadSI > - > aAutoRegistration; -} -static const char cServiceName[] = "org.openoffice.comp.preload.OEMPreloadWizard"; -//......................................................................... -namespace preload -{ -//......................................................................... - - using namespace ::com::sun::star::uno; - - //===================================================================== - //= OEMPreloadSI - //===================================================================== - //--------------------------------------------------------------------- - ::rtl::OUString OEMPreloadSI::getImplementationName() const - { - return ::rtl::OUString::createFromAscii(cServiceName); - } - - //--------------------------------------------------------------------- - Sequence< ::rtl::OUString > OEMPreloadSI::getServiceNames() const - { - Sequence< ::rtl::OUString > aReturn(1); - aReturn[0] = ::rtl::OUString::createFromAscii(cServiceName); - return aReturn; - } - - -//......................................................................... -} // namespace preload -//......................................................................... - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/preload/preloadservices.hxx b/extensions/source/preload/preloadservices.hxx deleted file mode 100644 index ba51e0547..000000000 --- a/extensions/source/preload/preloadservices.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _EXTENSIONS_PRELOAD_PRELOADSERVICES_HXX_ -#define _EXTENSIONS_PRELOAD_PRELOADSERVICES_HXX_ - -#include -#include - -//......................................................................... -namespace preload -{ -//......................................................................... - - //===================================================================== - //= OGroupBoxSI - //===================================================================== - /// service info for the OEM preload wizard - struct OEMPreloadSI - { - public: - ::rtl::OUString getImplementationName() const; - ::com::sun::star::uno::Sequence< ::rtl::OUString > - getServiceNames() const; - }; -//......................................................................... -} // namespace preload -//......................................................................... - -#endif // _EXTENSIONS_PRELOAD_PRELOADSERVICES_HXX_ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/preload/services.cxx b/extensions/source/preload/services.cxx deleted file mode 100644 index e2092d6c3..000000000 --- a/extensions/source/preload/services.cxx +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_extensions.hxx" -#include "componentmodule.hxx" - -//--------------------------------------------------------------------------------------- - -using namespace ::rtl; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::registry; - -//--------------------------------------------------------------------------------------- - -extern "C" void SAL_CALL createRegistryInfo_OEMPreloadDialog(); - -//--------------------------------------------------------------------------------------- - -extern "C" void SAL_CALL preload_initializeModule() -{ - static sal_Bool s_bInit = sal_False; - if (!s_bInit) - { - createRegistryInfo_OEMPreloadDialog(); - ::preload::OModule::setResourceFilePrefix("preload"); - s_bInit = sal_True; - } -} - -//--------------------------------------------------------------------------------------- - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ - ) -{ - preload_initializeModule(); - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -//--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( - const sal_Char* pImplementationName, - void* pServiceManager, - void* /*pRegistryKey*/) -{ - Reference< XInterface > xRet; - if (pServiceManager && pImplementationName) - { - xRet = ::preload::OModule::getComponentFactory( - ::rtl::OUString::createFromAscii(pImplementationName), - static_cast< XMultiServiceFactory* >(pServiceManager)); - } - - if (xRet.is()) - xRet->acquire(); - return xRet.get(); -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/preload/unoautopilot.hxx b/extensions/source/preload/unoautopilot.hxx deleted file mode 100644 index dd485d887..000000000 --- a/extensions/source/preload/unoautopilot.hxx +++ /dev/null @@ -1,109 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _EXTENSIONS_PRELOAD_UNOAUTOPILOT_HXX_ -#define _EXTENSIONS_PRELOAD_UNOAUTOPILOT_HXX_ - -#include -#include -#include "componentmodule.hxx" -#include -#include -#include - -//......................................................................... -namespace preload -{ -//......................................................................... - - //===================================================================== - //= IServiceInfo - //===================================================================== - /** interface for the SERVICEINFO template parameter of the OUnoAutoPilot class - */ - struct IServiceInfo - { - public: - ::rtl::OUString getImplementationName() const; - ::com::sun::star::uno::Sequence< ::rtl::OUString > - getServiceNames() const; - }; - - //===================================================================== - //= OUnoAutoPilot - //===================================================================== - typedef ::svt::OGenericUnoDialog OUnoAutoPilot_Base; - template - class OUnoAutoPilot - :public OUnoAutoPilot_Base - ,public ::comphelper::OPropertyArrayUsageHelper< OUnoAutoPilot< TYPE, SERVICEINFO > > - ,public OModuleResourceClient - { - OUnoAutoPilot(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB); - - protected: - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > - m_xObjectModel; - - public: - // XTypeProvider - virtual ::com::sun::star::uno::Sequence SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); - virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); - - // XServiceInfo - static methods - static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException ); - static ::rtl::OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException ); - static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > - SAL_CALL Create(const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >&); - - // XPropertySet - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException); - virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); - - // OPropertyArrayUsageHelper - virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; - - protected: - // OGenericUnoDialog overridables - virtual Dialog* createDialog(Window* _pParent); - virtual void implInitialize(const com::sun::star::uno::Any& _rValue); - }; - -#include "unoautopilot.inl" - -//......................................................................... -} // namespace dbp -//......................................................................... - -#endif // _EXTENSIONS_PRELOAD_UNOAUTOPILOT_HXX_ - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/preload/unoautopilot.inl b/extensions/source/preload/unoautopilot.inl deleted file mode 100644 index 6e4dd1815..000000000 --- a/extensions/source/preload/unoautopilot.inl +++ /dev/null @@ -1,128 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// no include protecttion -// this file is included from unoautopilot.hxx directly - -//===================================================================== -//= OUnoAutoPilot -//===================================================================== -template -OUnoAutoPilot::OUnoAutoPilot(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB) - :OUnoAutoPilot_Base(_rxORB) -{ -} - -//--------------------------------------------------------------------- -template -::com::sun::star::uno::Sequence SAL_CALL OUnoAutoPilot::getImplementationId( ) throw(::com::sun::star::uno::RuntimeException) -{ - static ::cppu::OImplementationId aId; - return aId.getImplementationId(); -} - -//--------------------------------------------------------------------- -template -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL OUnoAutoPilot::Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) -{ - return *(new OUnoAutoPilot(_rxFactory)); -} - -//--------------------------------------------------------------------- -template -::rtl::OUString SAL_CALL OUnoAutoPilot::getImplementationName() throw(::com::sun::star::uno::RuntimeException) -{ - return getImplementationName_Static(); -} - -//--------------------------------------------------------------------- -template -::rtl::OUString OUnoAutoPilot::getImplementationName_Static() throw(::com::sun::star::uno::RuntimeException) -{ - return SERVICEINFO().getImplementationName(); -} - -//--------------------------------------------------------------------- -template -::comphelper::StringSequence SAL_CALL OUnoAutoPilot::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) -{ - return getSupportedServiceNames_Static(); -} - -//--------------------------------------------------------------------- -template -::comphelper::StringSequence OUnoAutoPilot::getSupportedServiceNames_Static() throw(::com::sun::star::uno::RuntimeException) -{ - return SERVICEINFO().getServiceNames(); -} - -//--------------------------------------------------------------------- -template -::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OUnoAutoPilot::getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException) -{ - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); - return xInfo; -} - -//--------------------------------------------------------------------- -template -::cppu::IPropertyArrayHelper& OUnoAutoPilot::getInfoHelper() -{ - return *const_cast(this)->getArrayHelper(); -} - -//-------------------------------------------------------------------------- -template -::cppu::IPropertyArrayHelper* OUnoAutoPilot::createArrayHelper( ) const -{ - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > aProps; - describeProperties(aProps); - return new ::cppu::OPropertyArrayHelper(aProps); -} - -//-------------------------------------------------------------------------- -template -Dialog* OUnoAutoPilot::createDialog(Window* _pParent) -{ - return new TYPE(_pParent, m_xObjectModel, m_aContext.getLegacyServiceFactory()); -} - -//-------------------------------------------------------------------------- -template -void OUnoAutoPilot::implInitialize(const com::sun::star::uno::Any& _rValue) -{ - ::com::sun::star::beans::PropertyValue aArgument; - if (_rValue >>= aArgument) - if (0 == aArgument.Name.compareToAscii("ObjectModel")) - { - aArgument.Value >>= m_xObjectModel; - return; - } - - OUnoAutoPilot_Base::implInitialize(_rValue); -} - -- cgit v1.2.3 From a17a95aeab757e35240c7cbfd720b9586f1422ee Mon Sep 17 00:00:00 2001 From: Francois Tigeot Date: Thu, 7 Jul 2011 11:28:13 +0200 Subject: Remove an unused platform list. --- automation/source/testtool/objtest.cxx | 57 ---------------------------------- 1 file changed, 57 deletions(-) diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx index 0b4255346..050458e89 100644 --- a/automation/source/testtool/objtest.cxx +++ b/automation/source/testtool/objtest.cxx @@ -414,63 +414,6 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die durch den aConf.SetGroup("GUI Platform"); - String aGP; - ByteString abGP; -#if defined WNT && defined INTEL - abGP.Append( "501" ); // Windows on x86 -#elif defined WNT && defined X86_64 - abGP.Append( "502" ); // Windows on x64 -#elif defined SOLARIS && defined SPARC - abGP.Append( "01" ); // Solaris SPARC -#elif defined LINUX && defined INTEL - abGP.Append( "03" ); // Linux -#elif defined AIX - abGP.Append( "04" ); -#elif defined SOLARIS && defined INTEL - abGP.Append( "05" ); // Solaris x86 -#elif defined FREEBSD - abGP.Append( "08" ); -#elif defined MACOSX - abGP.Append( "12" ); -#elif defined LINUX && defined PPC - abGP.Append( "13" ); -#elif defined NETBSD && defined INTEL - abGP.Append( "14" ); // NetBSD/i386 -#elif defined LINUX && defined X86_64 - abGP.Append( "15" ); // Linux x86-64 -#elif defined LINUX && defined SPARC - abGP.Append( "16" ); // Linux SPARC -#elif defined LINUX && defined MIPS - abGP.Append( "18" ); // Linux MIPS -#elif defined LINUX && defined ARM - abGP.Append( "19" ); // Linux ARM -#elif defined LINUX && defined IA64 - abGP.Append( "20" ); // Linux ia64 -#elif defined LINUX && defined S390 - abGP.Append( "21" ); // Linux S390 -#elif defined LINUX && defined HPPA - abGP.Append( "22" ); // Linux PA-RISC -#elif defined LINUX && defined AXP - abGP.Append( "23" ); // Linux ALPHA -#elif defined NETBSD && defined X86_64 - abGP.Append( "24" ); // NetBSD/amd64 -#elif defined OPENBSD && defined X86 - abGP.Append( "25" ); // OpenBSD/i386 -#elif defined OPENBSD && defined X86_64 - abGP.Append( "26" ); // OpenBSD/amd64 -#elif defined DRAGONFLY && defined X86 - abGP.Append( "27" ); // DragonFly/i386 -#elif defined DRAGONFLY && defined X86_64 - abGP.Append( "28" ); // DragonFly/x86-64 -#elif defined IOS && defined ARM - abGP.Append( "29" ); // iOS -#elif defined ANDROID && defined ARM - abGP.Append( "30" ); // Android -#else -#error ("unknown platform. please request an ID for your platform on qa/dev") -#endif - GETSET( aGP, "Current", abGP ); - // #i68804# Write default Communication section to testtoolrc/.ini // this is not fastest but too keep defaultsettings in one place in the code GetHostConfig(); -- cgit v1.2.3 From 7e87b3f97b9ccb83dbe70fc213cdda50718225f2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 7 Jul 2011 00:15:13 +0100 Subject: ByteString::CreateFromInt32->rtl::OString::valueOf --- automation/source/server/statemnt.cxx | 3 ++- automation/source/testtool/tcommuni.cxx | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index c34915b5c..23641de88 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -1001,7 +1001,8 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo aID.Assign("Help"); break; default: - aID = ByteString::CreateFromInt32( pBD->GetButtonId(i) ); + aID = rtl::OString::valueOf( + static_cast(pBD->GetButtonId(i))); break; } diff --git a/automation/source/testtool/tcommuni.cxx b/automation/source/testtool/tcommuni.cxx index cddd2d4b9..2fb509276 100644 --- a/automation/source/testtool/tcommuni.cxx +++ b/automation/source/testtool/tcommuni.cxx @@ -168,7 +168,8 @@ sal_uLong GetTTPortConfig() Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") )); aConf.SetGroup("Communication"); - GETSET( abPortToTalk, "TTPort", ByteString::CreateFromInt32( TESTTOOL_DEFAULT_PORT ) ); + GETSET( abPortToTalk, "TTPort", + rtl::OString::valueOf(static_cast(TESTTOOL_DEFAULT_PORT)) ); return (sal_uLong)abPortToTalk.ToInt64(); } @@ -194,7 +195,8 @@ sal_uLong GetUnoPortConfig() Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") )); aConf.SetGroup("Communication"); - GETSET( abPortToTalk, "UnoPort", ByteString::CreateFromInt32( UNO_DEFAULT_PORT ) ); + GETSET( abPortToTalk, "UnoPort", + rtl::OString::valueOf(static_cast(UNO_DEFAULT_PORT)) ); return (sal_uLong)abPortToTalk.ToInt64(); } -- cgit v1.2.3 From c989ee10e5a849d07c2b4ecd191d8a8144ab390d Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 7 Jul 2011 13:47:20 +0200 Subject: Show wizard dialog on top --- wizards/com/sun/star/wizards/common/Resource.py | 1 - .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 2 +- .../star/wizards/letter/LetterWizardDialogImpl.py | 22 ++++++++-------------- wizards/com/sun/star/wizards/ui/WizardDialog.py | 9 --------- 4 files changed, 9 insertions(+), 25 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/Resource.py b/wizards/com/sun/star/wizards/common/Resource.py index c6afce217..ce2c9e1a4 100644 --- a/wizards/com/sun/star/wizards/common/Resource.py +++ b/wizards/com/sun/star/wizards/common/Resource.py @@ -23,7 +23,6 @@ class Resource(object): self.xStringIndexAccess = xResource.getByName("String") self.xStringListIndexAccess = xResource.getByName("StringList") - if self.xStringListIndexAccess is None: raise Exception ("could not initialize xStringListIndexAccess") diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index f4495e255..94ffa54f8 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -422,7 +422,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): #set correct Configuration tree: if self.optBusinessFax.State: self.optBusinessFaxItemChanged() - if self.optPrivateFax.State: + elif self.optPrivateFax.State: self.optPrivateFaxItemChanged() def optBusinessFaxItemChanged(self): diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py index bc1e3ec1f..ca37b8d80 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py @@ -77,7 +77,6 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.buildStep4() self.buildStep5() self.buildStep6() - self.__initializePaths() self.initializeNorms() self.initializeSalutation() @@ -379,7 +378,6 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.chkBusinessPaperItemChanged() self.setElements(False) self.myLetterDoc.xTextDocument.unlockControllers() - self.activate() def lstPrivOfficialStyleItemChanged(self): TextDocument.xTextDocument = \ @@ -391,7 +389,6 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.setPossibleSenderData(True) self.setElements(False) self.myLetterDoc.xTextDocument.unlockControllers() - self.activate() def lstPrivateStyleItemChanged(self): TextDocument.xTextDocument = \ @@ -402,7 +399,6 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.initializeElements() self.setElements(True) self.myLetterDoc.xTextDocument.unlockControllers() - self.activate() def numLogoHeightTextChanged(self): self.BusCompanyLogo.iHeight = int(self.numLogoHeight.Value * 1000) @@ -892,10 +888,10 @@ class LetterWizardDialogImpl(LetterWizardDialog): if self.optBusinessLetter.State: self.lstBusinessStyleItemChanged() - if optPrivOfficialLetter.State: + elif optPrivOfficialLetter.State: self.lstPrivOfficialStyleItemChanged() - if optPrivateLetter.State: + elif optPrivateLetter.State: self.lstPrivateStyleItemChanged() def initializeSalutation(self): @@ -928,6 +924,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): found = False cIsoCode = "" MSID = "" + LanguageLabels = [] for i in nameList: found = False @@ -950,13 +947,10 @@ class LetterWizardDialogImpl(LetterWizardDialog): if found: self.Norms.append(cIsoCode) self.NormPaths.append(i) - #LanguageLabelsVector.add(lc.getLanguageString(MSID)) + #LanguageLabels.append(lc.getLanguageString(MSID)) - #COMMENTED - #LanguageLabels = [LanguageLabelsVector.size()] - #LanguageLabelsVector.toArray(LanguageLabels) - #self.setControlProperty( - # "lstLetterNorm", "StringItemList", LanguageLabels) + self.setControlProperty( + "lstLetterNorm", "StringItemList", tuple(LanguageLabels)) def getCurrentLetter(self): if self.myConfig.cp_LetterType == 0: @@ -1029,10 +1023,10 @@ class LetterWizardDialogImpl(LetterWizardDialog): if self.optBusinessLetter.State: self.optBusinessLetterItemChanged() - if self.optPrivOfficialLetter.State: + elif self.optPrivOfficialLetter.State: self.optPrivOfficialLetterItemChanged() - if self.optPrivateLetter.State: + elif self.optPrivateLetter.State: self.optPrivateLetterItemChanged() def setElements(self, privLetter): diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index f32f01a3d..30e55da69 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -47,15 +47,6 @@ class WizardDialog(UnoDialog2): def getResource(self): return self.__oWizardResource - def activate(self): - try: - if self.xUnoDialog is not None: - self.xUnoDialog.toFront() - - except Exception, ex: - pass - # do nothing; - def itemStateChanged(self, itemEvent): try: self.nNewStep = itemEvent.ItemId -- cgit v1.2.3 From 376d378c8a78aea5cf5e76b437f3ed49d3755fca Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Fri, 8 Jul 2011 15:56:49 +0200 Subject: Duplicate code --- wizards/com/sun/star/wizards/fax/FaxWizardDialog.py | 11 +++-------- wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py | 15 +++------------ .../sun/star/wizards/letter/LetterWizardDialogImpl.py | 17 ++++++----------- wizards/com/sun/star/wizards/ui/WizardDialog.py | 9 +++++++++ 4 files changed, 21 insertions(+), 31 deletions(-) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py index 9323215e1..e040f247b 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py @@ -4,12 +4,6 @@ from FaxWizardDialogConst import * from com.sun.star.awt.FontUnderline import SINGLE class FaxWizardDialog(WizardDialog): - #Image Control - #Fixed Line - #File Control - #Image Control - #Font Descriptors as Class members. - #Resources Object def __init__(self, xmsf): super(FaxWizardDialog,self).__init__(xmsf, HIDMAIN ) @@ -42,8 +36,9 @@ class FaxWizardDialog(WizardDialog): self.fontDescriptor4.Weight = 100 self.fontDescriptor5.Weight = 150 - #build components - + ''' + build components + ''' def buildStep1(self): self.optBusinessFax = self.insertRadioButton("optBusinessFax", OPTBUSINESSFAX_ITEM_CHANGED, diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 94ffa54f8..c04758923 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -5,7 +5,6 @@ from ui.PathSelection import * from common.FileAccess import * from ui.event.UnoDataAware import * from ui.event.RadioDataAware import * -from ui.XPathSelectionListener import XPathSelectionListener from common.Configuration import * from document.OfficeDocument import OfficeDocument from text.TextFieldHandler import TextFieldHandler @@ -39,7 +38,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.mainDA = [] self.faxDA = [] self.bSaveSuccess = False - self.__filenameChanged = False + self.filenameChanged = False self.UserTemplatePath = "" self.sTemplatePath = "" @@ -146,7 +145,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): #first, if the filename was not changed, thus #it is coming from a saved session, check if the # file exists and warn the user. - if not self.__filenameChanged: + if not self.filenameChanged: if fileAccess.exists(self.sPath, True): answer = SystemDialog.showMessageBox( self.xMSF, "MessBox", YES_NO + DEF_NO, @@ -241,14 +240,6 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.setRoadmapComplete(True) self.setCurrentRoadmapItemID(1) - class __myPathSelectionListener(XPathSelectionListener): - - def validatePath(self): - if self.myPathSelection.usedPathPicker: - self.__filenameChanged = True - - self.myPathSelection.usedPathPicker = False - def insertPathSelectionControl(self): self.myPathSelection = PathSelection(self.xMSF, self, PathSelection.TransferMode.SAVE, @@ -261,7 +252,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.myPathSelection.sDefaultName = "myFaxTemplate.ott" self.myPathSelection.sDefaultFilter = "writer8_template" self.myPathSelection.addSelectionListener( \ - self.__myPathSelectionListener()) + self.myPathSelectionListener()) def __updateUI(self): UnoDataAware.updateUIs(self.mainDA) diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py index ca37b8d80..e2bffcd5d 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py @@ -10,7 +10,6 @@ from CGLetterWizard import CGLetterWizard from ui.event.UnoDataAware import * from ui.event.RadioDataAware import * from document.OfficeDocument import OfficeDocument -from ui.XPathSelectionListener import XPathSelectionListener from text.TextFieldHandler import TextFieldHandler from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO @@ -145,6 +144,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): def finishWizard(self): self.switchToStep(self.getCurrentStep(), self.nMaxStep) + endWizard = True try: fileAccess = FileAccess(self.xMSF) self.sPath = self.myPathSelection.getSelectedPath() @@ -160,6 +160,8 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.resources.resOverwriteWarning, self.xUnoDialog.Peer) if answer == 3: + # user said: no, do not overwrite... + endWizard = False return False self.myLetterDoc.setWizardTemplateDocInfo( @@ -227,8 +229,9 @@ class LetterWizardDialogImpl(LetterWizardDialog): except Exception, e: traceback.print_exc() finally: - self.xUnoDialog.endExecute() - self.running = False + if endWizard: + self.xUnoDialog.endExecute() + self.running = False return True; @@ -1086,14 +1089,6 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.setRoadmapComplete(True) self.setCurrentRoadmapItemID(1) - class myPathSelectionListener(XPathSelectionListener): - - def validatePath(self): - if self.myPathSelection.usedPathPicker: - self.filenameChanged = True - - self.myPathSelection.usedPathPicker = False - def insertPathSelectionControl(self): self.myPathSelection = \ PathSelection(self.xMSF, self, PathSelection.TransferMode.SAVE, diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index 30e55da69..ee0f7c626 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -6,6 +6,7 @@ from com.sun.star.lang import IllegalArgumentException from com.sun.star.frame import TerminationVetoException from common.HelpIds import * from com.sun.star.awt.PushButtonType import HELP, STANDARD +from ui.XPathSelectionListener import XPathSelectionListener class WizardDialog(UnoDialog2): @@ -488,3 +489,11 @@ class WizardDialog(UnoDialog2): def queryTermination(self): self.activate() raise TerminationVetoException() + + class myPathSelectionListener(XPathSelectionListener): + + def validatePath(self): + if self.myPathSelection.usedPathPicker: + self.filenameChanged = True + + self.myPathSelection.usedPathPicker = False -- cgit v1.2.3 From d32fd9c1046b42da3d0d4141047aed8bd4f6d481 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Sat, 9 Jul 2011 16:23:20 +0200 Subject: Mark this as TODO --- automation/source/server/XMLParser.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/automation/source/server/XMLParser.cxx b/automation/source/server/XMLParser.cxx index 595eed464..d056fba6f 100644 --- a/automation/source/server/XMLParser.cxx +++ b/automation/source/server/XMLParser.cxx @@ -279,17 +279,11 @@ sal_Bool SAXParser::Parse( ParseAction aAct ) } catch( class SAXParseException & rPEx) { -#ifdef DBG_ERROR - String aMemo( rPEx.Message ); - aMemo = String( aMemo ); -#endif + // TODO } catch( class Exception & rEx) { -#ifdef DBG_ERROR - String aMemo( rEx.Message ); - aMemo = String( aMemo ); -#endif + // TODO } xParser->setErrorHandler( NULL ); // otherwile Object holds itself if ( aAction == COLLECT_DATA || aAction == COLLECT_DATA_IGNORE_WHITESPACE ) -- cgit v1.2.3 From 7f8fd4372bba6fde150d32ad07ca96b032d077e1 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Sat, 9 Jul 2011 18:40:58 +0200 Subject: Remove unused test/sax --- extensions/test/sax/exports.dxp | 2 - extensions/test/sax/factory.hxx | 33 -- extensions/test/sax/makefile.mk | 64 --- extensions/test/sax/testsax.cxx | 902 ------------------------------------- extensions/test/sax/testwriter.cxx | 758 ------------------------------- 5 files changed, 1759 deletions(-) delete mode 100644 extensions/test/sax/exports.dxp delete mode 100644 extensions/test/sax/factory.hxx delete mode 100644 extensions/test/sax/makefile.mk delete mode 100644 extensions/test/sax/testsax.cxx delete mode 100644 extensions/test/sax/testwriter.cxx diff --git a/extensions/test/sax/exports.dxp b/extensions/test/sax/exports.dxp deleted file mode 100644 index e4bc69d23..000000000 --- a/extensions/test/sax/exports.dxp +++ /dev/null @@ -1,2 +0,0 @@ -exService_writeRegEntry -exService_getFactory diff --git a/extensions/test/sax/factory.hxx b/extensions/test/sax/factory.hxx deleted file mode 100644 index a2d22acda..000000000 --- a/extensions/test/sax/factory.hxx +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -XInterfaceRef OSaxWriterTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception)); -UString OSaxWriterTest_getServiceName( ) THROWS( () ); -UString OSaxWriterTest_getImplementationName( ) THROWS( () ); -Sequence OSaxWriterTest_getSupportedServiceNames( ) THROWS( () ); - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/test/sax/makefile.mk b/extensions/test/sax/makefile.mk deleted file mode 100644 index 62e2706dd..000000000 --- a/extensions/test/sax/makefile.mk +++ /dev/null @@ -1,64 +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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME=extensions -TARGET=testsax -USE_DEFFILE=TRUE -ENABLE_EXCEPTIONS=TRUE -# --- Settings ----------------------------------------------------- -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - - - -OBJFILES = $(SLO)$/testsax.obj $(SLO)$/testwriter.obj - -LIB1TARGET= $(SLB)$/$(TARGET).lib -LIB1OBJFILES= $(OBJFILES) - - -SHL1TARGET= $(TARGET)$(DLLPOSTFIX) - -SHL1STDLIBS= \ - $(SALLIB) \ - $(TOOLSLIB) - -SHL1LIBS= $(LIB1TARGET) -SHL1IMPLIB= i$(TARGET) -SHL1DEPN= makefile.mk $(SHL1LIBS) -SHL1DEF= $(MISC)$/$(SHL1TARGET).def - -DEF1NAME= $(SHL1TARGET) -DEF1EXPORTFILE= exports.dxp - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/extensions/test/sax/testsax.cxx b/extensions/test/sax/testsax.cxx deleted file mode 100644 index 8f3ef9046..000000000 --- a/extensions/test/sax/testsax.cxx +++ /dev/null @@ -1,902 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_extensions.hxx" - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include // for the multiservice-factories -#include - -#include // for EXTERN_SERVICE_CALLTYPE - -#include "factory.hxx" - -using namespace usr; - -#define BUILD_ERROR(expr, Message)\ - {\ - m_seqErrors.realloc( m_seqErrors.getLen() + 1 ); \ - m_seqExceptions.realloc( m_seqExceptions.getLen() + 1 ); \ - String str; \ - str += __FILE__;\ - str += " "; \ - str += "(" ; \ - str += __LINE__ ;\ - str += ")\n";\ - str += "[ " ; \ - str += #expr; \ - str += " ] : " ; \ - str += Message; \ - m_seqErrors.getArray()[ m_seqErrors.getLen()-1] = StringToUString( str , CHARSET_SYSTEM ); \ - }\ - ((void)0) - - -#define WARNING_ASSERT(expr, Message) \ - if( ! (expr) ) { \ - m_seqWarnings.realloc( m_seqErrors.getLen() +1 ); \ - String str;\ - str += __FILE__;\ - str += " "; \ - str += "(" ; \ - str += __LINE__ ;\ - str += ")\n";\ - str += "[ " ; \ - str += #expr; \ - str += " ] : " ; \ - str += Message; \ - m_seqWarnings.getArray()[ m_seqWarnings.getLen()-1] = StringToUString( str , CHARSET_SYSTEM ); \ - return; \ - }\ - ((void)0) - -#define ERROR_ASSERT(expr, Message) \ - if( ! (expr) ) { \ - BUILD_ERROR(expr, Message );\ - return; \ - }\ - ((void)0) - -#define ERROR_EXCEPTION_ASSERT(expr, Message, Exception) \ - if( !(expr)) { \ - BUILD_ERROR(expr,Message);\ - m_seqExceptions.getArray()[ m_seqExceptions.getLen()-1] = UsrAny( Exception );\ - return; \ - } \ - ((void)0) - -/**** -* test szenarios : -****/ - - -class OSaxParserTest : - public XSimpleTest, - public OWeakObject -{ -public: - OSaxParserTest( const XMultiServiceFactoryRef & rFactory ) : m_rFactory( rFactory ) - { - - } - -public: // refcounting - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } - -public: - virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject) - THROWS( ( IllegalArgumentException, - UsrSystemException) ); - - virtual INT32 test( const UString& TestName, - const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, - UsrSystemException) ); - - virtual BOOL testPassed(void) THROWS( ( UsrSystemException) ); - virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) ); - virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) ); - virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) ); - -private: - void testSimple( const XParserRef &r ); - void testNamespaces( const XParserRef &r ); - void testFile( const XParserRef &r ); - void testEncoding( const XParserRef &rParser ); - void testPerformance( const XParserRef &rParser ); - -private: - Sequence m_seqExceptions; - Sequence m_seqErrors; - Sequence m_seqWarnings; - XMultiServiceFactoryRef m_rFactory; -}; - - - -/** -* for external binding -**/ -XInterfaceRef OSaxParserTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception)) -{ - OSaxParserTest *p = new OSaxParserTest( rSMgr ); - XInterfaceRef xService = *p; - return xService; -} - - -UString OSaxParserTest_getServiceName( ) THROWS( () ) -{ - return L"test.com.sun.star.xml.sax.Parser"; -} - -UString OSaxParserTest_getImplementationName( ) THROWS( () ) -{ - return L"test.extensions.xml.sax.Parser"; -} - -Sequence OSaxParserTest_getSupportedServiceNames( ) THROWS( () ) -{ - Sequence aRet(1); - - aRet.getArray()[0] = OSaxParserTest_getImplementationName( ); - - return aRet; -} - - -BOOL OSaxParserTest::queryInterface( Uik uik , XInterfaceRef &rOut ) -{ - if( XSimpleTest::getSmartUik() == uik ) { - rOut = (XSimpleTest *) this; - } - else { - return OWeakObject::queryInterface( uik , rOut ); - } - return TRUE; -} - - -void OSaxParserTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject ) - THROWS( ( IllegalArgumentException, - UsrSystemException) ) -{ - if( L"com.sun.star.xml.sax.Parser" == TestName ) { - XParserRef parser( TestObject , USR_QUERY ); - - ERROR_ASSERT( parser.is() , "XDataInputStream cannot be queried" ); - } -} - - -INT32 OSaxParserTest::test( const UString& TestName, - const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, - UsrSystemException) ) -{ - if( L"com.sun.star.xml.sax.Parser" == TestName ) { - try { - if( 0 == hTestHandle ) { - testInvariant( TestName , TestObject ); - } - else { - - XParserRef parser( TestObject , USR_QUERY ); - - if( 1 == hTestHandle ) { - testSimple( parser ); - } - else if( 2 == hTestHandle ) { - testNamespaces( parser ); - } - else if( 3 == hTestHandle ) { - testEncoding( parser ); - } - else if( 4 == hTestHandle ) { - testFile( parser ); - } - else if( 5 == hTestHandle ) { - testPerformance( parser ); - } - } - } - catch( Exception& e ) { - BUILD_ERROR( 0 , UStringToString( e.getName() , CHARSET_SYSTEM ).GetCharStr() ); - } - catch(...) { - BUILD_ERROR( 0 , "unknown exception (Exception is not base class)" ); - } - - hTestHandle ++; - - if( hTestHandle >= 6) { - // all tests finished. - hTestHandle = -1; - } - } - else { - BUILD_ERROR( 0 , "service not supported by test." ); - } - return hTestHandle; -} - - - -BOOL OSaxParserTest::testPassed(void) THROWS( (UsrSystemException) ) -{ - return m_seqErrors.getLen() == 0; -} - - -Sequence< UString > OSaxParserTest::getErrors(void) THROWS( (UsrSystemException) ) -{ - return m_seqErrors; -} - - -Sequence< UsrAny > OSaxParserTest::getErrorExceptions(void) THROWS( (UsrSystemException) ) -{ - return m_seqExceptions; -} - - -Sequence< UString > OSaxParserTest::getWarnings(void) THROWS( (UsrSystemException) ) -{ - return m_seqWarnings; -} - -XInputStreamRef createStreamFromSequence( const Sequence seqBytes , XMultiServiceFactoryRef &xSMgr ) -{ - XInterfaceRef xOutStreamService = xSMgr->createInstance( L"com.sun.star.io.Pipe" ); - OSL_ASSERT( xOutStreamService.is() ); - XOutputStreamRef rOutStream( xOutStreamService , USR_QUERY ); - OSL_ASSERT( rOutStream.is() ); - - XInputStreamRef rInStream( xOutStreamService , USR_QUERY ); - OSL_ASSERT( rInStream.is() ); - - rOutStream->writeBytes( seqBytes ); - rOutStream->flush(); - rOutStream->closeOutput(); - - return rInStream; -} - -XInputStreamRef createStreamFromFile( const char *pcFile , XMultiServiceFactoryRef &xSMgr ) -{ - FILE *f = fopen( pcFile , "rb" ); - XInputStreamRef r; - - if( f ) { - fseek( f , 0 , SEEK_END ); - int nLength = ftell( f ); - fseek( f , 0 , SEEK_SET ); - - Sequence seqIn(nLength); - fread( seqIn.getArray() , nLength , 1 , f ); - - r = createStreamFromSequence( seqIn , xSMgr ); - fclose( f ); - } - return r; -} - - - - - - - - - -#define PCHAR_TO_USTRING(x) StringToUString(String(x),CHARSET_PC_1252) -#define USTRING_TO_PCHAR(x) UStringToString(x,CHARSET_PC_437).GetStr() - - - -class TestDocumentHandler : - public XExtendedDocumentHandler, - public XEntityResolver, - public XErrorHandler, - public OWeakObject -{ -public: - TestDocumentHandler( XMultiServiceFactoryRef &r , BOOL bPrint ) - { - m_xSMgr = r; - m_bPrint = bPrint; - } - - -public: - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } - - -public: // Error handler - virtual void error(const UsrAny& aSAXParseException) THROWS( (SAXException, UsrSystemException) ) - { - printf( "Error !\n" ); - THROW( SAXException( L"error from error handler" , XInterfaceRef() , aSAXParseException ) ); - } - virtual void fatalError(const UsrAny& aSAXParseException) THROWS( (SAXException, UsrSystemException) ) - { - printf( "Fatal Error !\n" ); - } - virtual void warning(const UsrAny& aSAXParseException) THROWS( (SAXException, UsrSystemException) ) - { - printf( "Warning !\n" ); - } - - -public: // ExtendedDocumentHandler - - virtual void startDocument(void) THROWS( (SAXException, UsrSystemException) ) - { - m_iLevel = 0; - m_iElementCount = 0; - m_iAttributeCount = 0; - m_iWhitespaceCount =0; - m_iCharCount=0; - if( m_bPrint ) { - printf( "document started\n" ); - } - } - virtual void endDocument(void) THROWS( (SAXException, UsrSystemException) ) - { - if( m_bPrint ) { - printf( "document finished\n" ); - printf( "(ElementCount %d),(AttributeCount %d),(WhitespaceCount %d),(CharCount %d)\n", - m_iElementCount, m_iAttributeCount, m_iWhitespaceCount , m_iCharCount ); - } - } - virtual void startElement(const UString& aName, const XAttributeListRef& xAttribs) - THROWS( (SAXException,UsrSystemException) ) - { - - if( m_rLocator.is() ) { - if( m_bPrint ) - printf( "%s(%d):" , USTRING_TO_PCHAR( m_rLocator->getSystemId() ) , - m_rLocator->getLineNumber() ); - } - if( m_bPrint ) { - int i; - for( i = 0; i < m_iLevel ; i ++ ) { - printf( " " ); - } - printf( "<%s> " , USTRING_TO_PCHAR( aName ) ); - - for( i = 0 ; i < xAttribs->getLength() ; i ++ ) { - printf( "(%s,%s,'%s')" , USTRING_TO_PCHAR( xAttribs->getNameByIndex( i ) ) , - USTRING_TO_PCHAR( xAttribs->getTypeByIndex( i ) ) , - USTRING_TO_PCHAR( xAttribs->getValueByIndex( i ) ) ); - } - printf( "\n" ); - } - m_iLevel ++; - m_iElementCount ++; - m_iAttributeCount += xAttribs->getLength(); - } - virtual void endElement(const UString& aName) THROWS( (SAXException,UsrSystemException) ) - { - OSL_ASSERT( m_iLevel ); - m_iLevel --; - if( m_bPrint ) { - int i; - for( i = 0; i < m_iLevel ; i ++ ) { - printf( " " ); - } - printf( "\n" , USTRING_TO_PCHAR( aName ) ); - } - } - - virtual void characters(const UString& aChars) THROWS( (SAXException,UsrSystemException) ) - { - if( m_bPrint ) { - int i; - for( i = 0; i < m_iLevel ; i ++ ) { - printf( " " ); - } - printf( "%s\n" , USTRING_TO_PCHAR( aChars ) ); - } - m_iCharCount += aChars.len(); - } - virtual void ignorableWhitespace(const UString& aWhitespaces) THROWS( (SAXException,UsrSystemException) ) - { - m_iWhitespaceCount += aWhitespaces.len(); - } - - virtual void processingInstruction(const UString& aTarget, const UString& aData) THROWS( (SAXException,UsrSystemException) ) - { - if( m_bPrint ) - printf( "PI : %s,%s\n" , USTRING_TO_PCHAR( aTarget ) , USTRING_TO_PCHAR( aData ) ); - } - - virtual void setDocumentLocator(const XLocatorRef& xLocator) THROWS( (SAXException,UsrSystemException) ) - { - m_rLocator = xLocator; - } - - virtual InputSource resolveEntity(const UString& sPublicId, const UString& sSystemId) - THROWS( (SAXException,UsrSystemException) ) - { - InputSource source; - source.sSystemId = sSystemId; - source.sPublicId = sPublicId; - source.aInputStream = createStreamFromFile( USTRING_TO_PCHAR( sSystemId ) , m_xSMgr ); - - return source; - } - - virtual void startCDATA(void) THROWS( (SAXException,UsrSystemException) ) - { - if( m_bPrint ) { - printf( "CDataStart :\n" ); - } - } - virtual void endCDATA(void) THROWS( (SAXException,UsrSystemException) ) - { - if( m_bPrint ) { - printf( "CEndStart :\n" ); - } - } - virtual void comment(const UString& sComment) THROWS( (SAXException,UsrSystemException) ) - { - if( m_bPrint ) { - printf( "\n" , USTRING_TO_PCHAR( sComment ) ); - } - } - virtual void unknown(const UString& sString) THROWS( (SAXException,UsrSystemException) ) - { - if( m_bPrint ) { - printf( "UNKNOWN : {%s}\n" , USTRING_TO_PCHAR( sString ) ); - } - } - - virtual void allowLineBreak( void) THROWS( (SAXException, UsrSystemException ) ) - { - - } - - -public: - int m_iLevel; - int m_iElementCount; - int m_iAttributeCount; - int m_iWhitespaceCount; - int m_iCharCount; - BOOL m_bPrint; - - XMultiServiceFactoryRef m_xSMgr; - XLocatorRef m_rLocator; -}; - -BOOL TestDocumentHandler::queryInterface( Uik aUik , XInterfaceRef & rOut ) -{ - if( aUik == XDocumentHandler::getSmartUik() ) { - rOut = (XDocumentHandler * )this; - } - else if ( aUik == XExtendedDocumentHandler::getSmartUik() ) { - rOut = (XExtendedDocumentHandler *) this; - } - else if ( aUik == XEntityResolver::getSmartUik() ) { - rOut = (XEntityResolver *) this; - } - else if ( aUik == XErrorHandler::getSmartUik() ) { - rOut = (XErrorHandler * ) this; - } - else { - return OWeakObject::queryInterface( aUik , rOut ); - } - return TRUE; -} - - - - -void OSaxParserTest::testSimple( const XParserRef &rParser ) -{ - - char TestString[] = - "\n" - "\n" - "]>\n" - - "\n" - " fjklsfdklsdfkl\n" - "fjklsfdklsdfkl\n" - "\n" - "&testInternal;\n" - " blahuhu\n" - " blahi\n" - " Hello, '+1+12world!]]>\n" - " \n" - "\n" - "\n" - "aus XMLTest\n" - "\n" - "\n" - "\n\n\n"; - - Sequence seqBytes( strlen( TestString ) ); - memcpy( seqBytes.getArray() , TestString , strlen( TestString ) ); - - - XInputStreamRef rInStream; - UString sInput; - rInStream = createStreamFromSequence( seqBytes , m_rFactory ); - sInput = UString( L"internal" ); - - if( rParser.is() ) { - InputSource source; - - source.aInputStream = rInStream; - source.sSystemId = sInput; - - TestDocumentHandler *pDocHandler = new TestDocumentHandler( m_rFactory , FALSE ); - XDocumentHandlerRef rDocHandler( (XDocumentHandler *) pDocHandler , USR_QUERY ); - XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY ); - - rParser->setDocumentHandler( rDocHandler ); - rParser->setEntityResolver( rEntityResolver ); - - try { - rParser->parseStream( source ); - ERROR_ASSERT( pDocHandler->m_iElementCount == 4 , "wrong element count" ); - ERROR_ASSERT( pDocHandler->m_iAttributeCount == 2 , "wrong attribut count" ); - ERROR_ASSERT( pDocHandler->m_iCharCount == 130 , "wrong char count" ); - ERROR_ASSERT( pDocHandler->m_iWhitespaceCount == 0, "wrong whitespace count" ); - } - catch( SAXParseException& e ) { - BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) ); - } - catch( SAXException& e ) { - BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) ); - - } - catch( Exception& e ) { - BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) ); - } - catch(...) { - BUILD_ERROR( 1 , "unknown exception" ); - } - - } - - -} - -void OSaxParserTest::testNamespaces( const XParserRef &rParser ) -{ - - char TestString[] = - "\n" - "\n" - "\n" - "Frobnostication\n" - "Moved to \n" - "here.\n" - "\n"; - - Sequence seqBytes( strlen( TestString ) ); - memcpy( seqBytes.getArray() , TestString , strlen( TestString ) ); - - - XInputStreamRef rInStream; - UString sInput; - - rInStream = createStreamFromSequence( seqBytes , m_rFactory ); - sInput = UString( L"internal" ); - - if( rParser.is() ) { - InputSource source; - - source.aInputStream = rInStream; - source.sSystemId = sInput; - - TestDocumentHandler *pDocHandler = new TestDocumentHandler( m_rFactory , FALSE ); - XDocumentHandlerRef rDocHandler( (XDocumentHandler *) pDocHandler , USR_QUERY ); - XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY ); - - rParser->setDocumentHandler( rDocHandler ); - rParser->setEntityResolver( rEntityResolver ); - - try { - rParser->parseStream( source ); - ERROR_ASSERT( pDocHandler->m_iElementCount == 6 , "wrong element count" ); - ERROR_ASSERT( pDocHandler->m_iAttributeCount == 2 , "wrong attribut count" ); - ERROR_ASSERT( pDocHandler->m_iCharCount == 33, "wrong char count" ); - ERROR_ASSERT( pDocHandler->m_iWhitespaceCount == 0 , "wrong whitespace count" ); - } - catch( SAXParseException& e ) { - BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) ); - } - catch( SAXException& e ) { - BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) ); - - } - catch( Exception& e ) { - BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) ); - } - catch(...) { - BUILD_ERROR( 1 , "unknown exception" ); - } - } -} - -void OSaxParserTest::testEncoding( const XParserRef &rParser ) -{ - char TestString[] = - "\n" - "\n" - "\n" - "Frobnostication\n" - "Moved to ß\n" - "here.\n" - "\n"; - - Sequence seqBytes( strlen( TestString ) ); - memcpy( seqBytes.getArray() , TestString , strlen( TestString ) ); - - - XInputStreamRef rInStream; - UString sInput; - - rInStream = createStreamFromSequence( seqBytes , m_rFactory ); - sInput = UString( L"internal" ); - - if( rParser.is() ) { - InputSource source; - - source.aInputStream = rInStream; - source.sSystemId = sInput; - - TestDocumentHandler *pDocHandler = new TestDocumentHandler( m_rFactory , FALSE ); - XDocumentHandlerRef rDocHandler( (XDocumentHandler *) pDocHandler , USR_QUERY ); - XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY ); - - rParser->setDocumentHandler( rDocHandler ); - rParser->setEntityResolver( rEntityResolver ); - try { - rParser->parseStream( source ); - } - catch( SAXParseException& e ) { - BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) ); - } - catch( SAXException& e ) { - BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) ); - - } - catch( Exception& e ) { - BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) ); - } - catch(...) { - BUILD_ERROR( 1 , "unknown exception" ); - } - - } - -} - -void OSaxParserTest::testFile( const XParserRef & rParser ) -{ - - XInputStreamRef rInStream = createStreamFromFile( "testsax.xml" , m_rFactory ); - UString sInput = UString( PCHAR_TO_USTRING( "testsax.xml" ) ); - - - if( rParser.is() && rInStream.is() ) { - InputSource source; - - source.aInputStream = rInStream; - source.sSystemId = sInput; - - TestDocumentHandler *pDocHandler = new TestDocumentHandler( m_rFactory , TRUE ); - XDocumentHandlerRef rDocHandler( (XDocumentHandler *) pDocHandler , USR_QUERY ); - XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY ); - XErrorHandlerRef rErrorHandler( ( XErrorHandler * )pDocHandler , USR_QUERY ); - - rParser->setDocumentHandler( rDocHandler ); - rParser->setEntityResolver( rEntityResolver ); - rParser->setErrorHandler( rErrorHandler ); - - try { - rParser->parseStream( source ); - } - catch( SAXParseException& e ) { - UsrAny any; - any.set( &e , SAXParseException_getReflection() ); - while(TRUE) { - SAXParseException *pEx; - if( any.getReflection() == SAXParseException_getReflection() ) { - pEx = ( SAXParseException * ) any.get(); - printf( "%s\n" , UStringToString( pEx->Message , CHARSET_SYSTEM ).GetStr() ); - any = pEx->WrappedException; - } - else { - break; - } - } - } - catch( SAXException& e ) { - printf( "%s\n" , UStringToString( e.Message , CHARSET_SYSTEM ).GetStr() ); - - } - catch( Exception& e ) { - printf( "normal exception ! %s\n", e.getName() ); - } - catch(...) { - printf( "any exception !!!!\n" ); - } - } -} - -void OSaxParserTest::testPerformance( const XParserRef & rParser ) -{ - - XInputStreamRef rInStream = createStreamFromFile( "testPerformance.xml" , m_rFactory ); - UString sInput = UString( PCHAR_TO_USTRING( "testperformance.xml" ) ); - - if( rParser.is() && rInStream.is() ) { - InputSource source; - - source.aInputStream = rInStream; - source.sSystemId = sInput; - - TestDocumentHandler *pDocHandler = new TestDocumentHandler( m_rFactory , FALSE ); - XDocumentHandlerRef rDocHandler( (XDocumentHandler *) pDocHandler , USR_QUERY ); - XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY ); - XErrorHandlerRef rErrorHandler( ( XErrorHandler * )pDocHandler , USR_QUERY ); - - rParser->setDocumentHandler( rDocHandler ); - rParser->setEntityResolver( rEntityResolver ); - rParser->setErrorHandler( rErrorHandler ); - - try { - TimeValue aStartTime, aEndTime; - osl_getSystemTime( &aStartTime ); - rParser->parseStream( source ); - osl_getSystemTime( &aEndTime ); - - double fStart = (double)aStartTime.Seconds + ((double)aStartTime.Nanosec / 1000000000.0); - double fEnd = (double)aEndTime.Seconds + ((double)aEndTime.Nanosec / 1000000000.0); - - printf( "Performance reading : %g s\n" , fEnd - fStart ); - - } - catch( SAXParseException& e ) { - UsrAny any; - any.set( &e , SAXParseException_getReflection() ); - while(TRUE) { - SAXParseException *pEx; - if( any.getReflection() == SAXParseException_getReflection() ) { - pEx = ( SAXParseException * ) any.get(); - printf( "%s\n" , UStringToString( pEx->Message , CHARSET_SYSTEM ).GetStr() ); - any = pEx->WrappedException; - } - else { - break; - } - } - } - catch( SAXException& e ) { - printf( "%s\n" , UStringToString( e.Message , CHARSET_SYSTEM ).GetStr() ); - - } - catch( Exception& e ) { - printf( "normal exception ! %s\n", e.getName() ); - } - catch(...) { - printf( "any exception !!!!\n" ); - } - } - -} - - -extern "C" -{ -BOOL EXTERN_SERVICE_CALLTYPE exService_writeRegEntry( - const UNO_INTERFACE(XRegistryKey)* xUnoKey) - -{ - XRegistryKeyRef xKey; - uno2smart(xKey, *xUnoKey); - - UString str = UString( L"/" ) + OSaxParserTest_getImplementationName() + UString( L"/UNO/SERVICES" ); - XRegistryKeyRef xNewKey = xKey->createKey( str ); - xNewKey->createKey( OSaxParserTest_getServiceName() ); - - str = UString( L"/" ) + OSaxWriterTest_getImplementationName() + UString( L"/UNO/SERVICES" ); - xNewKey = xKey->createKey( str ); - xNewKey->createKey( OSaxWriterTest_getServiceName() ); - - return TRUE; -} - - -UNO_INTERFACE(XInterface) EXTERN_SERVICE_CALLTYPE exService_getFactory -( - const wchar_t* implementationName, - const UNO_INTERFACE(XMultiServiceFactory)* xUnoFact, - const UNO_INTERFACE(XRegistryKey)* -) -{ - UNO_INTERFACE(XInterface) xUnoRet = {0, 0}; - - XInterfaceRef xRet; - XMultiServiceFactoryRef xSMgr; - UString aImplementationName(implementationName); - - uno2smart(xSMgr, *xUnoFact); - - if (aImplementationName == OSaxWriterTest_getImplementationName() ) - { - xRet = createSingleFactory( xSMgr, implementationName, - OSaxWriterTest_CreateInstance, - OSaxWriterTest_getSupportedServiceNames() ); - } - else if (aImplementationName == OSaxParserTest_getImplementationName() ) - { - xRet = createSingleFactory( xSMgr, implementationName, - OSaxParserTest_CreateInstance, - OSaxParserTest_getSupportedServiceNames() ); - } - if (xRet.is()) - { - smart2uno(xRet, xUnoRet); - } - - return xUnoRet; -} - -} - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/test/sax/testwriter.cxx b/extensions/test/sax/testwriter.cxx deleted file mode 100644 index 5877e39fc..000000000 --- a/extensions/test/sax/testwriter.cxx +++ /dev/null @@ -1,758 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_extensions.hxx" - -#include -#include -#include // for the multiservice-factories - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include // for EXTERN_SERVICE_CALLTYPE - -using namespace std; -using namespace usr; - -#define BUILD_ERROR(expr, Message)\ - {\ - m_seqErrors.realloc( m_seqErrors.getLen() + 1 ); \ - m_seqExceptions.realloc( m_seqExceptions.getLen() + 1 ); \ - String str; \ - str += __FILE__;\ - str += " "; \ - str += "(" ; \ - str += __LINE__ ;\ - str += ")\n";\ - str += "[ " ; \ - str += #expr; \ - str += " ] : " ; \ - str += Message; \ - m_seqErrors.getArray()[ m_seqErrors.getLen()-1] = StringToUString( str , CHARSET_SYSTEM ); \ - }\ - ((void)0) - - -#define WARNING_ASSERT(expr, Message) \ - if( ! (expr) ) { \ - m_seqWarnings.realloc( m_seqErrors.getLen() +1 ); \ - String str;\ - str += __FILE__;\ - str += " "; \ - str += "(" ; \ - str += __LINE__ ;\ - str += ")\n";\ - str += "[ " ; \ - str += #expr; \ - str += " ] : " ; \ - str += Message; \ - m_seqWarnings.getArray()[ m_seqWarnings.getLen()-1] = StringToUString( str , CHARSET_SYSTEM ); \ - return; \ - }\ - ((void)0) - -#define ERROR_ASSERT(expr, Message) \ - if( ! (expr) ) { \ - BUILD_ERROR(expr, Message );\ - return; \ - }\ - ((void)0) - -#define ERROR_EXCEPTION_ASSERT(expr, Message, Exception) \ - if( !(expr)) { \ - BUILD_ERROR(expr,Message);\ - m_seqExceptions.getArray()[ m_seqExceptions.getLen()-1] = UsrAny( Exception );\ - return; \ - } \ - ((void)0) - -/**** -* test szenarios : -****/ - - -class OFileWriter : - public XOutputStream, - public OWeakObject -{ -public: - OFileWriter( char *pcFile ) { strcpy( m_pcFile , pcFile ); m_f = 0; } - - -public: // refcounting - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ) - { - if( XOutputStream::getSmartUik() == aUik ) { - rOut = (XOutputStream *) this; - } - else return OWeakObject::queryInterface( aUik , rOut ); - - return TRUE; - } - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } - -public: - virtual void writeBytes(const Sequence< BYTE >& aData) - THROWS( (NotConnectedException, BufferSizeExceededException, UsrSystemException) ); - virtual void flush(void) - THROWS( (NotConnectedException, BufferSizeExceededException, UsrSystemException) ); - virtual void closeOutput(void) - THROWS( (NotConnectedException, BufferSizeExceededException, UsrSystemException) ); - - -private: - char m_pcFile[256]; - FILE *m_f; -}; - - -void OFileWriter::writeBytes(const Sequence< BYTE >& aData) - THROWS( (NotConnectedException, BufferSizeExceededException, UsrSystemException) ) -{ - if( ! m_f ) { - m_f = fopen( m_pcFile , "w" ); - } - - fwrite( aData.getConstArray() , 1 , aData.getLen() , m_f ); - -} - - -void OFileWriter::flush(void) - THROWS( (NotConnectedException, BufferSizeExceededException, UsrSystemException) ) -{ - fflush( m_f ); -} - -void OFileWriter::closeOutput(void) - THROWS( (NotConnectedException, BufferSizeExceededException, UsrSystemException) ) -{ - fclose( m_f ); - m_f = 0; -} - - -class OSaxWriterTest : - public XSimpleTest, - public OWeakObject -{ -public: - OSaxWriterTest( const XMultiServiceFactoryRef & rFactory ) : m_rFactory( rFactory ) - { - - } - ~OSaxWriterTest() {} - -public: // refcounting - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } - -public: - virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject) - THROWS( ( IllegalArgumentException, - UsrSystemException) ); - - virtual INT32 test( const UString& TestName, - const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, - UsrSystemException) ); - - virtual BOOL testPassed(void) THROWS( ( UsrSystemException) ); - virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) ); - virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) ); - virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) ); - -private: - void testSimple( const XExtendedDocumentHandlerRef &r ); - void testExceptions( const XExtendedDocumentHandlerRef &r ); - void testDTD( const XExtendedDocumentHandlerRef &r ); - void testPerformance( const XExtendedDocumentHandlerRef &r ); - void writeParagraph( const XExtendedDocumentHandlerRef &r , const UString & s); - -private: - Sequence m_seqExceptions; - Sequence m_seqErrors; - Sequence m_seqWarnings; - XMultiServiceFactoryRef m_rFactory; - -}; - - - -/*---------------------------------------- -* -* Attributlist implementation -* -*----------------------------------------*/ -struct AttributeListImpl_impl; -class AttributeListImpl : - public XAttributeList, - public OWeakObject -{ -public: - AttributeListImpl(); - AttributeListImpl( const AttributeListImpl & ); - ~AttributeListImpl(); - -public: - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } - -public: - virtual INT16 getLength(void) THROWS( (UsrSystemException) ); - virtual UString getNameByIndex(INT16 i) THROWS( (UsrSystemException) ); - virtual UString getTypeByIndex(INT16 i) THROWS( (UsrSystemException) ); - virtual UString getTypeByName(const UString& aName) THROWS( (UsrSystemException) ); - virtual UString getValueByIndex(INT16 i) THROWS( (UsrSystemException) ); - virtual UString getValueByName(const UString& aName) THROWS( (UsrSystemException) ); - -public: - void addAttribute( const UString &sName , const UString &sType , const UString &sValue ); - void clear(); - -private: - struct AttributeListImpl_impl *m_pImpl; -}; - - -struct TagAttribute -{ - TagAttribute(){} - TagAttribute( const UString &sName, const UString &sType , const UString &sValue ) - { - this->sName = sName; - this->sType = sType; - this->sValue = sValue; - } - - UString sName; - UString sType; - UString sValue; -}; - -struct AttributeListImpl_impl -{ - AttributeListImpl_impl() - { - // performance improvement during adding - vecAttribute.reserve(20); - } - vector vecAttribute; -}; - - - -INT16 AttributeListImpl::getLength(void) THROWS( (UsrSystemException) ) -{ - return m_pImpl->vecAttribute.size(); -} - - -AttributeListImpl::AttributeListImpl( const AttributeListImpl &r ) -{ - m_pImpl = new AttributeListImpl_impl; - *m_pImpl = *(r.m_pImpl); -} - -UString AttributeListImpl::getNameByIndex(INT16 i) THROWS( (UsrSystemException) ) -{ - if( i < m_pImpl->vecAttribute.size() ) { - return m_pImpl->vecAttribute[i].sName; - } - return UString(); -} - - -UString AttributeListImpl::getTypeByIndex(INT16 i) THROWS( (UsrSystemException) ) -{ - if( i < m_pImpl->vecAttribute.size() ) { - return m_pImpl->vecAttribute[i].sType; - } - return UString(); -} - -UString AttributeListImpl::getValueByIndex(INT16 i) THROWS( (UsrSystemException) ) -{ - if( i < m_pImpl->vecAttribute.size() ) { - return m_pImpl->vecAttribute[i].sValue; - } - return UString(); - -} - -UString AttributeListImpl::getTypeByName( const UString& sName ) THROWS( (UsrSystemException) ) -{ - vector::iterator ii = m_pImpl->vecAttribute.begin(); - - for (; ii != m_pImpl->vecAttribute.end(); ++ii) - { - if( (*ii).sName == sName ) - { - return (*ii).sType; - } - } - return UString(); -} - -UString AttributeListImpl::getValueByName(const UString& sName) THROWS( (UsrSystemException) ) -{ - vector::iterator ii = m_pImpl->vecAttribute.begin(); - - for (; ii != m_pImpl->vecAttribute.end(); ++ii) - { - if( (*ii).sName == sName ) - { - return (*ii).sValue; - } - } - return UString(); -} - - -BOOL AttributeListImpl::queryInterface( Uik aUik, XInterfaceRef & rOut ) -{ - if( aUik == XAttributeList::getSmartUik() ) { - rOut = (XAttributeList * )this; - } - else { - return OWeakObject::queryInterface( aUik , rOut ); - } - return TRUE; -} - - -AttributeListImpl::AttributeListImpl() -{ - m_pImpl = new AttributeListImpl_impl; -} - - - -AttributeListImpl::~AttributeListImpl() -{ - delete m_pImpl; -} - - -void AttributeListImpl::addAttribute( const UString &sName , - const UString &sType , - const UString &sValue ) -{ - m_pImpl->vecAttribute.push_back( TagAttribute( sName , sType , sValue ) ); -} - -void AttributeListImpl::clear() -{ - vector dummy; - m_pImpl->vecAttribute.swap( dummy ); - - OSL_ASSERT( ! getLength() ); -} - -/** -* for external binding -**/ -XInterfaceRef OSaxWriterTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception)) -{ - OSaxWriterTest *p = new OSaxWriterTest( rSMgr ); - XInterfaceRef xService = *p; - return xService; -} - -UString OSaxWriterTest_getServiceName( ) THROWS( () ) -{ - return L"test.com.sun.star.xml.sax.Writer"; -} - -UString OSaxWriterTest_getImplementationName( ) THROWS( () ) -{ - return L"test.extensions.xml.sax.Writer"; -} - -Sequence OSaxWriterTest_getSupportedServiceNames( ) THROWS( () ) -{ - Sequence aRet(1); - - aRet.getArray()[0] = OSaxWriterTest_getImplementationName( ); - - return aRet; -} - - -BOOL OSaxWriterTest::queryInterface( Uik uik , XInterfaceRef &rOut ) -{ - if( XSimpleTest::getSmartUik() == uik ) { - rOut = (XSimpleTest *) this; - } - else { - return OWeakObject::queryInterface( uik , rOut ); - } - return TRUE; -} - - -void OSaxWriterTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject ) - THROWS( ( IllegalArgumentException, - UsrSystemException) ) -{ - if( L"com.sun.star.xml.sax.Writer" == TestName ) { - XDocumentHandlerRef doc( TestObject , USR_QUERY ); - XExtendedDocumentHandlerRef ext( TestObject , USR_QUERY ); - XActiveDataSourceRef source( TestObject , USR_QUERY ); - - ERROR_ASSERT( doc.is() , "XDocumentHandler cannot be queried" ); - ERROR_ASSERT( ext.is() , "XExtendedDocumentHandler cannot be queried" ); - ERROR_ASSERT( source.is() , "XActiveDataSource cannot be queried" ); - } - else { - BUILD_ERROR( 0 , "wrong test" ); - } -} - - -INT32 OSaxWriterTest::test( const UString& TestName, - const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, - UsrSystemException) ) -{ - if( L"com.sun.star.xml.sax.Writer" == TestName ) { - try { - if( 0 == hTestHandle ) { - testInvariant( TestName , TestObject ); - } - else { - - XExtendedDocumentHandlerRef writer( TestObject , USR_QUERY ); - - if( 1 == hTestHandle ) { - testSimple( writer ); - } - else if( 2 == hTestHandle ) { - testExceptions( writer ); - } - else if( 3 == hTestHandle ) { - testDTD( writer ); - } - else if( 4 == hTestHandle ) { - testPerformance( writer ); - } - } - } - catch( Exception& e ) { - BUILD_ERROR( 0 , UStringToString( e.getName() , CHARSET_SYSTEM ).GetCharStr() ); - } - catch(...) { - BUILD_ERROR( 0 , "unknown exception (Exception is not base class)" ); - } - - hTestHandle ++; - - if( hTestHandle >= 5) { - // all tests finished. - hTestHandle = -1; - } - } - else { - BUILD_ERROR( 0 , "service not supported by test." ); - } - return hTestHandle; -} - - - -BOOL OSaxWriterTest::testPassed(void) THROWS( (UsrSystemException) ) -{ - return m_seqErrors.getLen() == 0; -} - - -Sequence< UString > OSaxWriterTest::getErrors(void) THROWS( (UsrSystemException) ) -{ - return m_seqErrors; -} - - -Sequence< UsrAny > OSaxWriterTest::getErrorExceptions(void) THROWS( (UsrSystemException) ) -{ - return m_seqExceptions; -} - - -Sequence< UString > OSaxWriterTest::getWarnings(void) THROWS( (UsrSystemException) ) -{ - return m_seqWarnings; -} - -void OSaxWriterTest::writeParagraph( const XExtendedDocumentHandlerRef &r , const UString & s) -{ - int nMax = s.len(); - int nStart = 0; - - Sequence seq( s.len() ); - memcpy( seq.getArray() , s.getStr() , s.len() * sizeof( UINT16 ) ); - - for( int n = 1 ; n < nMax ; n++ ){ - if( 32 == seq.getArray()[n] ) { - r->allowLineBreak(); - r->characters( s.copy( nStart , n - nStart ) ); - nStart = n; - } - } - r->allowLineBreak(); - r->characters( s.copy( nStart , n - nStart ) ); - - -} - - - -void OSaxWriterTest::testSimple( const XExtendedDocumentHandlerRef &r ) -{ - UString testParagraph = L"Dies ist ein bloeder Test um zu uberpruefen, ob der SAXWriter " - L"wohl Zeilenumbrueche halbwegs richtig macht oder ob er die Zeile " - L"bis zum bitteren Ende schreibt."; - - OFileWriter *pw = new OFileWriter("output.xml"); - AttributeListImpl *pList = new AttributeListImpl; - - XAttributeListRef rList( (XAttributeList *) pList , USR_QUERY ); - XOutputStreamRef ref( ( XOutputStream * ) pw , USR_QUERY ); - - XActiveDataSourceRef source( r , USR_QUERY ); - - ERROR_ASSERT( ref.is() , "no output stream" ); - ERROR_ASSERT( source.is() , "no active data source" ); - - source->setOutputStream( ref ); - - r->startDocument(); - - pList->addAttribute( L"Arg1" , L"CDATA" , L"bla\n u" ); - pList->addAttribute( L"Arg2" , L"CDATA" , L"blub" ); - - r->startElement( L"tag1" , rList ); - r->ignorableWhitespace( L"" ); - - r->characters( L"huhu" ); - r->ignorableWhitespace( L"" ); - - r->startElement( L"hi" , rList ); - r->ignorableWhitespace( L"" ); - - // the enpassant must be converted & -> & - r->characters( L"ü" ); - - // Test added for mib. Tests if errors during conversions occurs - r->ignorableWhitespace( UString() ); - sal_Char array[256]; - for( sal_Int32 n = 32 ; n < 254 ; n ++ ) { - array[n-32] = n; - } - array[254-32] = 0; - r->characters( - StringToUString( array , RTL_TEXTENCODING_SYMBOL ) - ); - r->ignorableWhitespace( UString() ); - - // '>' must not be converted - r->startCDATA(); - r->characters( L">fsfsdf<" ); - r->endCDATA(); - r->ignorableWhitespace( UString() ); - - writeParagraph( r , testParagraph ); - - - r->ignorableWhitespace( UString() ); - r->comment( L"Dies ist ein Kommentar !" ); - r->ignorableWhitespace( UString() ); - - r->startElement( L"emptytagtest" , rList ); - r->endElement( L"emptytagtest" ); - - r->endElement( L"hi" ); - r->ignorableWhitespace( L"" ); - - r->endElement( L"tag1" ); - r->endDocument(); - -} - -void OSaxWriterTest::testExceptions( const XExtendedDocumentHandlerRef & r ) -{ - - OFileWriter *pw = new OFileWriter("output2.xml"); - AttributeListImpl *pList = new AttributeListImpl; - - XAttributeListRef rList( (XAttributeList *) pList , USR_QUERY ); - XOutputStreamRef ref( ( XOutputStream * ) pw , USR_QUERY ); - - XActiveDataSourceRef source( r , USR_QUERY ); - - ERROR_ASSERT( ref.is() , "no output stream" ); - ERROR_ASSERT( source.is() , "no active data source" ); - - source->setOutputStream( ref ); - - { // startDocument must be called before start element - BOOL bException = TRUE; - try { - r->startElement( L"huhu" , rList ); - bException = FALSE; - } - catch( SAXException& e ) { - - } - ERROR_ASSERT( bException , "expected exception not thrown !" ); - } - - r->startDocument(); - - r->startElement( L"huhu" , rList ); - r->startCDATA(); - - { - BOOL bException = TRUE; - try { - r->startElement( L"huhu" , rList ); - bException = FALSE; - } - catch( SAXException& e ) { - - } - ERROR_ASSERT( bException , "expected exception not thrown !" ); - } - - r->endCDATA(); - r->endElement( L"hi" ); - - r->endDocument(); -} - - -void OSaxWriterTest::testDTD(const XExtendedDocumentHandlerRef &r ) -{ - OFileWriter *pw = new OFileWriter("outputDTD.xml"); - AttributeListImpl *pList = new AttributeListImpl; - - XAttributeListRef rList( (XAttributeList *) pList , USR_QUERY ); - XOutputStreamRef ref( ( XOutputStream * ) pw , USR_QUERY ); - - XActiveDataSourceRef source( r , USR_QUERY ); - - ERROR_ASSERT( ref.is() , "no output stream" ); - ERROR_ASSERT( source.is() , "no active data source" ); - - source->setOutputStream( ref ); - - - r->startDocument(); - r->unknown( L"\n" ); - r->startElement( L"huhu" , rList ); - - r->endElement( L"huhu" ); - r->endDocument(); -} - -void OSaxWriterTest::testPerformance(const XExtendedDocumentHandlerRef &r ) -{ - OFileWriter *pw = new OFileWriter("testPerformance.xml"); - AttributeListImpl *pList = new AttributeListImpl; - - UString testParagraph = L"Dies ist ein bloeder Test um zu uberpruefen, ob der SAXWriter " - L"wohl > Zeilenumbrueche halbwegs richtig macht oder ob er die Zeile " - L"bis zum bitteren Ende schreibt."; - - - XAttributeListRef rList( (XAttributeList *) pList , USR_QUERY ); - XOutputStreamRef ref( ( XOutputStream * ) pw , USR_QUERY ); - - XActiveDataSourceRef source( r , USR_QUERY ); - - ERROR_ASSERT( ref.is() , "no output stream" ); - ERROR_ASSERT( source.is() , "no active data source" ); - - source->setOutputStream( ref ); - - TimeValue aStartTime, aEndTime; - osl_getSystemTime( &aStartTime ); - - - r->startDocument(); - // just write a bunch of xml tags ! - // for performance testing - sal_Int32 i2; - for( i2 = 0 ; i2 < 15 ; i2 ++ ) - { - r->startElement( UString( L"tag" ) + UString::valueOf( i2 ), rList ); - for( sal_Int32 i = 0 ; i < 450 ; i ++ ) - { - r->ignorableWhitespace( L""); - r->startElement( L"huhu" , rList ); - r->characters( testParagraph ); - r->ignorableWhitespace( L""); - r->endElement( L"huhu" ); - } - } - for( i2 = 14 ; i2 >= 0 ; i2-- ) - { - r->ignorableWhitespace( L""); - r->endElement( UString( L"tag" ) + UString::valueOf( i2 ) ); - } - - r->endDocument(); - - osl_getSystemTime( &aEndTime ); - - double fStart = (double)aStartTime.Seconds + ((double)aStartTime.Nanosec / 1000000000.0); - double fEnd = (double)aEndTime.Seconds + ((double)aEndTime.Nanosec / 1000000000.0); - - printf( "Performance writing : %g s\n" , fEnd - fStart ); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3 From 0245c6d17aa378e2d563ce0a50ee8ce14517f195 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 10 Jul 2011 00:26:10 +0100 Subject: callcatcher: remove unused xmlchar_to_ous --- xmlsecurity/source/xmlsec/saxhelper.cxx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx index 1af8b9e79..8a8a00b22 100644 --- a/xmlsecurity/source/xmlsec/saxhelper.cxx +++ b/xmlsecurity/source/xmlsec/saxhelper.cxx @@ -64,21 +64,6 @@ xmlChar* ous_to_nxmlstr( const rtl::OUString& oustr, int& length ) return xmlStrndup( ( xmlChar* )ostr.getStr(), length ) ; } -/** - * The input parameter isn't necessaryly NULL terminated. - */ -rtl::OUString xmlchar_to_ous( const xmlChar* pChar, int length ) -{ - if( pChar != NULL ) - { - return rtl::OUString( ( sal_Char* )pChar , length , RTL_TEXTENCODING_UTF8 ) ; - } - else - { - return rtl::OUString() ; - } -} - /** * The return value and the referenced value must be NULL terminated. * The application has the responsibilty to deallocte the return value. -- cgit v1.2.3 From d9a8459a5e80e648440a71a245809736b77b88e1 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 10 Jul 2011 00:52:41 +0100 Subject: callcatcher: remove unused TpBorderRGBColor --- cui/source/tabpages/border.cxx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 9e29eba8c..a13cb4958 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -88,21 +88,6 @@ static sal_uInt16 pRanges[] = sal_Bool SvxBorderTabPage::bSync = sal_True; -//------------------------------------------------------------------------ - -#define RGBCOL(eColorName) (TpBorderRGBColor(eColorName)) - -// LOKALE FUNKTION -// Konvertiert in echte RGB-Farben, damit in den Listboxen -// endlich mal richtig selektiert werden kann. - -Color TpBorderRGBColor( ColorData aColorData ) -{ - Color aRGBColor( aColorData ); - - return( aRGBColor ); -} - // ----------------------------------------------------------------------- void lcl_SetDecimalDigitsTo1(MetricField& rField) { -- cgit v1.2.3 From 7d23e260cce288878b61e78a1db523b7678ba299 Mon Sep 17 00:00:00 2001 From: Matus Kukan Date: Sat, 2 Jul 2011 17:26:05 +0200 Subject: Move methods from component_getImplementationEnviron to component_getFactory --- extensions/source/abpilot/abpservices.cxx | 3 ++- extensions/source/dbpilots/dbpservices.cxx | 3 ++- extensions/source/propctrlr/pcrservices.cxx | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/extensions/source/abpilot/abpservices.cxx b/extensions/source/abpilot/abpservices.cxx index 8703dc8cb..ef519a353 100644 --- a/extensions/source/abpilot/abpservices.cxx +++ b/extensions/source/abpilot/abpservices.cxx @@ -61,7 +61,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron uno_Environment ** /*ppEnv*/ ) { - abp_initializeModule(); *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } @@ -71,6 +70,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( void* pServiceManager, void* /*pRegistryKey*/) { + abp_initializeModule(); + Reference< XInterface > xRet; if (pServiceManager && pImplementationName) { diff --git a/extensions/source/dbpilots/dbpservices.cxx b/extensions/source/dbpilots/dbpservices.cxx index 0600af0fe..97eb6975c 100644 --- a/extensions/source/dbpilots/dbpservices.cxx +++ b/extensions/source/dbpilots/dbpservices.cxx @@ -65,7 +65,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron uno_Environment ** /*ppEnv*/ ) { - dbp_initializeModule(); *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } @@ -75,6 +74,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( void* pServiceManager, void* /*pRegistryKey*/) { + dbp_initializeModule(); + Reference< XInterface > xRet; if (pServiceManager && pImplementationName) { diff --git a/extensions/source/propctrlr/pcrservices.cxx b/extensions/source/propctrlr/pcrservices.cxx index 90ddc35a3..b85e344f6 100644 --- a/extensions/source/propctrlr/pcrservices.cxx +++ b/extensions/source/propctrlr/pcrservices.cxx @@ -97,7 +97,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron uno_Environment ** /*ppEnv*/ ) { - pcr_initializeModule(); *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } @@ -107,6 +106,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( void* pServiceManager, void* /*pRegistryKey*/) { + pcr_initializeModule(); + Reference< XInterface > xRet; if (pServiceManager && pImplementationName) { -- cgit v1.2.3 From a9eda0eb4c8d40919feb6c9d47ff106afe1879a7 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 12 Jul 2011 00:59:26 +0200 Subject: fdo#37290: migrate Basic to new resource service --- wizards/source/tools/Misc.xba | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/wizards/source/tools/Misc.xba b/wizards/source/tools/Misc.xba index 7eca46671..faa0f802f 100644 --- a/wizards/source/tools/Misc.xba +++ b/wizards/source/tools/Misc.xba @@ -271,14 +271,18 @@ End Sub Function InitResources(Description, ShortDescription as String) as boolean +Dim xResource as Object +Dim aArgs(0) as String On Error Goto ErrorOcurred - oResSrv = createUnoService( "com.sun.star.resource.VclStringResourceLoader" ) - If (IsNull(oResSrv)) then + aArgs(0) = ShortDescription + oConfigProvider = createUnoService("com.sun.star.configuration.ConfigurationProvider") + xResource = getProcessServiceManager().createInstanceWithArguments( "org.libreoffice.resource.ResourceIndexAccess", aArgs() ) + If (IsNull(xResource)) then InitResources = FALSE - MsgBox( Description & ": No resource loader found", 16, GetProductName()) + MsgBox("could not initialize ResourceIndexAccess") Else InitResources = TRUE - oResSrv.FileName = ShortDescription + oResSrv = xResource.getByName( "String" ) End If Exit Function ErrorOcurred: @@ -294,7 +298,7 @@ End Function Function GetResText( nID as integer ) As string On Error Goto ErrorOcurred If Not IsNull(oResSrv) Then - GetResText = oResSrv.getString( nID ) + GetResText = oResSrv.getByIndex( nID ) Else GetResText = "" End If @@ -814,4 +818,4 @@ End Sub Function CalIsLeapYear(ByVal iYear as Integer) as Boolean CalIsLeapYear = ((iYear Mod 4 = 0) And ((iYear Mod 100 <> 0) Or (iYear Mod 400 = 0))) End Function - \ No newline at end of file + -- cgit v1.2.3 From c707c7a19a0bef0075f3ba10366e0fc05c96702a Mon Sep 17 00:00:00 2001 From: Matus Kukan Date: Sun, 3 Jul 2011 13:59:22 +0200 Subject: Remove component_getImplementationEnvironment --- UnoControls/source/base/registercontrols.cxx | 10 ---------- basctl/source/basicide/register.cxx | 8 -------- basctl/util/basctl.map | 1 - cui/source/uno/services.cxx | 6 ------ cui/util/cui.map | 1 - embedserv/source/embed/register.cxx | 5 ----- embedserv/util/exports.dxp | 1 - extensions/source/abpilot/abpservices.cxx | 10 ---------- extensions/source/abpilot/exports.dxp | 1 - extensions/source/bibliography/bibload.cxx | 6 ------ extensions/source/config/ldap/componentdef.cxx | 7 ------- extensions/source/config/ldap/exports.dxp | 1 - extensions/source/dbpilots/dbpservices.cxx | 10 ---------- extensions/source/ole/oleautobridge.uno.dxp | 1 - extensions/source/ole/servreg.cxx | 8 -------- extensions/source/oooimprovement/oooimprovement_exports.cxx | 3 --- extensions/source/plugin/base/service.cxx | 7 ------- extensions/source/propctrlr/pcrservices.cxx | 10 ---------- extensions/source/resource/exports.dxp | 1 - extensions/source/scanner/exports.dxp | 1 - extensions/source/scanner/scnserv.cxx | 12 ------------ extensions/source/update/check/updatecheckjob.cxx | 7 ------- extensions/source/update/feed/updatefeed.cxx | 7 ------- extensions/source/update/ui/updatecheckui.cxx | 7 ------- extensions/source/xmlextract/xmxuno.cxx | 7 ------- extensions/test/ole/cpnt/cpnt.cxx | 6 ------ extensions/test/ole/cpnt/exports.dxp | 1 - forms/source/misc/services.cxx | 6 ------ forms/util/frm.dxp | 1 - .../source/hyphenator/altlinuxhyph/hyphen/exports.dxp | 1 - .../source/hyphenator/altlinuxhyph/hyphen/hreg.cxx | 6 ------ lingucomponent/source/languageguessing/guesslang.cxx | 6 ------ lingucomponent/source/spellcheck/macosxspell/macreg.cxx | 6 ------ lingucomponent/source/spellcheck/spell/exports.dxp | 1 - lingucomponent/source/spellcheck/spell/sreg.cxx | 6 ------ lingucomponent/source/thesaurus/libnth/exports.dxp | 1 - lingucomponent/source/thesaurus/libnth/ntreg.cxx | 6 ------ package/source/manifest/UnoRegister.cxx | 8 -------- package/source/xstor/register.cxx | 5 ----- package/source/xstor/xstor.dxp | 1 - package/util/exports.dxp | 1 - xmlsecurity/source/component/registerservices.cxx | 5 ----- xmlsecurity/source/framework/xsec_framework.cxx | 7 ------- xmlsecurity/source/xmlsec/xsec_xmlsec.cxx | 6 ------ xmlsecurity/util/exports_xsmscrypt.dxp | 1 - xmlsecurity/util/exports_xsnss.dxp | 1 - xmlsecurity/util/xsec_fw.dxp | 1 - 47 files changed, 221 deletions(-) diff --git a/UnoControls/source/base/registercontrols.cxx b/UnoControls/source/base/registercontrols.cxx index c6692be0e..f786c9285 100644 --- a/UnoControls/source/base/registercontrols.cxx +++ b/UnoControls/source/base/registercontrols.cxx @@ -131,16 +131,6 @@ CREATEINSTANCE ( ProgressMonitor ) CREATEINSTANCE ( StatusIndicator ) //============================================================================= -//______________________________________________________________________________________________________________ -// return environment -//______________________________________________________________________________________________________________ - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvironmentTypeName , - uno_Environment** /*ppEnvironment*/ ) -{ - *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; -} - //______________________________________________________________________________________________________________ // create right component factory //______________________________________________________________________________________________________________ diff --git a/basctl/source/basicide/register.cxx b/basctl/source/basicide/register.cxx index 3f3dc97cc..82f417dee 100644 --- a/basctl/source/basicide/register.cxx +++ b/basctl/source/basicide/register.cxx @@ -45,14 +45,6 @@ using namespace ::com::sun::star::lang; extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char** ppEnvironmentTypeName, - uno_Environment** ppEnvironment ) -{ - (void)ppEnvironment; - *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void* pRegistryKey ) diff --git a/basctl/util/basctl.map b/basctl/util/basctl.map index 83193fe17..3677a0767 100755 --- a/basctl/util/basctl.map +++ b/basctl/util/basctl.map @@ -3,7 +3,6 @@ UDK_3_0_0 { basicide_choose_macro; basicide_macro_organizer; basicide_handle_basic_error; - component_getImplementationEnvironment; component_getFactory; local: *; diff --git a/cui/source/uno/services.cxx b/cui/source/uno/services.cxx index cb67736a3..a63fd3c1e 100644 --- a/cui/source/uno/services.cxx +++ b/cui/source/uno/services.cxx @@ -57,10 +57,4 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( char const return cppu::component_getFactoryHelper(implName, serviceManager, registryKey, entries); } - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment ( const sal_Char ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/util/cui.map b/cui/util/cui.map index f4c89f960..e0809cfbd 100644 --- a/cui/util/cui.map +++ b/cui/util/cui.map @@ -2,7 +2,6 @@ UDK_3_0_0 { global: CreateDialogFactory; GetSpecialCharsForEdit; - component_getImplementationEnvironment; component_getFactory; local: *; diff --git a/embedserv/source/embed/register.cxx b/embedserv/source/embed/register.cxx index 018829514..841c9966f 100644 --- a/embedserv/source/embed/register.cxx +++ b/embedserv/source/embed/register.cxx @@ -67,11 +67,6 @@ uno::Sequence< ::rtl::OUString > SAL_CALL EmbedServer_getSupportedServiceNames() extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { void * pRet = 0; diff --git a/embedserv/util/exports.dxp b/embedserv/util/exports.dxp index f0e1c6993..700330789 100755 --- a/embedserv/util/exports.dxp +++ b/embedserv/util/exports.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory diff --git a/extensions/source/abpilot/abpservices.cxx b/extensions/source/abpilot/abpservices.cxx index ef519a353..d78593126 100644 --- a/extensions/source/abpilot/abpservices.cxx +++ b/extensions/source/abpilot/abpservices.cxx @@ -54,16 +54,6 @@ extern "C" void SAL_CALL abp_initializeModule() } } -//--------------------------------------------------------------------------------------- - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ - ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - //--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, diff --git a/extensions/source/abpilot/exports.dxp b/extensions/source/abpilot/exports.dxp index f0e1c6993..700330789 100644 --- a/extensions/source/abpilot/exports.dxp +++ b/extensions/source/abpilot/exports.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index b9b972701..0a6921f0b 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -216,12 +216,6 @@ Sequence< rtl::OUString > BibliographyLoader::getSupportedServiceNames_Static(vo extern "C" { - SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) - { - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; - } - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, void * /*pRegistryKey*/ ) { diff --git a/extensions/source/config/ldap/componentdef.cxx b/extensions/source/config/ldap/componentdef.cxx index f8c2db055..6d38e2090 100644 --- a/extensions/source/config/ldap/componentdef.cxx +++ b/extensions/source/config/ldap/componentdef.cxx @@ -56,13 +56,6 @@ static const cppu::ImplementationEntry kImplementations_entries[] = } ; //------------------------------------------------------------------------------ -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **aEnvTypeName, - uno_Environment** /*aEnvironment*/) { - *aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; -} -//------------------------------------------------------------------------------ - extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_Char *aImplementationName, void *aServiceManager, void *aRegistryKey) { diff --git a/extensions/source/config/ldap/exports.dxp b/extensions/source/config/ldap/exports.dxp index f0e1c6993..700330789 100644 --- a/extensions/source/config/ldap/exports.dxp +++ b/extensions/source/config/ldap/exports.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory diff --git a/extensions/source/dbpilots/dbpservices.cxx b/extensions/source/dbpilots/dbpservices.cxx index 97eb6975c..f158fdac3 100644 --- a/extensions/source/dbpilots/dbpservices.cxx +++ b/extensions/source/dbpilots/dbpservices.cxx @@ -58,16 +58,6 @@ extern "C" void SAL_CALL dbp_initializeModule() } } -//--------------------------------------------------------------------------------------- - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ - ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - //--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, diff --git a/extensions/source/ole/oleautobridge.uno.dxp b/extensions/source/ole/oleautobridge.uno.dxp index 1f26fd019..843ff2fc3 100644 --- a/extensions/source/ole/oleautobridge.uno.dxp +++ b/extensions/source/ole/oleautobridge.uno.dxp @@ -1,3 +1,2 @@ component_getFactory @101 -component_getImplementationEnvironment @102 component_canUnload @103 diff --git a/extensions/source/ole/servreg.cxx b/extensions/source/ole/servreg.cxx index 06a4757fd..5e49c5da8 100644 --- a/extensions/source/ole/servreg.cxx +++ b/extensions/source/ole/servreg.cxx @@ -120,14 +120,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( return pRet; } - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - - extern "C" sal_Bool component_canUnload( TimeValue* libUnused) { return globalModuleCount.canUnload( &globalModuleCount, libUnused); diff --git a/extensions/source/oooimprovement/oooimprovement_exports.cxx b/extensions/source/oooimprovement/oooimprovement_exports.cxx index d7c3a7bf1..c33157926 100644 --- a/extensions/source/oooimprovement/oooimprovement_exports.cxx +++ b/extensions/source/oooimprovement/oooimprovement_exports.cxx @@ -63,9 +63,6 @@ namespace extern "C" { - SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const sal_Char** env_type_name, uno_Environment**) - { *env_type_name = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* pImplName, void* pServiceManager, void*) { if ( !pServiceManager || !pImplName ) return 0; diff --git a/extensions/source/plugin/base/service.cxx b/extensions/source/plugin/base/service.cxx index e2de74853..5ecb800d4 100644 --- a/extensions/source/plugin/base/service.cxx +++ b/extensions/source/plugin/base/service.cxx @@ -58,13 +58,6 @@ using namespace cppu; extern "C" { - SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char** ppEnvTypeName, - uno_Environment** /*ppEnv*/ ) - { - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; - } - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pXUnoSMgr, diff --git a/extensions/source/propctrlr/pcrservices.cxx b/extensions/source/propctrlr/pcrservices.cxx index b85e344f6..43f40c571 100644 --- a/extensions/source/propctrlr/pcrservices.cxx +++ b/extensions/source/propctrlr/pcrservices.cxx @@ -90,16 +90,6 @@ extern "C" void SAL_CALL pcr_initializeModule() } } -//--------------------------------------------------------------------------------------- - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ - ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - //--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, diff --git a/extensions/source/resource/exports.dxp b/extensions/source/resource/exports.dxp index f0e1c6993..700330789 100644 --- a/extensions/source/resource/exports.dxp +++ b/extensions/source/resource/exports.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory diff --git a/extensions/source/scanner/exports.dxp b/extensions/source/scanner/exports.dxp index f0e1c6993..700330789 100644 --- a/extensions/source/scanner/exports.dxp +++ b/extensions/source/scanner/exports.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory diff --git a/extensions/source/scanner/scnserv.cxx b/extensions/source/scanner/scnserv.cxx index 0eefadb5c..ad74c1561 100644 --- a/extensions/source/scanner/scnserv.cxx +++ b/extensions/source/scanner/scnserv.cxx @@ -37,18 +37,6 @@ using namespace com::sun::star::registry; -// ------------------------------------------ -// - component_getImplementationEnvironment - -// ------------------------------------------ - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvTypeName, uno_Environment** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -// ------------------------ -// - component_getFactory - -// ------------------------ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ ) { diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx index 949d47ec1..e2e85d308 100644 --- a/extensions/source/update/check/updatecheckjob.cxx +++ b/extensions/source/update/check/updatecheckjob.cxx @@ -381,13 +381,6 @@ static const cppu::ImplementationEntry kImplementations_entries[] = //------------------------------------------------------------------------------ -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Environment **) -{ - *aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; -} - -//------------------------------------------------------------------------------ - extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey) { return cppu::component_getFactoryHelper( diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx index 7e6f441d2..87d743945 100644 --- a/extensions/source/update/feed/updatefeed.cxx +++ b/extensions/source/update/feed/updatefeed.cxx @@ -844,13 +844,6 @@ static const cppu::ImplementationEntry kImplementations_entries[] = //------------------------------------------------------------------------------ -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Environment **) -{ - *aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; -} - -//------------------------------------------------------------------------------ - extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey) { return cppu::component_getFactoryHelper( diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index f7aaf2b0c..8c5be1bdf 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -1044,13 +1044,6 @@ static const cppu::ImplementationEntry kImplementations_entries[] = //------------------------------------------------------------------------------ -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Environment **) -{ - *aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; -} - -//------------------------------------------------------------------------------ - extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey) { return cppu::component_getFactoryHelper( diff --git a/extensions/source/xmlextract/xmxuno.cxx b/extensions/source/xmlextract/xmxuno.cxx index e7de536ee..d0366ce10 100644 --- a/extensions/source/xmlextract/xmxuno.cxx +++ b/extensions/source/xmlextract/xmxuno.cxx @@ -46,13 +46,6 @@ static REF( NMSP_UNO::XInterface ) SAL_CALL create_XMLExtractor( const REF( NMSP extern "C" { -//================================================================================================== -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} -//================================================================================================== SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { diff --git a/extensions/test/ole/cpnt/cpnt.cxx b/extensions/test/ole/cpnt/cpnt.cxx index 41eba2633..c826a3c91 100644 --- a/extensions/test/ole/cpnt/cpnt.cxx +++ b/extensions/test/ole/cpnt/cpnt.cxx @@ -395,12 +395,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( return pRet; } -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - // XTestSequence ============================================================================ Sequence SAL_CALL OComponent::methodByte(const Sequence< sal_Int8 >& aSeq) throw( RuntimeException ) diff --git a/extensions/test/ole/cpnt/exports.dxp b/extensions/test/ole/cpnt/exports.dxp index a265aeec0..51703a046 100644 --- a/extensions/test/ole/cpnt/exports.dxp +++ b/extensions/test/ole/cpnt/exports.dxp @@ -1,3 +1,2 @@ component_writeInfo component_getFactory -component_getImplementationEnvironment \ No newline at end of file diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx index 20065f971..d3cd82dfb 100644 --- a/forms/source/misc/services.cxx +++ b/forms/source/misc/services.cxx @@ -320,12 +320,6 @@ void SAL_CALL createRegistryInfo_FORMS() } } -//--------------------------------------------------------------------------------------- -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const sal_Char** _ppEnvTypeName, uno_Environment** /*_ppEnv*/) -{ - *_ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - //--------------------------------------------------------------------------------------- SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* _pImplName, XMultiServiceFactory* _pServiceManager, void* /*_pRegistryKey*/) { diff --git a/forms/util/frm.dxp b/forms/util/frm.dxp index f0e1c6993..700330789 100644 --- a/forms/util/frm.dxp +++ b/forms/util/frm.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/exports.dxp b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/exports.dxp index a9861e3ff..700330789 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/exports.dxp +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/exports.dxp @@ -1,2 +1 @@ component_getFactory -component_getImplementationEnvironment diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx index 9fff12566..a8a1feac8 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx @@ -55,12 +55,6 @@ extern void * SAL_CALL Hyphenator_getFactory( extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx index 8dc21453c..49e033040 100644 --- a/lingucomponent/source/languageguessing/guesslang.cxx +++ b/lingucomponent/source/languageguessing/guesslang.cxx @@ -422,12 +422,6 @@ static struct ::cppu::ImplementationEntry s_component_entries [] = extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - sal_Char const ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( sal_Char const * implName, lang::XMultiServiceFactory * xMgr, registry::XRegistryKey * xRegistry ) diff --git a/lingucomponent/source/spellcheck/macosxspell/macreg.cxx b/lingucomponent/source/spellcheck/macosxspell/macreg.cxx index 13d806dbb..42a26c40a 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macreg.cxx +++ b/lingucomponent/source/spellcheck/macosxspell/macreg.cxx @@ -54,12 +54,6 @@ extern void * SAL_CALL MacSpellChecker_getFactory( extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { diff --git a/lingucomponent/source/spellcheck/spell/exports.dxp b/lingucomponent/source/spellcheck/spell/exports.dxp index a9861e3ff..700330789 100644 --- a/lingucomponent/source/spellcheck/spell/exports.dxp +++ b/lingucomponent/source/spellcheck/spell/exports.dxp @@ -1,2 +1 @@ component_getFactory -component_getImplementationEnvironment diff --git a/lingucomponent/source/spellcheck/spell/sreg.cxx b/lingucomponent/source/spellcheck/spell/sreg.cxx index 6c96975c0..6be89517e 100644 --- a/lingucomponent/source/spellcheck/spell/sreg.cxx +++ b/lingucomponent/source/spellcheck/spell/sreg.cxx @@ -52,12 +52,6 @@ extern void * SAL_CALL SpellChecker_getFactory( extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { diff --git a/lingucomponent/source/thesaurus/libnth/exports.dxp b/lingucomponent/source/thesaurus/libnth/exports.dxp index a9861e3ff..700330789 100644 --- a/lingucomponent/source/thesaurus/libnth/exports.dxp +++ b/lingucomponent/source/thesaurus/libnth/exports.dxp @@ -1,2 +1 @@ component_getFactory -component_getImplementationEnvironment diff --git a/lingucomponent/source/thesaurus/libnth/ntreg.cxx b/lingucomponent/source/thesaurus/libnth/ntreg.cxx index 8b82336e2..d9268405b 100644 --- a/lingucomponent/source/thesaurus/libnth/ntreg.cxx +++ b/lingucomponent/source/thesaurus/libnth/ntreg.cxx @@ -54,12 +54,6 @@ extern void * SAL_CALL Thesaurus_getFactory( extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { diff --git a/package/source/manifest/UnoRegister.cxx b/package/source/manifest/UnoRegister.cxx index d26deb81e..c5734977d 100644 --- a/package/source/manifest/UnoRegister.cxx +++ b/package/source/manifest/UnoRegister.cxx @@ -47,14 +47,6 @@ using namespace ::com::sun::star::packages::manifest; using rtl::OUString; -// C functions to implement this as a component - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - /** * This function is called to get service factories for an implementation. * @param pImplName name of implementation diff --git a/package/source/xstor/register.cxx b/package/source/xstor/register.cxx index 146bbbe77..480a11732 100644 --- a/package/source/xstor/register.cxx +++ b/package/source/xstor/register.cxx @@ -41,11 +41,6 @@ using namespace ::com::sun::star; extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { void * pRet = 0; diff --git a/package/source/xstor/xstor.dxp b/package/source/xstor/xstor.dxp index f0e1c6993..700330789 100644 --- a/package/source/xstor/xstor.dxp +++ b/package/source/xstor/xstor.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory diff --git a/package/util/exports.dxp b/package/util/exports.dxp index f0e1c6993..700330789 100644 --- a/package/util/exports.dxp +++ b/package/util/exports.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory diff --git a/xmlsecurity/source/component/registerservices.cxx b/xmlsecurity/source/component/registerservices.cxx index 164b02dce..eca071caf 100644 --- a/xmlsecurity/source/component/registerservices.cxx +++ b/xmlsecurity/source/component/registerservices.cxx @@ -42,11 +42,6 @@ using namespace ::com::sun::star; extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { void* pRet = 0; diff --git a/xmlsecurity/source/framework/xsec_framework.cxx b/xmlsecurity/source/framework/xsec_framework.cxx index e84d3c12d..897ac7213 100644 --- a/xmlsecurity/source/framework/xsec_framework.cxx +++ b/xmlsecurity/source/framework/xsec_framework.cxx @@ -52,13 +52,6 @@ using namespace ::com::sun::star::registry; extern "C" { -//================================================================================================== -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment **) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - //================================================================================================== SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) diff --git a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx index 066e073b7..d5b8c1af8 100644 --- a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx +++ b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx @@ -100,12 +100,6 @@ extern void* nss_component_getFactory( const sal_Char*, void*, void* ); extern void* mscrypt_component_getFactory( const sal_Char*, void*, void* ); #endif -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment **) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName , void* pServiceManager , void* pRegistryKey ) { void* pRet = 0; diff --git a/xmlsecurity/util/exports_xsmscrypt.dxp b/xmlsecurity/util/exports_xsmscrypt.dxp index f0e1c6993..700330789 100644 --- a/xmlsecurity/util/exports_xsmscrypt.dxp +++ b/xmlsecurity/util/exports_xsmscrypt.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory diff --git a/xmlsecurity/util/exports_xsnss.dxp b/xmlsecurity/util/exports_xsnss.dxp index f0e1c6993..700330789 100644 --- a/xmlsecurity/util/exports_xsnss.dxp +++ b/xmlsecurity/util/exports_xsnss.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory diff --git a/xmlsecurity/util/xsec_fw.dxp b/xmlsecurity/util/xsec_fw.dxp index f0e1c6993..700330789 100644 --- a/xmlsecurity/util/xsec_fw.dxp +++ b/xmlsecurity/util/xsec_fw.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory -- cgit v1.2.3 From 01980df6feefbceade7533d88b4fd934a3d403e7 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Thu, 14 Jul 2011 08:17:46 +0200 Subject: callcatcher: replace Clone() by NULL --- cui/source/dialogs/SpellDialog.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index e8b2dcbd5..85fb0c5cb 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1522,7 +1522,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) //text has been added on the right and only the 'error attribute has to be corrected if(pErrorAttrLeft) { - TextAttrib* pNewError = pErrorAttrLeft->GetAttr().Clone(); + TextAttrib* pNewError = NULL; sal_uInt16 nStart = pErrorAttrLeft->GetStart(); sal_uInt16 nEnd = pErrorAttrLeft->GetEnd(); pTextEngine->RemoveAttrib( 0, *pErrorAttrLeft ); @@ -1542,7 +1542,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) //determine the change sal_uInt16 nAddedChars = GetText().Len() - nCurrentLen; - TextAttrib* pNewError = pErrorAttr->GetAttr().Clone(); + TextAttrib* pNewError = NULL; sal_uInt16 nStart = pErrorAttr->GetStart(); sal_uInt16 nEnd = pErrorAttr->GetEnd(); pTextEngine->RemoveAttrib( 0, *pErrorAttr ); @@ -1558,7 +1558,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) if(pBackAttrLeft) { - TextAttrib* pNewBack = pBackAttrLeft->GetAttr().Clone(); + TextAttrib* pNewBack = NULL; sal_uInt16 _nStart = pBackAttrLeft->GetStart(); sal_uInt16 _nEnd = pBackAttrLeft->GetEnd(); pTextEngine->RemoveAttrib( 0, *pBackAttrLeft ); @@ -1585,7 +1585,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) m_nErrorEnd = pFontColor->GetEnd(); if(pErrorAttrib->GetStart() != m_nErrorStart || pErrorAttrib->GetEnd() != m_nErrorEnd) { - TextAttrib* pNewError = pErrorAttrib->GetAttr().Clone(); + TextAttrib* pNewError = NULL; pTextEngine->RemoveAttrib( 0, *pErrorAttr ); SetAttrib( *pNewError, 0, m_nErrorStart, m_nErrorEnd ); delete pNewError; @@ -1740,7 +1740,7 @@ void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageT // undo expanded attributes! if( pBackAttrib && pBackAttrib->GetStart() < m_nErrorStart && pBackAttrib->GetEnd() == m_nErrorEnd + nDiffLen) { - TextAttrib* pNewBackground = pBackAttrib->GetAttr().Clone(); + TextAttrib* pNewBackground = NULL; sal_uInt16 nStart = pBackAttrib->GetStart(); pTextEngine->RemoveAttrib(0, *pBackAttrib); pTextEngine->SetAttrib(*pNewBackground, 0, nStart, m_nErrorStart); -- cgit v1.2.3 From a684338f7c8eeca45469c90b38e042d78f0496b7 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 14 Jul 2011 12:24:10 +0300 Subject: No point building xml2cmp when cross-compiling --- setup_native/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_native/prj/build.lst b/setup_native/prj/build.lst index edd50fd90..2c18ccb0a 100644 --- a/setup_native/prj/build.lst +++ b/setup_native/prj/build.lst @@ -1,4 +1,4 @@ -pk setup_native : TRANSLATIONS:translations l10ntools soltools sal xml2cmp NULL +pk setup_native : TRANSLATIONS:translations l10ntools soltools sal NATIVE:xml2cmp NULL pk setup_native usr1 - all sn_mkout NULL pk setup_native\scripts\source nmake - u sn_source NULL pk setup_native\scripts nmake - u sn_scripts sn_source.u NULL -- cgit v1.2.3 From d46fecbebdbfdadaef8ae12f741e5780c78907e9 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 14 Jul 2011 14:23:22 +0100 Subject: Resolves: fdo#36534 rework SvxSimpleTable to not manage its own parent --- cui/source/dialogs/multipat.cxx | 3 ++- cui/source/inc/autocdlg.hxx | 8 ++++++-- cui/source/inc/multipat.hxx | 1 + cui/source/inc/radiobtnbox.hxx | 2 +- cui/source/options/fontsubs.cxx | 3 ++- cui/source/options/fontsubs.hxx | 7 +++++-- cui/source/options/optfltr.cxx | 3 ++- cui/source/options/optfltr.hxx | 7 +++++-- cui/source/options/optjava.cxx | 7 ++++--- cui/source/options/optjava.hxx | 1 + cui/source/options/radiobtnbox.cxx | 15 ++------------- cui/source/options/webconninfo.cxx | 8 ++++---- cui/source/options/webconninfo.hxx | 3 ++- cui/source/tabpages/autocdlg.cxx | 6 ++++-- xmlsecurity/inc/xmlsecurity/certificatechooser.hxx | 4 ++-- xmlsecurity/inc/xmlsecurity/certificateviewer.hxx | 3 ++- xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx | 3 ++- xmlsecurity/inc/xmlsecurity/macrosecurity.hxx | 3 ++- xmlsecurity/source/dialogs/certificatechooser.cxx | 3 ++- xmlsecurity/source/dialogs/certificateviewer.cxx | 3 ++- xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 5 +++-- xmlsecurity/source/dialogs/macrosecurity.cxx | 3 ++- 22 files changed, 58 insertions(+), 43 deletions(-) diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index d2cae86b2..025d6d31e 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -192,7 +192,8 @@ SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed aPathFL ( this, CUI_RES( FL_MULTIPATH) ), aPathLB ( this, CUI_RES( LB_MULTIPATH ) ), - aRadioLB ( this, CUI_RES( LB_RADIOBUTTON ) ), + m_aRadioLBContainer(this, CUI_RES(LB_RADIOBUTTON)), + aRadioLB(m_aRadioLBContainer), aRadioFT ( this, CUI_RES( FT_RADIOBUTTON ) ), aAddBtn ( this, CUI_RES( BTN_ADD_MULTIPATH ) ), aDelBtn ( this, CUI_RES( BTN_DEL_MULTIPATH ) ), diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx index 841eaa4fb..61c2802eb 100644 --- a/cui/source/inc/autocdlg.hxx +++ b/cui/source/inc/autocdlg.hxx @@ -83,8 +83,10 @@ class OfaACorrCheckListBox : public SvxSimpleTable virtual void KeyInput( const KeyEvent& rKEvt ); public: - OfaACorrCheckListBox(Window* pParent, const ResId& rResId ) : - SvxSimpleTable( pParent, rResId ){} + OfaACorrCheckListBox(SvxSimpleTableContainer& rParent, WinBits nBits = WB_BORDER) + : SvxSimpleTable(rParent, nBits) + { + } inline void *GetUserData(sal_uLong nPos) { return GetEntry(nPos)->GetUserData(); } inline void SetUserData(sal_uLong nPos, void *pData ) { GetEntry(nPos)->SetUserData(pData); } @@ -136,6 +138,7 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage { using TabPage::ActivatePage; + SvxSimpleTableContainer m_aCheckLBContainer; OfaACorrCheckListBox aCheckLB; PushButton aEditPB; FixedText aHeader1Expl; @@ -334,6 +337,7 @@ private: SvxCheckListBox aCheckLB; // Just for writer + SvxSimpleTableContainer m_aSwCheckLBContainer; OfaACorrCheckListBox aSwCheckLB; String sHeader1; String sHeader2; diff --git a/cui/source/inc/multipat.hxx b/cui/source/inc/multipat.hxx index 25f168e92..de7f19b4f 100644 --- a/cui/source/inc/multipat.hxx +++ b/cui/source/inc/multipat.hxx @@ -58,6 +58,7 @@ class SvxMultiPathDialog : public ModalDialog protected: FixedLine aPathFL; ListBox aPathLB; + SvxSimpleTableContainer m_aRadioLBContainer; svx::SvxRadioButtonListBox aRadioLB; FixedText aRadioFT; PushButton aAddBtn; diff --git a/cui/source/inc/radiobtnbox.hxx b/cui/source/inc/radiobtnbox.hxx index 50296e172..f4ca17b21 100644 --- a/cui/source/inc/radiobtnbox.hxx +++ b/cui/source/inc/radiobtnbox.hxx @@ -49,7 +49,7 @@ protected: virtual void KeyInput( const KeyEvent& rKEvt ); public: - SvxRadioButtonListBox( Window* _pParent, const ResId& _rId ); + SvxRadioButtonListBox(SvxSimpleTableContainer& rParent, WinBits nBits = WB_BORDER); ~SvxRadioButtonListBox(); void HandleEntryChecked( SvLBoxEntry* _pEntry ); diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index e8bb7af50..588982c34 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -57,7 +57,8 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent, aFont2FT (this, CUI_RES(FT_FONT2)), aFont2CB (this, CUI_RES(CB_FONT2)), aNewDelTBX (this, CUI_RES(TBX_SUBSTNEWDEL)), - aCheckLB (this, CUI_RES(CLB_SUBSTITUTES)), + m_aCheckLBContainer(this, CUI_RES(CLB_SUBSTITUTES)), + aCheckLB(m_aCheckLBContainer), aSourceViewFontsFL (this, CUI_RES(FL_SOURCEVIEW )), aFontNameFT (this, CUI_RES(FT_FONTNAME )), diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx index 0c60f4a14..50edd71e3 100644 --- a/cui/source/options/fontsubs.hxx +++ b/cui/source/options/fontsubs.hxx @@ -53,8 +53,10 @@ class SvxFontSubstCheckListBox : public SvxSimpleTable virtual void KeyInput( const KeyEvent& rKEvt ); public: - SvxFontSubstCheckListBox(Window* pParent, const ResId& rResId ) : - SvxSimpleTable( pParent, rResId ){} + SvxFontSubstCheckListBox(SvxSimpleTableContainer& rParent, WinBits nBits = WB_BORDER) + : SvxSimpleTable(rParent, nBits) + { + } inline void *GetUserData(sal_uLong nPos) { return GetEntry(nPos)->GetUserData(); } inline void SetUserData(sal_uLong nPos, void *pData ) { GetEntry(nPos)->SetUserData(pData); } @@ -78,6 +80,7 @@ class SvxFontSubstTabPage : public SfxTabPage FixedText aFont2FT; FontNameBox aFont2CB; ToolBox aNewDelTBX; + SvxSimpleTableContainer m_aCheckLBContainer; SvxFontSubstCheckListBox aCheckLB; FixedLine aSourceViewFontsFL; diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index 171684c53..c2c209453 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -147,7 +147,8 @@ void OfaMSFilterTabPage::Reset( const SfxItemSet& ) OfaMSFilterTabPage2::OfaMSFilterTabPage2( Window* pParent, const SfxItemSet& rSet ) : SfxTabPage( pParent, CUI_RES( RID_OFAPAGE_MSFILTEROPT2 ), rSet ), - aCheckLB ( this, CUI_RES( CLB_SETTINGS )), + m_aCheckLBContainer(this, CUI_RES( CLB_SETTINGS)), + aCheckLB(m_aCheckLBContainer), aHeader1FT ( this, CUI_RES( FT_HEADER1_EXPLANATION )), aHeader2FT ( this, CUI_RES( FT_HEADER2_EXPLANATION )), sHeader1 ( CUI_RES( ST_HEADER1 )), diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx index b6e924b3d..4371fd69e 100644 --- a/cui/source/options/optfltr.hxx +++ b/cui/source/options/optfltr.hxx @@ -81,10 +81,13 @@ class OfaMSFilterTabPage2 : public SfxTabPage virtual void KeyInput( const KeyEvent& rKEvt ); public: - MSFltrSimpleTable(Window* pParent, const ResId& rResId ) : - SvxSimpleTable( pParent, rResId ){} + MSFltrSimpleTable(SvxSimpleTableContainer& rParent, WinBits nBits = WB_BORDER) + : SvxSimpleTable(rParent, nBits) + { + } }; + SvxSimpleTableContainer m_aCheckLBContainer; MSFltrSimpleTable aCheckLB; FixedText aHeader1FT, aHeader2FT; String sHeader1, sHeader2; diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index e15fe5e19..f3b31216e 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -99,7 +99,8 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( Window* pParent, const SfxItemSet& rSet m_aJavaLine ( this, CUI_RES( FL_JAVA ) ), m_aJavaEnableCB ( this, CUI_RES( CB_JAVA_ENABLE ) ), m_aJavaFoundLabel ( this, CUI_RES( FT_JAVA_FOUND ) ), - m_aJavaList ( this, CUI_RES( LB_JAVA ) ), + m_aJavaListContainer(this, CUI_RES(LB_JAVA)), + m_aJavaList(m_aJavaListContainer), m_aJavaPathText ( this, CUI_RES( FT_JAVA_PATH ) ), m_aAddBtn ( this, CUI_RES( PB_ADD ) ), m_aParameterBtn ( this, CUI_RES( PB_PARAMETER ) ), @@ -169,9 +170,9 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( Window* pParent, const SfxItemSet& rSet aPos = m_aParameterBtn.GetPosPixel(); aPos.X() -= nDiff; m_aParameterBtn.SetPosSizePixel(aPos, aButtonSize); - Size aSize = m_aJavaList.GetSizePixel(); + Size aSize = m_aJavaListContainer.GetSizePixel(); aSize.Width() -= nDiff; - m_aJavaList.SetSizePixel(aSize); + m_aJavaListContainer.SetSizePixel(aSize); } } diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx index 598b4739d..697d198da 100644 --- a/cui/source/options/optjava.hxx +++ b/cui/source/options/optjava.hxx @@ -56,6 +56,7 @@ private: FixedLine m_aJavaLine; CheckBox m_aJavaEnableCB; FixedText m_aJavaFoundLabel; + SvxSimpleTableContainer m_aJavaListContainer; svx::SvxRadioButtonListBox m_aJavaList; FixedText m_aJavaPathText; PushButton m_aAddBtn; diff --git a/cui/source/options/radiobtnbox.cxx b/cui/source/options/radiobtnbox.cxx index 06c035286..ca30c33ea 100644 --- a/cui/source/options/radiobtnbox.cxx +++ b/cui/source/options/radiobtnbox.cxx @@ -35,9 +35,8 @@ namespace svx { // class SvxRadioButtonListBox ---------------------------------------------------- -SvxRadioButtonListBox::SvxRadioButtonListBox( Window* _pParent, const ResId& _rId ) : - - SvxSimpleTable( _pParent, _rId ) +SvxRadioButtonListBox::SvxRadioButtonListBox(SvxSimpleTableContainer& rParent, WinBits nBits) + : SvxSimpleTable(rParent, nBits) { EnableCheckButton( new SvLBoxButtonData( this, true ) ); @@ -50,16 +49,6 @@ SvxRadioButtonListBox::~SvxRadioButtonListBox() void SvxRadioButtonListBox::SetTabs() { SvxSimpleTable::SetTabs(); -/* - sal_uInt16 nAdjust = SV_LBOXTAB_ADJUST_RIGHT | SV_LBOXTAB_ADJUST_LEFT | - SV_LBOXTAB_ADJUST_CENTER | SV_LBOXTAB_ADJUST_NUMERIC | SV_LBOXTAB_FORCE; - if ( aTabs.Count() > 0 ) - { - SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(0); - pTab->nFlags &= ~nAdjust; - pTab->nFlags |= SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER | SV_LBOXTAB_FORCE; - } -*/ } void SvxRadioButtonListBox::MouseButtonUp( const MouseEvent& _rMEvt ) diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx index 9f65bf463..3a5a90c8e 100644 --- a/cui/source/options/webconninfo.cxx +++ b/cui/source/options/webconninfo.cxx @@ -48,10 +48,9 @@ namespace svx // class PasswordTable --------------------------------------------------- -PasswordTable::PasswordTable( Window* pParent, const ResId& rResId ) : - SvxSimpleTable( pParent, rResId ) +PasswordTable::PasswordTable(SvxSimpleTableContainer& rParent, WinBits nBits) + : SvxSimpleTable(rParent, nBits | WB_NOINITIALSELECTION) { - SetStyle( GetStyle() | WB_NOINITIALSELECTION ); } void PasswordTable::InsertHeaderItem( sal_uInt16 nColumn, const String& rText, HeaderBarItemBits nBits ) @@ -97,7 +96,8 @@ void PasswordTable::Resort( bool bForced ) WebConnectionInfoDialog::WebConnectionInfoDialog( Window* pParent ) : ModalDialog( pParent, CUI_RES( RID_SVXDLG_WEBCONNECTION_INFO ) ) ,m_aNeverShownFI ( this, CUI_RES( FI_NEVERSHOWN ) ) - ,m_aPasswordsLB ( this, CUI_RES( LB_PASSWORDS ) ) + ,m_aPasswordsLBContainer(this, CUI_RES( LB_PASSWORDS)) + ,m_aPasswordsLB(m_aPasswordsLBContainer) ,m_aRemoveBtn ( this, CUI_RES( PB_REMOVE ) ) ,m_aRemoveAllBtn ( this, CUI_RES( PB_REMOVEALL ) ) ,m_aChangeBtn ( this, CUI_RES( PB_CHANGE ) ) diff --git a/cui/source/options/webconninfo.hxx b/cui/source/options/webconninfo.hxx index 49778839f..bd8e04aee 100644 --- a/cui/source/options/webconninfo.hxx +++ b/cui/source/options/webconninfo.hxx @@ -42,7 +42,7 @@ namespace svx class PasswordTable : public SvxSimpleTable { public: - PasswordTable( Window* pParent, const ResId& rResId ); + PasswordTable(SvxSimpleTableContainer& rParent, WinBits nBits = WB_BORDER); void InsertHeaderItem( sal_uInt16 nColumn, const String& rText, HeaderBarItemBits nBits ); void ResetTabs(); @@ -56,6 +56,7 @@ namespace svx { private: FixedInfo m_aNeverShownFI; + SvxSimpleTableContainer m_aPasswordsLBContainer; PasswordTable m_aPasswordsLB; PushButton m_aRemoveBtn; PushButton m_aRemoveAllBtn; diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 6eefeae62..3383a0b27 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -428,7 +428,8 @@ enum OfaAutoFmtOptions OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage( Window* pParent, const SfxItemSet& rSet ) : SfxTabPage(pParent, CUI_RES(RID_OFAPAGE_AUTOFMT_APPLY), rSet), - aCheckLB (this, CUI_RES(CLB_SETTINGS)), + m_aCheckLBContainer(this, CUI_RES(CLB_SETTINGS)), + aCheckLB(m_aCheckLBContainer), aEditPB (this, CUI_RES(PB_EDIT)), aHeader1Expl (this, CUI_RES(FT_HEADER1_EXPLANATION)), aHeader2Expl (this, CUI_RES(FT_HEADER2_EXPLANATION)), @@ -1897,7 +1898,8 @@ SvLBoxEntry* OfaQuoteTabPage::CreateEntry(String& rTxt, sal_uInt16 nCol) OfaQuoteTabPage::OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ) : SfxTabPage(pParent, CUI_RES( RID_OFAPAGE_AUTOCORR_QUOTE ), rSet), aCheckLB (this, CUI_RES(CLB_SETTINGS )), - aSwCheckLB (this, CUI_RES(CLB_SETTINGS )), + m_aSwCheckLBContainer(this, CUI_RES(CLB_SETTINGS)), + aSwCheckLB(m_aSwCheckLBContainer), sHeader1 (CUI_RES( STR_HEADER1 )), sHeader2 (CUI_RES( STR_HEADER2 )), sNonBrkSpace (CUI_RES( ST_NON_BREAK_SPACE )), diff --git a/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx b/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx index 15fb06a7a..78cb2b49d 100644 --- a/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx +++ b/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx @@ -61,7 +61,8 @@ private: SignatureInformations maCertsToIgnore; FixedText maHintFT; - SvxSimpleTable maCertLB; // #i48648 now SvHeaderTabListBox + SvxSimpleTableContainer m_aCertLBContainer; + SvxSimpleTable maCertLB; PushButton maViewBtn; @@ -73,7 +74,6 @@ private: sal_Bool mbInitialized; sal_uInt16 GetSelectedEntryPos( void ) const; -// DECL_LINK( Initialize, void* ); DECL_LINK( ViewButtonHdl, Button* ); DECL_LINK( CertificateHighlightHdl, void* ); DECL_LINK( CertificateSelectHdl, void* ); diff --git a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx index 16d37a2d6..acfe7747d 100644 --- a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx +++ b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx @@ -114,7 +114,8 @@ public: class CertificateViewerDetailsTP : public CertificateViewerTP { private: - SvxSimpleTable maElementsLB; // #i48648 now SvHeaderTabListBox + SvxSimpleTableContainer m_aElementsLBContainer; + SvxSimpleTable maElementsLB; MultiLineEdit maElementML; Font maStdFont; Font maFixedWidthFont; diff --git a/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx b/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx index e4b65d62b..4f631ea2e 100644 --- a/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx +++ b/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx @@ -80,7 +80,8 @@ private: FixedText maHintDocFT; FixedText maHintBasicFT; FixedText maHintPackageFT; - SvxSimpleTable maSignaturesLB; // #i48648 now SvHeaderTabListBox + SvxSimpleTableContainer maSignaturesLBContainer; + SvxSimpleTable maSignaturesLB; FixedImage maSigsValidImg; FixedInfo maSigsValidFI; FixedImage maSigsInvalidImg; diff --git a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx index d54b02309..1af2f79ab 100644 --- a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx +++ b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx @@ -138,7 +138,8 @@ class MacroSecurityTrustedSourcesTP : public MacroSecurityTP private: FixedLine maTrustCertFL; ReadOnlyImage maTrustCertROFI; - SvxSimpleTable maTrustCertLB; // #i48648 now SvHeaderTabListBox + SvxSimpleTableContainer m_aTrustCertLBContainer; + SvxSimpleTable maTrustCertLB; PushButton maAddCertPB; PushButton maViewCertPB; PushButton maRemoveCertPB; diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index 2e21297d7..ec9cba589 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -68,7 +68,8 @@ CertificateChooser::CertificateChooser( Window* _pParent, uno::Reference< uno::X :ModalDialog ( _pParent, XMLSEC_RES( RID_XMLSECDLG_CERTCHOOSER ) ) ,maCertsToIgnore( _rCertsToIgnore ) ,maHintFT ( this, XMLSEC_RES( FT_HINT_SELECT ) ) - ,maCertLB ( this, XMLSEC_RES( LB_SIGNATURES ) ) + ,m_aCertLBContainer(this, XMLSEC_RES(LB_SIGNATURES)) + ,maCertLB(m_aCertLBContainer) ,maViewBtn ( this, XMLSEC_RES( BTN_VIEWCERT ) ) ,maBottomSepFL ( this, XMLSEC_RES( FL_BOTTOM_SEP ) ) ,maOKBtn ( this, XMLSEC_RES( BTN_OK ) ) diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index 3bc33bcdd..34c84fb0e 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -255,7 +255,8 @@ void CertificateViewerDetailsTP::InsertElement( const String& _rField, const Str CertificateViewerDetailsTP::CertificateViewerDetailsTP( Window* _pParent, CertificateViewer* _pDlg ) :CertificateViewerTP ( _pParent, XMLSEC_RES( RID_XMLSECTP_DETAILS ), _pDlg ) - ,maElementsLB ( this, XMLSEC_RES( LB_ELEMENTS ) ) + ,m_aElementsLBContainer(this, XMLSEC_RES(LB_ELEMENTS)) + ,maElementsLB(m_aElementsLBContainer) ,maElementML ( this, XMLSEC_RES( ML_ELEMENT ) ) ,maStdFont ( maElementML.GetControlFont() ) ,maFixedWidthFont ( OutputDevice::GetDefaultFont( DEFAULTFONT_UI_FIXED, LANGUAGE_DONTKNOW, DEFAULTFONT_FLAGS_ONLYONE, this ) ) diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index b17f8021f..34a71d47f 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -191,7 +191,8 @@ DigitalSignaturesDialog::DigitalSignaturesDialog( ,maHintDocFT ( this, XMLSEC_RES( FT_HINT_DOC ) ) ,maHintBasicFT ( this, XMLSEC_RES( FT_HINT_BASIC ) ) ,maHintPackageFT ( this, XMLSEC_RES( FT_HINT_PACK ) ) - ,maSignaturesLB ( this, XMLSEC_RES( LB_SIGNATURES ) ) + ,maSignaturesLBContainer(this, XMLSEC_RES(LB_SIGNATURES)) + ,maSignaturesLB(maSignaturesLBContainer) ,maSigsValidImg ( this, XMLSEC_RES( IMG_STATE_VALID ) ) ,maSigsValidFI ( this, XMLSEC_RES( FI_STATE_VALID ) ) ,maSigsInvalidImg ( this, XMLSEC_RES( IMG_STATE_BROKEN ) ) @@ -209,7 +210,7 @@ DigitalSignaturesDialog::DigitalSignaturesDialog( ,m_bHasDocumentSignature(bHasDocumentSignature) ,m_bWarningShowSignMacro(false) { - // --> PB #i48253 the tablistbox needs its own unique id + // #i48253# the tablistbox needs its own unique id maSignaturesLB.Window::SetUniqueId( HID_XMLSEC_TREE_SIGNATURESDLG ); Size aControlSize( maSignaturesLB.GetSizePixel() ); aControlSize = maSignaturesLB.PixelToLogic( aControlSize, MapMode( MAP_APPFONT ) ); diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx index a05b0a9c8..fc301230d 100644 --- a/xmlsecurity/source/dialogs/macrosecurity.cxx +++ b/xmlsecurity/source/dialogs/macrosecurity.cxx @@ -337,7 +337,8 @@ MacroSecurityTrustedSourcesTP::MacroSecurityTrustedSourcesTP( Window* _pParent, :MacroSecurityTP ( _pParent, XMLSEC_RES( RID_XMLSECTP_TRUSTSOURCES ), _pDlg ) ,maTrustCertFL ( this, XMLSEC_RES( FL_TRUSTCERT ) ) ,maTrustCertROFI ( this, XMLSEC_RES( FI_TRUSTCERT_RO ) ) - ,maTrustCertLB ( this, XMLSEC_RES( LB_TRUSTCERT ) ) + ,m_aTrustCertLBContainer(this, XMLSEC_RES(LB_TRUSTCERT)) + ,maTrustCertLB(m_aTrustCertLBContainer) ,maAddCertPB ( this, XMLSEC_RES( PB_ADD_TRUSTCERT ) ) ,maViewCertPB ( this, XMLSEC_RES( PB_VIEW_TRUSTCERT ) ) ,maRemoveCertPB ( this, XMLSEC_RES( PB_REMOVE_TRUSTCERT ) ) -- cgit v1.2.3 From 2c266efe9d82ebb46370b5a72d55f6c2d61c1763 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Sat, 16 Jul 2011 18:56:46 +0200 Subject: clean up --- wizards/com/sun/star/wizards/common/FileAccess.py | 6 +- wizards/com/sun/star/wizards/common/Helper.py | 2 +- .../sun/star/wizards/document/OfficeDocument.py | 16 -- .../com/sun/star/wizards/fax/FaxWizardDialog.py | 42 ++-- .../star/wizards/fax/FaxWizardDialogResources.py | 1 - .../sun/star/wizards/letter/LetterWizardDialog.py | 267 +++++++++------------ .../wizards/letter/LetterWizardDialogResources.py | 1 - wizards/com/sun/star/wizards/text/TextDocument.py | 2 +- .../com/sun/star/wizards/text/TextFieldHandler.py | 38 +-- wizards/com/sun/star/wizards/ui/UnoDialog.py | 226 +---------------- wizards/com/sun/star/wizards/ui/UnoDialog2.py | 61 ++--- wizards/com/sun/star/wizards/ui/WizardDialog.py | 24 +- 12 files changed, 186 insertions(+), 500 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 3397d7138..5f92d8aa3 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -715,10 +715,10 @@ class FileAccess(object): def connectURLs(self, urlFolder, urlFilename): stringFolder = "" stringFileName = urlFilename - if not urlFolder.endsWith("/"): + if not urlFolder.endswith("/"): stringFolder = "/" - if urlFilename.startsWith("/"): - stringFileName = urlFilename.substring(1) + if urlFilename.startswith("/"): + stringFileName = urlFilename[1:] return urlFolder + stringFolder + stringFileName @classmethod diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py index 45923cfe8..eaa615ded 100644 --- a/wizards/com/sun/star/wizards/common/Helper.py +++ b/wizards/com/sun/star/wizards/common/Helper.py @@ -157,7 +157,7 @@ class Helper(object): class DateUtils(object): def __init__(self, xmsf, document): - defaults = document.createInstance("com.sun.star.text.Defaults") + defaults = xmsf.createInstance("com.sun.star.text.Defaults") l = Helper.getUnoStructValue(defaults, "CharLocale") self.formatSupplier = document formatSettings = self.formatSupplier.getNumberFormatSettings() diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py index f2fc2cb76..78315129c 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.py +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py @@ -270,24 +270,8 @@ class OfficeDocument(object): def getSlideCount(self, model): return model.getDrawPages().getCount() - def getDocumentProperties(self, document): - return document.getDocumentProperties() - def showMessageBox( self, xMSF, windowServiceName, windowAttribute, MessageText): return SystemDialog.showMessageBox( xMSF, windowServiceName, windowAttribute, MessageText) - - def getWindowPeer(self): - return self.xWindowPeer - - ''' - @param windowPeer The xWindowPeer to set. - Should be called as soon as a Windowpeer of a wizard dialog is available - The windowpeer is needed to call a Messagebox - ''' - - def setWindowPeer(self, windowPeer): - self.xWindowPeer = windowPeer - diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py index e040f247b..e4295a0d0 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py @@ -86,7 +86,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (True, 12, LSTPRIVATESTYLE_HID, 180, 95, 1, 4, 74), self) - self.lblBusinessStyle = self.insertLabel("lblBusinessStyle", + self.insertLabel("lblBusinessStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -97,7 +97,7 @@ class FaxWizardDialog(WizardDialog): (8, self.resources.reslblBusinessStyle_value, 110, 42, 1, 32, 60)) - self.lblTitle1 = self.insertLabel("lblTitle1", + self.insertLabel("lblTitle1", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -108,7 +108,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle1_value, True, 91, 8, 1, 37, 212)) - self.lblPrivateStyle = self.insertLabel("lblPrivateStyle", + self.insertLabel("lblPrivateStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -117,7 +117,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPrivateStyle_value, 110, 95, 1, 50, 60)) - self.lblIntroduction = self.insertLabel("lblIntroduction", + self.insertLabel("lblIntroduction", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -264,7 +264,7 @@ class FaxWizardDialog(WizardDialog): (8, CHKUSEFOOTER_HID, self.resources.reschkUseFooter_value, 97, 163, 0, 2, 14, 212), self) - self.lblTitle3 = self.insertLabel("lblTitle3", + self.insertLabel("lblTitle3", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -397,7 +397,7 @@ class FaxWizardDialog(WizardDialog): (8, OPTRECEIVERDATABASE_HID, self.resources.resoptReceiverDatabase_value, 104, 160, 3, 24, 200), self) - self.lblSenderAddress = self.insertLabel("lblSenderAddress", + self.insertLabel("lblSenderAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -406,14 +406,14 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderAddress_value, 97, 28, 3, 46, 136)) - self.FixedLine2 = self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, + self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (5, 90, 126, 3, 51, 212)) - self.lblSenderName = self.insertLabel("lblSenderName", + self.insertLabel("lblSenderName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -423,7 +423,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderName_value, 113, 69, 3, 52, 68)) - self.lblSenderStreet = self.insertLabel("lblSenderStreet", + self.insertLabel("lblSenderStreet", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -433,7 +433,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderStreet_value, 113, 82, 3, 53, 68)) - self.lblPostCodeCity = self.insertLabel("lblPostCodeCity", + self.insertLabel("lblPostCodeCity", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -443,7 +443,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPostCodeCity_value, 113, 97, 3, 54, 68)) - self.lblTitle4 = self.insertLabel("lblTitle4", + self.insertLabel("lblTitle4", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -455,7 +455,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle4_value, True, 91, 8, 3, 60, 212)) - self.Label1 = self.insertLabel("lblSenderFax", + self.insertLabel("lblSenderFax", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -464,7 +464,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.resLabel1_value, 113, 111, 3, 68, 68)) - self.Label2 = self.insertLabel("Label2", + self.insertLabel("Label2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -514,7 +514,7 @@ class FaxWizardDialog(WizardDialog): (8, CHKFOOTERPAGENUMBERS_HID, self.resources.reschkFooterPageNumbers_value, 97, 106, 0, 4, 27, 201), self) - self.lblFooter = self.insertLabel("lblFooter", + self.insertLabel("lblFooter", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -525,7 +525,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor4, 8, self.resources.reslblFooter_value, 97, 28, 4, 33, 116)) - self.lblTitle5 = self.insertLabel("lblTitle5", + self.insertLabel("lblTitle5", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -576,7 +576,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, OPTMAKECHANGES_HID, self.resources.resoptMakeChanges_value, 104, 123, 5, 31, 198), self) - self.lblFinalExplanation1 = self.insertLabel("lblFinalExplanation1", + self.insertLabel("lblFinalExplanation1", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -587,7 +587,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (28, self.resources.reslblFinalExplanation1_value, True, 97, 28, 5, 34, 205)) - self.lblProceed = self.insertLabel("lblProceed", + self.insertLabel("lblProceed", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -597,7 +597,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblProceed_value, 97, 100, 5, 35, 204)) - self.lblFinalExplanation2 = self.insertLabel("lblFinalExplanation2", + self.insertLabel("lblFinalExplanation2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -608,7 +608,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (33, self.resources.reslblFinalExplanation2_value, True, 104, 145, 5, 36, 199)) - self.ImageControl2 = self.insertImage("ImageControl2", + self.insertImage("ImageControl2", ("Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, @@ -620,7 +620,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (0, 10, UIConsts.INFOIMAGEURL, 92, 145, False, 5, 47, 10)) - self.lblTemplateName = self.insertLabel("lblTemplateName", + self.insertLabel("lblTemplateName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -631,7 +631,7 @@ class FaxWizardDialog(WizardDialog): (8, self.resources.reslblTemplateName_value, 97, 58, 5, 57, 101)) - self.lblTitle6 = self.insertLabel("lblTitle6", + self.insertLabel("lblTitle6", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py index 864112fed..bbf6921d3 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py @@ -1,7 +1,6 @@ from common.Resource import Resource class FaxWizardDialogResources(Resource): - UNIT_NAME = "dbwizres" MODULE_NAME = "dbw" RID_FAXWIZARDDIALOG_START = 3200 RID_FAXWIZARDCOMMUNICATION_START = 3270 diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py index 35158a3ea..8f740cdf1 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py @@ -12,18 +12,18 @@ class LetterWizardDialog(WizardDialog): self.resources = LetterWizardDialogResources(xmsf) Helper.setUnoPropertyValues( self.xDialogModel, - ("Closeable", + ("Closeable", PropertyNames.PROPERTY_HEIGHT, - "Moveable", - PropertyNames.PROPERTY_NAME, - PropertyNames.PROPERTY_POSITION_X, - PropertyNames.PROPERTY_POSITION_Y, - PropertyNames.PROPERTY_STEP, - PropertyNames.PROPERTY_TABINDEX, - "Title", - PropertyNames.PROPERTY_WIDTH), + "Moveable", + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Title", + PropertyNames.PROPERTY_WIDTH), (True, 210, True, - "LetterWizardDialog", 104, 52, 1, 1, + "LetterWizardDialog", 104, 52, 1, 1, self.resources.resLetterWizardDialog_title, 310)) self.fontDescriptor1 = \ uno.createUnoStruct('com.sun.star.awt.FontDescriptor') @@ -41,7 +41,7 @@ class LetterWizardDialog(WizardDialog): def buildStep1(self): self.optBusinessLetter = self.insertRadioButton( - "optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED, + "optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -51,11 +51,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, HelpIds.getHelpIdString(HID + 1), + (8, HelpIds.getHelpIdString(HID + 1), self.resources.resoptBusinessLetter_value, "optBusinessLetter", 97, 28, 1, 1, 184), self) self.optPrivOfficialLetter = self.insertRadioButton( - "optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED, + "optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -65,11 +65,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, HelpIds.getHelpIdString(HID + 2), - self.resources.resoptPrivOfficialLetter_value, + (8, HelpIds.getHelpIdString(HID + 2), + self.resources.resoptPrivOfficialLetter_value, "optPrivOfficialLetter", 97, 74, 1, 2, 184), self) self.optPrivateLetter = self.insertRadioButton( - "optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED, + "optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -79,11 +79,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, HelpIds.getHelpIdString(HID + 3), - self.resources.resoptPrivateLetter_value, + (8, HelpIds.getHelpIdString(HID + 3), + self.resources.resoptPrivateLetter_value, "optPrivateLetter", 97, 106, 1, 3, 184), self) self.lstBusinessStyle = self.insertListBox( - "lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, + "lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, @@ -98,7 +98,7 @@ class LetterWizardDialog(WizardDialog): "lstBusinessStyle", 180, 40, 1, 4, 74), self) self.chkBusinessPaper = self.insertCheckBox( - "chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED, + "chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -109,11 +109,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, HelpIds.getHelpIdString(HID + 5), - self.resources.reschkBusinessPaper_value, + (8, HelpIds.getHelpIdString(HID + 5), + self.resources.reschkBusinessPaper_value, "chkBusinessPaper", 110, 56, 0, 1, 5, 168), self) self.lstPrivOfficialStyle = self.insertListBox( - "lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, + "lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, LSTPRIVOFFICIALSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, @@ -124,7 +124,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (True, 12, HelpIds.getHelpIdString(HID + 6), + (True, 12, HelpIds.getHelpIdString(HID + 6), "lstPrivOfficialStyle", 180, 86, 1, 6, 74), self) self.lstPrivateStyle = self.insertListBox( "lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, @@ -138,10 +138,9 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (True, 12, HelpIds.getHelpIdString(HID + 7), + (True, 12, HelpIds.getHelpIdString(HID + 7), "lstPrivateStyle", 180, 118, 1, 7, 74), self) - self.lblBusinessStyle = self.insertLabel( - "lblBusinessStyle", + self.insertLabel("lblBusinessStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -150,10 +149,9 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, self.resources.reslblBusinessStyle_value, + (8, self.resources.reslblBusinessStyle_value, "lblBusinessStyle", 110, 42, 1, 48, 60)) - self.lblPrivOfficialStyle = self.insertLabel( - "lblPrivOfficialStyle", + self.insertLabel("lblPrivOfficialStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -164,11 +162,10 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPrivOfficialStyle_value, "lblPrivOfficialStyle", 110, 88, 1, 49, 60)) - self.lblTitle1 = self.insertLabel( - "lblTitle1", + self.insertLabel("lblTitle1", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, - PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, @@ -176,11 +173,10 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (self.fontDescriptor6, 16, - self.resources.reslblTitle1_value, True, + (self.fontDescriptor6, 16, + self.resources.reslblTitle1_value, True, "lblTitle1", 91, 8, 1, 55, 212)) - self.lblPrivateStyle = self.insertLabel( - "lblPrivateStyle", + self.insertLabel("lblPrivateStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -191,8 +187,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPrivateStyle_value, "lblPrivateStyle", 110, 120, 1, 74, 60)) - self.lblIntroduction = self.insertLabel( - "lblIntroduction", + self.insertLabel("lblIntroduction", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -202,7 +197,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (39, self.resources.reslblIntroduction_value, + (39, self.resources.reslblIntroduction_value, True, "lblIntroduction", 104, 145, 1, 80, 199)) self.ImageControl3 = self.insertInfoImage(92, 145, 1) @@ -210,7 +205,7 @@ class LetterWizardDialog(WizardDialog): def buildStep2(self): self.chkPaperCompanyLogo = self.insertCheckBox( "chkPaperCompanyLogo", - CHKPAPERCOMPANYLOGO_ITEM_CHANGED, + CHKPAPERCOMPANYLOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -222,11 +217,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 8), - self.resources.reschkPaperCompanyLogo_value, + self.resources.reschkPaperCompanyLogo_value, "chkPaperCompanyLogo", 97, 28, 0, 2, 8, 68), self) self.numLogoHeight = self.insertNumericField( "numLogoHeight", - NUMLOGOHEIGHT_TEXT_CHANGED, + NUMLOGOHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -241,7 +236,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 9), "numLogoHeight", 138, 40, True, 2, True, 9, 3, 30), self) self.numLogoX = self.insertNumericField( - "numLogoX", NUMLOGOX_TEXT_CHANGED, + "numLogoX", NUMLOGOX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -255,7 +250,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 10), "numLogoX", 266, 40, True, 2, 10, 0, 30), self) self.numLogoWidth = self.insertNumericField( - "numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED, + "numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -269,7 +264,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 11), "numLogoWidth", 138, 56, True, 2, 11, 3.8, 30), self) self.numLogoY = self.insertNumericField( - "numLogoY", NUMLOGOY_TEXT_CHANGED, + "numLogoY", NUMLOGOY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -280,10 +275,10 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), - (12, HelpIds.getHelpIdString(HID + 12), + (12, HelpIds.getHelpIdString(HID + 12), "numLogoY", 266, 56, True, 2, 12, -3.4, 30), self) self.chkPaperCompanyAddress = self.insertCheckBox( - "chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED, + "chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -298,7 +293,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkPaperCompanyAddress_value, "chkPaperCompanyAddress", 98, 84, 0, 2, 13, 68), self) self.numAddressHeight = self.insertNumericField( - "numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED, + "numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -313,7 +308,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 14), "numAddressHeight", 138, 96, True, 2, True, 14, 3, 30), self) self.numAddressX = self.insertNumericField( - "numAddressX", NUMADDRESSX_TEXT_CHANGED, + "numAddressX", NUMADDRESSX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -327,7 +322,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 15), "numAddressX", 266, 96, True, 2, 15, 3.8, 30), self) self.numAddressWidth = self.insertNumericField( - "numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED, + "numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -341,7 +336,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 16), "numAddressWidth", 138, 112, True, 2, 16, 13.8, 30), self) self.numAddressY = self.insertNumericField( - "numAddressY", NUMADDRESSY_TEXT_CHANGED, + "numAddressY", NUMADDRESSY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -355,7 +350,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 17), "numAddressY", 266, 112, True, 2, 17, -3.4, 30), self) self.chkCompanyReceiver = self.insertCheckBox( - "chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED, + "chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -369,7 +364,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkCompanyReceiver_value, "chkCompanyReceiver", 103, 131, 0, 2, 18, 185), self) self.chkPaperFooter = self.insertCheckBox( - "chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED, + "chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -380,11 +375,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, HelpIds.getHelpIdString(HID + 19), + (8, HelpIds.getHelpIdString(HID + 19), self.resources.reschkPaperFooter_value, "chkPaperFooter", 97, 158, 0, 2, 19, 68), self) self.numFooterHeight = self.insertNumericField( - "numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED, + "numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -397,8 +392,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 20), "numFooterHeight", 236, 156, True, 2, 20, 5, 30), self) - self.lblLogoHeight = self.insertLabel( - "lblLogoHeight", + self.insertLabel("lblLogoHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -409,8 +403,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoHeight_value, "lblLogoHeight", 103, 42, 2, 68, 32)) - self.lblLogoWidth = self.insertLabel( - "lblLogoWidth", + self.insertLabel("lblLogoWidth", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -421,8 +414,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoWidth_value, "lblLogoWidth", 103, 58, 2, 69, 32)) - self.FixedLine5 = self.insertFixedLine( - "FixedLine5", + self.insertFixedLine( + "FixedLine5", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, @@ -432,8 +425,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (2, "FixedLine5", 90, 78, 2, 70, 215)) - self.FixedLine6 = self.insertFixedLine( - "FixedLine6", + self.insertFixedLine( + "FixedLine6", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, @@ -443,8 +436,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (2, "FixedLine6", 90, 150, 2, 71, 215)) - self.lblFooterHeight = self.insertLabel( - "lblFooterHeight", + self.insertLabel("lblFooterHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -455,8 +447,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblFooterHeight_value, "lblFooterHeight", 200, 158, 2, 72, 32)) - self.lblLogoX = self.insertLabel( - "lblLogoX", + self.insertLabel("lblLogoX", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -467,8 +458,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoX_value, "lblLogoX", 170, 42, 2, 84, 94)) - self.lblLogoY = self.insertLabel( - "lblLogoY", + self.insertLabel("lblLogoY", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -479,8 +469,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoY_value, "lblLogoY", 170, 58, 2, 85, 94)) - self.lblAddressHeight = self.insertLabel( - "lblAddressHeight", + self.insertLabel("lblAddressHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -491,8 +480,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressHeight_value, "lblAddressHeight", 103, 98, 2, 86, 32)) - self.lblAddressWidth = self.insertLabel( - "lblAddressWidth", + self.insertLabel("lblAddressWidth", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -503,8 +491,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressWidth_value, "lblAddressWidth", 103, 114, 2, 87, 32)) - self.lblAddressX = self.insertLabel( - "lblAddressX", + self.insertLabel("lblAddressX", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -515,8 +502,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressX_value, "lblAddressX", 170, 98, 2, 88, 94)) - self.lblAddressY = self.insertLabel( - "lblAddressY", + self.insertLabel("lblAddressY", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -527,9 +513,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressY_value, "lblAddressY", 170, 114, 2, 89, 94)) - self.lblTitle2 = self.insertLabel( - "lblTitle2", - ("FontDescriptor", + self.insertLabel("lblTitle2", + ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -545,8 +530,8 @@ class LetterWizardDialog(WizardDialog): def buildStep3(self): self.lstLetterNorm = self.insertListBox( - "lstLetterNorm", - LSTLETTERNORM_ACTION_PERFORMED, + "lstLetterNorm", + LSTLETTERNORM_ACTION_PERFORMED, LSTLETTERNORM_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, @@ -560,13 +545,13 @@ class LetterWizardDialog(WizardDialog): (True, 12, HelpIds.getHelpIdString(HID + 21), "lstLetterNorm", 210, 34, 3, 21, 74), self) self.chkUseLogo = self.insertCheckBox( - "chkUseLogo", CHKUSELOGO_ITEM_CHANGED, + "chkUseLogo", CHKUSELOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, - PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, @@ -575,14 +560,14 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseLogo_value, "chkUseLogo", 97, 54, 0, 3, 22, 212), self) self.chkUseAddressReceiver = self.insertCheckBox( - "chkUseAddressReceiver", - CHKUSEADDRESSRECEIVER_ITEM_CHANGED, + "chkUseAddressReceiver", + CHKUSEADDRESSRECEIVER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, - PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, @@ -591,7 +576,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseAddressReceiver_value, "chkUseAddressReceiver", 97, 69, 0, 3, 23, 212), self) self.chkUseSigns = self.insertCheckBox( - "chkUseSigns", CHKUSESIGNS_ITEM_CHANGED, + "chkUseSigns", CHKUSESIGNS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -606,7 +591,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseSigns_value, "chkUseSigns", 97, 82, 0, 3, 24, 212), self) self.chkUseSubject = self.insertCheckBox( - "chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, + "chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -621,7 +606,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseSubject_value, "chkUseSubject", 97, 98, 0, 3, 25, 212), self) self.chkUseSalutation = self.insertCheckBox( - "chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, + "chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -652,7 +637,7 @@ class LetterWizardDialog(WizardDialog): (True, 12, HelpIds.getHelpIdString(HID + 27), "lstSalutation", 210, 110, 3, 27, 74), self) self.chkUseBendMarks = self.insertCheckBox( - "chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED, + "chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -667,7 +652,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseBendMarks_value, "chkUseBendMarks", 97, 127, 0, 3, 28, 212), self) self.chkUseGreeting = self.insertCheckBox( - "chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, + "chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -696,13 +681,13 @@ class LetterWizardDialog(WizardDialog): (True, 12, HelpIds.getHelpIdString(HID + 30), "lstGreeting", 210, 141, 3, 30, 74), self) self.chkUseFooter = self.insertCheckBox( - "chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, + "chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, - PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, @@ -710,8 +695,7 @@ class LetterWizardDialog(WizardDialog): (8, HelpIds.getHelpIdString(HID + 31), self.resources.reschkUseFooter_value, "chkUseFooter", 97, 158, 0, 3, 31, 212), self) - self.lblLetterNorm = self.insertLabel( - "lblLetterNorm", + self.insertLabel("lblLetterNorm", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -723,8 +707,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (16, self.resources.reslblLetterNorm_value, True, "lblLetterNorm", 97, 28, 3, 50, 109)) - self.lblTitle3 = self.insertLabel( - "lblTitle3", + self.insertLabel("lblTitle3", ( "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -741,7 +724,7 @@ class LetterWizardDialog(WizardDialog): def buildStep4(self): self.optSenderPlaceholder = self.insertRadioButton( - "optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, + "optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -755,7 +738,7 @@ class LetterWizardDialog(WizardDialog): self.resources.resoptSenderPlaceholder_value, "optSenderPlaceholder", 104, 42, 4, 32, 149), self) self.optSenderDefine = self.insertRadioButton( - "optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, + "optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -769,7 +752,7 @@ class LetterWizardDialog(WizardDialog): self.resources.resoptSenderDefine_value, "optSenderDefine", 104, 54, 4, 33, 149), self) self.txtSenderName = self.insertTextField( - "txtSenderName", TXTSENDERNAME_TEXT_CHANGED, + "txtSenderName", TXTSENDERNAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -781,7 +764,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 34), "txtSenderName", 182, 67, 4, 34, 119), self) self.txtSenderStreet = self.insertTextField( - "txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, + "txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -793,7 +776,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 35), "txtSenderStreet", 182, 81, 4, 35, 119), self) self.txtSenderPostCode = self.insertTextField( - "txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, + "txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -805,7 +788,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 36), "txtSenderPostCode", 182, 95, 4, 36, 25), self) self.txtSenderState = self.insertTextField( - "txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, + "txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -817,7 +800,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 37), "txtSenderState", 211, 95, 4, 37, 21), self) self.txtSenderCity = self.insertTextField( - "txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, + "txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -829,7 +812,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 38), "txtSenderCity", 236, 95, 4, 38, 65), self) self.optReceiverPlaceholder = self.insertRadioButton( - "optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, + "optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -843,7 +826,7 @@ class LetterWizardDialog(WizardDialog): self.resources.resoptReceiverPlaceholder_value, "optReceiverPlaceholder", 104, 145, 4, 39, 200), self) self.optReceiverDatabase = self.insertRadioButton( - "optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, + "optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -856,8 +839,7 @@ class LetterWizardDialog(WizardDialog): (8, HelpIds.getHelpIdString(HID + 40), self.resources.resoptReceiverDatabase_value, "optReceiverDatabase", 104, 157, 4, 40, 200), self) - self.lblSenderAddress = self.insertLabel( - "lblSenderAddress", + self.insertLabel("lblSenderAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -868,8 +850,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderAddress_value, "lblSenderAddress", 97, 28, 4, 64, 136)) - self.FixedLine2 = self.insertFixedLine( - "FixedLine2", + self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, @@ -879,8 +860,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (5, "FixedLine2", 90, 126, 4, 75, 212)) - self.lblReceiverAddress = self.insertLabel( - "lblReceiverAddress", + self.insertLabel("lblReceiverAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -891,8 +871,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblReceiverAddress_value, "lblReceiverAddress", 97, 134, 4, 76, 136)) - self.lblSenderName = self.insertLabel( - "lblSenderName", + self.insertLabel("lblSenderName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -903,8 +882,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderName_value, "lblSenderName", 113, 69, 4, 77, 68)) - self.lblSenderStreet = self.insertLabel( - "lblSenderStreet", + self.insertLabel("lblSenderStreet", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -915,8 +893,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderStreet_value, "lblSenderStreet", 113, 82, 4, 78, 68)) - self.lblPostCodeCity = self.insertLabel( - "lblPostCodeCity", + self.insertLabel("lblPostCodeCity", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -927,10 +904,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPostCodeCity_value, "lblPostCodeCity", 113, 97, 4, 79, 68)) - self.lblTitle4 = self.insertLabel( - "lblTitle4", - ( - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + self.insertLabel("lblTitle4", + ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, @@ -945,7 +920,7 @@ class LetterWizardDialog(WizardDialog): def buildStep5(self): self.txtFooter = self.insertTextField( - "txtFooter", TXTFOOTER_TEXT_CHANGED, + "txtFooter", TXTFOOTER_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, @@ -958,7 +933,7 @@ class LetterWizardDialog(WizardDialog): (47, HelpIds.getHelpIdString(HID + 41), True, "txtFooter", 97, 40, 5, 41, 203), self) self.chkFooterNextPages = self.insertCheckBox( - "chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, + "chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -973,7 +948,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkFooterNextPages_value, "chkFooterNextPages", 97, 92, 0, 5, 42, 202), self) self.chkFooterPageNumbers = self.insertCheckBox( - "chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, + "chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -987,10 +962,8 @@ class LetterWizardDialog(WizardDialog): (8, HelpIds.getHelpIdString(HID + 43), self.resources.reschkFooterPageNumbers_value, "chkFooterPageNumbers", 97, 106, 0, 5, 43, 201), self) - self.lblFooter = self.insertLabel( - "lblFooter", - ( - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + self.insertLabel("lblFooter", + ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, @@ -1000,10 +973,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 8, self.resources.reslblFooter_value, "lblFooter", 97, 28, 5, 52, 116)) - self.lblTitle5 = self.insertLabel( - "lblTitle5", - ( - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + self.insertLabel("lblTitle5", + ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, @@ -1018,7 +989,7 @@ class LetterWizardDialog(WizardDialog): def buildStep6(self): self.txtTemplateName = self.insertTextField( - "txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, + "txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -1032,7 +1003,7 @@ class LetterWizardDialog(WizardDialog): "txtTemplateName", 202, 56, 6, 44, self.resources.restxtTemplateName_value, 100), self) self.optCreateLetter = self.insertRadioButton( - "optCreateLetter", OPTCREATELETTER_ITEM_CHANGED, + "optCreateLetter", OPTCREATELETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -1046,7 +1017,7 @@ class LetterWizardDialog(WizardDialog): self.resources.resoptCreateLetter_value, "optCreateLetter", 104, 111, 6, 50, 198), self) self.optMakeChanges = self.insertRadioButton( - "optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, + "optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -1059,8 +1030,7 @@ class LetterWizardDialog(WizardDialog): (8, HelpIds.getHelpIdString(HID + 46), self.resources.resoptMakeChanges_value, "optMakeChanges", 104, 123, 6, 51, 198), self) - self.lblFinalExplanation1 = self.insertLabel( - "lblFinalExplanation1", + self.insertLabel("lblFinalExplanation1", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -1072,8 +1042,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (26, self.resources.reslblFinalExplanation1_value, True, "lblFinalExplanation1", 97, 28, 6, 52, 205)) - self.lblProceed = self.insertLabel( - "lblProceed", + self.insertLabel("lblProceed", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -1084,8 +1053,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblProceed_value, "lblProceed", 97, 100, 6, 53, 204)) - self.lblFinalExplanation2 = self.insertLabel( - "lblFinalExplanation2", + self.insertLabel("lblFinalExplanation2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -1097,7 +1065,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (33, self.resources.reslblFinalExplanation2_value, True, "lblFinalExplanation2", 104, 145, 6, 54, 199)) - self.ImageControl2 = self.insertImage( + self.insertImage( "ImageControl2", ( "Border", PropertyNames.PROPERTY_HEIGHT, @@ -1112,8 +1080,7 @@ class LetterWizardDialog(WizardDialog): (0, 10, "private:resource/dbu/image/19205", "ImageControl2", 92, 145, False, 6, 66, 10)) - self.lblTemplateName = self.insertLabel( - "lblTemplateName", + self.insertLabel("lblTemplateName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -1124,10 +1091,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblTemplateName_value, "lblTemplateName", 97, 58, 6, 82, 101)) - self.lblTitle6 = self.insertLabel( - "lblTitle6", - ( - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + self.insertLabel("lblTitle6", + ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py index d25c0c265..5324e1c37 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py @@ -1,7 +1,6 @@ from common.Resource import Resource class LetterWizardDialogResources(Resource): - UNIT_NAME = "dbwizres" MODULE_NAME = "dbw" RID_LETTERWIZARDDIALOG_START = 3000 RID_LETTERWIZARDGREETING_START = 3080 diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index 9a4e741cb..60b4c080f 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -92,7 +92,7 @@ class TextDocument(object): def init(self): self.xWindowPeer = self.xFrame.getComponentWindow() - self.m_xDocProps = TextDocument.xTextDocument.getDocumentProperties() + self.m_xDocProps = TextDocument.xTextDocument.DocumentProperties self.CharLocale = Helper.getUnoStructValue( TextDocument.xTextDocument, "CharLocale") self.xText = TextDocument.xTextDocument.Text diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.py b/wizards/com/sun/star/wizards/text/TextFieldHandler.py index 97d578dd2..80e1abdcb 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.py +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.py @@ -89,32 +89,24 @@ class TextFieldHandler(object): traceback.print_exc() def __getTextFieldsByProperty( - self, _PropertyName, _aPropertyValue, _TypeName): + self, _PropertyName, _aPropertyValue): try: xProperty = TextFieldHandler.dictTextFields[_aPropertyValue] xPropertySet = xProperty.TextFieldMaster if xPropertySet.PropertySetInfo.hasPropertyByName( _PropertyName): oValue = xPropertySet.getPropertyValue(_PropertyName) - if _TypeName == "String": - sValue = unicodedata.normalize( - 'NFKD', oValue).encode('ascii','ignore') - if sValue == _aPropertyValue: - return xProperty - #COMMENTED - '''elif AnyConverter.isShort(oValue): - if _TypeName.equals("Short"): - iShortParam = (_aPropertyValue).shortValue() - ishortValue = AnyConverter.toShort(oValue) - if ishortValue == iShortParam: - xDependentVector.append(oTextField) ''' + sValue = unicodedata.normalize( + 'NFKD', oValue).encode('ascii','ignore') + if sValue == _aPropertyValue: + return xProperty return None except KeyError, e: return None def changeUserFieldContent(self, _FieldName, _FieldContent): DependentTextFields = self.__getTextFieldsByProperty( - PropertyNames.PROPERTY_NAME, _FieldName, "String") + PropertyNames.PROPERTY_NAME, _FieldName) if DependentTextFields is not None: DependentTextFields.TextFieldMaster.setPropertyValue("Content", _FieldContent) self.refreshTextFields() @@ -163,7 +155,7 @@ class TextFieldHandler(object): def removeUserFieldByContent(self, _FieldContent): try: xDependentTextFields = self.__getTextFieldsByProperty( - "Content", _FieldContent, "String") + "Content", _FieldContent) if xDependentTextFields != None: i = 0 while i < xDependentTextFields.length: @@ -172,19 +164,3 @@ class TextFieldHandler(object): except Exception, e: traceback.print_exc() - - def changeExtendedUserFieldContent(self, UserDataPart, _FieldContent): - try: - xDependentTextFields = self.__getTextFieldsByProperty( - "UserDataType", UserDataPart, "Short") - if xDependentTextFields != None: - i = 0 - while i < xDependentTextFields.length: - xDependentTextFields[i].getTextFieldMaster().setPropertyValue( - "Content", _FieldContent) - i += 1 - - self.refreshTextFields() - except Exception, e: - traceback.print_exc() - diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index fbc1984a3..2c7e993c6 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -124,206 +124,6 @@ class UnoDialog(object): if iSelIndex != -1: xListBox.selectItemPos(iSelIndex, True) - def insertLabel(self, sName, sPropNames, oPropValues): - try: - oFixedText = self.insertControlModel( - "com.sun.star.awt.UnoControlFixedTextModel", - sName, sPropNames, oPropValues) - oFixedText.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) - oLabel = self.xUnoDialog.getControl(sName) - return oLabel - except Exception, ex: - traceback.print_exc() - return None - - def insertButton( - self, sName, iControlKey, xActionListener, sProperties, sValues): - oButtonModel = self.insertControlModel( - "com.sun.star.awt.UnoControlButtonModel", - sName, sProperties, sValues) - xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) - xButton = self.xUnoDialog.getControl(sName) - if xActionListener != None: - xButton.addActionListener( - ActionListenerProcAdapter(xActionListener)) - - ControlKey = iControlKey - if self.ControlList != None: - self.ControlList.put(sName, ControlKey) - - return xButton - - def insertCheckBox( - self, sName, iControlKey, xItemListener, sProperties, sValues): - oButtonModel = self.insertControlModel( - "com.sun.star.awt.UnoControlCheckBoxModel", - sName, sProperties, sValues) - oButtonModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) - xCheckBox = self.xUnoDialog.getControl(sName) - if xItemListener != None: - xCheckBox.addItemListener( - ItemListenerProcAdapter(xItemListener)) - - ControlKey = iControlKey - if self.ControlList != None: - self.ControlList.put(sName, ControlKey) - - def insertNumericField( - self, sName, iControlKey, xTextListener, sProperties, sValues): - oNumericFieldModel = self.insertControlModel( - "com.sun.star.awt.UnoControlNumericFieldModel", - sName, sProperties, sValues) - oNumericFieldModel.setPropertyValue( - PropertyNames.PROPERTY_NAME, sName) - xNumericField = self.xUnoDialog.getControl(sName) - if xTextListener != None: - xNumericField.addTextListener( - TextListenerProcAdapter(xTextListener)) - - ControlKey = iControlKey - if self.ControlList != None: - self.ControlList.put(sName, ControlKey) - - def insertScrollBar( - self, sName, iControlKey, xAdjustmentListener, sProperties, sValues): - try: - oScrollModel = self.insertControlModel( - "com.sun.star.awt.UnoControlScrollBarModel", - sName, sProperties, sValues) - oScrollModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) - xScrollBar = self.xUnoDialog.getControl(sName) - if xAdjustmentListener != None: - xScrollBar.addAdjustmentListener(xAdjustmentListener) - - ControlKey = iControlKey - if self.ControlList != None: - self.ControlList.put(sName, ControlKey) - - return xScrollBar - except com.sun.star.uno.Exception, exception: - traceback.print_exc() - return None - - def insertTextField( - self, sName, iControlKey, xTextListener, sProperties, sValues): - xTextBox = insertEditField( - "com.sun.star.awt.UnoControlEditModel", sName, iControlKey, - xTextListener, sProperties, sValues) - return xTextBox - - def insertFormattedField( - self, sName, iControlKey, xTextListener, sProperties, sValues): - xTextBox = insertEditField( - "com.sun.star.awt.UnoControlFormattedFieldModel", sName, - iControlKey, xTextListener, sProperties, sValues) - return xTextBox - - def insertEditField( - self, ServiceName, sName, iControlKey, - xTextListener, sProperties, sValues): - - try: - xTextModel = self.insertControlModel( - ServiceName, sName, sProperties, sValues) - xTextModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) - xTextBox = self.xUnoDialog.getControl(sName) - if xTextListener != None: - xTextBox.addTextListener(TextListenerProcAdapter(xTextListener)) - - ControlKey = iControlKey - self.ControlList.put(sName, ControlKey) - return xTextBox - except com.sun.star.uno.Exception, exception: - traceback.print_exc() - return None - - def insertListBox( - self, sName, iControlKey, xActionListener, - xItemListener, sProperties, sValues): - xListBoxModel = self.insertControlModel( - "com.sun.star.awt.UnoControlListBoxModel", - sName, sProperties, sValues) - xListBoxModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) - xListBox = self.xUnoDialog.getControl(sName) - if xItemListener != None: - xListBox.addItemListener(ItemListenerProcAdapter(xItemListener)) - - if xActionListener != None: - xListBox.addActionListener( - ActionListenerProcAdapter(xActionListener)) - - ControlKey = iControlKey - self.ControlList.put(sName, ControlKey) - return xListBox - - def insertComboBox( - self, sName, iControlKey, xActionListener, xTextListener, - xItemListener, sProperties, sValues): - xComboBoxModel = self.insertControlModel( - "com.sun.star.awt.UnoControlComboBoxModel", - sName, sProperties, sValues) - xComboBoxModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) - xComboBox = self.xUnoDialog.getControl(sName) - if xItemListener != None: - xComboBox.addItemListener(ItemListenerProcAdapter(xItemListener)) - - if xTextListener != None: - xComboBox.addTextListener(TextListenerProcAdapter(xTextListener)) - - if xActionListener != None: - xComboBox.addActionListener( - ActionListenerProcAdapter(xActionListener)) - - ControlKey = iControlKey - self.ControlList.put(sName, ControlKey) - return xComboBox - - def insertRadioButton( - self, sName, iControlKey, xItemListener, sProperties, sValues): - try: - xRadioButton = insertRadioButton( - sName, iControlKey, sProperties, sValues) - if xItemListener != None: - xRadioButton.addItemListener( - ItemListenerProcAdapter(xItemListener)) - - return xRadioButton - except com.sun.star.uno.Exception, exception: - traceback.print_exc() - return None - - def insertRadioButton( - self, sName, iControlKey, xActionListener, sProperties, sValues): - try: - xButton = insertRadioButton( - sName, iControlKey, sProperties, sValues) - if xActionListener != None: - xButton.addActionListener( - ActionListenerProcAdapter(xActionListener)) - - return xButton - except com.sun.star.uno.Exception, exception: - traceback.print_exc() - return None - - def insertRadioButton(self, sName, iControlKey, sProperties, sValues): - xRadioButton = insertRadioButton(sName, sProperties, sValues) - ControlKey = iControlKey - self.ControlList.put(sName, ControlKey) - return xRadioButton - - def insertRadioButton(self, sName, sProperties, sValues): - try: - oRadioButtonModel = self.insertControlModel( - "com.sun.star.awt.UnoControlRadioButtonModel", - sName, sProperties, sValues) - oRadioButtonModel.setPropertyValue( - PropertyNames.PROPERTY_NAME, sName) - xRadioButton = self.xUnoDialog.getControl(sName) - return xRadioButton - except com.sun.star.uno.Exception, exception: - traceback.print_exc() - return None ''' The problem with setting the visibility of controls is that changing the current step of a dialog will automatically @@ -375,7 +175,6 @@ class UnoDialog(object): # repaints the currentDialogStep - def repaintDialogStep(self): try: ncurstep = int(Helper.getUnoPropertyValue( @@ -387,15 +186,20 @@ class UnoDialog(object): except com.sun.star.uno.Exception, exception: traceback.print_exc() - def insertControlModel(self, ServiceName, sName, sProperties, sValues): + def insertControlModel( + self, serviceName, componentName, sPropNames, oPropValues): try: - xControlModel = self.xDialogModel.createInstance(ServiceName) - Helper.setUnoPropertyValues(xControlModel, sProperties, sValues) - self.xDialogModel.insertByName(sName, xControlModel) - return xControlModel - except Exception, exception: + xControlModel = self.xDialogModel.createInstance(serviceName) + Helper.setUnoPropertyValues( + xControlModel, sPropNames, oPropValues) + self.xDialogModel.insertByName(componentName, xControlModel) + Helper.setUnoPropertyValue(xControlModel, + PropertyNames.PROPERTY_NAME, componentName) + except Exception, ex: traceback.print_exc() - return None + + aObj = self.xUnoDialog.getControl(componentName) + return aObj def setFocus(self, ControlName): oFocusControl = self.xUnoDialog.getControl(ControlName) @@ -544,9 +348,3 @@ class UnoDialog(object): def addResourceHandler(self, _Unit, _Module): self.m_oResource = Resource(self.xMSF, _Unit, _Module) - - def setInitialTabindex(self, _istep): - return (short)(_istep * 100) - - def getListBoxLineCount(self): - return 20 diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py index 0bf868687..8986b3a96 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py @@ -25,7 +25,7 @@ class UnoDialog2(UnoDialog): def insertButton( self, sName, actionPerformed, sPropNames, oPropValues, listener): - xButton = self.insertControlModel2( + xButton = self.insertControlModel( "com.sun.star.awt.UnoControlButtonModel", sName, sPropNames, oPropValues) if actionPerformed is not None: @@ -37,7 +37,7 @@ class UnoDialog2(UnoDialog): def insertImageButton( self, sName, actionPerformed, sPropNames, oPropValues, listener): - xButton = self.insertControlModel2( + xButton = self.insertControlModel( "com.sun.star.awt.UnoControlButtonModel", sName, sPropNames, oPropValues) if actionPerformed is not None: @@ -49,7 +49,7 @@ class UnoDialog2(UnoDialog): def insertCheckBox( self, sName, itemChanged, sPropNames, oPropValues, listener): - xCheckBox = self.insertControlModel2( + xCheckBox = self.insertControlModel( "com.sun.star.awt.UnoControlCheckBoxModel", sName, sPropNames, oPropValues) if itemChanged is not None: @@ -61,7 +61,7 @@ class UnoDialog2(UnoDialog): def insertComboBox( self, sName, actionPerformed, itemChanged, textChanged, sPropNames, oPropValues, listener): - xComboBox = self.insertControlModel2( + xComboBox = self.insertControlModel( "com.sun.star.awt.UnoControlComboBoxModel", sName, sPropNames, oPropValues) if actionPerformed is not None: @@ -82,7 +82,7 @@ class UnoDialog2(UnoDialog): def insertListBox( self, sName, actionPerformed, itemChanged, sPropNames, oPropValues, listener): - xListBox = self.insertControlModel2( + xListBox = self.insertControlModel( "com.sun.star.awt.UnoControlListBoxModel", sName, sPropNames, oPropValues) @@ -98,7 +98,7 @@ class UnoDialog2(UnoDialog): def insertRadioButton( self, sName, itemChanged, sPropNames, oPropValues, listener): - xRadioButton = self.insertControlModel2( + xRadioButton = self.insertControlModel( "com.sun.star.awt.UnoControlRadioButtonModel", sName, sPropNames, oPropValues) if itemChanged is not None: @@ -106,11 +106,10 @@ class UnoDialog2(UnoDialog): xRadioButton.addItemListener( ItemListenerProcAdapter(itemChanged)) - return xRadioButton def insertTitledBox(self, sName, sPropNames, oPropValues): - oTitledBox = self.insertControlModel2( + oTitledBox = self.insertControlModel( "com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues) return oTitledBox @@ -122,7 +121,7 @@ class UnoDialog2(UnoDialog): sPropNames, oPropValues, listener) def insertImage(self, sName, sPropNames, oPropValues): - return self.insertControlModel2( + return self.insertControlModel( "com.sun.star.awt.UnoControlImageControlModel", sName, sPropNames, oPropValues) @@ -147,12 +146,11 @@ class UnoDialog2(UnoDialog): def insertEditField( self, sName, sTextChanged, sModelClass, sPropNames, oPropValues, listener): - xField = self.insertControlModel2(sModelClass, + xField = self.insertControlModel(sModelClass, sName, sPropNames, oPropValues) if sTextChanged is not None: sTextChanged = getattr(listener, sTextChanged) xField.addTextListener(TextListenerProcAdapter(sTextChanged)) - return xField def insertFileControl( @@ -203,55 +201,36 @@ class UnoDialog2(UnoDialog): sPropNames, oPropValues, listener) def insertFixedLine(self, sName, sPropNames, oPropValues): - oLine = self.insertControlModel2( + oLine = self.insertControlModel( "com.sun.star.awt.UnoControlFixedLineModel", sName, sPropNames, oPropValues) return oLine + + def insertLabel(self, sName, sPropNames, oPropValues): + oFixedText = self.insertControlModel( + "com.sun.star.awt.UnoControlFixedTextModel", + sName, sPropNames, oPropValues) + return oFixedText + def insertScrollBar(self, sName, sPropNames, oPropValues): - oScrollBar = self.insertControlModel2( + oScrollBar = self.insertControlModel( "com.sun.star.awt.UnoControlScrollBarModel", sName, sPropNames, oPropValues) return oScrollBar def insertProgressBar(self, sName, sPropNames, oPropValues): - oProgressBar = self.insertControlModel2( + oProgressBar = self.insertControlModel( "com.sun.star.awt.UnoControlProgressBarModel", sName, sPropNames, oPropValues) return oProgressBar def insertGroupBox(self, sName, sPropNames, oPropValues): - oGroupBox = self.insertControlModel2( + oGroupBox = self.insertControlModel( "com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues) return oGroupBox - def insertControlModel2( - self, serviceName, componentName, sPropNames, oPropValues): - try: - xControlModel = self.insertControlModel( - serviceName, componentName, (), ()) - Helper.setUnoPropertyValues( - xControlModel, sPropNames, oPropValues) - Helper.setUnoPropertyValue(xControlModel, - PropertyNames.PROPERTY_NAME, componentName) - except Exception, ex: - traceback.print_exc() - - aObj = self.xUnoDialog.getControl(componentName) - return aObj - - def setControlPropertiesDebug(self, model, names, values): - i = 0 - while i < len(names): - print " Settings: ", names[i] - Helper.setUnoPropertyValue(model, names[i], values[i]) - i += 1 - - def getControlModel(self, unoControl): - obj = unoControl.Model - return obj - def showMessageBox(self, windowServiceName, windowAttribute, MessageText): return SystemDialog.showMessageBox( xMSF, self.xControl.Peer, diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index ee0f7c626..9487d4077 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -43,7 +43,6 @@ class WizardDialog(UnoDialog2): self.sMsgEndAutopilot = self.__oWizardResource.getResText( UIConsts.RID_DB_COMMON + 33) self.oRoadmap = None - #self.vetos = VetoableChangeSupport.VetoableChangeSupport_unknown(this) def getResource(self): return self.__oWizardResource @@ -74,7 +73,7 @@ class WizardDialog(UnoDialog2): return False def setCurrentRoadmapItemID(self, ID): - if self.oRoadmap != None: + if self.oRoadmap is not None: nCurItemID = self.getCurrentRoadmapItemID() if nCurItemID != ID: Helper.setUnoPropertyValue(self.oRoadmap, "CurrentItemID",ID) @@ -95,7 +94,8 @@ class WizardDialog(UnoDialog2): # the roadmap control has got no real TabIndex ever # that is not correct, but changing this would need time, # so it is used without TabIndex as before - self.oRoadmap = self.insertControlModel( + + xRoadmapControl = self.insertControlModel( "com.sun.star.awt.UnoControlRoadmapModel", "rdmNavi", (PropertyNames.PROPERTY_HEIGHT, @@ -106,12 +106,9 @@ class WizardDialog(UnoDialog2): PropertyNames.PROPERTY_WIDTH), ((iDialogHeight - 26), 0, 0, 0, 0, True, 85)) - self.oRoadmap.setPropertyValue( - PropertyNames.PROPERTY_NAME, "rdmNavi") - - self.xRoadmapControl = self.xUnoDialog.getControl("rdmNavi") + self.oRoadmap = xRoadmapControl.Model method = getattr(self, "itemStateChanged") - self.xRoadmapControl.addItemListener( + xRoadmapControl.addItemListener( ItemListenerProcAdapter(method)) Helper.setUnoPropertyValue( @@ -146,9 +143,6 @@ class WizardDialog(UnoDialog2): traceback.print_exc() return -1 - def getRMItemCount(self): - return self.oRoadmap.Count - def getRoadmapItemByID(self, _ID): try: getByIndex = self.oRoadmap.getByIndex @@ -202,12 +196,6 @@ class WizardDialog(UnoDialog2): self.enableNextButton(self.getNextAvailableStep() > 0) self.enableBackButton(nNewStep != 1) - def iscompleted(self, _ndialogpage): - return False - - def ismodified(self, _ndialogpage): - return False - def drawNaviBar(self): try: curtabindex = UIConsts.SOFIRSTWIZARDNAVITABINDEX @@ -388,9 +376,7 @@ class WizardDialog(UnoDialog2): while i <= self.nMaxStep: if self.isStepEnabled(i): return i - i += 1 - return -1 def gotoNextAvailableStep(self): -- cgit v1.2.3 From 9c0bd46a37e915c3a0fc132fa5be31a87d48fd76 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Sat, 16 Jul 2011 19:15:09 +0200 Subject: Revert "clean up" This reverts commit 2c266efe9d82ebb46370b5a72d55f6c2d61c1763. --- wizards/com/sun/star/wizards/common/FileAccess.py | 6 +- wizards/com/sun/star/wizards/common/Helper.py | 2 +- .../sun/star/wizards/document/OfficeDocument.py | 16 ++ .../com/sun/star/wizards/fax/FaxWizardDialog.py | 42 ++-- .../star/wizards/fax/FaxWizardDialogResources.py | 1 + .../sun/star/wizards/letter/LetterWizardDialog.py | 267 ++++++++++++--------- .../wizards/letter/LetterWizardDialogResources.py | 1 + wizards/com/sun/star/wizards/text/TextDocument.py | 2 +- .../com/sun/star/wizards/text/TextFieldHandler.py | 38 ++- wizards/com/sun/star/wizards/ui/UnoDialog.py | 226 ++++++++++++++++- wizards/com/sun/star/wizards/ui/UnoDialog2.py | 61 +++-- wizards/com/sun/star/wizards/ui/WizardDialog.py | 24 +- 12 files changed, 500 insertions(+), 186 deletions(-) diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 5f92d8aa3..3397d7138 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -715,10 +715,10 @@ class FileAccess(object): def connectURLs(self, urlFolder, urlFilename): stringFolder = "" stringFileName = urlFilename - if not urlFolder.endswith("/"): + if not urlFolder.endsWith("/"): stringFolder = "/" - if urlFilename.startswith("/"): - stringFileName = urlFilename[1:] + if urlFilename.startsWith("/"): + stringFileName = urlFilename.substring(1) return urlFolder + stringFolder + stringFileName @classmethod diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py index eaa615ded..45923cfe8 100644 --- a/wizards/com/sun/star/wizards/common/Helper.py +++ b/wizards/com/sun/star/wizards/common/Helper.py @@ -157,7 +157,7 @@ class Helper(object): class DateUtils(object): def __init__(self, xmsf, document): - defaults = xmsf.createInstance("com.sun.star.text.Defaults") + defaults = document.createInstance("com.sun.star.text.Defaults") l = Helper.getUnoStructValue(defaults, "CharLocale") self.formatSupplier = document formatSettings = self.formatSupplier.getNumberFormatSettings() diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py index 78315129c..f2fc2cb76 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.py +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py @@ -270,8 +270,24 @@ class OfficeDocument(object): def getSlideCount(self, model): return model.getDrawPages().getCount() + def getDocumentProperties(self, document): + return document.getDocumentProperties() + def showMessageBox( self, xMSF, windowServiceName, windowAttribute, MessageText): return SystemDialog.showMessageBox( xMSF, windowServiceName, windowAttribute, MessageText) + + def getWindowPeer(self): + return self.xWindowPeer + + ''' + @param windowPeer The xWindowPeer to set. + Should be called as soon as a Windowpeer of a wizard dialog is available + The windowpeer is needed to call a Messagebox + ''' + + def setWindowPeer(self, windowPeer): + self.xWindowPeer = windowPeer + diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py index e4295a0d0..e040f247b 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py @@ -86,7 +86,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (True, 12, LSTPRIVATESTYLE_HID, 180, 95, 1, 4, 74), self) - self.insertLabel("lblBusinessStyle", + self.lblBusinessStyle = self.insertLabel("lblBusinessStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -97,7 +97,7 @@ class FaxWizardDialog(WizardDialog): (8, self.resources.reslblBusinessStyle_value, 110, 42, 1, 32, 60)) - self.insertLabel("lblTitle1", + self.lblTitle1 = self.insertLabel("lblTitle1", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -108,7 +108,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle1_value, True, 91, 8, 1, 37, 212)) - self.insertLabel("lblPrivateStyle", + self.lblPrivateStyle = self.insertLabel("lblPrivateStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -117,7 +117,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPrivateStyle_value, 110, 95, 1, 50, 60)) - self.insertLabel("lblIntroduction", + self.lblIntroduction = self.insertLabel("lblIntroduction", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -264,7 +264,7 @@ class FaxWizardDialog(WizardDialog): (8, CHKUSEFOOTER_HID, self.resources.reschkUseFooter_value, 97, 163, 0, 2, 14, 212), self) - self.insertLabel("lblTitle3", + self.lblTitle3 = self.insertLabel("lblTitle3", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -397,7 +397,7 @@ class FaxWizardDialog(WizardDialog): (8, OPTRECEIVERDATABASE_HID, self.resources.resoptReceiverDatabase_value, 104, 160, 3, 24, 200), self) - self.insertLabel("lblSenderAddress", + self.lblSenderAddress = self.insertLabel("lblSenderAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -406,14 +406,14 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderAddress_value, 97, 28, 3, 46, 136)) - self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, + self.FixedLine2 = self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (5, 90, 126, 3, 51, 212)) - self.insertLabel("lblSenderName", + self.lblSenderName = self.insertLabel("lblSenderName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -423,7 +423,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderName_value, 113, 69, 3, 52, 68)) - self.insertLabel("lblSenderStreet", + self.lblSenderStreet = self.insertLabel("lblSenderStreet", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -433,7 +433,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderStreet_value, 113, 82, 3, 53, 68)) - self.insertLabel("lblPostCodeCity", + self.lblPostCodeCity = self.insertLabel("lblPostCodeCity", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -443,7 +443,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPostCodeCity_value, 113, 97, 3, 54, 68)) - self.insertLabel("lblTitle4", + self.lblTitle4 = self.insertLabel("lblTitle4", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -455,7 +455,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle4_value, True, 91, 8, 3, 60, 212)) - self.insertLabel("lblSenderFax", + self.Label1 = self.insertLabel("lblSenderFax", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -464,7 +464,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.resLabel1_value, 113, 111, 3, 68, 68)) - self.insertLabel("Label2", + self.Label2 = self.insertLabel("Label2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -514,7 +514,7 @@ class FaxWizardDialog(WizardDialog): (8, CHKFOOTERPAGENUMBERS_HID, self.resources.reschkFooterPageNumbers_value, 97, 106, 0, 4, 27, 201), self) - self.insertLabel("lblFooter", + self.lblFooter = self.insertLabel("lblFooter", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -525,7 +525,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor4, 8, self.resources.reslblFooter_value, 97, 28, 4, 33, 116)) - self.insertLabel("lblTitle5", + self.lblTitle5 = self.insertLabel("lblTitle5", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -576,7 +576,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, OPTMAKECHANGES_HID, self.resources.resoptMakeChanges_value, 104, 123, 5, 31, 198), self) - self.insertLabel("lblFinalExplanation1", + self.lblFinalExplanation1 = self.insertLabel("lblFinalExplanation1", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -587,7 +587,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (28, self.resources.reslblFinalExplanation1_value, True, 97, 28, 5, 34, 205)) - self.insertLabel("lblProceed", + self.lblProceed = self.insertLabel("lblProceed", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -597,7 +597,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblProceed_value, 97, 100, 5, 35, 204)) - self.insertLabel("lblFinalExplanation2", + self.lblFinalExplanation2 = self.insertLabel("lblFinalExplanation2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -608,7 +608,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (33, self.resources.reslblFinalExplanation2_value, True, 104, 145, 5, 36, 199)) - self.insertImage("ImageControl2", + self.ImageControl2 = self.insertImage("ImageControl2", ("Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, @@ -620,7 +620,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (0, 10, UIConsts.INFOIMAGEURL, 92, 145, False, 5, 47, 10)) - self.insertLabel("lblTemplateName", + self.lblTemplateName = self.insertLabel("lblTemplateName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, @@ -631,7 +631,7 @@ class FaxWizardDialog(WizardDialog): (8, self.resources.reslblTemplateName_value, 97, 58, 5, 57, 101)) - self.insertLabel("lblTitle6", + self.lblTitle6 = self.insertLabel("lblTitle6", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py index bbf6921d3..864112fed 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py @@ -1,6 +1,7 @@ from common.Resource import Resource class FaxWizardDialogResources(Resource): + UNIT_NAME = "dbwizres" MODULE_NAME = "dbw" RID_FAXWIZARDDIALOG_START = 3200 RID_FAXWIZARDCOMMUNICATION_START = 3270 diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py index 8f740cdf1..35158a3ea 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py @@ -12,18 +12,18 @@ class LetterWizardDialog(WizardDialog): self.resources = LetterWizardDialogResources(xmsf) Helper.setUnoPropertyValues( self.xDialogModel, - ("Closeable", + ("Closeable", PropertyNames.PROPERTY_HEIGHT, - "Moveable", - PropertyNames.PROPERTY_NAME, - PropertyNames.PROPERTY_POSITION_X, - PropertyNames.PROPERTY_POSITION_Y, - PropertyNames.PROPERTY_STEP, - PropertyNames.PROPERTY_TABINDEX, - "Title", - PropertyNames.PROPERTY_WIDTH), + "Moveable", + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Title", + PropertyNames.PROPERTY_WIDTH), (True, 210, True, - "LetterWizardDialog", 104, 52, 1, 1, + "LetterWizardDialog", 104, 52, 1, 1, self.resources.resLetterWizardDialog_title, 310)) self.fontDescriptor1 = \ uno.createUnoStruct('com.sun.star.awt.FontDescriptor') @@ -41,7 +41,7 @@ class LetterWizardDialog(WizardDialog): def buildStep1(self): self.optBusinessLetter = self.insertRadioButton( - "optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED, + "optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -51,11 +51,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, HelpIds.getHelpIdString(HID + 1), + (8, HelpIds.getHelpIdString(HID + 1), self.resources.resoptBusinessLetter_value, "optBusinessLetter", 97, 28, 1, 1, 184), self) self.optPrivOfficialLetter = self.insertRadioButton( - "optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED, + "optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -65,11 +65,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, HelpIds.getHelpIdString(HID + 2), - self.resources.resoptPrivOfficialLetter_value, + (8, HelpIds.getHelpIdString(HID + 2), + self.resources.resoptPrivOfficialLetter_value, "optPrivOfficialLetter", 97, 74, 1, 2, 184), self) self.optPrivateLetter = self.insertRadioButton( - "optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED, + "optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -79,11 +79,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, HelpIds.getHelpIdString(HID + 3), - self.resources.resoptPrivateLetter_value, + (8, HelpIds.getHelpIdString(HID + 3), + self.resources.resoptPrivateLetter_value, "optPrivateLetter", 97, 106, 1, 3, 184), self) self.lstBusinessStyle = self.insertListBox( - "lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, + "lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, @@ -98,7 +98,7 @@ class LetterWizardDialog(WizardDialog): "lstBusinessStyle", 180, 40, 1, 4, 74), self) self.chkBusinessPaper = self.insertCheckBox( - "chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED, + "chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -109,11 +109,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, HelpIds.getHelpIdString(HID + 5), - self.resources.reschkBusinessPaper_value, + (8, HelpIds.getHelpIdString(HID + 5), + self.resources.reschkBusinessPaper_value, "chkBusinessPaper", 110, 56, 0, 1, 5, 168), self) self.lstPrivOfficialStyle = self.insertListBox( - "lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, + "lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, LSTPRIVOFFICIALSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, @@ -124,7 +124,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (True, 12, HelpIds.getHelpIdString(HID + 6), + (True, 12, HelpIds.getHelpIdString(HID + 6), "lstPrivOfficialStyle", 180, 86, 1, 6, 74), self) self.lstPrivateStyle = self.insertListBox( "lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, @@ -138,9 +138,10 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (True, 12, HelpIds.getHelpIdString(HID + 7), + (True, 12, HelpIds.getHelpIdString(HID + 7), "lstPrivateStyle", 180, 118, 1, 7, 74), self) - self.insertLabel("lblBusinessStyle", + self.lblBusinessStyle = self.insertLabel( + "lblBusinessStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -149,9 +150,10 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, self.resources.reslblBusinessStyle_value, + (8, self.resources.reslblBusinessStyle_value, "lblBusinessStyle", 110, 42, 1, 48, 60)) - self.insertLabel("lblPrivOfficialStyle", + self.lblPrivOfficialStyle = self.insertLabel( + "lblPrivOfficialStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -162,10 +164,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPrivOfficialStyle_value, "lblPrivOfficialStyle", 110, 88, 1, 49, 60)) - self.insertLabel("lblTitle1", + self.lblTitle1 = self.insertLabel( + "lblTitle1", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, - PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, @@ -173,10 +176,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (self.fontDescriptor6, 16, - self.resources.reslblTitle1_value, True, + (self.fontDescriptor6, 16, + self.resources.reslblTitle1_value, True, "lblTitle1", 91, 8, 1, 55, 212)) - self.insertLabel("lblPrivateStyle", + self.lblPrivateStyle = self.insertLabel( + "lblPrivateStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -187,7 +191,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPrivateStyle_value, "lblPrivateStyle", 110, 120, 1, 74, 60)) - self.insertLabel("lblIntroduction", + self.lblIntroduction = self.insertLabel( + "lblIntroduction", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -197,7 +202,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (39, self.resources.reslblIntroduction_value, + (39, self.resources.reslblIntroduction_value, True, "lblIntroduction", 104, 145, 1, 80, 199)) self.ImageControl3 = self.insertInfoImage(92, 145, 1) @@ -205,7 +210,7 @@ class LetterWizardDialog(WizardDialog): def buildStep2(self): self.chkPaperCompanyLogo = self.insertCheckBox( "chkPaperCompanyLogo", - CHKPAPERCOMPANYLOGO_ITEM_CHANGED, + CHKPAPERCOMPANYLOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -217,11 +222,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 8), - self.resources.reschkPaperCompanyLogo_value, + self.resources.reschkPaperCompanyLogo_value, "chkPaperCompanyLogo", 97, 28, 0, 2, 8, 68), self) self.numLogoHeight = self.insertNumericField( "numLogoHeight", - NUMLOGOHEIGHT_TEXT_CHANGED, + NUMLOGOHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -236,7 +241,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 9), "numLogoHeight", 138, 40, True, 2, True, 9, 3, 30), self) self.numLogoX = self.insertNumericField( - "numLogoX", NUMLOGOX_TEXT_CHANGED, + "numLogoX", NUMLOGOX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -250,7 +255,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 10), "numLogoX", 266, 40, True, 2, 10, 0, 30), self) self.numLogoWidth = self.insertNumericField( - "numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED, + "numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -264,7 +269,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 11), "numLogoWidth", 138, 56, True, 2, 11, 3.8, 30), self) self.numLogoY = self.insertNumericField( - "numLogoY", NUMLOGOY_TEXT_CHANGED, + "numLogoY", NUMLOGOY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -275,10 +280,10 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), - (12, HelpIds.getHelpIdString(HID + 12), + (12, HelpIds.getHelpIdString(HID + 12), "numLogoY", 266, 56, True, 2, 12, -3.4, 30), self) self.chkPaperCompanyAddress = self.insertCheckBox( - "chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED, + "chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -293,7 +298,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkPaperCompanyAddress_value, "chkPaperCompanyAddress", 98, 84, 0, 2, 13, 68), self) self.numAddressHeight = self.insertNumericField( - "numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED, + "numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -308,7 +313,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 14), "numAddressHeight", 138, 96, True, 2, True, 14, 3, 30), self) self.numAddressX = self.insertNumericField( - "numAddressX", NUMADDRESSX_TEXT_CHANGED, + "numAddressX", NUMADDRESSX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -322,7 +327,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 15), "numAddressX", 266, 96, True, 2, 15, 3.8, 30), self) self.numAddressWidth = self.insertNumericField( - "numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED, + "numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -336,7 +341,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 16), "numAddressWidth", 138, 112, True, 2, 16, 13.8, 30), self) self.numAddressY = self.insertNumericField( - "numAddressY", NUMADDRESSY_TEXT_CHANGED, + "numAddressY", NUMADDRESSY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -350,7 +355,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 17), "numAddressY", 266, 112, True, 2, 17, -3.4, 30), self) self.chkCompanyReceiver = self.insertCheckBox( - "chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED, + "chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -364,7 +369,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkCompanyReceiver_value, "chkCompanyReceiver", 103, 131, 0, 2, 18, 185), self) self.chkPaperFooter = self.insertCheckBox( - "chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED, + "chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -375,11 +380,11 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, HelpIds.getHelpIdString(HID + 19), + (8, HelpIds.getHelpIdString(HID + 19), self.resources.reschkPaperFooter_value, "chkPaperFooter", 97, 158, 0, 2, 19, 68), self) self.numFooterHeight = self.insertNumericField( - "numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED, + "numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -392,7 +397,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 20), "numFooterHeight", 236, 156, True, 2, 20, 5, 30), self) - self.insertLabel("lblLogoHeight", + self.lblLogoHeight = self.insertLabel( + "lblLogoHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -403,7 +409,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoHeight_value, "lblLogoHeight", 103, 42, 2, 68, 32)) - self.insertLabel("lblLogoWidth", + self.lblLogoWidth = self.insertLabel( + "lblLogoWidth", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -414,8 +421,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoWidth_value, "lblLogoWidth", 103, 58, 2, 69, 32)) - self.insertFixedLine( - "FixedLine5", + self.FixedLine5 = self.insertFixedLine( + "FixedLine5", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, @@ -425,8 +432,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (2, "FixedLine5", 90, 78, 2, 70, 215)) - self.insertFixedLine( - "FixedLine6", + self.FixedLine6 = self.insertFixedLine( + "FixedLine6", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, @@ -436,7 +443,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (2, "FixedLine6", 90, 150, 2, 71, 215)) - self.insertLabel("lblFooterHeight", + self.lblFooterHeight = self.insertLabel( + "lblFooterHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -447,7 +455,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblFooterHeight_value, "lblFooterHeight", 200, 158, 2, 72, 32)) - self.insertLabel("lblLogoX", + self.lblLogoX = self.insertLabel( + "lblLogoX", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -458,7 +467,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoX_value, "lblLogoX", 170, 42, 2, 84, 94)) - self.insertLabel("lblLogoY", + self.lblLogoY = self.insertLabel( + "lblLogoY", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -469,7 +479,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoY_value, "lblLogoY", 170, 58, 2, 85, 94)) - self.insertLabel("lblAddressHeight", + self.lblAddressHeight = self.insertLabel( + "lblAddressHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -480,7 +491,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressHeight_value, "lblAddressHeight", 103, 98, 2, 86, 32)) - self.insertLabel("lblAddressWidth", + self.lblAddressWidth = self.insertLabel( + "lblAddressWidth", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -491,7 +503,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressWidth_value, "lblAddressWidth", 103, 114, 2, 87, 32)) - self.insertLabel("lblAddressX", + self.lblAddressX = self.insertLabel( + "lblAddressX", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -502,7 +515,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressX_value, "lblAddressX", 170, 98, 2, 88, 94)) - self.insertLabel("lblAddressY", + self.lblAddressY = self.insertLabel( + "lblAddressY", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -513,8 +527,9 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressY_value, "lblAddressY", 170, 114, 2, 89, 94)) - self.insertLabel("lblTitle2", - ("FontDescriptor", + self.lblTitle2 = self.insertLabel( + "lblTitle2", + ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -530,8 +545,8 @@ class LetterWizardDialog(WizardDialog): def buildStep3(self): self.lstLetterNorm = self.insertListBox( - "lstLetterNorm", - LSTLETTERNORM_ACTION_PERFORMED, + "lstLetterNorm", + LSTLETTERNORM_ACTION_PERFORMED, LSTLETTERNORM_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, @@ -545,13 +560,13 @@ class LetterWizardDialog(WizardDialog): (True, 12, HelpIds.getHelpIdString(HID + 21), "lstLetterNorm", 210, 34, 3, 21, 74), self) self.chkUseLogo = self.insertCheckBox( - "chkUseLogo", CHKUSELOGO_ITEM_CHANGED, + "chkUseLogo", CHKUSELOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, - PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, @@ -560,14 +575,14 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseLogo_value, "chkUseLogo", 97, 54, 0, 3, 22, 212), self) self.chkUseAddressReceiver = self.insertCheckBox( - "chkUseAddressReceiver", - CHKUSEADDRESSRECEIVER_ITEM_CHANGED, + "chkUseAddressReceiver", + CHKUSEADDRESSRECEIVER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, - PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, @@ -576,7 +591,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseAddressReceiver_value, "chkUseAddressReceiver", 97, 69, 0, 3, 23, 212), self) self.chkUseSigns = self.insertCheckBox( - "chkUseSigns", CHKUSESIGNS_ITEM_CHANGED, + "chkUseSigns", CHKUSESIGNS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -591,7 +606,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseSigns_value, "chkUseSigns", 97, 82, 0, 3, 24, 212), self) self.chkUseSubject = self.insertCheckBox( - "chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, + "chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -606,7 +621,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseSubject_value, "chkUseSubject", 97, 98, 0, 3, 25, 212), self) self.chkUseSalutation = self.insertCheckBox( - "chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, + "chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -637,7 +652,7 @@ class LetterWizardDialog(WizardDialog): (True, 12, HelpIds.getHelpIdString(HID + 27), "lstSalutation", 210, 110, 3, 27, 74), self) self.chkUseBendMarks = self.insertCheckBox( - "chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED, + "chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -652,7 +667,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkUseBendMarks_value, "chkUseBendMarks", 97, 127, 0, 3, 28, 212), self) self.chkUseGreeting = self.insertCheckBox( - "chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, + "chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -681,13 +696,13 @@ class LetterWizardDialog(WizardDialog): (True, 12, HelpIds.getHelpIdString(HID + 30), "lstGreeting", 210, 141, 3, 30, 74), self) self.chkUseFooter = self.insertCheckBox( - "chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, + "chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, - PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, @@ -695,7 +710,8 @@ class LetterWizardDialog(WizardDialog): (8, HelpIds.getHelpIdString(HID + 31), self.resources.reschkUseFooter_value, "chkUseFooter", 97, 158, 0, 3, 31, 212), self) - self.insertLabel("lblLetterNorm", + self.lblLetterNorm = self.insertLabel( + "lblLetterNorm", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -707,7 +723,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (16, self.resources.reslblLetterNorm_value, True, "lblLetterNorm", 97, 28, 3, 50, 109)) - self.insertLabel("lblTitle3", + self.lblTitle3 = self.insertLabel( + "lblTitle3", ( "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -724,7 +741,7 @@ class LetterWizardDialog(WizardDialog): def buildStep4(self): self.optSenderPlaceholder = self.insertRadioButton( - "optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, + "optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -738,7 +755,7 @@ class LetterWizardDialog(WizardDialog): self.resources.resoptSenderPlaceholder_value, "optSenderPlaceholder", 104, 42, 4, 32, 149), self) self.optSenderDefine = self.insertRadioButton( - "optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, + "optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -752,7 +769,7 @@ class LetterWizardDialog(WizardDialog): self.resources.resoptSenderDefine_value, "optSenderDefine", 104, 54, 4, 33, 149), self) self.txtSenderName = self.insertTextField( - "txtSenderName", TXTSENDERNAME_TEXT_CHANGED, + "txtSenderName", TXTSENDERNAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -764,7 +781,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 34), "txtSenderName", 182, 67, 4, 34, 119), self) self.txtSenderStreet = self.insertTextField( - "txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, + "txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -776,7 +793,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 35), "txtSenderStreet", 182, 81, 4, 35, 119), self) self.txtSenderPostCode = self.insertTextField( - "txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, + "txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -788,7 +805,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 36), "txtSenderPostCode", 182, 95, 4, 36, 25), self) self.txtSenderState = self.insertTextField( - "txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, + "txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -800,7 +817,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 37), "txtSenderState", 211, 95, 4, 37, 21), self) self.txtSenderCity = self.insertTextField( - "txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, + "txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -812,7 +829,7 @@ class LetterWizardDialog(WizardDialog): (12, HelpIds.getHelpIdString(HID + 38), "txtSenderCity", 236, 95, 4, 38, 65), self) self.optReceiverPlaceholder = self.insertRadioButton( - "optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, + "optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -826,7 +843,7 @@ class LetterWizardDialog(WizardDialog): self.resources.resoptReceiverPlaceholder_value, "optReceiverPlaceholder", 104, 145, 4, 39, 200), self) self.optReceiverDatabase = self.insertRadioButton( - "optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, + "optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -839,7 +856,8 @@ class LetterWizardDialog(WizardDialog): (8, HelpIds.getHelpIdString(HID + 40), self.resources.resoptReceiverDatabase_value, "optReceiverDatabase", 104, 157, 4, 40, 200), self) - self.insertLabel("lblSenderAddress", + self.lblSenderAddress = self.insertLabel( + "lblSenderAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -850,7 +868,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderAddress_value, "lblSenderAddress", 97, 28, 4, 64, 136)) - self.insertFixedLine("FixedLine2", + self.FixedLine2 = self.insertFixedLine( + "FixedLine2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, @@ -860,7 +879,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (5, "FixedLine2", 90, 126, 4, 75, 212)) - self.insertLabel("lblReceiverAddress", + self.lblReceiverAddress = self.insertLabel( + "lblReceiverAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -871,7 +891,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblReceiverAddress_value, "lblReceiverAddress", 97, 134, 4, 76, 136)) - self.insertLabel("lblSenderName", + self.lblSenderName = self.insertLabel( + "lblSenderName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -882,7 +903,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderName_value, "lblSenderName", 113, 69, 4, 77, 68)) - self.insertLabel("lblSenderStreet", + self.lblSenderStreet = self.insertLabel( + "lblSenderStreet", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -893,7 +915,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderStreet_value, "lblSenderStreet", 113, 82, 4, 78, 68)) - self.insertLabel("lblPostCodeCity", + self.lblPostCodeCity = self.insertLabel( + "lblPostCodeCity", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -904,8 +927,10 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPostCodeCity_value, "lblPostCodeCity", 113, 97, 4, 79, 68)) - self.insertLabel("lblTitle4", - ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + self.lblTitle4 = self.insertLabel( + "lblTitle4", + ( + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, @@ -920,7 +945,7 @@ class LetterWizardDialog(WizardDialog): def buildStep5(self): self.txtFooter = self.insertTextField( - "txtFooter", TXTFOOTER_TEXT_CHANGED, + "txtFooter", TXTFOOTER_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, @@ -933,7 +958,7 @@ class LetterWizardDialog(WizardDialog): (47, HelpIds.getHelpIdString(HID + 41), True, "txtFooter", 97, 40, 5, 41, 203), self) self.chkFooterNextPages = self.insertCheckBox( - "chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, + "chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -948,7 +973,7 @@ class LetterWizardDialog(WizardDialog): self.resources.reschkFooterNextPages_value, "chkFooterNextPages", 97, 92, 0, 5, 42, 202), self) self.chkFooterPageNumbers = self.insertCheckBox( - "chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, + "chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -962,8 +987,10 @@ class LetterWizardDialog(WizardDialog): (8, HelpIds.getHelpIdString(HID + 43), self.resources.reschkFooterPageNumbers_value, "chkFooterPageNumbers", 97, 106, 0, 5, 43, 201), self) - self.insertLabel("lblFooter", - ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + self.lblFooter = self.insertLabel( + "lblFooter", + ( + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, @@ -973,8 +1000,10 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 8, self.resources.reslblFooter_value, "lblFooter", 97, 28, 5, 52, 116)) - self.insertLabel("lblTitle5", - ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + self.lblTitle5 = self.insertLabel( + "lblTitle5", + ( + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, @@ -989,7 +1018,7 @@ class LetterWizardDialog(WizardDialog): def buildStep6(self): self.txtTemplateName = self.insertTextField( - "txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, + "txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, @@ -1003,7 +1032,7 @@ class LetterWizardDialog(WizardDialog): "txtTemplateName", 202, 56, 6, 44, self.resources.restxtTemplateName_value, 100), self) self.optCreateLetter = self.insertRadioButton( - "optCreateLetter", OPTCREATELETTER_ITEM_CHANGED, + "optCreateLetter", OPTCREATELETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -1017,7 +1046,7 @@ class LetterWizardDialog(WizardDialog): self.resources.resoptCreateLetter_value, "optCreateLetter", 104, 111, 6, 50, 198), self) self.optMakeChanges = self.insertRadioButton( - "optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, + "optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, @@ -1030,7 +1059,8 @@ class LetterWizardDialog(WizardDialog): (8, HelpIds.getHelpIdString(HID + 46), self.resources.resoptMakeChanges_value, "optMakeChanges", 104, 123, 6, 51, 198), self) - self.insertLabel("lblFinalExplanation1", + self.lblFinalExplanation1 = self.insertLabel( + "lblFinalExplanation1", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -1042,7 +1072,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (26, self.resources.reslblFinalExplanation1_value, True, "lblFinalExplanation1", 97, 28, 6, 52, 205)) - self.insertLabel("lblProceed", + self.lblProceed = self.insertLabel( + "lblProceed", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -1053,7 +1084,8 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblProceed_value, "lblProceed", 97, 100, 6, 53, 204)) - self.insertLabel("lblFinalExplanation2", + self.lblFinalExplanation2 = self.insertLabel( + "lblFinalExplanation2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, @@ -1065,7 +1097,7 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (33, self.resources.reslblFinalExplanation2_value, True, "lblFinalExplanation2", 104, 145, 6, 54, 199)) - self.insertImage( + self.ImageControl2 = self.insertImage( "ImageControl2", ( "Border", PropertyNames.PROPERTY_HEIGHT, @@ -1080,7 +1112,8 @@ class LetterWizardDialog(WizardDialog): (0, 10, "private:resource/dbu/image/19205", "ImageControl2", 92, 145, False, 6, 66, 10)) - self.insertLabel("lblTemplateName", + self.lblTemplateName = self.insertLabel( + "lblTemplateName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, @@ -1091,8 +1124,10 @@ class LetterWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblTemplateName_value, "lblTemplateName", 97, 58, 6, 82, 101)) - self.insertLabel("lblTitle6", - ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + self.lblTitle6 = self.insertLabel( + "lblTitle6", + ( + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py index 5324e1c37..d25c0c265 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py @@ -1,6 +1,7 @@ from common.Resource import Resource class LetterWizardDialogResources(Resource): + UNIT_NAME = "dbwizres" MODULE_NAME = "dbw" RID_LETTERWIZARDDIALOG_START = 3000 RID_LETTERWIZARDGREETING_START = 3080 diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index 60b4c080f..9a4e741cb 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -92,7 +92,7 @@ class TextDocument(object): def init(self): self.xWindowPeer = self.xFrame.getComponentWindow() - self.m_xDocProps = TextDocument.xTextDocument.DocumentProperties + self.m_xDocProps = TextDocument.xTextDocument.getDocumentProperties() self.CharLocale = Helper.getUnoStructValue( TextDocument.xTextDocument, "CharLocale") self.xText = TextDocument.xTextDocument.Text diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.py b/wizards/com/sun/star/wizards/text/TextFieldHandler.py index 80e1abdcb..97d578dd2 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.py +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.py @@ -89,24 +89,32 @@ class TextFieldHandler(object): traceback.print_exc() def __getTextFieldsByProperty( - self, _PropertyName, _aPropertyValue): + self, _PropertyName, _aPropertyValue, _TypeName): try: xProperty = TextFieldHandler.dictTextFields[_aPropertyValue] xPropertySet = xProperty.TextFieldMaster if xPropertySet.PropertySetInfo.hasPropertyByName( _PropertyName): oValue = xPropertySet.getPropertyValue(_PropertyName) - sValue = unicodedata.normalize( - 'NFKD', oValue).encode('ascii','ignore') - if sValue == _aPropertyValue: - return xProperty + if _TypeName == "String": + sValue = unicodedata.normalize( + 'NFKD', oValue).encode('ascii','ignore') + if sValue == _aPropertyValue: + return xProperty + #COMMENTED + '''elif AnyConverter.isShort(oValue): + if _TypeName.equals("Short"): + iShortParam = (_aPropertyValue).shortValue() + ishortValue = AnyConverter.toShort(oValue) + if ishortValue == iShortParam: + xDependentVector.append(oTextField) ''' return None except KeyError, e: return None def changeUserFieldContent(self, _FieldName, _FieldContent): DependentTextFields = self.__getTextFieldsByProperty( - PropertyNames.PROPERTY_NAME, _FieldName) + PropertyNames.PROPERTY_NAME, _FieldName, "String") if DependentTextFields is not None: DependentTextFields.TextFieldMaster.setPropertyValue("Content", _FieldContent) self.refreshTextFields() @@ -155,7 +163,7 @@ class TextFieldHandler(object): def removeUserFieldByContent(self, _FieldContent): try: xDependentTextFields = self.__getTextFieldsByProperty( - "Content", _FieldContent) + "Content", _FieldContent, "String") if xDependentTextFields != None: i = 0 while i < xDependentTextFields.length: @@ -164,3 +172,19 @@ class TextFieldHandler(object): except Exception, e: traceback.print_exc() + + def changeExtendedUserFieldContent(self, UserDataPart, _FieldContent): + try: + xDependentTextFields = self.__getTextFieldsByProperty( + "UserDataType", UserDataPart, "Short") + if xDependentTextFields != None: + i = 0 + while i < xDependentTextFields.length: + xDependentTextFields[i].getTextFieldMaster().setPropertyValue( + "Content", _FieldContent) + i += 1 + + self.refreshTextFields() + except Exception, e: + traceback.print_exc() + diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index 2c7e993c6..fbc1984a3 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -124,6 +124,206 @@ class UnoDialog(object): if iSelIndex != -1: xListBox.selectItemPos(iSelIndex, True) + def insertLabel(self, sName, sPropNames, oPropValues): + try: + oFixedText = self.insertControlModel( + "com.sun.star.awt.UnoControlFixedTextModel", + sName, sPropNames, oPropValues) + oFixedText.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + oLabel = self.xUnoDialog.getControl(sName) + return oLabel + except Exception, ex: + traceback.print_exc() + return None + + def insertButton( + self, sName, iControlKey, xActionListener, sProperties, sValues): + oButtonModel = self.insertControlModel( + "com.sun.star.awt.UnoControlButtonModel", + sName, sProperties, sValues) + xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + xButton = self.xUnoDialog.getControl(sName) + if xActionListener != None: + xButton.addActionListener( + ActionListenerProcAdapter(xActionListener)) + + ControlKey = iControlKey + if self.ControlList != None: + self.ControlList.put(sName, ControlKey) + + return xButton + + def insertCheckBox( + self, sName, iControlKey, xItemListener, sProperties, sValues): + oButtonModel = self.insertControlModel( + "com.sun.star.awt.UnoControlCheckBoxModel", + sName, sProperties, sValues) + oButtonModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + xCheckBox = self.xUnoDialog.getControl(sName) + if xItemListener != None: + xCheckBox.addItemListener( + ItemListenerProcAdapter(xItemListener)) + + ControlKey = iControlKey + if self.ControlList != None: + self.ControlList.put(sName, ControlKey) + + def insertNumericField( + self, sName, iControlKey, xTextListener, sProperties, sValues): + oNumericFieldModel = self.insertControlModel( + "com.sun.star.awt.UnoControlNumericFieldModel", + sName, sProperties, sValues) + oNumericFieldModel.setPropertyValue( + PropertyNames.PROPERTY_NAME, sName) + xNumericField = self.xUnoDialog.getControl(sName) + if xTextListener != None: + xNumericField.addTextListener( + TextListenerProcAdapter(xTextListener)) + + ControlKey = iControlKey + if self.ControlList != None: + self.ControlList.put(sName, ControlKey) + + def insertScrollBar( + self, sName, iControlKey, xAdjustmentListener, sProperties, sValues): + try: + oScrollModel = self.insertControlModel( + "com.sun.star.awt.UnoControlScrollBarModel", + sName, sProperties, sValues) + oScrollModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + xScrollBar = self.xUnoDialog.getControl(sName) + if xAdjustmentListener != None: + xScrollBar.addAdjustmentListener(xAdjustmentListener) + + ControlKey = iControlKey + if self.ControlList != None: + self.ControlList.put(sName, ControlKey) + + return xScrollBar + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + return None + + def insertTextField( + self, sName, iControlKey, xTextListener, sProperties, sValues): + xTextBox = insertEditField( + "com.sun.star.awt.UnoControlEditModel", sName, iControlKey, + xTextListener, sProperties, sValues) + return xTextBox + + def insertFormattedField( + self, sName, iControlKey, xTextListener, sProperties, sValues): + xTextBox = insertEditField( + "com.sun.star.awt.UnoControlFormattedFieldModel", sName, + iControlKey, xTextListener, sProperties, sValues) + return xTextBox + + def insertEditField( + self, ServiceName, sName, iControlKey, + xTextListener, sProperties, sValues): + + try: + xTextModel = self.insertControlModel( + ServiceName, sName, sProperties, sValues) + xTextModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + xTextBox = self.xUnoDialog.getControl(sName) + if xTextListener != None: + xTextBox.addTextListener(TextListenerProcAdapter(xTextListener)) + + ControlKey = iControlKey + self.ControlList.put(sName, ControlKey) + return xTextBox + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + return None + + def insertListBox( + self, sName, iControlKey, xActionListener, + xItemListener, sProperties, sValues): + xListBoxModel = self.insertControlModel( + "com.sun.star.awt.UnoControlListBoxModel", + sName, sProperties, sValues) + xListBoxModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + xListBox = self.xUnoDialog.getControl(sName) + if xItemListener != None: + xListBox.addItemListener(ItemListenerProcAdapter(xItemListener)) + + if xActionListener != None: + xListBox.addActionListener( + ActionListenerProcAdapter(xActionListener)) + + ControlKey = iControlKey + self.ControlList.put(sName, ControlKey) + return xListBox + + def insertComboBox( + self, sName, iControlKey, xActionListener, xTextListener, + xItemListener, sProperties, sValues): + xComboBoxModel = self.insertControlModel( + "com.sun.star.awt.UnoControlComboBoxModel", + sName, sProperties, sValues) + xComboBoxModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + xComboBox = self.xUnoDialog.getControl(sName) + if xItemListener != None: + xComboBox.addItemListener(ItemListenerProcAdapter(xItemListener)) + + if xTextListener != None: + xComboBox.addTextListener(TextListenerProcAdapter(xTextListener)) + + if xActionListener != None: + xComboBox.addActionListener( + ActionListenerProcAdapter(xActionListener)) + + ControlKey = iControlKey + self.ControlList.put(sName, ControlKey) + return xComboBox + + def insertRadioButton( + self, sName, iControlKey, xItemListener, sProperties, sValues): + try: + xRadioButton = insertRadioButton( + sName, iControlKey, sProperties, sValues) + if xItemListener != None: + xRadioButton.addItemListener( + ItemListenerProcAdapter(xItemListener)) + + return xRadioButton + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + return None + + def insertRadioButton( + self, sName, iControlKey, xActionListener, sProperties, sValues): + try: + xButton = insertRadioButton( + sName, iControlKey, sProperties, sValues) + if xActionListener != None: + xButton.addActionListener( + ActionListenerProcAdapter(xActionListener)) + + return xButton + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + return None + + def insertRadioButton(self, sName, iControlKey, sProperties, sValues): + xRadioButton = insertRadioButton(sName, sProperties, sValues) + ControlKey = iControlKey + self.ControlList.put(sName, ControlKey) + return xRadioButton + + def insertRadioButton(self, sName, sProperties, sValues): + try: + oRadioButtonModel = self.insertControlModel( + "com.sun.star.awt.UnoControlRadioButtonModel", + sName, sProperties, sValues) + oRadioButtonModel.setPropertyValue( + PropertyNames.PROPERTY_NAME, sName) + xRadioButton = self.xUnoDialog.getControl(sName) + return xRadioButton + except com.sun.star.uno.Exception, exception: + traceback.print_exc() + return None ''' The problem with setting the visibility of controls is that changing the current step of a dialog will automatically @@ -175,6 +375,7 @@ class UnoDialog(object): # repaints the currentDialogStep + def repaintDialogStep(self): try: ncurstep = int(Helper.getUnoPropertyValue( @@ -186,20 +387,15 @@ class UnoDialog(object): except com.sun.star.uno.Exception, exception: traceback.print_exc() - def insertControlModel( - self, serviceName, componentName, sPropNames, oPropValues): + def insertControlModel(self, ServiceName, sName, sProperties, sValues): try: - xControlModel = self.xDialogModel.createInstance(serviceName) - Helper.setUnoPropertyValues( - xControlModel, sPropNames, oPropValues) - self.xDialogModel.insertByName(componentName, xControlModel) - Helper.setUnoPropertyValue(xControlModel, - PropertyNames.PROPERTY_NAME, componentName) - except Exception, ex: + xControlModel = self.xDialogModel.createInstance(ServiceName) + Helper.setUnoPropertyValues(xControlModel, sProperties, sValues) + self.xDialogModel.insertByName(sName, xControlModel) + return xControlModel + except Exception, exception: traceback.print_exc() - - aObj = self.xUnoDialog.getControl(componentName) - return aObj + return None def setFocus(self, ControlName): oFocusControl = self.xUnoDialog.getControl(ControlName) @@ -348,3 +544,9 @@ class UnoDialog(object): def addResourceHandler(self, _Unit, _Module): self.m_oResource = Resource(self.xMSF, _Unit, _Module) + + def setInitialTabindex(self, _istep): + return (short)(_istep * 100) + + def getListBoxLineCount(self): + return 20 diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py index 8986b3a96..0bf868687 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py @@ -25,7 +25,7 @@ class UnoDialog2(UnoDialog): def insertButton( self, sName, actionPerformed, sPropNames, oPropValues, listener): - xButton = self.insertControlModel( + xButton = self.insertControlModel2( "com.sun.star.awt.UnoControlButtonModel", sName, sPropNames, oPropValues) if actionPerformed is not None: @@ -37,7 +37,7 @@ class UnoDialog2(UnoDialog): def insertImageButton( self, sName, actionPerformed, sPropNames, oPropValues, listener): - xButton = self.insertControlModel( + xButton = self.insertControlModel2( "com.sun.star.awt.UnoControlButtonModel", sName, sPropNames, oPropValues) if actionPerformed is not None: @@ -49,7 +49,7 @@ class UnoDialog2(UnoDialog): def insertCheckBox( self, sName, itemChanged, sPropNames, oPropValues, listener): - xCheckBox = self.insertControlModel( + xCheckBox = self.insertControlModel2( "com.sun.star.awt.UnoControlCheckBoxModel", sName, sPropNames, oPropValues) if itemChanged is not None: @@ -61,7 +61,7 @@ class UnoDialog2(UnoDialog): def insertComboBox( self, sName, actionPerformed, itemChanged, textChanged, sPropNames, oPropValues, listener): - xComboBox = self.insertControlModel( + xComboBox = self.insertControlModel2( "com.sun.star.awt.UnoControlComboBoxModel", sName, sPropNames, oPropValues) if actionPerformed is not None: @@ -82,7 +82,7 @@ class UnoDialog2(UnoDialog): def insertListBox( self, sName, actionPerformed, itemChanged, sPropNames, oPropValues, listener): - xListBox = self.insertControlModel( + xListBox = self.insertControlModel2( "com.sun.star.awt.UnoControlListBoxModel", sName, sPropNames, oPropValues) @@ -98,7 +98,7 @@ class UnoDialog2(UnoDialog): def insertRadioButton( self, sName, itemChanged, sPropNames, oPropValues, listener): - xRadioButton = self.insertControlModel( + xRadioButton = self.insertControlModel2( "com.sun.star.awt.UnoControlRadioButtonModel", sName, sPropNames, oPropValues) if itemChanged is not None: @@ -106,10 +106,11 @@ class UnoDialog2(UnoDialog): xRadioButton.addItemListener( ItemListenerProcAdapter(itemChanged)) + return xRadioButton def insertTitledBox(self, sName, sPropNames, oPropValues): - oTitledBox = self.insertControlModel( + oTitledBox = self.insertControlModel2( "com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues) return oTitledBox @@ -121,7 +122,7 @@ class UnoDialog2(UnoDialog): sPropNames, oPropValues, listener) def insertImage(self, sName, sPropNames, oPropValues): - return self.insertControlModel( + return self.insertControlModel2( "com.sun.star.awt.UnoControlImageControlModel", sName, sPropNames, oPropValues) @@ -146,11 +147,12 @@ class UnoDialog2(UnoDialog): def insertEditField( self, sName, sTextChanged, sModelClass, sPropNames, oPropValues, listener): - xField = self.insertControlModel(sModelClass, + xField = self.insertControlModel2(sModelClass, sName, sPropNames, oPropValues) if sTextChanged is not None: sTextChanged = getattr(listener, sTextChanged) xField.addTextListener(TextListenerProcAdapter(sTextChanged)) + return xField def insertFileControl( @@ -201,36 +203,55 @@ class UnoDialog2(UnoDialog): sPropNames, oPropValues, listener) def insertFixedLine(self, sName, sPropNames, oPropValues): - oLine = self.insertControlModel( + oLine = self.insertControlModel2( "com.sun.star.awt.UnoControlFixedLineModel", sName, sPropNames, oPropValues) return oLine - - def insertLabel(self, sName, sPropNames, oPropValues): - oFixedText = self.insertControlModel( - "com.sun.star.awt.UnoControlFixedTextModel", - sName, sPropNames, oPropValues) - return oFixedText - def insertScrollBar(self, sName, sPropNames, oPropValues): - oScrollBar = self.insertControlModel( + oScrollBar = self.insertControlModel2( "com.sun.star.awt.UnoControlScrollBarModel", sName, sPropNames, oPropValues) return oScrollBar def insertProgressBar(self, sName, sPropNames, oPropValues): - oProgressBar = self.insertControlModel( + oProgressBar = self.insertControlModel2( "com.sun.star.awt.UnoControlProgressBarModel", sName, sPropNames, oPropValues) return oProgressBar def insertGroupBox(self, sName, sPropNames, oPropValues): - oGroupBox = self.insertControlModel( + oGroupBox = self.insertControlModel2( "com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues) return oGroupBox + def insertControlModel2( + self, serviceName, componentName, sPropNames, oPropValues): + try: + xControlModel = self.insertControlModel( + serviceName, componentName, (), ()) + Helper.setUnoPropertyValues( + xControlModel, sPropNames, oPropValues) + Helper.setUnoPropertyValue(xControlModel, + PropertyNames.PROPERTY_NAME, componentName) + except Exception, ex: + traceback.print_exc() + + aObj = self.xUnoDialog.getControl(componentName) + return aObj + + def setControlPropertiesDebug(self, model, names, values): + i = 0 + while i < len(names): + print " Settings: ", names[i] + Helper.setUnoPropertyValue(model, names[i], values[i]) + i += 1 + + def getControlModel(self, unoControl): + obj = unoControl.Model + return obj + def showMessageBox(self, windowServiceName, windowAttribute, MessageText): return SystemDialog.showMessageBox( xMSF, self.xControl.Peer, diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index 9487d4077..ee0f7c626 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -43,6 +43,7 @@ class WizardDialog(UnoDialog2): self.sMsgEndAutopilot = self.__oWizardResource.getResText( UIConsts.RID_DB_COMMON + 33) self.oRoadmap = None + #self.vetos = VetoableChangeSupport.VetoableChangeSupport_unknown(this) def getResource(self): return self.__oWizardResource @@ -73,7 +74,7 @@ class WizardDialog(UnoDialog2): return False def setCurrentRoadmapItemID(self, ID): - if self.oRoadmap is not None: + if self.oRoadmap != None: nCurItemID = self.getCurrentRoadmapItemID() if nCurItemID != ID: Helper.setUnoPropertyValue(self.oRoadmap, "CurrentItemID",ID) @@ -94,8 +95,7 @@ class WizardDialog(UnoDialog2): # the roadmap control has got no real TabIndex ever # that is not correct, but changing this would need time, # so it is used without TabIndex as before - - xRoadmapControl = self.insertControlModel( + self.oRoadmap = self.insertControlModel( "com.sun.star.awt.UnoControlRoadmapModel", "rdmNavi", (PropertyNames.PROPERTY_HEIGHT, @@ -106,9 +106,12 @@ class WizardDialog(UnoDialog2): PropertyNames.PROPERTY_WIDTH), ((iDialogHeight - 26), 0, 0, 0, 0, True, 85)) - self.oRoadmap = xRoadmapControl.Model + self.oRoadmap.setPropertyValue( + PropertyNames.PROPERTY_NAME, "rdmNavi") + + self.xRoadmapControl = self.xUnoDialog.getControl("rdmNavi") method = getattr(self, "itemStateChanged") - xRoadmapControl.addItemListener( + self.xRoadmapControl.addItemListener( ItemListenerProcAdapter(method)) Helper.setUnoPropertyValue( @@ -143,6 +146,9 @@ class WizardDialog(UnoDialog2): traceback.print_exc() return -1 + def getRMItemCount(self): + return self.oRoadmap.Count + def getRoadmapItemByID(self, _ID): try: getByIndex = self.oRoadmap.getByIndex @@ -196,6 +202,12 @@ class WizardDialog(UnoDialog2): self.enableNextButton(self.getNextAvailableStep() > 0) self.enableBackButton(nNewStep != 1) + def iscompleted(self, _ndialogpage): + return False + + def ismodified(self, _ndialogpage): + return False + def drawNaviBar(self): try: curtabindex = UIConsts.SOFIRSTWIZARDNAVITABINDEX @@ -376,7 +388,9 @@ class WizardDialog(UnoDialog2): while i <= self.nMaxStep: if self.isStepEnabled(i): return i + i += 1 + return -1 def gotoNextAvailableStep(self): -- cgit v1.2.3 From 0ba3783a6f60988725866dcd9b546c4466be7193 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Sun, 17 Jul 2011 14:29:41 +0200 Subject: remove gid_Module_Langpack_Binfilter its content will be packed together with other binfilter files --- setup_native/source/packinfo/packinfo_office_lang.txt | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/setup_native/source/packinfo/packinfo_office_lang.txt b/setup_native/source/packinfo/packinfo_office_lang.txt index d004d4f9f..0e2e05c4d 100755 --- a/setup_native/source/packinfo/packinfo_office_lang.txt +++ b/setup_native/source/packinfo/packinfo_office_lang.txt @@ -160,22 +160,6 @@ packageversion = "%OOOPACKAGEVERSION" pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-base" End -Start -module = "gid_Module_Langpack_Binfilter" -solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-binfilter" -solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING" -packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-binfilter" -provides = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-binfilter" -requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING" -copyright = "1999-2009 by OpenOffice.org" -solariscopyright = "solariscopyrightfile" -vendor = "The Document Foundation" -description = "Legacy filters (e.g. StarOffice 5.2) for LibreOffice %OOOBASEVERSION, language %LANGUAGESTRING" -destpath = "/opt" -packageversion = "%OOOPACKAGEVERSION" -pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-binfilter" -End - Start module = "gid_Module_Langpack_Onlineupdate" solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-onlineupd" -- cgit v1.2.3 From 07b4148f70cb785242fb484a2d914a20da93bc1e Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Sun, 17 Jul 2011 18:29:53 +0200 Subject: remove BrOffice branding --- setup_native/source/java/brofficeorg_setup.gif | Bin 3115 -> 0 bytes setup_native/source/mac/broffice/DS_Store | Bin 12292 -> 0 bytes setup_native/source/mac/broffice/osxdndinstall.png | Bin 32890 -> 0 bytes setup_native/source/mac/broffice/osxdndinstall.svg | 1765 -------------------- .../source/mac/broffice/osxdndinstall_nologo.png | Bin 32890 -> 0 bytes 5 files changed, 1765 deletions(-) delete mode 100644 setup_native/source/java/brofficeorg_setup.gif delete mode 100644 setup_native/source/mac/broffice/DS_Store delete mode 100644 setup_native/source/mac/broffice/osxdndinstall.png delete mode 100644 setup_native/source/mac/broffice/osxdndinstall.svg delete mode 100644 setup_native/source/mac/broffice/osxdndinstall_nologo.png diff --git a/setup_native/source/java/brofficeorg_setup.gif b/setup_native/source/java/brofficeorg_setup.gif deleted file mode 100644 index 570d8e462..000000000 Binary files a/setup_native/source/java/brofficeorg_setup.gif and /dev/null differ diff --git a/setup_native/source/mac/broffice/DS_Store b/setup_native/source/mac/broffice/DS_Store deleted file mode 100644 index a534e3bed..000000000 Binary files a/setup_native/source/mac/broffice/DS_Store and /dev/null differ diff --git a/setup_native/source/mac/broffice/osxdndinstall.png b/setup_native/source/mac/broffice/osxdndinstall.png deleted file mode 100644 index cab66ea99..000000000 Binary files a/setup_native/source/mac/broffice/osxdndinstall.png and /dev/null differ diff --git a/setup_native/source/mac/broffice/osxdndinstall.svg b/setup_native/source/mac/broffice/osxdndinstall.svg deleted file mode 100644 index 7b7c6c6d7..000000000 --- a/setup_native/source/mac/broffice/osxdndinstall.svg +++ /dev/null @@ -1,1765 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/setup_native/source/mac/broffice/osxdndinstall_nologo.png b/setup_native/source/mac/broffice/osxdndinstall_nologo.png deleted file mode 100644 index cab66ea99..000000000 Binary files a/setup_native/source/mac/broffice/osxdndinstall_nologo.png and /dev/null differ -- cgit v1.2.3 From 7a1e293b35dfabfad0c887a5774609dbf442c9a9 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Sun, 17 Jul 2011 18:30:24 +0200 Subject: remove unused OOo brand image --- setup_native/prj/d.lst | 1 - setup_native/source/java/openofficeorg_setup.gif | Bin 6641 -> 0 bytes 2 files changed, 1 deletion(-) delete mode 100644 setup_native/source/java/openofficeorg_setup.gif diff --git a/setup_native/prj/d.lst b/setup_native/prj/d.lst index deac2fd7f..ebee2ecb5 100644 --- a/setup_native/prj/d.lst +++ b/setup_native/prj/d.lst @@ -33,7 +33,6 @@ mkdir: %_DEST%\bin\osolsmf ..\source\mac\ooo\osxdndinstall_nologo.png %_DEST%\bin\osl\osxdndinstall_nologo.png ..\source\mac\ooo\DS_Store %_DEST%\bin\osl\DS_Store ..\source\mac\ooo\DS_Store_Langpack %_DEST%\bin\osl\DS_Store_Langpack -..\source\java\openofficeorg_setup.gif %_DEST%\bin\osl\Setup.gif ..\source\java\javaversion.dat %_DEST%\bin\javaversion.dat ..\source\java\javaversion2.dat %_DEST%\bin\javaversion2.dat ..\source\opensolaris\bundledextensions\installed %_DEST%\bin\osolsmf\installed diff --git a/setup_native/source/java/openofficeorg_setup.gif b/setup_native/source/java/openofficeorg_setup.gif deleted file mode 100644 index 8beb9e12b..000000000 Binary files a/setup_native/source/java/openofficeorg_setup.gif and /dev/null differ -- cgit v1.2.3 From 067739ebe567a53d270e994fcee54d285b075058 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Mon, 18 Jul 2011 11:09:34 +0100 Subject: adapt to new InsertAutomaticEntryColor method, to show automatic color --- cui/source/options/optcolor.cxx | 7 ++++--- cui/source/tabpages/chardlg.cxx | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 1308e3d8b..b41c11530 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -935,7 +935,6 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe } XColorTable aColorTable( SvtPathOptions().GetPalettePath() ); - aColorBoxes[0]->InsertAutomaticEntry(); for( sal_Int32 i = 0; i < aColorTable.Count(); i++ ) { XColorEntry* pEntry = aColorTable.GetColor(i); @@ -944,7 +943,7 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe aColorBoxes[0]->SetHelpId( aColorLBHids[0] ); - OSL_ENSURE( nCount < sal_Int32(sizeof(aColorLBHids)/sizeof(aColorLBHids[0])), "too few helpIDs for color listboxes" ); + OSL_ENSURE( nCount < sal_Int32(sizeof(aColorLBHids)/sizeof(aColorLBHids[0])), "too few helpIDs for color listboxes" ); for( sal_Int32 i = 1; i < nCount; i++ ) { if(aColorBoxes[i]) @@ -952,8 +951,10 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe aColorBoxes[i]->CopyEntries( *aColorBoxes[0] ); if( i < sal_Int32(sizeof(aColorLBHids)/sizeof(aColorLBHids[0])) ) aColorBoxes[i]->SetHelpId( aColorLBHids[i] ); + aColorBoxes[i]->InsertAutomaticEntryColor(ColorConfig::GetDefaultColor((ColorConfigEntry) i)); } } + aColorBoxes[0]->InsertAutomaticEntryColor(ColorConfig::GetDefaultColor((ColorConfigEntry) 0)); } ColorConfigWindow_Impl::~ColorConfigWindow_Impl() @@ -1414,7 +1415,7 @@ IMPL_LINK(ColorConfigCtrl_Impl, ColorHdl, ColorListBox*, pBox) if(pBox && aScrollWindow.aColorBoxes[i] == pBox) { ColorConfigValue aColorEntry = pColorConfig->GetColorValue(ColorConfigEntry(i)); - if(!pBox->GetSelectEntryPos()) + if(pBox->IsAutomaticSelected()) { aColorEntry.nColor = COL_AUTO; if(aScrollWindow.aWindows[i]) diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 3bdb44528..daf8b6d6d 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1553,9 +1553,9 @@ void SvxCharEffectsPage::Initialize() if ( !pFrame || SFX_ITEM_DEFAULT > pFrame->GetBindings().QueryState( SID_ATTR_AUTO_COLOR_INVALID, pDummy ) ) { - m_aUnderlineColorLB.InsertAutomaticEntry(); - m_aOverlineColorLB.InsertAutomaticEntry(); - m_aFontColorLB.InsertAutomaticEntry(); + m_aUnderlineColorLB.InsertAutomaticEntryColor( Color( COL_AUTO ) ); + m_aOverlineColorLB.InsertAutomaticEntryColor( Color( COL_AUTO ) ); + m_aFontColorLB.InsertAutomaticEntryColor( Color( COL_AUTO ) ); } } for ( long i = 0; i < pColorTable->Count(); i++ ) -- cgit v1.2.3 From 867f395ffe637948e5b07ae8d444562b8870b846 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 17 Jul 2011 22:52:33 +0100 Subject: ByteString->rtl::OStringBuffer --- extensions/source/scanner/sanedlg.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index a0aedbbd7..9d6ef73bd 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -39,6 +39,7 @@ #include #include #include +#include ResId SaneResId( sal_uInt32 nID ) { @@ -1270,9 +1271,10 @@ void SaneDlg::SaveState() sal_Bool bValue; if( mrSane.GetOptionValue( nOption, bValue ) ) { - ByteString aString( "BOOL=" ); - aString += ByteString::CreateFromInt32(bValue); - aConfig.WriteKey( aOption, aString ); + rtl::OStringBuffer aString(RTL_CONSTASCII_STRINGPARAM( + "BOOL=")); + aString.append(static_cast(bValue)); + aConfig.WriteKey(aOption, aString.makeStringAndClear()); } } break; -- cgit v1.2.3 From fba6f775870fbb0bc5550d3ce7957649a0306889 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Tue, 19 Jul 2011 11:29:26 +0200 Subject: remove duplicated en-US entries --- cui/source/tabpages/autocdlg.src | 2 -- 1 file changed, 2 deletions(-) diff --git a/cui/source/tabpages/autocdlg.src b/cui/source/tabpages/autocdlg.src index e483e1ad4..3076af0e8 100644 --- a/cui/source/tabpages/autocdlg.src +++ b/cui/source/tabpages/autocdlg.src @@ -434,7 +434,6 @@ TabPage RID_OFAPAGE_AUTOCORR_EXCEPT Pos = MAP_APPFONT ( 137 , 78 ) ; Size = MAP_APPFONT ( 111 , 10 ) ; Text [ en-US ] = "~AutoInclude"; - Text [ en-US ] = "~AutoInclude" ; TabStop = TRUE ; }; FixedLine FL_DOUBLECAPS @@ -483,7 +482,6 @@ TabPage RID_OFAPAGE_AUTOCORR_EXCEPT Pos = MAP_APPFONT ( 137 , 169 ) ; Size = MAP_APPFONT ( 111 , 10 ) ; Text [ en-US ] = "A~utoInclude"; - Text [ en-US ] = "A~utoInclude" ; }; String STR_PB_NEWABBREV { -- cgit v1.2.3 From c53c4610cbd815fadb9d9f7ae81009c1eadda6a3 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 19 Jul 2011 22:18:43 +0100 Subject: remove unused ByteString using methods --- automation/inc/automation/communi.hxx | 1 - automation/inc/automation/simplecm.hxx | 16 ---------------- automation/source/communi/communi.cxx | 7 ------- automation/source/simplecm/simplecm.cxx | 17 ----------------- 4 files changed, 41 deletions(-) diff --git a/automation/inc/automation/communi.hxx b/automation/inc/automation/communi.hxx index f9b1242a5..7b0ceb81b 100644 --- a/automation/inc/automation/communi.hxx +++ b/automation/inc/automation/communi.hxx @@ -164,7 +164,6 @@ class CommunicationManagerClientViaSocket : public CommunicationManagerClient, C public: using CommunicationManager::StartCommunication; - CommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel = sal_False ); CommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel = sal_False ); virtual ~CommunicationManagerClientViaSocket(); diff --git a/automation/inc/automation/simplecm.hxx b/automation/inc/automation/simplecm.hxx index d13abf4ba..b5b22418b 100644 --- a/automation/inc/automation/simplecm.hxx +++ b/automation/inc/automation/simplecm.hxx @@ -366,22 +366,6 @@ protected: virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS )=0; }; -class SingleCommunicationManagerClientViaSocket : public SingleCommunicationManager, public ICommunicationManagerClient, CommonSocketFunctions -{ -public: - using CommunicationManager::StartCommunication; - - SingleCommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel = sal_False ); - SingleCommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel = sal_False ); - virtual sal_Bool StartCommunication(){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHostToTalk, nPortToTalk );} - virtual sal_Bool StartCommunication( ByteString aHost, sal_uLong nPort ){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHost, nPort );} -private: - ByteString aHostToTalk; - sal_uLong nPortToTalk; -protected: - virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); } -}; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx index f7da08fff..876ae1192 100644 --- a/automation/source/communi/communi.cxx +++ b/automation/source/communi/communi.cxx @@ -567,13 +567,6 @@ IMPL_LINK( CommunicationManagerServerAcceptThread, AddConnection, void*, EMPTYAR return 1; } -CommunicationManagerClientViaSocket::CommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel ) -: CommunicationManagerClient( bUseMultiChannel ) -, aHostToTalk( aHost ) -, nPortToTalk( nPort ) -{ -} - CommunicationManagerClientViaSocket::CommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel ) : CommunicationManagerClient( bUseMultiChannel ) , aHostToTalk( "" ) diff --git a/automation/source/simplecm/simplecm.cxx b/automation/source/simplecm/simplecm.cxx index b9597c3ab..a0a11db86 100644 --- a/automation/source/simplecm/simplecm.cxx +++ b/automation/source/simplecm/simplecm.cxx @@ -654,23 +654,6 @@ void SingleCommunicationManager::DestroyingLink( CommunicationLink *pCL ) pCL->InvalidateManager(); } - -SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel ) -: SingleCommunicationManager( bUseMultiChannel ) -, aHostToTalk( aHost ) -, nPortToTalk( nPort ) -{ -} - - -SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel ) -: SingleCommunicationManager( bUseMultiChannel ) -, aHostToTalk() -, nPortToTalk( 0 ) -{ -} - - sal_Bool CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, sal_uLong nPort ) { osl::SocketAddr Addr( rtl::OUString( UniString( aHost, RTL_TEXTENCODING_UTF8 ) ), nPort ); -- cgit v1.2.3 From 9fd52d35c1e49ce7d3fdba3825a862e875aa41c3 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 21 Jul 2011 09:26:51 +0100 Subject: unused methods --- automation/inc/automation/simplecm.hxx | 31 -------- automation/source/simplecm/simplecm.cxx | 132 -------------------------------- 2 files changed, 163 deletions(-) diff --git a/automation/inc/automation/simplecm.hxx b/automation/inc/automation/simplecm.hxx index b5b22418b..69c75cbf2 100644 --- a/automation/inc/automation/simplecm.hxx +++ b/automation/inc/automation/simplecm.hxx @@ -114,14 +114,12 @@ private: class PacketHandler; class CommunicationManager; -class SingleCommunicationManager; class MultiCommunicationManager; class CommunicationManagerServerAcceptThread; class CommunicationLink : public SvRefBase { protected: friend class CommunicationManager; - friend class SingleCommunicationManager; friend class MultiCommunicationManager; friend class CommunicationManagerServerAcceptThread; // Darf nicht abger�umt werden zwischen Empfang des Streams und ende des Callbacks @@ -287,24 +285,6 @@ private: sal_Bool bIsMultiChannel; }; -class SingleCommunicationManager : public CommunicationManager -{ -public: - SingleCommunicationManager( sal_Bool bUseMultiChannel = sal_False ); - virtual ~SingleCommunicationManager(); - virtual sal_Bool StopCommunication(); // H�lt alle CommunicationLinks an - virtual sal_Bool IsLinkValid( CommunicationLink* pCL ); - virtual sal_uInt16 GetCommunicationLinkCount(); - virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr ); - -protected: - virtual void CallConnectionOpened( CommunicationLink* pCL ); - virtual void CallConnectionClosed( CommunicationLink* pCL ); - CommunicationLinkRef xActiveLink; - CommunicationLink *pInactiveLink; - virtual void DestroyingLink( CommunicationLink *pCL ); // Link tr�gt sich im Destruktor aus -}; - class ICommunicationManagerClient { friend class CommonSocketFunctions; @@ -347,17 +327,6 @@ protected: void SetNewPacketAsCurrent(); }; -class SimpleCommunicationLinkViaSocketWithReceiveCallbacks : public SimpleCommunicationLinkViaSocket -{ -public: - SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, osl::StreamSocket* pSocket ); - ~SimpleCommunicationLinkViaSocketWithReceiveCallbacks(); - virtual sal_Bool ReceiveDataStream(); -protected: - virtual sal_Bool ShutdownCommunication(); /// Really stop the Communication - virtual void WaitForShutdown(); -}; - class CommonSocketFunctions { public: diff --git a/automation/source/simplecm/simplecm.cxx b/automation/source/simplecm/simplecm.cxx index a0a11db86..132296890 100644 --- a/automation/source/simplecm/simplecm.cxx +++ b/automation/source/simplecm/simplecm.cxx @@ -343,17 +343,6 @@ sal_Bool SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandsha return !bWasError; } -SimpleCommunicationLinkViaSocketWithReceiveCallbacks::SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, osl::StreamSocket* pSocket ) -: SimpleCommunicationLinkViaSocket( pMan, pSocket ) -{ -} - -SimpleCommunicationLinkViaSocketWithReceiveCallbacks::~SimpleCommunicationLinkViaSocketWithReceiveCallbacks() -{ - if ( pMyManager && pMyManager->IsLinkValid( this ) && !bIsRequestShutdownPending ) - StopCommunication(); -} - bool SimpleCommunicationLinkViaSocket::IsReceiveReady() { if ( !IsCommunicationError() ) @@ -365,50 +354,6 @@ bool SimpleCommunicationLinkViaSocket::IsReceiveReady() return false; } -void SimpleCommunicationLinkViaSocketWithReceiveCallbacks::WaitForShutdown() -{ - CommunicationLinkRef rHold(this); // avoid deleting this link before the end of the method - - while( pMyManager && !IsCommunicationError() && IsReceiveReady()) - ReceiveDataStream(); -} - -sal_Bool SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ReceiveDataStream() -{ - if ( DoReceiveDataStream() ) - { - SetNewPacketAsCurrent(); - StartCallback(); - DataReceived(); - return sal_True; - } - else - { - StartCallback(); - ShutdownCommunication(); - return sal_False; - } -} - -sal_Bool SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication() -{ - if ( GetStreamSocket() ) - GetStreamSocket()->shutdown(); - - if ( GetStreamSocket() ) - GetStreamSocket()->close(); - - osl::StreamSocket* pTempSocket = GetStreamSocket(); - SetStreamSocket( NULL ); - delete pTempSocket; - - ConnectionClosed(); - - return sal_True; -} - - - CommunicationManager::CommunicationManager( sal_Bool bUseMultiChannel ) : nInfoType( CM_NONE ) , bIsCommunicationRunning( sal_False ) @@ -577,83 +522,6 @@ void CommunicationManager::SetApplication( const ByteString& aApp, sal_Bool bRun } } - - -SingleCommunicationManager::SingleCommunicationManager( sal_Bool bUseMultiChannel ) -: CommunicationManager( bUseMultiChannel ) -{ - xActiveLink = NULL; - pInactiveLink = NULL; -} - -SingleCommunicationManager::~SingleCommunicationManager() -{ - StopCommunication(); - if ( pInactiveLink ) - pInactiveLink->InvalidateManager(); -} - -sal_Bool SingleCommunicationManager::StopCommunication() -{ - if ( xActiveLink.Is() ) - { - sal_Bool bSuccess = xActiveLink->StopCommunication(); - if ( pInactiveLink ) - pInactiveLink->InvalidateManager(); - pInactiveLink = xActiveLink; - xActiveLink.Clear(); - return bSuccess; - } - return sal_True; -} - -sal_Bool SingleCommunicationManager::IsLinkValid( CommunicationLink* pCL ) -{ - return &xActiveLink == pCL; -} - -sal_uInt16 SingleCommunicationManager::GetCommunicationLinkCount() -{ - return IsCommunicationRunning()?1:0; -} - -CommunicationLinkRef SingleCommunicationManager::GetCommunicationLink( sal_uInt16 ) -{ - return xActiveLink; -} - -void SingleCommunicationManager::CallConnectionOpened( CommunicationLink* pCL ) -{ - DBG_ASSERT( !xActiveLink.Is(), "Es ist bereits ein CommunicationLink aktiv"); - if ( xActiveLink.Is() ) - { - if ( pInactiveLink ) - pInactiveLink->InvalidateManager(); - pInactiveLink = xActiveLink; - xActiveLink->StopCommunication(); // Den alten Link brutal abw�rgen - } - xActiveLink = pCL; - CommunicationManager::CallConnectionOpened( pCL ); -} - -void SingleCommunicationManager::CallConnectionClosed( CommunicationLink* pCL ) -{ - CommunicationManager::CallConnectionClosed( pCL ); - - DBG_ASSERT( pCL == xActiveLink, "SingleCommunicationManager::CallConnectionClosed mit fremdem Link"); - if ( pInactiveLink ) - pInactiveLink->InvalidateManager(); - pInactiveLink = xActiveLink; - xActiveLink.Clear(); - bIsCommunicationRunning = sal_False; -} - -void SingleCommunicationManager::DestroyingLink( CommunicationLink *pCL ) -{ - pInactiveLink = NULL; - pCL->InvalidateManager(); -} - sal_Bool CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, sal_uLong nPort ) { osl::SocketAddr Addr( rtl::OUString( UniString( aHost, RTL_TEXTENCODING_UTF8 ) ), nPort ); -- cgit v1.2.3 From 3373a1b4df4235dfcba12c545795b4befef1906c Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 21 Jul 2011 13:02:34 +0300 Subject: Make compatible with windres (uppercase keywords) --- extensions/source/nsplugin/source/nsplugin.rc | 6 +++--- extensions/source/nsplugin/source/nsplugin_oo.rc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/source/nsplugin/source/nsplugin.rc b/extensions/source/nsplugin/source/nsplugin.rc index 7d4b60b5b..ee7107a43 100644 --- a/extensions/source/nsplugin/source/nsplugin.rc +++ b/extensions/source/nsplugin/source/nsplugin.rc @@ -24,7 +24,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#define ADDITIONAL_VERINFO1 value "FileExtents", "sdc|sds|sda|sdd|sdp|smf|vor|sgl|sdw|sxc|stc|sxd|std|sxi|sti|sxm|sxw|sxg|stw|odt|ott|odm|oth|ods|ots|odg|otg|odp|otp|odf\0"\ - value "FileOpenName", "StarCalc 3.0 - 5.0|StarChart 3.0 - 5.0|StarDraw 3.0 - 5.0|StarImpress 3.0 - 5.0|StarImpress-packed 3.0 - 5.0|StarMath 3.0 - 5.0|StarWriter Template 3.0 - 5.0|StarWriter Global 3.0 - 5.0|StarWriter 3.0 - 5.0|StarOffice 6.0/7 Spreadsheet|StarOffice 6.0/7 Spreadsheet Template|StarOffice 6.0/7 Drawing|StarOffice 6.0/7 Drawing Template|StarOffice 6.0/7 Presentation|StarOffice 6.0/7 Presentation Template|StarOffice 6.0/7 Formula|StarOffice 6.0/7 Text Document|StarOffice 6.0/7 Master Document|StarOffice 6.0/7 Text Document Template|OpenDocument Text|OpenDocument Text Template|OpenDocument Master Document|HTML Document Template|OpenDocument Spreadsheet|OpenDocument Spreadsheet Template|OpenDocument Drawing|OpenDocument Drawing Template|OpenDocument Presentation|OpenDocument Presentation Template|OpenDocument Formula\0" -#define ADDITIONAL_VERINFO2 value "FileDescription", "Oracle Open Office Plug-in handles all its documents" value "ProductName", "Oracle Open Office Plug-in" value "MIMEType", "application/vnd.stardivision.calc|application/vnd.stardivision.chart|application/vnd.stardivision.draw|application/vnd.stardivision.impress|application/vnd.stardivision.impress-packed|application/vnd.stardivision.math|application/vnd.stardivision.writer|application/vnd.stardivision.writer-global|application/vnd.staroffice.writer|application/vnd.sun.xml.calc|application/vnd.sun.xml.calc.template|application/vnd.sun.xml.draw|application/vnd.sun.xml.draw.template|" +#define ADDITIONAL_VERINFO1 VALUE "FileExtents", "sdc|sds|sda|sdd|sdp|smf|vor|sgl|sdw|sxc|stc|sxd|std|sxi|sti|sxm|sxw|sxg|stw|odt|ott|odm|oth|ods|ots|odg|otg|odp|otp|odf\0"\ + VALUE "FileOpenName", "StarCalc 3.0 - 5.0|StarChart 3.0 - 5.0|StarDraw 3.0 - 5.0|StarImpress 3.0 - 5.0|StarImpress-packed 3.0 - 5.0|StarMath 3.0 - 5.0|StarWriter Template 3.0 - 5.0|StarWriter Global 3.0 - 5.0|StarWriter 3.0 - 5.0|StarOffice 6.0/7 Spreadsheet|StarOffice 6.0/7 Spreadsheet Template|StarOffice 6.0/7 Drawing|StarOffice 6.0/7 Drawing Template|StarOffice 6.0/7 Presentation|StarOffice 6.0/7 Presentation Template|StarOffice 6.0/7 Formula|StarOffice 6.0/7 Text Document|StarOffice 6.0/7 Master Document|StarOffice 6.0/7 Text Document Template|OpenDocument Text|OpenDocument Text Template|OpenDocument Master Document|HTML Document Template|OpenDocument Spreadsheet|OpenDocument Spreadsheet Template|OpenDocument Drawing|OpenDocument Drawing Template|OpenDocument Presentation|OpenDocument Presentation Template|OpenDocument Formula\0" +#define ADDITIONAL_VERINFO2 VALUE "FileDescription", "Oracle Open Office Plug-in handles all its documents" VALUE "ProductName", "Oracle Open Office Plug-in" VALUE "MIMEType", "application/vnd.stardivision.calc|application/vnd.stardivision.chart|application/vnd.stardivision.draw|application/vnd.stardivision.impress|application/vnd.stardivision.impress-packed|application/vnd.stardivision.math|application/vnd.stardivision.writer|application/vnd.stardivision.writer-global|application/vnd.staroffice.writer|application/vnd.sun.xml.calc|application/vnd.sun.xml.calc.template|application/vnd.sun.xml.draw|application/vnd.sun.xml.draw.template| #define ADDITIONAL_VERINFO3 "application/vnd.sun.xml.impress|application/vnd.sun.xml.impress.template|application/vnd.sun.xml.math|application/vnd.sun.xml.writer|application/vnd.sun.xml.writer.global|application/vnd.sun.xml.writer.template|application/vnd.oasis.opendocument.text|application/vnd.oasis.opendocument.text-template|application/vnd.oasis.opendocument.text-master|application/vnd.oasis.opendocument.text-web|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template|application/vnd.oasis.opendocument.presentation|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.formula\0" diff --git a/extensions/source/nsplugin/source/nsplugin_oo.rc b/extensions/source/nsplugin/source/nsplugin_oo.rc index 9d30de391..1fc8285c6 100644 --- a/extensions/source/nsplugin/source/nsplugin_oo.rc +++ b/extensions/source/nsplugin/source/nsplugin_oo.rc @@ -24,7 +24,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#define ADDITIONAL_VERINFO1 value "FileExtents", "sdc|sds|sda|sdd|sdp|smf|vor|sgl|sdw|sxc|stc|sxd|std|sxi|sti|sxm|sxw|sxg|stw|odt|ott|odm|oth|ods|ots|odg|otg|odp|otp|odf\0"\ - value "FileOpenName", "StarCalc 3.0 - 5.0|StarChart 3.0 - 5.0|StarDraw 3.0 - 5.0|StarImpress 3.0 - 5.0|StarImpress-packed 3.0 - 5.0|StarMath 3.0 - 5.0|StarWriter Template 3.0 - 5.0|StarWriter Global 3.0 - 5.0|StarWriter 3.0 - 5.0|StarOffice 6.0/7 Spreadsheet|StarOffice 6.0/7 Spreadsheet Template|StarOffice 6.0/7 Drawing|StarOffice 6.0/7 Drawing Template|StarOffice 6.0/7 Presentation|StarOffice 6.0/7 Presentation Template|StarOffice 6.0/7 Formula|StarOffice 6.0/7 Text Document|StarOffice 6.0/7 Master Document|StarOffice 6.0/7 Text Document Template|OpenDocument Text|OpenDocument Text Template|OpenDocument Master Document|HTML Document Template|OpenDocument Spreadsheet|OpenDocument Spreadsheet Template|OpenDocument Drawing|OpenDocument Drawing Template|OpenDocument Presentation|OpenDocument Presentation Template|OpenDocument Formula\0" -#define ADDITIONAL_VERINFO2 value "FileDescription", "LibreOffice Plug-in handles all its documents" value "ProductName", "LibreOffice Plug-in" value "MIMEType", "application/vnd.stardivision.calc|application/vnd.stardivision.chart|application/vnd.stardivision.draw|application/vnd.stardivision.impress|application/vnd.stardivision.impress-packed|application/vnd.stardivision.math|application/vnd.stardivision.writer|application/vnd.stardivision.writer-global|application/vnd.staroffice.writer|application/vnd.sun.xml.calc|application/vnd.sun.xml.calc.template|application/vnd.sun.xml.draw|application/vnd.sun.xml.draw.template|" +#define ADDITIONAL_VERINFO1 VALUE "FileExtents", "sdc|sds|sda|sdd|sdp|smf|vor|sgl|sdw|sxc|stc|sxd|std|sxi|sti|sxm|sxw|sxg|stw|odt|ott|odm|oth|ods|ots|odg|otg|odp|otp|odf\0"\ + VALUE "FileOpenName", "StarCalc 3.0 - 5.0|StarChart 3.0 - 5.0|StarDraw 3.0 - 5.0|StarImpress 3.0 - 5.0|StarImpress-packed 3.0 - 5.0|StarMath 3.0 - 5.0|StarWriter Template 3.0 - 5.0|StarWriter Global 3.0 - 5.0|StarWriter 3.0 - 5.0|StarOffice 6.0/7 Spreadsheet|StarOffice 6.0/7 Spreadsheet Template|StarOffice 6.0/7 Drawing|StarOffice 6.0/7 Drawing Template|StarOffice 6.0/7 Presentation|StarOffice 6.0/7 Presentation Template|StarOffice 6.0/7 Formula|StarOffice 6.0/7 Text Document|StarOffice 6.0/7 Master Document|StarOffice 6.0/7 Text Document Template|OpenDocument Text|OpenDocument Text Template|OpenDocument Master Document|HTML Document Template|OpenDocument Spreadsheet|OpenDocument Spreadsheet Template|OpenDocument Drawing|OpenDocument Drawing Template|OpenDocument Presentation|OpenDocument Presentation Template|OpenDocument Formula\0" +#define ADDITIONAL_VERINFO2 VALUE "FileDescription", "LibreOffice Plug-in handles all its documents" VALUE "ProductName", "LibreOffice Plug-in" VALUE "MIMEType", "application/vnd.stardivision.calc|application/vnd.stardivision.chart|application/vnd.stardivision.draw|application/vnd.stardivision.impress|application/vnd.stardivision.impress-packed|application/vnd.stardivision.math|application/vnd.stardivision.writer|application/vnd.stardivision.writer-global|application/vnd.staroffice.writer|application/vnd.sun.xml.calc|application/vnd.sun.xml.calc.template|application/vnd.sun.xml.draw|application/vnd.sun.xml.draw.template|" #define ADDITIONAL_VERINFO3 "application/vnd.sun.xml.impress|application/vnd.sun.xml.impress.template|application/vnd.sun.xml.math|application/vnd.sun.xml.writer|application/vnd.sun.xml.writer.global|application/vnd.sun.xml.writer.template|application/vnd.oasis.opendocument.text|application/vnd.oasis.opendocument.text-template|application/vnd.oasis.opendocument.text-master|application/vnd.oasis.opendocument.text-web|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template|application/vnd.oasis.opendocument.presentation|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.formula\0" -- cgit v1.2.3 From f8c503e629c2ba59335f7a23737ae6b6246d85d5 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 21 Jul 2011 13:54:09 +0300 Subject: Generate correctly named import library for WNTGCC --- package/prj/d.lst | 1 + package/util/makefile.mk | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/package/prj/d.lst b/package/prj/d.lst index bcb9c084e..7b3aff248 100644 --- a/package/prj/d.lst +++ b/package/prj/d.lst @@ -1,6 +1,7 @@ ..\%__SRC%\misc\*.map %_DEST%\bin\*.map ..\%__SRC%\bin\*.dll %_DEST%\bin\*.dll ..\%__SRC%\lib\*.lib %_DEST%\lib\*.lib +..\%__SRC%\lib\*.a %_DEST%\lib\*.a ..\%__SRC%\lib\lib*.so %_DEST%\lib\lib*.so ..\%__SRC%\lib\*.dylib %_DEST%\lib\*.dylib ..\dtd\*.dtd %_DEST%\bin\*.* diff --git a/package/util/makefile.mk b/package/util/makefile.mk index 0a3f0d77a..cf94fe80e 100644 --- a/package/util/makefile.mk +++ b/package/util/makefile.mk @@ -54,7 +54,11 @@ LIB1FILES= \ # --- Shared-Library ----------------------------------------------- SHL1TARGET=$(TARGET)$(MAJOR_VERSION) +.IF "$(COM)" == "MSC" SHL1IMPLIB=i$(TARGET) +.ELSE +SHL1IMPLIB=$(TARGET)$(MAJOR_VERSION) +.ENDIF SHL1USE_EXPORTS=name SHL1STDLIBS=\ -- cgit v1.2.3 From c302693bb67d7064f9c472a53a34b0f6219e119f Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Thu, 21 Jul 2011 13:28:01 +0200 Subject: Do not use macros from comphelper's componentmodule.hxx --- extensions/source/logging/log_module.cxx | 19 +++++++- extensions/source/logging/log_module.hxx | 50 ++++++++++++++++++++- extensions/source/logging/log_services.cxx | 7 ++- extensions/source/oooimprovecore/core.cxx | 1 - .../oooimprovecore/oooimprovecore_module.cxx | 19 +++++++- .../oooimprovecore/oooimprovecore_module.hxx | 51 +++++++++++++++++++++- .../oooimprovecore/oooimprovecore_services.cxx | 7 ++- 7 files changed, 147 insertions(+), 7 deletions(-) diff --git a/extensions/source/logging/log_module.cxx b/extensions/source/logging/log_module.cxx index 5cdf5e737..8fbdb094a 100644 --- a/extensions/source/logging/log_module.cxx +++ b/extensions/source/logging/log_module.cxx @@ -36,7 +36,24 @@ namespace logging { //........................................................................ - IMPLEMENT_COMPONENT_MODULE( LogModule ); + struct LogModuleCreator + { + LogModule m_aLogModule; + }; + namespace + { + class theLogModuleInstance : public rtl::Static {}; + } + + LogModule::LogModule() + :BaseClass() + { + } + + LogModule& LogModule::getInstance() + { + return theLogModuleInstance::get().m_aLogModule; + } //........................................................................ } // namespace logging diff --git a/extensions/source/logging/log_module.hxx b/extensions/source/logging/log_module.hxx index dbc06816c..7f825dabf 100644 --- a/extensions/source/logging/log_module.hxx +++ b/extensions/source/logging/log_module.hxx @@ -36,7 +36,55 @@ namespace logging { //........................................................................ - DECLARE_COMPONENT_MODULE( LogModule, LogModuleClient ) + class LogModule : public ::comphelper::OModule + { + friend struct LogModuleCreator; + typedef ::comphelper::OModule BaseClass; + + public: + static LogModule& getInstance(); + + private: + LogModule(); + }; + + /* -------------------------------------------------------------------- */ + class LogModuleClient : public ::comphelper::OModuleClient + { + private: + typedef ::comphelper::OModuleClient BaseClass; + + public: + LogModuleClient() : BaseClass( LogModule::getInstance() ) + { + } + }; + + /* -------------------------------------------------------------------- */ + template < class TYPE > + class OAutoRegistration : public ::comphelper::OAutoRegistration< TYPE > + { + private: + typedef ::comphelper::OAutoRegistration< TYPE > BaseClass; + + public: + OAutoRegistration() : BaseClass( LogModule::getInstance() ) + { + } + }; + + /* -------------------------------------------------------------------- */ + template < class TYPE > + class OSingletonRegistration : public ::comphelper::OSingletonRegistration< TYPE > + { + private: + typedef ::comphelper::OSingletonRegistration< TYPE > BaseClass; + + public: + OSingletonRegistration() : BaseClass( LogModule::getInstance() ) + { + } + }; //........................................................................ } // namespace logging diff --git a/extensions/source/logging/log_services.cxx b/extensions/source/logging/log_services.cxx index 224febd0d..f568f634b 100644 --- a/extensions/source/logging/log_services.cxx +++ b/extensions/source/logging/log_services.cxx @@ -59,6 +59,11 @@ namespace logging } // namespace logging //........................................................................ -IMPLEMENT_COMPONENT_LIBRARY_API( ::logging::LogModule, ::logging::initializeModule ) +extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( + const sal_Char* pImplementationName, void* pServiceManager, void* pRegistryKey ) +{ + ::logging::initializeModule(); + return ::logging::LogModule::getInstance().getComponentFactory( pImplementationName, pServiceManager, pRegistryKey ); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/oooimprovecore/core.cxx b/extensions/source/oooimprovecore/core.cxx index ac8363b56..1836e4dc2 100644 --- a/extensions/source/oooimprovecore/core.cxx +++ b/extensions/source/oooimprovecore/core.cxx @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/extensions/source/oooimprovecore/oooimprovecore_module.cxx b/extensions/source/oooimprovecore/oooimprovecore_module.cxx index c686bee94..6457da10d 100644 --- a/extensions/source/oooimprovecore/oooimprovecore_module.cxx +++ b/extensions/source/oooimprovecore/oooimprovecore_module.cxx @@ -33,7 +33,24 @@ namespace oooimprovecore { - IMPLEMENT_COMPONENT_MODULE( OooimprovecoreModule ); + struct OooimprovecoreModuleCreator + { + OooimprovecoreModule m_aOooimprovecoreModule; + }; + namespace + { + class theOooimprovecoreModuleInstance : public rtl::Static {}; + } + + OooimprovecoreModule::OooimprovecoreModule() + :BaseClass() + { + } + + OooimprovecoreModule& OooimprovecoreModule::getInstance() + { + return theOooimprovecoreModuleInstance::get().m_aOooimprovecoreModule; + } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/oooimprovecore/oooimprovecore_module.hxx b/extensions/source/oooimprovecore/oooimprovecore_module.hxx index 3cf4d7155..aeb1ff0ed 100644 --- a/extensions/source/oooimprovecore/oooimprovecore_module.hxx +++ b/extensions/source/oooimprovecore/oooimprovecore_module.hxx @@ -33,7 +33,56 @@ namespace oooimprovecore { - DECLARE_COMPONENT_MODULE( OooimprovecoreModule, OooimprovecoreModuleClient ) + /* -------------------------------------------------------------------- */ + class OooimprovecoreModule : public ::comphelper::OModule + { + friend struct OooimprovecoreModuleCreator; + typedef ::comphelper::OModule BaseClass; + + public: + static OooimprovecoreModule& getInstance(); + + private: + OooimprovecoreModule(); + }; + + /* -------------------------------------------------------------------- */ + class OooimprovecoreModuleClient : public ::comphelper::OModuleClient + { + private: + typedef ::comphelper::OModuleClient BaseClass; + + public: + OooimprovecoreModuleClient() : BaseClass( OooimprovecoreModule::getInstance() ) + { + } + }; + + /* -------------------------------------------------------------------- */ + template < class TYPE > + class OAutoRegistration : public ::comphelper::OAutoRegistration< TYPE > + { + private: + typedef ::comphelper::OAutoRegistration< TYPE > BaseClass; + + public: + OAutoRegistration() : BaseClass( OooimprovecoreModule::getInstance() ) + { + } + }; + + /* -------------------------------------------------------------------- */ + template < class TYPE > + class OSingletonRegistration : public ::comphelper::OSingletonRegistration< TYPE > + { + private: + typedef ::comphelper::OSingletonRegistration< TYPE > BaseClass; + + public: + OSingletonRegistration() : BaseClass( OooimprovecoreModule::getInstance() ) + { + } + }; } #endif diff --git a/extensions/source/oooimprovecore/oooimprovecore_services.cxx b/extensions/source/oooimprovecore/oooimprovecore_services.cxx index dbfdd4ea9..d0800869f 100644 --- a/extensions/source/oooimprovecore/oooimprovecore_services.cxx +++ b/extensions/source/oooimprovecore/oooimprovecore_services.cxx @@ -43,6 +43,11 @@ namespace oooimprovecore } -IMPLEMENT_COMPONENT_LIBRARY_API( ::oooimprovecore::OooimprovecoreModule, ::oooimprovecore::initializeModule) +extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( + const sal_Char* pImplementationName, void* pServiceManager, void* pRegistryKey ) +{ + ::oooimprovecore::initializeModule(); + return ::oooimprovecore::OooimprovecoreModule::getInstance().getComponentFactory( pImplementationName, pServiceManager, pRegistryKey ); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3