diff options
93 files changed, 4124 insertions, 816 deletions
diff --git a/basebmp/test/makefile.mk b/basebmp/test/makefile.mk index 43165b831a64..7d0dc6e3967a 100644 --- a/basebmp/test/makefile.mk +++ b/basebmp/test/makefile.mk @@ -132,6 +132,6 @@ unittest : $(SHL1TARGETN) @echo ---------------------------------------------------------- @echo - start unit test on library $(SHL1TARGETN) @echo ---------------------------------------------------------- - $(AUGMENT_LIBRARY_PATH) testshl2 -sf $(mktmp ) $(SHL1TARGETN) + $(TESTSHL2) -sf $(mktmp ) $(SHL1TARGETN) ALLTAR : unittest diff --git a/basegfx/test/makefile.mk b/basegfx/test/makefile.mk index d0fbfaf9e7c6..8e47a13defdd 100644 --- a/basegfx/test/makefile.mk +++ b/basegfx/test/makefile.mk @@ -89,7 +89,7 @@ $(MISC)$/unittest_succeeded : $(SHL1TARGETN) @echo ---------------------------------------------------------- @echo - start unit test on library $(SHL1TARGETN) @echo ---------------------------------------------------------- - $(AUGMENT_LIBRARY_PATH) testshl2 -sf $(mktmp ) -forward $(BIN)$/ $(SHL1TARGETN) + $(TESTSHL2) -sf $(mktmp ) -forward $(BIN)$/ $(SHL1TARGETN) $(TOUCH) $@ ALLTAR : $(MISC)$/unittest_succeeded diff --git a/comphelper/inc/comphelper/processfactory.hxx b/comphelper/inc/comphelper/processfactory.hxx index d2ae887ba341..9b24f8e784ac 100644 --- a/comphelper/inc/comphelper/processfactory.hxx +++ b/comphelper/inc/comphelper/processfactory.hxx @@ -79,10 +79,19 @@ COMPHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XI const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& _rArgs ) SAL_THROW( ( ::com::sun::star::uno::RuntimeException ) ); +/** + * This function gets the process service factory's default component context. + * If no service factory is set the function returns a null interface. + */ +COMPHELPER_DLLPUBLIC +::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > +getProcessComponentContext(); + } + extern "C" { -/// @internal +/// @internal ATTENTION returns ACQUIRED pointer! release it explicitly! COMPHELPER_DLLPUBLIC ::com::sun::star::uno::XComponentContext * comphelper_getProcessComponentContext(); diff --git a/comphelper/inc/comphelper/stl_types.hxx b/comphelper/inc/comphelper/stl_types.hxx index aeb6342048c9..4b3126043a08 100644 --- a/comphelper/inc/comphelper/stl_types.hxx +++ b/comphelper/inc/comphelper/stl_types.hxx @@ -49,6 +49,7 @@ #include <rtl/ustring.hxx> +#include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/beans/PropertyValue.hpp> @@ -192,6 +193,59 @@ inline mem_fun1_t<_Tp,_Arg> mem_fun(void (_Tp::*__f)(_Arg)) } //......................................................................... +/** output iterator that appends OUStrings into an OUStringBuffer. + */ +class OUStringBufferAppender : + public ::std::iterator< ::std::output_iterator_tag, void, void, void, void> +{ +public: + typedef OUStringBufferAppender Self; + typedef ::std::output_iterator_tag iterator_category; + typedef void value_type; + typedef void reference; + typedef void pointer; + typedef size_t difference_type; + + OUStringBufferAppender(::rtl::OUStringBuffer & i_rBuffer) + : m_rBuffer(i_rBuffer) { } + Self & operator=(::rtl::OUString const & i_rStr) + { + m_rBuffer.append( i_rStr ); + return *this; + } + Self & operator*() { return *this; } // so operator= works + Self & operator++() { return *this; } + Self & operator++(int) { return *this; } + +private: + ::rtl::OUStringBuffer & m_rBuffer; +}; + +//......................................................................... +/** algorithm similar to std::copy, but inserts a separator between elements. + */ +template< typename ForwardIter, typename OutputIter, typename T > +OutputIter intersperse( + ForwardIter start, ForwardIter end, OutputIter out, T const & separator) +{ + if (start != end) { + *out = *start; + ++start; + ++out; + } + + while (start != end) { + *out = separator; + ++out; + *out = *start; + ++start; + ++out; + } + + return out; +} + +//......................................................................... } //... namespace comphelper ................................................ diff --git a/comphelper/inc/comphelper/stlunosequence.hxx b/comphelper/inc/comphelper/stlunosequence.hxx index 2ffe08cb6b75..a0ace84e8a6e 100644 --- a/comphelper/inc/comphelper/stlunosequence.hxx +++ b/comphelper/inc/comphelper/stlunosequence.hxx @@ -312,7 +312,8 @@ namespace comphelper { namespace stlunosequence { template<typename S, typename V> inline typename StlSequence<S,V>::iterator StlSequence<S,V>::begin() { - return typename StlSequence<S,V>::iterator(m_UnoSequence, begin_of_sequence); + return typename StlSequence<S,V>::iterator(m_UnoSequence, + size() ? begin_of_sequence : end_of_sequence); } template<typename S, typename V> @@ -324,7 +325,8 @@ namespace comphelper { namespace stlunosequence { template<typename S, typename V> inline typename StlSequence<S,V>::const_iterator StlSequence<S,V>::begin() const { - return typename StlSequence<S,V>::const_iterator(m_UnoSequence, begin_of_sequence); + return typename StlSequence<S,V>::const_iterator(m_UnoSequence, + size() ? begin_of_sequence : end_of_sequence); } template<typename S, typename V> diff --git a/comphelper/inc/comphelper/storagehelper.hxx b/comphelper/inc/comphelper/storagehelper.hxx index b99f7e1233ca..efb5431959ba 100644 --- a/comphelper/inc/comphelper/storagehelper.hxx +++ b/comphelper/inc/comphelper/storagehelper.hxx @@ -48,9 +48,6 @@ namespace comphelper { -sal_Bool COMPHELPER_DLLPUBLIC IsValidZipEntryFileName( - const sal_Unicode *pChar, sal_Int32 nLength, sal_Bool bSlashAllowed ); - class COMPHELPER_DLLPUBLIC OStorageHelper { public: diff --git a/comphelper/source/misc/documentiologring.cxx b/comphelper/source/misc/documentiologring.cxx new file mode 100644 index 000000000000..7969b938e108 --- /dev/null +++ b/comphelper/source/misc/documentiologring.cxx @@ -0,0 +1,175 @@ +/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: documentiologring.hxx,v $
+ * $Revision: 1.0 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_comphelper.hxx"
+
+#include <com/sun/star/frame/DoubleInitializationException.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+
+#include "documentiologring.hxx"
+
+using namespace ::com::sun::star;
+
+namespace comphelper
+{
+
+// ----------------------------------------------------------
+OSimpleLogRing::OSimpleLogRing( const uno::Reference< uno::XComponentContext >& /*xContext*/ )
+: m_aMessages( SIMPLELOGRING_SIZE )
+, m_bInitialized( sal_False )
+, m_bFull( sal_False )
+, m_nPos( 0 )
+{
+}
+
+// ----------------------------------------------------------
+OSimpleLogRing::~OSimpleLogRing()
+{
+}
+
+// ----------------------------------------------------------
+uno::Sequence< ::rtl::OUString > SAL_CALL OSimpleLogRing::impl_staticGetSupportedServiceNames()
+{
+ uno::Sequence< rtl::OUString > aResult( 1 );
+ aResult[0] = impl_staticGetServiceName();
+ return aResult;
+}
+
+// ----------------------------------------------------------
+::rtl::OUString SAL_CALL OSimpleLogRing::impl_staticGetImplementationName()
+{
+ return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.logging.SimpleLogRing" ) );
+}
+
+// ----------------------------------------------------------
+::rtl::OUString SAL_CALL OSimpleLogRing::impl_staticGetSingletonName()
+{
+ return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.logging.DocumentIOLogRing" ) );
+}
+
+// ----------------------------------------------------------
+::rtl::OUString SAL_CALL OSimpleLogRing::impl_staticGetServiceName()
+{
+ return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.logging.SimpleLogRing" ) );
+}
+
+// ----------------------------------------------------------
+uno::Reference< uno::XInterface > SAL_CALL OSimpleLogRing::impl_staticCreateSelfInstance( const uno::Reference< uno::XComponentContext >& rxContext )
+{
+ return static_cast< cppu::OWeakObject* >( new OSimpleLogRing( rxContext ) );
+}
+
+// XSimpleLogRing
+// ----------------------------------------------------------
+void SAL_CALL OSimpleLogRing::logString( const ::rtl::OUString& aMessage ) throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ m_aMessages[m_nPos] = aMessage;
+ if ( ++m_nPos >= m_aMessages.getLength() )
+ {
+ m_nPos = 0;
+ m_bFull = sal_True;
+ }
+
+ // if used once then default initialized
+ m_bInitialized = sal_True;
+}
+
+// ----------------------------------------------------------
+uno::Sequence< ::rtl::OUString > SAL_CALL OSimpleLogRing::getCollectedLog() throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ sal_Int32 nResLen = m_bFull ? m_aMessages.getLength() : m_nPos;
+ sal_Int32 nStart = m_bFull ? m_nPos : 0;
+ uno::Sequence< ::rtl::OUString > aResult( nResLen );
+
+ for ( sal_Int32 nInd = 0; nInd < nResLen; nInd++ )
+ aResult[nInd] = m_aMessages[ ( nStart + nInd ) % m_aMessages.getLength() ];
+
+ // if used once then default initialized
+ m_bInitialized = sal_True;
+
+ return aResult;
+}
+
+// XInitialization
+// ----------------------------------------------------------
+void SAL_CALL OSimpleLogRing::initialize( const uno::Sequence< uno::Any >& aArguments ) throw (uno::Exception, uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_bInitialized )
+ throw frame::DoubleInitializationException();
+
+ if ( !m_refCount )
+ throw uno::RuntimeException(); // the object must be refcounted already!
+
+ sal_Int32 nLen = 0;
+ if ( aArguments.getLength() == 1 && ( aArguments[0] >>= nLen ) && nLen )
+ m_aMessages.realloc( nLen );
+ else
+ throw lang::IllegalArgumentException(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Nonnull size is expected as the first argument!" ) ),
+ uno::Reference< uno::XInterface >(),
+ 0 );
+
+ m_bInitialized = sal_True;
+}
+
+// XServiceInfo
+// ----------------------------------------------------------
+::rtl::OUString SAL_CALL OSimpleLogRing::getImplementationName() throw (uno::RuntimeException)
+{
+ return impl_staticGetImplementationName();
+}
+
+// ----------------------------------------------------------
+::sal_Bool SAL_CALL OSimpleLogRing::supportsService( const ::rtl::OUString& aServiceName ) throw (uno::RuntimeException)
+{
+ const uno::Sequence< rtl::OUString > & aSupportedNames = impl_staticGetSupportedServiceNames();
+ for ( sal_Int32 nInd = 0; nInd < aSupportedNames.getLength(); nInd++ )
+ {
+ if ( aSupportedNames[ nInd ].equals( aServiceName ) )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+// ----------------------------------------------------------
+uno::Sequence< ::rtl::OUString > SAL_CALL OSimpleLogRing::getSupportedServiceNames() throw (uno::RuntimeException)
+{
+ return impl_staticGetSupportedServiceNames();
+}
+
+} // namespace comphelper
+
diff --git a/comphelper/source/misc/documentiologring.hxx b/comphelper/source/misc/documentiologring.hxx new file mode 100644 index 000000000000..ae7d2a6eaf19 --- /dev/null +++ b/comphelper/source/misc/documentiologring.hxx @@ -0,0 +1,92 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: documentiologring.hxx,v $ + * $Revision: 1.0 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __DOCUMENTIOLOGRING_HXX_ +#define __DOCUMENTIOLOGRING_HXX_ + +#include <com/sun/star/logging/XSimpleLogRing.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/lang/XInitialization.hpp> + +#include <osl/mutex.hxx> +#include <cppuhelper/implbase3.hxx> + +#define SIMPLELOGRING_SIZE 256 + +namespace comphelper +{ + +class OSimpleLogRing : public ::cppu::WeakImplHelper3< ::com::sun::star::logging::XSimpleLogRing, + ::com::sun::star::lang::XInitialization, + ::com::sun::star::lang::XServiceInfo > +{ + ::osl::Mutex m_aMutex; + ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aMessages; + + sal_Bool m_bInitialized; + sal_Bool m_bFull; + sal_Int32 m_nPos; + +public: + OSimpleLogRing( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext ); + virtual ~OSimpleLogRing(); + + static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + impl_staticGetSupportedServiceNames(); + + static ::rtl::OUString SAL_CALL impl_staticGetImplementationName(); + + static ::rtl::OUString SAL_CALL impl_staticGetSingletonName(); + + static ::rtl::OUString SAL_CALL impl_staticGetServiceName(); + + static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL + impl_staticCreateSelfInstance( + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext ); + +// XSimpleLogRing + virtual void SAL_CALL logString( const ::rtl::OUString& aMessage ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getCollectedLog() throw (::com::sun::star::uno::RuntimeException); + +// XInitialization + virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + +// XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); + +}; + +} // namespace comphelper + +#endif + diff --git a/comphelper/source/misc/makefile.mk b/comphelper/source/misc/makefile.mk index 1d473e6c5365..f50f57c47eb3 100644 --- a/comphelper/source/misc/makefile.mk +++ b/comphelper/source/misc/makefile.mk @@ -58,6 +58,7 @@ SLOFILES= \ $(SLO)$/componentmodule.obj \ $(SLO)$/configurationhelper.obj \ $(SLO)$/documentinfo.obj \ + $(SLO)$/documentiologring.obj \ $(SLO)$/evtlistenerhlp.obj \ $(SLO)$/ihwrapnofilter.obj \ $(SLO)$/instancelocker.obj \ diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index 77a251372d85..e9437528b0de 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -36,10 +36,13 @@ #include <vector> #include <algorithm> -#include "comphelper/string.hxx" -#include "rtl/ustring.hxx" -#include "sal/types.h" -#include "comphelper/stlunosequence.hxx" +#include <rtl/ustring.hxx> +#include <rtl/ustrbuf.hxx> +#include <sal/types.h> + +#include <comphelper/string.hxx> +#include <comphelper/stlunosequence.hxx> +#include <comphelper/stl_types.hxx> namespace comphelper { namespace string { @@ -96,12 +99,12 @@ rtl::OUString searchAndReplaceAsciiL( ::rtl::OUString convertCommaSeparated( ::com::sun::star::uno::Sequence< ::rtl::OUString > const& i_rSeq) { - ::rtl::OUString ret; - for (sal_Int32 i = 0; i < i_rSeq.getLength(); ++i) { - if (i != 0) ret += ::rtl::OUString::createFromAscii(", "); - ret += i_rSeq[i]; - } - return ret; + ::rtl::OUStringBuffer buf; + ::comphelper::intersperse( + ::comphelper::stl_begin(i_rSeq), ::comphelper::stl_end(i_rSeq), + ::comphelper::OUStringBufferAppender(buf), + ::rtl::OUString::createFromAscii(", ")); + return buf.makeStringAndClear(); } ::com::sun::star::uno::Sequence< ::rtl::OUString > @@ -119,10 +122,6 @@ rtl::OUString searchAndReplaceAsciiL( } while (idx >= 0); ::com::sun::star::uno::Sequence< ::rtl::OUString > kws(vec.size()); std::copy(vec.begin(), vec.end(), stl_begin(kws)); - /* - for (size_t i = 0; i < vec.size(); ++i) { - kws[i] = vec.at(i); - }*/ return kws; } diff --git a/comphelper/source/misc/types.cxx b/comphelper/source/misc/types.cxx index 2b20fd9acca3..2a9180c038b0 100644 --- a/comphelper/source/misc/types.cxx +++ b/comphelper/source/misc/types.cxx @@ -87,8 +87,7 @@ sal_Bool operator ==(const Time& _rLeft, const Time& _rRight) sal_Int32 getINT32(const Any& _rAny) { sal_Int32 nReturn = 0; - _rAny >>= nReturn; - + OSL_VERIFY( _rAny >>= nReturn ); return nReturn; } @@ -96,7 +95,7 @@ sal_Int32 getINT32(const Any& _rAny) sal_Int16 getINT16(const Any& _rAny) { sal_Int16 nReturn = 0; - _rAny >>= nReturn; + OSL_VERIFY( _rAny >>= nReturn ); return nReturn; } @@ -104,7 +103,7 @@ sal_Int16 getINT16(const Any& _rAny) double getDouble(const Any& _rAny) { double nReturn = 0.0; - _rAny >>= nReturn; + OSL_VERIFY( _rAny >>= nReturn ); return nReturn; } @@ -112,7 +111,7 @@ double getDouble(const Any& _rAny) float getFloat(const Any& _rAny) { float nReturn = 0.0; - _rAny >>= nReturn; + OSL_VERIFY( _rAny >>= nReturn ); return nReturn; } @@ -120,7 +119,7 @@ float getFloat(const Any& _rAny) ::rtl::OUString getString(const Any& _rAny) { ::rtl::OUString nReturn; - _rAny >>= nReturn; + OSL_VERIFY( _rAny >>= nReturn ); return nReturn; } diff --git a/comphelper/source/misc/uieventslogger.cxx b/comphelper/source/misc/uieventslogger.cxx index 3ff875a4e67d..a55d5b58854d 100644 --- a/comphelper/source/misc/uieventslogger.cxx +++ b/comphelper/source/misc/uieventslogger.cxx @@ -375,9 +375,10 @@ namespace comphelper } else logdata[2] = UNKNOWN_ORIGIN; - logdata[3] = url.Complete; if(url.Complete.match(URL_FILE)) logdata[3] = URL_FILE; + else + logdata[3] = url.Main; m_Logger->log(LogLevel::INFO, m_Formatter->formatMultiColumn(logdata)); m_SessionLogEventCount++; } diff --git a/comphelper/source/processfactory/processfactory.cxx b/comphelper/source/processfactory/processfactory.cxx index 0f50f4a4cb01..c4eac583e3c0 100644 --- a/comphelper/source/processfactory/processfactory.cxx +++ b/comphelper/source/processfactory/processfactory.cxx @@ -98,24 +98,30 @@ Reference< XInterface > createProcessComponentWithArguments( const ::rtl::OUStri return xComponent; } -} // namesapce comphelper - -extern "C" { -uno::XComponentContext * comphelper_getProcessComponentContext() +Reference< XComponentContext > getProcessComponentContext() { - uno::Reference<uno::XComponentContext> xRet; + Reference< XComponentContext > xRet; uno::Reference<beans::XPropertySet> const xProps( comphelper::getProcessServiceFactory(), uno::UNO_QUERY ); if (xProps.is()) { try { - xRet.set( xProps->getPropertyValue( - rtl::OUString( + xRet.set( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ), uno::UNO_QUERY ); } catch (beans::UnknownPropertyException const&) { } } + return xRet; +} + +} // namespace comphelper + +extern "C" { +uno::XComponentContext * comphelper_getProcessComponentContext() +{ + uno::Reference<uno::XComponentContext> xRet; + xRet = ::comphelper::getProcessComponentContext(); if (xRet.is()) xRet->acquire(); return xRet.get(); diff --git a/comphelper/source/property/propertybag.cxx b/comphelper/source/property/propertybag.cxx index a56793e05769..383e1cc2c5aa 100644 --- a/comphelper/source/property/propertybag.cxx +++ b/comphelper/source/property/propertybag.cxx @@ -168,10 +168,11 @@ namespace comphelper // will throw an UnknownPropertyException if necessary if ( ( rProp.Attributes & PropertyAttribute::REMOVEABLE ) == 0 ) throw NotRemoveableException( ::rtl::OUString(), NULL ); + const sal_Int32 nHandle = rProp.Handle; - revokeProperty( rProp.Handle ); + revokeProperty( nHandle ); - m_pImpl->aDefaults.erase( rProp.Handle ); + m_pImpl->aDefaults.erase( nHandle ); } //-------------------------------------------------------------------- diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx index 9d1662d1ecf2..7f5db1d6cf7e 100644 --- a/comphelper/source/property/propertycontainerhelper.cxx +++ b/comphelper/source/property/propertycontainerhelper.cxx @@ -76,12 +76,12 @@ namespace // comparing two property descriptions (by name) struct PropertyDescriptionNameMatch : public ::std::unary_function< PropertyDescription, bool > { - const ::rtl::OUString& m_rCompare; + ::rtl::OUString m_rCompare; PropertyDescriptionNameMatch( const ::rtl::OUString& _rCompare ) : m_rCompare( _rCompare ) { } bool operator() (const PropertyDescription& x ) const { - return x.aProperty.Name == m_rCompare; + return x.aProperty.Name.equals(m_rCompare); } }; } diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx index 3afd9b555a84..a2baef21010e 100644 --- a/comphelper/source/streaming/memorystream.cxx +++ b/comphelper/source/streaming/memorystream.cxx @@ -35,15 +35,16 @@ #include <com/sun/star/io/XStream.hpp> #include <com/sun/star/io/XSeekableInputStream.hpp> +#include <com/sun/star/io/XTruncate.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -#include <cppuhelper/implbase3.hxx> +#include <cppuhelper/implbase4.hxx> #include <string.h> #include <vector> using ::rtl::OUString; using ::cppu::OWeakObject; -using ::cppu::WeakImplHelper3; +using ::cppu::WeakImplHelper4; using namespace ::com::sun::star::io; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -52,7 +53,7 @@ using namespace ::osl; namespace comphelper { -class UNOMemoryStream : public WeakImplHelper3 < XStream, XSeekableInputStream, XOutputStream > +class UNOMemoryStream : public WeakImplHelper4 < XStream, XSeekableInputStream, XOutputStream, XTruncate > { public: UNOMemoryStream(); @@ -79,6 +80,9 @@ public: virtual void SAL_CALL flush() throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException); virtual void SAL_CALL closeOutput() throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException); + // XTruncate + virtual void SAL_CALL truncate() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); + // XServiceInfo - static versions (used for component registration) static ::rtl::OUString SAL_CALL getImplementationName_static(); static Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static(); @@ -116,8 +120,7 @@ sal_Int32 SAL_CALL UNOMemoryStream::readBytes( Sequence< sal_Int8 >& aData, sal_ throw IOException(); nBytesToRead = std::min( nBytesToRead, available() ); - if( aData.getLength() < nBytesToRead ) - aData.realloc( nBytesToRead ); + aData.realloc( nBytesToRead ); if( nBytesToRead ) { @@ -157,9 +160,16 @@ void SAL_CALL UNOMemoryStream::closeInput() throw (NotConnectedException, IOExce // XSeekable void SAL_CALL UNOMemoryStream::seek( sal_Int64 location ) throw (IllegalArgumentException, IOException, RuntimeException) { - if( (location < 0) || (location > SAL_MAX_INT32) || (location > static_cast< sal_Int64 >( maData.size() )) ) + if( (location < 0) || (location > SAL_MAX_INT32) ) throw IllegalArgumentException( OUString(RTL_CONSTASCII_USTRINGPARAM("this implementation does not support more than 2GB!")), Reference< XInterface >(static_cast<OWeakObject*>(this)), 0 ); + // seek operation should be able to resize the stream + if ( location > static_cast< sal_Int64 >( maData.size() ) ) + maData.resize( static_cast< sal_Int32 >( location ) ); + + if ( location > static_cast< sal_Int64 >( maData.size() ) ) + maData.resize( static_cast< sal_Int32 >( location ) ); + mnCursor = static_cast< sal_Int32 >( location ); } @@ -206,6 +216,13 @@ void SAL_CALL UNOMemoryStream::closeOutput() throw (NotConnectedException, Buffe mnCursor = 0; } +//XTruncate +void SAL_CALL UNOMemoryStream::truncate() throw (IOException, RuntimeException) +{ + maData.resize( 0 ); + mnCursor = 0; +} + ::rtl::OUString SAL_CALL UNOMemoryStream::getImplementationName_static() { static const OUString sImplName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.MemoryStream" ) ); diff --git a/dtrans/source/X11/X11_droptarget.cxx b/dtrans/source/X11/X11_droptarget.cxx index 501eff09ead8..4f71a0507790 100644 --- a/dtrans/source/X11/X11_droptarget.cxx +++ b/dtrans/source/X11/X11_droptarget.cxx @@ -143,15 +143,13 @@ void DropTarget::setDefaultActions( sal_Int8 actions ) throw() void DropTarget::drop( const DropTargetDropEvent& dtde ) throw() { - ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex ); + std::list< Reference< XDropTargetListener > > aListeners( m_aListeners ); + aGuard.clear(); - ::std::list< Reference< XDropTargetListener > >::iterator it1, it2; - it1 = m_aListeners.begin(); - while( it1 != m_aListeners.end() ) + for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it ) { - it2 = it1; - it1++; - (*it2)->drop( dtde ); + (*it)->drop( dtde ); } } @@ -159,15 +157,13 @@ void DropTarget::drop( const DropTargetDropEvent& dtde ) throw() void DropTarget::dragEnter( const DropTargetDragEnterEvent& dtde ) throw() { - ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex ); + std::list< Reference< XDropTargetListener > > aListeners( m_aListeners ); + aGuard.clear(); - ::std::list< Reference< XDropTargetListener > >::iterator it1, it2; - it1 = m_aListeners.begin(); - while( it1 != m_aListeners.end() ) + for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it ) { - it2 = it1; - it1++; - (*it2)->dragEnter( dtde ); + (*it)->dragEnter( dtde ); } } @@ -175,15 +171,13 @@ void DropTarget::dragEnter( const DropTargetDragEnterEvent& dtde ) throw() void DropTarget::dragExit( const DropTargetEvent& dte ) throw() { - ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex ); + std::list< Reference< XDropTargetListener > > aListeners( m_aListeners ); + aGuard.clear(); - ::std::list< Reference< XDropTargetListener > >::iterator it1, it2; - it1 = m_aListeners.begin(); - while( it1 != m_aListeners.end() ) + for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it ) { - it2 = it1; - it1++; - (*it2)->dragExit( dte ); + (*it)->dragExit( dte ); } } @@ -191,15 +185,13 @@ void DropTarget::dragExit( const DropTargetEvent& dte ) throw() void DropTarget::dragOver( const DropTargetDragEvent& dtde ) throw() { - ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex ); + std::list< Reference< XDropTargetListener > > aListeners( m_aListeners ); + aGuard.clear(); - ::std::list< Reference< XDropTargetListener > >::iterator it1, it2; - it1 = m_aListeners.begin(); - while( it1 != m_aListeners.end() ) + for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it ) { - it2 = it1; - it1++; - (*it2)->dragOver( dtde ); + (*it)->dragOver( dtde ); } } diff --git a/dtrans/source/X11/X11_selection.cxx b/dtrans/source/X11/X11_selection.cxx index 2a424984850a..affc92e98908 100644 --- a/dtrans/source/X11/X11_selection.cxx +++ b/dtrans/source/X11/X11_selection.cxx @@ -1117,7 +1117,7 @@ bool SelectionManager::getPasteData( Atom selection, const ::rtl::OUString& rTyp bSuccess = getPasteData( selection, m_nImageBmpAtom, rData ); #if OSL_DEBUG_LEVEL > 1 if( bSuccess ) - fprintf( stderr, "got %d bytes of image/bmp\n" ), (int)rData.getLength(); + fprintf( stderr, "got %d bytes of image/bmp\n", (int)rData.getLength() ); #endif if( ! bSuccess ) { @@ -1685,7 +1685,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest XA_INTEGER, 32, PropModeReplace, (const unsigned char*)&nTimeStamp, 1 ); aNotify.xselection.property = rRequest.property; #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "sending timestamp: %d\n", nTimeStamp ); + fprintf( stderr, "sending timestamp: %d\n", (int)nTimeStamp ); #endif } else diff --git a/goodies/prj/build.lst b/goodies/prj/build.lst index fb1f7a0f1aca..f8edce86c4f8 100644 --- a/goodies/prj/build.lst +++ b/goodies/prj/build.lst @@ -1,4 +1,4 @@ -go goodies : svtools NULL +go goodies : l10n svtools NULL go goodies usr1 - all g_mkout NULL go goodies\inc nmake - all g_inc NULL go goodies\prj get - all g_prj NULL diff --git a/goodies/source/graphic/grfmgr.cxx b/goodies/source/graphic/grfmgr.cxx index bece8389d270..5cb37a51e81f 100644 --- a/goodies/source/graphic/grfmgr.cxx +++ b/goodies/source/graphic/grfmgr.cxx @@ -44,7 +44,6 @@ #include <vcl/metaact.hxx> #include <vcl/virdev.hxx> #include <vcl/salbtype.hxx> -#include <vcl/pdfextoutdevdata.hxx> #include <svtools/cacheoptions.hxx> #include "grfmgr.hxx" @@ -674,31 +673,11 @@ BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, const sal_uInt32 nOldDrawMode = pOut->GetDrawMode(); BOOL bCropped = aAttr.IsCropped(); BOOL bCached = FALSE; - BOOL bWritingPdfLinkedGraphic = FALSE; BOOL bRet; // #i29534# Provide output rects for PDF writer Rectangle aCropRect; - // #i29534# Notify PDF writer about linked graphic (if any) - vcl::ExtOutDevData* pExtOutDevData = pOut->GetExtOutDevData(); - if( pExtOutDevData && pExtOutDevData->ISA(vcl::PDFExtOutDevData) ) - { - // #i29534# Only delegate image handling to PDF, if no special - // treatment is necessary - if( GetGraphic().IsLink() && - aSz.Width() > 0L && - aSz.Height() > 0L && - !aAttr.IsSpecialDrawMode() && - !aAttr.IsMirrored() && - !aAttr.IsRotated() && - !aAttr.IsAdjusted() ) - { - bWritingPdfLinkedGraphic = TRUE; - static_cast< vcl::PDFExtOutDevData* >( pExtOutDevData )->BeginGroup(); - } - } - if( !( GRFMGR_DRAW_USE_DRAWMODE_SETTINGS & nFlags ) ) pOut->SetDrawMode( nOldDrawMode & ( ~( DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ) ) ); @@ -749,16 +728,6 @@ BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, pOut->SetDrawMode( nOldDrawMode ); - // #i29534# Notify PDF writer about linked graphic (if any) - if( bWritingPdfLinkedGraphic ) - { - static_cast< vcl::PDFExtOutDevData* >( pExtOutDevData )->EndGroup( - const_cast< Graphic& >(GetGraphic()), - aAttr.GetTransparency(), - Rectangle( aPt, aSz ), - aCropRect ); - } - // #i29534# Moved below OutDev restoration, to avoid multiple swap-ins // (code above needs to call GetGraphic twice) if( bCached ) diff --git a/i18npool/inc/i18npool/paper.hxx b/i18npool/inc/i18npool/paper.hxx new file mode 100644 index 000000000000..5690a8fe7254 --- /dev/null +++ b/i18npool/inc/i18npool/paper.hxx @@ -0,0 +1,155 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile$ + * + * $Revision$ + * + * last change: $Author$ $Date$ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef INCLUDED_I18NPOOL_PAPER_HXX +#define INCLUDED_I18NPOOL_PAPER_HXX + +#include <sal/config.h> + +#include "i18npool/i18npooldllapi.h" +#include <rtl/string.hxx> +#include <com/sun/star/lang/Locale.hpp> + +enum Paper +{ + PAPER_A0, + PAPER_A1, + PAPER_A2, + PAPER_A3, + PAPER_A4, + PAPER_A5, + PAPER_B4_ISO, + PAPER_B5_ISO, + PAPER_LETTER, + PAPER_LEGAL, + PAPER_TABLOID, + PAPER_USER, + PAPER_B6_ISO, + PAPER_ENV_C4, + PAPER_ENV_C5, + PAPER_ENV_C6, + PAPER_ENV_C65, + PAPER_ENV_DL, + PAPER_SLIDE_DIA, + PAPER_SCREEN, + PAPER_C, + PAPER_D, + PAPER_E, + PAPER_EXECUTIVE, + PAPER_FANFOLD_LEGAL_DE, + PAPER_ENV_MONARCH, + PAPER_ENV_PERSONAL, + PAPER_ENV_9, + PAPER_ENV_10, + PAPER_ENV_11, + PAPER_ENV_12, + PAPER_KAI16, + PAPER_KAI32, + PAPER_KAI32BIG, + PAPER_B4_JIS, + PAPER_B5_JIS, + PAPER_B6_JIS, + PAPER_LEDGER, + PAPER_STATEMENT, + PAPER_QUARTO, + PAPER_10x14, + PAPER_ENV_14, + PAPER_ENV_C3, + PAPER_ENV_ITALY, + PAPER_FANFOLD_US, + PAPER_FANFOLD_DE, + PAPER_POSTCARD_JP, + PAPER_9x11, + PAPER_10x11, + PAPER_15x11, + PAPER_ENV_INVITE, + PAPER_A_PLUS, + PAPER_B_PLUS, + PAPER_LETTER_PLUS, + PAPER_A4_PLUS, + PAPER_DOUBLEPOSTCARD_JP, + PAPER_A6, + PAPER_12x11, + PAPER_A7, + PAPER_A8, + PAPER_A9, + PAPER_A10, + PAPER_B0_ISO, + PAPER_B1_ISO, + PAPER_B2_ISO, + PAPER_B3_ISO, + PAPER_B7_ISO, + PAPER_B8_ISO, + PAPER_B9_ISO, + PAPER_B10_ISO, + PAPER_ENV_C2, + PAPER_ENV_C7, + PAPER_ENV_C8, + PAPER_ARCHA, + PAPER_ARCHB, + PAPER_ARCHC, + PAPER_ARCHD, + PAPER_ARCHE +}; + +// --------- +// - Paper - +// --------- + +class I18NPOOL_DLLPUBLIC PaperInfo +{ + Paper m_eType; + long m_nPaperWidth; // width in 100thMM + long m_nPaperHeight; // height in 100thMM +public: + PaperInfo(Paper eType); + PaperInfo(long nPaperWidth, long nPaperHeight); + + Paper getPaper() const { return m_eType; } + long getWidth() const { return m_nPaperWidth; } + long getHeight() const { return m_nPaperHeight; } + bool sloppyEqual(const PaperInfo &rOther) const; + bool doSloppyFit(); + + static PaperInfo getSystemDefaultPaper(); + static PaperInfo getDefaultPaperForLocale(const ::com::sun::star::lang::Locale & rLocale); + + static Paper fromPSName(const rtl::OString &rName); + static rtl::OString toPSName(Paper eType); + + static long sloppyFitPageDimension(long nDimension); +}; + +#endif // INCLUDED_I18NPOOL_PAPER_HXX diff --git a/i18npool/prj/build.lst b/i18npool/prj/build.lst index 98fec96d0149..24e9607596ac 100644 --- a/i18npool/prj/build.lst +++ b/i18npool/prj/build.lst @@ -9,6 +9,7 @@ inp i18npool\source\transliteration nmake - all inp_translit inp inp i18npool\source\isolang nmake - all inp_isolang inp_inc NULL inp i18npool\source\localedata nmake - all inp_localedata inp_isolang inp_inc NULL inp i18npool\source\localedata\data nmake - all inp_locdata_data inp_localedata inp_inc NULL +inp i18npool\source\paper nmake - all inp_paper inp_isolang inp_inc NULL inp i18npool\source\calendar nmake - all inp_cal inp_inc NULL inp i18npool\source\numberformatcode nmake - all inp_numformat inp_inc NULL inp i18npool\source\defaultnumberingprovider nmake - all inp_dnum inp_inc NULL @@ -22,4 +23,4 @@ inp i18npool\source\textconversion nmake - all inp_textconversi inp i18npool\source\textconversion\data nmake - all inp_textconv_dict inp_textconversion inp_inc NULL inp i18npool\source\search nmake - all inp_search inp_inc NULL inp i18npool\source\ordinalsuffix nmake - all inp_ordinalsuffix NULL -inp i18npool\util nmake - all inp_util inp_brkit inp_dict inp_chclass inp_translit inp_cal inp_dnum inp_natnum inp_localedata inp_locdata_data inp_numformat inp_rserv inp_index inp_index_data inp_collator inp_collator_data inp_inputchecker inp_textconversion inp_textconv_dict inp_search inp_isolang inp_ordinalsuffix NULL +inp i18npool\util nmake - all inp_util inp_brkit inp_dict inp_chclass inp_translit inp_cal inp_dnum inp_natnum inp_localedata inp_locdata_data inp_numformat inp_rserv inp_index inp_index_data inp_collator inp_collator_data inp_inputchecker inp_textconversion inp_textconv_dict inp_search inp_isolang inp_paper inp_ordinalsuffix NULL diff --git a/i18npool/prj/d.lst b/i18npool/prj/d.lst index 052ad4d23273..54aefa732b89 100644 --- a/i18npool/prj/d.lst +++ b/i18npool/prj/d.lst @@ -40,3 +40,9 @@ mkdir: %_DEST%\inc%_EXT%\i18npool ..\%__SRC%\bin\i18nisol*.dll %_DEST%\bin%_EXT%\i18nisol*.dll ..\%__SRC%\lib\libi18nisolang*.so %_DEST%\lib%_EXT%\libi18nisolang*.so ..\%__SRC%\lib\libi18nisolang*.dylib %_DEST%\lib%_EXT%\libi18nisolang*.dylib + +..\%__SRC%\lib\ii18npaper*.lib %_DEST%\lib%_EXT%\ii18npaper*.lib +..\%__SRC%\bin\i18npaper*.dll %_DEST%\bin%_EXT%\i18npaper*.dll +..\%__SRC%\lib\libi18npaper*.so %_DEST%\lib%_EXT%\libi18npaper*.so +..\%__SRC%\lib\libi18npaper*.dylib %_DEST%\lib%_EXT%\libi18npaper*.dylib + diff --git a/i18npool/source/paper/makefile.mk b/i18npool/source/paper/makefile.mk new file mode 100644 index 000000000000..2aef382a32fa --- /dev/null +++ b/i18npool/source/paper/makefile.mk @@ -0,0 +1,75 @@ +#************************************************************************* +#* +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2008 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.9 $ +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************/ + +PRJ=..$/.. + +PRJNAME=i18npool +TARGET=i18npaper + +ENABLE_EXCEPTIONS=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/version.mk +.INCLUDE : $(PRJ)$/util$/makefile.pmk + +# --- Files -------------------------------------------------------- +# +SLOFILES=$(SLO)$/paper.obj +SHL1OBJS=$(SLOFILES) + +SHL1TARGET=$(TARGET)$(DLLPOSTFIX) +SHL1IMPLIB=i$(TARGET) + +DEF1DEPN=$(MISC)$/$(SHL1TARGET).flt +SHL1DEF=$(MISC)$/$(SHL1TARGET).def +DEF1NAME=$(SHL1TARGET) +DEFLIB1NAME=$(SHL1TARGET) + +LIB1TARGET= $(SLB)$/$(SHL1TARGET).lib +LIB1OBJFILES=$(SHL1OBJS) + +SHL1STDLIBS= \ + $(I18NISOLANGLIB) \ + $(COMPHELPERLIB) \ + $(CPPULIB) \ + $(SALLIB) + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + +$(MISC)$/$(SHL1TARGET).flt: makefile.mk + @echo ------------------------------ + @echo Making: $@ + @echo CLEAR_THE_FILE > $@ + @echo __CT >> $@ diff --git a/i18npool/source/paper/paper.cxx b/i18npool/source/paper/paper.cxx new file mode 100644 index 000000000000..a81b9b370b8c --- /dev/null +++ b/i18npool/source/paper/paper.cxx @@ -0,0 +1,473 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile$ + * $Revision$ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_i18npool.hxx" +#include <sal/config.h> +#include <rtl/ustring.hxx> +#include <rtl/string.hxx> +#include <comphelper/processfactory.hxx> +#include <com/sun/star/i18n/ScriptType.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/container/XNameAccess.hpp> + +#include "i18npool/mslangid.hxx" +#include "i18npool/paper.hxx" + +#include <utility> +#include <cstdlib> + +#ifdef UNX +#include <stdio.h> +#include <string.h> +#include <locale.h> +#include <langinfo.h> +#endif + +struct PageDesc +{ + long m_nWidth; + long m_nHeight; + const char *m_pPSName; + const char *m_pAltPSName; +}; + +#define PT2MM100( v ) \ + (long)(((v) * 35.27777778) + 0.5) + +#define IN2MM100( v ) \ + ((long)((v) * 2540)) + +#define MM2MM100( v ) \ + ((long)((v) * 100)) + +//PostScript Printer Description File Format Specification +//http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf +//http://www.y-adagio.com/public/committees/docsii/doc_00-49/symp_ulaan/china_ppr.pdf (Kai) +//http://www.sls.psi.ch/controls/help/howto/Howto_Print_a_A0_Poster_at_WSLA_012_2.pdf (Dia) +static PageDesc aDinTab[] = +{ + { MM2MM100( 841 ), MM2MM100( 1189 ), "A0", NULL }, + { MM2MM100( 594 ), MM2MM100( 841 ), "A1", NULL }, + { MM2MM100( 420 ), MM2MM100( 594 ), "A2", NULL }, + { MM2MM100( 297 ), MM2MM100( 420 ), "A3", NULL }, + { MM2MM100( 210 ), MM2MM100( 297 ), "A4", NULL }, + { MM2MM100( 148 ), MM2MM100( 210 ), "A5", NULL }, + { MM2MM100( 250 ), MM2MM100( 353 ), "ISOB4", NULL }, + { MM2MM100( 176 ), MM2MM100( 250 ), "ISOB5", NULL }, + { IN2MM100( 8.5 ), IN2MM100( 11 ), "Letter", "Note" }, + { IN2MM100( 8.5 ), IN2MM100( 14 ), "Legal", NULL }, + { IN2MM100( 11 ), IN2MM100( 17 ), "Tabloid", "11x17" }, + { 0, 0, NULL, NULL }, //User + { MM2MM100( 125 ), MM2MM100( 176 ), "ISOB6", NULL }, + { MM2MM100( 229 ), MM2MM100( 324 ), "EnvC4", "C4" }, + { MM2MM100( 162 ), MM2MM100( 229 ), "EnvC5", "C5" }, + { MM2MM100( 114 ), MM2MM100( 162 ), "EnvC6", "C6" }, + { MM2MM100( 114 ), MM2MM100( 229 ), "EnvC65", NULL }, + { MM2MM100( 110 ), MM2MM100( 220 ), "EnvDL", "DL" }, + { MM2MM100( 180), MM2MM100( 270 ), NULL, NULL }, //Dia + { MM2MM100( 210), MM2MM100( 280 ), NULL, NULL }, //Screen + { IN2MM100( 17 ), IN2MM100( 22 ), "AnsiC", "CSheet" }, + { IN2MM100( 22 ), IN2MM100( 34 ), "AnsiD", "DSheet" }, + { IN2MM100( 34 ), IN2MM100( 44 ), "AnsiE", "ESheet" }, + { IN2MM100( 7.25 ), IN2MM100( 10.5 ), "Executive", NULL }, + //"Folio" is a different size in the PPD documentation than 8.5x11 + //This "FanFoldGermanLegal" is known in the Philippines as + //"Legal" paper or "Long Bond Paper". The "Legal" name causing untold + //misery, given the differently sized US "Legal" paper + { IN2MM100( 8.5 ), IN2MM100( 13 ), "FanFoldGermanLegal", NULL }, + { IN2MM100( 3.875 ), IN2MM100( 7.5 ), "EnvMonarch", "Monarch" }, + { IN2MM100( 3.625 ), IN2MM100( 6.5 ), "EnvPersonal", "Personal" }, + { IN2MM100( 3.875 ), IN2MM100( 8.875 ), "Env9", NULL }, + { IN2MM100( 4.125 ), IN2MM100( 9.5 ), "Env10", "Comm10" }, + { IN2MM100( 4.5 ), IN2MM100( 10.375 ), "Env11", NULL }, + { IN2MM100( 4.75 ), IN2MM100( 11 ), "Env12", NULL }, + { MM2MM100( 184 ), MM2MM100( 260 ), NULL, NULL }, //Kai16 + { MM2MM100( 130 ), MM2MM100( 184 ), NULL, NULL }, //Kai32 + { MM2MM100( 140 ), MM2MM100( 203 ), NULL, NULL }, //BigKai32 + { MM2MM100( 257 ), MM2MM100( 364 ), "B4", NULL }, //JIS + { MM2MM100( 182 ), MM2MM100( 257 ), "B5", NULL }, //JIS + { MM2MM100( 128 ), MM2MM100( 182 ), "B6", NULL }, //JIS + { IN2MM100( 17 ), IN2MM100( 11 ), "Ledger", NULL }, + { IN2MM100( 5.5 ), IN2MM100( 8.5 ), "Statement", NULL }, + { PT2MM100( 610 ), PT2MM100( 780 ), "Quarto", NULL }, + { IN2MM100( 10 ), IN2MM100( 14 ), "10x14", NULL }, + { IN2MM100( 5.5 ), IN2MM100( 11.5 ), "Env14", NULL }, + { MM2MM100( 324 ), MM2MM100( 458 ), "EnvC3", "C3" }, + { MM2MM100( 110 ), MM2MM100( 230 ), "EnvItalian", NULL }, + { IN2MM100( 14.875 ),IN2MM100( 11 ), "FanFoldUS", NULL }, + { IN2MM100( 8.5 ), IN2MM100( 13 ), "FanFoldGerman", NULL }, + { MM2MM100( 100 ), MM2MM100( 148 ), "Postcard", NULL }, + { IN2MM100( 9 ), IN2MM100( 11 ), "9x11", NULL }, + { IN2MM100( 10 ), IN2MM100( 11 ), "10x11", NULL }, + { IN2MM100( 15 ), IN2MM100( 11 ), "15x11", NULL }, + { MM2MM100( 220 ), MM2MM100( 220 ), "EnvInvite", NULL }, + { MM2MM100( 227 ), MM2MM100( 356 ), "SuperA", NULL }, + { MM2MM100( 305 ), MM2MM100( 487 ), "SuperB", NULL }, + { IN2MM100( 8.5 ), IN2MM100( 12.69 ), "LetterPlus", NULL }, + { IN2MM100( 8.5 ), IN2MM100( 12.69 ), "LetterPlus", NULL }, + { MM2MM100( 210 ), MM2MM100( 330 ), "A4Plus", NULL }, + { MM2MM100( 200 ), MM2MM100( 148 ), "DoublePostcard", NULL }, + { MM2MM100( 105 ), MM2MM100( 148 ), "A6", NULL }, + { IN2MM100( 12 ), IN2MM100( 11 ), "12x11", NULL }, + { MM2MM100( 74 ), MM2MM100( 105 ), "A7", NULL }, + { MM2MM100( 52 ), MM2MM100( 74 ), "A8", NULL }, + { MM2MM100( 37 ), MM2MM100( 52 ), "A9", NULL }, + { MM2MM100( 26 ), MM2MM100( 37 ), "A10", NULL }, + { MM2MM100( 1000 ), MM2MM100( 1414 ), "ISOB0", NULL }, + { MM2MM100( 707 ), MM2MM100( 1000 ), "ISOB1", NULL }, + { MM2MM100( 500 ), MM2MM100( 707 ), "ISOB2", NULL }, + { MM2MM100( 353 ), MM2MM100( 500 ), "ISOB3", NULL }, + { MM2MM100( 88 ), MM2MM100( 125 ), "ISOB7", NULL }, + { MM2MM100( 62 ), MM2MM100( 88 ), "ISOB8", NULL }, + { MM2MM100( 44 ), MM2MM100( 62 ), "ISOB9", NULL }, + { MM2MM100( 31 ), MM2MM100( 44 ), "ISOB10", NULL }, + { MM2MM100( 458 ), MM2MM100( 648 ), "EnvC2", "C2" }, + { MM2MM100( 81 ), MM2MM100( 114 ), "EnvC7", "C7" }, + { MM2MM100( 57 ), MM2MM100( 81 ), "EnvC8", "C8" }, + { IN2MM100( 9 ), IN2MM100( 12 ), "ARCHA", NULL }, + { IN2MM100( 12 ), IN2MM100( 18 ), "ARCHB", NULL }, + { IN2MM100( 18 ), IN2MM100( 24 ), "ARCHC", NULL }, + { IN2MM100( 24 ), IN2MM100( 36 ), "ARCHD", NULL }, + { IN2MM100( 36 ), IN2MM100( 48 ), "ARCHE", NULL } +}; + +static const size_t nTabSize = sizeof(aDinTab) / sizeof(aDinTab[0]); + +#define MAXSLOPPY 11 + +bool PaperInfo::doSloppyFit() +{ + if (m_eType != PAPER_USER) + return true; + + for ( size_t i = 0; i < nTabSize; ++i ) + { + if (i == PAPER_USER) continue; + + long lDiffW = labs(aDinTab[i].m_nWidth - m_nPaperWidth); + long lDiffH = labs(aDinTab[i].m_nHeight - m_nPaperHeight); + + if ( lDiffW < MAXSLOPPY && lDiffH < MAXSLOPPY ) + { + m_nPaperWidth = aDinTab[i].m_nWidth; + m_nPaperHeight = aDinTab[i].m_nHeight; + m_eType = (Paper)i; + return true; + } + } + + return false; +} + +bool PaperInfo::sloppyEqual(const PaperInfo &rOther) const +{ + return + ( + (labs(m_nPaperWidth - rOther.m_nPaperWidth) < MAXSLOPPY) && + (labs(m_nPaperHeight - rOther.m_nPaperHeight) < MAXSLOPPY) + ); +} + +long PaperInfo::sloppyFitPageDimension(long nDimension) +{ + for ( size_t i = 0; i < nTabSize; ++i ) + { + if (i == PAPER_USER) continue; + long lDiff; + + lDiff = labs(aDinTab[i].m_nWidth - nDimension); + if ( lDiff < MAXSLOPPY ) + return aDinTab[i].m_nWidth; + + lDiff = labs(aDinTab[i].m_nHeight - nDimension); + if ( lDiff < MAXSLOPPY ) + return aDinTab[i].m_nHeight; + } + return nDimension; +} + +PaperInfo PaperInfo::getSystemDefaultPaper() +{ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::lang::XMultiServiceFactory; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Any; + using ::com::sun::star::container::XNameAccess; + using ::com::sun::star::uno::Exception; +# define CREATE_OUSTRING( ascii ) \ + rtl::OUString::intern( RTL_CONSTASCII_USTRINGPARAM( ascii ) ) + + rtl::OUString aLocaleStr; + + Reference< XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory(); + Reference< XMultiServiceFactory > xConfigProv( + xFactory->createInstance( CREATE_OUSTRING( "com.sun.star.configuration.ConfigurationProvider" ) ), + UNO_QUERY_THROW ); + + Sequence< Any > aArgs( 1 ); + aArgs[ 0 ] <<= CREATE_OUSTRING( "org.openoffice.Setup/L10N/" ); + Reference< XNameAccess > xConfigNA( xConfigProv->createInstanceWithArguments( + CREATE_OUSTRING( "com.sun.star.configuration.ConfigurationAccess" ), aArgs ), UNO_QUERY_THROW ); + try + { + // try user-defined locale setting + xConfigNA->getByName( CREATE_OUSTRING( "ooSetupSystemLocale" ) ) >>= aLocaleStr; + } + catch( Exception& ) {} + +#ifdef UNX + // if set to "use system", get papersize from system + if (aLocaleStr.getLength() == 0) + { + static bool bInitialized = false; + static PaperInfo aInstance(PAPER_A4); + + if (bInitialized) + return aInstance; + + // try libpaper + // #i78617# workaround missing paperconf command + FILE* pPipe = popen( "sh -c paperconf 2>/dev/null", "r" ); + if( pPipe ) + { + Paper ePaper = PAPER_USER; + + char aBuffer[ 1024 ]; + aBuffer[0] = 0; + char *pBuffer = fgets( aBuffer, sizeof(aBuffer), pPipe ); + pclose( pPipe ); + + if (pBuffer && *pBuffer != 0) + { + rtl::OString aPaper(pBuffer); + aPaper = aPaper.trim(); + static struct { const char *pName; Paper ePaper; } aCustoms [] = + { + { "B0", PAPER_B0_ISO }, + { "B1", PAPER_B1_ISO }, + { "B2", PAPER_B2_ISO }, + { "B3", PAPER_B3_ISO }, + { "B4", PAPER_B4_ISO }, + { "B5", PAPER_B5_ISO }, + { "B6", PAPER_B6_ISO }, + { "B7", PAPER_B7_ISO }, + { "B8", PAPER_B8_ISO }, + { "B9", PAPER_B9_ISO }, + { "B10", PAPER_B10_ISO }, + { "folio", PAPER_FANFOLD_LEGAL_DE }, + { "flsa", PAPER_FANFOLD_LEGAL_DE }, + { "flse", PAPER_FANFOLD_LEGAL_DE } + }; + + bool bHalve = false; + + size_t nExtraTabSize = sizeof(aCustoms) / sizeof(aCustoms[0]); + for (size_t i = 0; i < nExtraTabSize; ++i) + { + if (rtl_str_compareIgnoreAsciiCase(aCustoms[i].pName, aPaper.getStr()) == 0) + { + ePaper = aCustoms[i].ePaper; + break; + } + } + + if (ePaper == PAPER_USER) + { + bHalve = !rtl_str_shortenedCompareIgnoreAsciiCase_WithLength( + aPaper.getStr(), aPaper.getLength(), "half", 4, 4); + if (bHalve) + aPaper = aPaper.copy(4); + ePaper = PaperInfo::fromPSName(aPaper); + } + + if (ePaper != PAPER_USER) + { + aInstance = PaperInfo(ePaper); + if (bHalve) + aInstance = PaperInfo(aInstance.getHeight()/2, aInstance.getWidth()); + bInitialized = true; + return aInstance; + } + } + } + +#if defined(LC_PAPER) && defined(_GNU_SOURCE) + + union paperword { char *string; int word; }; + + // try LC_PAPER + paperword w, h; + w.string = nl_langinfo(_NL_PAPER_WIDTH); + h.string = nl_langinfo(_NL_PAPER_HEIGHT); + + //glibc stores sizes as integer mm units + w.word *= 100; + h.word *= 100; + + for ( size_t i = 0; i < nTabSize; ++i ) + { + if (i == PAPER_USER) continue; + + //glibc stores sizes as integer mm units, and so is inaccurate. To + //find a standard paper size we calculate the standard paper sizes + //into equally inaccurate mm and compare + long width = (aDinTab[i].m_nWidth + 50) / 100; + long height = (aDinTab[i].m_nHeight + 50) / 100; + + if (width == w.word/100 && height == h.word/100) + { + w.word = aDinTab[i].m_nWidth; + h.word = aDinTab[i].m_nHeight; + break; + } + } + + aInstance = PaperInfo(w.word, h.word); + bInitialized = true; + return aInstance; +#endif + } +#endif + + try + { + // if set to "use system", try to get locale from system + if( aLocaleStr.getLength() == 0 ) + xConfigNA->getByName( CREATE_OUSTRING( "Locale" ) ) >>= aLocaleStr; + } + catch( Exception& ) {} + + + if (aLocaleStr.getLength() == 0) + aLocaleStr = CREATE_OUSTRING("en-US"); + + // convert locale string to locale struct + ::com::sun::star::lang::Locale aSysLocale; + sal_Int32 nDashPos = aLocaleStr.indexOf( '-' ); + if( nDashPos < 0 ) nDashPos = aLocaleStr.getLength(); + aSysLocale.Language = aLocaleStr.copy( 0, nDashPos ); + if( nDashPos + 1 < aLocaleStr.getLength() ) + aSysLocale.Country = aLocaleStr.copy( nDashPos + 1 ); + + return PaperInfo::getDefaultPaperForLocale(aSysLocale); +} + +PaperInfo::PaperInfo(Paper eType) : m_eType(eType) +{ + m_nPaperWidth = aDinTab[m_eType].m_nWidth; + m_nPaperHeight = aDinTab[m_eType].m_nHeight; +} + +PaperInfo::PaperInfo(long nPaperWidth, long nPaperHeight) + : m_eType(PAPER_USER), + m_nPaperWidth(nPaperWidth), + m_nPaperHeight(nPaperHeight) +{ + for ( size_t i = 0; i < nTabSize; ++i ) + { + if ( + (nPaperWidth == aDinTab[i].m_nWidth) && + (nPaperHeight == aDinTab[i].m_nHeight) + ) + { + m_eType = static_cast<Paper>(i); + break; + } + } +} + +rtl::OString PaperInfo::toPSName(Paper ePaper) +{ + return static_cast<size_t>(ePaper) < nTabSize ? + rtl::OString(aDinTab[ePaper].m_pPSName) : rtl::OString(); +} + +Paper PaperInfo::fromPSName(const rtl::OString &rName) +{ + if (!rName.getLength()) + return PAPER_USER; + + for ( size_t i = 0; i < nTabSize; ++i ) + { + if (aDinTab[i].m_pPSName && + !rtl_str_compareIgnoreAsciiCase(aDinTab[i].m_pPSName, rName.getStr())) + { + return static_cast<Paper>(i); + } + else if (aDinTab[i].m_pAltPSName && + !rtl_str_compareIgnoreAsciiCase(aDinTab[i].m_pAltPSName, rName.getStr())) + { + return static_cast<Paper>(i); + } + } + + return PAPER_USER; +} + +//http://wiki.services.openoffice.org/wiki/DefaultPaperSize +//http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/localedata/locales/?cvsroot=glibc +//http://www.unicode.org/cldr/data/charts/supplemental/territory_language_information.html +//http://en.wikipedia.org/wiki/Paper_size +//http://msdn.microsoft.com/en-us/library/cc195164.aspx +PaperInfo PaperInfo::getDefaultPaperForLocale( + const ::com::sun::star::lang::Locale & rLocale) +{ + Paper eType = PAPER_A4; + + if ( + //United States, Letter + !rLocale.Country.compareToAscii("US") || + //Puerto Rico, http://sources.redhat.com/ml/libc-hacker/2001-07/msg00046.html + !rLocale.Country.compareToAscii("PR") || + //Canada, http://sources.redhat.com/ml/libc-hacker/2001-07/msg00053.html + !rLocale.Country.compareToAscii("CA") || + //Venuzuela, https://www.redhat.com/archives/fedora-devel-list/2008-August/msg00019.html + !rLocale.Country.compareToAscii("VE") || + //Chile, https://www.redhat.com/archives/fedora-devel-list/2008-August/msg00240.html + !rLocale.Country.compareToAscii("CL") || + //Mexico, http://qa.openoffice.org/issues/show_bug.cgi?id=49739 + !rLocale.Country.compareToAscii("MX") || + //Colombia, http://qa.openoffice.org/issues/show_bug.cgi?id=69703 + !rLocale.Country.compareToAscii("CO") || + //Philippines, + // http://ubuntuliving.blogspot.com/2008/07/default-paper-size-in-evince.html + // http://www.gov.ph/faqs/driverslicense.asp + !rLocale.Country.compareToAscii("PH") + ) + { + eType = PAPER_LETTER; + } + + return eType; +} + +/* vi:set tabstop=4 shiftwidth=4 expandtab: */ diff --git a/o3tl/qa/makefile.mk b/o3tl/qa/makefile.mk index 563f4e2d3bf2..a6ebfbba4bb9 100644 --- a/o3tl/qa/makefile.mk +++ b/o3tl/qa/makefile.mk @@ -75,6 +75,6 @@ unittest : $(SHL1TARGETN) @echo ---------------------------------------------------------- @echo - start unit test on library $(SHL1TARGETN) @echo ---------------------------------------------------------- - $(AUGMENT_LIBRARY_PATH) testshl2 -sf $(mktmp ) $(SHL1TARGETN) + $(TESTSHL2) -sf $(mktmp ) $(SHL1TARGETN) ALLTAR : unittest diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx index 5a623efeee51..c43879020a8e 100644 --- a/rsc/source/prj/start.cxx +++ b/rsc/source/prj/start.cxx @@ -306,8 +306,10 @@ int cdecl main ( int argc, char ** argv) BOOL bHelp = FALSE; BOOL bError = FALSE; BOOL bResponse = FALSE; - ByteString aPrePro( "rscpp" ); - ByteString aRsc2Name( "rsc2" ); + ByteString aSolarbin(getenv("SOLARBINDIR")); + ByteString aDelim("/"); + ByteString aPrePro; //( aSolarbin + aDelim + ByteString("rscpp")); + ByteString aRsc2Name; //( aSolarbin + aDelim + ByteString("rsc2")); ByteString aSrsName; ByteString aResName; RscStrList aInputList; @@ -318,6 +320,14 @@ int cdecl main ( int argc, char ** argv) sal_uInt32 i; ByteString* pString; + aPrePro = aSolarbin; + aPrePro += aDelim; + aPrePro += ByteString("rscpp"); + + aRsc2Name = aSolarbin; + aRsc2Name += aDelim; + aRsc2Name += ByteString("rsc2"); + printf( "VCL Resource Compiler 3.0\n" ); pStr = ::ResponseFile( &aCmdLine, argv, argc ); diff --git a/svtools/inc/sfxecode.hxx b/svtools/inc/sfxecode.hxx index 100336796ea4..01292f1c87fa 100644 --- a/svtools/inc/sfxecode.hxx +++ b/svtools/inc/sfxecode.hxx @@ -84,6 +84,7 @@ #define ERRCODE_SFX_MACROS_SUPPORT_DISABLED (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 51) #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 52) #define ERRCODE_SFX_BROKENSIGNATURE (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 53) +#define ERRCODE_SFX_SHARED_NOPASSWORDCHANGE (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 54) diff --git a/svtools/inc/svtools/parhtml.hxx b/svtools/inc/svtools/parhtml.hxx index d129a8c14595..f5de6aea358d 100644 --- a/svtools/inc/svtools/parhtml.hxx +++ b/svtools/inc/svtools/parhtml.hxx @@ -37,9 +37,17 @@ #include <svtools/svarray.hxx> #include <svtools/svparser.hxx> + +namespace com { namespace sun { namespace star { + namespace document { + class XDocumentProperties; + } +} } } + class Color; class SvNumberFormatter; class SvULongs; +class SvKeyValueIterator; #define HTMLFONTSZ1_DFLT 7 #define HTMLFONTSZ2_DFLT 10 @@ -224,6 +232,28 @@ public: // virtual void RestoreState(); virtual void Continue( int nToken ); + +protected: + + static rtl_TextEncoding GetEncodingByMIME( const String& rMime ); + + /// template method: called when ParseMetaOptions adds a user-defined meta + virtual void AddMetaUserDefined( ::rtl::OUString const & i_rMetaName ); + +private: + /// parse meta options into XDocumentProperties and encoding + bool ParseMetaOptionsImpl( const ::com::sun::star::uno::Reference< + ::com::sun::star::document::XDocumentProperties>&, + SvKeyValueIterator*, + const HTMLOptions*, + rtl_TextEncoding& rEnc ); + +public: + /// overriding method must call this implementation! + virtual bool ParseMetaOptions( const ::com::sun::star::uno::Reference< + ::com::sun::star::document::XDocumentProperties>&, + SvKeyValueIterator* ); + // Ist der uebergebene 0-terminierte String (vermutlich) der Anfang // eines HTML-Files? Er sollte mind. 80 Zeichen lang sein. // Mit Ausnahme des Falls, dass SwitchToUCS2==FALSE und diff --git a/svtools/inc/svtools/svparser.hxx b/svtools/inc/svtools/svparser.hxx index d63777d05b1b..96c1aadc6319 100644 --- a/svtools/inc/svtools/svparser.hxx +++ b/svtools/inc/svtools/svparser.hxx @@ -37,6 +37,7 @@ #include <tools/string.hxx> #include <tools/ref.hxx> #include <rtl/textenc.h> +#include <boost/utility.hpp> struct SvParser_Impl; @@ -204,6 +205,84 @@ inline USHORT SvParser::GetCharSize() const { return (RTL_TEXTENCODING_UCS2 == eSrcEnc) ? 2 : 1; } + + +/*======================================================================== + * + * SvKeyValue. + * + *======================================================================*/ + +SV_DECL_REF(SvKeyValueIterator) + +class SvKeyValue +{ + /** Representation. + */ + String m_aKey; + String m_aValue; + +public: + /** Construction. + */ + SvKeyValue (void) + {} + + SvKeyValue (const String &rKey, const String &rValue) + : m_aKey (rKey), m_aValue (rValue) + {} + + SvKeyValue (const SvKeyValue &rOther) + : m_aKey (rOther.m_aKey), m_aValue (rOther.m_aValue) + {} + + /** Assignment. + */ + SvKeyValue& operator= (SvKeyValue &rOther) + { + m_aKey = rOther.m_aKey; + m_aValue = rOther.m_aValue; + return *this; + } + + /** Operation. + */ + const String& GetKey (void) const { return m_aKey; } + const String& GetValue (void) const { return m_aValue; } + + void SetKey (const String &rKey ) { m_aKey = rKey; } + void SetValue (const String &rValue) { m_aValue = rValue; } +}; + +/*======================================================================== + * + * SvKeyValueIterator. + * + *======================================================================*/ +class SvKeyValueList_Impl; +class SVT_DLLPUBLIC SvKeyValueIterator : public SvRefBase, + private boost::noncopyable +{ + /** Representation. + */ + SvKeyValueList_Impl* m_pList; + USHORT m_nPos; + +public: + /** Construction/Destruction. + */ + SvKeyValueIterator (void); + virtual ~SvKeyValueIterator (void); + + /** Operation. + */ + virtual BOOL GetFirst (SvKeyValue &rKeyVal); + virtual BOOL GetNext (SvKeyValue &rKeyVal); + virtual void Append (const SvKeyValue &rKeyVal); +}; + +SV_IMPL_REF(SvKeyValueIterator); + #endif //_SVPARSER_HXX /* vi:set tabstop=4 shiftwidth=4 expandtab: */ diff --git a/svtools/prj/build.lst b/svtools/prj/build.lst index ee2414e0da59..a6a409055faa 100644 --- a/svtools/prj/build.lst +++ b/svtools/prj/build.lst @@ -1,4 +1,4 @@ -st svtools : offuh toolkit ucbhelper unotools JPEG:jpeg cppu cppuhelper comphelper sal sot jvmfwk NULL +st svtools : l10n offuh toolkit ucbhelper unotools JPEG:jpeg cppu cppuhelper comphelper sal sot jvmfwk NULL st svtools usr1 - all st_mkout NULL st svtools\inc nmake - all st_inc NULL st svtools\inc\sane get - all st_incsa NULL diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index d56c270fd5a8..274557051c27 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -1065,7 +1065,10 @@ BOOL ViewTabListBox_Impl::DoubleClickHdl() ::rtl::OUString sRet = SvHeaderTabListBox::GetAccessibleObjectDescription( _eType, _nPos ); if ( ::svt::BBTYPE_TABLECELL == _eType ) { - sal_Int32 nRow = _nPos / GetColumnCount(); + sal_Int32 nRow = -1; + const sal_uInt16 nColumnCount = GetColumnCount(); + if (nColumnCount > 0) + nRow = _nPos / nColumnCount; SvLBoxEntry* pEntry = GetEntry( nRow ); if ( pEntry ) { diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 32e8e68facb1..fc02c85dfd25 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -980,10 +980,12 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleCell( sal_Int32 _nR if ( !AreChildrenTransient() ) { + const sal_uInt16 nColumnCount = GetColumnCount(); + // first call? -> initial list if ( m_aAccessibleChildren.empty() ) { - sal_Int32 nCount = ( GetRowCount() + 1 ) * GetColumnCount(); + sal_Int32 nCount = ( GetRowCount() + 1 ) * nColumnCount; m_aAccessibleChildren.assign( nCount, Reference< XAccessible >() ); } @@ -1021,8 +1023,9 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleColumnHeader( sal_u // first call? -> initial list if ( m_aAccessibleChildren.empty() ) { - sal_Int32 nCount = AreChildrenTransient() ? GetColumnCount() - : ( GetRowCount() + 1 ) * GetColumnCount(); + const sal_uInt16 nColumnCount = GetColumnCount(); + sal_Int32 nCount = AreChildrenTransient() ? + nColumnCount : ( GetRowCount() + 1 ) * nColumnCount; m_aAccessibleChildren.assign( nCount, Reference< XAccessible >() ); } @@ -1098,9 +1101,12 @@ sal_Bool SvHeaderTabListBox::ConvertPointToColumnHeader( sal_uInt16&, const Poin if ( _nPos >= 0 ) { sal_uInt16 nColumnCount = GetColumnCount(); - sal_Int32 nRow = _nPos / nColumnCount; - sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount ); - aRetText = GetCellText( nRow, nColumn ); + if (nColumnCount > 0) + { + sal_Int32 nRow = _nPos / nColumnCount; + sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount ); + aRetText = GetCellText( nRow, nColumn ); + } } break; } @@ -1135,16 +1141,19 @@ sal_Bool SvHeaderTabListBox::ConvertPointToColumnHeader( sal_uInt16&, const Poin static const String sVar2( RTL_CONSTASCII_USTRINGPARAM( "%2" ) ); sal_uInt16 nColumnCount = GetColumnCount(); - sal_Int32 nRow = _nPos / nColumnCount; - sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount ); - - String aText( SvtResId( STR_SVT_ACC_DESC_TABLISTBOX ) ); - aText.SearchAndReplace( sVar1, String::CreateFromInt32( nRow ) ); - String sColHeader = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( nColumn ) ); - if ( sColHeader.Len() == 0 ) - sColHeader = String::CreateFromInt32( nColumn ); - aText.SearchAndReplace( sVar2, sColHeader ); - aRetText = aText; + if (nColumnCount > 0) + { + sal_Int32 nRow = _nPos / nColumnCount; + sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount ); + + String aText( SvtResId( STR_SVT_ACC_DESC_TABLISTBOX ) ); + aText.SearchAndReplace( sVar1, String::CreateFromInt32( nRow ) ); + String sColHeader = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( nColumn ) ); + if ( sColHeader.Len() == 0 ) + sColHeader = String::CreateFromInt32( nColumn ); + aText.SearchAndReplace( sVar2, sColHeader ); + aRetText = aText; + } } return aRetText; diff --git a/svtools/source/items1/itemset.cxx b/svtools/source/items1/itemset.cxx index 48fe2877b892..6edeffe6d250 100644 --- a/svtools/source/items1/itemset.cxx +++ b/svtools/source/items1/itemset.cxx @@ -541,7 +541,7 @@ SfxItemState SfxItemSet::GetItemState( USHORT nWhich, // Unterschiedlich vorhanden return SFX_ITEM_DONTCARE; - if ( (*ppFnd)->IsA(TYPE(SfxVoidItem)) ) + if ( (*ppFnd)->Type() == TYPE(SfxVoidItem) )
return SFX_ITEM_DISABLED; if (ppItem) diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx index 3e2d63e0b622..16bc8339a0d9 100644 --- a/svtools/source/misc/acceleratorexecute.cxx +++ b/svtools/source/misc/acceleratorexecute.cxx @@ -476,8 +476,14 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::st xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier")), css::uno::UNO_QUERY_THROW); - css::uno::Reference< css::ui::XUIConfigurationManager > xUIManager = xUISupplier->getUIConfigurationManager(sModule); - css::uno::Reference< css::ui::XAcceleratorConfiguration > xAccCfg (xUIManager->getShortCutManager(), css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::ui::XAcceleratorConfiguration > xAccCfg; + try + { + css::uno::Reference< css::ui::XUIConfigurationManager > xUIManager = xUISupplier->getUIConfigurationManager(sModule); + xAccCfg = css::uno::Reference< css::ui::XAcceleratorConfiguration >(xUIManager->getShortCutManager(), css::uno::UNO_QUERY_THROW); + } + catch(const css::container::NoSuchElementException&) + {} return xAccCfg; } diff --git a/svtools/source/misc/documentlockfile.cxx b/svtools/source/misc/documentlockfile.cxx index 71b541cfe894..990f1ba58d73 100644 --- a/svtools/source/misc/documentlockfile.cxx +++ b/svtools/source/misc/documentlockfile.cxx @@ -202,7 +202,7 @@ sal_Bool DocumentLockFile::OverwriteOwnLockFile() WriteEntryToStream( aNewEntry, xOutput ); xOutput->closeOutput(); } - catch( ucb::NameClashException& ) + catch( uno::Exception& ) { return sal_False; } diff --git a/svtools/source/misc/errtxt.src b/svtools/source/misc/errtxt.src index 72b575f96f43..033ecefc10e7 100644 --- a/svtools/source/misc/errtxt.src +++ b/svtools/source/misc/errtxt.src @@ -503,6 +503,10 @@ Resource RID_ERRHDL { Text [ en-US ] = "Function not possible: write protected." ; }; + String ERRCODE_SFX_SHARED_NOPASSWORDCHANGE + { + Text [ en-US ] = "The password of a shared spreadsheet cannot be set or changed.\nDeactivate sharing mode first."; + }; }; // eof ------------------------------------------------------------------------ diff --git a/svtools/source/svhtml/makefile.mk b/svtools/source/svhtml/makefile.mk index 577cc83e65c7..b597763ac390 100644 --- a/svtools/source/svhtml/makefile.mk +++ b/svtools/source/svhtml/makefile.mk @@ -34,6 +34,8 @@ PRJ=..$/.. PRJNAME=svtools TARGET=svhtml +ENABLE_EXCEPTIONS=TRUE + # --- Settings ----------------------------------------------------- .INCLUDE : settings.mk diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 3413cd3e7fb8..215133c8efb4 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -43,10 +43,21 @@ #include <svtools/svstdarr.hxx> #endif +#include <tools/tenccvt.hxx> +#include <tools/datetime.hxx> +#include <svtools/inettype.hxx> +#include <comphelper/string.hxx> +#include <com/sun/star/beans/PropertyAttribute.hpp> +#include <com/sun/star/document/XDocumentProperties.hpp> + #include <svtools/parhtml.hxx> #include "htmltokn.h" #include "htmlkywd.hxx" + +using namespace ::com::sun::star; + + const sal_Int32 MAX_LEN( 1024L ); //static sal_Unicode sTmpBuffer[ MAX_LEN+1 ]; const sal_Int32 MAX_MACRO_LEN( 1024 ); @@ -2080,7 +2091,6 @@ BOOL HTMLParser::InternalImgToPrivateURL( String& rURL ) return bFound; } - #ifdef USED void HTMLParser::SaveState( int nToken ) { @@ -2093,3 +2103,241 @@ void HTMLParser::RestoreState() } #endif + +enum eHtmlMetas { + HTML_META_NONE = 0, + HTML_META_AUTHOR, + HTML_META_DESCRIPTION, + HTML_META_KEYWORDS, + HTML_META_REFRESH, + HTML_META_CLASSIFICATION, + HTML_META_CREATED, + HTML_META_CHANGEDBY, + HTML_META_CHANGED, + HTML_META_GENERATOR, + HTML_META_SDFOOTNOTE, + HTML_META_SDENDNOTE, + HTML_META_CONTENT_TYPE +}; + +// <META NAME=xxx> +#ifdef __MINGW32__ // for runtime pseudo reloc +static HTMLOptionEnum aHTMLMetaNameTable[] = +#else +static HTMLOptionEnum __READONLY_DATA aHTMLMetaNameTable[] = +#endif +{ + { OOO_STRING_SVTOOLS_HTML_META_author, HTML_META_AUTHOR }, + { OOO_STRING_SVTOOLS_HTML_META_changed, HTML_META_CHANGED }, + { OOO_STRING_SVTOOLS_HTML_META_changedby, HTML_META_CHANGEDBY }, + { OOO_STRING_SVTOOLS_HTML_META_classification,HTML_META_CLASSIFICATION}, + { OOO_STRING_SVTOOLS_HTML_META_content_type, HTML_META_CONTENT_TYPE }, + { OOO_STRING_SVTOOLS_HTML_META_created, HTML_META_CREATED }, + { OOO_STRING_SVTOOLS_HTML_META_description, HTML_META_DESCRIPTION }, + { OOO_STRING_SVTOOLS_HTML_META_keywords, HTML_META_KEYWORDS }, + { OOO_STRING_SVTOOLS_HTML_META_generator, HTML_META_GENERATOR }, + { OOO_STRING_SVTOOLS_HTML_META_refresh, HTML_META_REFRESH }, + { OOO_STRING_SVTOOLS_HTML_META_sdendnote, HTML_META_SDENDNOTE }, + { OOO_STRING_SVTOOLS_HTML_META_sdfootnote, HTML_META_SDFOOTNOTE }, + { 0, 0 } +}; + + +void HTMLParser::AddMetaUserDefined( ::rtl::OUString const & ) +{ +} + +bool HTMLParser::ParseMetaOptionsImpl( + const uno::Reference<document::XDocumentProperties> & i_xDocProps, + SvKeyValueIterator *i_pHTTPHeader, + const HTMLOptions *i_pOptions, + rtl_TextEncoding& o_rEnc ) +{ + String aName, aContent; + USHORT nAction = HTML_META_NONE; + bool bHTTPEquiv = false, bChanged = false; + + for ( USHORT i = i_pOptions->Count(); i; ) + { + const HTMLOption *pOption = (*i_pOptions)[ --i ]; + switch ( pOption->GetToken() ) + { + case HTML_O_NAME: + aName = pOption->GetString(); + if ( HTML_META_NONE==nAction ) + { + pOption->GetEnum( nAction, aHTMLMetaNameTable ); + } + break; + case HTML_O_HTTPEQUIV: + aName = pOption->GetString(); + pOption->GetEnum( nAction, aHTMLMetaNameTable ); + bHTTPEquiv = true; + break; + case HTML_O_CONTENT: + aContent = pOption->GetString(); + break; + } + } + + if ( bHTTPEquiv || HTML_META_DESCRIPTION != nAction ) + { + // if it is not a Description, remove CRs and LFs from CONTENT + aContent.EraseAllChars( _CR ); + aContent.EraseAllChars( _LF ); + } + else + { + // convert line endings for Description + aContent.ConvertLineEnd(); + } + + + if ( bHTTPEquiv && i_pHTTPHeader ) + { + // #57232#: Netscape seems to just ignore a closing ", so we do too + if ( aContent.Len() && '"' == aContent.GetChar( aContent.Len()-1 ) ) + { + aContent.Erase( aContent.Len() - 1 ); + } + SvKeyValue aKeyValue( aName, aContent ); + i_pHTTPHeader->Append( aKeyValue ); + } + + switch ( nAction ) + { + case HTML_META_AUTHOR: + if (i_xDocProps.is()) { + i_xDocProps->setAuthor( aContent ); + bChanged = true; + } + break; + case HTML_META_DESCRIPTION: + if (i_xDocProps.is()) { + i_xDocProps->setDescription( aContent ); + bChanged = true; + } + break; + case HTML_META_KEYWORDS: + if (i_xDocProps.is()) { + i_xDocProps->setKeywords( + ::comphelper::string::convertCommaSeparated(aContent)); + bChanged = true; + } + break; + case HTML_META_CLASSIFICATION: + if (i_xDocProps.is()) { + i_xDocProps->setSubject( aContent ); + bChanged = true; + } + break; + + case HTML_META_CHANGEDBY: + if (i_xDocProps.is()) { + i_xDocProps->setModifiedBy( aContent ); + } + break; + + case HTML_META_CREATED: + case HTML_META_CHANGED: + if ( i_xDocProps.is() && aContent.Len() && + aContent.GetTokenCount() == 2 ) + { + Date aDate( (ULONG)aContent.GetToken(0).ToInt32() ); + Time aTime( (ULONG)aContent.GetToken(1).ToInt32() ); + DateTime aDateTime( aDate, aTime ); + ::util::DateTime uDT(aDateTime.Get100Sec(), + aDateTime.GetSec(), aDateTime.GetMin(), + aDateTime.GetHour(), aDateTime.GetDay(), + aDateTime.GetMonth(), aDateTime.GetYear()); + if ( HTML_META_CREATED==nAction ) + i_xDocProps->setCreationDate( uDT ); + else + i_xDocProps->setModificationDate( uDT ); + bChanged = true; + } + break; + + case HTML_META_REFRESH: + DBG_ASSERT( !bHTTPEquiv || i_pHTTPHeader, + "Reload-URL aufgrund unterlassener MUSS-Aenderung verlorengegangen" ); + break; + + case HTML_META_CONTENT_TYPE: + if ( aContent.Len() ) + { + o_rEnc = GetEncodingByMIME( aContent ); + } + break; + + case HTML_META_NONE: + if ( !bHTTPEquiv ) + { + if (i_xDocProps.is()) + { + uno::Reference<beans::XPropertyContainer> xUDProps + = i_xDocProps->getUserDefinedProperties(); + try { + xUDProps->addProperty(aName, + beans::PropertyAttribute::REMOVEABLE, + uno::makeAny(::rtl::OUString(aContent))); + AddMetaUserDefined(aName); + bChanged = true; + } catch (uno::Exception &) { + // ignore + } + } + } + break; + default: + break; + } + + return bChanged; +} + +bool HTMLParser::ParseMetaOptions( + const uno::Reference<document::XDocumentProperties> & i_xDocProps, + SvKeyValueIterator *i_pHeader ) +{ + USHORT nContentOption = HTML_O_CONTENT; + rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW; + + bool bRet = ParseMetaOptionsImpl( i_xDocProps, i_pHeader, + GetOptions(&nContentOption), + eEnc ); + + // If the encoding is set by a META tag, it may only overwrite the + // current encoding if both, the current and the new encoding, are 1-BYTE + // encodings. Everything else cannot lead to reasonable results. + if (RTL_TEXTENCODING_DONTKNOW != eEnc && + rtl_isOctetTextEncoding( eEnc ) && + rtl_isOctetTextEncoding( GetSrcEncoding() ) ) + { + eEnc = GetExtendedCompatibilityTextEncoding( eEnc ); // #89973# + SetSrcEncoding( eEnc ); + } + + return bRet; +} + +rtl_TextEncoding HTMLParser::GetEncodingByMIME( const String& rMime ) +{ + ByteString sType; + ByteString sSubType; + INetContentTypeParameterList aParameters; + ByteString sMime( rMime, RTL_TEXTENCODING_ASCII_US ); + if (INetContentTypes::parse(sMime, sType, sSubType, &aParameters)) + { + const INetContentTypeParameter * pCharset + = aParameters.find("charset"); + if (pCharset != 0) + { + ByteString sValue( pCharset->m_sValue, RTL_TEXTENCODING_ASCII_US ); + return GetExtendedCompatibilityTextEncoding( + rtl_getTextEncodingFromMimeCharset( sValue.GetBuffer() ) ); + } + } + return RTL_TEXTENCODING_DONTKNOW; +} + diff --git a/svtools/source/svrtf/rtfkey2.cxx b/svtools/source/svrtf/rtfkey2.cxx new file mode 100644 index 000000000000..5c4e1039d92c --- /dev/null +++ b/svtools/source/svrtf/rtfkey2.cxx @@ -0,0 +1,1162 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: rtfkey2.cxx,v $ + * $Revision: 1.14.134.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */ + +#include "rtfkeywd.hxx" + +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEXCHAR, "\\'" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_IGNORE, "\\*" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OPTHYPH, "\\-" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SUBENTRY, "\\:" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ABSH, "\\absh" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ABSW, "\\absw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ALT, "\\alt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ANNOTATION, "\\annotation" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ANSI, "\\ansi" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ATNID, "\\atnid" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AUTHOR, "\\author" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_B, "\\b" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGBDIAG, "\\bgbdiag" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGCROSS, "\\bgcross" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGDCROSS, "\\bgdcross" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGDKBDIAG, "\\bgdkbdiag" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGDKCROSS, "\\bgdkcross" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGDKDCROSS, "\\bgdkdcross" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGDKFDIAG, "\\bgdkfdiag" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGDKHORIZ, "\\bgdkhoriz" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGDKVERT, "\\bgdkvert" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGFDIAG, "\\bgfdiag" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGHORIZ, "\\bghoriz" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGVERT, "\\bgvert" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BIN, "\\bin" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BINFSXN, "\\binfsxn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BINSXN, "\\binsxn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BKMKCOLF, "\\bkmkcolf" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BKMKCOLL, "\\bkmkcoll" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BKMKEND, "\\bkmkend" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BKMKSTART, "\\bkmkstart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BLUE, "\\blue" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BOX, "\\box" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRB, "\\brdrb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRBAR, "\\brdrbar" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRBTW, "\\brdrbtw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRCF, "\\brdrcf" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRDB, "\\brdrdb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRDOT, "\\brdrdot" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRHAIR, "\\brdrhair" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRL, "\\brdrl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRR, "\\brdrr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRS, "\\brdrs" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRSH, "\\brdrsh" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRT, "\\brdrt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTH, "\\brdrth" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRW, "\\brdrw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRSP, "\\brsp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BULLET, "\\bullet" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BUPTIM, "\\buptim" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BXE, "\\bxe" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CAPS, "\\caps" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CB, "\\cb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CBPAT, "\\cbpat" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CELL, "\\cell" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CELLX, "\\cellx" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CF, "\\cf" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CFPAT, "\\cfpat" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHATN, "\\chatn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHDATE, "\\chdate" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHDPA, "\\chdpa" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHDPL, "\\chdpl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHFTN, "\\chftn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHFTNSEP, "\\chftnsep" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHFTNSEPC, "\\chftnsepc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHPGN, "\\chpgn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHTIME, "\\chtime" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGBDIAG, "\\clbgbdiag" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGCROSS, "\\clbgcross" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGDCROSS, "\\clbgdcross" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGDKBDIAG, "\\clbgdkbdiag" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGDKCROSS, "\\clbgdkcross" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGDKDCROSS, "\\clbgdkdcross" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGDKFDIAG, "\\clbgdkfdiag" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGDKHOR, "\\clbgdkhor" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGDKVERT, "\\clbgdkvert" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGFDIAG, "\\clbgfdiag" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGHORIZ, "\\clbghoriz" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGVERT, "\\clbgvert" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBRDRB, "\\clbrdrb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBRDRL, "\\clbrdrl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBRDRR, "\\clbrdrr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBRDRT, "\\clbrdrt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLCBPAT, "\\clcbpat" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLCFPAT, "\\clcfpat" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLMGF, "\\clmgf" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLMRG, "\\clmrg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLSHDNG, "\\clshdng" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COLNO, "\\colno" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COLORTBL, "\\colortbl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COLS, "\\cols" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COLSR, "\\colsr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COLSX, "\\colsx" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COLUMN, "\\column" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COLW, "\\colw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COMMENT, "\\comment" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CREATIM, "\\creatim" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CTRL, "\\ctrl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DEFF, "\\deff" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DEFFORMAT, "\\defformat" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DEFLANG, "\\deflang" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DEFTAB, "\\deftab" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DELETED, "\\deleted" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRMTXTX, "\\dfrmtxtx" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRMTXTY, "\\dfrmtxty" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DIBITMAP, "\\dibitmap" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DN, "\\dn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOCCOMM, "\\doccomm" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOCTEMP, "\\doctemp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DROPCAPLI, "\\dropcapli" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DROPCAPT, "\\dropcapt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ABSNOOVRLP, "\\absnoovrlp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DXFRTEXT, "\\dxfrtext" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DY, "\\dy" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EDMINS, "\\edmins" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EMDASH, "\\emdash" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ENDASH, "\\endash" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ENDDOC, "\\enddoc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ENDNHERE, "\\endnhere" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ENDNOTES, "\\endnotes" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EXPND, "\\expnd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EXPNDTW, "\\expndtw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_F, "\\f" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FACINGP, "\\facingp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FACPGSXN, "\\facpgsxn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FALT, "\\falt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FCHARSET, "\\fcharset" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FDECOR, "\\fdecor" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FI, "\\fi" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FIELD, "\\field" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDDIRTY, "\\flddirty" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDEDIT, "\\fldedit" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDINST, "\\fldinst" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDLOCK, "\\fldlock" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDPRIV, "\\fldpriv" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDRSLT, "\\fldrslt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FMODERN, "\\fmodern" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FN, "\\fn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FNIL, "\\fnil" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FONTTBL, "\\fonttbl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTER, "\\footer" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERF, "\\footerf" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERL, "\\footerl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERR, "\\footerr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERY, "\\footery" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTNOTE, "\\footnote" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FPRQ, "\\fprq" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FRACWIDTH, "\\fracwidth" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FROMAN, "\\froman" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FS, "\\fs" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FSCRIPT, "\\fscript" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FSWISS, "\\fswiss" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTECH, "\\ftech" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNBJ, "\\ftnbj" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNCN, "\\ftncn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNRESTART, "\\ftnrestart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNSEP, "\\ftnsep" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNSEPC, "\\ftnsepc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNSTART, "\\ftnstart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNTJ, "\\ftntj" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GREEN, "\\green" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GUTTER, "\\gutter" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GUTTERSXN, "\\guttersxn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADER, "\\header" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERF, "\\headerf" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERL, "\\headerl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERR, "\\headerr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERY, "\\headery" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HR, "\\hr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHHOTZ, "\\hyphhotz" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_I, "\\i" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ID, "\\id" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_INFO, "\\info" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_INTBL, "\\intbl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_IXE, "\\ixe" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_KEEP, "\\keep" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_KEEPN, "\\keepn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_KERNING, "\\kerning" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_KEYCODE, "\\keycode" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_KEYWORDS, "\\keywords" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LANDSCAPE, "\\landscape" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LANG, "\\lang" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LDBLQUOTE, "\\ldblquote" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVEL, "\\level" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LI, "\\li" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LIN, "\\lin" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINE, "\\line" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINEBETCOL, "\\linebetcol" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINECONT, "\\linecont" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINEMOD, "\\linemod" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINEPPAGE, "\\lineppage" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINERESTART, "\\linerestart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINESTART, "\\linestart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINESTARTS, "\\linestarts" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINEX, "\\linex" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LNDSCPSXN, "\\lndscpsxn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LQUOTE, "\\lquote" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MAC, "\\mac" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MACPICT, "\\macpict" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MAKEBACKUP, "\\makebackup" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGB, "\\margb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGBSXN, "\\margbsxn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGL, "\\margl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGLSXN, "\\marglsxn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGMIRROR, "\\margmirror" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGR, "\\margr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGRSXN, "\\margrsxn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGT, "\\margt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGTSXN, "\\margtsxn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MIN, "\\min" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MO, "\\mo" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NEXTCSET, "\\nextcset" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NEXTFILE, "\\nextfile" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOFCHARS, "\\nofchars" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOFPAGES, "\\nofpages" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOFWORDS, "\\nofwords" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOLINE, "\\noline" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOSUPERSUB, "\\nosupersub" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOWRAP, "\\nowrap" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OPERATOR, "\\operator" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OUTL, "\\outl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PAGE, "\\page" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PAGEBB, "\\pagebb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PAPERH, "\\paperh" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PAPERW, "\\paperw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PAR, "\\par" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PARD, "\\pard" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PC, "\\pc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PCA, "\\pca" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGHSXN, "\\pghsxn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNCONT, "\\pgncont" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNDEC, "\\pgndec" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNLCLTR, "\\pgnlcltr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNLCRM, "\\pgnlcrm" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNRESTART, "\\pgnrestart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNSTART, "\\pgnstart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNSTARTS, "\\pgnstarts" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNUCLTR, "\\pgnucltr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNUCRM, "\\pgnucrm" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNX, "\\pgnx" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNY, "\\pgny" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGWSXN, "\\pgwsxn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PHCOL, "\\phcol" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PHMRG, "\\phmrg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PHPG, "\\phpg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICCROPB, "\\piccropb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICCROPL, "\\piccropl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICCROPR, "\\piccropr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICCROPT, "\\piccropt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICH, "\\pich" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICHGOAL, "\\pichgoal" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICSCALED, "\\picscaled" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICSCALEX, "\\picscalex" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICSCALEY, "\\picscaley" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICT, "\\pict" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICW, "\\picw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICWGOAL, "\\picwgoal" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PLAIN, "\\plain" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PMMETAFILE, "\\pmmetafile" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSNEGX, "\\posnegx" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSNEGY, "\\posnegy" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSX, "\\posx" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSXC, "\\posxc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSXI, "\\posxi" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSXL, "\\posxl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSXO, "\\posxo" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSXR, "\\posxr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSY, "\\posy" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSYB, "\\posyb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSYC, "\\posyc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSYIL, "\\posyil" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSYT, "\\posyt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PRINTIM, "\\printim" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PSOVER, "\\psover" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PVMRG, "\\pvmrg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PVPARA, "\\pvpara" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PVPG, "\\pvpg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_QC, "\\qc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_QJ, "\\qj" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_QL, "\\ql" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_QR, "\\qr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RDBLQUOTE, "\\rdblquote" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RED, "\\red" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVBAR, "\\revbar" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVISED, "\\revised" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVISIONS, "\\revisions" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVPROP, "\\revprop" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVTIM, "\\revtim" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RI, "\\ri" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RIN, "\\rin" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ROW, "\\row" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RQUOTE, "\\rquote" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RTF, "\\rtf" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RXE, "\\rxe" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_S, "\\s" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SA, "\\sa" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SB, "\\sb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SBASEDON, "\\sbasedon" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SBKCOL, "\\sbkcol" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SBKEVEN, "\\sbkeven" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SBKNONE, "\\sbknone" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SBKODD, "\\sbkodd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SBKPAGE, "\\sbkpage" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SBYS, "\\sbys" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SCAPS, "\\scaps" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECT, "\\sect" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTD, "\\sectd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHAD, "\\shad" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHADING, "\\shading" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHIFT, "\\shift" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SL, "\\sl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SNEXT, "\\snext" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_STRIKE, "\\strike" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_STYLESHEET, "\\stylesheet" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SUB, "\\sub" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SUBJECT, "\\subject" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SUPER, "\\super" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TAB, "\\tab" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TB, "\\tb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TC, "\\tc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TCF, "\\tcf" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TCL, "\\tcl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TEMPLATE, "\\template" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TITLE, "\\title" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TITLEPG, "\\titlepg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TLDOT, "\\tldot" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TLEQ, "\\tleq" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TLHYPH, "\\tlhyph" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TLTH, "\\tlth" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TLUL, "\\tlul" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TQC, "\\tqc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TQDEC, "\\tqdec" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TQR, "\\tqr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TQL, "\\tql" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRGAPH, "\\trgaph" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRLEFT, "\\trleft" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TROWD, "\\trowd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRQC, "\\trqc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRQL, "\\trql" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRQR, "\\trqr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRRH, "\\trrh" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TX, "\\tx" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TXE, "\\txe" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_UL, "\\ul" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULD, "\\uld" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULDB, "\\uldb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULNONE, "\\ulnone" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULW, "\\ulw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_UP, "\\up" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_V, "\\v" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VERN, "\\vern" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VERSION, "\\version" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VERTALB, "\\vertalb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VERTALC, "\\vertalc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VERTALJ, "\\vertalj" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VERTALT, "\\vertalt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WBITMAP, "\\wbitmap" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WBMBITSPIXEL, "\\wbmbitspixel" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WBMPLANES, "\\wbmplanes" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WBMWIDTHBYTES, "\\wbmwidthbytes" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WIDOWCTRL, "\\widowctrl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WMETAFILE, "\\wmetafile" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_XE, "\\xe" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_YR, "\\yr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOBRKHYPH, "\\_" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FORMULA, "\\|" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOBREAK, "\\~" ); + + +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AB, "\\ab" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ACAPS, "\\acaps" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ACF, "\\acf" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ADDITIVE, "\\additive" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ADN, "\\adn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AENDDOC, "\\aenddoc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AENDNOTES, "\\aendnotes" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AEXPND, "\\aexpnd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AF, "\\af" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFS, "\\afs" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNBJ, "\\aftnbj" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNCN, "\\aftncn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNALC, "\\aftnnalc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNAR, "\\aftnnar" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNAUC, "\\aftnnauc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNCHI, "\\aftnnchi" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNRLC, "\\aftnnrlc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNRUC, "\\aftnnruc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNRESTART, "\\aftnrestart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNRSTCONT, "\\aftnrstcont" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNSEP, "\\aftnsep" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNSEPC, "\\aftnsepc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNSTART, "\\aftnstart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNTJ, "\\aftntj" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AI, "\\ai" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ALANG, "\\alang" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ALLPROT, "\\allprot" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ANNOTPROT, "\\annotprot" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AOUTL, "\\aoutl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ASCAPS, "\\ascaps" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ASHAD, "\\ashad" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ASTRIKE, "\\astrike" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ATNAUTHOR, "\\atnauthor" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ATNICN, "\\atnicn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ATNREF, "\\atnref" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ATNTIME, "\\atntime" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ATRFEND, "\\atrfend" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ATRFSTART, "\\atrfstart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AUL, "\\aul" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AULD, "\\auld" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AULDB, "\\auldb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AULNONE, "\\aulnone" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AULW, "\\aulw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AUP, "\\aup" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BKMKPUB, "\\bkmkpub" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRDASH, "\\brdrdash" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRKFRM, "\\brkfrm" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CCHS, "\\cchs" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CPG, "\\cpg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CS, "\\cs" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CVMME, "\\cvmme" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DATAFIELD, "\\datafield" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DO, "\\do" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOBXCOLUMN, "\\dobxcolumn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOBXMARGIN, "\\dobxmargin" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOBXPAGE, "\\dobxpage" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOBYMARGIN, "\\dobymargin" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOBYPAGE, "\\dobypage" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOBYPARA, "\\dobypara" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DODHGT, "\\dodhgt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOLOCK, "\\dolock" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPAENDHOL, "\\dpaendhol" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPAENDL, "\\dpaendl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPAENDSOL, "\\dpaendsol" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPAENDW, "\\dpaendw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPARC, "\\dparc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPARCFLIPX, "\\dparcflipx" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPARCFLIPY, "\\dparcflipy" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPASTARTHOL, "\\dpastarthol" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPASTARTL, "\\dpastartl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPASTARTSOL, "\\dpastartsol" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPASTARTW, "\\dpastartw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCALLOUT, "\\dpcallout" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOA, "\\dpcoa" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOACCENT, "\\dpcoaccent" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOBESTFIT, "\\dpcobestfit" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOBORDER, "\\dpcoborder" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCODABS, "\\dpcodabs" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCODBOTTOM, "\\dpcodbottom" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCODCENTER, "\\dpcodcenter" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCODTOP, "\\dpcodtop" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOLENGTH, "\\dpcolength" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOMINUSX, "\\dpcominusx" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOMINUSY, "\\dpcominusy" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOOFFSET, "\\dpcooffset" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOSMARTA, "\\dpcosmarta" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOTDOUBLE, "\\dpcotdouble" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOTRIGHT, "\\dpcotright" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOTSINGLE, "\\dpcotsingle" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOTTRIPLE, "\\dpcottriple" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOUNT, "\\dpcount" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPELLIPSE, "\\dpellipse" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPENDGROUP, "\\dpendgroup" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLBGCB, "\\dpfillbgcb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLBGCG, "\\dpfillbgcg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLBGCR, "\\dpfillbgcr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLBGGRAY, "\\dpfillbggray" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLBGPAL, "\\dpfillbgpal" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLFGCB, "\\dpfillfgcb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLFGCG, "\\dpfillfgcg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLFGCR, "\\dpfillfgcr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLFGGRAY, "\\dpfillfggray" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLFGPAL, "\\dpfillfgpal" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLPAT, "\\dpfillpat" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPGROUP, "\\dpgroup" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINE, "\\dpline" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINECOB, "\\dplinecob" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINECOG, "\\dplinecog" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINECOR, "\\dplinecor" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEDADO, "\\dplinedado" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEDADODO, "\\dplinedadodo" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEDASH, "\\dplinedash" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEDOT, "\\dplinedot" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEGRAY, "\\dplinegray" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEHOLLOW, "\\dplinehollow" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEPAL, "\\dplinepal" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINESOLID, "\\dplinesolid" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEW, "\\dplinew" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPPOLYCOUNT, "\\dppolycount" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPPOLYGON, "\\dppolygon" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPPOLYLINE, "\\dppolyline" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPPTX, "\\dpptx" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPPTY, "\\dppty" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPRECT, "\\dprect" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPROUNDR, "\\dproundr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPSHADOW, "\\dpshadow" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPSHADX, "\\dpshadx" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPSHADY, "\\dpshady" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPTXBX, "\\dptxbx" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPTXBXMAR, "\\dptxbxmar" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPTXBXTEXT, "\\dptxbxtext" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPX, "\\dpx" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPXSIZE, "\\dpxsize" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPY, "\\dpy" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPYSIZE, "\\dpysize" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DS, "\\ds" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EMSPACE, "\\emspace" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ENSPACE, "\\enspace" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FBIDI, "\\fbidi" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FET, "\\fet" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FID, "\\fid" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FILE, "\\file" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FILETBL, "\\filetbl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDALT, "\\fldalt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FNETWORK, "\\fnetwork" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FONTEMB, "\\fontemb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FONTFILE, "\\fontfile" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FORMDISP, "\\formdisp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FORMPROT, "\\formprot" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FORMSHADE, "\\formshade" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOSNUM, "\\fosnum" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FRELATIVE, "\\frelative" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNALT, "\\ftnalt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNIL, "\\ftnil" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNALC, "\\ftnnalc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNAR, "\\ftnnar" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNAUC, "\\ftnnauc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNCHI, "\\ftnnchi" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNRLC, "\\ftnnrlc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNRUC, "\\ftnnruc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNRSTCONT, "\\ftnrstcont" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNRSTPG, "\\ftnrstpg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTTRUETYPE, "\\fttruetype" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FVALIDDOS, "\\fvaliddos" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FVALIDHPFS, "\\fvalidhpfs" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FVALIDMAC, "\\fvalidmac" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FVALIDNTFS, "\\fvalidntfs" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHAUTO, "\\hyphauto" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHCAPS, "\\hyphcaps" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHCONSEC, "\\hyphconsec" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHPAR, "\\hyphpar" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINKSELF, "\\linkself" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINKSTYLES, "\\linkstyles" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LTRCH, "\\ltrch" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LTRDOC, "\\ltrdoc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LTRMARK, "\\ltrmark" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LTRPAR, "\\ltrpar" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LTRROW, "\\ltrrow" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LTRSECT, "\\ltrsect" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOCOLBAL, "\\nocolbal" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOEXTRASPRL, "\\noextrasprl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOTABIND, "\\notabind" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOWIDCTLPAR, "\\nowidctlpar" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJALIAS, "\\objalias" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJALIGN, "\\objalign" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJAUTLINK, "\\objautlink" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJCLASS, "\\objclass" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJCROPB, "\\objcropb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJCROPL, "\\objcropl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJCROPR, "\\objcropr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJCROPT, "\\objcropt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJDATA, "\\objdata" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJECT, "\\object" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJEMB, "\\objemb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJH, "\\objh" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJICEMB, "\\objicemb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJLINK, "\\objlink" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJLOCK, "\\objlock" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJNAME, "\\objname" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJPUB, "\\objpub" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJSCALEX, "\\objscalex" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJSCALEY, "\\objscaley" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJSECT, "\\objsect" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJSETSIZE, "\\objsetsize" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJSUB, "\\objsub" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJTIME, "\\objtime" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJTRANSY, "\\objtransy" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJUPDATE, "\\objupdate" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJW, "\\objw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OTBLRUL, "\\otblrul" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNHN, "\\pgnhn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNHNSC, "\\pgnhnsc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNHNSH, "\\pgnhnsh" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNHNSM, "\\pgnhnsm" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNHNSN, "\\pgnhnsn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNHNSP, "\\pgnhnsp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICBMP, "\\picbmp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICBPP, "\\picbpp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PN, "\\pn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNACROSS, "\\pnacross" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNB, "\\pnb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNCAPS, "\\pncaps" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNCARD, "\\pncard" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNCF, "\\pncf" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNDEC, "\\pndec" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNF, "\\pnf" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNFS, "\\pnfs" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNHANG, "\\pnhang" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNI, "\\pni" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNINDENT, "\\pnindent" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNLCLTR, "\\pnlcltr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNLCRM, "\\pnlcrm" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNLVL, "\\pnlvl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNLVLBLT, "\\pnlvlblt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNLVLBODY, "\\pnlvlbody" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNLVLCONT, "\\pnlvlcont" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNNUMONCE, "\\pnnumonce" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNORD, "\\pnord" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNORDT, "\\pnordt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNPREV, "\\pnprev" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNQC, "\\pnqc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNQL, "\\pnql" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNQR, "\\pnqr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRESTART, "\\pnrestart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNSCAPS, "\\pnscaps" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNSECLVL, "\\pnseclvl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNSP, "\\pnsp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNSTART, "\\pnstart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNSTRIKE, "\\pnstrike" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNTEXT, "\\pntext" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNTXTA, "\\pntxta" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNTXTB, "\\pntxtb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNUCLTR, "\\pnucltr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNUCRM, "\\pnucrm" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNUL, "\\pnul" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNULD, "\\pnuld" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNULDB, "\\pnuldb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNULNONE, "\\pnulnone" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNULW, "\\pnulw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PRCOLBL, "\\prcolbl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PRINTDATA, "\\printdata" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PSZ, "\\psz" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PUBAUTO, "\\pubauto" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RESULT, "\\result" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVAUTH, "\\revauth" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVDTTM, "\\revdttm" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVPROT, "\\revprot" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVTBL, "\\revtbl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RSLTBMP, "\\rsltbmp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RSLTMERGE, "\\rsltmerge" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RSLTPICT, "\\rsltpict" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RSLTRTF, "\\rsltrtf" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RSLTTXT, "\\rslttxt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RTLCH, "\\rtlch" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RTLDOC, "\\rtldoc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RTLMARK, "\\rtlmark" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RTLPAR, "\\rtlpar" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RTLROW, "\\rtlrow" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RTLSECT, "\\rtlsect" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SEC, "\\sec" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTNUM, "\\sectnum" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTUNLOCKED, "\\sectunlocked" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SLMULT, "\\slmult" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SOFTCOL, "\\softcol" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SOFTLHEIGHT, "\\softlheight" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SOFTLINE, "\\softline" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SOFTPAGE, "\\softpage" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SPRSSPBF, "\\sprsspbf" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SPRSTSP, "\\sprstsp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SUBDOCUMENT, "\\subdocument" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SWPBDR, "\\swpbdr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TCN, "\\tcn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRANSMF, "\\transmf" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRBRDRB, "\\trbrdrb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRBRDRH, "\\trbrdrh" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRBRDRL, "\\trbrdrl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRBRDRR, "\\trbrdrr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRBRDRT, "\\trbrdrt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRBRDRV, "\\trbrdrv" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRHDR, "\\trhdr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRKEEP, "\\trkeep" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDB, "\\trpaddb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDL, "\\trpaddl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDR, "\\trpaddr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDT, "\\trpaddt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDFB, "\\trpaddfb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDFL, "\\trpaddfl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDFR, "\\trpaddfr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDFT, "\\trpaddft" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WRAPTRSP, "\\wraptrsp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_XEF, "\\xef" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ZWJ, "\\zwj" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ZWNJ, "\\zwnj" ); + +// neue Tokens zur 1.5 +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ABSLOCK, "\\abslock" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ADJUSTRIGHT, "\\adjustright" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNCHOSUNG, "\\aftnnchosung" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNCNUM, "\\aftnncnum" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNDBAR, "\\aftnndbar" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNDBNUM, "\\aftnndbnum" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNDBNUMD, "\\aftnndbnumd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNDBNUMK, "\\aftnndbnumk" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNDBNUMT, "\\aftnndbnumt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNGANADA, "\\aftnnganada" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNGBNUM, "\\aftnngbnum" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNGBNUMD, "\\aftnngbnumd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNGBNUMK, "\\aftnngbnumk" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNGBNUML, "\\aftnngbnuml" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNZODIAC, "\\aftnnzodiac" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNZODIACD, "\\aftnnzodiacd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNZODIACL, "\\aftnnzodiacl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ANIMTEXT, "\\animtext" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ANSICPG, "\\ansicpg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BACKGROUND, "\\background" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BDBFHDR, "\\bdbfhdr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BLIPTAG, "\\bliptag" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BLIPUID, "\\blipuid" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BLIPUPI, "\\blipupi" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRART, "\\brdrart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRDASHD, "\\brdrdashd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRDASHDD, "\\brdrdashdd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRDASHDOTSTR, "\\brdrdashdotstr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRDASHSM, "\\brdrdashsm" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDREMBOSS, "\\brdremboss" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRENGRAVE, "\\brdrengrave" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRFRAME, "\\brdrframe" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTHTNLG, "\\brdrthtnlg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTHTNMG, "\\brdrthtnmg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTHTNSG, "\\brdrthtnsg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTNTHLG, "\\brdrtnthlg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTNTHMG, "\\brdrtnthmg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTNTHSG, "\\brdrtnthsg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTNTHTNLG, "\\brdrtnthtnlg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTNTHTNMG, "\\brdrtnthtnmg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTNTHTNSG, "\\brdrtnthtnsg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTRIPLE, "\\brdrtriple" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRWAVY, "\\brdrwavy" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRWAVYDB, "\\brdrwavydb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CATEGORY, "\\category" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CGRID, "\\cgrid" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHARSCALEX, "\\charscalex" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGBDIAG, "\\chbgbdiag" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGCROSS, "\\chbgcross" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGDCROSS, "\\chbgdcross" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGDKBDIAG, "\\chbgdkbdiag" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGDKCROSS, "\\chbgdkcross" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGDKDCROSS, "\\chbgdkdcross" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGDKFDIAG, "\\chbgdkfdiag" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGDKHORIZ, "\\chbgdkhoriz" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGDKVERT, "\\chbgdkvert" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGFDIAG, "\\chbgfdiag" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGHORIZ, "\\chbghoriz" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGVERT, "\\chbgvert" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBRDR, "\\chbrdr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHCBPAT, "\\chcbpat" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHCFPAT, "\\chcfpat" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHSHDNG, "\\chshdng" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADL, "\\clpadl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADT, "\\clpadt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADB, "\\clpadb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADR, "\\clpadr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADFL, "\\clpadfl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADFT, "\\clpadft" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADFB, "\\clpadfb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADFR, "\\clpadfr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLTXLRTB, "\\cltxlrtb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLTXTBRL, "\\cltxtbrl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLVERTALB, "\\clvertalb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLVERTALC, "\\clvertalc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLVERTALT, "\\clvertalt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLVMGF, "\\clvmgf" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLVMRG, "\\clvmrg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLTXTBRLV, "\\cltxtbrlv" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLTXBTLR, "\\cltxbtlr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLTXLRTBV, "\\cltxlrtbv" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COMPANY, "\\company" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CRAUTH, "\\crauth" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CRDATE, "\\crdate" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DATE, "\\date" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DEFLANGFE, "\\deflangfe" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRAUTH, "\\dfrauth" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRDATE, "\\dfrdate" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRSTART, "\\dfrstart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRSTOP, "\\dfrstop" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRXST, "\\dfrxst" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DGMARGIN, "\\dgmargin" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DNTBLNSBDB, "\\dntblnsbdb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOCTYPE, "\\doctype" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOCVAR, "\\docvar" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCODESCENT, "\\dpcodescent" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EMBO, "\\embo" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EMFBLIP, "\\emfblip" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EXPSHRTN, "\\expshrtn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FAAUTO, "\\faauto" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FBIAS, "\\fbias" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFDEFRES, "\\ffdefres" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFDEFTEXT, "\\ffdeftext" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFENTRYMCR, "\\ffentrymcr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFEXITMCR, "\\ffexitmcr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFFORMAT, "\\ffformat" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFHASLISTBOX, "\\ffhaslistbox" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFHELPTEXT, "\\ffhelptext" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFHPS, "\\ffhps" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFL, "\\ffl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFMAXLEN, "\\ffmaxlen" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFNAME, "\\ffname" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFOWNHELP, "\\ffownhelp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFOWNSTAT, "\\ffownstat" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFPROT, "\\ffprot" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFRECALC, "\\ffrecalc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFRES, "\\ffres" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFSIZE, "\\ffsize" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFSTATTEXT, "\\ffstattext" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFTYPE, "\\fftype" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFTYPETXT, "\\fftypetxt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDTYPE, "\\fldtype" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FNAME, "\\fname" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FORMFIELD, "\\formfield" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FROMTEXT, "\\fromtext" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNCHOSUNG, "\\ftnnchosung" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNCNUM, "\\ftnncnum" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNDBAR, "\\ftnndbar" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNDBNUM, "\\ftnndbnum" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNDBNUMD, "\\ftnndbnumd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNDBNUMK, "\\ftnndbnumk" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNDBNUMT, "\\ftnndbnumt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNGANADA, "\\ftnnganada" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNGBNUM, "\\ftnngbnum" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNGBNUMD, "\\ftnngbnumd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNGBNUMK, "\\ftnngbnumk" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNGBNUML, "\\ftnngbnuml" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNZODIAC, "\\ftnnzodiac" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNZODIACD, "\\ftnnzodiacd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNZODIACL, "\\ftnnzodiacl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_G, "\\g" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GCW, "\\gcw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GRIDTBL, "\\gridtbl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HIGHLIGHT, "\\highlight" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HLFR, "\\hlfr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HLINKBASE, "\\hlinkbase" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HLLOC, "\\hlloc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HLSRC, "\\hlsrc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ILVL, "\\ilvl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_IMPR, "\\impr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_JPEGBLIP, "\\jpegblip" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELFOLLOW, "\\levelfollow" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELINDENT, "\\levelindent" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELJC, "\\leveljc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELLEGAL, "\\levellegal" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELNFC, "\\levelnfc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELNORESTART, "\\levelnorestart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELNUMBERS, "\\levelnumbers" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELOLD, "\\levelold" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELPREV, "\\levelprev" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELPREVSPACE, "\\levelprevspace" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELSPACE, "\\levelspace" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELSTARTAT, "\\levelstartat" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELTEXT, "\\leveltext" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINKVAL, "\\linkval" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LIST, "\\list" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTID, "\\listid" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTLEVEL, "\\listlevel" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTNAME, "\\listname" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTOVERRIDE, "\\listoverride" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTOVERRIDECOUNT, "\\listoverridecount" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTOVERRIDEFORMAT, "\\listoverrideformat" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTOVERRIDESTART, "\\listoverridestart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTOVERRIDETABLE, "\\listoverridetable" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTRESTARTHDN, "\\listrestarthdn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTSIMPLE, "\\listsimple" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTTABLE, "\\listtable" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTTEMPLATEID, "\\listtemplateid" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTTEXT, "\\listtext" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LS, "\\ls" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LYTEXCTTP, "\\lytexcttp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LYTPRTMET, "\\lytprtmet" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MANAGER, "\\manager" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MSMCAP, "\\msmcap" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOFCHARSWS, "\\nofcharsws" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOLEAD, "\\nolead" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NONSHPPICT, "\\nonshppict" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOSECTEXPAND, "\\nosectexpand" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOSNAPLINEGRID, "\\nosnaplinegrid" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOSPACEFORUL, "\\nospaceforul" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOULTRLSPC, "\\noultrlspc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOXLATTOYEN, "\\noxlattoyen" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJATTPH, "\\objattph" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJHTML, "\\objhtml" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJOCX, "\\objocx" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLDLINEWRAP, "\\oldlinewrap" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OUTLINELEVEL, "\\outlinelevel" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OVERLAY, "\\overlay" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PANOSE, "\\panose" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDRB, "\\pgbrdrb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDRFOOT, "\\pgbrdrfoot" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDRHEAD, "\\pgbrdrhead" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDRL, "\\pgbrdrl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDROPT, "\\pgbrdropt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDRR, "\\pgbrdrr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDRSNAP, "\\pgbrdrsnap" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDRT, "\\pgbrdrt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNCHOSUNG, "\\pgnchosung" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNCNUM, "\\pgncnum" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNDBNUMK, "\\pgndbnumk" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNDBNUMT, "\\pgndbnumt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNGANADA, "\\pgnganada" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNGBNUM, "\\pgngbnum" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNGBNUMD, "\\pgngbnumd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNGBNUMK, "\\pgngbnumk" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNGBNUML, "\\pgngbnuml" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNZODIAC, "\\pgnzodiac" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNZODIACD, "\\pgnzodiacd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNZODIACL, "\\pgnzodiacl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICPROP, "\\picprop" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNAIUEO, "\\pnaiueo" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNAIUEOD, "\\pnaiueod" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNCHOSUNG, "\\pnchosung" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNDBNUMD, "\\pndbnumd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNDBNUMK, "\\pndbnumk" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNDBNUML, "\\pndbnuml" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNDBNUMT, "\\pndbnumt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNGANADA, "\\pnganada" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNGBLIP, "\\pngblip" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNGBNUM, "\\pngbnum" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNGBNUMD, "\\pngbnumd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNGBNUMK, "\\pngbnumk" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNGBNUML, "\\pngbnuml" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRAUTH, "\\pnrauth" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRDATE, "\\pnrdate" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRNFC, "\\pnrnfc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRNOT, "\\pnrnot" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRPNBR, "\\pnrpnbr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRRGB, "\\pnrrgb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRSTART, "\\pnrstart" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRSTOP, "\\pnrstop" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRXST, "\\pnrxst" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNZODIAC, "\\pnzodiac" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNZODIACD, "\\pnzodiacd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNZODIACL, "\\pnzodiacl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LFOLEVEL, "\\lfolevel" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSYIN, "\\posyin" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSYOUT, "\\posyout" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PRIVATE, "\\private" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PROPNAME, "\\propname" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PROPTYPE, "\\proptype" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVAUTHDEL, "\\revauthdel" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVDTTMDEL, "\\revdttmdel" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SAUTOUPD, "\\sautoupd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTDEFAULTCL, "\\sectdefaultcl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTEXPAND, "\\sectexpand" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTLINEGRID, "\\sectlinegrid" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTSPECIFYCL, "\\sectspecifycl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTSPECIFYL, "\\sectspecifyl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHIDDEN, "\\shidden" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBOTTOM, "\\shpbottom" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBXCOLUMN, "\\shpbxcolumn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBXMARGIN, "\\shpbxmargin" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBXPAGE, "\\shpbxpage" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBYMARGIN, "\\shpbymargin" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBYPAGE, "\\shpbypage" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBYPARA, "\\shpbypara" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPFBLWTXT, "\\shpfblwtxt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPFHDR, "\\shpfhdr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPGRP, "\\shpgrp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPLEFT, "\\shpleft" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPLID, "\\shplid" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPLOCKANCHOR, "\\shplockanchor" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPPICT, "\\shppict" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPRIGHT, "\\shpright" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPRSLT, "\\shprslt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPTOP, "\\shptop" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPTXT, "\\shptxt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPWRK, "\\shpwrk" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPWR, "\\shpwr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPZ, "\\shpz" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SPRSBSP, "\\sprsbsp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SPRSLNSP, "\\sprslnsp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SPRSTSM, "\\sprstsm" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_STATICVAL, "\\staticval" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_STEXTFLOW, "\\stextflow" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_STRIKED, "\\striked" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SUBFONTBYSIZE, "\\subfontbysize" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TCELLD, "\\tcelld" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TIME, "\\time" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRUNCATEFONTHEIGHT, "\\truncatefontheight" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_UC, "\\uc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_UD, "\\ud" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULDASH, "\\uldash" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULDASHD, "\\uldashd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULDASHDD, "\\uldashdd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULTH, "\\ulth" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULWAVE, "\\ulwave" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULC, "\\ulc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_U, "\\u" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_UPR, "\\upr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_USERPROPS, "\\userprops" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VIEWKIND, "\\viewkind" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VIEWSCALE, "\\viewscale" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VIEWZK, "\\viewzk" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WIDCTLPAR, "\\widctlpar" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WINDOWCAPTION, "\\windowcaption" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WPEQN, "\\wpeqn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WPJST, "\\wpjst" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WPSP, "\\wpsp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_YXE, "\\yxe" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FRMTXLRTB, "\\frmtxlrtb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FRMTXTBRL, "\\frmtxtbrl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FRMTXBTLR, "\\frmtxbtlr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FRMTXLRTBV, "\\frmtxlrtbv" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FRMTXTBRLV, "\\frmtxtbrlv" ); + +// MS-2000 Tokens +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULTHD, "\\ulthd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULTHDASH, "\\ulthdash" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULLDASH, "\\ulldash" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULTHLDASH, "\\ulthldash" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULTHDASHD, "\\ulthdashd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULTHDASHDD, "\\ulthdashdd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULHWAVE, "\\ulhwave" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULULDBWAVE, "\\ululdbwave" ); + +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LOCH, "\\loch" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HICH, "\\hich" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DBCH, "\\dbch" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LANGFE, "\\langfe" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ADEFLANG, "\\adeflang" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ADEFF, "\\adeff" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ACCNONE, "\\accnone" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ACCDOT, "\\accdot" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ACCCOMMA, "\\acccomma" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TWOINONE, "\\twoinone" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HORZVERT, "\\horzvert" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FAHANG, "\\fahang" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FAVAR, "\\favar" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FACENTER, "\\facenter" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FAROMAN, "\\faroman" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FAFIXED, "\\fafixed" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOCWRAP, "\\nocwrap" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOOVERFLOW,"\\nooverflow" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ASPALPHA, "\\aspalpha" ); + +// SWG spezifische Attribute +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GRFALIGNV, "\\grfalignv" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GRFALIGNH, "\\grfalignh" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GRFMIRROR, "\\grfmirror" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERYB, "\\headeryb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERXL, "\\headerxl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERXR, "\\headerxr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERYT, "\\footeryt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERXL, "\\footerxl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERXR, "\\footerxr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERYH, "\\headeryh" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERYH, "\\footeryh" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BALANCEDCOLUMN, "\\swcolmnblnc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_UPDNPROP, "\\updnprop" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PRTDATA, "\\prtdata" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BKMKKEY, "\\bkmkkey" ); + +// Attribute fuer die freifliegenden Rahmen +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYPRINT, "\\flyprint" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYOPAQUE, "\\flyopaque" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYPRTCTD, "\\flyprtctd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYMAINCNT, "\\flymaincnt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYVERT, "\\flyvert" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYHORZ, "\\flyhorz" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRMTXTL, "\\dfrmtxtl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRMTXTR, "\\dfrmtxtr" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRMTXTU, "\\dfrmtxtu" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRMTXTW, "\\dfrmtxtw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYANCHOR, "\\flyanchor" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYCNTNT, "\\flycntnt" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYCOLUMN, "\\flycolumn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYPAGE, "\\flypage" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYINPARA, "\\flyinpara" ); + +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDBOX, "\\brdbox" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDLNCOL, "\\brdlncol" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDLNIN, "\\brdlnin" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDLNOUT, "\\brdlnout" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDLNDIST, "\\brdlndist" ); + +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHADOW, "\\shadow" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHDWDIST, "\\shdwdist" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHDWSTYLE, "\\shdwstyle" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHDWCOL, "\\shdwcol" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHDWFCOL, "\\shdwfcol" ); + + +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGDSCTBL, "\\pgdsctbl" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGDSC, "\\pgdsc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGDSCUSE, "\\pgdscuse" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGDSCNXT, "\\pgdscnxt" ); + +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHEN, "\\hyphen" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHLEAD, "\\hyphlead" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHTRAIL, "\\hyphtrail" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHMAX, "\\hyphmax" ); + +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TLSWG, "\\tlswg" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRK, "\\pgbrk" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGDSCNO, "\\pgdscno" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SOUTLVL, "\\soutlvl" ); + +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHP, "\\shp" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SN, "\\sn" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SV, "\\sv" ); +/* +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPLEFT, "\\shpleft" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPTOP, "\\shptop" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBOTTOM, "\\shpbottom" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPRIGHT, "\\shpright" ); +*/ + +// Support for overline attributes +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OL, "\\ol" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLD, "\\old" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLDB, "\\oldb" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLNONE, "\\olnone" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLW, "\\olw" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLDASH, "\\oldash" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLDASHD, "\\oldashd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLDASHDD, "\\oldashdd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLTH, "\\olth" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLWAVE, "\\olwave" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLC, "\\olc" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLTHD, "\\olthd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLTHDASH, "\\olthdash" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLLDASH, "\\olldash" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLTHLDASH, "\\olthldash" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLTHDASHD, "\\olthdashd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLTHDASHDD, "\\olthdashdd" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLHWAVE, "\\olhwave" ); +sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLOLDBWAVE, "\\ololdbwave" ); + +/* vi:set tabstop=4 shiftwidth=4 expandtab: */ diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx index f58a5d11a3c6..c7444dd5cbcb 100644 --- a/svtools/source/svrtf/svparser.cxx +++ b/svtools/source/svrtf/svparser.cxx @@ -666,4 +666,64 @@ IMPL_STATIC_LINK( SvParser, NewDataRead, void*, EMPTYARG ) return 0; } +/*======================================================================== + * + * SvKeyValueIterator. + * + *======================================================================*/ +SV_DECL_PTRARR_DEL(SvKeyValueList_Impl, SvKeyValue*, 0, 4) +SV_IMPL_PTRARR(SvKeyValueList_Impl, SvKeyValue*); + +/* + * SvKeyValueIterator. + */ +SvKeyValueIterator::SvKeyValueIterator (void) + : m_pList (new SvKeyValueList_Impl), + m_nPos (0) +{ +} + +/* + * ~SvKeyValueIterator. + */ +SvKeyValueIterator::~SvKeyValueIterator (void) +{ + delete m_pList; +} + +/* + * GetFirst. + */ +BOOL SvKeyValueIterator::GetFirst (SvKeyValue &rKeyVal) +{ + m_nPos = m_pList->Count(); + return GetNext (rKeyVal); +} + +/* + * GetNext. + */ +BOOL SvKeyValueIterator::GetNext (SvKeyValue &rKeyVal) +{ + if (m_nPos > 0) + { + rKeyVal = *m_pList->GetObject(--m_nPos); + return TRUE; + } + else + { + // Nothing to do. + return FALSE; + } +} + +/* + * Append. + */ +void SvKeyValueIterator::Append (const SvKeyValue &rKeyVal) +{ + SvKeyValue *pKeyVal = new SvKeyValue (rKeyVal); + m_pList->C40_INSERT(SvKeyValue, pKeyVal, m_pList->Count()); +} + /* vi:set tabstop=4 shiftwidth=4 expandtab: */ diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx index 14321ecdd84c..19d40c17ce5c 100644 --- a/svtools/source/uno/unoevent.cxx +++ b/svtools/source/uno/unoevent.cxx @@ -492,7 +492,7 @@ SvDetachedEventDescriptor::~SvDetachedEventDescriptor() delete aMacros[i]; } - delete aMacros; + delete [] aMacros; } sal_Int16 SvDetachedEventDescriptor::getIndex(const sal_uInt16 nID) const diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx index da2de08c9544..f5e1b4ea3770 100644 --- a/toolkit/inc/toolkit/helper/property.hxx +++ b/toolkit/inc/toolkit/helper/property.hxx @@ -165,7 +165,7 @@ namespace rtl { #define BASEPROPERTY_IMAGEPOSITION 113 // sal_Int16 #define BASEPROPERTY_NATIVE_WIDGET_LOOK 114 // sal_Bool #define BASEPROPERTY_VERTICALALIGN 115 // VerticalAlignment -#define BASEPROPERTY_WHEELWITHOUTFOCUS 116 // sal_Bool +#define BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR 116 // sal_Int16 #define BASEPROPERTY_GRAPHIC 117 // css.graphic.XGraphic #define BASEPROPERTY_STEP_TIME 118 // sal_Int32 #define BASEPROPERTY_DECORATION 119 // sal_Bool @@ -191,6 +191,7 @@ namespace rtl { #define BASEPROPERTY_IMAGE_SCALE_MODE 137 #define BASEPROPERTY_WRITING_MODE 138 #define BASEPROPERTY_CONTEXT_WRITING_MODE 139 +#define BASEPROPERTY_ENABLEVISIBLE 140 // sal_Bool // Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen. #define BASEPROPERTY_FONTDESCRIPTORPART_START 1000 diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 09e318800184..125d134cd3fd 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -35,6 +35,7 @@ #include <com/sun/star/awt/KeyModifier.hpp> #include <com/sun/star/awt/MouseEvent.hpp> #include <com/sun/star/awt/MouseButton.hpp> +#include <com/sun/star/awt/MouseWheelBehavior.hpp> #include <com/sun/star/awt/XTopWindow.hpp> #include <com/sun/star/awt/Style.hpp> #include <com/sun/star/accessibility/AccessibleRole.hpp> @@ -82,6 +83,7 @@ using ::com::sun::star::style::VerticalAlignment_BOTTOM; using ::com::sun::star::style::VerticalAlignment_MAKE_FIXED_SIZE; namespace WritingMode2 = ::com::sun::star::text::WritingMode2; +namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior; //==================================================================== @@ -226,6 +228,8 @@ private: ::toolkit::AccessibilityClient maAccFactory; bool mbDisposed; bool mbDrawingOntoParent; // no bit mask, is passed around by reference + sal_Bool mbEnableVisible; + sal_Bool mbDirectVisible; ::osl::Mutex maListenerContainerMutex; ::cppu::OInterfaceContainerHelper maWindow2Listeners; @@ -273,6 +277,15 @@ public: */ VCLXWindowImpl( VCLXWindow& _rAntiImpl, ::vos::IMutex& _rMutex, bool _bWithDefaultProps ); + /** synchronously mbEnableVisible + */ + void setEnableVisible( sal_Bool bEnableVisible ) { mbEnableVisible = bEnableVisible; } + sal_Bool isEnableVisible() { return mbEnableVisible; } + /** synchronously mbDirectVisible; + */ + void setDirectVisible( sal_Bool bDirectVisible ) { mbDirectVisible = bDirectVisible; } + sal_Bool isDirectVisible() { return mbDirectVisible; } + /** asynchronously notifies a mouse event to the VCLXWindow's XMouseListeners */ void notifyMouseEvent( const awt::MouseEvent& _rMouseEvent, MouseEventType _nType ); @@ -347,6 +360,8 @@ VCLXWindowImpl::VCLXWindowImpl( VCLXWindow& _rAntiImpl, ::vos::IMutex& _rMutex, ,mrMutex( _rMutex ) ,mbDisposed( false ) ,mbDrawingOntoParent( false ) + ,mbEnableVisible(sal_True) + ,mbDirectVisible(sal_True) ,maListenerContainerMutex( ) ,maWindow2Listeners( maListenerContainerMutex ) ,maDockableWindowListeners( maListenerContainerMutex ) @@ -625,7 +640,12 @@ void VCLXWindow::SetWindow( Window* pWindow ) SetOutputDevice( pWindow ); if ( GetWindow() ) + { GetWindow()->AddEventListener( LINK( this, VCLXWindow, WindowEventListener ) ); + sal_Bool bDirectVisible = pWindow ? pWindow->IsVisible() : false; + mpImpl->setDirectVisible( bDirectVisible ); + } + } void VCLXWindow::suspendVclEventListening( ) @@ -1226,7 +1246,8 @@ void VCLXWindow::setVisible( sal_Bool bVisible ) throw(::com::sun::star::uno::Ru } } */ - pWindow->Show( bVisible ); + mpImpl->setDirectVisible( bVisible ); + pWindow->Show( bVisible && mpImpl->isEnableVisible() ); } } @@ -1529,6 +1550,7 @@ void VCLXWindow::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds, bool bWithDe BASEPROPERTY_HELPURL, BASEPROPERTY_TEXT, BASEPROPERTY_PRINTABLE, + BASEPROPERTY_ENABLEVISIBLE, // for visibility BASEPROPERTY_TABSTOP, 0); @@ -1634,19 +1656,27 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com:: } break; - case BASEPROPERTY_WHEELWITHOUTFOCUS: + case BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR: { - sal_Bool bWheelOnHover( sal_True ); - if ( Value >>= bWheelOnHover ) - { - AllSettings aSettings = pWindow->GetSettings(); - MouseSettings aMouseSettings = aSettings.GetMouseSettings(); + sal_uInt16 nWheelBehavior( MouseWheelBehavior::SCROLL_FOCUS_ONLY ); + OSL_VERIFY( Value >>= nWheelBehavior ); - aMouseSettings.SetNoWheelActionWithoutFocus( !bWheelOnHover ); - aSettings.SetMouseSettings( aMouseSettings ); + AllSettings aSettings = pWindow->GetSettings(); + MouseSettings aMouseSettings = aSettings.GetMouseSettings(); - pWindow->SetSettings( aSettings, TRUE ); + USHORT nVclBehavior( MOUSE_WHEEL_FOCUS_ONLY ); + switch ( nWheelBehavior ) + { + case MouseWheelBehavior::SCROLL_DISABLED: nVclBehavior = MOUSE_WHEEL_DISABLE; break; + case MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclBehavior = MOUSE_WHEEL_FOCUS_ONLY; break; + case MouseWheelBehavior::SCROLL_ALWAYS: nVclBehavior = MOUSE_WHEEL_ALWAYS; break; + default: + OSL_ENSURE( false, "VCLXWindow::setProperty( 'MouseWheelBehavior' ): illegal property value!" ); } + + aMouseSettings.SetWheelBehavior( nWheelBehavior ); + aSettings.SetMouseSettings( aMouseSettings ); + pWindow->SetSettings( aSettings, TRUE ); } break; @@ -1672,6 +1702,19 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com:: setEnable( b ); } break; + case BASEPROPERTY_ENABLEVISIBLE: + { + sal_Bool b = sal_False; + if ( Value >>= b ) + { + if( b != mpImpl->isEnableVisible() ) + { + mpImpl->setEnableVisible( b ); + pWindow->Show( b && mpImpl->isDirectVisible() ); + } + } + } + break; case BASEPROPERTY_TEXT: case BASEPROPERTY_LABEL: case BASEPROPERTY_TITLE: @@ -2122,10 +2165,19 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com:: aProp <<= mpImpl->mnWritingMode; break; - case BASEPROPERTY_WHEELWITHOUTFOCUS: + case BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR: { - sal_Bool bWheelOnHover = !GetWindow()->GetSettings().GetMouseSettings().GetNoWheelActionWithoutFocus(); - aProp <<= bWheelOnHover; + USHORT nVclBehavior = GetWindow()->GetSettings().GetMouseSettings().GetWheelBehavior(); + sal_Int16 nBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY; + switch ( nVclBehavior ) + { + case MOUSE_WHEEL_DISABLE: nBehavior = MouseWheelBehavior::SCROLL_DISABLED; break; + case MOUSE_WHEEL_FOCUS_ONLY: nBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY; break; + case MOUSE_WHEEL_ALWAYS: nBehavior = MouseWheelBehavior::SCROLL_ALWAYS; break; + default: + OSL_ENSURE( false, "VCLXWindow::getProperty( 'MouseWheelBehavior' ): illegal VCL value!" ); + } + aProp <<= nBehavior; } break; @@ -2137,6 +2189,10 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com:: aProp <<= (sal_Bool) GetWindow()->IsEnabled(); break; + case BASEPROPERTY_ENABLEVISIBLE: + aProp <<= (sal_Bool) mpImpl->isEnableVisible(); + break; + case BASEPROPERTY_TEXT: case BASEPROPERTY_LABEL: case BASEPROPERTY_TITLE: @@ -2411,7 +2467,7 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno: if ( !pWindow ) return; - if ( pWindow ) + if ( isDesignMode() || mpImpl->isEnableVisible() ) { TabPage* pTabPage = dynamic_cast< TabPage* >( pWindow ); if ( pTabPage ) diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 59cb9632b7e1..b49fa1a621d6 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -386,6 +386,7 @@ void VCLXButton::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_DEFAULTBUTTON, BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_FONTDESCRIPTOR, BASEPROPERTY_GRAPHIC, BASEPROPERTY_HELPTEXT, @@ -668,6 +669,7 @@ void VCLXImageControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_BORDERCOLOR, BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_GRAPHIC, BASEPROPERTY_HELPTEXT, BASEPROPERTY_HELPURL, @@ -796,6 +798,7 @@ void VCLXCheckBox::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) PushPropertyIds( rIds, BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_FONTDESCRIPTOR, BASEPROPERTY_GRAPHIC, BASEPROPERTY_HELPTEXT, @@ -1095,6 +1098,7 @@ void VCLXRadioButton::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) PushPropertyIds( rIds, BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_FONTDESCRIPTOR, BASEPROPERTY_GRAPHIC, BASEPROPERTY_HELPTEXT, @@ -1380,6 +1384,9 @@ void VCLXRadioButton::ImplClickedOrToggled( BOOL bToggled ) // ---------------------------------------------------- void VCLXSpinField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) { + PushPropertyIds( rIds, + BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, + 0 ); VCLXEdit::ImplGetPropertyIds( rIds ); } @@ -1519,6 +1526,7 @@ void VCLXListBox::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_DROPDOWN, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_FONTDESCRIPTOR, BASEPROPERTY_HELPTEXT, BASEPROPERTY_HELPURL, @@ -1532,6 +1540,7 @@ void VCLXListBox::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_ALIGN, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, + BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, 0); VCLXWindow::ImplGetPropertyIds( rIds ); } @@ -2709,6 +2718,7 @@ void VCLXFixedHyperlink::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_BORDERCOLOR, BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_FONTDESCRIPTOR, BASEPROPERTY_HELPTEXT, BASEPROPERTY_HELPURL, @@ -2737,6 +2747,7 @@ void VCLXFixedText::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_BORDERCOLOR, BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_FONTDESCRIPTOR, BASEPROPERTY_HELPTEXT, BASEPROPERTY_HELPURL, @@ -2879,6 +2890,7 @@ void VCLXScrollBar::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_BORDERCOLOR, BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_HELPTEXT, BASEPROPERTY_HELPURL, BASEPROPERTY_LINEINCREMENT, @@ -3358,6 +3370,7 @@ void VCLXEdit::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_ECHOCHAR, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_FONTDESCRIPTOR, BASEPROPERTY_HARDLINEBREAKS, BASEPROPERTY_HELPTEXT, @@ -3734,6 +3747,7 @@ void VCLXComboBox::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_DROPDOWN, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_FONTDESCRIPTOR, BASEPROPERTY_HELPTEXT, BASEPROPERTY_HELPURL, @@ -3748,6 +3762,7 @@ void VCLXComboBox::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_ALIGN, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, + BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, 0); // no, don't call VCLXEdit here - it has properties which we do *not* want to have at at combo box // #i92690# / 2008-08-12 / frank.schoenheit@sun.com @@ -4250,6 +4265,7 @@ void VCLXDateField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_DROPDOWN, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_EXTDATEFORMAT, BASEPROPERTY_FONTDESCRIPTOR, BASEPROPERTY_HELPTEXT, @@ -4266,6 +4282,7 @@ void VCLXDateField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_HIDEINACTIVESELECTION, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, + BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, 0); VCLXFormattedSpinField::ImplGetPropertyIds( rIds ); } @@ -4586,6 +4603,7 @@ void VCLXTimeField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_BORDERCOLOR, BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_EXTTIMEFORMAT, BASEPROPERTY_FONTDESCRIPTOR, BASEPROPERTY_HELPTEXT, @@ -4605,6 +4623,7 @@ void VCLXTimeField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_HIDEINACTIVESELECTION, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, + BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, 0); VCLXFormattedSpinField::ImplGetPropertyIds( rIds ); } @@ -4887,6 +4906,7 @@ void VCLXNumericField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_DECIMALACCURACY, BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_FONTDESCRIPTOR, BASEPROPERTY_HELPTEXT, BASEPROPERTY_HELPURL, @@ -4906,6 +4926,7 @@ void VCLXNumericField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_HIDEINACTIVESELECTION, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, + BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, 0); VCLXFormattedSpinField::ImplGetPropertyIds( rIds ); } @@ -5227,6 +5248,7 @@ void VCLXMetricField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_DECIMALACCURACY, BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_FONTDESCRIPTOR, BASEPROPERTY_HELPTEXT, BASEPROPERTY_HELPURL, @@ -5244,6 +5266,7 @@ void VCLXMetricField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_CUSTOMUNITTEXT, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, + BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, 0); VCLXFormattedSpinField::ImplGetPropertyIds( rIds ); } @@ -5477,6 +5500,7 @@ void VCLXCurrencyField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_DECIMALACCURACY, BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_FONTDESCRIPTOR, BASEPROPERTY_HELPTEXT, BASEPROPERTY_HELPURL, @@ -5496,6 +5520,7 @@ void VCLXCurrencyField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_HIDEINACTIVESELECTION, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, + BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, 0); VCLXFormattedSpinField::ImplGetPropertyIds( rIds ); } @@ -5828,6 +5853,7 @@ void VCLXPatternField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_DEFAULTCONTROL, BASEPROPERTY_EDITMASK, BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, BASEPROPERTY_FONTDESCRIPTOR, BASEPROPERTY_HELPTEXT, BASEPROPERTY_HELPURL, @@ -5841,6 +5867,7 @@ void VCLXPatternField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_HIDEINACTIVESELECTION, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, + BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, 0); VCLXFormattedSpinField::ImplGetPropertyIds( rIds ); } diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx index 19fb4c3609d0..6171067f1185 100644 --- a/toolkit/source/controls/formattedcontrol.cxx +++ b/toolkit/source/controls/formattedcontrol.cxx @@ -142,6 +142,7 @@ namespace toolkit ImplRegisterProperty( BASEPROPERTY_EFFECTIVE_MAX ); ImplRegisterProperty( BASEPROPERTY_EFFECTIVE_MIN ); ImplRegisterProperty( BASEPROPERTY_ENABLED ); + ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE ); ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR ); ImplRegisterProperty( BASEPROPERTY_FORMATKEY ); ImplRegisterProperty( BASEPROPERTY_FORMATSSUPPLIER ); @@ -161,6 +162,7 @@ namespace toolkit ImplRegisterProperty( BASEPROPERTY_ENFORCE_FORMAT ); ImplRegisterProperty( BASEPROPERTY_WRITING_MODE ); ImplRegisterProperty( BASEPROPERTY_CONTEXT_WRITING_MODE ); + ImplRegisterProperty( BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR ); Any aTreatAsNumber; aTreatAsNumber <<= (sal_Bool) sal_True; diff --git a/toolkit/source/controls/tkspinbutton.cxx b/toolkit/source/controls/tkspinbutton.cxx index 5c4e47e240dc..138b849a190c 100644 --- a/toolkit/source/controls/tkspinbutton.cxx +++ b/toolkit/source/controls/tkspinbutton.cxx @@ -60,6 +60,7 @@ namespace toolkit ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR ); ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); ImplRegisterProperty( BASEPROPERTY_ENABLED ); + ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE ); ImplRegisterProperty( BASEPROPERTY_HELPTEXT ); ImplRegisterProperty( BASEPROPERTY_HELPURL ); ImplRegisterProperty( BASEPROPERTY_ORIENTATION ); diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx index 68c3212f5692..2949954bb13c 100644 --- a/toolkit/source/controls/tree/treecontrol.cxx +++ b/toolkit/source/controls/tree/treecontrol.cxx @@ -65,6 +65,7 @@ UnoTreeModel::UnoTreeModel() ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR ); ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); ImplRegisterProperty( BASEPROPERTY_ENABLED ); + ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE ); ImplRegisterProperty( BASEPROPERTY_FILLCOLOR ); ImplRegisterProperty( BASEPROPERTY_HELPTEXT ); ImplRegisterProperty( BASEPROPERTY_HELPURL ); diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index 92c27e33ead0..0775b6ee74f3 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -1049,7 +1049,13 @@ void UnoControl::draw( sal_Int32 x, sal_Int32 y ) throw(RuntimeException) } if ( xDrawPeerView.is() ) + { + Reference< XVclWindowPeer > xWindowPeer; + xWindowPeer.set( xDrawPeer, UNO_QUERY ); + if ( xWindowPeer.is() ) + xWindowPeer->setDesignMode( mbDesignMode ); xDrawPeerView->draw( x, y ); + } if ( bDisposeDrawPeer ) xDrawPeer->dispose(); @@ -1420,7 +1426,6 @@ void UnoControl::setDesignMode( sal_Bool bOn ) throw(RuntimeException) // remember this mbDesignMode = bOn; xWindow = xWindow.query( getPeer() ); - // dispose our current AccessibleContext, if we have one // (changing the design mode implies having a new implementation for this context, // so the old one must be declared DEFUNC) diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index 0f54a204a010..cc5faa27eec8 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -36,6 +36,7 @@ #include <com/sun/star/awt/FontWidth.hpp> #include <com/sun/star/awt/FontWeight.hpp> #include <com/sun/star/awt/FontSlant.hpp> +#include <com/sun/star/awt/MouseWheelBehavior.hpp> #include <com/sun/star/graphic/XGraphicProvider.hpp> #include <com/sun/star/text/WritingMode2.hpp> #include <com/sun/star/io/XMarkableStream.hpp> @@ -294,6 +295,7 @@ void UnoControlModel::ImplPropertyChanged( sal_uInt16 ) case BASEPROPERTY_IMAGEALIGN: aDefault <<= (sal_Int16) 1 /*ImageAlign::TOP*/; break; case BASEPROPERTY_IMAGEPOSITION: aDefault <<= (sal_Int16) 12 /*ImagePosition::Centered*/; break; case BASEPROPERTY_PUSHBUTTONTYPE: aDefault <<= (sal_Int16) 0 /*PushButtonType::STANDARD*/; break; + case BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR:aDefault <<= (sal_Int16) awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY; break; case BASEPROPERTY_DATEMAX: aDefault <<= (sal_Int32) Date( 31, 12, 2200 ).GetDate(); break; case BASEPROPERTY_DATEMIN: aDefault <<= (sal_Int32) Date( 1, 1, 1900 ).GetDate(); break; @@ -338,13 +340,13 @@ void UnoControlModel::ImplPropertyChanged( sal_uInt16 ) case BASEPROPERTY_HARDLINEBREAKS: case BASEPROPERTY_NOLABEL: aDefault <<= (sal_Bool) sal_False; break; - case BASEPROPERTY_WHEELWITHOUTFOCUS: case BASEPROPERTY_HIDEINACTIVESELECTION: case BASEPROPERTY_ENFORCE_FORMAT: case BASEPROPERTY_AUTOCOMPLETE: case BASEPROPERTY_SCALEIMAGE: case BASEPROPERTY_ENABLED: case BASEPROPERTY_PRINTABLE: + case BASEPROPERTY_ENABLEVISIBLE: case BASEPROPERTY_DECORATION: aDefault <<= (sal_Bool) sal_True; break; case BASEPROPERTY_HELPTEXT: diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 771a69c532b9..3abacef7b67f 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -481,6 +481,7 @@ UnoControlFileControlModel::UnoControlFileControlModel() ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR ); ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); ImplRegisterProperty( BASEPROPERTY_ENABLED ); + ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE ); ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR ); ImplRegisterProperty( BASEPROPERTY_HELPTEXT ); ImplRegisterProperty( BASEPROPERTY_HELPURL ); @@ -1778,6 +1779,7 @@ UnoControlGroupBoxModel::UnoControlGroupBoxModel() { ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); ImplRegisterProperty( BASEPROPERTY_ENABLED ); + ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE ); ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR ); ImplRegisterProperty( BASEPROPERTY_HELPTEXT ); ImplRegisterProperty( BASEPROPERTY_HELPURL ); @@ -3594,6 +3596,7 @@ UnoControlProgressBarModel::UnoControlProgressBarModel() ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR ); ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); ImplRegisterProperty( BASEPROPERTY_ENABLED ); + ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE ); ImplRegisterProperty( BASEPROPERTY_FILLCOLOR ); ImplRegisterProperty( BASEPROPERTY_HELPTEXT ); ImplRegisterProperty( BASEPROPERTY_HELPURL ); @@ -3723,6 +3726,7 @@ UnoControlFixedLineModel::UnoControlFixedLineModel() ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); ImplRegisterProperty( BASEPROPERTY_ENABLED ); + ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE ); ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR ); ImplRegisterProperty( BASEPROPERTY_HELPTEXT ); ImplRegisterProperty( BASEPROPERTY_HELPURL ); diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index bace3ff94771..0560afbd835f 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -257,7 +257,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_2 ( "Complete", COMPLETE, sal_Bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "CurrentItemID", CURRENTITEMID, sal_Int16, BOUND, MAYBEDEFAULT ), - DECL_PROP_2 ( "WheelWithoutFocus", WHEELWITHOUTFOCUS, sal_Bool, BOUND, MAYBEDEFAULT ), + DECL_PROP_2 ( "MouseWheelBehavior", MOUSE_WHEEL_BEHAVIOUR, sal_Int16, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "StepTime", STEP_TIME, sal_Int32, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "Decoration", DECORATION, sal_Bool, BOUND, MAYBEDEFAULT ), @@ -272,7 +272,8 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_2 ( "DialogSourceURL", DIALOGSOURCEURL, ::rtl::OUString, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "URL", URL, ::rtl::OUString, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "WritingMode", WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT ), - DECL_PROP_3 ( "ContextWritingMode", CONTEXT_WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT, TRANSIENT ) + DECL_PROP_3 ( "ContextWritingMode", CONTEXT_WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT, TRANSIENT ), + DECL_PROP_2 ( "EnableVisible", ENABLEVISIBLE, sal_Bool, BOUND, MAYBEDEFAULT ) }; pPropertyInfos = aImplPropertyInfos; nElements = sizeof( aImplPropertyInfos ) / sizeof( ImplPropertyInfo ); diff --git a/tools/bootstrp/makefile.mk b/tools/bootstrp/makefile.mk index d0adff1278e4..60bfc57bf96b 100644 --- a/tools/bootstrp/makefile.mk +++ b/tools/bootstrp/makefile.mk @@ -81,18 +81,20 @@ LIB2OBJFILES=\ APP1TARGET= sspretty APP1OBJS= $(OBJ)$/sspretty.obj APP1LIBS= $(LB)$/$(TARGET).lib $(LB)$/$(TARGET1).lib -APP1STDLIBS=$(SALLIB) $(VOSLIB) $(TOOLSLIB) +APP1STDLIBS=$(SALLIB) $(VOSLIB) $(TOOLSLIB) $(BASEGFXLIB) $(UCBHELPERLIB) $(CPPULIB) $(COMPHELPERLIB) $(CPPUHELPERLIB) $(SALHELPERLIB) $(I18NISOLANGLIB) APP2TARGET= rscdep APP2OBJS= $(OBJ)$/rscdep.obj APP2LIBS= $(LB)$/$(TARGET).lib $(LB)$/$(TARGET1).lib -APP2STDLIBS= $(SALLIB) $(VOSLIB) $(TOOLSLIB) +APP2STDLIBS= $(SALLIB) $(VOSLIB) $(TOOLSLIB) $(BASEGFXLIB) $(UCBHELPERLIB) $(CPPULIB) $(COMPHELPERLIB) $(I18NISOLANGLIB) $(CPPUHELPERLIB) $(SALHELPERLIB) +APP2RPATH= NONE +APP2RPATH= NONE APP2RPATH= NONE APP3TARGET= so_checksum APP3OBJS= $(OBJ)$/md5.obj \ $(OBJ)$/so_checksum.obj -APP3STDLIBS= $(TOOLSLIB) $(SALLIB) +APP3STDLIBS= $(TOOLSLIB) $(SALLIB) $(VOSLIB) $(BASEGFXLIB) $(UCBHELPERLIB) $(CPPULIB) $(COMPHELPERLIB) $(I18NISOLANGLIB) $(CPPUHELPERLIB) $(SALHELPERLIB) DEPOBJFILES = $(APP1OBJS) $(APP2OBJS) $(APP3OBJS) diff --git a/transex3/inc/export.hxx b/transex3/inc/export.hxx index 89c1cf548947..3d7eee8e1eaf 100644 --- a/transex3/inc/export.hxx +++ b/transex3/inc/export.hxx @@ -510,7 +510,9 @@ private: SvFileStream aErrLog; ByteStringSet aLanguageSet; MergeDataHashMap aMap; - std::vector<ByteString> aLanguages; + ByteStringHashMap aLanguageMap; + std::vector<ByteString> aLanguageList; + ByteStringHashMap aFilenames; public: diff --git a/transex3/prj/d.lst b/transex3/prj/d.lst index 7bd8e7d3e72d..54d1ab156205 100644 --- a/transex3/prj/d.lst +++ b/transex3/prj/d.lst @@ -28,6 +28,7 @@ mkdir: %_DEST%\inc%_EXT%\transex3 ..\scripts\localize.pl %_DEST%\bin%_EXT%\localize.pl ..\scripts\localize %_DEST%\bin%_EXT%\localize +..\scripts\fast_merge.pl %_DEST%\bin%_EXT%\fast_merge.pl ..\inc\export.hxx %_DEST%\inc%_EXT%\transex3\export.hxx ..\inc\transex3\directory.hxx %_DEST%\inc%_EXT%\transex3\directory.hxx diff --git a/transex3/scripts/fast_merge.pl b/transex3/scripts/fast_merge.pl new file mode 100644 index 000000000000..266c1c0801e8 --- /dev/null +++ b/transex3/scripts/fast_merge.pl @@ -0,0 +1,348 @@ +: +eval 'exec perl -wS $0 ${1+"$@"}' + if 0; +#************************************************************************* +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: fast_merge.pl,v $ +# +# $Revision: 1.1.2.2 $ +# +# last change: $Author: ihi $ $Date: 2007/07/20 10:37:53 $ +# +# The Contents of this file are made available subject to +# the terms of GNU Lesser General Public License Version 2.1. +# +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2005 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +#************************************************************************* + +use strict; +use Class::Struct; +use Getopt::Long; +use File::Temp; +use File::Path; + +my @files; +my @file_names; +my $module_name = ''; +my @current; +my @buffer; +my $last_file; +my $last_path; +my $last_localize_file; +my $first_run = "1"; +my $sdf_filename; +my $merge_dir; +my $WIN; +my $state = "none"; + +if ( defined $ENV{USE_SHELL} && $ENV{USE_SHELL} eq '4nt' ) { $WIN = 'TRUE'; } +else { $WIN = ''; } + +$SIG{INT} = 'inthandler'; +$SIG{QUIT} = 'quithandler'; + +struct ( sdf_obj => +{ + module => '$', + file => '$', + dir => '$', + FILEHANDLE => '$', + line => '$', + endoffile => '$' +} +); + +parse_options(); +my $lock_file = $merge_dir."/lock.mk"; +$lock_file =~ s/\//\\/g , if ( $WIN ) ; +acquire_lock(); +read_sdf_file_names(); +init(); +my $reference; +my $path ; +my $localize_file; +while( hasLines() ) +{ + @current = (); + foreach ( @files ) + { + push @current , $_; + } + + $reference = getNextIdentifier( ); + + @current = (); + foreach ( @files ) + { + if( $_->module eq $reference->module && $_->dir eq $reference->dir ) + { + push @current , $_ ; + } + } + write_lines(); +} +if( $#current+1 ne 0 ) +{ + ( $path , $localize_file ) = make_paths(); + add_to_buffer(); + write_buffer( $path , $localize_file ); +} +release_lock(); +exit( 0 ); + +########################################################################################## +sub acquire_lock +{ + if( -e $lock_file ){ + $state = "blocked"; + print "WARNING: Lock file '$lock_file' 'found, waiting ....\n"; + my $cnt = 0; + sleep 10 , while( -e $lock_file && $cnt++ < 180 ); + exit( 0 ); + }else + { + $state = "locked"; + print "Writing lock file '$lock_file'\n"; + open FILE, ">$lock_file" or die "Can't create lock file '$lock_file'"; + print FILE "L10N_LOCK=YES" ; + close ( FILE ); + } +} +sub release_lock +{ + print "Deleting lock file '$lock_file'\n"; + unlink $lock_file, if( -e $lock_file ); + $state = "none"; +} +sub inthandler +{ + release_lock() , if( $state eq "locked" ); + exit( -1 ); +} +sub quithandler +{ + release_lock() , if( $state eq "locked" ); + exit( 0 ); +} + +sub init +{ + foreach my $file ( @file_names ) + { + my $obj = new sdf_obj; + open my $FILEHANDLE , "<$file" or die "Can't open file '$file'"; + $obj->FILEHANDLE ( $FILEHANDLE ) ; + getNextSdfObj( $obj ); + push @files, $obj ; + print "Open file '$file'\n"; + } +} + +# get the next module/file +sub getNextIdentifier +{ + my @sorted = sort { + return $a->module.$a->dir cmp $b->module.$b->dir; + } @current ; + return shift @sorted; +} + +# update the obj with the next line +sub getNextSdfObj +{ + my $obj = shift; + my $line = readline ( $obj->FILEHANDLE ); + if ( $line eq undef ) + { + $obj->endoffile( "true" ); + } + else + { + $line =~ /^(([^\t]*)\t([^\t]*).*)/o ; + if( defined $1 && defined $2 && defined $3 ) + { + $obj->line ( $1 ); + $obj->module( $2 ); + $obj->file ( $3 ); + $obj->dir ( getDir( $3 ) ); + } + else + { + $obj->line ( "" ); + $obj->module( "" ); + $obj->file ( "" ); + $obj->dir ( "" ); + } + } + return $obj; +} +sub getNextSdfObjModule +{ + my $obj = shift; + while( !$obj->endoffile ) + { + my $line = readline ( $obj->FILEHANDLE ); + if ( $line eq undef ) + { + $obj->endoffile( "true" ); + } + else + { + $line =~ /^(([^\t]*)\t([^\t]*).*)/o ; + if( defined $1 && defined $2 && defined $3 ) + { + $obj->line ( $1 ); + $obj->module( $2 ); + $obj->file ( $3 ); + $obj->dir ( getDir( $3 ) ); + } + else + { + $obj->line ( "" ); + $obj->module( "" ); + $obj->file ( "" ); + $obj->dir ( "" ); + } + return $obj , if( $obj->module eq $module_name ) + } + } + #return $obj; +} +sub getDir +{ + my $path = shift ; + $path =~ s/\//\\/g; + my @tmp_path = split /\\/ , $path; + pop @tmp_path; + $path = join '\\' , @tmp_path; + return $path; +} + +sub hasLines +{ + my $hasLines = ""; + my @tmpfiles; + foreach ( @files ) + { + push @tmpfiles , $_, if( !$_->endoffile ); + } + @files = @tmpfiles; + return $#files+1; +} + +sub make_paths +{ + my $localizeFile = $merge_dir."\\".$current[ 0 ]->module."\\".$current[ 0 ]->file; + my $path = getDir( $localizeFile ); + if ( !$WIN ) { $path =~ s/\\/\//g; } + + $localizeFile = $path."\\localize.sdf"; + if ( !$WIN ) { $localizeFile =~ s/\\/\//g; } + + return ( $path , $localizeFile ); +} +sub write_lines +{ + if( $first_run ){ + add_to_buffer(); + my( $path , $localize_file ) = make_paths(); + $last_path = $path; + $last_localize_file = $localize_file; + mkpath $path; + write_buffer( $path , $localize_file ); + $first_run = ''; + } + else + { + return , if ( $#current+1 eq 0 ); + my( $path , $localize_file ) = make_paths(); + if( $path eq $last_path ) + { + add_to_buffer(); + } + else + { + mkpath $path; + write_buffer( $last_path , $last_localize_file ); + add_to_buffer(); + $last_path = $path; + $last_localize_file = $localize_file; + } + } +} +sub add_to_buffer +{ + my $plainline; + my $afile; + my $amodule; + foreach my $elem ( @current ) + { + do { + $amodule=$elem->module; + $afile=$elem->file; + $plainline=$elem->line; + push @buffer, $plainline; + getNextSdfObj( $elem ); + } while ( !$elem->endoffile && $amodule eq $elem->module && $afile eq $elem->file ); + } +} +sub write_buffer +{ + my $path = shift; + my $localize_file = shift; + my $cnt = $#buffer+1; + print "Write to $path $cnt lines\n"; + open FILE , ">>$localize_file" or die "Can't open file '$localize_file'\n"; + foreach ( @buffer ) + { + print FILE $_."\n"; + } + @buffer = (); +} +sub parse_options +{ + my $success = GetOptions( 'sdf_files=s' => \$sdf_filename , 'merge_dir=s' => \$merge_dir ); #, 'module=s' => \$module_name ); + if( ! ( $sdf_filename && $merge_dir && $success ) ) + { + usage(); + exit( -1 ); + } +} + +sub usage +{ + print "Usage: fast_merge -sdf_files <file containing sdf file names> -merge_dir <directory>\n" ; +} + +sub read_sdf_file_names +{ + open FILE , "<$sdf_filename" or die "Can't open file '$sdf_filename'\n"; + while ( <FILE> ) + { + push @file_names , split " " , $_ ; + } + close ( FILE ); +} + + diff --git a/transex3/scripts/localize b/transex3/scripts/localize deleted file mode 100755 index 74a75ecc3aee..000000000000 --- a/transex3/scripts/localize +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -if [ x${SOLARENV}x = xx ]; then - echo No environment found, please use 'setsolar' -exit 1 -fi - -# localize.pl calls localize_sl in solver bin directory which depends on dynamic -# libraries in solver lib directory but has no correct RPATH (or equivalent): -if [ "${OS?}" = MACOSX ]; then - export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} -else - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} -fi - -if [ x${SOLARVER}x = xx -o x${UPDMINOR}x = xx ]; then - exec perl -w $SOLARVERSION/$INPATH/bin/localize.pl "$@" -else - exec perl -w $SOLARVERSION/$INPATH/bin.$UPDMINOR/localize.pl "$@" -fi - diff --git a/transex3/scripts/localize.pl b/transex3/scripts/localize.pl index b9e478ba66bd..5fd591fc4e7e 100755 --- a/transex3/scripts/localize.pl +++ b/transex3/scripts/localize.pl @@ -13,7 +13,7 @@ eval 'exec perl -wS $0 ${1+"$@"}' # # $RCSfile: localize.pl,v $ # -# $Revision: 1.18 $ +# $Revision: 1.18.6.2 $ # # This file is part of OpenOffice.org. # @@ -39,10 +39,12 @@ use Getopt::Long; use IO::Handle; use File::Find; use File::Temp; +use File::Path; use File::Copy; use File::Glob qw(:glob csh_glob); use Cwd; +my $CVS_BINARY = "/usr/bin/cvs"; # ver 1.1 # #### module lookup @@ -61,16 +63,24 @@ BEGIN { use lib (@lib_dirs); #### globals #### -my $sdffile = ''; -my $no_sort = ''; -my $outputfile = ''; -my $mode = ''; -my $bVerbose="0"; -my $srcpath = ''; +my $sdffile = ''; +my $no_sort = ''; +my $create_dirs = ''; +my $multi_localize_files = ''; +my $module_to_merge = ''; +my $sort_sdf_before = ''; +my $outputfile = ''; +my $no_gsicheck = ''; +my $mode = ''; +my $bVerbose = "0"; +my $srcpath = ''; my $WIN; my $languages; #my %sl_modules; # Contains all modules where en-US and de is source language my $use_default_date = '0'; +my %is_ooo_module; +my %is_so_module; +my $DELIMITER; # ( leftpart ) ( rightpart ) # prj file dummy type gid lid helpid pform width lang text helptext qhelptext title timestamp @@ -82,21 +92,30 @@ my @sdfparticles; #### main #### parse_options(); +check_modules_scm(); if ( defined $ENV{USE_SHELL} && $ENV{USE_SHELL} eq '4nt' ) { $WIN = 'TRUE'; + $DELIMITER = "\\"; } else { $WIN = ''; + $DELIMITER = "/"; } +my $binpath = $ENV{SOLARVER}.$DELIMITER.$ENV{INPATH}.$DELIMITER."bin".$ENV{UPDMINOREXT}.$DELIMITER ; + #%sl_modules = fetch_sourcelanguage_dirlist(); if ( $mode eq "merge" ) { - merge_gsicheck(); + if ( ! $no_gsicheck ){ + merge_gsicheck(); + } splitfile( $sdffile ); - unlink $sdffile; # remove temp file! + if ( ! $no_gsicheck ){ + unlink $sdffile; # remove temp file! + } } elsif( $mode eq "extract" ) { collectfiles( $outputfile ); @@ -126,6 +145,12 @@ sub splitfile{ open MYFILE , "< $sdffile" or die "Can't open '$sdffile'\n"; +# my %lang_hash; + my %string_hash_ooo; + my %string_hash_so; + my %so_modules; + $so_modules{ "extras_full" } = "TRUE"; + while( <MYFILE>){ if( /$sdf_regex/ ){ my $line = defined $_ ? $_ : ''; @@ -137,183 +162,187 @@ sub splitfile{ my $lang = defined $12 ? $12 : ''; my $plattform = defined $10 ? $10 : ''; my $helpid = defined $9 ? $9 : ''; - next if( $prj eq "binfilter" ); # Don't merge strings into binfilter module chomp( $line ); - $currentFile = $srcpath . '\\' . $prj . '\\' . $file; - if ( $WIN ) { $currentFile =~ s/\//\\/g; } - else { $currentFile =~ s/\\/\//g; } - - $cur_sdffile = $currentFile; - #if( $cur_sdffile =~ /\.$file_types[\s]*$/ ){ - if( $WIN ) { $cur_sdffile =~ s/\\[^\\]*\.$file_types[\s]*$/\\localize.sdf/; } - else { $cur_sdffile =~ s/\/[^\/]*\.$file_types[\s]*$/\/localize.sdf/; } - #} - - # Set default date - if( $line =~ /(.*)\t[^\t\$]*$/ ){ - $line = $1."\t".$default_date; - } - if( $start ){ - $start=''; - $lastFile = $currentFile; # ? - $last_sdffile = $cur_sdffile; - } - - if( $lang eq "en-US" ){} - elsif( $cur_sdffile eq $last_sdffile ) + if( is_openoffice_module( $prj ) ) { - $block{ "$prj\t$file\t$type\t$gid\t$lid\t$helpid\t$plattform\t$lang" } = $line ; + $string_hash_ooo { $lang }{ "$prj\t$file\t$type\t$gid\t$lid\t$helpid\t$plattform\t$lang" } = $line; } else { - writesdf( $lastFile , \%block ); - $lastFile = $currentFile; #? - $last_sdffile = $cur_sdffile; - %block = (); - #if( ! $lang eq "en-US" ) { - $block{ "$prj\t$file\t$type\t$gid\t$lid\t$helpid\t$plattform\t$lang" } = $line ; - #} - + $string_hash_so{ $lang }{ "$prj\t$file\t$type\t$gid\t$lid\t$helpid\t$plattform\t$lang" } = $line; } - } #else { print STDOUT "splitfile REGEX kaputt\n";} - + } } - writesdf( $lastFile , \%block ); - %block = (); close( MYFILE ); + if( !defined $ENV{SRC_ROOT} ){ + print "Error, no SRC_ROOT in env found.\n"; + exit( -1 ); + } + my $src_root = $ENV{SRC_ROOT}; + #print $WIN eq "TRUE" ? $src_root."\\l10n_so\n" : $src_root."/l10n_so\n"; + my $so_l10n_path = $WIN eq "TRUE" ? $src_root."\\l10n_so\\source" : $src_root."/l10n_so/source"; + my $ooo_l10n_path = $WIN eq "TRUE" ? $src_root."\\l10n\\source" : $src_root."/l10n/source"; + + #print "$so_l10n_path\n"; + #print "$ooo_l10n_path\n"; + + write_sdf( \%string_hash_so , $so_l10n_path ); + write_sdf( \%string_hash_ooo , $ooo_l10n_path ); + } -######################################################### +sub check_modules_scm +{ + #my @ooo_modules; + #my @so_modules; + my $src_path = $ENV{ SRC_ROOT } ; + my $last_dir = getcwd(); + chdir $src_path ; + my @modules = <*/.svn/entries>; + + foreach my $module ( @modules ) + { + #print "$module \n"; + if( open ( FILE , "<$module" ) ) + { + while( <FILE> ) + { -#sub fetch_sourcelanguage_dirlist + my @path = split ( "/" , $module ) ; + + if( /svn.services.openoffice.org/ ) + { + my $mod = $path[ 0 ]; + #push @ooo_modules , $mod; + $is_ooo_module{ $mod } = "true"; + # print "$module -> ooo "; + } + elsif ( /jumbo2.germany.sun.com/ ) + { + my $mod = $path[ 0 ]; + #push @so_modules , $mod; + # print "$module -> so "; + #$so_lookup_hash{ $mod } = "true"; + } + #else + #{ + # print "ERROR: Is $module a SO or OOo module? Can not parese the $module/.svn/entries file ... please check mwsfinnish/merge/splitsdf.pl line 280\n"; + # exit -1; + #} + } + } + } + chdir $last_dir ; + #print "OOO\n"; + #print @ooo_modules; + #print "\nSO\n"; + #print @so_modules; +} + + +#sub parse #{ -# -# my $working_path = getcwd(); -# my %sl_dirlist; -# -# chdir $srcpath; -# my @all_dirs = csh_glob( "*" ); -# -# foreach my $file ( @all_dirs ) -# { -# if( -d $file ) -# { -# my $module = $file; -# $file .= "/prj/l10n"; -# $file =~ s/\//\\/ , if( $WIN ) ; -# -# if( -f $file ) # Test file <module>/prj/l10n -# { -# $sl_dirlist{ $module } = 1; -# if( $bVerbose eq "1" ) { print STDOUT "$module: de and en-US source language detected\n"; } -# } -# } +# my $command = "$CVS_BINARY -d:pserver:anoncvs\@anoncvs.services.openoffice.org:/cvs co -c"; +# my $output = `$command`; +# my $rc = $? << 8; +# if ( $output eq "" || $rc < 0 ){ +# print STDERR "ERROR: Can not fetch cvs alias list, please login to the cvs server and press at the password prompt just return\ncvs -d:pserver:anoncvs\@anoncvs.services.openoffice.org:/cvs login\n"; +# exit ( -1 ); # } +# my @list = split /\n/ , $output ; +# foreach my $string( @list ) +# { # -# chdir $working_path; +# # print "Found '$1'\n" , if( $string =~ /^(\w*)/ && $1 ne "" ); # -# return %sl_dirlist; +# $is_ooo_module{ $1 } = "TRUE", if( $string =~ /^(\w*)/ && $1 ne "" ); +# } +# # foreach my $key( keys( %is_ooo_module ) ) +# #{ +# # print "$key\n"; +# #} #} +sub is_openoffice_module +{ + my $module = shift; + return "TRUE", if defined $is_ooo_module{ $module }; + return ""; +} -#sub has_two_sourcelanguages -#{ -# my $module = shift; -# return defined $sl_modules{ $module } ; -#} -sub writesdf{ - - my $lastFile = shift; - my $blockhash_ref = shift; - my $localizeFile = $lastFile; - my %index=(); - - if( $localizeFile =~ /\.$file_types[\s]*$/ ){ - if( $WIN ) { $localizeFile =~ s/\\[^\\]*\.$file_types[\s]*$/\\localize.sdf/; } - else { $localizeFile =~ s/\/[^\/]*\.$file_types[\s]*$/\/localize.sdf/; } - }else { - print STDERR "Strange filetype found '$localizeFile'\n"; - return; - } - if( $bVerbose ){ print STDOUT "$localizeFile\n"; } - if( open DESTFILE , "< $localizeFile" ){ +sub write_sdf +{ + my $string_hash = shift; + my $l10n_file = shift; - #or die "Can't open/create '\$localizeFile'"; + foreach my $lang( keys( %{ $string_hash } ) ) + { + my @sdf_file; - #### Build hash - while(<DESTFILE>){ - if( /$sdf_regex/ ){ - my $line = defined $_ ? $_ : ''; - my $prj = defined $3 ? $3 : ''; - my $file = defined $4 ? $4 : ''; - my $type = defined $6 ? $6 : ''; - my $gid = defined $7 ? $7 : ''; - my $lid = defined $8 ? $8 : ''; - my $lang = defined $12 ? $12 : ''; - my $plattform = defined $10 ? $10 : ''; - my $helpid = defined $9 ? $9 : ''; - - chomp( $line ); - $index{ "$prj\t$file\t$type\t$gid\t$lid\t$helpid\t$plattform\t$lang" } = $line ; + # mkdir!!!! + my $current_l10n_file = $WIN eq "TRUE" ? $l10n_file."\\$lang\\localize.sdf" : $l10n_file."/$lang/localize.sdf"; + print "Writing '$current_l10n_file'\n"; + if( open DESTFILE , "< $current_l10n_file" ){ - } #else { print STDOUT "writesdf REGEX kaputt $_\n";} + while(<DESTFILE>){ + if( /$sdf_regex/ ){ + my $line = defined $_ ? $_ : ''; + my $prj = defined $3 ? $3 : ''; + my $file = defined $4 ? $4 : ''; + my $type = defined $6 ? $6 : ''; + my $gid = defined $7 ? $7 : ''; + my $lid = defined $8 ? $8 : ''; + my $lang = defined $12 ? $12 : ''; + my $plattform = defined $10 ? $10 : ''; + my $helpid = defined $9 ? $9 : ''; + chomp( $line ); + if ( defined $string_hash->{ $lang }{ "$prj\t$file\t$type\t$gid\t$lid\t$helpid\t$plattform\t$lang" } ) + { + # Changed String! + push @sdf_file , $string_hash->{ $lang }{ "$prj\t$file\t$type\t$gid\t$lid\t$helpid\t$plattform\t$lang" } ; + $string_hash->{ $lang }{ "$prj\t$file\t$type\t$gid\t$lid\t$helpid\t$plattform\t$lang" } = undef; + } + else + { + # No new string + push @sdf_file , $line; + } + } + } } close( DESTFILE ); - } - #### Copy new strings - my @mykeys = keys( %{ $blockhash_ref } ); - my $isDirty = "FALSE"; - foreach my $key( @mykeys ){ - if( ! defined $index{ $key } ){ - # Add new entry - $index{ $key } = $blockhash_ref->{ $key} ; - $isDirty = "TRUE"; - }elsif( $index{ $key } ne $blockhash_ref->{ $key } ){ - # Overwrite old entry - $index{ $key } = $blockhash_ref->{ $key }; - $isDirty = "TRUE"; - }else { + #Now just append the enw strings + #FIXME!!! Implement insertion in the correct order + foreach my $key ( keys ( %{ $string_hash->{ $lang } } ) ) + { + push @sdf_file , $string_hash->{ $lang }{ $key } , if ( defined $string_hash->{ $lang }{ $key } ); + #print "WARNING: Not defined = ".$string_hash->{ $lang }{ $key }."\n", if( ! defined $string_hash->{ $lang }{ $key } ); } - } - - #### Write file - if( !$bVerbose ){ print STDOUT "."; } - if( $isDirty eq "TRUE" ){ - if( open DESTFILE , "+> $localizeFile" ){ + # Write the new file + my ( $TMPFILE , $tmpfile ) = File::Temp::tempfile(); + if( open DESTFILE , "+> $tmpfile " ){ print DESTFILE get_license_header(); - @mykeys = sort keys( %index ); - foreach my $key( @mykeys ){ - print DESTFILE ( $index{ $key } , "\n" ); - } - close DESTFILE; - }else { - print STDOUT "WARNING: File $localizeFile is not writable , try to merge ...\n"; - my ( $TMPFILE , $tmpfile ) = File::Temp::tempfile(); - if( open DESTFILE , "+> $tmpfile " ){ - @mykeys = keys( %index ); - foreach my $key( @mykeys ){ - print DESTFILE ( $index{ $key } , "\n" ); - } - close DESTFILE; - if( move( $localizeFile , $localizeFile.".backup" ) ){ - if( copy( $tmpfile , $localizeFile ) ){ - unlink $localizeFile.".backup"; - } else { print STDERR "Can't open/create '$localizeFile', original file is renamed to $localizeFile.backup\n"; } - } else { print STDERR "Can't open/create '$localizeFile'\n"; } - }else{ - print STDERR "WARNING: Can't open/create '$localizeFile'\n"; + foreach my $string( @sdf_file ){ + print DESTFILE "$string\n"; } - unlink $tmpfile; - } - } -# if( $no_sort eq '' ){ -# sort_outfile( $localizeFile ); -# } + close ( DESTFILE ); + if( move( $current_l10n_file , $current_l10n_file.".backup" ) ){ + if( copy( $tmpfile , $current_l10n_file ) ){ + unlink $l10n_file.".backup"; + } else { print STDERR "Can't open/create '$l10n_file', original file is renamed to $l10n_file.backup\n"; } + } else { print STDERR "Can't open/create '$l10n_file'\n"; } + }else{ + print STDERR "WARNING: Can't open/create '$l10n_file'\n"; + } + unlink $tmpfile; + } } +######################################################### + sub get_license_header{ return "#\n". @@ -398,6 +427,41 @@ sub wanted } } +sub add_paths +{ + my $langhash_ref = shift; + my $root_dir = $ENV{ SRC_ROOT }; + my $ooo_l10n_dir = "$root_dir"."$DELIMITER"."l10n"."$DELIMITER"."source"; + my $so_l10n_dir = "$root_dir"."$DELIMITER"."l10n_so"."$DELIMITER"."source"; + + if( -e $ooo_l10n_dir ) + { + foreach my $lang ( keys( %{ $langhash_ref } ) ) + { + my $loc_file = "$ooo_l10n_dir"."$DELIMITER"."$lang"."$DELIMITER"."localize.sdf"; + if( -e $loc_file ) + { + push @sdfparticles , "$ooo_l10n_dir"."$DELIMITER"."$lang"."$DELIMITER"."localize.sdf"; + } + else { print "WARNING: $loc_file not found ....\n"; } + } + } + else { die "ERROR: Can not find directory $ooo_l10n_dir!!!" } + if( -e $so_l10n_dir ) + { + foreach my $lang ( keys( %{ $langhash_ref } ) ) + { + my $loc_file = "$so_l10n_dir"."$DELIMITER"."$lang"."$DELIMITER"."localize.sdf"; + if( -e $loc_file ) + { + push @sdfparticles , "$ooo_l10n_dir"."$DELIMITER"."$lang"."$DELIMITER"."localize.sdf"; + } + else { #print "WARNING: $loc_file not found ....\n"; + } + } + + } +} sub collectfiles{ print STDOUT "### Localize\n"; my $localizehash_ref; @@ -408,14 +472,14 @@ sub collectfiles{ STDOUT->autoflush( 1 ); ### Search sdf particles - print STDOUT "### Searching sdf particles\n"; + #print STDOUT "### Searching sdf particles\n"; my $working_path = getcwd(); - chdir $srcpath; - find ( { wanted => \&wanted , follow => 1 }, getcwd() ); - chdir $working_path; - - my $nFound = $#sdfparticles +1; - print "\n $nFound files found !\n"; + #chdir $srcpath; + #find ( { wanted => \&wanted , follow => 1 }, getcwd() ); + #chdir $working_path; + add_paths( $langhash_ref ); + #my $nFound = $#sdfparticles +1; + #print "\n $nFound files found !\n"; my ( $LOCALIZEPARTICLE , $localizeSDF ) = File::Temp::tempfile(); close( $LOCALIZEPARTICLE ); @@ -425,18 +489,18 @@ sub collectfiles{ my ( $LOCALIZE_LOG , $my_localize_log ) = File::Temp::tempfile(); close( $LOCALIZE_LOG ); - ## Get the localize de,en-US extract + ## Get the localize en-US extract if( $bAll || $bUseLocalize ){ print "### Fetching source language strings\n"; my $command = ""; my $args = ""; if( $ENV{WRAPCMD} ){ - $command = "$ENV{WRAPCMD} localize_sl"; + $command = $ENV{WRAPCMD}.$binpath."localize_sl"; }else{ - $command = "localize_sl"; + $command = $binpath."localize_sl"; } - + print $command; # -e # if ( -x $command ){ if( $command ){ @@ -480,7 +544,8 @@ sub collectfiles{ } ## Get sdf particles - open ALLPARTICLES_MERGED , "+>> $particleSDF_merged" +#***************** + open ALLPARTICLES_MERGED , "+>> $particleSDF_merged" or die "Can't open $particleSDF_merged"; ## Fill fackback hash @@ -542,7 +607,7 @@ sub collectfiles{ } } close ALLPARTICLES_MERGED; - +#*************** # Hash of array my %output; @@ -1040,7 +1105,8 @@ sub parse_options{ my $merge; my $extract; my $success = GetOptions('f=s' => \$sdffile , 'l=s' => \$languages , 's=s' => \$srcpath , 'h' => \$help , 'v' => \$bVerbose , - 'm' => \$merge , 'e' => \$extract , 'x' => \$no_sort , 'd' => \$use_default_date ); + 'm' => \$merge , 'e' => \$extract , 'x' => \$no_sort , 'd' => \$use_default_date , 'c' => \$create_dirs , + 'n' => \$no_gsicheck ); $outputfile = $sdffile; #print STDOUT "DBG: lang = $languages\n"; @@ -1068,13 +1134,16 @@ sub parse_options{ if( $extract ){ $mode = "extract"; } else { $mode = "merge"; } } +#my $multi_localize_files = ''; h +#my $module_to_merge = ''; i +#my $sort_sdf_before = ''; g ######################################################### sub usage{ print STDERR "Usage: localize.pl\n"; print STDERR "Split or collect SDF files\n"; - print STDERR " merge: -m -f <sdffile> -l l1[=f1][,l2[=f2]][...] [ -s <sourceroot> ]\n"; + print STDERR " merge: -m -f <sdffile> -l l1[=f1][,l2[=f2]][...] [ -s <sourceroot> ] [ -c ]\n"; print STDERR " extract: -e -f <outputfile> -l <lang> [ -s <sourceroot> ] [-d]\n"; print STDERR "Options:\n"; print STDERR " -h help\n"; @@ -1085,6 +1154,11 @@ sub usage{ print STDERR " -s <sourceroot> Path to the modules, if no \$SRC_ROOT is set\n"; print STDERR " -l ( all | <isocode> | <isocode>=fallback ) comma seperated languages\n"; print STDERR " -d Use default date in extracted sdf file\n"; + print STDERR " -c Create needed directories\n"; + print STDERR " -g Sort sdf file before mergeing\n"; + print STDERR " -h File with localize.sdf's\n!"; + print STDERR " -n No gsicheck\n"; + print STDERR " -i Module to merge\n"; print STDERR " -v Verbose\n"; print STDERR "\nExample:\n"; print STDERR "\nlocalize -e -l en-US,pt-BR=en-US -f my.sdf\n( Extract en-US and pt-BR with en-US fallback )\n"; diff --git a/transex3/source/localize.cxx b/transex3/source/localize.cxx index 31420cc58eeb..bcd45d7027a4 100644 --- a/transex3/source/localize.cxx +++ b/transex3/source/localize.cxx @@ -283,6 +283,7 @@ void SourceTreeLocalizer::WorkOnFile( const ByteString &rParameter, const ByteString &rIso ) /*****************************************************************************/ { + (void) rIso; // Remove me ;) String sFull( rFileName, RTL_TEXTENCODING_ASCII_US ); DirEntry aEntry( sFull ); ByteString sFileName( aEntry.GetName(), RTL_TEXTENCODING_ASCII_US ); @@ -304,37 +305,43 @@ void SourceTreeLocalizer::WorkOnFile( DirEntry aTemp( Export::GetTempFile()); ByteString sTempFile( aTemp.GetFull(), RTL_TEXTENCODING_ASCII_US ); - ByteString sExecutable( rExecutable ); + ByteString sDel; #if defined(WNT) || defined(OS2) - sExecutable += ".exe"; - String sPath( Export::GetEnv( "PATH" ), RTL_TEXTENCODING_ASCII_US ); + sDel=ByteString("\\"); #else - String sPath( Export::GetEnv( "LD_LIBRARY_PATH" ), RTL_TEXTENCODING_ASCII_US ); + sDel=ByteString("/"); #endif + ByteString sPath1( Export::GetEnv("SOLARVER") ); + ByteString sPath2( Export::GetEnv("INPATH") ); + ByteString sPath3( "bin" ); + ByteString sPath4( Export::GetEnv("UPDMINOREXT") ); + ByteString sExecutable( sPath1 ); + sExecutable += sDel ; + sExecutable += sPath2 ; + sExecutable += sDel; + sExecutable += sPath3 ; + sExecutable += sPath4 ; + sExecutable += sDel ; + sExecutable += rExecutable ; + + + ByteString sCommand( sExecutable ); + sCommand += " "; + sCommand += rParameter; + sCommand += " -p "; + sCommand += sPrj; + sCommand += " -r "; + sCommand += sRoot; + sCommand += " -i "; + sCommand += sFileName; + sCommand += " -o "; + sCommand += sTempFile; + if ( sLanguageRestriction.Len()) { + sCommand += " -l "; + sCommand += getSourceLanguages( sLanguageRestriction , sCommand ); + } - DirEntry aExecutable( String( sExecutable, RTL_TEXTENCODING_ASCII_US )); - aExecutable.Find( sPath ); - - ByteString sCommand( aExecutable.GetFull(), RTL_TEXTENCODING_ASCII_US ); - sCommand += " "; - sCommand += rParameter; - sCommand += " -p "; - sCommand += sPrj; - sCommand += " -r "; - sCommand += sRoot; - sCommand += " -i "; - sCommand += sFileName; - sCommand += " -o "; - sCommand += sTempFile; - if ( sLanguageRestriction.Len()) { - sCommand += " -l "; - sCommand += getSourceLanguages( sLanguageRestriction , sCommand ); - } - if ( rIso.Equals("iso") && sIsoCode99.Len()) { - sCommand += " -ISO99 "; - sCommand += sIsoCode99; - } - if( bQuiet2 ){ + if( bQuiet2 ){ sCommand +=" -QQ "; } //printf("DBG: %s\n",sCommand.GetBuffer()); diff --git a/transex3/source/merge.cxx b/transex3/source/merge.cxx index 3546d7e3accd..ee0f6f459655 100644 --- a/transex3/source/merge.cxx +++ b/transex3/source/merge.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: merge.cxx,v $ - * $Revision: 1.29 $ + * $Revision: 1.27.36.3 $ * * This file is part of OpenOffice.org. * @@ -210,38 +210,39 @@ MergeDataFile::MergeDataFile( const ByteString &rFileName, const ByteString& sFi ByteString sTEXT; ByteString sQHTEXT; ByteString sTITLE; + ByteString sHACK("HACK"); const ByteString sEmpty(""); if( !aInputStream.IsOpen() ) { - printf("ERROR : Can't open %s\n", rFileName.GetBuffer()); - exit( -1 ); + printf("Warning : Can't open %s\n", rFileName.GetBuffer()); + //exit( -1 ); + return; } while ( !aInputStream.IsEof()) { + xub_StrLen nToks; aInputStream.ReadLine( sLine ); sLine = sLine.Convert( RTL_TEXTENCODING_MS_1252, aCharSet ); - if ( sLine.GetTokenCount( '\t' ) == 15 ) { + nToks = sLine.GetTokenCount( '\t' ); + if ( nToks == 15 ) { // Skip all wrong filenames ByteString filename = sLine.GetToken( 1 , '\t' ); filename = filename.Copy( filename.SearchCharBackward( "\\" )+1 , filename.Len() ); if( sFile.Equals( sEmpty ) || ( !sFile.Equals( sEmpty ) && filename.Equals( sFile ) ) ) { - sTYP = sLine.GetToken( 3, '\t' ); - sGID = sLine.GetToken( 4, '\t' ); - sLID = sLine.GetToken( 5, '\t' ); - sPFO = sLine.GetToken( 7, '\t' ); - sPFO = ByteString("HACK"); - nLANG = sLine.GetToken( 9, '\t' ); - - sTEXT = sLine.GetToken( 10, '\t' ); - // printf("%s\n",sTEXT.GetBuffer()); - // Quote( sTEXT ); - // printf("%s\n",sTEXT.GetBuffer()); - - sQHTEXT = sLine.GetToken( 12, '\t' ); - sTITLE = sLine.GetToken( 13, '\t' ); + xub_StrLen rIdx = 0; + sTYP = sLine.GetToken( 3, '\t', rIdx ); + sGID = sLine.GetToken( 0, '\t', rIdx ); // 4 + sLID = sLine.GetToken( 0, '\t', rIdx ); // 5 + sPFO = sLine.GetToken( 1, '\t', rIdx ); // 7 + sPFO = sHACK; + nLANG = sLine.GetToken( 1, '\t', rIdx ); // 9 + sTEXT = sLine.GetToken( 0, '\t', rIdx ); // 10 + + sQHTEXT = sLine.GetToken( 1, '\t', rIdx ); // 12 + sTITLE = sLine.GetToken( 0, '\t', rIdx ); // 13 nLANG.EraseLeadingAndTrailingChars(); @@ -250,20 +251,22 @@ MergeDataFile::MergeDataFile( const ByteString &rFileName, const ByteString& sFi #else if ( !nLANG.EqualsIgnoreCaseAscii("en-US") ){ #endif - InsertEntry( sTYP, sGID, sLID, sPFO, nLANG, sTEXT, sQHTEXT, sTITLE , filename , bCaseSensitive ); - if( nLANG.Len() > 0 ){ - bool bFound = false; - for( unsigned int x = 0; x < aLanguages.size(); x++ ){ - if( aLanguages[ x ].Equals( nLANG ) ) - bFound = true; - } + ByteStringHashMap::const_iterator lit; + lit = aLanguageMap.find (nLANG); + ByteString aLANG; + if (lit == aLanguageMap.end()) { + aLANG = nLANG; + aLanguageMap.insert( ByteStringHashMap::value_type( aLANG, aLANG ) ); // Remember read languages for -l all switch - if( !bFound ) aLanguages.push_back( nLANG ); - } + aLanguageList.push_back( nLANG ); + } else + aLANG = lit->first; + + InsertEntry( sTYP, sGID, sLID, sPFO, aLANG, sTEXT, sQHTEXT, sTITLE , filename , bCaseSensitive ); } } } - else if ( sLine.GetTokenCount( '\t' ) == 10 ){ + else if ( nToks == 10 ) { printf("ERROR: File format is obsolete and no longer supported!\n"); } } @@ -286,7 +289,7 @@ ByteString MergeDataFile::Dump(){ ByteString sRet( "MergeDataFile\n" ); //sRet.Append( Export::DumpMap( "aLanguageSet" , aLanguageSet ) ); - //sRet.Append( Export::DumpMap( "aLanguages" , aLanguages ) ); + //sRet.Append( Export::DumpMap( "aLanguageList" , aLanguageList ) ); printf("MergeDataFile\n"); MergeDataHashMap::const_iterator idbg; for( idbg = aMap.begin() ; idbg != aMap.end(); ++idbg ){ @@ -318,7 +321,7 @@ void MergeDataFile::WriteError( const ByteString &rLine ) fprintf( stderr, "%s\n", rLine.GetBuffer()); } std::vector<ByteString> MergeDataFile::GetLanguages(){ - return aLanguages; + return aLanguageList; } /*****************************************************************************/ @@ -379,23 +382,32 @@ void MergeDataFile::InsertEntry( const ByteString &rLID, const ByteString &rPFO, const ByteString &nLANG, const ByteString &rTEXT, const ByteString &rQHTEXT, const ByteString &rTITLE , - const ByteString &rFilename , bool bCaseSensitive + const ByteString &rInFilename , bool bCaseSensitive ) /*****************************************************************************/ { MergeData *pData; BOOL bFound = FALSE; - // search for MergeData + // uniquify the filename to save memory. + ByteStringHashMap::const_iterator fit = aFilenames.find (rInFilename); + ByteString aFilename; + if (fit == aFilenames.end()) { + aFilename = rInFilename; + aFilenames.insert (ByteStringHashMap::value_type (aFilename, aFilename)); + } else + aFilename = fit->first; - ByteString sKey = CreateKey( rTYP , rGID , rLID , rFilename , bCaseSensitive ); - ByteString sKey2; + // search for MergeData - if( aMap.find( sKey ) != aMap.end() ){ - pData = aMap[ sKey ]; + ByteString sKey = CreateKey( rTYP , rGID , rLID , aFilename , bCaseSensitive ); + MergeDataHashMap::const_iterator mit; + mit = aMap.find( sKey ); + if( mit != aMap.end() ){ + pData = mit->second; }else{ - pData = new MergeData( rTYP, rGID, rLID , rFilename ); - aMap.insert( MergeDataHashMap::value_type( CreateKey( rTYP , rGID , rLID , rFilename , bCaseSensitive ) , pData ) ); + pData = new MergeData( rTYP, rGID, rLID, aFilename ); + aMap.insert( MergeDataHashMap::value_type( sKey, pData ) ); } bFound = FALSE; diff --git a/ucbhelper/prj/build.lst b/ucbhelper/prj/build.lst index fb9e7d7ab45f..3f49d69c987f 100644 --- a/ucbhelper/prj/build.lst +++ b/ucbhelper/prj/build.lst @@ -1,4 +1,4 @@ -uh ucbhelper : offuh sal cppu cppuhelper salhelper NULL +uh ucbhelper : offuh sal cppu cppuhelper salhelper NULL uh ucbhelper usr1 - all uh_mkout NULL uh ucbhelper\inc nmake - all uh_inc NULL uh ucbhelper\source\client nmake - all uh_client uh_inc NULL diff --git a/vcl/aqua/inc/salframeview.h b/vcl/aqua/inc/salframeview.h index e969cc8509a1..7fd4d96c4a45 100755 --- a/vcl/aqua/inc/salframeview.h +++ b/vcl/aqua/inc/salframeview.h @@ -108,6 +108,7 @@ -(void)sendMouseEventToFrame:(NSEvent*)pEvent button:(USHORT)nButton eventtype:(USHORT)nEvent; -(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar; -(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod; +-(MacOSBOOL)sendKeyToFrameDirect: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod; -(MacOSBOOL)sendSingleCharacter:(NSEvent*)pEvent; -(MacOSBOOL)handleKeyDownException:(NSEvent*)pEvent; /* diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx index 89a9d08cef13..601adb3aa9b5 100644 --- a/vcl/aqua/source/gdi/salprn.cxx +++ b/vcl/aqua/source/gdi/salprn.cxx @@ -130,15 +130,27 @@ void AquaSalInfoPrinter::SetupPrinterGraphics( CGContextRef i_rContext ) const if( mePageOrientation == ORIENTATION_PORTRAIT ) { + // move mirrored CTM back into paper double dX = 0, dY = aPaperSize.height; + // move CTM to reflect imageable area + dX += aImageRect.origin.x; + dY -= aPaperSize.height - aImageRect.size.height - aImageRect.origin.y; CGContextTranslateCTM( i_rContext, dX + mnStartPageOffsetX, dY - mnStartPageOffsetY ); + // scale to be top/down and reflect our "virtual" DPI CGContextScaleCTM( i_rContext, 0.1, -0.1 ); } else { + // move CTM to reflect imageable area + double dX = aImageRect.origin.x, dY = aPaperSize.height - aImageRect.size.height - aImageRect.origin.y; + CGContextTranslateCTM( i_rContext, -dX, -dY ); + // turn by 90 degree CGContextRotateCTM( i_rContext, M_PI/2 ); - double dX = aPaperSize.height, dY = -aPaperSize.width; + // move turned CTM back into paper + dX = aPaperSize.height; + dY = -aPaperSize.width; CGContextTranslateCTM( i_rContext, dX + mnStartPageOffsetY, dY - mnStartPageOffsetX ); + // scale to be top/down and reflect our "virtual" DPI CGContextScaleCTM( i_rContext, -0.1, 0.1 ); } mpGraphics->SetPrinterGraphics( i_rContext, nDPIX, nDPIY, 1.0 ); @@ -185,8 +197,8 @@ static struct PaperSizeEntry { 420, 595, PAPER_A5 }, { 612, 792, PAPER_LETTER }, { 612, 1008, PAPER_LEGAL }, - { 728, 1032, PAPER_B4 }, - { 516, 729, PAPER_B5 }, + { 728, 1032, PAPER_B4_JIS }, + { 516, 729, PAPER_B5_JIS }, { 792, 1224, PAPER_TABLOID } }; @@ -214,8 +226,8 @@ static Paper recognizePaper( double i_fWidth, double i_fHeight ) case 595000842: aPaper = PAPER_A4; break; case 420000595: aPaper = PAPER_A5; break; case 612000792: aPaper = PAPER_LETTER; break; - case 728001032: aPaper = PAPER_B4; break; - case 516000729: aPaper = PAPER_B5; break; + case 728001032: aPaper = PAPER_B4_JIS; break; + case 516000729: aPaper = PAPER_B5_JIS; break; case 612001008: aPaper = PAPER_LEGAL; break; case 792001224: aPaper = PAPER_TABLOID; break; default: diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx index 560d80fd75d5..8c40e1acfe66 100644 --- a/vcl/aqua/source/window/salframe.cxx +++ b/vcl/aqua/source/window/salframe.cxx @@ -520,8 +520,16 @@ void AquaSalFrame::SetClientSize( long nWidth, long nHeight ) void AquaSalFrame::GetClientSize( long& rWidth, long& rHeight ) { - rWidth = mbShown ? maGeometry.nWidth : 0; - rHeight = mbShown ? maGeometry.nHeight : 0; + if( mbShown || mbInitShow ) + { + rWidth = maGeometry.nWidth; + rHeight = maGeometry.nHeight; + } + else + { + rWidth = 0; + rHeight = 0; + } } // ----------------------------------------------------------------------- diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm index 7de43d770385..a6213ca7b64d 100755 --- a/vcl/aqua/source/window/salframeview.mm +++ b/vcl/aqua/source/window/salframeview.mm @@ -1242,12 +1242,18 @@ private: } } --(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar +-(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar { return [self sendKeyInputAndReleaseToFrame: nKeyCode character: aChar modifiers: mpFrame->mnLastModifierFlags]; } --(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod +-(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod +{ + return [self sendKeyToFrameDirect: nKeyCode character: aChar modifiers: nMod] || + [self sendSingleCharacter: mpLastEvent]; +} + +-(MacOSBOOL)sendKeyToFrameDirect: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod { YIELD_GUARD; @@ -1283,7 +1289,7 @@ private: // don't send unicodes in the private use area if( keyChar >= 0xf700 && keyChar < 0xf780 ) keyChar = 0; - MacOSBOOL bRet = [self sendKeyInputAndReleaseToFrame: nKeyCode character: keyChar]; + MacOSBOOL bRet = [self sendKeyToFrameDirect: nKeyCode character: keyChar modifiers: mpFrame->mnLastModifierFlags]; mbInKeyInput = false; return bRet; diff --git a/vcl/inc/vcl/pngread.hxx b/vcl/inc/vcl/pngread.hxx index 200b52eb6182..285af1407c1c 100644 --- a/vcl/inc/vcl/pngread.hxx +++ b/vcl/inc/vcl/pngread.hxx @@ -65,6 +65,8 @@ namespace vcl std::vector< sal_uInt8 > aData; }; const std::vector< ChunkData >& GetChunks() const; + + void SetIgnoreGammaChunk( sal_Bool b ); }; } diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx index 1dc9a9958ad5..0241168bba0a 100644 --- a/vcl/inc/vcl/print.hxx +++ b/vcl/inc/vcl/print.hxx @@ -332,17 +332,12 @@ public: USHORT GetPaperBin() const; BOOL SetPaper( Paper ePaper ); BOOL SetPaperSizeUser( const Size& rSize ); - Paper GetPaper() const; + Paper GetPaper() const; // returns number of available paper formats int GetPaperInfoCount() const; // returns info about paper format nPaper - const vcl::PaperInfo& GetPaperInfo( int nPaper ) const; - // sets current paper to format contained in rInfo - BOOL SetPaperFromInfo( const vcl::PaperInfo& rInfo ); - // gets info about paper fromat best matching current paper - const vcl::PaperInfo& GetCurrentPaperInfo() const; - + const PaperInfo& GetPaperInfo( int nPaper ) const; USHORT GetPaperBinCount() const; XubString GetPaperBinName( USHORT nPaperBin ) const; diff --git a/vcl/inc/vcl/prntypes.hxx b/vcl/inc/vcl/prntypes.hxx index 8a05f95f8fc1..a61c1a275474 100644 --- a/vcl/inc/vcl/prntypes.hxx +++ b/vcl/inc/vcl/prntypes.hxx @@ -33,6 +33,7 @@ #include <tools/string.hxx> #include <vcl/sv.h> +#include <i18npool/paper.hxx> // --------------- // - Duplex Mode - @@ -46,33 +47,6 @@ enum DuplexMode { DUPLEX_UNKNOWN, DUPLEX_OFF, DUPLEX_LONGEDGE, DUPLEX_SHORTEDGE enum Orientation { ORIENTATION_PORTRAIT, ORIENTATION_LANDSCAPE }; -// --------- -// - Paper - -// --------- - -typedef USHORT Paper; -#define PAPER_A3 ((Paper)0) -#define PAPER_A4 ((Paper)1) -#define PAPER_A5 ((Paper)2) -#define PAPER_B4 ((Paper)3) -#define PAPER_B5 ((Paper)4) -#define PAPER_LETTER ((Paper)5) -#define PAPER_LEGAL ((Paper)6) -#define PAPER_TABLOID ((Paper)7) -#define PAPER_USER ((Paper)8) - -namespace vcl -{ -struct PaperInfo -{ - String m_aPaperName; // user readable name of paper - unsigned long m_nPaperWidth; // width in mm - unsigned long m_nPaperHeight; // height in mm - - PaperInfo() : m_nPaperWidth( 0 ), m_nPaperHeight( 0 ) {} -}; -} - // ------------------- // - QueueInfo-Types - // ------------------- diff --git a/vcl/inc/vcl/salprn.hxx b/vcl/inc/vcl/salprn.hxx index e7fc44f0ab7d..4ffa969a674f 100644 --- a/vcl/inc/vcl/salprn.hxx +++ b/vcl/inc/vcl/salprn.hxx @@ -68,7 +68,7 @@ struct VCL_DLLPUBLIC SalPrinterQueueInfo class VCL_DLLPUBLIC SalInfoPrinter { public: - std::vector< vcl::PaperInfo > m_aPaperFormats; // all printer supported formats + std::vector< PaperInfo > m_aPaperFormats; // all printer supported formats bool m_bPapersInit; // set to true after InitPaperFormats bool m_bCompatMetrics; diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx index 5ee27e3aeb31..a7cd61477519 100644 --- a/vcl/inc/vcl/settings.hxx +++ b/vcl/inc/vcl/settings.hxx @@ -139,7 +139,7 @@ private: ULONG mnMenuDelay; ULONG mnFollow; USHORT mnMiddleButtonAction; - BOOL mbNoWheelActionWithoutFocus; + USHORT mnWheelBehavior; BOOL mbAlign1; }; @@ -158,6 +158,10 @@ private: #define MOUSE_MIDDLE_AUTOSCROLL ((USHORT)1) #define MOUSE_MIDDLE_PASTESELECTION ((USHORT)2) +#define MOUSE_WHEEL_DISABLE ((USHORT)0) +#define MOUSE_WHEEL_FOCUS_ONLY ((USHORT)1) +#define MOUSE_WHEEL_ALWAYS ((USHORT)2) + class VCL_DLLPUBLIC MouseSettings { void CopyData(); @@ -257,10 +261,10 @@ public: USHORT GetMiddleButtonAction() const { return mpData->mnMiddleButtonAction; } - void SetNoWheelActionWithoutFocus( BOOL bAction ) - { CopyData(); mpData->mbNoWheelActionWithoutFocus = bAction; } - BOOL GetNoWheelActionWithoutFocus() const - { return mpData->mbNoWheelActionWithoutFocus; } + void SetWheelBehavior( USHORT nBehavior ) + { CopyData(); mpData->mnWheelBehavior = nBehavior; } + USHORT GetWheelBehavior() const + { return mpData->mnWheelBehavior; } const MouseSettings& operator =( const MouseSettings& rSet ); diff --git a/vcl/prj/build.lst b/vcl/prj/build.lst index cd6d32dc3d2a..aea5211d074a 100644 --- a/vcl/prj/build.lst +++ b/vcl/prj/build.lst @@ -1,4 +1,4 @@ -vc vcl : apple_remote BOOST:boost rsc sot ucbhelper unotools ICU:icu i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offuh basegfx basebmp tools transex3 icc SO:print_header cpputools NULL +vc vcl : l10n apple_remote BOOST:boost rsc sot ucbhelper unotools ICU:icu i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offuh basegfx basebmp tools transex3 icc SO:print_header cpputools NULL vc vcl usr1 - all vc_mkout NULL vc vcl\inc nmake - all vc_inc NULL vc vcl\source\glyphs nmake - all vc_glyphs vc_inc NULL diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 12213c25a64f..444f1f58c8fb 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -189,7 +189,7 @@ ImplMouseData::ImplMouseData() mnActionDelay = 250; mnMenuDelay = 150; mnFollow = MOUSE_FOLLOW_MENU | MOUSE_FOLLOW_DDLIST; - mbNoWheelActionWithoutFocus = FALSE; + mnWheelBehavior = MOUSE_WHEEL_FOCUS_ONLY; } // ----------------------------------------------------------------------- @@ -217,7 +217,7 @@ ImplMouseData::ImplMouseData( const ImplMouseData& rData ) mnActionDelay = rData.mnActionDelay; mnMenuDelay = rData.mnMenuDelay; mnFollow = rData.mnFollow; - mbNoWheelActionWithoutFocus = rData.mbNoWheelActionWithoutFocus; + mnWheelBehavior = rData.mnWheelBehavior; } // ----------------------------------------------------------------------- @@ -308,7 +308,7 @@ BOOL MouseSettings::operator ==( const MouseSettings& rSet ) const (mpData->mnActionDelay == rSet.mpData->mnActionDelay) && (mpData->mnMenuDelay == rSet.mpData->mnMenuDelay) && (mpData->mnFollow == rSet.mpData->mnFollow) && - (mpData->mbNoWheelActionWithoutFocus == rSet.mpData->mbNoWheelActionWithoutFocus) ) + (mpData->mnWheelBehavior == rSet.mpData->mnWheelBehavior ) ) return TRUE; else return FALSE; diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 42abe3fd248a..309acb404750 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -876,10 +876,19 @@ long ComboBox::Notify( NotifyEvent& rNEvt ) (rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL) && (rNEvt.GetWindow() == mpSubEdit) ) { - if( ! GetSettings().GetMouseSettings().GetNoWheelActionWithoutFocus() || HasChildPathFocus() ) + USHORT nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() ); + if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS ) + || ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY ) + && HasChildPathFocus() + ) + ) + { nDone = mpImplLB->HandleWheelAsCursorTravel( *rNEvt.GetCommandEvent() ); + } else + { nDone = 0; // don't eat this event, let the default handling happen (i.e. scroll the context) + } } return nDone ? nDone : Edit::Notify( rNEvt ); diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 476c5d8f4b7f..553ea46f3bce 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -960,10 +960,19 @@ long ListBox::PreNotify( NotifyEvent& rNEvt ) (rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL) && (rNEvt.GetWindow() == mpImplWin) ) { - if( ! GetSettings().GetMouseSettings().GetNoWheelActionWithoutFocus() || HasChildPathFocus() ) + USHORT nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() ); + if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS ) + || ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY ) + && HasChildPathFocus() + ) + ) + { nDone = mpImplLB->HandleWheelAsCursorTravel( *rNEvt.GetCommandEvent() ); + } else + { nDone = 0; // don't eat this event, let the default handling happen (i.e. scroll the context) + } } } diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 3f8779dc2e90..0d656da40ba7 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -599,7 +599,12 @@ long SpinField::Notify( NotifyEvent& rNEvt ) { if ( ( rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL ) && !IsReadOnly() ) { - if( ! GetSettings().GetMouseSettings().GetNoWheelActionWithoutFocus() || HasChildPathFocus() ) + USHORT nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() ); + if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS ) + || ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY ) + && HasChildPathFocus() + ) + ) { const CommandWheelData* pData = rNEvt.GetCommandEvent()->GetWheelData(); if ( pData->GetMode() == COMMAND_WHEEL_SCROLL ) diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx index 64cddece1199..9e1378f22326 100644 --- a/vcl/source/gdi/impimagetree.cxx +++ b/vcl/source/gdi/impimagetree.cxx @@ -102,8 +102,11 @@ void loadFromStream( rtl::OUString const & path, BitmapEx & bitmap) { std::auto_ptr< SvStream > s(wrapStream(stream)); - if (path.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(".png"))) { - bitmap = vcl::PNGReader(*s).Read(); + if (path.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(".png"))) + { + vcl::PNGReader aPNGReader( *s ); + aPNGReader.SetIgnoreGammaChunk( sal_True ); + bitmap = aPNGReader.Read(); } else { *s >> bitmap; } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 3f648fda8589..25f02a1b2718 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -792,7 +792,8 @@ static void appendNonStrokingColor( const Color& rColor, OStringBuffer& rBuffer } // matrix helper class -namespace vcl +// TODO: use basegfx matrix class instead or derive from it +namespace vcl // TODO: use anonymous namespace to keep this class local { /* for sparse matrices of the form (2D linear transformations) * f[0] f[1] 0 @@ -812,6 +813,7 @@ public: void scale( double sx, double sy ); void rotate( double angle ); void translate( double tx, double ty ); + bool invert(); void append( PDFWriterImpl::PDFPage& rPage, OStringBuffer& rBuffer, Point* pBack = NULL ); @@ -888,6 +890,36 @@ void Matrix3::translate( double tx, double ty ) f[5] += ty; } +bool Matrix3::invert() +{ + // short circuit trivial cases + if( f[1]==f[2] && f[1]==0.0 && f[0]==f[3] && f[0]==1.0 ) + { + f[4] = -f[4]; + f[5] = -f[5]; + return true; + } + + // check determinant + const double fDet = f[0]*f[3]-f[1]*f[2]; + if( fDet == 0.0 ) + return false; + + // invert the matrix + double fn[6]; + fn[0] = +f[3] / fDet; + fn[1] = -f[1] / fDet; + fn[2] = -f[2] / fDet; + fn[3] = +f[0] / fDet; + + // apply inversion to translation + fn[4] = -(f[4]*fn[0] + f[5]*fn[2]); + fn[5] = -(f[4]*fn[1] + f[5]*fn[3]); + + set( fn ); + return true; +} + void Matrix3::append( PDFWriterImpl::PDFPage& rPage, OStringBuffer& rBuffer, Point* pBack ) { appendDouble( f[0], rBuffer ); @@ -6635,6 +6667,7 @@ void PDFWriterImpl::drawHorizontalGlyphs( // subsequent use of that operator would move // the texline matrix relative to what was set before // making use of that would drive us into rounding issues + Matrix3 aMat; if( nRun == 0 && fAngle == 0.0 && fXScale == 1.0 && fSkew == 0.0 ) { m_aPages.back().appendPoint( aCurPos, rLine, false ); @@ -6642,7 +6675,6 @@ void PDFWriterImpl::drawHorizontalGlyphs( } else { - Matrix3 aMat; if( fSkew != 0.0 ) aMat.skew( 0.0, fSkew ); aMat.scale( fXScale, 1.0 ); @@ -6665,15 +6697,17 @@ void PDFWriterImpl::drawHorizontalGlyphs( appendHex( rGlyphs[nBeginRun].m_nMappedGlyphId, aKernedLine ); appendHex( rGlyphs[nBeginRun].m_nMappedGlyphId, aUnkernedLine ); + aMat.invert(); bool bNeedKern = false; for( sal_uInt32 nPos = nBeginRun+1; nPos < aRunEnds[nRun]; nPos++ ) { appendHex( rGlyphs[nPos].m_nMappedGlyphId, aUnkernedLine ); - // check for adjustment - double fTheoreticalGlyphWidth = rGlyphs[nPos].m_aPos.X() - rGlyphs[nPos-1].m_aPos.X(); - fTheoreticalGlyphWidth = fabs( fTheoreticalGlyphWidth ); // #i100522# workaround until #i87686# gets fixed - fTheoreticalGlyphWidth = 1000.0 * fTheoreticalGlyphWidth / fXScale / double(nPixelFontHeight); - sal_Int32 nAdjustment = rGlyphs[nPos-1].m_nNativeWidth - sal_Int32(fTheoreticalGlyphWidth+0.5); + // check if glyph advance matches with the width of the previous glyph, else adjust + const Point aThisPos = aMat.transform( rGlyphs[nPos].m_aPos ); + const Point aPrevPos = aMat.transform( rGlyphs[nPos-1].m_aPos ); + double fAdvance = aThisPos.X() - aPrevPos.X(); + fAdvance *= 1000.0 / (fXScale * nPixelFontHeight); + const sal_Int32 nAdjustment = rGlyphs[nPos-1].m_nNativeWidth - sal_Int32(fAdvance+0.5); if( nAdjustment != 0 ) { bNeedKern = true; diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index 56c9025018b9..834116a9ffe9 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -156,6 +156,7 @@ private: BOOL mbIDAT; // TRUE if finished with enough IDAT chunks BOOL mbGamma; // TRUE if Gamma Correction available BOOL mbpHYs; // TRUE if pysical size of pixel available + sal_Bool mbIgnoreGammaChunk; bool ReadNextChunk(); void ReadRemainingChunks(); @@ -186,6 +187,7 @@ public: BitmapEx GetBitmapEx( const Size& rPreviewSizeHint ); const std::vector< PNGReader::ChunkData >& GetAllChunks(); + void SetIgnoreGammaChunk( sal_Bool bIgnore ){ mbIgnoreGammaChunk = bIgnore; }; }; // ------------------------------------------------------------------------------ @@ -205,8 +207,9 @@ PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream ) mbzCodecInUse ( sal_False ), mbStatus( TRUE), mbIDAT( FALSE ), - mbGamma ( sal_False ), - mbpHYs ( sal_False ) + mbGamma ( sal_False ), + mbpHYs ( sal_False ), + mbIgnoreGammaChunk ( sal_False ) { // prepare the PNG data stream mnOrigStreamMode = mrPNGStream.GetNumberFormatInt(); @@ -382,9 +385,9 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint ) break; case PNGCHUNK_gAMA : // the gamma chunk must precede - { - if ( mbIDAT == FALSE ) // the 'IDAT' and also the - ImplGetGamma(); // 'PLTE'(if available ) + { // the 'IDAT' and also the 'PLTE'(if available ) + if ( !mbIgnoreGammaChunk && ( mbIDAT == FALSE ) ) + ImplGetGamma(); } break; @@ -1568,4 +1571,12 @@ const std::vector< vcl::PNGReader::ChunkData >& PNGReader::GetChunks() const return mpImpl->GetAllChunks(); } +// ------------------------------------------------------------------------ + +void PNGReader::SetIgnoreGammaChunk( sal_Bool b ) +{ + mpImpl->SetIgnoreGammaChunk( b ); +} + + } // namespace vcl diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index f03080a8a699..0ff5f283b5fa 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -67,44 +67,22 @@ int nImplSysDialog = 0; // ======================================================================= -#define PAPER_SLOPPY 50 // Bigger sloppy value as PaperInfo uses only mm accuracy! -#define PAPER_COUNT 9 - -// Use more accurate metric values for Letter/Legal/Tabloid paper formats -static long ImplPaperFormats[PAPER_COUNT*2] = -{ - 29700, 42000, // A3 - 21000, 29700, // A4 - 14800, 21000, // A5 - 25000, 35300, // B4 - 17600, 25000, // B5 - 21590, 27940, // Letter - 21590, 35570, // Legal - 27960, 43130, // Tabloid - 0, 0 // USER -}; - -// ======================================================================= - -Paper ImplGetPaperFormat( long nWidth100thMM, long nHeight100thMM ) +namespace { - USHORT i; - - for( i = 0; i < PAPER_COUNT; i++ ) + static Paper ImplGetPaperFormat( long nWidth100thMM, long nHeight100thMM ) { - if ( (ImplPaperFormats[i*2] == nWidth100thMM) && - (ImplPaperFormats[i*2+1] == nHeight100thMM) ) - return (Paper)i; + PaperInfo aInfo(nWidth100thMM, nHeight100thMM); + aInfo.doSloppyFit(); + return aInfo.getPaper(); } - for( i = 0; i < PAPER_COUNT; i++ ) +// ----------------------------------------------------------------------- + + static const PaperInfo& ImplGetEmptyPaper() { - if ( (Abs( ImplPaperFormats[i*2]-nWidth100thMM ) < PAPER_SLOPPY) && - (Abs( ImplPaperFormats[i*2+1]-nHeight100thMM ) < PAPER_SLOPPY) ) - return (Paper)i; + static PaperInfo aInfo(PAPER_USER); + return aInfo; } - - return PAPER_USER; } // ======================================================================= @@ -118,8 +96,9 @@ void ImplUpdateJobSetupPaper( JobSetup& rJobSetup ) if ( pConstData->mePaperFormat != PAPER_USER ) { ImplJobSetup* pData = rJobSetup.ImplGetData(); - pData->mnPaperWidth = ImplPaperFormats[((USHORT)pConstData->mePaperFormat)*2]; - pData->mnPaperHeight = ImplPaperFormats[((USHORT)pConstData->mePaperFormat)*2+1]; + PaperInfo aInfo(pConstData->mePaperFormat); + pData->mnPaperWidth = aInfo.getWidth(); + pData->mnPaperHeight = aInfo.getHeight(); } } else if ( pConstData->mePaperFormat == PAPER_USER ) @@ -974,17 +953,6 @@ USHORT Printer::GetPaperBin() const // ----------------------------------------------------------------------- -static BOOL ImplPaperSizeEqual( unsigned long nPaperWidth1, unsigned long nPaperHeight1, - unsigned long nPaperWidth2, unsigned long nPaperHeight2 ) -{ - const long PAPER_ACCURACY = 1; // 1.0 mm accuracy - - return ( (Abs( long(nPaperWidth1)-long(nPaperWidth2) ) <= PAPER_ACCURACY ) && - (Abs( long(nPaperHeight1)-long(nPaperHeight2) ) <= PAPER_ACCURACY ) ); -} - -// ----------------------------------------------------------------------- - // Map user paper format to a available printer paper formats void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup ) { @@ -993,21 +961,17 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup ) int nLandscapeAngle = GetLandscapeAngle(); int nPaperCount = GetPaperInfoCount(); - unsigned long nPaperWidth = pSetupData->mnPaperWidth/100; - unsigned long nPaperHeight = pSetupData->mnPaperHeight/100; + PaperInfo aInfo(pSetupData->mnPaperWidth, pSetupData->mnPaperHeight); // Alle Papierformate vergleichen und ein passendes raussuchen for ( int i = 0; i < nPaperCount; i++ ) { - const vcl::PaperInfo& rPaperInfo = GetPaperInfo( i ); + const PaperInfo& rPaperInfo = GetPaperInfo( i ); - if ( ImplPaperSizeEqual( rPaperInfo.m_nPaperWidth, - rPaperInfo.m_nPaperHeight, - nPaperWidth, - nPaperHeight ) ) + if ( aInfo.sloppyEqual(rPaperInfo) ) { - pSetupData->mePaperFormat = ImplGetPaperFormat( rPaperInfo.m_nPaperWidth*100, - rPaperInfo.m_nPaperHeight*100 ); + pSetupData->mePaperFormat = ImplGetPaperFormat( rPaperInfo.getWidth(), + rPaperInfo.getHeight() ); pSetupData->meOrientation = ORIENTATION_PORTRAIT; break; } @@ -1020,17 +984,17 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup ) nLandscapeAngle != 0 && HasSupport( SUPPORT_SET_ORIENTATION )) { + + PaperInfo aRotatedInfo(pSetupData->mnPaperHeight, pSetupData->mnPaperWidth); + for ( int i = 0; i < nPaperCount; i++ ) { - const vcl::PaperInfo& rPaperInfo = GetPaperInfo( i ); + const PaperInfo& rPaperInfo = GetPaperInfo( i ); - if ( ImplPaperSizeEqual( rPaperInfo.m_nPaperWidth, - rPaperInfo.m_nPaperHeight, - nPaperHeight, - nPaperWidth )) + if ( aRotatedInfo.sloppyEqual( rPaperInfo ) ) { - pSetupData->mePaperFormat = ImplGetPaperFormat( rPaperInfo.m_nPaperWidth*100, - rPaperInfo.m_nPaperHeight*100 ); + pSetupData->mePaperFormat = ImplGetPaperFormat( rPaperInfo.getWidth(), + rPaperInfo.getHeight() ); pSetupData->meOrientation = ORIENTATION_LANDSCAPE; break; } @@ -1052,8 +1016,9 @@ BOOL Printer::SetPaper( Paper ePaper ) pSetupData->mePaperFormat = ePaper; if ( ePaper != PAPER_USER ) { - pSetupData->mnPaperWidth = ImplPaperFormats[((USHORT)ePaper)*2]; - pSetupData->mnPaperHeight = ImplPaperFormats[((USHORT)ePaper)*2+1]; + PaperInfo aInfo(ePaper); + pSetupData->mnPaperWidth = aInfo.getWidth(); + pSetupData->mnPaperHeight = aInfo.getHeight(); } if ( IsDisplayPrinter() ) @@ -1089,9 +1054,8 @@ BOOL Printer::SetPaperSizeUser( const Size& rSize ) if ( mbInPrintPage ) return FALSE; - MapMode aMap100thMM( MAP_100TH_MM ); Size aPixSize = LogicToPixel( rSize ); - Size aPageSize = PixelToLogic( aPixSize, aMap100thMM ); + Size aPageSize = PixelToLogic( aPixSize, MAP_100TH_MM ); if ( (maJobSetup.ImplGetConstData()->mePaperFormat != PAPER_USER) || (maJobSetup.ImplGetConstData()->mnPaperWidth != aPageSize.Width()) || (maJobSetup.ImplGetConstData()->mnPaperHeight != aPageSize.Height()) ) @@ -1129,15 +1093,6 @@ BOOL Printer::SetPaperSizeUser( const Size& rSize ) return TRUE; } - -// ----------------------------------------------------------------------- - -static const vcl::PaperInfo& ImplGetEmptyPaper() -{ - static vcl::PaperInfo aInfo; - return aInfo; -} - // ----------------------------------------------------------------------- int Printer::GetPaperInfoCount() const @@ -1151,7 +1106,7 @@ int Printer::GetPaperInfoCount() const // ----------------------------------------------------------------------- -const vcl::PaperInfo& Printer::GetPaperInfo( int nPaper ) const +const PaperInfo& Printer::GetPaperInfo( int nPaper ) const { if( ! mpInfoPrinter ) return ImplGetEmptyPaper(); @@ -1164,17 +1119,6 @@ const vcl::PaperInfo& Printer::GetPaperInfo( int nPaper ) const // ----------------------------------------------------------------------- -BOOL Printer::SetPaperFromInfo( const vcl::PaperInfo& rInfo ) -{ - MapMode aMap( MAP_MM ); - Size aSize( rInfo.m_nPaperWidth, rInfo.m_nPaperHeight ); - aSize = LogicToPixel( aSize, aMap ); - aSize = PixelToLogic( aSize ); - return SetPaperSizeUser( aSize ); -} - -// ----------------------------------------------------------------------- - DuplexMode Printer::GetDuplexMode() const { return maJobSetup.ImplGetConstData()->meDuplexMode; @@ -1226,38 +1170,6 @@ int Printer::GetLandscapeAngle() const // ----------------------------------------------------------------------- -const vcl::PaperInfo& Printer::GetCurrentPaperInfo() const -{ - if( ! mpInfoPrinter ) - return ImplGetEmptyPaper(); - if( ! mpInfoPrinter->m_bPapersInit ) - mpInfoPrinter->InitPaperFormats( maJobSetup.ImplGetConstData() ); - if( mpInfoPrinter->m_aPaperFormats.empty() ) - return ImplGetEmptyPaper(); - - MapMode aMap( MAP_MM ); - Size aSize = PixelToLogic( GetPaperSizePixel(), aMap ); - int nMatch = -1; - long nDelta = 0; - for( unsigned int i = 0; i < mpInfoPrinter->m_aPaperFormats.size(); i++ ) - { - long nW = mpInfoPrinter->m_aPaperFormats[i].m_nPaperWidth; - long nH = mpInfoPrinter->m_aPaperFormats[i].m_nPaperHeight; - if( nW >= (aSize.Width()-1) && nH >= (aSize.Height()-1) ) - { - long nCurDelta = (nW - aSize.Width())*(nW - aSize.Width()) + (nH - aSize.Height() )*(nH - aSize.Height() ); - if( nMatch == -1 || nCurDelta < nDelta ) - { - nMatch = i; - nDelta = nCurDelta; - } - } - } - return nMatch != -1 ? mpInfoPrinter->m_aPaperFormats[nMatch] : ImplGetEmptyPaper(); -} - -// ----------------------------------------------------------------------- - Paper Printer::GetPaper() const { return maJobSetup.ImplGetConstData()->mePaperFormat; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 279775d712e4..86d6347617b0 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -5844,18 +5844,15 @@ void Window::UpdateSettings( const AllSettings& rSettings, BOOL bChild ) ImplInitResolutionSettings(); /* #i73785# - * do not overwrite a NoWheelActionWithoutFocus with false - * this looks kind of a hack, but NoWheelActionWithoutFocus + * do not overwrite a WheelBehavior with false + * this looks kind of a hack, but WheelBehavior * is always a local change, not a system property, - * so we can spare all our users the hassel of reacting on + * so we can spare all our users the hassle of reacting on * this in their respective DataChanged. */ - if( aOldSettings.GetMouseSettings().GetNoWheelActionWithoutFocus() ) - { - MouseSettings aSet( maSettings.GetMouseSettings() ); - aSet.SetNoWheelActionWithoutFocus( TRUE ); - maSettings.SetMouseSettings( aSet ); - } + MouseSettings aSet( maSettings.GetMouseSettings() ); + aSet.SetWheelBehavior( aOldSettings.GetMouseSettings().GetWheelBehavior() ); + maSettings.SetMouseSettings( aSet ); if( (nChangeFlags & SETTINGS_STYLE) && IsBackground() ) { diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx index bb08477e82e9..b55798608b37 100644 --- a/vcl/unx/gtk/app/gtkdata.cxx +++ b/vcl/unx/gtk/app/gtkdata.cxx @@ -138,8 +138,6 @@ GdkFilterReturn GtkSalDisplay::filterGdkEvent( GdkXEvent* sys_event, GdkEvent*, gpointer data ) { - GTK_YIELD_GRAB(); - GdkFilterReturn aFilterReturn = GDK_FILTER_CONTINUE; XEvent *pEvent = (XEvent *)sys_event; @@ -150,6 +148,8 @@ GdkFilterReturn GtkSalDisplay::filterGdkEvent( GdkXEvent* sys_event, CallEventCallback( pEvent, sizeof( XEvent ) ) ) aFilterReturn = GDK_FILTER_REMOVE; + GTK_YIELD_GRAB(); + if (pDisplay->GetDisplay() == pEvent->xany.display ) { // #i53471# gtk has no callback mechanism that lets us be notified diff --git a/vcl/unx/headless/svpgdi.cxx b/vcl/unx/headless/svpgdi.cxx index cd3e286d167a..bd317c883b0b 100644 --- a/vcl/unx/headless/svpgdi.cxx +++ b/vcl/unx/headless/svpgdi.cxx @@ -429,7 +429,7 @@ void SvpSalGraphics::copyArea( long nDestX, { B2IRange aSrcRect( nSrcX, nSrcY, nSrcX+nSrcWidth, nSrcY+nSrcHeight ); B2IRange aDestRect( nDestX, nDestY, nDestX+nSrcWidth, nDestY+nSrcHeight ); - m_aDevice->drawBitmap( m_aDevice, aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap ); + m_aDevice->drawBitmap( m_aOrigDevice, aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap ); dbgOut( m_aDevice ); } @@ -444,7 +444,7 @@ void SvpSalGraphics::copyBits( const SalTwoRect* pPosAry, B2IRange aDestRect( pPosAry->mnDestX, pPosAry->mnDestY, pPosAry->mnDestX+pPosAry->mnDestWidth, pPosAry->mnDestY+pPosAry->mnDestHeight ); - m_aDevice->drawBitmap( pSrc->m_aDevice, aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap ); + m_aDevice->drawBitmap( pSrc->m_aOrigDevice, aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap ); dbgOut( m_aDevice ); } @@ -519,7 +519,7 @@ SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeigh m_aDevice ); B2IRange aSrcRect( nX, nY, nX+nWidth, nY+nHeight ); B2IRange aDestRect( 0, 0, nWidth, nHeight ); - aCopy->drawBitmap( m_aDevice, aSrcRect, aDestRect, DrawMode_PAINT ); + aCopy->drawBitmap( m_aOrigDevice, aSrcRect, aDestRect, DrawMode_PAINT ); SvpSalBitmap* pBitmap = new SvpSalBitmap(); pBitmap->setBitmap( aCopy ); diff --git a/vcl/unx/headless/svpprn.cxx b/vcl/unx/headless/svpprn.cxx index 9610cdd001c6..a0834ed40be6 100644 --- a/vcl/unx/headless/svpprn.cxx +++ b/vcl/unx/headless/svpprn.cxx @@ -73,37 +73,6 @@ inline int PtTo10Mu( int nPoints ) { return (int)((((double)nPoints)*35.27777778 inline int TenMuToPt( int nUnits ) { return (int)((((double)nUnits)/35.27777778)+0.5); } -static struct -{ - int width; - int height; - const char* name; - int namelength; - Paper paper; -} aPaperTab[] = -{ - { 29700, 42000, "A3", 2, PAPER_A3 }, - { 21000, 29700, "A4", 2, PAPER_A4 }, - { 14800, 21000, "A5", 2, PAPER_A5 }, - { 25000, 35300, "B4", 2, PAPER_B4 }, - { 17600, 25000, "B5", 2, PAPER_B5 }, - { 21600, 27900, "Letter", 6, PAPER_LETTER }, - { 21600, 35600, "Legal", 5, PAPER_LEGAL }, - { 27900, 43100, "Tabloid", 7, PAPER_TABLOID }, - { 0, 0, "USER", 4, PAPER_USER } -}; - -static Paper getPaperType( const String& rPaperName ) -{ - ByteString aPaper( rPaperName, RTL_TEXTENCODING_ISO_8859_1 ); - for( unsigned int i = 0; i < sizeof( aPaperTab )/sizeof( aPaperTab[0] ); i++ ) - { - if( ! strcmp( aPaper.GetBuffer(), aPaperTab[i].name ) ) - return aPaperTab[i].paper; - } - return PAPER_USER; -} - static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData ) { pJobSetup->meOrientation = (Orientation)(rData.m_eOrientation == orientation::Landscape ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT); @@ -113,7 +82,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData ) int width, height; rData.m_aContext.getPageSize( aPaper, width, height ); - pJobSetup->mePaperFormat = getPaperType( aPaper ); + pJobSetup->mePaperFormat = PaperInfo::fromPSName(OUStringToOString( aPaper, RTL_TEXTENCODING_ISO_8859_1 )); pJobSetup->mnPaperWidth = 0; pJobSetup->mnPaperHeight = 0; if( pJobSetup->mePaperFormat == PAPER_USER ) @@ -501,14 +470,9 @@ void PspSalInfoPrinter::InitPaperFormats( const ImplJobSetup* ) for( int i = 0; i < nValues; i++ ) { const PPDValue* pValue = pKey->getValue( i ); - vcl::PaperInfo aInfo; - aInfo.m_aPaperName = pValue->m_aOptionTranslation; - if( ! aInfo.m_aPaperName.Len() ) - aInfo.m_aPaperName = pValue->m_aOption; int nWidth = 0, nHeight = 0; m_aJobData.m_pParser->getPaperDimension( pValue->m_aOption, nWidth, nHeight ); - aInfo.m_nPaperWidth = (unsigned long)((PtTo10Mu( nWidth )+50)/100); - aInfo.m_nPaperHeight = (unsigned long)((PtTo10Mu( nHeight )+50)/100); + PaperInfo aInfo(PtTo10Mu( nWidth ), PtTo10Mu( nHeight )); m_aPaperFormats.push_back( aInfo ); } } @@ -626,7 +590,7 @@ BOOL PspSalInfoPrinter::SetData( TenMuToPt( pJobSetup->mnPaperWidth ), TenMuToPt( pJobSetup->mnPaperHeight ) ); else - aPaper = String( ByteString( aPaperTab[ pJobSetup->mePaperFormat ].name ), RTL_TEXTENCODING_ISO_8859_1 ); + aPaper = rtl::OStringToOUString(PaperInfo::toPSName(pJobSetup->mePaperFormat), RTL_TEXTENCODING_ISO_8859_1); pKey = aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); pValue = pKey ? pKey->getValue( aPaper ) : NULL; diff --git a/vcl/unx/headless/svpvd.cxx b/vcl/unx/headless/svpvd.cxx index 2d7342093e47..6220af0b28b8 100644 --- a/vcl/unx/headless/svpvd.cxx +++ b/vcl/unx/headless/svpvd.cxx @@ -34,6 +34,8 @@ #include <basegfx/vector/b2ivector.hxx> #include <basebmp/scanlineformats.hxx> +#include "stdio.h" + using namespace basegfx; using namespace basebmp; @@ -65,9 +67,14 @@ BOOL SvpSalVirtualDevice::SetSize( long nNewDX, long nNewDY ) if( ! m_aDevice.get() || m_aDevice->getSize() != aDevSize ) { sal_uInt32 nFormat = SVP_DEFAULT_BITMAP_FORMAT; + std::vector< basebmp::Color > aDevPal; switch( m_nBitCount ) { - case 1: nFormat = Format::ONE_BIT_MSB_PAL; break; + case 1: nFormat = Format::ONE_BIT_MSB_PAL; + aDevPal.reserve(2); + aDevPal.push_back( basebmp::Color( 0, 0, 0 ) ); + aDevPal.push_back( basebmp::Color( 0xff, 0xff, 0xff ) ); + break; case 4: nFormat = Format::FOUR_BIT_MSB_PAL; break; case 8: nFormat = Format::EIGHT_BIT_PAL; break; #ifdef OSL_BIGENDIAN @@ -75,14 +82,19 @@ BOOL SvpSalVirtualDevice::SetSize( long nNewDX, long nNewDY ) #else case 16: nFormat = Format::SIXTEEN_BIT_LSB_TC_MASK; break; #endif + case 0: case 24: nFormat = Format::TWENTYFOUR_BIT_TC_MASK; break; case 32: nFormat = Format::THIRTYTWO_BIT_TC_MASK; break; } - m_aDevice = createBitmapDevice( aDevSize, false, nFormat ); + m_aDevice = aDevPal.empty() + ? createBitmapDevice( aDevSize, false, nFormat ) + : createBitmapDevice( aDevSize, false, nFormat, PaletteMemorySharedVector( new std::vector< basebmp::Color >(aDevPal) ) ); + // update device in existing graphics for( std::list< SvpSalGraphics* >::iterator it = m_aGraphics.begin(); it != m_aGraphics.end(); ++it ) (*it)->setDevice( m_aDevice ); + } return true; } diff --git a/vcl/unx/source/gdi/salprnpsp.cxx b/vcl/unx/source/gdi/salprnpsp.cxx index 0b05e5e8fa14..dcdb3431ce59 100644 --- a/vcl/unx/source/gdi/salprnpsp.cxx +++ b/vcl/unx/source/gdi/salprnpsp.cxx @@ -126,37 +126,6 @@ inline int PtTo10Mu( int nPoints ) { return (int)((((double)nPoints)*35.27777778 inline int TenMuToPt( int nUnits ) { return (int)((((double)nUnits)/35.27777778)+0.5); } -static struct -{ - int width; - int height; - const char* name; - int namelength; - Paper paper; -} aPaperTab[] = -{ - { 29700, 42000, "A3", 2, PAPER_A3 }, - { 21000, 29700, "A4", 2, PAPER_A4 }, - { 14800, 21000, "A5", 2, PAPER_A5 }, - { 25000, 35300, "B4", 2, PAPER_B4 }, - { 17600, 25000, "B5", 2, PAPER_B5 }, - { 21600, 27900, "Letter", 6, PAPER_LETTER }, - { 21600, 35600, "Legal", 5, PAPER_LEGAL }, - { 27900, 43100, "Tabloid", 7, PAPER_TABLOID }, - { 0, 0, "USER", 4, PAPER_USER } -}; - -static Paper getPaperType( const String& rPaperName ) -{ - ByteString aPaper( rPaperName, RTL_TEXTENCODING_ISO_8859_1 ); - for( unsigned int i = 0; i < sizeof( aPaperTab )/sizeof( aPaperTab[0] ); i++ ) - { - if( ! rtl_str_compareIgnoreAsciiCase( aPaper.GetBuffer(), aPaperTab[i].name ) ) - return aPaperTab[i].paper; - } - return PAPER_USER; -} - static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData ) { pJobSetup->meOrientation = (Orientation)(rData.m_eOrientation == orientation::Landscape ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT); @@ -166,7 +135,8 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData ) int width, height; rData.m_aContext.getPageSize( aPaper, width, height ); - pJobSetup->mePaperFormat = getPaperType( aPaper ); + pJobSetup->mePaperFormat = PaperInfo::fromPSName(OUStringToOString( aPaper, RTL_TEXTENCODING_ISO_8859_1 )); + pJobSetup->mnPaperWidth = 0; pJobSetup->mnPaperHeight = 0; if( pJobSetup->mePaperFormat == PAPER_USER ) @@ -570,14 +540,9 @@ void PspSalInfoPrinter::InitPaperFormats( const ImplJobSetup* ) for( int i = 0; i < nValues; i++ ) { const PPDValue* pValue = pKey->getValue( i ); - vcl::PaperInfo aInfo; - aInfo.m_aPaperName = pValue->m_aOptionTranslation; - if( ! aInfo.m_aPaperName.Len() ) - aInfo.m_aPaperName = pValue->m_aOption; int nWidth = 0, nHeight = 0; m_aJobData.m_pParser->getPaperDimension( pValue->m_aOption, nWidth, nHeight ); - aInfo.m_nPaperWidth = (unsigned long)((PtTo10Mu( nWidth )+50)/100); - aInfo.m_nPaperHeight = (unsigned long)((PtTo10Mu( nHeight )+50)/100); + PaperInfo aInfo(PtTo10Mu( nWidth ), PtTo10Mu( nHeight )); m_aPaperFormats.push_back( aInfo ); } } @@ -728,7 +693,7 @@ BOOL PspSalInfoPrinter::SetData( TenMuToPt( pJobSetup->mnPaperWidth ), TenMuToPt( pJobSetup->mnPaperHeight ) ); else - aPaper = String( ByteString( aPaperTab[ pJobSetup->mePaperFormat ].name ), RTL_TEXTENCODING_ISO_8859_1 ); + aPaper = rtl::OStringToOUString(PaperInfo::toPSName(pJobSetup->mePaperFormat), RTL_TEXTENCODING_ISO_8859_1); pKey = aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : NULL; diff --git a/vcl/unx/source/printer/printerinfomanager.cxx b/vcl/unx/source/printer/printerinfomanager.cxx index cf5a4a886c41..b3e5b4667a6a 100644 --- a/vcl/unx/source/printer/printerinfomanager.cxx +++ b/vcl/unx/source/printer/printerinfomanager.cxx @@ -44,6 +44,8 @@ #include "tools/debug.hxx" #include "tools/config.hxx" +#include "i18npool/paper.hxx" + #include "rtl/strbuf.hxx" #include "osl/thread.hxx" @@ -154,77 +156,9 @@ void PrinterInfoManager::setCUPSDisabled( bool bDisable ) void PrinterInfoManager::initSystemDefaultPaper() { - bool bSuccess = false; - - // try libpaper - - // #i78617# workaround missing paperconf command - FILE* pPipe = popen( "sh -c paperconf 2>/dev/null", "r" ); - if( pPipe ) - { - char pBuffer[ 1024 ]; - *pBuffer = 0; - fgets( pBuffer, sizeof(pBuffer)-1, pPipe ); - pclose( pPipe ); - - ByteString aPaper( pBuffer ); - aPaper = WhitespaceToSpace( aPaper ); - if( aPaper.Len() ) - { - m_aSystemDefaultPaper = OUString( OStringToOUString( aPaper, osl_getThreadTextEncoding() ) ); - bSuccess = true; - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "paper from paperconf = %s\n", aPaper.GetBuffer() ); - #endif - } - if( bSuccess ) - return; - } - - // default value is Letter for US (en_US), Cannada (en_CA, fr_CA); else A4 - // en will be interpreted as en_US - - // note: at this point m_aSystemDefaultPaper is set to "A4" from the constructor - - // check for LC_PAPER - const char* pPaperLang = getenv( "LC_PAPER" ); - if( pPaperLang && *pPaperLang ) - { - OString aLang( pPaperLang ); - if( aLang.getLength() > 5 ) - aLang = aLang.copy( 0, 5 ); - if( aLang.getLength() == 5 ) - { - if( aLang.equalsIgnoreAsciiCase( "en_us" ) - || aLang.equalsIgnoreAsciiCase( "en_ca" ) - || aLang.equalsIgnoreAsciiCase( "fr_ca" ) - ) - m_aSystemDefaultPaper = OUString( RTL_CONSTASCII_USTRINGPARAM( "Letter" ) ); - } - else if( aLang.getLength() == 2 && aLang.equalsIgnoreAsciiCase( "en" ) ) - m_aSystemDefaultPaper = OUString( RTL_CONSTASCII_USTRINGPARAM( "Letter" ) ); - return; - } - - // use process locale to determine paper - rtl_Locale* pLoc = NULL; - osl_getProcessLocale( &pLoc ); - if( pLoc ) - { - if( 0 == rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( pLoc->Language->buffer, pLoc->Language->length, "en") ) - { - if( 0 == rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( pLoc->Country->buffer, pLoc->Country->length, "us") - || 0 == rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( pLoc->Country->buffer, pLoc->Country->length, "ca") - || pLoc->Country->length == 0 - ) - m_aSystemDefaultPaper = OUString( RTL_CONSTASCII_USTRINGPARAM( "Letter" ) ); - } - else if( 0 == rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( pLoc->Language->buffer, pLoc->Language->length, "fr") ) - { - if( 0 == rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( pLoc->Country->buffer, pLoc->Country->length, "ca") ) - m_aSystemDefaultPaper = OUString( RTL_CONSTASCII_USTRINGPARAM( "Letter" ) ); - } - } + m_aSystemDefaultPaper = rtl::OStringToOUString( + PaperInfo::toPSName(PaperInfo::getSystemDefaultPaper().getPaper()), + RTL_TEXTENCODING_UTF8); } // ----------------------------------------------------------------- diff --git a/vcl/util/linksvp/makefile.mk b/vcl/util/linksvp/makefile.mk index 8e7d6f35ef83..e5e82323af5c 100644 --- a/vcl/util/linksvp/makefile.mk +++ b/vcl/util/linksvp/makefile.mk @@ -54,6 +54,7 @@ SHL1LIBS=$(LIB1TARGET) SHL1DEPN=$(LB)$/libvcl$(DLLPOSTFIX)$(DLLPOST) SHL1STDLIBS=\ $(VCLLIB)\ + $(I18NPAPERLIB)\ $(BASEBMPLIB)\ $(BASEGFXLIB)\ $(TOOLSLIB) \ diff --git a/vcl/util/makefile.mk b/vcl/util/makefile.mk index 08d6f9197f28..96c28980118f 100644 --- a/vcl/util/makefile.mk +++ b/vcl/util/makefile.mk @@ -170,8 +170,9 @@ SHL1STDLIBS+=\ $(SOTLIB) \ $(UNOTOOLSLIB) \ $(TOOLSLIB) \ + $(I18NPAPERLIB) \ $(I18NISOLANGLIB) \ - $(I18NUTILLIB) \ + $(I18NUTILLIB) \ $(COMPHELPERLIB) \ $(UCBHELPERLIB) \ $(CPPUHELPERLIB) \ @@ -264,6 +265,7 @@ SHL2DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN) # libs for generic plugin SHL2STDLIBS=\ $(VCLLIB)\ + $(I18NPAPERLIB) \ $(TOOLSLIB) \ $(VOSLIB) \ $(BASEGFXLIB) \ diff --git a/vcl/win/source/gdi/MAKEFILE.MK b/vcl/win/source/gdi/MAKEFILE.MK index d50abc1b5aa3..a6d84d41f3ea 100644 --- a/vcl/win/source/gdi/MAKEFILE.MK +++ b/vcl/win/source/gdi/MAKEFILE.MK @@ -44,7 +44,6 @@ TARGET=salgdi # --- #105371# .IF "$(COM)"=="GCC" -CDEFS += -UWINVER -DWINVER=0x0400 .ELSE CFLAGS += -DWINVER=0x0400 .ENDIF diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx index f18c888b067c..7b0dfaf1fa98 100644 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -894,6 +894,24 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS } switch( CHOOSE_DEVMODE(dmPaperSize) ) { + case( DMPAPER_LETTER ): + pSetupData->mePaperFormat = PAPER_LETTER; + break; + case( DMPAPER_TABLOID ): + pSetupData->mePaperFormat = PAPER_TABLOID; + break; + case( DMPAPER_LEDGER ): + pSetupData->mePaperFormat = PAPER_LEDGER; + break; + case( DMPAPER_LEGAL ): + pSetupData->mePaperFormat = PAPER_LEGAL; + break; + case( DMPAPER_STATEMENT ): + pSetupData->mePaperFormat = PAPER_STATEMENT; + break; + case( DMPAPER_EXECUTIVE ): + pSetupData->mePaperFormat = PAPER_EXECUTIVE; + break; case( DMPAPER_A3 ): pSetupData->mePaperFormat = PAPER_A3; break; @@ -903,20 +921,138 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS case( DMPAPER_A5 ): pSetupData->mePaperFormat = PAPER_A5; break; + //See http://wiki.services.openoffice.org/wiki/DefaultPaperSize + //i.e. + //http://msdn.microsoft.com/en-us/library/dd319099(VS.85).aspx + //DMPAPER_B4 12 B4 (JIS) 257 x 364 mm + //http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf + //also says that the MS DMPAPER_B4 is JIS, which makes most sense. And + //matches our Excel filter's belief about the matching XlPaperSize + //enumeration. + // + //http://msdn.microsoft.com/en-us/library/ms776398(VS.85).aspx said + ////"DMPAPER_B4 12 B4 (JIS) 250 x 354" + //which is bogus as it's either JIS 257 × 364 or ISO 250 × 353 + //(cmc) case( DMPAPER_B4 ): - pSetupData->mePaperFormat = PAPER_B4; + pSetupData->mePaperFormat = PAPER_B4_JIS; break; case( DMPAPER_B5 ): - pSetupData->mePaperFormat = PAPER_B5; + pSetupData->mePaperFormat = PAPER_B5_JIS; break; - case( DMPAPER_LETTER ): + case( DMPAPER_QUARTO ): + pSetupData->mePaperFormat = PAPER_QUARTO; + break; + case( DMPAPER_10X14 ): + pSetupData->mePaperFormat = PAPER_10x14; + break; + case( DMPAPER_NOTE ): pSetupData->mePaperFormat = PAPER_LETTER; break; - case( DMPAPER_LEGAL ): - pSetupData->mePaperFormat = PAPER_LEGAL; + case( DMPAPER_ENV_9 ): + pSetupData->mePaperFormat = PAPER_ENV_9; break; - case( DMPAPER_TABLOID ): - pSetupData->mePaperFormat = PAPER_TABLOID; + case( DMPAPER_ENV_10 ): + pSetupData->mePaperFormat = PAPER_ENV_10; + break; + case( DMPAPER_ENV_11 ): + pSetupData->mePaperFormat = PAPER_ENV_11; + break; + case( DMPAPER_ENV_12 ): + pSetupData->mePaperFormat = PAPER_ENV_12; + break; + case( DMPAPER_ENV_14 ): + pSetupData->mePaperFormat = PAPER_ENV_14; + break; + case( DMPAPER_CSHEET ): + pSetupData->mePaperFormat = PAPER_C; + break; + case( DMPAPER_DSHEET ): + pSetupData->mePaperFormat = PAPER_D; + break; + case( DMPAPER_ESHEET ): + pSetupData->mePaperFormat = PAPER_E; + break; + case( DMPAPER_ENV_DL): + pSetupData->mePaperFormat = PAPER_ENV_DL; + break; + case( DMPAPER_ENV_C5): + pSetupData->mePaperFormat = PAPER_ENV_C5; + break; + case( DMPAPER_ENV_C3): + pSetupData->mePaperFormat = PAPER_ENV_C3; + break; + case( DMPAPER_ENV_C4): + pSetupData->mePaperFormat = PAPER_ENV_C4; + break; + case( DMPAPER_ENV_C6): + pSetupData->mePaperFormat = PAPER_ENV_C6; + break; + case( DMPAPER_ENV_C65): + pSetupData->mePaperFormat = PAPER_ENV_C65; + break; + case( DMPAPER_ENV_ITALY ): + pSetupData->mePaperFormat = PAPER_ENV_ITALY; + break; + case( DMPAPER_ENV_MONARCH ): + pSetupData->mePaperFormat = PAPER_ENV_MONARCH; + break; + case( DMPAPER_ENV_PERSONAL ): + pSetupData->mePaperFormat = PAPER_ENV_PERSONAL; + break; + case( DMPAPER_FANFOLD_US ): + pSetupData->mePaperFormat = PAPER_FANFOLD_US; + break; + case( DMPAPER_FANFOLD_STD_GERMAN ): + pSetupData->mePaperFormat = PAPER_FANFOLD_DE; + break; + case( DMPAPER_FANFOLD_LGL_GERMAN ): + pSetupData->mePaperFormat = PAPER_FANFOLD_LEGAL_DE; + break; + case( DMPAPER_ISO_B4 ): + pSetupData->mePaperFormat = PAPER_B4_ISO; + break; + case( DMPAPER_JAPANESE_POSTCARD ): + pSetupData->mePaperFormat = PAPER_POSTCARD_JP; + break; + case( DMPAPER_9X11 ): + pSetupData->mePaperFormat = PAPER_9x11; + break; + case( DMPAPER_10X11 ): + pSetupData->mePaperFormat = PAPER_10x11; + break; + case( DMPAPER_15X11 ): + pSetupData->mePaperFormat = PAPER_15x11; + break; + case( DMPAPER_ENV_INVITE ): + pSetupData->mePaperFormat = PAPER_ENV_INVITE; + break; + case( DMPAPER_A_PLUS ): + pSetupData->mePaperFormat = PAPER_A_PLUS; + break; + case( DMPAPER_B_PLUS ): + pSetupData->mePaperFormat = PAPER_B_PLUS; + break; + case( DMPAPER_LETTER_PLUS ): + pSetupData->mePaperFormat = PAPER_LETTER_PLUS; + break; + case( DMPAPER_A4_PLUS ): + pSetupData->mePaperFormat = PAPER_A4_PLUS; + break; + case( DMPAPER_A2 ): + pSetupData->mePaperFormat = PAPER_A2; + break; + case( DMPAPER_DBL_JAPANESE_POSTCARD ): + pSetupData->mePaperFormat = PAPER_DOUBLEPOSTCARD_JP; + break; + case( DMPAPER_A6 ): + pSetupData->mePaperFormat = PAPER_A6; + break; + case( DMPAPER_B6_JIS ): + pSetupData->mePaperFormat = PAPER_B6_JIS; + break; + case( DMPAPER_12X11 ): + pSetupData->mePaperFormat = PAPER_12x11; break; default: pSetupData->mePaperFormat = PAPER_USER; @@ -942,17 +1078,6 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS // ----------------------------------------------------------------------- -static BOOL ImplPaperSizeEqual( short nPaperWidth1, short nPaperHeight1, - short nPaperWidth2, short nPaperHeight2 ) -{ - const short PAPER_SLOPPY = 1; // 0.1 mm accuracy - - return ( (Abs( nPaperWidth1-nPaperWidth2 ) <= PAPER_SLOPPY) && - (Abs( nPaperHeight1-nPaperHeight2 ) <= PAPER_SLOPPY) ); -} - -// ----------------------------------------------------------------------- - static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData, ULONG nFlags ) { if ( !pSetupData || !pSetupData->mpDriverData ) @@ -994,6 +1119,9 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS switch( pSetupData->mePaperFormat ) { + case( PAPER_A2 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_A2; + break; case( PAPER_A3 ): CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_A3; break; @@ -1003,11 +1131,8 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS case( PAPER_A5 ): CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_A5; break; - case( PAPER_B4 ): - CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_B4; - break; - case( PAPER_B5 ): - CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_B5; + case( PAPER_B4_ISO): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ISO_B4; break; case( PAPER_LETTER ): CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_LETTER; @@ -1018,6 +1143,136 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS case( PAPER_TABLOID ): CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_TABLOID; break; +#if 0 + //http://msdn.microsoft.com/en-us/library/ms776398(VS.85).aspx + //DMPAPER_ENV_B6 is documented as: + //"DMPAPER_ENV_B6 35 Envelope B6 176 x 125 mm" + //which is the wrong way around, it is surely 125 x 176, i.e. + //compare DMPAPER_ENV_B4 and DMPAPER_ENV_B4 as + //DMPAPER_ENV_B4 33 Envelope B4 250 x 353 mm + //DMPAPER_ENV_B5 34 Envelope B5 176 x 250 mm + case( PAPER_B6_ISO ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_B6; + break; +#endif + case( PAPER_ENV_C4 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_C4; + break; + case( PAPER_ENV_C5 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_C5; + break; + case( PAPER_ENV_C6 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_C6; + break; + case( PAPER_ENV_C65 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_C65; + break; + case( PAPER_ENV_DL ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_DL; + break; + case( PAPER_C ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_CSHEET; + break; + case( PAPER_D ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_DSHEET; + break; + case( PAPER_E ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ESHEET; + break; + case( PAPER_EXECUTIVE ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_EXECUTIVE; + break; + case( PAPER_FANFOLD_LEGAL_DE ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_FANFOLD_LGL_GERMAN; + break; + case( PAPER_ENV_MONARCH ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_MONARCH; + break; + case( PAPER_ENV_PERSONAL ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_PERSONAL; + break; + case( PAPER_ENV_9 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_9; + break; + case( PAPER_ENV_10 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_10; + break; + case( PAPER_ENV_11 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_11; + break; + case( PAPER_ENV_12 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_12; + break; + //See the comments on DMPAPER_B4 above + case( PAPER_B4_JIS ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_B4; + break; + case( PAPER_B5_JIS ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_B5; + break; + case( PAPER_B6_JIS ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_B6_JIS; + break; + case( PAPER_LEDGER ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_LEDGER; + break; + case( PAPER_STATEMENT ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_STATEMENT; + break; + case( PAPER_10x14 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_10X14; + break; + case( PAPER_ENV_14 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_14; + break; + case( PAPER_ENV_C3 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_C3; + break; + case( PAPER_ENV_ITALY ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_ITALY; + break; + case( PAPER_FANFOLD_US ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_FANFOLD_US; + break; + case( PAPER_FANFOLD_DE ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_FANFOLD_STD_GERMAN; + break; + case( PAPER_POSTCARD_JP ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_JAPANESE_POSTCARD; + break; + case( PAPER_9x11 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_9X11; + break; + case( PAPER_10x11 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_10X11; + break; + case( PAPER_15x11 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_15X11; + break; + case( PAPER_ENV_INVITE ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_INVITE; + break; + case( PAPER_A_PLUS ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_A_PLUS; + break; + case( PAPER_B_PLUS ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_B_PLUS; + break; + case( PAPER_LETTER_PLUS ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_LETTER_PLUS; + break; + case( PAPER_A4_PLUS ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_A4_PLUS; + break; + case( PAPER_DOUBLEPOSTCARD_JP ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_DBL_JAPANESE_POSTCARD; + break; + case( PAPER_A6 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_A6; + break; + case( PAPER_12x11 ): + CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_12X11; + break; default: { short nPaper = 0; @@ -1038,13 +1293,11 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS } if ( (nPaperSizeCount == nPaperCount) && pPapers && pPaperSizes ) { + PaperInfo aInfo(pSetupData->mnPaperWidth, pSetupData->mnPaperHeight); // compare paper formats and select a good match for ( ULONG i = 0; i < nPaperCount; i++ ) { - if ( ImplPaperSizeEqual( (short)(pSetupData->mnPaperWidth/10), - (short)(pSetupData->mnPaperHeight/10), - (short)pPaperSizes[i].x, - (short)pPaperSizes[i].y ) ) + if ( aInfo.sloppyEqual(PaperInfo(pPaperSizes[i].x*10, pPaperSizes[i].y*10))) { nPaper = pPapers[i]; break; @@ -1056,12 +1309,10 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS // all paper sizes with portrait orientation only!! if ( !nPaper && nLandscapeAngle != 0 ) { + PaperInfo aRotatedInfo(pSetupData->mnPaperHeight, pSetupData->mnPaperWidth); for ( ULONG i = 0; i < nPaperCount; i++ ) { - if ( ImplPaperSizeEqual( (short)(pSetupData->mnPaperWidth/10), - (short)(pSetupData->mnPaperHeight/10), - (short)pPaperSizes[i].y, - (short)pPaperSizes[i].x ) ) + if ( aRotatedInfo.sloppyEqual(PaperInfo(pPaperSizes[i].x*10, pPaperSizes[i].y*10)) ) { nPaper = pPapers[i]; break; @@ -1319,11 +1570,7 @@ void WinSalInfoPrinter::InitPaperFormats( const ImplJobSetup* pSetupData ) ImplDeviceCaps( this, DC_PAPERNAMES, (BYTE*)pNamesBuffer, pSetupData ); for( DWORD i = 0; i < nCount; ++i ) { - vcl::PaperInfo aInfo; - aInfo.m_nPaperWidth = (pPaperSizes[i].x + 5) / 10; - aInfo.m_nPaperHeight = (pPaperSizes[i].y + 5) / 10; - pNamesBuffer[(i+1)*64-1] = '\0'; // make very long names zero terminated - aInfo.m_aPaperName = pNamesBuffer + (i*64); + PaperInfo aInfo(pPaperSizes[i].x * 10, pPaperSizes[i].y * 10); m_aPaperFormats.push_back( aInfo ); } rtl_freeMemory( pNamesBuffer ); @@ -1334,11 +1581,7 @@ void WinSalInfoPrinter::InitPaperFormats( const ImplJobSetup* pSetupData ) ImplDeviceCaps( this, DC_PAPERNAMES, (BYTE*)pNamesBuffer, pSetupData ); for( DWORD i = 0; i < nCount; ++i ) { - vcl::PaperInfo aInfo; - aInfo.m_nPaperWidth = (pPaperSizes[i].x + 5) / 10; - aInfo.m_nPaperHeight = (pPaperSizes[i].y + 5) / 10; - pNamesBuffer[(i+1)*64-1] = '\0'; // make very long names zero terminated - aInfo.m_aPaperName = ImplSalGetUniString( (const char*)(pNamesBuffer + (i*64)) ); + PaperInfo aInfo(pPaperSizes[i].x * 10, pPaperSizes[i].y * 10); m_aPaperFormats.push_back( aInfo ); } rtl_freeMemory( pNamesBuffer ); diff --git a/vcl/win/source/window/MAKEFILE.MK b/vcl/win/source/window/MAKEFILE.MK index 9a65a5000ccf..17e73db1e75e 100644 --- a/vcl/win/source/window/MAKEFILE.MK +++ b/vcl/win/source/window/MAKEFILE.MK @@ -43,7 +43,7 @@ ENABLE_EXCEPTIONS=TRUE # --- #105371# .IF "$(COM)"=="GCC" -CDEFS += -UWINVER -DWINVER=0x0400 -D_WIN32_WINNT=0x0501 +CFLAGS += -D_WIN32_WINNT=0x0501 .ELSE CFLAGS += -DWINVER=0x0400 -D_WIN32_WINNT=0x0501 diff --git a/vcl/workben/makefile.mk b/vcl/workben/makefile.mk index 83abbbf4e6bf..34316356a1a6 100644 --- a/vcl/workben/makefile.mk +++ b/vcl/workben/makefile.mk @@ -125,6 +125,7 @@ APP5OBJS= $(OBJ)$/svpclient.obj APP5STDLIBS= $(CPPULIB) \ $(CPPUHELPERLIB) \ $(COMPHELPERLIB) \ + $(UCBHELPERLIB) \ $(VCLLIB) \ $(TOOLSLIB) \ $(SALLIB) \ diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx index cf64d58110e8..7bea0b94f76a 100644 --- a/vcl/workben/svpclient.cxx +++ b/vcl/workben/svpclient.cxx @@ -50,6 +50,8 @@ #include <comphelper/processfactory.hxx> #include <cppuhelper/servicefactory.hxx> #include <cppuhelper/bootstrap.hxx> +#include "ucbhelper/contentbroker.hxx" +#include "ucbhelper/configurationkeys.hxx" #include <errno.h> #include <unistd.h> @@ -60,6 +62,8 @@ using namespace rtl; +using namespace cppu; +using namespace comphelper; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; // ----------------------------------------------------------------------- @@ -73,10 +77,47 @@ SAL_IMPLEMENT_MAIN() { tools::extendApplicationEnvironment(); - Reference< XMultiServiceFactory > xMS; - xMS = cppu::createRegistryServiceFactory( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "applicat.rdb" ) ), sal_True ); + //------------------------------------------------- + // create the global service-manager + //------------------------------------------------- + Reference< XMultiServiceFactory > xFactory; + try + { + Reference< XComponentContext > xCtx = defaultBootstrap_InitialComponentContext(); + xFactory = Reference< XMultiServiceFactory >( xCtx->getServiceManager(), UNO_QUERY ); + if( xFactory.is() ) + setProcessServiceFactory( xFactory ); + } + catch( com::sun::star::uno::Exception& rExc) + { + } + + if( ! xFactory.is() ) + { + fprintf( stderr, "Could not bootstrap UNO, installation must be in disorder. Exiting.\n" ); + exit( 1 ); + } + + /* + * Create UCB. + */ + Sequence< Any > aArgs( 2 ); + aArgs[ 0 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL ); + aArgs[ 1 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE ); +#if OSL_DEBUG_LEVEL > 1 + sal_Bool bSuccess = +#endif + ::ucbhelper::ContentBroker::initialize( xFactory, aArgs ); + +#if OSL_DEBUG_LEVEL > 1 + if ( !bSuccess ) + { + fprintf( stderr, "Error creating UCB, installation must be in disorder. Exiting.\n" ); + exit( 1 ); + } +#endif - InitVCL( xMS ); + InitVCL( xFactory ); ::Main(); DeInitVCL(); |